« first day (2237 days earlier)      last day (1782 days later) » 

12:00 AM
RELOAD! There are 6109 unanswered questions (89.8651% answered)
 
12:36 AM
It's not clear if you're asking for a general code review, or if you have a specific problem that you want help with, but in any case the question in its current state is too broad. Please see How to Ask. — Herohtar 31 secs ago
 
 
2 hours later…
2:48 AM
0
Q: Seeking the seeds for writing tidy event handlers in JS

CalafI'm seeking a critique of the simple program below, which displays two counters and increments them through a button, using D3.js. In real life of course no one has a need for displaying buttons that increment counters. It's a stand-in to talk about how to craft the code over the scaffold of a tr...

 
3:09 AM
"Perform a modulo expression x^e mod m when all 3 variables, x, ė, and m are all u128b structs" --> Modular exponentiation without range restriction lays out how to do that without a wider type. — chux 30 secs ago
 
3:50 AM
0
Q: Reference Number, and using them to compare with following float numbers

kiwiThe project is based on Eye Tracker. Let me brief the idea behind the project to understand my problem better. I have the hardware of Tobii C eye tracker. This eye tracker will be able to give out coordinates of the X, Y of where I am looking at. But this device is very sensitive. When I look at...

 
 
2 hours later…
5:54 AM
0
Q: The last standing gunman in a circle

Krishnakumar SubramanianI dont know why, In most of the interviews, interviewers are asking this question commonly. The question is : There are n number of persons standing in a circle manner. The first person has a gun and he kills the very next person who is alive and handovers the gun to the next person. Who will rem...

 
Monking all
@Peilonrayz Did you remove your meta question about close-reason usage?
 
6:14 AM
0
Q: Python code for pricing data checker script

codepirateadamI was recently given a task to implement a data-checker script which given an input file containing (date, last_price) values should check for 3 different kind of errors - missing values, stale values and outliers and returns list of errors. I wrote the code below and the feedback i got was that...

 
6:34 AM
1
Q: Client wrapper for sending data to a downstream process

Aparna RajanI am building a python client for an alert process engine. The users can use this client to publish and clear the alerts. The client exposes two methods publish and clear to the users. These methods accept some parameters which would define the alerts from the users and enriches them with a few...

 
7:14 AM
0
Q: A Connect Four evaluation function in Java is not smart enough

coderoddeI have a couple of projects: GameAI ConnectFour GameAI implements a couple of algorithms: Minimax, Alpha-beta pruning and Alpha-beta pruning with state ordering. The actual game tree search algorithms seems to be in order, yet when I play against the bot connected to such an algorithm, it ac...

0
Q: Shortest way to form a string out of subsequence of a string

thadeuszlayThe task is taken from LeetCode From any string, we can form a subsequence of that string by deleting some number of characters (possibly no deletions). Given two strings source and target, return the minimum number of subsequences of source such that their concatenation equals targ...

 
 
1 hour later…
8:41 AM
A million records should probably be in a database, not a spreadsheet, but anyway, could you do the fetching of the data asynchonously? Request about 1,000 or 10,000 records at a time, and as the next batch downloads search the previous. (And is this a better fit for Code Review?) — Ken Y-N 1 min ago
possible answer invalidation by jakstack on question by jakstack: codereview.stackexchange.com/posts/222552/revisions
 
0
Q: Lightweight lock using OMP atomic

