#book: "Atlas Shrugged" by Ayn Rand
What can we learn from the story of Atlantis by Plato?
Zig Ziglar quote for the night
Not every day is great. Today, was rather rough.
I am adjusting to the time zone shift of 6 hours, adjusting to the keto (sugar-free) diet after the absolute bliss of European cuisine. First day at work after the break. More stuff, uncertainty in life.
At the moment, I was about to shut down the computer for the night, I read this quote by Zig Ziglar:
"
Life is an echo.
What you send out,
comes back.
What you sow,
you reap.
What you give, you get.
What you see in others,
exists in you.
"
And it keeps me from giving up. It motivates me to continue and try harder.
Thanks, Zig, you have been my motivation 30 years ago and you still are today.
Mitologia Słowiańska by Aleksander Brückner
The Philadelphia Story, Casablanca, at al.
kefir
How to syntax color the code inside the blockquote HTML tag?
That is a good, if not easy, problem to solve!
In the result, I would like to take the following code in <blockquote> tag
function fold(initial, desired)
folds = 0 # initial number of folds
achieved = initial # initial thickness
results = []
while true
achieved = achieved * 2 # fold
#if achieved >= desired break end # if you want to exit before achieving
push!(results, achieved) # add to results
folds = folds + 1 # increment
if achieved >= desired break end # if you want to exit after achieving
end
return results
end
and color it by the language-specific keywords to look something like that:
What are the steps I would take?
- In JavaScript, I would find the next blockquote element
- Extract the text from it
- Parse the comments ( from # to the end of the line)
- Parse text by the white space (preserving white space)
- Compare each WORD token to the dictionary of the reserved word
- Do something about variable names
- Do something about variable values
- Wrap reserved words in <span color> tags
- Re-assemble to content of the <blockquote>
Since this is a several-evenings project, I will leave it for later.
If you are doing this, or have done something similar, please let me know in the comments.
How to calculate number of paper folds to get thickness equal to distance to the moon?
I wanted to try how a programming exercise would translate to a blog post.
I opened Brilliant.com and the first exercise was a puzzle of folding paper. I decided to solve it using Julia language.
How thick is a sheet of printer paper?
For this exercise, let's assume 0.097mm to 0.1mm depending on the "weight" of the paper.# define known variables
building = 828 # units: m -- Burj Khalifa building
moon = 391000000 # units: m; distance to the moon
sheet = 0.1 / 1000 # unit: m -- thickness of 100 sheets is 1 cm
function fold(initial, desired)folds = 0 # initial number of foldsachieved = initial # initial thicknessresults = []while trueachieved = achieved * 2 # fold paperif achieved >= desired break end # check if time to exit the looppush!(results, achieved) # add to resultsfolds = folds + 1 # incrementendreturn resultsend
results = fold(sheet, moon) # replace moon with building
folds = size(results)[1] # size is a tuple, get first element
thickness = results[folds] /1_000_000
print("We used $folds to get $thickness thousand km.")
println()
data = results ./ 1000.0 # data need to be Array{Float64, 1}, in km
increments = size(results)[1]
using Plotsusing PlutoUI
How to create a slider in Julia?
@bind slider_ui Slider(1:increments) # one widget per cell
How to create a drop-down menu in Julia?
@bind plot_type Select(["scatter","line","bar"])
How to draw a simple diagram to visualize the data?
plot(data[1:slider_ui],seriestype=Symbol(plot_type),title="x=$slider_ui folds, y=km, $plot_type plot")
So, what is the number of folds to get to the moon?
How to add Facebook LIKE, Recommend, and Share buttons to your Blogger?
How to generate Facebook CODE specific to my site?
1. Visit the following site and choose the options you like.
https://developers.facebook.com/docs/plugins/like-button/
How to update the Blogger.com page?
WARNING:
- Please backup your blog first, see below.
- I assume that you have some experience with HTML/CSS/JavaScript
2. Open your Blogger.com > Design > Theme > Customize (please backup here) > Edit HTML
3. Control-F to find: <body
4. Paste the first script provided by Facebook
<body expr:class='"loading" + data:blog.mobileClass'>
<!-- START Facebook buttons Recommend and Share -->
<!-- https://developers.facebook.com/docs/plugins/like-button/ -->
<div id='fb-root'/>
<script async='async' crossorigin='anonymous' defer='defer'
nonce='Om0b5IFR'
src='https://connect.facebook.net/en_US/sdk.js#xfbml=1&
version=v14.0&appId= SOMETHIG FOR YOU &autoLogAppEvents=1'/>
<!-- END Facebook buttons Recommend and Share -->
5. Control-F to find: post-icons
6. Paste the second part of the script generated by Facebook
<!-- START Facebook buttons Recommend and Share -->
<br/><br/>
<div class='fb-like'
data-action='recommend'
data-layout='button_count'
data-share='true' data-size='large'
data-width=''
expr:data-href='data:post.url'
/>
<br/><br/>
<!-- END Facebook buttons Recommend and Share -->
</span> <span class='post-icons'>
Please note that I replaced the URL you provided to Facebook with expr:data-href='data:post.url'
This will load the given post's URL and not the static link you provided.How to Write a novel Using the Snowflake Method? by Randy Ingermanson
1000cc
Let's call it vitamin K6.
You say, I overdose, 600cc would be plenty, I know, guilty.
What is really the cause of the heartburn?
What is the TRADITIONAL definition of "heartburn"?
Heartburn is also called acid reflux, or GERD.
If you look in the number of dictionaries you will find something similar to this:
"A burning sensation, usually in the middle of the chest, caused by the reflux of acidic stomach fluids that enter the esophagus."
This is both correct and EXTREMELY misleading at the same time.
If you look for remedies you can find the following WRONG ways to treat it:
- Drink more water - which will dilute the acid
- Drink a mixture of baking soda and water - which will neutralize the acid
- Avoid lying down - this is equivalent to "don't stand on a broken leg"
- Chew a chewing gum - sugar in the gum and saliva will make the stomach more alkaline
- Eat bananas - same as above
- Avoid wine, etc.
- Tums - calcium carbonate - antiacid, the name says it all
- Zantac - which I took for years - may cause CANCER
- etc. the list can be LONG
What is the correct definition of "heartburn"?
If I was to write it, it would be:
A burning sensation in the chest that is caused by LOW acidity of the stomach (achlorhydria) that in turn is causing an inability to close the stomach entrance (Pyloric Sphincter) from the esophagus, causing acid reflux.
- A diet DEVOID of any processed SUGAR, high in organic leafy vegetables, olive oil, and balsamic vinegar while occasional whole organic fruit is advised.
- A glass of water with a teaspoon (2.5ml) of organic apple cider vinegar
It boils down to keeping a healthy microbiome (controlling yeast such as Candida albicans) and sufficiently high acid levels (1-3 PH) in your stomach.
My personal observation is that I do not have any old GERD/esophagus symptoms after changing my diet.
You can learn more from Dr. Berg on YoutTube:
How do I use Google Keep as a notepad for remembering anything?
The world's oldest trees reveal the largest solar storm in history
How to adjust the page width with CSS?
I am adjusting this blog to scale width dynamically.
I am focusing on the desktop size as the mobile has a separate CSS code which works well.
What are the most popular Desktop display resolutions?
In 2022, the global statistics for the Desktop and Tablet display width are the following:
width x height | global usage % |
1920×1080 | 21.5% |
1366x768 | 16.7% |
1536x864 | 10.6% |
1280×720 | 5.8% |
1440x900 | 5.4% |
768x1024 (flipped to portrait) | 3.8% |
like anything in life, it will require try-and-error practice.
// START HORIZONTAL / WIDTH SIZING SECTIONbody {width: 95%;//max-width: max-content;margin: auto;}.columns-inner { // container that hold both main and right columnswidth: 100%;min-width: 670px; // number above which the content starts sliding beyond RIGHT margin of the browser}.column-center-outer {width: 75%;}.column-right-outer {width: 25%;min-width: 14.1em; // empirically derived, moves the RIGHT colunm to the BOTTOM if it shrinks to less than that}// END HORIZONTAL / WIDTH SIZING SECTION
What were the results of the width adjustments?
Summary
- Statistics are taken from https://gs.statcounter.com/
Younger You: Reverse Your Bio Age and Live Longer, Better by Kara N. Fitzgerald
What is the definition of anthropology?
Photoshop King Takes Photo-Editing Requests Way Too Literally
I usually do not publish jokes, but this one has to do with Photoshop skills and it is really witty:
https://constative.com/lifestyle/photoshop-demands/64/
Questions and Basic English Sentence Structure for NLP.
When working on machine learning (ML) for natural language processing (NLP), we have to understand the relationships between the parts of the statement.
My personal interest is in the question-answer pairs because I am working on the bot answering the questions. If you know me I am not in the idle chat.
Let's take an example sentence.
text = "I went to the Home Depot store, to buy the weed-cutter line because I have to go Up North to cut the tall grass and bushes."
Now let's ask ourselves a few questions.
Who is doing the work?
The subject (S) of this sentence is "I".
What is being done?
The verb (V) of this sentence is "went".
What is the tense of this sentence?
The sentence is in the "past simple".
Where is the action located?
What is the Subject-Verb-Complement(SVC) English sentence structure?
The Subject-Verb-Complement or SVC, as it is commonly abbreviated, is one of a handful of basic English sentence structures.S <-- who is doing -- -- what is done --> V -- where is done --> C
What are the next steps?
How to add a new font to your HMML pages using the Google Fonts service?
When designing a Web page, it is crucial that the fonts we choose actually show up for the viewer.
In order to do that we have to ensure the right font is being downloaded to the viewer's browser.
How can I find and download fonts?
Usually, you would find and download the font you like from the Internet, then post it on your Web server and reference it on the given page.
In the case of the Blogger, I do not know how to do that, but I use a handy service provided by Google Fonts that will hos the fonts for me.
How do I implement a font into my page?
Here are the simple steps (refer to the images)- Open Google Fonts and find the one you like, in my case Garamond.
- Select a couple of variants in my case:
- regular 400 weight
- regular 400 weight, italic
- bold 700 - On the RIGHT panel, a <link> is created, copy it.
- Pase the <link> into your HTML template HEAD section.
- Please note the proper usage for the CSS rules:
font-family: 'EB Garamond', serif; - Update your body HTML tag with the
Opening Blogger Theme > Edit HTML
Example of the LINK tags
<!-- START: Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous" />
<link href="https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet" />
<!-- END: Uki's changes -->
</head>
NOTE: My code differs from that provided by Google Fonts in order to FIX a couple of the parser problems:
- Attribute name "crossorigin" associated with an element type "link" must be followed by the ' = ' character.
- The reference to entity "display" must end with the ';' delimiter.
How to set up the body CSS rules
body {
font-style: normal;
font-weight: normal;
font-family: 'EB Garamond', serif; // from "Google Fonts" service
font-size: 1.2rem; // 120% of browser setting, because bigger is better
color: #6f6f6f;
background: $(body.background); // mountains
}
Design Tips
- Do not use more than a couple of fonts on the page,
in my case, I use Garamond for writing and MONO for CODE samples. - Identify your page's font in the body CSS and nowhere else,
other tags can change the weight (normal, bold) and size 1.6rem
Share it
Uki D. Lucas. 2022. http://uki.blogspot.com/2022/07/fonts.html
References
- Google Fonts: Garamond:
https://fonts.google.com/specimen/EB+Garamond?query=Garamond
What is a body fat percentage for a healthy man 5'10"?
My favorite quotations..
“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.” by Robert A. Heinlein
"We are but habits and memories we chose to carry along." ~ Uki D. Lucas
Recommended pages
Popular Recent Articles
-
O'REILLY 201 0011 031 10110100180 000110111 01100041 001100010010000 5011011001010 1101110011 000100000 00000 10 1000012 Escaping the Bu...
-
I have noticed a very unsettling statistic on my blog. This prompted a fascinating question about AI, blogs' future, and maybe even the...
-
Installation of Java on Pi is easy, you can ssh to your Pi remotely and just execute: pi@raspberrypi ~ $ sudo apt-get update && su...
-
Epiphany is one of these interesting words that can mean so much. For me it means the crossroad where I chose the road less travelled. The r...
-
I progressively cut my hair shorter and shorter. Now, I just came back from the swimming pool with Lili, so it is a mess.
-
Done working with your Beagle? You don't want to to just yank on the cord, you can shutdown your BBB in couple ways: 1) press "powe...
-
In this tutorial we will discuss upgrading Maven on Mac OS X. While trying building with Maven I was getting errors related to version numbe...
-
Unix time date format is used in many applications, including Yahoo finance. using Dates, Printf unix_date = @sprintf("%.0f", Date...
-
Creating HTML anchor tab for email with subject: <a href="mailto:YourName@me.com?subject=Hi" >email link </a>