Programming Practices – A long-term project that primarily relies on the JavaScript ecosystem

I want to develop a set of tools that web agencies can use to manage their infrastructure and projects. I want to create a web server control panel first. Since I hope this will be a long-term project, I give a lot of thought about which ecosystem to choose. I have more experience with PHP, but since almost all web developers know JavaScript, I'm considering using a Node.js framework instead of a Symfony framework.

My question is, how sustainable is it to rely primarily on JS? Does it make sense according to the current state of affairs?

I like the JS approach because the project uses one language, the same best practices, concepts, and guidelines for both the back end and the front end. On the other hand, I have the impression that the PHP ecosystem is more mature (stable and predictable). I really like the current framework that I use for other projects. At the same time, I believe that JS is the language with even greater potential in the future.

I understand that every tool has its purpose, but JS has evolved a lot and there are many counterpart solutions to PHP, for example in JS.

Thank you very much.

How to fix a copyright error in an Android Studio project

I created an Android Studio project, it is working properly and after a few days I want to change and update my app, but Android Studio shows all of my Java code in the project as XML.

~ Licensed under the Apache License, Version 2.0 (the "License");

~ You may only use this file in accordance with the license.

~ You can get a copy of the license at


~ Unless required by law or agreed in writing, software

~ distributed under the L.

Device Recommendation – Best camera and protocol for embedded real-time CNN project

It has something to do with photography, so I hope this fits into this forum.

I want to develop a standalone real-time CNN application for outdoor imaging and cannot deal with the myriad of camera options and their communication protocols.
The goal is a Linux embedded device (e.g. Beaglebone + Edge TPU). and the top language is python. (if it is inevitable, I can write a c ++ driver)

I have done a number of projects with webcams using OpenCV. However, this project requires a more serious camera with motorized zoom and auto focus.
with at least 3MP and 30fps.

  1. There are numerous Chinese IP camera blocks with zoom functions.
    but they're streaming H.265, and I'm not sure how OpenCV would handle it.
    It is also not clear how the zoom function in one of them should be controlled via Python.
  2. Then there are USB2 camera blocks that seem to be of lower but adequate quality, but I couldn't find one with motorized zoom.
  3. Then there are the cameras & # 39; Gige & # 39; and & # 39; USB3 Vision & # 39; which appear optimal, but are prohibitively expensive (over $ 500).

This is kind of an open question, but I couldn't find a lot of information on the subject online, so I hope to find wisdom here.

So I wondered if anyone has any advice or recommendations.

Precise measurement of the execution times of ASP.NET Core 3.x actions (web API project)?

I want to be able to log the time spent by a particular web API action in an ASP.NET Core 3.x application.

This is a very old ASP.NET question based on global action filters, but in ASP.NET Core I think middlewares are more appropriate.

From a customer perspective, I want to measure the following time as accurately as possible:

Time to first byte - Time spent to send the request

So I implemented the following with a slightly modified code from c-sharpcorner:

