public class DensityUtil { /** * 根据手机的分辨率从 dp 的单位 转成为 px(像素) */ public static int dip2px(Context context, float dpValue) { final float scale = context.getResources().getDisplayMetrics().density; retur
java.util.*; import java.text.*; import java.util.Calendar; public class VeDate { /** * 获取现在时间 * * @return 返回时间类型 yyyy-MM-dd HH:mm:ss */ public static Date getNowDate() { Date currentTime = new Date()
public class CustomDialog { private AlertDialog.Builder builder; private Context context; public CustomDialog(Context context) { // TODO Auto-generated constructor stub this.context = context; } publi
用Android自带的JSONArray及JSONObject处理json数据---------------------------------------------------------------- 在下面方法中传入的String path是数据所在的服务器url地址 public class dealJsonUtil { /* * 获取"数组形式"的JSON数据, */ public s
#/usr/bin/env python #--encoding=UTF-8-- #a simpl ping scaner import subprocess from threading import Thread from Queue import Queue import re num_ping_threads = 3 num_arp_threads = 3 in_queue = Queue
esutil.py ''' Export and Import ElasticSearch Data. Simple Example At __main__ @author: wgzh159@163.com @note: uncheck consistency of data, please do it by self ''' import json import os import sys im
import javax.swing.WindowConstants; /** * 捕获屏幕,屏幕截图工具 */ public class ScreenCaptureFrame extends JFrame
4”;“-0.8”会显示成“-.8” 现在,通过以下Java工具类保证导出的数据(特别是小数)显示全 2、Java工具类 /** * @Title:DecimalPoint.java *
content="text/html; charset=utf-8" />