0
votes
0answers
17 views

Sharing POJO between different handlers

I need to process data in a certain way which can be characterized as pipelines with distinct stages. There can be more than 1 pipelines which might share same stages. Pipeline can be ...
0
votes
2answers
20 views

JavaScript Callbacks before or after exiting function?

Is there a concrete reason to prefer executing callbacks to functions before or after exiting the called function? Example function doSomethingPossiblyAsync(callback) { if ...
0
votes
0answers
21 views

The Same Behavior for Boolean and Exception

The following code uses a boolean preference active: In the active state, it does an operation which could throw an exception. On this exception, it does fall back to the non-active state. let active ...
1
vote
1answer
24 views

Methodologies that fit UX in software development

The classic development phases are requirement elicitation design implementation testing maintenance Currently we are having issues with UX joining the mix. My current job lets UX build wireframes ...
0
votes
0answers
50 views

When to malloc and free?

I found that I didn't have to use malloc every time I did. For example, strdup could do it for me. Now I wonder if it is possible to formally prove that I really need malloc where I use it or can I ...
-2
votes
0answers
15 views

how to display a button in a java gui using NetBeans [on hold]

public class MyFanGui extends javax.swing.JFrame { private FanManager manager = new FanManager(); private Color selectedColor; /** * Creates new form MyFanGui */ public MyFanGui() { ...
-1
votes
0answers
21 views

When writing test cases for node modules, where does testing begin?

Let's say I wrote a node module that is a blogging engine. There are hundreds or thousands of functions that goes into a large application. Where does writing the test case start? Possibly, a lower ...
-3
votes
0answers
15 views

Delphi 7 / indy 10 getting started

I have just upgraded to Indy 10, 1/ How different is the help file and how do you install the Indy one into Delphi 2/ using idHTTP Server has any one written a good example/editorial with ...
-2
votes
0answers
27 views

Handling class types when creating a scripting language in c++

I've been stumped by this for some time although I believe it may be quite simple. I am writing a simple programming language in c++ and I can't figure out the best way to handle variable types ...
3
votes
1answer
37 views

Is there use case for implementing a callback if a future is returned?

If I have function which returns a future, is there any reason to also include a callback where the callback is simply called right before the future completes? The only advantage I can think of ...
1
vote
0answers
5 views

Rotation logic for MNIST Handwritten Digit Dataset

I am currently applying some pre-processing to this dataset. Some of the digits are extremely rotated and I would like to know how others managed to get them 'upright'. I have implemented something ...
4
votes
4answers
126 views

Inheritance vs additional property with null value

For classes with optional fields, is it better to use inheritance or a nullable property? Consider this example: class Book { private String name; } class BookWithColor extends Book { private ...
-3
votes
0answers
49 views

How can I oprimize this hash table in C? [on hold]

I want to run greedy algorithm to coloring vertex. A vertex is an unsigned int of 32 bit. And the hash table represents the important part of the graph. I must holds like 1 000 000 vertexes and edges, ...
-6
votes
0answers
35 views

What Are Online Advertising Networks Coded In? (Adwords, Outbrain, Mobile Display Ads, Etc.) [on hold]

I want to practice my coding skills and I figure it could be a cool project to make a miniature advertising network just locally on my computer. I am curious how advertising networks work on the ...
-3
votes
0answers
9 views

need to find the index at p percent of the array length, and return all the values before that index point [migrated]

given an int[] x and a perentage p (0 - 100), find the smallest valued element y of x so that at least percentage p elements of x are less than or equal to y. I have code that sorts the array ...
1
vote
2answers
89 views

How far should encapsulation in JavaScript go?

I have a variable which I want to use in only one function. I can write my code like this: var theAnswerToLife = 42 var multiplyIt = function(x) { return theAnswerToLife * x } I have some other ...
5
votes
3answers
281 views

Licensing on Github

I'm uploading to GitHub for the first time and I am facing all sort of doubts about licensing. I did not know that topic was that uncovered in the net! But even it is complex, my situation is so ...
-1
votes
0answers
17 views

Using Neo4j in ASP.NET application when collaborating with SQL Server?

I'm going to develop an online video platform with the feature of social network using ASP.NET. In the requirements, users can not only upload, watch and download videos, but also make friend with ...
-5
votes
0answers
24 views

How to develop an online video editor? [on hold]

I need to develop an online video editor that supports the basic functionalities of video editing like cutting, combining, reordering videos and adding effects or transitions on the timeline. In my ...
1
vote
0answers
25 views

Yen's k shortest paths algorithm

I'm currently trying to understand Yen's k shortest paths algorithm. I based myself on the original paper as well as on the Wikipedia article, but still cannot see why it is correct if k > 2. In fact, ...
0
votes
0answers
26 views

Ideas on processing input text file in parallel by Bash script

I have a Bash script that processes files read from standard input, one pathname per line, and runs a CPU intensive task on each file. I happened to notice that even with four cores (grep -c ...
-4
votes
0answers
26 views

Access local file from web UI? [on hold]

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 ...
-3
votes
0answers
29 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
42 views

How do I create a parse tree, given a grammar? [on hold]

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" } { ...
-6
votes
0answers
29 views

Help me in this java programs [on hold]

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
29 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 ...
0
votes
0answers
12 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
19 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
54 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
94 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
17 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! ...
1
vote
0answers
53 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
42 views

Type safe substituion for parameter passing [on hold]

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
27 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 ...
5
votes
1answer
90 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 ...
19
votes
4answers
2k 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
33 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 ...
-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
27 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
32 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
58 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
34 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
87 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
37 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
11 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
65 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? ...
-1
votes
2answers
44 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
22 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
55 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 ...

15 30 50 per page