/// tries to measure request processing time
public class ResponseTimeMiddleware
    // Name of the Response Header, Custom Headers starts with "X-"  
    private const string ResponseHeaderResponseTime = "X-Response-Time-ms";

    // Handle to the next Middleware in the pipeline  
    private readonly RequestDelegate _next;

    public ResponseTimeMiddleware(RequestDelegate next)
        _next = next;

    public Task InvokeAsync(HttpContext context)
        // skipping measurement of non-actual work like OPTIONS
        if (context.Request.Method == "OPTIONS")
            return _next(context);

        // Start the Timer using Stopwatch  
        var watch = new Stopwatch();

        context.Response.OnStarting(() => {
            // Stop the timer information and calculate the time   
            var responseTimeForCompleteRequest = watch.ElapsedMilliseconds;
            // Add the Response time information in the Response headers.   
            context.Response.Headers(ResponseHeaderResponseTime) = responseTimeForCompleteRequest.ToString();

            var logger = context.RequestServices.GetService();
            string fullUrl = $"{context.Request.Scheme}://{context.Request.Host}{context.Request.Path}{context.Request.QueryString}";
            logger?.LogDebug($"(Performance) Request to {fullUrl} took {responseTimeForCompleteRequest} ms");

            return Task.CompletedTask;

        // Call the next delegate/middleware in the pipeline   
        return _next(context);

Startup.cs (insert middleware)

public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory,
    ILoggingService logger, IHostApplicationLifetime lifetime, IServiceProvider serviceProvider)


    // ...

Is that a good approach? I am mainly interested in accuracy and do not waste server resources.

git – I can't access the cloned project on github

If you give more when you have general access to the cloned project, no access will be shown in mine.

Follow the code:

Wilhams@LAPTOP-LALQ3KSU MINGW64 ~ (master)

$ git clone git-learn-clone

Cloning into 'git-learn-clone'...

remote: Enumerating objects: 18, done.

remote: Counting objects: 100% (18/18), done.

remote: Compressing objects: 100% (7/7), done.

remote: Total 18 (delta 5), reused 18 (delta 5), pack-reused 0

Receiving objects: 100% (18/18), done.

Resolving deltas: 100% (5/5), done.

Wilhams@LAPTOP-LALQ3KSU MINGW64 ~ (master)

$ cd git-learn-clone/

Wilhams@LAPTOP-LALQ3KSU MINGW64 ~/git-learn-clone (master)

$ ls

Wilhams@LAPTOP-LALQ3KSU MINGW64 ~/git-learn-clone (master)

$ more

bash: more: command not found

spfx – Are there dependencies for PS.js (Project Server JSOM)?

Since I can't do what I need to do with the REST API, I'll try to use the Project Server JSOM in an SPFx web part.

I found instructions on how to load the SharePoint JSOM into an SPFx web part using SPComponentLoader, but the example shows SP.js than with multiple dependencies that need to be loaded first:

  • init.js
  • MicrosoftAjax.js
  • SP.Runtime.js

The example that I found for getting started with Project Server JSOM only deals with loading PS.js File:

and then make sure it's loaded by using executeOrDelayUntilScriptLoaded:

SP.SOD.executeOrDelayUntilScriptLoaded(MyFunction, "PS.js");

without mentioning any dependencies.

No dependencies are mentioned in the MS documentation for PS.j's Javascript library.

So are there any dependencies not mentioned that I would have to load beforehand? PS.js to use the Project Server JSOM in SPFx?

C ++ – CMake project layout without src and include directory?

An excerpt of a typical follows cmake Directory layout (I enclose directories in square brackets):

- (libxxx)
    - CMakeLists.txt
    - (include) 
        - CMakeLists.txt
        - (libxxx)
            - xxx.h
    - (src)
        - CMakeLists.txt
        - xxx.cpp
    - (tests)
        - CMakeLists.txt
        - mytest.cpp       

Personally, I prefer many small projects over large ones, and in this case, the preferred ones build2 directory layout (build2 is Boris Kolpackov's build system) seems more reasonable to me. The cmake Analogy of build2 Layout would be:

- (libxxx)
    - CMakeLists.txt
    - (libxxx)
        - CMakeLists.txt
        - xxx.h
        - xxx.cpp
    - (tests)
        - CMakeLists.txt
        - mytest.cpp       

The reason for the canonical build2 Layout is defended here

This layout is merged src and include Directories in one projectname Directory and if there are only a few files in each project, I see the advantage of reduced verbosity and flatter hierarchies.

If modules become mainstream, the argument may tend to merge even more include and src in a single directory.

Any reason not to follow it build2 Recommended layout with cmake Projects?

Give me ideas for a math project in the last academic year about Boolean satisfaction and SAT solvers

I am a student starting an undergrad math project.
I was instructed to read Donald Knuth's Fascicle 6: Satisfiability and develop ideas for a project from this material.

Enter image description here

I have 13 weeks for the project.

I read the sample application section of the book carefully and over Christmas managed to encode Conway's Game of Life in Boolean Logic and look for interesting seeds that develop into predetermined patterns.

Enter image description here

Enter image description here

Today I find it difficult to think of a research question (or project idea) that contains this material and that I can answer or complete under my time constraints.

I could provide Boolean Logic encodings for any sample application that Knuth describes.

I could translate all of the applications in the Sample Applications section in Python 3.

Here are the applications Knuth explains in the Sample Applications section.
A boolean coding recipe book for this could be useful for future readers?

  1. The becoming function
  2. Exact coverage
  3. Four color theorem
  4. error tests
  5. Machine learning
  6. game of life
  7. Mutual exclusion
  8. Digital tomography

Maybe I could solve a new problem with a SAT solver?

Propose an undergrad research project using SAT solvers and Boolean coding

So much basic research is pointless. That rubs my soul. Because of my inexperience, I have trouble asking a reasonable research question.

So help me to use my time wisely and think about a useful research question that I can spend my 13 weeks with?

I would hate to waste those 13 weeks doing something senseless.

Please suggest some ideas.

Basically, you have 13 weeks of cloud time on a rather inexperienced research robot. Please think of an interesting way how this research robot can spend this time.

I would like to add a small sheet to the tree of knowledge.