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 | |
/** | |
* | |
* 物件集合處理 | |
* @author Cheng-Ting | |
* | |
*/ | |
class Collection | |
{ |
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 | |
class DB | |
{ | |
const ADDR = 'localhost'; | |
const USER = 'showsky'; | |
const PASSWD = ''; | |
const DB = 'object'; | |
private static $db = null; | |
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 java.io.BufferedInputStream; | |
import java.io.BufferedOutputStream; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.net.Socket; | |
public class Client { | |
public static void main(String[] args) throws Exception { | |
Socket server = new Socket("192.168.1.100", 10000); |
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
/** | |
* 實作 Stack | |
* 使用 Link List 資料結構 | |
* 1. Satck 具有 LIFO 後進先出的特性 | |
* 2. push 和 pop 都在同一端操作,且有個 top 永遠指向頂端 | |
* @author Cheng-Ting | |
* | |
*/ | |
/** |
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
public class CrashHandler implements UncaughtExceptionHandler { | |
public static final String TAG = "CrashHandler"; | |
private static CrashHandler INSTANCE = new CrashHandler(); | |
private Context mContext; | |
private Thread.UncaughtExceptionHandler mDefaultHandler; | |
public static CrashHandler getInstance() { | |
return INSTANCE; | |
} |
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
package com.example.android; | |
import android.app.Application; | |
public class App extends Application { | |
public App() { | |
Thread.setDefaultUncaughtExceptionHandler(new SentryLog("/sdcard/tmp", "http//www.miiicasa.com")); | |
} | |
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 java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
import java.net.URLConnection; | |
public class Nike { | |
public static void main(String[] args) throws Exception { | |
String baseURL = "https://api.nike.com/me/sport?access_token="; |
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
package com.miiitv.box.utility; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.DhcpInfo; | |
import android.net.wifi.WifiManager; | |
public class Network { | |
public static DhcpInfo getNetworkInfo(Context context) { |
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
/* | |
* NOTICE NETWORK RUN | |
*/ | |
public void removeUser(int uid) { | |
Device device = StorageCache.getInstance().getDevice(); | |
int nextUID = -1; | |
if (Api.getInstance().unbind(device.secretCode, device.did, uid)) { | |
Logger.d(TAG, "Success remove user: ", String.valueOf(uid)); | |
if (StorageCache.getInstance().getHiatoryUID() == uid) { | |
if (size() >= 2) |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.component" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk | |
android:minSdkVersion="15" | |
android:targetSdkVersion="15" /> |
OlderNewer