0
votes
1answer
38 views

jQuery, deferrers and “if” conditionals

How could I simplify the following code? I suspect that it can be simplified by using the $.Deferred class, but I don't know how. if (condition) { $.get('url').done(function () { done(); ...
-1
votes
0answers
7 views

Downloading the latest changes from bitbucket repository [migrated]

How do I update/synchronize my local repository to include the changes made and committed to the master repository? I tries this command but no changes was recieved: $ git pull --all But I get ...
4
votes
1answer
98 views

Professional use of former MIT licensed sofware

I'm currently working on a commercial application using a piece of software registered under the MIT license. Recently, the author of this software removed every entry from Github, for an unknown ...
-3
votes
0answers
52 views

PHP display image on same page from DB with jQuery Ajax or iFrame? [closed]

I have used separate solve.php because headers should be set before any echo statements. Requirement: To view image on the same page when click view. What I did: I coded already jQuery ajax method ...
1
vote
2answers
51 views

Set data in multi-level objects (may be using Java Reflection)

I want to possibly use Java Reflection to set some data at RunTime. My problem is I can't figure out how do I get sub-classes information and use as a part of reflection. I want to use Reflection to ...
-1
votes
2answers
88 views

How to validate Exception messages? [on hold]

My superior asked me to validate each and every input field in the project that includes the Exception messages. So, am I correct in using Exceptional Handler for validating Exception message. ...
4
votes
1answer
54 views

Where to put the Angular app in a ASP.NET Web API solution?

I'm starting a greenfield app and I want to use ASP.NET (4.6) and Angular 2. For the backend I have created a project in Visual Studio, and now I'm wondering where to put the Angular app. I really ...
0
votes
1answer
35 views

Search list items from other list, better way?

Today I have to search items of list from another list individually. I am just thinking about some better approach. Below is scenario described. Lets say I have two arrays, arr1 having 100 elements ...
25
votes
3answers
5k views

If I implement an Interface, is it called an Inheritance?

If my class implements an interface then can I say that I'm following inheritance? I know that when a class extends another class then it's inheritance.
0
votes
0answers
31 views

How to understand code of Rails app written by other devs and test it accordingly?

Rails beginner here with less than year experience in programming.I have some experience writing trivial Rails apps (with CRUD implementation like simple blog) and I have some knowledge how to write ...
5
votes
2answers
85 views

Dealing with (the risks of) infinite sequences in Haskell

I'm a couple of weeks into dabbling with haskell and I've made a pretty big dent in Learn You A Haskell. I feel like many of the type classes and common implementations up to applicatives and monads ...
1
vote
1answer
80 views

What is the correct reusable architecture using Entity Framework for common database tables and services?

Context I have a line of business application "MyApp" in C# using EF. Layers are separated as MyResusableLib.DataAccess // Class Lib: EF based utils, extension methods, MyApp.DataAccess // Class ...
0
votes
1answer
203 views

My algorithm is too slow

Reposted from Stack Overflow - I think this is a more appropriate place to ask the question. I have an algorithm that for an integer x and a starting integer i such that 1 < i < x the next ...
-2
votes
0answers
27 views

How to visually link UML use cases to the UML state diagrams or UML activity diagrams that describe each use case?

Does a formal way exist to visually link a use case to the UML state diagram (or activity diagram) that describes it? I know that it is possible to detail this relationship in the documentation, but ...
1
vote
1answer
70 views

Get or infer template type from inherited member

So I have an assignment from college where I have to apply multiple metaheuristics to different problems. I thought that I should make everything as modular and reusable as possible to reuse ...
1
vote
1answer
34 views

In a .NET Windows Forms app with a custom MVC, should a custom UserControl (view) implement any non-animating logic on its own?

This is strongly linked to these two questions: http://stackoverflow.com/q/15800945/279112 Should Controller know about View & Model? or vice versa? as well as this one: ...
0
votes
1answer
62 views

NoSQL in Java Enterprise Application

