Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Put yourself on the Monk Map made even easier ;-)
#! perl -w use strict; my $usage = <<__EOT__; Usage: $0 [<latitude> <longitude>] [-test] Converts latitude and longitude (in degrees) to format suitable for Mo +nkMap. -test runs selftest __EOT__ my ($lat, $lon, $test) = (0, 0, 0); if (@ARGV == 2) { ($lat, $lon) = @ARGV; } elsif (@ARGV == 1 && $ARGV[0] eq '-test') { $test = 1; } else { die $usage; } if ($test) { selftest(); } else { printf "%s\n", ll2monkmap ($lat, $lon); } exit; sub ll2monkmap { my ($lat, $lon) = @_; sprintf "%12.5f%12.5f <!-- Location:latitude=%s,longitude=%s-->" +, $lat, $lon, dec2degminsec($lat), dec2degminsec($lon); } sub dec2degminsec { my $dec = shift; while ($dec < -180) { $dec += 360; } while ($dec > 180) { $dec -= 360; } my $neg = $dec < 0; $dec = - $dec if $neg; my $deg = int $dec; $dec -= $deg; $dec *= 60; my $min = int $dec; $dec -= $min; $dec *= 60; my $sec = int $dec; sprintf "%s%03d.%02d.%02d", $neg ? "-" : "", $deg, $min, $sec; } sub selftest { my @angles = ( -360, -270, -180, -90, 0, 90, 180, 270, 360 ); my @deltas = ( -0.445, 0, 0.555 ); for my $d (@deltas) { for my $a (@angles) { my $x = $a+$d; my $str = dec2degminsec($x); my $strll = ll2monkmap($x, $x); print "$strll\n"; } } } __END__ Author: 46.20832 6.14296 <!-- Location:latitude=046.12.29,longitude= +006.08.34-->


In reply to Re: Put yourself on the Monk Map by Rudif
in thread Put yourself on the Monk Map by agoth

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    choroba should make his presentation scaffolding public
    [Corion]: choroba: spod5 converts pod to S5 HTML, so it's also still basic. I find the lack of animations (in the sense of "highlight this", "highlight that" in code) somewhat tedious as I do it with rendered PNGs
    [Corion]: I haven't found a good way to include/use the source SVGs I use for creating the PNGs directly as animations
    [ambrus]: Presentations come in many different shapes, and so slides do as well.
    [Corion]: Doing that in Powerpoint or Ooxml would be nice(r) but I'm much quicker doing the outline of a presentation and the code as Pod
    [Corion]: Hurrr - on a machine that is behaving weirdly, I have two processes CROND running. I guess that is the source of unattended jobs sometimes not finding their files anymore...
    [ambrus]: Most of the time if I make slides, they're just a formatted document with a medium level of formality (between a well written article and an informal draft), with usually the page breaks chosen carefully and possibly some content repeated between pages.
    [Corion]: ambrus: My slides are mostly a list of things I want to talk about. But sometimes I want to point out interesting parts, or build up a larger image from small components. This is where animations/ highlights would come in well
    [choroba]: what I like about slides in HTML + CSS is I can use templates to produce them, which means all code in slides is tested, and I can version them in git
    [ambrus]: Btw, a request to everyone who organizes international conferences where presenters will show slides.

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (12)
    As of 2017-09-26 10:06 GMT
    Find Nodes?
      Voting Booth?
      During the recent solar eclipse, I:

      Results (293 votes). Check out past polls.