A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
Suppose we want to add support for a new iOS 8 API in our framework that replaces an older iOS 7 API. There are a few problems we might face:
These three problems require three different technical solutions:
respondsToSelector:)__IPHONE_OS_VERSION_MAX_ALLOWED macro| platform :ios, '7.0' | |
| # Core Data | |
| pod 'SSDataKit', :git => 'https://github.com/soffes/SSDataKit', :commit => '60d432e734ae11e8cfedac8ac5f68c0ce8a1b9ba' | |
| # On-disk & in-memory caching | |
| pod 'SAMCache' | |
| # Fast image view for Core Image | |
| pod 'SAMCoreImageView', '0.1.3' |
| #!/usr/bin/env python | |
| # Thread pool based on: http://code.activestate.com/recipes/577187-python-thread-pool/ | |
| from queue import Queue | |
| from threading import Thread | |
| from functools import partial | |
| import tornado.httpserver | |
| import tornado.ioloop | |
| import tornado.options |
| from time import sleep | |
| from tornado.httpserver import HTTPServer | |
| from tornado.ioloop import IOLoop | |
| from tornado.web import Application, asynchronous, RequestHandler | |
| from multiprocessing.pool import ThreadPool | |
| _workers = ThreadPool(10) | |
| def run_background(func, callback, args=(), kwds={}): | |
| def _callback(result): |
| ''' | |
| Created on Jan 30, 2012 | |
| @author: yonits | |
| ''' | |
| import unittest | |
| def flip_indices(new_list, first_idx, second_idx): |
| def tick(cell, number_of_neighbors) | |
| if number_of_neighbors < 2 || number_of_neighbors > 3 | |
| cell.setAlive false | |
| end | |
| if number_of_neighbors == 3 | |
| cell.setAlive true | |
| end | |
| end |