« first day (2727 days earlier)      last day (40 days later) » 

12:00 AM
RELOAD! There are 7066 unanswered questions (89.7356% answered)
 
 
2 hours later…
1:47 AM
0
Q: List index out of range, but I tried to debug it and I can't find any errors

ThechomaniaI am making a N-queens algorithm (The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other; thus, a solution requires that no two queens share the same row, column, or diagonal) and this is the "Outside", not the algorithm...

 
 
1 hour later…
3:00 AM
possible answer invalidation by 1201ProgramAlarm on question by user12143547: codereview.stackexchange.com/posts/250929/revisions
 
 
1 hour later…
4:12 AM
Monking
 
1
Q: Kernel Interpolation C++

Luc NguyenPurpose of this program is to calculate the velocity of ng = nxnynz particles at the Lagrangian points from the values at regular grid nodes. How can i speed up this calculation? I hope to receive suggestions on this following code: #include <iomanip> #include <omp.h> #include <vector> #include <...

0
Q: DIsjoint Set (Union find) --java

sek fook tanHappy if someone can provide me some feedback on how to improve the performances. Thank you in advance. public class UnionFind { private int[] node; public UnionFind(int n) { node = new int[n]; for (int i=0;i< node.length;i++){ node[i]=-1; } } /* Throws an exception if v1...

 
4:56 AM
Code review belongs on the code review stack exchange codereview.stackexchange.comJHBonarius 35 secs ago
@JHBonarius when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the post might be closed as off-topic because there is very little description of what the code achieves. — Sᴀᴍ Onᴇᴌᴀ 22 secs ago
 
2
Q: x / 2 + 100 * (a + b) - 3 / (c + d) + e * e in assembly

just1frustredstudentwrite an algorithm for: x / 2 + 100 * (a + b) - 3 / (c + d) + e * e knowing that: a, c - word, b, d - byte, e - doubleword, x - qword mov eax, dword [x] mov edx, dword [x + 4] ; edx:eax = x mov ebx, 2 idiv ebx ; eax = edx:eax / ebx = x / 2 mov ebx, eax ; save the result in ebx...

 
5:30 AM
possible answer invalidation by Sᴀᴍ Onᴇᴌᴀ on question by Munchkin: codereview.stackexchange.com/posts/250574/revisions
 
0
Q: Faster way to copy rows of data to different sheets by column value

Adam PoznarI'm trying to find a faster way to copy specific rows of a sheet to different sheets. Iterating through them as done in code below takes too much time it leads to timeout. Some information about origin sheet: Has already a blocked header Has around 5000 rows Column A has a header "Project" Sheet ...

 
5:57 AM
0
Q: Java: class inheritance and generic types

TheQuestionIsI'm currently working on inheritance in Java. I would like to discuss the following case with you. In my example, I have numerous animal and enclosure classes. All animals are derived from BaseAnimal. All enclosure are derived from BaseEnclosure. Both base classes provide various concrete methods...

 
I hate being a stickler but this is not a well-formulated SO question. You could either post this on Stack Exchange's "Code Review"; or you could debug your code, try to get as far as possible on your own, then reformulate your question so that it is possible to look into it without that much effort. At least, you should show how you run your code, say what result you expect exactly, what it is that is unexpected and so on. (BTW, a lot of unusually written code (cuts, semicolons...) I guess this was like this in the original code you took?) — TA_intern 45 secs ago
 
6:47 AM
0
Q: naming convention for atomic design

iRohitBhatiaplease let me know if this question doesn't meet community standard for code review (I will delete it) Hey, I am probably terrible in naming files, functions etc. We follow atomic design principle. More here I have a react app where we put small components like button, label etc and call it atoms...

 
7:31 AM
Monking
 
 
1 hour later…
8:52 AM
This question is probably a better fit for codereview.stackexchange.comadiga 59 secs ago
 
0
Q: How to make python codes run faster

M.cadirciI want to make this simulation faster, its takes a long time, is there any way to run these codes faster?, the test statistic in here # Create data def create_data(Nvals, mvals, svals, kvals, nreps): # init memory datacube = np.zeros(shape=(nreps,len(Nvals),len(mvals), len(svals), len(svals), ...

 
9:17 AM
0
Q: C++ exception handling

Konstantin VinogradovI'm getting throw exception and need your review The main function bellow trying to allocate memory several times and then throw the exception on the upper level. #include <iostream> #include <memory> struct MiserlinessClass{ char * pMemory; int memory_len; const int max_siz...

0
Q: I've been trying to verify Fermat's last theorem for a small test case using python and I'm facing difficulty with precision handling

Chezhiiyan SabapathyFermat's last theorem states that there are no natural numbers (1, 2, 3,…) x, y, and z such that x^n + y^n = z^n, in which n is a natural number greater than 2 This is the code I've been working with, def proof(n, g): for a in range(1,n): for b in range(a, n): c = (pow(a, g) + p...

 
9:42 AM
0
Q: Detecting Dynamic LINQ np pattern

Zev SpitzI am looking for ways to make this code clearer, and for possible edge cases. As part of my library for producing string representations for expression trees, I am trying to produce a string that Dynamic LINQ will interpret as a similar expression. The Dynamic LINQ syntax supports the np function...

 
This is a code review. So better to ask your question in the dedicated place; codereview.stackexchange.comearik87 28 secs ago
 
10:32 AM
-1
Q: This piece of code returns an integer but it is actually not, how do I increase the precision enough to show a decimal?

Chezhiiyan Sabapathyc = (pow(1, 6) + pow(272, 6))**(1/6) print(c) How can I increase the precision enough to show the actual answer? Thank You.

 
10:57 AM
0
Q: Optimizing slow SQL query with multiple withs

Frederik HansenI have the following query: with matched_urls as ( select l.Url, min(f.urlfiltertype) as Filter from landingpages l join landingpageurlfilters lpf on lpf.landingpageid = l.Url join urlfilters f on lpf.urlfilterid = f.id where f.groupid = 3062 group by l.Url ), all_urls as ( ...

0
Q: Would it be better with try except imbricated?

amousWhat do you think of this code? I want to keep an unified interface (treat filepath or image interchangeably) but i have heard try except is the prefered way, how would you do? def rotate_img(imageref, deg): """ Rotate from [deg] degree the input image param imageref: can be imagepath or ndarray...

 
 
2 hours later…
12:36 PM
@Dsrivast so to me, the only thing that could lead to a downvote is because strictly speaking, stackoverflow is for code that does not work with an error while your code is working and you seek for optimization, hence it would be more suitable for the site code review exchange. But honestly, your question state your problem clearly, you give a toy sample and a way to reproduce the expected output. I have seen question less good without any downvote, so I would not be worried to much about it (I know it s*** though). I can do minor correction if you want, but I`m not the best to write question — Ben.T 57 secs ago
 
12:48 PM
posted on October 21, 2020 by CommitStrip

3
 
 
1:16 PM
What your looking for is called placeholders. There are plenty of Q on this site about placeholders. Take a look at what I made here or you could just search this site for more Q, or even check a Q that I asked here on this site — Cool Cloud 21 secs ago
 
1:27 PM
0
Q: constexpr Precalculate size of serialized data with templates and C++20 concepts

OptoCloud Im writing a serializer that will do serialization/deserialization as fast as possible, and that uses templates so that i dont have to create a ton of functions for every data structure,\ This is the part of it that pre-calculates the size of the data to be serialized I have only tested this on ...

 
2:17 PM
0
Q: The console prints a list of items for the user to scroll through using the up and down arrow keys

Robert AlviesI am somewhat new to python (yes I know, a cliché statement) and I wrote this code to scroll through a tuple of strings using the arrow keys. I know that the code is sloppy but I don't know how. Any feedback would be greatly appreciated. import keyboard from os import system from time import slee...

0
Q: Grade Calculator (using OOP techniques)

George Austin BradleyI was wondering if you'd be able to review my basic C++ Grade Calculator I based off the following scenario. I would like to know what I've done well vs what I haven't done well. Many thanks in advance. Program Requirements The client has asked you to create a program that can calculate the aver...

 
Rules stackoverflow.com/help/minimal-reproducible-example say that the complete code must be in the question. If you want someone to code review your repo, that's probably asking too much. — Maxim Egorushkin 16 secs ago
 
3:09 PM
Monking
 
3:40 PM
Sara Chipps on October 21, 2020
We review our ticket smash event, lay out our roadmap for Q4, and talk about what we’ve been learning from our moderators.
 
Maybe try codereview.stackexchange.com ? — ChatterOne 28 secs ago
 
Monking
 
3:58 PM
2
Q: Error solution: Uncaught TypeError

CodeLoveGuyUncaught TypeError: document.getElementById(...) is null I have a single JavaScript file that is connected to multiple pages. The below snippet is a function that is used for a single page. The above error appears when the user navigates to one of the pages that does not use the below function, a...

 
4:23 PM
0
Q: Cyclomatic Complexity (complexity)

L.NyamagoudI have a program for finding shortest distance/path and I got a correct answer but I am getting an issue i.e., "Function 'shortestPath' has a complexity of 9. Maximum allowed is 6." This is the algorithm const graph = { start: { A: 5, D: 8 }, A: { B: 9, C: 3 }, D: { C: 4, E:...

 
This may be a better fit in CodeReview. While SO loves to tackle "numpy vectorization" and related optimization issues, refactoring and overall ccde organization isn't a good SO fit. But first spend some time looking at CR requirements and typical answers. They are pickier about code being complete and runnable. — hpaulj 5 secs ago
 
@CommitStrip Bad UX
@CaptainObvious Bad title
 
@Mast Bad day?
 
@SᴀᴍOnᴇᴌᴀ Busy day, could've been much worse.
 
4:48 PM
1
Q: Appending a codepoint to an UTF8 std::string using icu4c

Alexey RomanovMy code is void utf8_append(UChar32 cp, std::string& str) { size_t offset = str.size(); str.resize(offset + U8_LENGTH(cp)); auto ptr = reinterpret_cast<uint8_t*>(&str[0]); U8_APPEND_UNSAFE(ptr, offset, static_cast<uint32_t>(cp)); } This works but seems ugly. Maybe I am overlookin...

 
5:04 PM
@Mast yeah my last 24 hours have been quite busy... working unusually late and early in an effort to pass changes to team on the other side of the world
 
5:51 PM
If on the other hand you want to have working code reviewed, then Code Review is more suitable. — trincot 55 secs ago
 
@SᴀᴍOnᴇᴌᴀ That is always fun, I remember 10 PM calls with India followed by 8AM calls the next morning.
 
0
Q: Vanilla JS/CSS -- set of buttons to trigger sliders by transitioning height value

elizaI've been working on a solution that allows a set of buttons to reveal divs that slide down from above on-click. I needed each button to toggle an active state for itself, but also if the user were to click on one button, reveal a div, and then go on to click another button, that the initially re...

 
6:53 PM
0
Q: Improving the code, events in individual functions (refactoring)

Mbreticode It is necessary from this piece of code const rectPos = { x: 0, y: 0 }; const currPos = { x: 0, y: 0 }; const mouseEvent = () => { canvas.onmousedown = (e) => { const start = { x: e.offsetX, y: e.offsetY }; canvas.onmousemove = (e) => { currPos.x = getXPixelRatio * M...

 
7:26 PM
@pacmaninbw EU <=> Canada is one of my latest headaches.
Get an e-mail at 1 in the morning, call back at 2 in the afternoon.
"I need parts."
-"They'll be there in 4-6 days."
 
8:09 PM
1
Q: A responsive vanilla JS carousel, customizable mainly with CSS features (e.g. custom properties, media queries)

Fee-fi-fo-fumThis is a first experimental version of a carousel. A demo can be found on codepen: https://codepen.io/andrasnagy/full/oNLYgZr The repository: https://github.com/andrasna/glideable src/js/index.js function Glideable({selector}) { const state = glideableState() const elements = glideableElemen...

-1
Q: PHP OOP Router: based on separation of concern

rgjoniDuring the past few months I've slowly learned about routing and written my own in my spare time. As there are more than one class I'm linking my repository: here An example implementation is: require_once dirname(__DIR__) . "/bootstrap.php"; use Gjoni\Router\Router; Router::get("/about", $hand...

 
@Mast I was managing a software development project in India, they are exactly 12.5 hours off from Los Angeles during daylight savings time. Had meetings 3 times a week at 10PM Los Angeles time, needed to check on Progress in the morning.
 
8:42 PM
We have a designer that just moved from the west coast of U.S. back to China, so now we meet at 7 AM PDT so it will be 5 PM for our developers in Ukraine and 10 PM for him
 
9:24 PM
0
Q: Simple bank-atm system design OOP

TomFor practicing designing systems I created a simple bank ATM system. I didn't want to make it to complicated so I left out things like cash bin per ATM and opening cash trays, etc. I also wanted to neglect APIs to validate pins, etc. (it's just a function that will always return True). I wanted t...

 
9:49 PM
0
Q: Create Web Resources Via the Reqres Web API

Катя СоколоваGoal: Use the Reqres API to send user data. I am currently all the time get the error "False is not true : Your function does not return an integer. Check again what your function returns" Very probably, I have made mistake somewhere in defining User as well, however, this part seems more or less...

 
I reviewed you code on codereview.stackexchange.com today. Have a look. — Sep Roland 42 secs ago
 
10:14 PM
0
Q: Matlab code to perform Gaussian elimination

wh2I am creating a MATLAB function that would perform Gaussian elimination. My code script is shown below. However, the code is neither efficient nor correct. % function to perform row eliminination function [x,U]=triangleform(A,b) %FORWARD ELIMINATION n=length(b); m=zeros(n,1); x=zeros(n,1); for...

 
10:39 PM
0
Q: Reviewing Basic API

Pablo Aguirre de SouzaI'm learning ASP.NET and I've created a few simple APIs, so I can consider myself maybe an intermediate beginner. I've decided to create a tutorial serving two purposes: to solidify what I've learned and to fulfil a demand for beginner tutorials in my language. I just created a very simple API wi...

 
11:24 PM
@Gust If you want a thourough review for already working code I'd recommend to ask at Code Review. — πάντα ῥεῖ 59 secs ago
 
0
Q: Simple C++ Dynamicly allocated Matrix with only one memmory allocation

Eduardo Andrés Castillo PereraI was bothered withe existing matrix allocation methos that take variable rows and columns, so I made a small class that only needs one memory allocation. template <typename T> class Matrix{ T* data; size_t rows, columns; public: Matrix(const size_t rows, const size_t columns) : row...

 
11:43 PM
Please repeat on topic and how to ask from the intro tour. You seem to be asking for a functional code review, which is off-topic here. — Prune 16 secs ago
 
11:55 PM
0
Q: Array manipulation: add a value to each of the array elements between two given indices

jeremy radcliffThis is a Hackerrank problem: https://www.hackerrank.com/challenges/crush/problem You are given a list of size \$N\$, initialized with zeroes. You have to perform \$M\$ operations on the list and output the maximum of final values of all the \$N\$ elements in the list. For every operation, you a...

 

« first day (2727 days earlier)      last day (40 days later) »