The philosophy of life: Don't look at how this person treats you, look at how they treat everyone else around them.

A person’s behavioral habits are often long-term cultivated, reflecting their internal values and beliefs. If a person treats the people around them with friendliness, respect, and kindness, they are also more likely to be friendly to you. Conversely, if a person treats the people around them with indifference, selfishness, and impoliteness, they are also more likely to be indifferent, selfish, and impolite to you.

September 8, 2023 · 1 min · xgDebug

Tolerate the fool, understand the fool, harvest the fool.

Do not affect the interests of the elite, nor should you affect the beliefs of the masses. Affecting the elite’s interests is like taking their life; affecting the masses’ beliefs is like digging up their ancestral grave, and the masses’ beliefs are precisely the source of the elite’s interests.

August 30, 2023 · 1 min · xgDebug

Atomic Habits

Habits are the compound interest of self-improvement. Just as money multiplies through compound interest, the effects of your habits multiply as you repeat them. They may seem to make little difference on any given day, yet the impact they deliver over the months and years can be enormous. 1: The Surprising Power of Atomic Habits People make a few small changes, fail to see a tangible result, and decide to stop. You think, “I’ve been running every day for a month, so why can’t I see any change in my body?” Once this kind of thinking takes over, it’s easy to let good habits fall by the wayside. But in order to make a meaningful difference, habits need to persist long enough to break through this plateau—what I call the Plateau of Latent Potential. qPeople make a few small changes, fail to see a tangible result, and decide to stop. You think, “I’ve been running every day for a month, so why can’t I see any change in my body?” Once this kind of thinking takes over, it’s easy to let good habits fall by the wayside. But in order to make a meaningful difference, habits need to persist long enough to break through this plateau—what I call the Plateau of Latent Potential. ...

August 26, 2023 · 48 min · xgDebug

The enemy of success is not failure, but dullness and boredom.

The True Enemy of Success The enemy of success is not failure, but dullness and lack of interest. Therefore, we must make it interesting. The Key to Product Development It is the same when building a product; you must have people using it, interacting with it, and providing feedback right from the start. Otherwise, it will be difficult to sustain. You must have seed users from the beginning, and a group of people anticipating it throughout the development process.

August 26, 2023 · 1 min · xgDebug

不会说好听的就别说话

If you can’t say nice things, say nothing. Don’t put people down.

August 24, 2023 · 1 min · xgDebug

别看新闻,不要寻找大新闻,大新闻会找到你

You don’t need to follow the daily news. True breaking news will find you, and the rest isn’t urgent or just doesn’t matter.

August 24, 2023 · 1 min · xgDebug

Habits of the rich

Habit of Financial Discipline: Become someone who practices disciplined financial management. This could involve habits such as creating a budget, tracking expenses, and avoiding unnecessary spending. Habit of Continuous Learning: Embrace the identity of a lifelong learner in the realm of personal finance. Make it a habit to read books, articles, and attend seminars on financial literacy and investment strategies. Habit of Savvy Investing: Cultivate the identity of an informed and strategic investor. Regularly set aside time to research investment opportunities and make informed decisions about where to invest your money. Habit of Goal Setting: Adopt the identity of a goal-oriented individual. Set clear financial goals and break them down into actionable steps. Regularly review and adjust your goals as needed. Habit of Networking and Relationship Building: Become someone who actively seeks out connections in the financial world. Network with professionals, mentors, and like-minded individuals who can provide guidance and opportunities. Habit of Entrepreneurial Thinking: Develop an identity that embraces entrepreneurial thinking. This might involve exploring side businesses, investments in startups, or other ventures that can diversify your income streams. Habit of Long-Term Planning: Embody the identity of a strategic planner. Develop a habit of thinking about your financial future in the long term, which includes retirement planning, estate planning, and more. Habit of Resilience: Cultivate the identity of a resilient individual who learns from setbacks. Financial success often involves facing challenges; adopting the habit of bouncing back and learning from failures is crucial. Habit of Generosity: Adopt the identity of someone who values giving back. Allocate a portion of your financial success to charitable causes, reinforcing the idea that financial success enables positive impact. Habit of Risk Management: Become someone who is conscious of financial risks. Develop habits of managing and mitigating risks through insurance, emergency funds, and thoughtful decision-making. Habit of Negotiation and Assertiveness: Embrace an identity of someone who advocates for their financial interests. Develop the habit of negotiating for better deals, raises, and terms. Remember, the key is to start small and build gradually. Choose one or a few of these habits that resonate with you and incorporate them into your daily routine. As you consistently practice these habits, they will become ingrained in your identity, leading to more sustainable and impactful changes in your financial life. Over time, these small identity-based habits can accumulate and lead to significant financial success.

August 24, 2023 · 2 min · xgDebug

Correcting a careless mistake only provides a temporary solution; cultivating the habit of careful scrutiny can permanently solve the problem.