user35915I am working on a Monte Carlo simulation using OpenMP multithreading. To avoid race conditions when multiple threads work on the same resolution element, I have implemented the following module to atomically (using OMP atomic, since AFAIK there's no easy way to do atomic operations directly in Fo...

 
 
1 hour later…
10:15 AM
0
Q: C# LinqToExcel Reading Data & Creating Speed

AndrewEI have created a function which will read an excel document.Within the excel document there are 2 sheets.What I'm doing is getting some data from sheet 1 and some data from sheet 2 and merging that data into an object and writing it to another excel document.The problem here is it becomes quite s...

 
10:27 AM
@Mast yes
 
11:27 AM
I'm voting to close this question as off-topic because it seems more suited to CodeReview — phuzi 33 secs ago
we usually deal with bugs or questions about the behaviour of code here As mentioned above, you might find that your question is more suited to the StackExchange Code Review site - check out their on-topic documentation and see if they would accept your question. — ADyson 5 secs ago
 
11:56 AM
0
Q: Boggle solver - Updated (with Trie)

EMLHere is an update to my previous boggle solver. The new version has an almost instantaneous output, removing the need to limit the length of words being searched for. Any comments on my general coding implementation or layout would be appreciated. Python v3.7 """Boggle game solver""" class...

 
12:20 PM
"I need some help understanding how I can rewrite this" isn't really a question since it doesn't seem that you're stuck on a problem. If something doesn't work, please explain the issue. If you just want to improve code there is a Code review site just for this where people look over your code to try and improve it. — Joelius 52 secs ago
I now have a much more complete script in Code Reviewaduguid 45 secs ago
 
@Peilonrayz Why?
We've had the discussion about (too) broad usage of that close reason in chat before, it was about time someone took it to meta. Even if it was just for future reference.
 
12:36 PM
0
Q: Suitable way to scrap a website

prashant ranaI have created a manga scrapper to scrap the website. My current approach: take link for manga which one wants to download eg https://www.mangapanda.com/one-piece from this link take all the chapter links and name, store them in list then for each link navigate that link and then get the valid...

0
Q: Advice needed with optimizing JavaScript For Loop function

kelbornI need help optimizing the following jQuery code. The below jQuery snippet has been partially optimized to use a native JavaScript for loop to make some alterations to the html instead of using the jQuery .each() method. What further techniques could be used to make the click event more performan...

 
12:46 PM
@Mast I was going to post an answer explaining my POV, but then realized I CBA. It's a shit question and status quo's always going to prevail. We also have already had a similar question for "future context".
 
Possibly the wrong website. Try code review instead. And yes, it is a lot of code to process :) — JvdV 58 secs ago
 
1:48 PM
your question belongs to codereview.stackexchange.com if you ask me, hence the downvotes. — Silviu Burcea 26 secs ago
 
2:03 PM
Hi folks, wondering if someone could point me in the right direction for storing data in .net. I'm logging a series of data points and writing them to a file, but I'd also like to store the last hours worth in the program for graphing but no sure on the best way. I was thinking a dictionary with the key as the date/time of the data point and the value as a class that contains the values. Does that seem reasonable?
 
@Notts90 depending on the "magnitude" of data you want to store, you should look into Timeseries databases
 
I think it will be about 6 series with 1000 points each, each point has about 6 double values
 
Ironically, I've been having these same arguments for at least a decade now. I thought we would have moved on by now, but somehow the snide complaints about millennials continue.
3
 
lol
@Vogel612 Just read this and it sounds like exactly what I need, now to find one that works for me! blog.timescale.com/…
 
2:20 PM
@Peilonrayz Cell Based Automation?
@Vogel612 The old-fashioned way would be storing the data and keeping the ones you're interested in in a FIFO. Are Timeseries the way to go nowadays?
 
@Mast Strange, "CBA" didn't come up with urban straight away. urbandictionary.com/define.php?term=cba
CBA - Can't be arsed
 
Ah
Meh, I thought it would be good to leave it around.
 
@Mast timeseries databases are usually some kind of HA database that can store humungous amounts of data
if you want to sacrifice that amount of memory on the altar of requirements, you might as well do it in a way that allows you to sacrifice it separated from your application
 
Makes sense.
 
and they usually provide a variety of aggregation and warehousing operations
I had the displeasure of writing tons of database adapters for a variety of timeseries databases
that may have kinda scarred me a bit...
 
