Tuesday, February 28, 2023

All Done

 All done, for the functionality. That was Django #4.

                                                            

So Django basically write one's html code, so that things show up as we wish. 

CRTL + u, to see the html page...


Looked at, here:

                                                           


The reverse term - from an imported package add-on to Django - is useful here. Pressing

the back-button leads back to the home page.

                                                                                                                     

                                                                     


                                       

 One can easily add or remove fields from a view.


                                                             


It's like working with html. Here, the title of the page was changed.

                                         *     *     *

Have started reading on Carl von Clausewitz, On War. Below, the French Wikipedia overview

of the work:

On War (German: Vom Kriege) is a treatise on military strategy written by the Prussian general Carl von Clausewitz. Written mostly after the Napoleonic Wars, between 1816 and 1830, and left unfinished at his death in 1831, the work was compiled and published posthumously between 1832 and 1835 by his wife, Marie von Brühl.


On War is still the subject of periodic rediscoveries: French and German strategists before the First World War; Lenin and Mao Zedong meditating on the revolutionary war; Raymond Aron on strategy in the nuclear age; With each new strategic epoch, the teachings of the Prussian writer shed light on military theory.


Clausewitz forcefully demonstrated the compenetration of the political and the military in the act of war. Its second main idea is that of "absolute war": the dialectic proper to military struggle implies the "ascent to extremes" and the search for the annihilation of the adversary. Ideas that do not exhaust the richness of a book, On War, which stands out as one of the most influential treatises on military strategy ever written.

Background

Before being considered the highest figure in world military thought, Carl von Clausewitz was a soldier. As a cadet during the Rhine campaign of 1793–1795, it was as a young officer that he witnessed in Jena in 1806 the military collapse of Prussia, struck down by modern warfare. Deeply wounded in his patriotism, he conceived and organized with Gerhard von Scharnhorst and August von Gneisenau the reform of the Prussian army. From 1812 to 1815, first in the service of the Tsar as long as Prussia was neutral, he participated in the war in Russia and then in the campaigns that led to the final defeat of Napoleon.


After the war, he became director of studies at the Berlin Military Academy and began writing On War. The writing of this book occupied Clausewitz for 16 years, during which he devoted himself to the thought of war with passionate rigour. Perceiving the need to consider war in a global way and to establish the link between military events (the Napoleonic campaigns) and politics (the French Revolution), he made the rigorous conceptualization of this relationship the basis of his theory.


Content

Analysis

The conceptual analysis of war is the subject of Book I. Book II sets out the scope and limitations of a theory of war. Books III to VII provide a rational examination of strategic problems.


Reduced to its abstract essence, war is comparable to a duel, an act of violence designed to force the adversary to carry out one's will.


The means par excellence to achieve this goal is the disarmament of the enemy, and the dialectic of struggle irresistibly leads to the "ascent to extremes". But experience, i.e. history, rarely offers the example of wars fought in the Napoleonic way, that is, of "absolute wars", where violence is unleashed in accordance with the concept. In reality, the duel is carried out by states, which proportion military objectives to political aims; for instruments they use armies, complex machinery whose constraints of use Von Clausewitz designates by the notion of "friction". War does not consist of a single blow without duration, but takes place in time and space; The intrinsic superiority of defense over attack favors the frequent suspension of the act of war.


Real war is not an autonomous reality, but a fragment of politics. Politics designates, on the one hand, the objective set of institutions, social and economic forms that give their general style to conflicts and, on the other hand, the subjective set of intentions pursued by governments in fighting. Finally, each war is absolutely singular and reveals the variable interplay of three principles: a political principle, a military principle, a popular principle. At the time of On War, the political and social movement of the French Revolution prodigiously amplified the popular and passionate element of the war, bringing it closer to its absolute form.


In Book II, the author rejects any claim to construct a positive doctrine of war. According to him, this would be to neglect the moral greatness with which the war is entirely penetrated: the talents of the warlord, the warlike virtues of the army, the state of mind of the population, any psychological element that comes into play and is not measured in numbers. Moreover, the face-to-face with an intelligent adversary who reacts, the uncertainty of all the data, the "fog of war", make it very difficult to constitute a theory that would teach a method of action. It is in the tactical field that it is possible and necessary to codify, to produce procedures and regulations. In fact, when it comes to strategy, theory exists to guide and advise the warlord's intellectual development rather than to actually guide him on the battlefield.


