All Questions
2
votes
1answer
42 views
Understanding Generic Repository Pattern
I am trying to understand the generic repository implementation. I have seen this line (or similar to it) in many examples:
public interface IRepository<TEntity> : IDisposable where TEntity : ...
0
votes
0answers
15 views
How Can I make sum like tree child node value?
I am developing an accounting software in php. There is a group wise party ledger that is a tree like the page below.
Parent is group and leaf is particular.
At first I have generated the group tree ...
4
votes
0answers
17 views
Algorithm to generate Edges and Vertexes outwards from origin with max multiplicity of 3
I am creating a 2d game for a website where the universe can grow extremely large (basically infinitely large). Initially, the universe is composed of 6 stars that are an equal distance from the ...
-1
votes
0answers
15 views
Do any Java libraries support batch sql query processing and proceeds even if any duplicate records exists in the batch?
Is batch processing possible in jdbi with the below condition?
If one insert query in the batch fails because of violating some constraints ( Primary key, foreign key violation.. etc) will it resume ...
0
votes
1answer
18 views
Amazon Echo Development on LAN
I have followed the tutorial from Amazon to get started with the Echo. I made a skill and setup an application server on their AWS Lambda for basic testing.
I have a few questions about the Echo, ...
-4
votes
0answers
24 views
hanging beads, could not find an approach to solve it
There is chain with N beads, the i'th bead has weight Wi and price Ci. The chain is placed hanging from the edge of the table with K beads hanging and the remaining N-K beads on the table. You can ...
2
votes
0answers
17 views
What practical problem results from lack of hygienic macros in Clojure?
I've heard that Clojure macros are easier to write but not as reliable as Racket's hygienic macros. My question has 2 parts:
How does gensym differ from hygienic macros?
What do Racket macros ...
3
votes
3answers
66 views
What does it mean to declare a volatile variable?
Many low level programs use the volatile keyword for types for memory mapping and such, however I'm sort of confused as to what it REALLY does in the background (I.E what does it mean when the ...
2
votes
1answer
30 views
License for forked software library
I'm writing an application for which I want to use some 20-year old open source code. The original code is kind of antiquated in certain aspects, for example, it's written in K&R C rather than ...
-1
votes
2answers
38 views
Detecting Persons In Seats from Image
I am attempting to build an attendance program which could analyze if someone is sitting in a seat. The seats are fixed making knowing where each seat is easy, but I don't really know where to start ...
4
votes
2answers
43 views
Synchronous facade hiding asynchronous web service
I'm maintaining a system providing a typical synchronous web service REST API. It routes each request to one of several possible backend services. Now there is a new backend I want to use, but there ...
3
votes
1answer
61 views
How to communicate between cooperative tasks “first me, then you”?
I am in the final stages of development of a simple embedded system. The device performs PID coefficient estimation and then instantiates a PID controller with the estimated coefficients.
The ...
3
votes
2answers
93 views
How are POST/PUT/DELETE data passed to APIs?
I know that the data is passed through HTTP, but I'm not sure if I should be passing data through HTTP headers, or HTTP bodies. Which one is the convention for APIs?
Also, theoretically using PHP, ...
-4
votes
0answers
33 views
Does a certificate from oracle hold any significance? [on hold]
recently I have registered myself for oracle certification. Does it hold any significance?
12
votes
6answers
1k views
Isn't the use of NoSQL Databases impractical in a large number of use cases?
I'm learning about NoSQL Databases for a week now.
I really understand the advantages of NoSQL Databases and the many use cases they are great for.
But often people write their articles like NoSQL ...
3
votes
0answers
59 views
Why isn't LIMIT [offset,]row_count in standard SQL?
SQL:2008 added support for a comparable OFFSET syntax OFFSET num {ROW|ROWS} FETCH {FIRST|NEXT} [num] {ROW|ROWS} ONLY.
On the other hand, MySQL (and SQLite) support LIMIT offset, row_count or LIMIT ...
1
vote
0answers
37 views
Keeping git and TFS projects in sync [on hold]
We are making UI changes to an ASP web application. We cannot push any of our changes to TFS until we're finished, ~2 month build. Our goal is to pull TFS changesets into a git branch 2x weekly to ...
0
votes
0answers
81 views
Learning Mongo…Can this be done…would it be wise? [on hold]
Coming from a mostly .NET background I am learning Mongo for a new project. I have completed one class on Pluralsight so far and had an interesting thought with Mongo. Can it be run completely client ...
1
vote
0answers
96 views
Javascript Closure Style Similar to Java Class Structure
PROBLEM: There is a coding imperative (S. McConnel, Code Complete) that one shouldn't code on language, but by means of it, e.g. doing right style things even if language doesn't have some ...
7
votes
3answers
310 views
Interface Segregation Principle: What to do if interfaces have significant overlap?
From Agile Software Development, Principles, Patterns, and Practices: Pearson New International Edition:
Sometimes, the methods invoked by different groups of clients will overlap. If the overlap ...
-2
votes
0answers
27 views
Slow Git over Samba share in Virtual Machine [on hold]
My current local development setup consists in a Windows host, where I have all my tools, and a Ubuntu server running in a local virtual machine with VMWare. In the VMWare I have a server and a folder ...
0
votes
1answer
85 views
What is the significance of database host name while configuring database?
The name database host, how the name indicates "the server that hosts the database", should be the server ip, that hosts that database. I don't see any relation of it with the scripts that try to ...
1
vote
0answers
67 views
Documentation of code review
In a project we have a rather formal code review, which is currently done manually and documented in Excel sheets and Word docs.
We would like to improve the current code review process by ...
0
votes
0answers
12 views
Is programmers.blogoverflow.com closed? [migrated]
The last blog was 8/11/2013 and http://programmers.blogoverflow.com/about/ links to a blog chat room that has been frozen.
I am interested in contributing to a programming blog, the first article ...
-2
votes
0answers
25 views
JUnit using HyperSQL to test DAO classes [on hold]
I made some research how to test my DAO layer using HyperSQL and I found this question: How to test the data access layer?
How to import DBConnection because I tried using hypersql jar and it did not ...
-1
votes
0answers
7 views
Incorrect datetime value when setting up Django with MySql [migrated]
I am trying to set up Django with Mysql on a Mac machine.
Django version: 1.9
Mysql version: 5.6.23
Mac OS version: 10.11
For the data communication between Mysql and Django, I use Mysql Connector.
...
36
votes
4answers
2k views
Why does git pull perform a merge instead of a rebase by default?
Consider the following situation:
You have a clone of a git repository
You have some local commits (commits that have not yet been pushed anywhere)
The remote repository has new commits that you ...
2
votes
1answer
53 views
How to handle a client app that connects to a TCP server and sends/receives text data bidirectionally?
I've got a conceptual question (which is probably better posted here than on StackOverflow?).
I want to develop a client application that maintains a persistent connection to a server, and exchanges ...
2
votes
2answers
74 views
ASP.NET storing encrypted & salted Password
I have a question about storing encrypted passwords in your database to help secure them. I have a class that encrypts the password passed in and returns a string. This string has 3 parts too it, all ...
-3
votes
0answers
38 views
Design Pattern for modular application [on hold]
I often find architectural design written like this:
class RoleManager() {
private providers;
public registerProvider(ProviderInterface provider) {
this.providers.push(providers);
...
2
votes
1answer
95 views
How are objects treated in an anonymous inner class?
Lets take this for example...
entryText.addTextChangedListener(new TextWatcher() {
TextView wordCount = (TextView) findViewById(R.id.wordCount);
TextView charCount = (TextView) ...
1
vote
3answers
47 views
Event Sourcing and cross-context aggregate
I had this idea of different write models being used in different bounded contexts, but both being the same aggregate instance (the same events).
For example consider a User aggregate that is used ...
-1
votes
0answers
43 views
Efficient way to download and insert large number of JSON records in database [on hold]
I have a project that loads lots of data from the server in JSON format. It downloads master data related to products, dealers information, etc.
As of now, what I did is to download -using volley ...
1
vote
0answers
10 views
Is it possible to mock and inject traits in PHPUnit?
I need to extend a third party class I cannot modify. The class's dependencies are for the most part injected through the constructor, making them easy to mock. However the class also uses methods ...
0
votes
1answer
57 views
Handling multiple asynchronous events - Wait for pending offers to process on new offer?
I have a programming problem, that I don't know how to solve. And while I have provided a sample of my code, I am interested in a conceptual answer on how to resolve this problem.
On a tradeOffers ...
3
votes
3answers
65 views
What can qualify for potential tail call recursion (TCO) optimization or tail recursion elimination (TRE)
Short question is: what can qualify for potential tail call recursion optimization (TCO) or tail recursion elimination (TRE) if the compiler or interpreter supports it.
The summary of this question ...
-4
votes
1answer
42 views
Re-initialization array in called function [on hold]
Arrays are passed by reference in javascript. That means arrays are mutable and can be changed in called function. Why am I not able to Re-initialization an array in called function?
function ...
-2
votes
0answers
40 views
pointers and arrays [on hold]
What's the difference between these two arrays?
main()
{
int n;
scanf("%d", &n);
float tab[n];
}
AND
main()
{
int n;
float *tab;
scanf("%d", &n);
tab=(float ...
-1
votes
1answer
47 views
Multiprocessing usage and limitations
I'm not able to find any definite answers in the Python Docs. I'm looking for the limitations in 3.5 on MultiProcessing and using a worker pool. Are worker pools functionally limited to the number ...
-2
votes
0answers
47 views
Does exponentiation bind tighter than multiplication in Python? [on hold]
Does exponentiation bind tighter than multiplication in Python? That is, is x * y ** z the same as x * (y ** z) or as (x * y) ** z? Give a test case and argue which one binds tighter!
I got that x * ...
1
vote
0answers
24 views
Filtering request and responses in RESTful MEAN stack
I have a very basic RESTful service written using the MEAN stack (MongoDb, Express.js, Angular.js, Node.js) and utilizing the Mongoose ODM.
Product schema
var productSchema = new mongoose.Schema({
...
-4
votes
0answers
77 views
MVC both procedural and OOP? [on hold]
I am creating a web application using PHP. I am doing my best to implement an MVC structure based on my understanding. I am not using a framework such as Laravel, etc.
Currently I am implementing it ...
1
vote
3answers
195 views
Do dynamically typed languages, such as Ruby and JavaScript, do any dynamic type checking?
If we look at the definition of "dynamically-typed programming languages" in Wikipedia, it says:
Programming languages which include dynamic type-checking but not static type-checking are often ...
-1
votes
0answers
36 views
Unable to add project to the staging area in git [on hold]
I'm new to git and I want to commit ApexSimulator java project to my repository. I ran into a problem with git staging when I used git add ApexSimulator and git status. I got the below message.
...
-3
votes
0answers
36 views
Dot matrix interface for rotating LED display [on hold]
My girlfriend's father got a Raspberry Pi for Christmas, and is looking to make a rotating LED display similar to something in the link. Long-term, he is thinking of being able to dynamically display ...
2
votes
0answers
41 views
How to correctly draw a UML class diagram with fully qualified association?
Given the following code I have to draw the corresponding class diagram:
public class Shop
{
List<Client> clients;
Storage store;
User chief;
Set<Invoice> invoices;
}
...
-1
votes
0answers
83 views
Programmatically fix broken Java source code [migrated]
I'm currently creating a grading utility for my university that compiles, lints, run professor-defined tests, etc. In the process, I'm generating a parse tree of the student's source code so I can do ...
-3
votes
1answer
48 views
What are the advantages of using STOMP over Websocket? [on hold]
I have to take a decision which one should be used to develop an application. Use case is a real-time data processing application between server and browser.Also, it should be a secure application. My ...
-6
votes
0answers
26 views
Round Robin Algorithm [on hold]
Given an array with N names of your favorite sports teams, write a program that generates clashes between these teams like a "league." That is, all teams play each other. To do so follow an ...
-1
votes
2answers
77 views
Translate MATLAB expressions containing “^” power operator to C++ syntax
Brief:
I have several very large math expressions written in Matlab/Octave syntax. I
want to evaluate them within a C++ function by copy and pasting them in, however the problem is they contain "^" ...