Monday, 10 September 2018

weekend log, Fionn in Cork, house bits, mtb blackberries mushrooms, scout plc, moon pie book finish

Earlier in week evening morning evening finished fixing bench. 2 wooden pieces with bolts just a small 1cm too short. Ugh. Wood from attic bunk bed side. 1 bit almost perfect length cut already. Cut. Varnish ends and scratches. Use scout knife to plane one side flat (worked well as did using it to plane rounded edge on back piece). Mark and drill holes. Screw in bolts whicch are really stiff difficult to screw in. Varnish for protection. Screw wood to cast iron back. In morning after rain bench has gotten longer again it seems like. Have to unscrew bolts alot persuade them into holes but it fits well in end. Pheuf.

Fixed laptop screen too. Replaced it.




Fionnuala and Daire in Cork visiting my mum in hospital and family. Fionnuala headed down Fri morn in car. 

After work Fri headed home. Relaxing night with Kate & Maeve. Found we had loads of eggs so cooked lots of them. Spinach omlette. Daire came back. Good report about my mum & Cobh. Daria came back after evening movie pizza at a friend's place. 

Sat up 9, breakfast, Daire already up unloaded dishwasher. Maeve off to speech&drama. Rain passing over.  French student has a cold rearranging day will stay at our place & rest. House bits then I head off bike to Carrickmines hunting printer ink washout neither harvey norman nor pc world carry the right cartridges any more. Nor are there other bits I'm looking for. Back home  lunch is like sandwiches and stuff. Maeve off to toewn with Ava to go as far as Henry St to get home economics sewing stuff in Hickeys. Head to pharmacy and shop and get lemons and stuff for sore throat with&for French student. 

After miscellaneous jobs I fish out MTB, tighten saddle and head out with no bag/tools. Up to Ticknock. Saddle a bit too up pointy but myeh. Lower it a little and twist gear change to b more comfy. Half way up arg oops no helmet! The guys in the bike hire place give me a helmet. Nice run loop down & up to three rock top, good blackberries and nice mushrooms around, some big shaggy ink caps and loads of orange ones in woods. Whaups my feet come off pedals a couple of times. Must sit a bit keep weight on saddle even if standing up sometimes. Lovely weather. The bermy run down is now extended down to the bike hire place. Cool. http://www.biking.ie
1 hour 30 in total to/from home. Up top 40mins 6.28 km, http://my.viewranger.com/track/details/ODU0MTYyNw== 

Cook tea: eggs & black pudding & beans in chicken sauce and boiled new potatoes. Eat with Kate & Daria. Then bike it with Kate to scout meeting. Maeve and Ava arrive from Luas. Organise names. Brainstorm activities, make a calendar, then tricky organising personnel PLs APLs and patrols. Fionnuala comes with bike carrier to bring us all home.

Sunday up in good time again. Breakfast and newspaper and radio. We all 6 of us go visit DSPCA meet animals looking for a cat, some young cats there soon after spayed operations. A black one called keri is selected doesn't like being fished out & held though I get some scratches on my tummy. We say hello to goat and dogs and pick up a bee on footpath and find a yellow flower for it too. Home. Lunch. Daria heads off to visit with other family. Fun day is startingon green. Maeve is stressing about getting flower photos printed for art project so I head on bike her on luas to carrickmines and we get them printed. I catch end of fun day ice creams and litter pick up. 

Kate cooks lots of fried rice. We have it for lunch and it is boxed up for school lunches.

Crosswords, sudokus, newspaper. House bits clear out boots need to hang back up fix hooks in bike room.

Reading old 2000AD annuals. And finish moon pie book very good compelling got quite serious.

Thursday, 9 August 2018

diary/blog(bench repair, cycle to work, cars) and how Writing is like Engineering components that interfaces with brains

This morning mmmmhmm,
 I set off the alarm when I open the back door,
 I varnish planks for bench repair,
   I hear Fionnuala unmloading dishwasher,
  Quiet house, girls went to Cobh yesterday morning to visit
grandparents & cows & cat & dog & farm generally.
Bye to Fionn, quick coffee, cycle to ParcelMotel in Sandyford . . .
 Traffic in Sandyford village is slow, there must be a funeral ? cars
parking on pavements on the lower part of the hill away from the
shurch. I squeeze past/through.
 At the ParcelMotel bip bip bip bip bip bip - bip - wrong pin ? oops
