All Questions
0
votes
0answers
3 views
How big C++ modules should be
Today many big projects put classes in separate header files (e.g. chromium). For example it's foo.h and foo.cpp for a class Foo.
The proposal for modules says that a module consists of several ...
-1
votes
0answers
7 views
What kind of architecture or design can be made for communication within an ecosystem of apps?
Say one concentrates on developing a feature or app that focuses on a specific purpose to simplistic perfection.
If you have several of these apps, they might share some features which could ...
-3
votes
0answers
18 views
Should we still be calling it “inversion of control”? [on hold]
It seems to me that these days, good OOP design is basically predicated on inversion of control. Pretty much the first question you should be asking for any design pattern is "is the control ...
0
votes
0answers
8 views
Getting instances without using the Spring context
I'm writing a small game of life implementation with Spring, but trying to avoid referencing the Spring context within my code. I have two interfaces, Board and Cell. In each implementation of Board ...
-4
votes
0answers
16 views
I am looking- for cool js librarys [on hold]
something like weather.js or char.js ,need some input :)
Mozilla also has some cool projects running, but I am looking not for something special.
Thank you
-2
votes
0answers
15 views
multi-consumer multi-queue rabbitMq Spring (read message by message for each consumer process)
The goal of this project is a bit technical but hopefully to have someone to advise me better.
Note that I work in a multi-clustering context, which means that I have the same program running on ...
-5
votes
0answers
22 views
I add dynamically dropdown and input fields rows using Jquery php but how to submit multiple fields row data into mysql Php? [on hold]
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(function () {
$('#btnAdd').click(function () {
var num = ...
-2
votes
1answer
52 views
Should filenames be relative to their directory name? [on hold]
Suppose I have two directories: house-1 and house-2.
Each house directory needs to have files describing its windows and doors.
Which is the more readable and clear directory structure (from another ...
0
votes
0answers
12 views
Storing Visualizations & Analysis In Database
I am currently working on a web-application that would allow users to analyze & visualize data. For example, one of the use-cases is that the user will perform a Principal Component Analysis and ...
-6
votes
0answers
26 views
What's wrong about thos code [on hold]
#!/usr/bin/env python
'makeTextFile.py--create text file'
import os
ls=os.linesep
# get filename
while True:
if os.path.exists(fname):
print "ERROR: '%s' already exists" % fname
else:
...
-3
votes
0answers
22 views
What should I know to create applications in Phoenix Webframework?
I am a beginner in creating web applications. Till this date I have only knowledge of creating applications that run on a command-line or terminal. I would like to advance myself to the next level. I ...
-4
votes
0answers
21 views
While loops in C# for Windows Forms. I'm trying to loop certain coefficients so that they can keep displaying on certain labels. [on hold]
If I un-comment the labels corresponding to the second row of on the form, then all that does is when i press, for example (Tile/Concrete), then both sets of labels show the same coefficients.
What ...
-2
votes
1answer
30 views
Registration form with email verification
Can someone point me in the right direction: I need to make a website with a registration form, to create accounts with e-mail verification, to write the forms content in a database table or something ...
2
votes
0answers
20 views
In MVP pattern should the View instantiate a Model object based on UI contents, or just pass these contents as parameters to the Presenter?
I'm using MVP pattern in an android app that I'm developing.
I have basically 4 elements:
The AddUserView where a new user can be added:
The AddUserPresenter
The UserInfo (the pojo)
The ...
-4
votes
0answers
39 views
Integrate between PHP and C program
I have written a C program, which i will keep in my server. Now I am developing a website using PHP, so that other users can also have access to my stand alone C program.
So here I want my PHP to ...
11
votes
3answers
626 views
Is it ok if I can't solve a problem when sitting in front of a computer? [on hold]
I am a hobbyist programmer, and a beginner. Most of the time, I cannot solve the problem while sitting in front of the computer. For example, I was trying to find out if one number is a power of ...
0
votes
0answers
10 views
Converting hexadecimal to ASCII in c [migrated]
I'm working on an Android rom for a mobile phone and I want to make the kernel load the wifi MAC address from the device's NV partition. My code looks like this:
#include <linux/kernel.h>
...
1
vote
1answer
42 views
where to put methods that manipulate objects
I have a controller method as follow:
public class RoomsController {
@RequestMapping(method = RequestMethod.GET, path="/v1/rooms/{name}")
public ResponseEntity<?> ...
-5
votes
0answers
23 views
Help with script to add business days to a date and display the new date in an Adobe form [on hold]
Help with script to add business days to a date and display the new date in an Adobe form.
There has got to be a very easy solution but I am stumped and can't figure it out or find anything online ...
5
votes
2answers
68 views
using Integer objects in Java API
I was reviewing a coworker's code, and noticed that he was using Integer objects instead of ints in some APIs (getters, setters, instance variables, and method parameters). When I asked him why, he ...
5
votes
1answer
48 views
Prove complexity for a generic algorithm
I'm new to theory of complexity and am trying to prove a fact.
So, let's consider an algorithm T that receive at input an integer n.
That algorithm has a time complexity for n = 1 : θ(1) and for n > ...
0
votes
0answers
27 views
Modeling a multi-channel communication device in C#
Background
We (my coworkers and I) are architecting a high level C# API to interact with a hardware device's native Windows DLL.
First I will discuss the hardware-architecture, then get to the ...
7
votes
4answers
855 views
Why would passing objects through static methods be advantageous?
Why would there be an advantage to use a static method and pass the reference to an object as a parameter rather than calling the method on an object?
A clarification on what I mean may be found in ...
-1
votes
2answers
111 views
What did the reviewer refer to in this code review? [on hold]
Please bare with me on this case, I have experience has a developer but I'm new to swift programming, recently I applied to a Job that requires to solve a code challenge. Since there was only a ...
0
votes
4answers
70 views
How can Jeff Dean's “latency numbers every programmer should know” be accurate in the context of varying hardware implementations?
I'm referring this chart of latency numbers, attributed to Jeff Dean at Google.
The thing I don't understand is, do these numbers not vary from one set of hardware to the next? How can these be ...
1
vote
0answers
26 views
How do I determine the image direction
if I have two pictures, say A and B respectively, A was taken at time t1 and after that the camera was moved slightly to the left and then B was taken at time t2.
Is there any algorithm that I can ...
0
votes
0answers
10 views
ODBC 3 Multiple Statements vs Multiple Connections
So right now I have a single thread to handle all the requests for the database. Let's say I have 400 requests per second for logins / logouts / other stuff, and 400 requests per second which are only ...
-2
votes
0answers
30 views
What is the best resource for learning SOAP, RESTful API's and Web Services in general? [on hold]
I'm a pretty novice Java developer, who took 2 semesters of Java in school, plus a visual basic and some HTML, but overall not an expert by any means. I have a new position at work where I'm trying to ...
5
votes
2answers
55 views
Optimize a git repo, containing large binary files
Our project is about 11GB, 10 of which are binary data (.png images). Consequently, a git diff or git status operations take up more than a minute. Fortunately all data files are separated into a ...
0
votes
4answers
49 views
Obtaining lists from such an array
Let's say my array contains integers. I'd like to create lists, so that every list contains indexes where a particular value occured in the array. For instance, if the array was 5,0,3,5,2,5,3, we ...
-5
votes
0answers
30 views
If condition vs variable assignment performance wise [duplicate]
So I was doing some exercises from my college programming class and me and a class mate started discussing about which would be more of effective:
to use an if to prevent uneeded variable assignment ...
0
votes
0answers
30 views
Guaranteed message sending for messages of different priority for different modules
Imagine the following:
There is a service to which several modules are connected (might be 10 might be thousand).
Each module can have message (might be none, might be several thousands).
Messages ...
-4
votes
0answers
45 views
How To Write A Program That Counts The Number Of Times A Word In A Sentence Occurs? [on hold]
Need help with this program to count the number of words in a user entered sentence. For example. The sentence "The lazy dog is a brown dog". The word "dog" occurs 2 times, the word "brown" occurs 1 ...
-5
votes
0answers
29 views
Develop an algorithm and programming in PASCAL [on hold]
In preparation for the General Elections the Elections Authority must undertake the printing of voting slips for the various electoral districts. Each voting slip must contain the voter's full name ...
1
vote
1answer
75 views
Avoiding tightly coupled class definitions in Python for has-a relationships
I have the following code:
class Car(object):
def __init__(self, my_id):
self.my_id = my_id
self.color = color
self.brand = brand
self.get_color()
...
-5
votes
0answers
22 views
help python 2.7 TkinterGUI [on hold]
my system:
linux debian7 python2.7 Idle2.7 Tkinter2.7
Could someone please help me, with my code?
I only get restart in my Python Shell.
I do not see a GUI window anywhere.
I only have py2.7 and ...
-6
votes
0answers
67 views
In 2016, are there any strong reasons to use C# over VB.NET? [on hold]
I realize this conversation has taken place many times, but we want to reopen the conversation for 2016.
Our department is discussing whether we should use C# or VB.NET. Several people are involved ...
0
votes
0answers
23 views
Idiomatic way of uploading images using async to Sharepoint from ASP.NET 5
Another title could be 'How to make an async Repository pattern with image upload in ASP.NET 5'
I'm making a site with ASP.NET 5 and it uses the CSOM (ClientContext, etc) to connect to a Sharepoint ...
7
votes
2answers
109 views
Why does expressing calculations as matrix multiplications make them faster?
In Google's MNist tutorial using TensorFlow, a calculation is exhibited in which one step is equivalent to multiplying a matrix by a vector. Google first shows a picture in which each numeric ...
-4
votes
0answers
34 views
Best possible alternative language for mobile platform [on hold]
Obviously Java c# and other languages are owned by big companies. Should they use something more free and open source? If yes, what languages would substitute on Android and Iphone.
2
votes
0answers
97 views
Laissez faire memory management
I noticed that various scripting language interpreters leak memory even for very simple programs, like the canonical "Hello world!" program. To illustrate the problem with examples:
Perl 5.22 leaks ...
-1
votes
1answer
84 views
Use OO library in procedural project [on hold]
I am writing a program using a procedural style. At most I have some modules where the logic is present (one to retrieve data from, one to display the info, one with the saving logic, etc.), but my ...
2
votes
0answers
22 views
Algorithm to generate all sets of m points in n x n x n cubic lattice which are unique under symmetry
I am implementing an algorithm which is going to be quite computationally complex, and want to try to make sure I'm not doing unnecessary work.
There is an n x n x n cubic lattice, e.g. if n=2 this ...
3
votes
0answers
52 views
Dependency Injection & In-class Instantiation | Practical Limitations
Dependency Inversion is Good
Inversion of dependency is good, it:
Simplifies unit-testing
Reduces coupling, allowing software components to be used interchangeably
Keeps instantiation logic for a ...
1
vote
0answers
20 views
Save Two Different Domain Objects in One Service Call
Think that when one Branch saved, a Customer entity must created in n tier layered system architecture. All validation has already implemented in CustomerService.
Should BranchService create ...
77
votes
12answers
4k views
Why have private fields, isn't protected enough?
Is the visibility private of class fields/properties/attributes useful? In OOP, sooner or later, you are going to make a subclass of a class and in that case, it is good to understand and being able ...
0
votes
2answers
74 views
Chat Protocol Implementation
For a school assignment we need to implement a homebrewed protocol. We make usage of plaintext commands to send and receive messages. The commands underneath are currently supported by the messaging ...
3
votes
5answers
174 views
Why are we anyway doing Software Estimation knowing it is broken?
This is one SW development problem that hits the sea of developers as they crash into the rocks of management. Somewhere down the line the estimate given by the programmer gets translated to a date ...
0
votes
0answers
17 views
Should I create separate data channels for sending voice and video data over RTC?
I'm trying RTC and I'm curious to know whether I'm going to want to design the connection so that I send all my data over a single channel and simply identify the messages with a purpose-specific name ...
-3
votes
0answers
31 views
Linux Device Drivers or Security Engineer [on hold]
My friends working on different hi-tech companies say that there is very less development work in device drivers. And mostly it is related to tuning and testing of the driver.
Theres no coding or ...