Click here to Skip to main content
Page 1 of 15
Page Size: 10 · 25 · 50


Author filtered by: Andreas Gieriet [x]
Answer 12 May 2013   license: CPOL
As I read this[^] article, I guess it is possible: Quote:The computation of the MIC in Michael uses only substitutions, rotations, and exclusive OR operations. There are no multiplies.CheersAndi
C#
Answer 10 May 2013   license: CPOL
You must first understand why you want to place an assembly to the GAC at all: the GAC holds strong named signed assemblies of various versions. Each .NET executable looks up *at runtime* the directly or indirectly referenced assemblies in a well defined sequence, at one point also in the GAC....
Answer 10 May 2013   license: CPOL
You may have a look at: social.msdn.microsoft.com: 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine[^].CheersAndi
Answer 3 May 2013   license: CPOL
Have you ever considered asking Google[^]? The first few links are full hits!E.g. - http://stackoverflow.com/questions/992757/convert-mfc-cstring-to-integer[^]- http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/86e6cc5c-67a0-4337-9707-18180b6a8e82/[^]- ...CheersAndi
C#
Answer 2 May 2013   license: CPOL
You might be interested in C# Regex: Supported Unicode General Categories[^].There is a character class for upper case: \p{Lu] that matches any Unicode upper case (not only ASCII). The opposite of \p{Lu} is \P{Lu} (see upper case P), which means in the regex: all but the given class, i.e. all...
Answer 28 Apr 2013   license: CPOL
Each Linq expression must have a select.from ... in ... select ...;Your example data is incomplete or maybe wrong. You talk about List but this is nowhere visible in your code.Your LstAll seems to be a list (you call Add(...) in the loop), but initialization is by a single element...
Answer 27 Apr 2013   license: CPOL
A C-like approach was:...const int size = 20;char buffer[size];int n = snprintf(buffer, size, "%d", c); // use the safe function: snprintf, do not use sprintfassert(n >= 0); // format error is indicated by a negative valueassert(n
C++
Re: My vote of 5 by Andreas Gieriet
Forum Message 23 Apr 2013  
Thanks for your 5! Cheers Andi
Forum Message 22 Apr 2013  
Hello TimothyP, Thanks for your comment. Agreed. But keep in mind, C# (or managed .Net languages in general) are probably not the best choice if speed *really* matters. E.g. I would rather go for so
not an article not a tip by Andreas Gieriet
Forum Message 20 Apr 2013  
Posting code alone is not worth an article nor a tip. Please ad a description on what you want us to tell about the topic. Cheers Andi
Answer 17 Apr 2013   license: CPOL
A possible approach1) write down what you want to achieve (vision)2) write down how you want to use it (use cases)3) write what your system is required to do (top level requirements)4) partition the system into functional parts that interact (architecture)5) define the deployment (what...
Answer 17 Apr 2013   license: CPOL
Some formulas in the referenced web site are not correct. Especially the result formula for a1 is wrong.You must understand that you have the freedom to chose the t1 for your P1: by varying t1 for your chosen P1, the shape of the curve will vary too.Assuming you have three defined...
C#
Answer 16 Apr 2013   license: CPOL
Beside other issues as mentioned in other solutions (e.g. use string.IsNullOrEmpty(str) or if you insist on using your code, first check for null and only then for a defined value, etc.), I think you are confusing with the basic logic: the De Morgan's Law (e.g. see...
C#
Forum Message 16 Apr 2013  
I think your explanation of the principle is too shallow and the examples have nor relation to the Liskow Principle - or am I missing something? Some text seems to be a 1:1 copy of
Forum Message 16 Apr 2013  
C# provides with "yield" nice means to write your own iterator. E.g. the above mentioned Employees container class reduces to public class Employees : IEnumerable {
Forum Message 16 Apr 2013  
Your assertion that Quote:We can only use foreach loop on IEnumerable variable. is not correct. The only reqirement is, that there is a
Re: overcoming "from, count" by Andreas Gieriet
Forum Message 15 Apr 2013  
Regarding floating numbers comparison (needed for floating FromTo(...)), you might be interested in my article about
Re: overcoming "from, count" by Andreas Gieriet
Forum Message 15 Apr 2013  
Thanks for your 5! BTW: I consider the "from-count" approach more flexible and clearer compared to the "from-to". With "from-count", you can unambiguosly express also a "null" loop, while in the "f
Re: Not an article by Andreas Gieriet
Forum Message 15 Apr 2013  
Agreed. My criticism is blunly stated. It all summed up to the point where you gave your "idiot" statement - this was finally too much to let go through uncommented. My appologies for having placed a
Forum Message 15 Apr 2013  
A good point! My 5! I never did it that way, but worth to consider next time! Thanks for the hint. Cheers Andi
Tip/Trick 14 Apr 2013   license: CPOL
Make loops behave deterministic-by-construction
How to decrypt hex to decimal? by Andreas Gieriet
Answer 14 Apr 2013   license: CPOL
Use C# BitConverter[^] class.E.g. static void Main(string[] args){ { byte[] b = { 0x00, 0x00, 0x00, 0xE0, 0x97, 0xA5, 0x61, 0x40, }; double d = BitConverter.ToDouble(b, 0); Console.WriteLine("from file: {0,-20} = {1}", d, b.Aggregate("", (s, x) => s += " 0x" +...
Re: Nice article by Andreas Gieriet
Forum Message 14 Apr 2013  
Hello jfriedman, you are welcome. I consider working on disposed object a severly broken state. You can not trust the integrity of the application. Strange things happen and you don't know why.
Forum Message 14 Apr 2013  
It seems that you have posted the very same article elsewhere. Please note in the intro that this is the case - otherwise one may easily tag this article as plagiarized. Additionally, there is too l
Re: Nice article by Andreas Gieriet
Forum Message 14 Apr 2013  
Your 50 lines of class EnumerableSegment<T> implements what is basically given by the LINQ one-liner myEnumerable.Skip(start).Take(count); or am
Forum Message 14 Apr 2013  
Aggree with you (my 5). The article claims in the title "[...]Me.Understand Yield and IEnumerable[...]" but in fact, it is rather inprecise (content, C# code samples do confuse methods with propertie
Forum Message 14 Apr 2013  
Regarding "idiot": you may assume they knew what they did (do you know HRT[
Forum Message 12 Apr 2013  
You are missing the point. The only reference to *style* is your "idiot" sentence which is not appropriate - this kind of sentence may qualify for report and deletion of articles. The point is tha
Forum Message 11 Apr 2013  
It seems to me that you still confuse things. Quote from your introduction: "[...]that yield and IEnumerator do the same job[...]". This is nonsense, sorry. - I
Re: not enough for an article by Andreas Gieriet
Forum Message 10 Apr 2013  
I'm neither talking about Inversion-Of-Control (IoC). Your text has the title "Dependency Injection" (DI). This suggests some explanation on DI. You may improve the title and give some explanation o
not enough for an article by Andreas Gieriet
Forum Message 10 Apr 2013  
The title promises more than the text holds. You do not explain Dependency Injection nor do you have any reference to further text. Compare your article to the ones on the right side of your submi
Answer 8 Apr 2013   license: CPOL
It's easy to define the valid lines, but slightly more difficult to define the invalid lines.So, you define the (in pseudo code) line = valid or invalid.Even it sounds trivial, this covers all the lines.Loop over all lines and process the matches where the invalid part is...
Default Parameter in C# by Andreas Gieriet
Answer 7 Apr 2013   license: CPOL
Default parameters are not part of C# 3.0, they came into existence with C# 4.0 only.So, I assume your tag for C# 3.0 should be C# 4.0.You may call the function bya) passing all actual arguments explicitlyb) pass the actual arguments by means of named parametersE.g. for...
Answer 7 Apr 2013   license: CPOL
First of all, don't use gets(), use getline() instead. See http://www.crasseux.com/books/ctutorial/gets.html[^].See an example of getline() at http://www.crasseux.com/books/ctutorial/getline.html#getline[^].CheersAndi
C
Plagiarized by Andreas Gieriet
Forum Message 29 Mar 2013  
Shamelessly copied several passages without reference to
Plagiarized by Andreas Gieriet
Forum Message 29 Mar 2013  
Several text is more or less 1:1 copy from the following:
My vote of 1 by Andreas Gieriet
Forum Message 28 Mar 2013  
This is "make money fast and easy" kind of add. I regard this as an unsolicited post. Andi
Re: My vote of 5 by Andreas Gieriet
Forum Message 28 Mar 2013  
That's the sad part of anonymity - the respective guy does not have to stand for his actions... :-( Opinions may differ - if that person had the guts to tell *why*, one could discuss, but like this:
Answer 28 Mar 2013   license: CPOL
Use the proper function instead of re-inventing the wheel: see File.ReadAllLines(...)[^].AndiPS: In your example, you don't read the next line inside the loop.
C#
Answer 26 Mar 2013   license: CPOL
Change your code as follows:1) Give the Mutex the name @"Global\MyMutex".2) Call Dispose() on w after (or instead of) Close().Do the same for your other process.[EDIT]I would simplify the code as follows:public class Log{ public static Mutex m_Mutex = new Mutex( false,...
Answer 26 Mar 2013   license: CPOL
In the first case, the Truck constructor with no parameter (the default constructor) is implicitly called for the member truck.In the pointer case, the pointer remains uninitialized. Reason: any pointer is a basic type (like an int, char, etc.), and thus, is not initialized unless explicitly...
C++
Answer 26 Mar 2013   license: CPOL
To your second question: FxCop has rules to detect missing Dispose() calls.Depending on your installed Visual Studio flawour, you might have FxCop rules directly available or you might need to run FxCop as a separate build step (e.g. as post build event).Missing Close() calls go undetected,...
C#
My vote of 3 by Andreas Gieriet
Forum Message 26 Mar 2013  
Title does not match the content (as mentioned elsewhere too). Examples are poorly chosen (as mentioned elsewhere too). Purpose of the article is not clear (as mentioned elsewhere too) - why yet anoth
Not an article by Andreas Gieriet
Forum Message 26 Mar 2013  
This is not an article. Please add more content and background information or change to a tip. Andi
Forum Message 26 Mar 2013  
See Submission Guidelines[^] E.g. [...] If th
Regular Expression Problem.... by Andreas Gieriet
Answer 20 Mar 2013   license: CPOL
Try first to describe the text pattern in words:1) optinal leading sign2) followed by a series of digits (at least one)3) there may be leading and trainling spaces, but no space between the sign and the digits and not between the digitsIn Pseudo...
Only works for reference types! by Andreas Gieriet
Forum Message 20 Mar 2013  
Caution: this only works for reference types (i.e. for class instances). Structs will fail, since the assignment to p creates a copy of the original value. C#does not know the concept o
Answer 17 Mar 2013   license: CPOL
If you want a "cheat sheet", use the -S option on GCC, e.g. gcc -S binary.c. This results in a binary.s file. Learn to read the content of that binary.s file and you will get into assembly language.Once you understand reading this and isolate the function you need to write yourself, you are...

Page 1 of 15
1 2 3 4 5 6 7 8 9 10


Advertise | Privacy | Mobile
Web04 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid