0
votes
0answers
9 views

Problem with Solving System of Equations [on hold]

I am working on a crank-nicolson scheme for solving the Allen-Cahn equation using MATLAB. Below is the code that I have written, but I keep on getting the warning of matrix is singular to working ...
1
vote
0answers
6 views

Java dom parser for graphml file

I'm trying to do a program that receive a graphml file and ought to create all the necessary java objects according to the content of the parsed graphml file with the following JAVA Code : public ...
0
votes
0answers
9 views

Short code command to send a bill in .pdf or evet .txt file format

Im building a website similar to opentable.com but on a much smaller scale for a much smaller market. So I don have the budget to make a complete solution like opentable has, that is, I don't have a ...
1
vote
0answers
17 views

REST API - omitted properties in POST request: How should they be handled?

Given the following scenario: Teacher entity { "id": "1234", "name": "Mr. Didactic", "Subject": "History", "Classroom": "1A" } REST API endpoint: /teacher/id/1234 Let's say I submit ...
0
votes
0answers
18 views

How to compute Pricing of Product & Product Options based on User Input and Pricing from Database?

I am building a service for pricing options of a product and for pricing the product itself when product has various options. Example User selects some X options out of Y options available, where X ...
1
vote
0answers
17 views

Finding types in TypeScript

I'm using a lot of implicit any in TypeScript. I don't quite understand how to decipher a TSD file in order to get the correct type when building off a library like express or angular. Is there a way ...
1
vote
3answers
57 views

Will returning an enum, instead of String, be too restrictive here:

