|
To all you beautiful girls out there... happy Valentines day.
To all you fat birds... chin up, it's pancake day next week...
[SORRY]Don't shoot the messenger - it's from my mate, the stand up comic who should probably remain seated and is not very funny.[/SORRY]
|
|
|
|
|
R. Giskard Reventlov wrote: chin up Which one?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
All of 'em!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
How about handsome boy?
Bryian Tan
|
|
|
|
|
|
A basic extension method to implement min (yes, I know there's Math.Min, but I want a fluent implementation, so just go with it):
public static int Min(this int a, int max)
{
return (a > max) ? max : a;
}
But what would be a good name for this (which I've tentatively named "MinDelta":
public static int MinDelta(this int a, int delta)
{
return a > a + delta ? a + delta : a;
}
Suggestions? Humor?
Marc
|
|
|
|
|
Oranges
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
DeltaBurke
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Would that be an oxymoron or a case of irony? DeltaBurke and MinDelta?
When you are dead, you won't even know that you are dead. It's a pain only felt by others.
Same thing when you are stupid.
modified 19-Nov-21 21:01pm.
|
|
|
|
|
RiverDelta
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
AmazingSpiderMan
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Cliftonopolis
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
John Simmons / outlaw programmer wrote: Cliftonopolis
This stuff is already in the namespace Clifton.Core.ExtensionMethods but maybe I'll change that to Cliftonpolis !
Marc
|
|
|
|
|
Marcinator
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
How about:
Minimum - I told you all that I had no imagination!
|
|
|
|
|
public static int AddIfNegative(this int a, int delta)
{
return delta < 0 ? a + delta : a;
}
|
|
|
|
|
Yeah, I though about something like AddIfNegative but it's too long.
Marc
|
|
|
|
|
AddLT0 (Add if Less Than Zero)
|
|
|
|
|
Jochen Arndt wrote: AddLT0
You don't happen to program in assembler do you?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
I must confess that I was inspired by some assembler commands like the Microchip decfsz (decrement file skip if zero).
|
|
|
|
|
I do a good bit of maintenance of assmembler code, and darn near all of the labels are beautifully cryptic like that. Switching back and forth between c++ and assmebler is a joy that way.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Make in an acronym:
pAIN
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I prefer his approach and would call it DeltaOffset.
|
|
|
|
|
That changes the behaviour of the code.
int x = int.MinValue.MinDelta(-1);
int y = int.MinValue.AddIfNegative(-1);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You are off course right.
|
|
|
|