« first day (2903 days earlier)      last day (1097 days later) » 

12:01 AM
RELOAD! There are 7512 unanswered questions (89.4722% answered)
 
 
1 hour later…
1:24 AM
0
Q: Have user type file they want to have read C++ & appending file names

user15639808Disclosure: I am a student right now, so if you see any bad habits in my code, feel free to point them out. I have questions about both the ofstream and ifstream portions of my code. In the ofstream, the user can create their own shopping list and name it (which will end up being the file name). ...

 
This question belongs to codereview.stackexchange.com :) — Infinity 1 min ago
 
2:14 AM
0
Q: Insertion Sort- inserting from the left

JacquesI've implemented my own insertion sort algorithm, and here's the code. def insertion(lst): for i in range(1, len(lst)): for j in range(i): if lst[i] < lst[j]: val = lst[i] del lst[i] lst.insert(j, val) break ...

 
2:55 AM
 
3:34 AM
0
Q: TensorFlow 2 Python 3 Fully Connected Neural Network

SO1999I would really appreciate constructive feedback and suggestions for this fully-connected neural network I have written with TensorFlow 2, Python 3. It estimates the period and amplitude of a sine curve given 100 sample y-points on the curve. I am mainly interested in how this can be optimised for...

 
4:04 AM
Monking
 
 
2 hours later…
6:19 AM
0
Q: Web scraping cars

XusIs there any way to lower the lines of this code and make it better in terms of being more pythonic. the program collects data from truecar.com and then put them into my database any help would be highly appreciated code import mysql.connector import requests import math # takes the car's na...

0
Q: RegEx sentence-splitting madness. Mad genius?

