-2
votes
0answers
13 views

How to insert log transformed columns into an existing dataframe using column indices (in pandas, python)

How do I insert columns that are log transformed(after doing log transformation of certain variables)of a data frame called 'log_data' back to it's original data frame 'df' using specific column ...
-6
votes
0answers
48 views

How to replace “{” and “}” except those inside a <style> tag? [on hold]

Let's say I have the following html content: [style] body { width: 100% !important; height: 100%; margin: 0; } [/style] [body] welcome to testing, **{user}**! [/body] ...
0
votes
0answers
25 views

Which search engine should I use to suport complex search scenerio

Let’ assume that I have a database for storing orders for multiple stores and I have following tables: User – represents user Store – represents store UserStore – many to many between User and ...
4
votes
2answers
57 views

prevent abuse to rest api endpoint

Question 1 I have a login api endpoint http://127.0.0.1:8080/api/account/login it checks if phone number has been validated. If not it'll call POST http://127.0.0.1:8080/api/account/sendsms ...
-2
votes
0answers
22 views

How would I implement the following formula as a function in java? [on hold]

Where you are trying to find the smallest number for n with inputs p and y. I tried to implement this as: int index = 0; for (int i = 0; index == 0; i++) { if (bFormula(i, perHit, hitsNeeded) ...
0
votes
1answer
39 views

What kind of data structure should be used to store components in an electrical schematic program?

Is there a specific data structure, object oriented programming methodology, and/or approach for achieving what programs like LT Spice, Altium Designer, and Cadence Virtuoso use to manage ...
0
votes
1answer
40 views

Taskrunner - with multi threading design [on hold]

I am looking for advice on how to implement a multi threaded task runner. My background is Java and Spring. It would look like the following. BatchTask Each BatchTask shall run in parallel and ...
0
votes
0answers
39 views

Good examples for use of design patterns in Unity [on hold]

My students have learned OOP as well as the strategy design pattern during the first semester (Processing/Java), which lead to understanding Unity's component based architecture (similarity of ...
2
votes
1answer
47 views

Observer Design Pattern with complicated objects

I am trying to currently get a good grasp on the Observer design pattern, but I am stuck wondering about one specific issue. In the examples I have been able to find of implementation, they are all ...
6
votes
1answer
63 views

Perform crossover operation on AST in genetic programming

So in general when you perform a crossover in GA, you directly flip a random section in the "genome", with the corresponding section in the other parent, and mutate it based on the mutation rate. ...
0
votes
2answers
118 views

Using an answer from any question and answer site in my source code is plagiarism?

Since English is not my native language, I try to be brief as much as possible to understand my question case 1: Sometimes I cannot figure out how to make things to work like in this question,Sending ...
1
vote
2answers
58 views

Ambient dependency injection through static service locator

After some googling I found some debates about whether constructor injection or property/field injection is better, but there is yet another alternative that strikes me as more beneficial. In most ...
2
votes
2answers
47 views

How do you address the problem of dealing with an external service that stores your data and you want to keep in sync?

I'm integrating an enterprise application with an existing pattern. The main problem is how to synchronize data between my system and an external system through RPC (HTTP API calls to be precise). ...
1
vote
1answer
25 views

Abstracting end-to-end test cases across multiple pages

I am using Protractor and Jasmine to create end-to-end tests for a webpage. To test this initial page, I have abstracted made some common utility functions to create about 20 test cases for this ...
4
votes
2answers
123 views

Service-locator anti-pattern alternative

I'm using Unity as IoC with C#, but I guess the question really isn't really limited to Unity and C#, but IoC in general. I try to follow the SOLID-principle, which means that I got very few ...
1
vote
2answers
43 views

Name for Keeping Multiple Copies of a Variable

There is a bad practice in software engineering where a single piece of data is held by value in multiple places. For example, in an FPS, the location of the player could be held by the AI class, the ...
2
votes
1answer
33 views

RESTful HTTP and websocket in the same application?

If an application has already an opened WebSocket for live feeds, should I use it over AJAX for the other communications with the server? Because the connection is already opened, should we use it ...
1
vote
1answer
57 views

Why closure declaration syntax in Swift is different from function declaration

let closure = { (args) -> ReturnT in ... } v.s. func function(args) -> ReturnT { ... } Why didn't Apple follow principle of Occam's razor and make closure and function declarations to be ...
1
vote
0answers
55 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. ...
1
vote
1answer
30 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
76 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
48 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
123 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
39 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 ...
-2
votes
0answers
55 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
66 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
78 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
117 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
93 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
43 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
20 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
185 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
40 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
52 views

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
68 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
10 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
46 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
34 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
29 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
83 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
58 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
35 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
355 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
17 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
65 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
76 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 ...
0
votes
1answer
25 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 ...

15 30 50 per page