« first day (2851 days earlier)      last day (215 days later) » 

12:45 AM
0
Q: react native refactor theme handling

manuelBetancurtI am styling my react native component according to some conditions, here the code, The question is how do I make this cleaner? functional style? const configColors = (isSingle, isDarkMode) => { let colors = {}; if (isDarkMode){ colors = { ...colors, configAxisLabelColor : Co...

 
1:09 AM
0
Q: Is my singly linked list python code incorrect?

Zero-LuminanceI would first like to address that I am new to both Stack Exchange and data structures. After foolishly posting this question on stackoverflow another user kindly directed me here. Before you read any further I apologise for any bad formatting as this is my first question. Thanks. I have recently...

 
1:57 AM
0
Q: ServerSocket not sending data to Client on button_click

W.DonaldThe code below is based on the server socket example and built in winForms, This is the entire code (to run it you would need: textBoxes: tBoxTcpIpStatus and tBoxSend, button button1 and backgroundWorker bgWorkerSocketListener ): using System; using System.Net; using System.Net.Sockets; using S...

 
 
3 hours later…
4:57 AM
Monking
@CaptainObvious broken
 
0
Q: Entry level math calculation in Python

Shen Yang''' number = 2.2**3 print(number) a = number == 10.648 print(a) ''' The output is beyond my understanding: ======= RESTART: D:/Desktop files/test/6.py ========= 10.648000000000003 False >>> Why is it showing 10.648000000000003 ? Anyone can help? thanks!

 
5:54 AM
@CaptainObvious broken
 
0
Q: Windows Like Security Screen for Linux (mockup)

Alex AngelUbuntu and other Linux variants do not have a Windows like CTRL + ALT + DEL screen, so I figured I'll make one myself. My plan is to make a HTML version, render that with the PyQt Web engine, and then when the keys CTRL + ALT + DEL are pressed the program launches. Preview it: https://codepen.io/...

0
Q: Faster way to open xarray file from zip folder stored on S3

Chris_007So I want to open xarray file which is stored inside zip folder located on S3 bucket. And here's my attempt. import zipfile import s3fs fs = s3fs.S3FileSystem(anon=False) zf = zipfile.ZipFile(fs.open(S3_URI)) dat = xr.open_dataset(zf.open('NC_file_name')) So it's working fine but the issue is ...

 
6:20 AM
0
Q: How to speed up the code for LeetCode "Container with most water" task?

pavelI'm trying to solve the LeetCode question where you need to find out the area of the container with the most water. I have created the solution that seems to work in my testing but it fails for being too slow when I try to submit it on LeetCode. My idea is that I create a dictionary of (x, y) tup...

 
 
2 hours later…
8:44 AM
0
Q: Pairwise summation

Pierre AbbatThis function adds up an array pairwise. It runs fast enough and appears cache-friendly; I've tested it for correct output. It's in C++ (farther down in the file there's a function that takes a vector), but looks like valid C as well (but I haven't tried it in C). How easy is it to understand? do...

 
 
2 hours later…
11:08 AM
0
Q: GROOVY : How to find a closest value or match a previous value in an array

user9630935How can i match a value after reading from a excel cell. In refering to the picture attached for the row Test8, I am having a value of 192. After reading for the particular row values. I need to assign the typus as +1 for the value 192. In case if it was 191 then it is +1. It is like something fr...

 
11:24 AM
It's a red flag that's on fire being towed by a red plane that is also on fire and is currently plummeting towards the earth, where it will leave a smoking red crater. — Libor 20 hours ago
^ lol
 
 
2 hours later…
1:08 PM
1
Q: Optimizing Dijkstra on grid Python (Microsoft Interview)

Shubham PrasharGiven a square grid of size N, each cell of which contains integer cost which represents a cost to traverse through that cell, we need to find a path from top left cell to bottom right cell by which the total cost incurred is minimum. From the cell (i,j) we can go (i,j-1), (i, j+1), (i-1, j), (i+...

 
 
2 hours later…
2:44 PM
0
Q: basic digital elements

drakonofSeveral basic elements are used as primitives. It was created just for learning purpose without any aims for using in projects. Could you please suggest what primitives would be useful for reinventing the wheel for learninig the language? encode_2 `timescale 1ns / 1ps module encode_2 ( input...

 
Greetings, Programs.
 
3:15 PM
Ryan Donovan on February 22, 2021
When it comes to developing low latency software systems, the received wisdom is that you would be crazy to use anything but C++ because anything else has too high a latency. But I’m here to convince you of the opposite, counter-intuitive, almost heretical notion: that when it comes to achieving low latency in software systems, Java is better.
 
3:54 PM
@Feeds :hmmmeyes: I am suspicious.
 
0
Q: Advice On How To IMaximize My C Code -Sorting Array Elements-

Abd Elkarim BouassemI recently started writing and learning C code and this forum helped me a lot so far. I would like to request the fellow developers here that are experienced in C coding, to take a quick look to this recent code i made (which i think works fine) and tell me if i did something i should avoid in th...

0
Q: Manage redundant code and redability which has same logic with 2 objects to be a function whcih handle the values logic

JakubIn a React app, I have built a confirm dialog which in the content takes an oldValue and newalue and the logic of those 2 values is the same and for better readability, I want to put those values to be handle by a function The dialog looks like this <ConfirmDialog open={isConfirmOpen} ...

 
 
1 hour later…
5:08 PM
0
Q: finding multiples of 5 in phython

Kaitohow do i write out a program whose procut will be the multiples of 5. I did this but it said it was wrong. for m in range(1, 101) if m % 5: print(m) how is this wrong and how do I do it? please

 
 
1 hour later…
6:16 PM
Duga has been down for a few days because someone forgot to start her after a reboot
8
She's on her way back
 
0
Q: N-dimensional array in Rust

apilatI am practicing Rust by creating data structures, such as this N-dimensional array. The purpose of this structure is to easily define and address into arbitrarily-deeply nested arrays without having to write out Vec<Vec<Vec<T>>> and incur the performance penalty coming from this (although perform...

 
@SimonForsberg Does @Duga have an endpoint anyone could do a "is live ping" to? Alternately do her endpoints support HEAD?
 
7:33 PM
0
Q: Dynamic Array in java

devi prasadI am implementing a class to mimic dynamic array as a part of my learning process of data structures. I have written the following class which works as a dynamic array data structure. I have gone through some video tutorials and also read some code from Java's ArrayList implementation to understa...

0
Q: i have written something like a getint function. Does anyone have suggestions for improvement?

Lui030first of all i would like to confess that i am still quite a beginner. I started learning c about half a year ago and started with c++ a few days ago, so please do not be too harsh with me :). you probably know the following problem: You have written a small program that runs in your console and ...

0
Q: Assigning parallel workers to predict from keras model using concurrent.futures

kosaI am working on a Reinforcement learning project, where I have to gather a lot of data using a TensorFlow model. During the data gathering, the weights of the model do not change. So, I am using concurrent.futures.ProcessPoolExecutor to parallelize this work-flow. The following is an MWE of my im...

 
7:50 PM
How am I asking many questions in one? The question is pretty focused. Make a method async and do the same thing automatically for the call stack. Also, what the tool does won't get merged without manual code review. It will save a lot of time. — user246392 46 secs ago
 
8:01 PM
@Peilonrayz I think for now this is the best: stats.zomis.net/GithubHookSEChatService/registration/index (ignore the instructions)
Although this will not tell you if the integration to Stack Exchange is working properly, but that is usually not a problem
You can also check for messages in this chat room:

 Duga's Neighborhood

It's a beautiful bot in the neighborhood. Would you be mine, w...
If there's no message there by @Duga in > 2 hours, something is likely wrong
3
 
@SimonForsberg Thanks, may add an ability to 'health check' Duga, since my local server killed itself sometime last week and I was going to add a command to check for that.
 
 
3 hours later…
10:46 PM
0
Q: StructuredText client on a PLC, adding a C# server

W.DonaldThis is ST code running on a PLC, apparently it's a client, that connects to a server run in Labview. I need to create a tcp server in c# to talk to it. Any chance of breaking down what's happening here? // Start sequence when Trigger changes to TRUE. IF ( (Enable=TRUE) AND (DoTCP=FALSE) AND (_E...

 
11:13 PM
If the code currently works as intended, and you're looking for peer review to improve it, your question should be asked on Code Review, which was created specifically for that purpose. You should make sure to read that site's guidelines in their help center to make sure it includes what is required there. — Ken White 16 secs ago
 
11:58 PM
0
Q: Looking to simplify my C# GradeBook project

JamesI started to learn C# recently by following the official Microsoft docs. I originally created the GradeBook project from pluralsight which I am now adding my own features to. This section lets the user input the name of the student and the subject, which creates a new gradebook file. The code tha...

 

« first day (2851 days earlier)      last day (215 days later) »