« first day (2303 days earlier)      last day (1697 days later) » 

12:00 AM
RELOAD! There are 6204 unanswered questions (89.9256% answered)
 
0
Q: S3Zilla - A GUI/Tkinter based file-transfer program coded in Python

m.a.d.catHere's the repository. It uses the S3 API to transfer files. Multiple files can be selected for upload/download. The windows version is basically the same except for some of the Tkinter widget sizing. Enjoy! #! /usr/bin/python3 from tkinter import * from tkinter.filedialog import askdirectory ...

 
12:16 AM
Firstly, this is more a code review question. Second your code is "chopped" so much that it would be difficult for anyone to make sensible suggestions. — Peter 43 secs ago
 
 
1 hour later…
1:23 AM
Can you define "more efficient"? If this code basically works, it might be a better fit for Code Review SE, but be sure to read on topic first. — ggorlen 7 secs ago
 
 
2 hours later…
3:45 AM
0
Q: Reading serial data from Arduino into Python every 100 ms

HunterI am trying to send data from an Arduino into Python via USB every 100 ms. What improvements can be made to my code? I feel like it is kind of bloated and can be better written, but I'm not sure which improvements should be made. read_arduino.py import serial def _has_digits(string): retur...

0
Q: Optimizing random string generator that 'guesses' user inputted word - Python

river shenMy code: import random as rand import string def main(word): len_word = len(word) ntries = 0 while True: letters = [] for i in range(len_word): letters.append(rand.choice(string.ascii_lowercase)) ntries += 1 b = ''.join(letters) ...

 
 
2 hours later…
6:00 AM
Absolutely Awesome!!! So awesome I had to jack your idea...lol. This is my version: Factory Class That Uses Reflection to Instantiate Objects by Class Name. — TinMan 52 secs ago
 
0
Q: Factory Class That Uses Reflection to Instantiate Objects by Class Name

TinManIn this SO post Dynamically choose class from string Alexander Platonov creates a Function on the fly and then uses Application.Run() to instantiate an Object by it's class name. Eureka Reflection in VBA!! How evil! How inspiring!! So that began my journey into the darkness. My quest for powe...

 
 
1 hour later…
7:08 AM
Hi ! Anyone here ?
 
Usually, yes.
 
I have a little program I wrote that I would like to post here, but I'm not sure it is acceptable
it is all in french (variable name and comment), should I translate before posting it ?
 
It helps with getting answers to post code that's in English, but it's not a requirement. One of the answers to your question would probably indicate that it's better to code in English since that makes it easier to share your code with others.
 
Ok thank you :)
The other question is about size : the project has 9 files/ approx 1000 lines in total... Can I post all of it, or should I just post the important part (main classes, tricky part I had trouble with ?)
 
8:05 AM
@sayanel You can include only the important part, as long sufficient context is provided . If the provided code calls some method that's not included, your question might be considered off-topic.
@Mast Are there any other tag combo's that require to be tagged together other than python-x-* / python? For instance, should Bash and Powershell also be linked to Shell?
 
@sayanel 1000 lines shouldn't be a problem. We have a character limit of a bit over 65k and I doubt your question (including code with accompanying text/description) is going over that.
@dfhwze If there's spare room, why not.
 
8:22 AM
0
Q: Managing Angular subscriptions

NikitaThere are different methods to get data from server in Angular application: Get Observable from the service and subscribe to it at component Create Subject at the service and subscribe to the Subject at component Both of this methods work for me but I can't understand which should I use. Fi...

1
Q: Network helper class with retry logic on failure

sfarzosoI wrote an helper class which allow me to request the body content from a site that is created by AJAX, for doing so I'm using Puppeteer Sharp, this is the class: using System; using System.IO; using System.Net; using System.Text; using System.Threading.Tasks; using PuppeteerSharp; namespace Ap...

 
8:36 AM
Thanks @ggorlen for your explanations about your code review. I was wondering if I want to put a second input for the text, how can show it under the first line. Because I tried with creating variables like ``` var userInput2 = document.getElementById("user-input2"); [...] var text2 = userInput2.value; ``` But I want a different font and a different size for this one, so variable textSizePx won't work for the second input. Even fillText() won't work for the second input. By the way, sorry for my messy code. I will improve myself. — ParkerIndustries 6 secs ago
 
