Have you patented this comparison technique? :P
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On
Behalf Of Greg Harris
Sent: Thursday, 20 May 2010 1:22 PM
To: ozDotNet
Subject: Re: How To do something every so often
Hi Everyone,
I think that this shows that we all
silky wrote:
I still think Bill's answer was superior, as it also accounts for multiple
threads/etc (although, not required in this case). Second to that would be
a (if blah rah; print thing; blah = 0) ...as your tests indicated.
You are crazy.
Reality can seem that way to some.
In summary;
if (silky.IsRight DateTime.Now.DayOfWeek != DayOfWeek.Friday) {
var Bill = 1 / 0;
} else {
programmersWithTooMuchTime++;
ozDotNetList++;
GregHarrisExceptionalTestMethod();
}
I'm sure this could be refactored into the number 42. Also probably needs to
be in some kind of
Thursdays. The new Fridays.
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On
Behalf Of Stephen Price
Sent: Thursday, 20 May 2010 2:57 PM
To: ozDotNet
Subject: Re: How To do something every so often
In summary;
if (silky.IsRight DateTime.Now.DayOfWeek
On Thu, May 20, 2010 at 4:57 PM, Stephen Price step...@littlevoices.com wrote:
In summary;
if (silky.IsRight DateTime.Now.DayOfWeek != DayOfWeek.Friday) {
You have a strange naming-convention for constants :P
var Bill = 1 / 0;
} else {
programmersWithTooMuchTime++;
ozDotNetList++;
On 20 May 2010 15:54, silky michaelsli...@gmail.com wrote:
On Thu, May 20, 2010 at 3:54 PM, David Burela david.bur...@gmail.com wrote:
But would one of them be easier to implement with the .Net 4.0 parallel
extensions?
I see what's happened here. I've somehow subscribed to the ironic
humour
You are crazy.
Please stop feeding the tactless socially retarded troll.
Greg
Hi Everyone,
I think that this shows that we all have too much time on our hands!
Our modern machines are so fast that this is an irrelevant question for all
but the most compute intensive applications.
The standard well known design pattern is to use the modulus (%) function.
if ( (i %
On Thu, May 20, 2010 at 3:47 PM, Les Hughes l...@datarev.com.au wrote:
Greg Harris wrote:
Hi Everyone,
I think that this shows that we all have too much time on our hands!
You especially... but we appreciate it :)
As about 80% of development cost is in maintenance, then keep it
To: ozDotNet
Subject: Re: How To do something every so often
Greg Harris wrote:
Hi Everyone,
I think that this shows that we all have too much time on our hands!
You especially... but we appreciate it :)
As about 80% of development cost is in maintenance, then keep it
simple
.
-Original Message-
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On
Behalf Of DotNet Dude
Sent: Tuesday, 18 May 2010 2:12 PM
To: ozDotNet
Subject: Re: How To do something every so often
Dylan never said it was multithreaded... that would have been a critical
Inline
|-Original Message-
|From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-
|boun...@ozdotnet.com] On Behalf Of silky
|Sent: Monday, 17 May 2010 5:44 PM
|To: ozDotNet
|Subject: Re: How To do something every so often
|
|On Mon, May 17, 2010 at 3:17 PM, Bill McCarthy b
On Mon, May 17, 2010 at 6:10 PM, Bill McCarthy b...@totalenviro.com wrote:
Inline
[...]
| By resetting you also don't need to worry about integer overflows etc.
|
|This is of arguable value
*IN FACT* no it is not of arguable value; you may choose to argue it (no
surprises there),
Wouldn't this be enough?
counter+=1;
...
if (counter == 1) {
...
counter = 0;
}
On Mon, May 17, 2010 at 1:30 PM, Dylan Tusler
dylan.tus...@sunshinecoast.qld.gov.au wrote:
I was just writing a very simple little console app to move data from one
file to another (under certain
That's what I love about this group...
-Original Message-
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On
Behalf Of DotNet Dude
Sent: Tuesday, 18 May 2010 1:21 PM
To: ozDotNet
Subject: Re: How To do something every so often
Wouldn't this be enough
[mailto:ozdotnet-
|boun...@ozdotnet.com] On Behalf Of DotNet Dude
|Sent: Tuesday, 18 May 2010 1:21 PM
|To: ozDotNet
|Subject: Re: How To do something every so often
|
|Wouldn't this be enough?
|
|counter+=1;
|...
|if (counter == 1) {
| ...
| counter = 0;
|}
|
|
|On Mon, May 17, 2010 at 1:30 PM, Dylan Tusler
...@ozdotnet.com] On Behalf Of DotNet Dude
|Sent: Tuesday, 18 May 2010 1:21 PM
|To: ozDotNet
|Subject: Re: How To do something every so often
|
|Wouldn't this be enough?
|
|counter+=1;
|...
|if (counter == 1) {
| ...
| counter = 0;
|}
|
|
|On Mon, May 17, 2010 at 1:30 PM, Dylan Tusler
On Tue, May 18, 2010 at 2:04 PM, Bill McCarthy b...@totalenviro.com wrote:
Possibly, but if you make the code multithreaded you'd have to use an
interlocked increment. Use of a = or a higher order bit bit-mask means you
don't have to lock as such (if you aren't worried about the exact count)
Is = slower than by itself?
Dylan.
-Original Message-
From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On
Behalf Of DotNet Dude
Sent: Tuesday, 18 May 2010 2:12 PM
To: ozDotNet
Subject: Re: How To do something every so often
Dylan never said
, 18 May 2010 2:12 PM
|To: ozDotNet
|Subject: Re: How To do something every so often
|
|Dylan never said it was multithreaded... that would have been a
|critical piece of info and I'm sure he wouldn't leave it out. He said
|very simple little console app which rules out multithreading. :p
|
|This is a very strange comment.
|
|--
|silky
|
Uh huh
Hi Meski,
|-Original Message-
|From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-
|boun...@ozdotnet.com] On Behalf Of mike smith
|Sent: Tuesday, 18 May 2010 12:51 PM
|To: ozDotNet
|Subject: Re: How To do something every so often
|
|On 17 May 2010 18:10, Bill McCarthy b
.
|-Original Message-
|From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-
|boun...@ozdotnet.com] On Behalf Of Dylan Tusler
|Sent: Monday, 17 May 2010 3:05 PM
|To: 'ozDotNet'
|Subject: RE: How To do something every so often
|
|Doh!
|
|Yes, in a previous life I would have used (excuse my VB
Bill McCarthy wrote:
I'd guess that in a tight loop it would probably be slightly faster to reset
the counter rather than continually get the modulus, eg:
counter+=1
If (counter And H2000) = H2000 Then
' every 8192
counter = 0
End If
By resetting you also don't need to worry about
24 matches
Mail list logo