« first day (2495 days earlier)      last day (1537 days later) » 

12:00 AM
RELOAD! There are 6409 unanswered questions (90.1283% answered)
 
12:34 AM
0
Q: Heap Sort in Python

prabhNOTE: I am beginner in Python I learnt the Heap sort today and tried my own implementation using Python. Can i get feedback for my code and areas of improvement. I have tried to add comments inline, but if still something is unclear, then i will add more comments. def max_heap(listmax): ...

 
12:45 AM
If it works and you want advice then this is better suited to "code review". — John3136 28 secs ago
 
 
1 hour later…
1:50 AM
0
Q: What can be improved in this C selection sort code having hard coded array?

Pranit Kotharivoid selectionSortC() { //Not wasting time inputting arrary int arr[6] = { 2,4,-22,4,2,1 }; size_t minIdx = 0; int len = sizeof(arr) / sizeof(int); for (int i = 0; i < len; i++) { for (int j = i + 1; j < len; j++) { if (arr[i] > arr[j]) ...

 
2:19 AM
Oh dear, none of the crypto questions use anything like a secure protocol it seems. Maybe even worse than on StackOverflow.
Well, ok, there's one from jbtule which is alright-ish.
 
2:46 AM
I'm voting to close this question as off-topic because open ended "what's wrong with this code" questions are off topic for SO. They are, in general, better asked on codereview, but this question as it sits is not a good fit for codereview either, because it lacks sufficient context for anyone to know what might be good or bad about it. — Wayne Conrad 47 secs ago
 
2:56 AM
This question should be closed, doesn't work and is beyond recovery (it even generates file streams that aren't used).
1
Q: Simple Java Encryption/Decryption

Bob the BuilderI am a beginner at Java programming, and I'm always curious about how to make code more efficient or learn what I am doing wrong. I just started learning about cryptography, and this is a simple cryptography example I made. This code adds the number 100 after each character. import java.io.*;...

 
 
1 hour later…
4:06 AM
0
Q: This is a sorting algorithm simulation program

