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
<?php | |
$volcabulary =array ( | |
0 => 'Handelsfreiheit', | |
1 => 'Handel (Händler)', | |
2 => 'Handel, auswärtiger', | |
3 => 'Handelsbilanz', | |
4 => 'Handelskapital', | |
5 => 'Zweck', | |
6 => 'Zyklus, industrieller', |
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 xpath_query = '//ul/li/a'; | |
var xpath_obj = document.evaluate(xpath_query ,document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); | |
var href_list = []; | |
for (var m=0; m<xpath_obj.snapshotLength; m++){ | |
href_list[m] = xpath_obj.snapshotItem(m).getAttribute("href"); | |
} |
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> | |
<link type='text/css' rel='stylesheet' href='style.css'/> | |
<title>More Coin Flips</title> | |
</head> | |
<body> | |
<p>We will keep flipping a coin as long as the result is heads!</p> | |
<?php | |
$flipCount = 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
<!doctype html> | |
<html> | |
<head> | |
<title>D3 tutorial</title> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
</head> | |
<body> | |
<p> This a paragraph</p> | |
<script> | |
d3.json("./data.json",function(data){ |
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
library(XML) | |
#获取当前链接的所有评论 | |
get_one_page_comment<-function(url){ | |
html<-htmlParse(url) | |
resnodes<-getNodeSet(html,"//div[@class='review-sec']//div[@class='inner']//div[@class='body']//p[@class='read']//span[@class='read-more']//a[@class='cmn-viewmore']") | |
#获取当前页面中所有comment的长文链接 | |
comments_url<-NULL | |
if(is.null(resnodes)){ |
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
<?php | |
//php中php_array(1,$arr)只能查找出数组中第一次出现的$tofind; | |
$arr = array(1,2,3,4,1,1,1,1); | |
var_dump(array_search_all($arr,3)); | |
//返回 value符合的key所组成的数组; | |
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
<?php | |
function pre_print_r($var){ | |
echo "<pre>"; | |
print_r($var); | |
echo "</pre>"; | |
echo "<br />"; | |
} | |
/* | |
http://www.w3school.com.cn/php/func_array_splice.asp |
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
<?php | |
function pre_print_r($var){ | |
echo "<pre>"; | |
print_r($var); | |
echo "</pre>"; | |
} | |
function Bigrams($word){ |
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
<?php | |
function pre_print_r($var){ | |
echo "<pre>"; | |
print_r($var); | |
echo "</pre>"; | |
} | |
class Obj1 { | |
public function __call($method,$arg){ | |
return $this; }} |
NewerOlder