開始使用 Pyhton 之前,首先要確定電腦上能不能執行 Pyhton 程式。本教學將需要 Python 3.4 或更高的版本,因此請確認電腦上是否有對應版本。若不確定電腦上是否已經安裝 Python,建議直接按照以下步驟設定,以保證教學中的程式皆能夠正常執行。由於各作業系統安裝流程不同,以下請按照作業系統,選擇自己需要的部份閱讀。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Yocto build was showing a warning of "QA Issue: No GNU_HASH in the elf binary". | |
| - The fix was to make sure that linker command line used by the respective application is using parameters used by Yocto build system. | |
| - Just for information $(LDFLAGS) used by Yocto is having -Wl,--hash-style=gnu. | |
| Ref: For inside of GNU_HASH: https://blogs.oracle.com/ali/entry/gnu_hash_elf_sections |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'digest/sha2' | |
| require 'base64' | |
| require 'mcrypt' # 需要 php5-mcrypt libmcrypt-dev libmcrypt | |
| class EncryptionService | |
| prepend SimpleCommand # 可在 rails controller 簡單呼叫這個 library 的 plugin | |
| def initialize(payload) # 將前台的動態資訊組好後丟進來 | |
| @payload = payload | |
| end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| python字符串切片处理DB2 DEL文件断行问题实现不以引号开头的行与上一行连接.py | |
| 题目来源 http://www.bathome.net/thread-38164-1-1.html | |
| 依山居 17:47 2015/11/24 | |
| 这个解决思路在脑子里绕了好几天~找到\n也就是换行符,同时切出它的下一位不为"号的字符。 | |
| 也就是不以引号开头行的第一个字。然后再替换掉\n | |
| 感觉这个处理方法,不需要正则表达式可靠性也很高。 | |
| """ | |
| import time | |
| start=time.time() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://www.youtube.com/watch?v=Nub1ChUHhnM&feature=youtube_gdata_player |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ---------------------------------------------------------- | |
| # Configuration for hosting Git repositories with Apache 2.x | |
| # ---------------------------------------------------------- | |
| # | |
| # This setup provides "dual URLS", where URL like <http://git.example.com/my_repository.git> | |
| # loads Gitweb in the browser and the same URL can be used in commands like `git clone` and `git remote add`. | |
| # It was compiled from some sources on the internet and further customized/tuned. | |
| # | |
| # Please see documentation for: | |
| # |