-5
votes
0answers
22 views

Python programming - Output issue between each function call [migrated]

def displayChar(d): if d.isalpha(): print(d, "is a str") elif a.isdigit(): if 'float' in str(type(eval(d))): print(d, "is a float") else: ...
-2
votes
0answers
21 views

Persist and sync custom sorting information [on hold]

Assume a task app like asana with multiple client apps and the data must be synced across multiple systems. I have a list of 'tasks' and they can be custom sorted. What is the optimum way for me to ...
-6
votes
0answers
56 views

Drawing shapes with JavaScript [on hold]

A javascript program. I don't want or can't use images. I want to represent countries. I'd like to know if there's somewhere a database, with countries shape coodinate, that you could use to draw ...
1
vote
0answers
41 views

How to expose the domain model as options to drive the view behavior

First off, I'm not thrilled with the title, so I'm open to suggestions there. Here's my question: I'm designing a simple application that takes input from a user and produces an output document. ...
2
votes
2answers
77 views

Blocking function call with asynchronous content

I am sure that this is a common design pattern, but I seem to have a blind-spot. I have a requirement that the function call from Application to Service be blocking, but service needs to do ...
6
votes
3answers
137 views

What is the functional programming answer to type-based invariants?

I am aware that the concept of invariants exists across multiple programming paradigms. For example, loop invariants are relevant in OO, functional and procedural programming. However, one very ...
0
votes
0answers
18 views

CentOS/RedHat devtoolset license implications

Can I use the RedHat devtoolset to build non-GPL-ed software? Do I have to mind any caveats? From my understanding, the devtoolset knows the limitations of the standard libraries shipped with older ...
2
votes
1answer
58 views

Selecting members to add to a github project [on hold]

My team recently added a software project to github. We are getting requests from some of the users that they would like to become part of the team. What would be a good way to choose whom to add ?
-2
votes
0answers
35 views

Is there a book on mentoring junior developers? [on hold]

I can't find any books on how to mentor junior developers. I can find lots of articles, but no books. I know that recommending books is too opinion-based, and maybe this question falls into that ...
6
votes
2answers
219 views

Why store flags/enums in a database as strings instead of integers?

I've been browsing SQL dumps of some famous CMSes, including Drupal 7, Wordpress (some quite very old version), and some custom application based on Python. All of these dumps contained data with ...
-5
votes
0answers
22 views

Regading Jenkins TFS automation [on hold]

Could you please send me the doc ,like a step by step procedure for TFS msbuild projectsol. build and publishing. Thanks.
5
votes
2answers
96 views

What is a reasonable level of detail for a style guide? [on hold]

We are developing embedded software for an automotive product in ANSI-C in a large team. Yesterday, in our regular code review, we had a general discussion about the style of our code. We have a ...
12
votes
7answers
313 views

When NOT to use virtual destructors?

I believed I searched many times about virtual destructors, most mention the purpose of virtual destructors, and why you need virtual destructors. Also I think in most cases destructors need to be ...
1
vote
0answers
124 views

What AI algorithm should I use to develop an automatic personal scheduler?

