0
votes
0answers
61 views

How to return Java object from REST service jersey

I have spent days trying to fix a problem. I have a REST method that accepts a Java object, does some calculations through a rules engine (Drools) and return another Java object. The rule engine ...
-3
votes
0answers
24 views

Does DropBear support ssh key revocation?

I m using Dropbear as a server of ssh in my embedded system. I want to know if DropBear support ssh key revocation? if yes how How I can do it? https://en.wikipedia.org/wiki/Revocation_list
-3
votes
0answers
22 views

Can I change the widget structure of JavaFX base screen? Please see the attached image.

In the left side is the default one. But I want something like in the right side. Instead of rectangular widget, I want a custom shape one. Is it possible in JavaFX. If that is not possible in ...
1
vote
1answer
143 views

what is this kind of object creation?

final CyclicBarrier cb = new CyclicBarrier(value,new Runnable(){ public void run(){ ...statements } }); suppose you have a cyclic barrier in which one of the the arguments is the direct ...
0
votes
0answers
59 views

Should Rails views actually render anything?

I've joined a Rails app with hundreds of pages and no tests, first thing I've done is set us up with model-, controller- and feature-tests and I'm adding them as I work on areas. One thing I'm ...
0
votes
0answers
28 views

Is it better to add all the properties you might need in a map beforehand?

I am writing a small piece of code in Groovy where I have a bunch of methods which I call actions, each doing something specific. Most of them can be combined in a sequence to achieve an overall ...
0
votes
0answers
21 views

ERD for a Lab Database

Question: In a database for a clinical reference lab a specimen, when taken, triggers a test order (for testing obviously) creation.If that test order produces a failure, the specimen is given a new ...
1
vote
3answers
81 views

Can I sell an application under the GNU Affero General Public License (GPL)?

I am using GhostScript on a desktop application that I intend to sell online. The GhostScript library has an AFERO license (see here). I do not mind to make the source code of my application available ...
49
votes
11answers
7k views

Are magic numbers acceptable in unit tests if the numbers don't mean anything?

In my unit tests, I often throw arbitrary values at my code to see what it does. For example, if I know that foo(1, 2, 3) is supposed to return 17, I might write this: assertEqual(foo(1, 2, 3), 17) ...
52
votes
8answers
8k views

Are events only used for GUI programming?

Are events only used for GUI programming? How do you handle in normal backend programming when something happens to this other thing?
66
votes
7answers
7k views

Are stacks the only reasonable way to structure programs?

Most architectures I've seen rely on a call stack to save/restore context before function calls. It's such a common paradigm that push and pop operations are built-in to most processors. Are there ...
2
votes
2answers
191 views

Do any languages other than Haskell implement strings as linked lists of characters?

Haskell’s String type is an alias for [Char] (i.e. a linked list of Chars). Does any other language use an implementation of strings like this?
-1
votes
0answers
27 views

Linking visual studio with stack overflow [on hold]

When an exception is thrown in visual studio it provides sever web links from the MSDN website. The objective of my query is to know is it really useful to provide web links from stack overflow ...
0
votes
1answer
161 views

What is the opposite of UI?

I'm trying to find a good name for a library where I can put in all non-UI related code that I want to share between iOS apps (networking, filesystem, logic, algorithms, data structures). Names that I ...
-3
votes
1answer
66 views

Trying to create simple quiz in c++ [closed]

I'm trying to create a simple quiz in c++. I want it to be word based but I'm not sure how to do that so I have decided to do the same layout as I did before(when I wanted it to be a word based quiz). ...
0
votes
0answers
102 views

Best way to spawn enemies with independent (x, y) positions?

