|
need comments for these comments
|
|
|
|
|
I would prefer to learn chinese rather than trying to understand this mess.
|
|
|
|
|
So we're all waiting for your brand new article written in Chinese
|
|
|
|
|
This guy should work for the government--he seems to be an expert on ciphers and cryptography!
|
|
|
|
|
There is a App key for that -> "Delete"
I tried to modify an equal code some weeks ago. As I got behind it, I figured out it didn't make much sense at all.
regards
Torsten
I never finish anyth...
|
|
|
|
|
I used to work with people who liked to write code like that. Why add comments, they just slow down the rate at which such fine code can be written.
That is one of the reasons I left that job.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
This is taken directly from a book on LINQ, and illustrates how you could use a IEnumerable<int> to generate a never ending sequence:
public static IEnumerable<int> GetList()
{
int i = 2;
while (true)
{
i = i * 2;
if ((i <= 0) || (i > int.MaxValue))
{
i = 2;
Console.WriteLine("Enter to continue, CTRL-C to break.");
Console.ReadLine();
}
else
{
yield return i;
}
}
}
For your homework, please list all the values for which "i > int.MaxValue "
Now, aren't we all glad he checked for less than zero as well?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
A classic. Works really well with unsigned int , no negatives to the rescue.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Had it been some C code before? And the guy to port it did not understand what he was doing?
|
|
|
|
|
I think just the end of youur question/statement is all that is needed.
Bernhard Hiller wrote: did not understand what he was doing?
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Unfortunately not: the whole book is LINQ, which is not available in C (nor are IEnumerable interfaces).
And I think they should know what they are doing: the two authors are "Community Program Manager for the Microsoft C# Team" and "Senior Program Manager in the Microsoft .NET Developer Platform Team" according to "about the Author".
Now I think about it, it explains a lot about MS software, really...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
You had me at the word "Manager".
Explains it all.
I am half a manager now, and my code has been deteriorating at an alarming rate.
|
|
|
|
|
Classic pick. The guys at Microsoft must get back to clear basics.
|
|
|
|
|
What book?
--
Kein Mitleid Für Die Mehrheit
|
|
|
|
|
The books not by Dietel & Dietel by any chance?
They seem to have written exactly one book (in c++ I suspect) then re-written if for a variety of OO languages. The VB.net book has GetValue() SetValue() methods over properties. We're currently using this as the course text
|
|
|
|
|
Now I understand why we find some of the questions we can see in the forums...
|
|
|
|
|
I hadn't thought of that!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
my student write this code, and asking me why it is not working.
String connectionString="Data Source=asd;Persist Security Info=True;User ID=system;Password=******;Unicode=True"
SqlConnection sql = new SqlConnection(connectionString);
sql.open();
it takes me a gr8 time to explain why he cant give password value ****** in a cs codefile. he just got the connectionString from database properties and think ****** is password
|
|
|
|
|
I thought you were hiding the password, then I read your explanation...
|
|
|
|
|
Bleh. Can I nominate how the whole database connection crap works in .Net as horror? I really don't like it...
|
|
|
|
|
yeah, i know,but it was a database lab, they can choose there framework as they wish.
i don't know why people like .net + oracle ,
|
|
|
|
|
errmm....net? wats wrong with it exaclty...I mean I know that connecting to databases other than Microsoft Sequel Server is horrible but tbh I mostly use Microsoft Sequel Server and the Linq To Sql Class seems to make life incredibly easy..or has nobody noticed that new class yet? :P
|
|
|
|
|
Connecting to databases other than MSSQL is not "horrible" - generally it is identical, but with different class names: MySqlConnection, or SqlCeConnection instead of SqlConnection and so forth.
While it works well, the concept of SqlConnection and SqlCommand is visually difficult, needs to be encased in using blocks, and is prone to SQL Injection attacks if you don't do it properly.
I agree that Linq to SQL does make this process easier, but it is another thing for people to learn - and not everybody does (I am only just started on learning the details of Linq myself, and I have been using .NET for a while now).
I think what the complaint was about, was the use of Oracle as the DB when there are "better" alternatives rather than the use of SQL and .NET
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
and also setup oracle server in windows is hell of a job.
|
|
|
|
|
By not working I assume you mean not compiling? due to the missing semi-colon
Besides, I would be more concerned about the hard-coded connection string and lack of error handling
Illogical thoughts make me ill
|
|
|
|