Tuesday, July 15, 2025
C# note
https://github.com/markjprice/cs10dotnet6
1. naming conventions
Camel case cost, orderDetail, dateOfBirth -> Local variables, private fields
Title case aka Pascal case String, Int32, Cost -> Types, non-private fields, and other members like methods
2. double vs decimal
double is not accurate but the decimal type is accurate because it stores the number as a large integer and shifts the decimal point.
decimal c = 0.1M; // M suffix means a decimal literal value
decimal d = 0.2M;
if (c + d == 0.3M)
{
Console.WriteLine($"{c} + {d} equals {0.3M}");
}
3.
The Debug class is used to add logging that gets written only during development.
The Trace class is used to add logging that gets written during both development and runtime.
Debug.WriteLine("Debug says, I am watching!");
Trace.WriteLine("Trace says, I am watching!");
In Visual Studio, navigate to View | Output and make sure Show output from: Debug is selected.
4.
xUnit was created by the same team that built NUnit but they fixed the
mistakes they felt they made previously. xUnit is more extensible and has better community support.
Saturday, July 12, 2025
The state of presence
Raise the concern for The power of now, Chapter 5 The state of presence. "I am that I am"
Paul's answer/comment:
There's just one now. It's not the case there are a lot of now moments.
Take movie/screen as the example. For the characters, they have no idea and cannot realize they are just reflection of the screen pixels. Time is illusion. It seems like everything changes but the screen is still the screen. Nothing matters.
Consciousness/Now is the screen, and you are the characters.
Quote for most people: The mind is a cage with no prisioner.
Quote for the seeker: Nothing happens.
Saturday, July 5, 2025
Moving deeply into the now
Everything is honored, but nothing matters. Forms are born and die, yet you are aware of the Eternal underneath the forms. You know that nothing real can be threatened. When this is your state of being, how can you not succeed? You have succeeded already.
The power of now
Eckhart Tolle
Thursday, July 3, 2025
Menu: Sausage Potato and Chicken Wing
For 3 people
1. Medium Heat with few olive oil into the pan, put 6 Hot Italian port sausages into the pan around 5 min per side. Make sure the fat is burned out. Poke some holes and add few olive oil after the heat is turned off
2. Put 9 chicken wings, wash and cut to the bones
3. Wash and cut potatos and Sausages and pour leftover oil into the mixing, add few olive oil
4. Put 3 tea spoon salt, a few black pepper and Italian herbs, mix thoroughly
5. Wrap Pan with Aluminum foil and put evenly the materials and put aluminum foil (leave some space).
6. Turn on Oven Bake, 425F. After the prehat, set timer to 50 minutes
Copywright @Paul
Subscribe to:
Posts (Atom)