2:26 PM
@Mast Is that directed at me? If so I can undelete it if you want. IIRC You can't put it in the VTUD queue.
 
2:51 PM
What's your Qt version? codereview.qt-project.org/c/qt/qtbase/+/264903 says that 5.12.4 should fix this issue — Pie_Jesu 31 secs ago
 
0
Q: Functions to handle async calls and also handle loading and error status in React component

cbdev420I've got the following component structure: Component hierarchy: <AdminBlogPostContainer> <AdminBlogPostPage> <BlogPostForm> AdminBlogPostContainer.js Contains all the functions to make the API calls, get posts from database, save posts, delete posts, upload images, etc. It also sets ...

-1
Q: Can my code be simplefied

Wilco van der HelmI've created some code to let users fill in a excelsheet with 4 tables. by pressing a button it copies the table data to another workbook. it has to find the last row filled and copy the data below that. Some cells won't get filled so i used .Filldown to get the empty cells filled. In order to ma...

0
Q: Abstracting a SQL Server Table builder

Daniel FoustI'm working with SQL Server 2012 and wanted to make table builder, similar to Laravel's migration classes. I would like to be able to expand this down the road but the main purpose of this code will be to initialize the database. It will likely only be run a few times in production, but likely ...

 
3:17 PM
0
Q: Permutation of words in a sentence

Nehal SameeThere is a problem which discusses in how many ways can the words in a sentence be permuted . I wrote a code as follows which works for the sentences (I think so) . It would be helpful if anyone can assure me if it's actually correct or not . Besides , any suggestion regarding the shortening of c...

 
@Vogel612 If I wanted to privately contact a mod, any mod, about something. But it would take more than a couple of flags to explain, what should I do? Just raise a ton of flags?
 
gimme a sec, I'll open a private room
 
if your tests pass then it is a correct way to implement it, for reviews please ask at codereview.stackexchange.comformerlyknownas_463035818 28 secs ago
@formerlyknownas_463035818, thanks for the suggestion. But it's not exactly code review. I am even concern about complexity also. Ideally, it shouldn't be more than O(logn) — santosh kumar 10 secs ago
your method is O(log N). If you dont want a code review, i dont understand what is the question — formerlyknownas_463035818 53 secs ago
@santoshkumar Both of those are handled on code review. That really is the best place for these type of questions. FWIW, you never check if the container is empty which will cause you function to blow up if it is. — NathanOliver 19 secs ago
(if you do post this on code review please delete it here) — NathanOliver 44 secs ago
 
3:57 PM
0
Q: Java TreeMap.floorKey() equivalent in CPP STL map class

user203186Java Program: TreeMap<Integer,Integer> map = new TreeMap<Integer,Integer>(); map.put(10, 100); map.put(20, 200); map.put(30, 300); map.put(40, 400); map.put(50, 500); map.put(60, 600); map.put(70, 700); map.put(80, 800); System.out.println(map.floorKey(5)); ...

 
Should be posted on CodeReview. — takendarkk 53 secs ago
I'm voting to close this question as off-topic because belongs in code review — aws_apprentice 57 secs ago
While Code Review might be a good place to suggest going for this type of question, we should get out of the habit of sending question-askers over there. Please read this meta post for clarification. — idjaw 43 secs ago
 
4:33 PM
Monking
 
What do you mean "bad?" Bad as in it fails to compile? Bad as in it fails a code review? Bad as in it doesn't do what you think it does? Bad as in it doesn't satisfy the requirements given to you? Bad as in it's inefficient? Bad as in it's doing things in ways that yourself or others doesn't deem "good?" Bad as in it's hard to read? etc. — Jeff Mercado 44 secs ago
 
4:57 PM
-1
Q: Machine learning, kNN and NB algorithm. Is there a way make the code more compact and nice looking?