From Book III to Book VII, Von Clausewitz successively addresses strategy in general, engagement, military forces, defense, attack. The concern for conceptual rigour that he manifests is balanced by the permanent preoccupation with reality, with the true fact, with the technical detail. The long considerations, now aged, on the marches, supplies, fortresses, defense of the marshes, etc. which show the constraints exerted on the strategy by the geography and the nature of the military tools of the time, also illustrate the realism of the author.


Tactics and strategy are distinguished in relation to means and ends: the means of tactics is combat, its end victory; the means of strategy is the result of the fighting, with the end of the military objective of the war (Ziel), which does not necessarily merge with the political goal (Zweck). At the end of the Napoleonic era, the armed forces being approximately of the same level in terms of organization and means of combat, it is to numerical superiority that falls the decisive role on the strategic level.


As the elementary material of the act of war, combat, even if it is not fought and is content to speculate its probable outcome, is the ultimate reference, and the destruction of enemy forces the touchstone of all war action. This is why the Prussian strategist insists on the decisive character of the main battle: "center of gravity of the war".


The act of war, finally, takes two fundamental forms which, despite what intuition may suggest, are not symmetrical to each other. Conceptually, the purpose of the attack is to conquer, that of the defense is to preserve. All other things being equal, defense is an inherently superior form, as evidenced by the fact that it is always used by the weaker. This superiority is due to the fact that it benefits from the advantage of the field, and that time works to its advantage: the offensive, when it has not managed to immediately shoot down the opponent, always ends up reaching a climax beyond which the vulnerability of the attacker grows and allows the defense to turn into a counterattack.

Monday, February 27, 2023

Sunday, February 26, 2023

Web_Framework

 Started Codemy django #4

To re-cap, for myself: django is a web framework, using the MVT paradigm.

The model generates a database.

Dynamic HTML templates are  rendered to the User using views.

Model:

Latest template:

                                                                  

From views:

                                                                           

Looks like this:

                                                                        

Allowable urls, for the user interface:

                                                                         


The migration pages are generated by django:

                                                                          


Saturday, February 25, 2023

Beginner

 It's been snowing in unexpected places in California, and I've seen

footage of careening truck traffic going through it. Take it easy, folks.

Quebecers have long experience with winter driving, but even we

wouldn't try that!!


As for the what the preciitation is; below, a beginner introduction. It all depends

how the warm and cold  air are stacked. Below, the warm in red, the cold in

blue:


                                 

source: Wikipedia

Particularly dangerous, the third column. It falls as rain but immediately freezes

on hitting an object...

                                                          *     *     *

Nothing but fun with Codemy"s django #3. Cut out a lot of things from

base.html. And used python to move headings and tags.

                                                                  






Changing the 'models' code has to be followed by makemigrations, and migrate.

This is the project database; not just html.


              The actual title tag is entered from the Admin area, and saved.                                         



Friday, February 24, 2023

Chocolate Season

 


So Tammy L. is doing well: loosing weight at a reasonable clip,

even being told she may no longer need therapy. In her latest

video, has prepared  and frozen healthy meals so that the next time she

binges, she can get back to proper eating more easily.


This is her argument: realistically, she is goimg to binge again at some

point. This time, she will be better prepared. 


Her followers are pointing out this is dangerous thinking, setting herself

up for failiure.


So, how to approach this. As an outsider to the food culture of the Netherlands,

I am not quite sure what foods are available to her. I do notice that there - like 

everywhere else - the supermarkets present an annual rotation of goodies for 

this and that. Like given that Easter is on the horizon, it is chocolate season everywhere. 

Trigger foods for a food addict.


'Le juste milieu' might be in order here. Tammy's diet is terribly meat and potatoes healthy. 

And that will get boring, or maybe just constraining. Realistically, she should allow

a little sugar in her life now and then, on the order of jam on toast with a coffee for

breakfast. Her brain will be happy for a short while, as she has noticed.


But then she will feel bad, and think in a disordered fashion. The probem is not with her;

