This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copy from http://www.php.net/manual/en/function.array-merge-recursive.php#92195 | |
* | |
* array_merge_recursive does indeed merge arrays, but it converts values with duplicate | |
* keys to arrays rather than overwriting the value in the first array with the duplicate | |
* value in the second array, as array_merge does. I.e., with array_merge_recursive, | |
* this happens (documented behavior): | |
* | |
* array_merge_recursive(array('key' => 'org value'), array('key' => 'new value')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 這個時候檔案都已經做完,想要放到 Github 上 | |
josephj@cockatoo /var/www/josephj/frontend/lab/2012/qt-webkit $ % git init . | |
Initialized empty Git repository in /var/www/josephj/frontend/lab/2012/qt-webkit/.git/ | |
# Github 的 Repo 也已經開好了 (已經產生好 README.md) | |
josephj@cockatoo /var/www/josephj/frontend/lab/2012/qt-webkit $ % git remote add origin git@github.com:miiicasa/tv-apps-html.git | |
# 先試著從 Github 上抓東西下來 | |
josephj@cockatoo /var/www/josephj/frontend/lab/2012/qt-webkit $ % git pull | |
remote: Counting objects: 3, done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Thumbnails</title> | |
</head> | |
<body> | |
<div> | |
<h2>Original</h2> | |
<img width="100" height="72" id="original" /> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<link rel="stylesheet" type="text/css" href="./styles.css"> | |
<style>html, body {background: black; color: #fff} | |
button {padding: 10px; border-radius: 6px; border: none;} | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<link rel="stylesheet" type="text/css" href="./styles.css"> | |
<style>html, body {background: black; color: #fff} | |
button {padding: 10px; border-radius: 6px; border: none;} | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>File Listing</title> | |
</head> | |
<body> | |
<h1>File Listing</h1> | |
<section> | |
<input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>File Listing</title> | |
</head> | |
<body> | |
<h1>File Listing</h1> | |
<section> | |
<input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>File Listing</title> | |
</head> | |
<body> | |
<h1>File Listing</h1> | |
<section> | |
<input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const app = express(); | |
const fs = require("fs"); | |
app.get("/", (req, res) => res.send("Hello World!")); | |
// Express will catch the errors in synchrous code #1 | |
app.get("/error", (req, res) => { | |
throw new Error("Trigger error #1"); // try-catch is not necessary | |
}); |
NewerOlder