知识点:1、Hive复合数据类型:array collect_set collect_list array_contains sort_array2、lateral view explode(array) lateral view out需求: click_log : ...
分类:
其他好文 时间:
2014-08-27 20:18:48
阅读次数:
1808
1 #include 2 #include 3 #include 4 5 char explode( char * str , char symbol ); 6 7 8 double distance ( int x1 , int y1 , int x2 , int y...
分类:
编程语言 时间:
2014-08-26 06:24:05
阅读次数:
302
使用file_get_contents()获取txt文件的内容,然后通过explode()把获得的字符串转化为数组。获得数组长度可以使用count()函数';} ?>关于txt文档中的换行符 在正则表达式中,有一个\n是newline的意思,又有一个\r是carriage return的意思。在处理...
分类:
Web程序 时间:
2014-08-20 16:03:12
阅读次数:
187
<?php
function getweather($city){
$url="http://www.weather.com.cn/weather1d/".$city.".shtml";
$result=file_get_contents($url);
$arr=explode("",$result);
$arr1=explode("",$arr[1]);
$wt= mb...
分类:
Web程序 时间:
2014-08-19 09:26:13
阅读次数:
165
脚本之家 '; //方法2 echo $ext1 = substr($imgurl,strrpos($imgurl, '.')); echo ''; //方法3 echo(@end(explode(".",$imgurl))); echo ''; //方法4 echo pathinfo($imgur...
分类:
Web程序 时间:
2014-08-12 16:09:54
阅读次数:
316
今天更新我的一个FKQQ的程序。我的一个PHP文件接收到HQ的QQ号码的字符串。因为获取的内容有大量的垃圾内容所以我用str_replace做了一个处理代码如下:$xx1 = preg_replace("/tencent(.+?)fuin\=/","",$xx1);这是对HQ到得QQ号码处理里面含有...
分类:
其他好文 时间:
2014-08-07 18:25:30
阅读次数:
213
定义和用法explode() 函数把字符串分割为数组。语法explode(separator,string,limit)参数 描述separator 必需。规定在哪里分割字符串。string 必需。要分割的字符串。limit 可选。规定所返回的数组元素的最大数目。说明本函数返回由字符串组成的数组,其...
分类:
Web程序 时间:
2014-08-07 18:01:50
阅读次数:
240
文件名类型有:http://localhost/code/loginfile/index.ini.php?username=aaaE:\xampp\php/login.phplogin.phpfunctionfile_extension($url)
{
//第一步:判断是否有问号"?"
$file="";//存储整个文件名称
if(strstr($url,"?")){
list($file)=explode("?",$url);
}
else
..
分类:
其他好文 时间:
2014-08-03 23:32:06
阅读次数:
316
php获取文件名$phpself =$_SERVER['PHP_SELF']; //获取当前文件名$str = end(explode("/",$phpself)); //去掉'/'echo $str.""; //输出文件全名echo substr($str,0,strrpos($str, '...
分类:
Web程序 时间:
2014-07-29 17:14:22
阅读次数:
225
1 ExecSQL($sqls,$conn);23 if(!empty($shopcont[0]['shopping'])){ //shopping为三维数组,用empty判断商品是否为空24 $arr = explode('@',$shopcont[0]...
分类:
Web程序 时间:
2014-07-22 22:52:34
阅读次数:
216