« first day (2046 days earlier)      last day (1954 days later) » 

12:00 AM
RELOAD! There are 5842 unanswered questions (89.7256% answered)
It seems like this question would be more appropriate on the Code Review site — G5W 50 secs ago
 
12:19 AM
0
Q: Python Turtle Pong Game

KyleIm trying to add a start function to my code where the space key can be pressed to start my code as well as and end game where the first player to reach 5 wins. Please help import turtle import random screen = turtle.Screen() screen.title("Turtle Pong by Kyle Bonem") screen.bgcolor("blue") scre...

 
12:42 AM
Since you mention the code works I would suggest you ask for advice on how to improve it on Code Review. — SeinopSys 9 secs ago
 
1:05 AM
0
Q: Rock Paper Scissors game using OOP

Žiga ČerničIm complete beginner to Java and we have just started learning objects and classes in school. Im trying to create a very simple text based Rock Paper Scissors game. I do realise that my code is a mess, so Im asking for some suggestions on how could I improve it and if Im even in the right directi...

 
1:50 AM
0
Q: Get pixel data from image UWP

user3159792I'm writing a simple tool, the user can select an image and it should list all the colors found in the picture. Now, I'm facing 2 main issues, one is that it's slow because I'm looping through all the pixels in an image. Second, I'm getting unexpected results. First thing's first, the code: ...

 
2:05 AM
0
Q: Properly update subtypes

MhdI'm trying to write Update method that will update properties of a given object. To make the example simple imagine, I have 2 classes: public class Person { public string Name; public virtual void Update(Employee parent) { this.Name= parent.Name; } } public cla...

 
2:36 AM
0
Q: Pandas newbie, looking for suggestion for improvement

ACRLThe following works, but seems to me to be overly complex. Is there an easier way to calculate time differences and calculate summary statistics? I especially am looking to replace the for loop import pandas as pd import numpy as np # Read in the csv file using the 'record_id' field as the inde...

 
2:51 AM
0
Q: Counting lower vs non-lowercase tokens for tokenized text with several if-else conditions

alvasAssuming that the text is tokenized with whitespace for a natural language processing task, the goal is to check the count of the words (regardless of casing) and check them through some conditions. The current code works as its supposed to but is there a way to optimize and if-else conditions...

 
3:06 AM
0
Q: Java.NoSuchElementException error on second scanner

Aidan RichardsI’m using a iOS compiler app called JedonaCompiler and I am currently trying to code a small text based rpg. I’m adding in a “cmd prompt” of sorts so when I transfer the code to NetBeans I can actively test and change variables. However when I got to the point of needing to use a second Scanner i...

 
 
1 hour later…
4:25 AM
0
Q: Scoreboard sorting (Secondary sort, skip duplicate ranking)

