0
votes
0answers
7 views

Is it unnecessary to learn the kind of data structures and objects inside sql only because we are using another language to access db indirectly?

Suppose we are using java or python to access the database. Then is it considered a wastage of time and unnecessary to learn the kind of data structures and objects being used inside sql and the inner ...
3
votes
2answers
36 views

How would one test a function with a large number of scenarios?

I've heard that it's ideal to have one assert (or expect or should, etc) per aspect of a component's behavior you're trying to test. Is this how it works? An addOne function would be tested like this, ...
0
votes
0answers
8 views

How to send a http request through a program developed in C?

As you read in the title, for example, i wanna login to my account in StackOverflow by sending the E-mail and password through a program developed in c language, so all what i have to do is to enter ...
4
votes
3answers
3k views

Separation of retrieving data and business objects between DAL and BLL Layers

I did some research before posting this question. Among other questions or post, one of those is provided below. I could not get a clear mind how to determine.. Business Objects within a Data Access ...
6
votes
5answers
271 views

If A has B and B holds reference of A, is it a flawed design need to be fixed?

Suppose, I have class Boss and Worker; Boss has a Worker and Worker holds a reference of Boss: Boss.h #include "Worker.h" class Boss{ public: Worker worker; }; Worker.h class Boss; class ...
0
votes
1answer
16 views

Redis connection failing

So I have node app docker containers running, and they run fine, but I noticed over the course of 1-2 months all of my apps begun having errors with redis, seems like the connection is not making it / ...
0
votes
1answer
30 views

DB Data structure for .Net sequenced list with insert, delete, move

The problem is maintaining in .net a list of rows that have a specific sequence where rows can be inserted, moved and deleted, and being able to save and restore that sequence from disk. In memory ...
-1
votes
0answers
11 views

Shuffling of MCQ's in my examination portal

the screen shots attached are structure of database of my exam portal, one picture represents the question bank and second represents the test details.Test ID is acting as a primary and foreign key. ...
2
votes
3answers
4k views

In what situation do Entity Framework enums become useful?

I am working on a project where there will be plenty of static options being stored in the database. I looked at using Enums for this, but do not see how they could be useful. They do not create any ...
0
votes
0answers
18 views

Choosing class names and relations for different user scopes

I am developing an online Order Management System using PHP in which I have some different behavioural scopes regarding the User class: some user scope under which the chronological transactions are ...
4
votes
4answers
2k views

Should I use initializer blocks in Java?