Daniël van den BergI inherited the following regex: /[^.!?\s][^.!?\n]*(?:[.!?](?!['"]?\s|$)[^.!?]*)*[.!?]?['"]?(?=\s|$)/g This regex is used to split sentences, and is dealing with things like quotes after periods at the end of a sentence (He said "I don't care.") correctly. I've been playing with this regex, ...

 
6:44 AM
0
Q: how can make looping array to be one array with simple code

rizkapsi want make my looping data in one array without index. i had solve it with code above but i think it so crowd and not simple this my code $data = array(); while($dt = $this->db->fetchAssoc($res_weight)){ $data[] = array_values($dt); } $datas = json_encode($data); $datas = str_replace("[","",...

 
 
1 hour later…
7:45 AM
Not the place to ask this really. What exactly is Your issue?, also You need to provide Minimal Reproducible Example and put the code here (minimal code). Also for testing Code Review would be better suited — Matiiss 40 secs ago
 
8:25 AM
0
Q: Python: Chain of responsibility design pattern with multiple arguments

rkarftI have the following code with a couple of nested if-else conditions which I would like to refactor. To keep the example simple I do not define the helper functions (like disable_check, check_last_alarm, get_kpi_value, ...) if disable_check(config, date): threshold = get_threshold() last_...

 
9:12 AM
You might want to check if your question could be on-topic for codereviewkhelwood 59 secs ago
 
Monking
@Peilonrayz Still busy with your nomination?
 
0
Q: First C++ program

SipuliThis is my first C++ program. If there is anything i could add or do differently please tell me,it would be nice I am new to C++ programming and i hope to learn more. using namespace std; int main() { float a, b, result; char op; cout << "Enter an operator." << endl; cin >> op;...

 
raf
9:53 AM
I was thinking to create a discussion chatroom with the answerer of the question: https://codereview.stackexchange.com/q/259468/230104
In that case, do I need to manually create a new room? or is there an option such that I can import the answer comments to the chatroom?
 
@raf You can automatically import the answer comments if the comments get too long. Not before that, and not from multiple answers into the same room.
You will get a notification under the comments when that happens.
Perhaps creating a room manually would be easier, your call.
 
raf
@Mast I see. The comments could get long if he put everything in a single answer.
@Mast okay.
 
Let me know if you need any help with that.
 
raf
@Mast Is there anything I must be careful about the room name and description?
 
0
Q: 2 player dice game, 5 rounds, points system

NobodyI was asked to program the following: Develop a two-player dice game that will have the players roll two 6-sided dice each and get points depending on what they roll. There are 5 rounds in a game. In each round, each player rolls the two dice. The rules are: The points rolled on each player’s di...

0
Q: intersect chanels in go

WildLAppersI have a simple golang app in which I have two background tasks that produce data, Each of them use it's own channel to signel it produced another unit of data. I have a single consumer that needs the data form the two other background tasks as input in a 1-to-1 ratio. What I want to do,for the ...

 
10:30 AM
@raf A description can be changed at any time.
 
raf
10:45 AM
@Mast room-name can't be changed later, right?
 
@raf It can, but I won't recommend doing that often.
Name, description and tags can all be changed.
 
raf
@Mast okay, thank you.
 
0
Q: handle negative zero number as a string and return positive string

wittgensteinconsider we got a string with a negative zero number as a string, like: const str1 = "-0.00" or const str2 = "-0.00000" what is the best way to remove the - and return the number as a string. My current approach works like this: const str1 = '-0.00' const str2 = '-0.00010' // is there a anot...

 
raf
11:39 AM
@Mast Is there any formalities in case I want to invite others to join my chatroom:chat.stackexchange.com/rooms/123015
 
11:50 AM
0
Q: Recursive Backtracker Maze Generation Algorithm

ThatOneGuy public partial class MazeGenerator { [Flags] public enum Direction { North = 1, East = 2, South = 4, West = 8, Visited = 16, Start = 32, Finish = 64 } public readonl...

0
Q: Check if new payload has been added

ProtractorNewbieI have been working on where I want to notify myself whenever there has been a new change in the payload. For now I have used a mock data to be more clear to what is going on. There is a specific store which I call for BarryThrillthat I want to check if the displayCountDownTimer (Will show in the...

 
12:26 PM
0
Q: Pool of Thread Pools

SkrelpI had a problem at my work that we have some tasks that need to be executed as fast as possible. To do this we implemented them so they are multi-threaded in an ExecutorService. Originally we had for each different type of task a different ExecutorService (simple Executors.newFixedThreadPool(cpuC...

0
Q: My First React JS Portfolio Web App : A Restaurant Website

Rafid Muhymin WafiI have written my first react js web app. It is a portfolio project which is a restaurant website. I have used firebase to authenticate users and to host my website. I am asking the Code Review community to kindly review my code if there are scopes for improving and refactoring the code. And I fa...

0
Q: Entity Relationship Diagram for Grade Calculator

George Austin BradleyI was wondering if anyone would be able to review my Grade Calculator for a course ERD? I'm looking for ways to improve the current design (if any improvements need to be made that is) and if anyone could review the current MySQL query which is there. In order for this to be reviewed I was told I...

 
@raf Formalities? Like what?
Don't start handing out random invites to strangers.
Afar from that...
 
Is Duga up and running?
 
@pacmaninbw Yeah
@Mast Busy with work yesterday, took way longer than expected. Apparently my estimation skills are... somewhat lacking D:
 
12:48 PM
0
Q: Way of implemented tile based movement is okay ? (Java 2D GAME)

G0ngB0ngRecent i started my fist "real" project. My goal is to code the first gen of Pokemon in Java. I have higly oriented my code on a YouTube viedo (https://www.youtube.com/watch?v=dEKs-3GhVKQ&list=PLah6faXAgguMnTBs3JnEJY0shAc18XYQZ&index=1). I have learned a lot working through the tutorial and under...

 
Greetings, Programs.
 
1:17 PM
@Peilonrayz Hah, I know the feeling.
Had a project a while ago that was supposed to last 2 days. More like 2,5 weeks...
 
@Mast Damn. Quite the difference :O
 
Yeah, took a while for my planning to recover from that.
 
I can only imagine D:
 
1:43 PM
@Peilonrayz Are you thinking of running for moderator?
 
@SimonForsberg Yeah
 
@Peilonrayz Good :) Just wanted to check
 
Thanks ^^
 
Good to see your names also on the list, @SᴀᴍOnᴇᴌᴀ and @Mast
@Heslacher @pacmaninbw @DerKommissar Anyone of you thinking of running for moderator?
 
This might be better suited to Code Review but read their guidelines before posting — Sayse 55 secs ago
 
1:47 PM
Nope
 
Nope
 
@SimonForsberg pacman is thinking about it.
 
Pac should
 
@SimonForsberg I'm thinking about it, I'd be of more value in the queues, but we need at least 3 serious contenders.
I started working on my statement yesterday.
 
2:15 PM
@pacmaninbw ok, nice
 
@pacmaninbw You have Mast and Peil competing as well, so there's three at least.
 
and Sam Onela
 
If you've not got a specific problem you can identify, or an error, this question is better suited for the Code Review Stackexchange site. Btw, in random_student(), the last line should be return Student(*result) - notice the *. That expands your list into multiple parameters which will be received by __init__. That's definitely an error you would have got but haven't shown or identified. — aneroid 21 secs ago
 
i would put my name in but my activity on CR went from 'okay he's around' to zero once Corona began.
 
@ThomasWard I still think you'd beat another name that came up.
 
2:20 PM
wait really? o.O
 
oh you mean the low rep person who put their name in for kicks xD
 
yeah
not sure it was for kicks though
I'd bet it's for the CV
 
Try not to modify lists as you iterate over them, or at least conditionally update the index. This also belongs more on code review SE. — Luke Sawczak 13 secs ago
@LukeSawczak Code review is for reviewing working code. — iota 44 secs ago
 
0
Q: Linear conflicts heuristic for 15 puzzle game

cuzureauI'm trying to solve the 15 Puzzle problem using IDA* algorithm with a Linear Conflicts heuristic. I already implemented the heuristic from what I understood : link Here's my goal state ("snail" format) and initial state : GOAL_STATE = [[ 1 2 3 4] [12 13 14 5] [11 0 15 6] [10 9 8 7]] ...

 
2:43 PM
@SimonForsberg That's why I would do it if that was my rep level and experience in software engineering.
@SᴀᴍOnᴇᴌᴀ Thanks for throwing your hat in.
 
inb4 someone reads the wall of text I just wrote to the nominations page :P
I see certain buzzphrases that catch my attention:
"It would be nice to have the diamond. Take it as a part of achievement, a badge."
"Well, I think to have a more rep would be great."
if these weren't that user's 'cup of tea' then why mention it heh
but i digress
yawns and digs into the code that's running the listservs at FT job
... jeez I should really take the time to rewrite this sucker...
 
3:05 PM
Monking
 
3:19 PM
o/
 
If there is no issue with the code you might better want to post it at codereview.stackexchange.comPᴇʜ just now
 
3:33 PM
@ThomasWard I did wear my diamond with pride when I had it, and I did put it in my CV. But I think that for the CV it should be the icing on the cake rather than anything else.
 
0
Q: How can i optimize this python code

Sarawut Positwinyuimport random import numpy total_times = 1000000 total_match = 0 person_list = list(range(100)) b = numpy.array(person_list) for n in range(total_times): cloth_list = list(range(100)) random.shuffle(cloth_list) a = numpy.array(cloth_list) x = numpy.where(a==b) total_match = ...

 
raf
4:04 PM
@Mast okay :)
 
4:23 PM
@SimonForsberg shrugs
 
0
Q: I'm new to Ursina, and am following a tutorial to learn the basics. So far, I have copied the code line-for-line, and it isn't working like his

TheBigWeebyBOi My code from ursina import * from ursina.prefabs.first_person_controller import FirstPersonController class Voxel(Button): def _init_(self, position = (0,0,0)): super()._init_( parent = scene, position = position, model = 'cube', ...

0
Q: Speed up and simplify multiple if/else with regex machers

jcubicI have Scheme based lips interpreter written in JavaScript, and inside the parser I have single function for parsing the values. Inside S-Expressions: function parse_argument(arg) { var regex = arg.match(re_re); if (regex) { return new RegExp(regex[1], regex[2]); } else if (ar...

0
Q: User 3 step password input not registering when passcodes entered in correct sequence. Required input and output provided

sponguratI've had a really hard look around the internet and done a fair few different versions of this program, but for some reason it won't work as intended. Below is a description of the question as well as the input and output expected. Below that is my code. target = "pizza", "cat", "emu" u_input =...

0
Q: Best way to copy data to a new sheet and reorganize it (VBA)

Barrett TillmanI'm writing a VBA program which copies and organizes data from one master sheet into numerous other sheets. One of the recipient sheets unifies all the data from the master sheet which holds the same id number into a single row. For this operation, I am looping through the master sheet for each i...

 
4:45 PM
@CaptainObvious offtopic / not functioning as expected code.
@CaptainObvious offtopic / not functioning as expected code.
 
@ThomasWard did you flag them?
 
yup
 
waaaaay ahead of ya ;)
waves to @Vogel612 who entered
 
I'm not seeing them in the queue
 
4:53 PM
checks
 
~waves back
 
@SᴀᴍOnᴇᴌᴀ might be because I don't have close vote yet. Close but not yet
so mods can handle it. tosses @Vogel612 the tasks
unrelated: COVID made my workplace rush HARD for work from home. 95 employees, 95 individual work from home systems. tracking and management is a pain. explains why the past year has been chaos for it xD
 
@ThomasWard I don't see those on the dashboard. the flag just kicks it into the CV Queue
 
interesting
wonder if the CV queue doesn't show them for some reason... maybe I should prod CMs to stab the system... thinks
normally I'd summon the Great and Powerful Shog but they're gone so
 
CVqueue is personallized
so if a user already voted on some post they don't see it in the queue
 
4:57 PM
I know in the past sometimes posts won't appear in the queue until ~18-20 minutes old but these are older
 
that may be why @SᴀᴍOnᴇᴌᴀ doesn't see it
but i'm happy to wait :)
it's in there somewhere.
sips caffeine elixir aka COFFEE
 
welp... so the timeline for that is ... interesting
I can see a flag from 29 minutes ago and from 15 minutes ago (QuestionRecommendClosure), but the review item was literally created a minute ago
 
@ThomasWard Actually the reason for closure should be authorship since they didn't write the code.
 
probably some SQL Scheduled job nonsense
 
@CaptainObvious I see this now in the CVQ
 
4:59 PM
@pacmaninbw i think it could be either
but made a note of that on the extra comment ;)
 
Sounds like a culture question, as you say. You should probably have some level of code reviews, and code has to meet a coding standard (which everyone agrees on) before it can be merged. — canton7 56 secs ago
 
@ThomasWard I see the Ursina post in the queue now :)
 
maybe the system is being weird ;)
 
heh
i'll just use the blame wheel in the TL and point at one of the CMs. xD
(Vogel knows what i'm talking about xD)
 
5:02 PM
does that thing actually still spin? I thought that was an MSEChat only thing
 
i still have a link to the old blame wheel :)
lol it just pointed at Shog still xD
 
5:18 PM
@gunr2171 Yes, it may be, but then this may be the answer. Even though this should be solved on the social level, asking for a technical solution is not wrong. Its a similar question whether you should be enforcing code reviews or make them optional. — PMF 29 secs ago
 
5:29 PM
0
Q: JavaScript copy-to-clipboard class

Razvan ZamfirI am have made a small copy-to-clipboard script. I have made a method called copyToClipboard that does the following: create an input box; read the content of an HTML element; set the input box value to the content previously read; append the input box to a container; select and copy its value t...

 
5:52 PM
1
Q: Iterative Radix-2 FFT in C

IHerdULiekLambdasI have a small and weak microcontroller. I also don't have access to the complex library. I wrote this iterative version of the FFT to hopefully get better performance than the recursive version, and also just to learn how the FFT works, and brush up on C. I'd like to know if the code itself is u...

 
MOnking
 
6:14 PM
@SimonForsberg @Mast Nomination done.
 
Appreciate the answer--the questioning of the rules is legitimate, and we are bending over backwards to listen to the concerns of our teammates and make rules that make sense for our team. We're also looking at every rule before enabling instead of enabling the full suite. We do code reviews, we are reviewing the standards constantly...it's just so hard to get people to care when they just plain don't, and I'm not sure how to get people to care. I guess we'll just have to be super thorough looking for those #pragma disables if we can't catch that automatically. — erikjw just now
 
6:26 PM
0
Q: General feedback on how to make my program better

user1253547I am currently working on a school project and I want feedback on the code below to further enhance my coding knowledge and skills. Any feed back would be greatly appreciated. The program is written in JavaScript. /* */ var images = [ "september october november", [ '../images/fallPics/f1....

 
7:04 PM
The election is getting some traction.
 
Hi Mast! Not sure if im allowed to ask question here but I saw your commenting my code review question and thought maybe it would be easier to ask you here as well while we are here. but Up to you :D I commented back
 
@ProtractorNewbie Sounds like you have discovered an excellent usage of chat!
 
Oh my code, I jumped of the notification. oh my my heart
 
@ProtractorNewbie Here, have another notification!
 
@Mast I've finally posted my questionnaire :)
 
7:11 PM
How you guys doing :)
 
up in the top right (no clue where it is on mobile) you can change the volume a bit
chilling in a factorio pyblock save and reading election questionnaire answers :)
 
@Vogel612 What. I've been here for how long now, and never knew you can change the volume?! 🤦‍♀️
 
no reason to ever look to up there, honestly
there's a lot of fancy things that are basically hidden for no reason whatsoever
 
@Vogel612 Wait, what volume? You can turn it off, but... volume?
 
~sighs why is my brain like that?
I was certain there was an option for volume there
but it's only for deciding conditions of the ping sound playing...
 
7:18 PM
yesterday, by Mast
Pobody's nerfect.
;)
 
0
Q: Rcpp sparse CSC matrix class

zdebruineThis is a sparse matrix (dgCMatrix) class that extends Rcpp. WHAT: This class includes Rcpp::NumericVector and Rcpp::NumericMatrix classes which are simple references to R objects. This class fully supports reference-only no-copy conversion of the Matrix package dgCMatrix class from R to C++ and ...

 
If anyone here want to help a poor python person then I would be more than greatful codereview.stackexchange.com/questions/259561/…
 
8:06 PM
You really want to start using template strings, all this string concatenation is one giant bug-waiting-to-happen. Also, innerHTML that adds <br>? There is a lot here that you want to post to codereview about to get some help writing better (and modern) JS. — Mike 'Pomax' Kamermans 53 secs ago
If it's working as is, you might try submitting to codereview.stackexchange.com for performance tips. At first glance it seems you could make the Get-DhcpServerV4Lease run in parallel jobs if it's taking longest. — Rich Moss 53 secs ago
 
8:33 PM
Cool- Github finally caught up with dark mode...
though even as SO supports it other SE sites haven't :/
 
0
Q: What can I do to speed up my nested DHCP foreach loops in PowerShell?

Bryce HowardI have 3 nested loops and they do the following: Get scopes from DHCP Get hostnames from csv file Compares hostnames and leases, matches are added to a hash table There are 5 DHCP servers, 100's of scopes and thousands of leases. What would be a good method to speed this up? Thank you! $DHServe...

 
8:53 PM
How do you guys do such big notification
 
Two ways you can type @ProtractorNewbie or hover over a message you want to reply to, you should see a down arrow on the very left, click and "reply to this message"
 
@ProtractorNewbie
Oh I meant the one Captain Obivous sent
 
@ProtractorNewbie that is a URL
a preview will be generated if it is a SE post
 
0
Q: Check if new dict has been added

ProtractorNewbieI have been working on where I want to notify myself whenever there has been a new change in the payload. For now I have used a mock data to be more clear to what is going on. There is a specific store which I call for BarryThrillthat I want to check if the displayCountDownTimer (Will show in the...

OH
 
BTW Captain Obvious automatically announces new posts after a while
it is a bot
 
8:56 PM
Ahhhh okey okey :P
Well then that make sense now
 
I'm curious now, can you ping yourself... @Peilonrayz
Oh no you can't
 
Nope :p
 
@Peilonrayz but you can by replying to your previous message
* note - requires previous message
 
@Peilonrayz well, not like that, but by manually replying to your own message
@Vogel612 like this
 
I normally copy the permalink (from the context menu on the left) and replace the URL up to the anchor/octothorpe (i.e. #) with a colon (i.e. :)
 
9:01 PM
How'd you reply to yourself so fast? I have to load up the transcript steal the anchor, and then I can reply to myself
 
you can also use the link-preview obtained by hovering over that link and just type it out
 
Oh, yeah forget the preview is a thing
Should be part of the browser @SᴀᴍOnᴇᴌᴀ If you look bottom left or bottom right when you hover over an <a>
 
this way I can just select the option labeled "Copy Link Address"
 
y'all know that the dropdown on the left-hand side of a message is a permalink to the message, right?
 
9:04 PM
Oooh, sorry mb
 
or is that one of these "dark chat just added it" features
 
@Vogel612 check- right on
 
What is dark chat? like a Stylus/Greasemonkey/addon?
 
basically, yea
I remember something about that having been added by rlemon
 
Oh cool, not used any SE addins for a while D:
 
9:27 PM
0
Q: Android Code - First Kotlin Project

Abhinav TyagiI am learning Kotlin for Android dev. I do not have anyone to review my code and give feedback. Please review the following project and let me know how I can make it better in terms of scalability if I add 3-4 different modules like login, detail pages Kotlin-MVVM-Room-DataBinding I am using Obse...

 
9:45 PM
Hmm... It looks like the bug is originates somewhere in the section where you preprocess the matrix as opposed to where you solve for the shortest path. That said, I would need to understand your project in much greater detail to be able to give any meaningful advice - which I unfortunately can't do at the moment. You can however try this site codereview.stackexchange.com which might be able to help in that area. — LPR 36 secs ago
 
 
2 hours later…
11:59 PM
@Peilonrayz should that In memory “table” filtering in Python have the tag added? it currently just has the tag
 

« first day (2903 days earlier)      last day (1097 days later) »