TrippixConfigs.java package main; /** * @author Daniel * * A load of configs for the application. */ public class Configs { public static final String APPLICATION_NAME = "Sorting Algorithm Animation"; public static final int APPLICATION_WIDTH = 1280; public static final int APPLICAT...

 
4:44 AM
0
Q: Optimizing a bash script

ItalianI have a bash script that searches for updates for Gentoo . #! /bin/bash emerge --sync &> /dev/null echo "$(emerge --pretend -avuDN --with-bdeps y world | grep "Total" | awk '{print $2}' | tail -1)" I don't want to have any output in the stderr and stdout stream , so when running this s...

 
Monking
@MaartenBodewes Odd, looks like it should've been closed years ago then.
 
5:06 AM
Monking
 
5:26 AM
Ben Popper on March 03, 2020
A Nigerian financial analyst with a habit of getting lost connects remotely with a Siberian app developer. Together, they would go on to build a mapping app worth $1 billion, all without ever meeting face to face.
 
 
2 hours later…
7:41 AM
That is not the purpose of Stack Overflow. If that is what you want then your question belongs in Code Review. — braX 40 secs ago
 
8:01 AM
BTW: you could also ask on Code Review for other suggestions — furas 48 secs ago
 
8:15 AM
possible answer invalidation by Andy on question by Andy: codereview.stackexchange.com/posts/238234/revisions
Please read the Code Review FAQ on asking questions before posting there. — Mast 32 secs ago
 
8:42 AM
If the code is working as intended this would be better suited for Code Review. — mkrieger1 38 secs ago
oh, i didnt know that a code review exist — marijanovic 44 secs ago
 
0
Q: Reasoning about Dynamic Programming's Time Complexity?

Somya AgrawalI'm currently learning about Dynamic Programming and solving a "coding question" related to the topic. Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determin...

 
 
2 hours later…
10:28 AM
0
Q: Basic abstract graph implementation in Java

Rahul WadhwaniI am trying to write a graph implementation in Java. I would appreciate it if someone can please review the code for me and give constructive feedback. import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; public class Graph { private int V; // Number of vertices ...

 
10:38 AM
I'm voting to close this question as off-topic because this questions belongs to Code ReviewJorge Fuentes González 1 min ago
 
Monking.
Oh, thank goodness for the edit priv :)
 
There's a Stack Exchange Site just for Code Reviews. I'm not sure how to flag this to be moved, but that might be an option for you as the author? — IMP1 55 secs ago
@JorgeFuentesGonzález — No, it doesn't.: "Code Review is for open-ended questions about code that already works correctly (to the best of your knowledge). Questions seeking help about debugging or understanding code are off-topic for Code Review, and may be on-topic for Stack Overflow." — Quentin 1 min ago
 
10:59 AM
@MaartenBodewes Yes I am quite aware that it is not on topic, I'm more confused as to what I should choose to have the question closed. Before I could just pick an option for another stack exchange, I recall being able to select CR but I may be misremembering
 
0
Q: Recursively Convert Roman Number to Integer

Moritz WolffI'm practicing recursive functions and I would be glad to receive some feedback for the following Python code I wrote. I did several tests and the function yielded correct results but I wonder if it can be written more concise or if it can be criticised in some way. Your feedback would help me be...

0
Q: C# calculate total time worked with TimeSpan

tinamouSo there is an existing codebase which calculates the total time worked per month. What the code is doing: iterates through all the working days entries retreives the value of net work time which is in format: HH:mm calculates the minutes out of the net work time string formats the net work ti...

 
@Gemtastic It's from '16, no need to worry about migration anymore.
Just mention that the guy should follow Oracle's tutorial on streaming.
 
@MaartenBodewes you misjudged the #ref on that reply :D
 
Oh, which one should it be then?
 
11:17 AM
see the small arrow before the message? if you click that, you get scrolled to the message that the reply is intended for
 
Oh, yeah, always forget about that thingy.
Apologies.
 
-1
Q: How to rewrite abstract class without templates

Prostoi ChelovekI am currently working on a project which needs to load data from different kinds of datasets. Therese datasets have different data fields and different ways to load images. And i want to make switching between datasets as simple as possible so i decided to create an abstract class and derive oth...

 
how can you have an empty graph, add an edge directly specifying two vertices, and then add 1 to the count of vertices? Is it me, or is that next to impossible to overlook?
 
welp
 
12:05 PM
possible answer invalidation by John Spring on question by John Spring: codereview.stackexchange.com/posts/238263/revisions
 
12:16 PM
@Duga rolled back
 
0
Q: Functional Utility in C++ (Curry, Partial Binding and Pipeline)

Daniel Frederico Lins LeiteTLDR I created a curry/partial apply "lib. My request for "code review" is, what possible improvements I need to achieve "release quality", if I wanted to release this as a lib? You can see the end result here. https://godbolt.org/z/SnFnFt Complete story This weekend I caught myself testing...

 
12:33 PM
@Vogel612 Is the bot registering those comments or is that just for the eavesdroppers here?
 
it's just for the eavesdroppers
 
Sun! Out! Me! Later!
 
12:58 PM
It's surprisingly sunny indeed. Hopefully it stays like this the rest of the week, got some windows to replace.
 
1:20 PM
0
Q: Genetic Algorithm to recreate black and white image

Jack ReillyI've created a genetic algorithm which tries to recreate a generated black and white image. Link to Repo: https://github.com/jackpbreilly/Recreate-Image The algorithm is extremely starting to get slow as I'm increasing the size of the image (which make 100% sense to me why). But I'm wondering h...

0
Q: Nodejs converting sync to async

nz_21I have two files: // boilerplate to import all models in the folder // taken from sequelize website // make sure to have a method named "associate" in the class Methods // this is used to build the association between various tables "use strict"; var fs = require("fs"); var path = require("pat...

 
1:50 PM
possible answer invalidation by ryyker on question by ryyker: codereview.stackexchange.com/posts/188630/revisions
 
2:03 PM
@Duga seems to not be an invalidation
 
2:19 PM
@Vogel612 I need a nice translation for a folder which should hold items which hadn't processed because their target isn't accessible. In english I would name it Retry-Folder but Wiederholungs-Ordner sounds strange. Do you have an idea?
 
maybe "Zurückgestellt" or something like that?
 
Doesn't sound better :-( thanks anyway
 
or you can maybe work something out with the longer "Erneut Versuchen", but that's just as clunky, if not worse
 
I just hate UI stuff
 
0
Q: In general, how to spot if code is efficient/inefficient?

wanjoSo I am new to programming, and I wanted to ask, is my code inefficient / poorly written? Here is my code below for an exercise I just did. The point is for the user to guess the number 0, but it also: Calculates the average number Calculates the number of attempts Gives the sum of attempts ...

 
2:23 PM
Until now it had been named "Lokaler Emailordner" but now it should handle other systems as well. Is there german word für cache?
"Speicher" doesn't sound good neither
 
Zwischenlager or Puffer maybe?
 
Maybe we should sell this application only to english speaking people? ;-)
 