9:22 AM
1
Q: All-core MediaWiki website upgrade script

JohnDoeaI wrote the following Bash script to upgrade All-core MediaWiki websites (no added extensions/skins or images - besides logo image). I already tested the essence of this script and it worked for me; MediaWiki was upgraded from 1.32.0. to 1.33.0; yet I'd be glad for a review: #!/bin/sh date="$(...

 
10:01 AM
-1
Q: Discord.py commands ext keeping state

Vítek PeterkaI need to keep state in my Discord.py bot, and I need to save it to a file every time it changes. I can either use global variable, mutable data type or load it from the file every time I need it. Which of theese solutions is the best? Are there any I didn't think of? Functions load() and save()...

 
 
1 hour later…
11:18 AM
When a chat-discussion becomes no-longer needed (e.g. post is updated in response) I always delete my comments and then flag the other parties' as no-longer-needed. Is this the right thing to do? Would it be better to just flag the other parties, and let the mod workout that it should all be deleted when they can see the whole context? (is it more effort for a mod to work out what has happened when half the discussion disappears, or to work out which other comments need deleting as well?)
Now that I think about it, should I flag all no-longer needed comments, or just the first? (normally I would flag the first of each 'conversation')
 
0
Q: Photo rename by Exif date and group into folders with a threshold

Stefano d'AntonioI have written this tiny F# project yesterday, but I am a bit rusty and I would like to know if there is anything I can refactor and make more elegant. open System open System.Collections.Generic open System.Globalization open MetadataExtractor open MetadataExtractor.Formats.Exif open System.IO ...

 
@VisualMelon If all comments should be deleted, use a custom flag to indicate as such on either a comment or the question.
Some moderators prefer that over flagging them all as obsolete one-by-one.
It has something to do with how they pop-up in their system.
 
OK, so they don't mind reading my ill-formed English? I assumed it would be easier to flag as not-needed, since they will presumably have to figure out the context anyway, but I'll try to remember to write an actual explanation in future.
 
@VisualMelon Messages I've used in the past go like: "All 3 comments are obsolete."
 
11:33 AM
@VisualMelon From Could we have some consensus on how to flag bunches of obsolete comments? on Meta Stack Exchange: “Use a custom flag when all comments on a post are obsolete.”
 
Monking
 
@VisualMelon I've posted a question asking this before, you can delete your comments as mods can see deleted commets, if you only flag the other persons your flags could stay. But I remember a mod saying to Custom Flag the post to nuke them all like Mast and Martin have said
 
12:21 PM
Thanks all for the references.
 
12:38 PM
0
Q: Uri tokenizer as a simple state machine

t3chb0tI was feeling like writing a new Uri parser. The previous one was too limited and wasn't able to parse the authority part. This one is also based ond the pretty image here and can tokenize all parts. I drew the image as an ascii art below. Core The implementation has a single method Tokenize t...

 
 
1 hour later…
2:02 PM
for what it's worth: the more sorting out you do for us, the easier it is for us.
so if everything's unneeded you can flag every comment one by one (which is tedious), or use an "other" flag
otherwise cleaning up after yourself is something you can do, but don't need to
flagging your own comments isn't a thing in the interface IIRC
 
Having read the linked documents, I get the impression that "delete your own and flag everything else" is generally deemed a good idea, unless there are many comments, in which case a custom flag is in order.
 
yea, that about sums it up
 
Also, if you're asking how to improve working code, then perhaps this is perhaps better posted on the Stack Exchange Code Review site, but before doing this, you will also want to read the Code-Review help site, especially its How to Ask link. — Hovercraft Full Of Eels just now
 
2:36 PM
1
Q: Find text between the first time the strings appear in source code

Pricylla Daniely Gomes do CoutI have a page that I access the source code of it, I need a part of the source code between 2 strings that appear on the source code more than once, but the text I want to extract is between the first time these 2 strings appear. sourcecode = requests.get(url) r = sourcecode.text string1 = '",...

 
3:16 PM
-1
Q: Testing for odd and even numbers between 1 and 10

