0
votes
0answers
21 views

What kind of programming pattern is appropriate for programming an algorithm with rules and exceptions?

I'm interested in coming up with an algorithm to solve a guessing game. The player is attempting to guess a sequence of 4 unique numbers from 1 to 9. After a guess, they are told how many numbers of ...
-1
votes
0answers
9 views

popup pictures in a Front end javascript website

I am looking for some help to solve a problem that I am having... I am playing around with a template I found online and I am trying to use another JavaScript script on the template to change the ...
1
vote
0answers
19 views

Using and referencing external executable's in a solution

I have an application written in AS3 which I need to be able to start up from my C# application. I have a prototype that does this just fine but my question is in relation to how I would arrange my ...
-1
votes
0answers
16 views

Is there a Code Review Tool that Integrates with Team Foundation Server [on hold]

Is there a code review software that integrates well with Team Foundation Server? It seems like there should be something that wouldn't even require me to take a diff, I could just provide my branch ...
0
votes
0answers
21 views

Product Development Design - Customer specific changes

We are developing a web based product that will require customization for various customers. Customers tend to have different rules and nomenclatures, hence the customization requirement. The ...
1
vote
0answers
19 views

Encapsulating business logic that goes beyond validations in MVC

I'm pretty clear business logic goes into Models. But on this question, they refer to business logic as pretty much low level validation (if the user signs up, ask for their e-mail). What about ...
-1
votes
0answers
16 views

Math expression in swift repl

I have a code #!/usr/bin/env xcrun swift import Foundation let expn = NSExpression(format:"2+2*2") println(expn.expressionValueWithObject(nil, context: nil)) How to make so that I introduced the ...
-4
votes
0answers
22 views

Are there any limitations to using a MacBook Pro with Bootcamp for windows based development? [on hold]

I'm looking at getting a Macbook Pro as my next dev machine. I intend to install Windows on Bootcamp. I do most of my development work on Windows. The type of dev work I do and tools I use is as ...
-3
votes
0answers
18 views

Weird problem while installing Adobe After Effects CS 4. Help me! [on hold]

I am trying to install the Adobe Creative Suite 4. Every thing works fine except the installation of After Effects and Illustrator. The problem is that I can't even select (check) the After Effects ...
1
vote
1answer
25 views

PHP MVC Model with a method to fetch all of the model from database

I have a crazy question, consider I'm developing a blog website, There is two model named Post and Comment, now I wanna add a method to fetch all comments from database, which model should I choose to ...
0
votes
3answers
37 views

Chat-service database design

I have an android/desktop application that I'm now releasing on the web, and as there are some social aspects I thought of adding a chat-service so users can IM as well. For this chat service, I want ...
0
votes
0answers
13 views

How to push data from one page to another [PHP] [migrated]

I'm using sockets.io, express and php and I was wondering if it is possible to push something of a page (that only a specific user can see at the time) to another page other can see. For example, if ...
0
votes
2answers
52 views

How to design a solution that needs dynamism using Inheritance

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

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

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?
-1
votes
0answers
68 views

How much is Uncle Bob's definition of OOP compatible with the mainstream definition?

How much is Uncle Bob's definition of OO compatible with the mainstream definition? Uncle Bob in his Clean Coders series mentions and gives solid arguments that OO is basically about sending ...
-3
votes
0answers
28 views

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

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
1answer
64 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
0answers
8 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 ...
-6
votes
0answers
34 views

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

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
16 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
1answer
42 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
45 views

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

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

Design Patterns in Android [on hold]

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

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

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

Perl | extract data from binary file

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
70 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
1answer
20 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 ...
-1
votes
4answers
95 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
30 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 ...
1
vote
1answer
80 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
42 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
2answers
20 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
71 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
33 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
21 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
20 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
36 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
36 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
153 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
14 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
45 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
51 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 ...
26
votes
2answers
1k 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, ...
17
votes
9answers
2k 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
28 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
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 ...
2
votes
0answers
12 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 ...

15 30 50 per page