« first day (2760 days earlier)      last day (1249 days later) » 

12:00 AM
RELOAD! There are 7115 unanswered questions (89.7427% answered)
 
0
Q: Contact Book ~ Must be able to View, Add, Delete & Update. (New Programmer w/ no support)

Linux LavenderDue to the amazing assistance I received from this community, I am back to ask for your help to improve once more. To make a long story shorter, I am new to programming and am currently in a Java course. We are diving into new waters for me; OOP, Arrays, Array List, inheritance and Polymorphism. ...

 
 
3 hours later…
3:22 AM
0
Q: Gets data from api, cleans, and stores in db - Is my folder/code structure good/pythonic?

opticManBackground First attempt at a larger project (half year since starting to code), first time using classes too. I'm after feedback on my code structure, is there a 'better' way to structure my code, or where I could improve. I've removed function blocks as they are named descriptively. My code: ...

 
 
1 hour later…
4:36 AM
0
Q: Print the App Name Using Latest Version

vikash srivastavaI am trying to solve a problem. Where we are given with app name , service name , version number of api we need to print the name of app which is using the latest version for most of the service. FOR EX - Mail App, Authentication API, v6 Video Call App, Authentication API, v7 Mail App, Data Sto...

 
4:49 AM
Monking
 
5:35 AM
@Duga rolled back
 
 
1 hour later…
6:40 AM
0
Q: NodeJS server is restarting every 10 min without any error log

