公告版位
需要找什麼嗎? 左邊分類或許可以幫助你...

using UnityEngine;
using System.Collections;

public class Test : MonoBehaviour {

    string userId = "986633361362932"; // Facebook 用戶 ID

    IEnumerator Start () {
        WWW www = new WWW("https://graph.facebook.com/" + userId + "/picture?type=large");
        yield return www;
        renderer.material.mainTexture = www.texture;
    }

}

黃彥霖 發表在 痞客邦 留言(0) 人氣()




MP4 轉 JPG (下面的Out代表本地資料夾,要事先先建立好,加這個原因是因為到時圖片會擠在同一個資料夾很亂)

ffmpeg -i 1.mp4 Out/%4d.jpg

高畫質版:

ffmpeg -i a.mp4 -f image2 -vcodec mjpeg -qscale 1 A/%8d.jpg

黃彥霖 發表在 痞客邦 留言(0) 人氣()

匯入 "time" 包,然後將以下程式碼加到你的程式碼中,就會有延遲效果 

time.Sleep(1 * time.Second)



黃彥霖 發表在 痞客邦 留言(1) 人氣()

os.Mkdir("A", os.ModePerm); // 當前目錄建立 A 資料夾
os.MkdirAll("A/B/C", os.ModePerm); // 當前目錄建立 多層 資料夾

os.Remove("A.txt") // 刪除檔案 (可多層)
os.RemoveAll("A") // 刪除資料料夾 (可多層)

// 以下為判斷該目錄或檔案是否存在,並判斷是資料夾還是檔案

finfo, err := os.Stat("AB")

黃彥霖 發表在 痞客邦 留言(0) 人氣()

// Golang Server

package main

import (
    "net/http"
    "fmt"
)

func loadin(w http.ResponseWriter, r *http.Request) {
    username := r.FormValue("username")
    password := r.FormValue("password")

黃彥霖 發表在 痞客邦 留言(0) 人氣()