this is sugar at work. Feel good reaction, but nothing useful going on with body

fuctions. A rush of energy, that diverts to worry and rumination.


She does need to go back to cleaner eating, at the very next meal.


And remind herself of this inevitable reaction, next time she is in the chocolate aisle!!

                                            *     *     *

Wanted to continue with Codemy Django #3 I am currently on Bpttstrap

but the tutorial is two years old, and works from bootstrap #4. No problem;

moving right along...

https://getbootstrap.com/docs/4.0/components/navbar/



Thursday, February 23, 2023

Back

 Lyse is back from L.A. with a sunburn!!


                                             *     *     *
This is very neat: I am styling my blogs with CSS, but not doing any coding.

Just using the Bootstrap starter template. Python then fetches the blog code, and

inserts it in the template:

                                           

                                                                        
                                                                      

                                                                      

                                                                          





Wednesday, February 22, 2023

SBlog_2

Working through tutorial 2:

                                                         


So that is the plunge into django: at this point, requiring a great attention to

detail. One is using both python and html, and learning whayt some of the

built-in features of djano are...Next, editing the blogs!











 

Tuesday, February 21, 2023

Jan_CPI

 The CPI for January 2023 is 153.9

https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1810000401

   

Source : CBC

                                             *     *     *
source : Le Nouvel Observateur, Published on February 21, 2023 

translation: GoogleTranslate/doxa-louise

Anti-West diatribe, withdrawal from the Start treaty… What stood out in Vladimir Putin's speech


Vladimir Putin spoke at length before the Russian Federal Assembly on Tuesday. He accused Ukraine and the West of being responsible for the war and orchestrating the conflict to wipe Russia off the map.

During a SoapOpera speech strongly hostile to Westerners, Russian President Vladimir Putin announced on Tuesday February 21 that Russia was suspending its participation in the New Start agreement on nuclear disarmament and threatened to carry out new nuclear tests if the States States were to proceed first.

“Russia is suspending its participation in the Start treaty ,” declared Vladimir Putin, calling on the Russian authorities to be “ready for nuclear weapons tests” if Washington carries them out first. This treaty, signed in 2010 between the United States and Russia, notably limits the nuclear arsenals of the two countries.

Before the Federal Assembly in Moscow, which brings together the two chambers of the Russian Parliament, Vladimir Putin accused Ukraine of being responsible for the start of the war:

“They are the ones who started the war, and we did our best to put an end to it. »

“A year ago, to ensure the security of our country, to eliminate threats from a neo-Nazi regime that has existed in Ukraine since the 2014 coup, it was decided to carry out a special military operation. And we will settle step by step, carefully and methodically, the objectives that arise in front of us , ”he said, promising to continue his offensive.

Global Confrontation Phase
 
Vladimir Putin again accused the United States and NATO of orchestrating the conflict to wipe Russia off the map. According to the Russian president, “even before the start of the special military operation, Kiev was negotiating with the West for deliveries to Ukraine of air defense systems, combat aircraft and other heavy equipment”. He also denounced "concrete actions: the deployment of NATO or military contingents" on the Russian border.

"The Western elite does not hide its objectives which are to inflict a strategic defeat on Russia, that is to say that a local conflict must enter a phase of global confrontation", affirmed the Russian president before parliamentarians.

“We understand that and we will respond. The existence of our country is at stake. The elites of the West do not hide their objective: to inflict a strategic defeat on Russia, that is to say to finish us off once and for all” , he hammered.

War of Civilization

According to the Russian head of state, Westerners are waging a war of civilization against Russia. "They keep attacking our culture, the Russian Orthodox Church and other traditional religious organizations in our country ," he said.

“Look at what they are doing with their own people: the destruction of families, cultural and national identities, perversion and child abuse, even pedophilia, are declared to be the norm, it is the norm of their life. And priests are obliged to bless marriages between homosexuals. Let them do what they want! »

Vladimir Putin then referred to the “Holy Scriptures and fundamental books of all the other religions of the world”  : “Everything is said there, including that the family is the union of a man and a woman. But even these sacred texts are now being questioned ,” he said.

