diff --git a/README.md b/README.md index 624fcdb..e6c4632 100644 --- a/README.md +++ b/README.md @@ -9,22 +9,22 @@ stackoverflow-Java-top-qa 对于参与翻译的人,这也是很好的一个学习、理解过程,欢迎大家一起来翻译 ------------- -### 如何参与翻译(欢迎加入翻译组QQ群485011036) -####如何参与: +### 如何参与翻译 +#### 如何参与: - 请从下文"待翻译问题链接"中寻找你感兴趣的问答进行翻译。翻译好的问答,放到contents目录下,无需更新readme.md文档。之后提一个PR,我负责合并PR并更新到readme中。 - 另外,为了避免多人重复新翻译一个问题,你可以提issue,说明你计划翻译的问题及时间点,我可以先更新到下面的"未翻译问题"中,说明已有人领了这个问题。当然,也不一定要提issue,一般情况下,只要及时提pr,我及时审核,出现"撞车"的概率并不高。 -####一些基本的约定: +#### 一些基本的约定: - 文档的文件名,和stackoverflowhich-notnull-java-annotation-should-i-usew上的url保持一致。例如,http://stackoverflow.com/questions/8710619/java-operator 的文件名, 就是java-operator.md - 在每篇翻译文档内容的最后,要附上stackoverflow的原文链接 -####每个人可以做(但不限于): +#### 每个人可以做(但不限于): - 找未翻译的问题进行翻译 - 优化已翻译的问题 - 输出问答精简汇总版(把所有的问答集中到一个md文件,然后尽量精简,让别人可以在一天内把这100个问题的精髓都看完) - 输出gitbook版本(现在直接在github上查看,体验不好) -####文档优化反馈: +#### 文档优化反馈: 请大家多多反馈,优化已翻译好的文章:可以到[吐槽区](https://github.com/giantray/stackoverflow-java-top-qa/issues/66)吐槽,也可以在已翻译文章基础上进行优化,提新的PR。文章质量的提升,需要大家一起努力! @@ -61,7 +61,6 @@ stackoverflow-Java-top-qa * [为什么Java的```Vector```类被认为是过时的或者废弃的](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/why-is-java-vector-class-considered-obsolete-or-deprecated.md) * [Java的foreach循环是如何工作的](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/how-does-the-java-for-each-loop-work.md) * [为什么相减这两个时间(1927年)会得到奇怪的结果](/contents/why-is-subtracting-these-two-times-in-1927-giving-a-strange-result.md) -* [Java 中如何将 String 转换为 enum](/contents/lookup-enum-by-string-value.md) * [该什么时候使用 ThreadLocal变量,它是如何工作的](/contents/when-and-how-should-i-use-a-threadlocal-variable.md) * [servlets的运行原理](/contents/how-do-servlets-work-instantiation-shared-variables-and-multithreading.md) * [如何计算MD5值](/contents/how-can-i-generate-an-md5-hash.md) @@ -70,6 +69,10 @@ stackoverflow-Java-top-qa * [Java内部类和嵌套静态类](/contents/java-inner-class-and-static-nested-class.md) * [@Component, @Repository, @Service的区别](/contents/whats-the-difference-between-component-repository-service-annotations-in.md) * [如何创建泛型java数组](/contents/how-to-create-a-generic-array-in-java.md) +* [如何在整数左填充0](/contents/how-can-i-pad-an-integers-with-zeros-on-the-left.md) +* [Java里什么是与C++的Pair相等的?](/contents/what-is-the-equivalent-of-the-c++pair-in-java.md) +* [为什么数学函数Math.round(0.49999999999999994) 返回 1](/contents/why-does-math-round0-49999999999999994-return-1.md) +* [这段代码为什么陷入了死循环](/contents/why-does-this-go-into-an-infinite-loop.md) > 编程技巧 @@ -92,9 +95,17 @@ stackoverflow-Java-top-qa * [如何在整数左填充0](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/how-can-i-pad-an-integers-with-zeros-on-the-left.md) * [在调用 instanceof 前需要进行null检查吗](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/is-null-check-needed-before-calling-instanceof.md) * [如何从文件里读取字符串](/contents/how-do-i-create-a-java-string-from-the-contents-of-a-file.md) -* [遍历集合时移除元素,怎样避免ConcurrentModificationException异常抛出](/contents/iterating-through-a-collection-avoiding-concurrentmodificationexception-when-reiterating-through-a-collection-avoiding-concurrentmodificationexception-when-re.md) +* [遍历集合时移除元素,怎样避免ConcurrentModificationException异常抛出](/contents/iterating-through-a-collection-avoiding-concurrentmodificationexception-when-re.md) * [如何让IntelliJ编辑器永久性显示代码行数](/contents/how-can-i-permanently-have-line-numbers-in-intellij.md) * [如何使用maven把项目及其依赖打包为可运行jar包](/contents/how-can-i-create-an-executable-jar-with-dependencies-using-maven.md) +* [重新导入项目到eclipse时遇到'Must Override a Superclass Method'报错](/contents/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips.md) +* [如何产生一个随机的字母数字串作为 session 的唯一标识符](/contents/how-to-generate-a-random-alpha-numeric-string.md) +* [Apache Camel是什么](/contents/what-exactly-is-apache-camel.md) +* [通过对象属性对常规对象的ArrayList进行排序](/contents/sort-arraylist-of-custom-objects-by-property.md) +* [为Eclipse自动代码格式化设置行的最大长度?](/contents/Eclipse-set-maximun-line-length-for-auto-formatting.md) +* [加载JNI共享库失败(JDK)](/contents/failed-to-load-the-JNI-shared-library(JDK).md) +* [如何对Java class文件进行反编译](/contents/how-do-i-decompile-java-class-files.md) +* [如何在classpath中设置多个jar包](/contents/setting-multiple-jars-in-java-classpath.md) > 网络 @@ -107,6 +118,7 @@ stackoverflow-Java-top-qa * [为什么处理排序的数组要比非排序的快](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/why-is-processing-a-sorted-array-faster-than-an-unsorted-array.md) * [如何使用Java创建一个内存泄漏的程序](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/creating-a-memory-leak-with-java.md) * [为什么打印"B"会明显的比打印"#"慢](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/why-is-printing-b-dramatically-slower-than-printing.md) +* ["Double Brace Initialization"的效率问题](/contents/efficiency-of-java-double-brace-initialization.md) > 测试 @@ -118,34 +130,21 @@ stackoverflow-Java-top-qa * [在Android里面下载文件,并在ProgressDialog显示进度](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog.md) * [如何获取Android设备唯一ID](https://github.com/giantray/stackoverflow-java-top-qa/blob/master/contents/is-there-a-unique-android-device-id.md) * [安装Android SDK的时候找不到JDK](contents/android-sdk-installation-doesnt-find-jdk.md) +* [安卓中"UserManger.isUserAGoat()"的合适案例](contents/proper-use-cases-for-android-usermanager-isuseragoat.md) -### 待翻译问题链接(还剩x问题) -- [Proper use cases for Android UserManager.isUserAGoat()?](http://stackoverflow.com/questions/13375357/proper-use-cases-for-android-usermanager-isuseragoat) + +### 待翻译问题链接(还剩 13 问题) - [Why is executing Java code in comments with certain Unicode characters allowed?](http://stackoverflow.com/questions/30727515/why-is-executing-java-code-in-comments-with-certain-unicode-characters-allowed) -- [Convert a String to an enum in Java](http://stackoverflow.com/questions/604424/convert-a-string-to-an-enum-in-java) -- ['Must Override a Superclass Method' Errors after importing a project into Eclipse](http://stackoverflow.com/questions/1678122/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips) - [Fastest way to determine if an integer's square root is an integer](http://stackoverflow.com/questions/295579/fastest-way-to-determine-if-an-integers-square-root-is-an-integer) - [How to fix: Unsupported major.minor version 51.0 error?](http://stackoverflow.com/questions/10382929/how-to-fix-unsupported-major-minor-version-51-0-error) -- [How to generate a random alpha-numeric string?](http://stackoverflow.com/questions/41107/how-to-generate-a-random-alpha-numeric-string) -- [Failed to load the JNI shared Library (JDK)](http://stackoverflow.com/questions/7352493/failed-to-load-the-jni-shared-library-jdk) -- [What exactly is Apache Camel?](http://stackoverflow.com/questions/8845186/what-exactly-is-apache-camel) - [Access restriction on class due to restriction on required library rt.jar?](http://stackoverflow.com/questions/860187/access-restriction-on-class-due-to-restriction-on-required-library-rt-jar) - [How do I discover memory usage of my application in Android?](http://stackoverflow.com/questions/2298208/how-do-i-discover-memory-usage-of-my-application-in-android) - [Uncatchable ChuckNorrisException](http://stackoverflow.com/questions/13883166/uncatchable-chucknorrisexception) - [Can I add jars to maven 2 build classpath without installing them?](http://stackoverflow.com/questions/364114/can-i-add-jars-to-maven-2-build-classpath-without-installing-them) - [Update Eclipse with Android development tools v. 23](http://stackoverflow.com/questions/24437564/update-eclipse-with-android-development-tools-v-23) -- [Setting multiple jars in java classpath](http://stackoverflow.com/questions/219585/setting-multiple-jars-in-java-classpath) - [What is the Java equivalent for LINQ?](http://stackoverflow.com/questions/1217228/what-is-the-java-equivalent-for-linq) - [Hibernate hbm2ddl.auto possible values and what they do?](http://stackoverflow.com/questions/438146/hibernate-hbm2ddl-auto-possible-values-and-what-they-do) -- [How can I pad an integers with zeros on the left?](http://stackoverflow.com/questions/473282/how-can-i-pad-an-integers-with-zeros-on-the-left) -- [Sort ArrayList of custom Objects by property](http://stackoverflow.com/questions/2784514/sort-arraylist-of-custom-objects-by-property) -- [Efficiency of Java "Double Brace Initialization"?](http://stackoverflow.com/questions/924285/efficiency-of-java-double-brace-initialization) -- [Why does this go into an infinite loop?](http://stackoverflow.com/questions/3831341/why-does-this-go-into-an-infinite-loop) - [decompiling DEX into Java sourcecode](http://stackoverflow.com/questions/1249973/decompiling-dex-into-java-sourcecode) -- [Why does Math.round(0.49999999999999994) return 1](http://stackoverflow.com/questions/9902968/why-does-math-round0-49999999999999994-return-1) -- [Eclipse: Set maximum line length for auto formatting?](http://stackoverflow.com/questions/3697287/eclipse-set-maximum-line-length-for-auto-formatting) -- [What is the equivalent of the C++ Pair in Java?](http://stackoverflow.com/questions/156275/what-is-the-equivalent-of-the-c-pairl-r-in-java) -- [How do I "decompile" Java class files?](http://stackoverflow.com/questions/272535/how-do-i-decompile-java-class-files) - [Useful Eclipse Java Code Templates [closed]](http://stackoverflow.com/questions/1028858/useful-eclipse-java-code-templates) - [How to call SOAP web service in Android](http://stackoverflow.com/questions/297586/how-to-call-soap-web-service-in-android) diff --git a/contents/Eclipse-set-maximun-line-length-for-auto-formatting.md b/contents/Eclipse-set-maximun-line-length-for-auto-formatting.md index b1f8579..d00fbae 100644 --- a/contents/Eclipse-set-maximun-line-length-for-auto-formatting.md +++ b/contents/Eclipse-set-maximun-line-length-for-auto-formatting.md @@ -1,4 +1,6 @@ 为自动代码调整设置最大的行数? 问题:我正在学习Java。如果我在Eclipse Helios里使用ctrl+shift+f的组合键,它会自动调整我的代码。一定程度下,它会改变行数。我想增加行数的最大值。应该怎么做? -回答,在偏好设置里,分别点击Java->Code Style->Fomatter->edit,在菜单栏Line Wrapping下会有行的宽度选择(Maximun line width).你将需要编辑你的代码轮廓。 \ No newline at end of file +回答,在偏好设置里,分别点击Java->Code Style->Fomatter->edit,在菜单栏Line Wrapping下会有行的宽度选择(Maximun line width).你将需要编辑你的代码轮廓。 + +stackoverflow原址:http://stackoverflow.com/questions/3697287/eclipse-set-maximum-line-length-for-auto-formatting \ No newline at end of file diff --git a/contents/avoiding-null-statements-in-java.md b/contents/avoiding-null-statements-in-java.md index aab0bc7..c2a1348 100644 --- a/contents/avoiding-null-statements-in-java.md +++ b/contents/avoiding-null-statements-in-java.md @@ -99,4 +99,4 @@ ParserFactory.getParser().findAction(someInput).doSomething(); - 如果你想返回null,请停下来想一想,这个地方是否更应该抛出一个异常 stackoverflow链接: -http://stackoverflow.com/questions/271526/avoiding-null-statements-in-java?page=2&tab=votes#tab-top +http://stackoverflow.com/questions/271526/avoiding-null-statements?page=1&tab=votes#tab-top diff --git a/contents/convert-a-string-to-an-enum-in-java.md b/contents/convert-a-string-to-an-enum-in-java.md index 5e11958..d9474b9 100644 --- a/contents/convert-a-string-to-an-enum-in-java.md +++ b/contents/convert-a-string-to-an-enum-in-java.md @@ -19,6 +19,38 @@ Enum.valueOf()是否能实现以上目的,如果是,那我如何使用? ### 其他答案 +当文本和枚举值不同时,可以采用这种方式: +```java +public enum Blah { + A("text1"), + B("text2"), + C("text3"), + D("text4"); + + private String text; + + Blah(String text) { + this.text = text; + } + + public String getText() { + return this.text; + } + + public static Blah fromString(String text) { + for (Blah b : Blah.values()) { + if (b.text.equalsIgnoreCase(text)) { + return b; + } + } + return null; + } +} +``` +fromString方法中,throw new IllegalArgumentException("No constant with text " + text + " found") 会比直接返回null更优秀. + +### 其他答案 + 我有一个挺赞的工具方法: ```java /** @@ -47,4 +79,4 @@ public static MyEnum fromString(String name) { } ``` -stackoverflow链接:http://stackoverflow.com/questions/604424/convert-a-string-to-an-enum-in-java \ No newline at end of file +stackoverflow链接:http://stackoverflow.com/questions/604424/convert-a-string-to-an-enum-in-java diff --git a/contents/failed-to-load-the-JNI-shared-library(JDK).md b/contents/failed-to-load-the-JNI-shared-library(JDK).md index b60b2cd..8fffc87 100644 --- a/contents/failed-to-load-the-JNI-shared-library(JDK).md +++ b/contents/failed-to-load-the-JNI-shared-library(JDK).md @@ -14,4 +14,6 @@ Failed to load the JNI shared library "C:/JDK/bin/client/jvm.dll"`. ·64位的Java ·64位的Eclipse +- stackoverflow原址: +http://stackoverflow.com/questions/7352493/failed-to-load-the-jni-shared-library-jdk diff --git a/contents/how-do-i-decompile-java-class-files.md b/contents/how-do-i-decompile-java-class-files.md index 8a28fc2..f050bdd 100644 --- a/contents/how-do-i-decompile-java-class-files.md +++ b/contents/how-do-i-decompile-java-class-files.md @@ -63,3 +63,5 @@ JAD JD-GUI真的很棒。你可以打开一个jar文件并浏览代码,就好像正在使用IDE一样。好东西。 +### 原文链接 +http://stackoverflow.com/questions/272535/how-do-i-decompile-java-class-files \ No newline at end of file diff --git a/contents/how-do-servlets-work-instantiation-shared-variables-and-multithreading.md b/contents/how-do-servlets-work-instantiation-shared-variables-and-multithreading.md index 148ab53..4539697 100644 --- a/contents/how-do-servlets-work-instantiation-shared-variables-and-multithreading.md +++ b/contents/how-do-servlets-work-instantiation-shared-variables-and-multithreading.md @@ -1,13 +1,14 @@ -##How do servlets work? Instantiation, shared variables and multithreading -###问题: +## How do servlets work? Instantiation, shared variables and multithreading +### 问题: 假设,我有一个web服务器可以支持无数的servlets,对于通过这些servlets的信息,我正在获取这些servlets的上下文环境,并设置session变量。 现在,如果有两个或者更多的user用户发送请求到这个服务器,session变量会发生什么变化?session对于所有的user是公共的还是不同的user拥有不同的session。如果用户彼此之间的session是不同的,那么服务器怎么区分辨别不同的用户呢? 另外一些相似的问题,如果有N个用户访问一个具体的servlets,那么这个servlets是只在第一个用户第一次访问的时候实例化,还是为每一个用户各自实例化呢? -###答案: -####ServletContext + +### 答案: +#### ServletContext 当servletcontainer(像tomcat)启动的时候,它会部署和加载所有的webapplications,当一个webapplication加载完成后,servletcontainer就会创建一个ServletContext,并且保存在服务器的内存中。这个webapp的web.xml会被解析,web.xml中的每个```, and ```或者通过注解```@WebServlet, @WebFilter and @WebListener```,都会被创建一次并且也保存在服务器的内存中。对于所有filter,```init()```方法会被直接触发,当servletcontainer关闭的时候,它会unload所有的webapplications,触发所有实例化的servlets和filters的```destroy()```方法,最后,servletcontext和所有的servlets,filter和listener实例都会被销毁。 -####HttpServletRequest and HttpServletResponse +#### HttpServletRequest and HttpServletResponse servletcontainer 是附属于webserver的,而这个webserver会持续监听一个目标端口的```HTTP request```请求,这个端口在开发中经常会被设置成8080,而在生产环境会被设置成80。当一个客户端(比如用户的浏览器)发送一个HTTP request,servletcontainer就会创建新的HttpServletRequest对象和HttpServletResponse对象。。。。 在有filter的情况下,```doFilter()```方法会被触发。当代码调用```chain.doFilter(request, response)```时候,请求会经过下一个过滤器filter,如果没有了过滤器,会到达servlet。在servlets的情况下,```service()```触发,然后根据```request.getMethod()```确定执行doGet()还是```doPost()```,如果当前servlet找不到请求的方法,返回405error。 @@ -22,14 +23,14 @@ request对象提供了HTTP请求所有的信息,比如request headers和reques 只要没超过``````设定的值,httpSession对象会一直存在,``````大小可以在web.xml中设定,默认是30分钟。所以如果连续30分钟之内客户端不再访问webapp,servletcontainer就会销毁对应的session。接下来的request请求即使cookies依旧存在,但是却不再有对应的session了。servletcontainer 会创建新的session。 另外一方面,session cookie在浏览器端有默认的生命时长,就是只要浏览器一直在运行,所以当浏览器关闭,浏览器端的cookie会被销毁。 -####最后 +#### 总结 - 只要webapp存在,ServletContext 一定会存在。并且ServletContext 是被所有session和request共享的。 - 只要客户端用同一个浏览器和webapp交互并且该session没有在服务端超时,HttpSession 就会一直存在。并且在同一个会话中所有请求都是共享的。 - 只有当完整的response响应到达,HttpServletRequest 和 HttpServletResponse才不再存活,并且不被共享。 - 只要webapp存在,servlet、filter和listener就会存在。他们被所有请求和会话共享。 - 只要问题中的对象存在,任何设置在ServletContext, HttpServletRequest 和 HttpSession中的属性就会存在。 -####线程安全 +#### 线程安全 就是说,你主要关注的是线程安全性。你应该了解到,servlets和filter是被所有请求共享的。这正是Java的美妙之处,它的多线程和不同的线程可以充分利用同样的实例instance,否则对于每一个request请求都要重复创建和调用init()和destroy()开销太大。 但是你也应该注意到,你不应该把任何请求或会话作用域的数据作为一个servlet或过滤器的实例变量。这样会被其他会话的请求共享,并且那是线程不安全的!下面的例子阐明的这点: @@ -49,4 +50,4 @@ public class ExampleServlet extends HttpServlet { stackoverflow链接: -http://stackoverflow.com/questions/3106452/how-do-servlets-work-instantiation-shared-variables-and-multithreading \ No newline at end of file +http://stackoverflow.com/questions/3106452/how-do-servlets-work-instantiation-shared-variables-and-multithreading diff --git a/contents/how-to-sort-a-mapkey-value-on-the-values-in-java.md b/contents/how-to-sort-a-mapkey-value-on-the-values-in-java.md index b9fecfb..31b36ec 100644 --- a/contents/how-to-sort-a-mapkey-value-on-the-values-in-java.md +++ b/contents/how-to-sort-a-mapkey-value-on-the-values-in-java.md @@ -1,6 +1,6 @@ -##`Map`基于Value值排序 +## `Map`基于Value值排序 -###方法1: +### 方法1: 使用TreeMap,可以参考下面的代码 ```java public class Testing { @@ -43,7 +43,7 @@ class ValueComparator implements Comparator { ``` 译注:如果不自己写Comparator,treemap默认是用key来排序 -###方法2: +### 方法2: 先通过linkedlist排好序,再放到LinkedHashMap中 ```java @@ -74,4 +74,4 @@ public class MapUtil 译注:这两种方法,我简单测试了下,如果map的size在十万级别以上,两者的耗时都是几百毫秒,第二个方法会快一些。否则,第一个方法快一些。因此,如果你处理的map,都是几十万级别以下的大小,两种方式随意使用,看个人喜欢了。 stackoverflow链接: -http://stackoverflow.com/questions/109383/how-to-sort-a-mapkey-value-on-the-values-in-java \ No newline at end of file +http://stackoverflow.com/questions/109383/how-to-sort-a-mapkey-value-on-the-values-in-java diff --git a/contents/iterate-through-a-hashmap.md b/contents/iterate-through-a-hashmap.md index 91807ac..24ac1ec 100644 --- a/contents/iterate-through-a-hashmap.md +++ b/contents/iterate-through-a-hashmap.md @@ -1,6 +1,6 @@ # HashMap遍历 # -在Java中有多种遍历HashMAp的方法。让我们回顾一下最常见的方法和它们各自的优缺点。由于所有的Map都实现了Map接口,所以接下来方法适用于所有Map(如:HaspMap,TreeMap,LinkedMap,HashTable,etc) +在Java中有多种遍历HashMap的方法。让我们回顾一下最常见的方法和它们各自的优缺点。由于所有的Map都实现了Map接口,所以接下来方法适用于所有Map(如:HaspMap,TreeMap,LinkedMap,HashTable,etc) ## 方法#1 使用For-Each迭代entries ## @@ -74,4 +74,4 @@ 如果你只需要使用key或者value使用方法#2,如果你坚持使用java的老版本(java 5 以前的版本)或者打算在迭代的时候移除entries,使用方法#3。其他情况请使用#1方法。避免使用#4方法。 stackoverflow链接: -http://stackoverflow.com/questions/1066589/iterate-through-a-hashmap \ No newline at end of file +http://stackoverflow.com/questions/1066589/iterate-through-a-hashmap diff --git a/contents/java-operator.md b/contents/java-operator.md index cee3e03..ab967cc 100644 --- a/contents/java-operator.md +++ b/contents/java-operator.md @@ -1,6 +1,6 @@ -##Java += 操作符实质 +## Java += 操作符实质 -###问题 +### 问题 我之前以为: i += j 等同于 i = i + j; 但假设有: @@ -11,7 +11,7 @@ long j = 8; 这时 i = i + j 不能编译,但 i += j 却可以编译。这说明两者还是有差别的 这是否意味着,i += j,实际是等同于 i= (type of i) (i + j)呢? -###回答 +### 回答 这个问题,其实官方文档中已经解答了。 请看这里 [§15.26.2 Compound Assignment Operators](http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.26.2) diff --git a/contents/lookup-enum-by-string-value.md b/contents/lookup-enum-by-string-value.md index 160aafa..f1cb45a 100644 --- a/contents/lookup-enum-by-string-value.md +++ b/contents/lookup-enum-by-string-value.md @@ -1,18 +1,13 @@ -Java 中如何将 String 转换为 enum -======= +# Java 中如何将 String 转换为 enum -###问题 - -###我有一个 enum 类 - -``` java +### 问题 + enum 类 +```java public enum Blah { A, B, C, D } ``` -我想要找到一个 `String` 对应的 enum 值。例如, `"A"` 将是 `Blah.A`.如何做到? - -我需要使用 `Enum.valueOf()` 方法吗? 如果是该如何使用? +如何根据枚举类型的值(比如 "A" ) 得到 `Blah.A`? --- @@ -20,7 +15,8 @@ public enum Blah { 是的, `Blah.valueOf("A")` 将会给你 `Blah.A`. -静态方法 `valueof()` 和 `values()` 在编译时期被插入,并不存在于源码中。但是在Javadoc中;例如,[`Dialog.ModalityType`](http://docs.oracle.com/javase/7/docs/api/java/awt/Dialog.ModalityType.html "Dialog.ModalityType")中显示了这两个方法。 +静态方法 `valueof()` 和 `values()` 在编译时期被插入,并不存在于源码中。 +但是在Javadoc中会显示;例如,[`Dialog.ModalityType`](http://docs.oracle.com/javase/7/docs/api/java/awt/Dialog.ModalityType.html "Dialog.ModalityType")中显示了这两个方法。 ### A2 @@ -80,7 +76,7 @@ public static > T getEnumFromString(Class c, String string) return null; } ``` -之后,在我的enum类中通常如此使用来减少打字: +之后,在我的enum类中通常如此使用来减少代码量: ``` java public static MyEnum fromString(String name) { return getEnumFromString(MyEnum.class, name); @@ -91,8 +87,8 @@ public static MyEnum fromString(String name) { _评论区对于答主的异常处理一片指责 -译者注_ -###A4 -如果你不想编写自己的工具类,可以使用 Google的 `guava` 库: +### A4 +如果你不想编写自己的工具类,可以使用 Google的 [Google guava](https://github.com/google/guava) 库: ``` java Enums.getIfPresent(Blah.class, "A") ``` @@ -100,8 +96,11 @@ Enums.getIfPresent(Blah.class, "A") _完整方法签名 `Optional getIfPresent(Class enumClass, String value)` , `Optional` 对象可以优雅的解决null值问题 -译者注_ +> 注意: 返回的是 `Google Optional` 而不是 `Java Optional` + --- _其他的答案都大同小异,感兴趣的可以看原帖_ stackoverflow链接 -http://stackoverflow.com/questions/604424/lookup-enum-by-string-value -_译者:[MagicWolf](https://github.com/DaiDongLiang)_ +[Lookup enum by string value +](https://stackoverflow.com/questions/604424/lookup-enum-by-string-value) +_译者:[MagicWolf](https://github.com/DaiDongLiang)_ \ No newline at end of file diff --git a/contents/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips.md b/contents/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips.md new file mode 100644 index 0000000..723403f --- /dev/null +++ b/contents/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips.md @@ -0,0 +1,35 @@ + +##问题 +大多数情况下,当我重新导入项目到eclipse的时候,我重写的方法都不能被正确格式化,导致这样的错误: +> The method must override a superclass method. + +需要说明的是这是一个Android项目,不知道什么原因,方法的参数被篡改了,因此,我不得不手动的把他们改回来。 +例如: +```java +list.setOnCreateContextMenuListener(new OnCreateContextMenuListener() { + //这儿的参数名是正确的 + public void onCreateContextMenu(ContextMenu menu, View v, + ContextMenuInfo menuInfo) { + } +}); +``` +初始化的时候被篡改成了这样: +```java +list.setOnCreateContextMenuListener(new OnCreateContextMenuListener() { + //这儿的参数被篡改成了这样 + public void onCreateContextMenu(ContextMenu arg1, View arg2, + ContextMenuInfo arg3) { + } +}); +``` +奇怪的是,如果我移除我的代码并使用eclipse自动创建方法的话,它还是会是相同的参数(被篡改的)。因此,我真不知道那儿的问题,它本应该自动格式化代码的。 +要是手动的去修改被篡改的参数名,那是一个非常痛苦的过程。要是有人能解释为什么会出现这样的情况以及怎样去解决它,我感激不尽。 +是不是因为我格式化的这个方法,是另一个方法里面的参数而导致的这样的问题呢? + +##回答 +Eclipse的默认执行环境是java 1.5况且你使用了类的声明接口方法(在java 1.6中能使用@Ovrride注释,但是在java 1.5中一个方法只能重写父类的方法) + +打开你的项目,然后找到preference并且设置java的编译版本为1.6,同时也确保你的eclipse是使用JRE 1.6 来执行你的程序的。 + +Stack Overflow原地址:http://stackoverflow.com/questions/1678122/must-override-a-superclass-method-errors-after-importing-a-project-into-eclips + diff --git a/contents/proper-use-cases-for-android-usermanager-isuseragoat.md b/contents/proper-use-cases-for-android-usermanager-isuseragoat.md new file mode 100644 index 0000000..06301bd --- /dev/null +++ b/contents/proper-use-cases-for-android-usermanager-isuseragoat.md @@ -0,0 +1,38 @@ +##安卓中"UserManger.isUserAGoat()"的合适案例? + +###问题描述: +我正在看在安卓4.2里介绍的新API。当看到"UserManger"类时,我遇到了如下的"method": +public boolean isUserAGoat() +Used to determine whether the user making this call is subject to teleportations. + +Returns whether the user making this call is a goat. +这个应该怎样使用和什么时候使用? + +###回答: +根据他们的资料,在API21前,这个"method"用来返回"false" +/** + * Used to determine whether the user making this call is subject to + * teleportations. + * @return whether the user making this call is a goat + */ +public boolean isUserAGoat() { + return false; +} +看起来这个"method"对我们开发者没有真正的用途。一些人之前认为它可能是个复活节彩蛋。 +再次编辑: +在API21它改为判断是否存在有包"com.coffeestainstudios.goatsimulator"的已安装app。 +/** + * Used to determine whether the user making this call is subject to + * teleportations. + * + *

