« first day (3183 days earlier)      last day (128 days later) » 

12:00 AM
REFRESH! There are 8019 unanswered questions (89.2254 answered)
 
 
5 hours later…
4:33 AM
Monking
 
 
2 hours later…
6:11 AM
0
Q: Need help in optimizing and improving my python code

Sparsh GargI have a set of json files stored in a folder the folder strucutre is as follows Main_folder ----F1 -----I1 ------X.json -----I2 -------X.json . . . . . . In all the main folder contains 36 subfolders which in turn contain 9 subfolders each having a json file. The json file is a dictionary of a...

 
6:35 AM
0
Q: table name column name from GET parameter

flow StackThis is a function that reads a setting data from DB. public function getSetting(Request $request) { $user = Auth::user(); $tableName = $$request->name; $setting = \DB::table($tableName)->where('id', $user->id;)->first(); return response()->json($setting, '...

 
Monking
@CaptainObvious Seems like they want advice on what their optimization is called instead of a review.
 
7:13 AM
@CaptainObvious don't we all...
 
@Mast I've retitled, to focus on the code's purpose. I hope that enables some useful reviews; whether that's what the asker really wants or not I'm unsure!
 
 
1 hour later…
8:31 AM
@TobySpeight Agreed.
 
9:05 AM
Brevity is what will kill maintainability in the long run... won't pass my code reviews. My take on it : even in hobby projects keep using recommended practices so they become second nature. And typeing std:: is like what .5 seconds extra work? — Pepijn Kramer 31 secs ago
 
 
3 hours later…
12:14 PM
I’m voting to close this question because this belongs in codereview.stackexchange.comgold_cy just now
@gold_cy No, it doesn't! CodeReview deals with complete and working code, and doesn't answer "how to" questions. — user673679 47 secs ago
 
@Duga "But the question did not actually belong in code review at all." -- Narrator
 
12:52 PM
0
Q: str_split() function, not present in standard C library

AmitBelow is the code for str_split() function, this function is not present in standard C library. Syntax: char **str_split(const char *str, const char *delim, long max_splits); Code is below: str_split.c #include "str_split.h" #include <stdio.h> #include <stdlib.h> #include <string.h> static vo...

 
@user673679 Feel free to flag such comments as 'no longer needed'. The SO moderators are aware we don't like such redirects so they're usually removed.
@SimonForsberg Possibly because start checks whether it makes sense to start from the current situation whille restart will force that situation.
 
1:16 PM
0
Q: a tiny rpg game using Phaser 3

AlbertJI wrote a tiny game using Phaser 3, here is the code. var total_attack = 0; var isMagicReady = false; class BootScene extends Phaser.Scene { constructor() { super({ key: 'BootScene' }); console.log(total_attack); } preload() { this.load.path = 'https://raw.githubusercontent...

 
1:41 PM
1
Q: CS50 mario printing pyramids without using "CS50 library"

SamirI am new to programming and I've only learnt basics of C as far as functions. I decided to solve this problem given in Harvard CS50 course. Please review my code. We had to write a program which takes a height from the user and prints a pyramid of that height. How the program might work if the us...

 
Question might be better fit in codereview.stackexchange.comk0pernikus 22 secs ago
@k0pernikus Asking specific "how-to" questions is not on-topic for CodeReview. — user673679 10 secs ago
 
2:06 PM
0
Q: Optimizing python code for speed on large data sets when checking and extracting over values in lists

shramI am working on coding in python and whilst the code works as intended it runs slower than I would like it to. For now I am working on a reduced data set so it is not an issue however when running it on larger data sets in the future the time taken for it to run would be an issue. I am new to the...

 
2:32 PM
0
Q: Java OOP Hangman

scriptaLast time we posted here we were overwhelmed by the useful feedback. We've had another go at OOP/programming - this time in Java. Very different than Python! As before we have lots of concerns at the macro level (is our choice of objects any good?) and the micro level. We'd be grateful for any su...

 
3:08 PM
you can define your listener strings in a file and just reference those, such as FormListenerTypes.Submit => "submit" - then kill magic strings on sight in code reviews. — tymeJV 35 secs ago
 
 
1 hour later…
4:13 PM
0
Q: Generate all solutions for a drinking game

Thijs NulleI wrote this program to print all the numbers of a drinking game, and I was wondering if anyone could comment on the code and see how they might improve it. I am curious to see if it is possible to rewrite the generateJuf function with a fold. import Data.List (partition) isJuf :: Int ->...

 
 
1 hour later…
5:13 PM
<omnking
 
 
2 hours later…
6:45 PM
0
Q: Converting lengths and weights using functions in C++

Strange AlchemistQuestion is: Write a program that asks the user if he or she wants to convert lengths or weights. If the user chooses lengths, then the program asks the user if he or she wants to convert from feet and inches to meters and centimeters or from meters and centimeters to feet and inches. If the user...

 
 
3 hours later…
9:23 PM
Old question that someone must have flagged. Either no code or not working.
 
@pacmaninbw Wow, that one slipped through the cracks. Closed as CNI
Thanks
 
That was posted on what seems like a busy Monday March 22nd
the user had posted three on-topic questions prior to that; since then the OP also posted a question that was closed as MRC
 
9:42 PM
0
Q: C-implementation of the ARM one-time construction API (C++ ABI) in terms of gcc atomic built-ins

niloMore background information can be found at https://github.com/amosnier/arm-cxa-guard. I'm interested in any feedback, but what is really care about is: Will this work? Are there any race conditions? #include <stdbool.h> #include <stdint.h> /** * @brief Select an offset in the guard object fo...

 
possible answer invalidation by Mysterious Shadow on question by Mysterious Shadow: codereview.stackexchange.com/posts/273159/revisions
 
@Duga No AI, but the edit might make the question off-topic because they want an explanation of someone else's code.
 
@pacmaninbw Yeah, chameleon questions aren't allowed. Would you prefer me to roll back your would you like to?
 
@Duga when I first read that question yesterday I wondered if it was CNIAI since it didn't involve dynamic programming but then I left it since Toby answered it
 
10:07 PM
0
Q: Student Registry Program

user9560064Or in other words, a student database program.What does the code do? Checks if there is a text file - if not, creates one with table such as: student's name student's surname student's id and so on. If the file exists, creates a student from the struct, takes data and prints one student's info...

 
@CaptainObvious @SᴀᴍOnᴇᴌᴀ You're hot today, I can barely get to see them before you close them. :D
 
10:23 PM
@pacmaninbw I've been doing stuff a bit today, but I think that is the only one I've closed...
 
0
Q: Using XSLT 3.0 to extract information from real-world HTML and produce JSON

Forensic_07For work, I extract information from HTML and XML sources to save in databases. The objective is to generate JSON representing the source document's information and its relationships in order to 1) extract key information for database columns, like the title of a court case, and 2) to save the wh...

0
Q: Implementation of versatile IIR digital filter in C++

SteveI have realized that all the digital filters of the IIR type have the same structure. They are described by difference equation in following form: $$ y(k) = b_0\cdot x(k) + b_1\cdot x(k-1) + \ldots + b_M\cdot x(k-M) -a_1\cdot y(k-1) - a_2\cdot y(k-2) - \ldots - a_N\cdot y(k-N) $$ Based ...

 
10:58 PM
0
Q: Student Registry Program

user9560064Or in other words, a student database program.What does the code do? Checks if there is a text file - if not, creates one with table such as: student's name student's surname student's id and so on. If the file exists, creates a student from the struct, takes data and prints one student's info...

 

« first day (3183 days earlier)      last day (128 days later) »