« first day (2987 days earlier)      last day (1044 days later) » 

12:03 AM
REFRESH! There are 7680 unanswered questions (89.3931 answered)
 
 
5 hours later…
4:36 AM
0
Q: Is this docker entrypoint bash script for passing parameters to the containerized app 'good'?

alphabet5Source code located here I am trying to pass extra parameters from a container to the contained application. The following bash script is working to pass extra variables, but I'm not sure that it's optimal, or a standard method for running a containerized application. Any insight would be appreci...

 
5:33 AM
possible answer invalidation by Saurav on question by Saurav: codereview.stackexchange.com/posts/263809/revisions
 
 
2 hours later…
7:50 AM
You should post this on Code Reviewmkrieger1 49 secs ago
You might be interested in codereview.stackexchange.com. — deceze ♦ just now
This seems better suited to Code ReviewLlama 44 secs ago
 
8:20 AM
@ScottHunter To be honest, a comment on code review! 😅 However, I can convert array into dictionary (map) by iterating once, and can create new datasource from my dictionary. But I am still not satisfied with that solution. Hence posted here. — itsji10dra 14 secs ago
 
Kaz
@RMunroe I may be familiar with that dynamic :)
 
Then you should post your solution to Code Review and ask how to optimize it there. — Scott Hunter 32 secs ago
 
8:51 AM
Monking
 
9:23 AM
0
Q: Typescript angular queryparams

