 |
|
 |




 |
|
 |
 |
 |
 |
|
 |
 |
So, some famous guy, who's had a pretty horrific things happen in his life, had sex with a 13 y/o. After sharing drugs with her (I say 'sharing' as that sounds less judgmental than 'giving' or 'administering'). And now that he's been arrested for extradition to the US to face those charges, finally, people are upset about it. What's to be upset about? Dude had sex with an underage person. It doesn't matter if you're rich or not, you face the court. Instead, this weasel fled the country. Don't get me wrong, I think it's horrible what happened to his wife and unborn child, and what happened to his mother (I don't know anything about his dad). And I understand he made some pretty edge films. Haven't seen any myself. By none of those facts give him a free pass to break a law and get away with it. Even a law that some might think of as a 'moral' law (I don't consider that a moral law btw: it's there to safe guard children. They don't /know/ what they need to know at that age and are incredibly impressionable and can seriously screw up a life - regardless of how it went down, and the circumstances.) When someone does something wrong, it doesn't matter that they're in the same industry as you, are a friend, part of some union or brotherhood: you don't support them. That's tacit approval of their actions. This dude is a chicken shit. He /knows/ he's guilty. Be upright, or piss off. Current Mood: irate
|
 |
 |
 |
 |
|
 |
 |



 |
|
 |
 |
 |
 |
|
 |
 |
