« first day (3435 days earlier)      last day (584 days later) » 

12:05 AM
REFRESH! There are 8048 unanswered questions (89.4722 answered)
 
12:17 AM
0
Q: Can I shorten this messed-up Python function?

CodeManiacI was told to use this community where I would get help with my messed-up code, I just want to shorten this Python function a little bit, I tried but I couldn't fix it. Also, please let me know if this is the right place to ask this kinda stuff here. Thank you very much. The function below is wri...

 
1:03 AM
Code review questions are off-topic. They might be asked on Code Review Stack Exchangegre_gor 41 secs ago
 
1:58 AM
0
Q: An evolutionary algorithm written in Java to crack an XOR cipher

AlekseyAlright. So TryHackme is a website that tries to teach hacking with hands on labs. They have a room called JVM Reverse Engineering where the user gets to reverse engineer Java apps, and in particular the code that I am asking you to review is for task #5. Task #5 challenges the user to crack a pa...

 
2:24 AM
0
Q: Mathematical expression evaluator (C++)

CubeyTheCubeI'm new to C++ and I decided to experiment with the language, by writing a mathematical expression evaluator, using the Shunting-Yard algorithm. A design choice that may stand out as weird is the fact that the parser creates an abstract syntax tree rather than just converting it to Reverse Polish...

 
2:49 AM
0
Q: My C# code for grabbing youtube thumbnails from urls

Joshua BursillI made some C# code to grab youtube thumbnails from urls, I originally made this in python took some time converting it to C#. I am VERY new to C# and did this with minimal help. Please Review! using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Thre...

0
Q: I'm Building a File Management Python Code as My Second Project; Is there Any Hidden Improvements That I can Implement?

Tam-Fils SalomonI'm making a file management project that I eventually want to be automated later in the future(once I learn how to). in the meantime, before I go any further, are there any hidden improvements that you guys may see? it's my first-month being self-taught computer programming. what it does is take...

 
3:27 AM
There's a code review stack. You're more likely to get a useful response there. — Gene 8 secs ago
 
3:40 AM
0
Q: PHP PDO prepared statement with IN

neubertHere's my code: <?php $db = new PDO('mysql:dbname=dbname;host=host', 'user', 'pass'); $ne = explode(',', $_GET['ne']); $sw = explode(',', $_GET['sw']); $shape = "Polygon(( $sw[0] $sw[1], $ne[0] $sw[1], $ne[0] $ne[1], $sw[0] $ne[1], $sw[0] $sw[1] ))"; $sql_where = ''; if (strlen($_GET...

 
4:32 AM
0
Q: I was try to return a card using two map which nested but data is not showing up

AnkitI was try to add up data in Gotocart.js and was using a nested map but nothing is showing up in the page the Gotocart.jsx is below import React from 'react' import { useState } from 'react' import { data } from './Data' import cartstyle from './cartstyle.css' import Cartitems from './Cartitems'; ...

 
5:14 AM
 
 
2 hours later…
7:38 AM
I believe your question is more suitable for codereview.stackexchange.com273K 39 secs ago
 
8:04 AM
@Numeron: The speed ratio between Integer division ALU vs. memory (or L3 cache) bandwidth for a sieve of Eratosthenes could be very different on old vs. new machines, so it's actually interesting to look at both benchmarks. (e.g. Sieve of Eratosthenes in x86 assembly has some discussion about being limited by memory bandwidth when crossing out primes close to or greater than about 512 (so the stride is about a whole cache line, when using a bit-packed sieve, assuming efficient bit access via careful optimization) — Peter Cordes 26 secs ago
 
 
2 hours later…
10:03 AM
0
Q: Too many nested blocks

Chaban33I have this method and checking it with pylint I'm getting this warning. R1702: Too many nested blocks (6/5) (too-many-nested-blocks) How do I need to refactor my code that it be by the standard of pylint? def button_validate(self): res = super().button_validate() if ( ...

 
10:54 AM
0
Q: Which is better? if (value is null or "") or if (string.IsNullOrEmpty(value))

Anthony FaullIs it better to use a C# pattern? if (value is null or "") or: if (string.IsNullOrEmpty(value))

 
11:19 AM
0
Q: Two steps changing email system Django + Redis

some nooby questionsI created a two steps changing email system. Firstly I show You the concept how it should work and then the code. I am using Django and React. Main question: is it a good way to do it? Is it fine to use Redis in this situation? Can I improve something in this code? Concept When the user want to c...

 
11:36 AM
"Why should I not upload images of code/data/errors when asking a question?" Additionally, your question sounds kinda like a request for code review. If so, there is a better place to ask for a code review: codereview.stackexchange.comMySkullCaveIsADarkPlace 32 secs ago
 