AdemolaI wrote this code to check for numbers between 1 and 10and it's not working well. Here is the line of codes: #include <studio.h> #include <stdlib.h> Int main () { Int x; x = 1; While (x <= 10) If ( x %2 ==0) Printf ("it is an even number\n"); Else Printf("it is an odd number \n"); x = x +1; ret...

 
3:55 PM
0
Q: Introduction to Haskell: Validating Credit Card Numbers

grooveplexI have implemented the introductory challenge of University of Pennsylvania's CIS 194: Introduction to Haskell (Spring 2013) course. I have added the most important information of the problem statement below, and the full assignment is available as a PDF on the course website. Problem statement ...

0
Q: Generic linked list in C

vesiiI have created a new struct which represents a linked list and two functions listDestroy and arr2list. The second function gets a generic array and converts it into a list. The code: typedef struct List { struct List* next; void *value; } List; void listDestroy(List* list, void freeElem...

 
4:07 PM
Mmm you're smart @Vogel612 :)
I'm working on something for OGame and I want to spend X units on my defenses and I do that with a ratio of RL:LL:HL:Gauss:Ion:Plasma of 10:10:3:2:2:1
how do I figure out what to build
Mm, actually, if I divide everything by the most expensive unit then I get a ratio of 1:1:0.3:0.2:0.2:0.1
I can take the units value of those added together, and then divide my units I want to spend by that value
I think I solved it already :)
Thanks rubberduck!
 
 
1 hour later…
5:25 PM
possible answer invalidation by Geza Kerecsenyi on question by Geza Kerecsenyi: codereview.stackexchange.com/posts/226704/revisions
 
 
1 hour later…
6:32 PM
0
Q: Python script converts a subset-sum instance into a unary-ssum variant

Travis WellsI am done with my amateur project for subset-sum. This python script is meant to simulate a poly-time (or actual poly-time) conversion from binary into unary. # This algorithm is for the purpose of converting # Binary integers into unary numbers. # I tacked up a working code with a google search...

-1
Q: This game is (3 D) 2 D perspective hold the shield out with left control then press Q and deal damage

Shelby Tyler// [![enter image description here][1]][1] // This is my script so far else { moveDirection = Vector3.zero; } charContr.Move(moveDirection * Time.deltaTime * dashSpeed); } I think what I need to fix goes after this line

 
6:52 PM
0
Q: static_vector: a vector with stack storage

L. F.In many cases, we want a variable-size array like std::vector, but we know an upper limit on the size. In such cases, the vector can be allocated on the stack. We have been doing this in C: // don't review char a[100]; fgets(a, 100, STDIN); The problem is that the array doesn't know how many...

 
7:10 PM
possible answer invalidation by oscilatingcretin on question by oscilatingcretin: codereview.stackexchange.com/posts/128113/revisions
 
0
Q: Regex XML validator - improved edition

Geza KerecsenyiThis is a version of my previous question with some edited code/improved functionality. Go there to see what's changed. I have written a Regex to validate XML/HTML, along with any attributes. It aims to: Match any XML-like text Not match any unclosed tags Adapt for any spacing, newlines, etc...

 
7:31 PM
0
Q: Change tracking POCO entities

dfhwzeDescription In a time where thin clients, web browsers, web services and micro services are prevalent, we tend to forget we still have to deal with thick and smart clients. Many applications in B2B still use the latter. It is common in such clients that the user can perform a set of actions on t...

 
 
2 hours later…
9:02 PM
 
9:40 PM
possible answer invalidation by JohnDoea on question by JohnDoea: codereview.stackexchange.com/posts/226734/revisions
 
 
2 hours later…
11:19 PM
For "insights to the overall structure" try Code Review. — Rubén 38 secs ago
 
11:47 PM
0
Q: Custom HashMap implementation in Java with Linear Probing

Rahul WadhwaniI have taken a stab at implementing a HashMap in Java. To deal with collisions I implemented sort of a LinkedList using a dataNode. I am not very confident of my implementation hence looking for some feedback. import java.util.HashSet; import java.util.Iterator; import java.util.Set; public cla...

 

« first day (2303 days earlier)      last day (1697 days later) »