Wednesday, August 16, 2023

Friends - Jerry

 Um, honey, you do realize that we don't keep the women's lingerie here in the office?

Rachel, I need the Versachi invoice

Thanks, it's ah, Gaelic, for 'Thy turkey's done.'

Oh, nothing, he’s just goofy like that, I actually, hardly notice it anymore.

https://www.youtube.com/watch?v=98p1Ld3oXOU

Saturday, July 29, 2023

vocabulary

 

exodus

insomnia

euthanasia

penultimate

sapphire

sacrosanct

thyme

lucid

unadorned

prose

myopic

elusive (vs palpable)

contentment

maniac

mantra

transcend

privy

ebb

reflux

frugal

venerate

reverential

reverence

endow

incense

spar (boxing)

venereal

indulgence

dementia

alzheimer

zucchini

predicament

cosmetic

patron

devastated

concierge

intersperse

dread

loathing

loadthsome

annihilation

peculiar

pristine

marvel

palpable (vs elusive)

eon

perpetual


Wednesday, July 19, 2023

breathe and flow embark

 Stumble across:

1. Stumble across this video

2. I stumbled across this book by chance.

We don't need any props today.

Feel your rib cage expand and exhale gently

3. There shouldn't be any feelings of pain or numbness or tingling.

4. It takes the weight off the outside cartilage of the wrist you can paddle out the legs one leg at a time

5. stand one vertebrae at a time

6. begin to bend the arms for chaturanga

7. in the body the asanas

8. we are going to be doing breath work exercise called pranayama this one in particular is nadi shodhana

9. before we come into shavasna

10. we'll see you in tomorrow's video for day two with love and gratitude Namaste

Saturday, June 10, 2023

English

 

Jacob: It's so sad to see them controlled by the phone

Forgive them for they know not what they do



Saturday, May 20, 2023

C# 10 in a nut shell note.txt

 1.

//download https://www.linqpad.net/

dotnet new console -n MyFirstProgram //cannot use Console

cd MyFirstProgram

dotnet run MyFirstProgram 

//or run the below if just want to build without running

dotnet build MyFirstProgram.csproj


2. All C# types fall into the following categories:

Value types, Reference types, Generic type parameters, Pointer types


3.

Indices: char secondToLast = vowels[^2];

Ranges: Ranges let you "slic" an array: char[] lastThree = vowels[2..];

C# supports "ref" and "out", "in" (cannot be modifierd by the method), "params" modifier for the parameters.

Also can have default value, named arguments

Ref Locals: int[] numbers = {0,1,2,3,4}; ref int numRef = ref numbers[2]; when we modify numRef, we modify the array element

string s1 = null;

string s2 = s1 ?? "nothing"; /s2 evaluates to "nothing"

myVariable ??= someDefault; //equivalent to if(myVariable ==null) myVariable = someDefault;

StringBuilder sb = null;

string s = sb?.ToString(); //No error; s instead evaluates to null

string s = sb?.ToString().ToUpper();//No error; s instead evaluates to null

string foo = null;

char? c = foo?[1];//c is null

switch on types: switch(x) { case int i: ... case string s:...case bool b when b == true: ... default:...}

readonly prevents change after construction: static readonly DateTime StartupTime = DateTime.Now;

const: evalution occus at compile time: public const string Message = "Hello World"; const can also be declared local to a method.

local method: you can define a method within another method.

Deconstruct has one or more out parameters.

var rect = new Rectangle(3,4);

(float width,float height) = rect; or var (width, height) = rect;

Bunny b1 =  new Bunny{Name="Bo, LikesCarrots=true};

A static constructor executes once per type than once per instance. A type can define only one static constructor, and

must be parameterless.

You can also define module initializer which execute once per assembly.

Finilizers are class-only methods before the garbage collector reclaims the memory for an unreferenced object. //difference with deconstruct

partial types and partial methods


4.

int count = 123;

string name = nameof (count);

Asset a = new Asset();

Stock s = a as Stock;// s is null; no exception thrown

You can introduce a variable while using the is operator:

if (a is Stock s) Console.WriteLine(s.SharedOwned);

virtual->override

abstract->override

sealed: prevcent being override

GetType is evaluated at runtime, typeof is evaluated statically at compile time.



Wednesday, May 10, 2023

ChatGPT and C# are so cool

 ChatGPT and C# are so cool

I just begain to learn C#, thought it may need me one week to complete the below, but it only took me 10 mins



Tuesday, May 2, 2023

MAC M1 C# development

 1.

There's M1 version Visual Studio but I prefer to use the Visual Studio in the Windows 11 (Parallel Desktop)

2.

MS SQL Server by default does not support arm CPU, can install a docker image based on this document

https://database.guide/how-to-install-sql-server-on-an-m1-mac-arm64/

3.

Can install MS SQL Server Management Studio on PD Windows 11, and restore database AutoLotDocker.bak

Need to copy the file from the host to the docker use "docker cp" command

4. After that can compile and run the C# code to connect to the MS SQL Server database