A senior US official has denounced the "absurdity" of President Vladimir Putin's accusations that the Western threat against Russia justified the invasion of Ukraine. “No one is attacking Russia. There is a kind of absurdity in the idea that Russia was under some form of military threat from Ukraine or anyone else ,” the House national security adviser told reporters  - for the White House - Jake Sullivan.


Monday, February 20, 2023

Turkey

 

Le Monde with AFP

Published today at 7:00 p.m.

In Turkey, a new violent earthquake of magnitude 6.4

The earthquake occurred in the Turkish province of Hatay, the most affected by the previous earthquake of February 6, which killed more than 44,000 people.

An earthquake with a magnitude of 6.4 was recorded Monday evening February 20 in the Turkish province of Hatay (South), the most affected by the earthquake of February 6, which killed more than 44,000 people in Turkey and in Syria, Turkish relief agency AFAD reported.

The earthquake, whose epicenter was located in the locality of Defne, a district located about fifteen minutes by car from Antakya, occurred at 8:04 p.m. (6:04 p.m. in France) and was very violently felt by the Agence France-Presse (AFP) teams in Antakya and Adana, 200 kilometers further north.

According to an AFP journalist on the spot, the quake sparked panic among the population, already hard-hit, and raised large clouds of dust in the ruined city. He saw and heard several sections of already badly damaged building walls crumble and several people, apparently injured, calling for help.

According to AFAD, more than 6,000 aftershocks have been recorded since the 7.8 magnitude earthquake that devastated southern Turkey and northwestern Syria.

Re_open

 Getting my sealegs with django. Finally figured out how to re-open my project,

It comes from an appreciation of what a directory is. A file folder exists for the convenience

of the user, and can contain anything the latter wants. A directory belongs to the computer,

and has its place in how the os organizes things.


First step, then, is to go to the project directory; here, which I have created in the C drive.

                                                                    


I choose the option to open Gitbash. Then checking at every step, I call

up the vitual environment already created, and move into my app. Once I have

access to manage.py, I can run the server. Voila, back into my project.

                                                             


                                                                     *     *     *


                                                                         


                                                                        

                                                                                   
                                                                              
Just like the tutorial. In the second part, tomorrow, one gets to have our posts appear 

in a browser.


What's cool here: the admin area is pre-defined. One just has to use it...

Sunday, February 19, 2023

More

 More Django to come:

https://youtu.be/CnaB4Nb0-R8

                                                                              

Note on django expressions; below says, if there is an error, print 

the contents of the error variable.

                                                


Saturday, February 18, 2023

Hello Moment


                                                                     
Truly a parcours du combattant: learning to use the django module to create

the backend to a website. Here, with Codemy. I had to install a Unix emulator

for windows - Git Bash - and am using the Sublime code editor. It is simpler

for those on a mac because Microsoft has changed the basic commands, while

Apple hasn't. Still, some people -Tech with Tim - use Sublime with windows; 

while others still swear by VScode. I'll just have to take see...


Finished this tutorial:                              

                                                       





                                                                  *     *     *
For a quick reference:

Friday, February 17, 2023

Happy Day

 


News from Lyse and friend Cynthia, in Long Beach California for a three

day music festival, opening today. But the Vibe Fest is not the only thing

happening today; it is also the opening of Mario World at Universal Studios:


https://www.universalstudioshollywood.com/web/en/us/things-to-do/lands/super-nintendo-world


                                              *     *     *

Is it just me; can't seem to find the Consumer Price Index for Canada, January 2023.

from Stats Can





Wednesday, February 15, 2023

Tax Time

 Been working on my Tax return(s).Got Canada 2022 done this afternoon,

and should wrap Quebec 2022 tomorrow morning.



L. A.

MSoft sent me a notice, a few days ago, that they had updated my version of

Bing, and that I could now access Chatgpt. After Lyse left last night, I decided to

test it. Here is my question:

'I am going to Los Angeles tomorrow; what should I wear'.

The first item in my answer  was astoundlingly helpful, on the weather. Below:


 The fashion part of the answer was cute.

https://www.travelfashiongirl.com/what-to-wear-in-los-angeles/


                                                  *     *     *

The YouTube algorithm wasn't sloughing off either.  I do erase my search history

every so often to refresh things, but on a couple days of cruising, had this show up.

Macabre and brilliant: