This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// На текущий момент страница со списком устройств на сайте /e/ поменяла дизайн, | |
// так что проверка поддерживает ли устройство /e/ не работает. Но раньше работало :) | |
const fs = require('fs').promises; | |
const path = require('path'); | |
const axios = require('axios'); | |
const cheerio = require('cheerio'); | |
const Iconv = require('iconv').Iconv; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.app.Instrumentation; | |
import android.app.KeyguardManager; | |
import android.app.KeyguardManager.KeyguardLock; | |
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import android.os.IBinder; | |
import android.os.PowerManager; | |
import android.os.PowerManager.WakeLock; | |
import android.support.test.InstrumentationRegistry; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class KeyValueIterator<K,V> { | |
var map:Map<K,V>; | |
var keys:Iterator<K>; | |
static public inline function pairs<K,V>(map:Map<K,V>) return new KeyValueIterator(map); | |
public inline function new(map:Map<K,V>) { | |
this.map = map; | |
this.keys = map.keys(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package xxx.yyy.zzz; | |
#if (flash || nme || openfl) | |
import motion.Actuate; | |
import motion.actuators.IGenericActuator; | |
import motion.actuators.PropertyDetails; | |
import motion.actuators.SimpleActuator; | |
class ColorActuator<T> extends SimpleActuator<T, ColorActuator<T>> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://yal.cc/haxe-some-cleaner-c-style-for-loops/ | |
// macro | |
static macro function cfor(init, cond, post, expr) { | |
#if !display | |
var func = null; | |
func = function(expr:haxe.macro.Expr) { | |
return switch (expr.expr) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ; | |
class Test { | |
public function testShake(view:View):Tween { | |
return tweenManager.serial([ | |
tweenManager.tween(view).toFloat({ offsetX: -5 }), | |
tweenManager.tween(view).toFloat({ offsetX: 5 }), | |
tweenManager.tween(view).toFloat({ offsetX: -5 }), | |
tweenManager.tween(view).toFloat({ offsetX: 5 }), | |
tweenManager.tween(view).toFloat({ offsetX: 0 }), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://kangax.github.io/compat-table/es5/#Object.create | |
var HashMap = function() {} | |
HashMap.prototype = Object.create(null); | |
var map = new HashMap(); | |
map.__proto__ = '__proto__ value'; | |
map.hasOwnProperty = 'hasOwnProperty value'; | |
map.prototype = 'prototype value'; | |
map.toString = 'toString value'; |