« first day (2205 days earlier)      last day (1828 days later) » 

12:00 AM
RELOAD! There are 6038 unanswered questions (89.8734% answered)
 
 
2 hours later…
2:25 AM
If your code works, and you want a review on all aspects of the code, you should consider heading over to Code Review and read their help center to find out if what you're asking is on topic there. — Heretic Monkey 28 secs ago
 
 
1 hour later…
3:33 AM
0
Q: Named Semaphore with async calls

Gary SmithI have multiple distinct processes that need to access external resources that are rate limited. The processes are all async in nature and run in different applications. In times past I would just use SemaphoreSlim this design doesn't allow for that. I've found several samples that seem to be ...

 
3:52 AM
0
Q: Program for chess simulator

JustinI have written an answer to this question on Stack Overflow. To make it easier for you, I have copy-pasted the main task below: This is a so-called chess simulator, that will take a value and compare the numbers from both lists. If the numbers "threaten each other", a point will be added....

 
 
1 hour later…
4:57 AM
Thanks! I didn't know about Code Review page :) — Lyczos 58 secs ago
If your program is working and you are looking for expert commentary on it, it might be more appropriate for codereview.stackexchange.comBen Voigt 26 secs ago
 
5:14 AM
0
Q: RxJS: How to make call using data from previous one and join result data together?

LyczosI have an API which I can't modify. I have to use data as it is. I want to join data from two separate requests where the second request is based on data from the first one. I have a working solution already but the code quality, in my opinion, is low so I want to know your opinion (and if you...

 
5:33 AM
0
Q: Emulating Virtual Registers Part 3

Francis CuglerThis is a continuation of my work in progress and the last iteration that I posted can be found here. I have designed a compact class template that uses SFINAE with constructor delegation to reduce the amount of code duplication, and to keep this as generic and portable as possible. I even adde...

 
5:53 AM
-1
Q: Switch columns in PHP 2-d arrays

php_freshmanguys. I am trying to write a magic PHP application. But, I am a freshman in PHP. I want to switch (best randomly) the columns in 2-d arrays. Like below, $array=( array('1','2','3'), array('4','5','6'), array('7','8','9') ); some_function($array); var_dump($array); I want to the output like thi...

 
6:13 AM
0
Q: Python program for "0–1 knapsack problem"

JustinWith reference to - https://en.wikipedia.org/wiki/Knapsack_problem - This is the definition of a knapsack or a rucksack problem: Here is my version of the knapsack problem in python: def solve_naive(capacity, items, weights, values): grid = [[0] * (capacity + 1)] for item in range(it...

 
 
1 hour later…
7:26 AM
Monking
 
7:52 AM
-1
Q: Scraping the Indonesian Stock Exchange

NickHello and welcome to the worst code you'll see today :). I am a financial engineer so I have literally 0 educational background in programming or software and I threw this together out of pure interest to see if I could do it (hint: yes, but absolutely terrible) So below is the jumbled mess that ...

 
8:40 AM
possible answer invalidation by Justin on question by Justin: codereview.stackexchange.com/posts/219872/revisions
 
9:30 AM
0
Q: Finds the Day when Date is given as input

THE EPIC GUYWas too bored in holidays...here's a code which finds the day when the date is given in the correct format....please give a logical date cause i didn't account for improper inputs cause I'm too lazy....my code is short and sweet...i used the algorithm given in this video click here to watch He...

 
 
1 hour later…
10:49 AM
0
Q: C++20 standard compatible vector

LybertaI decided to write my own vector class template for learning purposes. My main goal was a correct interpretation of C++20 standard (as of n4810). I took some liberties and decided to use concepts instead of plain typenames for iterators instead of SFINAE. On the other hand, I decided against Emp...

 
11:04 AM
Your question should be asked here - codereview.stackexchange.comJustin 52 secs ago
 
0
Q: Find Median of Two Sorted Arrays in JS

thadeuszlayThe task is taken from leetcode There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). You may assume nums1 and nums2 cannot be both empty. Example 1: ...

 
11:29 AM
0
Q: Simple PHP image upload with error handling

GuusFrenkenI wrote this method to upload a floor plan image: function upload_image($path, $file) { $errors = []; $ext = pathinfo($file["name"])['extension']; //randomly generate filename to avoid conflicts $filename = uniqid().'.'.$ext; if ($file["size"] > 2000000) { $errors[]...

0
Q: Simple INI file parser in Haskell

Matthias BraunI've written a rudimentary parser for INI files: {-# LANGUAGE OverloadedStrings #-} import qualified Data.Map as M import Data.Maybe (fromMaybe) import qualified Data.Text as T type Ini = M.Map T.Text Section data Section = Section { name :: ...

 
11:49 AM
0
Q: Sudoku Generator using seed Sudoku

Akshay soniI have created a Sudoku generator in Java.Here i am using a basic solved sudoku as seed and by transposing it and shuffling its row and coloumns i get a new solved sudoku. Below is the code : //import java.util.Arrays; import java.util.Random; public class SudokuGenerator { private ch...

 
12:11 PM
Monking
 
Your question is off topic, please consider posting questions requiring code reviews to Code Review Stack Exchange, thank you. — Compo 11 secs ago
 
1:09 PM
> Body is limited to 65536 characters; you entered 66294. Ugh, gotta trim stuff. Removed repeating wording in [vector.modifiers].
nice
 
 
2 hours later…
2:42 PM
Welcome to Stack Overflow! Since this question in its current form appears off-topic, you may wish to look at other resources. Requests for review of working code better belong on Code Review. More open-ended questions and discussions are also welcome on the Rust subreddit, the Rust users forum, or the Rust Discord server. — Shepmaster 46 secs ago
 
3:06 PM
0
Q: Fibonacci Pisano: how to make sure the program does not exceed time limit (Python3)

djrilesI was trying to output F(n) mod m to find the remainder of Fibonacci number, where F(n) could be a very big number: # Uses python3 n, m = [int(x) for x in input().split()] def fib(n): a = [0, 1] if (n <=1): return n else: for i in range(1, n): a.append((...

0
Q: Simple Coffee Ordering App

SteveThis simple coffee ordering app will allow user to enter customer name and total cups of coffee. Any comment on coding style or in regards to data structure? const order = []; const customer = { name: '', totalCups: 0 } const checkCustomerOrders = () => { if (order.length === 0) { ...

 
3:21 PM
You should ask questions regarding code improvement in Code Review Stack Exchange — vadian 1 min ago
 
3:46 PM
0
Q: Rust, Simple function to create Tokens

robinellisI am new to Programming and rust and as a exercise I was making a simple Lottory checker program. It has a simple menu, the user enters a number for the corresponding option such as 'Add a line', 'Check if I am a winner' etc. So all the user needs to do is enter either a number or a 'y' or 'n'. ...

 
4:06 PM
0
Q: Why iterative code times out for calculating the number of trailing zeros in A factorial

Krishna Kumar TiwariBoth the codes caluclate the trailing number of zeros in A!. Here is the iterative code : It times out for large input public int trailingZeroes(int A) { int count=0; for(int i=5;A/i>=1;i=i*5) { count+=A/i; } return count; } And here is the recursive code and it gets completed in ...

 
4:25 PM
0
Q: Trying to simplify my typescript before I move into my angular mobile project

2neCurrently my code is based around mouse events so that it is easier to test but I will be swapping these to touch events once I have had the code reviewed. The idea of the UX is that you need to mousedown for 500ms until you can move the spot (similar to that of iOS when re-arranging apps on the ...

 
4:45 PM
@Vogel612 lol
 
5:05 PM
0
Q: How to count the number of occurrences of english word and chinese character in some files?

PhoenixHow to count the number of occurrences of english word and chinese character in some files? I want to implement a function through Node.js: count the number of occurrences of english word and chinese character in some files. // filesDir = "../text"; // "../text/english.txt"; /* Since then,...

 
5:25 PM
1
Q: How can I create a simple servlet using Racket

awyr_agoredI've been looking for a simple tutorial about creating a servlet in Racket that posts a string such as hello world (or in JSON format) to the client that performs a http request address. For example, I have a game that makes a http request and reads a response. I want racket to be able to send '...

-1
Q: New ILogger instance for library from IHostedService

Jiří KubešI have a project implementing .Net Core hosting pattern. So I have something like this: public static async Task Main(string[] args) { var builder = new HostBuilder() .ConfigureAppConfiguration((hostingContext, config) => { ... }) .ConfigureServices((hostContext, services) => {...

 
Thats editor. That wont do live code review. And as far as editor is concerned I use Illuminated cloud. I am publishing code review for Apex for different IDEs, Intellij is done, and not I have to do it for eclipse. — Nagendra Singh just now
 
5:43 PM
This should be closed for being too broad. Next time, keep the question focused, ask one question at a time, and don’t ask questions that will just solicit random opinions. See What types of questions should I avoid asking? and How do I ask a good question? And if you, for example, are soliciting a code review, then codereview.stackexchange.com might be a better forum (but even there, you need a MCVE which is a “working piece of code”, not just snippets). — Rob 53 secs ago
 
6:04 PM
0
Q: X, Y Coordinates class in Lazarus (Delphi-like)

Vlastimil After I've now officially announced, that I'm discontinuing my color picker for Windows, I'm about to embark on a journey through Linux development. I was quite strong in Delphi on Windows, and see no valid reason to focus - not that I'm not trying to, in quite many languages - mainly on dev...

 
7:04 PM
0
Q: Simple Node.js user management system

MilesZewI am working on a application that is made completely out of javascript (other than the database) and created a simple user management system for the application. This user management system creates a query to the database containing the user info (the database contains the user info not the qu...

 
When you say that these will grow/shrink/change over time, what do you mean? Depending on your process you may want these new transformation functions to be code reviewed, so I would think you would want them included in your codebase and not a database. Then you could just pipe your value through any transformation functions you wanted to perform. — Brett Beatty 8 secs ago
 
7:43 PM
0
Q: Best practise to design API for multiple printer attributes?

broadbandI have network printers which have different attributes (e.g. supported network protocols, languages, status, print modes). public abstract class PrinterAttribute { protected PrinterAttribute(int value, string dsc) { this.Value = value; this.Dsc = dsc; } protected PrinterAttribut...

 
8:03 PM
0
Q: NZEC Error in DFS traversal of a tree

Amey MeherI have all the nodes of a tree in an ArrayList<Node> nodes and my edges are in given in the arrays u[] and v[] I wrote a function to build a tree: static void buildTree(int u[],int v[]){ for(int i=0;i<u.length;i++){ nodes.get(u[i]).addChild(nodes.get(v[i])); nodes.get(v[i])....

 
8:57 PM
"I have a solution so far but not satisfied my code" - That sounds more like codereview.stackexchange.com. — melpomene just now
 
9:22 PM
0
Q: First proper program, Tic Tac Toe

JoeMBlairI'm still pretty new to programming, only been doing it a week. I'm just wondering if I made any glaring mistakes or anything that could be improved code wise? import random the_board = [] players = [{'type': 'player', 'piece': 'X'}, {'type': 'player', 'level': 'smart', 'piece': 'O'}...

0
Q: Implementation of a property and a corresponding animated setter

rmaddyThere a various examples in UIKit where a class has a property and a corresponding method to set the property along with an animated property. Examples include the progress and setProgress(_:animated:) of UIProgressView or the isEditing and setEditing(_:animated:) of UITableView. In Objective-C...

 
9:42 PM
0
Q: Convert Connected Cells solution from iterative to DFS

Scott SkilesIn this LeetCode problem, Longest Palindromic Substring, it is listed under Dynamic Programming for Google interview preparation. My understanding of dynamic programming is roughly "recursion + memoization + guessing." In the Python solution to this answer below it is not clear to me where the dy...

 
 
1 hour later…
11:01 PM
0
Q: A countdown numbers game solver

EMLPlease feel free to review my countdown numbers game solver. Posted here too for people working on the same problem. For clarity the print statement "Eval..." means the program has used BODMAS on an entire mathematical statement (e.g: 1*3+10 = 31) "Running total" means the program recalculates ...

 

« first day (2205 days earlier)      last day (1828 days later) »