摘要: 1 //JAVA日期格式2 Date date = new Date();3 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")4 String dateTime = dateFormat.format(date);1 //IOS日期格式2 NSDate *date = [NSDate date];3 4 NSDateFormatter *formatter = [[NSDateFormatter alloc] init];5 formatter.dateFormatter = 阅读全文
posted @ 2013-10-05 13:49 wangzhenxiang 阅读(828) 评论(0) 推荐(0) 编辑
摘要: 1 //请求 2 HttpURLConnection conn = (HttpURLConnection)new URL(path).openConnection(); 3 conn.setConnecTimeout(5000); 4 conn.setRequestMethod("POST"); 5 conn.setDoOutput(true); 6 conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded"); 7 conn.setReques 阅读全文
posted @ 2013-10-05 13:43 wangzhenxiang 阅读(138) 评论(0) 推荐(0) 编辑
摘要: //判断SD卡是否存在1 Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);2 File file = Environment.getExternalStorageDirectory();//拍照1 Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);2 startActivityForResult(intent, TAKE_PICTURE); 阅读全文
posted @ 2013-10-05 11:03 wangzhenxiang 阅读(115) 评论(0) 推荐(0) 编辑