enter mobile and pin bip * 10 bip * 6 bip kerchunk YAY.
  Unwrap. Shoe goo.
   Into bag.
 Cycle on to work.
   Through Moreen, zoom cycle around roads, onto Drummartin bypass
traffic around but quiet enough,
   still it gets backed up as usual so bike catches up and undertakes
cars at each set of traffic lights,
   and I stop but then go walking pace through some red lights - very
quiet - no traffic moving through.





vibrant chain of thoughts after shower in work

Writing something is not like engineering and yet . .

With engineering each part has to function and mesh with other parts
and work together.
   The function and the mesh can be polished like a diamond or a
Toyota or a new Kia!
       And the whole works smoothly and it is a joy to behold.
   The function or the mesh might be a bit degraded,
       Yet the whole can still work albeit not perfectly.
   The function or the mesh might be degraded enough such that the
whole doesn't work any more.
   Maybe some repair could be done but it doesn't work.
The working or not working of the whole is obvious with engineering:
   a bench
   a road
   a bridge
   a canal system
   a bike
   a car
   a watch
   a computer ? maybe sometimes working is not so obvious!
   software . . . ?

With writing it is not so obvious if the parts do not work together.
   Writing has to connect with the mind of the reader,
     and mesh with modules of knowledge already there,
     and enhance some modules,
     and perhaps create new modules.
   Good writing will be efficient and state the minimum necessary to
engage with the mind of the reader.
Some writing is factual and some writing aims to impart facts and
techniques or methods.
   The mind of the reader is given information to load into modules,
   the mind of the reader is given instructions,
   so writing controls the mind and actions of the reader.
After reading,
  if the methods cannot be followed,
    it is less obvious if the writing is broken OR if the reader is
missing knowledge or skills or . . . something.
    Perhaps the writing would mesh better another reader with a
different set of knowledge.
    Perhaps the original reader would need to read other items or
practice skills before being able to understand.
    Or perhaps the writing is defective, incorrect in places or
misleading - correct but under certain conditions and complexity has
been left out.

Minimal and TLDR; versus comprehensive.
Need comprehensive yet simple documentation/info exchange, yet people
are too impatient to wait for or read comprehensive docs.
Combine writing with diagrams.
Reference to other documents. Divide up topic.

In school books were my friend.
Learning off by rote names or dates or lists of counties or chemicals
was not really my thing.
 Or poems or worse prose or irish quotes. Or french words or verbs!
 Or maths theorems.
Why learn things off if they were already written down ?
I always found that hard and convinced myself it was optional for a
clever chap like me.
 Anyway,
  somehow a decent vocabulkary of English words built up in my head.
 On occasion a more unusual word would come out in conversation
sounding normal in my head yet catching the ear of others who might
occasionally point out the novelty.
 Somehow lists of chemicals and facts about trees and physics and
maths and all sorts built up in my head.
 Some cool and simple enough poems like McCavity the Mystery cat,
Ozymandias, some Kavanagh stayed in my head for a while.
  Although the exact sequence is very hard to retain.
  As an adult learning song lyrics takes work . . and is very hard to
get to a rote state.
   First lines of verses will obstinately not pop into my head at the
right time :-7
   But with pratice and taking a step back to learn songs at different
levels works . .


With computers and software the engineering definition of "working"
seems to have become more fuzzy.
And as computers or more complexity are added into cars, washing
machines, lightbulbs the fuzzy workingness is becoming ubiquitous.
Our Renault Grande Scenic - great space inside - seats fold down to
make van space.
 Worked well for us for years, last couple of years the fundamental
problems were:
    1. air blowers stopped working, air heater stopped working,
       IF we had only known KEEP your air intakes (below windscreen
under grille at top of bonnet) free of leaves/gunk !!
    2. cylinder coil went in the end, too much to repair
 Various other issues were:
  Parking brake warning and stopped fixed nicely by Welsh parking
brake fixy people and local mechanic.
  Periodically a cylinder coil would degrade and need replacement.
  Windows:
    need to reprogram if battery went dead,
    near the end once a window went down by itself and stayed down,
for a week . . . and then started working again
       (I did clean/lubricate but not much),
    otherwise fine for us despite stories of funny window behaviour by
other owners.
  Sunroof: (need to keep lubricated - on new Kia as well)
  Seats (need to keep lubricated, clear rubbish so they fold or click
upright correctly.
  Very frequently blew light bulbs (dipped beams, main beam, others) :-P
  Keys: my key fob died and I killed it altogether trying to open the
case and solder a fix too hastily.

  Battery replaced periodically . . . serviced oil/air filters, oil,
windscreen wash . . . tyres, steering parts

The older fiesta similar major problems:
 1. Heater/air blower:
   mostly didn't work so cold and foggy windscreen in the winter
   occasionally did work but got stuck on hot so long trip down
country people overheating windows down
 2. rust underneath and coming up sides/doors
   repaired a few times to get through NCT
 Key twisty roundy needed to get replacement and program it.
 Paintwork rusty patches sprayed in very patchy manner.



Engineering software if I look at how some parts of system works . . .
Distributed system - a seemingly simple operation like checking
version - not designed, could be done in various ways. Answer now not
a simple "vx.xx.xx" but might be multiple versions + elements of
config. Complex systems. :-P  Yet not that complex. Bring back the
says of 64k RAM! Maybe :) It comes back to DESIGN. Design and
architecture of software components, how they mesh together. Same for
writing, architecture of what documents are needed, design of chapters
and diagrams, writing, implementation.




The Bench
Strong cast iron with wooden seat and wooden + cast iron back.
The wood was very poor and not treated well and started rotting very
quickly a year or so after buying bench.
I replaced most of the the bench seat planks retaining front most
curved one and rear and wood-stained all but didn't dismantle bench to
paint all surfaces. Lasted a few years with a clean and top up of
woodstain some time.

Now the planks on bench back are rotten (from the unpainted surfaces
in contact with cast iron).
And older unreplaced planks are more rotten so replacing almost all
now with new.

Measured. Bought wood. 2 planks:
 plank #1 W2 x L*2 x H
 plank #2 W x L*2+20cm*2 x H
  Let L = bench width 170mm I think.
  Let L2 = shorter plank at front ~168cm.
  Let W = 7cm new (original about 65mm) narrower planks on back sides
and on seat.
  Let W2 = 9cm new (original about 8cm) two wider planks on back.
  Let H = 18mm (or 20mm new planks (or 16mm smaller older planks)).
  For back:
    2 W2 x L x H
    2 short sides 20cm x W x H
  For seat:
    1 W x L x H at back
    1 W x L2 x H at front

Kate cut the planks to size(making a mistake cutting wide plank for
back slightly shorter length for front) but will work around that
using one narrow one wide plank on back. Kate took off one rotten
plank from front of bench. Kate hand drilled holes for front plank and
wood cracked a bit with force of bolt going in. Will varnish and
gorilla glue support the crack.
  Tue: Took rotten wood off back. Oiled bolts. Cleaned off bench/parts.
  Wed: I finished cutting. Measured and drilled bolt holes.
Sanded/cleaned wood. Applied white spirits and coat of varnish.
  Thur morn: applied another coat of varnish to new planks.
  TODO: Varnish on old wood on bench (take off all planks and do it properly?).
    Another coat of varnish on new wood.
    Assemble.
    Burn cool/cute things on backside ?










My Bike(s?):
  Pedal needs replacing on my hybrid commuter.
  And bell and water bottle holder.
  AFter JamboRi took carrier off MTB and put back on my bike and fixed
up mudguard.
  Mudguards are held with sisal and old broken bungee :-7 is ok for now.
TODO: Kate brakes, Kate mudguard lost on JamboRi I think
TODO: carrier for MTB >;) and pannier.

Wednesday, 8 August 2018

jenkins continuous integration: most useful methods for jobs to trigger other jobs

Jenkins has quite a flexible choice of methods for jobs that need to interact with one another. 
There is a built in "Post-build Action: build other projects" and there are a couple of plugins which can be used. The "Post-build Action: build other projects" is probably most suitable. And the "Lockable Resources Plug-in" can be used to make the jobs mutually exclusive.
* SIMPLEST METHOD "Post-build Action: Build other projects" *
  1. Install Lockable Resource plugin and add a lockable resource "stream1" and configure jobs stream1_build and stream1_test1 to lock on that resource.
  2. Configure the stream1_build job, Add "Post-build Action: Build other projects" Build job stream1_test1 if the build job is Stable.
You can chain multiple jobs together in a pipeline or stream like this. 

* LIST of useful built-ins and plugins: *
It is also useful to use FSTrigger plugin, build jobs or other jobs may generate logs or image files or test reports. Jobs can be triggered to run when these files or directories appear or are updated. Jobs in remote jenkins or external to jenkins can be used to trigger jobs using this method.
  1. Built in Post-build Action: Build other projects
    * Trigger only if build is stable   
    * Trigger even if the build is unstable 
    * Trigger even if the build fails   
    
  2. BuildResultTrigger Plug-in - This plugin makes it possible to monitor the build results of other jobs. Similar to "Post-build Action: build other projects" only at top of job config as a trigger with cron schedule.
  3. Filesystem Trigger Plug-in - The plug-in makes it possible to monitor changes of a file or a set of files in a folder.
  4. Parameterized Trigger Plug-in (which adds Post-build Action: Trigger parameterized build on other projects) Similar to "Post-build Action: build other projects but convenient to pass build information e.g. in parameters.ini style file or boolean or other params from one job to another.
  5. Lockable Resources Plug-in This plugin allows to define external resources (such as printers, phones, computers) that can be locked by builds. If a build requires an external resource which is already locked, it will wait for the resource to be free.
I came across this older question "Jenkins: Run only if other job is cleanwhich did not have good answers. As I said in my preamble to answer it took a while for me to discover how to use these methods, surprising as "Post-build Action: build other projects" is built in. It is easy to overlook.

Wednesday, 21 February 2018

car and computer troubles around the feast of St. Oran. . . and Neil Gaiman's poem In Reilg Odhrain - about a different St. Oran.

At home car Renault something happened Sat morning, misfiring, very low on power. Brought to garage and was thinking it was a coil pack gone. But they said cylinders are randomly misfiring not just one so it's not a coil pack problem it's something else. . . To be continued . . .

in scouts: We went mountainbiking in Ballinastoe. Hired bikes from http://www.biking.ie. Janos was our instructor. Great fun. I went MTB in Ticknock later in the afternoon.
https://www.trailforks.com/region/ticknock/map/

Earlier car news this year: In January after holidays battery was weak. We had to get help jump-starting a few times - at home (started with trickle charger), in Sandyford garage, in Kilternan Ski slope. Put in a new battery. Replaced front light bulbs as usual. Also trying to get air blower working again. Cleared out air intakes and found cabin air filter and took out. Got a wrong one delivered :-7. Fan in car - with broken cigarette plug connection now. Also wipers put back on properly after clearingout air intakes.

In work fun with jenkins, install/deploy jobs. A job to upgrade the running jenkins itself from jenkins.
Cleaning up a series of unwanted builds if a job goes crazy:
for i in $(seq 824 867); do curl -vv -u user:password -X POST http://jenkinsserver:port/job/jobname/$i/doDelete; done
And things like: https://stackoverflow.com/questions/18154423/adding-a-jenkins-are-you-sure-dialog

Feb 19th - fun in work a central DNS and other services server got into trouble, became unresponsive. All the usual IT people were away so we got to power-cycle. Toggle switch off at back powered it down but not up. Brief moment of worry before trying reset switch on front. Then later fun restarting services and re-mounting things that didn't start up properly @ boot time.

Feb 20th also there was a directory containing many many files it shoudln't. We thought a job/script rsync of copy had gone crazy. All the files removed from inside that directory. A few minutes later it was noticed all files were gone from homedirectory of server! :-o ssh keys, config files, .bashrc, .bash_profile, key exchanges, scripts/tools all had to be recovered and put back in place.

We checked star alignment, solar flare state and found it was apparently feast day of St. Odran. And there are a few different Odrans: https://en.wikipedia.org/wiki/Odran

1. https://en.wikipedia.org/wiki/Odran_(disciple_of_Saint_Patrick) - drove chariot for St. Pat and killed by a spear intended for St. Pat. Circa 430 AD. Killed in revenge for the destruction of the pagan god Crom Cruach. Saint Odran's feast-day is 19 February.

2. https://en.wikipedia.org/wiki/Oran_of_Iona -  520 AD church in Tipperary, 563 AD to Iona. Legend that he was buried alive under chapel on Iona. And some time later from the grave said: "There is no Hell as you suppose, nor Heaven that people talk about". Neil Gaiman re-tells the legend in the poem In Relig Odhrain:
    "Heaven is not waiting for the good and pure and gentle
      There's no punishment eternal, there's no Hell for the ungodly
      Nor is God as you imagine—". 

Reilig Odhráin is the cemetary around Odhran's Church on Iona. This St. Odhrán's feast day is on 27 October.

3. https://en.wikipedia.org/wiki/ - Odhrain_Ua_hEolais - A scribe and scholar. Born into the Túath called Conmaicne Magh Réin. Died 994 AD.

https://amandapalmer.bandcamp.com/track/in-relig-odhrain-3 - a true story about murder and saints - read by Neil Gaiman
http://www.neilgaimanbibliography.com/poems.html


Neil Gaiman - In Relig Odhráin

When Saint Columba landed on the island of Iona
His friend Oran landed with him
Though some say Saint Oran waited
In the shadows of the island, waiting for the saint to land there.
I believe they came together, came from Ireland, where like brothers
Were the blond and brave Columba and the dark man they called Oran.

He was odhran, like the otter, was the other. There were others
And they landed on Iona and they said, We'll build a chapel.
It's what saints did when the landed. (Oran: priest of sun or fire
Or from Odhra, meaning dark haired.) But their chapel kept on crumbling.
And Columba took the answer from a dream or revelation,
That his building needed Oran, needed death in the foundations.

Others claim it was doctrinal, and Saints Oran and Columba
Were debating, as the Irish love debating, about Heaven,
Since the truth is long-forgotten we are left with just their actions
(By their actions shall ye know them): Saint Columba buried Oran
Still alive, with earth about him, buried deep, with earth upon him.

Three days later they returned there, stocky monks with spades and mattocks
And they dug down to Saint Oran, so Columba could embrace him
Touch his face and say his farewells. There days dead. They brushed the mud off
When Saint Oran's eyes blinked open. Oran grinned at Saint Columba,
He had died but now was risen, and he said the words the dead know,
In a voice like wind and water:

He said, Heaven is not waiting for the good and pure and gentle
There's no punishment eternal, there's no Hell for the ungodly
Nor is God as you imagine—
Saint Columba shouted "Quiet!"
And to save the monks from error shoveled mud onto Saint Oran.
So they buried him forever: And they called the place Saint Oran's.
In its churchyard Kings of Scotland, Kings of Norway, all were buried
On the island of Iona.

