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
Launching lib/main.dart on Nokia 3 2 in debug mode... | |
FAILURE: Build failed with an exception. | |
* What went wrong: | |
Execution failed for task ':app:processDebugResources'. | |
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'. | |
> Failed to transform play-services-base-16.0.1.aar (com.google.android.gms:play-services-base:16.0.1) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}. | |
> Execution failed for AarResourcesCompilerTransform: /home/user/.gradle/caches/transforms-2/files-2.1/2ea5d7a03e44f60bb834c70b483efa76/jetified-play-services-base-16.0.1. | |
> AAPT2 aapt2-4.1.0-6503028-linux Daemon #0: Unexpected error during compile '/home/user/.gradle/caches/transforms-2/files-2.1/2ea5d7a03e44f60bb834c70b483efa76/jetified-play-services-base-16.0.1/res/drawable-xhdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon. |
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 'communicator.dart'; | |
void main() { | |
final communicator = WorkerCommunicator('worker.dart.js') | |
..listen((event) { | |
print('Data from worker: "$event"'); | |
}); | |
communicator.add('Ping'); | |
} |
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 main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"testing" | |
) |
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
/* | |
Один обработчик на все пути: | |
Реализовано стандартными средствами языка - через возврат функции с замыканием параметра. | |
Конечно, можно было использовать сторонние библиотеки роутинга, или middleware. | |
*/ | |
package main | |
import ( | |
"encoding/json" | |
"fmt" |
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
//deno 0.32.0 | |
//v8 8.1.108 | |
//typescript 3.7.2 | |
const buf_size = 40960 //4096 - standard value //16384 - max allowed value !!! | |
const buf = new Uint8Array(buf_size) | |
buf.fill(0x31) | |
const fn = './deno_file_write_bug.txt' | |
const f = Deno.openSync(fn, 'w') |
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 'dart:math'; | |
void main() { | |
var rnd = Random(); | |
var arr = List.generate(10000000, (_) => rnd.nextDouble()); | |
sort_imp(arr); | |
//print(arr); | |
} | |
void sort_imp(List<double> arr) { |
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
/* | |
[dependencies] | |
rand = "0.7" | |
*/ | |
fn main() { | |
use rand::Rng; | |
let mut rng = rand::thread_rng(); | |
let mut arr = (1..10_000_000).map(|_| rng.gen::<f64>()).collect(); | |
let tbegin = std::time::SystemTime::now(); | |
//sort_imp(&mut arr); |
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
object Main extends App { | |
var arr = Array.fill(10000000)(java.lang.Math.random) | |
val tbegin = new java.util.Date().getTime() | |
//sort_imp(arr) | |
arr = sort_fun(arr) | |
println((new java.util.Date().getTime() - tbegin)/1000.0) | |
//println(arr.mkString(", ")) | |
def sort_imp(arr: Array[Double]) { | |
def swap(i: Int, j: Int) { |
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
//[dependencies] | |
//serde_json = "1.0" | |
use std::collections::{HashMap, HashSet}; | |
use std::process::exit; | |
use serde_json::Value; | |
const FILE_BUF_SIZE: usize = 65535; | |
const CHANNEL_BUF_SIZE: usize = 10000; | |
const THREAD_SLEEP: std::time::Duration = std::time::Duration::from_nanos(1000); |
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
window.onkeydown = (ev) => { | |
if (ev.keyCode === 32) { | |
ev.preventDefault() | |
if (!window.I) { | |
window.I = setInterval( | |
() => window.scrollTo(0, window.pageYOffset+100000), | |
100 | |
) | |
} else { | |
clearInterval(window.I) |
NewerOlder