« first day (2088 days earlier)      last day (1943 days later) » 

12:00 AM
RELOAD! There are 5833 unanswered questions (89.8505% answered)
 
12:14 AM
0
Q: Simulating a two-body collision problem to find digits of Pi

Shirish KulhariI came across a nice video on 3Blue1Brown's channel that highlights a very indirect way to find the digits in Pi. I'd suggest watching the whole video, but briefly: The setup is as above. A "small" body of unit mass is at rest on the left and a "large" body on the right is moving towards the l...

 
12:45 AM
-1
Q: Word switch in .txt with node.js

Dániel BottyánHay guys. I make a discord bot and i save words into a .txt with a command. the question is is it any passible way to switch a world in the txt with an other? thanks the help replace({ regex: "foo", replacement: "bar", paths: ['.'], recursive: true, silent: true, }); already tri...

 
1:17 AM
0
Q: Improving the Red implementation of Rock, Scissors, Paper

Terrence BrannonI have implemented the Rosetta Code Rock Paper Scissors game in Red, but I'm sure that there are better ways to do every thing that I did. I would appreciate any feedback on this code, which does work according to spec: Implement the classic children's game Rock-paper-scissors, as well as a simp...

 
2:12 AM
Questions on Stack Overflow are intended to to answer a specific question. I cannot see any specific question beyond what appears to be a general request for review of the code. If that's what you are looking for, check out the sibling site Code Review to see if your question might be more on topic there. Otherwise, edit this to ask a pointed question, bearing in mind what is on topic. — Shepmaster 57 secs ago
 
2:35 AM
0
Q: Solving a strong form differential equation (FEM) using MATLAB

Lil_TEEI need some diagnosis on how I'm solving my differential equation. This was a template given to me by my professor and I manipulated it to the best of my ability. The governing equations are here: And here is my code: clear; clc; close all; % u,,xx=-(f/ea) on [0,L] % u,x...

0
Q: Basic Echo Implementation in Rust

kim anhI'm looking for any possible help implementing the unix command echo in Rust. This is what I have so far but it's just basic functionality. I also need to implement the -n flag and -e flag that can handle the newline, tab, and backslash escapes. For all others it should panic. use std::env; fn ...

 
2:49 AM
What function is in question? Also, the way you phrased the question, this might be better under Code Review instead of Stack Overflow — Cole 16 secs ago
 
3:47 AM
Have you considered posting this on codereview.stackexchange.com? It's much better suited for code review requests such as this one. — Mad Physicist 21 secs ago
 
4:13 AM
0
Q: Getting multiple table schema and returning them, using one helper method

user10931326I want to get two distinct sets of schema from a database without having to create multiple Connection/PreparedStatement/ResultSet objects. Currently, I have a helper method that queries the database, gets each individual schema, and then returns them together in one ArrayList - please refer to ...

 
@DaveP If you have working JavaScript you may get a better response posting it on Code Reviewtraktor53 22 secs ago
 
4:45 AM
0
Q: pythonic way to process a company list in which every element is employee list

ning chenNow, there is a company list in which element is employee list in every company. I calculate the salary of employee in every company with restful API one by one, this is very slow. So I join 1000 element to one list and post it to the service. My code is as follows. import requests def _calcul...

 
5:09 AM
 
0
Q: Is there any highly secure way to achieve login functionality by using PHP and mysqli?

