(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// assertions/compareScreenshot.js | |
var resemble = require('resemble'), | |
fs = require('fs'); | |
exports.assertion = function(filename, expected) { | |
var screenshotPath = 'test/screenshots/', | |
baselinePath = screenshotPath + 'baseline/' + filename, | |
resultPath = screenshotPath + 'results/' + filename, | |
diffPath = screenshotPath + 'diffs/' + filename; |
// This plugin is an experiment for abstracting away the touch and mouse | |
// events so that developers don't have to worry about which method of input | |
// the device their document is loaded on supports. | |
// | |
// The idea here is to allow the developer to register listeners for the | |
// basic mouse events, such as mousedown, mousemove, mouseup, and click, | |
// and the plugin will take care of registering the correct listeners | |
// behind the scenes to invoke the listener at the fastest possible time | |
// for that device, while still retaining the order of event firing in | |
// the traditional mouse environment, should multiple handlers be registered |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |
if (!document.querySelectorAll) { | |
document.querySelectorAll = function (selectors) { | |
var style = document.createElement('style'), elements = [], element; | |
document.documentElement.firstChild.appendChild(style); | |
document._qsa = []; | |
style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}'; | |
window.scrollBy(0, 0); | |
style.parentNode.removeChild(style); |
Usage:
var player = new Rect(0, 0, 100, 100);
var target = new Rect(50, 50, 100, 100);
player.is = new AABB(player);
player.is.inside(target);
player.is.colliding(target);
player.is.containing(target);
public class Dexter { | |
private static String optimizedDirectory = "optimized"; | |
private static String workDirectory = "working"; | |
public static void loadFromAssets(Context context, String fileName) throws Exception { | |
File optimized = new File(optimizedDirectory); | |
optimized = context.getDir(optimized.toString(), Context.MODE_PRIVATE); | |
optimized = new File(optimized, fileName); |
$.fn.coverIframes = function(){ | |
$.each($("iframe",this),function(i,v){ | |
var ifr = $(v); | |
var wr = $("<div id='wr"+new Date().getTime()+i+"' style='z-index: 999999; opacity: 0; position:absolute; width:100%;'></div>"); | |
ifr.before(wr); | |
wr.height(ifr.height()); | |
wr.click(function(event){ | |
var iframe = ifr.get(0); | |
var iframeDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document; | |
// Find click position (coordinates) |
/Volumes/Untitled
.With that volume in place, and with the macOS installer sitting in /Applications/Install\ macOS\ [VERSION].app
,
run the following command in your terminal to create a bootable install media (for Sierra):
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
๋ณ๊ฒฝ์ด๋ ฅ
AsyncTask๋ API Level 13์ด์ ๋ฒ์ ์ด ์ค์น๋ ๊ธฐ๊ธฐ์์ android:targetSdkVersion๊ฐ 13์ด์ ์ผ ๋ ์ฌ๋ฌ ๊ฐ์ AsyncTask๊ฐ ๋์์ ์คํ๋์ด๋ ์์ฐจ์ ์ผ๋ก ํธ์ถ๋ฉ๋๋ค.
๊ธฐ๊ธฐ์ ๋ฒ์ ๋ฟ๋ง ์๋๋ผ targetSDK ์ค์ ์๋ ์ํฅ์ ๋ฐ์ผ๋ฏ๋ก target SDK ์ค์ ์ ๋ณ๊ฒฝํ ๋ ์ ์ํด์ผ ํฉ๋๋ค. ๊ทธ๋ฆฌ๊ณ ๊ฐ๋ฅํ๋ค๋ฉด ๋ชฉ์ ๋ณ๋ก ์ค๋ ๋ํ์ ๋ถ๋ฆฌํ๊ณ , ์ค๋ ๋์ ๊ฐฏ์๊ฐ ๋์ด๋๋ ๊ฒ์ ๋๋นํด ๋ฌด์์ ํฐ ์ต๋๊ฐ์ ์ฃผ๋๊ฒ๋ณด๋ค๋ Timeout๊ณผ RejectionPolicy๋ก ๊ด๋ฆฌ๋ฅผ ํ๋ ํธ์ด ๋ฐ๋์งํฉ๋๋ค.