In a project that I'm doing for my Artificial Intelligence course, I'm developing a software for automatic personal scheduling. The user tells the software what tasks he has to perform (along with ...
1
vote
2answers
109 views

When writing a library or an API, when should and when shouldn't I validate or automatically correct errors in data provided by another developer?

I have a fairly good understanding of when data validation should and shouldn't exist when it comes when writing an application that is only dealt with by an end-user, and all the different tiers of ...
0
votes
1answer
60 views

Code Inside Catch Block

This question is related to both of these questions - Efficient try / catch block usage? and Dealing with error in data - Idempotent approach. When I encounter a void while reading a GIS data file I ...
-1
votes
0answers
24 views

Spring-Quartz scheduler throw NoSuchMethodException [on hold]

I'm using Spring MVC to develop my project and I want to use quartz-schedule to set time for an method in controller. But there is java.lang.NoSuchMethodException occurred. This is my declared code: ...
1
vote
1answer
104 views

Differences in design/thought process for OO in Java and JavaScript [duplicate]

Despite sharing a similar name and syntax, Java and JavaScript are quite different. However, they both have Object Oriented features. As a JavaScript novice, the main differences that I can see ...
-1
votes
2answers
88 views

Is it worth to rewrite the logic that already done client side on the server side or vice versa? [on hold]

Few month ago, we created a logic to calculate customer progress in JavaScript. We didn't thought that it will be useful if we store them in our database. Now, i'm facing 2 options, Rewrite ...
0
votes
0answers
29 views

Class design for an app that reads data from Active Directory

I am hoping someone can help me regarding design and architecture for an application. The application is basically a service written in C#. The purpose of this service is mainly to read data from ...
-1
votes
0answers
19 views

Industry standards for documenting screen navigation [on hold]

Besides annotating wireframes which is too detailed, what diagram standards exist for documenting screen navigation? I've found this from Jesse James Garrett but it appears dated: ...
2
votes
3answers
122 views

How do I show 'creates' in a UML class diagram?

Let's say my code is going to look like this: public class MyController { private Foo foo; private FooGenerator fooGen; //setters public void work() { this.foo = ...
1
vote
0answers
68 views

Why is the Java bytecode instruction set not orthogonal?

Section 2.11.1 of the JVM 8 Specification includes the words: In other words, the instruction set is intentionally not orthogonal. From my perspective, that implies that the Java bytecode ...
0
votes
0answers
42 views
+50

Interactive help in a statically-typed language with overloading

One of the nice features of IPython is that I can inspect a function. In [1]: def inc(x): ...: """Increments a number""" ...: return x+1 ...: In [2]: inc? Type: function ...
1
vote
3answers
149 views

Using prefix/postfix increment operator for simple incremental array access rather than actual index numbers

I cannot decide which method is better with consideration of both readability and fault-tolerance. Method #1: Object[] objects = getArrayOfKnownLength(); int i = -1; someMethod(objects[++i], ...
3
votes
5answers
145 views

Should I use BLOB or Tables for storing large data?

Problem Currently investigating a solution to improve the performance of a web application. The application works well for small projects, but faces performance issues in the UI when working with ...
-2
votes
0answers
10 views

Making a magnitude legend via GMT [on hold]

I'm using GMT(Generic maping tools)at windows 7 and I'm making a map of the seismicity of my area. I'm using psxy to show the seismic points but I can't figure out how to make a legend for the ...
2
votes
1answer
173 views

Lesser of two evils regarding return types

I'm implementing a system in PHP where values are represented with objects that implement an Amount interface. I'm building two different implementations of this interface, one using a simple integer ...
-3
votes
0answers
11 views

How do I fix extreme lag issues with Dart/Webkit (iOS)? [on hold]

I'm currently working on a development project for a mobile game. This game was originally programmed in Dart. The game has been compiled using the Dart Editors built-in dart2js function, but when I ...
-4
votes
0answers
29 views

Windows Service That Deletes Contents of C:\Windows\Temp [migrated]

I have windows service written in vb.net that deletes the contents of a folder (meaning all files, subfolders, and files) in that folder every few minutes. I need to change the service so that it now ...
2
votes
2answers
170 views

How to iterate between these elements

I have an array of elements: int[] elem = new int[] {A, B, C}; I need to calculate the sum of ALL the combinations of those elements, where only some of the elements can be optionally selected. I ...
-4
votes
0answers
21 views

Neural Network Math Explanation/Help [on hold]

I've been reading through http://is.muni.cz/th/324406/fi_m/thesis.pdf and I am having a hard time understanding some of the Math. I understand ANNs for the most part, but I don't know the math lingo. ...
-2
votes
1answer
75 views

Java - Concept question: LinkedHashMaps vs POJOs?

EDIT: I'm just going to ask a single question instead of presenting a problem and asking for advice on a specific design decision in the solution. Given a batch of data from a database, collected ...
0
votes
2answers
72 views

Refactoring case-when statement [duplicate]

The Product model which can have 2 price tables. The method price calculates the price of the product based on product's price table which is defined by price_table field. class Product < ...
-3
votes
1answer
66 views

What is the best way to protect highly sensitive algorithms in my code?

I develop software for day traders and institutional investors. Some of their algorithms are highly sensitive, but they still want to sell these programs to different customers. The programs ...
2
votes
2answers
113 views

Does this data processing pipeline design need to be so complex?

I have a data processing pipeline with well defined stages and IO boundaries. I can choose a language to suit the needs of this design. It starts with an InputObject. At the end of each stage, ...
-1
votes
1answer
38 views

Qt connection Sql Server (universal connection string)

I am developing a software to connect to sql server. The problem is, ¿i don't know wich sql server is used?, and my question is ¿if exist a universal connection String?. I read many cases and in ...
0
votes
2answers
55 views

Modifying GPL code to link closely with another program

If program B is licensed under GPL, can a programmer modify it to interact with his own proprietary program, A, such that both programs are separate processes, and then only release the modified ...
3
votes
1answer
61 views

Encapsulating mutable objects with special structure in Python

I am writing a library for working with special types of trees, called Foo trees. A Foo tree has very special structure. There some operations, called bar and baz, which only make sense on Foo trees. ...
6
votes
3answers
83 views

REST API design: POST (implicit userId) vs PUT (explicit userId)

For some routes on an API, like GET /news, one would asume the user only wants news that pertains to them, so the userId is implicitly taken from authentication info. However, some of the routes on ...
0
votes
0answers
82 views

Member vs free function [duplicate]

I've read similiar topics and also the following great article: http://www.gotw.ca/publications/mill02.htm I'm still not quite sure how to apply it though. Basically I have a class that is an ...
1
vote
2answers
109 views

Example of writing unit test for a method

I am writing unit tests for an iOS application. I clearly understand the benefits of writing unit tests & TDD, but I am confused about what kind of tests you can write for methods like this; ...
-3
votes
2answers
116 views

JavaScript form validation without clicking submit button [on hold]

I want to validate a form using java script before user clicks the submit button. <form role="form"> <div class="form-group"> <label for="email">*Email ...
0
votes
4answers
100 views

Quit a program in main or in function?

Lets say I have a void method/function to check the arguments of the program: void check(int argc, String argv){ //some irrelevant code } In this function I have some checks to validate the ...
-4
votes
0answers
32 views

Operating Systems Programming Project : (Bus) Inter Pprocess Communication [on hold]

I have a project in operating system programming (Lunix) using c language , may anyone help me , please , This is the project description : implement a new inter-process communication method called ...
-1
votes
0answers
43 views

Coinvault / Bitcrypto ransomware idea [on hold]

So I got affected by this ransomware called bitcrypto , it looks similar to coinvault . It claims to have encrypted most of my data . Although there's not much I can try to break its AES 256 bit ...
69
votes
7answers
6k views

Short circuit evaluation, is it bad practice?

Something that I've known for a while but never considered is that in most languages it is possible to give priority to operators in an if statement based on their order. I often use this as a way to ...
22
votes
1answer
2k views

Why does C++ not have a “pure” keyword for virtual functions?

I have always wondered why we code virtual void MyFunction() = 0; and not pure virtual void MyFunction(); Is there a reference for the basis of this decision?
2
votes
2answers
156 views

return a object without returning the reference

i'm having some trouble with returning objects and lists of objects. To problem is I want to return a object in my example an developer but I don't want to give the reference. What's the best ...
-2
votes
0answers
38 views

Power8 or ARM or Intel server platform for long-term investment protection? [on hold]

Which server platform do You consider such as the best solution for long-term investment protection ? Some people can say "The future is unknowable" and can cancel this question ... But some ...

15 30 50 per page