« first day (1904 days earlier)      last day (2107 days later) » 

12:00 AM
RELOAD! There are 5460 unanswered questions (89.9355% answered)
 
0
Q: How can I make my Python web scraper project better?

Iden CravenI'm new to Python and decided to work on a personal project and make a program that web scrapes and downloads manga. It works as expected, however, I am sure that there is a better way to structure my code. I'd appreciate some guidance on how to better write this project. You can check it out on ...

0
Q: How can I make this calculator better in Python?

Adam GThis is my first ever project I've coded in Python so I'm sorry if its a little novice. I'm just looking for beginner feedback, on what I could improve next time. There is one issue with this calculator, lets say I add 1 and 2, I expect to get 3, instead it returns 3.0, but I'm guessing that's b...

 
If your code works and you just want to make it better or get feedback, then you can ask this on the code review stack exchange. — Roddy of the Frozen Peas 55 secs ago
 
12:21 AM
I'm voting to close this question as off-topic because "review my code" is more appropriate on codereview.stackexchange.com, but off-topic on stackoverflow.com — TessellatingHeckler 31 secs ago
 
 
2 hours later…
2:46 AM
0
Q: remove spaces in a print statement python

Raji Abdulhameedwrote a python code to count number of odd and even numbers in a number but to output it in this format {'odd':4,'even':5} without spaces between : and 4, and between : and 5 is an issue. This is the code to print out the result and the response I get...The response has spaces between : and 4 and...

 
3:03 AM
0
Q: Find words that can be typed using only one row on a keyboard

