-2
votes
0answers
6 views

Drop - down menu composed of associate images

I would like to create such menu: First, a few images are displayed. Next, when the user clicks on any of them, a few other images scroll down out of the clicked one, so that the user might choose ...
1
vote
0answers
31 views

Standard way to call virtual method

So recently I was working on a project where I had a base class that provided some common functionality. It had several virtual (overridable in vb) functions. I noticed that some of these methods ...
0
votes
1answer
7 views

Spring - rest API - How to unit test a rest API which gets data from another service

I am new to rest API's as well as mocks. Please help me .. I have a set of rest API's for which I need to write unit tests. rest API in turn calls another service , gets the JSON response and sends ...
2
votes
2answers
58 views

How to combine strict TDD and DDD?

TDD is about designing code, guided by tests. Thus, typical layers aren't usually built upfront; they should slightly appear through refactoring steps. Domain-driven design involves a lot of ...
-3
votes
0answers
27 views

New methodology for compression: Non-universal tree, with pyramidic styling

The program below works efficiently. It can do the 'enwik8' test run in 13 minutes on a 2.6ghz 4gig, machine. It compresses to 10% of any original file over 50 bytes. There are no consequences to it ...
-1
votes
1answer
22 views

Choosing default size of application window

Suppose I'm developing an application with a simple graphical user interface, like a basic text editor. How do I choose a good default size of the application window? Should the height of the window ...
0
votes
0answers
30 views

Onion architecture vs 3 layered architecture

I see only benefits to the onion architecture over the 3 layered architecture where the BL had responsibility to call methods on DAL (or an interface of DAL) to do CRUD. The onion has better ...
0
votes
2answers
73 views

Is it bad practice to verify arguments passed to a function? [duplicate]

I find myself writing a lot of functions whereby the first few lines "verify" the arguments, that is, they typecast, check falseness, range, etc. before doing any work. The main reasoning for this is ...
3
votes
1answer
43 views

Should a command line tool print a usage statement in response to an incorrect call?

It seems increasingly common for command line tools to include code like: if( argc != X ) { usage(); exit( EXIT_FAILURE ); } or similar. What is the currently accepted state of the art? Is it ...
0
votes
0answers
9 views

Latency in creating configuration in apache commons configuration

I am planning to use Apache commons configuration (https://commons.apache.org/proper/commons-configuration/) to merge various configuration files. Since for me, the configuration file names are ...
-3
votes
0answers
45 views

Are there compilers that implement immunity-aware programming techniques? [on hold]

Are there compilers with flags or directives to implement immunity-aware programming techniques such as function token passing data integrity verification and/or correction function parameter ...
1
vote
0answers
12 views

How do you feed sets of connected data elements to an artificial neural network?

I'm currently working on a neural network to try to predict movements of electricity prices in a big city with multiple power companies to choose from. I know from a friend in the industry that power ...
0
votes
2answers
75 views

On a modern compiler, how do I intentionally code for 2s complement with wraparound?

I want to compare sequence numbers (given to this code from elsewhere) that may wrap around. Simply comparing two such values will not handle the case like 0x00000002 being greater than 0xfffffffd, ...
0
votes
0answers
9 views

License for header exposing functions in a BSD 3 clause licensed source

If I were to write a header exposing functions in a sample source file that was licensed under the BSD 3-Clause License, what would I put up in the header? Should I simply copy-paste the license ...
-1
votes
0answers
41 views

Python beginner advice [on hold]

About myself: I'm coming from a non programming background, nor mathematics; I was learning foreign foreign languages (still am) but I started doing some basic coding and I really like it, therefore ...
0
votes
0answers
17 views

Are there any JSON based notations for Access Control Lists? (Alternative to S-Expression)

I'm looking for a notation that is familiar to modern developers and can supersede s-Notation. (additional insight into Rivest's proposal of s-Expression is here) Is there any Swagger, JSON or other ...
-1
votes
0answers
21 views

What is Python Django and Flask? [on hold]