Rafiul NakibHere is my code! I want to reduce the number of lines and possibly make it look more neat. This class is implementing Naive Bayes algorithm for machine learning. Please help as much as you can. Thanks! I have tried splitting into more functions and then calling them to do the work but is there a...

 
possible answer invalidation by Toby Speight on question by santosh kumar: codereview.stackexchange.com/posts/222587/revisions
Hi @Deski Rey! Welcome to StackOverflow. I'm going to vote to close this question, because StackOverflow is not the best site for open ended questions like "please review my code". The good news is there is a dedicated site for that that I suggest you post it to instead. And don't forget to auto-format it when you post it there. — GregL 20 secs ago
 
5:24 PM
I believe the right place for such questions is Code Review. — Hristo Iliev 58 secs ago
I think this question is more suitable for codereview.stackexchange.comSweeper 48 secs ago
 
-1
Q: Taking a long time to load

braidzI have a php file that's taking an extremely long time to load and when it is loaded it just return a blank page (still shows all CSS and stuff, but no outcome from the queries it was executing). I am using Wamp server for this, the problematic part of the script is price_stocks case/function. ...

0
Q: PyQt implementation of a TextEditor

Omar ShallaI have built a text editor using python and PyQt. Features include auto completion, spell checking, synonym suggestions, dictionary definitions and more. The auto completion and spelling suggestion modules use Tries. I am new to PyQt and would like general suggestions on the design of the app...

0
Q: Cat Scoring app - looking for a suggestions on imporing the code

Deski ReyCan you please review my code and suggest why it may or may not be a professional looking code. I am just starting out as a programmer I am able to write code but I don't really know where I am right and where I am wrong. Also, I have heard that using the MVC approach in code is a smart way. Ple...

 
6:18 PM
1
Q: JSON selector class in Python

connectyourchargerI've created a simple little class called JSONSelector to be able to select relevant data from a JSON object (a dict in Python). Here's what I have so far - it's based off of a few SQL statements, NumPy methods, and JavaScript iterating methods: class JSONSelector: def __init__(self, json): ...

 
7:17 PM
If the code works (which seems unlikely, but giving the benefit of the doubt), and you want a review of all of your code (not just the parts you want reviewed), you may be better served on Code Review, but review their help center first. — Heretic Monkey 27 secs ago
 
7:39 PM
@200_success I upvoted your answer to that profanity question, but I do think you missed one key attribute.
I added an answer discussing that attribute.
Basically, any terms that are commonly used to attack people in a protected group (racial, sexual, religious) are terms I don't think belong on Code Review under any circumstances.
0
A: Are explicit words allowed in source code?

Der KommissarThis is a good question, and I think you made all the right moves with your actions: You left the explicit words out; You asked a question on Meta as to whether they're acceptable or not; So, let's discuss that. Are explicit words allowed in a programs source code? This is the first quest...

 
I kind of alluded to it by saying that deliberately offensive content is still unacceptable, and linked to a Meta question that mentioned the Gay-o-Meter case.
But your addition is valuable.
 
Ah, the way I read yours was more along the lines of "if it seems you mean it in a deliberately offensive manner..." I wanted to clarify that, in my opinion, "if that term is commonly used in a deliberately offensive manner" it doesn't belong.
 
That sounds fair too.
 
Like I said, your answer is great, I just wanted to add that there are some terms that, regardless of intention, I think don't belong. Spoiler tag and censorship or not, if I see them I intend to edit them away.
 
As I said, there is no easy answer — no simple rule that covers everything to everyone's satisfaction.
 
7:51 PM
Nope, there isn't. It'll always be subjective, and by definition it is subjective. We all have to act responsibly, professionally, and respectfully.
 
9:04 PM
code review SE is for code reviewing — MarsNebulaSoup 16 secs ago
fyi @MarsNebulaSoup you can link directly to Code Review by typing [codereview.se] :) — G. Anderson 28 secs ago
 
TIL about Thomas Bowdler
 
-4
Q: Method always returning an empty

