`
kanpiaoxue
  • 浏览: 1779074 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论
文章列表
  各个系统存储时间的时候一般都是存储的时间戳,从1970-01-01到当前的毫秒数。但是mac和linux只能处理到秒的时间。所以得到毫秒的时间戳之后,需要去掉后面3位,从而得到秒的数量。 下面是mac和linux将时间戳(秒)打印出时间的命令行。   Mac 写道 date -r1588258830 "+%Y-%m-%d %H:%M:%S"-- output 2020-04-30 23:00:30     Linux 写道 date -d @1588258830 "+%Y-%m-%d %H:%M:%S"-- output2020-0 ...
1、hosts 文件管理工具:gas-mask brew cask install gas-mask   2、免费下载软件 Free Download Manager : 包含chrome的插件   3、画图工具 draw.io https://drawio-app.com/   4、正则表达式 RegExRX   5、htop 一个好用的top统计工具软件。可以通过 brew 安装   6、docker 容器工具   7、剪切板工具 clipy 安装:$brew cask install clipy    8、快捷键工具:CheatShee ...
  参考资料:https://dzone.com/articles/heap-vs-heap-memory-usage 写道 Off heap memory provides;Scalability to large memory sizes e.g. over 1 TB and larger than main memory.Notional impact on GC pause times.Sharing between processes, reducing duplication between JVMs, and making it easier to split JVMs.P ...
    官网文档地址: https://commons.apache.org/proper/commons-dbcp/configuration.html  
  参考资料: https://www.techiedelight.com/convert-iterator-iterable-java/ 1. Java 7 and before import java.util.Arrays; import java.util.Iterator; // Program to Convert an Iterator to Iterable in Java class IteratorUtils { public static<T> Iterable<T> iteratorToIterable(Iterator&l ...
  在开发系统的时候,尤其是前端需要展现一棵树的时候,经常需要构建一棵树来展现层级结构。 java中swing自带的tree就能满足这些需求,各种遍历方式都有。   参考资料: https://docs.oracle.com/javase/tutorial/uiswing/components/tree.html    import com.google.gson.Gson; import com.google.gson.GsonBuilder; import java.util.Arrays; import java.util.Enumeration; impo ...
  《Learn Python Programming》: https://www.programiz.com/python-programming
    打印类的加载顺序,可以方便排查package冲突的问题。 使用参数 -verbose 来显示加载顺序。 java -verbose -jar hello.jar   参考资料: https://stackoverflow.com/questions/10230279/java-verbose-class-loading
  python生成按照文件大小进行回滚的日志   import logging import logging.handlers as handlers log_file_path = r'/Users/kanpiaoxue/tmp/20200518/log/hello.log' log_file_max_bytes = 1024 * 1 log_file_max_count = 10 log_file_level= logging.DEBUG log_formatter = logging.Formatter('%(asctime)s [PID:%(process ...
    举例: assert len(lists) >=3,'列表元素个数小于3'   官网的内容如下:   6.3. The assert statement Assert statements are a convenient way to insert debugging assertions into a program: assert_stmt ::= "assert" expression ["," expression] The simple form, assert expression, is equiv ...
  参考文章: https://www.programiz.com/python-programming/datetime     def get_days_count(start_date_time, end_date_time): ''' 得到2个时间之间的天数 ''' assert start_date_time is not None assert end_date_time is not None return (end_date_time - start_date_time).days       In ...
  import logging logging.basicConfig(stream=sys.stdout, level=logging.DEBUG, datefmt='%Y-%m-%d:%H:%M:%S', format='%(asctime)s,%(msecs)d [PID:%(process)d] [%(threadName)-12.12s] %(levelname)-5.5s [%(filename)s:%(lineno)d] --> %(message)s') logger = logging.getLogger(__name__) ...
  You have Code Recommenders installed. The proposal with percentage is coming from that, and the proposal without the percentage is coming from JDT. Essentially there are more than one completion engines installed - see Preferences > Java > Editor > Content Assist. The same method is bei ...
  参考文章: https://stackoverflow.com/questions/36915823/spring-resttemplate-and-generic-types-parameterizedtypereference-collections-lik     public <T> List<T> exchangeAsList(String uri, ParameterizedTypeReference<List<T>> responseType) { return restTemplate.exchange(u ...
  参考文章: https://stackoverflow.com/questions/17092044/gson-failure-to-conver-symbols   You should disable HTML escaping, here is a sample that illustrates it: Gson gson1 = new Gson(); String s1 = gson1.toJson("<>"); Gson gson2 = new GsonBuilder().disableHtmlEscaping().creat ...
Global site tag (gtag.js) - Google Analytics