Currently, there are only 3 possible publishers. I might want to add some more in the future: interface NewsArticle { enum Publisher { NYPost, ChiTribune, LATimes } Publisher getPublisher(); ...
0
votes
0answers
18 views

Android continually checking Internet, Bluetooth and GPS status?

In my app I want the ability to continually check for Internet, Bluetooth and GPS status (if one is off/on). I need each of these to be on at all times for my application to work effectively. For ...
-1
votes
1answer
44 views

Why use JSON dataset rather than SQL Query?

A colleague was asking me to explain a system information flow, as they are having problems with the wrong information being presented. It seems that what they have created is a custom built website, ...
0
votes
2answers
94 views

What was the first language that allowed a class to contain a member of it's own type

So, I had to create a class that had a member of it's own type. I looked into why this was possible, which is fascinating. Reading the answer, I find that a lot of work had to go into making this ...
-1
votes
0answers
26 views

Best many to many match and sort algorithm

Im looking for best algorithm to match and sort many to many values I have "book" which have many orders in many stacks (max capacity of stack is for example 10). Each orders have many products. Each ...
-1
votes
0answers
18 views

Concurrent languages and non-concurrent dependencies

We had a bug caused by ruby workers (4 processes, 1 thread each) doing batching records using a legacy mongodb as the store. The race condition was around whether the batch was full or not; with one ...
0
votes
0answers
23 views

Change API response with minimum code changes

My Application is built on Laravel and currently has the following components : Models Dictionary Word Controllers DictionaryController WordController It's a JSON API, so views are nothing ...
3
votes
0answers
41 views

Compile-time checking for NULL initialized std::string

This is sort of the complementary question to How to best protect from 0 passed to std::string parameters?. Basically, I'm trying to figure out whether there is a way to have the compiler warn me if a ...
-4
votes
0answers
28 views

Is the power scriptable? [on hold]

Like for example, if computername script = 0 then computername script = 1, is that at all possible to keep the computer on? I also need the script in powershell format.
0
votes
0answers
22 views

Is this a good use of routes in MVC?

In the time I've spent working with MVC (ASP.NET MVC to be specific) I've found very few situations where I've needed to use custom routing. In my most recent project I came across such a situation. I ...
0
votes
1answer
40 views

Ruby: Abusing mixin

I'm currently working with some code that IMO has abused ruby's mixin features. Given that I'm new to ruby, I wonder if MO in IMO is correct or not. My primary question is what makes more sense (and ...
-2
votes
2answers
94 views

How do you hash 4 doubles into a size_t?

I have bounding boxes the key type. Box { double mins[2]; double maxs[2]; } And I want to have Box as the key type in the D programming language, so I have to implement: size_t toHash() const ...
0
votes
0answers
26 views

Is it a common pattern in Python to have instance variables assigned in a constructor start with an underscore?

I recently started using UtilSnips, a Vim plugin allowing for a certain level of automation while coding by using template-like code snippets for common code fragments (class and function definitions, ...
3
votes
5answers
429 views

Why do so many languages restrict string literals to a single source line? [on hold]

In, for example, the Bash scripting language, the following creates a string called $VAR which begins at the first " quote and continues until the next unescaped " quote. $VAR=" hello world! ...
0
votes
1answer
61 views

Relicensing GPL to more permissive license

I have been developing a GPL GUI application for many years by myself in my free time. I have been approached by a company who want to use my code as part of a propitiatory product. This would require ...
0
votes
1answer
39 views

How to find the cause of an exception in async code

I often see myself trying to follow my own code to find out where the exception came from. The typical example is when some parsing fails, and I catch the execption. Then I spend a ridiculous amount ...
0
votes
3answers
78 views

Including both “careful” and “dangerous” versions of a function in a library/module

I'm writing some code that I've decoupled off into a module of its own, and even though I'm most likely the only person who will use it, I'm trying to think as if I might not be. The functions in this ...
-4
votes
0answers
19 views

Asynchronous method to search and download a file by FTP connection [on hold]

I'm developing a Java desktop application. I need an asynchronous FTP method to search repeatedly (for example, every 2 seconds interval) if exists a new file on a web server and, if so, it downloads ...
0
votes
0answers
65 views

Can this be further normalized? [migrated]

I have to define a system where we will be storing Image data and which can have an arbitrary number of attributes for the Image added per client. I have designed the following table Image ImageID ...
-6
votes
0answers
27 views

What should be changes in following code to perform search and modify operation on file? [on hold]

void modify() { FILE *f1; struct Phnbk P; int id; clrscr(); f1=fopen("new1.txt","r+"); if(f1==NULL) { printf("\nError while opening file"); exit(0); } printf("\nEnter Contact ID to modify ...
-5
votes
0answers
36 views

To check images are duplicate or not

I want code for checking images are duplicate or not in C++ (MFC) (by using various techniques not only by getpixel)? I did by getpixel but I want to check for multiple images.
1
vote
0answers
28 views

Designing a web based smart card publisher

I'm working on an application that's supposed to have a web based GUI where you can insert some data. That data will be saved in persistent storage and a hex number generated and stored alongside. ...
0
votes
1answer
44 views

Simple React application design

I have a very simple app that lets you log in and then displays a dashboard. The design process with React and Redux is very simple : I have two React components : Login and Dashboard I store a ...
0
votes
1answer
59 views

Calculating pay based on hours worked

I am developing a simple payroll with .net and sql server-2008 these options. There are currently three categories of payment types, Salary = fixed monthly salary Commission = percentage of total ...
1
vote
0answers
76 views

Why are there still companies recruiting for compiler positions? [on hold]

The way I see it, all programming languages already have at least one compiler already built for them, and they are either open source or an established organisation is maintaining them. So why is it ...
0
votes
1answer
9 views

Secure authentication using JWT

I read about JWT and how they can provide secure authentication for calling api routes over http. I naively implemented it and here is how it goes : a client posts username and password to a login ...
-3
votes
4answers
120 views

Why do we add instance methods to classes? [on hold]

Rewrite of the Question: Is there a technical reason why we are not using static methods instead of instance methods. Technical reasons are for example: Performance or added type-safety. I reason ...
-1
votes
1answer
69 views

Algorithm for solve combinatorics (clique search)

We have a group of animals: animals = {'dog', 'wolf', 'cat', 'lion', 'rabbit', 'bear'} And know a list of conflicts conflicts = ( {'dog','cat'}, {'dog','rabbit'}, {'wolf','rabbit'}, ...
2
votes
0answers
35 views

Error handling in distributed system

This is the common sequence of two distributed components in our Java application: 1 A sends request to B 2 B starts some job J in parallel thread 3 B returns response to A 4 A accepts ...
3
votes
1answer
49 views

Why use a dedicated “pushbot” user which automatically merges approved pull requests?

Most Github repositories I'm aware of use the following workflow for pull requests: one or several users with "contributor" privilege review the suggested changes and then one of them merges the pull ...
-2
votes
1answer
108 views

Explaning to newbies that sometimes “it works” isn't “it works well” [on hold]

Clarification. I'm working under the assumption that this particular situation's happened to so many people, so many times that there's a colloquially accepted (almost generic and industry ...
1
vote
1answer
17 views

Can I use partitions of activity diagram to place activity instead of actions?

Im making an activity diagram and Im using activities instead of actions because Im not going into much detail in the steps being described. I want to separate the activities in the partitions but all ...
8
votes
2answers
116 views

Are there alternatives to types for static analysis?

Static typing in a programming language can be helpful for enforcing certain guarantees at compile time- but are types the only tool for this job? Are there other ways of specifying invariants? For ...
1
vote
0answers
45 views

How should I store usernames and passwords for user login using php/cassandra?

I am new to NOSQL and Cassandra. I am not sure if I should store usernames and password in Cassandra. If I should, what is the best way to do that? I am getting lots of conflicting ideas from ...
0
votes
0answers
18 views

Managing over the air and binary update patches?

I'm currently looking into managing patches for an application, there are two kinds of patches the application will get: 'hard' patches which requires the downloading of binaries and 'soft' patches ...
-1
votes
0answers
22 views

Sentence comprehension - NLP

I am working on a project where I am collecting tweets from a geographic area. Out of these tweets, I only want the tweets that reference some kind of a fire emergency. I initially applied some ...
0
votes
1answer
48 views

Generic approach to sharing of items

I have been thinking about this a few days already, doing diagrams, started programming, reverted, started again, still can't decide which is the best approach. The problem is about sharing groups ...
3
votes
1answer
18 views

Asynchronous socket.io for lots of concurrent messages

We have a web application which currently operates like this on a typical view/page: the front has to display 100+ "previews" (in the form of base64 images) each of this preview is built on-demand ...
0
votes
0answers
40 views

Is pure RESTful required for Angular JS / Backend running on same web server?

I am developing an application with Sprintboot + REST + Angular. While I am working on the REST API, I am trying to design as RESTful as possible. I'm encountering certain pages where the Angular UI ...
1
vote
0answers
59 views

Change object state in different point in program

This is not about whether or not getters/setters are wrong. I understand its impact to encapsulation and that question has been raised here and SO several times already. I also do not want to just ...
-5
votes
0answers
63 views

Writing good Java [on hold]

Programming languages often have several legal ways to do something, and certain ways that experienced programmers tend to go. I’ve heard it called “idiomatic”. This is different from a style guide ...
0
votes
0answers
27 views

pubsub using ActionBlock

I am toying with tpl and dataflow. What I want to achieve is having a kind of "PubSub" which I could post message to, and subscribe to an event in case the execution of the command gives some result. ...
0
votes
2answers
67 views

Better way to check multiple variables equal a single value in Python

In Python I want to check the following: if x is None and y is None and z is None and ... I'd rather say something like: if x, y, z is None: But that's not valid syntax. Is there a better way to ...
0
votes
1answer
84 views

Is it possible to detect misuse of passing self type argument in compile time?

I just hit the very basic problem in OOP and I cannot see any working solution except postponing appropriate check until run time. It is pretty clear notion of an action "do something with value of ...

15 30 50 per page