First I install some apps. I try to use the AppStore for everything if I can, buth unfortunately that’s not possible. YMMV.
| (ns firstshot.chessknightmove | |
| (:refer-clojure :exclude [== >= <= > < =]) | |
| (:use clojure.core.logic | |
| clojure.core.logic.arithmetic)) | |
| (defn knight-moves | |
| "Returns the available moves for a knight (on a 8x8 grid) given its current position." | |
| [x y] | |
| (let [xmax 8 ymax 8] | |
| (run* [q] |
Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down
One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.
Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o
| SELECT | |
| b.country, | |
| SUM(score) as total_score, | |
| SUM(a.c) as mention_count, | |
| ROUND(SUM(score) / SUM(a.c), 2) as avg_score | |
| FROM | |
| ( | |
| SELECT | |
| a.word, | |
| SUM(a.score) AS score, |
https://developer.apple.com/wwdc/schedule/#/
https://developer.apple.com/download/
- iOS and watchOS: email both .mobileconfig files to yourself, and open them on iOS. You can choose to install the watchOS one on the watch.
- tvOS: http://www.idownloadblog.com/2016/01/26/update-tvos-apple-tv-beta-without-losing-apps-settings-data-configuration-profile/
| """Count words.""" | |
| def count_words(s, n): | |
| """Return the n most frequently occuring words in s.""" | |
| # TODO: Count the number of occurences of each word in s | |
| words = s.split(" ") | |
| # set comprehension so we only have unique values | |
| word_frequencies = {word: words.count(word) for word in words} | |
| word_frequency_tuples = [(word, count) for word, count in word_frequencies.items()] |
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
Based on http://jjyap.wordpress.com/2014/02/21/installing-opencv-2-4-8-on-mac-osx-with-python-support/
- edit
.bashrcor.bash_profileto include:export PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Python/2.7/site-packages/:$PATH" brew updatebrew tap homebrew/sciencebrew install opencvcd /Library/Python/2.7/site-packages/ln -s /usr/local/Cellar/opencv/2.4.9/lib/python2.7/site-packages/cv.py cv.pyln -s /usr/local/Cellar/opencv/2.4.9/lib/python2.7/site-packages/cv2.so cv2.so
-
Create a virtualenv, mkvirtualenv lookup
-
install opencv on mac via homebrew
brew tap homebrew/science
brew install opencv
cd ~/.virtualenvs/lookup/lib/python2.7/site-packages
ln -s /usr/local/Cellar/opencv/{VERSION_NUMBER}/lib/python2.7/site-packages/cv.py cv.py
ln -s /usr/local/Cellar/opencv/{VERSION_NUMBER}/lib/python2.7/site-packages/cv2.so cv2.so