Miomir DancevicI have some code like this ngOnInit(): void { this.activatedRoute.url.subscribe(() => { const token = this.activatedRoute.snapshot.queryParamMap.get('token'); const redirectPage = this.activatedRoute.snapshot.queryParamMap.get('redirectPage'); if (token) { localSto...

 
9:50 AM
0
Q: Create a words histogram of a given string in python

Coder48I wrote a code that given a string (txt), will print a histogram that contains the number of occurrences of each word in it and the word itself. A word is defined to be a sequence of chars separated by one space or more. The code is working, I just want to see if I can improve it. def PrintWordsO...

 
10:16 AM
0
Q: Named capture in Powershell Switch -Regex

Pragmatic PraxisI have the below working code that uses RegularExpressions to validate and extract data from $breadcrumb strings that can contain various tokens in the form [???~???] where I need to do more refined processing when the token takes the form [Item~???]. That token needs to be at the end of the stri...

 
11:15 AM
You do have to implememt some extra steps like component forceUpdate or more than that I can clear after your code review. — Jignesh Mayani 14 secs ago
You do have to implement some extra steps like component forceUpdate or more than that I can clear after your code review. — Jignesh Mayani 47 secs ago
@Llama I was not aware about Code Review. Thanks for pointing that out. — prashantbhatt23 28 secs ago
 
11:34 AM
0
Q: How do I validate multiple input types in a form using just one for loop?

Teodor-Mihai AvasilcaiI have a form that has multiple input types: text, radio, checkbox. How do I create a for loop that checks the input type then checks if they have been filled out(text)/checked(radio/checkbox) and validate them? So far I have managed to make a for loop to validate the text fields but I don't know...

 
 
2 hours later…
1:46 PM
0
Q: Putting values of an array into text boxes using C#

T. HillI've created a dimensional array using two 'for' loops, and as each inner loop completes, I'd like those values to go into textboxes on a windows form. (I realize that the values will be overwritten each time, with just the values from the final outer loop showing at the end.) The comments in th...

 
2:12 PM
0
Q: map multiple functions to a single input

hugovdbergmap is a builtin function that takes one function func and one or more iterables, and maps the function to each element in the iterables. I wrote the following function that does the reverse, but it feels like this is such a basic operation that someone must have done this before, and hopefully g...

 
2:38 PM
0
Q: Google Foobar problem: shortest path where you can remove a wall

rishabh_aI'm having trouble solving a Google Foobar question involving path-finding. My solution fails 1 test case, the inputs and outputs of which are hidden. The Prompt You have maps of parts of the space station, each starting at a work area exit and ending at the door to an escape pod. The map is repr...

 
3:07 PM
Monking
 
possible answer invalidation by hugovdberg on question by hugovdberg: codereview.stackexchange.com/posts/263863/revisions
possible answer invalidation by hugovdberg on question by hugovdberg: codereview.stackexchange.com/posts/263863/revisions
possible answer invalidation by Linny on question by hugovdberg: codereview.stackexchange.com/posts/263863/revisions
 
3:30 PM
0
Q: Unit testing in python

DuttaI am learning Pytest and I have written a test case for a program that will download files from google drive, I am not sure if the 5 test cases are enough for a good unit testing scenario, any suggestion will be of great help. Thanks. download.py import requests import os import re # https://dr...

 
3:40 PM
Is there a problem with the code? If this is working code that you want reviewed, then ask on Code Reviewtrincot 6 secs ago
 
Mon king
 
@trincot The question would be off-topic if posted on Code Review. Please take extra care when recommending Code Review in the future. — Peilonrayz 14 secs ago
@Peilonrayz Could you elaborate why it would be off-topic? From my understanding, the idea is to review if the suggested code above is good or can be improved. Isn't it the aim of "Code Review"? — Cyril N. 39 secs ago
@CyrilN. We can't comment on code where all context is stripped away. Please see our relevant meta. — Peilonrayz 28 secs ago
If you have a working solution now and want an opinion about a potential/hypothetical "better" solution, I recommend asking on codereview.stackexchange.comJonSG 47 secs ago
@Peilonrayz, when I suggest Code Review, I am not suggesting the Asker should not follow the guidelines over there. I will keep recommending Code Review for code review. — trincot just now
 
4:19 PM
@Duga Thought we'd found another bug here @SᴀᴍOnᴇᴌᴀ. Turns out you just deleted your comment :)
 
0
Q: Ruby: Chaining methods vs methods with arguments?

Steve KI started with the following module: Module DemoStructure @json_data = {...} # hash of json data, etc def self.website_data @json_data.map { |site_hash| hash.merge({ 'scope' => 'website' }) } end def self.find_field(source_data, key) data = source_data.flat_map { |tmp_data| tmp_...

 
4:37 PM
Hi! This question is better suited for the Code Review Stack Exchange: codereview.stackexchange.comJoshua Wade 25 secs ago
 
4:49 PM
0
Q: Synchronizing clients in javascript without a backend

user1999728Warning: sound (not loud, and volume is set to 0.5 in the code) My goal here is to get anyone who enters the webpage synchronized as well as possible. Say there's some global clock. Since Javascript's Date.now() is based on the device's clock, relying on it isn't good enough. So, I'm using worldt...

 
@SᴀᴍOnᴇᴌᴀ status code "undefined"?
 
2 days ago, by Simon Forsberg
I'm adding some more logging to @Duga now to find out the reason behind the double-posting. Next time it happens, ping me.
@SimonForsberg ^
 
5:09 PM
2021-07-08 17:25:00.119	Question 263863 edited at 1625757608, last check was at 1625757599
2021-07-08 17:20:00.202	Question 263863 edited at 1625757608, last check was at 1625757299
2021-07-08 17:15:00.237	Question 263863 edited at 1625757027, last check was at 1625756999
2021-07-08 17:10:00.235	Question 263863 edited at 1625757027, last check was at 1625756699
 
0
Q: Request for improvement. Isn't it too much variables?

Banshee PrimeI'm learning and looking for at least "not bad" quality of my code. Please let me know how should I improve. #!/usr/bin/env python3 import subprocess import re battery_status = subprocess.run('upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage:', shell=True, capture_ou...

 
Hmmm
 
@SimonForsberg Sorry - that was a mistake - I had switched HTTP libraries and the API is different; it is running now and I am partway through adding tests
 
@Peilonrayz I have an idea about why the double posts are happening
 
@Peilonrayz yes FGIW for comments - I removed mine after I saw yours
 
5:21 PM
How do I synchronize my date and time on Ubuntu?
@Duga's machine is three minutes behind
"last check" is local time. "edited at" is Stack Exchange time.
 
174
A: What is the command to update time and date from internet

AnonymousYou can do so with e.g. sudo ntpdate time.nist.gov. Other servers include time.windows.com, etc. http://www.pool.ntp.org/ lists time servers around the world.

 
@SimonForsberg Strange. I can't really guess why your second one would say your last check was 5 minutes before the previous last check, unless you've got a +/- bug.
 
@Peilonrayz that's not really what it says though, is it?
read from bottom to top
first log message is at the bottom
@SᴀᴍOnᴇᴌᴀ doesn't seem to work...
zomis@hope:~$ sudo timedatectl set-ntp on
zomis@hope:~$ date
Thu Jul  8 19:20:50 CEST 2021
zomis@hope:~$ sudo timedatectl set-ntp off
zomis@hope:~$ sudo timedatectl set-ntp on
zomis@hope:~$ date
Thu Jul  8 19:20:59 CEST 2021
zomis@hope:~$ date
Thu Jul  8 19:21:12 CEST 2021
zomis@hope:~$ date
Thu Jul  8 19:22:01 CEST 2021
 
@SimonForsberg Oh... I'm so used to the other way around D:
 
@Peilonrayz Apparently you're not used to Splunk :)
 
5:28 PM
@SᴀᴍOnᴇᴌᴀ Nice, apparently I forgot to install ntp... Was meaning to fix my clock issue
 
@SimonForsberg rats... maybe look at one of the other answers? perhaps a newer one? or else an answer on a linked or related post
 
@SimonForsberg fwiw; sudo ntpdate time.nist.gov worked for me
 
@SᴀᴍOnᴇᴌᴀ I used this answer and it seems to have worked: askubuntu.com/a/683136/255443
 
Set my clock back an hour
 
zomis@hope:~$ ntpdate

Command 'ntpdate' not found, but can be installed with:

sudo apt install ntpdate
sudo apt install ntpsec-ntpdate
@Peilonrayz time zone issue?
@Duga just time travelled three minutes into the future
 
5:30 PM
@SimonForsberg I know clocks changed a while ago, but yes D;
 
Current attempt, for those interested: drive.google.com/file/d/1DYZdb98-e1xr18nDho_rd3RR_cXAbrwW/…. I'm not sure if adding that to the question is appropriate here. — Mike M. 23 hours ago
someone has a handy comment for that guy? ^^
No answer invalidation done, he was absolutely right about not updating the question ^^
nevermind, I commented
 
5:55 PM
@SimonForsberg Nice :)
 
6:22 PM
@SimonForsberg Oh, that makes sense.
You're comparing local time to SE time?
 
@Mast yup
 
7:25 PM
0
Q: Turn an array of pairs of start and end points into an ordered series

JB WilsonGiven an array of pairs, for example: [["Denver", "Miami"], ["Miami", "Tulsa"], ["LA", "Okmulgee"], ["Mobile", "Portland"], ["Tucson", "LA"]] What's the best way to arrange these pairs into an array of arrays that looks like: [["Denver", "Miami", "Tulsa"], ["Tucson", "LA", "Okmulgee"], ["Mobile", "...

 
 
1 hour later…
8:43 PM
0
Q: Using Redux state in React component

Sheik YerboutiI am using Redux Toolkit and have a general purpose ui-slice that I use for UI states that I need globally. In particular I have few components that need to know the current width of the window to conditionally render some content. So I made This reducer: acknowledgeScreenWidth(state, action) { ...

 
9:09 PM
0
Q: Javascript Function: Reduce redundancy of helpers

Mateen KaziaI have these few helper function that are used to check if the string in the given array is present and if the certain steps are present and then only have the other function fire. The reason I currently have them separated is because arrTours need to be associated with only those arrSteps. those...

 
 
1 hour later…
10:28 PM
0
Q: Suggestions on making this parsing/unparsing format more human-friendly

Agnishom ChattopadhyayI am working on some application which involves regular expressions with counting. Also, these regular expressions are not necessarily over some fixed alphabet, but over some class of predicates over bit-vectors. I would like to be able parse/unparse these objects. I have come up with something t...

0
Q: Using multithreading to send multiple emails

Jonathan WoodI'm trying to send any number of emails in the shortest amount of time using .NET 5.0? I've been playing with something like the following but I am not sure if it is optimal or even correct as there are a number of elements I don't understand. public async Task SendEmailAsync(string subject, stri...

 

« first day (2987 days earlier)      last day (1044 days later) »