« first day (2304 days earlier)      last day (83 days later) » 

12:00 AM
RELOAD! There are 6203 unanswered questions (89.9282% answered)
12:15 AM
Many thanks! It worked (unfortunately, I googled the solution of tuple_foreach). The code you posted is a way beyond my level of competence, yet I hope, I'll understand it and post a variation of it on codereview.stackexchange.com. It would be great if you could review it. — Nestor 49 secs ago
4 hours later…
4:06 AM
Q: Regex Help to Format Numbers with Commas

MaxI have a string of numbers that look like 999999999.99999 and I would like it to be 999,999,999.99999 Using the below code works but I get commas after the decimal point like this 999,999,999.99,999 var numberstring = 999999999.99999; numberstring.toString().replace(/\B(?=(\d{3})+(?!\d)(\W))/g,...

3 hours later…
6:43 AM
Q: Project Euler : Multiples of 3 and 5 c++

VigneshI have implemented below code for the topic mentioned. Results are coming incorrect in c++. same code is working correctly in python why? for (int i = 1; i <1000; i++) { if (i % three == 0 || i%five==0) { sum_3 += i; } }

7:24 AM
I didn't know about codereview, but I checked software engineering - that is meant for more ALM and deployment types subjects. meta.stackoverflow.com/questions/254570/…obiwanjacobi 59 secs ago
If it's working correctly, you might want to ask the codereview stack exchange site instead. Otherwise, you should at least explain what the code is supposed to do. — EOF 45 secs ago
8:02 AM
Q: Refactoring possible "Arrow Code" when using "Using"

Ε Г И І И Оif if if if do something endif endif endif endif I understand that writing "Arrow Code" like above is an anti-pattern. But then I encountered myself writing similar code when dealing with graphics. Is there a better way to write the following? using (var image =...

Consider Code Review site. — Alexey 28 secs ago
8:53 AM
I have found 2 questions where OP is in need of some guidance (using this query: data.stackexchange.com/codereview/query/1091707/…) but I lack the knowledge in these languages to assist: codereview.stackexchange.com/questions/226600/… and codereview.stackexchange.com/questions/207342/…
There's a theory that says "if you have working code and want improvements, you should ask on Code Review". It would be an alternative venue, for sure. It might be better than SO, though not necessarily as fast in the feedback. — Jonathan Leffler 15 secs ago
Q: Count words with given prefix using Trie

Sidharth SamantI have been trying to solve this HackerRank problem. What I came up is this class TrieNode(): def __init__(self): self.children = {} self.word_count = 0 class Trie(): def __init__(self): self.root = self.get_node() def get_node(self): return TrieNode...

9:40 AM
Q: i write code for number to word convert have a look please inform if any error

newonesuggest if more better solution is possible #include<stdio.h> #include<conio.h> #include<Windows.h> #include<malloc.h> #define EndofNumber 13 #define LastElement i+2 void rev_arr(int *arr) { int temp[12], i, max, j; for (i = 0; arr[i] != EndofNumber; i++);/*Counting the total number o...

Q: Solving Sudoku using computer vision, feedback on class

Empan I have made a project at Github that uses computer vision to solve Sudokus. Since this is my first project I would really like to get some feedback on my code. Since it is not allowed to link my repository I took one class that I have created. So, I am mostly looking for feedback on how I writ...

10:19 AM
Q: Generating word sounding similar to the ones given in a wordlist

sayanelThe goal is to make a word generator. The program takes a wordlist (typically, it may be the full dictionary of a language, or a list of names), analyses it, and then invents word that sound alike the one in the list. There is multiple parts of the program, which is embedded in a Qt GUI. I used Q...

10:39 AM
Q: Bank ATM Mockup App

Steve NgaiI re-write my bank ATM mockup app in .NET Core framework and Entity Framework Core. I have 2 user interface: Console and Web. Domain Model layer public class BankAccount { public int Id { get; set; } public string AccountName { get; set; } public string CardNumber { get; set; } ...

11:09 AM
11:28 AM
Of interest: Gerrit Code Review - Access Controls - Notes the type Predefined Groups which holds administrators but doesn't explain exactly how they are accessed with Prolog. — Guy Coder 58 secs ago
Of interest: Gerrit Code Review - Review Labels - Notes +2 in Label: Code-Review but doesn't explain exactly how they are accessed with Prolog. — Guy Coder 54 secs ago
12:18 PM
Q: Immediate Smaller Element Time Limit Exceeded

nahidImmediate Smaller Element The code is working fine Code is here. For each element in the array, check whether the right adjacent element (on the next immediate position) of the array is smaller. If the next element is smaller, print that element. If not, then print -1. but the only problem is I'm...

12:38 PM
@dfhwze Rather than manually making the URL I think you can name the field "Post Link" and it'll make it for you btw.
12:57 PM
Q: Is it worth to compromise on speed to follow PEP 8 guidelines?

ѕняєє ѕιиgнιI have this long line of code: enc = encoder.predict(np.array([data[stock][4*i:4*(i+30)] for i in range(lens[stock]+days-30)])) The problem is, the number of characters (97) exceed 79, which is not allowed by PEP 8. To follow the PEP 8 guideline I can temp = [data[stock][4*i:4*(i+30)] for i i...

@Peilonrayz I don't get it, how do you mean? Is there a guide how to do this somewhere?
@dfhwze No problem, there is a guide here or if you're like me and learn from code here at q.Id as "Post Link",.
@Peilonrayz That's so much easier, thanks
1:38 PM
@Peilonrayz fwiw one would usually expect As [Post Link], because brackets are standard-conform
I had assumed that [] was the standard quoting, but apparently the double quotes are the standard
A: Is there a major RDBMS that DOESN'T allow column name quoting/escaping?

T.J. CrowderAs Leigh Riffel said, the answer to my question depends partially on what you mean by "major." I'm going with: No, there are no major RDBMS engines out there that can't handle name escaping/quoting. A quoted/escaped name is apparently properly called a delimited identifier. Martin Smith pointed...

ignore that, then, the brackets seem to be a microsoft thing
IDK I look over SEDE and see lots of different styles, so pick whichever you like the most. :)
2:35 PM
Q: Train reservation system in Rust as my practice

Y. PAbstract I am a beginner of Rust language. As my practice I want to create simple train reservation system. I know little about the "best practice" in Rust, so I want some advises in my code. In terms of the function there are much luck to improve, but I want advises about how to write codes "...

2:50 PM
For a question to be eligible for the Inquisitive badge, should it be asked 24 hours after the previous, or on a different calendar day?
@dfhwze I would assume next calendar day, going by UTC+0 (IIRC rep and other things resets then)
Q: Lottery Game in Java

Dexter ThornIn the last days I've written a number guessing game that I've posted on this site. I have now written a lottery simulation in which I tried to acknowledge the criticisms of the project mentioned above. I also tried to add error handling. If the user enters invalid numbers or complete bullshit, ...

@Peilonrayz I guess I'll found out tomorrow :p
3:15 PM
Q: Convert a Binary Tree to Doubly Linked List

dfhwzeChallenge Link on geeksforgeeks: Binary Tree to DLL Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as previous and next pointers respectively in converted DLL. The order of nodes in DLL must be same as Ino...

3:57 PM
@Alexander: that could probably warrant its own question on codereview or stackoverflow, but in short: 1. your algorithm is O(kn) where k is the number of shifted elements and n is the length of the array. 2. Array.Copy is significantly faster than copying elements manually. 3. There's a lot of branching logic inside your loops. — Lorentz Vedeler 58 secs ago
4:14 PM
Q: JavaRPN Calculator

ViceroyFaustI have found that there is a distinct lack of an RPN calculator available to me, so I decided to make my own. I am still adding new functions to it, but as of now, I would like to refactor my code. Main of JavaRPN Because this is a small problem, and I haven't made a GUI for it, I only use one ...

4:33 PM
Q: Refactoring a UIViewController class

FangI'm still fairly new to Swift and IOS Development. I have made my first own app, which is an app to save and track fuel consumption. The problem is that I have a lot of problems organizing my code. The logic of my application is fairly simple and lives in its own classes, but my UIViewControllers...

Q: Find list of names in other Sheet and copy them

Miriam ListI’m asking for some advice on what is the best way to tackle this problem. Use any formulas inside excel or seek an alternative version (VBA Module) In sheet1, I have 16 columns and around 200k rows. In Sheet2, I have column 8 or H given with around 500 rows of data. The goal is to look at co...

1 hour later…
5:37 PM
@Milton I'm attempting to address your GIS vulnerability concerns over on Code Review (thanks): Work order spatial query (Part 2). — User1973 56 secs ago
Ask this question at Code ReviewJens 52 secs ago
5:52 PM
Q: Work order spatial query (Part 2)

User1973Part 2: Error Handling (and anything else that can be improved) Part 1 is here (it focused on general cleanup). I received this comment in an unrelated post (thanks @Milton): ...Since it is obvious you are using a GIS endpoint, I would note that a lot can go wrong with your script if th...

6:19 PM
Does this code work? If so, this question should be posted to Code Review. — ForceBru 38 secs ago
1 hour later…
7:31 PM
Q: Minimum number of swaps for two 2D arrays to make the first one identical to other. Can someone optimize it more?

Shadab HussainThe input takes t test cases, then 2 dimensions after that it will take matrix as input row wise. for each in range(int(input())): m = int(input().split(' ')[0]) a1 = [] a2 = [] for i in range(m): a1 += [int(k) for j in input() for k in j] for i in range(m): a...

Q: Hangman game in Python - need feedback on the quality of code

Michal StefaniakI am new to Python (it's my first language), been coding for a couple of weeks now. I have already made a couple of simple scripts to download and manipulate some financial data, but lately I thought about making a simple hangman game. I tested it thoroughly and it seems to work just fine. Howeve...

TIL there's so many jobs for cats, 🐱‍💻🐱‍👤🐱‍🚀🐱‍👓🐱‍🐉🐱‍🏍 :O
7:50 PM
Q: Is my code of XML parsing is good enough? Android/Java

Cr DeveloperSo I have an app that parse XMLTV file into a TV Guide listing, the file is quite big (35MB) with tons of information, right now it takes around 20-30 seconds to parse the file completely!! Which is way too much, any ideas of how to improve it? while (event != XmlPullParser.END_DOCUMENT)...

8:49 PM
Q: JavaScript - Rock Paper Scissors Game

Anthony GedeonI built a simple console version of the rock paper scissors game. I would love to get some constructive criticism! Questions 1. How could I code this in an object-oriented way? 2. Did my code follow the DRY principle? var moves, result, images, relativePath, playerSelection, computerSelection; ...

Q: Codeigniter 3 Registration and Login System

Razvan ZamfirI am working on a basic blog application in Codeigniter 3.1.8 and Bootstrap 4. The application allows Registration and Login. I have concerns about the security level of the Registration system I have put together. The Register controller: class Register extends CI_Controller { public func...

9:29 PM
Q: Binomial Expansion. Write a program that can do some algebra

haxorI solved the following problem: Write a function expand that takes in an expresion with a single, one character variable, and expands it. The expresion is in the form (ax+b)^n where a and b are integers which may be positive or negative, x is any one character long variable, and n is a natural n...

@ForceBru yes posted it there on code review, thanks for letting me know — Shadab Hussain 22 secs ago
I'm voting to close this question as off-topic because this belongs at codereview.stackexchange.com — JVApen 36 secs ago
2 hours later…
11:27 PM
Q: LINQ for extracting N bottom items (async streams)

Dmitry NoginShould be more efficient than .OrderBy().Take(n) as it does not keep all items in memory as OrderBy does: public static class BottomN { public static async IAsyncEnumerable<T> Bottom<T, TValue>(this IAsyncEnumerable<T> source, int number, Func<T, TValue> selector) where TValue : ICom...


« first day (2304 days earlier)      last day (83 days later) »