What could be the easiest way to match all links and e-mail addresses in a string to a list array? I was using preg_match in PHP but in C# it looks like it will be way different.
Hi guys,
I've got a string that comes from a POST form where I want to replace all spaced with some other character.
Here's that I did:
$cdata = str_replace(" ","#",$cdata);
And I got this.
--- Contact-ID#=#148 [10274da8]#Sinhronizacija#=#private [1000137d]#Uzvards#=#Zom [1000137c]#Vards#=#Tana [1000130e]#Talrunis#=#3333 [1000130e]#Mobilais#=#5555
As you can see, spaced before "[10..." are still there. Any ideas what could be the problem?
I am trying to check if a lhs is already abbreviated in vim.
mapcheck, however, seems to have a problem. For example,
iabbr swt switch
echo mapcheck('sw','i',1)
returns "switch" even when "switch" defined for "swt".
mapargs seem to return a string even if there is a partial
match with the lhs. Is there a way to find if an
abbreviation has been defined for the "exact" match, i.e.,
the above mapcheck returning a "" instead.
I am trying to convert a string (const char* argv[]) to a double precision floating point number:
int main(const int argc, const char *argv[]) {
int i;
double numbers[argc - 1];
for(i = 1; i < argc; i += 1) {
/* -- Convert each argv into a double and put it in `number` */
}
/* ... */
return 0;
}
Can anyone help me? Thanks
Hi all
I have a string with file content .
But my function deals with file path on the disc .
Any idea how i can solve this problem without writing to the disc my file content ?
Thanks for help.
Hi,
I have a field in my db which is a List.
I add strings to that list and it works fine on the development server.
This is the result: [mat12, bg10]
When I do the same on the deploy server, this is the result: [u'mat12', u'bg10']
I don't understand why it adds "u' '" to the string.
I would really appreciate your help.
Thanks
If e.g. I keep control markup in DB instead of ascx file.
How can I load control from string constant?
(of course if I don't want to save copy to disk)
I'm retrieving an unformatted String from a twitter feed. I want to be able to turn a text URL (http://blah.com/qwerty/) into a link but don't know how...is there a handy regular expression for this?
Hi-- I have a UK date in the format "06/Apr/2010 13:24" that I need to insert into a mysql db date field.
The PHP strtotime function can't handle this string-- has anyone got any ideas other than writing a custom function?
Thanks!
I am having code
NSString *cellValue1 = [products1 objectAtIndex:indexPath.row];
when i try to print NSLog(@"cell value is %@",cellValue1);
in log i am not getting anything,
if i use %s, i am getting some symbols, not the string located in cellValue1.
Please help me.
Thanks in advance.
some of code, has below line.
readonly private string
TARGET_BTN_IMG_URL =
@"\ad1-sunglim\Test\";
in this line, why does @ need to be attatched ?
and even in javascript too.
What would be the easiest way to make a CharSequence[] out of ArrayList<String>?
Sure I could iterate through every ArrayList item and copy to CharSequence array, but maybe there is better/faster way?
Trying to find a way to trim spaces from the start and end of the string. I was using this, but it dont seem to be working:
title = title.replace(/(^[\s]+|[\s]+$)/g, '');
Any ideas?
How can I convert a string to JSON in javascript, is there a method that does that?
Something like:
var x = "{ id: 5, name: 'hello' }";
var y = /*something*/(x);
alert(y.id + " " + y.name);
Is there a difference between these ?
if(myString.equals("")){
}
if(myString.equals(null)){
}
if(myString == ""){
}
I have a string, I don't know is it empty or has some emtpy spaces I just wan't to stop it to be written in database if it is invalid(if empty or with some blank spaces).
Hi I have Map of String values.
I want to cast this value at runtime.
e.g.
Map map = new HashMap();
map.put("key1","101");
map.put("key2","45.40");
Now runtime I know key1 is integer and key2 is double
How can I cast this.
I tried this:
("101").getClass().cast(Integer).
Thanks.
Hi,
I have a NSMutableArray with a few NSString objects in , how can i test if
it contains a particular string literal
i tried [array containsObject:@"teststring"] but it doesn't work.
Thanks
I want to strip away all letters in a string, which are not numeric. Preferably a solution made with Regular Expressions or something. And in C#.
How to do that?
Hi guys, i've this string example value:
Sun, 09 May 2010 11:16:35 +0200
I've to insert it into MySql Date/Time field.
How can i convert it into .NET format (or Mysql format), so i can make my INSERT INTO mydate='2010-05-09 11:16:35' ?
Thank you !