-3
votes
0answers
39 views

Trying to run RSelenium (Windows 7/ Mac OS X) [closed]

I am trying to run RSelenium in both Windows 7 and Mac OS X. I have read through some simple how-to guides for RSelenium and when I repeat their code, RStudio throws the following warning/error ...
0
votes
0answers
40 views

Securing HTML/JavaScript only web app / JAX-RS Backend [closed]

I am prototyping a small web app where the frontend will be a pure HTML+JavaScript+JQuery which consumes services from a JAX-RS backend. The application has started to have a shape now but I find ...
3
votes
1answer
52 views

How to deal with relative paths in out of source build?

An out of source build is a build which can be in any directory other than the source directory I have a project which contains relative paths to some resource files, needed at runtime, which are ...
1
vote
2answers
97 views

Is it considered good practice to use mutables this way? [closed]

Lately I came across a way of using mutables which I had not thought of before. Let's say you have a list comprehension which calls a method, and you put the result in a list like the following ...
-3
votes
0answers
49 views

How do you make a graphical commit diagram? [closed]

Sometimes on StackExchange I'll see posts involving pretty looking commit diagrams, like the following: Question: Is this part of markdown on StackExchange? Or is there some other way people are ...
-2
votes
0answers
19 views

Programmatic Word 2007 document generation - use content controls or not? [closed]

Is there a benefit to using plain text content controls in Word as simple place holders for dynamic content? It seems to me that it would be easier to just use a simple token syntax and store the ...
0
votes
1answer
43 views

IBM Jazz: what are Streams?

I'm trying to make sense of IBM Jazz. I'm trying to figure out what it is, and what it isn't. "Streams" have been giving me trouble. From IBM's online library: The stream is similar in concept ...
2
votes
3answers
283 views

Why Session has implemented this way in Asp.net

I'm not a Asp.net/C# developer myself but recently had to slightly refactor a Asp.net/C# project and I had to use Session at some point. When working with the session, regardless of the data type that ...
-3
votes
0answers
35 views

I am misunderstanding a jQuery array [migrated]

This code doesn't work var next = $("#orders").find(".next"); if (next.length == 1) { var address = $(next[0]).find(".directionsAddress"); var destination ...
0
votes
1answer
78 views

How to design resilient web service clients?

