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 void main(String []args) throws UnsupportedEncodingException { | |
// 运行结果:2 | |
System.out.println("柳峰".getBytes("ISO8859-1").length); | |
// 运行结果:4 | |
System.out.println("柳峰".getBytes("GB2312").length); | |
// 运行结果:4 | |
System.out.println("柳峰".getBytes("GBK").length); | |
// 运行结果:6 | |
System.out.println("柳峰".getBytes("UTF-8").length); | |
} |
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
它是一行的吗? | |
有时侯元素可以表现像垂直居中,只是因为它们有相等的上下padding | |
.link { | |
padding-top: 30px; | |
padding-bottom: 30px; | |
} | |
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 run = true; | |
function aa(){ | |
run = false; | |
} | |
$("body").click(function(){ | |
if(run){ | |
$("#cancel").hide(); | |
$("#fahuo").hide(); |
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
$.ajax({ | |
url:"mobileSurveyAction_addSurvey.action",//提交地址 | |
data:$("#form1").serialize(),//将表单数据序列化 | |
type:"POST", | |
dataType:"json", | |
success:function(result){ | |
if (result.success == '100'){ | |
$("#mySection").hide(); | |
$(".footer").hide(); | |
$("#alertMsg").show(); |
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
DROP TABLE IF EXISTS `province`; | |
CREATE TABLE `province` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(50) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=gbk; | |
-- ---------------------------- | |
-- Records of province | |
-- ---------------------------- | |
INSERT INTO `province` VALUES ('1', '北京市'); |
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
DELIMITER // | |
CREATE PROCEDURE insert_test(IN uname VARCHAR(50),IN uaddress VARCHAR(50)) | |
BEGIN | |
INSERT INTO t_test(username,address) VALUES(uname,uaddress); | |
END// | |
DELIMITER ; |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>demo</title> | |
<style type="text/css"> | |
html{ | |
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 java.io.ByteArrayOutputStream; | |
import java.io.FileOutputStream; | |
import java.io.InputStream; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
import org.jsoup.select.Elements; |
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 class User { | |
private String name; | |
private String code; | |
public String getName() { | |
return name; | |
} | |
public void setName(String name) { | |
this.name = name; | |
} |
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 class Account { | |
private String username; | |
private String password; | |
private double money; | |
private boolean enable; | |
public String getUsername() { | |
return username; | |
} |
NewerOlder