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
void main() { | |
var data = { | |
'number': 20, | |
'canProcess': true, | |
}; | |
final worker = Worker(data); | |
print(worker.result); | |
final result = worker.maybeProcess(data, (data) { | |
if (data case {'number': final number}) { |
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 'package:flutter/material.dart'; | |
import 'dart:math'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
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
// ####################################### | |
// ----- bin/bitcoin_simulation.dart ----- | |
// ####################################### | |
import 'dart:math'; | |
import 'package:intl/intl.dart'; | |
// import 'package:bitcoin_ssimulation/chain_params.dart'; | |
// import 'package:bitcoin_simulation/consensus/params.dart'; |
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
// This script muust be used in a twitter profile's page to add someone to a list named `listName` and unfollow the person. | |
let listName = "Flutter" // change this variable value to specify the list's name to where the person will be added to. | |
let moreBtn = document.querySelector('div[role=button][aria-haspopup=menu][data-testid=userActions]') | |
moreBtn.click() | |
let addMemberBtn = document.querySelector('a[href="/i/lists/add_member"]>div') | |
addMemberBtn.click() | |
setTimeout(() => { |
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
# Python 3 | |
from urllib.parse import urlencode | |
def gen_url(query_params={}, include_auth=True): | |
uri = 'http://google.com' | |
auth_key = 'default_value' | |
if include_auth: | |
query_params['default_param'] = auth_key |
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 verifyJwt from 'security'; | |
import logger from 'logger'; | |
import model from 'model'; | |
function handlePostRequest(request) { | |
if (request.headers.authorization === null) { | |
throw Error('Unauthorized'); | |
} |
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 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter view with two big buttons', | |
debugShowCheckedModeBanner: false, |
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 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'How to overlap SliverList on a SliverAppBar', | |
debugShowCheckedModeBanner: false, |
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
@prefix : <http://nexte.io/ontology/>. | |
@prefix users: <http://nexte.io/users/>. | |
@prefix rules: <http://nexte.io/rules/>. | |
@prefix challenges: <http://nexte.io/challenges/>. | |
@prefix clubs: <http://nexte.io/clubs/>. | |
@prefix rankings: <http://nexte.io/rankings/>. | |
@prefix positions: <http://nexte.io/positions/>. | |
@prefix owl: <http://www.w3.org/2002/07/owl#>. | |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. |
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
### Full command line options | |
``` | |
ffmpeg -f gif -i FOO.gif -pix_fmt yuv420p -c:v libx264 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' BAR.mp4 | |
``` | |
### Notie | |
* output mp4 is encoded with h264, support Firefox/Chrome/Safari in Windows, Mac OSX, Android, and iOS. |
NewerOlder