Skip to main content

All Questions

Tagged with
4 votes
1 answer
118 views

Algorithm to find the number of specific continuous substrings

I am trying to solve the following algorithmic problem: Every day, Bob goes to work and does one of 26 possible tasks. The tasks are coded with the letters of the English alphabet from a to z. ...
clearcut3000's user avatar
0 votes
1 answer
107 views

Difference between reading large chunks of data using char* or std::string

I was trying to solve a coding problem and, to summarize, I was using this piece of code: char result[50005][26], buffer[50005]; while (fin >> buffer) { for (int i = 0; i < strlen(...
naphy's user avatar
  • 3
1 vote
2 answers
132 views

Can i get multer to parse an array of strings in formdata as an array, and not as a comma seperated string?

I am using axios to send a FormData object, containing a categories field, an array of strings, to an express server. I am using multer to parse the FormData recieved, however req.body.categories is a ...
Lewis Burgess's user avatar
0 votes
3 answers
119 views

Define and instantiate C style array of string inside class

I am trying to create a class with an array of string defined inside. I want this array of string to be defined when the class is instantiated. Here is my attempt below (or the code showing my ...
Noel's user avatar
  • 3,982
4 votes
5 answers
172 views

Check if a string starts with a substring from an array of substrings and return that substring

I have an array with all German telephone area codes that is 5266 items long and looks like this: $area_codes = array( '015019', '015020', '01511', '01512', '01514', '01515', ...
Ben's user avatar
  • 763
0 votes
2 answers
256 views

Cleaning string in Delphi?

I have created the following function in Delphi 12.2 Athens to clean a string from invisible control characters that caused trouble in my app: function MyCleanText(const AText: string): string; var ...
user1580348's user avatar
  • 6,071
1 vote
3 answers
77 views

How to show an array of bytes as a string-like list of characters?

I am using a TCP-client program to catch a list of bytes, and when I send such a list of bytes, this is what I see: I want to capture those characters in a logfile, so I did the following: log.Debug($...
Dominique's user avatar
  • 17.7k
0 votes
3 answers
78 views

Python split() function :: Need to split "int_32\n' " so that I get int_32 alone [duplicate]

Need to split "int_32\n' " so that I get int_32 alone. I tried x = "int_32\n' " x.split("\n") I also tried x = "int_32\n' " x.splitlines() Both do not yield ...
Software Fan's user avatar
0 votes
0 answers
32 views

combine variable array of properties into a comma separated list powershell [duplicate]

I have a powershell command that pulls a list of devices with PRT in the name to a variable & am then trying to format the list in an easy to read output $PrinterList = @(Get-WmiObject ...
Dave's user avatar
  • 15
0 votes
0 answers
54 views

MASM Array of Strings

I am in an assembly language course and need to do the following: Write code that defines symbolic constants for all seven days of the week. Create an array variable that uses the symbols as ...
dvk512's user avatar
  • 39
1 vote
1 answer
72 views

How do I desctructively iterate over an array of strings in rust?

MRE: let mut ws = s.split_whitespace(); for w in ws { if w == "option1" { //do something } else if w == "option2" { //do something else }... // this is the tricky part ...
kesarling's user avatar
  • 2,280
1 vote
1 answer
78 views

Function is not working, but gives no error

I'm new to C#. I'm trying to make game in Unity. These functions are necessary for changing in-game tabs with help of a button. public string check; public CanvasGroup hydrogenScreen; public ...
Kārlis Kauliņš's user avatar
0 votes
1 answer
71 views

Assembly: calculation of string index

As a beginner to Assembly, I've been practicing disassembling and reverse engineering on Intel x86 assembly in IDA. The current program I'm trying to figure out validates the user given password by ...
TasH's user avatar
  • 13
0 votes
2 answers
103 views

Unexpected null character behaviour when inserting into an array

#include <stdio.h> #include <string.h> void f(char s1[], const char s2[], int i, int j) { if (i >= 0 && j >= 0) { s1[i] = s2[j]; f(s1, s2, i + 1, j - 1); ...
Tommaso Ansaloni's user avatar
1 vote
1 answer
89 views

Does exist a standardized string table implementation ? Is my implementation in C good ? Looking to discuss topic

I'm developing a C library to write a custom binary format to store levels for a game. I had a problem about optimizing the usage of strings for this file, I have two use cases of strings in this file:...
magg's user avatar
  • 65

15 30 50 per page
1
2 3 4 5
1275