$ua=$_SERVER["HTTP_USER_AGENT"];
$filename="中文文件名.txt";
$encoded_filename=urlencode($filename);
$encoded_filename=str_replace("+","%20",$encoded_filename);
header(‘Content-Type:application/octet-stream‘);
if(preg_match("/MSIE/",$ua)){
header(‘Content-D..
分类:
Web程序 时间:
2014-12-09 20:02:04
阅读次数:
203
main.xml 文件
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:id="@+id/ll_week"
...
分类:
移动开发 时间:
2014-12-09 17:51:12
阅读次数:
308
问题:tabhost固定在底部,某个tab中存在Listview,运行起来后发现如果listview中的列表内容比较多(超过一屏时),就会出现部分内容被tabhost遮盖了。原Listview布局文件<ListView
android:id="@+id/listBudgetSet"
android:layout_width="match_parent"
android:layout..
分类:
移动开发 时间:
2014-12-09 15:53:20
阅读次数:
162
Marriage Match II
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2296 Accepted Submission(s): 786
Problem Description
Presumabl...
分类:
其他好文 时间:
2014-12-09 15:42:43
阅读次数:
120
private function _get_client_ip() { $ip = $_SERVER['REMOTE_ADDR']; if (isset($_SERVER['HTTP_CLIENT_IP']) && preg_match('/^([0-9]{1,3}\...
分类:
Web程序 时间:
2014-12-09 12:05:49
阅读次数:
269
stringsql="";RegexrReg=newRegex(@""[\s\S]*?"",RegexOptions.IgnoreCase);stringpContent=rReg.Match(sql).Value;string sql = "metadata=res://*/M...
分类:
其他好文 时间:
2014-12-08 17:07:29
阅读次数:
173
1 function getDomain() { 2 var hostname = window.location.hostname; 3 var ip = hostname.match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/g); 4 i...
分类:
Web程序 时间:
2014-12-08 15:12:24
阅读次数:
207
多字段搜索(Multifield Search)
本文翻译自官方指南的Multifield Search一章。
查询很少是只拥有一个match查询子句的查询。我们经常需要对一个或者多个字段使用相同或者不同的查询字符串进行搜索,这意味着我们需要将多个查询子句和它们得到的相关度分值以一种有意义的方式进行合并。
也许我们正在寻找一本名为战争与和平的书,它的作者是Leo Tolstoy。...
分类:
其他好文 时间:
2014-12-08 10:46:57
阅读次数:
302
先来张效果图: ?? layout布局设置: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_pa...
分类:
移动开发 时间:
2014-12-08 02:09:21
阅读次数:
219
RelativeLayout(相对布局):layout/activity_main.xml<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"><Text..
分类:
移动开发 时间:
2014-12-07 06:54:19
阅读次数:
176