Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Best practices
0 votes
6 replies
150 views

I have an array with almost infinite dimensions. I would like to iterate it from top left to bottom right, and when a certain threshold is reached iteration can be stoped. I create our test array. mat ...
Advice
0 votes
5 replies
95 views

Let's say I have a list called words that contains some items with special characters (anything not alphanumerical). for i in words: #check if i contains special characters and return True or ...
Score of -1
3 answers
214 views

In my code, I have a bunch of asynchronous tasks, which will be represented as Promises. Say, let those be: let promises = myarr.map( (x) => myAsyncFn(x) ); I want to trigger some action after ...
Best practices
0 votes
2 replies
55 views

I am new to r and am having a hard time figuring out how to use r to find a specific item, then report back a value from that same row. The same 40 items appear in two columns, but in a random order. ...
Score of -6
2 answers
128 views

I'm trying to create a setup where a user can talk to a chatbot, and the chatbot will run through a predetermined list of responses in consecutive order. The bot will respond each time the user gives ...
Advice
0 votes
8 replies
214 views

Let's say I have a dictionary such as: dict = { "Mars": [4, 3, 4, 7, 10], "Jupiter": [6, 6, 7, 9, 11], "Saturn": [4, 5, 12, 22, 1]} I would like to iterate through each ...
Score of 1
1 answer
211 views

I don't want to use Google Apps Scripts, just formulas so that this can be display/edited on a mobile device while offline. [![In column B, I want to put timestamps when a checkbox in Column D becomes ...
Score of 2
1 answer
173 views

I have a dataframes pulled from a file. The variable with all these dataframe names is: Data_Tables. These dataframes all have the same columns, and I want to concatenate the dataframes based on the ...
Best practices
1 vote
7 replies
255 views

Our program reads results of an SQL query and turns each row into a task for a worker to perform. Something like: for row in query.results(): cluster.submit(row) However, most of the tasks are so ...
Score of -6
2 answers
138 views

I know that modifying a list while iterating over it is dangerous. For example, using my_list.remove() is a famous problem because it causes the iterator to skip the next element. However, I found a ...
Score of 3
4 answers
240 views

Consider an example where one needs to iterate over a sequence with all but the output yes/no requires unwrapping somehow. pub fn interesting(i : u32) -> Result<bool, ()> { if i < 42 { ...
Score of 3
2 answers
306 views

According to the Python documentation, set is a mutable unordered collection. Usually, it's implemented as a hash table that stores references to objects as its keys. Comparing to dict (which is also ...
Score of -5
1 answer
152 views

I made the next class obj = MyClass() fds=['a','b','c'] for i in fds: attribute_name = f"{i}" setattr(obj, attribute_name, [f"{i}"]) print(obj.i) I know that obj.i is ...
Score of 1
1 answer
126 views

My Kotlin project needs to parse files and keep track of the outcome: fun parseFiles(dp:MyDataProvider, files:List<String>) { //store the status of each processed file val statusMap = ...
Score of 0
2 answers
104 views

This will output all csv files from the directory, but only show one of the csv dataframes. OUTPUT_PATH = "./static/output/" FILE_LIST = glob.glob("./static/*.json") def all_data():...

15 30 50 per page
1
2 3 4 5
729