Hello, i've got the following question:
I've got
public enum Als
{
[StringValue("Beantwoord")] Beantwoord = 0,
[StringValue("Niet beantwoord")] NietBeantwoord = 1,
[StringValue("Geselecteerd")] Geselecteerd = 2,
[StringValue("Niet geselecteerd")] NietGeselecteerd = 3,
}
with
public class Stri...
I want to know from where the index of a string and an array starts from.
I am getting a lot of confusion while making programs.
While calculating string length of a string is the null character also counted?
...
"C://test/test/test.png" -> blub
blub = blub.Replace(@"/", @"\");
result = "C:\\\\test\\test\\test.png"
how does that make sense? It replaces a single / with two \
?
...
I have a string like "{some|words|are|here}" or "{another|set|of|words}"
So in general the string consists of an opening curly bracket,words delimited by a pipe and a closing curly bracket.
What is the most efficient way to get the selected word of that string ?
I would like do something like this:
@my_string = "{this|is|a|test|case}...
Hello. I'm learning Boost::asio and all that async stuff. How can I asynchronously read to variable user_ of type std::string? Boost::asio::buffer(user_) works only with async_write(), but not with async_read(). It works with vector, so what is the reason for it not to work with string? Is there another way to do that besides declaring c...
I'm using a foreach loop to populate each row in a DataGridView with a string. I need to search the DataGridView to make sure that I don't add a string that is already there. What is the best way to do this?
Here is my code so far:
foreach (String file in openFileDialog.FileNames)
{
// to...
I just took an exam where i was asked the following:
Write the function body of each of the methods GenStrLen, InsertChar and StrReverse for the given code bellow. You must take into consideration the following;
How strings are constructed in C++
The string must not overflow
Insertion of character increases its length by ...
I am new to javascript and I just wanted to convert a string into a format that a person like me can read. Here is an example of what I am trying to do...
string2size(string){
//some awesome coding I have no clue how to make
return awesomeAnswer
}
now the return should give me something like 56 bytes or 12kb or 1mb depending how much...
I am communicating with a server who needs null terminated string
How can I do this smartly in C#?
...
In C++ I wanted to define a constant that I can use in another function, A short answer on how to do this will be fine..
Lets say at the beginning of my code I want to define this constant:
//After #includes
bool OS = 1; //1 = linux
if (OS) {
const ??? = "clear";
} else {
const ??? = "cls";
}
I don't know what type to use to def...
I have a boolean variable which I want to convert to a string
$res = true;
I need it the converted value to also be in the format "true" "false" not "0" "1"
$converted_res = "true";
$converted_res = "false";
I've tried:
$converted_res = string($res);
$converted_res = String($res);
but it tells me string and String are not recogn...
My application typically recieves a string in the following format:
" Item $5.69 "
Some contants I always expect:
- the LENGHT always 20 characters
- the start index of the text always [5]
- and most importantly the index of the DECIMAL for the price always [14]
In order to identify this string correctly I validate all the...
I have a ul list, with 10 items, and I have a label that displays the selected li text.
When I click a button, I need to check the label, versus all the list items to find the matching one, when it finds that I need to assign the corresponding number.
I.e.
list:
Messi
Cristiano
Zlatan
hidden values of list items:
www.messi.com
www.cr...
My current project requires locating an array of strings within an element's text content, then wrapping those matching strings in <a> elements using JavaScript (requirements simplified here for clarity). I need to avoid jQuery if at all possible - at least including the full library.
For example, given this block of HTML:
<div>
<p>T...
I need to check in string.Endswith("") from any of the following operators: "+,-,*,/"
If I have 20 operators I don't want to use "||" operator 19 times.
...
I am using this code to find the MAC address of a machine.This code prints directly the MAC address, but i want to return it as a string.I am completely confused.
please help.
try {
InetAddress add = InetAddress.getByName("10.123.96.102");
NetworkInterface ni1 = NetworkInterface.getByInetAddress(add);
if (ni1 !=...
If a user enters a non-numeric value into a TextBox and presses a Button, I want to show an error message on a Label.
How can I achieve this?
...
I'm trying to figure out why a variable isn't triggering a conditional that it should. var_dump reports something like this:
string(20) "0"
Why is it reporting a length of 20 when the length is clearly 1?
...
I am checking to see if the last character in a directory path is a '/'. How do you get ruby to treat the specific index of a string as a character rather than the associated ASCII code?
For example the following always returns false:
dir[dir.length - 1] == '/'
This is because dir[dir.length - 1] returns the ASCII code 47 (rather ...
we can convert the dictionary to kw using **kw but if I want kw as str(kw) not str(dict),
as I want a string with keyword arguments for code_generator,
if I pass
obj.method(name='name', test='test', relation = [('id','=',1)])
I want a function to return the string like
"name='name', test='test', relation = [('id','=',1)]"
...