1
vote
1answer
16 views

Creating an interface just to decouple from third party libraries

I'm currently developing the Authorization module on a framework of mine. I have the following class so far: public interface IAuthorizationManager<C> where C : ...
-1
votes
0answers
12 views

hiding progress window during file transfer

I have some older visual basic programs I wrote that run every hour to transfer files between folders. The VB programs work fine (compiled into EXE) on my new laptop with Windows 8. But occasionally ...
-1
votes
0answers
28 views

Using GCC in linux, what popular flags are geared towards optimization at compile time?

Realizing there's no singular "go faster" button, I'm trying to fimiliarize myself with any relevant optimization flags gcc has to offer. Beyond -O3 I'm looking for any flags I might want to use if I ...
1
vote
0answers
9 views

Working with list of objects in a Sequence Diagram

I want to model a list of object (in this example a list of cars) and I have some doubts In the first loop, create a "Car", is correct to use "addCar" like that? (I'm using Umbrello and he don't ...
-2
votes
0answers
9 views

Visual studio list/search for partitions

I have partitioned my usb drive to look like a cd (partition A) and a normal thumb drive(partition B). I want the cd(A) to auto run a visual studio program that will look for the other partition on my ...
-4
votes
0answers
17 views

Make a gui for windows command line function junction point [on hold]

OK i want to make a gui for command line function junction point ex: mklink /j D:\Docs E:\Users\Kari\Documents where the users are able to select the source and destination folder with a gui. ...
1
vote
1answer
14 views

Can I resolve an issue with SRP, SOC that prevents object initialization via constructor?

In OOP, I can populate (initialize) an object using constructor injection at object creation time, or setter injection, after creation time. I like the idea of populating object at creation time via ...
2
votes
1answer
30 views

Why is SRP using the class construct to contain a responsibility opposed to using any other OOP entity?

SRP states ... There should never be more than one reason for a class to change. But why a class? Why not use granularity of a function/method? What instead of separating my functionality into ...
-1
votes
0answers
24 views

Square spaced spiral matrix

During an interview I've been asked to write an algorithm that create a square spiral like this one : *********** * ********* * * * * * ***** * * * * * * * * * * * * * * * *** * * * ...
-3
votes
0answers
29 views

Efficient programming: Java [on hold]

I have just started to learn Java, this is my first programming language. I would like focus on efficiency from the beginning to be able to write fast programs. What is the basic "know-how" related ...
0
votes
1answer
52 views

What would this interface be called?

At work we have a java backend that talks to python on some mobile devices. The mobile devices have no GUI, it's just pure string manipulation. All contact is initiated by the python; the java is just ...
1
vote
1answer
20 views

Is message-oriented middleware applicable for intra-application communication?

I recently developed an application in LabVIEW, but although I'm pretty happy with its design I realised that I might be able to improve one part of it by making the various components of this ...
-2
votes
0answers
8 views

Using SAML with Python (client application) [on hold]

I am writing a script that need to authenticate against a site that uses SAML to verify the user's identity. Can anyone provide a sample or point me to a simple working example of doing this with the ...
0
votes
0answers
35 views

Using static Create() methods with delegates in abstract base classes in C#

I am attempting to write an extensible graphing calculator program, in which individual components can be extended or replaced as needed without changing other components. I create a DLL containing ...
-1
votes
0answers
8 views

Touchscreen Controlled Cursor Interface

I conceived the recently issued US Utility Patent 8,786,569 to correct what I see as the fundamental, and unnecessary, limitations of iOS and Android. Both are based on a single blunt image-blocking ...
-1
votes
0answers
31 views

Is login a use-case for a user of a system?

I've been researching since my last project last semester and I haven't found a definitive answer for this question. Now I've got one more project to draw a Use-Case diagram and I'm still confused ...
0
votes
0answers
19 views

Is it safe to only use intval to sanitize user input for a database select?

Is it safe to only use intval to sanitize the user input for a database select, as in the following example? $id = intval($_GET['id']); $query = "SELECT * FROM table WHERE id='$id'";
-3
votes
0answers
15 views

how to create channel with backbone.radio,any example? [on hold]

I want create a channel which will fetch the data from a url (kind of global data). other models will use channel to get the urls by calling channel.reply(). Any input or guidance will be apperciated. ...
0
votes
1answer
26 views

Ext JS - open source license (GPL V3) on client and closed source on server - Does the server-side have to be open source in the end?

First, yes, I understand that you are not a lawyer and that you cannot give me legal advice. I swear I will not hold you accountable for any responses you may give, yada, yada, yada, etc, etc, etc. ...
0
votes
0answers
14 views

Simpler way to connect to a DB with NodeJS

Connecting to any DB with Java is very simple - I just need the appropriate JAR in the classpath. Alternatively, steps involved in installing any of the (example) Oracle drivers for NodeJS are very ...
1
vote
1answer
37 views

Should I automatically install needed modules?

I'm writing a program for my grandpa. Occasionally an update will require a new module that's not installed on his computer. I don't want to have to manually install new modules every time, but he's ...
-1
votes
0answers
44 views

How to convince a developer that inline and mixed JavaScript/PHP code is bad?

This code snippet is from a teammate of mine, his title is "Full Stack Developer". He mostly write PHP code. I found this code at the end of a .php file and asked him to move it to a separate JS file ...
3
votes
1answer
23 views

How can I get the transit time for packets for a jitter buffer?

I'm trying to wrap my head around the concept of a real jitter buffer. I'm basing the only knowledge that I have around this article: http://toncar.cz/Tutorials/VoIP/VoIP_Basics_Jitter.html This ...
3
votes
1answer
49 views

Improve bisection method or alternate algorithm for efficient determination of text font size to fit in a box

I need to find the font size of a text that fits in a box. Given my current font size, I can get the bounding rectangle of the text. If I set some arbitrary min and max font size, I suppose I can ...
15
votes
9answers
2k views

Is testable code better code?

I'm attempting to get into the habit of writing unit tests regularly with my code, but I've read that first it's important to write testable code. This question touches on SOLID principles of writing ...
0
votes
0answers
32 views

How to authenticate against an API?

In a enterprise distributed system, a user of a web portal can sign into one site, be redirected to a federation provider. Once they log in with, for example, a facebook account, that user is ...
0
votes
1answer
19 views

How to trace an image/char on mobile device using c# and/or xamarin

If I had an image outline (or font character outline), how would I go about calculating the accuracy of somebody tracing that image. I was thinking that I could get the RGB components of the person's ...
1
vote
2answers
169 views

When to use single-line if statements? [duplicate]

When reviewing code, I prefer to read if statements that explicitly demonstrate that a fork in code execution may occur: if ( isFoo(baz) ) { runBar(); } When scanning hundreds of lines of the ...
2
votes
1answer
27 views

Storing exception information as a member variable for query later, bad practice? [duplicate]

I looking at the best way to handle exceptions, the answer to this question may be to handle the exception in a different place or to not handle to exception at all but to control the flow of the ...
1
vote
1answer
61 views

How valuable is decoupling in proprietary software?

When developing with Symfony2 PHP framework I often see reccomendations to decouple code but most of the time that is accompanied by a 'if you want to release as a third party bundle'. Which begs the ...
0
votes
1answer
25 views

Using sourcetree/bitbucket how can I manage multiple projects using a common codebase?

I have made a few libraries that different projects use. When I make changes to projects, I sometimes make changes to the codebase, and I want to be able to manage this all through sourcetree. So, ...
-5
votes
0answers
37 views

What is the knowledge required for kernel/OS development? [on hold]

Background: I just started coding as a beginner with Python and I'm getting the hang of Git version control. I just want to know What knowledge one needs for development or branching off from a ...
1
vote
2answers
112 views

Java: using final keyword only on method parameters that expect immutable objects?

I came across the interesting topic about final method parameters and that they essentially don't provide much advantages. I wondered if it would be sensible to mark only those method parameters as ...
1
vote
0answers
55 views

Python Classes and Design Questions

What is the best way to design a class to see if an update occurs on a property? I have a whole bunch of classes, and current am going through a re-design of the python package I created. ...
2
votes
3answers
54 views

Recommended HTTP status code for “plan limit exceeded” response

I'm designing a REST API for a project where users are always on one of several "plans" - each plan defines some resource limits, such as the max number of users an account may have or the max number ...
1
vote
1answer
162 views

Inserting C++ code into C

What I need to do before inserting C++ code into C, and how to do it? Are there any examples to show me how this can be done. I have a good knowledge of C, but never mixed those two. Thanks for the ...
2
votes
2answers
41 views

How to create a 2D array at runtime in Ada?

In Ada programming, What is a best practice way to create a 2D array of a size that is specified by the user? I'm teaching myself Ada for work (after many years of C programming), and I'm having ...
1
vote
1answer
48 views

Android & OutOfMemoryError: Possible causes besides memory leak?

In my application I keep receiving crash reports where the root cause is an OutOfMemoryError. The app is quite image heavy (I use Picasso for all the image loading) and also has a WebView component ...
2
votes
2answers
77 views

Best way to synchronize data between two different databases

I have to implement data synchronization between two big databases which have completely different structures. Basically, I need to grap some data about products in different tables in the first ...
-5
votes
0answers
34 views

Unable to hit on java controller [on hold]

home.html <div class="container"> <form th:action="@{/login}" method="post" role="form"> <center><h1 class="text-muted">WELCOME TO ABERDEEN AMS ...
-4
votes
1answer
38 views

Understanding of Component Object Model [on hold]

How can i understand Component Object Model from basic with out any programming knowledge? I tried very much to understand COM through wikipedia. But all i have got is disappointment. I can't ...
-3
votes
0answers
47 views

is it an implementation issue or a bug? [on hold]

As much as I know compiler must give an error of incompatible types, as Object Class is parent of all classes, so the statement Parent c2 = new Object(); must be erroneous, but compiler didn't give ...
1
vote
0answers
35 views

Character or symbol for representing cast opperation [on hold]

I'm writing visual programming language (before you leap to judgement, check it out: thinkVPL.org) and I need a symbol to represent the type-cast operation (converting data from one type to another). ...
3
votes
0answers
65 views

Is there a language for defining restful web services? [on hold]

I'm implementing a restful service automation tool for client applications. Basically, the tool takes a config file that defines restful resources, and creates some DTOs and resource classes for ...
0
votes
0answers
42 views

Java calculator - binary calculations converted into hex/decimal ones and vice versa [on hold]

Over the couple of days i made a very simple calculator in java, which was basically just adding/substracting/etc. two numbers. The two values where stored in double variables, as well as the result. ...
1
vote
0answers
130 views

Java Generics: how to extend a self referencing class?

Assume this type hierarchy: Interfaces Node: Basic graph node TreeNode: Node of a tree graph, extends Node PrintableTreeNode: A node which can print itself too! Concrete implementations ...
0
votes
1answer
46 views

What to do about complex business logic based on many options

To preface, I think this problem would be easier to understand if I gave an example: How does a complex tax evaluation application manage multiple tax laws and personal situations? I inherited a web ...
-5
votes
0answers
13 views

Why does next(some_generator_func()) yield a different result from next(a_var), where a_var = some_generator_fun()? [migrated]

Let some_generator_func() be the function: def some_generator_fun(): yield 1 yield 2 Why is it that >>>>next(some_generator_func()) 1 ...
1
vote
0answers
78 views

Software Design, Generic Programming, Physical Devices, and Algorithms in C++ [on hold]

I often have data that in some contexts I want to handle uniformly, but in other contexts I wish to differentiate it. For example, I could have a vector that is series of angles or a series of ...
0
votes
0answers
49 views

Will this data mining approach work? Is it a good idea?

I need to extract fields like the document number, date, and invoice amount from a bunch of .csv files, which I believe are referred to as "unstructured text." I have some labeled input files and will ...

15 30 50 per page