Wednesday, April 8, 2026

Good people are found, not changed

之前写邮件不知道“只筛选,不改变”用英语该怎么表达,今天读 Jim Rohn 有一句: Good people are found, not changed. 塞涅卡有句名言:人们对钱财斤斤计较,对时间却挥霍无度。 我有两个计算机学位,曾在望京的互联网公司做过程序员

Saturday, March 7, 2026

C# 12 and .NET 8 note

C# 12 and .NET 8 1. https://github.com/markjprice/cs12dotnet8 2. The companion book, Apps and Services with .NET 8 3. code --list-extensions Visual Studio Code Extensions: C# Dev Kit 4. dotnet --list-sdks dotnet --info dotnet new console --use-program-main dotnet run 5. namespace doesn't require the folder structure like Java, can remove namespace com.t1; and ran it directly dotnet new sln --name Chapter01 dotnet new console --output HelloCS dotnet sln add HelloCS dotnet help new 6. Console.WriteLine($"Namespace: {name}"); Console.WriteLine("Value is {0}",19.8); #error version 7. Scott Hanselman from Microsoft has an excellent YouTube channel about computer stuff they didn’t teach you at school: http://computerstufftheydidntteachyou.com/. 8. C# keywords use all lowercase. Although you can use all lowercase for your own type names, you should not. With C# 11 and later, the compiler will give a warning if you do. 9. You must prefix it with the @ symbol to use a verbatim literal string, as shown in the following code: string filePath = @"C:\televisions\sony\bravia.txt"; 10. Raw string literals start and end with three or more double-quote characters, as shown in the following code: string xml = """ Mark """; 11. float realNumber = 2.3f; double anotherRealNumber = 2.3; The double type is not guaranteed to be accurate decimal c = 0.1M; // M suffix means a decimal literal value decimal d = 0.2M; object height = 1.88; // Storing a double in an object. object name = "Amir"; // Storing a string in an object. int length2 = ((string)name).Length; dynamic something;//has impact on performance Console.WriteLine($"something is a {something.GetType()}"); 12. Local variables are declared inside methods, and they only exist during the execution of that method. Once the method returns, the memory allocated to any local variables is released. This happens at compile time so using var has no effect on runtime performance. 13. 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. 14. Constant: The data never changes. The compiler literally copies the data into any code that reads it. Read-only: The data cannot change after the class is instantiated, but the data can be calculated or loaded from an external source at the time of instantiation. 15. private The member is accessible inside the type only. This is the default. internal The member is accessible inside the type and any type in the same assembly. protected The member is accessible inside the type and any type that inherits from the type. C# 11 introduced the required modifier. If you use it on a field or property, the compiler will ensure that you set the field or property to a value when you instantiate it. 16. When a parameter is passed into a method, it can be passed in one of several ways: By value (this is the default): Think of these as being in-only As an out parameter: Think of these as being out-only.They must be set inside the method By reference as a ref parameter: Think of these as being in-and-out. As an in parameter: Think of these as being a reference parameter that is read-only. 17. Tuples are an efficient way to combine two or more values into a single unit. public (string, int) GetFruit() { return ("Apples", 5); } (string, int) fruit = bob.GetFruit(); WriteLine($"{fruit.Item1}, {fruit.Item2} there are."); You can explicitly specify the field names: public (string Name, int Number) GetNamedFruit() { return (Name: "Apples", Number: 5); } var fruitNamed = bob.GetNamedFruit(); // Deconstruct the return value into two separate variables. (string name, int number) = bob.GetNamedFruit(); // You can then access the separate variables. WriteLine($"{name}, {number}"); 18. Local functions are the method equivalent of local variables. In other words, they are methods that are only accessible from within the containing method in which they have been defined. In other languages, they are sometimes called nested or inner functions. 19. A property is simply a method (or a pair of methods) that acts and looks like a field when you want to get or set a value, but it acts like a method, thereby simplifying the syntax and enabling functionality, like validation and calculation, when you set and get a value. 20. public class ImmutablePerson { public string? FirstName { get; init; } public string? LastName { get; init; } } public record ImmutableVehicle { public int Wheels { get; init; } public string? Color { get; init; } public string? Brand { get; init; } } ImmutableVehicle car = new() { Brand = "Mazda MX-5 RF", Color = "Soul Red Crystal Metallic", Wheels = 4 }; ImmutableVehicle repaintedCar = car with { Color = "Polymetal Grey Metallic" }; Two records with the same property values are considered equal. 21. Stack memory is faster to work with but limited in size. Heap memory is slower but much more plentiful. When you define a type using record struct or struct, you define a value type. This means that the memory for the object itself is allocated to the stack. 22. Publishing a single-file app dotnet publish -r win10-x64 -c Release --no-self-contained /p:PublishSingleFile=true If you prefer the .pdb file to be embedded in the .exe file, embedded 23. from wsl sudo sqlite3 Northwind.db < Northwind4SQLite.sql sqlite3 Northwind.db .tables -- List all tables .schema -- Show all table schemas SELECT COUNT(*) FROM Orders; -- Check if data exists .quit -- Exit 24. The EF Core database providers for SQLite and SQL Server are built on top of the ADO.NET libraries, so EF Core is always inherently slower than ADO.NET. Furthermore, ADO.NET can be used independently for better performance because the EF Core database providers are “closer to the metal.”