2:37 PM
@Heslacher In English one phrase I would consider is "Waiting for Target", does that perhaps help you?
 
@DerKommissar that kind of implies actively waiting, which is not the case here
 
Fair I suppose, maybe "Target Unavailable"
Don't know, just throwing ideas out, good luck.
 
Thanks. The word should be used in a UI as a label for a folder.
I think I will just name it "Wiederholungs-Ordner" and if somebody rants he/she should provide a better name ;-)
 
3:03 PM
0
Q: Custom manipulator for changing at what characters a std::istream split words

L. F.Introduction By default, input streams (e.g., std::cin or a std::istringstream) split words at space when using the >> operator. If we want to split at other characters (e.g., \n), we need to use std::getline: std::vector<std::string> lines; for (std::string line; std::getline(std::cin, line);...

0
Q: How can I reach 100% CPU utilization when using mutliprocessing?

SuperKogitoI am trying to accelerate my python3 script using multi-processing by running 4 processes simultaneously. However, my processes never reaches 100% CPU utilization. The core of my code simply reads a .mp3 recording and do some recognition on it using scikit-learn then saves the results to a .json....

 
Teresa Dietrich on March 03, 2020
By creating a centralized knowledge management ecosystem, companies are able to build a natural and sustainable culture of transparency, encouraging collaboration by improving access to information.
 
3:22 PM
This is too abstract and vague. You may want to consider posting code which can be reviewed on codereview.stackexchange.com. — deceze ♦ 16 secs ago
 
3:50 PM
possible answer invalidation by prabh on question by prabh: codereview.stackexchange.com/posts/238277/revisions
 
4:04 PM
@Duga rolled back
@MaartenBodewes good catch
 
4:33 PM
There is a Stack Exchange community dedicated to code reviews. I think this question would fit there better than here: codereview.stackexchange.comMatthias Nicklisch just now
 
@MaartenBodewes I just noticed you've been taking out quite a few zombies - good work!
 
4:48 PM
The community seems to prefer that questions like this be asked over at codereview.stackexchange.com, but of course, read their help first to make sure you present it correctly for that site's rules. — T.J. Crowder 26 secs ago
 
@SᴀᴍOnᴇᴌᴀ Thanks. Some zombies seemed more alive than expected, fortunately :)
 
1) For better help sooner, edit to add a minimal reproducible example or Short, Self Contained, Correct Example. Hard code data to replace the DB. 2) See also the File Browser GUI for general tips. (It does not do the exact task required here, but at one time or another it does have an array of files. It seems odd that you would need to get the files from the tree, given the tree is usually built from a file array.) — Andrew Thompson 50 secs ago
 
0
Q: Chart Based Animations In Excel VBA

Taylor ScottI've been working on re-writing comfortablydrei's answer to this PPCG Question regarding creating a illusion animation in pure Excel VBA. So far, I've been able to rewrite the code to function in VBA, and to get the cycle time for the animation down substantially, but have run into an issue where...

 
5:12 PM
Hi 4ever an Amateur, welcome to StackOverflow. If there isn't an error or bug occurring, this question might be better suited for codereview.stackexchange.com. — Brydenr 30 secs ago
 
-1
Q: Search a sub-string in .txt file in java

ElkaderI would like to search a sub-string in txt file , so all things are well but if i would to search sub-string that Half of it is on the first line and the rest is on the second line for example : String to look for : and the rest the file text contain : Half of it is on the first line and th...

0
Q: Graphing a spiral

