[关闭]
@fiy-fish 2017-04-16T10:12:08.000000Z 字数 2423 阅读 1255

2017-04-07 1.swift遇到的一些坑 2.本地git关联GitHub失败 3.Linux 下载文件命令

工作日志


1.swift遇到的一些坑

  1. if let npillInt = Int(npill) {
  2. /* ^^^^^^^^ ^^^^^- since 'npill' has a type annotated with
  3. | '!', it will be unsafely unwrapped at
  4. | this point
  5. \
  6. the optional binding here safely unwraps the return from
  7. the failable Int initializer, but has nothing to do with
  8. the unwrapping of 'npill' */
  9. print(npillInt) // 42
  10. }
  1. var leadOffSet:CGPointvar //声明一个leadOffSet 属性
  2. override init() {
  3. //属性为可选值时不用初始化
  4. //属性为非可选值时,先初始化属性 ,再初始化父类
  5. leadOffSet = .zero//初始化属性
  6. super.init()
  7. }

2.本地git关联GitHub失败

  1. wuzhiyi@IBM367-PB3Z5TM MINGW64 ~/workspace/HelloWorld/src/selenium (master)
  2. $ git push osc master
  3. To git@git.oschina.net:wuzhiyi51/selenium_learn.git
  4. ! [rejected] master -> master (non-fast-forward)
  5. error: failed to push some refs to 'git@git.oschina.net:wuzhiyi51/selenium_learn.git'
  6. hint: Updates were rejected because the tip of your current branch is behind
  7. hint: its remote counterpart. Integrate the remote changes (e.g.
  8. hint: 'git pull ...') before pushing again.
  9. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解决办法:

  1. $ git push -u osc master -f
  2. Total 0 (delta 0), reused 0 (delta 0)
  3. To git@git.oschina.net:wuzhiyi51/selenium_learn.git
  4. + 4b61567...a20bcfd master -> master (forced update)
  5. Branch master set up to track remote branch master from osc.
  6. $ git push osc master
  7. Everything up-to-date

3.Linux 下载文件命令

wget url
文章地址:http://blog.csdn.net/hitabc141592/article/details/7561239
下载的文件可能会打不开,直接把后缀改为.zip就好了


添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注