« first day (2241 days earlier)      last day (1762 days later) » 

12:00 AM
RELOAD! There are 6139 unanswered questions (89.8275% answered)
 
12:39 AM
1
Q: Grid class for games using python

CE3601I made this class to eventually create a tic tac toe game. I used numpy which is a first for me. Here it is: import numpy as np class Grid(): def __init__(self, data, row_length, coloumn_length): """Represents a Grid of data as a matrix. Args: data(list): data ...

 
1:11 AM
This question should go on Code Review. — L. F. 57 secs ago
 
 
1 hour later…
2:20 AM
0
Q: Communication between nodejs and python

N SAMPATH KUMARI want a non-class method to be executed whenever the static class method is called. This static class method will be called from some other program present in some other directory, every 10 seconds. The non-class method will call the python script by spawning. I have done this by calling a non-...

 
 
2 hours later…
4:05 AM
0
Q: Why is this javascript/jquery not capturing user input?

njbootI can't figure out why the user input in the "Giphy search" box isn't being captured. When I console log out "queryURL" the query from the input box is absent. See my code below: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=devi...

 
 
2 hours later…
5:39 AM
Hi! You can post this question on codereview.stackexchange. It will be better to do so. — Parth Sarthi Sharma 21 secs ago
 
6:15 AM
This appears to be tested, working code. For reviews of working code to make it more performant or idiomatic, consider codereview.stackexchange.com — Adam Smith 38 secs ago
 
7:14 AM
@User800222 Maybe you get better results asking this at SE Code Review. Be sure to meet their policies though (e.g. include enough context of what the code is supposed to do). — πάντα ῥεῖ 1 min ago
 
7:50 AM
You should check out the help center for guidance on what's appropriate here on Stack Overflow. While you might get better help on CodeReview for this kind of question (optimizing for performance), I don't think your question is unacceptable here on the main Stack Overflow site, as long as it is complete and not completely dependent on a link to an external site. The edit made by another user has improved it a bit. Feel free to edit it further yourself to improve it (but you should usually not change your code, as that might invalidate answers that comment on what you were doing). — Blckknght 46 secs ago
 
8:49 AM
0
Q: What is needed to write functions with good performance like OpenCV does

User800222I've tried to implement my own canny edge detector and tried to make it as fast as possible. I tried to code most of the needed function myself and only used opencv as input/output. However, the performance isn't comparable to opencv's cv::Canny() when input's size get larger. Even using OpenMP...

 
9:36 AM
This should be posted here codereview.stackexchange.comAdam 9 secs ago
You should put your question hereLeśny Rumcajs 12 secs ago
It looks like that you are searching for a code review, please consider posting on codereview.stackexchange.comCuriouslyRecurringThoughts 56 secs ago
SO is meant for questions about concrete problems. For advice and opinion on your code you can better post at codereview.stackexchange.comjrswgtr 57 secs ago
 
10:10 AM
-1
Q: Class new Instanse in php Mvc Structure

MobiAppI working with own project using MVC structure and autoload class using PSR-4 using composer. I choose Php Fastroute library for my router engine. index.php define('DS', DIRECTORY_SEPARATOR, true); define('BASE_PATH', dirname(__DIR__) . DS, TRUE); ini_set('display_errors', 1); ini_set('displa...

 
11:05 AM
I'm voting to close this question as off-topic because it is about code optimization and should be asked at Code ReviewJens just now
 
11:52 AM
0
Q: The 100 chair survivor challenge

EMLI came across the following challenge. Here is my implementation in Python 3.7 A room has 100 chairs numbered from 1-100. On the first round of the game the FIRST individual is eliminated. On the second round, the THIRD individual is eliminated. On every successive round the number of people ...

0
Q: Build a flexible component that displays different sets of data from the API in react?

NobodyI believe this is a common scenario but my implementation of it looks weird. So how would be go about reusing components for different data. For example, this page, https://etherscan.io/blocks and this page, https://etherscan.io/txs share the same component, don't they? but display different data...

 
12:12 PM
0
Q: C++ to Python implementation performance issue

ThorasineThere is a Kattis coding challenge that I tried to solve with a Python3 solution, but ultimately my code did not run fast enough and I ran out of ways to optimize my original code. Out of curiosity I looked up for a C++ solution, which I tried to implement in Python just to see if it would still ...

 
MOnking
 
12:34 PM
@Vogel612 It's one one of my todo lists. Somewhere.
At the moment I'm a bit busy making preparations to move. Found a new house.
It's amazing how much crap you can collect over the years without realizing it.
 
12:49 PM
@Mast It is really amazing how much crap one collect over the years, I moved 2 weeks ago and I'm still getting rid of crap.
 
1:13 PM
0
Q: Dealing with interrupts and sleep

Dávid HorváthI was thinking that I could calmly Thread.sleep() on an interrupted thread. Sonar doesn't think so, of course. In some circumstates we should waiting for conditions, even if an interrupt occured. Is there anything wrong, for example, with the code below? Is there any better solution? private vo...

 
1:54 PM
0
Q: Audit Service Implementation: How to serialize the "update" of an entity, before and after this update

Ehouarn PerretI have an service which serves the purpose of auditing the state of certain entities: public interface IAuditService<T> where T : IEntity<Guid> { Audit Add(string action, T before, T after); } public class AuditService<T> : IAuditService<T> where T : IEntity<Guid> { private r...

0
Q: Language dialects Django model

khashashinI'm creating the Dictionary app, where you can search for words, click on a word, and show the same word in other dialects of the language. I have now created the following Django model: from django.db import models from .base_models import BaseModel class WordCoreModel(models.Model, BaseMode...

 
2:14 PM
This is better suited to the codereview.stackexchange.com, but I will tell you that traditional for() loops are the fastest loops in JavaScript, and that Array.prototype.push is very slow. So if there was a different data structure you can use do that and replace the `while'. — Randy Casburn just now
 
0
Q: An implementation of an AVL tree with unique_ptr

Վարդան ԳրիգորյանI've implemented an AVL tree using unique_ptr. The code has been stress-tested and there are no crashes or segmentation faults. Just one note: There could be comments about member variables privacy in class Node I just would like to mention that I going to implement that. Any thoughts, comments?...

 
2:28 PM
Didn't know codereview, will check it out. I'm looking at alternatives but nothing came to mind recursion-wise. — ISTTeo 41 secs ago
 
2:55 PM
0
Q: Better way for collecting more data on user SignUp?

Omar GonzalesI've a signupView that shows 2 forms: SignUpForm and ProfileForm. Basically SignUpForm collects data like first_name, last_name, user_name, email, password1, password2. And ProfileForm collects data like dni, birthdate, shipping_address, etc. I'm using this approache because is what I know....

 
3:24 PM
@pacmaninbw The plan is to get rid of the crap before moving day, but I'm sure something will slip through.
 
3:36 PM
0
Q: Database interface and PDO adapter

fabrixI'm writing my own framework in PHP and I want respect the SOLID principles. I made this interface: <?php namespace System\Database; use System\Config; /** * Database wrapper interface */ interface Database { /** * Connect to database * @param Config $config * @return bo...

 
4:01 PM
i think code review would be a better site for optimization. — anky_91 41 secs ago
 
4:16 PM
0
Q: Two ways to implement DND type abilities

David WhiteI am creating a game in Java that uses the DND model for a lot of its components. I've hit a roadblock when it comes to creating and implementing abilities. I have thought of two ways I could implement this system: Using inheritance: Having separate classes that extend from the Ability cl...

 
4:57 PM
0
Q: Sortings stocks into quantiles based on their signal

doppia_erreThis function sorts stocks into quantiles. To do so I used this function that accepts sig_df (dataframe with the timeseries of stocks signal) and number of quantiles as imput: qs = ['Q' + str(i) for i in range(1, len(perc)+1)] q_labels= list(itertools.chain.from_iterable( itertools.repeat(x, in...

 
It's better you upload this question at codereview.stackexchange.com0xPrateek 23 secs ago
@0xPrateek I don't think so, they seem to be asking why the two code snippets are different. Code review's purpose is to help improve working code. — cs95 41 secs ago
 
5:17 PM
0
Q: Angular 8: Scroll spy implementation for a timeline Contents

Velen AranhaI have made a timeline component that can have multiple milestone/major/minor as sub components nested within timeline container component. I have also added a side navigation for that lists all Milestones. Therefore I append range property to TimelineMilestoneComponent which contains the top pos...

 
 
1 hour later…
6:18 PM
0
Q: Reading and parsing binary file from CAEN Digitizer (written by WaveDump)

LRDPRDXPreliminaries I have CAEN Digitizer N6720A and use WaveDump software for the data acquisition and recording. As a result of data recording this software produces a binary file in which the sequence of events is present. Each event has the following structure: Header of an event Event's data po...

 
6:39 PM
0
Q: JSONDecoder Error

Shane PattyI found the code for an automated meal planner at this link (Meal plan for the week), but when I run that code I get errors and I am not sure why. I am fairly new to python, but I would like to use this code as a base for a final meal planning program. """Program that help you to decide w...

 
@pacmaninbw Congratulations by the way.
@CaptainObvious Not working and not his code.
 