urban pečolerThis program is made, so it graphs a spiral with N steps. What else could I add to this program? Can this code be improved? import matplotlib.pyplot as plt N = 100 arr = [(0, 0)] x = [] y = [] for u in range(1, N): for i in range(1, 5): if i % 4 == 1: # firs...

 
@CaptainObvious might be asking for a rewrite of someone else's code...
 
5:30 PM
possible answer invalidation by Elkader on question by Elkader: codereview.stackexchange.com/posts/238321/revisions
 
Monking
 
@Duga pfft the only answer post is a LQ post by the OP... no invalidation there, and question likely off-topic anyway
 
5:51 PM
Given your recent CR post it appears you switched to using https.get() instead of wget. Do you still want to try using wget? — Sᴀᴍ Onᴇᴌᴀ 28 secs ago
 
6:03 PM
@MaartenBodewes - heh nice:
10 milligrams isn't that much... Seriously use MB, and show some effort like loading an using an actual file... — Maarten Bodewes 10 mins ago
would it be worse if the OP used ounces?
 
6:42 PM
Once you limit it by sentence boundaries, that also limits the size of the tuples you are building for some large N. It could just be the dataset, or there could be an inefficient python operation hidden in the loop -- but this discussion is more suited to codereview.stackexchange.com after you fix up those details. — Kenny Ostrom 22 secs ago
 
6:55 PM
0
Q: Web scraping dynamic content

Aaron SHi I'm fairly new to coding and would appreciate some feedback on the code. This is for a site that has a dynamic login page and infinite scrolling. I wanted to use scrapy not necessarily because it needs the framework, but because I hadn't done infinite scrolling and dynamic content with scrap...

 
Also if you are looking for a code review then you can always go to codereview.stackexchange.comRenato Gama 20 secs ago
 
@Duga unless you are banned from the site...
 
7:14 PM
0
Q: Loading 300 images on a custom spinner with images

CDrososI would like to ask if this is a bad idea. I have a spinner that it has a custom layout with 5 imageviews and 1 textview I would like to load it up with 80 rows, so it will display around 300 images, (all images are within the app) Is this a really bad idea? All the images are loaded this way: ...

 
7:47 PM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.commaccettura 1 min ago
 
8:50 PM
@SᴀᴍOnᴇᴌᴀ I dont think the code is hypothetical at all, OP indicates this is an example of their current code. Its obviously not their exact code but all that is important is demonstrating the relationships between the classes. Since the code as implied by the OP does currently work this seems like a clear candidate for CodeReview. Either way, it certainly does not belong here — maccettura 10 secs ago
 
9:08 PM
0
Q: Using policy pattern for bad construct architecture

chtimyI front to an architecture I can't change for now, but I need to resolve on problem about it. This is an code example of the problem: class A { void f(var ratio) { f(ratio); } abstract void g(ratio); } class B : A { void g(var ratio) { otherMethod(ratio) } class C : A ...

 
9:44 PM
This would be better suited for Code Review. — devlin carnate 48 secs ago
 
10:24 PM
0
Q: Merge two DataFrames with key over-write

Seanny123I have implemented a custom merge of 2 pandas DataFrames, but only mutates the first. The new columns will be the union of the original columns and the new keys will be union of original keys. Additionally, the second DataFrame values will overwrite the first DataFrame if the keys match. def me...

 
10:56 PM
You’re probably more likely to get code review feedback on codereview.stackexchange.comvalosip 32 secs ago
 
11:21 PM
-1
Q: 100DaysofSwiftUI - Project 1 - Challenge 1

Kareem MoustafaThis is my code to solve the challenge in 100 Days of SwiftUI by Paul Hudson. This is the first challenge in the series and I chose to convert the temperature units. I need to ask, is this code readable by you and if anything needs to be changed/modified in order to make more efficient? import ...

 
11:39 PM
@idclev463035818 but not answers, for a OP who really wants to cross the street with a shuttle, anything not related to shuttles is comment. As for those potential bugs which can be given rise by pointers, that's a OP should learn further. For the time being the OP may just not have met the very correct senario, yet it should not become a reason for him to stop learning managing pointers. You and the OP stand at different height, but that's also not a reason to turn a question into code review. If your theory really works, then I'd better tell him to use some math library, isn't this — John Ding 27 secs ago
 

« first day (2495 days earlier)      last day (1537 days later) »