Alright, question time. Never really had luck trying this before but let's give it a go again.

I have a friend who is trying to make a dual mouse/cursor plugin/library/whatever it's called in Unity on Windows, but they are struggling with the win32 APIs they need to get it working. Is there anyone on here that knows how to do this? I know I've seen similar things on here before, but I can't find them and I don't know if there was any source code or documentation on how it was done, or even if it was on Windows. Unfortunately, it does have to be Windows. They rejected my proposal to try running it under Cygwin, and it probably wouldn't work with the features they need.

#ProgrammingHelp #CSHelp #Unity #Win32 #Win32API #DualCursor

#Nix #Systemd #Bash #ProgrammingHelp

https://git.krutonium.ca/Krutonium/NixOS/src/branch/master/user/krutonium-hm-extras/screenshot-uploader.nix

Does anyone know how to make it so that instead of just grabbing the latest PNG file, systemd passes the file in question to the script? %f doesn't seem to work; $1 ends up giving me the name of the binary and $2 is undefined.

NixOS/user/krutonium-hm-extras/screenshot-uploader.nix at master

NixOS

Krutonium's Forgejo Service

Common fix:
Don’t just say "Help debug this." Instead try: "Debug my Python loop that skips index zero. Fix the exit condition in this code: [paste snippet]."

If the AI’s answer isn’t quite right, reply with a clearer example or point out where its logic failed. Specific questions get better results.

#AICoding #LearnToCode #AIProgramming #DeveloperTips #CodingTips #TechGuide #PromptEngineering #ProgrammingHelp #SoftwareDevelopment #TechEducation (377 chars) (2/2)

I know this is a big ask but would anyone be willing to tutor me with aspnet core and auth? I've been beating my head against this for like months and I just want to get to actually making my application. aspnet core identity seems like it's too limited and not really meant for what i'm trying to do (support an SPA and third party client mobile apps), but the docs are confusing me so I'm not even sure if that's right. I was thinking of using keycloak, but that's a huge undertaking it seems like and has been giving me trouble too. #fediHelp #aspnetcore #programmingHelp
Domain-Driven Design (DDD): concepts and examples https://chat-to.dev/post?id=967 #devops #programminghelp #programming #python #php
Your participation in the community helps us to grow, so get involved.
Domain-Driven Design (DDD): concepts and examples

Domain-Driven Design (DDD) is an approach to software development that emphasizes deep understanding of the business domain and aligns the software model with real-world concepts. It was introduced by Eric Evans in his book Domain-Driven Design: Tackling Complexity in the Heart of Software. ## <br>Core Concepts of DDD DDD is based on a few fundamental principles: **1. Ubiquitous Language** A shared language between developers and domain experts that describes business concepts, reducing misunderstandings. **2. Bounded Context** A self-contained part of the system where a particular domain model is applied. It defines the boundaries within which terms and concepts have specific meanings. **3. Entities** Objects with a distinct identity that persists over time, even if their attributes change. Example in Python: ```py class Customer: def __init__(self, customer_id, name): self.customer_id = customer_id self.name = name def change_name(self, new_name): self.name = new_name ``` Even if the name changes, the `customer_id` remains the same. **4. Value Objects** Objects that describe characteristics but have no identity, meaning they are interchangeable if their values are the same. Example in Python: ```py from dataclasses import dataclass @dataclass(frozen=True) class Address: street: str city: str zip_code: str ``` Two addresses with the same values are considered identical. **5. Aggregates** A group of domain objects that are treated as a single unit, with one entity acting as the aggregate root. Example in Python: ```py class Order: def __init__(self, order_id, customer): self.order_id = order_id self.customer = customer self.items = [] def add_item(self, item): self.items.append(item) ``` The `Order` is the aggregate root, ensuring that modifications happen through it. **6. Repositories** Repositories provide an abstraction for retrieving and persisting aggregates. Example in Python using an in-memory repository: ```py class OrderRepository: def __init__(self): self.orders = {} def save(self, order): self.orders[order.order_id] = order def find_by_id(self, order_id): return self.orders.get(order_id) ``` **7. Domain Services** Services encapsulate business logic that doesn't naturally fit within an entity or value object. Example in Python: ```py class PaymentService: def process_payment(self, order, payment_details): # Payment processing logic here print(f"Processing payment for Order {order.order_id}") ``` **8. Application Services** These services orchestrate workflows, calling domain services and repositories but not containing business logic themselves. Example in Python: ```py class OrderApplicationService: def __init__(self, order_repository, payment_service): self.order_repository = order_repository self.payment_service = payment_service def place_order(self, customer, items): order = Order(order_id=123, customer=customer) for item in items: order.add_item(item) self.order_repository.save(order) self.payment_service.process_payment(order, "credit_card") ``` # <br>Example in PHP Using DDD principles in PHP: **Entity** ```php class Customer { private string $id; private string $name; public function __construct(string $id, string $name) { $this->id = $id; $this->name = $name; } public function changeName(string $newName): void { $this->name = $newName; } } ``` **Repository** ```php class CustomerRepository { private array $customers = []; public function save(Customer $customer): void { $this->customers[$customer->getId()] = $customer; } public function findById(string $id): ?Customer { return $this->customers[$id] ?? null; } } ``` ## <br>When to Use DDD - When working on complex business logic. - When multiple teams need a shared language to collaborate. - When the business rules and interactions evolve over time. ## <br>When to Avoid DDD - When working on small applications with minimal domain complexity. - When the project timeline is very short. - When the team lacks expertise in DDD, as it requires a learning curve. I'd like to see in the comments what these tests would look like applied to other languages such as Javascript, C++ or Luan. Participate