Friday, February 27, 2026

道可道,非常道。名可名,非常名。理解

道德经的开头:道可道,非常道。名可名,非常名。老子到了完全开悟的境界,有了完全开悟的体验。同时知道这对普通人来说是很难理解的,单薄的语言也很难描述这个体验。但老子还是想尽量用语言来描述一下。意思是我要讲的这个,不是普通的或者常人理解的可以言说的道。尽量给了一些命名,但不是通常意义上的命名。这个跟金刚经里佛说般若波罗蜜,即非般若波罗蜜,是名般若波罗蜜完全一样的意思。

Tuesday, February 24, 2026

比特币减半周期 202612月做多比特币相关

熊底在减半前约500天(本轮推算2026年12月)。 bitcoin Grok: 是的,这个说法在加密货币社区(尤其是中文圈和一些分析帖)里确实存在,而且有一定历史数据支撑,但它属于一种常见的“周期派”经验总结,而不是严格的铁律。很多人用它来推演比特币的四年减半周期。 你贴的这篇内容核心观点总结如下: 比特币减半形成四年周期(牛熊交替)。 历史减半日期基本准确(2012.11、2016.7、2020.5、2024.4)。 声称“每次减半后到新高约需540天”(前三轮:540天、549天、562天,平均约550天左右)。 因此2024年4月减半后,新高点推算在2025年10月左右。 熊底在减半前约500天(本轮推算2026年12月)。 这个“540天到新高”的说法在社区里流传挺广: 一些Binance Square、TradingView、Reddit和X上的分析帖直接提到过类似数字(比如“减半后540天新高”“549天”“562天”)。 很多人把前三轮从减半日到周期顶点(ATH)的天数统计为540–562天区间,用来类比本轮。 部分中文分析师和KOL(比如币安广场的一些长帖)几乎一模一样地用这个“540天规律”预测2025年10月左右见顶。 但实际情况更 nuance(细微差别): 历史天数确实接近,但不完全统一:不同数据源统计的“到新高”天数有小差异(有的算368–525–549天,有的从底部算起,有的严格从减半日算)。比如有些来源显示2012那轮更快(约368–540天不等,取决于怎么定义“新高”)。 熊底500天前的说法也常见,但更像社区经验法则(“减半前500天买”或“熊底在减半前1年多”),不是精确到月。 本轮已经部分验证又部分偏离:2024减半后到2025年10月确实出现了高点(很多分析认为2025年10月左右的126k左右可能是周期顶),但涨幅递减、机构/ETF影响让周期“变形”,不再是早期那种爆炸式涨幅。 现在(2026年2月)市场已明显转熊,很多机构/分析师认为熊市还在继续,底部可能在2026年某个时间(有说5–10月,有说年底,甚至2027年初),但没人能100%确定12月就是底。 总的来说: 这个“大饼减半后540天新高 + 减半前500天熊底”的框架是社区里很流行的简化模型,有历史数据的粗略支持,也被很多人拿来做推演(包括你看到的这篇)。但它更像“历史押韵”而非精确预测公式——每轮周期都会受宏观、机构、监管等新变量影响而变形。 如果你是参考它做投资决策,建议多看链上数据(MVRV、CVDD、200周均线等)、宏观环境(降息预期)和不同机构的观点组合判断,而不是只靠这个单一“540天”规律。周期还在,但“这一轮不同”的声音也越来越大。

