dropshado.ws: NaN messes with sorting -
It remain me when I found undefine & null in the output
I’m building some dynamic table sorting. Looks like
NaNvalues are messing with the sorting. For the sake of the example, let’s use an array of number-like strings. Try pasting this in your console.(function() { var numbers = '19 26 63 twelve 83 106 hundred zero 12'.split(' '); return...
I believe he can fly.
KYMdb - Tranquilized Sky Bear
I want to believe, too
戀愛TDD
(Source: programmerryangosling)
Bwoken - iOS UIAutomation testing in CoffeeScript -
Testing iOS apps is hard. Apple’s UI Automation lets you write test scripts in JavaScript and simulate user interaction, but who wants to hang out in the Instruments GUI app? Bendyworks has improved on the process, however, bringing the simplicity of Rake and the elegance of CoffeeScript to your UI Automation tests:
#import "../../../../Pods/tuneup_js/tuneup.js" #import "helpers/TravisCI.js" test 'Favoriting a repository', (target, app) -> RepositoriesScreen.tapRepositoryNamed 'CITravis by Travis-ci' BuildsScreen.addToFavorites(app) BuildsScreen.back() RepositoriesScreen.tapFavorites() FavoritesScreen.assertFavoriteNamed 'CITravis by Travis-ci' FavoritesScreen.tapAll() test 'Unfavoriting a repository', (target, app) -> RepositoriesScreen.tapFavorites() FavoritesScreen.assertFavoriteNamed 'CITravis by Travis-ci' FavoritesScreen.tapFavoriteNamed 'CITravis by Travis-ci' BuildsScreen.removeFromFavorites(app) BuildsScreen.back() FavoritesScreen.assertNoFavoriteNamed 'CITravis by Travis-ci' FavoritesScreen.tapAll()This single test can be run from the command line with:
$ RUN=iphone/favorites rakeCheck out the project website, source on GitHub, or introductory video for more. Also be sure to check out their TravisCI.app, a mobile client for Travis CI, for a real-world example.
HTML5 JavaScript Pasting Image Data in Chrome -
用JS貼圖看似不可能但可以做到 (絕大多數browser不給clipboard data access)。這個方法不是用clipboard data做的,不過又是Chrome only…
Chrome的獨家Event: paste event (chrome 13+). 在Paste Event中可以抽出image data (clipboardData)然後再由JS call FileAPI傳回DOM這樣
基本上和drag and drop event處理image data性質相近,很迂回曲折而且沒FileAPI就無用武之地…
:target以外的CSS-only click event -
一言蔽之:
<a>以外的element的:active和:hover
很機車啊…
Travis CI now supports Python and Perl -
Great Stuff.
Since we first covered Travis CI a year ago, the project has continued to improve support for Ruby as well as additional languages. In addition to supporting PHP as well as Java, Scala, and Groovy, Travis now supports Perl and Python.
Setting up your Python project is straightforward. Just provide the
travis.ymlto declare your supported Python versions, install, and test scripts:language: python python: - 2.6 - 2.7 - 3.2 install: pip install -r requirements.txt --use-mirrors script: python setup.py testWe’re excited to have Josh and Mathias from the Travis team on the next episode. Stay tuned.
將 DuckDuckGo 設定為 Safari 預設搜尋引擎 -
DuckDuckGo 跟 Google 一樣是搜尋引擎,但它不追蹤且不過濾你的搜尋結果。
由於 Google 會根據你的使用記錄給你「最相關」的搜尋結果,所以到最後搜尋的結果都會變成你想要看的,你被限制在一個固定資訊來源的泡泡裡。
DuckDuckGo 則給你網路真實的樣貌。
但是目前並沒有很方便能將 DuckDuckGo 設定為預設搜尋引擎的方法,必須要下載這個軟體安裝才行。
這個程式會將 Safari 內建的 Yahoo 取代為 DuckDuckGo,所以安裝完後必須在 Safari 的預設搜尋引擎裡選擇 Yahoo。
it is cool.
(Source: already-made)