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 StationHashMap implements Parcelable { | |
private HashMap<String, Station> mStationMap = new HashMap<String, Station>(); | |
public StationHashMap() { | |
} | |
public void setStationMap(HashMap<String, Station> stationMap) { | |
mStationMap = stationMap; | |
} |
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 Station implements Parcelable { | |
private int mId; | |
private int mNo; | |
private String mName; | |
public Station() { | |
} | |
// getters and setters... |
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
private HashMap<String, Station> mStationMap; | |
... | |
@Override | |
public void onSaveInstanceState(Bundle outState) { | |
StationHashMap stationHashMap = new StationHashMap(); | |
stationHashMap.setStationMap(mStationMap); | |
outState.putParcelable(SAVE_INSTANCE_KEY_SATION_MAP, stationHashMap); | |
} |
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
#include<stdio.h> | |
#include<stdlib.h> | |
#include<time.h> | |
int main() { | |
int r; | |
int i; | |
for (i = 0 ; i < 11 ; i++) { | |
srand(time(NULL)+i); |
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 | |
if (!defined('BASEPATH')) | |
exit('No direct script access allowed'); | |
class Base_Controller extends CI_Controller | |
{ | |
public function index() | |
{ | |
// ignore | |
$this->_render_view('admin_view', '狗寶'); |
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 http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title><?php echo $title ?></title> | |
<meta name="description" content="狗寶"> | |
<meta name="author" content="yiming"> |
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
<div class="container"> | |
<ul id="tabs" class="nav nav-tabs" data-tabs="tabs"> | |
<li <?php echo (empty($tab)) ? ' class = "active tab-pane"' : ''; ?>><a href="#events" data-toggle="tab">活動列表</a></li> | |
<?php | |
if($this->cmrdb_auth->logged_in()) { | |
$new_event = '<li '; | |
$new_event .= ($tab == 'create') ? ' class = "active tab-pane"' : ''; | |
$new_event .= '><a href="#creat_event" data-toggle="tab">新增活動</a></li>'; | |
echo $new_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
<?php | |
class EvnetTest extends \PHPUnit_Framework_TestCase | |
{ | |
public function eventsProvider() | |
{ | |
return [ | |
[ | |
[ | |
[ |
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
Docker 入門 | |
===================== | |
**Docker** 是一個開源專案,支援多平台,從筆電到公、私有雲上能進行快速部署輕量、獨立的作業環境。**Docker** 使用 Linux 核心中的功能,像 Namespace 及 Control Groups (cgroups) 等,來達到建置獨立的環境及控制 CPU 、Memory 、網路等資源。 | |
![Docker logo](https://lh5.googleusercontent.com/-i5itJJ2tfaY/VGmdrNgDHQI/AAAAAAAADj0/QTalLMbSc08/s500/small_v.png "small_v.png") | |
> **專案網址:** http://www.docker.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
Docker 實作入門 | |
===================== | |
## 目的 | |
主要介紹 Docker 的實作,會提到以下幾個部分: | |
1. 快速的建立 Docker container | |
2. 管理 Docker 上的 container | |
3. 下載 image 、commit 建立新的 image |
OlderNewer