0
votes
0answers
17 views

PHP - Can I add to an existing function?

I want be to be able to re-write the code of an existing PHP function in an abstract manner. Here is an example: scandir() scans a directory for files and folders, and returns the relative paths '.' ...
2
votes
4answers
389 views

What is the “right” way to implement DI in .NET?

I'm looking to implement dependency injection in a relatively large application but have no experience in it. I studied the concept and a few implementations of IoC and dependency injectors available, ...
-2
votes
0answers
19 views

Python startup error [on hold]

I keep getting a "Subprocess Startup Error when I try to run Python on my laptop. It further explains, "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal ...
-5
votes
2answers
80 views

Which of these two implementations is better? Why? [on hold]

Variant 1: # Python implementation of algorithm known as 'Sieve of Eratosthenes' # Primes by elimination of multiples # Returns list of primes below a limit # V A R I A N T 1 def ...
1
vote
2answers
137 views

Why use using-statements when you want to reopen connections?

In a Winforms project I've been working on recently, I've been dutifully using using-statements for objects that implement IDisposable. I want to reopen a database connection, however because the ...
2
votes
0answers
43 views

Can the C++ template system be used to perform type safe operations of the relational algebra

Assume that the parameters of functions representing operations of the relational algebra are represented by individual types: structs or classes. An operation such as (natural) join will have ...
0
votes
0answers
27 views

How to structure a REST API response for a Flux/Redux frontend?

I have a question about how to structure a response where I return objects related to other objects (one-to-many/many-to-one), and to tell me if the way I've structured my endpoints are wrong or not, ...
-4
votes
0answers
28 views

Big O for nested functions with in another function [duplicate]

The complexity for the function doIt is O(n^2), so for me to determine the big O I would take O(N^2) * O(logN) which I think would come out to O(N^2 Log N)? Is this correct? The code is C++: i=1 ...
1
vote
1answer
45 views

Inner and outer class relationship: should outer class be friend of inner's?

Is this design bad? Does it break encapsulation? The structure class B is a component of class A. Therefore, class A needs access to class B's members. Let a house be class A. Let a housekeeper be a ...
2
votes
3answers
70 views

Data from devices with unreliable clocks

Are there any viable approaches to dealing with data coming from devices with unreliable clocks? We have a database system running on a central server. The latest addition to the system is a bunch of ...
-2
votes
1answer
128 views

What is disinheritance in object oriented programming?

I am confused over Virtual Inheritance and disinheritance ? Is both are same ?
-5
votes
0answers
22 views

Free online courses or certifications in programming languages .etc.. for Computer Science graduate? [on hold]

I am being encouraged to search out free online courses to add more skills to my Resume regarding programming and computing to get a job as a Java programmer. The only real experience I have is using ...
-3
votes
0answers
21 views

(OPENGL 1.1 & LWJGL) transfering UV/normals using buffer

Good day, i'm currently trying to draw a textured sphere in OPENGL 1.1 using the JAVA LWJGL. the sphere itself draws fine, but the texture mapping is messed up: I'm drawing the sphere using GL11....
0
votes
1answer
78 views

Business logic - Server side vs client side

In my current project I have a screen which pulls data from several webservices, pulls data from db via backend api and checks that all resources have the same data. The other webservices are partial ...
-4
votes
0answers
59 views

What are the limitations of Factory design patterns? How to overcome?

As we know there are many ways, by which we can break a singleton implementation in Java. Similarly do we have any ways by which we can break factory method implementation in Java? if yes then how to ...
0
votes
0answers
60 views

A modification of singleton pattern

"Singleton" is widely considered anti-pattern ("bad" in everyday language). What about this alternative modified singleton pattern? An object constructor for our class ensures that at any given ...
1
vote
0answers
18 views

How to deal with weekly schema updates on database production server? (ASPNet MVC and Entity Framework)

I'm working with scrum methodology. thus weekly schema updates are performed to the final product. However our customer is already populating the database. How can I update the database without ...
0
votes
0answers
47 views

Heuristics/rules for programming to an interface

I am struggling with applying the "programming to an interface" guideline because I can't seem to decide in which situations it is necessary and in which ones it's overkill (or even counter productive)...
1
vote
1answer
18 views

Rewrite Events in EventStore

I'm thinking about whats the correct pattern to handle this case in CQRS / Event Sourcing: I created events to calculate a balance and system goes into production. By accident, this implementation ...
0
votes
1answer
69 views

Simplifying code of a calculator (help)

This is part of the code of a calculator that works on command line. It works fine and the math is correct but it's a little redundant: switch(Operator) { case "+": result = num1 + num2; ...
0
votes
2answers
60 views