Lucifer007I have a NODEJS server running from long time , but all of a sudden its restarting every 10 minutes without any errors. Only logs I see at the bottom are 2020-11-23 11:27:28 IST 2020-11-23T05:57:28.77 [DEF_ID] <INFO> Inside function (in xyz-service.js:1905) 2020-11-23 11:27:28 IST [INFO tini (1)...

 
7:19 AM
Run this in a debugger. Catch and inspect the exception. Note that when you recurse too deep, the stack is exhausted and the code fails, hard to tell if that is the case without a minimal reproducible example. BTW: It would help if you hardcoded the content of your map to serve as example here. As a new user, also take the tour and read How to Ask. Further, consider submitting your code to codereview.stackexchange.com once you have it working correctly. — Ulrich Eckhardt 18 secs ago
 
7:29 AM
0
Q: Leetcode group anagrams

bullseyeLink here I'll include a solution in Python and C++ and you can review one. I'm mostly interested in reviewing the C++ code which is a thing I recently started learning; those who don't know C++ can review the Python code. Both solutions share similar logic, so the review will apply to any. Prob...

 
8:06 AM
This is a question for codereviewCid 20 secs ago
 
8:43 AM
0
Q: sum integer from array path file content, is the code of mine efficient?

Cem FiratIs the code of mine efficient? The _counter.txt file: Set/Dir1/Alpha/_counter.txt -> contain: 1300 Set/Dir1/Beta/_counter.txt -> contain: 700 Set/Dir2/Alpha/_counter.txt -> contain: 1200 exclude off1 and off2 Dirs: Set/off1/Alpha/_counter.txt -> contain: 30 Set/off2/Alpha/_counter.txt -> conta...

 
9:07 AM
0
Q: HackerRank: Find the Runner-Up Score

FoundABetterNameI was solving the following problem on HackerRank. Here's the problem: Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given scores. Store them in a list and find the score of the runner-up. Here's my code- if __name__ ==...

 
 
1 hour later…
10:21 AM
0
Q: Implementing an autocomplete system

Erdenebat UlziisaikhanQuestion: Implement an autocomplete system. That is, given a query string s and a set of all possible query strings, return all strings in the set that have s as a prefix. For example, given the query string de and the set of strings [dog, deer, deal], return [deer, deal]. Hint: Try preprocessing...

 
10:42 AM
If your code works it may me more appropriate to post it on CodeReview instead. — Federico klez Culloca 56 secs ago
I’m voting to close this question because it belongs to codereview.stackexchange.comArvind Kumar Avinash 58 secs ago
 
11:11 AM
@Maso but our teacher has instructed us to return 0 if we find a match, otherwise return 1. I agree, it is odd but that is how she wants it And your teacher just failed a code review at any organization that cares about readable and maintainable code. Having a function called ismember() return FALSE when it actually does find a member is nonsensical. Because 0 in C is false - literally. If her goal is to teach you how to identify crap/garbage code, she's succeeding by example. — Andrew Henle 58 secs ago
 
1
Q: Snake using Pygame

MarcusI'd be grateful if you could review my code. Please be as critical towards it as possible and yet indulgent when it comes to asking my first question here. This is a simple snake game using pygame. I have issues when it comes to classes and not sure if I did it right by putting everything into 1 ...

 
11:36 AM
0
Q: Leetcode spiral matrix

bullseyeLink here I'll include a solution in Python and C++ and you can review one. I'm mostly interested in reviewing the C++ code which is a thing I recently started learning; those who don't know C++ can review the Python code. Both solutions share similar logic, so the review will apply to any. Prob...

0
Q: Bulk slack emoji downloader

hjpotter92 NOTE The script relies on ruamel-yaml and requests packages available on pypi. I wrote a script which goes over the pack file details as specified by the emojipacks project, and downloads (and saves) to the local drive. It downloads the files as threads, and saves to disk with the shutil's copy...

0
Q: Tennis simulation

hiiamnewI am new to Python and coding in general, and I would like feedback on this program that I wrote. It simulates a tennis game, based on a players "serv chance" (how likely it is that a player will win the ball). I primarily want feedback directed at how well my program executes the standard tennis...

 
11:47 AM
If the code works, I think it's more suitable for code review instead of stack overflow. Also, don't use var for variable names, as it is a keyword. — Magnetron 38 secs ago
 
12:03 PM
@ReemAl-Assaf Your question belongs to code review stack exchange and poses a bad precedent for SO — Adrian 51 secs ago
 
12:26 PM
0
Q: Matrix template Class

theProgrammerThis is my 2nd shot at dynamic memory allocation. This project is for practice purposes. So many things were considered whilst writing this minimal project. I considered using placement new to dynamically allocate memory, this would be optimal for large objects. I finally resolved to restrict us...

0
Q: Sudoku Game with automatically generated Sudokus

Philipp WilhelmProject I've created a puzzle site with automatically generated sudokus. For more information on Sudokus, please see the wikipedia article. The code const GRID_SIZE = 9; const REMOVE = 50; let solution = createArray(9, 9); let textIsVisible = false; window.addEventListener('load', function(...

0
Q: Google foobar level 2 challenge

Roni SaibaI am a beginner in Python-3. I was solving a level 2 challenge in Google Foobar. Given an initial amount of items (LAMBs) I have to distribute it among individuals, who are ranked according to seniority, while adhering to the following rules: The junior most individual gets 1 Lamb An immediately...

 
 
1 hour later…
1:40 PM
0
Q: Why is my robot not pressing the button after a while?

Vedant MatanheliaI am a student and am making a program for chrome dinosaur run game. here is what i have done till now. package com.company; import java.awt.*; import static java.awt.event.KeyEvent.VK_UP; class DinoRun{ Robot robot = new Robot(); DinoRun() throws AWTException { } public void p...

 
This is a question for codereviewCid 11 secs ago
 
2:29 PM
0
Q: My function is inefficient and takes up a lot of time- Python

Rohit SharmaThe problem I am trying to solve: Given a string, split the string into two substrings at every possible point. The rightmost substring is a suffix. The beginning of the string is the prefix. Determine the lengths of the common prefix between each prefix and the original string. Sum and return th...

 
2:54 PM
0
Q: Better solution of a timer app

fluffyHello I am working on my timer with vanilla.js and I have algorithmic problem I cannot solve on my own. Basically every one second it checks a lot of if statements in order to properly decrease the amount of seconds, minutes etc. I wonder if there is a way to create maybe other function with setI...

 
Hi§ I have a refactorisation question. It boils down to 300 lines of code with 30% of simple interface class definition. I have try to refactor on my side. should I had the broken try or not? Code was a working piece of code edited with 'rename' methods and redcing it from 1300 lines to a single iteration of the repetitive code.
 
Since there is no error or specific problem and everything works fine, and you are only asking for a better alternative. I believe better post your answer at codereview.stackexchange.com. I am afraid your question may lead to opinion-based answers which lead to classify it as off-topic at stackoverflow. — Cfun 41 secs ago
 
Ryland Goldstein on November 23, 2020
In just 20 years, software engineering has shifted from architecting monoliths with a single database and centralized state to microservices where everything is distributed across multiple containers, servers, data centers, and even continents. Distributed architectures have enabled developers to scale and meet the needs of an increasingly connected world. Distributing things also introduces a whole…
 
@xdtTransform It's unclear what your final question will look like.
 
Posting hit so You have a clear view. To long for tchat. But Im here for any feed back if it need anything or not fit
The not working yet refactorisation try is a big stack of : delegate/interface/baseclass/Func/Action
```C#
delegate V ERPCreator_Delegate<T, U, V>(T input, out U output);

private void Creator<T>(
ERPCreator_Delegate<ProcessableEntity, string, bool> AXCreator
, Func<T, string> baseError
, Func<int, bool, bool> Cancelator
, Func<int, bool, bool> Validator
, params T[] items
) where T : ProcessableEntity, IDbItem
{
```
 
3:12 PM
@xdtTransform If it's not working yet, it's not yet ready for review.
 
@Mast, The code looking for refactorisation is working. My try to refactor is not.
 
Why did you rename the methods? It's harder to read now.
 
@Mast, Erp methode name where long. And entities name are all 25+char.
 
possible answer invalidation by hjpotter92 on question by hjpotter92: codereview.stackexchange.com/posts/252515/revisions
 
Wait did you find the code in the question unreadable? Will it help if I used Cat or anything real (car / animal) isteand of single letter?
 
3:18 PM
It helps if you post the real code.
3
 
0
Q: Refactorisation of a repetitive integration process

xdtTransformContext: Creating a "middleware" between 2 services I have to Get data from Service Source and get it into Service ERP. There is a multiple type of Data: A, B, C. An integration process follows the following script: Get pending ID for A Get A for each of those Id For each of those A convert them...

0
Q: Single price grid component (HTML & CSS Project)

King ColdI would appreciate some feedback on this single price grid component project completed using HTML and CSS. I am trying to recreate the content shown by this image: https://res.cloudinary.com/practicaldev/image/fetch/s--FzGw2rbZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-u...

1
Q: C# Advaced guessing game

GravityCatI'm learning C# and after watching the course and get the basics I decide to write a small project. It's a guessing game where a player can: guess (of course): that will subtract his/her energy rest: that will recovery his/her energy but take out some time take a hint: get a hint about the curre...

 
74
Q: How to get the best value out of Code Review - Asking Questions

rolfl I have a project I am working on, and I would like some, or all of it reviewed, how can I ask for this review on Code Review in a way that produces the best possible value? This is not about a question being on-topic, or off topic. Rather, this is about making on-topic questions great questions...

 
3:32 PM
@Mast, I send a mail about using real name? Will not be able to edit without validation.
But
It's "real code" just renamed from
`[CompanyName][Contract][Scope]ServiceImport[objectName]Request`
to
`A_Request`.

I'm not contesting that's it's not real code. I'm defining in where Im believe I m on the fake code ladder. I'm re-reading the meta and will try to edit more context and comment into the code.
 
3:43 PM
0
Q: VBA, Transferring of Data from one File to another

excelguyI have this code that: Clears my worksheet from row 12 and onward in Workbook A Opens a new file Workbook B Copys the sheet to my Workbook A. and Close Workbook B Renames sheet in Workbook A Transfers data from New Sheet to another Tab. This seems to take me 5 minutes+, it is roughly 35k Rows. ...

0
Q: pentagonal number. how many dot exists around a single dot

knowledge is lifeplease help me with this code i am not getting how to write a perfect code question is given in image and code is given Given a number num as a positive integer, calculate how many dots exist in a pentagonal shape around the centre dot on the Nth iteration. In the image below you can see in ...

 
This question is very broad and is probably more suited on Code Review. — Steven 32 secs ago
 
4:08 PM
0
Q: Software drivers for mcu peripherals

L3sekI have been developing software drivers for the mcu peripherals in C++. My approach how to implement the drivers is following. Each peripheral has its software driver modeled by C++ class with its interface Peripheral.h #include <cinttypes> #include "DriversCfg.h" class Peripheral { public: ...

 
4:20 PM
Monking
 
4:33 PM
-1
Q: what is the general use of data structers like linked list,

SR33N3SH R3DDYwhat is the advantage of using data structures like memory efficiency ? or any other i dont understand self referencetional structures also please explain in like for newbies like #include<stdio.h> void main(){ struct node{ int data; struct node next; } as you can seee we are using data member f...

1
Q: Higher or Lower guessing game

K00lmanAfter an extended absence from coding, I decided I would make something to try and get back on my feet again. I ended up making a project that I have made several times before, a higher-lower guessing game. Now while the coding process went well and I came out with something that works quite well...

 
@CaptainObvious AOC, right? given "please explain in like for newbies"
@CaptainObvious CNWAI - infinite loop
 
4:54 PM
Monking
 
5:08 PM
1
Q: Revision page now fails the x-overflow

hjpotter92I was looking at the revisions for one of the questions, and noticed that the horizontal clipping is broken. To verify that it wasn't one of my extensions doing so, I opened in an incognito window as well. logged in view guest (incognito) view Link to revisions page: https://codereview.stackexc...

 
 
1 hour later…
6:17 PM
@SᴀᴍOnᴇᴌᴀ Pick a reason, most will stick.
Closed.
@CaptainObvious One more VTC, broken.
 
0
Q: Vigenere cipher C program

RedI implemented a Vigenere cipher that preserves case and can also decrypt if you pass the -d argument. Usage is ./vigenere <plaintext|ciphertext> key [-d] and it works fine but I think there are probably some things I could do better. So, just looking for critique. #include <stdio.h> #include <std...

 
6:35 PM
This might be better asked on Code Review since you don't have a problem that needs to be solved, but rather, you're looking to improve your code. — devlin carnate 20 secs ago
@devlincarnate when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the post above might be considered as missing review context and thus closed as off-topic, which happens all too often... — Sᴀᴍ Onᴇᴌᴀ 21 secs ago
Given that it seems a lot of the disucssion is around the code design, rather than a particular specific problem —this question might be better suited for the code review stack exchange site. — Erich 18 secs ago
@Erich The code does not work properly in all cases and thus would be off-topic on CR. Please read the relevant help center pages like 'What topics can I ask about here?. — Sᴀᴍ Onᴇᴌᴀ 34 secs ago
 
@Duga Erich has five accepted CR questions - should know what is on-topic... 😏
@SᴀᴍOnᴇᴌᴀ On second parse you are correct, I've deleted my comment. — Erich 40 secs ago
 
6:53 PM
0
Q: the line between alternate solutions and reviews

Aryan ParekhNote that I have read the following post Alternate solution - what counts as an insightful observation? But I am not happy with the answer to that question, and I would want to know what others think of it since I see no rule that clearly solves this issue. Example 1 Link to the Question Scrol...

 
Observe another error in your code: the sequence like v, err := function(); if err != nil { log.Print("error!") }; v.someMethod() will obviously blow up if function() returns nil as its 1st return value when it return a non-nil error as its 2nd return value. Don't do that. (On a side note, please gofmt your code—you will not see parensethes around trivial expression in conditional statemens in professional Go code; also: do not use snake_case, use camelCase. See this for best practices.) — kostix 20 secs ago
 
-3
Q: What does numpy.float_(Y) do?

Ted ErsekI am a newbee to python & numpy. A simplified version of python code I found is the following: import numpy as np def function(X): X=np.float_(X) return X What does this function do, and where is numpy.float_(X) documented?

 
I recommend posting to Code Review if your code is working. — Thomas Matthews 50 secs ago
possible answer invalidation by zstreet on question by zstreet: codereview.stackexchange.com/posts/252497/revisions
@UlrichEckhardt i will post on code review. Thanks. — Octavian Niculescu 39 secs ago
 
7:54 PM
@Feeds @AryanParekh Can you please take another good look at your question and improve it? Proper capitalization and punctuation would be a good start.
 
0
Q: Transform this to one line arrow function ES6+

Ondřej ŠevčíkI am using one line arrow functions a lot, if they are well written I believe they can make code easier to read. I believe that the following code can be easily transformed into one liner but I can't figure out how. Any ideas please? I am asking more just from curiosity. const getUID = async () =>...

 
@Duga Rolled back 2 revisions.
 
8:20 PM
0
Q: Array based queue implementation with C++20

adembudakI implemented a queue that holds elements on an array as underlying data type: #include <cstddef> #include <cassert> #include <concepts> #include <stdexcept> #include <type_traits> #include <iostream> namespace mine { template <std::semiregular T, std::size_t N> class queue { public: using val...

0
Q: Writing my first binary search by myself - any suggestions about my code?

Octavian NiculescuIs there any way in which I can improve my code? I don't know if it is 100% right, and if it can be tweaked in order to be more efficient. That's why I'm posting here. I'm open to any suggestions :) #include <iostream> using namespace std; int binarySearch(int arr[], int low, int high, int n) ...

 
@Mast what's wrong with it, sorry I wrote it quickly didn't notice much
 
@AryanParekh The haste is apparent. Please take your time while checking it.
I've left comments under the question and explicit instructions in my previous chat message.
 
8:36 PM
 
8:51 PM
@Mast Im not sure as to what's wrong with the question
 
Overall though, this isn't really a question with a factual answer, so it's not really on-topic for StackOverflow. You could try over on codereview.stackexchange.com. — Adrian 14 secs ago
 
9:28 PM
If you tried to code it and it's not working, please post your code and describe the problem. If you haven't tried, know that you are expected to make an effort of your own. If you have coded it and it works, but you're wondering if there is room for improvement in your code, then that is a question for code review. — El_Vanja 46 secs ago
 
0
Q: Am I using unnecessary If statements?

arlenI have this following code snippet, I was wondering If I am using unnecessary If statements? func ReadBook(b *book) (string, error) { bookProps, err := GetFunc1(b.name) if err != nil { if awsErr, ok := err.(awserr.Error); ok { if awsErr.Code() == ResourceNotFoundExcept...

 
9:50 PM
@Mast Good good good. Won't have to nuke it then :)
 
10:04 PM
If you having working code and want feedback then post would be better suited over at Code Reviewkaylum 45 secs ago
 
10:24 PM
1
Q: Remove duplicates from array and save it to another one

Lubomir StankovSo I have been tasked to make an array without duplicated values from another existing array. So I did it, but I want to know is there some other better way to do that. Example input/output: Input: 10, 15, 10, 5, 1, 3 Output: 10, 15, 5, 1, 3 So here is my code. #include <stdio.h> int main(void) ...

 
@CaptainObvious The answer, for any reasonable size of code, is always yes, at least according to the C preprocessor
 
If you code works fine but you just want to improve it, you can try re-formulating this post to fit the rules of codereview.stackexchange.com and then posting it there. — Random Davis 8 secs ago
 
10:49 PM
0
Q: Metaprogamming elixir for module proxy

SegfaultI'm working on my first real Elixir application, after dabbling for a few years. In my elixir/phoenix application I have to work with data over an external REST API. For my purposes, I can tolerate some staleness in the data so I would like to cache the data from the external system and consult t...

0
Q: Automatic tab switch in vanilla javascript

Zara KhanI built a tabbing system with Javascript. Manually It works fine but I want it to work automatically. I want an infinite loop where I iterate through each tab with the interval of 6sec and then start from the beginning of the tab again. and when the user clicks on a tab this loop should stop. I'v...

 
11:38 PM
0
Q: Rust - insert into piecetable

LincolnI'm writing a piece table library in Rust with the structures: #[derive(Default)] struct Piece { additional: bool, offset: usize, length: usize, } and /// PieceTable contains the additional, original buffers and a vector of pieces. /// It also maintains a length variable. pub struct ...

 

« first day (2760 days earlier)      last day (1249 days later) »