« first day (2334 days earlier)      last day (1673 days later) » 

12:00 AM
RELOAD! There are 6161 unanswered questions (90.0811% answered)
 
 
1 hour later…
1:01 AM
If you believe the code works, and you're looking for advice on whether you wrote it well, Code Review is the appropriate place to post. — Barmar 42 secs ago
 
1:47 AM
-1
Q: I was given an assignment on writing a javascript ES6 program for vehicles. Am I writing this correctly? Any advice or tip?

Wade JohnsonI'm taking an online course in website development and we're going over JavaScript ES6, but my professors lecture and notes I've taken we're not very helpful more resourceful with the assignment I was given. Using proper ES6 methods, I was asked to create a class for Vehicles and two Subclasses f...

 
Your question seems to be both about compacting, and an incorrect result. It might be easier to get an answer if you focus the question only on the incorrect result. You could use Code Review SE for the compacting bit, as it's off topic here. Maybe add some test cases? — Redwolf Programs 13 secs ago
 
2:47 AM
0
Q: Decode ambiguous morse code

MCloudLannStumbled upon this interview question: Given a morse encoded sentence with no spaces or separation between letters or words and a list of words contained in the message, decode it. This was my solution (and a test case with the jack and jill sentence): static String[] alpha = {"a","b","c...

 
3:26 AM
0
Q: From Python Luhn Generator to Javascript Luhn

M BPls help rewrite the code from Python to Javascript Luhn def luhn(code): code = ''.join(code.split()) summ = 0 code = code[::-1] for i in range(1, 17): symb = int(code[i-1]) if i % 2 == 0: symb *= 2 if symb >= 10: symb ...

 
3:46 AM
0
Q: SPOJ- The last digit Code works in all test cases, but not when submitted

COOKIEThe problem is to find the unit's digit of the b to the exponent of e. This code has worked for every taste case I've thrown at it, but it doesn't seem to work when I submit it. I can't find anything that would cause an error. int main() { int n, b, e, c; cin>>n; while(n--){ cin

 
4:17 AM
Monking
 
 
2 hours later…
6:29 AM
0
Q: My first Hangman game. It has many things right but I think it's a bit messy

Python NoviceThis is my first game and I'm really proud of it, but I think is horribly messy. Any way to improve it? #HANGMAN # Valid Word Checker def valid_word(word): ill_chars = ["!","@","#","$","%","^","&","*","(",")",",",".", " ","1","2","3","4","5","6","7","8","9","0"] for i in word: ...

0
Q: Setting Timeout For Scheduled Task In Java

BerkinI am trying to set timeout for tasks which executed by scheduler in Java. I managed to write necessary codes, they are working well but I guess something is not right. I have scheduler's thread pool so each thread can work with different tasks. Inside of the work, I get another thread from thre...

 
6:49 AM
0
Q: Factory pattern for creating plastic bank card machines

AnveI got project to do and I need to create program that creates file for specific embosser machine (machine that creates plastic bank card for example). I have 3 embosser machine and all of them creates different file. Every file contains card number, last and first name, address, etc. Difference b...

 
This question would be more appropriately asked on Code ReviewAndy Turner 7 secs ago
 
7:32 AM
@Volker, thanks. Can you please look at this code codereview.stackexchange.com/questions/229555/…. I put it in the Code Review, becasue it look like the better place for this question. Do you mean this approach when you were talking about different types? — demas 18 secs ago
This question is probably better suited for Code Review. — Lomtrur 17 secs ago
 
7:49 AM
0
Q: Error handling in Go

demasI have a function which returns an error. I would like to handle this error on the caller function, so I need to know the reason of the error in the caller function. Below there is my solution, but I am not sure, that it is ideomatic Go code and would be thankfull for any comments. Here is the ...

 
 
1 hour later…
9:00 AM
It worked, for some lousy definition of "work". It passed a test, maybe. Now you are doing a counter-idiomatic double checking, which technically works but it would get your code fail a code review. Are you familiar with the while (cin >> ...) idiom? — n.m. 27 secs ago
Oh, this is shocking, James Brown is a generic name for English men in our textbooks :D this extensionoguz ismail 18 secs ago
 
0
Q: Build a flat List from a Tree structure in Java

grimiI have a Tree structure represented by a List, which I want to get it flattened. I wrote the function below: List<Entry> flatTree(List<Entry> toFlat, List<Entry> destination) { for (Entry entry : toFlat) { if (CollectionUtils.isNotEmpty(entry.getEntries())) { this.flatEn...

 
10:33 AM
"Automation tests" is different to "code review". If you need automated tests you have them integrated in Visual Studio (and you can also use external testing Nuget packages). "Code review" if you are meaning "automatic code analysis" is also integrated in Visual Studio. Do note it depends on what VS version you have. — bradbury9 51 secs ago
This may be better suited to Code Review. — Jim Eisenberg 36 secs ago
 
11:10 AM
-1
Q: Get all unique combinations from two strings c#

BogdandarI am looking to get all unique combinations from two strings, for example: STRING 1: "OK" STRING 2: "OK" Desire output OKOK KOOK OKKO KOKO I couldn't find any useful information that can help me to get all unique combinations from two strings, only for one. Two mentions: I would like to ge...

 
11:30 AM
1
Q: Implementation of a Thread Pool in C++

NikosI wanted to implement a thread pool to test my knowledge of various modern C++ features. The end result could be better, but I need a review as I'm not sure about delicate things especially regarding synchronization and variable argument passing and of course recommendations on improvements of th...

 
I assume this is a better fit at codereview? — mplungjan 22 secs ago
 
@Mast I'm exploring the idea of adding more attributions to rules in meta posts. From this you can make a graph, and Gephi can show you where the tag clusters are. From the small amount I've looked at it, it looks somewhat promising, and has the added benefit of improving posts not just tags. OFC there may be a better way
 
 
1 hour later…
1:07 PM
0
Q: What to do with a post that feels like a blog entry?

IEatBagelsI've been following this question pretty closely, reading comments and everything because the "reasoning part" seemed... blog-ish. By reading this answer and the comments under it + the way the reasoning is worded, if seems like the author wrote this question only to write the reasoning part, th...

 
You should probably ask this on Code Review since it is 'working' code. — dandan78 21 secs ago
 
1:51 PM
0
Q: Simplify SQL query on percentage share of different groups in total

M3RSI could barely get this to work... It seems there is redundancy as the dates are repeated twice, for example. Is there a way to simplify it? WITH total AS ( SELECT COUNT(type) AS total FROM loan_loan WHERE loan_loan.created_at > '2019-08-15' and loan_loan.created_at < '2...

0
Q: Deep first search algorithm require performance boost

Ender LookI'm trying to resolve this kata from CodeWars. Kata exercise You are at position [0, 0] in maze NxN and you can only move in one of the four cardinal directions (i.e. North, East, South, West). Return true if you can reach position [N-1, N-1] or false otherwise. Empty positions are mark...

 
2:01 PM
This looks like a question for codereview.stackexchange.comjaco0646 28 secs ago
 
2:11 PM
0
Q: Earliest time frog can jump to the other side of a river in C#. Codility's task

newbieI'm new to C#, I programmed a little in java in the past.I had the two previous exercises reviewed here (permCheck, cyclicRotation, with a 100% score, just like this one), and I'm applying what the accepted answers contributed to me.Even though the site expects names like public int solution(int ...

0
Q: divide a range of numbers into groups of 10, 100, 1000, 10000 and so on

FrankfurterGiven a start and end of a range as string, for example: String start = "1230000"; String end = "1285999"; Generate the shortest list possible with prefixes that include the whole range, so that for any number from the given range there is a list elemnet which can be used as a prefix. For ab...

 
possible answer invalidation by Emma on question by Emma: codereview.stackexchange.com/posts/229509/revisions
 
2:51 PM
0
Q: Rank the students according to their marks

karthik kasukurtiYou are given the marks of N students in 3 subjects namely Data structures, Operating systems and DBMS. You have to rank these students. The criteria to rank the students is as follows. 1.Students with higher marks in Data structures will be ranked higher 2.If two students score same marks in Da...

 
3:11 PM
0
Q: Matlab Columns not Lining Up Right

wolfwolfwolfProbably a dumb question.... I'm trying to use Gauss-Siedel iteration in Matlab to show that the solution to a system of equations diverges, but when I run the program the solution columns aren't lined up right. I've tried different, uniform spacing ... doesn't seem to help. I think it's some...

 
3:23 PM
Monking
 
2
Q: IEEE 754 square root with Newton-Raphson

JL2210I have an implementation of the sqrt function that uses a combination of IEEE 754, packed bitfields, and the Newton-Raphson algorithm: union decompose { double f; struct decompose_s { mantissa m:52; exponent e:11; sign s:1; } __attribute__((packed)) o; }; dou...

 
3:45 PM
possible answer invalidation by JL2210 on question by JL2210: codereview.stackexchange.com/posts/229573/revisions
What is the question? If your code is working, this would better fit on codereview.stackexchange.com/ — nada 22 secs ago
 
@Duga discussed with reviewer, is ok.
 
This Question feels like a better fit for Code Reviewbfris 57 secs ago
@bfris Reviewing code not written by the author/maintainer is off-topic on Code Review — dfhwze 29 secs ago
This hub here is for specific questions and problems about how coding works. Codereview is for reviewing your working code, suggesting improvements and stuff. Testing or writing code for you would not fit on either platform. — nada 9 secs ago
 
4:17 PM
Monking
 
4:40 PM
possible answer invalidation by Frankfurter on question by Frankfurter: codereview.stackexchange.com/posts/229567/revisions
 
@Duga concurrent edit while an answer got posted, bit of a mess
answer got cloacked for the time being
 
5:12 PM
-2
Q: How can you change the margins in memory puzzle

Carla IHow can you change the margins in the memory puzzle game code to make them smaller so the game board is larger and easier to see? ( lines 18 &19) assert (BOARDWIDTH * BOARDHEIGHT) % 2 == 0, 'Board needs to have an even number of boxes for pairs of matches.' XMARGIN = int((WINDOWWIDTH - (BOARDWI...

 
5:32 PM
-2
Q: I'm having trouble making the number of attempts go down in my program, coordinate guessing game

Jesse TerrisI am creating a program where you guess the coordinate and if you get it right you win but if you get it wrong your attempts go up and your max attempts go down but I don't know how to do that. here is my code # Locator Game Must find both coordinates to win. # Difficulty = very hard # Advanced ...

0
Q: More Efficient Way To Search On-Demand

MikeI need better logic that would allow this search to perform quicker and more efficiently. In XAML, I have a DataGrid and a TextBox. Both need to be present. I'd prefer that as the user types in the TextBox, the Grid is filtered by one or more columns. Not that the user needs to click a "Submit...

 
5:56 PM
@Duga OP added Solution from Geeks by Geeks - I believe that is for reference...?
 
6:12 PM
-1
Q: Is this program shareable?

Progrmming is funHi :) Im obsessing a bit about something that seems important, the readability and the "understandability" of code so it can be shared (communication). I just remembered Reinderiens previous answer "its a finer art of programming". I guess im just looking for feedback. Is this program going in...

 
6:32 PM
0
Q: LeetCode: Queue Reconstruction by Height C#

Giladhttps://leetcode.com/problems/queue-reconstruction-by-height/ Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers \$(h, k)\$, where \$h\$ is the height of the person and \$k\$ is the number of people in front of this person who ha...

 
6:47 PM
Ah I just noticed Chrome's console has a dark theme
 
7:12 PM
-1
Q: Maze generator, solver & animator in Python

Emad BoctorThis is the final version of both maze generator and solver that I posted last weeks from my other account (which I no longer have). For those who did not check it there are 2 modules included here: 1. Maze generator: Generates mazes using 9 different algorithms (Binary Tree- Sidewinder - Aldou...

 
7:52 PM
0
Q: Manually formatting numbers in Python

Juan CI was working on a Python little challenge that was a bit more difficult than expected: format any non-negative number so 1000 turns into "1,000" , 10000000 into "10,000,000" and so forth. I managed to do it, but I find my solution not very readable: def formatting(n): m = str(n) # Turn it ...

0
Q: D&D Dice Roller

Himitsu_no_YamiHere I have a program I made to be an all-in-one D&D dice roller for all the common dice sizes as well as a disadvantage and advantage menu for the d20 and custom size support and even a stat roller (4d6 drop the lowest). It comes in two parts, the main program for the user to run and a subprogr...

 
 
2 hours later…
10:13 PM
0
Q: Optimizing the query joining 13 tables and generation of indexes for fast search

unkn0wnI have the following ER diagram. Now i have option of going with a single table ARTDATA as mentioned, or, I can go with 13 different tables linked with each other with relations. Problem is for each art i am gonna have to display all the attributes, i.e. For each ART i'll have to fetch TYPE...

 
I'm voting to close this question as off-topic because it is working code so it belongs on codereview.stackexchange.comSimply Ged 42 secs ago
As mentioned by @NicoSchertler, this is not working code and does not belong on Code Review. Voting to re-open. — Patrick Roberts 29 secs ago
@MickyD are you blind? No, it isn't the best place - though it is on-topic, there's a better place for such questions -- this is also predicated on the code in question being functional, which it is not. This does not belong on Code Review. — Patrick Roberts 9 secs ago
 
10:35 PM
@Duga looks like a dumpster fire...
 
@MickyD take your own advice. This question is not on-topic at Code Review as I've said multiple times. — Patrick Roberts 44 secs ago
@PatrickRoberts "take your own advice. This question is not on-topic at Code Review as I've said multiple times" - straw man argument again? At what point did I mention "code review"? You dont set a fine role model — MickyD 46 secs ago
@MickyD my god, are your comments the most ironic I've ever seen. Your first link's answer says that it's better to post on Code Review, even though it's not off-topic here. And that's wrong because this code is not even bug-free to begin with. Your second link says If you're just starting the code but have profiled an exact snippet that exhibits the aberrant performance, then asking it on Stack Overflow is acceptable.. And I'm sure you've just conveniently overlooked those points while ironically accusing others of straw man arguments. — Patrick Roberts 5 secs ago
 
10:53 PM
1
Q: Minimal JSON Parser

SaxpyMotivation: Partially for fun / learning, but also so I can roll out a custom JSON-like file format for a fighting game I am writing. There are two caveats: you cannot have repeated keys (requires std::unordered_multimap) and the keys are not in order (requires insertion order std::vector on the ...

0
Q: Shell Sort, Insertion Sort, Bubble Sort, Selection Sort Algorithms (Python)

EmmaSelection Sort The selection sort algorithm sorts a list (array) by finding the minimum element from the right (unsorted part) of the list and putting it at the left (sorted part) of the list. Bubble Sort The Bubble Sort algorithm functions by repeatedly swapping the adjacent elements, if the...

 
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comSelcuk 33 secs ago
 
11:34 PM
0
Q: svgmanip - python library to programmatically import, manipulate, and composite together existing SVG files

noɥʇʎԀʎzɐɹƆsvgmanip is a library that extends svgutils by providing rotation, import, and export primitives. It is available on PyPI, and was created a few years ago. Install pip install svgmanip Bugs Exporting does not work on Windows The code of the main file, _generator.py is here: from __future...

 

« first day (2334 days earlier)      last day (1673 days later) »