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
/* | |
請搭配以下環境參數和 Personalized Web 參數使用 | |
環境: chrome,搭配 extension "Personalized Web" ( https://chrome.google.com/webstore/detail/personalized-web/plcnnpdmhobdfbponjpedobekiogmbco ) | |
Personalized Web 設定 | |
Match URLs: ^http://www.mobile01.com/topicdetail.php.* | |
Add JavaScript: 加入以下內容 | |
*/ | |
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
/* | |
在 Google 頁面使用方向鍵切換上一頁、下一頁 | |
Change result page with Arrow keys(left/right) on google search pages. | |
請搭配以下環境參數和 Personalized Web 參數使用 | |
env: chrome with extension "Personalized Web" ( https://chrome.google.com/webstore/detail/personalized-web/plcnnpdmhobdfbponjpedobekiogmbco ) | |
setting of Personalized Web: | |
Match URLs: ^https://www.google.com/search.* | |
Add JavaScript: add the following JS | |
*/ |
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
//檢查版本 | |
function checkBrowserVersion(){ | |
var isShowBrowserNotice = false; | |
var N= navigator.appName, ua= navigator.userAgent, tem; | |
var M= ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); | |
if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1]; | |
M= M? [M[1], M[2]]: [N, navigator.appVersion, '-?']; | |
var version = M[1].substring(0, M[1].indexOf(".")); | |
//chrome < 15, firefox <2, ie <8 出现提示 | |
if((M[0]== "Chrome" && 15 > parseInt(version)) || (M[0]== "Firefox" && 2 > parseInt(version)) || (M[0]== "MSIE" && 8 > parseInt(version))) |
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
/* | |
this code tis purposed to make data for AngularJS from data kind of | |
province district | |
data-A1 data-B1 | |
data-A1 data-B2 | |
data-A1 data-B3 | |
to | |
[province: "data-A1", districts: [ | |
{distict: "data-B1"}, | |
{distict: "data-B2"}, |
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"?> | |
<root> | |
<item> | |
<name>用左邊的英數按鈕切換輸入法 - Switch Input Source by left en</name> | |
<appendix>Use the right option and right shift to select the next input source(用左邊的英數按鈕切換輸入法)</appendix> | |
<identifier>private.switch_next_input_source_by_jiseiuu</identifier> | |
<autogen>--KeyToKey-- KeyCode::JIS_EISUU, KeyCode::SPACE, ModifierFlag::COMMAND_L</autogen> | |
</item> | |
<item> | |
<name>把右邊的kana按鈕當做 option - change kana to option_r</name> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, maximum=1.0, minimum-scale=1.0"> | |
<!-- width:可設定數值,或者指定為 device-width | |
height:可設定數值,或者指定為 device-height | |
initial-scale:第一次進入頁面的初始比例 | |
minimum-scale:允許縮小最小比例 | |
maximum-scale:允許放大最大比例 |
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
<!-- | |
disable web page locks, | |
for chrome, get extesion: https://chrome.google.com/webstore/detail/personalized-web/plcnnpdmhobdfbponjpedobekiogmbco | |
and add code below | |
--> | |
<style type="text/css"> | |
* { | |
-moz-user-select: text !important; | |
-webkit-user-select:auto !important; |
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
/* | |
no need to copy this section. | |
ussge: | |
in CustomClass.h | |
+(instancetype)sharedManager; | |
in CustomClss.m | |
@implementation CustomClass | |
... | |
SYNTHESIZE_SINGLETON_FOR_CLASS(CustomClass) |
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
-- northwind for postgreSQl.. tell me if it works :p | |
-- | |
-- PostgreSQL Northwind Database v1.0 from Ramiro Estigarribia Canese | |
-- you may contact him at email [email protected] | |
-- | |
SET statement_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = on; |
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
// 固定用的一些 macro 方法,不牵涉 app 变数定义 | |
// 取角度, convert radius to angle | |
#define degreesToRadian(x) (M_PI * (x) / 180.0) | |
//取螢幕尺寸, screen resolution | |
#define kScreenWidth [[UIScreen mainScreen] bounds].size.width | |
#define kScreenHeight [[UIScreen mainScreen] bounds].size.height | |
//判斷是否 iPhone 5, this may need change after iphone6.. |
OlderNewer