« first day (3246 days earlier)      last day (1068 days later) » 

00:01
REFRESH! There are 8008 unanswered questions (89.3328 answered)
01:01
0
Q: Return hierarchy of objects based on parent child relationship

user256824Given an array like below, named comp. Each element has 17 total "columns" of data (came from a CSV), and each element is different in their uniCode. [ {parent: 'Root', uniCode: '89-0-0-0', Tag: 'C', ... }, {parent: '89-0-0-0', uniCode: '89-1-0-0', Tag: 'F', ... }, {parent: '89-1-...

 
2 hours later…
03:13
If this code works and you're seeking advice on how to improve it, you should really be asking on Code Review. If there's a problem with this code, you need to ask about that. You say you want to add a student ID — what's preventing you from doing that? — Jonathan Leffler 22 secs ago
0
Q: Updating the "code not implemented or not working as intended" community-specific close reason to use the new five-field close reason system

gparyaniAs part of the updates to the closing system that took place last year, the community-specific close reasons (off-topic sub-reasons) gained a new five-field format, which displays different text in different places so that close voters and flaggers are guided to correct use of the close reason, a...

03:33
0
Q: How to pass a type parameter with an event handler?

KirstenI want to refactor this so that I can get rid of the intermediate ClassicJobs_Execute and ClassicInvoices_Execute methods. Is that possible? using DevExpress.ExpressApp; using DevExpress.ExpressApp.Actions; using MyBusinessObjects; public class ClassicViewController : ViewController { public C...

04:23
0
Q: can this linked list implementation tree code be improved by adding others data(eg.StudentID) in the node? What is the sol?

Jack/* demonstrating transversal of binary trees */ #include <stdio.h> #include <stdlib.h> struct BinTreeNode { char *data; struct BinTreeNode *left; struct BinTreeNode *right; }; struct BinTreeNode *initBinTreeNode(char *data); void visit(char *data); void preorder(struct BinTreeNode *node); vo...

04:57
Monking
05:51
Monking
06:01
@Feeds @gparyani Welcome to Code Review. I know you know your way around the network, but what brought you to our part of the woods?
@Mast Well, I asked a question on the main site recently. I also got curious into the site and curiously opened the flag dialog to see the community-specific reasons when loading another new question, and saw the format of this site's close reasons and figured they'd fit well in the new system, as I participated in the discussion on Meta.SE
I also like helping out on site metas if I can. Most of the time it's answering simple support questions
I'm a bit worried your approach is on the theoretical side and doesn't account for how the close reasons are actually used. If we're going to reword them, we'd have to take that into account.
@Mast Well, you could answer with an alternate proposal. Part of the point of my proposal was simply to make the format clearer: it's one thing to have a description of each field, but also a lot easier to have an example for each one.
06:17
@gparyani It seems there are some things oddly going wrong with the new system and how it works. So, first of all, thanks for getting the ball rolling on this since we weren't aware of a specific problem we now are.
However, we can't go forward with it either at this time.
Long story short, something in the admin interface isn't working the way it should making it impossible for us to review new close reasons.
But we can have the discussion, sure.
@Mast I think a staff member is needed to change an old-style close reason to a new one
I'd also prefer that, so older questions closed with the older form will show the new form
@gparyani The current ones aren't properly showing up.
the question may be better suited here: codereview.stackexchange.comhiro protagonist 23 secs ago
It seems there's a bug in the panel we use to review close reasons.
A staff member can resolve that once we finish the discussion and escalate the request to staff.
06:32
The discussion won't finish unless we can review the content of the current fields so it's a bit more complicated than that, but yes.
06:50
@Mast Currently, there is only one field that's filled in, as the close reason is still in the old form.
As far as I was aware, older-style close reasons only have normal-sized text. Newer-style, revamped reasons have a bold header (brief description), and small text with the usage guidance.
@Mast I think what ended up happening is that you all tried to set up the newer fields while the team was still working out the details of the system, and since they changed some details about how it works it doesn't quite match up with either the old or new formats so it's getting confused.
I remember back then that the team was experimenting with close reasons, before ultimately settling on one form.
0
Q: Logic issue in print spiral matrix logic

GmvI tried to solve the spiral matrix problem, But I am facing some issues with my logic. Code below const arr = [ [1,2,3,4], [5,6,7,8], [9,10,11,12]] function spiralOrderMatrix(arr) { let top = 0; let left = 0; let right = arr[0].length - 1; let bottom = arr.length - 1;...

 
2 hours later…
08:35
0
Q: Simple project of Spring-RestController

Abdu MuhammadalI'm learning how to build a project from a scratch by using Spring Rest Controller but I need to get a feedback to learn from my mistakes or overengineering parts. This is my controller; @TrackTime @RestController @RequestMapping(GA) public class GaController { @Autowired private GaServi...

 
2 hours later…
10:23
" ... how to speed up/rewrite the following function" — Does the method need to be sped up or does it need to be rewritten? Why are you looking to potentially rewrite it; to speed it up or some other reason? It's easier and clearer if you state the specific problem you are trying to solve. Otherwise, for open-ended feedback ("tips") see Code Review. — Lance U. Matthews 34 secs ago
 
1 hour later…
11:32
As for optimization advice and general code review of working code, please look into the code review SE site. — Some programmer dude 27 secs ago
11:49
Having said that: you might turn to codereview.stackexchange.com ... but remember: read their help center content carefully before asking a question there. Ensure to not repeat your mistake and coming up with off topic content. — GhostCat 34 secs ago
@Vogel612 I don't know why I was notified about this now, but Henlo!
12:47
-1
Q: Laplace Expansion in R without using det()

user256841so I am trying to write a Laplace expansion code in R to find the determinant of a matrix. This is the code I have written so far, but it doesn't seem to work. The laplace expansion must take place along row "k" Could anyone please assist? my_det <- function(M, k = 1) { if(length(M) == 1) {...

13:32
@ThaneshPrabaghan perhaps better suited for Code Review then? — LMD 35 secs ago
13:49
Currently logged in from my Raspberry Pi 4
Not Windows!
Still got the old Unix/Linux touch
14:10
David Gibson on March 24, 2022
Programmers cannot live on code alone. We asked about the movies and music that best fit with programming.
14:22
@pacmaninbw Congrats. It's potent enough for webbrowsing, programming and running a small webserver.
0
Q: If condition in combineLatest observables

LoveI have many observables so I use combineLatest in rxjs. After get all results I need to check one of value by using if condition. If the condition meets then call another http service so I use another observable. Finally I render the data into UI. const a$ = this.http.get('url_a'); // observabl...

14:43
@Mast I think I have 3, plan on using one as an internal router, another for development.
Tough room. But thanks for the feedback. For clarification, I am not posting the code because there is a lot going on with the Yii framework that would obfuscate the point. I am simply asking for feedback on the approach. I will definitely check out the other forum for code review. I would love to do batch inserts, but I also have to add both new id's to a relationships table, so that is out. Thanks everyone. — Nick Villaume 32 secs ago
@Mast Currently running Raspian, but that's only 32 bit so I'm looking for other options.
@pacmaninbw I had plans to turn mine into a 3d printer driver, but I've seen people that got worse prints from octoprint than they got when pulling gcode straight from an SD card.
So I'll probably be turning it into a webserver. Eventually.
SmokeDetector from Charcoal is small enough to be able to run on a Raspberry without problems.
And I got fiber internet since last month, so... Maybe something like that.
If I didn't hate web development so much I might set up a web server. Getting an IP for it is expensive.
No speaker attached currently.
Static IP are pretty standard around here, those that don't have one get one through services like dyndns.
Which is basically an intermediate where you set your new IP whenever you got a new one.
14:49
My ISP is Spectrum Communications, they want $100 USD a month for a static IP.
Wot.
Some US ISPs are truly crazy.
I pay $49 USD a month for high speed internet, about 400MBS down, not sure how fast up.
I got 320 Mbps down, 317 Mbps up (measured, so actual, not contractual), for 45 euros a month.
So that's not too bad.
Crazy, no, greedy as ? definitely
I used to pay 10 bucks less for an eighth of that on copper.
14:53
Fiber is still hard to come by in the US, the infrastructure isn't in place yet. Only available in limited areas.
Well, it wasn't available in my street either till last month :-)
I was on DSL until 3 years ago, I moved and got cable.
My previous house got it in 2016 or so.
Lucky you
What we used to have here was vDSL. Which is basically fiber in the immediate area and copper from there to your house.
14:55
I run CAT 6 and CAT 7 inside the apartment. Fast enough for everything I want and secure.
GIgabit router and switches.
That's nice. I think I'm on 5e.
You can do pretty good with 5E
Still have 50 feet of that as well.
From router to the main switch.
Just checked, it's 5e. Which should be fine for the speeds I got at the moment. Should I ever upgrade, I'll probably have to upgrade the wiring as well. In theory 5e is good until Gbps, but in practice... Well, let's say I learned not to trust specifications too much.
I started using CAT 7 mostly for my A/V connection. My other internet is fine without it.
Got rid of cable TV 6 months ago, very happy except for sporting events.
15:04
Monking
15:18
0
Q: Doubling of state to speed up UI performance in React with Redux

Seth LutskeI have a settings section to my UI which keeps track of a myriad of user settings. The settings are requested from an API when the app loads, and then used in the section to populate what the user's current settings are. I am using redux for this. For example: const Settings () => { const di...

@pacmaninbw I haven't had a TV line for years now.
I get everything I need from VOD.
15:39
Hulu has Live TV, so does Paramount+
that's technically Cable
0
Q: What is difference between first code and second for fetch data?

Mahdi GhorbaniWhat is difference between first code and second for fetch data? and Which one is better in terms of readability and performance? They both do the same thing and It occurred to me that why the teacher didn't use the second way? 1. useEffect(() => { const getTasks = async () => { const...

16:22
It might be better to drop this question on codereview.stackexchange.com with some more context. — matszwecja 43 secs ago
This might be better suited for codereview.stackexchange.com0stone0 8 secs ago
@Malachi I'm only on NetFlix.
I've never subscribed to netflix - just used it occasionally at friends places, and subscribe to Amazon Prime so I use its video library; I have a giftcard for netflix from 2008 that I never used
16:59
0
Q: Optimizing performance of T-SQL code

Alexander Ryan BaggettThis is sql code is about showing business locations that are within a certain proximity to other of interest businesses. It will eventually become a stored procedure once it works properly. My basic code works, but isn't very performant. I am using a cross-join and following it up with a distinc...

Monking
17:30
@SᴀᴍOnᴇᴌᴀ I enjoy it, I never watched Agents of SHIELD when it was originally on, I did watch it on NetFlix. Just finished the first 3 seasons of Roswell New Mexico. Still watching the Good Witch occasionally. Watched a NetFlix movie yesterday called the Adam Project and really liked it. I wish they had more old movies available for streaming. I have to get some of them on DVD.
I heard about the documentary Fed Up a few years ago and wanted to watch it but knew at the time that it was only available on Netflix, then last year watched it on Amazon Video I believe
18:03
Once you get the code working to your satisfaction and have knocked out all of the bugs, consider asking for a Code Review. — user4581301 25 secs ago
@Gemtastic wow, that one is from quite a while ago :D
18:40
0
Q: writing FizzBuzz in Rust

pouyan taghaviI have the code below for FizzBuzz: bur I need it to print the result in a format like this: and I can not make it work. can anyone help me with it, please fn main() { for number in 1..101 { if number % 3 == 0 && number % 5 == 0 { println!("FizzBuzz"); ...

If your code works correctly (to the best of your knowledge) and you are looking for a review and possible improvements then codereview.stackexchange.com is the right place! Make sure to read their FAQ first. – Note that this is a well-known problem and has been discussed on Code Review before. Even if the programming language is different it should be possible to get some inspiration from these contributions. — Martin R 25 secs ago
19:05
0
Q: Finding all "triplets" of an integer array but in a more optimal manner

JakoryI'm practicing the following problem Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain duplicate triplets. I came up with class Solution { ...

19:55
"How it is working" is too broad for SE. It is best to ask specific questions. Otherwise, you can try over on Code Review if you want some to actually review your code. — clvrmnky 36 secs ago
20:31
possible answer invalidation by Justinw on question by Justinw: codereview.stackexchange.com/posts/275199/revisions
@Duga appears to have been in response to an implicit request by Reinderien
Difficult to say unless you show your entire Numpy attempt in the question. — Reinderien 6 mins ago
Just added the numpy version I previously tried to the question — Justinw 4 mins ago
 
1 hour later…
21:37
0
Q: dataframe mean outliers to NaN to derive a higher quality mean for area,speed,azimuth

Jason LeaverI have some data that represents the area, speed(meters per second), and azimuth(rads) of a polygon. The objective is to determine the mean for each set of parameters. With that mean value, apply a threshold to remove data points that fell outside of acceptable mean deviation. Then recalculate...

22:27
0
Q: Systems of equations solver with sympy

JonathanSo this is my first Python project and hoped for a bit of feedback. I'm trying to make a little program, where I can insert n equations and run a numerical solve. I ended up using tkinter for the GUI as it seemed very approachable, and sympy for the math part. I'm unsure if the overall structure ...

22:52
0
Q: Number Pyramid in JS

Joseph PerezSo I was tasked with making this and I was able to fing a way to make it work as intended. I was wondering if there is a simpler way to get this same result? function generatePyramid() { var totalNumberofRows = 10; var output = ''; for (var i = 1; i < totalNumberofRows; i++) { ...


« first day (3246 days earlier)      last day (1068 days later) »