Последовательно, согласно нумерации.
\n- перенос строки
import * as React from 'react'- Импорты из сторонних библиотек
\n - Локальные импорты по абсолютным путям
| #!/bin/sh | |
| # | |
| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # |
| private static extern(Android) string GetUUID() | |
| @{ | |
| //android.app.Activity context = com.fuse.Activity.getRootActivity(); | |
| //return android.provider.Settings.Secure.getString(context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); | |
| final android.app.Activity context = com.fuse.Activity.getRootActivity(); | |
| final TelephonyManager tm = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE); | |
| final String deviceId = "" + tm.getDeviceId(); | |
| final String serialNum = "" + tm.getSimSerialNumber(); | |
| final String androidId = "" + android.provider.Settings.Secure.getString( | |
| context.getContentResolver(), |
| // 1. Generate new private RSA Key: | |
| // openssl req -newkey rsa:2048 -new -nodes -keyout key.pem -out csr.pem | |
| // 2. Derivate public RSA Key from private: | |
| // openssl rsa -in key.pem -out public_key.pem -outform PEM -pubout | |
| const crypto = require('crypto'); | |
| const fs = require('fs'); | |
| const hashes = crypto.getHashes(); |
| <!-- | |
| SVG Filters supports by all browsers: | |
| http://caniuse.com/#search=SVG%20filters | |
| Advantages: | |
| - Performance (CSS) Filters usually has GPU acceleration | |
| - Support transpatent areas | |
| Disantages: | |
| - Hasn't inset shadows and Spread Radius |
| [ | |
| { | |
| type: "button" | |
| icon: "social-buffer" | |
| callback: "application:add-project-folder" | |
| tooltip: "Add Project" | |
| iconset: "ion" | |
| style: { | |
| color: "rgba(255, 255, 255, 0.7)" | |
| transform: "scale(1.2)" |
| - https://www.campaignmonitor.com/css/ | |
| - https://kb.mailchimp.com/templates/code/common-html-mistakes | |
| - http://litmus.com/email-testing |
| const charset = '0123456789abcdef'.split(''); | |
| const randomset = new Uint8Array(16); | |
| export function uuid() { | |
| let rand = 0; | |
| for (let i = 0; i < 16; i++) { | |
| if (rand < 2) { | |
| rand += Math.random() * (1 << 24); | |
| } | |
| randomset[i] = rand & 0xFF; |
| export function defaultComparator<T>(a: T, b: T): i32 { | |
| return (<i32>(a > b)) - (<i32>(a < b)); | |
| } | |
| export function createDefaultComparator<T>(): (a: T, b: T) => i32 { | |
| return (a: T, b: T): i32 => (<i32>(a > b)) - (<i32>(a < b)); | |
| } | |
| export function isSorted<T>(data: Array<T>, comparator: (a: T, b: T) => i32 = createDefaultComparator<i32>()): bool { | |
| for (let i: i32 = 1, len: i32 = data.length; i < len; i++) { |
| #![feature(core_intrinsics, lang_items)] | |
| #![no_main] | |
| #![no_std] | |
| #[lang = "panic_fmt"] | |
| extern "C" fn panic_fmt(_args: ::core::fmt::Arguments, _file: &'static str, _line: u32) -> ! { | |
| use core::intrinsics; | |
| unsafe { | |
| intrinsics::abort(); | |
| } |