phwtI have two different scoreboard sorting function but one of them is not working in some test cases (which I don't know). Example input/output Input: 4 Contestants and then the list of the score. 4 AAA 3 2 1 CCC 2 3 1 BBB 2 3 1 DDD 1 1 0 Output: BBB, CCC is using the same ranking so there is ...

 
 
1 hour later…
5:25 AM
Monking
 
5:41 AM
0
Q: Speed up find command/alternates

user186743I am trying to see how I can speed up the below script that reports disk_usage. The line in bold with the find command is the problematic line that I am trying to speed up. This script is run on directories that have over 6-7TB of data and it takes 16-18hrs. However I want it to run in under 8hrs...

 
6:06 AM
for improvement suggestions use: codereview.stackexchange.com and always please put the code inline rather than in an image — peeyush singh 9 secs ago
 
6:46 AM
Monking
 
7:08 AM
Countdown is ticking
 
7:58 AM
0
Q: Comparing two elements from one list to all the elements in the other list

SalazarSidSo I have a list of titles, like this- key_headers - ["Investigation Report", "Claim details", "Life Assured’s Profile", "Family details & history",] I have a list of text, like this - finaltextlist - [' ', 'Investigation Report (Death/Critical illness/Hospital Rider Claim) ', ...

 
8:28 AM
0
Q: Python Scikit Learn: How can split my data with unique data from the data frame

varun chauhanI am working on a ML model which predicts the product category based on the description. Currently i am using all the data and splitting it into 75-25 ration for training and testing sets. However my product description contains repeating rows so how can I remove those rows and then train the dat...

0
Q: Bag check for coins with validation

Youssef El KholyThe objective of the program is to check that the weight of the bag that the user inputs and then calculate how many coins are needed to the added/removed to ensure the bag has the right amount of coins in. It needs to display the difference in weight and the number of coins to be added/removed a...

 
Monking
@Feeds No code
 
8:44 AM
0
Q: Function / API design when porting Perl to Python code

alvasIn Perl there are two functions that users interacts in shell perl train-truecaser.perl --model outputmodelfile --corpus inputfile1 perl truecaser.perl --model outputmodelfile < inputfile2 > outputfile2 In Python, if the two functions are going to be an object, it's a little hard to conceiv...

0
Q: Code for encrypt/decrypt message in python

BrianI have this code for encrypt/decrypt message. My problem is in function decrypt, I want to insert zeros into begin of each string in "m" so that each lenght of string in "m" modulo 10 equals zero. But my code is sooo slow, can anyone help me how to edit the code to work faster? Thanks. n=291...

 
9:14 AM
0
Q: App that sets configuration data seems to be very inefficiently programmed

Marcus AurelioI've been writing my code like this for a really long time now, I am wondering if there is a more efficient way to do this. This is especially after a senior developer said my code was very amateurish. App Purpose: I need to set some data for new employees when they join our organisation. This ...

 
 
1 hour later…
10:30 AM
possible answer invalidation by Zorn01 on question by Zorn01: codereview.stackexchange.com/posts/208101/revisions
 
@Duga restored, code removed completely
 
11:10 AM
Does it work? Then ask for a review on codereview.stackexchange.com. Does it not work? Then tell us what the issue is and we can try to find out what's wrong. — deceze ♦ 43 secs ago
 
0
Q: Execute code depending on import success

corwinI'm using a library that provided me with a class that I can use. Additionally I created my special version of this class with some additional functionality (different output formatting, it is backward compatible). The idea is that it may or may not be available, if not - use standard version. Cu...

 
11:32 AM
-2
Q: WHAT is The Solution to the following Qusetion

Mayada AbedWrite java a program that asks the user to enter the count of numbers that he wants to calculate, then ask the user to enter the operation type (+ , - , * , / , % ): - Use switch statement to select the operation. - Print the final output of the operation. - The program will ask the user whether ...

 
 
1 hour later…
12:35 PM
possible answer invalidation by t3chb0t on question by Marcus Aurelio: codereview.stackexchange.com/posts/209351/revisions
 
@Duga it's fine, just title and tags
 
Greetings, Programs.
 
1:19 PM
0
Q: TDD for Ruby On Rails API

IbrahI found myself working in this coding exercise for a work offer. I tried to apply TDD in the process but I didn't get any feedback from the company and I really would like to know what can be improved (pretty sure there are a lot of things). So any advice or refactor suggestion will be very much ...

0
Q: Bubble sort in python

Michael OgorkovyiI am quite new in Python and i am starting my journey with sorting algorithms, PEP8 and the Zen of Python. I would like to get some feedback about my BubbleSort algorithm which i wrote. def bubble_sort(structure): """ Bubble sort. Description ---------- Performance cases: Wo...

 
2:04 PM
@202_accepted I won a book in the Countdown to 2019 yesterday :)
I chose the Python algorithm one, although thinking over, I should've done the Go one since it's nearly twice as expensive :P
 
@Hosch250 Nice!
 
FYI, they have half-off all their MEAPs today.
 
Dang, I can't afford to keep spending money there like this lol
@Hosch250 Personally, pick the one you have more need / desire to learn now, deal with the other later, is my thing.
 
I was going to get them at the same time once I finished the ones I just got.
So, no issue, really.
 
Ah, nice.
 
2:08 PM
I'll probably upgrade it to a pBook later anyway.
 
I need to find some Rust stuff, need it for a contract I'm working on.
 
They have lots of Rust stuff :)
 
I don't see anything about MEAP being half-off
Ah, there it is
 
Deal of the day.
Those are both MEAP, and not fully available, so might not be the best choice.
 
Yeah I was already looking at the Rust in Action one, I'll probably get it and another one that's more complete.
Looks like C# In Depth is in MEAP now as well
 
2:11 PM
It has been for a while. I already ordered it :)
 
Ah, nice.
 
It's supposed to be finalized in January.
I got it on DOTD too, half off.
 
They really don't have much in MEAP that I want, sadly.
 
I want the Clojure one, but I have 3 to finish as it is.
I signed up to be a reviewer, so if they pick me, I'll get it free anyway :)
 
Nice
Well may as well spend another $75 on books I'll never read lmao
Scratch that, $100...
 
2:17 PM
Well, I wouldn't. Wait until you can read them :P
They'll still be there next year :)
 
Nah, if I don't do it now I'll never do it lol
 
2:51 PM
0
Q: +/- changing sequence: Imporving code readablity

junProblem: In the following expression 1-2+3-4+5-6... -98+99-100, print result every 10th(10,20,30,.....) calculation My code: result = 0 operand = 1 counter = 0 for i in range(1, 101): result = result + (i * operand) counter = counter + 1 operand = operand * -1 #Convert between pos...

 
You'll find that there are numerous articles and books written about multi-tier architectures, including many targeted at c#. As for recommendations here: that's off-topic for Stack Overflow. And really, without seeing any specific code, there's no way to suggest "better coding." There is a code review site (codereview.stackexchange.com) that you might want to consider, when you have something specific to share and have questions about, regarding approach. — David Makogon 16 secs ago
You may want to post this at CodeReview. I think the speed junkies gather over there. ;-)Bram Vanroy just now
 
3:22 PM
0
Q: 3 nested loops: Optimizing a simple simulation for speed

MotunBackground I've come across a puzzle. Here it is: One day, an alien comes to Earth. Every day, each alien does one of four things, each with equal probability to: Kill himself Do nothing Split himself into two aliens (while killing himself) split himself into three aliens (whil...

 
This might be a better fit for codereview.stackexchange.com — Rotem 38 secs ago
 
3:40 PM
I am curious what will happens if you ask for code-review. Don't forget to explain clearly what you mean as "its not even can be called good", so that someone can improve it. — Sinatr 32 secs ago
 
3:52 PM
0
Q: Backpropagation in a Convolution layer (C++)

mrhemen2015I'm trying to implement CNN from scratch. I've already implemented a fullyconnected layer and it works. But, however, convolutional layer's backpropagation doesn't give any positive results. It contains two methods: backward() to backpropagate signal to the earlier layers, and fit() to correct co...

0
Q: pdf file generated using reportlab , getting saved as plain text

Tasifthis is the first time i'm using reportlab. i copied the exact code from django documentation. https://docs.djangoproject.com/en/2.1/howto/outputting-pdf/. When i save the file its getting saved as plain text document (text/plain), the name remains the same hello.pdf and there is no text. p = ca...

0
Q: Optimizing my C++ Battleship Player AI

user186793I made a similar post yesterday, but I was able to make some progress on my own! If you didn't see that post, I'll do a brief rundown once again... Found this project online and looking for some guidance. I'm in the process of developing a BattleShip AI that will play against different computer ...

 
I'm voting to close this question as off-topic because should go to codereview.SE — Matthieu Brucher 50 secs ago
 
4:11 PM
Hey there
 
@RMunroe if only that was acceptable...
 
@Vogel612 @Hosch250 Remember when we discussed making a challenge-runner for things like PPCG? I don't remember who I talked with but I think it was you two, or at least one of you. Don't do that. Apparently giving someone access to run things in Docker is a big security risk. Having access to Docker means it's possible to get root access on the host.
 
Yeah.
It fell through.
We kind of started, but it never got anywhere.
 
4:26 PM
@SimonForsberg I think it wasn't me.
yea, docker is not a sandbox
 
@Vogel612 Pretty sure it was me.
 
4:50 PM
You seem to be looking for Code Review SE. We don't do normally that kind of thing here on SO. — John Bollinger 6 secs ago
I'd say use elseifs, but anything beyond that might get a bit convoluted. A question like this can tend towards opinionation, but it might be better over at codereview — aynber 5 secs ago
 
0
Q: PHP - Queries to print out on the screen a list of menus

SusiFor commom users i have 10 queries and for registred users i have 30 queries like this one below, only to print out on the screen the link for the querystrings, a guy said to me that i should escape the values of the menus that use querystrtings, i'm having a problem with google insights, my TTFB...

 
thanks. you are right about opinionation, but also in codereview you will get only one opinion :) — Michael Ploeckinger 55 secs ago
possible answer invalidation by Sᴀᴍ Onᴇᴌᴀ on question by Razvan Zamfir: codereview.stackexchange.com/posts/203089/revisions
 
@Duga ಠ_ಠ it was just wording...
@Duga "My opinions may have changed, but not the fact that I'm right." ― Ashleigh Brilliant
3
 
@SimonForsberg I was talking to Rubberduck about that, he mentioned the same thing.
 
5:09 PM
0
Q: Fibonacci-Counter implemented with React-Redux

michael.zechAfter learning the basics of React-Redux I've made an app to familiarize myself more with the concepts. It's a counter which counts-up the Fibonacci-Number. Here's my code: // ---- App.js ------------------------------------------- import React, { Component } from 'react'; import { Provid...

1
Q: Python grouped iterator

BenI wanted to write an iterator that would split items up into groups, so i can bulk insert into mysql without crashing or overwhelming the server. This is the implementation I came up with. I am hoping that when yielding from the list its not creating a copy / clone of the list. I need more exper...

 
No problem. Once you have posted over at Code Review, however, please don't forget to delete this copy of the question. It's easier for you to do that than for us. — John Bollinger 48 secs ago
 
5:21 PM
Monking
 
Does anybody else check review queues on an iOS device with colors inverted? Sometimes I do that and the avatars of recent reviewers appear to get repeated... imgur.com/a/abrrICY
 
Breaking news: phys.org/news/…
 
5:40 PM
0
Q: My function that combines strverscmp() with strcoll()

user10771684I'm writing a file manager which uses the ncurses-library in C. It aims to be a bit like the programs of the "suckless" community. To make it short, I needed to write my own comparison function for the qsort() function to sort the files. At first sight, strverscmp() is nice, but it do not like i...

 
6:26 PM
0
Q: My first ToDo list in javascript

M.Tarasim new in programming and in front-end. Its really hard to learn good practics for me. Right now I'm trying to learn javascript basics and bootstrap in addition. I did mine first ToDo list with bootstrap (just to train it a bit) and I feel like mine JS code and HTML are just bad and should do it...

 
7:04 PM
This would fit better at Code ReviewAmy 30 secs ago
 
7:22 PM
I already said this would be a better fit on Code Review. — Amy 56 secs ago
 
ooh did the flag summaries get a style update?
 
0
Q: How to make a SQL SP faster?

MikeI have created an SP which builds and then runs a SQL query. This query is pulling in data from several tables and 2 DBs for creating certificates for shipping. Right now this is taking between 50 to 110 seconds to run. This is too long as we have a lot of shipments that go out and need to run th...

0
Q: Avoid SRP violation in Console application

Daina HodgesI'm developing a simple Console application. Program.cs initialize dependency injection, set file names, accept inputs and print the result. I got a note that my Program.cs violates the SRP principle ,Program.cs must accept the inputs and print the results, must initialize dependencies. I don't ...

0
Q: 2048 Webgame bot

Sandro4912So there is this game 2048. You can play it here I wrote a python script which "plays" the game on the website by clicking the arrow keys. I would like to know what can be improved. Is it a good idea to check the Try again button with exceptions? Is there a better way? Currently it takes alot ...

 
7:39 PM
you probably need to post this to code review web site — webKnjaZ 16 secs ago
 
0
Q: Bubble sort algorithms and unittest in Python

Michael OgorkovyiI am quite new in Python and I am starting my journey with sorting algorithms, PEP8 and the Zen of Python. So far i wrote a post BubbleSort and I drew conclusions and followed the advices. I implemented two methods with optimatization from Wikipedia. I would ask for information about the current ...

 
8:17 PM
This question belongs on codereview.stackexchange.com. — jaco0646 35 secs ago
 
8:30 PM
0
Q: C# ClientWebSocket implementation

theagemawayI'm working on implementing websockets in my current project in C#. Could anyone please give me some pointers/suggestions for what could be improved? Specifically, I'm most unsure about how to actually use this class in my main code. I can't figure out when/how I would use UsableWebsocket.Send() ...

 
9:21 PM
I'm voting to close this question as off-topic because it should be posted at codereview.stackexhange.com — JB Nizet 21 secs ago
 
9:49 PM
If you want working code to be reviewed you should post it on CodeReview.SENathanOliver 21 secs ago
 
10:02 PM
1
Q: Two player snake game | Javascript

Joyal MathewI created a 2 player snake game from my original one player version. I am looking for some feedback on how I made it. I think I could use improvement when handling input (Snake.handle). Sometimes it feels like the input is not being read when I hit keys really fast. class Block { construct...

 
10:18 PM
0
Q: Solving exercises using methods

joe1) Extend the Exercise developed in class (attached) with a new datatype Degree which allows a coordinator to store all the students (CV) enrolled in a Degree providing the following operations (methods): New_student: Inserts a new student Average_age: returns the average age of the students. G...

 
10:47 PM
@Feeds anybody want to do some homework?
too bad the OP didn't include any lecture materials like notes or a transcript (╯°□°)╯︵ ┻━┻
 
11:00 PM
The query is too long for a question that would be on topic here, makes it more of a request for code review, which is off topic. Maybe you can extract a more concise question from it? — Erwin Brandstetter 19 secs ago
 
11:22 PM
Good answer! The asker can also look for BFS, DFS, Dijkstra they all help to find shortest path considering various options... I had posted one Dijkstra impl for code review, you can check that as well... codereview.stackexchange.com/questions/208409/…Ketan 17 secs ago
 
11:35 PM
0
Q: Sorting an array of numbers in Java with an algorithm

Michael_BayThis is pretty much one of my first programs that i have created in Java and I just wanted to ask if anyone sees some obvious errors or mistakes I made. The purpose of this program is to sort numbers given by a user using an algorithm. First off, the program gets an input in form of ints from t...

 

« first day (2046 days earlier)      last day (1954 days later) »