两个软硬程度一样但未知的鸡蛋,它们有可能都在一楼就摔碎,也可能从一百层楼摔下来没事。有座100层的建筑,要你用这两个鸡蛋通过最少的次数确定哪一层是鸡蛋可以安全落下的最高位置。可以摔碎两个鸡蛋
看到这个题目,最保险的方法就是一层一层试验,但这样只需要一个鸡蛋就可以了。我们现在有两个鸡蛋,完全可以用有更快的方法。
--- | |
language: objective-c | |
before_script: | |
- ./scripts/travis/add-key.sh | |
after_script: | |
- ./scripts/travis/remove-key.sh | |
after_success: | |
- ./scripts/travis/testflight.sh | |
env: | |
global: |
#!/bin/bash | |
set -ex | |
# This scripts allows you to upload a binary to the iTunes Connect Store and do it for a specific app_id | |
# Because when you have multiple apps in status for download, xcodebuild upload will complain that multiple apps are in wait status | |
# Requires application loader to be installed | |
# See https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html | |
# Itunes Connect username & password | |
USER=bla |
What exactly is "iowait"? | |
To summarize it in one sentence, 'iowait' is the percentage | |
of time the CPU is idle AND there is at least one I/O | |
in progress. | |
Each CPU can be in one of four states: user, sys, idle, iowait. | |
Performance tools such as vmstat, iostat, sar, etc. print | |
out these four states as a percentage. The sar tool can | |
print out the states on a per CPU basis (-P flag) but most |