|
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
I guess I am glad I'm not his manager!
|
|
|
|
|
|
|
Jibesh V P
|
|
|
|
|
|
The solution to this problem is to install a trap door directly behind you where the supervisor always stands.
You then set audio, motion, and location in their appropriate places.
if( audio == null && motion == null && location == true)
{
trigger = true;
}else{
trigger = false;
}
End result, no more supervisor standing behind you while you code.
Heh, heh, I've lost more supervisors that way.
Now, back to reality.
|
|
|
|
|
hahaha.. ooh boy i really wish I could compile this code and run it.
|
|
|
|
|
It is a bit psuedo.
With properly declared variables and keywords it would compile and run. Unfortunately it has a bug and is therefore quite dangerous to anyone stepping on the trap door.
I forgot two important parameters. A variable for a timer and a constant for maximum standing time allowed.
The trap would trigger as soon as you got up to use the restroom.
Now, if you really want to use the code, rather than applying it to a trap door, apply it to an arduino or raspi controlled supper soaker water gun sitting on the desk, pointed in the direction of the standing interloper.
To be not so obvious and have some real fun, place a small hidden water device on the sealing above the spot and have it spew out just enough water to make it feel like a bird just pissed on the individual. For real effectiveness, make the device focus on any area behind the desk that's within the monitors viewing area.
Hmmm; It appears that I have been reading way to many Instructables and Hackadays. And also watching to many YouTube videos utilizing arduino controlled devices.
|
|
|
|
|
You could also turn on your (password-protected) screensaver, turn towards him and do nothing except staring at him. (I for one would enjoy his reaction.)
|
|
|
|
|
An ex-cow-orker needed to create two sections on an ASP.NET webpage with repeated items. Imagine something that gets rendered to HTML like this:
<h2>First Header</h2>
<div>Item 1</div>
<div>Item 2</div>
<h2>Second Header</h2>
<div>Item 3</div>
<div>Item 4</div>
<div>Item 5</div>
To avoid creating two repeaters, they created a single repeater, and then used the pre-render events to add headers to each section. Here's a short version of it (much simplified):
<script runat="server">
Private Sub myRepeater_PreRender(sender As Object, e As System.EventArgs) Handles myRepeater.PreRender
For Each item In myRepeater.Items
If SomeCondition1() Then
Dim headerContainer As PlaceHolder = item.FindControl("myHeader")
AddHeader(headerContainer, "First Header")
End If
If SomeCondition2() Then
Dim headerContainer As PlaceHolder = item.FindControl("myHeader")
AddHeader(headerContainer, "Second Header")
End If
Next
End Sub
</script>
<asp:Repeater runat="server" ID="myRepeater">
<ItemTemplate>
<asp:PlaceHolder ID="myHeader" runat="server" />
<%--
Not a bad approach, I think, though I'd probably have just created a nested repeater:
<asp:Repeater runat="server" ID="outerRepeater">
<ItemTemplate>
<h2><%# HttpUtility.HtmlEncode(DirectCast(Container.DataItem, ItemCollection).HeaderText) %></h2>
<asp:Repeater runat="server" DataSource="<%# DirectCast(Container.DataItem, ItemCollection).Items %>">
<ItemTemplate>
<%-- ...Rest of item template... -->
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
Of course, I'd have to split out the collection being bound to into two collections and create some wrapper classes and such, but nothing too difficult. I like this approach more, because you can avoid doing unnecessary processing during the render/binding stages (which just seems like a hack to me).
Another reason I prefer my approach is because you could then sort each collection differently. What I had to do instead was to first sort on SomeCondition1() and SomeCondition2() , then perform a secondary sort (which looks pretty awkward in LINQ).
EDIT: Fixed typo.
modified 31-Jan-13 19:01pm.
|
|
|
|
|
Has anyone tried this. i tend to get really creative with a bit of beer, at times a bit too creative that i have no idea what the code was for . Yea but feel good
|
|
|
|
|
joe_j wrote: at times a bit too creative that i have no idea what the code was for
That's what refactoring is for.
[edit]
Mandatory XKCD: Ballmer Peak[^].
Mandatory DD mention: Don't drink to much, or you could become an accountant!
Optional personal opinion: it could help getting into the flow. It's not so much about focus, but blending out sensory input and intrusive thoughts.
|
|
|
|
|
peterchen wrote: Mandatory DD mention: Don't drink to much, or you could become an accountant!
So what about Nagy then?
People say nothing is impossible, but I do nothing every day.
|
|
|
|
|
I think it's something with the gin. More reasearch is needed but unfortunately, no other test subjects are able to make it through the entrance trials.
|
|
|
|
|
They have the Gin in common to.
Maybe Nagy is an undercover agent for the dark side?
People say nothing is impossible, but I do nothing every day.
|
|
|
|
|
Jörgen Andersson wrote: Maybe Nagy is an undercover agent for the dark side Dalek Empire?
FTFY
|
|
|
|
|
Obviously.
People say nothing is impossible, but I do nothing every day.
|
|
|
|
|
One of the earlier characters in the British soap opera, Brookside, was Alan Partridge (no relation to the Steve Coogan character) - he was an alcoholic programmer.
|
|
|
|
|
Blimey that's going back a bit. I seem to remember he had an ACT Sirius on top of his fridge, for some reason.
|
|
|
|
|
For some reason I have yet to explain that character has always stuck with me
|
|
|
|
|
I have tried many combination, Cocoa and COBOL, Coffee and C#, Vodka and VB and even Tea and TCL.
My favourite is Gin and Java.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
haha nice one. should try .BUD Framework 4.0
|
|
|
|
|
joe_j wrote: BUD
That's not drink, that's love in a canoe. Copyright Infringement is the worst thing labelled as beer I have ever tried.
And I've tried a lot.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
There's worse - you do know they do a Bud Lite? I suspect it is actually dehydrated water...
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|