I understand the role of HTML, CSS and JavaScript in making Websites. One is for styling and the other makes it interactive... But what does Python Django and Flask do?
0
votes
0answers
13 views

Creating and passing new object in parameter

I have a wrapper class which contains a smart pointer (unique) which can point to objects which are subclasses of State. Each subclass of State receives a reference to the wrapper class so that the ...
-1
votes
0answers
34 views

Tools to help keep track of git repositories

How do developers keep track of various git repositories? Often there are interesting changes happening in some repositories that you will like be aware of, sometimes as a cursory note and for ...
1
vote
2answers
49 views

Should we try to be as technology agnostic as much as possible?

It is true that we cannot be 100% technology agnostic when we are using a framework or tool, we will be always at least 20% dependent on the tool or framework. The thing is that I feel better if I ...
0
votes
2answers
61 views

Can I find the remainder more efficiently?

Here : https://github.com/gnufinder/prime-factor I submitted a contribution with the goal to find a prime factor of the number 2222+3333. The number has 3,638,334,640,025 digits, so ECM will take ...
4
votes
1answer
103 views

Where to store SQLite Database file?

I'm writing an application for learning foreign words of exactly one language (english at the moment), which has currently an ineffective design. I use Java and SQLite-jdbc for saving the words. ...
-2
votes
0answers
17 views

What should I read/learn to get the data of an app/process?

I have some knowledge in various high-level languages, but none with hardware or low-level programming. I'm using BlueStacks (on Windows) for using various apps and games. I would like to create some ...
-2
votes
0answers
17 views

submitting a post request with an empty field does not update the previous value to an empty string

I have the following line, where the value may become outdated and need to be cleared. However, the database only updates when the value is changed to some non-empty string. <textarea ...
3
votes
2answers
142 views

Is it bad practice to use hyphens in JSON keys?

I see a lot of questions revolving around accessing JSON keys that use hyphens (kebab-case), but now I find myself wondering should I just stick to camelCase or snake_case in my keys. I know hyphens ...
4
votes
1answer
35 views

Master-Slave Cluster - How to make sure the master is really dead for the slave to take over?

I have a in-house messaging system, similar to a message broker. We have one master message broker and one slave message broker. A message broker just receives messages and sends them to all nodes. ...
-6
votes
0answers
46 views

I have problem with code [on hold]

I should do massiv and The input of information from a text file into an array of records ; The addition of new elements to the end of the array ; To see all the elements of the array ; The ...
0
votes
0answers
126 views

Any Special Practice On How To Read Code? [duplicate]

We know so much articles and best practice on how to write a better code. Class decoupling, reversible engineering decision, clear responsibility, etc. But how about best practice on how to read code? ...
-2
votes
1answer
33 views

How can I place an SQL Server query result into an array and then extract specific values from the array in PHP?

I have an SQL Server database which runs the following query: SELECT t_Addresses.Coord_X, t_Addresses.Coord_Y, t_Addresses.Cust_ID INTO #temptable --Hash prefix specifies a temporary table FROM ...
7
votes
1answer
113 views

What is the history for naming constants in all uppercase?

What is the history behind the convention of naming constants in all uppercase? My intuition is that it started with the C preprocessor, where people developed a practice to name preprocessor macros ...
1
vote
0answers
32 views

One producer and one consumer vs inconsistent shared resource state

I was reading about implementation of producer-consumer problem with one producer and one consumer. Looking at this paragraph I see the implementation where shared resource access is not synchronized ...
-4
votes
1answer
33 views

Website Development - W3 Layout [on hold]

I tried to download a free template from W3layout but the file is corrupted. So I tried to pick up the CSS, HTML and JS files by diving into the source code. I used this link to pick source files ...
0
votes
0answers
25 views

Parameter objects place holder?

If a method has too many parameters, the suggestion is to convert them into a parameter object. Where to place such parameter objects? in domain/entity classes package? or if I have a separate package ...
-1
votes
0answers
22 views

Text script to .net code [on hold]

I have a set of text files which contain the keywords. I need to generate C# code / C# classes by reading these files using C#. Each text file is meant for a class. The keywords map to methods in the ...
-5
votes
3answers
84 views

