2
votes
1answer
44 views

Preserving log of immutable Data Structure changes

I have large and complex immutable data structure (language is F#, but should be applicable to any language really) where I defined a lot of functions making changes and returning new instances of ds ...
-3
votes
0answers
25 views

Making a Call to an API service to Test Service is Up

I would like to build a call to the CallCredit (used by, amongst others, UK Fin Services organizations to validate ID's) service to only test the service is up and running and responsive to 'real' ...
-5
votes
1answer
29 views

How to Stop a program by pressing a Character input from user in C? [on hold]

// this is my program bt its not working as i want// #include <stdlib.h> int main() { int i,n[1000]; char c[1000]; for (i=1; i<1000 ;i=i+1) { scanf( "%d",&n[i]); ...
1
vote
1answer
93 views

Why did DirectDraw allow developers to directly write to GPU VRAM?

I'm reversing an old DirectX 7 game and I noticed that it sometimes uses Blt and BltFast but at other times, it locks the directdraw surface and directly writes to GPU VRAM. Why did developers take ...
1
vote
0answers
42 views

Why does the last phase of Irving's Stable Roommates Matching work

Pertaining to the Stable Roommates Problem and the algorithm developed by Robert W. Irving. There are two (sometimes broken into three) phases in which we may come to a stable pairing of everyone in ...
0
votes
1answer
33 views

Should different data resource types have different data mappers?

In my application I have to consume data from an API, do some processing and then store the data retrieved from the API in my own database. Should I have multiple Data Mappers? One for the API and ...
0
votes
3answers
196 views

When NOT to use a class / member variable?

I am trying to learn WHEN NOT to use: classes member variables HERE IS THE CODE access_point_detection_classes.py from scapy.all import * class Handler : def __init__(self) : ...
0
votes
0answers
13 views

Where should I put a library in a Yii project that is not available via Composer?

I can't put the library under vendor/ because that directory is ignored in .gitignore. I put it under bing-ads/ and I have <?php namespace app\models; include 'bing-ads\v10\bingads\ClientProxy....
2
votes
3answers
97 views

Base Class vs Common Member Class

Imagine I have two classes like this... public class SingleplayerGameSetup { public int Seed { get; private set; } public int AiNations { get; private set; } } public class ...
0
votes
2answers
46 views

Object Oriented Python methods and their parameters

Let's say I have a class MyClass ... which has a data member x class MyClass1 : def __init__(self) : self.x = 1 Also a method which does something with x Should I pass self.x as a ...
-4
votes
0answers
44 views

Explanation of DRY with regards to OOP needed [on hold]

An online test I was doing had this question re DRY with regards to OOP. I must confess that even though I thought I understood both, it has me stumped. Any ideas?
1
vote
0answers
23 views

Adding custom object-string transformers to a global static list field in my logging library. Is there a better way?

I'm writing a central logging library. In it is an AutoLogAttribute method attribute that automatically logs entry/exit of methods and their parameters (automatically serialized) like this: [AutoLog] ...
2
votes
3answers
70 views

What is the relationship between a program and processes in the Operating System?

A program, I am referring to any program written in any programming language. It could be a Java program which has only one method to do the multiplication, and a main method executes that ...
2
votes
1answer
113 views

Do extracting piece of logic to function improve or reduce code readability?

If there is some code that needs to be implemented across multiple controllers (lets say, 10), e.g.: // Inside a controller function var myField = null; var response = service.callBackend(function(){...
3
votes
3answers
445 views

Is it ethical to adopt other programmer's algorithms?

Imagine I find a completely new algorithm to compute the square root of a binary number (simplification of real scenario) on an internet forum that was an original creation. Is it ethical for me to ...
1
vote
1answer
203 views

Are recursions intrinsically less safe than iterations?

Java doesn't have a predefined recursion depth limit. As a result the recursion below (a dummy method that returns the value) throws java.lang.StackOverflowError after 62844 (with static) and 14002 (...
-3
votes
0answers
60 views

Best language to start learning GUI? [on hold]

Title says it. I'm a beginner! I only know intermediate Java and C. I'm okay with learning a new language. I know I can use Java for this, but I'm just wondering if there are better options for me. ...
-4
votes
0answers
25 views

Objects and Classes in Python [on hold]

Can anyone: 1. Define what an object is in programming and python. 2. What is class in programming 3. Give an example of an object in python 4. Give an example of class in python I can't seem to ...
1
vote
1answer
74 views

how is stack and heap are assigned to each processes?

How multiples processes are stored in the main memory , i understand every process will be divided into the equal size pages and will be stored in the frames of main memory. if whole main memory is ...
-2
votes
1answer
79 views

Why C# ASP.NET MVC Code First POCO Classes must have getters and setters?

Why in, C# ASP.NET MVC Code First project, POCO Classes must have getters and setters ( {get; set; } ) in order to work? public float data { get; set; } or in db context class public DbSet<SGD....
0
votes
1answer
38 views

Is Multi-Tenancy a viable option in any Java RAD Frameworks?

I've worked as a Full Stack Java Web Developer for many years now and of all the projects I have worked on two things are true of all of them: They were all Multi-Tenant applications with one ...
0
votes
0answers
26 views

Set up E-Mail message queue with digest system

We're currently building out a system to send out e-mail notifications in a digest format. We'll be delegating the actual sending to Sendgrid, but first we need to construct these messages using the ...
1
vote
1answer
175 views

How to efficiently store code snippets?

I've noticed that a lot of my work follows this pattern: (1) Decide that I need to add a behavior (say, align table columns right) (2) Recall that I did it few months ago on a different project, try ...
-2
votes
1answer
40 views

Moving legacy app to cloud, technical difficulties [on hold]

We have a traditional Java app that uses JSF, have a rest api, uses environment variables, and writes heavily to disk (both for caching(ehcache) and for storing-reading data files, logs). Company ...
-3
votes
0answers
25 views

Swap or migrating to new technology from Vb6.0 [on hold]

Hi I have exp in Visual basic 6.0 and it's late to change my technical career but I have to do. Can you please advise which is the good technology to switch.
-2
votes
0answers
64 views

TicTacToe Project [on hold]

I am building a TicTacToe project on C++. I am using array to define the TicTacToe board. I was wondering is there a much cleaner way to define the board instead of using 2d array.Please suggest me if ...
1
vote
0answers
14 views

Forking New Consumers for RabbitMQ in NodeJS

So I'm implementing work queue with RabbitMQ in NodeJS. The consumer is a child process and I plan to fork new ones as need arises, but I read in the official documentation that : Because of the ...
0
votes
1answer
36 views

How is approval done in cors via preflight request?

As far as I have known in CORS, browser sends preflight with OPTIONS request to the server to gain approval for the real subsequent GET/POST request. Now, HTTP is sessionless. Is the custom header THE ...
1
vote
2answers
95 views

Concurrent inserts to MySQL or write to separate tables and consolidate it?

I'm working on Apache Storm (but anyone who knows MySQL well could help too). Topology is like this: Single spout ----emit---> Multiple instances of a Bolt Each instance of the Bolt inserts a ...
1
vote
1answer
48 views

Review page use of AJAX

I am currently working on a site that heavily uses AJAX. I have a page that when called renders the basic HTML and then uses AJAX to get the data that the pages needs and then renders the rest of the ...
0
votes
0answers
31 views

Name of the operation where whole table is put in array format

Consider this data struture: key1 : value1 key2 : value2 key3 : value3 I have an operation that put this data in array format: key1, value1, key2, value2, key3, value3 Which would the the name ...
-3
votes
0answers
29 views

Why can't I debug this in code::blocks? [migrated]

I have the following program and I want to debug it. #include <iostream> #include <cstdlib>> using namespace std; void display(char charArray[], int SizeOfArray); int main() { char ...
3
votes
0answers
75 views

Best practice for ensuring name uniqueness/correctness in message queues in a microservice architecture/distributed system

I was wondering what a good solution would be for ensuring that queue-names are entered correctly and are only used by the correct applications in a large system which uses message queues to exchange ...
2
votes
1answer
45 views

Testing a class with “prerequisite” methods

I'm working on a class that should manipulate files. Its interface has a Open(string filename) method, and various other methods to retrieve and manipulate the contents. Is it ok to call the open ...
-4
votes
0answers
107 views

Big Projects in C++ [on hold]

After so much digging, i am asking THE question which is on my mind from almost an year. Just look at this list List of c++ softwares 10 best c++ softwares My question is, How these are ...
0
votes
1answer
19 views

How do I use CMake to build my codebase for different purposes and resolutions?

I'm working on a C++ codebase targeted at multiple platforms, and we've just moved over to CMake as our buildsystem. Previously our buildsystem was a pretty ad-hoc affair; getting our code under a ...
1
vote
3answers
56 views

How to separate the logic of my application into a dependency when it is coupled to the structure of the data?

I am about to start prototyping a 'quiz'-like web application that tests test-scoring methodologies, and I have an interesting architectural question. Each quiz given to a user needs to use a set ...
0
votes
0answers
24 views

How to setup dependency injection framework in JavaScript

I'm creating a web page and would like to keep the UI and the JavaScript separate. To accomplish that I'd like to add event listeners after the UI elements have been created. I don't know if this is ...
1
vote
2answers
81 views

Continuous Integration and a Massive Refactor

I'm currently re-factoring a part of our application at work. I'm normalising a data structure from a flat list of fields to a parent/child relationship. This has an impact on all layers in the ...
-1
votes
0answers
15 views

Read subset of rows from a data table and post it in json and render it on a browser in table format

I have a data table that contains large number of records returned from the database, Currently browser gets all the records and are rendered on browser using client side pagination. Is there a way to ...
6
votes
3answers
147 views

When are hooks the right design choice?

I've worked on a large Rails app where the use of ActiveRecord callbacks was rampant and harrowing. Saving a record often had unexpected side-effects and it was a challenge to reason about the system. ...
1
vote
1answer
43 views

What is the proper way of editing/updating many-to-many items in DB?

I have film's storage (3 tables in database): films{id:int, film:string} genres{id:int, genre:string}, films_genres{film_id:int, genre_id:int, probability:int(%)} (film_id, genre_id) is UNIQUE. ...
-2
votes
1answer
55 views

Do .pyc files in Python contain mnemonics

I'm interested for some time in CPython implementation of Python. I understand that .pyc files contain serialized bytecode, including opcodes. However do these files contain mnemonics? I think that ...
2
votes
1answer
81 views

REST API design: distinction between searching and getting all instances of a resource

At the moment, my (pretty standard) REST interface looks like this: POST /foo # creates a new foo PUT /foo/{id} # updates a specific foo GET /foo/{id} # returns a specific foo GET /...
-2
votes
0answers
15 views

Using The Apached Math Libraries with BigDecimal [on hold]

I need some working java code that uses that combines the apache math libraires to solve a 2 variable system of equations. An Example would be something like this Contraints x not equal to 0 x < ...
0
votes
0answers
23 views

Hybrid sql / nosql

I have a problem that doesn't seem to have an immediate fix and it confuses me. My main application stores data in mysql: Users Websites (metadata) Pages (metadata) The actual pages ...
-3
votes
1answer
35 views

SQL- get start and end date With a specific event [on hold]

I have a database with with event dates and events. I need the start date and end date for a specific event. I am able to do this while specifying the event in a where statement, but I need the ...
2
votes
2answers
115 views

Nested functions: should I explicitly pass arguments or rely on scope?

Suppose I have a function f that uses two helper functions h and g to get the job done. There are two possible ways of dealing with this situation. (1) take explicit arguments and returns new objects ...
0
votes
0answers
20 views

Algorithm to generate all paths between two vertices of a graph in F#

Following a functional programming approach (no mutable data structures, recursion, etc) I have written a script in F# to generate all paths between two vertices of an undirected, unweighted graph. I ...
1
vote
1answer
58 views

Microservices in the Large (specifically: foreign refs)

There are lots of good resources on μServices that focus on concepts like Single Purpose, REST, Implementation and Deployment, CI/CD, Encapsulation and Isolation, Separating UI from API, etc. However,...

15 30 50 per page