« first day (3008 days earlier)      last day (88 days later) » 

12:03 AM
REFRESH! There are 7717 unanswered questions (89.3740 answered)
 
12:43 AM
0
Q: Find first non repeating char in a string

stupidQuestionsThis is LeetCode question 387 if anyone is interested. The task is to accept a string and find the first char that appears only once, and return its index. If no char appears only once then return -1. Examples are: input: "leetcode" output: 0 input: "loveleetcode" output: 2 input: "aabb" output...

0
Q: Data API with Influx-DB and FastAPI

Armen FirmanI'm fairly new to time series databases in general and Influx in particular. My objetive is to build a simple and general use API that will allow me to write and read data from an Influx Database. I used Influx on a previous project and I found that building the API for the database was pretty me...

 
1:00 AM
 
 
2 hours later…
3:11 AM
It's probably a pun on psuedocolm.anseo 59 secs ago
 
3:24 AM
You should consider deleting this question and post it on Code Review. I still don't have the ability to move a question like this... But there it would get answers as you expect. — Alexis Wilke 59 secs ago
 
 
2 hours later…
5:50 AM
0
Q: Using sed throws No such file or directory

HariprasathI am very new to shell script and trying to learn it. My use case with Shell script is that I need to replace a particular string with an empty string on all the files content which are inside a folder. The following is my folder structure. -> RootFolder -> applications -> a.app -> l...

 
6:00 AM
However, I recommend that you post this question in codereview where they will help you improve the code. Here we fix the problems — Simone Rossaini 15 secs ago
 
 
3 hours later…
8:37 AM
I’m voting to close this question as off-topic, because it belongs on Code Review. — Martin Zeitler 14 secs ago
 
8:48 AM
0
Q: ThrottledStream

cogumel0Need a ThrottledStream for a project, created the following class (still not tested), wouldn't mind some opinions on the code and suggestions on how it can be improved: public class ThrottledStream : Stream { private const int OneSecond = 1000; // 1000 milliseconds private readonly Stream...

 
9:13 AM
0
Q: Write a program to input a number and print the name of corresponding month in java

DeepanshiI have write the following code to print the name of month according to the input number otherwise the message invalid month will be printed. But how should I print the message that "Please enter the month in numbers" as shown in example 2 of given image(Question no. : 9) Code: import java.util.S...

 
Wouldn't this be more appropriate for codereview.stackexchange.com? — slebetman 56 secs ago
 
9:47 AM
Monking
 
10:15 AM
@MickyD Please do not direct off-topic questions to Code Review. The OP clearly thinks the code is broken "Why does a simple increment not work" and so is 100% off-topic on Code Review. — Peilonrayz 46 secs ago
 
Monking
 
@Peilonrayz I think Micky was directing that specific part of the question to Code Review rather than the question as a whole. — Llama 38 secs ago
@Llama Code Review gets tons of such 'helpful' suggestions where a question could be made on-topic. However the OP just posts questions verbatim. If the question isn't good enough right now then don't suggest other sites. — Peilonrayz 51 secs ago
 
0
Q: Python Backup Script for linux, 1. how to add more argument in compare & remove. 2. after creating backup how to store that backup on remote machine

Aaftab231#!/usr/bin/python3 """Script to make backups.""" import argparse import os import sys import hashlib import os import shutil class Backup: def __init__(self, source, destination): self.source = os.path.normpath(source) self.destination = os.path.join(os.path.normpath(destination), os.path...

 
10:35 AM
@MickyD OP's don't read the help center. Please do not suggest Code Review like you have done here again. — Peilonrayz 58 secs ago
 
@Peilonrayz what part of "...but do make sure to read their help center to see what exactly they expect from a good question..." did you miss? — MickyD 6 mins ago
@Peilonrayz stop trolling — MickyD 5 mins ago
 
Well, that's a surefire way to get R/A flags on a comment...
I understand their confusion though, they simply don't know where we're getting from.
They think they're being helpful. They're not.
And then they get agitated...
 
Yeah, just a bit unpleasant. Oh well, back to work :)
 
10:54 AM
0
Q: Simplifying and optimising function logic

gameFrenzy07I asked the same question on StackOverflow but was told to instead ask here since it was better suited. I have a function that I implemented. It is doing a lot of heavy lifting. I would like to optimise it or in other words try to find repeating code and simplify it a little bit. I'll show my imp...

 
11:07 AM
Hi, imho both approaches are fine (but I would use 2nd one as well). Anyway this is question should've been added here codereview.stackexchange.com. — ulou 37 secs ago
Hi thanks for the response, can I still move this question to codereview.stackexchange.com? — Rubinder 15 secs ago
If your code is working as expected, your question if off-topic for SO, but might be a better fit for codereview.stackexchange.comThierry Lathuille just now
I’m voting to close this question because it belongs on Code Review. — Thierry Lathuille 24 secs ago
 
0
Q: Improving PHP ZipArchive Perfomance

Yesudass MosesI am trying to pack around 50 files from a folder to zip file using PHP ZipArchive. Actually, only at most five files are ever changing. Others remain same static files. Should I zip the folder for every request or just replace those five files. Which one would be better for memory consumption an...

 
11:42 AM
@slebetman I have asked the same question on codereview. Thank you user3297291 for sharing the link. — gameFrenzy07 44 secs ago
 