Sunday, February 8, 2026

A New Earth - Preface

1. Is a "new earth" arising, a world where the egoic state of consciousness in its insanely dysfunctional manifestations, both individual and collective, has dissolved or at least subsided, and where humans no longer create unnecessary suffering for themselves, one another, as well as other life forms on the planet? 2. subjugation The subjugation of one race by another, the domination of women throughout thousands of years of patriarchy, and the devaluing of people based on social class are for growing numbers of us nightmares of the past. 3. There is a growing awareness of the intrinsic oneness of everything that exists, so that more and more we are seeing an awareness of and deep concern for our fellow humans, the countless animals that are our traveling companions, and the planet itself. 4. affiliation This diminishment of the ego gives rise to empathy and compassion beyond tribal, racial, national, or religious affiliations. 5. succumb If you stay present and do not succumb to fear, if you do not believe the media when they tell you that you should be afraid, these things will not affect you deeply. 6. Acute Acute crisis and dysfunction always precede or coincide with any evolutionary advancement or gain in consciousness. 7. All life-forms need obstacles and challenges in order to evolve. 8. demise Eventually, the ego brings about its own demise. 9. Make sure the present moment is your friend, not your enemy. Honor it by giving it your fullest attention. Appreciate it by being thankful for it. Become internally aligned with it by allowing it to be as it is. That is the arising of the new earth.

Saturday, February 7, 2026

C# 12 and .NET 8

1. The C# compiler (named Roslyn) used by the dotnet CLI tool converts your C# source code into intermediate language (IL) code and stores the IL in an assembly (a DLL or EXE file). IL code statements are like assembly language instructions, which are executed by .NET’s virtual machine, known as CoreCLR. At runtime, CoreCLR loads the IL code from the assembly, the just-in-time (JIT) compiler compiles it into native CPU instructions, and then it is executed by the CPU on your machine. 2. In the Create a new project dialog, select the C# language

The books read at 2026

The books read at 2026 1. Atomic Habits, Feb 7 2. The Amazing Spider-Man, Mar 13 3. The Archer, Paulo Coelho, Mar 17 Reading it like a meditating 4. The old man and the sea, Mar 27

Sunday, December 28, 2025

Atomic Habits notes

Reading this book reminds me the power of now. Say for the author's introduction chapter, the incident seems very unlucky, but the important is not the life situation, but the response/react to the life situation. Also the author James Clear mentioned should focus on system instead of goal. a. Winners and losers have the same goals. b. Achieving a goal is only a momentary change. c. Goals restric your happiness. When you fall in love with the process rather than the product, you don't have to wait to give yourself permission to be happy. You can be satified anytime your system is running. And a system can be successful in many different forms not just the one you first envision. 1. I hope you'll forgive me if this sounds boastful. 2. Habits are mental shortcuts learned from experience. Theultimate purpose of habits is to solve the problems of life with as little energy and effort as possible. 3. How to create a good habit: The 1st law (Cue) -> Make it obvious The 2nd law (Craving) -> Make it attractive The 3rd law (Response) -> Make it easy The 4th law (Reward) -> Make it satisfying How to break a bad habit: Inversion of the 1st law (Cure) -> Make it invisible Inversion of the 2nd law (Craving) -> Make it unatrractive Inversion of the 3rd law (Response) -> Make it difficult Inversion of the 4th law (Reward) -> Make it unsatisfying 4. Make it attractive a. After I pull out my phone, I will do ten burpees (need). b. After I do ten burpees, I will check Facebook (want). 5. Humans are herd animals. We want to fit in, to bond with others, and to earn the respect and approval of our peers. Such inclinations are essential to our survival. For most of our evolutionary history, our ancestors lived in tribes. Becoming separated from the tribe - or worse, being cast out - was a death sentence. "The lone wolf dies, but the pack survives.".

Tuesday, December 16, 2025

生活的精彩,从来不在别处,而在你愿意用心感受的当下。

Friday, December 5, 2025

in-plant 种植牙