Some folk claim it was a druid priest of sunlight that was buried
In the earth of good Iona just to hold the church foundations,
But for me that's much too simple, and it libels Saint Columba
(who cried "Earth! Throw earth on Oran, stop his mouth with mud this moment,
Lest he bring us to perdition!") They imagine it a murder
As one saint entombed another underneath that holy chapel.

While Saint Oran's name continues,
Martyred heretic, his bones still hold the chapel stones together,
And we join them, Kings and princes, in his graveyard, in his chapel,
For it's Oran's name they carry. He's embraced in his damnation
By the simple words he uttered. There's no hell to spite the sinners
There's no Heaven for the blessed. God is not what you imagine.

And perhaps he kept on preaching, for he'd died and he had risen,
Until silenced, crushed or muffled by the soil of Iona.
Saint Columba, he was buried on the Island of Iona
Decades later. But they disinterred his body and they took it
To Downpatrick, where it's buried with Saint Patrick and Saint Brigid.
So the only saint is Oran on the island of Iona.

Don't go digging in that graveyard for the kings of old, the mighty,
Or Archbishops and their riches. They are guarded by Saint Oran
Who will rise up from the gravedirt like the darkness, like an otter.
For he sees the sun no longer. He will touch you,
He will taste you, he will leave his words inside you.
(God is not what you imagine. Nor is Hell and nor is Heaven.)

Then you'll leave him and his graveyard, and forget the shadow's terror.
As you rub your neck, remember only this: He died to save us.
And that Saint Columba killed him on the island of Iona.




A short stopmotion animated film of Neil Gaiman's poem 'In Relig Odhrain'.

https://www.kickstarter.com/projects/jimbatt/the-grave-of-saint-oran-a-neil-gaiman-animation/updates
http://www.thegraveofsaintoran.com/



In Reilig Oran - by Neil Gaiman

Saturday, 17 February 2018

scouts mountainbiking in Ballinastoe and James MTB in Ticknock


In scouts: We went mountainbiking in Ballinastoe. Hired bikes from http://www.biking.ie. Janos was our instructor. Great fun. I went MTB in Ticknock later in the afternoon.

https://www.trailforks.com/region/ballinastoe/?lat=53.106392&lon=-6.227174&z=15&m=trailforks

https://www.trailforks.com/region/ballinastoe/map/

https://www.trailforks.com/region/ticknock/map/

TODO: enhance the trailforks bike trail map for printing:
Want direction of the runs.
Nice if contour lines and streams/roads would stand out more.
For each run summary distance, height gain and loss.
Did this by hand drawing on maps and laminated for the day.

Ballinastoe trails:


Coilte Ballinastoe site has a good trail map .pdf for walking:

Ballinastoe start of the trails map (Leader went with Scouts who were nervous and opted out of the full trip).


Ticknock track:




Monday, 20 November 2017

encoding HTTP request characters & > " < ' &amp; &gt; &quot; &lt; &apos; %22%27%3C%3E%26


Encoded request for """Test msg AMP GT QUOT \r &>"\r"""
POST /test HTTP/1.1
content-type: application/x-www-form-urlencoded
Host: test:8080
Content-Length: 133
various_params=whatever&text=Test+msg+AMP+GT+QUOT+%c3%96r+%26%3e%22%c3%96rHTTP/1.1 200 OK
https://www.url-encode-decode.com/
TEST AMP GT QUOT SLASHR & > " \r
TEST+AMP+GT+QUOT+SLASHR+%26+%3E+%22+%5Cr%0D%0A
INPUT:
TEST AMP GT QUOT SLASHR & > " \r
TEST+AMP+GT+QUOT+SLASHR+%26+%3E+%22+%5Cr%0D%0A
0:    (  2  <  F  P  Z  d   n   x
1:    )  3  =  G  Q  [  e   o   y
2:    *  4  >  H  R  \  f   p   z
3: !  +  5  ?  I  S  ]  g   q   {
4: "  ,  6  @  J  T  ^  h   r   |
5: #  -  7  A  K  U  _  i   s   }
6: $  .  8  B  L  V  `  j   t   ~
7: %  /  9  C  M  W  a  k   u  DEL
8: &  0  :  D  N  X  b  l   v
9: ´  1  ;  E  O  Y  c  m   w

HTTP request encoded OUTPUT:

TEST+AMP+GT+QUOT+SLASHR+%26+%3E+%22+%5Cr%0D%0A
TEST%2BAMP%2BGT%2BQUOT%2BSLASHR%2B%2526%2B%253E%2B%2522%2B%255Cr%250D%250A%0D%0A
0%3A++++%28++2++%3C++F++P++Z++d+++n+++x%0D%0A
1%3A++++%29++3++%3D++G++Q++%5B++e+++o+++y%0D%0A
2%3A++++%2A++4++%3E++H++R++%5C++f+++p+++z%0D%0A
3%3A+%21++%2B++5++%3F++I++S++%5D++g+++q+++%7B%0D%0A
4%3A+%22++%2C++6++%40++J++T++%5E++h+++r+++%7C%0D%0A
5%3A+%23++-++7++A++K++U++_++i+++s+++%7D%0D%0A
6%3A+%24++.++8++B++L++V++%60++j+++t+++%7E%0D%0A
7%3A+%25++%2F++9++C++M++W++a++k+++u++DEL%0D%0A
8%3A+%26++0++%3A++D++N++X++b++l+++v%0D%0A
9%3A+%C2%B4++1++%3B++E++O++Y++c++m+++w%0D%0A

TABLE: (with SPACE chars stripped)

0%3A        %28 2   %3C F P Z   d n x    %0D%0A
1%3A        %29 3   %3D G Q %5B e o y    %0D%0A
2%3A +      %2A 4   %3E H R %5C f p z    %0D%0A
3%3A %21    %2B 5   %3F I S %5D g q %7B  %0D%0A
4%3A %22    %2C 6   %40 J T %5E h r %7C  %0D%0A
5%3A %23    -   7   A   K U _   i s %7D  %0D%0A
6%3A %24    .   8   B   L V %60 j t %7E  %0D%0A
7%3A %25    %2F 9   C   M W a   k u DEL  %0D%0A
8%3A %26    0   %3A D   N X b   l v      %0D%0A
9%3A %C2%B4 1   %3B E   O Y c   m w      %0D%0A
Encoding of SPACE is + or %20. 
Encoding of ' ? %27 or %C2%B4 ?
The ' char from man ascii was not '! But ´. Interesting.
Encoding of ' is %27.



XML escape characters

There are only five:

"   &quot;  %22
'   &apos;  %27
<   &lt;  %3C
>   &gt; %3E
&   &amp; %26

All 5 special characters must not be escaped in comments or CDATA sections or XML processing instructions.




ASCII table from man ascii linux

  30 40 50 60 70 80 90 100 110 120
 ---------------------------------
0:    (  2  <  F  P  Z  d   n   x
1:    )  3  =  G  Q  [  e   o   y
2:    *  4  >  H  R  \  f   p   z
3: !  +  5  ?  I  S  ]  g   q   {
4: "  ,  6  @  J  T  ^  h   r   |
5: #  -  7  A  K  U  _  i   s   }
6: $  .  8  B  L  V  `  j   t   ~
7: %  /  9  C  M  W  a  k   u  DEL
8: &  0  :  D  N  X  b  l   v
9: ´  1  ;  E  O  Y  c  m   w

Tuesday, 14 November 2017

Inscribe square within circle. Geometric construction.

From question on Euclidea geometry app. 

Given: circle C1 and points a1 at centre of circle and a2 on circle.
Construct: square inscribed in C1 with one corner at a2.
Must do it using only 7 elementary moves(i.e. draw circle or line)

Question is answered here:
https://math.stackexchange.com/questions/1587861/inscribing-square-in-circle-in-just-seven-compass-and-straightedge-steps#

I found that inscribing hexagon (and it's 6 equilateral triangles) in the big circle helped me to understand how the construction works. 60 degree and 30 degree and 15 degree angle divisions are key.


F

It is still difficult (for me!) to break it down and prove how it works. Anyway. I have tried. It could perhaps be simplified. Given: circle C1 and points a1 at centre of circle and a2 on circle. Construct: square inscribed in C1 with one corner at a2. 1. Draw circle C2 with centre at a2 and a1 on circle (same radius as C1). Call the points where C1 and C2 intersect p1 and p2. line lengths |a1p1| = |p1a2| = |a1a2| = radius of C1,C2 so little triangles a1a2p1 and a1a2p2 (not shown) are equilateral (60 degree angles) 6 of these triangles could be inscribed into C2 giving a smaller hexagon this smaller hexagon gives us point p3 and proves triangle p1p2p3 is equilateral. 2. Draw big circle C3 with centre p1 and passing through p2. We know Tri p1p2p3 is equilateral, we can also construct equilateral triangle p1p2p8 and construct hexagon p2p3p4p6p7p8 This construction also shows that p8 and p3 where big circle C3 intersects C2 and C1 align (vertical in diagram) with a1 and a2. 3. Draw Line a1p1 extended, this gives us points p5 and b where it intersects C3 We want to construct side of square line p8s1(s1 not marked leftmost point on square) at 15 degrees to p8p1


The squares' sides are at angles of 45 degrees from horizontal. Line p8p1 on equilateral triangle is 60 degrees from horizontal. 15 degrees between them.
     Line a1p1 bisects triangle p1p2p8 (as it does also to triangle p1p4p6 and hexagon) as it is side of little triangle a1a2p1 
     so
     
     Consider Triangle p1p5p8
     We can see
     Lines p1p5 = p1p8 = radius of big circle
     so
    So point s1 is on line p8p5 where it intersects C1 
4. Draw Line p5p8 giving square side s1p8
    
     Line p5b is diameter of circle C3
     Angle Thales' theorem
     This means Line p8b extended to p10 is another side of the square.

5. Draw Line p8b extended to p10 where it intersects C1 giving another side of square p8p10

6. Draw side a2p10

7. Draw side a2s1

That's it.

Interesting to note the angles in the circle segments. And the lengths of the circle segments. Circles C1 (and C2) give a sixth of circumference of circle C3.

Interesting also the angles around point a2 (and around p8):
     
     
      360 - 240 - 90 = 360 - 330 = 30 degrees
      So