Friday, May 15, 2026

The Power of Now - excerpt - chapter 3

So once you recognize the root of uncounsciousness as identification with the mind, which of cause includes the emotions, you step out of it. You become present. When you are present, you can allow the mind to be as it is without getting entangled in it. The mind in itself is not dysfunctional. It is a wonderful tool. Dysfunction sets in when you seek your self in it and mistake it for who you are. It then becomes the egoic mind and takes over your whole life. P48, chapter 3 Nothing ever happened in the past; it happened in the Now. Nothing will ever happen in the future; it will happen in the Now. What you think of as the past is a memory trace, stored in the mind, of a former Now. When you remember the past, you reactivate a memory trace - and you do so now. The future is an imagined Now, a projection of the mind. When the future comes, it comes as the Now. When you think about the future, you do it now. Past and future obviously have no reality of their own. Just as the moon has no light of its own, but can only reflect the light of the sun, so are past and future only pale reflections of the light, power, and reality of the eternal present. Their reality is "borrowed" from the Now. P50, chapter 3

Thursday, May 14, 2026

The best way to avoid addiction is simply never to start

川普在接受福克斯新闻采访时曾说过一句话,这句话我是认可的,也值得很多人拿来告诉自己的孩子:The best way to avoid addiction is simply never to start.

The Power of Now - excerpt - chapter 2

Accept - then act. Whatever the present moment contains, accept it as if you had chosen it. Always work with it, not against it. Make it your friend and ally, not your enemy. This will miraculously transform your whole life. P35, chapter 2 So the pain-body doesn't want you to observe it directly and see it for what it is. The moment you observe it, feel its energy field within you, and take your attention into it, the identification is broken. A higher dimension of consciousness has come it. I call it presence. You are now the witness or the watcher of the pain-body. This means that it cannot use you anymore by pretending to be you, and it can no longer replenish itself through you. You have found your own innermost strength. You have accessed the power of Now. P38-39, Chapter 2 Let me summarize the process. Focus attention on the feeling inside you. Know that it is the pain-body. Accept that it is there. Don't think about it - don't let the feeling turn into thinking. Don't judge or analyze. Don't make an identity for yourself out of it. Stay present, and continue to be the observer of what is happending inside you. Become aware not only of the emotional pain but also of "the one who observes," the silent watcher. This is the power of the Now, the power of your own conscious presence. Then see what happens. P40-41, Chapter Only you can do this. Nobody can do it for you. But if you are fortunate enough to find someone who is intensely conscious, if you can be with them and join them in the state of presence, that can be helpful and will acceerate things. In this way, your own light will quickly grow stronger. When a log that has only just started to burn is placed next to one that is burning fiercely, and after a while they are seperated again, the first log will be burning with much greater intensity. After all, it is the same fire. To be such a fire is one of the functions of a spiritual teacher. Some therapists may also be able to fulfill that function, provided that they have gone beyond the level of mind and can create and sustain a state of intense conscious presence while they are working with you. P42, chapter 2 Once you have disidentified from your mind, whether you are right or wrong makes no difference to your sense of self at all, so the forcefully compulsive and deeply unconscious need to be right, which is a form of violence, will no longer be there. You can state clearly and firmly how you feel or what you think, but there will be no aggressiveness or defensiveness about it. Your sense of self is then derived from a deeper and truer place within yourself, not from the mind. Watch out for any kind of defensiveness within yourself. What are you defending? An illusory identity, an image in your mind, a fictitious entity. By making this pattern conscious, by witnessing it, you disidentify from it. In the light of your consciousness, the unconscious pattern will then quickly dissolve. This is the end of all arguments and power games, which are so corrosive to relationships. Power over others is weakness disguised as strengh. True power is within, and it is available to you now. P44-45, chapter 2 You will know it at the latest when you feel death approching. 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. P46,chapter 2

Monday, May 11, 2026

The Power of Now - excerpt - chapter 1

Those who have not found their true wealth, which is the radiant joy of being and the deep, unshakable peace that comes with it, are beggars, even if they have great material wealth. They are looking outside for scraps of pleasure or fulfillment, for validation, security, or love, while they have a treasure within that not only includes all things but is indefinitely greater than anything the world can offer. 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. It is a state of connectedness with something immeasurable and indestructable, something that, almost paradoxically, is essentially you and yet is much greater than you. It is finding your true nature beyond name and form. The inability to feel this connectedness gives rise to the illusion of separation, from yourself and from the world around you. You then perceive yourself, conscously or unconsciously, as an isolated fragment. Fear arises, and conflict within and without becomes the norm. P12, Chapter 1 You used the word Being. Can you explain what you mean by that? Being is the eternal, ever-present One Life beyond the myriad forms of life that are subject to birth and death. However, Being is not only beyond but also deep within every form as its innermost invisible and indestructible essence. This means that it is accessible to you now as your own deepest self, your true nature. But don't seek to grasp it with your mind. Don't try to understand it. You can know it only when the mind is still. When you are present, when your attention is fully and intensely in the Now, Being can be felt, but it can never be understood mentally. To regain awareness of Being and to abide in that state of "feeling-realization" is enlightment. P13, Chapter 1 As you go more deeply into this realm of no-mind, as it is sometimes called in the East, you realize the state of pure consciousness. In that state, you feel your own presence with such intensity and such joy that all thinking, all emotions, your physical body, as well as the whole eternal world, become relatively insignificant in comparison to it. And yet, this is not a selfish but a selfless state. It takes you beyond what you previously thought of as "your self". That presence is essentially you, and at the same time, inconceivably greater than you. What I am trying to convey here may sound paradoxical or even contradictory, but there is no other way that I can express it. Instead of "watching the thinker,", you can also create a gap in the mind stream simply by directing the focus of your attention into the Now. Just become intensely conscious of the present moment. This is a deeply satisfying thing to do. In this way, you draw consciousness away from mind activity and create a gap of no-mind in which you are highly alert and aware but not thinking. This is the essence of meditation. In your everyday life, you can practice this by taking any routine activity that normally is only a means to an end and giving it your fullest attention, so that it becomes an end in itself. For example, every time you walk up and down the stairs in your house or place of work, pay close attention to every step, every movement, even your breathing. Be totally present. Or when you wash your hands, pay attention to all the sense perceptions associated with the activity: the sound and feel of the water, the movement of your hands, the scent of the soap, and so on. Or when you get into your car, after you close the door, pause for a few seconds and observe the flow of your breath. Bcome aware of a silent but powerful sense of presence. There is one certain criterion by which you can measure your success in this practice: the degree of peace that you feel within. So the single most vital step on your journey toward enlightment is this: learn to disdentify from your mind. Every time you create a gap in the stream of mind, the light of your consciousness grows stronger. One day you may catch yourself smiling at the voice in your head, as you would smile at the antics of a child. This means that you no longer take the conent of your mind all that secirously, as your sense of self does not depend on it. P20-21, Chapter 1 So observing our emotions is as important as observing our thoughts? Yes. Make it a habit to ask yourself: What's going on inside me at this moment? That question will point you in the right direction. But don't analyze, just watch. Focus your attention within. Feel the energy of the emotion. If there is no emotion present, take your attention even more deeply into the inner energy field of your body. It is the doorway into Being. P27 Chapter 1

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.”