B10315002 四資工二 黃昱豪
- 需要經由傳輸層傳輸的資料
- 由傳輸層生成的資料,包括應用層的資料以及傳輸層的標頭
- 使用網路層的標頭封裝傳輸層的資料
- 經由連結層封裝的資料
2015-09-23 14:11:18 +0800 | |
../configure | |
--build=x86_64-apple-darwin14.5.0 | |
--prefix=/usr/local/Cellar/gcc/5.2.0 | |
--libdir=/usr/local/Cellar/gcc/5.2.0/lib/gcc/5 | |
--enable-languages=c,c++,objc,obj-c++,fortran | |
--program-suffix=-5 | |
--with-gmp=/usr/local/opt/gmp | |
--with-mpfr=/usr/local/opt/mpfr |
#!/bin/bash | |
# tty_pipe=$(tty) | |
# echo "\$tty_pipe = $tty_pipe" | |
[ -z "$USER" ] && echo -ne "User: " && read USER | |
[ -z "$PASS" ] && echo -ne "Password: " && read -s PASS | |
function autoptt() | |
{ |
for i in range(1001): | |
for j in range(i, 1001): | |
for k in range(1001): | |
tmp1 = i ** 2 + j ** 2 | |
tmp2 = k ** 2 | |
if tmp1 == tmp2: | |
print(i, j, k) | |
elif tmp2 > tmp1: | |
break |
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <time.h> | |
#include <assert.h> | |
inline void swap_char(char *a, char *b) { | |
*a ^= *b; *b ^= *a; *a ^= *b; | |
} |
#include <stdio.h> | |
/* | |
This function, rec will prints all number between va and vb | |
in diminishing order. | |
rec(1, 5) and rec(5, 1) give same output. | |
*/ | |
int rec(int va, int vb) { | |
(va > vb) && printf("%d\n", va); | |
(vb >= va) && printf("%d\n", vb); | |
return va != vb && rec(va - (va>vb), vb - (vb > va)); |
#!/bin/bash | |
device=$1 | |
cmd=$2 | |
username="username_on_device" | |
IDENTITY_FILE="/path/to/key" | |
case $cmd in | |
"shutdown") ssh $username@localhost -i $IDENTITY_FILE -p $device -At sudo shutdown -h now ;; |
CC=gcc | |
CCFLAGS=-Wall | |
LDFLAGS= | |
SOURCES=$(wildcard *.c) | |
OBJECTS=$(SOURCES:.c=.o) | |
TARGET=des | |
all: $(TARGET) | |
$(TARGET): $(OBJECTS) |
Clone project
Checkout all branches that contain the files that should be moved
Delete the remote
Run the filter-branch command:
git filter-branch --tree-filter 'mkdir -p /path/to/tmp; mv * /path/to/tmp; mkdir subdir; mv /path/to/tmp/* subdir/' --tag-name-filter cat --prune-empty -- --all