in-plant 种植牙 yujing dental 7163 Yonge St 243 #241, Thornhill, ON L3T 0H1 (905) 597-1809 416-4969737 Adin/Nobel Nobel Active/PCC/PMC https://www.xiaohongshu.com/explore/67aed4fc00000000290389fa?xsec_token=ABnw6g9FNFmEzpNuxVkEMf5pOczebuKJ-FxpxRr5BMHMk=&xsec_source=pc_search&source=unknown Warrenty 5-10Y ➕全瓷冠 https://www.xiaohongshu.com/explore/69197c8700000000040297f9?xsec_token=ABkPkqMAsOghwhmVfklN5Pk2I4Uaat7gvqiI_sLx0lu10=&xsec_source=pc_search&source=unknown

自己换雪胎注意事项

1. 停在宽敞的平地,挂P档,拉手刹 2. 略微松开要换的轮胎螺母 3. 千斤顶顶起离地3cm左右 4. 完全卸下螺母,取下轮胎 5. 装上雪胎,注意rotation方向向前,注意轮胎是否需要调换RR/LF... Acura RDX2011扭矩:80ft-lbs 6. 卸下千斤顶换下一个 7. 一周后检查一下扭力矩重新拧紧 Items: 1. Breaker Bar,Aisle 28, Main Level,24 inch,$24.99 https://www.canadiantire.ca/en/pdp/maximum-1-2-in-drive-flexhead-breaker-bar-nickel-chrome-plating-24-in-0589982p.html?rq=breaker+bar 2. Torque Wrench $50.52 https://www.amazon.ca/dp/B01LX4NIFK?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1

Friday, November 28, 2025

The Power of Now - Chapter 4

1. anesthetic Many people use alcohol, sex, food, work, television, or even shopping as anesthetics in an unconscious attempt to remove the basic unease. 2. moderation When this happens, an activity that might be very enjoyable if used in moderation becomes imbued with a compulsive or addictive quality, and all that is ever achieved through it is extremely short-lived symptom relief. 3. repression It's okay to feel resentful; it's okay to be angry, irritated, moody, or whatever - otherwise, we get into repression, inner conflict, or denial. 4. subservient When you have seen the limitations of your outer purpose, you give up your unrealistic expectation that it should make you happy, and you make it subservient to your inner purpose. Wherever you are, be there totally. If you find your here and now intolerable and it makes you unhappy, you have three options: remove yourself from the situation, change it, or accept it totally. If you want to take responsibility for your life, you must choose one of those three options, and you must choose now. Then accept the consequences. No excuses. No negativity. No psychic pollution. Keep your inner space clear.

Saturday, November 15, 2025

English Culture

1. Float like a cadillac Sting like a beemer Lightning McQueen Parody from Muhammad Ali's famous quote: Float like a butterfly, sting like a bee 2. grim reaper with scythe

Friday, November 14, 2025

Case of the Jeebies

Under the dim sky Are the presence of trees, birds, and cities The rooftops and kids Drugs and homeless people living on subway streets This is what I see of the world This is what I see of the world People, a lot of persons In jackets, hats, walking, driving But always in their eyes they hide behind A clutter of thoughts so important Like only in total ignorance one can do Maybe upon their bed of death When finally they'll shake their heads And look around for the last and first time Welcome to Life, my friend, but welcome to death I'm just sorry you couldn't see How beautiful your simple room is on a Saturday morning That tree that was always there Standing, waitiing for your attention What joy it can be just moving around and going to bed The perfect stillness of night when even the sun has closed its eyes And countless more things that you had missed If only you had paid attention If only you were simpler and didn't mind nothing happening If only those thoughts were really so important If only I had written a better poem or two If only the people around you weren't also consumed Then everything would have been different But for now, nothing still is, so won't you fly free bird into eternity On behalf of you I promise to pass on the message for a new world by Paul Peng, 11/14/2025

Monday, November 3, 2025

C# ssl debug

