-2
votes
0answers
9 views

Access local file from web UI?

Imagine I have a web app on a server (to which I log in), that stores in a database the location of a file on my computer, say /home/user_xyz/Desktop/CV.pdf Is there a way for that web app to create ...
-2
votes
0answers
13 views

Recommend a book for self teach Computer Science stuff [on hold]

So I did a research on how to self study Computer Science, I got the subject down but I can't find a book because of lack confidence to choose from... Fields I'm interested with are: Computer Binary ...
0
votes
1answer
18 views

How do I create a parse tree, given a grammar?

I'm implementing a toy programming language and I've got as far as a working tokenizer that takes a stream of characters like this. 1 2 3 (2 *) map And outputs a stream of tokens { number "1" } { ...
-5
votes
0answers
16 views

Help me in this java programs

Write a program: Must start if user says hello Has to repeat until the user says bye Ask user to enter his or her name, let him or her know if the entered name contains space or dot. Each time print ...
0
votes
0answers
20 views

Saving tabular, spreadsheet-like data in a relational database?

I'm hoping this question isn't too broad or too prone to opinionated answers, since I could really use some pointers. I'm trying to come up with a way to persist tabular, spreadsheet-like1, data in a ...
-1
votes
0answers
10 views

how to access Symfony's data / business layer from 3rd party apps

I have te following architectural scenario which doesn't depend on me and I can't change: On one server/machine has several php applications and a postgresdatabase: each application uses its own ...
0
votes
0answers
9 views

Delay in UDP stream receiver

I have a UDP sender application and UDP receiver application in Qt using QudpSocket. Server sends 14 byte time (count down) packets every second to the receiver using unicast. The receiver ...
0
votes
0answers
33 views

Please let me know more refactoring strategies for my codebase?

I have written a shell command-line interpreter which uses loops and recursion (but maybe not "recursive decent", that usually solves this problem) I want to refactor the function to 4 or 5 smaller ...
-3
votes
1answer
65 views

Shouldn't Java method parameters always be final [on hold]

Say I have a method that writes a string to a file: public void write(String content, File out) { // writes content to out } If I want to protect the parameters and ensure that they are not ...
-4
votes
0answers
14 views

When should I use adjacency list model and nested sets?

I'm going to create an online store, and I'm misunderstanding with my database. 1/ when should I use adjacency list model? 2/ when should I use nested sets? Nested Sets algorithm is very new for me! ...
0
votes
0answers
30 views

What are the benefits of an input/output component design?

For the company I work at, all of our projects, including a new one started last year, are written in C89. We write for vxWorks (a real time embedded operation system). Our software runs ...
-3
votes
0answers
28 views

Type safe substituion for parameter passing

What are some examples of type safe substitution for parameter passing as well as for return types in subtyping introduced through subclassing. Does the Liksov Substitution Principle apply to them?
0
votes
1answer
21 views

Sdk building, declare dependencies inside the assembly or use external?

At my company, we're building an SDK consisting of a number of assemblies. For example, we deliver an assembly called Company.Platform.Security that contains the implementation of our authorization ...
4
votes
1answer
79 views

Why can't Pull Requests be seriously implemented in Mercurial?

A week ago, I was at LFNW and as I was talking with Larry Hastings after his talk, he said (paraphrased): There's something in Git that makes the Pull Request workflow possible that isn't there in ...
9
votes
4answers
875 views

What do you call a function that's pure, meaning the same input will always return the same output, but also has side effects?

Say we have a normal pure function such as function add(a, b) { return a + b } And then we alter it such that it has a side effect function add(a, b) { writeToDatabase(Math.random()) return ...
-4
votes
0answers
30 views

How to use FFTW library [on hold]

I do a project for school (it's a tuner made with Arduino) for which I need Fourier transform. I looked up what I could, but I couldn't understand the example codes I found. Basically what I need is ...
0
votes
0answers
62 views

How to manage C/C++ projects? [on hold]

I'm pretty confident with C/C++ coding. I never had to deal much with project management beyond adding files to an existing project as this was the job of one guy in the team. I can code pretty much ...
-1
votes
0answers
6 views

How to declare parameters in this case [migrated]

If I have a variable that is declared like this char *string[z][z]; And I want to factor out a for loop from a very large function where the above variable is included, how should the call look ...
1
vote
0answers
24 views

How to get verification that you've implemented all your API in a static library?

I just learned that static library building skips the linking stage, which explains why my build process succeeds all the time when it's possible I actually haven't implemented a function in my ...
-2
votes
1answer
30 views

Android Apps: How can I view an apps code/files?

I love taking apart applications, software, and websites to see how developers were able to create a feature or how a game handles AI. Something I'd like to be able to do is view an app's files ...
0
votes
0answers
57 views

Why support cyclic dependencies at all? Are there valid use cases? [duplicate]

Background Time ago I learnt something about package design, in particular about loose coupling: The Acyclic Dependencies Principle The dependency structure between packages must be a ...
-1
votes
1answer
33 views

During fork system call which execute first parent or child

As i am executing a one pipe example pgm from libc.pdf,I noticed that the parent process first completed then only child process completed.From my knowledged about os the child process must complete ...
-1
votes
1answer
80 views

Should there be print statements in a library

I have built a library that is being used by a few people. They say that library has a few print statements which is wrong because a library should give freedom to users to use the library the way ...
-4
votes
0answers
36 views

The path to learning algorithms and data structure - Am I doing it right? [on hold]

I'm trying to self-teach myself, to be a real, educated software engineer. I know math is important to gain more logical thinking and problem solving skills, and after that learning algorithms and ...
0
votes
0answers
4 views

Why is Octave not recognizing 'randindex' after a few iterations? [migrated]

I'm using SwarmOps in Octave. (I'm new to Octave.) In particular, I'm using PSO. The program seems to be running fine for a few iterations, but after a while I'm getting the error: "`randindex' ...
-3
votes
0answers
10 views

Mesh/region library in python [on hold]

I'm searching for a python library for handling arbitrary 2d areas. It should be able of defining areas from polygons handling it's data structure as a set of triangles create complex 2d regions ...
0
votes
2answers
59 views

Creating a Vector (physics) Class in Java

I'm trying to create a vector (like in physics) class in Java. I want to support vector addition, dot product, scalar multiplication, etc. So, my question is, is it possible to do this with generics? ...
0
votes
2answers
41 views

Run C program in debug mode (without debugger)

If I want my program to be able to run in debug mode, is it a good idea to make it accept a flag such as -D=DEBUG when I run the program? I currently have a DEBUG variable in a .h file but that I ...
-2
votes
0answers
19 views

Update Fork from master problems

I'm currently contributing to an OpenSource Project on GitHub. The problem I currently have, is that every time a PR was merged, when trying to update my fork, it will show for example "this branch is ...
0
votes
1answer
51 views

How can I avoid duplicating information in this scenario?

I have a Data class that can be placed inside a DataCollection class that can be placed inside a DataCollectionCollection class. Kinda like an egg can placed inside a box that can be placed inside a ...
2
votes
2answers
55 views

How can I find out network latency in rest service

I have two Java applications deployed on tomcat. For inter application communication I provide jar file of application (Java API) to other application and it becomes a method call which is fast. Now ...
-3
votes
0answers
16 views

Registration servlet issue (BLOB and DAO) in mysql

I was trying to implement a registration page where I had profile image as a blob in the form. I tried to use a DAO to insert the form inputs to a mysql table 'users'. However this is not inserting ...
-3
votes
0answers
15 views

How to develop animation in Android with the help of given animation by designer?

I am trying to develop Android application. I am searching for animation tutorials on Android but they are very basic like fade-in, fade-out. But what if we want to develop advanced animation like ...
3
votes
1answer
80 views

What is the point of calculating these variables this way?

I'm skimming through a very popular game's source code at the moment and I came across these variables inside of this class. public static final BlockPos ORIGIN = new BlockPos(0, 0, 0); private ...
0
votes
1answer
28 views

UI Testing and Code Coverage

My company wants me to write UI tests that test the business logic (all of the use cases MUST be independently testable) I decided to do it in selenium. I have managed to create a decent product (as ...
1
vote
1answer
28 views

How to use fields from an object after an exception is thrown and the object can't be fully created

The issue that I have is that I need information from an object that a method returns when it throws an exception. It is a little hard to describe so I have this java pseudo code example. I have a ...
0
votes
2answers
71 views

Is it a good idea having default static variables for new instances?

OK let's say I have something like this: public class MyObject { public static int DefaultValue = 9 private int _value = DefaultValue; public int Value { get { return _value; } set { ...
-2
votes
0answers
13 views

How to insert log transformed columns into an existing dataframe using column indices (in pandas, python)

How do I insert columns that are log transformed(after doing log transformation of certain variables)of a data frame called 'log_data' back to it's original data frame 'df' using specific column ...
-6
votes
0answers
48 views

How to replace “{” and “}” except those inside a <style> tag? [on hold]

Let's say I have the following html content: [style] body { width: 100% !important; height: 100%; margin: 0; } [/style] [body] welcome to testing, **{user}**! [/body] ...
0
votes
0answers
23 views

Which search engine should I use to suport complex search scenerio

Let’ assume that I have a database for storing orders for multiple stores and I have following tables: User – represents user Store – represents store UserStore – many to many between User and ...
4
votes
2answers
56 views

prevent abuse to rest api endpoint

Question 1 I have a login api endpoint http://127.0.0.1:8080/api/account/login it checks if phone number has been validated. If not it'll call POST http://127.0.0.1:8080/api/account/sendsms ...
-2
votes
0answers
22 views

How would I implement the following formula as a function in java? [on hold]

Where you are trying to find the smallest number for n with inputs p and y. I tried to implement this as: int index = 0; for (int i = 0; index == 0; i++) { if (bFormula(i, perHit, hitsNeeded) ...
0
votes
1answer
38 views

What kind of data structure should be used to store components in an electrical schematic program?

Is there a specific data structure, object oriented programming methodology, and/or approach for achieving what programs like LT Spice, Altium Designer, and Cadence Virtuoso use to manage ...
0
votes
1answer
33 views

Taskrunner - with multi threading design

I am looking for advice on how to implement a multi threaded task runner. My background is Java and Spring. It would look like the following. BatchTask Each BatchTask shall run in parallel and ...
0
votes
0answers
38 views

Good examples for use of design patterns in Unity [on hold]

My students have learned OOP as well as the strategy design pattern during the first semester (Processing/Java), which lead to understanding Unity's component based architecture (similarity of ...
1
vote
1answer
44 views

Observer Design Pattern with complicated objects

I am trying to currently get a good grasp on the Observer design pattern, but I am stuck wondering about one specific issue. In the examples I have been able to find of implementation, they are all ...
4
votes
1answer
61 views

Perform crossover operation on AST in genetic programming

So in general when you perform a crossover in GA, you directly flip a random section in the "genome", with the corresponding section in the other parent, and mutate it based on the mutation rate. ...
0
votes
2answers
118 views

Using an answer from any question and answer site in my source code is plagiarism?

Since English is not my native language, I try to be brief as much as possible to understand my question case 1: Sometimes I cannot figure out how to make things to work like in this question,Sending ...
1
vote
2answers
58 views

Ambient dependency injection through static service locator

After some googling I found some debates about whether constructor injection or property/field injection is better, but there is yet another alternative that strikes me as more beneficial. In most ...
2
votes
2answers
45 views

How do you address the problem of dealing with an external service that stores your data and you want to keep in sync?

I'm integrating an enterprise application with an existing pattern. The main problem is how to synchronize data between my system and an external system through RPC (HTTP API calls to be precise). ...

15 30 50 per page