0
votes
1answer
13 views

How to work with a messy codebase and client

A client came to me with some features he wanted implementing. Easy enough to do what he asked. He paid me, I agreed to start on the start date and finish in 3 weeks. The code base is a disaster. It ...
0
votes
0answers
3 views

How is ServletContext created?

WARNING: Stupid question alert. But I need to get my head around this. "When the webapp gets loaded the container will create the ServletContext. There is only one ServletContext per webapp per ...
0
votes
2answers
24 views

2 methods that are 75% the same?

I have code that violates the DRY principle and I would like to consolidate 2 methods as much as I can, but the problem I am facing is that they have some differences, I would say they are about 75% ...
0
votes
1answer
15 views

Need to store Multiple Images (path) into MySQL after upload

I am trying to build my own little eCommerce CMS, and i want the expert opinion on how to handle multiple uploaded files (images). For Example: A user adds a new item, fills the necessary form data ...
0
votes
0answers
25 views

How to make sure that the destructor cannot throw an exception?

I know that we can specify the compiler that a function is not throwing an exception by using noexcept specifier but noxecept functions can still throw exceptions . So, how to prevent destructor from ...
0
votes
0answers
3 views

Constructor Bug [migrated]

I am trying to make a class that represents an integer with 100 digits. Not so much because I need it, but to learn more about constructors. The constructor takes a String (all numbers) and places ...
-1
votes
0answers
22 views

C# Semicolon ; End of Line Shortcut

I'm working in VS.NET 2013 and when I type "(", the ")" is autogenerated so that my cursor (depicted as "|") is located like so: fooBar(param1|) It would be oh so lovely if hitting shift+enter ...
1
vote
1answer
9 views

Semantics of heading levels in multiple sections in HTML5

I'm never quite sure what is the best, most semantic way to handle heading levels in HTML5 markup, when you have multiple sections. On one hand it makes sense to have an H1 heading as a title of a ...
0
votes
0answers
17 views

How to avoid violating one definition rule in this case?

We have an existing Mutex C++ class. It have an debug feature to track the owner thread id. So it have an member variable to store this, but because the original developer doesn't want to wast memory, ...
-2
votes
0answers
22 views

Is it viable to use Java reflection for serialization/deserialization? [on hold]

I have quite a bit of experience with C# and .Net reflection, and have written my own serialization/deserializaiton module based on using .Net reflection to analyze the objects and their members. Now ...
-1
votes
0answers
17 views

Source Management for solo developer on different computers [on hold]

