Tuesday, December 31, 2019

HAPPY NEW YEAR!


Executable Jar

Sometimes simpler is better: managed to make my own executable
jar file from the command line, thanks to this helpful site:



My version:

Having compiled CyanSwing.java with the javac command, and put
everything in a folder called MyPtos,






Monday, December 30, 2019

2019

Been mulling that piece about how astronomers now 'see' the hydrogen
filaments to which we owe the formation of galaxies. That is an awesome
finding.: Galaxies, then black holes in their center...



Loked up the frequency of hydrogen last night. Turns out it emits in the
microwave range of the spectrum, visualized below:


Sunday, December 29, 2019

Application!?

Had a terrible afternoon trying to get my XmasGreetings
project to open from its jar file. It opens from the command line, but
because it is ungainly, it just won't do it on double-click.

Turns out it's all my fault: I have neglected defining
a new package for each project from day 1. When going to jar,
my projects are then carrying a lot of unused imports from
other projects...

 Long story short, I need to start creating proper projects.



https://www.w3schools.com/java/java_packages.asp

Saturday, December 28, 2019

The Alternatives (JavaFX)

Starting to discern the two possibilities for
setting layout with JavaFX. (Yawn), it depends.

One can work with the code, as always
although one is free to use a CSS stylesheet:




Or, one can play with different layout models on SceneBuilder. The code
for Eclipse gets generated from one's Scene Builder choices :

Scene Builder preview:
 Eclipse:




Some projects just have more elaborate user interfaces...

                                                   *     *     *

On the first example - without Scene Builder - there are really two ways
of displaying an image. The first simply gets it from one's computer as
an image ( the slashes run to the right). The second gets it from System.io
and calls for backward slashes, like with command line:


Friday, December 27, 2019

JScience

Latest from Lyse and the Junk Science Band she sings with.
Can be downloaded from Spotify! the design
is from her as well.


Future with Java

Found a very interesting piece on working with SceneBuilder;
turns out Scene only accepts one child component, although that can be
a layout that, itself, holds othr components. A life saver.


https://www.vojtechruzicka.com/javafx-hello-world/

Will be looking to this person's blog in the future.

BJohnson

source: Libération

author:  Jacques Pezet December 27, 2019 at 7:01 am

translation: GoogleTranslate/doxa-louise

Is Boris Johnson's  recitation of the "Iliad" in Ancient 

Greek correct?


A 2013 video showing Boris Johnson proclaiming the beginning of Homer's poem aroused admiration, but also taunts from Internet users.

Question asked by Paul on 12/25/2019

Hello,

Since Monday, a video exhumed from Boris Johnson has aroused the fascination of many Internet users and commentators on British news, since we see him reciting a passage from the Iliad of Homer in ancient Greek. The incident dates from August 2013 , when he participated, as mayor of London, in the Melbourne Writers Festival.



The rediscovery of these images was first shared on social networks by Internet users surprised or proud to see that the current British Prime Minister is a cultivated and literate man, far from the eccentric image of the "clown" Bojo,  bulldozer driver and Love Actually fan .



But secondly, admiration was replaced by mockery, when people posing as Hellenists or experts in Ancient Greek said that Boris Johnson's performance was of poor quality or incomprehensible. This negative assessement from Internet user Yiokasti Mouratidi, who presents herself as a Greek student, has been shared more than 35,000 times: “As a native Greek person who studied Ancient Greek, the Iliad and the Odyssey (and other texts in ancient Greek) for four years in high school (as part of the compulsory program of Greek public schools), I can confirm that I understood absolutely nothing about what he said. ”



Boris Johnson doesn't recite too badly


To verify Boris Johnson's performance, CheckNews  contacted Manon Brouillet, lecturer in Greek language and literature at the University of Picardy. The researcher believes that:  “The former mayor of London has a rather good memory. He recites the first 36 verses of the Iliad, but it is true that there are errors: he forgets verses 8, 15, 16, 18 to 23 and 32, and he makes some mistakes in Greek which, for me, clearly indicate that he does not understand or not very well the Homeric text (there is at least one moment when his forgetfulness, verses 18 to 23, makes him say a sentence which has no meaning, but that he has retained its declamatory style (with includes an emphatic pronounciation at the beginning of the two lines of the heroes.) In short, in my opinion, he does not recite too badly but does so without understanding everything. "

About pronunciation, Manon Brouillet specifies that Boris Johnson "Pronounces Greek in English, it is the" normal "pronunciation on the other side of the Channel, and also of the Atlantic, which explains why we can read on Twitter Greeks who say that they do not don't understand anything. They probably wouldnèt understand me either! ”
Also interviewed, the Hellenist and theater director, Philippe Brunet confirms: “The memorization and interpretation of Boris Johnson are quite good, apart from a few cuts or small errors. Of course, the pronunciation reflects a certain state of British teaching and practice of ancient Greek. In any case, I have not heard any political leader in France attempt an equivalent recitation. ”

