GoのVersion管理を楽に
<(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source /Users/xxx/.gvm/scripts/gvm
gvm version
gvn listall
//-B binary only,no source file
gvm install go1.9.5 -B
gvm install go1.11.1 -B
gvm use go1.11.1 --default
go version
///Users/kouha.shu/.gvm/gos/go1.11.1
echo $GOROOT
///Users/xxx/.gvm/pkgsets/go1.11.1/global
echo $GOPA...
2018/10/25
2018/10/19
gorm transaction
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 17.0px 'Helvetica Neue'; color: #454545}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545; min-height: 14.0px}
span.s1 {font: 17.0px '.Hiragino Kaku Gothic Interface'}
span.s2 {font: 12.0px '.Hiragino Kaku Gothic Interface'}
TransactionsTo perform a set of operations within a transaction, the general flow is as below.
// begin a transaction
tx := db.Begin()
// do some...
2018/10/16
Graphql
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px '.Hiragino Kaku Gothic Interface'; color: #454545}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545; min-height: 14.0px}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545; min-height: 15.0px}
span.s1 {font: 12.0px '.Hiragino Kaku Gothic Interface'}
span.s2 {font: 12.0px 'Helvetica Neue'}
・more easier than RESTAPI。Client側のRequestを柔軟に対応できる感じで
QueryLanguage!条件は自分で指定し、結果を返す
QueryLanguageをサポートするServices、Type、Field、Functions
・What...
docker gae EMPTRY_RESPONSE
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #e4af0a}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545; min-height: 14.0px}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px '.Hiragino Kaku Gothic Interface'; color: #454545}
span.s1 {font: 12.0px '.Hiragino Kaku Gothic Interface'}
span.s2 {color: #454545}
span.s3 {font: 12.0px '.Hiragino Kaku Gothic Interface'; color: #454545}
span.s4...
2018/10/11
window7 テザリング 制限付き接続
家のAU光が接続障害になり、
携帯でテザリングし、Macはすぐ上手く行くが、
window7 テザリング 制限付き接続になり、ネットアクセスできない。。一瞬できたこともあり、
電源プランを高パフォーマンスにし、上手くできた。。。意味が何となくわからない...
2018/09/30
2018/09/29
windows cmd tools
Cmder
https://conemu.github....
go project .ignore
.DS_Store*.[56789ao]*.a[56789o]*.so*.pyc._*.nfs.*[56789a].out*~*.orig*.rej*.exe.*.swpcore*.cgo*.go*.cgo*.c_cgo_*_obj_test_testmain.go/VERSION.cache/bin//build.out/doc/articles/wiki/*.bin/goinstall.log/last-change/misc/cgo/life/run.out/misc/cgo/stdio/run.out/misc/cgo/testso/main/pkg//src/*.*//src/cmd/cgo/zdefaultcc.go/src/cmd/dist/dist/src/cmd/go/internal/cfg/zdefaultcc.go/src/cmd/go/internal/cfg/zosarch.go/src/cmd/internal/objabi/zbootstrap.go/src/go/build/zcgo.go/src/go/doc/headscan/src/runtime/internal/sys/zversion.go/src/unicode/maketables/test.out/test/garbage/*.out/test/pass.out/test/run.out/test/times.out#...
2018/09/25
Python class method return None
cat = Cat()
print(cat.sound())
-->
--miao--
None
が出力される。class's method will return None defaultly,that means method executed successfully!
詳しく↓
On the actual behavior, there is no difference. They all return None and that's it. However, there is a time and place for all of these. The following instructions are basically how the different methods should be used (or at least how I was taught they should be used), but they are not absolute rules so you can mix them up if you feel necessary to.
Using return None
This tells that...
2018/09/24
Great! get source code in Python
Google BloggerのPythonLibを使って、Bloggerを操作したいですが、Docはどこにもない。。Great! get source code in Python
http = credentials.authorize(http = httplib2.Http())
service = build('blogger','v3',http=http)
posts = service.posts()
#for x in inspect.getmembers(posts,inspect.ismethod or inspect.isfunction):
# print(x)
print(inspect.getsource(posts.update)...
Difference between Method and Function in Python
Python Method
Method is called by its name, but it is associated to an object (dependent).
A method is implicitly passed the object on which it is invoked.
It may or may not return any data.
A method can operate on the data (instance variables) that is contained by the corresponding class
Functions
Function is block of code that is also called by its name. (independent)
The function can have different parameters or may not have any at all. If any data (parameters) are passed, they are passed explicitly.
It may or may not return...
2018/04/03
eclipse保存git密码
在git的那个模式里,找到一个工程,pull一下,保存就...
2018/03/28
spring的想法
能不能用spring的想法来服务现实世界呢!?让控制反转来减轻客户的负担!能实现的话真是太棒了!
一般的买东西==去买,自己行动
定期便==cron,定时的执行,没有什么新意
仔细分析一下:
需要的时候就被提供。怎么知道需要呢?用到了,用的时候直接取,已经准备好了,提供了。。。
比如说厕所手纸,
基本上可以实现,使用的频率,家族构成,日程,分析一下,判断什么时候需要买手纸了。
手纸的话,价格,品牌可以事先设定。。。
数据分析,AI?!!
世界还在发展中。。。
对,准备一个特定的容器,刚开始是满的,没有了的话,自动补充。。。。!
这个容器是象征性的还是实物呢?
实物的话,就变成仓库了。
象征性的话,得想办法反应现实世界。。
自动并且准确的反应现实世界,然后...
2018/03/27
TypeConverterDelegate.doConvertTextValue
目的是想解决gcs的resource数组对应问题。
editer.setAsText()
这个地方很重要啊,好像是做一些转换
不同类型的resource被不同的类处理?
Resource[]被安排到了ResourceArrayPropertyEditor了
这里面没有对应的protocolReslover是问题点。
对比单个gcs resource 的流程可以洞晓
在GoogleStorage Protocol Resolver
里添加相应的处理就可以了...
Google_application_credentials
好像是gcloud或者机器登录帐号,或者安装gcp sdk的时候,这个变量被设置了。
gcloud auth login
设置了之后,eclipse还是用另外一个账号。。
为什么呢?以前解决了,又忘记了。。。
写在笔记本上也找不着了。
细细地查了一下
gcloud auth application-default login
试了一下,可以了。。。
在我可以理解的范围之内,我只能理解成故弄玄虚。...