« first day (2941 days earlier)      last day (1372 days later) » 

00:02
RELOAD! There are 7584 unanswered questions (89.4406% answered)
 
2 hours later…
01:44
0
Q: How to refactor current context into useCallback hook

Penny LiuI have done with ModalPicker component functionality but I want to avoid unnecessary re-renders in my current code. For the sake of simplicity, I removed some irrelevant code. // app/components/Home.js import ModalPicker from './ModalPicker'; import FloatingButton from './FloatingButton'; const...

 
2 hours later…
03:24
This question belongs here: codereview.stackexchange.comdale landry 53 secs ago
You need to ask a question that can be answered. You give requirements, and a short self-contained piece of code (aside from <conio.h>), and that's all. What is it you want to know? Do you want a general code review? Are you getting output that's not what you expect? (If so, provide the output you want as well as the output of the program - and make sure you post the output from the code you post.) — David Thornley 14 secs ago
04:05
Perhaps you need a thorough review or refactoring of your code. If so, this is simply the wrong site. StackExchange.CodeReview might be appropriate, but read their posting guidelines first. You might go to SE Sites and look for an appropriate group. — Prune 38 secs ago
My wordings might have been wrong. I have a single question for which I am looking for a solution. Not really looking for a code review. — coderWorld 32 secs ago
04:25
Consider the advice given in the wiki "Go interfaces generally belong in the package that uses values of the interface type, not the package that implements those values". — Brits 57 secs ago
 
1 hour later…
05:31
0
Q: Java Simple Phonebook

Grewal_CreatorThis Program is a simple phonebook, user is given 3 choice, add a number to the phone book, dial a number or exit the program. Are there Any Improvements that i can make, either efficient or cleaning the code or something useful i can add? import java.util.ArrayList; import java.util.Scanner; pu...

 
3 hours later…
08:27
"I tried to write the method to solve it but looks like I was doing it kinda messy" -- please share your code so we know what we're dealing with here. Does your code not work or are you looking for a code review? See also 695. Max Area of Island which is a slight variant on this and has a thread with hundreds of solutions you can look at. — ggorlen 29 secs ago
 
2 hours later…
10:10
0
Q: Simple Python Download Manager Based On Youtube-dl

XusThere is a personal program of mine which logs in, scrape links and then download them. The downloader part is based on Youtube-dl and I think it's a smell code. Is there any way to improve this code? Code: import requests import subprocess import getpass import time from bs4 import BeautifulSo...

0
Q: Get rid of nested ifs and else

user3378165I have a contact model, on change I set the state of the contact object, how can I make the below function more readable? The address field is different because it's an object: ['address', 'city', 'state', 'zip'] const onFieldChange = ( key, index = 0, isMulti = false, isAddress...

 
2 hours later…
12:16
-1
Q: Dynamic allocation of array in pointer ( resize allocate array)

annnDynamic allocation of array in pointer ( resize allocate array) i am using pointer to do my homework on adding value x to any position in array and have memory leak problem in visual studio 2019. I don't use vectors because I haven't learned yet. i don't know how to fix it?? #include <iostream> ...

Monking
12:45
13:05
If the code works as expected, the question might be better suited for Code Review. — Turing85 15 secs ago
You must use Code Review for that. — enzo 7 secs ago
I’m voting to close this question because requests for reviewing code that’s already working should be directed to Code Review.SE. — esqew 35 secs ago
@Turing85 i never heard of Code Review until now. Shall i delete the question from here? — inky 18 secs ago
My comment is just a suggestion. I am not sure it is on-topic on Code Review. Please check their on-topic page. Whether you want to delete or not is your call. I would recommend deletion if you think your question is on-topic for Code Review and decide to post the question over there. — Turing85 25 secs ago
13:33
0
Q: Im am trying to optimise code to make process faster

inkyI am relatively new to Java. I created the following code, but found it runs very slowly. I have been making small tweaks to the code to make it run better but i dont have lot of knowledge. The code is essentially 3 loops one after another. I am pulling the data off an api. Can someone provide as...

13:58
0
Q: Could this balance counter code be simpler?

LinncsifincsiI'm very new to programming and i decided to start my journey with Python. It's my fifth day of learning and decided to try myself out and make a very simple slot machine. I stuck for hours because i had issues with the balance counter but finally managed to make it work. Would you please rate it...

 
2 hours later…
16:07
We should blacklist some of those titles...
 
1 hour later…
17:22
0
Q: C# oop eco system simulation

user242558This is my attempt at simulating an eco system. Basically this thing is suppost to simulate how an eco system works. Its not the most accurate thing but it's something. Let me know what you think about it. using System; using System.Collections.Generic; using System.Linq; namespace Ecosystemsimu...

1
Q: C# - Standard 52 card deck

Mr.BanksI made a 52 standard deck generator for practicing my C#. Just to let you know I am using the unity editor. I would your feedback as to whether my code is good/bad or whatever you may desire. public class Standard52Deck { List<Card> deck = new List<Card>(); enum Ranks { Ace, Two, Th...

0
Q: Android APP FTP host profile class implementation

JimmyHuThis is a follow-up question for Android APP connect to FTP server in Java. I am attempting to create a tiny FTP host manager with FTPHostProfile class and FTPHostProfiles class. The experimental implementation Project name: FTPHostManagement FTPHostProfile class implementation: package com.exa...

@user_na thank you, i didn't know codereview.stackexchange.com existed, i'll use it next time but i don't get it... why should it be self._salary in the __init__ instead of self.salary? i would thank you a lot if you could explain me the exact meaning of _ before an attribute, i searched it but i didn't understand. and thank you a lot i'll use your tip to raise a ValueError — Leonard Wilke 12 secs ago
17:42
@Mast Yeah, might be a good idea
18:39
0
Q: Combine strings

David RogersFor instance: string name = ""; var _userClaims = HttpContext.Current.GetOwinContext().Authentication.User.Claims.ToList<Claim>(); var emailClaim = _userClaims.Where(c => c.Type == ClaimTypes.Email).FirstOrDefault(); var firstNameClaim = _userClaims.Where(c => c.Type == ClaimTypes.GivenName).Firs...

18:51
Stack Exchange has a code review site more suited to this question. — Software Engineer 44 secs ago
19:02
Hey - this looks like code review request for existing code, and as such is a better fit for Code Review which is a similar site to this one. However, I would first try to implement the other requested functions, as the only things I see are the struct definition and "Write a function that enters data into the array". — nanofarad 23 secs ago
19:16
Does this work, and you're asking for tips on efficiency? CodeReview might be the better place to ask. — BruceWayne 39 secs ago
19:55
0
Q: Is there a better way to code this exercise with Java Spring Boot and JPA?

Gabriel VendraminiI'm contructing a homework from my Spring Boot Course and so far I did the JPA layer and want to have some feedback, before start the business rules, about if the I could improve something or change a type of relationship in my app. Any sugestion will be wellcome. Here is the Exercise: "Assume we...

understandable. still relevant though, I had exactly this in a (professional, business) code review today, criticized it and wanted to include an informed "why" - which I could, thanks to this answer and clarifications. — Cee McSharpface 51 secs ago
20:21
0
Q: Confused about writing code?

user242704Task: Write a Library class that describes the library. A library has two properties: a name and a list of books. The library has the following methods: Constructor, accepts the title and list of books. By default, the list of books is empty. Each book is an object of the Book class list () - sho...

21:19
I’m voting to close this question because it belongs on codereview.stackexchange.comSam Varshavchik 12 secs ago
21:30
Better suited to CodeReview.SE — Paulie_D 29 secs ago

« first day (2941 days earlier)      last day (1372 days later) »