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
// Generates canvas drawing commands from an SVG path string | |
import 'package:path_parsing/path_parsing.dart'; | |
void main(List<String> args) { | |
if (args.length < 3) { | |
print('Usage: width height path_string'); | |
return; | |
} |
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> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta name="scaffolded-by" content="https://github.com/google/stagehand" /> | |
<title>webassembly_example</title> | |
<link rel="stylesheet" href="styles.css" /> |
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
#include <GraphDefDecryptor.hpp> | |
........ | |
tensorflow::GraphDef graph; | |
// Decryption: | |
const std::string key = "JHEW8F7FE6F8E76W8F687WE6F8W8EF5"; | |
auto status = tfsecured::GraphDefDecryptAES(path, // path to *.pb file (encrypted graph) | |
&graph, |
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 ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"sync" | |
"time" | |
) |
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'; | |
import 'package:flutter/material.dart'; | |
// based on https://github.com/fedeoo/flip_card/ | |
// provides a callback to the front & back widgets so they can trigger the flip, therefore the CardSideBuilder | |
// note this version only flips horizontally | |
class AnimationCard extends StatelessWidget { | |
AnimationCard({this.child, this.animation}); |
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:convert'; | |
import 'dart:html'; | |
import 'dart:math'; | |
import 'dart:svg' as svg; | |
main() { | |
HttpRequest.getString('svg-datas.json').then(JSON.decode).then(calculateGravity); | |
} | |
calculateGravity(Map<String, Map> paths) { |
This is an ad-hoc Java-to-Dart translator originally written on two (admittedly long) evenings.
See http://sma.github.io/stuff/java2dartweb/java2dartweb.html for a demo.
Note: It doesn't support the complete Java grammar specification and cannot translate everything. It only translates syntax and does not attempt to translate Java library classes and methods to Dart equivalents (with the exception of String.charAt
and StringBuffer.append
). You will have to make changes to the resulting Dart code. It does not support anonymous inner classes.
However, I was able to successfully convert a 7000+ line command line application with only minimal fixes in 30 minutes.
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 | |
/* | |
parse json, extract type in json and save to graphql.schema | |
*/ | |
import ( | |
"io/ioutil" | |
"encoding/json" | |
"reflect" | |
"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
-- see https://github.com/ankidroid/Anki-Android/wiki/Database-Structure for a more maintained version of this | |
-- cards are what you review. easy! | |
CREATE TABLE cards ( | |
id integer primary key, | |
-- the epoch milliseconds of when the card was created | |
nid integer not null, | |
-- notes.id | |
did integer not null, | |
-- deck id (available in col table) |