|
Language is C# by default.
|
|
|
|
|
Nope. Here is a test, same code block, three different PRE lang options:
without lang
abstract auto checked class const delegate enum explicit extern fixed friend
keywords in C# not in C++: checked fixed
keywords in C++ and not in C#: friend
with lang='C++'
abstract auto checked class const delegate enum explicit extern fixed friend
keywords in C# not in C++: checked fixed
keywords in C++ and not in C#: friend
with lang='cs'
abstract auto checked class const delegate enum explicit extern fixed friend
keywords in C# not in C++: checked fixed
keywords in C++ and not in C#: friend
Furthermore it is my opinion the default should be:
- the relevant language in PRE tags in language-oriented forums
- 'text' elsewhere (including all CODE tags)
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
modified on Thursday, October 15, 2009 8:21 PM
|
|
|
|
|
I am not sure. Here[^] is what Chris says.
|
|
|
|
|
1
2 public const double PI1 = 3.14159262;
3 public const double PI2 = 3.14159262;
4 aaa bbb ccc
5 ddd
6 eee fff
10 bold
11 italic
12 underline
13 string s1="stringLiteral1";
14 yellow
15 red
16
17 public const double PI1 = 3.14159262;
18 public const double PI2 = 3.14159262;
19 aaa bbb ccc
20 ddd
21 eee fff
25 bold
26 italic
27 underline
28 string s1="stringLiteral1";
29 yellow
30 red
31
32 public const double PI1 = 3.14159262;
33 public const double PI2 = 3.14159262;
34 aaa bbb ccc
35 ddd
36 eee fff
40 bold
41 italic
42 underline
43 string s1="stringLiteral1";
44 yellow
45 red
13-DEC-2009: All works well on forum message, except for linecount.
|
|
|
|
|
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Het viaductengedrocht, de naam brug totaal onwaardig;
de aansluiting in Deurne/Merksem, 18 baanvakken waanzin;
het lawaai en de stank;
de schabouwelijke communicatie;
de ongehoorde verspilling;
het ongefundeerde financiele plaatje;
en na 10 jaar zero resultaat.
Nee dank u. Van die boer geen eieren. Nu niet, nooit niet.
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
modified on Wednesday, September 30, 2009 5:35 PM
|
|
|
|
|
|
Hi,
when you set out to learn a new technology (language, framework, protocol, whatever), I normally recommend reading a book about it. That is a physical book, not an article, not an e-book.
So my advice consists of a sequence of actions:
1. go to a decent book store, so you can see and compare a number of relevant books;
2. browse through the available books, trying to figure out which ones you like and which ones you don't like; that will be a matter of personal taste, and strongly depends on your prior knowledge, your earlier experience with similar technologies, your need for elaborated examples, your want for exercises, etc. That is why I typically do not recommend specific books: what looks great to me, may be too simple, too complex, or just not right for you; and vice versa.
3. I recommend buying at least one introductory book or tutorial; that is something explaining the philosophy and providing the essential knowledge without diving right away into all the gory details.
4. And I suggest to also consider buying a reference book, something that explains all the gory details, so you can look up anything you need as far as syntax and semantics go. For a reference book it is essential to include a decent index; just read one page, and any new terms you encounter must be present in the index. If they don't, don't consider buying the reference book. You may argue a reference book isn't essential as all the information probably is available on the web anyway; that is probably correct, however you will become more familiar with a book you own, than you would with different answers from different people you would get when searching the web regularly. Anyway, IMO there is no alternative for buying a tutorial book.
5. It isn't enough to own a good book. The hardest and most rewarding part is studying its content. So set out to read it from front cover to back cover; on a first read you may decide to skip some chapters, if and only if they are specializing in a topic you don't need right away (say database access when you plan on creating a game).
6. Start using the new technology, experiment as much as you want. Make sure to browse the reference manual and/or the documentation (MSDN or other) anytime you feel a need to. And read around the specific topic of interest, the page before and after the current one probably are relevant too.
7. After some period, say one year, study the tutorial again; read again everything you have read before, and skip fewer or none of the chapters you did skip earlier. You'll be surprised by how much you did not discover (or plainly forgot) in the first pass.
The advantage of a book is it attempts to teach you a lot, in a logical order and using a consistent language, explaining and illustrating the rationale and the strong points; as such you will gather much more information than you could by just experimenting at random, and/or asking questions on some forum. Working your way through a book really is the most efficient way to systematically acquire new knowledge in a short period of time.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
modified on Tuesday, July 14, 2009 11:03 PM
|
|
|
|
|
|
My more general statement is: "you can't catch all in one go", and it applies to discovering bugs as well: a thorough code analysis or product test may uncover 90% of all existing problems, it will not uncover 100% of them; that is why one should try and keep the initial number of problems low, as some fraction of them will slip through whatever the numbers are".
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Probably better piece of advice I've received this year at least.
cheers.
|
|
|
|
|
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hint:
If it looks like a progress bar, let it be a real one, not a "let us hope the other thread is still working on this, however I am not really sure any progress is being made, all I know is the clock is ticking"-bar.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Avoiding unwanted divs (as in "articles needing approval") with the help of this FireFox add-in
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Tired of seeing and clicking lots of worthless "articles-needing-approval" on the CP home page (some multiple times, they don't disappear fast enough), I switched to an alternate non-gold account.
In the midst of a discussion in the Lounge Computafreak[^] (many thanks!) told me about AdBlock and Element Hider add-ins for FireFox.
So after six days of half-anonymity I'm back in business.
|
|
|
|
|
: baaaa! : ==>
: badger : ==>
: beer : ==>
: bob : ==>
: confused : ==>
: cool : ==>
: doh : ==>
: eek : ==>
: java : ==>
: jig : ==>
: laugh : ==>
: love : ==>
: mad : ==>
: omg : ==>
: rolleyes : ==>
: rose : ==>
: sigh : ==>
: suss : ==>
: thumbsup : ==>
: thumbsdown : ==>
: vegemite : ==>
: wtf : ==>
: zzz : ==>
And here is a valid C# snippet with seven different emoticons on a single line:
bool b1=true, b2=true, b3=true;
int D=1, P=2, O=3, X=4;
for (int i=b1? 1 :( b2? 0 :((b3?0 :-D<2? 1 :-O))) ;P != 3 ;) { X = X| 1; }
for (int i=b1? 1 b2? 0 b3?0 <2? 1 ))) != 3 { X = 1; }
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 Wednesday, March 18, 2009 8:58 PM
modified on Thursday, December 2, 2010 1:23 PM
|
|
|
|
|
THANKS for the sharing
Believe Yourself™  ™
|
|
|
|
|
|
[ADDED] This article has some potential, which I like; however: [/ADDED]
This needs some more work. Here is what I didn't like much:
1. formatting
- why is there an empty line after every line of code?
- where is the indentation? nested ifs and loops need to be indented to be readable.
2. some coding comments
- I don't like magic numbers, such as in chr(34) and 2147483648
you could either add a comment or better yet use self-commenting code as in """" and 2*1024*1024*1024
The resulting IL code will be the same or better
- it is very bad practice to catch an exception and then ignore it; if you really must, you need to
explain that in comment. In this case, I believe you should warn the user something went wrong.
- the way you construct a folder name based on multiple Now evaluations is bad practice; have a look
at Now.ToString("yyyy.MM.dd.HH.mm.ss")
- RemovableDrives should not be an array; use a List instead, you won't need the count
variable, and a simple For Each... would enumerate them more easily.
3. some functional comments
- why don't you copy USB stick larger than 2GB? you should explain that in the code and in
the article
- why don't you include the year in the folder name you build?
When you fix most of these and add some more meat to the article, I'll raise my vote from 2 to probably 4.
Cheers.
|
|
|
|
|
I quit. No more forums for me.
[edit] seems there still are ways to avoid the "good answer/bad answer" trap,
so we give it a last try... [/edit]
modified on Monday, December 29, 2008 9:17 PM
|
|
|
|
|
Hi Luc!
I just stopped by to say you a Hi.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi Rajesh, my best wishes to you.
Luc
|
|
|
|
|
This is a sad day.
As I enter my 5000th message, I will loose my "personality" status, and become a "fixture", which
seems to be a part of the furniture. Not sure I like it, but then the company is OK, the furniture
isn't too bad...
|
|
|
|
|
|