6:59 PM
2
Q: Fluently Validation of Objects

Henrik HansenInspired by this question by t3chb0t and as an elaboration of my own answer, I have written the following solution. My goal was to reduce complexity both in implementation and use. Eventually - I have to admit - the implementation ended up being rather complex - but in my flavor; but in terms of ...

 
7:19 PM
0
Q: Propagating Date in React

Cory NezinI'm learning React recently, but I've been having some issues regarding propagating data from component to component. My general situation is: I have a textarea for input, a send button and a textarea for output - essentially a chat interface. So I would like the user to enter data in the first...

 
 
2 hours later…
9:15 PM
possible answer invalidation by Jesse Reza Khorasanee on question by Jesse Reza Khorasanee: codereview.stackexchange.com/posts/222681/revisions
 
0
Q: Writing my own version of strcmp() with an array of pointers?

Pomegranate SocietyI am trying to write a function in which I sort the pointers inside of wptrs, an array of pointers to strings in another array. I am challenging myself not to use string.h for this exercise, as I want to understand how a sorting algorithm could work in C. I am using qsort(), however, but I am try...

 
9:47 PM
@Mast Thanks for that clarification. I guess that makes sense. Kind of.
@Duga Not an answer invalidation. There was an issue with the testing/example code (not in the code itself) given by the user and the edit fixed that.
 
10:02 PM
0
Q: Length of the longest common sub sequence bottom up

justanothertechdudeCould I get some feedback on this code? I included a test case as well. To my understanding it runs in \$\mathcal{O}(m*v)\$ where \$m\$ is length str1 and \$v\$ len str2. def lcs(word1, word2): x = len(word1) y = len(word2) return _lcs(word1, word2, x, y) def _lcs(word1, word2, x, y): ...

 
10:55 PM
possible answer invalidation by Jose Antonio on question by Jose Antonio: codereview.stackexchange.com/posts/219686/revisions
 

« first day (2241 days earlier)      last day (1762 days later) »