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
/*验证该列表中没有重复的数字*/ | |
valid([]). | |
valid([Head|Tail]) :- | |
fd_all_different(Head), | |
valid(Tail). | |
/*构造Puzzle*/ | |
sudoku(Puzzle, Solution) :- | |
Solution = Puzzle, | |
Puzzle = [S11, S12, S13, S14, |
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
#/usr/bin/python | |
#Filename: mergeFile.py | |
#Usage: merge all the lines in test1 and test2 | |
file1 = open('test1.txt', 'r') | |
file2 = open('test2.txt', 'r') | |
lines1 = file1.readlines() | |
lines2 = file2.readlines() |
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 getClass(c) { | |
var l = document.getElementsByTagName('*'); | |
var x = new Array(); | |
for(var i = 0; i < l.length; i++) { | |
if(l[i].classList !== undefined && l[i].classList.contains(c)) { | |
x.push(l[i]); | |
} | |
} |
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
{ | |
"name": "Medivh", | |
"age": 18, | |
"location": "Azeroth", | |
"hobby": [ "eating","sleeping" ], | |
"friends": [ | |
{ | |
"name": "Lothar", | |
"age": 21, | |
"profession": "solider" |
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>Clock</title> | |
<script> | |
var i; | |
function getTime () { | |
var date = new Date(); | |
var year = date.getFullYear(); |
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
/* Template part from twitter.github.io/bootstrap | |
* | |
*/ | |
body { | |
color: #777; | |
background-color: #f1f1f1; | |
font-family: "Microsoft YaHei", Georgia, 黑体, Helvetica, Arial, sans-serif; | |
padding-top: 20px; | |
} |
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> | |
<title></title> | |
<style> | |
.row > a#transform { | |
text-decoration: none; | |
width: 40px; | |
height: 40px; | |
display: inline-block; |
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 Ajax = { | |
/** | |
* ajax 封装 | |
* @param options { | |
* type: GET || POST | |
* datatype: JSON as default | |
* url: Interface URL | |
* sdata: | |
* callback: Callback function | |
* async: true || false |
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" /> | |
<meta name="keywords" content="type your keywords here" /> | |
<meta name="description" content="type your description here" /> | |
<meta id="viewport" name="viewport" | |
content="widht=device-width, user-scalable=yes, initial-scale=0.5" /> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta content="black" name="apple-mobile-web-app-status-bar-style" /> |
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 ng-app> | |
<head> | |
<meta name="description" content="first AngularJS application" /> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div ng-controller='TestController'> |
OlderNewer