0
votes
1answer
77 views

How do binary trees use memory to store its data?

So I know that arrays use a block on contiguous memory addresses to store data to memory, and lists make use of static arrays and when data is appended to the list, if there is no room, a new static ...
-4
votes
0answers
23 views

I want to rotate,scale and move multiple imageview in single Activity [closed]

I have used this tutorial for imageview rotation,scaling but issue is that This code is useful for single imageview. I want to do it for multiple images. Outside of imageview's image touch also ...
0
votes
3answers
81 views

Would it be possible to create a language similar to Ruby/Python with static typing that had the speed/memory usage of a compiled C program? [on hold]

One of the main drawbacks of Ruby/Python is performance. I understand that they are interpreted and C is compiled. (And there are things like JRuby which do JIT compilation with Ruby). But they never ...
0
votes
1answer
54 views

JS Asynchronous Load Pattern

This is a specific problem but I believe the pattern here may be general enough to be useful to the audience here. I'm working on an offline JS application. In my JS application, I would like to run ...
3
votes
1answer
81 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
vote
0answers
25 views

Working with list of objects in a Sequence Diagram [on hold]

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 ...
-3
votes
0answers
19 views

Visual studio list/search for partitions [on hold]

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 ...
-6
votes
0answers
36 views

Make a gui for the windows command line function junction point [closed]

I want to make a GUI for command line function junction point basically for this command mklink /j D:\Docs E:\Users\Kari\Documents SO instead of going to command line and typing the DIR's the ...
3
votes
1answer
44 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
54 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 ...
0
votes
1answer
67 views

What would this interface be called? [on hold]

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 ...
2
votes
1answer
45 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
16 views

Using SAML with Python (client application) [closed]

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
69 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 ...
-2
votes
0answers
16 views

Touchscreen Controlled Cursor Interface [closed]

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 ...
0
votes
1answer
55 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
27 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
17 views

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

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
37 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. ...
-1
votes
0answers
21 views

Simpler way to connect to a DB with NodeJS [migrated]

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
52 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
69 views

When should mixed PHP/JS snippets be refactored into a separate JS file? [duplicate]

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
28 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 ...
4
votes
1answer
84 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 ...
75
votes
12answers
9k views

Is testable code better code? [duplicate]

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
1answer
68 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
21 views

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

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
votes
3answers
382 views

When to use single-line if statements? [on hold]

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
29 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
73 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
26 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, ...
2
votes
2answers
161 views

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

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 ...
2
votes
1answer
92 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
65 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
203 views

Inserting C++ code into C [closed]

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

How to create a 2D array at runtime in Ada? [on hold]

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
70 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 ...
0
votes
2answers
99 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 ...
-4
votes
1answer
38 views

Understanding of Component Object Model [closed]

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

is it an implementation issue or a bug? [closed]

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

Character or symbol for representing cast opperation [closed]

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

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

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

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

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. ...
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
87 views

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

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
58 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 ...
-4
votes
0answers
32 views

Best design for a SQL API - no antlr please [closed]

As a programming exercise, I'd like to explore creating a simplified sql like api to query csv files. Parsing the files is no problem. My concern is with design. What's the best way to design the SQL ...
2
votes
0answers
139 views

How does one cycle back to previous options in a C# console application? [migrated]

To say I'm fresh off the boat would be an understatement. I think this solution is extremely simple for an experienced programmer, but I'm completely new to C# and coding in general, so I apologize if ...
8
votes
2answers
433 views

Is automatically generating passwords during registration a good idea?

I'm developing a registration system for a project I'm working on. Since users tend not to sign up if the process is too long, I've thought to require (at least initially) just their email, where I ...

15 30 50 per page