When you solve problems at the result level, you only provide temporary solutions. To achieve lasting progress, you must address them at the system level. Fix the input, and the output will self-correct.

August 23, 2023 · 1 min · xgDebug

How to Become a People Magnet

1 - Understanding human nature People are, above all, interested in themselves. Yup. Sorry. No matter who you are people will always be a thousand times more interested in themselves than in you. No judgment here. People’s actions are governed by self-interest. In every human relationship, your counterpart will always think or ask themselves “what’s in it for me?” Remember this question “What’s in it for me?” By the way, you’re asking this question in all your interactions too, consciously or subconsciously. ...

August 21, 2023 · 16 min · xgDebug

Bee's Effort and Sweetness

In life, there are always some seemingly ordinary things that contain profound philosophical meanings. Take bees and sweetness as an example; we may rarely think about the story behind it. Bees are hardworking creatures in nature, diligently collecting nectar to transform it into sweet delicacies. These sweets then become delightful treats for people, allowing them to savor happiness. However, if we delve deeper, we might discover that there seems to be something hidden between the bees’ hard work and the sweetness enjoyed by humans. Perhaps there is a subtle yet profound implication behind this. We can recall scenes that seem familiar. ...

August 17, 2023 · 2 min · xgDebug

The 48 Laws of Power

Power Law 1: Never Eclipse Your Superior’s Brilliance While trying to please them or leave a deep impression, do not overtly display your talents, lest it backfire—triggering their fear and anxiety. Power Law 2: Never Trust Friends Too Easily; Learn to Utilize Your Enemies If you hire a former enemy, they will be more loyal than a friend because they will be more eager to prove themselves to you. Beware your friends! They betray you faster because they are more prone to developing jealousy. They will also be spoiled and become tyrannical. Power Law 3: Conceal Your Intentions ...

August 15, 2023 · 14 min · xgDebug

Use ncnn to deploy pytorch model to Android phone

Use ncnn to deploy pytorch model to Android phone Open graphics card support when compiling NCNN. Vulkan is for gpu -DNCNN_VULKAN=ON MobileNetV3 Open CMAKE 0091 feature when compiling into MT cmake_minimum_required(VERSION 3.20.0) cmake_policy(SET CMP0091 NEW) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") project("client-project") Train YOLO \Envs\torch\Scripts\activate.ps1 python train.py --batch 6 --workers 2 --imgsz 960 --epochs 300 --data "\Core\yaml\data.yaml" --cfg "\Core\yaml\cfg.yaml" --weights \ Core\weights\best.pt --device 0 Conversion model from torch import nn import torch.utils.model_zoo as model_zoo import torch.onnx from libs import define from libs.net import Net from libs.dataset import ImageDataset import os test_data = ImageDataset(define.testPath,False) test_loader = torch.utils.data.DataLoader( test_data, batch_size=1, shuffle=True) device = torch.device("cuda" if torch.cuda.is_available() else "cpu") model = Net(out_dim=19).to(device) model.load_state_dict(torch.load( "./widget/last.pt" )) model.eval() def saveOnnx(): for data, target in test_loader: data, target = data.to(device), target.to(device) label = target.long() y = model(data) # Export the model torch.onnx.export(model, # model being run data, # model input (or a tuple for multiple inputs) "./widget/best.onnx", # where to save the model (can be a file or file-like object) export_params=True, # store the trained parameter weights inside the model file opset_version=10, # the ONNX version to export the model to do_constant_folding=True, # whether to execute constant folding for optimization input_names = ['input'], # the model's input names output_names = ['output'], # the model's output names dynamic_axes={'input': {0:'batch_size'}, # variable lenght axes 'output': {0:'batch_size'}}) traced_script_module = torch.jit.trace(model, data) return saveOnnx() # Conversion os.system("python -m onnxsim ./widget/best.onnx ./widgetbest-sim.onnx") os.system("./bin/onnx2ncnn.exe ./widget/best-sim.onnx ./widget/best.param ./widget/best.bin") os.system("./bin/ncnnoptimize.exe ./widget/best.param ./widget/best.bin ./widget/best-opt.param ./widget/best-opt.bin 65536") python .\export.py --weights weights/best.pt --img 960 --batch 1 --train python -m onnxsim best.onnx best-sim.onnx .\onnx2ncnn.exe best-sim.onnx best.param best.bin ncnnoptimize best.param best.bin best-opt.param best-opt.bin 65536 Git clone ncnn repo with submodule $ git clone https://github.com/Tencent/ncnn.git $ cd ncnn $ git submodule update --init Build for Linux / NVIDIA Jetson / Raspberry Pi Build for Windows x64 using VS2017 Build for macOS Build for ARM Cortex-A family with cross-compiling Build for Hisilicon platform with cross-compiling Build for Android Build for iOS on macOS with xcode Build for WebAssembly Build for AllWinner D1 Build for Loongson 2K1000 Build for Termux on Android Build for Linux Install required build dependencies: ...

August 11, 2023 · 12 min · xgDebug