I am trying to spawn simple GRect enemies on different (x, y) positions, although, the problem is that I need the enemies to operate on different movement speeds. while(true) { enemy[i]....
0
votes
0answers
21 views

Background layer for e-mail actions

My application features an e-mail layer (IEmailHandler) that implements various protocols (via IImapHandler, IPop3Handler etc.). Now when the user logs in, we fetch all their e-mail accounts (could ...
0
votes
0answers
44 views

Converting a 1D character array to a 2D array in random order.

I define my character array (9 items) as the following: char arr[] = {'a', 'c', 'b', 'z', 'k', 'l', 'j', 'o', 'd'} From this array, I would like to create a 3x3 array, in which the characters are ...
2
votes
3answers
87 views

Is there a way to infer a task's cost using Story Points or something else in Scrum?

We are a bunch of freelancers working together making websites and apps and we starting using Scrum recently. We're enjoying Scrum and its transparency but we're encountering a problem with the budget ...
0
votes
0answers
41 views

Export a method vs using a boolean property in a class?

I am writing a base class with common code for several Web sites. Two of these sites have mobile support. Should I create (constant) boolean object property mobile_support and write if(site->...
-1
votes
1answer
60 views

Theoretical vs Practical knowledge [closed]

I'm a freshman in a Computer Science academy. Every semester there are a lot of different classes like Discrete Math, Linear Algebra, Algorithms etc most of which I find very interesting. Unfortunatly ...
1
vote
1answer
51 views

Choose “representative” subset out of a set of points

So I have a set of given locations (i.e. two-dimensional points) G, a set of wanted locations W and a natural number N. Assume |W| < N. I want to choose N elements of G such that the elements of ...
0
votes
0answers
48 views

how do I make sure I receive modified versions of my GPL software

the What is free software page on the gnu.org web site states among others: »An example of such an acceptable rule is one saying that if you have distributed a modified version and a previous ...
-2
votes
1answer
125 views

Is it better to learn a new language or a high level application of a known language [closed]

Recently I got chatting with my C# .NET professor and mentioned that over my free time I was learning Rust and it's been very interesting. To this the prof suggested me to not waste my ...
28
votes
6answers
7k views

Thousands of errors!

I was assigned to a new project recently. Well, an old project actually, written in classic ASP. Now a new version of the application is being written in the latest ASP.NET, but it's not expected to ...
4
votes
3answers
70 views

GET resource state with JSON body or HTTP code

I want to provide rest api for my iot service to read state of a sprinkler on/off. So far I've come up with two solutions: GET /api/sprinkler that returns 204 if on and 404 if off GET /api/sprinkler ...
4
votes
2answers
149 views

How am I supposed to add tests for all my projects?

I have been teaching myself how to code for about a year (I'm 17) and one of the most common things that I've come across while reading articles about programming is automated tests for your code. I ...
2
votes
3answers
105 views

Why aren't properties implicitly convertible to delegates

We all know that properties in C# get compiled to actual plain old methods. But unlike method(-group)s, they can't be given as arguments to other methods excepting a delegate like a Func<T> or ...
2
votes
1answer
107 views

What are the important considerations when switching from monolithic to microservices architecture in .NET?

We are contemplating breaking up our monolithic monsters into microservices based architecture progressively. We have 5 teams, each team containing 2-3 C# developers, at least 1 database developer, ...
4
votes
3answers
162 views

Role and importance of static method in OOP

Background Thinking about OOP I feel that it binds data and behavior together, taking the real world example we already have array data type which is a collection of homogeneous type but in Java we ...
0
votes
0answers
22 views

Java Drag and Drop, registering certain parts of the object

Say I have an application where the use creates an electrical circuit visually, how would I go about registering when two ends meet? I've seen this thread http://stackoverflow.com/questions/8562743/...
0
votes
1answer
69 views

What's the best way to popullate a new row in a database?

Is it possible to add a new row to a database using DataSet, because when I created a new dataSet and dragged the table from the database I could see that in the dataSet methods there was one called ...
1
vote
1answer
51 views

Send messages from multiple services/application and display them in one place

Inside system I'm developing I have several Windows Services, couple of applications running in Scheduler and COM+ application that is running my custom DLL's. Some of them are running on same PC, but ...
0
votes
1answer
25 views

js spa rest backend business logic vs presention logic

I am very confused about what should a SPA's REST backend do and expose. In most blog posts and books I read they depict the backend pretty much like a direct access to the DB, practically CRUD ...
5
votes
2answers
94 views

Refactoring: Self invoking function instead of Extract method ?

I'm reading the 'Refactoring' book, and i'm at the "Extract method" technique: Original code: void printOwing() { printBanner(); //print details System.out.println ("name: " + _name); ...
2
votes
3answers
118 views

Writing a #define for a common statement

Often when I program in C I write the expression for (int i = 0; i < j; i++). I never wrote a macro or a define expression, but could I write a #define to simplify the above expression so that do ...
0
votes
2answers
107 views

Private fields and encapsulation

I'm reading the head first c# book and don't quite understand what this means. "Any class can see private fields in another instances of the same class"
1
vote
1answer
26 views

What is a simple way to store data for word count purposes?

I am writing a program to crawl the web and find frequently used words. What would be a good way to store the data? I was thinning of using an RDBMS with a single table (with columns 'word' and 'count'...
4
votes
0answers
56 views

Branches, builds, releases and multi-platforms

I'd like to check what best practices are avail out there. I have the following requirements: I have a repo which is used for development (master and develop branches). I would like to keep track of ...
8
votes
4answers
258 views

According to Demeter's law, is a class allowed to return one of its members?

I have three questions concerning Demeter's law. Apart from classes which were specifically appointed to return objects - such as factory and builder classes - is it okay for a method to return an ...
2
votes
1answer
100 views

Different ways of array declarations in C#

What is the difference between the following two methods of creating an array in C#: int[] arr = new int[] { 1, 2, 3 }; Array arr = new int[] { 1, 2, 3 };
3
votes
1answer
115 views

Why my Neural Network Accuracy is 100%?

I wanna ask about Neural Network. I have a research and programming about Neural Network using Backpropagation algorithm for prediction. My input data using binary form. But, i'm still confuse, ...
-1
votes
0answers
42 views

How to send an email attachment from form using codeigniter

Can anyone help me about how to send an external file attachment directly from form type="file" through the mail using PHP Codeigniter.
-1
votes
1answer
30 views

Language cross platform that allows different socks connection per thread

Hello i'm developing an app that needs to do many requests with different socks connections. I was doing it in C# but i'm not sure how well it will work on a linux server even with .net core . Java ...
2
votes
1answer
61 views

How do I determine correctness of a codes complexity?

Given a piece of code, I may use one of many methods to determine the big O complexity of the code manually (runtime and memory). But, for a given piece of code, how do I determine whether what I ...
0
votes
0answers
46 views

Making DAO's independent on each other

I have these two classes (Getter/Setter/Constructor omitted): public class Company { private String name; private String adress; private List<Employee> employees; private Uuid ...
0
votes
0answers
16 views

Randomly sampling chunks of a tree

I have a (non-binary) tree from which I want to sample various leaf and non-leaf nodes semi-randomly. The tree is generally less than 50 leaf nodes in all. The criteria for sampling is somewhat fuzzy ...
-1
votes
1answer
142 views

How to signal a loop to continue the execution instead of using sleep

I am trying to create a thread that will sit and wait to detect new objects in a vector (the queue). Using a loop will crush the resources on the given machine, so I am trying to figure out how I can ...

15 30 50 per page