); 78 PrintUtil.printInfo(CommonUtil.LEFT_BLANKETS + path + CommonUtil.CONTAINS); 79...PrintUtil.printInfo(CommonUtil.FOLDERS + folderCount); 80 PrintUtil.printInfo(CommonUtil.FILES...+ num); 81 PrintUtil.printInfo(CommonUtil.TARGET + suffix + CommonUtil.TARGET_FILES + targetCount...(); 84 PrintUtil.printInfo(CommonUtil.SPEND + (entTime - startTime) + CommonUtil.MS); 85...); 33 PrintUtil.printInfo(CommonUtil.SPEND + (entTime - startTime) + CommonUtil.MS); 34 }
+ keys[1], keys[2] + CommonUtil.COMMA + keys[3], keys[0] + CommonUtil.COMMA + keys[1], abaTypemap 86...+ keys[1], keys[2] + CommonUtil.COMMA + keys[3], keys[4] + CommonUtil.COMMA + keys[5], abaTypemap 144...+ (endTime - startTime) + CommonUtil.SPEND_END); 75 PrintUtil.printInfo(CommonUtil.LINE_THREE..., CommonUtil.EMPTY)) 105 + addBlank(vo.getPostTense().replace(CommonUtil.COMMA, CommonUtil.EMPTY...)) 106 + addBlank(vo.getPostParticiple().replace(CommonUtil.COMMA, CommonUtil.EMPTY
()); builder.append("【commandType】:" + entity.getCommandType() + CommonUtil.getNewLine...()); builder.append("【commandText】:" + entity.getCommandText() + CommonUtil.getNewLine...()); } builder.append("执行组织架构增量同步成功" + CommonUtil.getNewLine()); } catch...("【异常信息】:" + CommonUtil.getExceptionString(e) + CommonUtil.getNewLine()); e.printStackTrace...("【异常信息】:" + CommonUtil.getExceptionString(e) + CommonUtil.getNewLine()); e.printStackTrace
(this, 4.5f);//布局关闭时顶部距离 LL_SEARCH_MAX_TOP_MARGIN = CommonUtil.dp2px(this, 49f);//布局默认展开时顶部距离 LL_SEARCH_MAX_WIDTH...= CommonUtil.getScreenWidth(this) - CommonUtil.dp2px(this, 30f);//布局默认展开时的宽度 LL_SEARCH_MIN_WIDTH = CommonUtil.getScreenWidth...(this) - CommonUtil.dp2px(this, 82f);//布局关闭时的宽度 TV_TITLE_MAX_TOP_MARGIN = CommonUtil.dp2px(this, 11.5f...(this) - CommonUtil.dp2px(this, 122f);//布局关闭时的宽度 2.设置搜索框宽度缩放的速率 float searchLayoutNewWidth = LL_SEARCH_MAX_WIDTH...注: 1.文件中我们使用的LayoutParams是MarginLayoutParams,主要是便于我们设置相关控件的topMargin属性. 2.文件中CommonUtil是方法公共类,主要是用于获取屏幕的宽度
jar 包,我们想引用它,需要两个步骤 第一步, 声明我们 jar 包所在的目录 LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := CommonUtil:/libs/CommonUtil.jar...这行代码的意思大概可以理解成这样,声明一个变量 CommonUtil,它的 value 是 /libs/CommonUtil.jar include $(CLEAR_VARS) LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES...:= CommonUtil:/libs/CommonUtil.jar include $(BUILD_MULTI_PREBUILT) 第二步....引用我们声明 jar 包的变量 引用我们上面声明的 CommonUtil LOCAL_STATIC_JAVA_LIBRARIES := CommonUtil 引用多个 jar 包 引用多个 jar 包的方式其实跟引用...:/libs/CommonUtil.jar \ BaiduLBS:/libs/BaiduLBS_Android.jar \
parameters.put("sign", sign); String requestXML = PayCommonUtil.getRequestXml(parameters); String result =CommonUtil.httpsRequest...params); params.put("packageValue", "prepay_id="+prepay_id); //这里用packageValue是预防package是关键字在js...try { PrintWriter out= response.getWriter(); // xml请求解析 Map requestMap = CommonUtil.parseXml..." value="确定" id="pay" style="width: 150px; height: 80px;"> resources/js.../jquery.min.js" type="text/javascript"> var basePath =
第二步:这里要用到CommonUtil工具类,因为kotlin与java是互通的,我把代码写在下面可以直接用 public class CommonUtil { public static void...就是需要改变控件语言的界面,下面会有activity_language界面代码 override fun onClick(v: View) { when(v.id){ R.id.tvChinese- { CommonUtil.configLanguage...(this,"CHINESE") startActivity<LanguageActivity () } R.id.tvEnglish- { CommonUtil.configLanguage(...this,"ENGLISH") startActivity<LanguageActivity () } R.id.tvJan- { CommonUtil.configLanguage(this,
2.11.0 requrest共享 通过TransmittableThreadLocal对象进行线程对象共享 public class CommonUtil...static void remove(){ requestTransmittableThreadLocal.remove(); } } 注:系统中所有Request获取需要统一从CommonUtil...RequestWrapper(HttpServletRequest request) throws IOException { super(request); body = CommonUtil.getBodyString...System.out.println("异步任务共享request"); return () -> { try { CommonUtil.shareRequest...(request); runnable.run(); } finally { CommonUtil.remove(
一、示例 CommonUtil.java package com.ray.test.des; import java.io.ByteArrayOutputStream; import java.io.IOException...import java.util.Arrays; import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; public class CommonUtil...System.out.println("解密后:" + decryResult); //3.将字节转String String mes=CommonUtil.getStringFromBytes...System.out.println("mes:" + mes); //4.将String转字节 byte[] after=CommonUtil.getBytesFromString
false; } } private void draw(Canvas canvas, float scareFactor){ Paint paint = CommonUtil.getPaint...public Bloom(Point position) { this.position = position; this.color = Color.argb(CommonUtil.random...(76, 255), 0xff, CommonUtil.random(255), CommonUtil.random(255)); this.angle = CommonUtil.random...return Heart.getRadius() * scale; } private void draw(Canvas canvas) { Paint paint = CommonUtil.getPaint...(-c, c); float y = CommonUtil.random(-c, c); if (inHeart(x, y, r)) {
return this.page; } public void setPage(Page page) { this.page = page; } } 5、添加工具类中的方法 public class CommonUtil...WaterForecastRecordDTO> waterForecastRecordDTOList = GeneralUtil.convertList(list,WaterForecastRecordDTO.class); return CommonUtil.makePageListResult...(page,waterForecastRecordDTOList); } return null; */ return CommonUtil.makePageListResult(page,waterForecastRecordDTOList...controller层直接返回service返回的PageInfoListResult 就可以,下面记录下我在使用mybatis分页插件时碰到的一个问题 1、背景(直接上代码) public class CommonUtil...WaterForecastRecordDTO> waterForecastRecordDTOList = GeneralUtil.convertList(list,WaterForecastRecordDTO.class); return CommonUtil.makePageListResult
sharedPreferencesUtil.getData(Constant.VERSION_CODE_LOCAL,"")) < Integer .parseInt(CommonUtil.getInstance...com.mintu.dcdb.util.LogUtil; import com.wusy.wusylibrary.base.BaseActivity; import com.wusy.wusylibrary.util.CommonUtil...CommonUtil.getInstance().isNull(sharedPreferencesUtil.getData(Constant.VERSION_CONTENT, ""))) {...com.mintu.dcdb.util.LogUtil; import com.mintu.dcdb.util.SystemUtils; import com.wusy.wusylibrary.util.CommonUtil...().createFile(app_name + ".patch"); CommonUtil.getInstance().createFile(file_name);
public JSONObject listArticle(HttpServletRequest request) { return articleService.listArticle(CommonUtil.request2Json.../updateArticle") public JSONObject updateArticle(@RequestBody JSONObject requestJson) { CommonUtil.hasAllRequired... } /** * 文章列表 */ public JSONObject listArticle(JSONObject jsonObject) { CommonUtil.fillPageParam...updateArticle(JSONObject jsonObject) { articleDao.updateArticle(jsonObject); return CommonUtil.successJson...; } String successMsg = "登录成功"; info.put("msg", successMsg); return CommonUtil.successJson
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.ray.jpush.util.CommonUtil...registration_id,String alert,String appKey,String masterSecret) { String base64_auth_string = CommonUtil.encryptBASE64...e.printStackTrace(); } } return null; } } 4.通用工具类—CommonUtil.java...sun.misc.BASE64Encoder; /**@desc : * * @author: shirayner * @date : 2017年11月29日 下午3:11:33 */ public class CommonUtil
= null) { mySpecification.add(Restrictions.gte("createTime", CommonUtil.beginOfDay(begin)...= null) { mySpecification.add(Restrictions.lte("createTime", CommonUtil.endOfDay(end), true...criteriaQueryBuilder.add(Restrictions.max("state")); criteriaQueryBuilder.add(Restrictions.gte("createTime", CommonUtil.beginOfDay...("2019-05-01"), true)); criteriaQueryBuilder.add(Restrictions.lte("createTime", CommonUtil.endOfDay...("2019-05-01"), true)); criteriaQueryBuilder.add(Restrictions.lte("createTime", CommonUtil.endOfDay
我写了一个静态类,供大家能参考 public class CommonUtil { /** * 获取cache路径 * * @param context * @return
kaptcha.setConfig(config); return kaptcha; } } 实战 我的配置类 获取访问ip和生成MD5的工具类 public class CommonUtil...return */ private String getCaptchaKey(HttpServletRequest request){ String ipAddr = CommonUtil.getIpAddr...String userAgent=request.getHeader("user-Agent"); String key="user_service:captcha:"+CommonUtil.MD5
代码清单1 生成公众号带参二维码 //此处getToken方法内的参数需换成自己的服务号appid和secret Token pubtoken = CommonUtil.getToken...HashMap(); try { JSONObject res = JSON.parseObject(MyHttpRequestUtil.sendPost(CommonUtil.CONTAIN_PARAMS_QRCODE...String ticket = URLEncoder.encode(res.getString("ticket"),"UTF-8"); String picUrl = CommonUtil.MP_QRCODE_PRE_URL
注:公用的库,习惯上都会定义为common 我们新建一个名为common的package,然后在里面创建common_util文件,新建类CommonUtil把公用方法剪切到这个类里面 然后其他类只需要继承这个类即可...先举个通俗的例子: 把CommonUtil里面的代码注释掉,直接pass,让它不再生效 然后修改测试文件: 执行后就可以看到,只有test_py方法调用了exe_sql方法。
领取专属 10元无门槛券
手把手带您无忧上云