This file contains hidden or 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
alert($(window).height()); //浏览器当前窗口可视区域高度 | |
alert($(document).height()); //浏览器当前窗口文档的高度 | |
alert($(document.body).height());//浏览器当前窗口文档body的高度 | |
alert($(document.body).outerHeight(true));//浏览器当前窗口文档body的总高度 包括border padding margin | |
alert($(window).width()); //浏览器当前窗口可视区域宽度 | |
alert($(document).width());//浏览器当前窗口文档对象宽度 | |
alert($(document.body).width());//浏览器当前窗口文档body的高度 | |
alert($(document.body).outerWidth(true));//浏览器当前窗口文档body的总宽度 包括border padding margin | |
// 获取页面的高度、宽度 |
This file contains hidden or 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
CREATE DATABASE IF NOT EXISTS `blog_mvc` /*!40100 DEFAULT CHARACTER SET utf8 */; | |
USE `blog_mvc`; | |
-- MySQL dump 10.13 Distrib 5.6.13, for osx10.6 (i386) | |
-- | |
-- Host: 127.0.0.1 Database: blog_mvc | |
-- ------------------------------------------------------ | |
-- Server version 5.6.12 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
This file contains hidden or 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.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import org.eclipse.core.resources.ICommand; | |
import org.eclipse.core.resources.IFolder; | |
import org.eclipse.core.resources.IProject; | |
import org.eclipse.core.resources.IProjectDescription; | |
import org.eclipse.core.resources.IResource; | |
import org.eclipse.core.resources.IWorkspace; |
This file contains hidden or 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
/*iPhone < 5*/ | |
@media screen and (device-aspect-ratio: 2/3) { | |
.content{ | |
width: 100%; | |
} | |
} | |
/*iiPhone 5*/ | |
@media screen and (device-aspect-ratio: 40/71) { | |
.content{ |
This file contains hidden or 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
/** | |
* 多个数组进行合并 | |
* | |
* @author Sam Su | |
* @date 2013-07-12 | |
* @param <T> | |
* @param first | |
* @param rest | |
* @return | |
*/ |
This file contains hidden or 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
/** | |
* 判断输入的字符串是否为Java保留的关键字 | |
* @date 2013-08-05 | |
* 不合法时返回true; | |
* 校验通过返回false; | |
*/ | |
public static boolean validateReservedKeywords(String inputString) { | |
boolean flag = false; | |
final String[] keywords = | |
{"abstract", "continue", "for", "new", "switch", "assert", "default", "if", |
This file contains hidden or 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 org.eclipse.swt.SWT; | |
import org.eclipse.swt.events.MouseAdapter; | |
import org.eclipse.swt.events.MouseEvent; | |
import org.eclipse.swt.events.ShellAdapter; | |
import org.eclipse.swt.events.ShellEvent; | |
import org.eclipse.swt.graphics.Point; | |
import org.eclipse.swt.graphics.Rectangle; | |
import org.eclipse.swt.layout.GridData; | |
import org.eclipse.swt.layout.GridLayout; | |
import org.eclipse.swt.widgets.Button; |
This file contains hidden or 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
* { | |
font-family: PingFang SC, Helvetica, 'Luxi Sans', 'DejaVu Sans', Tahoma, 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif; | |
} | |
.wwads-cn { | |
display: none; | |
} | |
body { | |
background-image: none; |
This file contains hidden or 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
<script> | |
$(function(){ | |
if($.browser.msie) { | |
alert("IE浏览器"); | |
}else if($.browser.opera) { | |
alert("opera浏览器"); | |
}else if($.browser.mozilla) { | |
alert("<font id="wordhighlight_id4" class="wordhighlight_ext wordhighlight_word2" name="wordhighlight_word2">火狐</font>浏览器"); | |
}else if($.browser.safari) { | |
alert("safari浏览器"); |
This file contains hidden or 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
(let* | |
( | |
(yin | |
((lambda (cc) (display #\@) cc) (call-with-current-continuation (lambda (c) c)))) | |
(yang | |
((lambda (cc) (display #\*) cc) (call-with-current-continuation (lambda (c) c)))) | |
) | |
(yin yang)) |