Your debugger is showing to you that arr[0] contains char '0' which is the same as short 48.
short number = 48;
char letter = '0';
Console.WriteLine(number == letter); // --> prints True
Hope, this makes is clear.
Your debugger is showing to you that arr[0] contains char '0' which is the same as short 48.
short number = 48;
char letter = '0';
Console.WriteLine(number == letter); // --> prints True
Hope, this makes is clear.
Hi Luc, Im sure you know that :), but the first line doesnt compile. Its an invalid string literal. One have to use
strind path = @"d:\songs\audio\asd.mp3";
or
string path = "d:\\songs\\audio\\asd.mp3";
Greets Matthias
I guess you meant: -you could use a collection that sorts itself everytime you add/remove an item; :)
Company A owns 25% of company B and 90% of itself = 0.25 * 1M + 0.90 * 2M = 2.05 M Company B owns 10% of company A and 75% of itself = 0.10 * 2M + 0.75 * 1M = 0.95 M Which is in sum 3 M. Everything else would be financial math :laugh: Greets Matthias
You should have a look at this step by step article for developing a multiline comment regex: http://ostermiller.org/findcomment.html[^]
Not tested:
public List<string> SplitLine(string line)
{
List<string> items = new List<string>();
MatchCollection matchCollection = Regex.Matches(line, "\"[^\"]*\"|[^\"]*");
foreach (Match match in matchCollection)
{
string group = match.Value.Trim();
if (group != string.Empty)
{
if (group[0] == '"')
{
items.Add(group.Trim(new char[] {'"'}));
}
else
{
//items.AddRange(group.Split(new char[] {'"'}, StringSplitOptions.RemoveEmptyEntries)); sorry, should be
items.AddRange(group.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries));
}
}
}
return items;
}
Hope this helps.
modified on Thursday, June 26, 2008 7:48 AM
Looking forward and all the best for you Matthias
Pallab_GT wrote:
Can you refer me some other text editor
See this thread[^] [edit] link corrected [/edit]
Pallab_GT wrote:
Can you refer me some other text encoding
ASCII
Pallab_GT wrote:
I have used UTF-8 encoding
In UTF8 you could have coded space (0x20) into hard space (0xA0), would give you 1 bit for hidden data per space in carrier file (assuming the original file don't have hard spaces). There are many more possibilities. Thats all nice, but not really new. Matthias
Pallab_GT wrote:
You wont notice any change whatsoever in the file content using any text editor.
That's the whole point. I don't believe that. How many different text-editors have you tried? Whats the text-encoding of your files? Matthias
Ok, so you change the text file at bit-level, of cource you can use this to "hide data". But consinder, text files are interpreted by editors (programs). Any editor may / may not react to your changes, and EVERY hex-editor / binary compare tool will notice the differences. So the changes are not hidden, and the whole secret is based on your algorithm (of coding your data into bit-changes). Therefore it's not a secret at all. Matthias
Ok, to make a long story short: I think, it's impossible. I think, all necessary was said by parmfleet. I think, it's a miracle (I don't believe in algorithm miracles). In this sense, yes it's new. Matthias
... and any more tricks, but this will hide the data only on his own box ... [edit](and only for him)[/edit] :-D Matthias
Luc Pattyn wrote:
ASCII is a 7-bit code
Hmm, I know, but I don't know any Text-Editor that would not reflect the MSB-Bit set to 1. :zzz: Matthias
If you have done it with techniques like Alternate Data Stream[^] , then it's not really data hiding. Please describe your idea. Matthias
Read this article: http://www.codeproject.com/KB/recipes/csnsort.aspx[^]
oops, absolutly right Regards
Put $ at the end: "([^0-9]{0,}[0-9][^0-9]{0,}){10}$" Regards
You could try this function, should work:
using System.Text.RegularExpressions;
public string EntryName(string line)
{
Regex regex = new Regex(@"[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+(?<ENTRY>.*)");
Match match = regex.Match(line);
return match.Groups["ENTRY"].Value.Trim();
}
Regards
To make it more clear, this is a sample listing:
drwxr-x--- 2 ftp ftp 8192 Nov 19 12:14 .
drwxr-xr-x 11 ftp ftp 8192 Nov 19 12:35 ..
-rw-r----- 1 someone someone 8639750144 Nov 19 12:14 this_is_a_long_file_name.dat
-rw-r----- 1 ftp ftp 6260006912 Nov 19 13:13 shortname.dat
The filename (or directory name) is the 9. group (delimited by whitespace) until line end. Regards