The .NET Framework 4.8 does not have a direct built-in equivalent to Java's -Djavax.net.debug=ssl:handshake for enabling SSL/TLS handshake debugging from the command line or via a simple configuration switch. However, you can achieve similar diagnostic output using the following approaches: 1. Enable System.Net Tracing (Recommended for .NET Framework) You can configure System.Net tracing via your application's app.config or web.config file to log detailed information about network activity, including SSL/TLS handshakes. Example app.config: xml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ⌄ ⌄ ⌄ ⌄ ⌄ ⌄ ⌄ ⌄ ⌄ This logs System.Net and System.Net.Sockets activity to a file (network.log). While it doesn’t dump raw TLS handshake bytes like Java, it does show certificate validation, cipher suites negotiation (indirectly), and connection errors. For more TLS-specific diagnostics, combine this with Windows-level tools (see below). ⚠️ Note: Tracing impacts performance—use only for debugging. 2. Use Windows Schannel Logging (OS-Level SSL Debugging) .NET Framework uses the Windows Schannel (Secure Channel) security package for TLS. You can enable Schannel event logging via the Windows Event Log: Open Event Viewer → Applications and Services Logs → Microsoft → Windows → Schannel. Right-click Operational → Enable Log. Reproduce your SSL issue; handshake errors and details will appear here.

Monday, October 13, 2025

Download youtube to mp3 in bulk

1. Download the runnable yt-dlp yt-dlp 2. Pass the music list and run the command to download all: yt-dlp --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output "%(title)s.%(ext)s" --yes-playlist "https://www.youtube.com/playlist?list=PLKTlJ5ZJ4UL5PQexL4eUTJ0fGzEFDR7wU"

Sunday, October 5, 2025

The Power of Now - chapter 3

1. morrow Take no thought for the morrow; for the morrow shall take thought for the things of itself 2. plow Nobody who puts his hands to the plow and looks back is fit for the Kingdom of God 3. reverence A knowing that does not destory the sacredness and mystery of life but contains a deep love and reverence for all that is. 4. unwittingly Be alert as you practice this so that you do not unwittingly transform clock time into psychological time. 5. Vibrancy Your life then loses its vibrancy, its freshness, its sense of wonder. 6. obsession The mind then creates an obsession with the future as an escape from the unsatisfactory present. 7. deadening You are leaving behind the deadening world of mental abstraction, of time. 8. incisive Should a situation arise that you need to deal with now, your action will be clear and incisive if it arises out of present-moment awareness. 9. imbued When you act out of present-moment awareness, whatever you do becomes imbued with a sense of quality, care and love - even the most simple action. 10. consecrated It is described as the path of "consecrated action.". 11. grim Being free of psychological time, you no longer pursue your goals with grim dtermination, driven by fear, anger, discontent, or the need to become someone. 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 - chapter 2

1. obnoxious Some pain-bodies are obnoxious but relatively harmless, for example like a child who won't stop whining. 2. perpetrator Once the pain-body has taken you over, you want more pain. You become a victim or perpetrator. 3. vehemently You are not conscious of this, of course, and will vehemently claim that you do not want pain. 4. momentum Although you are no longer energizing it through your identification, it has a certain momentum, just like a spinning wheel that will keep turning for a while even when it is no longer being propelled. 5. strive So they strive after possessions, money, success, power, recognition, or special relationship, basically so that they can feel better about themselves, feel more complete. Death is a stripping away of all that is not you. The secret of life is to "die before you die" - and find that there is no death.

The Power of Now - chapter 1

1. elation With astonishment, disbelief, and elation, he saw that the box was filled with gold. 2. conjure The word enlightment conjures up the idea of some superhuman accomplishment, and the ego likes to keep it that way, but it is simply your natural state of felt oneness with Being. 3. conviction: a strong persuasion or belief By misuse, I mean that people who have never even glimpsed the realm of the scared, the infinite vastness behind that word, use it with great conviction, as if they knew what they are talking about. 3. affliction Not to be able to stop thinking is a dreadful affliction, but we don't realize this because almost everybody is suffering from it, so it is considered normal. 4. trancelike It is not a trancelike state. Not at all.There is no loss of consciousness here. THe opposite is the case. 5. topple The mind is then toppled from its place of power and Being reveals itself as your true nature. 6. impulse The mind then gives form to the creatvie impulse or insight. 7. subliminally They have a strong emanation o anger that certain people pickup sublinally and that triggers their own latent anger. 8. exertion ...when the mind is rendered "speechless." sometimes triggered by great beauty, extreme phyical exertion, or even great danger. 9. aversion As long as I am my mind, I am those cravings, those needs, wants, attachments, and aversions, and apart from filled potential, a seed that has not yet sprouted.