Filed under: Uncategorized
Just had to share this. In the same vein as the spying squirrels in Iran, check out this robotic fly. As Conan would say, “In the year 2000……..”
Filed under: riddles & puzzles
AB and BC are two diagonals drawn on adjacent faces of a cube. How many degrees is the angle ABC?
So rather than spoil the previous weeks’ riddles by posting the answer here, I decided to dedicate a page to the answers.
[EDIT - 2007.07.25]
Ok so based on the fact there are hardly any comments that I have approved for this particular riddle (meaning most of you got it right) makes me find that this one was way too easy. I dunno, maybe I should throw some of the MENSA riddles your way? Of course this was one of them. And happened to be an interview question a while back.
Filed under: riddles & puzzles
So I think I am gonna start posting weekly riddles. Its fun, its educating, and I like the challenge. And I consider you, my peers, to be like-minded so I assume you enjoy riddles too. Please keep in mind that others might want to challenge themselves so please refrain from posting your answers in the comments. Instead, I will post the answer on next week’s weekly riddle.
This week: The Runners…
The facts:
- There are four runners.
- It is dark.
- There is only one flashlight.
- There is a bridge spanning a huge crevasse.
- The bridge can only sustain two people at any one time (its old, long, and creeky).
- It is necessary to traverse the bridge with a flash light.
- The crevasse is too wide and far to toss the flash light across, or otherwise transport it by any means other than by crossing the bridge.
- Runner A can cross the bridge in 1 minute.
- Runner B can cross the bridge in 2 minutes.
- Runner C can cross the bridge in 5 minutes.
- Runner D can cross the bridge in 10 minutes.
- This is set in reality meaning the runners have no James Bond-ish gadget for such an occasion.
The goal:
- What is the shortest amount of time to get all four runners across the bridge?
Filed under: Uncategorized
I am a sucker for puzzles, riddles and the like. I heard this one this weekend playing some basketball. And the thing that really gets me is that it was a little kid who posed the riddle. Amazing how kids perceive things differently than adults.
“How many sides does a basketball have?”
Interesting find: I am able to access private/protected members of certain UIComponents via FocusEvents heard by the systemManager.
How: On my application, I am assigning a listener to the systemManager for FocusEvent.FOCUS_IN events. This means that almost anything in the displayList will ‘bubble up’ to the listener.
systemManager.addEventListener(FocusEvent.FOCUS_IN,
onFocusIn,
false,
EventPriority.DEFAULT_HANDLER,
false);
Conclusion: So the interesting part is when you start to focus in on a TextInput or a TextArea. The evt.target is not the TextInput, but the UITextfield inside the TextInput. This means you now have access to a protected member of the TextInput.
I am curious to know why certain core (not the package) components aren’t stopping propagation of the FocusEvent from their protected members and dispatching their own. This would then mean the TextInput and not its protected UITextField would be the target of the event.
I promise this is the last posting I am doing for the HRule and VRule components. My buddy just kept on buggin’ me that he needed padding for the standard HRule and VRule components IN ADDITION to needing dashed styling. So I added it.
The source code on jwo_lib has been updated (haven’t updated the swc just yet).
Here is the new and improved HRule and VRule explorer.
So finally I added those two components to the jwo_lib (new SWC and source).
I have deprecated the older swc as there were major issues with the HyperlinkText component not playing well with Repeaters. (Possible bug Adobe?)
No biggie. This isn’t an original concept in the least bit. But I figure I will add to the stew and present my own modified HRule and VRule. These guys took maybe a total of 20 minutes to make. I got so sick of programmatically doing dashed lines, I figured what the hell, let’s just make em.
I decided to keep the same relative package and class names as well. So instead of mx.controls.HRule, you would use com.jwopitz.controls.HRule.
The only use issue is that in order to see the dashes, you just declare the style dashLength="some number". Its default is 0 so you can use these guys just as you would a normal mx.controls.HRule.
You can play with them here. I will be adding these guys to the jwo_lib soon.
