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 std::any::Any; | |
use std::cell::{Cell, RefCell}; | |
use std::collections::{HashMap, HashSet}; | |
use std::marker::PhantomData; | |
use web_sys::{console, window}; | |
use wasm_bindgen::prelude::{Closure, JsCast}; | |
#[derive(Default)] | |
struct Runtime { | |
signal_values: RefCell<Vec<Box<RefCell<dyn Any>>>>, |
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 * as React from 'react'; | |
import { BrowserRouter as Router, Link, Redirect, Route, RouteComponentProps, withRouter } from 'react-router-dom'; | |
const UserAuthContext = React.createContext({ | |
authenticated: false, | |
setAuthenticated: (_:boolean) => {} | |
}); | |
const AuthExample = () => ( | |
<Router> |
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
(defun dither-xpm (color1 color2) | |
"Return an XPM dither string representing." | |
(format "/* XPM */ | |
static char * dither[] = { | |
\"12 18 2 1\", | |
\". c %s\", | |
\" c %s\", | |
\"....... . . \", | |
\".. . . . \", | |
\"..... . . . \", |
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
// | |
// Lensy.swift | |
// Lensy | |
// | |
// Created by Safx Developer on 2016/02/12. | |
// Copyright © 2016 Safx Developers. All rights reserved. | |
// | |
// MARK: - Lenses protocols |
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
NOTIFY SSTP/1.1 | |
Charset: UTF-8 | |
Sender: Jenkins-Server | |
Event: OnBuildFailed | |
IfGhost: Jenkins,Hudson | |
Script: \0\v‥‥ビルドに失敗しました。\1なんとかしろ\e | |
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
score' :: Int -> Char -> Int | |
score' _ '-' = 0 | |
score' b '/' = 10 - b | |
score' _ 'X' = 10 | |
score' _ '1' = 1 | |
score' _ '2' = 2 | |
score' _ '3' = 3 | |
score' _ '4' = 4 | |
score' _ '5' = 5 | |
score' _ '6' = 6 |
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
#_ = require \prelude-ls | |
class Frame | |
(pin, prev)-> | |
@cell = pin | |
@prev = prev | |
@next = null | |
prev.next = this if prev? | |
#frameScore: -> _.fold (+), 0, @cell |
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
class Foo { | |
static var x: Int = 0 | |
lazy var a: Int! = { return x++ }() | |
} | |
class Bar { | |
static var y: Int = 0 | |
lazy var b: Int? = { return y++ }() | |
} |
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
#ifdef EMSCRIPTEN | |
#include <emscripten.h> | |
#endif | |
#include <SDL/SDL.h> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <time.h> |
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
var dialogueUrl = 'https://api.apigw.smt.docomo.ne.jp/dialogue/v1/dialogue?APIKEY=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'; | |
var typetalkUrl = 'https://typetalk.in/api/v1/topics/xxxx?typetalkToken=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'; | |
var botName = 'foobar'; | |
function doPost(e) { | |
var jsonString = e.postData.getDataAsString(); | |
var post = JSON.parse(jsonString).post; | |
var user = '@' + post.account.name | |
var message = getMessage(post.message); |
NewerOlder