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
聯想IdeaPad G50-80, 17990 | |
沒有品牌迷思可買 | |
優點:HD螢幕(1920x1080)、便宜 | |
缺點:2.5公斤很重、4cell很快沒電、要自己安裝OS | |
http://24h.pchome.com.tw/prod/DHBF04-A9006H00D?q=/S/DHAR8P | |
HP-15, 18900 | |
優點:2.04公斤很輕! | |
http://24h.pchome.com.tw/prod/DHAA51-190068O98?q=/S/DHAR8P#%E8%A6%8F%E6%A0%BC%E8%AA%AA%E6%98%8E |
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
如何利用adb shell開啟指定的app 依循以下步驟操作 | |
首先要能夠得知要開啟app的Activity | |
http://stackoverflow.com/questions/13193592/adb-android-getting-the-name-of-the-current-activity | |
利用adb shell dumpsys activity來取得目前所有的activity | |
可以用這樣的指令 把輸出導到檔案內adb shell dumpsys activity > activity.txt | |
假如我是要找color note 我搜尋color找到這段 | |
ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities)當中的 | |
realActivity = com.socialnmobile.dictapps.notepad.color.note/com.socialnmobile.colornote.activity.Main | |
這就是color note的activity | |
接下來就簡單了!就利用剛剛抓到的activity來啟動 |
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
class Data: | |
__data_instance = None | |
@classmethod | |
def get_instance(cls): | |
if cls.__data_instance is None: | |
cls.__data_instance = Data() | |
return cls.__data_instance |
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
# coding:utf8 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# Feature Envy Factor | |
def FEF(m,n,w,x): | |
return w*m/n + (1-w) * (1-x**m) | |
# 建立w,x軸的0~1切割點陣列 | |
w_list = [] |
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
$(function(){ | |
var getBrowserLanguages = function(callback) { | |
$.ajax({ | |
url: "http://ajaxhttpheaders.appspot.com", | |
dataType: 'jsonp', | |
success: function(headers) { | |
var browserLanguages = []; | |
acceptLanguage = headers['Accept-Language']; | |
var splittedLanguages = acceptLanguage.split(","); | |
for(var i=0; i<splittedLanguages.length; i++){ |
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
$.browserLanguages = function(callback) { | |
$.ajax({ | |
url: "http://ajaxhttpheaders.appspot.com", | |
dataType: 'jsonp', | |
success: function(headers) { | |
var browserLanguages = []; | |
acceptLanguage = headers['Accept-Language']; | |
var splittedLanguages = acceptLanguage.split(","); | |
for(var i=0; i<splittedLanguages.length; i++){ | |
var language = splittedLanguages[i].split(";")[0]; |
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
class Game | |
{ | |
public: | |
Game(); | |
void startGame(); | |
private: | |
void nextTurn(); | |
Player players[3]; | |
Dice dice[5]; |
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
[POST] url/makeFriend | |
{ | |
Header:{ | |
Authentication: "token" | |
} | |
UrlParameter:{ | |
"Name": 使用者名稱 // String | |
"Age": 使用者年齡 // int | |
} |
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
public void ShowStickyPad1() // 在View有一個Not的邏輯,語意是Is Not Show | |
{ | |
if (!IsShow()) | |
{ | |
ShowStickyPad(stickyPad); | |
} | |
} | |
public void ShowStickyPad2() | |
{ |
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
Context _context; | |
public void setBooleanValue(boolean booleanValue) { | |
SharedPreferences settings = _context.getSharedPreferences( | |
PREFERENCE_NAME, 0); | |
SharedPreferences.Editor editor = settings.edit(); | |
editor.putBoolean(PROPERTY_NAME, booleanValue); | |
editor.commit(); | |
} |