I am a solo developer but I work over 4-5 different computers on some of my projects. I primarily work with eclipse on cross platform mobile apps using libGDX (uses gradle - pretty anal about the ...
-2
votes
0answers
15 views

Managing and accessing instances of classes [on hold]

This is for an assignment and I am stuck on how to access a class that would be instanced with user input. I cannot seem to see a way to instance a new AddressBook with a unique identity from user ...
0
votes
0answers
4 views

crystal report to pdf without report viewer [migrated]

i would like to know how to export crystal report to pdf format file without pointing to crystal report viewer in code. below is my working code with report viewer but i would want to do so without it ...
0
votes
1answer
22 views

Storing and retrieving simple data within a framework

I'm writing a framework, a project for learning, not commercial. Basic overview of the framework: htaccess sends all requests to Front Controller (index.php); Front Controller loads ...
-2
votes
1answer
33 views

Ask advice on the improvement of my code [on hold]

My original part of the code for a matrix class is like this: Matrix::Matrix(const Matrix& mat) { int i; r = mat.r; c = mat.c; d = new double [r*c]; double* p = d; double* pm = ...
0
votes
0answers
14 views

C# gets an enum, but doesn't work correctly with switch statement [migrated]

Im having some trouble with enums and then checking it with a switch statement. I'm not sure if I'm doing something super wrong, but I don't get any errors so hey. # Level.cs enum LevelID { ...
3
votes
3answers
88 views

Anything wrong with direct evaluation of JSON if your own code created it?

Suppose I have a server-side variable containing JSON (named strJSON) that my own code created. In JavaScript I can consume it like this: var data = <%= strJSON %>; or use a JSON parsing ...
-2
votes
0answers
8 views

How to make changes to a localdb in visual studio 2013 express [on hold]

I'm trying to create a simple program to start learning to work with databases. I do have goals in mind, but I'm trying to get the simplest thing accomplished right now. I want to use Visual Studio ...
1
vote
0answers
42 views

How do line intersection algorithms work? [on hold]

Most of all the code I see to do with line intersection make no sense, since they use short hand I don't understand (t, s etc.), so how do line intersection algorithms actually work, as in, how do ...
1
vote
1answer
43 views

Is this statement correct for floating point numbers?

The decimal point can "float" to accommodate larger numbers while staying in 32-bits which is why float is considered "in-accurate" Is this an accurate statement? I want to know if I understand ...
18
votes
1answer
570 views

Why structs and classes are separate concepts in C#?

While programming in C#, I stumbled upon a strange language design decision that I just can't understand. So, C# (and the CLR) has two aggregate data types: struct (value-type, stored on the stack, ...
11
votes
8answers
887 views

Constructor-only subclasses: Is this an anti-pattern?

I was having a discussion with a co-worker, and we ended up having conflicting intuitions about the purpose of subclassing. My intuition is that if a primary function of a subclass is to express a ...
-2
votes
0answers
25 views

From Visual Studio 2010 to VS 2013 - any pitfall that I should know? [on hold]

It's been some five years since I started my current job as C#/WPF developer, using VisualStudio 2010 / .NET 4.0 with a Windows 7, 32 bits OS in a dual core, 4GB RAM, 64 bits machine. Even my bosses ...
0
votes
1answer
36 views

Difficulty in deciding correct data structure

Two objects are interacting (Object Alpha, Object Beta) Each contain a point (x,y) which will be used to make comparisons, among other things. Object Alpha's point (x,y) attribute is dynamic and ...
2
votes
0answers
11 views

Algorithm or domain for finding cheapest subgraphs that connect vertex pairs

I am currently working on a project inspired by the Ticket to Ride board game. This board game is played on an undirected graph where each vertex represents a city and each edge represents a ...
-5
votes
0answers
27 views

Standard for Documenting Program Flow [on hold]

Problem: As a programmer, I would like to document the steps a program needs to take so that anyone else involved in the project can see the steps. However, I would like this to be as standardized as ...
-1
votes
0answers
33 views

How to do frequent deployment / rolling upgrades for a Java app?

We're developing a SaaS app in Java, built with Maven. It runs on Amazon on a (potentially) large number of servers. We'd like to deploy changes every day or two. We have a ton of unit and system ...
-2
votes
1answer
40 views

VCS a Vagrant box [on hold]

I have two computers (1 Laptop with Ubuntu that I use for development in 99% of my time but I also have a pretty much unused PC with Windows. I also have an unused server machine at home. I would like ...
0
votes
0answers
15 views

Finding Contextual Nodes in a Knowledge Graph [migrated]

I'm currently participating in developing a knowledge graph that uses ConceptNet and a few others as its data sources. It uses the same architecture as ConceptNet namely it is stored as a hypergraph ...
2
votes
1answer
152 views

Reducing the complexity of over-designed code

I have just started working at a company where I have inherited a C# codebase from a previous developer. I know programming well, have an engineering degree + an (unfinished, several year long) PhD ...
1
vote
0answers
45 views

How to use an enumeration type, when the values are not known at first?

We have a project, that consists of a cluster of C source code, a C library and a C++ library. The C++ library is dependent only upon the C library, or at least that is what I am trying to achieve. ...
5
votes
4answers
84 views

How to use unit tests when using BDD?

I am trying to understand BDD. I've read some articles and as I understood BDD is "the next step" from TDD. I say that because I find both to be very similar, and as I could read in this article, BDD ...
-2
votes
0answers
20 views

Strange behaviour of visual studio 2008 with escape sequence [migrated]

Regarding C programming language, the descriptions of escape sequence does not resolve the output of following line in visual studio 2008. char * str = "??/abc"; printf( "%s", str ); it prints only ...
0
votes
0answers
15 views

Creating derivative work based on a project under apache license - Dealing with original notices in source codes

There is a library licensed under Apache License 2.0 that I extended its functionality in multiple new Classes. Also some of the original Classes of the project had to be modified in which some of ...
0
votes
1answer
47 views

forking but not exiting

It is normal for the child in a fork() to call exec() or _exit(). Are there any realistic scenarios where the child might return from the function that called fork() instead? void foo() { pid_t ...
-1
votes
0answers
80 views

What are the possible repercussions of developing an application for a customer that will violate the TOS of another company? [on hold]

A client approached me to develop an application that I am pretty sure violates Google's Terms of Service (TOS). It's a small application that crawls Google's search results page and extracts the ...
3
votes
2answers
235 views

Const means Thread-safe?

I was put onto this video: http://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank By http://codereview.stackexchange.com/users/39810/glampert Because I asked ...
1
vote
2answers
117 views

Do today's modern compilers perform run time checks?

This is regarding compilers. Do compilers perform run time dependency checks to decide to vectorize a loop ? In other words, do compilers trace through the logic as it would in run-time to ...
-3
votes
0answers
18 views

DIstribution of unique content [on hold]

I would like to distribute of unique content via web browsers. My task is have one part of content (part of movie, chapter in book, ... for example) only on one browser (end user). Another users can ...
2
votes
1answer
139 views

OCaml criticism: is it still valid?

I am a complete newbie with OCaml. I have recently stumbled into this page listing a good amount of criticism towards OCaml. Seeing that the page it quite old (2007): which of the bullets points ...
-4
votes
0answers
12 views

IllegalStateException on mediarecorder.prepare - Android videostreaming over socket [on hold]

I am trying to stream video over socket. Here is the code snippet - serverSocket = new ServerSocket(serverPort); receiverSocket = new Socket(); receiverSocket.connect(new ...
1
vote
2answers
92 views

Sharing code logic between controllers, through the Model layer?

As I originally conceived my Model layer, it was only supposed to hold data and no code. I receive DTOs from web-services, they are mapped into my Model objects. Those model objects usually end up ...
3
votes
1answer
113 views

Algorithm to find minimal set

I have a set of sets S and I want to find a minimal set of elements M such that each set in S shares at least one element with M. S = set of sets ∀ f∈S ∃e · e∈f ∧ e∈M For example: S = {{1}, {1, 2, ...
-1
votes
0answers
11 views

Using core RegEx library to implement lexical analyzer generator

Say I wanted to implement a lexer generator targeting some language, like Objective C, that features some RegEx implementation in its core library, in this case NSRegularExpression. Given that they ...
1
vote
2answers
60 views

Observer pattern: Prevent multiple firings on changed internal property

I have an object Foo that has 2 public properties: A and B. These properties can be changed from outside, as the application I'm working on is using a data-binding architecture. This is the ...
0
votes
0answers
32 views

Result with value or error returned from service c#

First of all, let me explain the current situation. In a ASP.NET project, we do some ajax calls to a WCF service. This service always returns a value when called. But this is the way they implemented ...
-6
votes
0answers
37 views

App submission on app store gives warning “Missing 64-bit support” [on hold]

App submission on app store gives warning “Missing 64-bit support
-1
votes
0answers
18 views

Using Events & Delegates in ASP.NET MVC [on hold]

I'm developing a multi tenant n-tier web application using asp.net Mvc 5. In my service layer I am defining custom events for every important action and raising these events once these actions are ...
1
vote
1answer
42 views

Reimplementing algorithm from GPL program

If I reimplement an algorithm of a program covered by GPL v2 do I have to also license my program as GPL v2? And to be specific: I need a javascript library to compare debian packages versions. ...
0
votes
1answer
16 views

Authenticating users across multiple web services

User details (name, address, etc) are stored across multiple sites that are vendor specific. For example, vendor A holds information concerning room bookings while vendor B holds information specific ...

15 30 50 per page