As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method can + * now automatically identify goats using advanced goat recognition technology.

+ * + * @return Returns true if the user making this call is a goat. + */ +public boolean isUserAGoat() { + return mContext.getPackageManager() + .isPackageAvailable("com.coffeestainstudios.goatsimulator"); +} + +[stackoverflow链接:Proper use cases for Android UserManager.isUserAGoat()](http://stackoverflow.com/questions/13375357/proper-use-cases-for-android-usermanager-isuseragoat) diff --git a/contents/setting-multiple-jars-in-java-classpath.md b/contents/setting-multiple-jars-in-java-classpath.md new file mode 100644 index 0000000..e87a69b --- /dev/null +++ b/contents/setting-multiple-jars-in-java-classpath.md @@ -0,0 +1,40 @@ +##如何在classpath中设置多个jar包? + +###问题 +是否有一个方法可以在classpath选项中包含一个文件夹(目录)下的所有jar包? +我尝试运行`java -classpath lib/*.jar:. my.package.Program`,但是无法找到相应的类文件,可是这些类文件确实存在于命令中的jar包中。我是否需要在classpath中分别指定所有的jar包? + +###回答 +在使用Java6或者以上版本时,classpath选项可以支持通配符(wildcards)。使用方法如下: +* 使用直接引用(`"`) +* 使用 `*` 而不是 `*.jar` + +**Windows平台** + +`java -cp "Test.jar;lib/*" my.package.MainClass` + +**Unix平台** + +`java -cp "Test.jar:lib/*" my.package.MainClass` + +Unix平台与Windows平台基本一样,除了使用冒号 `:` 替代分号 `;` 之外。如果你不能使用通配符,也可以使用`bash`完成上述功能,命令如下(其中lib是一个包含所有jar包的目录): +`java -cp $(echo lib/*.jar | tr ' ' ':')` + +注意事项:classpath选项与-jar选项并不能兼容。可以查看:[Execute jar file with multiple classpath libraries from command prompt](http://stackoverflow.com/questions/13018100/execute-jar-file-with-multiple-classpath-libraries-from-command-prompt) + +**对于通配符的理解** +来自[Classpath](http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html)文档: + +类路径可以包含一个基本文件名通配符`*`,其等价于指定一个特定目录下的所有以.jar或.JAR为后缀的文件的列表。例如,一个类路径的条目为`foo/*`,其指定了foo目录下的所有jar文件。一个仅仅包含`*`的classpath条目(entry)指定了当前目录下的所有jar包。 + +一个包含了`*`的classpath条目不能匹配特定目录下的class文件。为了既能匹配foo目录下的类文件,也能匹配jar包,可以使用`foo;foo/*`或`foo/*;foo`。对于前者而言,类文件和资源选择的顺序先是foo目录下的类文件和资源,之后才是jar包;而后者则正好相反。 + +通配符并不能递归地搜索子目录下的jar包。例如,`foo/*`只找`foo`目录下的jar包,而不会寻找`foo/bar`,`foo/baz`等目录下的jar包。 + +一个目录中的jar包枚举顺序并不固定,这不仅和平台有关,甚至可能会在同一个机器上因为时间不同而表现不同。一个结构良好(well-constructed)的应用不应该依赖于某个特定的顺序。如果特定顺序是不可避免的时候,就需要在classpath中显示枚举所有的jar包了。 + +在类加载进程中,通配符的扩展在早期完成,优先于程序main函数的调用,而不是在其后。每个包含通配符的类路径都被替换为所在目录下所有jar包的序列。例如,如果目录`foo`包含`a.jar`,`b.jar`以及`c.jar`,因此类路径`foo/*`被扩展为`foo/a.jar;foo/b.jar;foo/c.jar`,并且以上字符串被作为系统属性`java.class.path`的值。 + +环境变量`CLASSPATH`与命令行选项-classpath或者-cp并没有什么不同。也就是说,通配符既可以应用于命令行`-classpath/-cp`选项中,也可以应用于环境变量`CLASSPATH`中。 + +stackoverflow原地址:http://stackoverflow.com/questions/219585/setting-multiple-jars-in-java-classpath \ No newline at end of file diff --git a/contents/sort-arraylist-of-custom-objects-by-property.md b/contents/sort-arraylist-of-custom-objects-by-property.md new file mode 100644 index 0000000..5c279a4 --- /dev/null +++ b/contents/sort-arraylist-of-custom-objects-by-property.md @@ -0,0 +1,75 @@ + + +##通过对象属性对常规对象的ArrayList进行排序 + +###问题 +我读过使用Comparator对常规类的ArrayList进行排序的示例,但是它们大多数使用comparedTo(),据我了解这是一个对字符串进行操作的方法。 +我想要对一个由常规对象构成的ArrayList,通过它的属性(一个Date对象,getStartDate())对ArrayList进行排序。通常情况下我这样比较它们: +```java +item1.getStartDate().before(item2.getStartDate()) +``` +所以我能不能像下面一样: +```java +public class CustomComparator { + public boolean compare(Object object1, Object object2) { + return object1.getStartDate().before(object2.getStartDate()); + } +} + +public class RandomName { + ... + Collections.sort(Database.arrayList, new CustomComparator); + ... +} +``` + +###回答 + 以前Date声明了Comparable,它有一个像处理字符串操作那样的compareTo方法。因此你可以这样: +```java +public class CustomComparator implements Comparator { + @Override + public int compare(MyObject o1, MyObject o2) { + return o1.getStartDate().compareTo(o2.getStartDate()); + } +} +``` +这儿的compare()方法必须返回int,所以不能像你预期那样直接返回boolean. +你的代码看起来应该是这样: +```java +Collections.sort(Database.arrayList, new CustomComparator()); +``` +如果你不需要重复使用comparetor的话,一种简单的方法是,把它写成一个内部类的样子: +```java +Collections.sort(Database.arrayList, new Comparator() { + @Override + public int compare(MyObject o1, MyObject o2) { + return o1.getStartDate().compareTo(o2.getStartDate()); + } +}); +``` +自java8 开始,你可以使用lambda表达式一种简洁的方式来写Comparator() +```java +Collections.sort(Database.arrayList, + (o1, o2) -> o1.getStartDate().compareTo(o2.getStartDate())); +``` +并且List有一个sort(Comparator)方法,所以你可以进一步简化它 +```java + +Database.arrayList.sort((o1, o2) -> o1.getStartDate().compareTo(o2.getStartDate())); +``` +这是一种司空见惯的方法,使用Comparable为一个类创建一个Comprator +```java +Database.arrayList.sort(Comparator.comparing(MyObject::getStartDate)); +All of these are equivalent forms. +``` + +stackoverflow原地址:http://stackoverflow.com/questions/2784514/sort-arraylist-of-custom-objects-by-property + + + + + + + + + diff --git a/contents/what-exactly-is-apache-camel.md b/contents/what-exactly-is-apache-camel.md new file mode 100644 index 0000000..b2b3931 --- /dev/null +++ b/contents/what-exactly-is-apache-camel.md @@ -0,0 +1,36 @@ +### 问题描述 + +我不明白Camel到底是干什么的. +希望你能在101字以内介绍一下Camel: + 它到底是什么? + 如何在java中使用它? + 它是和服务器相关的么? + 它是一个独立的程序? +请解释一下Camel是什么. + +### 答案 +如果你有5-10分钟时间,我建议你读一下Jonathan Anstey关于Apache Camel的文章.这是一篇非常棒的文章,简要的介绍了一些Apache Camel的概念,以及用java实现了一个 +实例.Jonathan Anstey是这样描述的: +Apache Camel是一个开源的Java框架,其整合的目的主要是为了使开发人员更容易、方便的开发程序.它提供了如下内容: + +(1)所有被广泛使用的`企业集成模式`的具体实现(`EIPs`) + +(2)连接不同的数据传输和API + +(3)容易使用`领域特定语言(DSL)`建立EIPs和高效的数据传输 + +### 术语解析 + +`EIPs`:企业集成模式的简称,使用消息传递进行企业应用集成,比如消息中间件,将不同程序之间连接在一起. + +`DSL`:DSL编程又称为声明式编程,DSL是在模型之上建立的一种更加灵活的对模型化的理解和使用方式,通俗点说你只需要告诉程序你想要什么,不必每一步都指挥它如何 +执行,SQL语句就是其中的代表. + +### 通俗点讲 + +_Camel:将数据从一方获得,该数据可以是消息、文件流、JSON的多种形式的数据,然后处理,再发送,整合了多种数据获取、处理、发送方式,方便开发者使用_ + + +stackoverflow链接 +http://stackoverflow.com/questions/8845186/what-exactly-is-apache-camel +_译者:[王小过](https://github.com/whp1473)_ diff --git a/contents/why-does-math.round-(0.49999999999999994)-return-1.md b/contents/why-does-math.round-(0.49999999999999994)-return-1.md new file mode 100644 index 0000000..fb7bf35 --- /dev/null +++ b/contents/why-does-math.round-(0.49999999999999994)-return-1.md @@ -0,0 +1,92 @@ +##为什么Math.round(0.49999999999999994)返回1? + +###问题描述: + +在下面的程序中你可以看到每个稍微比.5小的值都被向下舍入了,除了`0.5`那个。 + +``` +for (int i = 10; i>= 0; i--) { + long l = Double.doubleToLongBits(i + 0.5); + double x; + do { + x = Double.longBitsToDouble(l); + System.out.println(x + " rounded is " + Math.round(x)); + l--; + } while (Math.round(x)> i); +} +``` +输出 +``` +10.5 rounded is 11 +10.499999999999998 rounded is 10 +9.5 rounded is 10 +9.499999999999998 rounded is 9 +8.5 rounded is 9 +8.499999999999998 rounded is 8 +7.5 rounded is 8 +7.499999999999999 rounded is 7 +6.5 rounded is 7 +6.499999999999999 rounded is 6 +5.5 rounded is 6 +5.499999999999999 rounded is 5 +4.5 rounded is 5 +4.499999999999999 rounded is 4 +3.5 rounded is 4 +3.4999999999999996 rounded is 3 +2.5 rounded is 3 +2.4999999999999996 rounded is 2 +1.5 rounded is 2 +1.4999999999999998 rounded is 1 +0.5 rounded is 1 +0.49999999999999994 rounded is 1 +0.4999999999999999 rounded is 0 +``` +我使用 Java 6 update 31。 + +###回答: + +**总结** + +在Java 6中(而且很可能更早),`round x`以`floor(x+0.5)`的方式执行[1]。这是一个规则上的bug,它恰好会导致这样一种不合道理的情况[2]。Java 7不再授权这种分离的执行方式[3]。 + +**问题** + +0.5+0.49999999999999994在双精度数中正好表示1: +``` +static void print(double d) { + System.out.printf("%016x\n", Double.doubleToLongBits(d)); +} + +public static void main(String args[]) { + double a = 0.5; + double b = 0.49999999999999994; + + print(a); // 3fe0000000000000 + print(b); // 3fdfffffffffffff + print(a+b); // 3ff0000000000000 + print(1.0); // 3ff0000000000000 +} +``` +这是因为0.49999999999999994有一个比0.5小的指数,所以它们相加时,它的尾数被移位了,ULP(ULP表示现有数值最后一位代表的最小数值单位,小于ULP的数值将无法累加到现有数值)变的更大。 + +**解决方法** + +从Java 7开始,OpenJDK(如下例)这样执行它(round函数)[4]。 +``` +public static long round(double a) { + if (a != 0x1.fffffffffffffp-2) // greatest double value less than 0.5 + return (long)floor(a + 0.5d); + else + return 0; +} +``` +[1] http://docs.oracle.com/javase/6/docs/api/java/lang/Math.html#round%28double%29 + +[2] http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6430675 (credits to @SimonNickerson for finding this) + +[3] http://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#round%28double%29 + +[4] http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7u40-b43/java/lang/Math.java#Math.round%28double%29 + + +[stackoverflow链接:Why does Math.round(0.49999999999999994) return 1?](http://stackoverflow.com/questions/9902968/why-does-math-round0-49999999999999994-return-1) diff --git a/contents/why-does-this-go-into-an-infinite-loop b/contents/why-does-this-go-into-an-infinite-loop deleted file mode 100644 index 33787a9..0000000 --- a/contents/why-does-this-go-into-an-infinite-loop +++ /dev/null @@ -1,2 +0,0 @@ -## 为什么它会进入死循环 - diff --git a/contents/why-is-printing-b-dramatically-slower-than-printing.md b/contents/why-is-printing-b-dramatically-slower-than-printing.md index 970dbde..4887753 100644 --- a/contents/why-is-printing-b-dramatically-slower-than-printing.md +++ b/contents/why-is-printing-b-dramatically-slower-than-printing.md @@ -1,114 +1,61 @@ -# 为什么打印"B"会明显的比打印"#"慢 - -## 问题 - -我生成了两个`1000`x`1000`的矩阵: - -第一个矩阵:`O`和`#`。 -第二个矩阵:`O`和`B`。 - -使用如下的代码,生成第一个矩阵需要8.52秒: - - Random r = new Random(); - for (int i = 0; i < 1000; i++) { - for (int j = 0; j < 1000; j++) { - if(r.nextInt(4) == 0) { - System.out.print("O"); - } else { - System.out.print("#"); - } - } - - System.out.println(""); - } - - -而使用这段代码,生成第二个矩阵花费了259.152秒: - - Random r = new Random(); - for (int i = 0; i < 1000; i++) { - for (int j = 0; j < 1000; j++) { - if(r.nextInt(4) == 0) { - System.out.print("O"); - } else { - System.out.print("B"); //only line changed - } +##为什么打印B要比打印#慢很多? + +###问题 +我生成了两个大小为 1000 * 1000 的矩阵 +第一个矩阵:O和# +第二个矩阵:O和B +使用以下代码,第一个矩阵仅用时8.25s就完成了: +```java +Random r = new Random(); +for (int i = 0; i < 1000; i++) { + for (int j = 0; j < 1000; j++) { + if(r.nextInt(4) == 0) { + System.out.print("O"); + } else { + System.out.print("#"); } - - System.out.println(""); } -如此大的运行时间差异的背后究竟是什么原因呢? - ---- - -正如评论中所建议的,只打印`System.out.print("#");`用时7.8871秒,而`System.out.print("B");`则给出`still printing...`。 - -另外有人指出这段代码对他们来说是正常的, 我使用了[Ideone.com](http://ideone.com),这两段代码的执行速度是相同的。 - -测试条件: - - - 我在Netbeans 7.2中运行测试,由控制台显示输出 - - 我使用了`System.nanoTime()`来计算时间 - -## 解答一 - -*纯粹的推测*是因为你使用的终端尝试使用[单词换行][1]而不是字符换行,并且它认为`B`是一个单词而`#`却不是。所以当它到达行尾并且寻找一个换行的地方的时候,如果是`#`就可以马上换行;而如果是`B`,它则需要花更长时间搜索,因为可能会有更多的内容才能换行(在某些终端会非常费时,比如说它会先输出退格再输出空格去覆盖被换行的那部分字符)。 - -但这都只是纯粹的推测。 - - - [1]: http://en.wikipedia.org/wiki/Word_wrap - - -##解答二 - -我用Eclipse和Netbeans 8.0.2做了测试,他们的Java版本都是1.8;我用了`System.nanoTime()`来计时。 - -##Eclipse: - -我得到了**用时相同的结果** - 大约**1.564秒**。 - -##Netbeans: - -* 使用"#": **1.536秒** -* 使用"B": **44.164秒** - -所以看起来像是Netbeans输出到控制台的性能问题。 - -在做了更多研究以后我发现问题所在是Netbeans [换行][1] 的最大缓存(这并不限于`System.out.println`命令),参见以下代码: - - for (int i = 0; i < 1000; i++) { - long t1 = System.nanoTime(); - System.out.print("BBB......BBB"); \\<-contain 1000 "B" - long t2 = System.nanoTime(); - System.out.println(t2-t1); - System.out.println(""); + System.out.println(""); + } +```` +而使用相同的代码时,第二个矩阵却执行了259.152s +````java +Random r = new Random(); +for (int i = 0; i < 1000; i++) { + for (int j = 0; j < 1000; j++) { + if(r.nextInt(4) == 0) { + System.out.print("O"); + } else { + System.out.print("B"); + } } -每一个循环所花费的时间都不到1毫秒,除了 **每第五个循环**会花掉大约225毫秒。像这样(单位是毫秒): - - BBB...31744 - BBB...31744 - BBB...31744 - BBB...31744 - BBB...226365807 - BBB...31744 - BBB...31744 - BBB...31744 - BBB...31744 - BBB...226365807 - . - . - . - -以此类推。 - -##总结: - -1. 使用Eclipse打印"B"完全没有问题 -1. Netbeans有换行的问题但是可以被解决(因为在Eclipse并没有这个问题)(而不用在B后面添加空格("B "))。 - - [1]: http://en.wikipedia.org/wiki/Line_wrap_and_word_wrap - -stackoverflow原址:http://stackoverflow.com/questions/21947452/why-is-printing-b-dramatically-slower-than-printing + System.out.println(""); + } +```` +为什么两者的执行时间会有如此巨大的差距? +- - - +评论中一些人建议仅执行`System.out.print("#");`以及`System.out.print("B");`前者用时7.8871s,而后者仍然在打印(即花费时间过多--译者注) +另外有些人指出在他们那里工作正常(即两者花费时间差不错--译者注),我在[Ideone.com](http://ideone.com/)环境中运行两段代码,执行时间也差不多。 + +测试条件: +- Netbeans 7.2,结果输出在IDE的控制台 +- 使用`System.nanoTime()`度量时间 + +###回答 +纯推测:你正在使用的终端试图进行["自动换行"(word-wrapping)](http://en.wikipedia.org/wiki/Word_wrap),而不是"字符换行"(character-wrapping),并且将'B'视为一个单词字符(word character),而'#'视为一个非单词字符(non-word character)。因此当输出到达行尾时,控制台搜索一个位置用来换行,当遇到'#'时可以立即执行换行;然而遇到'B'时,控制台必须继续搜索,并且可能有更多的字符需要换行(这个操作在一些控制台上可能花销很大,例如,输出退格,然后输出空白字符来覆盖那些需要被换行的字符)。 +但是,这仅仅是理论推测。 + +**译者注:** +对于"word-wrapping"和"character-wrapping",我的理解是,它们的区别在于换行时是否在一个单词内部分割,例如在 charac-ter 中的-处换行,"word-wrapping"会将character全部移到下一行,而"character-wrapping"则将ter移到下一行,而charac依旧在原来的位置。 +**word-wrapping** +``` +******* +character +``` +**character-wrapping** +``` +*******charac +ter +``` \ No newline at end of file diff --git "a/345円244円207円345円277円230円.md" "b/345円244円207円345円277円230円.md" deleted file mode 100644 index c2e3070..0000000 --- "a/345円244円207円345円277円230円.md" +++ /dev/null @@ -1 +0,0 @@ -就是不行了

AltStyle によって変換されたページ (->オリジナル) /