I need to do the following C# code in C++ (if possible). I have to const a long string with lots of freaking quotes and other stuff in it.
const String _literal = @"I can use "quotes" inside here";
Hi All
I'm trying to extract/match data from a string using regular expression but I don't seem to get it.
I wan't to extract the highlighted characters from the following string:
/xubuntu/daily/current/lucid-alternate-**i386**.iso
This should also work in case of:
/xubuntu/daily/current/lucid-alternate-**amd64**.iso
Thanks a lot for your help.
For example in C#
@-quoted string literals start with @ and are enclosed in double quotation marks...
So Is there anething like @-quoted string in Actionscript?
I must do a automatic codes generator with user-configurable string with predefined keys and can not find a good way to do it.
For example, a string
OT-{CustomCode}-{Date}-{##}
could generate codes
OT-C0001-20100420-01
OT-C0001-20100420-02
I thought of using RegExpr.Replace(), but I would have problems if the code of a customer was {##}
Any help is welcome! (and sorry for my english)
Hi there,
I tried to pass a string value into a JavaScript function like below:
<%= "'" + prop.property_description + "'") %>)
But it does not seems to be the best option, is there a better way to do the above without concatenate the string values with "'"?
Thanks
Is there a way to turn a char into a String or a String with one letter into a char (like how you can turn an int into a double and a double into an int)? (please link to the relevant documentation if you can).
How do I go about finding something like this that I'm only vaguely aware of in the documentation?
I'm writing a program in C++ that reads in some data from an external file in order to set the values of static variables.
Is it possible to convert a stringto an object identifier? (e.g. convert the string "CheckBox::Unchecked" into and identifier for the object CheckBox::unchecked)
I always seen on SyncLock examples people using
Private Lock1 As New Object ' declaration
SyncLock Lock1 ' usage
but why?
In my specific case I'm locking a Queue to avoid problems on mult-threading Enqueueing and Dequeueing my data.
Can I lock the Queue object itself, like this?
Private cmdQueue As New Queue(Of QueueItem) ' declaration
SyncLock cmdQueue ' usage
Any help appreciated.
Thanks.
In my last question i asked how to best send a string from one view controller to another, both which were on a navigation stack:
http://stackoverflow.com/questions/2898860/pass-string-from-tableviewcontroller-to-viewcontroller-in-navigation-stack
However I just realised I can either pass the path to the file in the app's document's folder as the first (the table view) has already accessed the data in the file should I pass viewcontroller the data to the pushed VC?
Hello
is there are better way to structure this line of code, as you can see, I am changing the format of a string that contains a date.
lblCourseStartDate.Text = String.Format("{0:D}", DateTime.Parse(CourseStartDate));
I just found it untidy that I am converting twice or three times to get the format I want.
Thanks
How in Java can I get list of all characters appearing in string, with number of their appearances ? Let's say we have a string "I am really busy right now" so I should get :
i-2, a-2, r-2, m-1 and so on.
Wondering if anyone knows if either of these methods would produce an output faster:
Method 1
for ($i=1;$i<99999;$i++) {
echo $i, '<br>';
}
or
Method 2
for ($i=1;$i<99999;$i++) {
$string .= $i . '<br>';
}
echo $string;
Thanks for any input you have.
Got a problem,
I have an an array of objects inside a constructor of a class. I'm trying to use the array to relate to a property in the object but I can't relate to them.
lessonObjectsArray(0) = lessonObject1
lessonObjectsArray(1) = lessonObject2
lessonObjectsArray(2) = lessonObject3
the properties of the object "lessonObject1" are lessonName, videoLink, pdfLink
I thought it would be tbTest.text = lessonObjectsArray(0).lessonObject1.lessonName
just doesnt work
Hi,
I hope this question isn't too basic.
I have a string "-123445". Is it possible to remove the '-' character from the string?
I have tried the following but to no avail:
$mylabel.text("-123456");
$mylabel.text().replace('-', '');
Any help would be greatly appreciated.
Thanks,
Zaps
Hi, im just writing my own replace method for any weird characters and i used the ASCI value 0, null to replace unwanted characters, i was hoping for them to be 'deleted', but this doesnt work. A gap just appears in the string.
What exactly does String.Replace() do when removing a character for ""? Does it shift them all down and then 'delete' the final character or something?
Hi folks,
Real quick question - what's the cleanest way of editing the characters in a string in C#?
i.e. what is cleanest C# equivalent of c++:
std::string myString = "boom";
myString[0] = "d";
What's the cleanest way of editing the characters in a string in C#?
What's the C# equivalent of this in C++:
std::string myString = "boom";
myString[0] = "d";
I'm in a situation now were I need to convert a datarow I've fetched from a query into a new instance of an object. I can do the obvious looping through columns and 'manually' assign these to properties of the object - or I can look into reflection such as this: http://www.codeproject.com/Articles/11914/Using-Reflection-to-convert-DataRows-to-objects-or
What would I base the decision on? Just scalability??
Hi,
I have a string in PHP for example $string = "Blabla [word]";
I would like to filter the word between the '[' brackets.
The result should be like this $substring = "word";
thanks
I want to copy a string into a char array, and not overrun the buffer.
So if I have a char array of size 5, then I want to copy a maximum of 5 bytes from a string into it.
what's the code to do that?
Suppose I want to use the ASCII special character FS(0x1C) in a .Net string, and then be able to format a byte array from that same string with the special character properly represented as a single byte, how would I do that? I can't seem to get my head around it.
Thanks for any help you can give.
Given an object like this:
var obj = {
first:{
second:{
third:'hi there'
}
}
};
And a key like this "first.second.third"
How can I get the value of the nested object "hi there"?
I think maybe the Array.reduce function could help, but not sure.
In javascript I am used to just being able to pick any character from a string like "exm[2]" and it would return to me the third character in a string. In C is there a way to do that or something without a function that requires a buffer?