A
type Request interface{}
type Response interface{}
type Method interface {
NewRequest() Request
Call(r Request) Response
}
package main | |
import ( | |
"fmt" | |
"github.com/rwcarlsen/goexif/exif" | |
"golang.org/x/xerrors" | |
"io/ioutil" | |
"log" | |
"os" | |
"path/filepath" |
(function() { | |
"use strict"; | |
/** | |
* objファイルを読み込む | |
*/ | |
function loadObj(objUrl, mtlUrl, callbackOnLoaded) | |
{ | |
// obj mtl を読み込んでいる時の処理 | |
var onProgress = function ( xhr ) { |
import Foundation | |
func readCsv(path: String) -> [[String]] { | |
let lines = readFile(path: path) | |
var ret: [[String]] = [] | |
for line in lines { | |
ret.append(line.components(separatedBy: ",")) | |
} | |
return ret | |
} |
# FROM alpine:latest | |
# because alpine has musl instead glibc however bluemix-cli requires it. | |
# https://hub.docker.com/r/frolvlad/alpine-glibc/ | |
FROM frolvlad/alpine-glibc:latest | |
RUN mkdir -p /root/bin | |
ENV PATH $PATH:/root/bin | |
RUN apk --no-cache add openssl ca-certificates bash sudo |
A
type Request interface{}
type Response interface{}
type Method interface {
NewRequest() Request
Call(r Request) Response
}
例えば誰かから次のようなJSONファイルを受け取ったとします。
% cat a.json
[1,2,3]
Goで読んでみる
/**使用例 | |
jar := // http.Client経由でcookieを格納したhttp.cookiejar.Jar | |
for _, v := range jar.Keys() { | |
// ここで標準出力に出力する代わりにファイルにでも書き出せばOK | |
fmt.Printf("%s -> %s\n", v, jar.Cookies(v)) | |
} | |
*/ | |
package cookiejar |
import os | |
import sys | |
from setuptools import setup, find_packages | |
from setuptools.command.test import test as TestCommand | |
from distutils.cmd import Command | |
here = os.path.abspath(os.path.dirname(__file__)) | |
README = open(os.path.join(here, 'README.txt')).read() | |
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() |
// | |
// Created by miff on 11/24/12. | |
// | |
// To change the template use AppCode | Preferences | File Templates. | |
// | |
#import "KIFTestStep+EmoticonPalette.h" | |
#import "KIFTestStep+EXAdditions.h" | |
#import "UIApplication-KIFAdditions.h" |
sed -i '1s/^/N\/A\n/' filename |