« first day (2776 days earlier)      last day (1540 days later) » 

00:00
RELOAD! There are 7195 unanswered questions (89.6684% answered)
 
2 hours later…
01:52
Here you are, There is a quite big examples of this codereview.stackexchange.com/questions/61338/…Kreans 38 secs ago
possible answer invalidation by Canh on question by Canh: codereview.stackexchange.com/posts/253206/revisions
02:22
This question should be proposed to: codereviewPaul T. 23 secs ago
03:48
I am aware of the errors, and NO I cannot use Stack Exchange Code Review since the code has to be working with no bugs. I am posting it here for any advice or tips on direction I should take. It was requested and required that I use a 2D array, so why does it matter where it "came from" or the "design" since I stated all relevant information in the text block above. I am student struggling during these COVID times and it was required my mentor that I use 2D Arrays. I am just asking for advice or tips on what I can do to make this work ! :-) — student2666 38 secs ago
0
Q: react, react native refactor component for style

manuelBetancurtI have a button component on react native, depending on the "theme" prop I need to render a different style for the button const OvalButton = ({ title, onPress, theme, style }) => { switch(theme){ case GRAY_BUTTON: return ( <TouchableOpacity style={[styles...

04:40
0
Q: code refactoring

kainatCode refactoring techniques are applied to make the code better. Identify and apply refactoring techniques on the following code: using System; namespace Calculator { class Calculator { public static double DoOperation(double num1, double num2, string op) { double result = double.NaN; // Default ...

05:31
0
Q: Is there a security misconception here?

MinskyI've written a very poor express server to learn about logins. The first time I did this, there was a mistake, someone could just type in the browser /successfullLoginPage.html and be redirected as if the login were successful. Now, I'm writing a similar code for practice, but trying to avoid log...

05:57
0
Q: Program to top-up phone with conditions in Python

CaskyI am fairly new to Python. I wrote a program to take the user inputs which are service, the top-up time, the top-up amount, and exit or stay on the program. Please review my code. And, can my code be organized? I think it looks a bit messy, maybe it can be shorter? First, I wrote everything unde...

Monking
06:22
1
Q: Covid-19 World Case Report Beta 0.1. This is my first program

AgentJRockI am a self-learned programmer and this is my first program. I would really appreciate any critique on my approach. Thank you in advance! These are two files denoted by the file: XXXX.py at the top of the code where the program begins. This should automatically download the who data file to the f...

07:06
Hint: when you write answers, get them right. Your code uses raw types all over the place. If this were a code review for a job interview, you could walk out after showing up with this. Seriously: your answer might sit here for a long time, and many people are going to read it. Only put up really high quality content! — GhostCat 53 secs ago
I’m voting to close this question because it's about code review and should be posted on codereview.seAlon Eitan 49 secs ago
0
Q: PowerShell - fast remove a directory with 10,000+ files

Xeнεi ΞэnвϵςI am sick of File Explorer's super slow deletion speed, so I tried to write a PowerShell script to make deletion faster, and while it does its job, its speed isn't as high as what I intended it to be. So my idea is, while the target directory isn't empty, find its first deepest subdirectory, find...

07:39
0
Q: Phaser implementation in java

user3878073I was Trying out Phaser in java for(int i=1;i<(input.length-1);i++) { var result = (input[i] + input[i+1] ) /2; output[i] = result; } it iterates through i=1 to n-2 , get the average of (i,i+1) and writes it in the output array , and I tried to do it in a multithreaded way ...

08:05
0
Q: Group events close in time into sessions and assign unique session IDs

Tobias HermannThe following is a trimmed-down example of my actual code, but it suffices to show the algorithmic problem I'm trying to solve. Given is a DataFrame with events, each with a user ID and a timestamp. val events = Seq( ("1001", 1), ("1001", 2), ("1001", 3), ("1001", 5), ("1001", 6), ("1002

0
Q: Advent of Code 2020 Day 9 in Python

MarcThis is a solution for part 1 & 2 of Advent of Code 2020 Day 9. Given the example input sample.txt: 35 20 15 25 47 40 62 55 65 95 102 117 150 182 127 219 299 277 309 576 Part 1: find the first number in the list (after the preamble) which is not the sum of two of the n numbers before it. n is th...

08:40
Questions here on SO are required to be more specific then this. Having a general discussion about your design is better suited for some other site. I would recommend code review, but that means you would need to write some code first. — super 22 secs ago
09:21
0
Q: optimize list comprehension to find index of array element

shamalaiaI wrote a list comprehension to find the indexes of an array where its values equal the values contained into another array: import numpy as np import pandas as pd dates = np.asarray([pd.to_datetime(x) for x in['2020-01-01','2020-01-02','2020-01-03']]) other_dates = np.asarray([pd.to_datetime(...

0
Q: How to unit test a method returning (some) string?

krenkzI am unit testing this method public String createEncodedImgString(BufferedImage bufferedImage) throws IOException { ByteArrayOutputStream output = new ByteArrayOutputStream(); ImageIO.write(bufferedImage, "png", output); String encodedString = Base64.getEncoder().encodeTo...

09:47
0
Q: sent JS variable to PHP

MDNI want to save each score in the user profile by sending a JS variable to PHP via AJAX. This is the code for showing the user’s score. I want to save the content of variable showScore and sent to the database. // show score as "score/possible score" var showScore = "Your Score: " + calcScore +"/"...

10:15
As @MarsAtomic already commented, posting this on codereview would sure be more helpful. Stackoverflow is meant for single-aspect questions, but you'd surely benefit more from an overall review of your code. — Ralf Kleberhoff 44 secs ago
10:38
-1
Q: Javascript - find longest occurence of the same number

NorksHow could an user input their numbers, for example : "122113333443" and I needed to output "3333". If they again input something like "1224" I then needed to output "22". How would this be possible if I don't know which numbers they are going to input and how the code would look like? I am a tota...

11:04
0
Q: Input field does not work and I can't type text in it

MDNI have a search box with a search field and also a button, but this input field does not work. It doesn't allow me to put any text. I couldn't find a reason why. Here is my code (CSS and HTML). .search{ width:500px; height:350; margin:-350px 0px 0px 800px; border: 3px solid white; display: inline...

 
2 hours later…
13:12
0
Q: Beginner's Snake AI with NEAT

BruxioI'm using python and the genetic-algorithm NEAT to create artificial intelligence that is able to properly play the snake game. What I've got this far is an AI that is able to eat only 3/4 'apples' before dying into some wall. The inputs I'm giving to the AI are: [danger_up (1 if block ahead is ...

-1
Q: VAE_2 gets good images, but blur

RobertHere is the full code : https://colab.research.google.com/drive/1KZZuIa7Lk13ImZLJ3b-kxMfcveOPaWvN?usp=sharing Here is the article : https://arxiv.org/pdf/2009.07047v1.pdf I tried to implement the VAE_2 from the above article, but I get only blur images after 200 epochs. The model converge to 1 an...

13:43
You should look into (nested) loops. Btw, if you have working code and you're loking for improvements, you should post your question on codereview.stackexchange.com instead. — Mike Scotty 14 secs ago
14:03
0
Q: Make Flutter app on Windows a drop target to accept files

technolionMy aim was to provide functionality for a Flutter app on Windows to accept drag-and-dropped files. Flutter apps are written in Dart and compiled to native code, but since this is a cross-platform framework there needs to be a native part - the runner app - which kickstarts the Dart part of the ap...

14:29
0
Q: Quad function outputs hundreds of values

user234384I'm trying to use the 'quad' function for evaluating an integral (that has no analytical solution). However, when I do use it, it gives hundreds of identical outputs, cluttering up the console. So instead of simply returning "0.0178812568758457, 6.333593604965713e-16" as it should, it returns the...

 
1 hour later…
15:41
Greetings, Programs.
16:11
0
Q: ❌⭕❌⭕ Tic-Tac-Toe with Python 🐍

esker-luminousI've been working on a tic-tac-toe game with Python. It's almost done but I can't replay when I say yes or any of the available options (y, Y, yes or Yes). I do have a play_again() function but still, I can't replay. My program: does ask if I want to play again does take my input (yes or quit) d...

Monking
@CaptainObvious @Mast it keeps going...after taking a peek at the OPs profile I'm reminded of another user that uses many emojis.... "Not that there's anything wrong with that"
@CaptainObvious RBA
16:34
@CaptainObvious ಠ_ಠ ?? CNWAI?
> I have not found a single issue with the code but for some reason, the AI is not able to behave properly
0
Q: printing multiple array lists in a records program

Evan SalmonI'm doing a program that creates an employee records system that includes user inputted, name, id#, annual salary, and start date. but I can't seem to figure out how to store multiple records that have two separate lists. add code ``` emptyCheck();//checks to see if text boxes are empty ...

@SᴀᴍOnᴇᴌᴀ Same user as the snakey one.
yes... perhaps I should have made that sentiment explicit
shrug
When I'm on desktop, it doesn't take long to figure out :-)
17:01
Monking
17:28
0
Q: A program to check the age of a movie attendee (C# Yellow Book excersize)

NomadicAquaticI am currently working through the C# Yellow Book, as a first step in self directed learning. I'm supplementing that with C#8 In a Nutshell, and general searches of the Microsoft C# language references, StackOverflow etc. Working from multiple sources, however, results in sometimes conflicting co...

-1
Q: my function returns none

ron im beginner to python. i know none happens when the function when function dont have a return statement. i have tried reviewing the max2 function i created but i cant notice the problem. if a > b: return a else: return b ```

0
Q: Handling System Check message identifiers with Django

André FratelliDjango implements a System Check framework that enables apps to perform checks on settings, runtime, etc. When creating an app, one can plug checks with the framework by following some requirements, one of them being how errors are reported. The integrations are actually ok, but the error managem...

I think this maybe better suited for CodeReview -- there is nothing wrong with your code and you don't seem to have a problem you are trying to fix. I think keeping them in the same method is fine. Otherwise you're going to have a method that calls another method which is redundant. — Seth Kitchen 14 secs ago
17:49
@SᴀᴍOnᴇᴌᴀ I stopped being invincible a long time ago.
 
1 hour later…
18:52
@CaptainObvious Well, that sucks.
I thought about replying here similarly... like "our community returns nothing"
Post crap, get send home.
You will not pass GO, you will not receive an answer.
Garbage in, Garbage out
Burger King here in USA has (had) a slogan "Have it your way" - is there a similar slogan for BK in NL?
I see this on burkerking.nl:
LOL
...
@SᴀᴍOnᴇᴌᴀ Current joke is "Zet de kroon op je phone".
Literally translated: put the crown on your phone
King, crown...
19:36
0
Q: A recursive_transform_reduce Function for Various Type Arbitrary Nested Iterable Implementation in C++

JimmyHuThis is a follow-up question for A population_variance Function For Various Type Arbitrary Nested Iterable Implementation in C++. Thanks to G. Sliepen's answer, I am trying to implement the mentioned recursive_transform_reduce function here. The usage description Similar to std::transform_reduce,...

19:58
I was intrigued to see BK in Australia branded as Hungry Jack's and somebody believed it was because AU is a British commonwealth, yet in NZ, also a commonwealth country, the name was not changed
@Meticulous What Charlie Armstrong said is paramount: this isn't a code review service, so when asking a question, having a minimal and reproducible example makes it more likely that the general principle behind your question is obvious, which makes it potentially usable not only for you but for anyone with a similar issue. A good trick is to present your questions as if you were asking a friendly professional with very little time to give: complete, straight to the point, clear question and no pollution from unrelated stuff. The other details are all addressed in the previous links. — laancelot 45 secs ago
oh... according to this page:
> When Burger King got to Australia in 1971, it discovered there was already a local restaurant there called Burger King.
> So the local Burger King franchisee — who was Canadian, by the way — chose to go with the name Hungry Jack's instead. And when you walked into a Hungry Jack's restaurant, it was virtually identical to Burger King locations in every way — except name.
-1
Q: Add an image with radio labels

Zara KhanI have created 2 radio buttons with labels and used images instead of the radio button. On the selected label the image becomes visible otherwise it should stay hidden. I'm able to make it work but the problem is that the labels are also hidden. I want all the labels to be visible. and only the i...

-1
Q: Powershell delete if folder does not exist

Alexander ArevaloI am trying to write a powershell script that will allow me to delete some files older than 30 days inside subfolders (e.g. Folder 1 and Folder 2). Additionally, I want to be able to delete folders when a specific folder does not exist. For example, from my example, I want to be able to delete th...

possible answer invalidation by Arpit on question by Arpit: codereview.stackexchange.com/posts/253234/revisions
20:27
-2
Q: C++ small string brute-forcer

JeniaHere is the implementation of C++ brute-force class from newcpp library: class BruteForcer{ private: const char start = 1; const char end = 0; string s = ""; void PlusPlus() { int a = 0; while (true) { if (a > s.length()) { s += start;...

20:52
0
Q: Script to find and auto-disable interfaces on Cisco switches with either no traffic no traffic older than 4 weeks

BlinkydamoI am new to Python, the script below provides the desired output and completes the task as required. I would like to know if there is any better ways of completing what I have written and any ways of speeding up the process? Thank you for looking. from netmiko import ConnectHandler import sys #...

21:18
1
Q: Finding integer with the most natural dividers

JoshJohnsonProblem description: You are given a segment [568023; 569230]. Find integer within given range that has the most natural dividers. If 2 or more integers are found, return the lowest integer among them. Solution: def allnums(k): cnt = 0 for i in range(2, k // 2): if k % i == 0: ...

21:30
@Duga OP added complete code to output data...
@AJNeufeld I suppose the OP forgot to write plt.show()Star Man 22 hours ago
It currently has 2 VTC
22:09
-1
Q: Why else code isnt working? (Beginner)

mcaninceI wonder why else code isnt working I tried convert to number but still doesnt working. function KareAlan() { var kare1 = document.getElementById("kare1") .value; var kare1n = parseInt(kare1, 10) if (typeof kare1n == "number") { kare1 = kare1 * kare1 * kare1; document.getElementById("...

22:34
1
Q: Matching brackets in Rust

AngeloI implemented the solution to the classic Matching Brackets problem: Given a string containing brackets [], braces {}, parentheses (), or any combination thereof, verify that any pairs are matched and nested correctly. The code should be correct since it passes several test cases. I would like to...

23:00
1
Q: RUST: How can I optimize this password cracking algorithm?

TransmissionsDevI made this project in my free time to try to crack a 4x hashed md5 with a couple of hints but I'm looking for ways I can optimize this algo because it's pretty slow and I know you could probs use threading or some other ways to increase speed. If you can even point out some minor ways to increas...

23:17
@JLeno46 when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the post above would be closed as off-topic because the code needs to be embedded instead of just in a link. — Sᴀᴍ Onᴇᴌᴀ 1 min ago
@DamianTułacz please read the on-topic page before you post - i.e. ensure you include the code to reviewed directly in the postSᴀᴍ Onᴇᴌᴀ just now
23:51
0
Q: Tic Tac Toe using the __init__ constructor

esker-luminousI recently learned about classes in python. I only have a brief understanding of them, but I think it's good enough for me to write a tic tac toe program (been working on this for the last week or so). My title may be a little misleading (again, because I only have a brief understanding...) but I...


« first day (2776 days earlier)      last day (1540 days later) »