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
// Welcome to the null safety version of DartPad! | |
// This site has a dev channel release of the | |
// Dart SDK with null safety enabled. You can | |
// play around with code of your own, or pick a | |
// learning exercise from the snippets menu at | |
// the top-right of this page. | |
void main() { | |
} |
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 loom; | |
import rawhttp.core.RawHttp; | |
import rawhttp.core.RawHttpRequest; | |
import rawhttp.core.RawHttpResponse; | |
import rawhttp.core.client.TcpRawHttpClient; | |
import java.io.IOException; | |
import java.nio.charset.StandardCharsets; | |
import java.util.concurrent.CountDownLatch; |
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 java.nio.charset.StandardCharsets; | |
class JavaComparison | |
{ | |
public static void main(String[] args) | |
{ | |
System.out.println("CUSTOM"); | |
for (int i = 0; i < 100; i++) | |
{ | |
custom(); |
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
FROM google/dart AS dartc | |
WORKDIR /app | |
ADD pubspec.* /app/ | |
RUN pub get | |
ADD bin/ /app/bin/ | |
ADD lib/ /app/lib/ | |
RUN pub get --offline | |
RUN dart2aot /app/bin/main.dart /app/main.aot |
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
abstract class _State { | |
T use<T>( | |
T Function(_ChooseProviderState) useChooseProviderState, | |
T Function(_LoadingState) useLoadingState, | |
T Function(_ChooseAccountsState) useChooseAccountState, | |
T Function(_ImportingState) useImportingState) { | |
if (this is _ChooseProviderState) { | |
return useChooseProviderState(this); | |
} | |
if (this is _LoadingState) { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>CheerpJ test</title> | |
<script src="https://cjrtnc.leaningtech.com/1.3/loader.js"></script> | |
</head> | |
<body> | |
</body> | |
<script> |
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 col = "collections" | |
use fmt = "format" | |
type Error is String | |
type Result is (F64 | Error) | |
type MaybeArray is (Array[F64] iso | Error val) | |
interface ReceiveUV | |
be receive(m: MaybeArray, a: Array[F64] iso) |
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
<div id="errors" style=" | |
background: #c00; | |
color: #fff; | |
display: none; | |
margin: -20px -20px 20px; | |
padding: 20px; | |
white-space: pre-wrap; | |
"></div> | |
<div id="root"></div> | |
<script> |
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
# Initialize a gh-pages branch... GitHub expects this branch to exist to publish a project website from it. | |
git checkout --orphan gh-pages | |
git reset --hard | |
git commit --allow-empty -m "Initializing gh-pages branch" | |
git push origin gh-pages | |
git checkout master | |
# Define a directory where the static website files will reside | |
WEBSITE_DIR=target |
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
/* | |
* HTTPClient usage circa version 5.0-beta. | |
*/ | |
package org.apache.hc.core5.http.examples; | |
import java.io.ByteArrayInputStream; | |
import java.nio.charset.StandardCharsets; | |
import java.util.concurrent.TimeUnit; |