1
vote
0answers
64 views

How to authentication user in REST API (domain driven design)

I am using REST API as a presentation layer of a DDD project. In order to secure API calls I am using token based security. ...
2
votes
3answers
74 views

What should be primary guideline when defining a bounded context?

When defining bounded contexts of a Domain, what should be a primary guideline: departments (Sales/Manufacturing/Warehousing), where each department has a common context ...
2
votes
3answers
79 views

How can one think of a relational schema in terms of storing it in a NoSQL database?

Recently I've been wanting to experiment with NoSQL databases, especially document store ones. After reading, I still don't understand how one might model information that is contained in a relational ...
2
votes
2answers
49 views

Testing properties with private setters

Currently in a part of my project a domain object like below exists: public class Address { public virtual string HouseName { get; set; } public virtual string HouseNumber { get; set; } ...
-1
votes
4answers
135 views

What algorithm would have the fastest average run time and least memory requirements for sorting a deck of playing cards?

Considering a deck of N playing cards with X different rankings and Y different suits (i.e. there are Y cards with X ranking, thus N=X*Y). What is the fastest algorithm to sort them assuming that X, ...
-5
votes
0answers
43 views

Send scheduled emails with conditions [on hold]

I have to edit a Laravel project and add a function to send scheduled emails with certain conditions. Basically the project is about a ticketing system with which some companies have to interact. An ...
-1
votes
1answer
93 views

Would a JS framework that automatically performs ajax requests in background be useful?

For the type of applications I usually develop (AngularJS single page applications that communicate with the server side based on the REST API) there are some requests done at the start for loading ...
-7
votes
1answer
72 views

Regarding mainframe - sort card [on hold]

Please can anyone explain use of keyword REMOVECC in sort card? // SYSIN DD * SORT FIELDS=(1,3,CH,A) OUTFILE REMOVECC /*
-2
votes
0answers
80 views

Run code once at deployment and never again. Possible? [on hold]

For any web applications, there are 2 stages, 1st, before request processing; 2nd, starting to process the request and further. And there are plenty of cool frameworks out there, viz. laravel, CI etc. ...
2
votes
3answers
122 views

Command Pattern - Correct usage?

I have a scenario wherein I need to do certain specific steps in a specific order. For clarity lets take a simple example. Let's say I have a Student and some Student Properties which I encapsulate ...
1
vote
2answers
105 views

LSB-propagating left shift, conceptual equivalent of sign-propagating right shift [on hold]

How would I write something that fills with the right-most bit (<<< is used to denote this non-existent operator): 1 <<< 7: "11111111" and 0 <<< 7: "00000000" 9 ...
1
vote
1answer
46 views

Validating transaction codes with reference codes… Best way to encode the validation rules?

Good Day, I have a series of reference codes that my end users create during the course of the day. These reference codes correspond to a transaction code that is stored in a database. As of now, ...
1
vote
0answers
25 views

Where does export file code belong in an MVC implementation that is designed mainly for HTML

I have an MVC website set up with a base view (Layout.php) containing HTML header and footer code. Other views (such as CarView.php) will extend this class. One of the methods in this class is ...
-1
votes
0answers
41 views

Using system.h or similar global header file is bad practice?

Many embedded system development practice discuss about using some kind configuration file like System.h or config.h for storing configuration options for different modules. But slowly these files ...
4
votes
4answers
190 views

Why isn't the overloading with return types allowed? (at least in usually used languages)

I don't know about all programming languages, but it's clear that usually the possibility of overloading a method taking into consideration its return type (assuming its arguments are the same number ...
-2
votes
0answers
24 views

Classified auto removal system

I am building an online classified website. You need to have an account to post. People can post their object and post pictures of it. I don't want to have to confirm each post before they go live. ...
-2
votes
0answers
41 views

When the system metaphor does not work

I'm trying to figure out how to combine the metaphor system with patterns. For example, with MVVM or MVC. These patterns dictate a specific naming system. For example, in my project I have classes ...
1
vote
1answer
70 views
+150

Driving Linux input events from serial device

I'd like to build a RaspberryPi-based device that can communicate with my Linux laptop over USB (don't think it matters, but I'll be using a custom made USB dongle that has an FTDI chip on it, and my ...
-4
votes
1answer
70 views

Generate this kind of 2d burst or pulse algorithm?

I'm currently trying to develop a game using Cocos2d-x using C++ I really need to generate this burst or (donut-shaped) pulse. I'm having a difficult time how to generate such shape. At first, I was ...
1
vote
0answers
11 views

How to Make Reusable Classes/Package in Laravel for Billing which uses PaymentExpress?

I am working on a Laravel Project where we are Payment Express. What currently we are doing is that we have Payment Express Class with static function (Not a single property) like given below: Class ...
2
votes
1answer
49 views

Which IndexedDB data structure for Chrome app?

I'm on the way to build a Chrome app, dedicated to fulfill shop/marketplace orders. The orders come from marketplace APIs like Amazon MWS. The data is stored only in the app (with backup). The system ...
1
vote
1answer
35 views

Transfer flattened entities instead of DTOs?

I wonder, if the below idea makes sense for our web application. We show various lists of entities, which typically refer to other entities and so on. In the table view, there are columns showing some ...
2
votes
0answers
34 views

Cache-conscious data structure that does not require hashing

I am looking for a cache conscious data structure that does not require hashing. This is to avoid HashDoS without needing to use cryptographic PRFs such as SipHash, which are slow (~1 cycle/byte) ...
1
vote
2answers
84 views

Approach for inserting rows

Let's say I have a sale order with multiple rows of products. Multiple users insert rows so I must check for concurrency. In my db the ID of the order and the number of the row makes my record unique. ...
-6
votes
0answers
62 views

How has Apple solved the Windows/Mac cross-platform problem with iTunes? [on hold]

If a small corporation were to write something of the scope of iTunes, it would likely choose among: Cordova/PhoneGap Qt Kivy Separate the MVC parts. Write the model once and share as an NDK (in ...
1
vote
0answers
38 views

MVVM approach to mahapps.metro Dialogs

I want to use a ShowMessageAsync method, but, at first sight, there is no obvious way to do ViewModel binding, even though there are already a certain number of answers and examples about this. Now, ...
5
votes
6answers
374 views

How much commenting is better for coding? [duplicate]

I don't have a formal computer science education, meaning that I did not study computer science topics in a university. However, I work at a programming job and write a reasonable amount of code. ...
0
votes
0answers
19 views

Google Swiffy license runtime.js

I'm not a lawyer. Can I use file https://www.gstatic.com/swiffy/v7.4/runtime.js as a separate file in composition with my software on Windows Embedded 8 without an Internet connection? Samples it's ...
1
vote
1answer
66 views

Are repositories meant just for storing data?

One of the major benefits of the repository pattern is that you can easily switch out implementations for other implementations. After learning about this pattern I started to make tons of things ...
4
votes
2answers
79 views

Compile time configuration: programmatic or file based?

We need to customize a desktop application at compile time. Users cannot change the configuration. Only developers and release managers can do it. The configuration is a little complex. There are ...
1
vote
0answers
51 views

Should I add the license in every headers and source files?

I'm about to push my first project to github (mini toy lisp interpreter written in c). I've noticed that the vast majority of opensource projects include their license in every source file (at the ...
0
votes
0answers
28 views

What is the difference… no, relationship… between coupling and cohesion in OOP? [duplicate]

What is the relationship between coupling and cohesion in OOP? I am especially thinking of how these concepts apply specifically in a multi-tiered/multi-layered project. I find that my applications ...
2
votes
1answer
142 views

How does this C++ assignment work?

I have very limited experience with C++ but I do have plenty of experience with Java and NodeJS. I've decompiled and tried to make sense of a small C++ compiled file and I've come across something ...
-2
votes
0answers
64 views

Maintaining a Unique id within List in two different iterations

I am struggling to create an algorithm which fulfills my requirements. I have a class which shows my FinalDestinationName and Time for the train to arrive to reach platform let's say like this ...
0
votes
0answers
76 views

Building a heap in C++

I am learning heaps in C++ and I have a question about heapify function. So in order to build a heap from a random array, you put the elements from the array in a binary tree in order in which they ...
0
votes
1answer
84 views

Using CSS for build tables. Are these tables okay to use for email? [on hold]

I am an newbie in training. Recently I read this an article about building tables with CSS. The code is something like this: <section style="display: table;"> <header style="display: ...
-1
votes
0answers
39 views

what is difference between asynchronize vs backed service [on hold]

When you execute something synchronously, you wait for it to finish before moving on to another task. When you execute something asynchronously, you can move on to another task before it finishes. ...
-1
votes
0answers
20 views

AJV Validator for JSON

I have the following JSON validation var schema = { "type": "object", "required": [ "name", "profession" ], "properties": { "name": { "type": "string" }, "profession" : { "oneOf": [ ...
-1
votes
1answer
40 views

php base64_encode simplified answer

What are practical uses of base64_encode and base64_decode? At what particular situations are they used? For example, in terms of security? What is the usage of using this function when sending an ...
1
vote
2answers
61 views

Microservices with the same database

I have a monolith application on a server and I want to break it into multiple microservices. Because of that for the moment I have to use the same database for all the microservices and each ...
-3
votes
0answers
21 views

Notification feed in Python for Android app

I am working on writing backend (REST API using Flask) for a Android app (simple content posting app). I need advice in implementing a notification feed where a user can see all the activities related ...
5
votes
1answer
419 views

How to make clear that a method can be overridden?

I have a library that I use in several applications. It has a method that returns a URL: class UrlBuilder { public function url($config) { $config = do_some_checks($config); return ...
4
votes
6answers
268 views

Should an Else statement be used just for a comment?

I came across the following in some sample code: if (urlStr) { NSImage *iconImage = [[NSWorkspace sharedWorkspace] iconForFile:urlStr]; node.nodeIcon = iconImage; } else { // it's a ...
4
votes
2answers
77 views

Database design, processor vs inconsistency

I was wondering, if I have a table that stores, lets say, a user's transactions, then when I need to fetch the user's current balance I would have to go and use SUM() like SELECT SUM(value) FROM ...
-3
votes
0answers
43 views

How to improve my skills at detecting edge cases on programming “exercises”? [on hold]

I recently found Codility, a site where you can tackle programming problems, submit a solution, and get correctness/complexity percentages. Each problem gives you a couple of test cases and their ...
1
vote
1answer
72 views

python: detecting if my method is called with 0 or 1 args

I want to write a suite of methods that act as getters when passed zero arguments and as setters when passed a single argument. I have two two reasonable implementations, shown below. Is one better ...
4
votes
1answer
75 views

“Reactive programming is programming with asynchronous data streams.” is this true?

I was reading about Reactive programming, and came across this article The introduction to Reactive Programming you've been missing with the quote I put in the question title: Reactive programming ...
0
votes
2answers
110 views

Is a global context stack a code smell?

I would like to hear arguments for or against a plan I am considering. I have a large network of nodes each of which has vector-valued properties. Accessing these properties (read or write) requires ...
0
votes
0answers
46 views

How in-depth should stakeholder analysis be? [closed]

I am currently carrying out interviews to elicit stakeholders views on a project related to the medical industry. I am unsure as to exactly who can be considered a stakeholder? I have consulted ...
22
votes
7answers
660 views

Why do most mainstream languages not support “x < y < z” syntax for 3-way Boolean comparisons?

If I want to compare two numbers (or other well-ordered entities), I would do so with x < y. If I want to compare three of them, the high-school algebra student will suggest trying x < y < ...

15 30 50 per page