codewriteron leetcode.com, there is a question with the following description: Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. link to the question here. Here is my implementation: class Solution { p...

0
Q: How can I make my Python web scraper project better?

Iden CravenI'm new to Python and decided to work on a personal project and make a program that web scrapes and downloads manga. It works as expected, however, I am sure that there is a better way to structure my code. I'd appreciate some guidance on how to better write this project. You can check it out on ...

 
 
1 hour later…
4:11 AM
0
Q: Determine if 2 lists with similar objects contain a partial duplicate

ZephyrI have two lists of Person objects. I need to compare the lists to determine if items in list1 exist in list2 and vice versa. This is not a straight equals() scenario as the objects are not the same, but may have identical field values. It is those values that I need to compare. Currently, I am...

 
4:32 AM
 
4:47 AM
This is something that belongs on codereview.stackechange.com . I will say though, that your code results in a = 375, b = 200, and c = 425. These numbers do not follow the Pythagorean triplet rule of a < b < c. — Shar1er80 48 secs ago
 
 
3 hours later…
7:24 AM
@MartinR I'm not going to compare it to other questions. But closing a question isn't the end of it. I'm not a fan of migrations unless the question is absolutely a good fit over at the other site. If that was the case here, there's no harm done. If you want more info, ask someone who migrated the question directly instead of the room at large.
That would be 200 and monkey.
 
7:45 AM
Monking
 
0
Q: Write a program in java to input a word and display all the new words that can be formed by shuffling the letters in the word

Harsh GuptaWrite a program in java to input a word and display all the new words that can be formed by shuffling the letters in the word.

 
@CaptainObvious HAMMERTIME!
 
8:42 AM
1
Q: Optimizing NICK binary thresholding

drake7707NICK binary thresholding essentially boils down to a convolution where the kernel at each pixel calculates the sum and squared sum (for the standard deviation). These values are then used in the threshold function to determine whether the grayscale value should be black or white. A kernel size o...

 
8:59 AM
-1
Q: GBM python loop not working

ShomI am new to python and I am trying to define a formula to determine price paths for a stock using GBM. The problem is that when i hard code the inputs the loop is running fine.However, when I use the same code as a part of formula it's not looping beyond row-2. Please help: def gbm (S,r,sigma,T,...

 
9:46 AM
0
Q: DSP-Quantizer class in C++

Jonas SchwarzI have written a class to quantize values to arbitrary bit depths within a specified amplitude. It is meant to process one value at a time, and has two ways of quantizing values. I wrote the class so that i could create objects of it as a property for another class, so that the quantization proc...

 
10:02 AM
0
Q: Moore-Neighbor Tracing Algorithm

David RefaeliI wrote code to extract the contour of a hole, based mostly on the Moore-Neighbor Tracing algorithm. Only a. instead of finding a shape, I'm finding a "hole"; and, b. I'm looking for the (outer) boundary of the hole, i.e. the actual pixels that are not part of the hole but that are hole bound...

 
If your code is working, you should post on Code Reviewroganjosh 30 secs ago
 
10:28 AM
If you have working code and are looking for optimization, your question might be better suited for codereview.stackexchange.comMike Scotty 26 secs ago
 
10:51 AM
0
Q: a^i calculation in python 3.6.3

rockI am new to python and see the codes below. could you explain my question on the codes below? thanks in advance!! a = 2 for i in range(1,10): print(a, i, a^i) print out: 2 1 3 2 2 0 2 3 1 2 4 6 2 5 7 2 6 4 2 7 5 2 8 10 2 9 11 could you tell me what's the meaning of a^i? thanks!!!

0
Q: A beginners implementation of Game of Life

Hugo J.I'm totally new to python and coding in general and I tried for my first project to recreate Conway's game of life. After days of trial and error, I came up with this code: import numpy as np import copy import png import PIL as PIL def a(a) : if a == "gen" : size=int(input(...

 
11:02 AM
Yeah. YOu cut down your examples os much there is no real way to answer, particularly given that you even then ask for opinions. That is more codereview i think and then you need to even there be a little more specific — TomTom 33 secs ago
 
11:21 AM
Well, that's new: A bot in practice?
 
0
Q: How to optimize this code to save time?

Ahmad SulimanI have file have trips from/to some of the cells per each period ( I divided the day into 24 periods) as ([[trips occurred between 1 am to 2 am (1)],[ trips occurred between 2 am to 3 am (2)],.........,[trips occurred between 23 pm to 12 am (24)]]). and another file containing all cells in the st...

-1
Q: SPOJ problem : "DCEPC12E - End of Fun"

vibhanshu kumar I was solving End Of Fun on SPOJ. Everything is working fine for values of N smaller than 10,but for N > 10 it's giving segmentation fault.I wasted my whole day finding the bug,but i failed.I think, i have used proper integral types according to question everywhere,still facing issues. #inc...

 
@CaptainObvious No.
 
11:40 AM
possible answer invalidation by Florian Bernard on question by Florian Bernard: codereview.stackexchange.com/posts/199860/revisions
 
Monking
 
11:55 AM
0
Q: print content of two binary search trees in sorted order

SandeepYou are given two binary search trees, the goal is produce a sorted array of elements containing elements from both the trees. I wanted to know if there is a simpler approach, and if the use of boost variant is justified in the code. The code uses a stack to iterate over the binary search tree....

 
Not looking forward to these temperatures :(
 
12:10 PM
possible answer invalidation by Florian Bernard on question by Florian Bernard: codereview.stackexchange.com/posts/199860/revisions
 
12:41 PM
In this question...
4
Q: Scan files and pick overlapped hex codes

overexchangeProblem Two folders having files with nameEfile that store lines starting with hex codes. Print those hex codes that overlap in both folders. Solution import os import sys import re def process_cache(cache): event_code_set = set() for file_name, multi_line_content in cache.items():...

 
@Duga Yes, rolled back and left a comment.
 
How local variable cache is visible outside its function? so that it can be returned? How scope works, in this case..
cache1 is able to point to local variable cache
 
I'm not sure, but you might have some better luck asking this at codereview.stackexchange.comMax just now
 
12:55 PM
possible answer invalidation by overexchange on question by overexchange: codereview.stackexchange.com/posts/199759/revisions
 
 
1 hour later…
2:15 PM
possible answer invalidation by Mast on question by Florian Bernard: codereview.stackexchange.com/posts/199860/revisions
 
0
Q: Hash Tables: Ransom Note - Hacker Rank in Javascript

SlotmachineI'm preparing for an interview doing the preparation questions on Hacker Rank and I want to become better at this. Is it possible to get some feedback on this? How can I improve my code? How did you solve this question? function getCount(array){ let counts = {} for(let word of array)...

 
@Duga Shhhh
That's a partial recovery on a rollback.
 
Ripping out the Content of an existing window and replacing it with something else could lead to unexpected results with MVVM bindings. You are using MVVM with your WPF app? Why pretend to emulate z-order? WPF isn't a JavaScript domain. WPF is more than capable of displaying real controls with real z-order Anyway, you may want to ask this over at Code Review Stack Exchange. Be sure to read the FAQ first. good luck — MickyD 56 secs ago
 
 
1 hour later…
3:42 PM
1
Q: Rename jpg images using a script

SvetaI like to collect images for my desktop background, the problem is sometimes the image names don't represent what the image is. I decided to write a script that reads a text file that contains the source of the images to be renamed, and the base name to use. The script renames the images using th...

 
4:15 PM
1
Q: Exercise 6.1 from ANSI C book - getword function

java-develI have a following exercise from ANSI C book: Exercise 6.1. Our version of getword does not properly handle underscores, string constants, comments, or preprocessor control lines. Write a better version. Here's my improved version of getword function and code that test if it works: #in...

 
4:26 PM
Long shot: But does anyone happen to know a tool (language doesn't matter a lot) that locate a barcode on an image?
There seem to be plenty of tools that can decode them pretty reliably as long as it's in full view
 
4:47 PM
0
Q: Python PyQt5 - Simple Snipping tool

sheldonzyI forked an existing snipping tool from github and made some major changes. I just started playing with pyqt5 (and in GUI in general), so I'd love to get some criticism, before I add more features. the program's flow goes like this: the first window is just an empty menu. When you will press 'Ne...

 
5:00 PM
Such questions better fit on Code Review. — usr2564301 16 secs ago
 
5:35 PM
0
Q: How to increase execution speed?

AnthonyI am doing automation for windows application. I am using winapp driver tool. I am selecting respective players and their position from excel sheet. I select 3 players and click on their respective positions. but here execution speed is take too much time. how to increase the execution speed of...

 
Similar to what? You didn't show anything, and the description is too obscure. Even if somebody had same concerns as you, there's no way to tell without mind-reading. Please, provide an example that clearly shows the problems you have. This may be a question codereview.stackexchange.com but it's impossible to say because there's no code to review. — estus 28 secs ago
 
 
2 hours later…
8:03 PM
0
Q: Calculating the number of rooms in a 2D house

KurnsI stumbled upon this problem on cses.fi (a problem set for the Finnish Olympiad in Informatics. This problem is in finnish so I'll translate it). I'll describe the problem, present the code and think what went wrong. The problem You are given a blueprint of a house. The size of the blueprint is...

0
Q: Looking for some improvements to my basic code. (Importing files)

William CezarGood day experts. Any tips to reduce lines, improve speed, any cool thing, are welcome. Im using this for years and i just realize, why not improve ...? thank you for you help! Sub AtualizarRelatorioGeral() Application.Calculation = xlCalculationManual Application.ScreenUpdating = False Appli...

 
8:37 PM
-2
Q: Angular 2+: jQuery integration in a component (type definitions vs token-based strategy)

Ehouarn PerretI am using jQuery (mostly to use fullpage.js <= version 2.9.7) and it turns out that there are two different ways of achieving this, until now I was using exclusively the type definition way of doing things: http://deanmalone.net/post/using-jquery-from-angular2/ (the second approach explained on ...

 
8:57 PM
@FredK absolutely, but he didn't ask for a code review :) — Wow 35 secs ago
 
9:41 PM
0
Q: Do people read other reviews for learning?

kleniumI was looking for posts about self-answering my own code review question, and I saw this post: Why should I be able to answer my own question in the question's editor on Code Review? 3 days ago I asked a code review on this site. I also sent my code to my friends, and they told me a great idea. ...

 
10:15 PM
0
Q: Simplified Pub-Sub model with mediator

Daniel LorenzI want to know what is wrong with my approach because it feels like its far too simplistic, but I don't see what I'm missing. It works how I actually intended, but there may be something I'm missing for other types of use. Ultimately, I'm using the mediator pattern where anyone that wants to ca...

 
 
1 hour later…
11:20 PM
0
Q: Simple Java MVC (swing)

squizyI'm a Java beginner currently practising MVC pattern and came up with this. Could you please check if this is a proper implementation of MVC and if there are any best practices that I have broken? public class Appka { public static void main(String[] args) { Model model = new Model...

 

« first day (1904 days earlier)      last day (2107 days later) »