|
well, yes there is - at least FireFox can handle it as a RSS feed.
|
|
|
|
|
No, there isn't. I get a response with the length zero:
Date: Fri, 13 Feb 2009 01:37:56 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11
X-Powered-By: PHP/5.2.0-8+etch11
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Via: 1.1 www.klack.de
Keep-Alive: timeout=15, max=500
Connection: Keep-Alive
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
I tried "RSS 2.0 Framework" but it gets into the same trouble. That's why
I tried to run something more simple - with the same result.
|
|
|
|
|
I was told that the most common method to convert a value is to use the Parse method, however it only works with strings, as you all know...
So I was wondering, then: if you're converting a non-string value to another non-string, is it better/more efficient to use for example...
Convert.ToInt32(value);
or
int.Parse(value.ToString());
Thanks guys!
|
|
|
|
|
Hi,
it depends on the Type of your value:
if value is a string, then value.ToString() is redundant, and both Convert and int.Parse would behave identically (in fact one is calling the other).
if value is some kind of integer to begin with, Convert.ToInt32() is much faster, since no conversion from integer to string, and no conversion from string to int are involved.
if value is something else (a DateTime, a user-defined type, ...) Convert will not accept it,
whereas the value.ToString() result may or may not look like an integer, and be acceptable to int.Parse
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:02 AM
|
|
|
|
|
Luc summed it up well, but I just wanted to add one other non-obvious difference.
With value = null;
Convert.ToInt32(value) returns 0
int.Parse(value.ToString()) throws NullReferenceException.
int.Parse(value) throws ArgumentNullException. (if value is String)
|
|
|
|
|
hi,
look at the int.TryParse(object,out bool) functionality.
The boolean value stands up for true (parseable) and false(not parseable) about trying to parse the value. There will be no exception raised. if you want to use int.Parse instead of TryParse you need to catch the exception with try catch..
bless
|
|
|
|
|
In my opinion the only worthwhile member of Convert is System.Convert.ChangeType , will that do what you want?
Otherwise, maybe a simple cast is what you want?
Or, if it's a type of your own creation, perhaps an implicit conversion operator?
You would have to give us more information.
|
|
|
|
|
Hijack
If you have 2 classes that are identical (set of credentials) can you use System.Convert.ChangeType to convert one to the other?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The most common method to convert a non-string value to an int is implicit or explicit casting. Example:
byte b = 42;
int answer = b;
double d = 42.0;
int answer = (int)d;
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have an ASP file and a Customer class both in the same namespace. When I compile I receive the error: The type or namespace name 'Customer' could not be found (are you missing a using directive or an assembly reference?). I have checked and the asp page
Inherits="PopupApplication.InitDialog"
And the Customer was created in that namespace and has that namespace in the class file. Can anyone help?
Thanks,
Steve
|
|
|
|
|
Make sure your class is decorated with "public".
Also, you may try to move it in App_Code folder.
Calin
|
|
|
|
|
is there is any free pivot chart Controller for visual studio
Dushan Perera
|
|
|
|
|
Hi Team,
Required functional is to access the Base class Method itself on other hierarchy class but need to restrict the base class method on derive class.
For Example,
Base Class B --------> Having Static Method M
Derive D from B
Need to restrict the access of Method M through D but should be accessible through B.
Can anybody help me out.
Thanks in Advance
Tarun Singh
|
|
|
|
|
maybe use the sealed keyword, im not sure thou
no, dont think so lol... try 'explicit' keyword instead
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
explicit is for overloading conversion operators.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
No, Not Fulfill the functionality.
|
|
|
|
|
Not sure you can.
The best I can think of is to mark D's M as internal new , that way it won't be visible outside that particular assembly but B's M will.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
One way I can see doing this is by adding a level of hierarchy,
Base Class B
Derived Class B_With_M
Derived Class D
All other classes whom you want to give access to M will derive from B_With_M and not from B.
|
|
|
|
|
Hello,
when reading a text file, the letters having accents, they appear square caps in a message box, how can we keep the same letters? thank you verry much.
|
|
|
|
|
its down to the encoding of the text, as far as i know you cant change that with the message box directly but maybe it can be set in the system
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
Hi,
Most probably the MessageBox is not at fault, the way you read your file is.
each text file uses some way to identify characters that are outside the regular ASCII character set
(which is less than 128 chars). You either use a "code page" telling what the byte values [128,255]
represent, or some more elaborate scheme such as UTF8 or Unicode, to get access to a much larger
character set where some or all characters use 2 bytes.
UTF8 and Unicode files start with a special byte sequence to identify them. When no byte sequence
is present, your best guess may be to use the code page that suits your locale; I typically use
new Encoding(1252) yielding a West-European code page.
So when reading a text file, you should apply the right "encoding" and pass that to your
input methods, e.g. File.ReadAllText Method (String, Encoding)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 8:00 AM
|
|
|
|
|
Hello,
i encode the word file using this code :
Convert.ToBase64String(data) ,
but when i decode the code 64digits, we mus add an extention like .doc, can we know the extention of code base 64 digits? thank you verry mutch.
|
|
|
|
|
if it is a data file i think you would need to check the file header information and determine the filetype from that then choose you extension, this however would mean you need to have a list of file associations for different filetypes. You best option might be to store the extension somewhere before conversion if that is posible?
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|