Purushottam PatilI am new to PHP. I am trying to create a highly secure login system using PHP and mysqli. I tried searching a lot for the different approaches. Finally, I found one. (Here is the link: https://www.wikihow.com/Create-a-Secure-Login-Script-in-PHP-and-MySQL#Configure_Your_Server_sub). Is this code i...

 
Monking
 
 
3 hours later…
8:12 AM
you are looking for a CodeReview, not for help with code. — Stultuske 30 secs ago
 
Monking
 
8:35 AM
possible answer invalidation by J. Adam on question by J. Adam: codereview.stackexchange.com/posts/211754/revisions
 
8:47 AM
Seems like you are looking for a Code Review - you might try that at codereview.stackexchange.comHulk 20 secs ago
 
0
Q: Is this an effective implementation of "wait" in a script?

FlyHighwindsI am currently developing a multiplayer game in Java. I'm using Nashorn to execute custom functions that pass my Player object in as a parameter. One such function is called "wait" which when used, causes the current script to wait for the specified amount of ticks before continuing procedurally....

 
9:12 AM
0
Q: Game of Hangman in Python 3

Astephen542First post. I'm trying to code a game of Hangman in Python 3, but I have a problem. When the user guesses a letter correctly, it only gets one of the occurrences in the word, instead of all of them. How do I improve this? import random def GAME(): win = 0 guessedletters = [] display ...

0
Q: Python BruteForce Script

tututuI have a to do a Bruteforce script, so mine is working, but alos very very low. My teacher give me a small SHadow file and from the shadow file I have to find the original password (MD5 used here). I know that my code is working but I'm lookg for tips and tricks to improve it. import hashlib imp...

0
Q: Dashboard / data vizualization app in Python using Plotly Dash

Joos KorstanjeIt's my first time here on code review, so don't hesitate if I don't use it correctly. I've developed a dashboard in Python using Plotly Dash. I know I still have to improve the front end code by making a separate css file instead of inline styling, but I would love to have some feedback on the ...

 
9:28 AM
1
Q: Critical section around given key

cervotocI would like to know if there is any pre-existing implmentation of my solution. So I don't have to reinvent the wheel. What I'm trying to create is an utility which allows me to create critical section around given object. Can you check my code if there are any errors in my implemention? import...

0
Q: Improving a design pattern - options with properties (omitting second generic)

AlexImagine that there is a certain object, that could have different options applied to it. And each option has it's own properties. Like a car, that could have a protective window installed, with or without red strips on it. Or a cocktail with straw that could have different length. I created a p...

 
9:44 AM
0
Q: Display/hide components of html division onClick of button

Skander LejmiAlright so essentially, im attempting to produce a navigable html page with multiple different buttons that hide/show divisions (instead of a standard href). For some reason some of the code is dysfunctional whilst other parts aren't. I know its highly ineffective but I've just started learning j...

 
10:25 AM
This question should be posted in Code Review | StackExchange. — AndrewL64 25 secs ago
 
10:46 AM
0
Q: Creating an object using an API call

GlazbeeI'm looking to create a wrapper for an API, mainly for learning purposes at work as "The IT guy". I've been trying to follow the PEP 8 styling guide and make my docstring as detailed as possible. I believe my code looks quite sluggish, I've tried to avoid duplicate code and multiple line sets of...

 
 
1 hour later…
11:47 AM
Please provide a minimal working example with your input and the expected output. Also, this might be a question for Code Review rather than SO. — DocDriven 18 secs ago
 
12:05 PM
0
Q: In Python, when working with the same file, should it be opened and closed inside the same loop, or opened once and closed at the end?

user1790813Many times, I have a loop running and I want to write the loop results to a single file. I know this will work with open(filename, 'a') as f: for i in range(1000000): f.write('s\n') However, as far as I understand it, I will only see the result in file filename after the file is cl...

 
It's work, and I got great pythonic code.(Processing a company list in which every element is an employee list)[codereview.stackexchange.com/questions/211891/…ning chen 6 secs ago
possible answer invalidation by ning chen on question by ning chen: codereview.stackexchange.com/posts/211891/revisions
 
12:47 PM
` dp = dpz[:, i] ps = psz[:, i] pl = plz[:, i] gp = gpz[:, i]` this inside a loop could be a bad idea depending on what you are trying to achieve....anyway SO is for problems, your code needs a several code review: codereview.stackexchange.comNetwave 26 secs ago
If this works, it would perhaps be more appropriate to ask in Code ReviewFelix 33 secs ago
 
Keep up the reviews people, the queues are getting bigger and bigger.
 
This has been posted on Code Review in the meantime here. — mkrieger1 1 min ago
 
0
Q: Improved RFC 1951 Deflate compression

George BarwoodI have substantially revised my earlier implementation, it now seems to be competitive with the standard C# ZLib implementation, increasing compression while being faster for moderate length inputs, and slightly slower for large inputs ( data dependent ) - see long initial comment below for detai...

 
 
1 hour later…
2:11 PM
-2
Q: Python code reset always

Ajay Jaindef go(): print("Login successful") username=[] password=[] while True: choice=input("Enter 'l' for login and 's' for Signup.\n") if choice=="l": user_name=input("Enter your username\n") pass_word=input("Enter your password\n") if user_name in username and pass_word in p...

 
2:58 PM
Are you facing any issue(s) to be solved or are you asking for a code review? In the latter case this probably is the wrong place. If its about the former, please be more specific. — alk 41 secs ago
 
3:45 PM
0
Q: Looping through multiple regex efficiently

FangI'm writing a program that adds all network interfaces with multiple parameters to a list. I have written the following code, which should work out of the box on any Linux system with Python and ethtool installed: import imp import os import subprocess import re from enum import Enum class ...

 
If your code works and you want to improve it, you should post it on the codereview stackexchange. — David Conrad 24 secs ago
 
4:01 PM
0
Q: Validating Array before rendering

Muhammad KamalI am rendering a list from an array of objects. I want to check the correctness of the array before rendering. For that I am using typeof and null. In real situation the list comes from the API. Is it the correct way? and is there any better way to do it? const activeEvents = [{ id: '1'...

 
also note that if this is working code and you are merely asking for improvements, suggestions and/or opinions then codereview.stackexchange.com might be the better place to ask — user463035818 16 secs ago
 
4:33 PM
1
Q: Python Float point range() operator implementation

David CulbrethI recently wrote a full implementation of a range() operator in Python, and I'm not sure if I've followed the standard pythonic patterns. From what I can tell, it works. I've written a few test cases, but they don't cover everything yet. I've also published this in a gist on github as well This ...

 
If you have written working code then this may be a question for the code review site. — drescherjm 1 min ago
You won't get an answer here. Solve the exercise yourself to the best of your abilities, then post your code on codereview.stackexchange.comHolyBlackCat 35 secs ago
 
posted on January 21, 2019 by CommitStrip

 
4:49 PM
0
Q: Java Array not working

BOBI was making an array from Java. I am fairly new to Java and do not understand all of the concepts. I watched youtube videos and went to lots of websites to try to make an array. Everytime I try to system.out.println my array, I get an alert saying Error: Could not find or load main class undefin...

0
Q: First Projectt - Guessing game with various features

KeyanI've completed my first python project. I created a basic guessing game first, with no extra features other than guessing and random number generation. Afterwards, I've watched python courses on Udemy and slowly I began implementing what I've learned. I have a name system, welcome screen, fully f...

 
5:08 PM
Monking
 
Monking
@t3chb0t everything is meaningless in life, if you think about it thoroughly. "End" is inevitable. As far as I am concerned, at least - my question is following the guidelines of this forum. This is not a homework. Code is PoC of a pattern which I have developed in my spare time, and now, I am willing to improve it/or discuss with the wonderful community to improve it even further (see description). — Alex 2 hours ago
 
5:29 PM
If this code is completely functional, you could try asking tips on speeding it up on codereview.stackexchange.comMistella 1 min ago
 
5:50 PM
possible answer invalidation by Jamal on question by tjt263: codereview.stackexchange.com/posts/200337/revisions
 
@Duga neigh.... just updating formatting of sample usage and headings
 
6:10 PM
hi chat
 
Hey There
 
hey, I've seen you before on this site.
 
@Mast more and more people ignoring rules :/
 
nice username btw haha.
 
mine?
I developed the name back in the late 1990s after watching the show Muppets Tonight, which featured a monkey named Sal Monela
2
 
6:29 PM
-4
A: Multiplying two arrays

Shirley nguyễnwhy you dont use "bits/stdc++.h" I think it is better.

This is a troll, right?
 
0
Q: I am trying to calculate the probability that Signature column has status "Y" in last 30 days in R

user190888I am doing this formula in R, for (i in 1:ifinal) { df$FPRateSignature30d[i] <- length( which( df$status == "Y" & ` df$Signature==df$Signature[i]& df$date>= (as_datetime(df$date[i])duration(30, days')) &` df$date < as_datetime(df$date[i]) ) ) / ...

 
@bruglesco mayhaps
 
6:45 PM
@SᴀᴍOnᴇᴌᴀ Oh, I thought it was a pun on salmonella
 
@Dair well, yes - I believe Sal's name was originally aimed at that
 
duh, of course, silly me.
 
0
Q: Render Polygon Method (Documentation)

PerpetualJI've written a method to render a polygon in C# using the SharpDX libraries and would like a review of my code's maintainability and the documentation around it. The method works fine as is, but I feel that perhaps the documentation could be improved, or that there could be simpler and more maint...

 
7:11 PM
0
Q: Speed up iteration for large dataset in python

Dave CI'm trying to parse data into a csv prior to a bulk transaction into Neo4j. I'm using vast amounts of data in the relationships and wondered if anyone could help in speeding up the transactions below. It's genomic data, with 2,000 samples, each with up to 3.5m variants per chromosome probably e...

0
Q: Creating objects from xml-data

wenzzzelI've got an xml file with some info about hosts connected to my home network and I would like to create objects containing that info in a neat way. So that I can make some nice front-end application with that data later on. This is how I do it: Loading the xml Encoding it into json Making an a...

 
7:25 PM
possible answer invalidation by Sᴀᴍ Onᴇᴌᴀ on question by Bagseye: codereview.stackexchange.com/posts/211319/revisions
 
7:48 PM
@CaptainObvious with yet no code present so I removed that tag...
 
8:14 PM
0
Q: Is it ok to have an argument type of IEnumerable<T>?

StepUpI've seen tutorials of Unit Testing and I've never seen IEnumerable<T> as an argument. Many authors use Repository pattern and services and there is no need to pass collections between the methods. However, my signature of method looks like this: private IEnumerable<Answer> GetPlayerAnswers(IE...

 
8:30 PM
0
Q: Max heap in Haskell

Elmex80sI wrote a (max) heap in Haskell was is balanced after every (public) operation. Not based on any documentation. Focus is on: speed, that is the right time-complexities (not necessarily optimal); easy to understand, so no Maybe's, Monads or symbols a beginner is unfamiliar with. ****...

 
8:45 PM
0
Q: Seeking suggestion on approaches for Finding Isogram Word

AKdeBergAn Isogram (also known as a "nonpattern word") is a word or phrase without a repeating letter, however spaces and hyphens are allowed to appear multiple times. IsIsogram() method takes a string and returns boolean value. INPUT: anik OUTPUT: true INPUT: A nika OUTPUT: false Approach ...

 
@SᴀᴍOnᴇᴌᴀ thank you
 
Jan 3 at 21:20, by Sᴀᴍ Onᴇᴌᴀ
> Yeah, well, you know, that's just, like, your opinion, man.
 
lol
 
9:01 PM
0
Q: Building a Timelapse with ffmpy

campeggAs a 'trying to learn Python' project, I am using ffmpy to stitch together a timelapse from a series of still images. I'd like the script to output a couple of formats for web use. This is what I have: #!/usr/bin/env python3 import datetime import ffmpy import os now = datetime.datetime.now()...

0
Q: VB Script for Excel taking very long time to calculate the values

Rohith GowdaI am writing a vb script on excel below is my problem. I have more than 20 sheets in excel and one main sheet (All Programs with 200 names). Each sheet has column with Names and 24months(Jan18 to Dec18, Jan19 to Dec20). Each sheet names is subset of main sheet Main sheet(All Programs) has 200 N...

 
Is this code working, but just not as fast as you want? If so, then you want codereview.stackexchange.com. StackOverflow isn't really the right place to get code reviews. — Random Davis 53 secs ago
 
9:32 PM
0
Q: c++ compile time counter/accumulator

user190902I could not find a compile time counter/accumulator to achieve something like the following: #define DECLARE_VAR(type, varName) \ type varName; \ ADD_TO_ACCUMULATOR(sizeof(type)); DECLARE_VAR(float, var1); DECLARE_VAR(bool, var2); constexpr int total = GET_ACCU_AND_ADD(0...

0
Q: A clear name for an extension method?

PerpetualJI have created an extension method for the Vector2 type available in the SharpDX libraries. The purpose of this method is to determin if a specified point is occluded from the camera's view and thus is named IsOccluded. Since extension methods are static methods with an additional way to call the...

1
Q: Is this the correct use of abstract classes?

robertFrom what I've read, I should use abstract classes when I want to define behavior for a superclass, and I don't want to instantiate the superclass. So, I'm making a blackjack game in java, and I want a BlackjackDealer class and a BlackjackPlayer class. Would it be okay to make these children of a...

 
Thanks for the tips. This is the toy code I'm using to solve another problem. I think I'm going to try again, this time re-writing the real code to use a ProcessPoolExecutor and loops with a Proxy Object instead of recursion and threads -- I'll try to take advantage of the code review site in the future. — matthiasdenu 24 secs ago
 
10:20 PM
0
Q: Pulls href tags using BeautifulSoup with python

JonAs if this isn't extremely obvious, I am a new coder. My code words, but is quite far from what I think should be the most ideal representation. I'm also not sure if there are unnecessary bits, since I've been trying to get this to work for a few days on and off, so I've started and stopped mul...

 
10:35 PM
0
Q: Multiple Constructors?

PerpetualJI have an object for which I have created five constructors, each with an increasing number of parameters. Since each subsequent constructor adds to what the previous offered, is it acceptable (from a readability and maintenance standpoint) to call the prior constructor, essentially daisy-chainin...

 
@CaptainObvious Generic best practices question. One of "no context", "primary opinion" or "too broad", depending on your mood.
 
11:18 PM
You may have better luck at codereview.stackexchange.comjaco0646 just now
 
@Duga emphasis on the word "may"
 
11:38 PM
0
Q: Counts "islands" of 1s in sea of 0s (2d array matrix)

Ned RedmondThis solution surpassed 100% of submissions for efficiency! My method was to recursively check surrounding values and change any contiguous "land" to "water". Is there a better way to write what I wrote? Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An isla...

 

« first day (2088 days earlier)      last day (1943 days later) »