Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
<? | |
// add it to config file: | |
$google_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; | |
// add this to libs file: | |
function shorten($url) { | |
$gurl = "https://www.googleapis.com/urlshortener/v1/url?key=" . $GLOBALS['google_key']; | |
$url = json_encode(array("longUrl" => $url)); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.
Here's one way to set it up:
npm init -y
in your project folder (don't skip this step!)npm install terser
Now, to minify a file called like_button.js
, run in the terminal:
Vấn đề này liên quan đến cách mà máy tính lưu trữ và xử lý số thực (floating-point numbers). Trong nhiều ngôn ngữ lập trình, số thực được lưu trữ theo chuẩn IEEE 754, và không phải tất cả các số thực đều có thể được biểu diễn chính xác trong hệ nhị phân. Do đó, khi thực hiện các phép toán như 0.1 + 0.2, kết quả có thể không chính xác như mong đợi.
Một số chỉ có thể biểu diễn chính xác trong IEEE-754 nếu và chỉ nếu nó có thể viết dưới dạng: x = k / (2^n) với k và n là số nguyên. Nói cách khác, mẫu số của số đó chỉ có thể chứa các thừa số nguyên tố 2 (không có 3, 5, 7, ...).