« first day (2654 days earlier)      last day (1346 days later) » 

12:00 AM
RELOAD! There are 6886 unanswered questions (89.8300% answered)
 
 
2 hours later…
2:28 AM
0
Q: why it dose'nt work?

md-yzthis is my code for problems five of euler project i like to knows where is my wrong please help me multipation = 2 def lcm(i): global multipation if (multipation % i != 0): for k in range(2, 21): multipation *= k if (multipation % i == 0): ...

 
2:43 AM
Pep8 says --max-line-length=79 but Django says --max-line-length=119. Both are associated with Python. Even in GitHub code review it is 119. I just want something that supports python with 119 characters and formats my document automatically rather than me doing it, as it formats with autopep8 with max line length = 79 — Mohit Kumar 23 secs ago
 
 
1 hour later…
4:05 AM
1
Q: Change a column background color based on value. document.getElementsByName didn't work on second row

user98916I have created a table using while loop in jsp. I need to change the background color of a column based on the status, so I use document.getElementsByName to get the value. The problem is, it only work on the column on first row, not the others. Sorry for the ugly coding and logic, I am practical...

 
 
2 hours later…
5:42 AM
0
Q: Ruby: Write a custom include? method

michael.zechTask: Write a function which returns true if a given substring is found within a given string. If the substring isn't found, then return false. My implementation: #!/usr/bin/env ruby def custom_include?(string, substring) len = substring.size last_feasible = string.size - len for...

 
 
1 hour later…
6:54 AM
0
Q: Dictionary implementation in Rust

EphraimRuttenbergThis is an implementation of a dictionary (hash map) in Rust. It is loosely based on Python's dictionary implementation, using the same "random" probing and capacity/size management. Does it use too much memory or waste too many CPU cycles? Is it documented enough to be easily understood? I tried...

 
7:05 AM
Monking
 
 
1 hour later…
8:06 AM
0
Q: nth Factorial of n 1s in a row

KadragonIn what way can I improve this? Be that performance, readability, etc. I'm thinking implementing NumPy would improve performance. Usage: Calculate* the nth factorial of n 1s in a row. *No need for a precise calculation. Magnitude and leading digits is enough. Examples: 2nd factorial of 11. (11 x ...

 
8:44 AM
I’m voting to close this question because this belongs to codereview.stackexchange.com — Anmol Singh Jaggi 18 secs ago
 
8:55 AM
0
Q: Object oriented approach for snake game in C++

Sakitha NavodI started to code in c++ recently and my goal is to develop games using c++. After learning basics I tried to implement my own version of snake console based game in c++ with the help of some online tutorials. I used OOP approach. I would like to hear ideas about this code and what mistakes i hav...

 
9:21 AM
Monking
 
9:43 AM
0
Q: Smashing two heaviest stones until at most one stone is left - counting number of stone comparisions

slepicBased on this question: Heaviest Stone algorithm time complexity Problem: We have a collection of stones, each stone has a positive integer weight. Each turn, we choose the two heaviest stones and smash them together. Suppose the stones have weights x and y with x <= y. The result of this smash ...

 
 
2 hours later…
11:20 AM
0
Q: Snake game in C++ with SFML

JensBI started learning programming about a year ago, starting with Python. Half a year ago, I moved onto C++ and this is my first large project with that language. Have I understood the basics of the language? In Main.cpp: #pragma warning(disable : 4996) #pragma warning(disable : 4244) #include <memory

 
There is a specific site for code reviews, codereview.stackexchange.comJoakim Danielson 30 secs ago
 
11:44 AM
0
Q: Scrapinng the Instagram follower list - no data received

FulvioI'm making a node.js app that scrap the follower list on Instagram. I use, for scraping, a service of scraperapi sdk When I go on the app the reuslt is the egde[] is empty, but if I execute the same url on firefox delevoper Edition it found the edges with all the folloer socket.on('message2', a...

 
11:57 AM
Also, codereview.stackexchange.com might help you a lot when going through the advices for just random posts. — Peter Badida 36 secs ago
possible answer invalidation by Ngoy Lufo on question by Ngoy Lufo: codereview.stackexchange.com/posts/246235/revisions
 
12:32 PM
0
Q: Optimizing performance of randomly generated pygame maze game (as well as other possible feedback)

Aakoo7I made a random maze generator that is also playable. The performance is crap and I'd like to improve it. I'll be working on this for a few more days to make it run better myself, but just thought I'd leave this here if people want to help. (Will still be active on this post) Any and all feedback...

 
12:45 PM
@Duga Rolled back.
@SᴀᴍOnᴇᴌᴀ Previously this was considered 'fluff' on the SE network. I know there's a welcome-bandwagon going on, but that hasn't been rescinded AFAIK.
> Welcome to Code Review! Hopefully you find this a valuable and worthwhile experience!
Or did I miss a post?
 
1:45 PM
0
Q: Huffman encoding

Philipp WilhelmThe Huffman-Algorithm The Huffman-Algorithm, named after David A. Huffman who first published this algorithm in 1952, is a algorithm for lossless data compression. As most encoding-methods, the words for often used symbols are shorter than the ones for not so commonly used symbols. The algorithm ...

 
2:09 PM
-1
Q: Most elegant way to copy type alias class to original collection

GenadyLooking for a most elegant way to copy dictionary type alias to original collection. using System; using System.Collections.Generic; public class SmallDictionaly: Dictionary<string, JToken> public class NestedDictionary : Dictionary<string, SmallDictionaly> using System.Collections.Generic; usin...

 
2:33 PM
0
Q: Convert Decimal to Fraction

