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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export2.dtd"> | |
<en-export export-date="20140808T033704Z" application="Evernote/Windows" version="5.x"> | |
<note><title>11111</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"> | |
<en-note style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> | |
11111<en-media hash="ae0751e9bc3e3f41ec0a1dfe116a0bc1" style="cursor: default;" type="application/octet-stream"/><en-media hash="6bd172bc351ea767cbb49216da9c5fcf" style="cursor: default;" type="application/octet-stream"/></en-note>]]></content><created>20140808T030300Z</created><updated>20140808T033432Z</updated><resource><data encoding="base64"> | |
UEsDBBQAAAAAAHGopj4AAAAAAAAAAAAAAAAEAAAAY3NzL1BLAwQUAAAACABHp6Y+Epomre0BAAAP | |
BwAADgAAAGNzcy9sYXlvdXQuY3NzzVVNb9swDL0HyH8wEOxSVKudJUOnnYYOxS677q5YtCNUFg2J |
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
import android.accessibilityservice.AccessibilityService; | |
import android.accessibilityservice.AccessibilityServiceInfo; | |
import android.util.Log; | |
import android.view.accessibility.AccessibilityEvent; | |
public class RecorderService extends AccessibilityService { | |
static final String TAG = "RecorderService"; | |
private String getEventType(AccessibilityEvent event) { |
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
// 錯誤的程式 | |
while(true){ | |
$v = 2; | |
switch($v){ | |
case 1: | |
echo '1'; | |
break; | |
default: | |
continue ; | |
} |
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
# encoding: utf-8 | |
def company_serial_no_checker(serial) | |
# 共八位,全部為數字型態 | |
at_least_8_digits = /^\d{8}$/ | |
return false unless at_least_8_digits.match(serial) | |
# 各數字分別乘以 1,2,1,2,1,2,4,1 | |
# 例:統一編號為 53212539 |
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 | |
/*************************************************************************************************** | |
* 功用:抓取 YouTube 影片下載網址 | |
* | |
* 用法:在 console 模式下執行 | |
* php-cgi -q getvideo.php "http://www.youtube.com/watch?v=ReUXNUy6w98&mode=related&search=" | |
* | |
* 開發環境: | |
* [1] PHP5 for Windows | |
* [2] Windows XP Professional |
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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals, division, with_statement, print_function | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
import requests | |
import io |
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
<template> | |
<h1>Hello, {{who}}</h1> | |
</template> | |
<script> | |
module.exports = { | |
props: { | |
who: { | |
type: String, | |
default: 'World' |