个人理解 函数防抖就是法师发技能的时候要吟唱,技能吟唱没完再按技能就会重新读吟唱。
个人理解 函数节流就是fps游戏的射速,就算一直按着鼠标射击,也只会在规定射速内射出子弹。
<div class="container"> | |
<div class="jumbotron"> | |
<div class="container"> | |
<h2>execCommands supported in your browser</h2> | |
<div class="row"> | |
<div class="col-md-6">The <small class="btn btn-success btn-xs">Green</small> commands are supported by your browser, where as the <small class="btn btn-error btn-xs">Grey</small> ones.. You guessed it! :-) <br />Anyway try to select contents below and click <small class="btn btn-success btn-xs">commands</small> to execute the commands on it. <br />I use the HTML attribute <code>contenteditable=true</code> to allow modifications to the content. <code>Updated</code>: Added <a href="https://fortawesome.github.io/Font-Awesome/icons/">font awesome icons</a>. <br /> <br />Inspired by <a href="https://css-tricks.com/cut-and-copy-from-javascript/">Cut and Copy (from JavaScript)</a></div> | |
<div class="col-md-6"> | |
<code>2017-06-04 updated:</code><br> | |
<em>As pointed out by <a href="https://twitter.com/Robvanhe">@Robvanhe</a> the pen did not |
package cn.itcast.chapter04.response; | |
import java.io.*; | |
import javax.servlet.*; | |
import javax.servlet.http.*; | |
public class ChineseServlet extends HttpServlet { | |
public void doGet(HttpServletRequest request, | |
HttpServletResponse response)throws ServletException, IOException { | |
//response.setCharacterEncoding("utf-8"); | |
// response.setHeader("Content-Type","text/html;charset=utf-8"); | |
//设置字符编码 |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>File API</title> | |
</head> | |
<body> | |
<article> | |
<div id="holder"></div> | |
<p id="status">File API & FileReader API not supported</p> |
/** | |
* a tcp server base on nodejs | |
* come from <<nodejs: javascript everywhere>> | |
* | |
*/ | |
// "use strict"; | |
var net = require('net'), | |
count=0, | |
users={}; |
/** | |
* nodejs的标准输入输出流实现命令行程序,实现文件的读取和显示,类似于*nix系统里的ls,cat,cd等命令 | |
*Module dependencies | |
*/ | |
// "use strict"; | |
var fs = require('fs'), | |
stdin = process.stdin, | |
stdout = process.stdout, |
/* | |
SQLyog Ultimate v8.32 | |
MySQL - 5.5.40 : Database - itcaststore | |
********************************************************************* | |
*/ | |
CREATE DATABASE /*!32312 IF NOT EXISTS*/`itcaststore` /*!40100 DEFAULT CHARACTER SET utf8 */; | |
USE `itcaststore`; |
# | |
# yii fant configuration file template for MySQL, Galera Cluster, MariaDB and Percona Server | |
# Location: /etc/my.cnf or /etc/mysql/my.cnf | |
# This template is intended to work with MySQL 5.6 and newer and MariaDB 10.0 and newer | |
# Get most recent updated from here: | |
# 本配置文件将所有character set都设置为utf8 | |
# | |
[client] |
// 依赖jdbc | |
import java.sql.*; | |
public class jdbc{ | |
public static void main(String[] args) throws Exception{ | |
//1、注册驱动,什么是驱动?能够让java连接数据库,也就是实现jdbc接口规范就是驱动 | |
Class.forName("com.mysql.jdbc.Driver");//硬编码 | |
/* | |
* 2、通过驱动管理者获取数据库连接 | |
* DriverManager是驱动实现类的管理者。 | |
* url:连接数据库的位置,端口号,数据库名 |
/** | |
* java 静态代理,基于接口实现 | |
*/ | |
public interface Hello { | |
String sayHello(String str); | |
} | |
class HelloImp implements Hello{ | |
// 目标对象 | |
public String sayHello(String str) { |