Debugging native applications with LLDV on Android 11

Mobile PUSH debug server to mobile adb push lldb-server /data/local/tmp chmod 755 /data/local/tmp/lldb-server Start the debugger service /data/local/tmp/lldb-server platform --listen "*:8888" --server +++ Computer side Port forwarding adb forward tcp:8888 tcp:8888 Start LLDB . \lldb.exe View supported platforms platform list Select ANDROID platform platform select remote-android Connect to the phone Phone serial number: 9643e0ec0604 To change to the current debugging phone, use adb devices to check the serial number platform connect connect://9643e0ec0604:8888 View the currently running process platform process list Attach to attach 9053 Breakpoint b send Run up c View the list of threads thread list View the call stack bt

August 11, 2023 · 1 min · xgDebug

Money Master The Game

The largest financial institutions are set up to make a profit for themselves, not their clients. What do I really want? (Vision.) 2. What is important about it? (Values.) 3. How will I get it? (Methods.) 4. What is preventing me from having it? (Obstacles.) 5. How will I know I am successful? (Measurements.) Money is certainly one of the ways we can turn the dreams we have into the reality we live. ...

August 9, 2023 · 9 min · xgDebug

The way of obtaining profit, rather than labor compensation.

Well, the main ways individuals obtain true profit (rather than labor compensation) include: Entrepreneurial Startup - Establishing a company independently or with partners, bringing goods or services to the market, and obtaining a share of the corporate profit. Investment Startup - Sharing the growth returns of a startup through angel investing or venture capital. Securities Investment - Purchasing securities assets in the stock market and sharing the operating profit of listed companies. Ownership of Means of Production - Purchasing means of production such as equipment or real estate, and profiting from renting them out. Utilization of Intellectual Property - Collecting usage fees by obtaining patents or copyrights. Operating Commercial Activities - Obtaining intermediary profit through wholesale, retail, etc. Providing Commercial Services - Such as financial intermediaries or real estate agents. Building Investment Platforms - Such as obtaining the spread from P2P lending platforms. ...

August 9, 2023 · 1 min · xgDebug

How can I achieve profits that exceed the value of the labor itself?

In a competitive market, when the wage level of a certain profession or industry is higher than the value deserved by the labor output or skills required for that job, it attracts more people to study that profession and enter that market. As supply increases, the number of workers in the market grows, which subsequently causes the wage level to decrease, eventually approaching the value deserved by the labor output. ...

August 9, 2023 · 3 min · xgDebug

Producer Surplus and Consumer Surplus

When discussing economics, Producer Surplus is an important concept. It refers to the difference between the actual income received by a producer or supplier when selling goods in the market at a certain price, and the minimum income they expected when willing to sell those goods at that price. Simply put, Producer Surplus is the net gain for the producer in a transaction. Its calculation involves two key factors: Producer’s Supply Price: This refers to the price at which the producer is willing to sell the goods or services. Typically, the producer’s supply price is related to their marginal cost (the extra cost of producing one unit of goods), because they hope to at least cover the production cost. ...

August 9, 2023 · 2 min · xgDebug

The relationship between the worker and the large company is that the company wants you to be a replaceable cog.

The company wants you to be a replaceable cog. You want yourself to be irreplaceable, perhaps even possessing the ability to generate profit independently, becoming a company unto yourself. Therefore, the interests and goals of both parties are only aligned during certain stages; after that stage, you should part ways.

August 9, 2023 · 1 min · xgDebug

Well-known low-cost ETFs

Vanguard Total Stock Market ETF (VTI): Expense Ratio: Approximately 0.03% iShares Core S&P 500 ETF (IVV): Expense Ratio: Approximately 0.03% Schwab U.S. Broad Market ETF (SCHB): Expense Ratio: Approximately 0.03% SPDR S&P 500 ETF Trust (SPY): Expense Ratio: Approximately 0.09% Invesco QQQ Trust (QQQ): Expense Ratio: Approximately 0.20% iShares Russell 2000 ETF (IWM): Expense Ratio: Approximately 0.19% Vanguard Total Bond Market ETF (BND): Expense Ratio: Approximately 0.04% iShares Core U.S. Aggregate Bond ETF (AGG): Expense Ratio: Approximately 0.04%

August 8, 2023 · 1 min · xgDebug

Some common types of fallacies and their explanations

Fallacy of Assertion: In this fallacy, the assertion provides insufficient evidence or support, merely stating a fact as a declaration. For example: “Everyone knows I am the smartest person.” Fallacy of Causation: This fallacy lies in incorrectly assuming a causal relationship between two events. For example: “I ate strawberry ice cream, so it caused the weather to get cold.” This fallacy ignores other factors that might influence the weather. Ad Hominem Fallacy: In this fallacy, the arguer of the point is attacked, rather than engaging in a rational debate about the point itself. For example: “This plan is unwise because it was proposed by a stupid person.” ...

August 5, 2023 · 4 min · xgDebug