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
/** | |
* 求FebonacciSequence数列 | |
*/ | |
import java.util.Scanner; | |
public class FibonacciSequenceSum { | |
public static void main(String[] args) { | |
long sum; | |
while (true) { |
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
isArray = ('isArray' in Array) ? Array.isArray : function(value) { | |
return Object.prototype.toString.call(value) === '[object Array]'; | |
} |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style> | |
*{ | |
margin:0; | |
padding: 0; | |
} |
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
function whichTransitionEvent(){ | |
var t; | |
var el = document.createElement('fakeelement'); | |
var transitions = { | |
'transition':'transitionend', | |
'MSTransition':'msTransitionEnd', | |
'MozTransition':'transitionend', | |
'WebkitTransition':'webkitTransitionEnd' | |
} |
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
@font-face { | |
font-family: 'FontName'; | |
src: url('fonts/FontName.eot?#iefix') format('embedded-opentype'), | |
url('fonts/FontName.woff') format('woff'), | |
url('fonts/FontName.ttf') format('truetype'), | |
url('fonts/FontName.svg#FontName') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
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
<script> | |
// This detects whether the browser requires the Zepto or Ender library | |
document.write('<script src=js/' + | |
('__proto__' in {} ? 'zepto' : 'jquery') + | |
'.min.js><\/script>'); | |
</script> |
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
/*============= Begin Reset CSS =============*/ | |
* { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
outline: 0; | |
vertical-align: baseline; | |
background: transparent; | |
-webkit-touch-callout: none; | |
-webkit-user-select: none; |
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
videoDuration = parseInt(video.duration); | |
videoDuration = video.duration.toFixed(0); |
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 isTouch = Modernizr.touch; | |
var defaults = { | |
name: "range", | |
tapGesture: isTouch ? "tap" : "click", | |
startGesture: isTouch ? "touchstart" : "mousedown", | |
moveGesture: isTouch ? "touchmove" : "mousemove", | |
stopGesture: isTouch ? "touchend touchcancel" : "mouseup", | |
hoverGesture: isTouch ? "touchstart" : "mouseover" | |
}; |
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 SupportsTouches = ("createTouch" in document); | |
var default = { | |
StartEvent : SupportsTouches ? "touchstart" : "mousedown",//支持触摸式使用相应的事件替代 | |
MoveEvent : SupportsTouches ? "touchmove" : "mousemove", | |
EndEvent : SupportsTouches ? "touchend" : "mouseup" | |
} |
OlderNewer