Two pitfalls have been dug on GitHub and two pitfalls on GitHub.

Source: Internet
Author: User

Two pitfalls have been dug on GitHub and two pitfalls on GitHub.

Https://github.com/baihacker/pe

The basic code for solving the problem on Project Euler, including number theory code and a simple multi-threaded tool (to calculate the result, it takes a day and a half at the longest, therefore, multithreading may reduce the time by several times ).

At present, there are only some simple filtering prime numbers, decomposing integers, modulo operations, original root determination, finding the original root of the prime number, discrete logarithm, and fractional calculation. The algorithm is also basically the simplest.

The interface design mainly considers efficiency and provides C-form library functions. within the controllable range, interfaces are divided based on efficiency. in addition, we should also consider the thread security of the database, so as to facilitate the multi-threaded and cumbersome stream.

We plan to slowly use C ++, add non-plain algorithms, some other algorithms in elementary number theory, and add python code to solve some basic problems.

/*static int plist[maxp/10];  static int pmask[maxp+1];static int pcnt;int* phi = NULL;int* miu = NULL;const int64 pmpi[];SL int64 estimate_pmpi(int64 n)SL int is_prime(int64 n)SL void init_primes()SL void init_primes(int cal_phi, int cal_miu)SL vector<pair<int64, int> > factorize(int64 n)SL vector<int64> get_factors(const vector<pair<int64, int> >& f)SL vector<int64> get_factors(int64 value)SL int64 square_root(int64 n)SL int64 add_mod(int64 a, int64 b, int64 mod)SL int64 sub_mod(int64 a, int64 b, int64 mod)SL int64 mul_mod(int64 a, int64 b, int64 mod)SL int64 mul_mod_ex(int64 a, int64 b, int64 mod)SL int64 power_mod(int64 x, int64 n, int64 mod)SL int64 power_mod_ex(int64 x, int64 n, int64 mod)SL int64 inv_of(int64 x, int64 p)// Primitive Rootnamespace pr{SL bool is_pr(const vector<pair<int64, int> >& f, int64 x, int64 p)SL bool is_pr(int64 x, int64 p)SL int64 find_pr(int64 p)int64 ind(int64 a, int64 pr, int64 p)int64 ind1(int64 a, int64 pr, int64 p)}template<typename T>struct Fraction;*/

Https://github.com/baihacker/dcfpe

Just YY's distributed computing tool. It upgraded the multi-thread and cumbersome stream to the distributed and cumbersome stream.

There is currently only one introduction, no code,

As for when to write, let's talk about it.


How can I submit a new project to github?

Hello, landlord:

Build your own open-source project on github
Because the code has been stored here, on the one hand, it is invisible and insecure. I searched and found that github is a website that provides free git management, so I used it very well and has powerful functions.
The following describes how to register and submit the minibios code. For your convenience, close-up document.

First visit github.com/signup/free
Register your personal information, user name, password, registered email address,
Run the following command to obtain the ssh public key:
Ssh-keygen-C guobamantou@126.com-t rsa
Here, the content after-C is the email address to be registered at registration.
If your local machine already has a public/private key for ssh, you should put the new one in another directory; otherwise, it will overwrite it. This command is run in a common directory. input the command and output it as follows:
Generating public/private rsa key pair.
Enter file in which to save the key (/root/. ssh/id_rsa): test
At this time, I made a test, that is, changed the default location for generating the public/private key, so that it will not overwrite. ssh.
Press enter along the way to generate the public and private keys test and test. pub in the current directory.
Copy the two files to. ssh (back up the old files)
Execute cat test. pub and then press
Ssh-rsa ABIwAAAQ ...... DGtYAnCQ = guobamantou@126.com
Copy the output content to the SSH Public Key input box. The random key value is invalid.
Are you sure you want to submit the registration application.

So far, we have registered
Log on to your account. The following content appears on the left.
Welcome to GitHub! What's next? (36 minutes ago)

* Create a Repository
* Find a Repository
* Peruse the GitHub Guides

Click Create a new warehouse, the name is minibios, and the description is added.
The homepage url is minibios.
Okay. The minibios project is created.
A page will pop up to show you how to submit your project code, which is a regular git operation.
My minibios has always been managed using git. Just do the last step.
Under the minibios directory:
Git remote add origin git@github.com: guobamantou/clean-pmon.git
Git push origin master
This code is about 2 MB now. It takes about 1 minute to upload it. It takes a little patience.

If you submit a new project, for example, if you submit a clean-pmon project, set the project name clean-pmon when creating the project.

Submit now.
Mkdir test
Cd test
Vi test.txt
Git add test.txt
Git init
Git add test.txt
Git commit-
Git remote add origin git@github.com: guobamantou/clean-pmon.git
Git push origin master
If it goes well, a few seconds later... the remaining full text>

How to change user information in github and how to delete it

This is not filled in by you. It is determined by GITHUB's code proportion in your project. It is automatically generated and cannot be changed theoretically.
However, if you want to change it to the information you want, you can try to build a project and write the code in the language you want to replace it with. If it is more, you will naturally think that you are good at this type of code.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.