Static factory method in base class

An increasingly popular definition of factory method is: a static method of a class that returns an object of that class' type. But unlike a constructor, the actual object it returns might be an ...
0
votes
1answer
51 views

Why adding positive values in Java or C# sometimes result in a negative value?

I was playing around with variables in Java. public class Hello { public static void main(String[] args) { byte byteV = 127; short shortV = Short.MAX_VALUE; int intV = ...
-4
votes
0answers
33 views

Which language or framework is used in the following website link? [on hold]

This is the website link How does the red waveform appear in the first when the website is loading and then how the animation of neural networks move along with the mouse pointer?
0
votes
1answer
36 views

MSDN - ServiceLocation Outdated Why? Alternatives?

I recently (1 month) start working in a project and as I was going through the code I saw an using Microsoft.Practices.ServiceLocation and as I searched for the documentation on that library is says: ...
-4
votes
0answers
31 views

Looking for a frontend android framework to capture a picture, let my backend identify it, and then frontend displays my description string [on hold]

I'm basically an ansi-standard C programmer with Unix/Linux (and various other OS'es) experience, but zero android (and that's approaching zero from the negative side:). I want to write a (hopefully) ...
4
votes
0answers
30 views

UML-diagraming a plugin architecture

I want to show that in my new system, plugins are used to control the core software components. What would be a good way to show that in UML? I will definitely use sequence diagrams to show ...
2
votes
1answer
83 views

When to lock an object in a game

I'm writing a game in Java where each game object has a number of properties, but these can all be changed in one of two ways: Every second, a tick runs which may automatically cause a change. Users ...
-3
votes
0answers
43 views

Some authoritative sources about naming properties in viewmodels? [on hold]

Being the senior (as in: working the longest time) developer at the office I gradually am pushed in the direction of supervisor. I have to monitor, coach and review the code of a team of four other ...
1
vote
1answer
35 views

ADO.NET - Is it better to handle a combo box or label event, and where should the data be sourced from?

Context I recently wrote a final exam that required using a BindingSource object with ADO.NET to populate a number of combo box and label controls from which the user could perform basic business ...
0
votes
0answers
28 views

What's an optimal procedure to create a connected cyclic grid of nodes and edges for A* pathfinding

like the title says, I'm trying to create a grid of nodes that hold edges or connections to each other so I can perform A* algorithm to have objects traverse across them as seen in your standard RTS. ...
1
vote
1answer
49 views

Software architecture for uploading dynamically created websites

I have a question that is crucial for my end of year project. Background My web application allows users to build other webapps based on drag&drop (within the domain of the webapp). These ...
0
votes
1answer
33 views

Implementing map with tail recursion

I am trying to solve this exercise. It is about reimplementing the map function in haskell for learning purpose. I found a solution which doesn't browse all the elements of the list (simple linked ...
0
votes
1answer
37 views

What are the pros and cons of using these Multithreading Models in a Client/Server Architecture

In my classes of parallel programming the teacher mentioned three models, dynamic thread creation (create threads according to demand), thread pool (create a fixed amount of threads) and mixed or ...
0
votes
0answers
18 views

Acceptance testing a Laravel package?

I and my team are developing a package that works with a UI that uses JS heavily. This means that although we can write unit tests for some of the classes. But when it comes to acceptance testing, it ...
0
votes
3answers
76 views

How do you create immutable objects with many parameters?

I need to create an immutable object but it requires several parameters to work like: class FooRepo { public string ConnectionStringName { get; } public string SchemaName { get; } public ...
-5
votes
0answers
31 views

Is it possible to access or call a html file in one Cordova/Phonegap app from another on iOS? [on hold]

I would Like to call/open HTML file from APP(A) from APP(B) on IOS, much like you can open an HTML file from another app on chrome by using "(appid)/Myfile.html".
0
votes
3answers
111 views

Does IEnumerable required to use foreach in collections

I have following class that didnt implement IEnumerable but working perfectly with foreach. And also , arrays are working without implementing IEnumerable. So why it is keep saying that IEnumerable ...
0
votes
1answer
21 views

Is there a way to control a looping Python script with Heroku?

I have a Python script that continuously makes GET and POST requests to a third-party API at about 1 request per second. It uses a while loop, so the requests all come from the same process. Currently,...
0
votes
0answers
16 views

Dynamic Printing Options

I believe this is the correct community to post this question in, if not please point me to the correct one. Overview: Current web app gives users the ability to print labels from specific printers. ...

15 30 50 per page