Last year, we did a year of electron desktop project, performance has been less than satisfactory , I heard that there is a rust desktop framework tauri, performance is good, packaged volume is also small, but also suitable for desktop has not been trying , recently in the jitterbug and brushed the name scores, the feeling that you can explore the play behind, will be tauri and the name of the name scores to do a small application, also There is this article.

 Shakeology name rating software

I happened to brush up on Jitterbug in a live stream scoring a name, and it looks like a straight up open excel

It looked a bit rustic and not like a professional program, so I took the plunge and made my own with tauri

 My finished product display

A gossip has been added, and after typing enter the gossip will rotate 360 and appear for scoring.

 Tauri First Experience

Front-end desktop either electron or tauri are actually [front-end] + [native ability to supply], electron can use node to get the native ability to get tauri can be obtained through rust, the next will install a tauri project, and write the simplest function to provide the front-end call.

 First open the official website of tauri:

 Copy the homepage installation command and execute it

npm create tauri-app@latest

Follow the scaffolding tips to choose the right package management tool and front-end framework for you

 Here I chose vue

 Open the code after installation

Look in the src-tauri/src directory for a

The general idea is that the greet function is defined and registered to provide the invoke call

Check out src/component/greet.vue

The front-end calls the function written by rust by passing parameters to the invoke function.

 Write a custom rust function to provide a front-end call

First, in its simplest form, write a scoring function that directly returns the value of the score that was written to death (more on the scoring principle down the line).

In tauri, declare #[tauri::command] at the top of the function and register it in invoke_handler to call it on the front end.

 Name Scoring Software

 Scoring Principle

For the way a name is rated, the common folk way of calculating is called [San Cai Wu Ge], if you are interested, you can search for yourself to learn more about it.

Baidu Encyclopedia Explanation: The five frames refer to the Tiange, Digue, Personality, General Frame, and Outer Frame in the science of names. It is one of the more influential methods of name selection. Initially in the early 1918, by the Japanese Kumazaki Kenon pioneered, so the five-frame profile method is also known as “Kumazaki’s name science”, the core of which is the name of the person according to the five-frame profile method to explain.

 The following formula is a screenshot from Baidu’s encyclopedia

So name scoring is based on strokes and doesn’t even have anything to do with the meaning of the name characters, which basically infers that it’s metaphysics with no scientific basis.

But even with this kind of metaphysics, it’s still pretty hard to code it and put it into excel, so what about the is of the scoring principle in live?

 Rough and tumble charlatanism.

Based on my years of coding experience, the scoring in live should be the following 2 ways:

  1.  table mapping method

     A macro function that pre-writes the current lattice is equivalent to = some score

     Represented in front-end code roughly as follows.

      const map = {
        "A1": {
            score: 80
      const score = map['A1'].score
  2.  randomization method

    Pre-writing the macro function for the current lattice is equivalent to = random function generating values

     Represented in front-end code roughly as follows.

      const score = Math.random() * 100

 Behind the Ratings

In fact, regardless of the use of table mapping method, or random generation method or even really realize the three talent five frame method, there is no basis, that is to say, are the means of deception, even if the three talent five frame method with the code to achieve the same with the writing of random function, cheating people’s money!!!!

Essentially name scoring is a way to use curiosity to scam people out of money, similar to QQ number scoring, license plate number scoring, and so on.

I’m a southern Minnesotan, and people on our side of the world are superstitious, but I grew up not believing in this, and even hated it a little, so I’m not going to send out the code, so if you’re interested, you can do it yourself and see.

By lzz

Leave a Reply

Your email address will not be published. Required fields are marked *