« first day (2598 days earlier)      last day (1717 days later) » 

00:00
RELOAD! There are 6740 unanswered questions (89.9037% answered)
00:28
that question is perfectly reviewable IMO
there's a minor bit of a language barrier here, but -5 score for something like that is just wrong on so many levels
sure the context is sparse and it's not instantly obvious how the code is working, but with a few minor edits using the information given in the comments that is perfectly reviewable
00:51
@Vogel612 You're saying I should retract my down vote and close vote? It still seems like there is nothing to review, forgive me I don't know Java or it's many libraries.
01:07
@geek101 Please don't spam us.
01:30
0
Q: How can I make this JavaScript code more compact/efficient?

Joseph ChuntaI have a function that I created in Codepen. It does what I want, where the div that you select gets a blue border and changes its text. But I would like to know if there is any way to make the JavaScript that actually makes this work more compact/efficient. Codepen link. https://codepen.io/Josep...

1st part would suggest posting this on superuser.com for code review. SO is more for troubleshooting, solutions & bugs, not so much existing code improvement. 2nd part of your question is too broad, but like any language would include error checks. — ReturnVoid 20 secs ago
01:55
You could consider dictionaries when you want more freedom in the indexing, but it depends on what you'd like to achieve with what data. IMHO this is a good item for Code Review.. I see no issues with above code.. Refer codereview.stackexchange.comGoodies 36 secs ago
02:16
Hi Naveen, better put this question about SOLID principles in the code review section: refer codereview.stackexchange.comGoodies 7 secs ago
03:00
possible answer invalidation by user3756068 on question by user3756068: codereview.stackexchange.com/posts/243827/revisions
 
1 hour later…
04:15
0
Q: Force cast for purposeful UD

super developerHere is my implementation of a "force cast" function when I require well-defined but standard-UD behavior. template < class r, class t > r && force_cast( t && d ) noexcept { return ( r && )d; } I thought about having the cast as a reinterpret_cast here, but c-style cast really fit...

0
Q: How should I ask on the main site without getting too crazy to a piece of code that was a P vs NP attempt?

Travis Wells I wanted to find out my mistakes in the code that could shorten it all together. I would love to figure out how to address bad variable names Use enumerate instead of python's range Use a better method to delete all permutations of a set excluding itself from a list. (eg. keep (123) but delet...

04:38
0
Q: LeetCode 560: Subarray Sum Equals K [C++/Java]

EmmaAccording to LeetCode, the following question is one of the most frequent interview questions asked by companies such as Facebook and Google. Here, I'm posting C++/Java codes, if you'd like to review, please do so. Thank you! LeetCode 560 Given an array of integers and an integer target (K), you...

0
Q: LeetCode 560: Subarray Sum Equals K [Python]

EmmaAccording to LeetCode, the following question is one of the most frequent interview questions asked by companies such as Facebook and Google. In this post, I'm adding Python solution, if you'd like to review, please do so. Thank you! LeetCode 560 Given an array of integers and an integer target ...

05:30
possible answer invalidation by user3756068 on question by user3756068: codereview.stackexchange.com/posts/243827/revisions
 
3 hours later…
08:54
0
Q: extracting min and max salary from string

Hooman BahreiniThis is my first python program, I would appreciate any feedback. What I want is to do is to extract min/max range of salary from a text which contains either hourly or annual salary. import re # either of the following input should work input1 = "$80,000 - $90,000 per annum" input2 = "$20 - $24...

possible answer invalidation by user3756068 on question by user3756068: codereview.stackexchange.com/posts/243827/revisions
09:18
0
Q: Maximum subset sum with no adjacent elements

ShashiWrite a function that takes an array of integers (Both Positive and negative) and return the maximum sum of non adjacent elements. Note that even if all values are negative, I don't have an option to choose empty subset and return sum as 0. Recursive solution that I wrote public static int maxSub...

09:30
possible answer invalidation by user3756068 on question by user3756068: codereview.stackexchange.com/posts/243827/revisions
09:48
Thanks Thomas Sabik and Goodies. I have posted in codereview section — Naveen Kumar 56 secs ago
possible answer invalidation by user3756068 on question by user3756068: codereview.stackexchange.com/posts/243827/revisions
10:05
0
Q: Design elevator to get user commands and execute request based on current elevator moving direction (UP/Down)