What exactly are PHP, MySQL, and SQL and how do they work together? [on hold]

I feel so confused on what they are and how they work. From what I've read PHP is a server-side language. Therefore, it's a language basically designed to talk with the web server to get it to do ...
7
votes
1answer
104 views

Is it bad to create classes whose sole purpose is to be converted to another class implicitly?

Imagine a situation where we're using a library that allows you to create Circle objects, where you can specify the radius and the center of the circle to define it. However, for some reason, it also ...
0
votes
0answers
16 views

what's a good way to deploy a seed project with some custom values? (eg: similar to npm init)

I need to deploy quite a few projects from the same seed, which will have a few files, with a few lines in a couple of the files containing some value that would ideally be entered into a script and ...
-2
votes
1answer
41 views

Java/OOP-Book for functional programmer [on hold]

I'm a functional programmer (mostly Haskell) and have some experience with OOP - I know how inheritance, overloading, ... work, also I have experience with low-level procedural languages like C. I'm ...
-1
votes
0answers
20 views

Does it make sense to use namespace pattern in ECMAScript 6? [on hold]

In ECMAScript 5 of JavaScript it was common approach to use namespaces in your code. (implementations of namespace in JS). ECMAScript 6 standard declares modules. But still there are many projects ...
2
votes
0answers
33 views

Tainted String Type in Kotlin

Two of the top 3 security vulnerabilities in the OWASP Top 10 come from trusting user input (Injection and XSS). To deal with this, Ruby lets you "taint" Strings received from the user as unsafe. In ...
0
votes
3answers
71 views

Do you create an order before or after payment on an Ecommerce site?

I have a shopping cart with a checkout page. On the checkout page is a payment button which takes them to a stripe payment form. I've read some books on building eCommerce shopping carts in which ...
-1
votes
0answers
23 views

Which permanent data storage technology should I use for a simple, but large collection of information in Ruby?

I'm just setting up a Ruby server for my iOS messaging app. The server is for delivering push notifications, and it needs to store some basic user details - a list of devices IDs, an identifier, some ...
0
votes
0answers
16 views

Concept analysis: using a Java ServerSocket to let an Android phone and server communicate?

I have an idea for an application that will not be published to the public Play Store. My friends will need to be able to log in from their Android phone to view certain data that cannot be viewed by ...
-3
votes
0answers
46 views

Is there a change of hardware that allows us to go from command line to a window display [on hold]

I can't find my answer on google because I just get links on "how to use command line in windows" type things. So I really can't find anything regarding the actual window part. What is the hardware ...
-1
votes
0answers
55 views

Removing optional braces in code [on hold]

Is there any regex I can use to strip optional braces from code written in curly-brace programming languages? I'd like to follow the K&R style, where braces only appear where necessary. ...
7
votes
3answers
103 views

How was the Mono Project able to relicense their LGPLed libraries under MIT?

The Mono project used to have LGPLed libraries. In fact mbundle still says when you run it Note that statically linking the LGPL Mono runtime has more licensing restrictions than dynamically ...
1
vote
1answer
45 views

Knowledge base UI pattern

In our database backed (C# WPF / Entity Framework) application, we want to build a system to enter, store, display and search arbitrary content linked to our main entity. The challenge here is to find ...
2
votes
1answer
138 views

Why and when would you use a .NET framework data type?

I've seen an increasing trend of people submitting code to SO that includes the use of .NET Framework data types. I understand that the .NET Framework has its own data types (like Int16, Int32, ...
1
vote
1answer
39 views

Updating all records in MySQL table while still available to the user

I have this 'table A'. It contains two columns; email and email_alias. A sample is below: ===================================== = email | email_alias = ...
0
votes
0answers
37 views

Viability of custom framework to serve RESTful API

Context For my end-of-year project at school I had to create a framework to serve a RESTful JSON API. I wasn't authorized to use a project like Ruby on Rails for instance, Sinatra is allowed since it ...

15 30 50 per page