Domain-Driven Design (DDD): concepts and examples https://chat-to.dev/post?id=967 #devops #programminghelp #programming #python #php
Your participation in the community helps us to grow, so get involved.
Domain-Driven Design (DDD): concepts and examples

Domain-Driven Design (DDD) is an approach to software development that emphasizes deep understanding of the business domain and aligns the software model with real-world concepts. It was introduced by Eric Evans in his book Domain-Driven Design: Tackling Complexity in the Heart of Software. ## <br>Core Concepts of DDD DDD is based on a few fundamental principles: **1. Ubiquitous Language** A shared language between developers and domain experts that describes business concepts, reducing misunderstandings. **2. Bounded Context** A self-contained part of the system where a particular domain model is applied. It defines the boundaries within which terms and concepts have specific meanings. **3. Entities** Objects with a distinct identity that persists over time, even if their attributes change. Example in Python: ```py class Customer: def __init__(self, customer_id, name): self.customer_id = customer_id self.name = name def change_name(self, new_name): self.name = new_name ``` Even if the name changes, the `customer_id` remains the same. **4. Value Objects** Objects that describe characteristics but have no identity, meaning they are interchangeable if their values are the same. Example in Python: ```py from dataclasses import dataclass @dataclass(frozen=True) class Address: street: str city: str zip_code: str ``` Two addresses with the same values are considered identical. **5. Aggregates** A group of domain objects that are treated as a single unit, with one entity acting as the aggregate root. Example in Python: ```py class Order: def __init__(self, order_id, customer): self.order_id = order_id self.customer = customer self.items = [] def add_item(self, item): self.items.append(item) ``` The `Order` is the aggregate root, ensuring that modifications happen through it. **6. Repositories** Repositories provide an abstraction for retrieving and persisting aggregates. Example in Python using an in-memory repository: ```py class OrderRepository: def __init__(self): self.orders = {} def save(self, order): self.orders[order.order_id] = order def find_by_id(self, order_id): return self.orders.get(order_id) ``` **7. Domain Services** Services encapsulate business logic that doesn't naturally fit within an entity or value object. Example in Python: ```py class PaymentService: def process_payment(self, order, payment_details): # Payment processing logic here print(f"Processing payment for Order {order.order_id}") ``` **8. Application Services** These services orchestrate workflows, calling domain services and repositories but not containing business logic themselves. Example in Python: ```py class OrderApplicationService: def __init__(self, order_repository, payment_service): self.order_repository = order_repository self.payment_service = payment_service def place_order(self, customer, items): order = Order(order_id=123, customer=customer) for item in items: order.add_item(item) self.order_repository.save(order) self.payment_service.process_payment(order, "credit_card") ``` # <br>Example in PHP Using DDD principles in PHP: **Entity** ```php class Customer { private string $id; private string $name; public function __construct(string $id, string $name) { $this->id = $id; $this->name = $name; } public function changeName(string $newName): void { $this->name = $newName; } } ``` **Repository** ```php class CustomerRepository { private array $customers = []; public function save(Customer $customer): void { $this->customers[$customer->getId()] = $customer; } public function findById(string $id): ?Customer { return $this->customers[$id] ?? null; } } ``` ## <br>When to Use DDD - When working on complex business logic. - When multiple teams need a shared language to collaborate. - When the business rules and interactions evolve over time. ## <br>When to Avoid DDD - When working on small applications with minimal domain complexity. - When the project timeline is very short. - When the team lacks expertise in DDD, as it requires a learning curve. I'd like to see in the comments what these tests would look like applied to other languages such as Javascript, C++ or Luan. Participate