-1
Q: How can I refactor my code to avoid try catch?

Paul Marcelin BejanI have a DateUtils class with a lot of methods, I will share with you only two, but there are many more: public static String addDays(final String dateString, final long ggToAdd) throws ParseException { final Date date = toDate(dateString); final Date newDate = addDays(date, ggToAdd); ...

 
12:35 PM
0
Q: Do you have any idea for better code performance and code quality

Cengiz Ergün [HttpPost] [Authorize("PublicCreateOrder")] public async Task<ActionResult> CreateOrder(CancellationToken cancellationToken) { var watch = System.Diagnostics.Stopwatch.StartNew(); //--------------> Performance measure Start <------------ FROM THIS POINT Str...

 
1:26 PM
0
Q: fatal error: 'Python.h' file not found

Abhinav TyagiI am trying to install astropy package in Pycharm. All modules until pyerfa are getting installed. For pyerfa though, it is not able to make a wheel. It might be because it is not finding 'Python.h' file. For that, I tried to export C_INCLUDE_PATH using: export C_INCLUDE_PATH=/System/Volumes/Data...

 
1:51 PM
Your add_student() doesn't add the student to the file, it just reads the data into the global structure, so there's nothing to find when you search. There are a number of other problems with your code as well, you might want to get some feedback in the Code Review site. — Hans-Martin Mosner 19 secs ago
If your code is already producing the desired result, then it sounds more like a question for CodeReviewj_4321 49 secs ago
 
2:33 PM
You can run SageMaker API calls (like start/update notebooks, run processing jobs) from the CLI, but I doubt you would be able to access the instance from an IDE. SageMaker natively supports Git, and SM Studio supports notebook sharing, so maybe options for code reviews? — durga_sury 23 secs ago
 
3:31 PM
Monking
 
3:44 PM
@pacmaninbw yes it seems it came late this year...
some might argue we should blame caching
 
LOL
 
4:08 PM
Monking
 
4:24 PM
0
Q: Azure DevOps Git: Fork into another Repo using Azure DevOps REST API

Mugil KarthikeyanIn my Azure DevOps Project, I have a Git repository that I would like to copy to another Azure DevOps Project. In other words, I should be able to copy the original repo into other Azure DevOps projects as needed. To import work items into Azure DevOps, I have written the following code. Would yo...

 
5:05 PM
This seems more a question for codereview.stackexchange.comrobertklep 31 secs ago
 
 
1 hour later…
6:18 PM
If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 40 secs ago
 
6:32 PM
2
Q: Mathematical expression evaluator (C++) Using Flex and Yacc

Martin YorkBased on this question, I thought I should show how to implement an expression evaluator using Flex and Bison. Currently it does not handle releasing the expressions (I only spent an hour throwing it together). Makefile YACC ?= bison LEX ?= flex CXX ?= g++ SRC ...

 
6:57 PM
0
Q: Correction of singleton pattern in python

tungI used to write singleton in python, which actually Alpha only need to initialize once and the trading bot will run forever. For example in main.py: from lib.utils import Config from logs.logger import logger ... class Alpha: def __init__(self): self.__config = Config() self....

 
7:21 PM
If anyone could give some advice, I would be very appreciate!
 
8:16 PM
@tung Are there any imports still missing from your question? What is the purpose of your code? Please see our help center on how to ask questions.
 
8:39 PM
0
Q: 2D array diagonals sum

sajjad ahmadI am trying to sum primary diagonal and secondary diagonal of 2D array of python like this. records = [[12, 5, 2 , 1], [15, 6,10 , 1], [10, 8, 12,1], [10, 8, 12,1]] primary_diagonal_sum = 0 array_size = len(records) secondry_diagonal_sum = 0 for index , record in enumerate(records): prima...

 
 
1 hour later…
9:55 PM
1
Q: Hiding layers in Visio with VBA

AlexI created (basically) an organizational chart in Visio with different levels and want to be able to hide the levels with the press of a button. If I hide level 1 (= top level), all levels below it have to be hidden too because it is a hierarchy. The reason I'm posting this for review is that I'm...

 
 
2 hours later…
11:37 PM
0
Q: First contact with C++ - Graphics Library

TrauerI am trying to learn C++ by writing a basic graphics library; undergrad-toy-project level. I am trying to write modern C++ (C++ 20 standard), but avoiding features that are not well supported by my IDE (VS Code), such as modules. As I come from a C, Python, and C# background there may be some cod...

 

« first day (3435 days earlier)      last day (584 days later) »