7月 25, 2017

『TensorFlow』在Windows用Anaconda安裝TensorFlow與Keras


如果是Python初學者,強烈建議使用Anaconda虛擬環境

因為各式需要Python的軟體可能會有版本不一的情形發生

這裡要教大家安裝Anaconda與Tensorflow + Keras環境的步驟

7月 25, 2017

7月 21, 2017

『Git』git push相關與error: src refspec does match any解法


經過一天的辛苦準備要將自己打好的程式碼上傳時

使用git push origin "你的遠端branch名稱" 卻發現......有error如下

error: src refspec "你的遠端branch名稱" does not match any.
error: failed to push some refs to .........


7月 20, 2017

『MVC JavaScript』TimeOut登出

在開發MVC的專案有時會需要畫面不動一段時間後要自動登出的功能,以下範例為10分鐘若鍵盤和滑鼠沒有在網頁上動作時,則登出的方法!

7月 20, 2017

7月 19, 2017

『Android』在string.xml中使用%1$d或%1$s等變數


這裡教大家如何讓string.xml裡面的字串變成可以編輯部分區域的字串

例如在xml內使用
<string name="hello">"你好!我是%1$s"</string> 

達成
"你好!我是阿緯"或是"你好!我是大瑋"等可變字串結果


7月 19, 2017

7月 19, 2017

7月 18, 2017

『Swift』用NotificationCenter的Observer來達到觸發函式的目的


若想在兩個Swift檔案中互相傳遞訊號

這裡有一個簡單的方法,就是加入observer去做監聽,當有post發出時就會收到!

7月 17, 2017

『其他』如何在Blogger文章顯示程式碼


在部落格中嵌入好看的程式碼,應該是部落工程師的必備條件

雖然桌面截圖好像來得更快更方便,但是缺點就是不能讓讀者用CV大法

以下就來教學如何在Blogger中嵌入程式碼

顯示結果如下↓

import UIKit
import Firebase

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
  var window: UIWindow?

  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    FirebaseApp.configure()
    return true
  }
}