上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页
摘要: The improved version is simply the following: 根据生日来判断是否是婴儿潮时期出生的,isBabyBoomer()是一个糟糕的设计,每次调用这个方法都会创建Calendar,TimeZone以及2个Date对象实例,当此方法被频繁调用时将会非常地影响性能。 阅读全文
posted @ 2017-05-27 17:49 FrankYou 阅读(248) 评论(0) 推荐(0)
摘要: 如果你定义的类仅仅是包含了一些静态的方法和静态的字段,这些类一般是一些工具类,这些一般是设计为不能被实例化的。 1. Attempting to enforce noninstantiability by making a class abstract does not work. 2. a cla 阅读全文
posted @ 2017-05-27 16:54 FrankYou 阅读(638) 评论(0) 推荐(0)
摘要: 1. 通过一个公开的字段来获取单例 The main advantage of the public field approach is that the declarations make it clear that the class is a singleton: the public sta 阅读全文
posted @ 2017-05-27 15:57 FrankYou 阅读(403) 评论(0) 推荐(0)
摘要: the Builder pattern is a good choice when designing classes whose constructors or static factories would have more than a handful of parameters. 阅读全文
posted @ 2017-05-27 15:14 FrankYou 阅读(191) 评论(0) 推荐(0)
摘要: 01.The old-fashioned delicatessen inside the street has become a popular place for lunch 街道里面的熟食店正在成为一个流行的吃午餐的地方 02.There is no one who will not benef 阅读全文
posted @ 2017-05-26 11:01 FrankYou 阅读(403) 评论(0) 推荐(0)
摘要: 转载:http://wgkgood.blog.51cto.com/1192594/1586259 随着IT运维的不断发展,尤其的Linux的飞速发展,越来越多的企业开始使用Linux操作系统平台,例如CentOS、RedHat、Ubuntu、Fedora等等,成千上亿个网站涌现在当今互联网,互联网已 阅读全文
posted @ 2017-05-24 14:06 FrankYou 阅读(329) 评论(0) 推荐(0)
摘要: 背景:全站HTTPS的时代来了 全站HTTPS,请参考: http://www.cnblogs.com/bugly/p/5075909.html 1. 设置BasicHttpBinding的BasicHttpSecurity模型。 create Binding时通过URI的Scheme来判断是HTT 阅读全文
posted @ 2017-05-24 10:34 FrankYou 阅读(4088) 评论(0) 推荐(0)
摘要: 在这篇文章中,我们会利用Spring的@PropertySource和@Value两个注解从配置文件properties中读取值。先来段java代码: 我们来具体分析下: 1、@Component注解说明这是一个普通的bean,在Component Scanning时会被扫描到并被注入到Bean容器 阅读全文
posted @ 2017-05-22 15:13 FrankYou 阅读(14283) 评论(0) 推荐(1)
摘要: 1. Spring MVC的核心就是DispatcherServlet类,Spring MVC处理请求的流程如下图所示: 2. Spring MVC中典型的上下文层次 当我们初始化一个DispatcherServlet类时,Spring MVC会在web应用的WEB-INF目录下查找一个名字叫:[s 阅读全文
posted @ 2017-05-22 11:14 FrankYou 阅读(8079) 评论(3) 推荐(1)
摘要: 223本电子书籍,囊括了.NET/ASP.NET/C#/WCF/SQL Server/My SQL/Java/JSP/JDBC/Spring/Spring MVC/PHP/Python/Shell/Agile/CSS/HTML/HTTP/Unix/Linux在内的大量PDF书籍/电子书籍,重点是还包 阅读全文
posted @ 2017-05-19 11:03 FrankYou 阅读(451) 评论(0) 推荐(1)
摘要: /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding cop... 阅读全文
posted @ 2017-05-17 18:43 FrankYou 阅读(3654) 评论(0) 推荐(0)
摘要: 帮助到您了吗? 打赏作者(支付宝): 阅读全文
posted @ 2017-05-16 15:23 FrankYou 阅读(3776) 评论(0) 推荐(0)
摘要: @JsonProperty("BankSettlementDate") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyyMMddHHmmss", locale = "zh", timezone = "GMT+8") private Date bankSettlementDate; 阅读全文
posted @ 2017-05-16 14:21 FrankYou 阅读(1652) 评论(0) 推荐(0)
摘要: 为了便于date类型字段的序列化和反序列化,需要在数据结构的date类型的字段上用JsonFormat注解进行注解具体格式如下 pattern 指定转化的格式,SSSZ(S指的是微秒,Z指时区)此处的pattern和java.text.SimpleDateFormat中的Time Patterns一 阅读全文
posted @ 2017-05-16 09:49 FrankYou 阅读(6366) 评论(0) 推荐(0)
摘要: try { Enumeration interfaces = NetworkInterface.getNetworkInterfaces(); while (interfaces.hasMoreElements()) { NetworkInterface iface = interfaces.nextElement(); if (iface.isL... 阅读全文
posted @ 2017-05-12 16:43 FrankYou 阅读(303) 评论(0) 推荐(0)
摘要: Wget简介:Linux系统中wget是一个下载文件的工具,它用在命令行下。对于Linux用户是必不可少的工具,我们经常要下载一些软件或从远程服务器恢复备份到本地服务器。wget支持HTTP,HTTPS和FTP协议,可以使用HTTP代理。所谓的自动下载是指,wget可以在用户退出系统之后在后台执行。 阅读全文
posted @ 2017-05-08 10:38 FrankYou 阅读(5679) 评论(0) 推荐(0)
摘要: 转载:http://www.kangry.net/blog/?type=article&article_id=70 公司[1]一牛人看我的代码,说我设置的timeout有误,还应该设置ReadWriteTimeout。本人很不服,于是上网查看了相关说明。 MSDN对ReadWriteTimeout的 阅读全文
posted @ 2017-05-03 11:33 FrankYou 阅读(11946) 评论(2) 推荐(4)
摘要: 实验环境:ubuntu 12.04 LTS goagent 方法一、在环境变量中设置代理 方法二、使用配置文件 为wget使用代理,可以直接修改/etc/wgetrc,也可以在主文件夹下新建.wgetrc,并编辑相应内容,本文采用后者。 将/etc/wgetrc中与proxy有关的几行复制到~/.w 阅读全文
posted @ 2017-04-11 13:58 FrankYou 阅读(108147) 评论(1) 推荐(2)
摘要: 来源:yubinfeng cnblogs.com/yubinfeng/p/6626694.html 一、概述 .NET 经历14年,在Windows平台上的表现已经相当优秀,但是“跨平台、开源”却是其痛点,从16年开始.NET Core的出现将迎来.NET的真正意义上的跨平台和开源序幕。 .NET 阅读全文
posted @ 2017-04-10 13:26 FrankYou 阅读(4420) 评论(0) 推荐(2)
摘要: 补一个空格(半角): 阅读全文
posted @ 2017-03-22 11:58 FrankYou 阅读(644) 评论(0) 推荐(0)
摘要: /** * DES加密 * * @param data 加密数据 * @param key 密钥 * @return 返回加密后的数据 */ public static byte[] desEncrypt(byte[] data, String key, String charset) { try { ... 阅读全文
posted @ 2017-03-22 11:52 FrankYou 阅读(4488) 评论(1) 推荐(0)
摘要: Java代码: 阅读全文
posted @ 2017-03-14 11:15 FrankYou 阅读(1671) 评论(0) 推荐(0)
摘要: Java代码(使用了2个内部类): 阅读全文
posted @ 2017-03-09 09:56 FrankYou 阅读(304) 评论(0) 推荐(0)
摘要: 目标线程的join方法暂停当前线程,直到目标线程完成(从run()方法返回)。 Java代码: package Threads; import java.io.IOException; /** * Created by Frank */ public class Join { public stat 阅读全文
posted @ 2017-03-08 17:19 FrankYou 阅读(440) 评论(0) 推荐(0)
摘要: Java代码: 阅读全文
posted @ 2017-03-08 16:30 FrankYou 阅读(4483) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页