Naveen KumarI have created an simple elevator design for 100 floors building with just one elevator. I have dependency between classes which I want to eliminate, any thoughts/suggestion to make it more better in-terms of SOLID principles? I have created following set of classes and detailed their purpose cla...

0
Q: CSS exercise of cloning background image

protoCodingI believe I'm writing in the correct place. However, I'm not fully sure, and I am relatively new to Stack Exchange. If it is not, and can be moved by an admin/moderator in the correct place, please do so. Or else let me know where and why, and I'll fix it. PS: Sorry for any grammar mistakes. I'm ...

0
Q: Async generation of large buffers of random numbers on the GPU

rng_helpI would like to obtain some feedback on a simple code I wrote to implement an easy and hopefully fast way to generate a large number of floats with CURAND and use them one at a time, by switching between two large buffers that get generated and copied onto host memory asyncronously while the othe...

 
2 hours later…
11:57
@Duga Rolled back from 12 to 6. It would be appreciated if more people keep an eye on such invalidations.
Monking.
@Vogel612 I think the -5 is largely due to the hostility of the user.
0
Q: simple automation executing platform in python

amos-baronso as the title suggests i'm building a platform like Rundeck/AWX but for server reliebility testing. people could log in to a web interface upload scripts, run them on servers and get statistics on them ( failure / success). each script is made up of three parts, probes to check if the server is...

12:26
0
Q: Calculate the first passage time of a sequence consisting of prices

HJA24I want to calculate the hitting time of a sequence of prices. I define a log price corridor by for forming a double barrier, up_threshold and down_threshold. When one of the barriers is touched, I note the time and reset the barriers around the last price My script looks as follows: import panda...

12:50
0
Q: Code for sorting items in recyclerView

DestroyerI'm have recyclerView which is needed for displayed for show list of my audio records. I added the ability to sort my audio records. Please take a look at the code that I use for sorting and tell me how it can be improved. enum class AudioRecordSort { SortByDate { override fun sort(e...

13:02
Monking
13:37
-1
Q: My array wrapper is painfully slow when compared to std::vector

