Skip to main content
Filter by
Sorted by
Tagged with
-5 votes
0 answers
74 views

I am trying to write a Java program to reverse a string entered by the user. Expected Output Input: "hello" Output: "olleh" Actual Output: The output is incorrect or sometimes ...
SANKAR S's user avatar
Advice
0 votes
5 replies
128 views

I am examining a large data set on sports activities amongst a population of people and need to find all entries of the word "soccer." What is the best SQL function to filter all entries ...
TayArianna's user avatar
1 vote
1 answer
51 views

I have a string-typed project argument and I want to conditionally execute some Meson code depending whether it is set to an empty string or not. How can I achieve this with Meson? I looked at the ...
Newbyte's user avatar
  • 4,079
-4 votes
1 answer
207 views

package edu.practice.zapper; import java.io.IOException; import java.lang.ProcessBuilder.Redirect; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Base64; import java....
PatK's user avatar
  • 13
Advice
0 votes
8 replies
217 views

I'm a begginer in C, but i want to find for a word or substring within a longer string #include <stdio.h> int main() { char string[] = "C is a programming language"; char word[...
EmiliSpotato's user avatar
Advice
0 votes
0 replies
27 views

In sieve, suppose I have the following variable: set "thevariable" "a bb ccc dddd eeeee ffffff"; Is there a way to split the value of this variable into the following list of ...
HippoMan's user avatar
  • 2,390
3 votes
0 answers
87 views