I am writing an app that is supposed to talk to a web service. Let's say it's a chat app. It would need to receive a stream of new messages (so that they are pushed to the interface as quickly as ...
7
votes
2answers
161 views

Cross-language Test-Driven Development

The short question: How do you follow Test-Driven Development on a project that spans multiple languages? Specifically, I'm writing a web application that uses JavaScript and PHP, and I want to ...
-4
votes
0answers
55 views

How do you put an image on a website using HTML code? [closed]

I am trying to learn web development. Right now I'm learning how to put images on websites using HTML code. My textbook and my online course both gave me the HTML code for putting images on ...
0
votes
1answer
58 views

Where should I put my key? [duplicate]

I have a Private Key that is regularly used to decode incoming files during off-business hours as part of an automated process. Currently, it is stored in the application code itself, and only ever ...
-4
votes
0answers
19 views

how to design dynamic database for website form maker like google form ? [closed]

I want to design a database for a site like google form , The question,can I make my answers table to dynamic table ? Because there is more than one type of answers To impose example:text answer ...
-3
votes
0answers
40 views

Algorithm for base conversion of arbitrary length number [closed]

Is there an efficient algorithm to convert arbitrary length number (stored as an array of digits) from one base to another? For example, base-10 number {3, 1, 9} to base-9 number {3, 8, 4}? I can ...
2
votes
2answers
133 views

Refactoring wordy conditional tests [duplicate]

My first attempt at this question was too theoretical, so I've rewritten it with actual code. See the edit history if you care. Supposing this logic, "suffering" from the arrow anti-pattern: /** ...
-3
votes
0answers
29 views

Should I use a private setter or readonly property when I build a custom attribute? [closed]

I have created the following custom attribute: Public NotInheritable Class DataItemAttribute Inherits System.Attribute #Region "Constructors" Public Sub New(ByVal in_IsDataItem As Boolean) ...
0
votes
1answer
24 views

Configuration file for a generic log file parser

Our company uses multiple log file formats. We would like to develop a series of tools to parse them, often the same core functionality for multiple log file formats. A classical example is ...
3
votes
2answers
172 views

Converting static utility class into singleton

In company where I work we have lots of "utility" classes, each has lots of code inside (thousands of lines), and they are all static. And one static methods call anothers. The problem here is that ...
-2
votes
1answer
43 views

How to unit test access to a external service's client? [closed]

Say I am writing client for an external web service (like openweathermap). How should I unit test that? Say I have a class like : class WeatherClient { ... public Weather getCurrWeather(String ...
0
votes
1answer
34 views

Thread synchronization for multiple threads accessing a message stream

My project has a single message stream (communicating with an external device) which is accessed via multiple client threads. The workflow is: There is a thread (the "messaging thread") which reads ...
-1
votes
0answers
46 views

Unit test framework dilemma [closed]

Until now, our company uses Google test for unit testing. Now we are developing, let's call it an add-on, which will interface with our existing product, but which we also want to keep generic enough ...
0
votes
0answers
30 views

Naming conventions for services, factories, decorators and composites [closed]

When naming services I have seen some projects where the postfix Service is used sometimes and sometimes not within the same project. For example ProductService and PaymentProcessor. Do you have any ...
1
vote
0answers
30 views

Promise in Web MVVM

In MVVM (or Presentation Model), my (web) view listens to a CLICK event and calls a function of the Presentation Model to ask for the result. To clarify, the presentation model lives browser-side. ...
2
votes
1answer
53 views

Does HTTPS prevents man in the middle sending the same message several times [duplicate]

If a User is exchanging messages with a Server over HTTPS, could a man in the middle intercept messages and send them several time. For instance, George orders a laptop on a https e-commerce, could ...
1
vote
1answer
70 views

“Is a” relationship or, in other words Inheritance

Say I define an interface IAnimal which has a pure virtual (abstract) method called eat like this: class IAnimal { virtual void eat(Food*) = 0; }; In the future I inherit form IAnimal and create ...
-3
votes
0answers
16 views

Database and packages for create investment model [closed]

I have a question concerning the package " XTS ". What is the optimal databases format for cooperation with "XTS"? More precisely - what is the recommended database format used for cooperation eg ...
1
vote
4answers
178 views

Strategy pattern and “Is a” relationship

Imagine, I have class IAlgo which is an interface. I have derived from him and implemented his single method called matchCount in different implementations - AlgoA1, AlgoA2, AlgoA3, AlgoB1, AlgoB2. ...
1
vote
2answers
49 views

Operations Job Queue Strategy

I am working on an application that requires manual approval of requests put in by customers. Now lets say there are 10 people involved in this operation and each of them has a webpage in front of ...
-4
votes
0answers
69 views

How does HashSet in Java remove the duplicate elements [closed]

I know that the HashSet consider whether to add the element by checking if there is any equal one to prevent duplication. This is done by checking the equals() and hashcode() function. However, I am ...
-1
votes
1answer
63 views

When to log an issue vs just fixing it? [closed]

When using a source control system for personal projects that are currently only used by yourself, but which are public and so COULD be looked at by other people, how strict should you be about ...
0
votes
0answers
22 views

Why does this code take up so much memory? [migrated]

I created a solution to this problem on leetcode: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes ...
3
votes
2answers
138 views

Why does Python's math.ceil return a float?

While I understand that the difference between integral and long values is blurred in Python, the difference between floats and integral values is not. Therefore, I'm having a difficult time ...
1
vote
3answers
192 views

Is it ok if a method returns a new instance of the class it's in?

I have a class called MyClass and a method called Get that looks something like this: public class MyClass{ string ClassVariable1 {get; set;} string ClassVariable2 {get; set;} string ...
1
vote
0answers
41 views

One or multiple visual studio solutions for all my projects [duplicate]

Admittedly that's a bad title, but the full title would be far too long. To give some context. I volunteer at a charity where I maintain a MSSQL Database and an MS Access client application and I'm ...
2
votes
1answer
175 views

Refactoring a god Manager class

I am running in the exact problem Robert Martin mentioned when having a class named Manager, mine has too much (redudant) code. I am writing a system doing computations on many buffers containing ...
4
votes
5answers
670 views

Checking array size in C/C++ to avoid segmentation faults

So it's well known that C does not have any array bounds checking when accessing memory. Nowadays, if you call myArray[7] when you initialised it as int myArray[3], your program will get a segfault ...
6
votes
1answer
136 views

UI Design patterns for non-screen based project

I'm working on a small project coded in Python that uses a single button for input and a RGB LED as feedback, which responds to button presses and asynchronous events from the network. As the ...
0
votes
4answers
213 views

How to represent an algorithm as a class?

I am trying to understand how to design classes which take an input, do some processing, and return a result. More specifically, should the object store the intermediate results between function calls ...
3
votes
3answers
103 views

How to handle time based events in web application backend?

I'm currently working on design of small web service, and I have a following feature (simplified): After some user actions, there is a wait period (ranging from 30sec to 40h) and after it's passed, ...
4
votes
0answers
71 views

How to abstract from a display?

I'm building an embedded text editor consisting of a keyboard, an LCD display and a PIC32 microcontroller, to be programmed in C. The application should look, for example, like the GNU nano editor. ...
0
votes
0answers
48 views

Dll that uses services from its caller [closed]

I am making simulators with graphic engine based on c++. I decided to make a dll for shells/bullet shooting for the use of the simulators. The thing is that the dll need information of the terrain ...
0
votes
1answer
150 views

What is an efficient data structure for syntax highlighting in text editors?

I'm creating a very small text editor in C++ with the ncurses library. So far, it works great. I have implemented the Gap Buffer data structure to make the editing more efficient than a line-based ...
0
votes
0answers
15 views

Using Simile widget timeplot to overlay events on discrete data [migrated]

I was given the task of finding a way to graph my company's manufacturing data from each batch of material (specifically density) with an overlay of process changes in some sort of timeline format. It ...
2
votes
1answer
74 views

Testing async code: are long sleeps acceptable?

I am testing some AngularJS code using Selenium. Angular updates the DOM in unpredictable order, sometimes completely async (via setTimeout), so it is difficult to know when the DOM has been ...
6
votes
3answers
446 views

Is using hashes for primary keys a good idea?

The Austrian electronic ID card relies on the so-called sector identifiers. For example a hospital gets to identify a person by getting a sectorId for that person, which is computed roughly as ...
0
votes
0answers
58 views

Execute a method upon loading a class [migrated]

I need to have a static constructor. I was always wondering why there is no support for this functionality. I need to run a function once when the class is loaded, currently the way I've seen it done ...
1
vote
1answer
79 views

Best approach to setting up test and production environments for a new project [closed]

We're a very small team of not very experienced programmers who just started a decently big project from scratch. We're using Visual Studio 2015, SQL Server 2008 and the Entity Framework. The company ...
2
votes
2answers
109 views

Restful User/Password Authentication

I'm currently designing a REST-API with the following properties: Backend for a single page application (Later Apps) Integrated user database for each instance HTTPS/TLS only Authentication with ...
-4
votes
1answer
48 views

Commercial use of an open source software [closed]

I can sell a software which uses an open source library as long as I provide the source of this software with the binaries. Can I make the source available only to those who bought the software? ...

15 30 50 per page