« first day (2707 days earlier)      last day (56 days later) » 

12:00 AM
RELOAD! There are 7029 unanswered questions (89.7457% answered)
 
0
Q: Efficient Permutation Checking for USACO: Photoshoot - Python

12 rhombi in grid w no cornersI was trying to solve this problem with Python 3.8. I couldn't find a way other than to brute-force calculate all the possible permutations then check which permutation was valid. The program works fine, but as it's O(n!) time complexity (I think) it takes extraordinarily long when the input has ...

 
 
1 hour later…
1:22 AM
0
Q: Email Validation in PHP

CodeLoveGuyIs this script sufficient enough to validate user email input? <?php //1 DATABASE CONNECTION $dbHost = "HOST"; $dbUser = "USER"; $dbPassword = "PASSWORD"; $dbName = "DATABASE"; try { $dsn = "mysql:host=" . $dbHost . ";dbname=" . $dbName; $pdo = new PD...

 
 
1 hour later…
2:23 AM
It's simply that your code is too slow. If you want it improved, Code Review is perhaps a better place. As it is, this question is basically unanswerable. — Ken Y-N 23 secs ago
 
2:48 AM
@CaptainObvious hmm looks very similar to this question just a few hours ago
 
3:29 AM
0
Q: fold expressions using a function recursively

RadAdI have written an accumulate function similar to std::accumulate that works on a std::array. The goal is to remove the loop using fold expressions. This code currently works in c++17: #include <array> template<class U, class F> class array_accumulate_helper { public: array_accumulate_helper(U&...

 
3:50 AM
Monking
 
 
3 hours later…
6:50 AM
Lots of other minor problems here too. Once you get it all working, I'd recommend posting the full, working code at codereview.stackexchange.comLundin 14 secs ago
 
7:17 AM
0
Q: Graph implementation in C

atiritI've recently been learning C on my own, and I thought I'd try my hand at writing a graph implementation. // graph.h #ifndef GRAPH_H #define GRAPH_H #include <stdlib.h> #include <string.h> typedef struct node node_t; typedef struct node { int value; node_t **links; int links_count;...

 
 
1 hour later…
8:33 AM
0
Q: Route finding Genetic Algorithm

p.vitzliputzliIn order to get more accustomed with classes in Python, I have written a genetic algorithm, which takes a level with a start and end point and searches for a route (not necessarily the optimal one). The output shows the basic level and when a solution has been found, the level with the route: Lev...

 
8:59 AM
0
Q: What to return as string from the booktrip method?

Divyanshu Sharmai am returning the booking successful message when no exception occurs and the totalcost is greater than 0. but my code still requires to return string anyways. so help me what to return if i am already returning the message inside if. i have also tried using flag and various other conditions to ...

 
9:24 AM
0
Q: Tell GUI to update itself by passing self to module?

ElekamI hope this is the right spot to ask this, if not tell me and I will delete the post. I need my GUI/program to update whenever the active_bots variable is changed, to display the contents of this variable. Is this the correct way to speak to the GUI instance? Pass the instance in the module-call ...

 
9:40 AM
possible answer invalidation by Richard Neumann on question by Richard Neumann: codereview.stackexchange.com/posts/250036/revisions
 
10:04 AM
The "alternative" is far preferable - I would definitely reject the casting version in code review, for example. Having said that, I'd also reject the "just change the type" version, as it would be better to declare the variable inside the loop "header" itself. — Jon Skeet 25 secs ago
 
posted on October 01, 2020 by CommitStrip

 
10:15 AM
0
Q: Extracting arbitrary element ranges from each row of a np.array