HjklThe code: template<class T> class dyn_arr { public: dyn_arr(void) { this->array = {}; this->element_count = {}; } ~dyn_arr(void) { this->dealloc(); } bool alloc(unsigned int element_count) { unsigned int final_count = element_coun...

0
Q: Sierpinski Triangle in AEC

FlatAssemblerSo, I've tried to extend my compiler so that it can target GNU Assembler. And I've made a simple program to demonstrate that. Syntax GAS ;So, this is an example of how to target GNU Assembler (GAS) using AEC, and how to target Linux. AsmStart ;What follows is the assembly code produced by CLANG 9...

0
Q: A pretty simple Rock, Paper, Scissor game on C++

novachronoI've decided to learn more about C++ with the time that I have right now through Udemy courses. To test out the stuff that I've learned up until now, I decided to try and code with some of the knowledge I've gained. I wanted try out object oriented features since I've been doing stuff through pro...

13:50
@CaptainObvious Author removed code but left question, this question should be deleted ASAP.
14:50
As this kind of question at Code ReviewJens 7 secs ago
One of these days I'm going to make a flowchart for figuring out what does and doesn't make a question off-topic.
It's on my list. One of them. Somewhere halfway.
@pacmaninbw Rolled back by @Vogel
@Mast I've thought about that a little. But currently my mental picture is a flow line rather than a flow chart. ;)
@Peilonrayz Yea. Put it in at the front, kick it from the line if it doesn't comply. Still survived at the end? Should probably be on-topic then.
That's why it can't be that hard, right? Except our rules are so convoluted at times...
@Mast VTC retracted.
Now, I've not thought about it that much, but I believe the problem is going to revolve around "Is your question missing context? (Yes / No)" (The askers is probably always going to say No) or "Is the language your code in on-topic? (Yes / No)" (What languages are on-topic?)
15:03
All reviewable languages are on-topic. Most languages are really, even esoteric ones.
As long as there's a spec and a compiler/interpreter.
Oh sorry, I didn't intend to bring that up to start an argument around what is on-topic. I meant it more from the users POV, how will the flow chat explain those things?
@DerKommissar I've worked with a wireless crane once. One of those heavy, fixed, overheads you see in factories. Even the safety was done wireless. Think time-out issues and minimum-response times on the safety. Awful.
@Peilonrayz Pick on the great issues first. Does the code produce the correct output?
That already catches 20-30% of the questions.
Whether enough context is available is a really tricky one to specify.
@Mast I agree, it should probably be ordered like that.
Perhaps UWYA could go even higher, since it's a non-site-specific one...
But something along those lines.
There's a lot of reasons I haven't finished the darn thing yet.
Or even got halfway with it.
15:20
possible answer invalidation by Emma on question by Emma: codereview.stackexchange.com/posts/243843/revisions
@Duga Not invalidation per se, but a bad move anyway. Don't keep adding solutions in different languages, please.
hi there - many thaniks dear Furas for your reply and all the things you mention. i will surely come up with some lines of code. I will take care of all your hints - and yes: i know that SO is a place for idea exchange and knowledge sharing - and for code review. So i will post some code later the week here.... — zero 8 secs ago
@Duga Or, you know, do your own thing.
Sorry @Mast my doggo wanted to play. Yeah, I'm trying to do my own thing in that regard but there's just so much work :(
sigh... well, that user's questions seem to be a bit of a mess
15:33
@Vogel612 ??
something something flags and comments
-1
Q: Trying to eliminate erratic program behaviour - is query to blame?

StumblerI've built an application for keeping track of available rooms in a conference centre. One of the key aspects of this is ensuring that there cannot be more people booking a room than the room has capacity for. Consequently only available rooms should appear for users to select. The SQL code I use...

0
Q: Python hangman code

PeterKoszorusguys I'm new to python and I decided to learn it via doing some project myself so I started working on Hangman game is there somebody willing to chceck my code for some common mistakes and what could be better done than it is, btw the works fine. import random def rand_word(version): if ver...

@Peilonrayz That wasn't directed to you, lol.
We had a bit of a rollback contest going on. Vogel fixed it.
@Mast Oh, I was responding to this ^^
@Peilonrayz Should you have anything, with sourced outflow procedures, I'm sure we can it for you in The 2nd.
Now, I was trying to review a question all weekend and I'm not even closed to finished with that either, so I'll try to fix that first.
15:38
\o
@Vogel612 something something Vogel's secrets: chat.stackexchange.com/…
@CaptainObvious why is this Q so frequent ?
@Mast I don't think I'll have anything of substance for a while yet. I'm sure you're weekend's safe for now :)
Someone want to tell me where I went wrong? @pacmaninbw tbf that makes this a kind of pointless exchange in that case. This exchange doesn't provide definitive answers, doesn't fix code that is broken, and doesn't provide an actual review of code that is working but behaving oddly (the last one being what I'm looking for). – Stumbler 39 secs ago codereview.stackexchange.com/questions/243865/…
BTW: StackOverflow (or rather StackExchange) has many special pages and there is also special page Code Review :) — furas 7 secs ago
@ankii apparently I picked that up from QPaysTaxes
were they a mod ? ;p
mods have more secrets to keep
15:45
not to my knowledge
@pacmaninbw It doesn't seem like a you problem :)
16:14
"Better" for what purposes and from what point of view? If this is piece of code you have created and you wonder how it could be improved, you might try over at Code Review. — Mirek Długosz 8 secs ago
Thanks Jens, I will do as you said. But if it is not against forum policy I want to keep my question here too, since I have been using stackoverflow for about three months and heard about code review just today, thanks to you for that also. — Cem Ayber 43 secs ago
16:31
I’m voting to close this question because it belongs on another Stack Exchange site, Code Review. — Basil Bourque just now
 
1 hour later…
17:33
@Peilonrayz I only just finished that review, so, weekend is about over :-)
@Vogel612 Nah, we all do it.
@Mast Oh yeah 🤦
Nice answer tho :)
17:55
0
Q: LeetCode 76: Minimum Window Substring [Java]

