Skip to content

Instantly share code, notes, and snippets.

Avatar
🌊
Experiencing in rough sea

YMHuang ymhuang0808

🌊
Experiencing in rough sea
View GitHub Profile
View Docker 入門
Docker 實作入門
=====================
## 目的
主要介紹 Docker 的實作,會提到以下幾個部分:
1. 快速的建立 Docker container
2. 管理 Docker 上的 container
3. 下載 image 、commit 建立新的 image
View Docker 101
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/
View EventTest.php
<?php
class EvnetTest extends \PHPUnit_Framework_TestCase
{
public function eventsProvider()
{
return [
[
[
[
View Tabo_view.php
<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;
@ymhuang0808
ymhuang0808 / header_view.php
Last active Aug 29, 2015
view/header_view.php
View header_view.php
<!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">
@ymhuang0808
ymhuang0808 / admin.php
Last active Aug 29, 2015
controller/admin.php
View admin.php
<?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', '狗寶');
View random_test.c
#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);
View MapFragment.java
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);
}
View Station.java
public class Station implements Parcelable {
private int mId;
private int mNo;
private String mName;
public Station() {
}
// getters and setters...
View StationHashMap.java
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;
}
You can’t perform that action at this time.