Top new questions this week:
|
Is there a more elegant way than the following to check if two numbers have the same sign?
bool sameSign(int num1, int num2)
{
if (num1 > 0 && num2 < 0)
return ...
|
To preface this post a little bit, I'll explain a little bit of the "backstory" here. The Stack Exchange site, Gaming.SE, also known as Arqade, often has a large influx of bad questions about the ...
|
I have been practicing backtracking and I wanted to know how I can improve my code. For eg, I don't want to use global. Also, have I am not sure if my code will work for all the cases.
# Given two ...
|
I just started learning Java about a month ago. I'm wondering, what would an experienced developer do differently in the code below? As I learn to code, what direction should I be pushing myself?
I ...
|
This is a C# programme to convert Brainfuck to C#, then convert that C# to a .exe. So basically, it's a Brainfuck to Windows exe file converter/compiler.
This requires any of:
.NET 2.0 in ...
|
I am getting two different lists of members, then if certain conditions meet, I add more members to the list before converting into an array.
Is there any way this could be improve? I guess we can ...
|
I wish to use this sample to make my code more readable. Could you share with me your ideas on method naming, variable naming, if-statements etc.
It would be great if you have any URLs.
private ...
|
Greatest hits from previous weeks:
|
I am pretty new to Swift, as a solo developer I was wondering if somebody could pass comments on the singleton implementation below. The code does work, but being new to Swift and knowing that there ...
|
The use case is to convert an array of objects into a hash map where one property is the key and the other property is the value. Common case of using this is converting a "link" object in a ...
|
Can you answer these?
|
I am trying to build a multi page form widget with React for a website inspired by this. Since quite some time has passed since I last touched JavaScript, I'm directly adapting to ES6/7 and tried to ...
|
I recently read an article in which the authors present Algorithm 1 to compute a simultaneous confidence interval. I was interested in implementing Algorithm 1 in R here. The algorithm is freely ...
|
I wrote code that takes csv and export it to sql table. It looks like this:
def import_to_temp_table(table_name, filepath)
headers_with_type = headers_for_temp_table.map { |x| x + ' text' ...
|