🏊♂️
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
#= | |
quantum_walk: | |
- Julia version: 1.1.1 | |
- Author: shunpeik | |
- Date: 2019-11-30 | |
=# | |
using Plots | |
using LinearAlgebra | |
gr() |
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 "github.com/aws/aws-lambda-go/events" | |
type CognitoEventUserPoolsDefineCustomAuth struct { | |
events.CognitoEventUserPoolsHeader | |
Request CognitoEventUserPoolsDefineCustomAuthRequest `json:"request"` | |
Response CognitoEventUserPoolsDefineCustomAuthResponse `json:"response"` | |
} | |
type CognitoEventUserPoolsDefineCustomAuthRequest struct { | |
UserAttributes map[string]string `json:"userAttributes"` |
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
public static function convertHashtags($text) | |
{ | |
return preg_replace_callback( | |
'/#(?!039)([\w]+)/', // all "word" characters, all digits, and underscore | |
// brackets around the string AFTER the hashtag | |
function ($hit) { | |
// $matches[0] is the complete match (including the hashtag) | |
// $matches[1] is the match for the subpattern enclosed in brackets | |
return '[' . $hit[0] . '](' . 'http://localhost:8080/index.php?r=' . Html::encode('search/search/index') . |
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 Point | |
def initialize(x, y) | |
self.x = x | |
self.y = y | |
end | |
def inspect | |
"(#{x}, #{y})" | |
end |
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 JapaneseHyphenationTokenizer { | |
protected String mSourceString = ""; | |
protected int mTokenLength = 1; | |
protected int mCurrentPositionInLine = 0; | |
protected int mCurrentLine = 0; | |
protected String[] mLines = new String[0]; | |
public JapaneseHyphenationTokenizer(int tokenLength) { | |
super(); |
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 <cstdio> | |
#include <string> | |
#include <sstream> | |
template<typename T> | |
class Fraction{ | |
public: | |
typedef T number_type; |
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 OperatorTokens = ['+','-','*','/']; //In priority ascending order | |
//class for a number | |
function Number(str){ | |
this.str = str;//string representation of the number | |
} | |
//parse and return as float | |
Number.prototype.to_f = function(){ |