« first day (2235 days earlier)      last day (1774 days later) » 

12:00 AM
RELOAD! There are 6096 unanswered questions (89.8785% answered)
 
12:30 AM
@dfhwze Would neural nets be included in graphs as well?
 
12:53 AM
1
Q: Find the common ancestor between two nodes of a tree

Sharan Duggiralaimport unittest from Tree import * from list2BST import * def traverse_DFS(root, target_node_value, hash_route): # print('looking at node ' + str(root.value)) if root.value == target_node_value: # print('found node ' + str(target_node_value)) hash_route[root.value] = 1 ...

 
 
2 hours later…
3:15 AM
0
Q: Python3 OOP Tic-Tac-Toe

Andressa CabistaniI'm studying Object-oriented Programming and decided to apply some things doing an Object-oriented Tic-Tac-Toe. I wanted to know if you have some hints of what to improve and why! class Board: """Represents one board to a Tic-Tac-Toe game.""" def __init__(self): """Initializes...

 
4:11 AM
@pacmaninbw Yes
 
 
1 hour later…
5:30 AM
There's an SE site for reviews: codereview.stackexchange.com . Maybe you should post your question there. Make sure you've thoroughly read their Help section before posting the question. — Teemu 35 secs ago
 
0
Q: Suggestion on improving React app's design pattern

ZeroDarkThirtyI have a React app with the following structure. One parent component that acts as the entry point into the application. The main app itself is divided into 4 Tab components. Each Tab can be considered as a mini React app. Currently I have one global Context at the Parent level that defines th...

 
5:59 AM
0
Q: DB2 monitor using idb-connector

Cody PaceMonitors DB2 for changes in table data. It doesn't take any actions with the data just yet, only checks to see if new data is available every 2 seconds. const { dbconn, dbstmt } = require('idb-connector');// require idb-connector // global for storing row data in var data = '' async function ...

 
6:19 AM
0
Q: Need feedback on Object Oriented Javascript code

