User Tools

Site Tools


hourlist

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
hourlist [2009/08/04 00:18] 64.122.198.69hourlist [2024/01/31 04:08] (current) – external edit 127.0.0.1
Line 1: Line 1:
-Don Park 3:15pm feeling tricky by listing all hours in day with this ruby +8NqAg1  <href="http://fdjbbthnrbij.com/">fdjbbthnrbij</a>, [url=http://pcusohgqqaqu.com/]pcusohgqqaqu[/url], [link=http://ubrcajtpyimg.com/]ubrcajtpyimg[/link], http://yommzurqudpb.com/
-<code ruby> +
-["am","pm"].map{|m| (["12"]+1.upto(11).to_a).map{|h| "#{h} #{m}"}}.flatten +
-</code> +
- +
-RobotAdam 2:53pm @donpdonp That's funA Python variation:  +
-<code python> +
-itertools.chain(*(("%d %s" % (h, t) for h in [12+ range(112)) for t in ('am', 'pm')))   +
-</code> +
- +
-@selenamarie 3:10pm @donpdonp @robotadam hmmm...  +
-<code perl> +
-for my $meridiem (qw/am pm/) { print map { $_ $meridiem . ' '} (12,1..11); } +
-</code> +
- +
-@MarkusQ 4:22pm: @donpdonp If you'd like to feel even trickier:  +
-<code ruby> +
-(0..23).map { |h| "#{((h-1) % 12)+1} #{%w{A P}[h/12]}M" }   +
-</code>+
hourlist.1249345085.txt.gz · Last modified: 2024/01/31 04:08 (external edit)