Hello,
How do I compress/decompress a string in VB.NET ?
I am trying to send long string through the Network and need them to be as small as possible before sending.
Thanks
I have the following list:
[('Steve Buscemi', 'Mr. Pink'), ('Chris Penn', 'Nice Guy Eddie'), ...]
I need to convert it to a string in the following format:
"(Steve Buscemi, Mr. Pink), (Chris Penn, Nice Guy Eddit), ..."
I tried doing
str = ', '.join(item for item in items)
but run into the following error:
TypeError: sequence item 0: expected string, tuple found
How would I do the above formatting?
We can replace strings in a batch file using the following command
set str="jump over the chair"
set str=%str:chair=table%
These lines work fine and change the string "jump over the chair" to "jump over the table". Now I want to replace the word "chair" in the string with some variable and I don't know how to do it.
set word=table
set str="jump over the chair"
??
Any ideas?
I'm seeking a solution to splitting a string which contains text in the following format:
"abcd efgh 'ijklm no pqrs' tuv"
which will produce the following results:
['abcd', 'efgh', 'ijklm no pqrs', 'tuv']
In otherwords, it splits by whitespace unless inside of a single quoted string. I think it could be done with .NET regexps using "Lookaround" operators, particularly balancing operators. I'm not so sure about perl.
I'm seeking a solution to splitting a string which contains text in the following format:
"abcd efgh 'ijklm no pqrs' tuv"
which will produce the following results:
['abcd', 'efgh', 'ijklm no pqrs', 'tuv']
In other words, it splits by whitespace unless inside of a single quoted string. I think it could be done with .NET regexps using "Lookaround" operators, particularly balancing operators. I'm not so sure about Perl.
I would like to extract the number from a string in MSBuild.
How can I do that using the built in tasks or the MSBuild.Community.Tasks? (RegexMatch might do, but how?)
Example: I have the string
agent0076
and I would like to get out the number, without the leading zeros:
76
Here's what I'm trying to do -- this is pseudo code and doesn't work. Does anyone know how to accomplish this for reals:
// Define the class
MyClass = Class.extend({});
// Store the class name in a string
var classNameString = 'MyClass';
// Instantiate the object using the class name string
var myObject = new classNameString();
Does anyone know how to convert a list to a string in Oz? I have a list of characters I need to convert to a string and I didn't see any concatenation operator in the Oz documentation.
thanks
i have a WPF TextBox that user can type number in that . now i am searching for a string format that can separate TextBox number each 3 point (like 0,0) but i want separate text with Slash or Back Slash or another character. and we do not know how much point our number has.
i am searching for string format not Linq solution or etc . i read Microsoft help but cant find any way .
sample = 123456789 == 123/456/789 (good) --- 123,456,789 (bad)
Does anybody have a quickie for converting an unsafe string to an int?
The string typically comes back as: '234\r\n' or something like that.
In this case I want 234. If '-1\r\n', I want -1. I never want the method to fail but I don't want to go so far as try, except, pass just to hide errors either (in case something extreme happens).
String 14/04/2010 17:12:11.
How to replace the characters to get a string
14%04%2010%17%12%11
I know the method Replace, but its syntax Replace(Char,Char). I have to use it 3 times. How to write shorter? Use regular expressions? Can I do without them?
what data type (string, blob or clob) should i use for my thread body when using doctrine?
and what length should it be?
i have read the documentation but dont quite understand the differences between them.
seems that all three can store unlimited nr of characters.
could someone explain
and how do i store unlimited characters in string? what should i set as length?
Hi,
How to restore the value of a string after using
FormsAuthentication.HashPasswordForStoringInConfigFile()
i have a string s1 = "abc" then
FormsAuthentication.HashPasswordForStoringInConfigFile(s1, "SHA1") =
A9993E364706816ABA3E25717850C26C9CD0D89D
How can i decrypt "A9993E364706816ABA3E25717850C26C9CD0D89D" back to "abc"??
How should I go about implementing a method that gets a String composed of Latin characters to translate it into a String composed of a different set of characters, let's say Cyrillic.
hi,
i have an variable declated as an object
Object obj =e.Row.DataContext;
when i go to immediate window and check the value i get like this
?Object obj =e.Row.DataContext;
{TempTypeMinus1487405295}
People: "7,556,930"
Name: "India"
string strcounty =obj .Tostring();
now in strcounty i should get as India
but i am getting the value as TempTypeMinus1487405295
how can i get the value india in string variable
thanks in advance
Whle decoding, I got this as out put.I am getting NSData bytes by decoding a string.I am converting NSData bytes as string then I am getting the following otu put.
-(void)decodeAction:(NSString*)str
{
NSData *data=[NSData base64DataFromString:str];
NSString *stt=[NSString stringWithFormat:@"%@",data];
printf("\n stt %s",[stt UTF8String]);
}
<4f7c204d 6c204d61 604d6164 61616461 6164616e 24616e20 4d6e204d 6e204d6f 604d6f68 616f6861 6f68616e 28616e
Hello All:
I am converting a string to datetime using DateTime.TryParse in C#. Can somebody tell me, how to know which format C# compiler used to convert the string to valid DateTime. I want to know the datetime format used.
Thanks,
Ashwani
I am using PHP, i want to display a string which comes as title of a post, in a textbox as value. if this title has inverted commas then the string value tag of input field terminates on that quote. now as there is an add slash function to add back slashes, is there a similar function to add forward slashes ? but just before quotes, and not any other character
If I have the following plain string, how do I divide it into an array of three elements?
{["a","English"],["b","US"],["c","Chinese"]}
["a","English"],["b","US"],["c","Chinese"]
This problem is related to JSON string parsing, so I wonder if there is any API to facilitate the conversion.
I want to make a file which reads String array but initially i am having only byte array so first i want to convert it into string array, so how can i do so. Pls. help me....
Hello
I have jsp page with text field and button. Also i have jar of another project.
When i click on the button the MAIN.class of the jar is called and program is running in independent window(JFrame).
After user is finished with the program and exits, I need to get the String of program that is generated on exit and paste it into the textbox (The String is HTML code)
Is anyone else having this problem and has a solution?
Thanks
Alex
I can use the following codes to trim a string:
-(void) aMethod {
// myStr from a text box
NSString *trimedStr = [mystr stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
...
// should I release trimedStr?
}
Not sure if the result trimedStr is an autorelease string? How can I find out that?
I have a bunch of records with dates formatted as a string such as '04/17/2009'
I want to convert them to a mysql datetime field
I plan to use a foreach loop to read the old date value and insert the newly formatted value into a new field in each record
what would be the best way to convert that string...I thought php might have a way to do it automatically?
thanks
I need an simple way to check whether a string that is sent to my function is of the form:
(x + n)(x + m)
//the +'s can be minus'
//n and m represent a double
//x represents the char 'x'
Is there a simple string format that I can use to check that this is the form. As opposed to checking each character singularly.
The whitespace will be removed to save any confusion.
Regards
Lloyd