OT but this is the first time I've seen the ternary operator used with only one operand. Apparently, it's only valid in GNU C though. https://en.wikipedia.org/wiki/%3F:#C
I've seen it used a lot in Objective-C for default values: NSNumber *value = dict[@"key"] ?: @1;
Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)
21–30 of 33 posts
Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)
#22Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)
#23Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)
#24The Associated Press review of the show said: "Whiz Kids does not make a whimper on the sex-and-violence scale, yet it may be more dangerous to children than anything on television this season. Our adolescent heroes – sort of Hardy Boys high on silicon chips – engage, willy-nilly, in assorted illegal activities: computer tampering, driving without licenses and grave-robbing."
Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)
#25OT but this is the first time I've seen the ternary operator used with only one operand. Apparently, it's only valid in GNU C though. https://en.wikipedia.org/wiki/%3F:#C
$var = trim($_POST['var']) ?: 0;Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)
#26...people will know that you're faking it.
Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)
#27Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)
#28I once wrote a quick Java program that recorded our project's build output (about 5 minute's worth at the time) and captured the time between each line of the output. Then it could play back the build output at the same pace. I could run that in a loop in a shell window and I could nap for an hour while it looked like I was waiting on a build to finish. We joked about having a screensaver that looked like code being…
Why not just write a script to continuously run the build?
Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)
#29Be warned: if you type like this: http://www.youtube.com/watch?v=sffBHGpIRZE ...people will know that you're faking it.