| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
| public class UrlEscapeSample { | |
| public static void main(String[] args) { | |
| String filename = "中国 地图/? a.docx"; | |
| String urlEncoding = URLEncoder.encode(filename, StandardCharsets.UTF_8.toString()); | |
| prettyPrint("java.net.URLEncoder", urlEncoding); | |
| prettyPrint("UrlEscapers.urlFormParameterEscaper", UrlEscapers.urlFormParameterEscaper().escape(filename)); | |
| prettyPrint("java.net.URLEncoder then replace to %20", urlEncoding.replaceAll("\\+", "%20")); | |
| prettyPrint("UrlEscapers.urlPathSegmentEscaper", UrlEscapers.urlPathSegmentEscaper().escape(filename)); | |
| prettyPrint("UrlEscapers.urlFragmentEscaper", UrlEscapers.urlFragmentEscaper().escape(filename)); | |
| } |
| import io.dropwizard.Application; | |
| import io.dropwizard.Configuration; | |
| import io.dropwizard.client.JerseyClientBuilder; | |
| import io.dropwizard.setup.Environment; | |
| import io.dropwizard.testing.junit.DropwizardAppRule; | |
| import org.assertj.core.data.MapEntry; | |
| import org.eclipse.jetty.servlets.CrossOriginFilter; | |
| import org.junit.ClassRule; | |
| import org.junit.Test; |
May be you got a warinning message when you execute do-release-upgrade:
Not enough free disk space
The upgrade has aborted. The upgrade needs a total of
xxxM free space on disk '/boot'. Please free at least an additionalxxxM of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.
Because your /boot partition is filled with old kernels. You can easily remove the old kernels if you know which packages they came in.
| ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$ | |
| // Match | |
| 2009-12T12:34 | |
| 2009 | |
| 2009-05-19 | |
| 2009-05-19 | |
| 20090519 | |
| 2009123 |
#CURL参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
#Get Gravatar image using command line(Mac OS X only)
Gravatar image download url
http://www.gravatar.com/avatar/HASH
Get default image
curl -o yourname.png http://www.gravatar.com/avatar/$(md5 -q -s [email protected])
#Force the user to change their password at first login
You can just expire that password. After creating a new user foo, just type:
$ sudo chage -d 0 foo
And he will be forced to change it after first logon.