EmmaI'm posting Java code for the Minimum Window Substring. If you have time and would like to review, please do so. Thank you! Problem Given a string string and a string target, find the minimum window in string which will contain all the characters in target in complexity O(n). Example: Input: str...

18:19
@CaptainObvious @Peilonrayz I don't see any edits on that post...
interesting ...
if there's a rollback, there's no timeline link
@Vogel612 Huh, there defiantly was one there
@Vogel612 It's on rev3 now. I see a rollback.
@Mast Fun fact: I am considering a move to Denmark.
@Peilonrayz Thanks.
nevermind it's just me not being used to the layout if the post is on only half a screen
18:22
@Peilonrayz I really need to learn to spell s/defiantly/definitely/
@Mast wrt to your comment I don't really have much to say, it's just "use tox/nox" :)
@Peilonrayz shrug
If it would be yesterday, I would probably amend the answer with it. But I have no experience with that package and it seems like a bit of work to integrate in an environment.
Oh, wow. I really didn't put 1 and 1 together. That thought didn't cross my mind. I can probably write a quick how to in a bit :)
18:43
-1
Q: Is there a more efficient way to do the below?

SimonTI'm fairly new to Python but had to start using it at a new job and all their libs are for 2.7, which is why I am using that syntax. I have this function which gets data from a file, if it exists, and then gets passed onto other functions to perform SQL queries etc. The script is only intended to...

0
Q: LeetCode 76: Minimum Window Substring [C++]

EmmaI'm posting an sliding window problem of LeetCode (Minimum Window Substring) with C++. If you have time and would like to review the code, please do so, I appreciate that. On LeetCode, we are only allowed to change the variable names and brute force algorithms are discouraged, usually fail with T...

 
1 hour later…
19:53
-2
Q: How can I refactor this

david leonfor the following to statements I have duplicated code, how can I refactor it ? statement 1 SELECT "partyObject", "propertyDisplayName", "leasedUnitName", (rankExact * ${searchValues.exactValue}) + ${wordsTomatch.map((word, index) => (rankWord${index} * ${searchValues.wordRank}) +).join(' ')} (ra...

20:17
0
Q: LeetCode 76: Minimum Window Substring [Python]

EmmaI'm posting a two-pointer, sliding-window problem of LeetCode (Minimum Window Substring) solved with Python. If you have time and would like to review the code, please do so, I appreciate that. On LeetCode, we are only allowed to change the variable names and brute force algorithms are discourage...

0
Q: Node.js can't find Mysql and HTML document

karterI made the code by referring to this, but there were some errors. First of all, the program can't find the db when signing up. After submit, the screen stops and shows the following error. [Object: null prototype] { firstname: 'a', lastname: 'a', email: 'a@a', password: 'a', phone: '123...

20:40
0
Q: C++: k-Nearest Neighbours with Lambdas and Priority Queues

Jerik MangubatI implemented getting the \$k\$-nearest neighbours of an origin point to a set of points in C++17. I tried to use some more modern C++ lambda techniques and was looking for feedback on use of lambdas, auto return types, and using a custom comparison function with priority queue. Should other lam...

21:04
0
Q: Is this URL router production ready c++ code?

nilsSo I've written a URL router which also allows for wildcards aka path parameters. A URL like /users/{uuid} can be added and then, when a user sends a request to the server with the following target /users/955b2a88-ae80-11ea-b3de-0242ac130004, the uuid will then equal 955b2a88-ae80-11ea-b3de-0242a...

22:03
This question may be better suited for the Stack Exchange: Code Review forums. — Gaetano Rispoli 18 secs ago
22:22
This might be better suited to code review, but do read their help pages before asking there. — Quentin 47 secs ago
23:10
@ReturnVoid - I think you meant Code Review instead of Super User. — BigBen 50 secs ago
23:25
0
Q: Thoughts on the my tokenizer / lexer

Sheep_WizardI wanted to make a calculator in python so I first wrote a tokenizer. I have written one before but this time I tried to refine it a bit. Any thoughts on improvements, things I could of done better. import re class KeyWord: def __init__(self, name, regex): self.name = name se...


« first day (2598 days earlier)      last day (1717 days later) »