I recently came across a Java construct I have never seen before and was wondering whether I should use it. It seems to be called initializer blocks. public class Test { public Test() { /* first ...
0
votes
0answers
15 views

Principles for secure user login/authentication

Backstory: In my from-scratch PHP/MySQL web development projects, I often start (and end) working on a secure user authentication. I'm self-taught and never certain that my site is adequately ...
-3
votes
0answers
21 views

Why my commands arent's working in ssh? [on hold]

I connected to my server using ssh via Putty, and I typed the command apt-get install git or sudo apt-get install git but I get the error : -bash: apt-get: command not found or -bash: sudo: command ...
0
votes
1answer
69 views

How to name this class? Is it a pattern?

I need to create a class which will have the following structure: public class MyClass { ArrayList<File> myList = new ArrayList<>(); public void addFile(File f) { myList....
-1
votes
0answers
23 views

Sorting a 2d array in java

I'm a high school student who is interested in computer science, I asked this question to my teacher but she told me not to bother messing around with code and trying to understand how to modify ...
47
votes
8answers
13k views

What happens to garbage in C++?

Java has an automatic GC that once in a while Stops The World, but takes care of garbage on a heap. Now C/C++ applications don't have these STW freezes, their memory usage doesn't grow infinitely ...
0
votes
2answers
49 views

Can government use a GNU GPL licensed sofware (phpBB) without posting the source code?

I'm now doing my internship in a government company (in India) and I've been assigned a project to create an online forum for the company.. I'm about to use phpBB forum software to create it, which ...
4
votes
1answer
114 views

Why is it such a bad idea to share an interface between server and client?

I was reading the Spring Cloud Netflix documentation when I found out about a way to share an interface between an HTTP server and its client. They use this example for microservices, although there's ...
13
votes
9answers
12k views

Use constructor or setter method?

I am working on a UI code where I have an Action class, something like this - public class MyAction extends Action { public MyAction() { setText("My Action Text"); setToolTip("My ...
1
vote
2answers
41 views

What should I do if I published an app with a wrong package name?

I found out that the package name should follow the web domain you own for this application / developer Id. I published an app starting with com.health... (example) because I didn't know better at ...
0
votes
0answers
7 views

Coerce optBlock in AlgDesign R package to only show certain treatments per row of blocks

Using the optBlock function of the AlgDesing R package, I can create a block design with 16 treatments, 12 blocks (columns), and 4 treatment per block (rows) with the following code: optBlock(~.,...
0
votes
1answer
96 views

What are the significant memory management models aside from Java (GC) and C++ (manual approach)? [on hold]

There are at least two distinct memory management models: Java (we do it for you) C++ (it is your responsibility) I have two questions: (1) Is GC language specific or compiler specific? (2) Do ...
28
votes
9answers
17k views

How to check if 4 points form a square?

Assume I have 4 points (they are 2-dimension), which are different from each other, and I want to know whether they form a square. How to do it? (let the process be as simple as possible.)
-2
votes
0answers
17 views

Mobile devices and their screen resolution [on hold]

I have used and if statement with document.write(screen.width + 'x' + screen.height); There must be a better way like knowing the type of device and then moving them to a custom website. Does ...
1
vote
1answer
26 views

jersey post with a huge payload

I have a requirement to write a POST endpoint where the payload is huge(not normal). In the order 10s of Megabytes. And this endpoint will be accessed by a lot of clients (in the order of 1000s) ...
2
votes
2answers
36 views

AMQP broker and happen-before guarantees

I am trying to figure out how an AMQP broker, such as RabbitMQ, can be integrated in our architecture. This should allow to easily scale horizontally in the future. For the sake of simplicity, let me ...
0
votes
0answers
9 views

Bi-directionally synchronize/mirror folders over the internet

I am programming on the C# stack, but I have next to none Azure experience. We have several customers who have various processing needs on data files that reside at the customers computers. We want ...
1
vote
1answer
34 views

How to implement a secure way to allow users to reset password via url?

Password reset option should be given only if the link has come from that specific user's inbox and not from somewhere else. How to implement url in such a way that the required information i.e. ...
16
votes
5answers
3k views

In software programming, would it be possible to have both CPU and GPU loads at 100%?

This is a general question on a subject I've found interesting as a gamer: CPU/GPU bottlenecks and programming. If I'm not mistaken, I've come to understand that both CPU and GPU calculate stuff, but ...
-3
votes
0answers
41 views

C++ compiling error [on hold]

I am an Ubuntu version 16.04 user, if that's a dealbreaker already, I don't blame you. I installed Codelite and created a c++ project, very simple, with little deviation from the preset c++ code. If ...
-2
votes
2answers
54 views

Help in estimating cost for software project [on hold]

I am working as a freelancer developer and i am working full time at their site daily. Now i want give a quote for new project. Am doing this in wpf and c# and this project includes 2d graphical ...
-3
votes
1answer
39 views

use of UDP in DNS

UDP provides no guarantee for delivery and no protection from duplication and is connection-less protocol but why then DNS uses UDP protocol. Please make me clarify. At what conditions we should ...
4
votes
1answer
210 views

How to move from OOP object composition to FP function composition in C#

I have been working for a few weeks on a new web project and I am realizing that all I am doing is basically calculations and transformations on data, and that most of my classes do not contain any ...
5
votes
1answer
81 views

Should the ability to locate where code is being used be a consideration?

I was modifying a class whose job is to load other classes from the same directory. Basically, everytime a new class is added you need to add a new CommandClass; statement to this class for it to be ...
0
votes
0answers
11 views

Best way to create integratable module for mobile apps

Let's say I want to build a mobile App which others can include/integrate in their app as a separtate module. The goal is that the customers can add the functinality of my app into theirs. Since the ...
3
votes
1answer
111 views

Effect of demoting copy-on-write page to read-write on other processes

The Windows OS tries to conserve physical memory usage by allowing DLLs loaded in their base (desired) address in different processes to use the same physical pages with copy-on-write semantics; this ...
52
votes
8answers
8k views

Are events only used for GUI programming?

Are events only used for GUI programming? How do you handle in normal backend programming when something happens to this other thing?
1
vote
1answer
62 views

Should written use cases be consistent with use case diagram?

I'm developing a video web system like YouTube where users can upload, view, update and delete their own videos (CRUD operation). Original I drawn the use case diagram like this: But I learned ...
4
votes
2answers
99 views

How to handle thousands of messages to C socket?

I currently have a setup looking like this: __________________ _________ ________ ___________ | Front end server |----| Varnish |----| NodeJS |----| C-service | ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ ...
0
votes
2answers
127 views

IF statement with OR logical operator

Just a basic question on IF statements in programming languages, specifically C++. Consider the following basic code example: int i = 2; if(i == 2 || i == 4) { //do something } Because the ...
-3
votes
0answers
42 views

Use Java 'GUI builder' plugins/tools or not?

There exist 'window builder' (or GUI builder) types of plugins for Java IDEs. They help to make GUI faster to make, but is it really better than writing GUI code manually? Especially if some project ...
0
votes
2answers
65 views

Why python doesn't provide optional types?

I've recently used typescript, and I think the ability to mention or not types is great. It greatly reduces the debugging time while also giving you the advantages of an untyped language. I could ...
0
votes
0answers
33 views

Download latest Excel files from a website regularly

First, I'll try and describe my problem, then I'll explain how I am trying to get around it. Problem: I regularly download excel files from the internet, this occurs every three months. There's a ...
2
votes
3answers
114 views

How Does An Interpreter Work?

I've been searching for tons of websites for how an interpreter works, but I found none of these explain how Interpreter works internally. But I found in many places how compiler works with all the ...

15 30 50 per page