Skip to content

Instantly share code, notes, and snippets.

View zhanglongde's full-sized avatar
💭
I may be slow to respond.

eric.zld zhanglongde

💭
I may be slow to respond.
View GitHub Profile
@zhanglongde
zhanglongde / 0_reuse_code.js
Created April 28, 2016 12:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
1, tooltip
简介: 弹出提示框功能
功能: hover 或 click 触发
ajax加载内容
与弹出框交互功能(interactive)
自定调整弹出框位置(autoPosition)
动画效果 'fade' 'zoom'
2, colorInput
简介: 功能强大的颜色选择器功能
@zhanglongde
zhanglongde / jquery-dropzone.js
Last active April 27, 2016 05:54 — forked from enyo/jquery-dropzone.js
jquery-dropzone.js
// Get the template HTML and remove it from the doumenthe template HTML and remove it from the doument
var previewNode = document.querySelector("#template");
previewNode.id = "";
var previewTemplate = previewNode.parentNode.innerHTML;
previewNode.parentNode.removeChild(previewNode);
var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone
url: "/target-url", // Set the url
thumbnailWidth: 80,
thumbnailHeight: 80,
@zhanglongde
zhanglongde / jquery-dropzone.html
Last active April 27, 2016 06:22 — forked from enyo/jquery-dropzone.html
jquery-dropzone.html
<!-- HTML heavily inspired by http://blueimp.github.io/jQuery-File-Upload/ -->
<div class="table table-striped" class="files" id="previews">
<div id="template" class="file-row">
<!-- This is used as the file preview template -->
<div>
<span class="preview"><img data-dz-thumbnail /></span>
</div>
<div>
<p class="name" data-dz-name></p>
@zhanglongde
zhanglongde / webssql.htm
Created April 25, 2016 14:51 — forked from andyj/webssql.htm
Look at the basics of WebSQL
<html>
<head>
<title>Look at WebSQL</title>
<script>
// Through the code below remember essentialy there are just 3 core methods we tend to use
// openDatabase
// transaction
// executeSql
// Opening a connection
@zhanglongde
zhanglongde / RegularExpression.md
Created April 5, 2016 16:15 — forked from JingwenTian/RegularExpression.md
浅谈正则表达式

一、什么是正则表达式?

简单的说:正则表达式(Regular Expression)是一种处理字符串匹配的语言;

正则表达式描述了一种字符串匹配的模式,可以用来检查一个字符串是否含有某种子串,对匹配到的子串进行“取出”或“替换”操作。

二、正则表达式的应用

正则表达式在实际的开发过程中非常实用,能够快速解决一些复杂的字符串处理问题,下面我对正则表达式的应用做一些简单分类:

@zhanglongde
zhanglongde / sudoku.html
Created April 5, 2016 15:13 — forked from wangwen1220/sudoku.html
HTML: 一淘九宫格面试题 | sudoku
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>一淘九宫格面试题</title>
<meta name='author' content='Steven | wangwen1220.github.io' />
<style type="text/css">
* {
margin: 0;
padding: 0;