EricI'm new to C# programming and is trying to make a function that is supposed to convert a database json file into dictionary returning it as a variable I can use. I'm running this in Unity and the Rest Client to desalinize the file. I've checked that I am receive the json file, and that the json i...

0
Q: My Website - Move Menu or Content

jweaverI've been making my menu a bit wider on my website, then I realized that the menu was too wide that it started touching the content portion of the wrapper and not reformatting itself so they do not touch. I'm going to include the css code I use for the website itself and the menu. I tried changi...

 
9:26 PM
@CaptainObvious sounds like a request for help in changing code
 
9:37 PM
Unrelated. Be very careful with #define macros. They have no brains at all. if the preprocessor sees the macro, it replaces the macro whether it makes any sense or not. In addition, it disrupts reading and slows a programmer's ability to process the code until they are familiar with your shorthand by hiding the intent of the code. Submit code like this many places and you will have a rough going during code reviews. As for stack overflow, you'll have the best experience by posting questions that are as easy to read as possible. Many will take one look, drop a quick WTF? and move on. — user4581301 18 secs ago
 
9:59 PM
0
Q: C++ network stream

ChipsterSo, I'm new to socket programming. I wanted to get started learning, and start making stuff, but was really surprised to find out there was no standard C++ network library yet. I'd have to look for a third party library, or make my own. A third party library search turned up some solutions. Boos...

 
10:35 PM
@200_success @DerKommissar Culture and usage is an important piece of this. When I worked in the ATM development department at Citigroup we hired native language speakers from multiple countries that spoke the "same" language (for example Spanish) to make sure the ATM didn't use language that was offensive in any of the cultures.
 
@pacmaninbw There are nuances to everything, if it's obviously a cultural difference I, personally, wouldn't penalize anyone. But, if someone else reported it as offensive I would back them up.
I'm not offended by it (I'm not offended by any of them, honestly), but that doesn't make it any more appropriate. Yes, that particular example happens to be a synonym to 'cigarettes', but that doesn't mean someone else won't see it and take offense.
It's always subjective which is why there's no clear answer to it. There are some obvious generalizations, but there's no "this word is definitely bad."
 
If it's working, it should go on Code Review. — madreflection 27 secs ago
 
@DerKommissar Ok yeah, I didn't get that vibe from your answer.
 
Mine was written to supplement the excellent answer from 200.
 
@SᴀᴍOnᴇᴌᴀ I am confused, the code works. No reproducible issue and author indicated "can this be simplified" which suggest more of a review rather than solving a problem. — Greg 1 min ago
(-‸ლ)
maybe that actually requires weapons grade (-‸ლ) ...
 
1
Q: Beginner text adventure game

ElijahI am new to Python and I have not yet done any OOP. I wrote this text adventure as a first project and I would like to know if there is a better and more efficient way to write my code within its current paradigm. Any suggestions or critique are more than welcome. The code is quite long. I don't...

 
@SᴀᴍOnᴇᴌᴀ Normally if it is on-topic on CR then I just leave it. I've never seen trying to explain off-topic SO rules to end well.
 
@Peilonrayz yeah- perhaps it is like a Sysiphucian mission
(except when it was 200 explaining it to me)
 
@Greg Given that you have the association bonus for Code Review that doesn't fill me with confidence that you know what is on-topic over there. If you suggest to post there, but it's actually off-topic there, but on-topic here then you've unjustly closed a question and caused the asker unnecessary grief. — Peilonrayz 45 secs ago
 
11:06 PM
@SᴀᴍOnᴇᴌᴀ Pretty much.
 
11:40 PM
0
Q: Setting a variable out of Do-Try Block [Swift]

SudaraI need to set a variable such that I can access it out of the do-try block. I use the do-try to exit early if there are any errors. This is what I currently use, but I am not sure that it is the best-practise or if there is any other better way to do it. let rulesXml: XMLElement do { ...

 

« first day (2237 days earlier)      last day (1782 days later) »