JavascriptDevI have created dynamic bootstrap 4 modal using JavaScript OOP please verify and give your reviews how i can improve the code. I have passed four parameters to created a dynamic modal class Modal{ constructor(id,url,title){ this.id = id; this.url = url...

 
6:44 AM
@dfhwze Well, it's gone now.
Monking all
 
@Mast Yeah I had problems linking the original post to it, so I posted it here. I found out I could use the question ID afterwards.
 
7:04 AM
There is community about "Code reviews" — MorganFreeFarm 51 secs ago
 
7:19 AM
-1
Q: Am I using Task.Run correctly?

bakunetI started to have a HUGE doubts regarding my code and I need some advice from more experienced programmers and architects. I have a method, that is triggering a for loop, repeating between 20K - 150K times. Inside the loop I need to call a service method, that execution of the method takes a lot...

 
7:30 AM
This question appears to have an already working solution by OP. It may be better suited for codereview.stackexchange.com. — MC Emperor 50 secs ago
 
8:06 AM
Monking
 
8:58 AM
0
Q: Improving readability using plt.plot() and fig=plt.plot() with Matplotlib library

Andrea CiufoIn my case and in general, there is any sensible difference between: plt.plot() fig=plt.plot() How can I improve readability and using better matplotlib library? The code works, in both cases plt.plot() and fig=plt.plot(), but I can't see any difference. plt.figure(figsize=(30,10)) ...

0
Q: Sampling and Reconstructing a signal in Julia

ZarkopafilisI am a newcomer to the Julia world, so I started trying to implement a very simple program: Sample a signal Reconstruct it (various ways, just rectangular for now) Plot it Everything is fine and 'working' properly, but coming from a OOP (java) and functional (python) background, I'm thinking ...

 
9:18 AM
0
Q: Cleaning words from numpy arrays

Mayur BhangaleI'm a new joiner in a software engineering team and have been given this code for refactoring. This code feels very gluey and dependent to me but I can't decide how to make it independent. This is the code. The part which takes long time to execute is if order_counter is not None: batc...

0
Q: programming noobie: My Sobel Edge Detection is not working

aNameI'm trying to write a Sobel edge detection algorithm, but I'm doing something wrong, and I don't know what. I declare my input image: Image gifImage = ImageFileFormat::loadFrom(File("path/to/image.gif")); I declare two arrays for the kernels: float sobel_v[9] = { -1.0f, 0.0f, +1.0f, ...

 
Monking
 
10:15 AM
possible answer invalidation by user3371223 on question by user3371223: codereview.stackexchange.com/posts/222269/revisions
 
0
Q: Suspend and resume a thread using signals

ShubhamOther day I ran into this question on stackoverflow. Just for curiosity I wanted to implement suspending and resuming the thread, So I used signals and used pause() in signal handler. Is it OK to use this way? This question has many answers how to suspend/resume thread, but I want to know what i...

0
Q: Is this way to use threads in C++ looks ok?

Aleksey TimoshchenkoI am fresh in c++ But actually what I am interested in : I have such method void VideoRender::updateData(const std::string &i_obj_path, const std::string &i_pngPath, const uint i_subIndex) { std::shared_ptr<FrameManager> container = std::make_shared<FrameManager>(); std::thread th1(&V...

 
10:58 AM
-1
Q: Looping through this list takes time

Mayur BhangaleBelow is the function which takes in list containing 3million elements and then creates another dictionary out of it for further lookups. This is an extremely time consuming function which after multiprocessing takes ~2hrs with 6 processes. I want to optimize this function. Any pointers helping...

 
11:48 AM
The question is kind of vague and as it's written now is a better fit for the Code Review Stack Exchange. It seems like you might be asking whether this is the best way to create a StateT[IO, S, A] from an A, in which case the answer is yep, you can use StateT.empty for step1 and StateT.pure(KeepGoing) for step2. — Travis Brown 38 secs ago
 
11:58 AM
0
Q: HTML & CSS Minifier

user6248190I am new to Javascript and Node.js but wanted to create a minifier in order to minify and escape double quotes in the HTML file. Could you let me know what I could improve in the code and how I can make it more efficient. Here is my code: 'use strict'; var minify = require('html-minifier').min...

 
12:38 PM
0
Q: Create a csv of file attributes recursively from a directory parameter in PowerShell

aduguidI'm a bit new to PowerShell and was wondering if there are any improvements I could make to the following script. Any suggestions for style, code, etc. are all welcome. I'm not sure if there is a more efficient way of filtering the files by last modified date. I need to run it against 30 millio...

 
1:02 PM
I didn't asked for a code review. This isn't the final code. This is a code that will be refactored. But you now, I'M TESTING STUFF. — Naeso 1 min ago
 
1:20 PM
possible answer invalidation by swingBoris on question by swingBoris: codereview.stackexchange.com/posts/222402/revisions
 
1:43 PM
@Duga rolled back
 
1:55 PM
0
Q: Peculiar tag edit on my question

Markus AppelMy question has been edited by a moderator to include the tag [reinventing-the-wheel]. Allthough I did state I am not relying on libraries like cats even if they might already provide solutions for what I am doing I truly believe that this edit is highly superfluous - not only does it add ...

0
Q: What is LCC exactly?

PeilonrayzContext Recently I've seen an increase in people voting for LCC when I don't agree this is the correct reason. These all seem to be getting LCC VTC because it's lacking description. https://codereview.stackexchange.com/q/222407 Looping through this list takes time Displaying a paginated list o...

 
Maybe on-topic for codereview.stackexchange.com? — Proyag 50 secs ago
indeed, if this is working code, you should better ask that question on codereview.stackexchange.comformerlyknownas_463035818 17 secs ago
 
If anyone is interested, I could use some expert Excel advice on a somewhat obscure Excel problem. Mixing normal formulae with array formulae is tricky.
 
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.com — formerlyknownas_463035818 36 secs ago
Thank you all, I will head over to codereview. I am new here and wasn't sure where to ask this. Thanks again! — Eight 22 secs ago
 
2:15 PM
Request for re-open votes.
 
@Mast ~hammered
 
2:38 PM
0
Q: Does modularization require a complete rewrite for this c++ calculator code?

EightI am having some trouble figuring out how to modularize this code without rewriting it entirely. I know I should be able to break it up into modules for main, gathering info, doing calculation and the example sum array thats out of place but in to meet requirements (also any ideas for a better ar...

0
Q: async concurrency prevention class

shannonBecause I'm quite naive regarding C#'s Task Asynchronous Programming and concurrency in general, and because it's so difficult to test, I'm concerned about the safety of this code. It's likely that those topics, or something even more esoteric to me such as processor-specific issues like volatili...

0
Q: Running the same function multiple times with a different parameter

DaanI want to run the function addItem() multiple times for every item that belongs to a certain equipment slot. I don't want to write down the slot for every item, and I also want to keep it readable. let equipment = { head: {}, cape: {}, neck: {}, ammunition: {}, weapon: {}, ...

 
3:05 PM
Monking
@Mast I started looking at it during breakfast but got distracted
@Feeds Did you mean to make the 4th heading rationale instead of rational?
 
3:24 PM
@SᴀᴍOnᴇᴌᴀ TIL. I'm not too sure, but I think you're right
 
@Peilonrayz me too... rationale is not a word I type often... I had to look up the spelling for the former
 
@SᴀᴍOnᴇᴌᴀ I've updated the question with that, thanks :) Yeah sometimes I hate English, :/
 
@Peilonrayz yeah I've been helping a co-worker in Ukraine with a few nuances and sometimes I feel ashamed of all the exceptions and quirks :/
 
0
Q: Create a template literal tag to remove whitespace from a string

IanI'm just getting into functional programming (as in, just started reading the book) and as practice I'm trying to refactor a past answer I wrote to fit in line with the functional style. The function is intended to be a template literal tag, like so: let myString = withoutWhitespace`This is a ...

-1
Q: Removing a specific key of ModelState for a specific controller's method

Shahar ShokraniI want to allow get a Post request without the "Id" property, and still use the ModelState functionality, the best solution I've came across is overriding the OnActionExecuting and removing the specific key: public class ExceptPropertiesAttribute : ActionFilterAttribute { private IEnumerable<...

 
@SᴀᴍOnᴇᴌᴀ Haha, yeah. It's sometimes funny going on EL.SE and seeing where all the different origins of our words come from and why every word seems to be an exception/quirk XD
 
3:58 PM
0
Q: Entity Framework C# updating an entity list generic solution

CamiI have an entity which has a list of other entities in it. for example: class Library { public virtual List<Book> Books{get;set;} } And I would like to update the entity and also the list of entities inside. I came up with this solution: private void UpdateChild<T>(DbSet<T> dbset, IColle...

 
Monking
 
4:16 PM
@TomekKaczanowski Having someone reviewing the API documentation is a must - no argue about that, however automation is still required to verify the documentation matches the code. Code tends to change frequently, and code reviewers might forget to verify that the respective document has been updated. Automation gives you the ability to refactor the code without worrying that your API documentation might become outdated, very similar to regular unit-tests that allow you to refactor your code with greater confidence. I've seen many cases of outdated API docs that lead to unhappy customers. — omer 36 secs ago
 
1
Q: Apply same format function to each python print() parameter

Gabriel FairI have a python print statement and inside the string I wish to print are four digits. I would like to apply the same formatting function to each param. I am not familiar with the latest and greatest features of python PEPs. Is there a slick way to do this? Code statement = "Splitting up the ...

 
4:38 PM
1
Q: Java Programming Challenge

SebastiánLittle history to give context to the problem: The Krusty-Burgers Homer Simpson is a smart guy who likes to eat Krusty-Burgers, and it takes m minutes for Homer to eat a Krusty-Burger. However, there is a new type of burger on the market, the Apu-Burger. Homer likes them too, and takes n minute...

 
5:19 PM
0
Q: First time making an ASP.Net Core Web API, am I missing any best practices or hiden good things to do?

Matthew VerstraeteI looked did some googling for how to make a web API in ASP.Net Core 3 but only found one quick little tutorial. Based off that I wrote the following code but I was wondering if I missed any best practices or any hidden things I should do to improve performance/security/etc. API Side: p...

 
Code Review is generally a better place to ask about improving working code, but in any case, if you want good advice, you'll need to include all the relevant details, like what is t, and how does fl_list play into this? — wjandrea 49 secs ago
 
5:39 PM
-1
Q: How do I calculate the average grade from .txt file in Python?

JamesI am struggeling with a Python assignment. From a txt.file the average grade of each mentor needs to be calculated. The data in the txt.file looks like this: firstname secondname________6.7 3.5 7.7 firstname secondname________5.1 2.3 8.4 firstname secondname________7.0 6.0 9.4 This is the co...

 
5:55 PM
possible answer invalidation by Shahar Shokrani on question by Shahar Shokrani: codereview.stackexchange.com/posts/222467/revisions
 
6:19 PM
0
Q: Please help me with my Binary Search Tree, could I get some opinions and improvement advice?

ii69outof247I'm trying to create a binary search tree that would be used to insert my Packet objects' information like partId, description, price, and partCount. Nothing special. That's really it. It's a basic binary search tree. Could you take a look and tell me if there's nothing odd in the code? Because I...

 
7:03 PM
We are not a code writing service, when asking a question please be sure to include what you have tried, example input and expected output and be specific with the exact problem/error you are getting. For code that is working but needs optimization see our sister site code review (codereview.stackexchange.com) Best of luck! — Steve Byrne 32 secs ago
 
7:39 PM
0
Q: Parse header information

walter nuñezi have parse the header information from and array like this: array ( 0 => 'HTTP/1.1 200 OK', 1 => 'Date: Mon, 17 Jun 2019 19:32:37 GMT', 2 => 'Server: Apache/2.4.38 (Win32) OpenSSL/1.1.1a PHP/7.2.15', 3 => 'X-Powered-By: PHP/7.2.15', 4 => 'Set-Cookie: Avisistema=ihk9t1ms6r8i0u1j5t6jpj...

 
7:55 PM
Hi, your question belongs in Code Review, not here. — MForMarlon 53 secs ago
 
8:16 PM
 
8:39 PM
0
Q: Reducing time complexity of tf.Session.run() executed in a loop

Nishant KumarThe code shown below takes the partial derivative of each pixel of the output fused image of a neural network with respect to input image of the neural network using tensorflow's tf.gradients(Y,X) and compute a jacobian matrix for each of the two input images MRI and PET. However, the code is rea...

0
Q: Powershell script to find and replace words based on asset tag input

Dil PatCan someone please help me modify this script to generate and modify the document faster? It currently takes about 5-10 seconds to create the variables. About 10 seconds for the entire script to run. Here is the code for the script: Copy-Item \\172.16.0.75\allaccess\Scripts\transfer2.docx C:\ f...

 
@RMunroe nice - I didn't see the movie Sword in the Stone as a kid and when I tried to watch it ~10 years ago I fell asleep; must watch it sometime soon
 
9:39 PM
0
Q: SQLite In-memory Database That Inserts Data Read From a CSV File

Jordan WardI wrote this program to make a simple in-memory database using SQLite and JDBC. Requirements I was trying to accomplish are below. It should consume a CSV file, parse the data, and insert it into the in-memory database. Table name is X and it has 10 columns (named A - J). If any of the columns ...

 
10:18 PM
@Vrganj: "Code seems messy" isn't really a question we can answer. If you're asking how to build a website, there are tutorials for that. If you're asking how to use Angular, there are tutorials for that. If you have working code and are looking for insights on how to make it better, you might try codereview.stackexchange.com If, however, you have specific code which is failing in a specific way, we can help with that. — David 15 secs ago
 
0
Q: Extending functionality of existing classes without breaking consumer code

Aashish UpadhyayHere is a set of classes that are used to build where clause for SQL Server and Oracle for different field types e.g. text, numeric and date. public interface IConditionBuilder { bool CanHandle(FilterAction filterAction); string BuildCondition(SearchCondition filterCondition); } public...

 
11:11 PM
This is really a question for code review. — itsme86 35 secs ago
 
11:51 PM
Your question seems very broad for this forum, maybe you want to consider posting in codereview.stackexchange.com/?tags=java instead. — tkruse 43 secs ago
 

« first day (2235 days earlier)      last day (1774 days later) »