Deno 2 Could Finally Replace Node.js - Level Up Coding

With complete Node.js compatibility, native TypeScript support, and innovative new features, Deno 2 is here to challenge the status quo. Is it time to rethink your back-end choices? It’s a language…

Level Up Coding
Record CSS Animations with DevTools - Rexs - Medium

Want to look like a top-tier web developer without actually becoming one? The secret is simple: fancy animations. Nothing screams “I know what I’m doing” like slick transitions and buttery-smooth…

Medium
Servers and Linux https://chat-to.dev/post?id=909 #linux #server #programminghelp #programminghelp
Would you like more guides like this? Join our community today and get involved. https://chat-to.dev
Community Learning 2 lesson 2

# Servers and Linux Some of you may have been in the previous networking class that I hosted. For those of you, you may skim this as you are going to be familiar with it. Compared to the previous and the future lessons, this will be more reading then following along. There will be some hands on stuff to do at the end. First we will do a very high level overview of what a server is. Server is an umbrella term. Its just a computer that serves other computers. You can have a server be a db, a game server, part of a network, a web server like we are doing, or really anything else. We specifically will be using it as a webserver using apache. Once you get the fundamentals down you will be able to expand from a simple web server to extend its functions. What you choose to do with your server is up to you. However for this tutorial it will have specific tasks. What we currently have it doing is just running your headless distro of choice. We dont have apache on it yet so the only service its running that we interact with is the ssh to interface with the device. Once we install and set up apache, the server will be handling network request. http get request will be the most of it. Once it receives a request, apache will navigate to the /var/www/html dir and return the index.html page. Any file thats within the html page will also get sent. Just like when you are coding your website any asset links will be sent along side, css, your images, etc. Once apache is done sending the files it will terminate the connection. By default i dont think apache is set to keep alive the connection, however this is a setting you will need to configure if you want to page to update without refreshing. Clearly important if you are making a service that has live features in it, like a chat service. Anyways, once the server has sent the data it will close the connection and move on to the next client that request something. Additionally if you choose to install sql onto your server it will be handling all those processes aswell in the background. These are the most common things that you server will be doing. Of course whatever you add of your own accord will change this. Now this is a linux based server. So rather then just learning about apache (which we will be installing next) you will need to learn some basics. Since we are headless to maximize resources and reduce attack surface, you will want to be comfortable in a cli. I could tell you all the basics but i would rather just [link you here](https://www.terminaltutor.com/) because im lazy. You dont need to do the whole thing if you dont want too. Itll save your progress aslong as your on the same browser so dont feel you need to do it in 1 go. This will cover the fundamentals & a bit more. The parts that I care about will be moving around the file system and playing with files. Just go over how to copy, move, delete, and make files & directories and you will be understanding enough to follow along with the rest of the steps. If you want to dive deeper msg me and ill provide the resources that im pretty sure i mentioned in the last post aswell haha. Short post, but the tutor site is what will be the hands on bit of todays lesson. Next post we will be installing and configuring apache aswell as going over its parts so you can better understand what does what. As always i can be found in the community_learning chat room. See you there!

Is there a technical name for this part of a URL?
I tried looking online and a lot of resources seem to just refer to it as a subdirectory, but I want to refer to this in the context of an API so the directory concept doesn't really apply.
#programming #http #url #help #programminghelp