0
Q: Given an array of integers, return the minimum required increment to make each element unique

bbasaranGiven an array of integers, return the minimum required increment to make each element unique. Sample Input 1: [3, 4, 2, 2, 6] Sample Output 1: 3 (One of the 2s should be incremented to 5) Sample Input 2: [3, 4, 5] Sample Output 2: 0 (There is no duplicate) My code works in the linear time since ...

 
SO is not the correct place for opinion based questions. Codereview might be a better place for it. codereview.stackexchange.comOlivier Krull 17 secs ago
 
12:26 PM
possible answer invalidation by Bob Stout on question by Bob Stout: codereview.stackexchange.com/posts/264483/revisions
possible answer invalidation by Bob Stout on question by Bob Stout: codereview.stackexchange.com/posts/264483/revisions
 
0
Q: Need to be challenged with a basic Spring web flux solution

user246515After searching for a solution to my problem on the internet, I didn't find any clear way to do what I wanted so I did my own stuff but I don't know if it's correct. Let my explain : I'm using Spring-WebFlux with Spring-Security and what I want is pretty basic. I need to save a data depending on ...

0
Q: Opinion on mutating the accumulator in Javascript Array.reduce function?

RubinderI wrote this reduce function and got comments on my pull request saying that mutation is not good practice, however, I only mutated the accumulator and I didn't see any benefit of creating a new object on every iteration. Following is the code, would be great to see what everybody thinks about th...

0
Q: Is there a correct way to do this layout in HTML/CSS

ChinoQTI am new to web development and I am making a small "About Me" website using html/css . I managed to do this layout : https://imgur.com/a/Kb0xPQA Although it did the job done, I am just concerned that with this layout/code will affect the future ones .container { transform: translate( 0, ...

0
Q: JS - Same recurring statements in if-else

Awesom-oI have this watcher in my app.vue that makes sure the right theme attribute is set on the html tag. I have a nested if/else loop, and as you can see in the code below I have two different conditions but two times the same statements. Is there some way to code this is a more reusable way? I can im...

 
@Duga The edit is based on a comment by @200_success. I don't see anything in the answer that is invalidated.
 
12:58 PM
You asking about opinion. It is offtopic here. Try CodeReview codereview.stackexchange.comtalex 16 secs ago
 
0
Q: Create a function in Python to check for the data errors

Lam NguyenI'm trying to create a function to check multiple conditions of data. The function will return a list if the data is errors. Here is my idea: error_lists = [] def check(A, B, C, D, E): check condition 1 for A if there is a error -> error_list.append(1) check condition 2 for B if t...

0
Q: Should I get Autofac to include classes that don't have a public constructor?

RandyI have a Asp.Net API (.NET Framework 4.7.2). We recently updated Autofac to version 6.2.0. Autofac does not like some of our classes that don't have a public constructor. Example class: public sealed class User { private static readonly Lazy<User> Lazy = new Lazy<User>(() => new User()); ...

0
Q: Is it possible to do something with java scanner to make it shorter?

DziangwaI am solving a puzzle at codingame.com and I have to write a code that has at most 200 characters, now it has 772 counting tabs. Is it possible to do something with an input scanner so it takes less characters? The condition alone makes like 180 and don't worry about how a code looks like it's ju...

 
 
1 hour later…
2:19 PM
@CaptainObvious This ain't CGCC and they aren't a code-golfing service either.
 
2:51 PM
If your code works, but you want to improve it, Code Review is a better fit. Just make sure you read their posting guidelines and clarify what the code is supposed to do — G. Anderson 55 secs ago
 
3:22 PM
Monking
 
I would say this question belongs to codereview.stackexchange.compptaszni 24 secs ago
I’m voting to close this question because it's now been cross-posted to codereview.stackexchange.com/q/265501Mark Seemann 37 secs ago
 
3:58 PM
0
Q: The code I have throws all the angles of a plant extracted from a 2D image into a dataframe. I am having troubles running the .median function with it

user246528This code takes the already extracted leaf angles from 2D images and puts it into a dataframe. For some reason when I use the .median function to try to find the median for the first four leafs to returns 'NaN' even though there is values. Maybe it can't because it might be counting it as a tuple...

 
Monking
 
 
2 hours later…
5:40 PM
0
Q: Order Horizontally instead of Vertically

GobleI have read a few posts on stackoverflow about this same issue but the solutions provided didn't apply to me. My CSS: .tagItemList { -webkit-column-count: 4; -moz-column-count:4; column-count: 4; -webkit-column-gap: 1em; -moz-column-gap: 1em; column-gap: 1em; margin: 1.5em 0;...

 
 
2 hours later…
7:30 PM
@SᴀᴍOnᴇᴌᴀ What's this "status 0" that is reported every now and then?
 
7:44 PM
@SimonForsberg it seems to time out in some cases so I set it to 0 in that case... I think I can fine tune the logic to only alert if it isn't the expected code (i.e. 200) or it is the expected code and the last code was not the expected code
 
0
Q: Faster AAN algorithm for calculating Discrete Cosine Transform

murage kibichoI was implementing the AAN algorithm for computing the 2D Discrete Cosine Transform on an 8*8 array. I perform both the forward and inverse AAN algorithms. My code is extremely fast compared to the naive DCT algorithm but I feel that my implementation could be faster. How can I improve the perfor...

 

« first day (3008 days earlier)      last day (88 days later) »