sudo apt-get update
curl -O https://launchpad.net/wget/main/1.18/+download/wget-1.18.tar.gz
tar -zxvf wget-1.18.tar.gz
cd wget-1.18
./configure --with-ssl=openssl
The pkg-config script could not be found or is too old
// from http://scratch99.com/web-development/javascript/convert-bytes-to-mb-kb/ | |
function bytesToSize(bytes) { | |
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; | |
if (bytes == 0) return 'n/a'; | |
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); | |
if (i == 0) return bytes + ' ' + sizes[i]; | |
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]; | |
}; |
'use strict'; | |
import Velocity from 'velocity-animate'; | |
let baseEasings = {}; | |
baseEasings.Bounce = p => { | |
let pow2; | |
let bounce = 4; | |
while (p < ((pow2 = Math.pow(2, --bounce)) - 1) / 11) {} |
// CommonJS 給你兩個工具: | |
// | |
// 1. require 函式 | |
// 2. module 物件 | |
// | |
// 可以用 module.exports 把物件模組化,用 reuqire 把物件載入。 | |
function Animation() { | |
// | |
} |
var cocs = [0.014, 0.019, 0.029] | |
var dofs = [] | |
var distance = 1000 | |
var focal = 50 | |
var f_number = 2.8 | |
for (let i = 0; i <= cocs.length - 1; i++) { | |
let coc = cocs[i] | |
let farPoint = (distance * Math.pow(focal, 2)) / (Math.pow(focal, 2) - (f_number * coc * distance)) |
focals = [20, 50, 85] | |
f_numbers = [1.4, 2, 2.8, 4, 5.6] | |
focals.each do |focal| | |
puts "鏡頭焦距:#{focal}mm" | |
puts "" | |
f_numbers.each do |f| |
sudo apt-get update
curl -O https://launchpad.net/wget/main/1.18/+download/wget-1.18.tar.gz
tar -zxvf wget-1.18.tar.gz
cd wget-1.18
./configure --with-ssl=openssl
The pkg-config script could not be found or is too old
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func rootHandler(w http.ResponseWriter, r *http.Request) { |
<?php | |
$url = 'http://vimeo.com/71673549'; | |
preg_match('/\/\/(www\.)?vimeo.com\/(\d+)($|\/)/', $url, $matches); | |
?> | |
<iframe src="http://player.vimeo.com/video/<?php echo $matches[2] ?>?title=0&byline=0&portrait=0&badge=0&color=ffffff" width="640" height="360" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> |
// | |
// | |
// | |
// .__ __. ______ _______ _______ __ _______. | |
// | \ | | / __ \ | \ | ____| | | / | | |
// | \| | | | | | | .--. || |__ | | | (----` | |
// | . ` | | | | | | | | || __| .--. | | \ \ | |
// oooooooooooo | |\ | | `--' | | '--' || |____ __| `--' | .----) | | |
// `888' `8 |__| \__| \______/ |_______/ |_______(__)\______/ |_______/ | |
// 888 oooo ooo oo.ooooo. oooo d8b .ooooo. .oooo.o .oooo.o |
<div class="jumbotron"> | |
<div class="jumbotron-header"> | |
<h1>這是標題</h1> | |
</div> | |
<div class="jumbotron-body"> | |
<p>這裡是內文,上面要有一條線</p> | |
</div> | |
<div class="jumbotron-footer"> | |
<p>這裡是 footer,上面不能有線</p> | |
</div> |