Skip to content

Instantly share code, notes, and snippets.

void func1();
void func2();
void func3();
void func4();
void func2() {
}
void func1() {
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<meta content="zh-tw" http-equiv="Content-Language" />
<meta content="Goodinfo!" name="copyright" />
<meta content="3008,大立光,股價,股票,個股資料,財報,新聞,K線圖,買賣,投資,行情,技術,分析,融資券,法人,營,利,股份,GoodInfo"
name="keywords" />
<meta content="(3008) 大立光 之股價行情走勢,K線圖與技術分析,公司基本資料,重大行事曆,近年股利政策,個股新聞,融資融券變化,法人買賣超,資產負債及營收獲利情況,歷年交易及漲跌資料總整理"
name="description" />
 class MyThread implements Runnable
{
  private int ticket = 10;
  public void run()
{
  for (int i = 0; i < 20; i++) {
  if (this.ticket > 0) {
  System.out.println("賣票:ticket" + this.ticket--);
import urllib2
# Specify the url
url = "https://www.google.com.tw/search?newwindow=1&hl=zh-TW&gl=tw&authuser=0&tbm=nws&q=3008&oq=3008&gs_l=serp.3...0.0.0.13549.0.0.0.0.0.0.0.0..0.0.msedr...0...1c..64.serp..0.0.0.ulDDMtr-drE"
headers = {'host' : 'www.google.com.tw',
'method' : 'GET',
'scheme' : 'https',
'version': 'HTTP/1.1',
'accept' : 'image/webp,*/*;q=0.8',
import urllib2
# Specify the url
url = "https://www.google.com.tw/search?newwindow=1&hl=zh-TW&gl=tw&authuser=0&tbm=nws&q=3008&oq=3008&gs_l=serp.3...0.0.0.13549.0.0.0.0.0.0.0.0..0.0.msedr...0...1c..64.serp..0.0.0.ulDDMtr-drE"
headers = {'host' : 'www.google.com.tw',
'method' : 'GET',
'scheme' : 'https',
'version': 'HTTP/1.1',
'accept' : 'image/webp,*/*;q=0.8',
#! /bin/bash
platformROM="aa"
PARTIAL_NAME="2PQ9IMG_HIA_AERO_UHL_M60_SENSE7GP_testonly_0.70.999.50_Radio_0.0.U00266.1@50820_16.00_F_release_449132_partial_2.zip"
BOOT_NAME="2PQ9IMG-BOOT_HIA_AERO_UHL_M60_SENSE7GP_testonly_0.70.999.50_test_449132_2.zip"
SIGN_NAME="2PQ9IMG_HIA_AERO_UHL_M60_SENSE7GP_testonly_0.70.999.50_Radio_0.0.U00266.1@50820_16.00_F_release_449132_signed_2.zip"
PARTIAL_PATH="$platformROM""/""$PARTIAL_NAME"
BOOT_PATH="$platformROM""/""$PARTIAL_NAME"
#include <SoftwareSerial.h>
#include "./DHT.h"
#define DEBUG
#define _ledpin 13
SoftwareSerial esp8266(10, 11); // RX, TX
//*-- DHT11
#define _dhtpin 8
/* DHT library
MIT license
written by Adafruit Industries
*/
#include "DHT.h"
DHT::DHT(uint8_t pin, uint8_t type, uint8_t count) {
_pin = pin;
Traceback (most recent call last):
File "test.py", line 11, in <module>
res = requests.post("https://www.thsrc.com.tw/tw/TimeTable/SearchResult", data = payload)
File "/home/gigigigi/.mybin/python-2.7.9/lib/python2.7/site-packages/requests/api.py", line 109, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/gigigigi/.mybin/python-2.7.9/lib/python2.7/site-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/home/gigigigi/.mybin/python-2.7.9/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/home/gigigigi/.mybin/python-2.7.9/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
Traceback (most recent call last):
File "test.py", line 14, in <module>
res = requests.post("https://www.thsrc.com.tw/tw/TimeTable/SearchResult", data = payload)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 109, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 471, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 579, in send