`
文章列表
需要引入commons-email-1.4.jar import org.apache.commons.mail.Email public static void sendEmail(String pwd, String emailAddress){ //System.out.println(pwd); boolean isSSL = true; String host = "smtp.xxxx.com"; int port = 465; String from = "xxx ...
//匹配手机号 public static boolean isTelephone(String tele){ if (tele.isEmpty()) { return false; } if (tele.matches("^0?1[0-9]{10}$")) { return true; } return false; } //匹配数字 public static boolean isNumber(String num){ if (num.isEmpty()) { return false; ...
 电脑上的许多软件可以监控浏览器发出的HTTP请求, iPhone上有许多连网程序但没有自带软件可以实现监控, 为了方便测试这些请求是否正确而省去在程序中记录请求日志并逐一查找的麻烦, 可以利用Paros这个监控软件来实现. 以下是实现在Mac上监控iPhone发出的HTTP请求的具体步骤:   1. 将Mac机器的以太网共享给无线局域网:   Mac上: 系统偏好设置->共享->Internet 共享, 将"以太网"共享给"AirPort"   2. 查看无线局域网IP:   返回->网络->AirPort, 查看到 ...
例如下面的sql,应该首先添加where条件下apfi.file_id =5082字段的索引, 其次添加bp.single_file_id的字段索引   sql如下: SELECT apfi.sw, apfi.sh, apfi.cx, apfi.cy, bp.buy_url, bp.discount_price AS price, bp.price AS old_price, bp.id AS product_id, CONCAT('single_', sys_item_id) AS id FROM app_polly_file_item ap ...

In与Exists的区别

参考: http://www.cnblogs.com/eva_2010/articles/2047558.html
Navicat 11.0.10版本 结果证明表关联比子查询速度更快 1.子查询:0.287s SELECT sw,sh,cx,cy, (SELECT buy_url FROM b_product WHERE single_file_id = sys_item_id AND deleted = 0) AS buy_url, (SELECT discount_price FROM b_product WHERE single_file_id = sys_item_id AND deleted = 0) AS price, (SELECT price FROM ...
取得url地址中的参数(get方式) String getStr=request.getQueryString();  取得form中的参数(post方式) String postJson=IOUtils.toString(request.getInputStream(),"UTF-8");  
第一种写法: SELECT t.file_id FROM app_polly_file_labels t WHERE t.style = '清新' or t.style = '甜美' or t.style = '韩潮来袭' GROUP BY t.file_id HAVING count(t.file_id)=3 第二种写法: SELECT a.file_id FROM app_polly_file_labels a INNER JOIN app_polly_file_labels b ON a.file_id = b.file_id INNER ...

java发送http请求

    博客分类:
  • java
参考:http://www.cnblogs.com/nick-huang/p/3859353.html
String str=java.util.UUID.randomUUID().toString();
参考: http://www.cnblogs.com/liuling/p/2014-4-19-04.html
1、密码加密 commons-codec包中提供了 MD5的加密算法 比如String password=DigestUtils.md5Hex(“123456”) 中password就是MD5加密后的密码 2、读取网络(URL)图片资源 BufferedImage bi = ImageIO.read(new URL(value.toString())); 3、Face++人脸识别技术的使用 4、IOUtils的使用 5、DriverManager.getConnection( 6、DbUtils的使用了解
读取本地图片 ImageIcon image = new ImageIcon(LeftContent.class.getResource("butterfly.jpg")); 读取网上图片 读取网上图片 BufferedImage bi= ImageIO.read(new URL("http://yeeda-app.iyeeda.com/6800836e-9118-44b7-ac0a-233bc8bea40e@100w_1x.jpg"));   java两种读取图片的方式。
public ActionForward exportExcel(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { BusPensionStandardInfoForm busPensionStandardInfoForm = (BusPensionStandardInfoForm)form; Long stLevel = getLongReturnNull(request, &qu ...
package com.topsuntech.gUnit_hbyf.gEU_so.framework.actions; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.URL ...
Global site tag (gtag.js) - Google Analytics