|
add some id in packet header and define the id according to the size of the packet like '0' for small packet '1' for large packet.First parse the header and then according to the id allocate time.
|
|
|
|
|
I'm not very good with regular expressions. Google isnt' turning up much, but I think it's because I am not asking correctly.
I have a data annotation with multiple things I'm looking for in the regular expression validation. I have two words that can be typed, or it can start with one letter, but it cannot end in a letter unless it's on of the two words.
I've been tinkering with just starting with 2 letters, or ending with 1 letter. I found that one alright:
@"^[a-zA-Z0-9]{1}[0-9]+\d"
but I need the opposite of that. If I were to use that for validation I need something that does not match that pattern. I thought ^() would reverse it, but it didn't.
Urgentz codez?
If it moves, compile it
|
|
|
|
|
Maybe try a (?! subexpression ) Zero-width negative lookahead assertion.
|
|
|
|
|
thanks for the help.
If it moves, compile it
|
|
|
|
|
@"(^([0-9]|[A-Za-z][0-9])[A-Za-z0-9]+\d$)|(SpecialWord)|(OtherSpecialWord)"
I always do that. I post a question and then realize I was being a tard. This is the/a solution for the data annotation.
If it moves, compile it
|
|
|
|
|
Hi,
Does anyone know the exact location of the C#.net ascii table or where exactly it is generated. Can someone please assist me a path or file name.
Thank You.
|
|
|
|
|
for(byte i=0;i<255;i++){
Console.WriteLine(((char)i));
}
|
|
|
|
|
Thanks, but I don't need the code. I need the location of where to find it. Sorry about the misunderstanding.
|
|
|
|
|
What are you talking about? A file that contains a list of ASCII values!?
/ravi
|
|
|
|
|
I really don't know how to make this any clearer. I am looking for the specific "location" of where the process of generating ascii values are done with the .net environment.
|
|
|
|
|
They're not generated. The .NET framework (and other frameworks such as the JDK) use Unicode encodings to map characters in different scripts to byte values. Unicode and ASCII reference tables are of course available online.
Hope this helps.
/ravi
|
|
|
|
|
Ok understood. But "where exactly" (location) are these mapping done in the environment. All I am asking for is a path or file name.
|
|
|
|
|
They are done in read-only sections of code and aren't configurable (i.e. read from a file or the registry). It's the same with timezone definitions, calendar types and locales.
/ravi
|
|
|
|
|
There's no "editor", there's no "file" where the mappings are loaded from.
|
|
|
|
|
I would suppose
System.Text.ASCIIEncoding
In mscorlib (in mscorlib.dll)
|
|
|
|
|
Jschell,
Thank you very much for the help. I am very curious how you went about finding this file. Can you please explain your methodology?
Thanks again.
|
|
|
|
|
computerpublic wrote: Can you please explain your methodology?
I already knew about encoders and the ASCII one.
And if you look up the encoder in the MS docs it tells you which dll contains the classes. It says that right at the top and looks like the following
Assembly: mscorlib (in mscorlib.dll)
|
|
|
|
|
Thank you. I really appreciate your help in this matter.
|
|
|
|
|
That's like asking, "where are the integers stored?", as if there's some table that contains the complete set of integers. There is no such thing. It's a meaningless question.
My best guess would be that you want to know where to find typeface (font) files that allow the system to generate a particular glyph on the screen for a given ASCII code (or Unicode codepoint).
Some code pages are built into the system, but you may also want to look at dir %SystemRoot%\fonts .
|
|
|
|
|
PIEBALDconsult wrote: That's like asking, "where are the integers stored?", as if there's some table that contains the complete set of integers. There is no such thing. It's a meaningless question.
The analogy is not apt.
Although ASCII is a rather trivial character set one can suppose that one might handle it like more complex character sets. Certainly since the memory considerations for the entire code page are trivial it certainly would be better unless one found that performance was better without it.
|
|
|
|
|
My point is that ASCII is really just a set of integers and not very useful without context.
|
|
|
|
|
I've a little project to organize my Library but I'm struggling to create a folder with a bunch of playlists within it. I've stripped it right down to the bare bones for here. I know that I can do this:
iTunesApp myTunes = new iTunesApp();
iTunesLib.IITPlaylist test1 = myTunes.CreateFolderInSource("test1", myTunes.LibrarySource); or this
iTunesLib.IITPlaylist test2= myTunes.CreateFolder("test2");
and I can see that I have two options to add a playlist:
iTunesLib.IITPlaylist tempPlaylist = default(iTunesLib.IITPlaylist);
tempPlaylist = myTunes.CreatePlaylist("testP1"); or
tempPlaylist = myTunes.CreatePlaylistInSource("testP2",myTunes.LibrarySource);
but all I end up with is a an empty folder and a playlist sat in the main Library (ie in the section headed 'PLAYLISTS'). Has anyone got any suggestions please? It's not really C# specific but as I'm writing it in C#, and as it's one of the larger discussion areas, I thought I'd post it here
|
|
|
|
|
there are a grid view and sqldata sourceid in my code defined previously.
can i use it for any sql query? or i have to create some another???
|
|
|
|
|
it all depends on your needs ....
for example:
If you have a query like this in your SqldDataSource to display the data to the Gridview :
select * from TableMasterCity then you can use it to Bind dropdownlist or other control.
it all depends on the manufacture of the SQL query that you created and the need for its control.
|
|
|
|
|
i need to call like
select * from temp c1,c2,c3 where c1='17/nov/2011'
is there any restriction to use specific data type??means when we create a grid view or sql data id we have to define data type of columns or not?
|
|
|
|