This was cross posted in itprofessionals
I'm working on some Perl code (might get moved to PHP) which will be the basis for displaying server racks - and blade servers (blade servers, in the big picture, really are just mini-racks).
The trick is, racks can be of different U heights, and blade servers could be numbered however the OEM wants (you'd /think/ horizontally, starting in the upper left).
The parameters of the 'racks' will be stored in a db (ldap in this case), and I wanted the parameters to be human readable.
So, I've written the following Perl code. There's testing output included, and for what this is, I don't see any need to remove it.
Here's some sample output:
TLV: 20 VI: -1
PriOrder: Vertical
PriOrderStart: Bottom
SecOrderStart: Right
U_Horz: 5
U_Vert: 4
HorzInc: -4
VertInc: -1
TopLeftVal: 20
20 16 12 8 4
19 15 11 7 3
18 14 10 6 2
17 13 9 5 1
I'd /love/ to hear thoughts on optimizing (especially the large 'if' section) it.
- chris
$PriOrder="Horizontal";
$PriOrderStart="Left";
$SecOrderStart="Bottom";
$U_Horz=5;
$U_Vert=4;
if ( $PriOrder eq "Horizontal" ) {
if ( $PriOrderStart eq "Left" ) {
$HorzInc=1;
if ( $SecOrderStart eq "Top" ) {
$TopLeftVal=1;
$VertInc=$U_Horz;
print "TLV: $TopLeftVal\tVI: $VertInc\n";
}
if ( $SecOrderStart eq "Bottom" ) {
$TopLeftVal=$U_Horz * ( $U_Vert - 1 ) + 1;
$VertInc=-$U_Horz;
print "TLV: $TopLeftVal\tVI: $VertInc\n";
}
}
if ( $PriOrderStart eq "Right" ) {
$HorzInc=-1;
if ( $SecOrderStart eq "Top" ) {
$TopLeftVal=$U_Horz;
$VertInc=$U_Horz;
print "TLV: $TopLeftVal\tVI: $VertInc\n";
}
if ( $SecOrderStart eq "Bottom" ) {
$TopLeftVal=$U_Horz * $U_Vert;
$VertInc=-$U_Horz;
print "TLV: $TopLeftVal\tVI: $VertInc\n";
}
}
}
if ( $PriOrder eq "Vertical" ) {
if ( $SecOrderStart eq "Left" ) {
$HorzInc=$U_Vert;
if ( $PriOrderStart eq "Top" ) {
$TopLeftVal=1;
$VertInc=1;
print "TLV: $TopLeftVal\tVI: $VertInc\n";
}
if ( $PriOrderStart eq "Bottom" ) {
$TopLeftVal=$U_Vert;
$VertInc=-1;
print "TLV: $TopLeftVal\tVI: $VertInc\n";
}
}
if ( $SecOrderStart eq "Right" ) {
$HorzInc=-$U_Vert;
if ( $PriOrderStart eq "Top" ) {
$TopLeftVal=$U_Vert * ( $U_Horz - 1 ) + 1;
$VertInc=1;
print "TLV: $TopLeftVal\tVI: $VertInc\n";
}
if ( $PriOrderStart eq "Bottom" ) {
$TopLeftVal=$U_Vert * $U_Horz;
$VertInc=-1;
print "TLV: $TopLeftVal\tVI: $VertInc\n";
}
}
}
print "PriOrder: $PriOrder\n";
print "PriOrderStart: $PriOrderStart\n";
print "SecOrderStart: $SecOrderStart\n";
print "U_Horz: $U_Horz\n";
print "U_Vert: $U_Vert\n";
print "\n";
print "HorzInc: $HorzInc\n";
print "VertInc: $VertInc\n";
print "TopLeftVal: $TopLeftVal\n\n";
for ($VertLoop = 0; $VertLoop < $U_Vert; $VertLoop++) {
$RowStart = $TopLeftVal+($VertLoop*$VertInc);
$RowEnd = $RowStart+$HorzInc*($U_Horz-1);
for ($HorzLoop = $RowStart; $HorzLoop != $RowEnd+$HorzInc; $HorzLoop+=$HorzInc) {
print "$HorzLoop\t";
}
print "\n";
}
Tags: grid, numbers, perl Current Mood: geeky
|
 |
 |
 |
 |
|
 |
 |


 |
|
 |
 |
 |
 |
|
 |
 |
Man, I'm on a roll! Don't know if that's good or bad though... Anyway, on to my thoughts here. Which I must add aren't entirely mine; I got them in parts or in it's entirely from zanfur. A lot of people focus on blame. They blame someone, themselves or others, for some difficulty or hurt feeling. What's the point of blame? To find out who's responsible for the difficulty. Why? For assignment of punishment. Is it useful then? In legal arenas, you bet. We blame a murderer for murdering someone. And then punish them. In businesses, you bet. To identify what went wrong and how to avoid it in the future, or fire someone who's proven unable to uphold their part of the employer/employee relationship. In personal relationships? Nope. If Blame ==> punishment, is that what you really want? Wouldn't it be better to simply find out where the disconnect is and discuss it? Hurt feelings are unavoidable - they'll happen. They are real and can be very intense. But finding blame doesn't assist with identifying the disconnect or misunderstanding. And really, do you want to punish (not S&M style folks) someone you want to have a relationship with? I don't. What're your thoughts? Edit: ---------------------------------------- ----------- Semantics. What a fun topic. There's normally a plethora of words and phrases to get an idea across - each with their own nuances. I'm not talking about Responsibility (syn: burden, charge, obligation). I am talking about Blame. Some synonyms: fault, onus, condemnation. You know, the finger pointing, angry kind that at face value, and initially, totally avoids the possibility that whatever the difficulty was/is that it might /not/ be a big deal, or it might be a fault with positive side effects. And I'd like to think that in any relationship one would desire to retain, that type of blaming would be avoided. Here's a couple of links I found in a few moments of searching: http://www.yourromanceguide.com/articles/relationships/relationships-stop-the-blame-game.phphttp://www.chabad.org/theJewishWoman/article_cdo/aid/565512/jewish/The-Blame-Game.htmI also found a published study that apparently I have to pony up for (what bullshit is that?): Shame and guilt: characterological vs. behavioral self-blame and their relationship to fear of intimacyHere's a link about it with an abstract - if anyone was to send the whole thing my way - I'd really appreciate it. http://www.sciencedirect.com/science?_ob=ArticleURL&.. blah blah long ass urlsCurrent Mood: thoughtful
|
 |
 |
 |
 |
|
 |
 |

|
 |