AlexCI wonder if someone can extend a solution for this similar problem to my case, where I want to extract multiple elements. (I don't believe the extra array dimension in my example is an issue) I have a large 3D (l,m,n) array. From each layer l, I need to extract every 5th row (all columns) but the...

 
11:31 AM
0
Q: Feedback on send/recv functions for non blocking sockets in client side HTTP library

ChaseI'm working with TCP sockets in C, specifically only for client side HTTP(S) requests, and would like to get some feedback on my send and recv code. You can make some assumptions regarding my code, as it is, by no means a complete example but I'll try to make it reproducible. Assume sfd has been...

 
 
1 hour later…
12:33 PM
This may be a question for code review? — Paul T. 27 secs ago
I’m voting to close this question because questions asking for general feedback on existing code should be asked at codereview.stackexchange.com. — Jonathon Reinhart 32 secs ago
 
12:47 PM
@JonathonReinhart Don't use the existence of Code Review as a reason to close a question. From now on evaluate the question and use a reason like; needs focus, primarily opinion-based, etc. This question would be off-topic on Code Review as it is asking about generic best practices and does not have the code in the question. Please familiarize yourself with what is on-topic and our guide to Code Review for Stack Overflow users. — Peilonrayz 51 secs ago
 
1:35 PM
This would perhaps be more suited to CodeReview.Se — Paulie_D 44 secs ago
 
@CaptainObvious @Peilonrayz @Mast Please tell me how bad or good this question is.
 
0
Q: Everything is Correct! but is my SCSS Code Correct?

HoussamDevHello Guys How are you doing ? I have a simple question I want to know if my SCSS codes Correct ? Note : Everything work as I expected the Main Idea of this code is to generate Word Break Utilities for controlling word breaks in an element. using SCSS mean I can declare only css classes in html e...

 
@pacmaninbw IMO it's ok. One could argue it doesn't have a description. I don't think it's off-topic for anything, there's tons to comment on. The core problem they have I don't really understand but someone else might.
 
@CaptainObvious Could use a better title.
@Peilonrayz Thanks.
 
2:03 PM
0
Q: c# list object with view model child list

JeffersonI am trying to build this view model that has a ChildViewModel and this was the only way I was able to get it working. Any advice on how to make this code; cleaner, more effective, just overall better! static void Main(string[] args) { try { List<Subscription> List...

 
2:23 PM
@pacmaninbw It's cut code, I won't answer it.
Arguably it can be closed as MRC, but that's always a bit of a problematic thing here.
 
Thanks
 
Left some comments. We'll see.
 
0
Q: YouTube Data API v3: Generating list of trending videos from subscriptions on YouTube

a pI have made a program that sort of mimics YouTube trending, but only with videos from channels that I am subscribed to. It looks at each Subscription, converts the subscription to a Channel, gets the channel's uploads PlayList, converts each PlayListItem to a Video, and finally filters the videos...

 
2:39 PM
Arr matey what's monking.
 
@pacmaninbw re-worked this answer per comment by a newer challenger in the JS realm
I was able to get that question up to HNQ status but it didn't pan out like I hoped (like that fizzbuzz question last year)
 
1
Q: Parallel Calls to External WCF Service - ASP.NET Web Api

ZMJI have come across a situation where I feel running some code in parallel will greatly improve performance, but I am concerned about the implementation and am looking for some confirmation. Take the following controller resources [HttpGet] [Route("{id}")] public IHttpActionResult Get(int id) { ...

 
2:54 PM
@Mast flagged
 
3:19 PM
1
Q: Searching in Numpy

ajayrameshI have sorted ascending number if you do abs(arr) in below code, I am trying to search for index where sign got changed from negative to positive. Wrote this below code, but for some reasons, I believe we can improve it or optimize more. Any tips and tricks ? import numpy as np arr = np.array([-1...

 
@CommitStrip pretty much...
 
0
Q: What about BCdotWEB's feedback am I not understanding?

Bryan BoettcherIs this an appropriate use of async/await combined with Task continuation? I don't understand how my question does not fit the site's standards. Can I please get some guidance?

 
that second code snippet looks like a gun. — Julian Feb 7 '17 at 22:13
 
3:44 PM
0
Q: How good is this python tkinter placeholder class

Cool CloudI made a placeholder for entry widgets from tkinter, so i was wondering how good it is, i just started learning python a bit before, so please do correct me if im wrong or if i missed something, or some easy steps or where it looses the efficiency. Code: import tkinter as tk from tkinter import t...

 
3:54 PM
M<nk>ng
 
Can take this to over to code review and can show you everything I'd change before even thinking about how I'd intentionally mess it up. — masseyb 24 secs ago
 
4:15 PM
@Feeds mumble mumble
 
I haven't listen to much of Led Zeppelin's songs but I found one of their songs for this scenario: Communication Breakdown
 
@Vogel612 deleted.
 
 
1 hour later…
5:26 PM
1
Q: PHP wallet system

chidimma madukaant users to be able to deposit any amount of bitcoin to an address I will provide, so they can purchase items with it. The problem is how to make the deposit amount reflect in their wallet. This is my code <?php $xpub = "xpubYOUR_XPUB_KEY_GOES_HERE"; $url = "https://api.smartbit.com.au/v1/blockc...

 
@CaptainObvious CNWAI - who upvoted that??
 
¯\_(ツ)_/¯
 
5:42 PM
If thus Code works you should ask in the codereview sister site — Marged 43 secs ago
That's a question for codereview, not SO — Cid 31 secs ago
 
@SᴀᴍOnᴇᴌᴀ Didn't even get a chance to VTC.
 
@pacmaninbw yeah that want faster than most
 
6:42 PM
0
Q: Very basic Vue todo list viewer

PeilonrayzProblem I keep trying to use various todo lists. But I keep coming back to the same situation; not having an active todo list. This can come in two forms: I don't have a habit to open bespoke software. I've tried using Excel, notes and calendars as they're close to my current work flows. But I t...

 
7:07 PM
2
Q: A Python snake game (using Pygame)

SrivSo this is a fun little project I am working on. This is my current progress with the game: import copy import random import time import pygame pygame.init() pygame.font.init() pygame.display.set_caption('Parsel Tongue') MARGIN = 60 WINDOW_SIZE = (600, 600 + MARGIN) RED = (255, 0, 0) BLACK = ...

0
Q: Tweepy & Django performance optimisation

AntokiosI had to create a project for academic purposes that gets all friends and follower of a user, stores them on a mongoDB, then displays them on a table. I used django and plain html but when I tried my friend's account (230 contacts) it took 3 mins to load. That's a lot cause supposly my app should...

 
7:21 PM
You can't do nothing for 2) except hiding that or looking for a library, that does the hiding for you - this is how the java class is implemented. If you want to "hide" it a bit better, you can do something like (-> stream (doto (.getNextEntry)) (clojure.java.io/reader) (clojure.data.csv/read-csv) (doall))) which makes it look a bit more "pipeliney" than just the imperative call in between some lines. Yet I am not sure, what you question here is - this looks alot like a request for a code review? — cfrick 27 secs ago
 
@CaptainObvious Interesting.
 
@Mast Thanks ^^
 
8:00 PM
If the code already works and you are just looking to improve it, it might be a better fit for Code Review Stack Exchange. — 0x5453 1 min ago
I would suggest moving this question to Code Review. That is a better place for "it works but i do not like it" type of questions. — PM 77-1 19 secs ago
 
8:24 PM
0
Q: How do I speed up a function I wrote in Python?

AnonymousI have written a k-means function in Python to understand the methodology. I am trying to use this on a more complex dataset with a larger value for k, but it is running super slow. Does anyone have any recommendations for how I can improve this? I have provided code below, along with loading in ...

 
8:35 PM
Your question is better suited for Code ReviewGMalc 10 secs ago
 
8:49 PM
0
Q: Data Class code smell? Java object is modified by multiple methods in a row

Keyboard BanditI am sending a series of SOAP messages to a server and capturing the results of the SOAP transaction. The issue that I am having is that I need to perform five SOAP calls, and each call requires some data from the previous call. This has led me to create a Data Class that holds Strings accessib...

 
 
3 hours later…
11:22 PM
0
Q: Send message and wait for receive while using async/await and promises the proper way

heltonbikerI have this working code, but sendAndReceive function looks ugly/smelly to me. Eslint complains about using await inside a loop, and using true as conditional in while loop. Would there be a more elegant way to achieve this? I mean, "blocking" until a response appears in inbox before returning a ...

 
11:35 PM
possible answer invalidation by CodeLoveGuy on question by CodeLoveGuy: codereview.stackexchange.com/posts/250062/revisions
 
11:48 PM
0
Q: PHP Email List Sign Up

CodeLoveGuySee my original post: here. I have one html page and four php files that allow users to sign up for an email list. One of the php scripts is a cronjob that deletes unverified rows older than 24 hours, and it is not included below for the sake of post length. I use PDO for my prepared statements. ...

 
11:58 PM
This sort of question is off-topic here. It will be on-topic at codereview.stackexchange.com if you add some context and description of what the code is trying to accomplish — CertainPerformance 45 secs ago
 

« first day (2707 days earlier)      last day (56 days later) »