Categories
Ask Engineering Software Engineering

How does local/remote development server environment work for testing within workplaces?

I am a trainee software engineer and have started working for a small company recently. I have been working on a java project locally on my PC which I pulled from a VCS. I want to test the code where it calls another system to retrieve some data. However, I am unsure as to how […]

Categories
Ask Engineering Software Engineering

Different repositories with crud methods depending on same map

I have four different repositories with different entities. I also have four different maps to store each of entities in. The repositories have crud methods for their entity, and they also implement an interface with the crud methods. I know that normally I would a have one map for each repository containing all of the […]

Categories
Ask Engineering Software Engineering

Since `strcpy`, `strcat`, and `sprintf` are dangerous, what shall we use in stead of them?

In Computer Systems: a Programmer’s Perspective, Unfortunately, a number of commonly used library functions, including strcpy, strcat, and sprintf, have the property that they can generate a byte sequence without being given any indication of the size of the destination buffer [97]. Such conditions can lead to vulnerabilities to buffer overflow. Since strcpy, strcat, and […]

Categories
Ask Engineering Software Engineering

How does AI voice work?

Google AI or Siri or Alexa they have their own voices and I want to know how the voices was given. I want to make a Pdf reader but with custom voice and language so how can I develop one. I have no idea about AI voices so please help and try to answer how […]

Categories
Ask Engineering Software Engineering

How should I wrap an asynchronous operation as a coroutine?

Suppose we have an asynchronous IO operation int asyncIO(char* buf, int n, void (*callback)(void*), void* ctx); which fills buf and calls callback(ctx) on completion. Presumably, if I wrapped the operation as a coroutine, it should Not require explicit callbacks, atomics, mutexes etc Be non-blocking Be as lightweight as possible 1 because it’s the point of […]

Categories
Ask Engineering Software Engineering

Python dynamically import modules

I am trying to find the best practice for importing modules dynamically. I have multiple files in a specific folder called providers which contain a class Updater and all of them have the same objects. This is the structure I have: main.py |-providers: –__init__.py –plex.py –pihole.py Each provider has 3 class objects: get_latest_version, get_current_version, install. […]

Categories
Ask Engineering Software Engineering

How to change flask project

I coded some flask project Flask+nginx+gunicorn, based on tutrotial digital ocean LINK How should i to change it? Do I need to stop Nginx, stop the service , git pull and restart everything? Or i need to do something more? Its stupid question, but i really don’t know how to do it without any troubles.

Categories
Ask Engineering Software Engineering

single DB – multitenancy with microservices

we are working on a studio with which we can create a multiple applications for mobiles. The studio code is currently monolith and we are migrating it to a micro-services Architecture. Note : we store the tenant details in master tenant db which is seperate 1) Studio serves multiple tenants and it has around 10 […]

Categories
Ask Engineering Software Engineering

Where’s the best place to put formatting logic

I have an MVC application where the data entity structures are in the Model layer. On top of that there is Business layer that sits between the Controllers and Models. There are various places in the application where I display vehicles, and the format to display a vehicle is currently "MakeName:Name", where Name is a […]

Categories
Ask Engineering Software Engineering

How is it likely if at all that I might come to need Newtonsoft Json.NET?

This is in connection to an ASP.NET Core API project and .NET Core client project. I have experimented with the following method that makes a request and processes a response with what I think can be arbitrarily complicated trees of large objects. The trees were at least 4 levels deep and at least one object […]