Skip to content

Instantly share code, notes, and snippets.

import RecordData from "../data/RecordData";
import { observable, computed, action } from "mobx";
import DataLoader from "../services/DataLoader";
import TableData from './TableData';
export default class Store {
@observable records: RecordData[] = [];
@observable searchString: string = "";
@observable tableData:TableData = new TableData();
import React, { KeyboardEvent, Component } from "react";
import {
makeStyles,
withStyles,
Theme,
createStyles
} from "@material-ui/core/styles";
import Table from "@material-ui/core/Table";
import TableHead from "@material-ui/core/TableHead";
import TableBody from "@material-ui/core/TableBody";
@k0t0vich
k0t0vich / Main.hx
Created August 1, 2019 20:37
Typed event listeners example In the beginning of this article we also mentioned the addEventListener function, so for the sake of completeness, let's also apply our new knowledge to it. Here, we use type parameter to specify listener function type:
import haxe.Constraints.Function;
abstract Event<T:Function>(String) {
public inline function new(name) {
this = name;
}
}
extern class EventEmitter {
function new();
if ( asset ) { // если ассет, то помучаемся
DeleteUtils.remove(asset._managers, this );
for each ( var has:Boolean in asset._managers ) break;
// вот что здесь должно быть? первое значение? любое значение?
if ( !has ) {
DeleteUtils.remove(_HASH, bundleName );
private function checkPermissions():void {
if (File.permissionStatus != PermissionStatus.GRANTED){
var dir:File = File.documentsDirectory.resolvePath("air.ru.mail.games.riotzone");
//dir.addEventListener(PermissionEvent.PERMISSION_STATUS, permissionStatusHandler);
_interval = setInterval(checkPermissionAnswer, 1000);
dir.requestPermission();
} else {
initApp();
}
}
private function checkPermissions():void {
if (File.permissionStatus != PermissionStatus.GRANTED){
var dir:File = File.documentsDirectory.resolvePath("air.ru.myGame");
dir.addEventListener(PermissionEvent.PERMISSION_STATUS, permissionStatusHandler);
dir.requestPermission();
} else {
initApp();
}
}
@k0t0vich
k0t0vich / MobileAndroid-app.template.xml
Last active May 13, 2016 15:15
air android ant make apk for armv7 and x86
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/[airVersionPattern]">
<filename>[fileNamePattern]</filename>
<id>[packagePattern]</id>
<name>[namePattern]</name>
<versionNumber>[versionNumberPattern]</versionNumber>
<versionLabel>[versionLabelPattern]</versionLabel>
<initialWindow>
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
private function writeNextFile():void {
Tracer.add("DownloadTarResourcesCommand.writeNextFile:",_filesToWriteCount, _filesToWrite.length, MAX_FILES_TO_WRITE, _totalFilesToWriteCount);
var tarFile:TarFile;
if (_filesToWriteCount <= MAX_FILES_TO_WRITE && _filesToWrite.length > 0){
tarFile = _filesToWrite.pop();
_filesToWriteCount++;
var path: String = _context.hash[tarFile.name].md5Name;
new EazeTween(_fg)
.to(0.2e3, { alpha: 1 })
.onComplete(function():void {
updateValue();
if ( _fg ) {
new EazeTween(_fg).to(0.5e3, { alpha: 0 } );
}
});
// эквивалент ли?