`
nakupanda
  • 浏览: 410829 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
比如有String str 以前我习惯地使用str.equals("") 但如果str为空就会异常,为解决这个问题,我必须先检查str是否为null. 刚才发现自己太笨了,使用 "".equals(str)就没这个问题了- -
如果用来发信的邮箱以前没有与目标QQ邮箱交换过邮箱,则: 1.标题有网址拒收 2.内容有HTML标记视为垃圾邮件 待续...摸索中
使用HttpURLConnection的应用稍加修饰,对服务器来说它就是一个浏览器,接受HTTP请求和发送响应.当我们需要让程序能像使用浏览器一样上传文件到HTTP服务器,使用HttpURLConnection并设置一些参数即可. 使用HttpURLConnection上传文件非常简单,只要把要上传的数据组装成使用浏览器上传时一模一样的"格式",写到输出流就可以了.以下简单讨论一下使用浏览器上传一个文件时发送的数据的"格式"是怎样的. 假定我有一个文本文件 test.txt 内容为 content of test.txt 上传时浏览器发送的 ...
略经改动,作者名字忘了不好意思。 package cn.net.badboy; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioS ...
keytool -genkey -keystore pepper.store -alias pepper keytool -export -keystore pepper.store -alias pepper -file pepper.cert jarsigner -keystore pepper.store applet.jar pepper jarsigner -keystore pepper.store commons-codec-1.3.jar pepper jarsigner -keystore pepper.store commons ...
//send to php URL url = new URL("http://localhost:1108/testupload/upload2.php"); HttpURLConnection conn = (HttpURLConnection)url.openConnection(); conn.setRequestMethod("POST"); conn.setDoOutput(true); String BOUNDARY = "------------------------ ...
比如你要将 表 tb1里面的 f1字段的abc替换为def UPDATE tb1 SET f1=REPLACE(f1, 'abc', 'def'); REPLACE(str,from_str,to_str)       在字符串   str   中所有出现的字符串   from_str   均被   to_str替换,然后返回这个字符串:       mysql>   SELECT   REPLACE('www.mysql.com',   'w',   'Ww');                     ->   'WwWwWw.mysql.com'      ...
$date1 = date("Y-m-d",strtotime("Sunday")); //周开始 $date2 = date("Y-m-d",strtotime("Saturday")); //周结束 $date1 = date("Y-m-d",strtotime("last Sunday")); //上周开始 $date2 = date("Y-m-d",strtotime(" ...
public class SortAll { /** * 冒泡排序,选择排序,插入排序,希尔(Shell)排序 Java的实现 * 2008.11.09 * @author YangL. (http://www.idcn.org) */ public static void main(String[] args) { int[] i = { 1, 5, 6, 12, 4, 9, 3, 23, 39, 403 ...
原题大意: 编写程序输出一个数字序列str(不含0)中相邻数字之和为n的数字 如有 String str="1223456789"; int n=5; 结果应该是: 122 23 5 目前我只想到下面这个方法,但我觉得很笨,请同学们思考一下. public class Test2 { public static void main(String[] args) { // TODO Auto-generated method stub p("1223456789111112345",5); } pu ...
<% function getPage(url) on error resume next dim http set http=Server.createobject("Microsoft.XMLHTTP") Http.open "GET",url,false Http.send() if Http.readystate<>4 then exit function end if getPage=bytes2BSTR(Http.responseBody) set http ...
以前用过又不记得了,今天GOOGLE了一下: <script>     window.confirm=function(){     var   strMsg=arguments[0];     window.execScript("a=msgbox('"   +   strMsg   +   "',257)","vbscript");     return   a;     }      </script> 答案是用VBS代替,有没其他办法?
<a   href="http://"   style="cursor:   auto;">auto</a><br>       <a   href="http://"   style="cursor:   crosshair   ">crosshair   </a><br>       <a   href="http://"   style="cursor:   default   ">d ...
此代码为ASP代码,可以把当前日期或者指定阳历日期(必须为1921-2-8以后)转换为对应阴历月和日,此代码不是原创,是经过修改《纯ASP代码之公历转农历实现(含属相)》而得到的,感谢原作者提供代码分享 注:阴历没有显示年,这个简单,判断一下阴历的月大于阳历的月的话就是阳历年份的前一年,不然就和阳历同年 1.建立一个asp页面,命名为yy.asp,保存阳历转阴历函数方便调用,完整代码如下: <% '----------------------------------------------------------阳历转阴历 Class ChinaDay Dim     MonthA ...
在mysql_connect()和mysql_select_db之间加上 mysql_query("set names 'utf8'");
Global site tag (gtag.js) - Google Analytics