cordially

Jacques Pezet

https://www.liberation.fr/checknews/2019/12/27/boris-johnson-recite-t-il-correctement-l-iliade-en-grec-ancien_1771098

Thursday, December 26, 2019

Integrating SB

After MUCH effort, manages to integrate Scene Builder with Eclipse:

1- Download Scene Builder
2- Create a JavaFX project
3- From the project file, rick-click, go to
new other, and create an .fxml file
4- Right the file, and choose 'Open with Scene Builder'
5- This is the path to Scene Builder for Windows:

 C:\Program Files (x86)\Oracle\JavaFX Scene Builder 2.0\JavaFX Scene Builder 2.0.exe 



*     *     *





Changes you make on Scene Builder have to be saved to the file on Eclipse;
the Eclipse project has to be 'refreshed', and can then be run 😉

Wednesday, December 25, 2019

CMorning


It's Christmas morning and I have just downloaded JavaFX
Scenebuilder. I have not integrated it to Eclipse, but it should
nonetheless be a useful learning tool for layout issues. 🎁




https://o7planning.org/en/10623/javafx-tutorial-for-beginners

                                                             *     *     *

Was curious about how a slider control is actually wired. The main
idea seems to be that it returns a value, at the interval specified.

Borrowed the code from a friendly site to see (and added some color).
The slider travels on its won on a button click. Below:

https://www.programcreek.com/java-api-examples/?code=SaiPradeepDandem/javafx-demos/javafx-demos-master/src/main/java/com/ezest/javafx/sscce/SliderIncrement.java




Tuesday, December 24, 2019

Monday, December 23, 2019

Color Me!


That cyan would show up as the complement to pure red does appesr a bit shocking
to Christmas card affectionados. Wrong color! It shouldn't; cyan light has spectrum 
properties like any other and is visible to us. But we have chosen to define color for 
Graphics with RGB for Web and CMYK(cyan, magenta, yellow, black) for printing. 

Red, blue and green are obvious enough. When one adds colors to a light source, it
becomes more powerful to eventually appear white. When one mixes inks of various
colors, the product darkens to eventually become (near) black.

Human vision picks up only a small fraction of the electromagnetic spectrum. But
we see light itself mainy through what it allows us to see as reflection. Under a white
light, an object that appears blue has absorbed the longer wavelengths and is 'cool';
one that appears yellow or even red doesn't show the more powerful shortwave blues
and is 'hot'... and might even be fire!

So both color models have their uses. RGB moves in one direcion, toward the shorter 
wave pole. CMYK can cojoin the two ends, as different wavelengths can hit an object 
at the same time. We can work from a color wheel, or see the two systems as moving
from one to the other through their complements.

Mix red and blue light rgb(0, 255, 255) and the result is yellow. Mix magenta
and cyan ink and the result will be blue!!





...visible light occupies only one-thousandth of a percent of the spectrum.
source: HowStuffWorks


*     *     *
Big plans for tomorrow:



Downloaded the tree from Sketchpad; it's vector art that can
be downloaded with a transparent background if one saves the
icon while it is in chosen mode!!


Sunday, December 22, 2019

Name It!

JavaFX also allows one to work with color names: useful
for those of us with literary imaginations.



https://docs.oracle.com/javase/8/javafx/api/javafx/scene/paint/Color.html

https://htmlcolorcodes.com/color-names/


Saturday, December 21, 2019

Next CP

Thinking Big here this morning: my ColorWorld app is fine
in the bear version as a learning tool. One changes a number
on a color channel and can see the result immediately.

But I could also have another version, with one-line code entry
or use of the ColorPicker widget, a choice of vector images , and the
ability to make cards with different messages...🤔

                                            *     *     *

Things are getting easier. Color is a data type; and there
is a color.invert() method that - oh yes - gives the
color complement. See all this in action below with a Switch
button:



                           
                                                                         *     *      *


Friday, December 20, 2019

Decimal

Sometimes, I get overwrought. The format code works
fine to set decimals:


Today, working on getting stylesheets going.

                                                         *     *     *

Java recommeds using hexadecimals for defining color values
in a visual. There are good reasons for this: my present set-up with
each color channel at one decimal means there is a 23 range of error
on each. Below:


                                                      *     *     *

Dec 21 is the first day of winter - and longer days - and I'm ready
for it!!



Thursday, December 19, 2019

MoreMath

I'm a math fiend in the morning: solved yesterday's problem so that
the user can specify his color from the ColorPicker visual, the rgb
controls, or HSB, and output the complementary color rgb.




*     *     *


Hue runs 360, from red; saturation is a percentage from white; brightness a 
percentage from black.

source: GoogleTranslate from German-language Wikipedia.

                                                             *     *     *



The code for the rectangle fill has to be entered from rgb values
between .1 and 1:


The Bear image requires the creation of an ImageViewer, which is added by the
GridPan.