This file contains hidden or 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
#include <bits/stdc++.h> | |
#ifdef _WIN64 | |
#include <windows.h> | |
#else | |
#include <unistd.h> | |
#endif | |
using namespace std; | |
void do_timecomsuming_work() { | |
#ifdef _WIN64 |
This file contains hidden or 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
Show hidden characters
{ | |
"rulers":[72], | |
"word_wrap": true, | |
"spell_check": true, | |
"dictionary": "Packages/Language - English/en_US.dic" | |
} |
This file contains hidden or 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
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install gcc-4.9 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 | |
sudo apt-get install g++-4.9 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50 |
This file contains hidden or 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
all: pi | |
pi: pi.c | |
gcc-4.8 -Wall -std=c99 -O2 pi.c -o pi-4.8 | |
gcc-5 -std=c99 -O2 pi.c -o pi-5 | |
gcc-6 -std=c99 -O2 -march=native -msse -mavx pi.c -o pi-6 | |
gcc-4.8 -Wall -std=c99 -O2 -msse -msse2 -mavx pi-sse.c -o pi-sse | |
clang-3.8 -O2 pi.c -o pi-clang | |
This file contains hidden or 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
""" | |
python ./diff-img.py lhs.jpg rhs.jpg | |
""" | |
import numpy as np | |
import sys | |
from PIL import Image | |
def rgb(minimum, maximum, value): | |
minimum, maximum = float(minimum), float(maximum) | |
ratio = 2 * (value-minimum) / (maximum - minimum) |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <inttypes.h> | |
#include <assert.h> | |
#include <x86intrin.h> | |
typedef struct Rect { | |
int32_t lx, ly, rx, ry; | |
} Rect; |
This file contains hidden or 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
INPUT=main.c | |
# inplace format `-i` | |
clang-format-3.8 -i -style="{BasedOnStyle: llvm, IndentWidth: 4}" main.c | |
# output the result on the screen | |
clang-format-3.8 -style="{BasedOnStyle: llvm, IndentWidth: 4}" main.c | |
# more detail config | |
clang-format-3.8 -style="{BasedOnStyle: llvm, IndentWidth: 4}" -dump-config |
This file contains hidden or 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
#!/bin/bash | |
IFS= read -s -p "Please Enter Password of the Change Permissions: " pwd | |
pdftk thesis.pdf output thesis-security.pdf \ | |
owner_pw $(pwd) \ | |
allow printing ScreenReaders \ | |
encrypt_128bit |
This file contains hidden or 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
#!/usr/bin/python3 | |
import threading | |
import time | |
import queue | |
import random | |
def work(wid, wlock, wset, q): | |
while True: | |
if not q.empty(): |
This file contains hidden or 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
1. 針對匈牙利智能障礙者選舉投票案例,以下哪些敘述是正確的? | |
c. 限制智能障礙者之投票權,違反公約第二十九條參與政治與公共生活 | |
d. 匈牙利政府因其未提供身障者在行使權利能力時可能需要之協助,故違反公約第十二條在法律之前獲得平等承認 | |
2. 身心障礙者權利公約,是二十一世紀第一個國際人權條約,將影響全球六億身心障礙者的權利保障, 可說是國際人權的重要發展。 | |
O | |
3. 在匈牙利智能障礙者選舉投票案例中,我們可以知道,若身障者因為智能問題,是可以依照國家的法律來禁止他們投票的。 | |
X | |