-1
votes
3answers
153 views

How to design a solution that needs dynamism using Inheritance [on hold]

I have below code/classes/interfaces: An Interface: public interface Animal<A extends Animal<A>>{ void fight(A otherAnimal); } 2.Tiger class which is implementing Animal ...
-1
votes
0answers
40 views

What is the correct term for “Framework/Library Addiction”? [closed]

Ho do you define the behaviour where a programmer wants to use different libraries and frameworks instead of the currently used just for the sake of it, without giving sufficient reason to do so?
-3
votes
0answers
46 views

what knowlege is expected from 2years experienced c++ developer in linux domain? [closed]

I was called for a job interview for the post of c++ application developer in unix domain. For 2 years I worked on various languages like c++, c, matlab. what do they want me to know in linux. 1.Is it ...
1
vote
4answers
192 views

How to make one test depend on the results of another test?

Let's say there is a utility class that provides some common static methods used everywhere in your code by many other classes. How would you design your unit tests for the consumers of the utility ...
0
votes
1answer
27 views

Windows Firewall single rule with multiple IP addresses vs multiple rules with single IP address

I've tried finding some resources to help me on my dilemma, but wasn't successful in my approach. So here goes: I am implementing an automated firewall manager for Windows Firewall which will ban ...
-7
votes
0answers
53 views

Noob Question: Need explanation of abstraction, inheritance, polymorphism, and encapsulation! [closed]

I know, I know. This is a really nooby question, but can somebody please explain these OOP concepts. I have read many explanations, but I only half understand it. I want to understand each concept ...
1
vote
1answer
23 views

Matrix distribution to process grid

I need to write a program, which will perform LU-decomposition, etc. The problem is that I don't know about the preferred way to distribute the loaded matrix from the root process to other processes. ...
1
vote
3answers
98 views

Protect memory from a potentially seg faulting function call

How can one safely call a function that might segfault without corrupting the stack or the heap? These SO questions cover using signal handlers and setjmp.h to regain control. Coming back to life ...
-4
votes
1answer
61 views

How to make a secure communication between two applications on the same system [closed]

I'm writing a software which is divided into two separate stand-alone pieces, one is a service like application that handles all the logics, the other one is a GUI application that just works as a ...
-4
votes
0answers
24 views

Design Patterns in Android [closed]

recently I have started coding in Android, I want to implement some design pattern in my practice project, cud u please provide some sample code in which any design pattern has been implemented.
1
vote
1answer
66 views

Why is Android Runtime's AOT compilation more performant than Dalvik's JIT? [closed]

With Android 5.0, Google has introduced the Android Runtime, or ART. ART "brings improvements in performance, garbage collection, applications debugging and profiling." However, it also replaces ...
-3
votes
0answers
22 views

Perl | extract data from binary file [migrated]

I have a binary file. I want extract all data from $marker+$step to $marker (or EOF). Data example: 23 40 92 34 32 09 84 39 02 89 30 fe 90 38 01 02 03 f1 f2 00 00 00 22 33 44 56 77 22 aa bb cc dd ee ...
1
vote
1answer
99 views

How to work with a messy codebase and client [duplicate]

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
1answer
39 views

How is ServletContext created?

When the webapp gets loaded the container will create the ServletContext. There is only one ServletContext per webapp per JVM. The ServletContext object is contained within the ServletConfig ...
0
votes
4answers
239 views

2 methods that are 75% the same? [on hold]

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% ...
1
vote
1answer
72 views

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

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 ...
1
vote
1answer
109 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
56 views

C# Semicolon ; End of Line Shortcut [closed]

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
2answers
37 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 ...
1
vote
1answer
176 views

How to avoid violating one definition rule in this case?

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

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

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
25 views

Source Management for solo developer on different computers [closed]

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
22 views

Managing and accessing instances of classes [closed]

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
2answers
160 views
+100

Storing and retrieving simple data within a framework

I'm determined to get a decent answer to this, because while I have my own approach (constants) I'm not convinced I'm doing it as efficiently as I could be. So I'm editing the entire question, to ...
-3
votes
1answer
44 views

Ask advice on the improvement of my code [closed]

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
171 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
24 views

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

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
78 views

How do line intersection algorithms work? [closed]

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
53 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 ...
33
votes
4answers
3k 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, ...
33
votes
11answers
3k 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
32 views

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

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
38 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 ...
6
votes
3answers
140 views
+100

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
37 views

Standard for Documenting Program Flow [closed]

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
43 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
45 views

VCS a Vagrant box [closed]

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
189 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
64 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
3answers
149 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
22 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
52 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
92 views

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

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 ...
4
votes
2answers
306 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
131 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 ...

15 30 50 per page