Skip to content

Instantly share code, notes, and snippets.

View htfy96's full-sized avatar
🐢
WFH

Zheng Luo htfy96

🐢
WFH
View GitHub Profile
@htfy96
htfy96 / 9.cpp
Last active September 24, 2016 05:46
#include <iostream>
#include <utility>
#include <type_traits>
using namespace std;
template<int C> struct A
{
const int val = C;
};
@htfy96
htfy96 / sa.cpp
Last active August 31, 2016 09:29
suffix array with comment
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <climits>
using namespace std;
/*
* Suffix array is a useful data structure which stores
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/
@htfy96
htfy96 / bidir_map.php
Created July 12, 2016 16:01
Bidirectional mapper of PHP
<?php
interface iBidirectionTrans {
public function forward_map($left_val);
public function reverse_map($right_val, &$left_obj);
}
class KeyMapper implements iBidirectionTrans {
private $pos;
public function __construct($pos) {
$this->pos = $pos;
<?php
interface iBidirectionTrans {
public function forward_map($left_val);
public function reverse_map($right_val, &$left_obj);
}
class KeyMapper implements iBidirectionTrans {
private $pos;
public function __construct($pos) {
$this->pos = $pos;
@htfy96
htfy96 / bidir_map.php
Created July 12, 2016 15:59
Bidirectional mapping model in PHP
<?php
interface iBidirectionTrans {
public function forward_map($left_val);
public function reverse_map($right_val, &$left_obj);
}
class KeyMapper implements iBidirectionTrans {
private $pos;
public function __construct($pos) {
$this->pos = $pos;
@htfy96
htfy96 / datepicker.vue
Last active July 4, 2016 06:10
Amazeui datepicker.vue
<template id="datepicker-template">
<div class="am-input-group am-datepicker-date" data-am-datepicker="{format: 'yyyy-mm-dd'}" v-dp="date">
<input type="text" class="am-form-field" readonly >
<span class="am-input-group-btn am-datepicker-add-on">
<button class="am-btn am-btn-default" type="button"><span class="am-icon-calendar"></span> </button>
</span>
</div>
</template>
<script>

Keybase proof

I hereby claim:

  • I am htfy96 on github.
  • I am vicluo (https://keybase.io/vicluo) on keybase.
  • I have a public key ASCM0uHw4fAMBOtiVIVIvcmeeDYl-_sl8uFCI6JrmF8nPgo

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>lz</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.3.0/css/tooltipster.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>lz</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.6/css/materialize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.3.0/css/tooltipster.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script>