Create React App does not provide watching build mode oficially (#1070).
This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.
Create a React app.
Put the script into scripts/watch.js
.
Create React App does not provide watching build mode oficially (#1070).
This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.
Create a React app.
Put the script into scripts/watch.js
.
-- Based on the original articel at http://www.codeproject.com/Articles/22824/A-Model-to-Represent-Directed-Acyclic-Graphs-DAG-o | |
-- Here is a port to MySQL | |
-- Edge table | |
DROP TABLE IF EXISTS `Edge`; | |
CREATE TABLE IF NOT EXISTS `Edge` ( | |
`id` int(11) NOT NULL, | |
`entry_edge_id` int(11) DEFAULT NULL COMMENT 'The ID of the incoming edge to the start vertex that is the creation reason for this implied edge; direct edges contain the same value as the Id column', | |
`direct_edge_id` int(11) DEFAULT NULL COMMENT 'The ID of the direct edge that caused the creation of this implied edge; direct edges contain the same value as the Id column', | |
`exit_edge_id` int(11) DEFAULT NULL COMMENT 'The ID of the outgoing edge from the end vertex that is the creation reason for this implied edge; direct edges contain the same value as the Id column', |
const crypto = require('crypto'); | |
const algorithm = 'aes-256-ctr'; | |
let key = 'MySuperSecretKey'; | |
key = crypto.createHash('sha256').update(String(key)).digest('base64').substr(0, 32); | |
const encrypt = (buffer) => { | |
// Create an initialization vector | |
const iv = crypto.randomBytes(16); | |
// Create a new cipher using the algorithm, key, and iv | |
const cipher = crypto.createCipheriv(algorithm, key, iv); |
var crypto = require('crypto'), | |
algo = 'aes-256-cbc', | |
key = 'super123secretKey!'; | |
function encrypt(text){ | |
var cipher = crypto.createCipher(algo,key) | |
var crypted = cipher.update(text,'utf8','hex') | |
crypted += cipher.final('hex'); | |
return crypted; | |
} |
'use strict'; | |
const crypto = require('crypto'); | |
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key | |
const IV = "5183666c72eec9e4"; // set random initialisation vector | |
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex'); | |
const phrase = "who let the dogs out"; | |
var encrypt = ((val) => { |
import 'package:flutter/widgets.dart'; | |
import 'package:flutter_hooks/flutter_hooks.dart'; | |
// adapted from https://stackoverflow.com/a/54173729/67655 | |
class ExpandableSection extends HookWidget { | |
const ExpandableSection({ | |
Key key, | |
this.expanded = false, | |
this.child, |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Expanding Demo', | |
theme: ThemeData( |
{ | |
"aliceblue", | |
"antiquewhite", | |
"aqua", | |
"aquamarine", | |
"azure", | |
"beige", | |
"bisque", | |
"black", | |
"blanchedalmond", |
# Load Gtk | |
import gi | |
gi.require_version('Gtk', '4.0') | |
from gi.repository import Gtk | |
# When the application is launched… | |
def on_activate(app): | |
# … create a new window… | |
win = Gtk.ApplicationWindow(application=app) | |
# … with a button in it… |