Problem: I am building an OCR-based engine to digitize chess scoresheets using Python and python-chess. I use the Levenshtein distance (specifically Jaro-Winkler) to map recognized text (e.g., "...
TacerTV's user avatar
  • 27
0 votes
0 answers
175 views

Suggested Answer: Headline: Use getModuleApplicationInfo() instead of getModuleContext() in API 101 In libxposed API 101, the method getModuleContext() is indeed deprecated or removed from the base ...
Anton Tsekhmistrov's user avatar
4 votes
0 answers
189 views

This "warning sign" character, ⚠️, corresponds to the sequence of codepoints U+26A0 U+FE0F (if I understand correctly, it is ⚠ followed by a variation selector character), so I can render it ...
Enlico's user avatar
  • 30.8k
Best practices
0 votes
3 replies
99 views

I have a user input as str in a CLI like using argparse: python -m service.run --separator \n When I collect the separator, I get the escaped version of the string "\\n", but instead I want ...
jlandercy's user avatar
  • 11.7k
0 votes
1 answer
87 views

I am trying to build up something that uses wkwebview and javascript..So, I am having terrible issues with strings.. They are way too short, meaning that they don't have enough capacity. I have ...
osku's user avatar
  • 341
-2 votes
1 answer
189 views

class string { struct long_mode { size_t size; size_t capacity; char* buffer; }; struct short_mode { uint8_t size; char buffer[23]; }; ...
Renat's user avatar
  • 5
0 votes
0 answers
47 views

I am writing a compiler for a Hebrew based programming language, and I have been wondering if I need to flip the direction of brackets. When writing in an RTL editor, the shift+0 bracket correctly ...
Tauman's user avatar
  • 9
3 votes
3 answers
121 views

I have a string like this: ippeʔɒɒf ɒʈ. Note the doubled ɒɒ and pp. I want to replace the doubled characters with only one of itself: ipeʔɒf ɒʈ. I would also like this regexp to apply to any ...
bigyihsuan's user avatar
1 vote
2 answers
103 views

I'm maintaining a Java application using Hibernate 5.0.7 to interact with an Oracle 19C database. The data type of remark attribute in orders table is CLOB, java.lang.ClassCastException: com.org.proxy....
190303458's user avatar
Advice
1 vote
1 replies
80 views

I'm looking for a Coq function that converts a natural number (of type nat) to a string. I've found some code here that works, but I'd really prefer if there was a function in a standard library that ...
Sambo's user avatar
  • 199
0 votes
1 answer
42 views

How can I define a literal string macro from my jamfile ? so that I can use it like this: std::cout << MY_MACRO << std::endl; I would like to avoid resorting to macro stringification. I ...
Gabriel Devillers's user avatar
0 votes
2 answers
136 views

From the pandas documentation, while creating a Series, it can take the following input as data: Array-like Iterable Scalar value String is a type of iterable, but when I try to create a Series ...
hr08's user avatar
  • 21
Best practices
2 votes
3 replies
82 views

Matlab has two ways how to store strings; either as character array foo='the text' or as a string array bar="the text". The problem starts when one tries to concatenate the arrays vertically,...
Crowley's user avatar
  • 2,341
13 votes
6 answers
985 views

My goal is to split a std::string into tokens delimited by a list of possible delimiters/separators. For instance std::string line{"\tSplit \t\t this sequence\t of tokens "}; must be ...
Oersted's user avatar
  • 4,801
-1 votes
1 answer
102 views

I'm working on a project that involves generating random data according to a wide variety of specific distributions. The number of sample points to generate can go up to hundreds of thousands, ...
Blackyu Sylvean's user avatar
Best practices
2 votes
4 replies
72 views

I'm trying to figure out why a SAS script and this R script don't produce the same variables. The SAS script attempts to directly pull native SAS files from the Wharton TAQ database while the R script ...
Fred Berlin's user avatar
Advice
1 vote
8 replies
79 views

I have a folder full of hundreds of text files formatted like so: holdrod =fl__2183_180325_0045 <bunch of data> measburn_tot = 189.260915 <bunch of data> I want to use ...
Joe Blough's user avatar
Tooling
0 votes
11 replies
126 views

I'm working on a project in which I need to filter out specific strings from an inconsistent API, where the strings are not always what I want. I need to filter out eligibility for different education ...
23emli's user avatar
  • 1
1 vote
1 answer
54 views

Here is a piece of cmake code: macro(my_macro p) message("--my_macro--") message("p is: ${p}") if(p) # <========================= (1) message("\"if(...
SZYoo's user avatar
  • 538
0 votes
1 answer
145 views

I am trying to implement a function in C similar to strcpy, but the program produces a segmentation fault when executed. The code below attempts to copy a source string into a destination string, but ...
Miguel Garcia Silvestre's user avatar
0 votes
3 answers
135 views

I want to add strings to a fixed 2D array. I have a core dumped error when executing my addToList function. The program passes the list pointer and the string to add as arguments. I then iterate ...
SolidSnake's user avatar
-1 votes
2 answers
254 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
165 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
5 votes
1 answer
156 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
  • 207
0 votes
0 answers
62 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
Best practices
0 votes
8 replies
96 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
130 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
149 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
  • 359
2 votes
1 answer
79 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
103 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
  • 860
0 votes
1 answer
85 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
-2 votes
1 answer
185 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
109 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
86 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
97 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
1 vote
1 answer
136 views

I am new to R and trying to create two new variables from my dataset. My data frame is called netflix and it contains these relevant columns: date_added and duration Example values: date_added: "...
user31963479's user avatar
Best practices
2 votes
8 replies
254 views

I need to define several constant strings that will be used across an entire C++20 project. I am considering the following options : constexpr char[] str1 = "foo"; constexpr std::string str2 ...
Autechre's user avatar
  • 634
3 votes
2 answers
129 views

So, for context, I have started writing a small HTTP-Server for learning purposes. Currently, I have 2 modules: server and logger. The server module uses the logger I wrote internally for logging ...
Puscas Raul's user avatar
Advice
0 votes
2 replies
89 views

I have a problem where I need to cut off text based on a max length. But the inputted string could be html a la <p>hello</p>. the html tags do not count towards the max length. for example ...
Jacob Pecile's user avatar
2 votes
1 answer
75 views

I am using Scala 3.3.7. When I do val str1 = raw"\\\" // compile error: unclosed string literal It is considering the \" as a single character. But when I do val str1 = raw"\\\\&...
Mradul Singhal's user avatar
Best practices
0 votes
2 replies
148 views

I'm quite frustrated trying to write to a binary file in Excel VBA. The issue is with fixed-length string data in a Type structure. (Note that my binary file requirements are that fixed-length string ...
Dave Clark's user avatar
1 vote
1 answer
123 views

How can I handle string values that contain patterns like xxxE205 (e.g., 2004E205), which are used as unique codes in my company? I explicitly read the column as a string in pandas, but values ...
Ethan MK's user avatar
2 votes
3 answers
308 views

I implemented std::hash<std::string> in the usual way, by specializing the std::hash template. But then I realized that these should already be provided by the <string> header (https://www....
luczzz's user avatar
  • 446
-4 votes
1 answer
214 views

I have to create a dictionary, where the keys are letters of the alphabet, and the values are the indexed letters of a given string. Example: Given the string "BDFHJLCPRTXVZNYEIWGAKMUSQO" ...
Shadow0013's user avatar

1
2 3 4 5
3699