Skip to content

Instantly share code, notes, and snippets.

/* 以他的例子來說,*/
getThingFromHardDrive(function(thing) {
uploadToServer(thing, function(response) {
saveToLogDatabase(response, function(logResponse) {
getAnotherThingFromHardDrive(function(thing) {
// etc
})
})
})
})
gelkif
tn703678
fragment
flywing520
Traber
windbutter
kuanki
smilecheryl
Freya0
cj6u40
<script type="text/javascript">
$(function () {
var chart;
function initChart(series){
return new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line',
marginRight: 130,
marginBottom: 25
<script type="text/javascript">
$(function () {
var chart;
function initChart(series){
return new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'line',
marginRight: 130,
marginBottom: 25
var express = require('express');
var app = express();
app.get('/', function(req, res) {
res.cookie('test', '123456');
res.cookie('test', '0');
res.redirect('/a');
});
app.get('/a', function(req, res) {
res.send('hello cookie test:'+ req.headers.cookie); //get "0"
@tony1223
tony1223 / test.php
Created September 29, 2012 15:46
鐵人賽第六天說明資料
資料呈現:06_05_form.php
[code]
<?php
//因為要使用 session,所以需要先讓 php 進行起始的動作。
session_start();
?><html>
<head>
<title>表單練習</title>
@tony1223
tony1223 / test.php
Created September 29, 2012 15:47
鐵人賽第六天說明資料
06_04_form.php
[code]
<?php
//因為要使用 session,所以需要先讓 php 進行起始的動作。
session_start();
?><html>
<head>
<title>表單練習</title>
</head>
@tony1223
tony1223 / 06_03_form.php
Created September 29, 2012 15:49
鐵人賽第六天說明資料
<?php
//因為要使用 session,所以需要先讓 php 進行起始的動作。
session_start();
?><html>
<head>
<title>表單練習</title>
</head>
<body>
<?php
strcpy(msg_buf, buf + 3);
*(msg_buf + 5) = 0;
id = atoi(msg_buf);
read_user_id(id);
record.money = atol(buf + 8);
寄送方:
sprintf(msg_buf,"020%5d%ld",player[table[i]].id,
player[table[i]].money+change_money[i]);
收方:
strcpy(msg_buf, buf + 3);
*(msg_buf + 5) = 0;
id = atoi(msg_buf);
read_user_id(id);