I'm planning a large scale enterprise application that requires reliability and standardization comfort that Java EE provides. At the same time, I'm wondering if I go for Java EE, will I be able to ...
1
vote
2answers
76 views

Can one html page with web services replace current server-client technology?

If I have everything I need from the server in REST Api's, is it possible to replace my existing asp.net app by writing ONE single html page (embedded with Angular templates) invoking the web services ...
1
vote
0answers
56 views

Using delegate to handle cross cutting concerns

I am planning to write a net-core library for using with n-tier architecture. In this architecture, i want to handle cross cutting concerns(audit, error handling, logging, validation, transaction ...
2
votes
6answers
210 views

How does immutability remove the need for locks when two threads are trying to update the shared state?

Okay so I read through this: Does immutability entirely eliminate the need for locks in multi-processor programming? And this was the main takeaway for me: Now, what does it get you? ...
2
votes
0answers
49 views

Can you license a fork of a public domain library?

The original library has this statement in its readme, with a link to CC0 1.0. To the extent possible by law, [redacted] Company, LLC has waived all copyright and related or neighboring rights ...
1
vote
0answers
37 views

Determining if webgl code will work on a variety of hardware

I have some javascript/webgl code. I want to have some idea of whether it will work for someone with a different browser/machine/gpu. This is difficult, because there's so much diversity in support ...
2
votes
1answer
97 views

Is it bad practice to name a class with a facade suffix?

Is it bad practice to name classes after the façade pattern? public class OrderFacade {} public class InvoiceFacade {} public class ThingFacade {} ... These classes do follow the Façade pattern.
0
votes
0answers
12 views

Is there a way to include multiple language versions of RSS elements in one item?

I am looking into supporting RSS feeds for a web site with content predominantly in Spanish. However, some of the content has English versions of certain elements as well. For example, one article ...
-1
votes
0answers
30 views

How to extract edges using the standard deviation

I am currently creating a Content Based Image Retrieval system in Java. My algorithm currently computes the standard deviation (Based on RGB values). I am trying to build on that algorithm and make ...
0
votes
1answer
81 views

Are new empty Java marker interfaces created to satisfy an existing method contract a code smell?

Suppose I have a POJO A and some client code that serves it. I have created POJO B, which doesn't have anything in common with A, but I want to use it in the methods that use A, so I decided to create ...
75
votes
6answers
12k views

Why are floats still part of the Java language when doubles are mostly recommended instead?

In every place I've looked, it says that double is superior to float in almost every way. float has been made obsolete by double in Java, so why is it still used? I program a lot with Libgdx, and ...
0
votes
3answers
79 views

Design for a function to skip a step if called multiple times

Terrible title, but this is the situation I find myself in often and have not found a good design to make it nice. Lets say I'm working with Javascript and I have an object I am working on that needs ...
2
votes
3answers
79 views

How to clearly define boundaries of a bounded context

After a month or so of reading and researching DDD, I decided to start my own project and created DDD with these bounded contexts> Clients Products Orders Billing Each bounded context has rest API ...
0
votes
2answers
255 views

How are dynamic images programmed?

I have two friends that want to create a jewelry store, focused on customized jewels. The core feature is the jewelry designer, based on a jewel model. Here's an example of the sort of thing I am ...
55
votes
7answers
5k views

Why does the relational model for a database matter?

I am approaching a project where I'll be having to implement a database with my boss; we're a very small start up so the work environment is deeply personal. He had given me one of the company ...
2
votes
1answer
39 views

Efficient saving of long strings with recurring substrings

following problem: I need to save a lot of xml strings of variable length and structure. As it is with xml, a lot of substrings are the same (some elements, attribute and value combination). Often the ...
1
vote
3answers
77 views

Should a repository or the Login/Register service have an encryption service as a dependency?

I'm designing a simple user login/register program with user login/register and a repository. The passwords for users should be encrypted when stored but I don't know where to put the encryption step ...
1
vote
1answer
218 views

Does anybody still use TODO for writing code later on? [closed]

Statement I often find myself still writing the following statement all over my code: // TODO: (the work that needs done) I do this in order to flag that I need to come back and do something later ...
2
votes
2answers
49 views

Possible performance issues implementing multi-tenant database?

I would like to design and develop school application using PHP and MYSQL as backend. The frontend - a combination of HTML, JS and CSS - has a registration form for every school. Every school has its ...
6
votes
2answers
379 views

How to avoid a crazy amount of interfaces in UI with dependency injection?

Problem I recently read a lot about Singletons being bad and how dependency injection (which I understand as "using interfaces") is better. When I implemented part of this with callbacks/interfaces/DI ...
2
votes
0answers
38 views

Best way to build a JSON API coupled with HTML views in a Rails project

I've got a Rails eCommerce project communicating with an iOS app. The iOS app receives JSON data from the Rails back-end, but there's also HTML rendering when a user comes to the project from his ...
2
votes
3answers
88 views

Logging an audit trail (Java application)

I'm creating a Java (Spring Boot) application for creating Entities. I've got my @Controller for getting the data from a web front end, I've got my @Service for processing the data, and I've got my ...
1
vote
2answers
59 views

algorithm for shell language interpreter to find if a char is between quotes

Assume we have a string s (a C char *) that is a program in a language L. I want to parse L and know the following from the specification The following characters must be quoted if they are to ...
0
votes
1answer
61 views

Is pubsub pattern suitable for my case?

I'm planning to use pubsub pattern with azure service bus in my logistics application.but I'm confused whether pubsub pattern is suitable for my case. My scenarios: users will subscribe set of ...
0
votes
1answer
55 views

Should I use cqrs + es to build a slot machine app?

for me the app that I'm building, a very simple slot machine app where there is which users can deposit money to buy credits, and use those credits to play teh slot machine, and withdrawl their ...
-1
votes
0answers
49 views

MIT license and code tutorial [closed]

If I follow a tutorial, on a website, that has its code under MIT license and I write some code inspired to that code, shall I put the license and the copyright notice in the software?
0
votes
1answer
61 views

Why is a Spring's HttpClientErrorException an unchecked exception?

Oracle summarises the purpose of unchecked exceptions as: The next question might be: "If it's so good to document a method's API, including the exceptions it can throw, why not specify runtime ...
4
votes
2answers
301 views

What are the practical uses of a neural network?

Even as an outsider to neural network development, they still seem to be a hot topic... I get lots of projects I see being starred on my GitHub homepage relating to neural networks. These projects ...
2
votes
1answer
55 views

Vector input for Artificial Neural Network?

My problem is fairly complex, so here is a similar, simplified example. Let's say you wanted to predict the Miles Per Gallon (fuel consumption) of a car, based on the following information: you have ...
2
votes
1answer
31 views

User auto account deletion when using OAuth2

Web app users can delete their accounts, they re-enter the password and if it fits, the account and its assets are removed (soft deletion). They can register using an email (and a password) or using ...
2
votes
1answer
141 views

Checking preconditions the proper way

I have a class with around 1300 lines and it has many CRUD-like methods that need parameters to be checked, for some of them it's more than just a few rules. For clarity purposes, I am going to use ...
1
vote
2answers
76 views

Replacing buggy component with library: important to identify bug in old component before replacing?

Summary: component used to work and now doesn't, the regression happened 1+ years ago and we're not sure when, now I'm considering replacing the broken and poorly architected component with a mature ...
-1
votes
0answers
32 views

Finding all valid exclusive pair combinations (0,1 or 1,0) in 2x30 matrix [closed]

I have a matrix in which every row consists of either (1, 0) or (0, 1). The matrix has 30 rows in total. I need to find all valid combinations of this matrix. Preferably the output should be of the ...
-2
votes
1answer
152 views

For loop and recursion for a new shell in C [closed]

I code a new shell in C, that could be done in several ways: Flex/bison, finite state machine, abstract syntax tree or just a tokenizer in C. Now I've written a for-loop that changes the condition of ...

15 30 50 per page