Introduction If we want to predict the user A's rating of the book X, but we only have the A's rating for some other books and user B's rating of the book X. How can we predict the A's rating…
Go Binary Tree Traversal
a / \ b c / \ d f / / e g Preorder: a → b → d → e → f → g → c Inorder: e → d → b → g → f → a →…
Handy use SphinxQL Query Builder for PHP
Wiki Sphinx Sphinx is an open source search engine that allows full-text searches. It is best known for performing searches over large data very efficiently. The data to be indexed can generally come from very different sources: SQL databases, plain…
RSA Encryption & Decryption on PHP
Generate an RSA keypair with a 4096 bit private key Execute command: openssl genrsa -out private_key.pem 4096 e.g. $ openssl genrsa -out private_key.pem 4096 Generating RSA private key, 4096 bit long modulus .............................++++++ ................................................................++++++ e is 65537 (0x10001) Make sure…