user3756068This code below converts number from decimal to fraction. I don't know if there's a better way or better methods to do this job so any advice would be appreciated. const toFraction = (inputNumber) => { // Only two digits after decimal point inputNumber = inputNumber.toFixed(2); // destruct...

 
3:21 PM
0
Q: Largest Prime factor (Project Euler in Rust)

TheStrangeQuarkI've been working on my Rust a bit and want to know how idiomatic my rust code is for the following Project Euler problem: What is the largest prime factor of the number 600851475143 ? I'm not looking for ways to improve efficiency or how to improve the strategy, but purely what I can improve wit...

 
possible answer invalidation by user3756068 on question by user3756068: codereview.stackexchange.com/posts/247678/revisions
 
3:40 PM
possible answer invalidation by user3756068 on question by user3756068: codereview.stackexchange.com/posts/247678/revisions
 
1
Q: Move generation n c++ for Knight

Aryan ParekhSo i have been working on this Chess project and for that i need a move generator. I wish to know if i can improve my code for the move genration for the Knight. Here is my current code; Let me tell a few things so you can better understand it. I am using vector<vector<int>> for the main pseudo m...

-1
Q: How to pass values into another method

Vanessa KensingtonI am trying to improve my coding skills and i run into a simple issue when parsing json objects to another method. I have created a class and later i am adding to this class values (when i debug there are there) however once the method below is called the client is empty. Can you please advise wh...

 
M nk ng
 
 
1 hour later…
5:08 PM
o   i
Ofc it removes all the white space at the beginning 🤦
 
That wasn't the only problem with it, but here you go.
 
Wat
I had gotten it to line up pretty well on my end :/
 
Remember that the font isn't monospaced.
 
I know. I used
print('\u2004\u2004\u200Ao\u2004\u2004\u2006i')
 
5:25 PM
possible answer invalidation by user3756068 on question by user3756068: codereview.stackexchange.com/posts/247678/revisions
 
@Duga Answerer suggested code modifications were still welcome, may as well ignore the edit.
 
6:25 PM
Well executor is single threaded so it make sense that heavy work might use more CPU that is available to single thread. The first tool to use here is a code review. After that I'd try a thread analysis tool stackoverflow.com/questions/51218228/… and also just looking at the OS load (top or Task Manager). — markspace 43 secs ago
 
6:35 PM
0
Q: Returning interfaces in Java without significant casting

CL40I am writing some code that takes and returns interfaces following the patterns in Effective Java Third Edition. I understand the principle - we want to take in interfaces because in many cases we don't really care about the discrete implementation but rather just the features of this interface. ...

 
7:15 PM
Welcome to StackOverflow. This community is for specific programming questions, not a code review. Please ask a question. — Alex Larionov 41 secs ago
 
 
1 hour later…
8:36 PM
There is a site here for code review questions Code ReviewEyeslandic just now
 
9:24 PM
0
Q: App to seed DB, generate CSVs, and export individually or in complex zip files Rails 5

atayl16I have an app whose sole purpose is to seed data files and add the data to different CSVs which are zipped and exported by the user. My application controller is filled with lines that all look like this: def export_tips @appointments = Appointment.order('service_id') send_data @appoint...

 
10:23 PM
@Eyeslandic Since this is a how to question, it's not really clear that it would be well received on code review. Just because the code works doesn't mean it is off-topic for stack overflow. I would also ask to that if you're going to redirect someone to code review please redirect them to our help center so that their question is more appropriate. When I redirect someone to stack overflow I always provide a link to the help center so that they know what is on topic. — pacmaninbw 15 secs ago
 
10:40 PM
@Duga Some people really can't be bothered I guess.
2
>
@pacmaninbw Please stop this, if the question is off-topic there, then you just handle it in the appropriate fashion. – Eyeslandic 1 min ago
 
@Peter-ReinstateMonica I don't understand your point. Is your point that people shouldn't answer question on SO? Is your point that the presented solution is wrong? Is your point that c is "not usable for serious software development"? Funny how a lot of critical systems run successfully on c. It's like... there are competent programmers in this world... and ... best practices ... and ... code review and ... unit testing, integration testing, system testing and acceptance testing are a thing. — bolov 15 secs ago
 
11:24 PM
0
Q: Random Word Chain Finder in Ruby

John O'BrienWrote this program out of curiosity after initially solving the Word Chains puzzle. Explanation of puzzle in link below. http://rubyquiz.com/quiz44.html NWordChains#find_word_chains will take in a number as an arg and return that amount of random word chains from a given dictionary. Initialize NW...

 
@Mast okay I removed the second sentence. Should I remove the first one too? If so, maybe we should notify L.F. About this answer
 
11:44 PM
@SᴀᴍOnᴇᴌᴀ (took me a while to understand what Mast meant, so didn't say anything earlier) IMO I think what you had was fluff, but I'd be happy for you to have left it. What you have now I think is fluff and should just be removed.
 
0
Q: Python Simple Range and Bearing Calculator using Complex Numbers

JKRHI have just written this code that takes an initial coordinate and returns a new vector depending on a user-supplied range and bearing. The calculation of the new position is done using Complex Numbers. I am sure there are easier ways to do this, but I wanted to play around with complex numbers. ...

 
possible answer invalidation by Kadragon on question by Kadragon: codereview.stackexchange.com/posts/247666/revisions
 

« first day (2654 days earlier)      last day (1346 days later) »