Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
195 views

I just saw a video that explains basic concepts about string memory allocation (video: https://www.youtube.com/watch?v=gp6NY01XFoE). In 3:00, he says that two objects are created (one in String Pool ...
queseyo_202x's user avatar
0 votes
2 answers
133 views

Basic Add operation does not work let mut st: String = "".to_string(); st += 'c'; | 3 | st += 'c'; | ^^^ expected `&str`, found `char` Push Operation works let mut st: ...
Shrishvesh Reddy's user avatar
4 votes
1 answer
119 views

Is there a reason why yaml adds single quotation marks around the words yes and no when I create a YAML file from a python dict? MWE: import yaml def yes_or_no( word: str, ) -> dict: ...
kalle's user avatar
  • 197
0 votes
0 answers
50 views

I am building a CalDAV/CardDAV client for the Gleam programming language. I have a function which sends a REPORT request to the CalDAV server (Baikal in this case) with this body: let headers = [ #(&...
Abhimanyu Sharma's user avatar
-1 votes
1 answer
148 views

I'm trying to use the \U format in Python 3 but found the following error: >>> import re >>> p = re.compile('[\U+0041\U+0042\U+0043]') File "<stdin>", line 1 p =...
stackbiz's user avatar
  • 1,928
Best practices
0 votes
8 replies
77 views

I am building a Task Tracker CLI project, currently working on the CLI structure to accept user input. I have used a switch statement to receive input from args. The problem I have is that I have ...
DakuwoN's user avatar
1 vote
1 answer
122 views

I have a binary string, in that binary string there are many zeros with followed by a single 1, for example, "...
RAnsari's user avatar
  • 47
1 vote
1 answer
143 views

I am trying to perform text analysis on large character strings that include multiple different speakers. I need to create a dataframe of 2 columns, speaker and turn, which have the person speaking ...
flâneur's user avatar
  • 363
2 votes
1 answer
77 views

hist_df_2["time"] = hist_df_2.apply(lambda row : hist_df_2['timestamp'].replace(str(hist_df_2['date']), ''), axis=1) I tried this to remove the date part from the timestamp. However, for ...
DivineBanana's user avatar
Advice
0 votes
4 replies
98 views

I have some code where I read N strings of a given size n into an ndarray, which I would then like to cut in half to obtain a twice longer array of strings size n/2. Is there a numpy operation which ...
RJVB's user avatar
  • 820
0 votes
1 answer
55 views

I understood that it's common sense to return the worker code as string but debugging and coding is a bit ackward this way. Such at this position, where I would like to concat several string to copy ...
AntonSack's user avatar
  • 1,047
-1 votes
1 answer
151 views

I am working on a function where I will be recieving data from an SPI communication and then get the date/month/year from them I have created a function to do the latter void set_file_header(const ...
Maaz Madha's user avatar
-1 votes
3 answers
104 views

I want to delete all lines that end with OFF except if they contain override. Input 1765193089 socket override DiningRoom/Socket/Work/state ON 1765206025 socket evening Hall/Socket/Lantern/state OFF ...
Richard Barraclough's user avatar
Advice
0 votes
2 replies
79 views

I'm building an HTTP server and parsing request headers. My current code fails when the Host header includes a port number because I'm splitting on :. Current Code: String[] header = line.split(":...
Abdelouahab 's user avatar
0 votes
1 answer
84 views

I am using Micropython on the ESP32. I have the following string, which includes the unicode character \xb0. a = 'abc\xb0def' First, I will need to change the notation to the \U00XX form, second I ...
Sebastian's user avatar
  • 442

15 30 50 per page
1
2 3 4 5
12332