Compare commits
1 Commits
main
...
protocol-b
Author | SHA1 | Date | |
---|---|---|---|
|
aa03df06cf |
7
.idea/codeStyles/Project.xml
generated
Normal file
7
.idea/codeStyles/Project.xml
generated
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<ScalaCodeStyleSettings>
|
||||||
|
<option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
|
||||||
|
</ScalaCodeStyleSettings>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
|
</state>
|
||||||
|
</component>
|
6
.idea/thriftCompiler.xml
generated
6
.idea/thriftCompiler.xml
generated
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ThriftCompiler">
|
|
||||||
<compilers />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
41
CONTACT.md
41
CONTACT.md
@ -1,40 +1,23 @@
|
|||||||
# 联系方式
|
# 联系方式和公众平台
|
||||||
|
欢迎您能够参与我们的项目并且帮助我们变得更好,如果您有任何问题,通过下面的联系方式与管理员取得联系。
|
||||||
|
|
||||||
请使用下面的联系方式和我们联系:
|
我们建议您通过社区论坛来和我们进行沟通,敬请关注我们公众平台上的账号。
|
||||||
|
|
||||||
| 联系方式名称 | 联系方式 |
|
## 联系方式
|
||||||
|--------|-----------------------------------------------|
|
您可以通过下面的联系方式与我们取得联系。
|
||||||
| 电子邮件 | [service@ossez.com](mailto:service@ossez.com) |
|
|
||||||
| QQ 或微信 | 103899765 |
|
|
||||||
| 社区论坛 | https://www.ossez.com/c/open-source/java/15 |
|
|
||||||
|
|
||||||
# 公众平台
|
| 联系方式名称 | 联系方式 |
|
||||||
|
|---|---|
|
||||||
|
| 管理员电子邮件 | [yuchenghu@ossez.com](mailto:yuchenghu@ossez.com) |
|
||||||
|
| 管理员微信(QQ 同号) | 103899765 |
|
||||||
|
| QQ 交流群 | 15186112 |
|
||||||
|
| 社区论坛 | [https://www.ossez.com/](https://www.ossez.com/) |
|
||||||
|
|
||||||
我们建议您通过社区论坛来和我们进行沟通,请关注我们公众平台上的账号。
|
|
||||||
|
|
||||||
扫描 QR 关注我们的微信公众号和头条号。
|
|
||||||
|
|
||||||
## 微信公众号
|
## 微信公众号
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 头条号
|
## 头条号
|
||||||
|
我们也在头条号上创建了我们的公众号,请扫描下面的 QR 关注我们的头条号。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 知乎
|
|
||||||
|
|
||||||
请关注我们的知乎:https://www.zhihu.com/people/huyuchengus
|
|
||||||
|
|
||||||
## 快速导航
|
|
||||||
|
|
||||||
在下面的表格中,我们列出了一些比较有用的 CWIKIUS 相关软件开发使用教程的导航,欢迎访问下面的链接获得更多的内容和参与讨论
|
|
||||||
|
|
||||||
| 网站名称 | URL | NOTE |
|
|
||||||
|----------------|--------------------------------------------------------|----------------------------|
|
|
||||||
| OSSEZ 社区 | [www.ossez.com](https://www.ossez.com/) | 开放社区,欢迎注册参与讨论 |
|
|
||||||
| WIKI 维基 | [www.cwiki.us](https://www.cwiki.us/) | 使用 Confluence 部署的 WIKI 知识库 |
|
|
||||||
| DOCS.OSSEZ.COM | [https://docs.ossez.com/#/](https://docs.ossez.com/#/) | 本手册的编译版本将会部署在这个链接上 |
|
|
||||||
| CN 博客 | [http://www.cwikius.cn/](http://www.cwikius.cn/) | CWIKIUS.CN 一个有独立思考和温度的清新站 |
|
|
||||||
|
|
||||||
##
|
|
214
LICENSE
214
LICENSE
@ -1,21 +1,201 @@
|
|||||||
MIT License
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
Copyright (c) 2022 OSSEZ.COM
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1. Definitions.
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
copies or substantial portions of the Software.
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
the copyright owner that is granting the License.
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
other entities that control, are controlled by, or are under common
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
control with that entity. For the purposes of this definition,
|
||||||
SOFTWARE.
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
51
README.md
51
README.md
@ -1,36 +1,30 @@
|
|||||||
# CWIKIUS 文档和手册
|
# CWIKIUS 文档和手册
|
||||||
|
|
||||||
欢迎来到 CWIKIUS 文档和手册的空间
|
欢迎来到 CWIKIUS 文档和手册的空间
|
||||||
|
|
||||||
GitHub 上有关 CWIKIUS 的项目:[https://src.ossez.com/honeymoose/Framework-Docsify](https://src.ossez.com/honeymoose/Framework-Docsify)
|
GitHub 上有关 CWIKIUS 的项目:[https://github.com/cwiki-us-docs/cwikius-docs](https://github.com/cwiki-us-docs/cwikius-docs)
|
||||||
|
|
||||||
[联系我们](CONTACT.md ':include')
|
|
||||||
|
|
||||||
## 如何本地运行
|
如果您有兴趣参与我们的小组和项目,请使用下面的联系方式和我们联系:
|
||||||
本项目使用 docsify 进行构建。
|
|
||||||
|
|
||||||
### 安装 docsify
|
| 联系方式名称 | 联系方式 |
|
||||||
如果你的本地计算机中没有安装 docsify, 请运行命令行 `npm i docsify-cli -g` 来进行安装。
|
|---|---|
|
||||||
|
| 电子邮件 | [service@ossez.com](mailto:service@ossez.com) |
|
||||||
|
| QQ 或微信 | 103899765 |
|
||||||
|
| QQ 交流群 Spring | 15186112 |
|
||||||
|
| 社区论坛 | [https://www.ossez.com/](https://www.ossez.com/) |
|
||||||
|
|
||||||
### 版本检查
|
## 公众平台
|
||||||
运行命令 `docsify -version` 来进行版本和环境检查,如果你能看到下面的内容,则说明已经安装成功了。
|
我们建议您通过社区论坛来和我们进行沟通,请关注我们公众平台上的账号
|
||||||
|
|
||||||
```text
|
### 微信公众号
|
||||||
docsify-cli version:
|

|
||||||
4.4.3
|
|
||||||
```
|
|
||||||
|
|
||||||
### 本地运行 docsify
|
### 头条号
|
||||||
在你的本地计算机终端中运行命令 `docsify serve ./` 后,你的控制台将会看到有余下的输出:
|
我们也在头条号上创建了我们的公众号,请扫描下面的 QR 关注我们的头条号。
|
||||||
|
|
||||||
```text
|

|
||||||
PS D:\WorkDir\Repository\honeymoose\Framework-Docsify> docsify serve ./
|
|
||||||
|
|
||||||
Serving D:\WorkDir\Repository\honeymoose\Framework-Docsify now.
|
|
||||||
Listening at http://localhost:3000
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
访问使用的默认端口是 3000,随后你可以通过浏览器进行访问。
|
|
||||||
|
|
||||||
## CWIKIUS 文档和手册快速导航
|
## CWIKIUS 文档和手册快速导航
|
||||||
|
|
||||||
@ -43,19 +37,6 @@ Listening at http://localhost:3000
|
|||||||
| [github.io](https://cwiki-us-docs.github.io/cwikius-docs/#/) | [https://cwiki-us-docs.github.io/cwikius-docs/#/](https://cwiki-us-docs.github.io/cwikius-docs/#/) | 本手册的编译版本将会部署在这个链接上 |
|
| [github.io](https://cwiki-us-docs.github.io/cwikius-docs/#/) | [https://cwiki-us-docs.github.io/cwikius-docs/#/](https://cwiki-us-docs.github.io/cwikius-docs/#/) | 本手册的编译版本将会部署在这个链接上 |
|
||||||
| WWW.CWIKIUS.CN | [http://www.cwikius.cn/](http://www.cwikius.cn/) | CWIKIUS.CN 一个有独立思考和温度的清新站 |
|
| WWW.CWIKIUS.CN | [http://www.cwikius.cn/](http://www.cwikius.cn/) | CWIKIUS.CN 一个有独立思考和温度的清新站 |
|
||||||
|
|
||||||
### 前端和 UI
|
|
||||||
| 网站名称 | URL | NOTE |
|
|
||||||
|---|---|---|
|
|
||||||
| 前端端技术社区 | https://www.ossez.com/c/toolkit-algorithm-computer-science/web-front-end/26 | 计算机相关的前端框架和讨论 |
|
|
||||||
| Angular 技术手册 | https://angular.ossez.com/ | Angular 手册的在线翻译版本,从源代码中进行编译 |
|
|
||||||
|
|
||||||
|
|
||||||
### 后端和数据层
|
|
||||||
| 网站名称 | URL | NOTE |
|
|
||||||
|---|---|---|
|
|
||||||
| Apache Druid 技术手册 | https://druid.ossez.com/ | Druid 手册的在线翻译版本 |
|
|
||||||
|
|
||||||
|
|
||||||
### 容器 docker
|
### 容器 docker
|
||||||
| 网站名称 | URL | NOTE |
|
| 网站名称 | URL | NOTE |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
15
_sidebar.md
15
_sidebar.md
@ -1,20 +1,15 @@
|
|||||||
- CWIKIUS 文档概述
|
- CWIKIUS 文档概述
|
||||||
- [文档介绍和快速链接](README.md)
|
- [文档介绍和快速链接](README.md)
|
||||||
- [联系方式](CONTACT.md)
|
- [公众平台](CONTACT.md)
|
||||||
|
|
||||||
- Java
|
- Java
|
||||||
- [概述和环境配置](java/index.md)
|
- [spring](spring.md)
|
||||||
- [语言基础](java/fundamentals/index.md)
|
- [Gradle](gradle.md)
|
||||||
- [核心编程](java/core/index.md)
|
|
||||||
|
|
||||||
- 其他小工具
|
- 其他小工具
|
||||||
- [JWT](jwt/README.md)
|
- [JWT](jwt/README.md)
|
||||||
- [MessagePack](message-pack/index.md)
|
- [MessagePack](message-pack/index.md)
|
||||||
- [Discourse](discourse/index.md)
|
- [Protocol Buffers](protocol-buffers/index.md)
|
||||||
|
|
||||||
- 面试和算法
|
- [Awesome docsify](awesome.md)
|
||||||
- [面试问题和经验](interview/index.md)
|
|
||||||
- [算法题](algorithm/index.md)
|
|
||||||
|
|
||||||
- [DOCS.OSSEZ.COM](https://docs.ossez.com/#/)
|
|
||||||
- [Changelog](changelog.md)
|
- [Changelog](changelog.md)
|
@ -1,19 +0,0 @@
|
|||||||
# 算法
|
|
||||||
在应聘技术岗位的时候,可能都会有一个让绝大部分人都比较讨厌的算法环节。
|
|
||||||
|
|
||||||
也不知道是谁搞出这么无聊的东西,但没有办法现实总是残酷的,在抱怨的同时也只能在找工作之前复习下这些在实际工作中基本上不用的算法题了。
|
|
||||||
|
|
||||||
因为 MD 文档格式的限制,所以我们在这里只放一个索引并且维护这个索引,有关的具体内容,请通过索引访问我们的社区进行查看,我们也非常欢迎您参与讨论,
|
|
||||||
您可以在社区注册后进行讨论。
|
|
||||||
|
|
||||||
## 算法问题
|
|
||||||
在这里我将按照我遇到算法问题的先后顺序进行排列。很多算法题目都是题库上面的原题,你可以到题库上面去找找。
|
|
||||||
|
|
||||||
我这里只是结合我在面试的时候遇到的题目来进行解答和进行一些点评,就当时总结和消遣吧,如果你希望有什么问题一起讨论的话,欢迎 Fork 这个项目并且登录社区进行讨论。
|
|
||||||
|
|
||||||
最新的内容在最前面。
|
|
||||||
|
|
||||||
### 内容索引
|
|
||||||
* [A “word-wrap” functionality(一个字符串包裹函数)](https://www.ossez.com/t/a-word-wrap-functionality/13452)
|
|
||||||
* [Prime numbers from 1 to 100 (打印 100 以内的素数)](https://www.ossez.com/t/prime-numbers-from-1-to-100-100/13450)
|
|
||||||
|
|
@ -1,197 +0,0 @@
|
|||||||
# Discourse 文档
|
|
||||||
Discourse 文档是通过官方文档的整理翻译过来的,下面的内容与官方的内容基本一致。
|
|
||||||
|
|
||||||
针对中文环境下的时候,我们对遇到的一些问题发布到我们的讨论区中以方便大家快速导航访问:
|
|
||||||
|
|
||||||
- [Discourse CentOS 8 全新安装手册](https://www.ossez.com/t/discourse-centos-8/594) - 在 CentOS/RHEL 平台上全新安装 Discourse 的过程和命令。
|
|
||||||
|
|
||||||
- [Discourse 如何不使用 Let’s Encrypt 而使用 CA 签名的密钥进行安装](https://www.ossez.com/t/discourse-lets-encrypt-ca/552) - 使用你自己已有的 CA 秘钥进行安装。
|
|
||||||
|
|
||||||
- [Discourse 设置 GTM](https://www.ossez.com/t/discourse-gtm/13240) - 使用 Google 的标签管理器来插入需要的 JS 代码。
|
|
||||||
|
|
||||||
## 云平台安装
|
|
||||||
**在基于云平台的 Discourse 安装通常不会超过 30 分钟**,哪怕你没有任何有关 Rails 或 Linux shell 的知识都能够顺利完成安装。
|
|
||||||
下面我们是通过 [DigitalOcean][do] 服务提供商来进行安装测的,但是所有的安装步骤都能够在
|
|
||||||
所有兼容 **Docker** 的云计算平台上进行,同时也可以在本地的服务器上完成安装。
|
|
||||||
|
|
||||||
> 🔔 如果你连 30 分钟都没有的话?你可以联系 Discourse 社区来帮你完成安装,Discourse 社区将会收取一次性 $150 (美元)的费用。 [单击此处链接来对服务进行购买](https://www.literatecomputing.com/product/discourse-install/) 。
|
|
||||||
|
|
||||||
### 创建一个新的云服务器
|
|
||||||
|
|
||||||
创建一个你的新云服务器,例如:[DigitalOcean](https://www.digitalocean.com/?refcode=5fa48ac82415) ,当然你也可以使用其他平台提供的服务器。
|
|
||||||
|
|
||||||
- 默认配置 **当前版本的 LTS Ubuntu 操作系统** 能够很好的工作。最少,需要一个 64 位的 Linux 操作系统,并且这个操作系统的内核需要更新到最新的版本。
|
|
||||||
|
|
||||||
- 默认配置 **1 GB** 的内存针对小型的 Discourse 社区通常都能很好的运行。但我们推荐针对大型社区使用 2 GB 的内存。
|
|
||||||
|
|
||||||
- 默认配置 **New York** 数据中心针对北美和欧洲来说都是不错的地理分区,如果你的 Discourse 用户使用的对象多是其他地理位置的用户,那么你可以选择离你稍近的数据中心。
|
|
||||||
|
|
||||||
- 输入域名 `discourse.example.com` 来在 DigitalOcean 中创建一个 Droplet(Droplet 是 DigitalOcean 定义的服务器名称)。当然你也可以购买使用你自己的域名,通常 Discourse 的安装需要一个真实的域名,没有办法通过 IP 地址安装,所以我们建议你首先购买域名或者使用你已有域名的二级域名。
|
|
||||||
|
|
||||||
创建你的新 Droplet,这个过程就等于你在 DigitalOcean 上创建了一个服务器,也等同你在其他平台上面创建了一个 VPS 或者服务器。
|
|
||||||
当完成创建后,你将会收到一个电子邮件,这个电子邮件中有你的 Root 用户的密码。
|
|
||||||
但是我们建议你 [设置使用 SSH keys](https://www.google.com/search?q=digitalocean+ssh+keys) , 来增强你服务器访问的安全性。
|
|
||||||
|
|
||||||
### 访问你的云服务器
|
|
||||||
|
|
||||||
通过使用 IP 地址,并使用 SSH 来连接和访问你创建的服务器,或者针对 Windows 平台你可以安装 [Putty][put] 后运行下面的命令来进行连接:
|
|
||||||
|
|
||||||
ssh root@192.168.1.1
|
|
||||||
|
|
||||||
如果你没有配置 SSH Key 的话,你可以使用 DigitalOcean 发给你的电子邮件中包含的密码来进行登录,
|
|
||||||
或者使用你本地的 SSH Key 来进行连接。
|
|
||||||
|
|
||||||
### 安装 Docker / Git (可选的)
|
|
||||||
|
|
||||||
如果你希望使用你自己的 Docker 版本,你可以现在在你新设置的服务器上进行安装。
|
|
||||||
如果你的服务器上没有默认安装 Docker,那么 `discourse-setup` 将会自动为你从 get.docker.com 下载后进行安装。
|
|
||||||
|
|
||||||
### 安装 Discourse
|
|
||||||
|
|
||||||
从 [官方 Discourse Docker 镜像][dd] 仓库中克隆代码到本地计算机的 `/var/discourse` 目录。
|
|
||||||
|
|
||||||
sudo -s
|
|
||||||
git clone https://github.com/discourse/discourse_docker.git /var/discourse
|
|
||||||
cd /var/discourse
|
|
||||||
|
|
||||||
你只需要执行上面的命令即可,在 Discourse 安装的过程中需要 root 权限。
|
|
||||||
|
|
||||||
### 电子邮件
|
|
||||||
|
|
||||||
> ⚠️ **电子邮件系统在 Discourse 的用户创建过程中非常重要。**
|
|
||||||
> 如果你没有在安装 Discourse 之前创建电子邮件 SMTP 服务器,那么你安装的 Discourse 无法访问也无法登录(HAVE A BROKEN SITE)!
|
|
||||||
|
|
||||||
- 如果你已经有你自己的 SMTP 邮件服务器了,那么你就可以直接使用你已有的邮件服务器配置信息。
|
|
||||||
|
|
||||||
- 还有没有邮件服务器?请访问 [**Discourse 推荐使用的邮件服务器**][mailconfig].
|
|
||||||
|
|
||||||
- 为了确保你的邮件能够被正常投递,你必须在你的 DNS 中添加有效的 [SPF 和 DKIM 记录](https://www.google.com/search?q=spf+dkim) 。请访问你邮件服务提供商的文档如何设置这些信息。
|
|
||||||
|
|
||||||
根据我们实际使用的情况,Discourse 的安装**必须**配置可用的域名和邮件服务器,针对中国境内的情况,你可以使用阿里云或者腾讯云提供的企业邮箱。
|
|
||||||
通常我们建议你使用境外的邮件服务器,比如说 AWS 的 SES,或者 MailGun 都是不错的服务,你可能需要一张国际信用卡完成校验。
|
|
||||||
但这一步是必须的,否则你的的 Discourse 无法完成安装。
|
|
||||||
|
|
||||||
### 域名
|
|
||||||
|
|
||||||
> 🔔 Discourse 不能通过 IP 地址来工作,你必须拥有一个域名或者二级域名来进行安装,例如 `example.com` 。
|
|
||||||
|
|
||||||
- 如果你已经拥有一个域名了,那么可以选择任何一个二级域名来进行安装,例如 `discourse.example.com` 或 `talk.example.com` 或 `forum.example.com` 来安装你的 Discourse 实例。
|
|
||||||
|
|
||||||
- 还没有域名的话,你可以访问 [NameCheap](https://www.namecheap.com/domains/domain-name-search/) 网站来搜索你喜欢的域名,或者直接 Google 搜索 [great domain name registrars](https://www.google.com/search?q=best+domain+name+registrars) 来选择你喜欢的域名注册商。
|
|
||||||
|
|
||||||
- 你的 DNS 控制台应该是能够访问的,在你购买域名后,你还需要访问你的 DNS 配置来配置 DNS。针对你安装的 Discourse 网站,你需要通过你的 DNS 创建一个 [`A` 记录](https://support.dnsimple.com/articles/a-record/) ,这个 A 记录需要将你要安装的域名指向到一个特定的 IP 地址。这个 IP 地址通常为你在第一步购买的服务器 IP 地址。
|
|
||||||
|
|
||||||
### 编辑 Discourse 配置
|
|
||||||
|
|
||||||
通过下面的命令运行配置工具
|
|
||||||
|
|
||||||
./discourse-setup
|
|
||||||
|
|
||||||
你需要根据下面的提示配置所有参数:
|
|
||||||
|
|
||||||
Hostname for your Discourse? [discourse.example.com]:
|
|
||||||
Email address for admin account(s)? [me@example.com,you@example.com]:
|
|
||||||
SMTP server address? [smtp.example.com]:
|
|
||||||
SMTP port? [587]:
|
|
||||||
SMTP user name? [user@example.com]:
|
|
||||||
SMTP password? [pa$$word]:
|
|
||||||
Let's Encrypt account email? (ENTER to skip) [me@example.com]:
|
|
||||||
|
|
||||||
上面的输入数据将会为你的 Discourse 实例创建一个 `app.yml` 文件,这个文件将会在安装进行后对你的 Discourse 实例进行配置。
|
|
||||||
整个安装启动过程可能需要耗费 **2-8 分钟** 来为你的配置 Discourse。
|
|
||||||
如果在安装完成后你还需要对你的配置进行修改,你可以再次运行 `./discourse-setup` 命令(这个命令将会把已经存在的 `app.yml` 文件重新载入)。
|
|
||||||
或者你也可以手动直接编辑 `/containers/app.yml` 文件中的内容,然后再次运行 `./launcher rebuild app`,否则你的修改是不会生效的。
|
|
||||||
|
|
||||||
### 启动 Discourse
|
|
||||||
|
|
||||||
一旦初始化安装配置完成后,你的 Discourse 示例应该可以通过你配置的域名 `discourse.example.com` 在浏览器上进行访问。
|
|
||||||
|
|
||||||
<img src="https://cdn.ossez.com/discourse-uploads/optimized/2X/8/8db53b9128ec4fb74872bdb7c1231ff04d525218_2_616x500.png" width="650">
|
|
||||||
|
|
||||||
### 注册一个新的管理员账号
|
|
||||||
|
|
||||||
使用你再启动配置过程中输入的电子邮件地址来注册一个管理员账号。
|
|
||||||
|
|
||||||
<img src="https://cdn.ossez.com/discourse-uploads/original/2X/9/99476eac0ffa4aa3a923aa7ae864fedf546dab0a.png" width="650">
|
|
||||||
|
|
||||||
<img src="https://cdn.ossez.com/discourse-uploads/original/2X/5/58660d377a00d9797be8b74036ace9d0ebf57fff.png" width="650">
|
|
||||||
|
|
||||||
(如果你不能注册你的管理账号(Admin),请通过路径`/var/discourse/shared/standalone/log/rails/production.log` 检查日志,或者访问 [电子邮件问题检查列表](https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326) 。)
|
|
||||||
|
|
||||||
当你完成管理员账号的注册后,设置向导将会启动并指引你配置你的 Discourse 实例。
|
|
||||||
|
|
||||||
<img src="https://cdn.ossez.com/discourse-uploads/original/2X/9/944509dd0c049a2cec42d6108369fa5cf5d92d0d.png" width="650">
|
|
||||||
|
|
||||||
当完成所有的设置向导,你将会看到职员主题(Staff topics)和 **READ ME FIRST: Admin Quick Start Guide** 。
|
|
||||||
这个配置向导将会包含有针对后续配置的的一些建议和如何对你的 Discourse 安装实例进行自定义配置。
|
|
||||||
|
|
||||||
<img src="https://cdn.ossez.com/discourse-uploads/original/2X/8/8a60bc840705aaa1fc77b039a7babf77d6b4a10b.png" width="650">
|
|
||||||
|
|
||||||
### 安装后的维护
|
|
||||||
|
|
||||||
- 我们强烈建议打开你针对你操作系统的安全自动更新。在 Ubuntu 使用 `dpkg-reconfigure -plow unattended-upgrades` 命令。在 CentOS/RHEL,使用 [`yum-cron`](https://www.cyberciti.biz/faq/fedora-automatic-update-retrieval-installation-with-cron/) 包。
|
|
||||||
- 如果你使用的是密码登录你的操作系统,而不是使用 SSH Key 的话,请确保你使用强密码。在 Ubuntu 使用 `apt-get install libpam-cracklib` 包。我们推荐使用 `fail2ban` ,这个将会对 3 次登录失败的 IP 地址禁止登录 10 分钟。
|
|
||||||
- **Ubuntu**: `apt-get install fail2ban`
|
|
||||||
- **CentOS/RHEL**: `sudo yum install fail2ban` (需要 [EPEL](https://support.rackspace.com/how-to/install-epel-and-additional-repositories-on-centos-and-red-hat/))
|
|
||||||
- 如果你希望默认安装防火墙, 针对 Ubuntu [打开 ufw](https://meta.discourse.org/t/configure-a-firewall-for-discourse/20584) 或者针对 CentOS/RHEL 7 及其后续版本使用 `firewalld` 。
|
|
||||||
|
|
||||||
当 Discourse 有新版本更新的时候,你的邮件地址将会收到更新提示。
|
|
||||||
请随时更新你的 Discourse 实例到最新版本以确保所有的安全问题被修复。
|
|
||||||
要 **更新 Discourse 到最新的版本**,请通过你的浏览器访问 `/admin/upgrade` 然后单击更新按钮。
|
|
||||||
|
|
||||||
`/var/discourse` 目录中的 `launcher` 命令被用来使用一些系统级别的维护:
|
|
||||||
|
|
||||||
``` text
|
|
||||||
Usage: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
|
|
||||||
Commands:
|
|
||||||
start: Start/initialize a container(启动/初始化容器)
|
|
||||||
stop: Stop a running container(停止一个运行的容器)
|
|
||||||
restart: Restart a container(重启容器)
|
|
||||||
destroy: Stop and remove a container (停止然后删除一个容器)
|
|
||||||
enter: Use nsenter to get a shell into a container (使用 nsenter 来访问容器内的 Shell)
|
|
||||||
logs: View the Docker logs for a container(查看一个容器的日志)
|
|
||||||
bootstrap: Bootstrap a container for the config based on a template(从配置模板中来启动一个容器的配置和初始化)
|
|
||||||
rebuild: Rebuild a container (destroy old, bootstrap, start new)(重构一个容器,将会删除老的容器,初始一个容器,启动新的容器)
|
|
||||||
cleanup: Remove all containers that have stopped for > 24 hours(针对停止运行超过 24 个小时的容器进行删除)
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--skip-prereqs Don't check launcher prerequisites (不运行安装器的环境校验)
|
|
||||||
--docker-args Extra arguments to pass when running docker (传递给容器内的额外参数)
|
|
||||||
```
|
|
||||||
|
|
||||||
### 添加更多的 Discourse 特性
|
|
||||||
|
|
||||||
下面的内容是一些快速的链接,能够帮助你扩展 Discourse 安装的功能:
|
|
||||||
|
|
||||||
- Users to log in *only* via your pre-existing website's registration system? [Configure Single-Sign-On](https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045).
|
|
||||||
|
|
||||||
- 用户可以使用 [Google](https://www.ossez.com/t/discourse-google-google-login/13582), [Twitter](https://meta.discourse.org/t/configuring-twitter-login-for-discourse/13395), [GitHub](https://www.ossez.com/t/discourse-github/13562), or [Facebook](https://meta.discourse.org/t/configuring-facebook-login-for-discourse/13394) 进行注册登录。
|
|
||||||
|
|
||||||
- Users to post replies via email? [Configure reply via email](https://meta.discourse.org/t/set-up-reply-via-email-support/14003).
|
|
||||||
|
|
||||||
- Automatic daily backups? [Configure backups](https://meta.discourse.org/t/configure-automatic-backups-for-discourse/14855).
|
|
||||||
|
|
||||||
- Free HTTPS / SSL support? [Configure Let's Encrypt](https://meta.discourse.org/t/setting-up-lets-encrypt-cert-with-discourse-docker/40709). Paid HTTPS / SSL support? [Configure SSL](https://meta.discourse.org/t/allowing-ssl-for-your-discourse-docker-setup/13847).
|
|
||||||
|
|
||||||
- Use a plugin [from Discourse](https://github.com/discourse) or a third party? [Configure plugins](https://meta.discourse.org/t/install-a-plugin/19157)
|
|
||||||
|
|
||||||
- Multiple Discourse sites on the same server? [Configure multisite](https://meta.discourse.org/t/multisite-configuration-with-docker/14084).
|
|
||||||
|
|
||||||
- Webhooks when events happen in Discourse? [Configure webhooks](https://meta.discourse.org/t/setting-up-webhooks/49045).
|
|
||||||
|
|
||||||
- A Content Delivery Network to speed up worldwide access? [Configure a CDN](https://meta.discourse.org/t/enable-a-cdn-for-your-discourse/14857). We recommend [Fastly](http://www.fastly.com/).
|
|
||||||
|
|
||||||
- Import old content from vBulletin, PHPbb, Vanilla, Drupal, BBPress, etc? [See our open source importers](https://github.com/discourse/discourse/tree/main/script/import_scripts).
|
|
||||||
|
|
||||||
- A user friendly [offline page when rebuilding or upgrading?](https://meta.discourse.org/t/adding-an-offline-page-when-rebuilding/45238)
|
|
||||||
|
|
||||||
- To embed Discourse [in your WordPress install](https://github.com/discourse/wp-discourse), or [on your static HTML site](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963)?
|
|
||||||
|
|
||||||
Help us improve this guide! Feel free to ask about it on [meta.discourse.org][meta], or even better, submit a pull request.
|
|
||||||
|
|
||||||
[dd]: https://github.com/discourse/discourse_docker
|
|
||||||
[ssh]: https://help.github.com/articles/generating-ssh-keys
|
|
||||||
[meta]: https://meta.discourse.org
|
|
||||||
[do]: https://www.digitalocean.com/?refcode=5fa48ac82415
|
|
||||||
[put]: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
|
|
||||||
[mailconfig]: https://github.com/discourse/discourse/blob/main/docs/INSTALL-email.md
|
|
44
gradle.md
Normal file
44
gradle.md
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# CWIKIUS 文档和手册
|
||||||
|
|
||||||
|
欢迎来到 CWIKIUS 文档和手册的空间
|
||||||
|
|
||||||
|
GitHub 上有关 CWIKIUS 的项目:[https://github.com/cwiki-us-docs/cwikius-docs](https://github.com/cwiki-us-docs/cwikius-docs)
|
||||||
|
|
||||||
|
|
||||||
|
如果您有兴趣参与我们的小组和项目,请使用下面的联系方式和我们联系:
|
||||||
|
|
||||||
|
| 联系方式名称 | 联系方式 |
|
||||||
|
|---|---|
|
||||||
|
| 电子邮件 | [service@ossez.com](mailto:service@ossez.com) |
|
||||||
|
| QQ 或微信 | 103899765 |
|
||||||
|
| QQ 交流群 Spring | 15186112 |
|
||||||
|
| 社区论坛 | [https://www.ossez.com/](https://www.ossez.com/) |
|
||||||
|
|
||||||
|
## 公众平台
|
||||||
|
我们建议您通过社区论坛来和我们进行沟通,请关注我们公众平台上的账号
|
||||||
|
|
||||||
|
### 微信公众号
|
||||||
|

|
||||||
|
|
||||||
|
### 头条号
|
||||||
|
我们也在头条号上创建了我们的公众号,请扫描下面的 QR 关注我们的头条号。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
## CWIKIUS 文档和手册快速导航
|
||||||
|
|
||||||
|
在下面的表格中,我们列出了一些比较有用的 CWIKIUS 相关软件开发使用教程的导航,在我们文档的整理中,也参考了一些这些文档。
|
||||||
|
|
||||||
|
在这里对原作者表示感谢。
|
||||||
|
|
||||||
|
| 网站名称 | URL | NOTE |
|
||||||
|
|---|---|---|
|
||||||
|
| [github.io](https://cwiki-us-docs.github.io/cwikius-docs/#/) | [https://cwiki-us-docs.github.io/cwikius-docs/#/](https://cwiki-us-docs.github.io/cwikius-docs/#/) | 本手册的编译版本将会部署在这个链接上 |
|
||||||
|
| WWW.CWIKIUS.CN | [http://www.cwikius.cn/](http://www.cwikius.cn/) | CWIKIUS.CN 一个有独立思考和温度的清新站 |
|
||||||
|
|
||||||
|
### 容器 docker
|
||||||
|
| 网站名称 | URL | NOTE |
|
||||||
|
|---|---|---|
|
||||||
|
| Docker 手册中译在线版 | https://docker.ossez.com/ | 基于 Docker 容器英文手册的翻译版本|
|
||||||
|
| Docker 手册中译 MD 在线版 | https://docker-docs.ossez.com/ | 因为 Docker 的官方手册进行了渲染,我们推荐你使用上面的链接,这个版本为 docsify 渲染版本,可能会丢格式 |
|
18
index.html
18
index.html
@ -16,26 +16,14 @@
|
|||||||
<meta name="description" content="Description">
|
<meta name="description" content="Description">
|
||||||
<meta name="viewport"
|
<meta name="viewport"
|
||||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple.css">
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css">
|
||||||
<style>
|
|
||||||
:root {
|
|
||||||
/* Reduce the font size */
|
|
||||||
/* --base-font-size: 14px; */
|
|
||||||
/* Change the theme color hue (0-360) */
|
|
||||||
/* --theme-hue: 325; */
|
|
||||||
/* Add sidebar navigation bullets */
|
|
||||||
/* --sidebar-nav-link-before-content-l1: "😀"; */
|
|
||||||
/* --sidebar-nav-link-before-content-l2: "💩"; */
|
|
||||||
--link-color: var(--theme-color);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script>
|
<script>
|
||||||
window.$docsify = {
|
window.$docsify = {
|
||||||
name: 'CWIKIUS 文档手册 模板',
|
name: 'CWIKIUS 文档手册',
|
||||||
repo: 'https://src.ossez.com/honeymoose/Framework-Docsify',
|
repo: 'https://github.com/cwiki-us-docs/cwikius-docs',
|
||||||
executeScript: true,
|
executeScript: true,
|
||||||
loadNavbar: true,
|
loadNavbar: true,
|
||||||
mergeNavbar: true,
|
mergeNavbar: true,
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 9.9 KiB |
@ -1,28 +0,0 @@
|
|||||||
# 面试问题和经验文档
|
|
||||||
在应聘技术岗位的时候,通常会要求你进行一些算法和基础知识的考核。因计算机的知识比较复杂概念也非常多,这就给应聘者带来很大的困惑,应该怎么去做?
|
|
||||||
|
|
||||||
同时面试官很多时候也是突击某个问题,然后拿着这个问题来问应聘者。结果就导致了很多问题非常刁钻古怪,甚至有时候你根本就不可能在实际开发中遇到。
|
|
||||||
|
|
||||||
不管怎么样,这种面试方式至少目前来说是一种趋势,所以我们尽量收集一些技术岗的面试经验供大家参考。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
因为 MD 文档格式的限制,所以我们在这里只放一个索引并且维护这个索引,有关的具体内容,请通过索引访问我们的社区进行查看,我们也非常欢迎您参与讨论,
|
|
||||||
您可以在社区注册后进行讨论。
|
|
||||||
|
|
||||||
## 面试问题和经验索引
|
|
||||||
在这里我们希望按照年份进行一些分开,这样能够帮助大家尽量区分时间,同时我们的排序是按照倒序排列的。
|
|
||||||
|
|
||||||
最新的内容在最前面(按照时间倒序排序)。
|
|
||||||
|
|
||||||
### 2021
|
|
||||||
* [2021 疫情期间美国公司技术岗的面试流程](https://www.ossez.com/t/topic/13463)
|
|
||||||
* [从拒绝到被拒绝](https://www.ossez.com/t/topic/13462)
|
|
||||||
* [从一个工作到一个工作](https://www.ossez.com/t/topic/13461)
|
|
||||||
* [北美亚特兰大一金融服务公司面试总结](https://www.ossez.com/t/topic/13453)
|
|
||||||
* [北美一工作搜索引擎公司技术岗面经](https://www.ossez.com/t/topic/13451)
|
|
||||||
* [一房地产数据服务初创公司的面经](https://www.ossez.com/t/topic/13441)
|
|
||||||
|
|
||||||
### 2019
|
|
||||||
* [IT 技术岗位 2019 年北美求职流水账](https://www.ossez.com/t/it-2019/13433)
|
|
@ -1,2 +0,0 @@
|
|||||||
# 集合
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
# Annotation(注解)
|
|
||||||
* [Java @Deprecated Annotation(注解)](https://www.ossez.com/t/java-deprecated-annotation/13676)
|
|
||||||
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
# Java 核心编程
|
|
||||||
|
|
||||||
[Annotation(注解)](annotation.md ':include')
|
|
@ -1,2 +0,0 @@
|
|||||||
# 基本概念
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
# 数据类型
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
# 异常处理
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
# 语言基础
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
# I/O 操作
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
# 语言结构
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
# 方法和函数
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
# 反射
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
# Java 技术问题导航
|
|
||||||
Java 是由 Sun Microsystems 公司于1995年5月推出的Java面向对象程序设计语言和Java平台的总称(Java 1.0 [J2SE])。由James Gosling和同事们共同研发,并在1995年正式推出。
|
|
||||||
|
|
||||||
本页面中主要对 Java 使用的基础知识和配置的内容进行快速导航。
|
|
||||||
|
|
||||||
## 安装
|
|
||||||
* [Windows 环境下安装 Oracle JDK](https://www.ossez.com/t/windows-oracle-jdk/7254)
|
|
||||||
|
|
||||||
## 配置环境
|
|
||||||
* [Java 在 Windows 10 中配置环境变量](https://www.ossez.com/t/java-windows-10/13675)
|
|
@ -1,3 +0,0 @@
|
|||||||
# JVM
|
|
||||||
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
# 多线程
|
|
||||||
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
# 新特性
|
|
||||||
|
|
||||||
|
|
BIN
protocol-buffers/_images/protocol-buffers-logo.jpg
Normal file
BIN
protocol-buffers/_images/protocol-buffers-logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
protocol-buffers/_images/protocol-buffers-serialization.png
Normal file
BIN
protocol-buffers/_images/protocol-buffers-serialization.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
221
protocol-buffers/index.md
Normal file
221
protocol-buffers/index.md
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
# Protocol Buffers 文档
|
||||||
|
|
||||||
|
Protocol Buffers 相关文档的内容。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Protocol Buffers 简介
|
||||||
|
如果你在互联网上搜索的话,你可能会看到下面的说明文字。
|
||||||
|
|
||||||
|
Google Protocol Buffer( 简称 Protobuf) 是 Google 公司内部的混合语言数据标准,目前已经正在使用的有超过 48,162 种报文格式定义和超过 12,183 个 .proto 文件。
|
||||||
|
|
||||||
|
他们用于 RPC 系统和持续数据存储系统。
|
||||||
|
|
||||||
|
Protocol Buffers 是一种轻便高效的结构化数据存储格式,可以用于结构化数据串行化,或者说序列化。
|
||||||
|
|
||||||
|
它很适合做数据存储或 RPC 数据交换格式。可用于通讯协议、数据存储等领域的语言无关、平台无关、可扩展的序列化结构数据格式。
|
||||||
|
|
||||||
|
目前提供了 C++、Java、Python 三种语言的 API。
|
||||||
|
|
||||||
|
|
||||||
|
我们是在实际的数据处理的时候,需要使用 JSON 来序列化数据,但是又考虑到 JSON 在传输的时候数据过大,同时还有很多并不需要的垃圾文件。
|
||||||
|
我们才考虑到了 Protocol Buffer 提供的功能。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
# Protocol Buffers 开发者指南
|
||||||
|
|
||||||
|
欢迎来到 protocol buffers 的开发者指南。protocol buffers 是一个语言中立,平台中立针对通讯协议,数据存储和其他领域中对结构化数据进行序列化的扩展方法。
|
||||||
|
|
||||||
|
本文档主要针对的是 Java,C++ 或 Python 的开发人员希望在开发的应用程序中使用 Protocol Buffers。这个有关 Protocol Buffers 摘要性的介绍将会告诉你如何开始使用 Protocol Buffers。
|
||||||
|
如果你希望更加深入的了解有关 Protocol Buffers 的内容,你可以进入 tutorials 或者 protocol buffer encoding 页面来详细了解。
|
||||||
|
|
||||||
|
有关 API 的参考文档,请参考页面:reference documentation 这里提供了所有这 3 种语言的参考,同时也针对 .proto language 和 style 提供相关的指南。
|
||||||
|
|
||||||
|
## 什么是 Protocol Buffers
|
||||||
|
Protocol buffers 是对结构化数据序列化的一个灵活,高效,自动化工具 —— 你可以将 Protocol buffers 想象成 XML,但是体积更小,更快也更加简单。
|
||||||
|
|
||||||
|
你可以自己定义你的结构化数据,然后你可以使用特定的代码生成工具来非常容易对你的结构化数据进行读取和写入。这些数据的读取和写入可以是一系列的数据流和使用不同的计算机程序语言。
|
||||||
|
你甚至可以在不对已经部署的程序进行破坏的情况下更新你的数据结构。
|
||||||
|
|
||||||
|
## Protocol Buffers 是如何进行工作的
|
||||||
|
你需要制定你希望如何将你的数据进行序列化。你是通过 proto 文件来定义你的消息结构化数据的。
|
||||||
|
|
||||||
|
每一 protocol buffer message 是一个小的信息记录逻辑,这个消息中包含有一系列的名字,变量对照序列。
|
||||||
|
|
||||||
|
下面是一些基本的.proto 文件,这些文件中定义了一个消息,这个消息包含有一个 person 信息:
|
||||||
|
|
||||||
|
```
|
||||||
|
message Person {
|
||||||
|
required string name = 1;
|
||||||
|
required int32 id = 2;
|
||||||
|
optional string email = 3;
|
||||||
|
|
||||||
|
enum PhoneType {
|
||||||
|
MOBILE = 0;
|
||||||
|
HOME = 1;
|
||||||
|
WORK = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PhoneNumber {
|
||||||
|
required string number = 1;
|
||||||
|
optional PhoneType type = 2 [default = HOME];
|
||||||
|
}
|
||||||
|
|
||||||
|
repeated PhoneNumber phone = 4;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
通过上面你可以看到这个消息的格式非常简单—— 每一个消息类型都有一个或者多个唯一进行编号的字段,每一个字段包含有一个名字和变量类型。
|
||||||
|
|
||||||
|
变量可以为数字(整形或者浮点型)(numbers),布尔类型(booleans),字符串(strings),原生二进制(raw bytes)甚至其他的 protocol buffer 消息类型,能够允许你分级的结构化你的数据。
|
||||||
|
|
||||||
|
你可以将字段指定为可选字段(optional fields),必须字段(required fields)和重复字段(repeated fields)。你可以从下面的 Protocol Buffer Language Guide 页面中找到更多有关 .proto 的定义。
|
||||||
|
|
||||||
|
一旦你成功定义了你的消息,你可以针对你使用的语言使用你定义的 .proto 来运行 protocol buffer 编译器(protocol buffer compiler)来生成数据访问类。
|
||||||
|
|
||||||
|
针对每一个字段,在数据访问类中提供了简单的访问方法(例如 name() 和 set_name())和序列化到原生 2 进制数据和从原生 2 进制数据反序列化的方法。
|
||||||
|
|
||||||
|
针对上面的定义,如果你现在使用的是 C++ 语言的话,当你把消息定义进行编译后,你将会得到一个称为 Person 的类。对数据进行序列化和从序列化的数据中(protocol buffer 消息)重新获得 Person 数据。
|
||||||
|
|
||||||
|
然后你可以写一些类似 Person person; 的代码。
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
Person person;
|
||||||
|
person.set_name("John Doe");
|
||||||
|
person.set_id(1234);
|
||||||
|
person.set_email("jdoe@example.com");
|
||||||
|
fstream output("myfile", ios::out | ios::binary);
|
||||||
|
person.SerializeToOstream(&output);
|
||||||
|
```
|
||||||
|
|
||||||
|
随后,你可以对消息进行读取:
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
fstream input("myfile", ios::in | ios::binary);
|
||||||
|
Person person;
|
||||||
|
person.ParseFromIstream(&input);
|
||||||
|
cout << "Name: " << person.name() << endl;
|
||||||
|
cout << "E-mail: " << person.email() << endl;
|
||||||
|
```
|
||||||
|
|
||||||
|
你可以向你的消息中添加新的字段而不会损坏老的消息。这是因为在老的消息处理中,针对新的字段是完全忽略掉的。因此,如果你在你的通讯协议中使用 protocol buffers 为数据结构的话,
|
||||||
|
你可以对你的协议和消息进行扩展而不需要担心老的代码没有办法编译通过,或者损坏老的代码。
|
||||||
|
|
||||||
|
你可以访问 API Reference section 页面中的内容来了解完整 protocol buffer 代码的生成和使用。
|
||||||
|
|
||||||
|
你也可以在 Protocol Buffer Encoding 页面中了解更多protocol buffer 消息是如何进行编码的。
|
||||||
|
|
||||||
|
## 为什么不使用 XML
|
||||||
|
针对 XML 来说 Protocol Buffers 具有更多的优势来对序列化结构数据。
|
||||||
|
|
||||||
|
* 更加简单
|
||||||
|
* 小于 XML 3 到 10 倍
|
||||||
|
* 快于 XML 20 到 100 倍
|
||||||
|
* 松耦合
|
||||||
|
* 使用程序工具来创建数据访问类,使数访问类更加简单
|
||||||
|
* 假设,你需要讲 person 这个数据进行定义,在 XML 你需要使用:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<person>
|
||||||
|
<name>John Doe</name>
|
||||||
|
<email>jdoe@example.com</email>
|
||||||
|
</person>
|
||||||
|
```
|
||||||
|
来进行定义。
|
||||||
|
|
||||||
|
在 Protocol Buffers 中针对上面的消息文本化(text format)后显示为:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Textual representation of a protocol buffer.
|
||||||
|
# This is *not* the binary format used on the wire.
|
||||||
|
person {
|
||||||
|
name: "John Doe"
|
||||||
|
email: "jdoe@example.com"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
当上面的消息被编码为 Protocol Buffer 二进制格式(binary format)上面的文字可能小于 28 bytes,并且可能需要 100-200 纳秒(nanoseconds)来进行处理。
|
||||||
|
|
||||||
|
我们将上面转换为可以人为读取的目的主要是为进行调试和编辑。
|
||||||
|
|
||||||
|
如果你使用 XML 的话,上面的信息至少需要 69 bytes (你需要删除所有的空格),同时你需要 5,000-10,000 纳秒(nanoseconds)来进行处理。
|
||||||
|
|
||||||
|
同时,对 protocol buffer 进行操作也是非常容易的:
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
cout << "Name: " << person.name() << endl;
|
||||||
|
cout << "E-mail: " << person.email() << endl;
|
||||||
|
```
|
||||||
|
|
||||||
|
如果使用的是 XML 的话,你需要进行下面的操作:
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
cout << "Name: "
|
||||||
|
<< person.getElementsByTagName("name")->item(0)->innerText()
|
||||||
|
<< endl;
|
||||||
|
cout << "E-mail: "
|
||||||
|
<< person.getElementsByTagName("email")->item(0)->innerText()
|
||||||
|
<< endl;
|
||||||
|
```
|
||||||
|
|
||||||
|
但是,protocol buffers 并不是任何时候都会比 XML 好。例如,针对基于文本的标记语言(例如,XML),protocol buffers 就不是一个很好的选项,
|
||||||
|
因为你不能使用 protocol buffer 更好的在文档中进行交换。更主要的是 HTML 是人类可以阅读和编辑的。protocol buffer 也不是不可以人为的读取,但是针对原生的 protocol buffer 格式是没有办法人为进行读取和编辑的。
|
||||||
|
|
||||||
|
XML 与 HTML 一样,在某种程度上是一种自我描述数据。protocol buffer 只针对你在 .proto 文件中描述的内容进行表达。
|
||||||
|
|
||||||
|
## 看起来像一个解决方案,我应该如何开始呢
|
||||||
|
Download the package – 这包中含有针对 Java, Python, 和 C++ protocol buffer 编译器源代码,和你需要进行 I/O 和测试的类。希望对你的编译器进行编译和构建,请参考代码中的 README 文件。
|
||||||
|
|
||||||
|
一旦你完成了所有的设置,请参考 tutorial 页面中的内容来选择你需要的语言——这个能够帮助你使用 protocol buffer 创建一个简单的应用程序。
|
||||||
|
|
||||||
|
## 介绍 proto3
|
||||||
|
在我们最新的 version 3 发行版 中推出了新的语言版本 —— Protocol Buffers language version 3(另称 proto3),在这个版本中针对我们已经存在的语言版本(proto2)使用了一些新的特性。
|
||||||
|
|
||||||
|
Proto3 简化了 protocol buffer 语言,使其更加容易使用并且能够支持更多的语言:我们当前发行的 proto3 能够让你创建 Java, C++, Python, Java Lite, Ruby, JavaScript, Objective-C, and C#。
|
||||||
|
|
||||||
|
另外你也可以通过使用 Go protoc 插件来用 proto3 创建 Go 代码,这个插件你可以到 golang/protobuf Github 中下载到。更多的语言还在逐步进行支持中。
|
||||||
|
|
||||||
|
请注意,这 2 个版本的 API 并不是完全兼容的。为了照顾还在使用老版本的用户,我们将会在新的 protocol buffers 发行中同时支持老的版本。
|
||||||
|
|
||||||
|
你可以在下面的发行日志(release notes)查看 2 个版本的主要不同。有关 proto3 的句法,请参考 Proto3 Language Guide 中的内容,针对 proto3 的完整文档还没有编写完成,将会随后推出。
|
||||||
|
|
||||||
|
看起来 proto2 和 proto3 可能会产生一些混淆,这是因为原始的开源 protocol buffers 实际上是 Google 内部语言的第二个版本,同时我们的开源版本也是从 v2.0.0 开始的。
|
||||||
|
|
||||||
|
简单来说就是 proto 最开始的版本是 Google 内部使用的,在 proto 第二个版本的时候,Google 决定进行开源了,所以开源的 proto 是从 proto2 开始的。
|
||||||
|
|
||||||
|
## 一个简短的历史
|
||||||
|
Protocol buffers 最开始是在 Google 内部进行开发的,用于处理在索引服务器上请求/响应(request/response)的协议。
|
||||||
|
|
||||||
|
在 Protocol buffers 之前,针对请求和响应,使用的是 marshalling/unmarshalling,这个能够支持一系列的协议。但是结果看起来却是非常的难看,例如:
|
||||||
|
|
||||||
|
```
|
||||||
|
if (version == 3) {
|
||||||
|
...
|
||||||
|
} else if (version > 4) {
|
||||||
|
if (version == 5) {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
明确格式化的的协议也使新版本的协议更加难以推出,这是因为开发者必须能够了解老协议在服务器之间是如何进行处理的,同时也需要了解新的协议。只有对新老协议都有所了解后才能逐步使用新的协议替换老的协议。
|
||||||
|
|
||||||
|
Protocol buffers 被用来设计解决上面的很多问题:
|
||||||
|
|
||||||
|
* 新的字段比较能够容易的进行定义,中级服务器不需要对数据进行检查,直接对数据进行处理,同时也可以直接传输数据而不需要了解数据是如何进行定义的。
|
||||||
|
* 格式使用自描述,能够更加容易支持更多的语言(C++,Java 等)。
|
||||||
|
|
||||||
|
但是,用户还是需要手动书写他们自己的处理diam。
|
||||||
|
|
||||||
|
作为系统的进化来说,它获得了许多其他的特性和用途:
|
||||||
|
|
||||||
|
* 自动生成序列化和反序列化代码而避免手动书写这些代码。
|
||||||
|
* 除了开始使用短期RPC(远程过程调用)请求,人们开始使用 protocol buffers 作为高效的自描述结构化数据格式(主要针对数据短期存在,例如在 Bigtable)。
|
||||||
|
* 服务器RPC接口开始被声明为协议文件的一部分,协议编译器生成根类,用户可以通过服务器接口的实现和重载它们。
|
||||||
|
|
||||||
|
Protocol buffers 在 Google 中成为针对数据的通用语言—— 随着时间的流逝,在 Google 内部已经有超过 348,952 .proto 文件被定义。这些被用在 RPC 系统和存储系统中存储数据。
|
||||||
|
|
90
python-tutorials/.gitignore
vendored
90
python-tutorials/.gitignore
vendored
@ -1,90 +0,0 @@
|
|||||||
# Byte-compiled / optimized / DLL files
|
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
*$py.class
|
|
||||||
|
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Distribution / packaging
|
|
||||||
.Python
|
|
||||||
env/
|
|
||||||
build/
|
|
||||||
develop-eggs/
|
|
||||||
dist/
|
|
||||||
downloads/
|
|
||||||
eggs/
|
|
||||||
.eggs/
|
|
||||||
lib/
|
|
||||||
lib64/
|
|
||||||
parts/
|
|
||||||
sdist/
|
|
||||||
var/
|
|
||||||
*.egg-info/
|
|
||||||
.installed.cfg
|
|
||||||
*.egg
|
|
||||||
|
|
||||||
# PyInstaller
|
|
||||||
# Usually these files are written by a python script from a template
|
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
||||||
*.manifest
|
|
||||||
*.spec
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
pip-delete-this-directory.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
htmlcov/
|
|
||||||
.tox/
|
|
||||||
.coverage
|
|
||||||
.coverage.*
|
|
||||||
.cache
|
|
||||||
nosetests.xml
|
|
||||||
coverage.xml
|
|
||||||
*,cover
|
|
||||||
.hypothesis/
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
*.pot
|
|
||||||
|
|
||||||
# Django stuff:
|
|
||||||
*.log
|
|
||||||
local_settings.py
|
|
||||||
|
|
||||||
# Flask stuff:
|
|
||||||
instance/
|
|
||||||
.webassets-cache
|
|
||||||
|
|
||||||
# Scrapy stuff:
|
|
||||||
.scrapy
|
|
||||||
|
|
||||||
# Sphinx documentation
|
|
||||||
docs/_build/
|
|
||||||
|
|
||||||
# PyBuilder
|
|
||||||
target/
|
|
||||||
|
|
||||||
# IPython Notebook
|
|
||||||
.ipynb_checkpoints
|
|
||||||
|
|
||||||
# pyenv
|
|
||||||
.python-version
|
|
||||||
|
|
||||||
# celery beat schedule file
|
|
||||||
celerybeat-schedule
|
|
||||||
|
|
||||||
# dotenv
|
|
||||||
.env
|
|
||||||
|
|
||||||
# virtualenv
|
|
||||||
.venv/
|
|
||||||
venv/
|
|
||||||
ENV/
|
|
||||||
|
|
||||||
# Spyder project settings
|
|
||||||
.spyderproject
|
|
||||||
|
|
||||||
# Rope project settings
|
|
||||||
.ropeproject
|
|
@ -1,9 +0,0 @@
|
|||||||
Copyright (c) 2020, Yucheng Hu
|
|
||||||
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
||||||
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1 +0,0 @@
|
|||||||
include LICENSE
|
|
@ -1,5 +0,0 @@
|
|||||||
init:
|
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
test:
|
|
||||||
nosetests tests
|
|
@ -1,12 +0,0 @@
|
|||||||
Python Tutorials 仓库
|
|
||||||
=====================
|
|
||||||
|
|
||||||
This simple project is an example repo for Python projects.
|
|
||||||
|
|
||||||
`查看更多 <https://github.com/ossez-com/python-tutorials>`_
|
|
||||||
|
|
||||||
`官方结构的说明 <http://www.kennethreitz.org/essays/repository-structure-and-python>`_
|
|
||||||
|
|
||||||
---------------
|
|
||||||
|
|
||||||
If you want to learn more about ``setup.py`` files, check out `this repository <https://github.com/kennethreitz/setup.py>`_.
|
|
@ -1,153 +0,0 @@
|
|||||||
# Makefile for Sphinx documentation
|
|
||||||
#
|
|
||||||
|
|
||||||
# You can set these variables from the command line.
|
|
||||||
SPHINXOPTS =
|
|
||||||
SPHINXBUILD = sphinx-build
|
|
||||||
PAPER =
|
|
||||||
BUILDDIR = _build
|
|
||||||
|
|
||||||
# Internal variables.
|
|
||||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
|
||||||
PAPEROPT_letter = -D latex_paper_size=letter
|
|
||||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
|
||||||
# the i18n builder cannot share the environment and doctrees with the others
|
|
||||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
|
||||||
|
|
||||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
|
|
||||||
|
|
||||||
help:
|
|
||||||
@echo "Please use \`make <target>' where <target> is one of"
|
|
||||||
@echo " html to make standalone HTML files"
|
|
||||||
@echo " dirhtml to make HTML files named index.html in directories"
|
|
||||||
@echo " singlehtml to make a single large HTML file"
|
|
||||||
@echo " pickle to make pickle files"
|
|
||||||
@echo " json to make JSON files"
|
|
||||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
|
||||||
@echo " qthelp to make HTML files and a qthelp project"
|
|
||||||
@echo " devhelp to make HTML files and a Devhelp project"
|
|
||||||
@echo " epub to make an epub"
|
|
||||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
|
||||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
|
||||||
@echo " text to make text files"
|
|
||||||
@echo " man to make manual pages"
|
|
||||||
@echo " texinfo to make Texinfo files"
|
|
||||||
@echo " info to make Texinfo files and run them through makeinfo"
|
|
||||||
@echo " gettext to make PO message catalogs"
|
|
||||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
|
||||||
@echo " linkcheck to check all external links for integrity"
|
|
||||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-rm -rf $(BUILDDIR)/*
|
|
||||||
|
|
||||||
html:
|
|
||||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
|
||||||
|
|
||||||
dirhtml:
|
|
||||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
|
||||||
|
|
||||||
singlehtml:
|
|
||||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
|
||||||
|
|
||||||
pickle:
|
|
||||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
|
||||||
@echo
|
|
||||||
@echo "Build finished; now you can process the pickle files."
|
|
||||||
|
|
||||||
json:
|
|
||||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
|
||||||
@echo
|
|
||||||
@echo "Build finished; now you can process the JSON files."
|
|
||||||
|
|
||||||
htmlhelp:
|
|
||||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
|
||||||
@echo
|
|
||||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
|
||||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
|
||||||
|
|
||||||
qthelp:
|
|
||||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
|
||||||
@echo
|
|
||||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
|
||||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
|
||||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/sample.qhcp"
|
|
||||||
@echo "To view the help file:"
|
|
||||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/sample.qhc"
|
|
||||||
|
|
||||||
devhelp:
|
|
||||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
|
||||||
@echo
|
|
||||||
@echo "Build finished."
|
|
||||||
@echo "To view the help file:"
|
|
||||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/sample"
|
|
||||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/sample"
|
|
||||||
@echo "# devhelp"
|
|
||||||
|
|
||||||
epub:
|
|
||||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
|
||||||
|
|
||||||
latex:
|
|
||||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
||||||
@echo
|
|
||||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
|
||||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
|
||||||
"(use \`make latexpdf' here to do that automatically)."
|
|
||||||
|
|
||||||
latexpdf:
|
|
||||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
||||||
@echo "Running LaTeX files through pdflatex..."
|
|
||||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
|
||||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
|
||||||
|
|
||||||
text:
|
|
||||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
|
||||||
|
|
||||||
man:
|
|
||||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
|
||||||
|
|
||||||
texinfo:
|
|
||||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
|
||||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
|
||||||
"(use \`make info' here to do that automatically)."
|
|
||||||
|
|
||||||
info:
|
|
||||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
|
||||||
@echo "Running Texinfo files through makeinfo..."
|
|
||||||
make -C $(BUILDDIR)/texinfo info
|
|
||||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
|
||||||
|
|
||||||
gettext:
|
|
||||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
|
||||||
@echo
|
|
||||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
|
||||||
|
|
||||||
changes:
|
|
||||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
|
||||||
@echo
|
|
||||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
|
||||||
|
|
||||||
linkcheck:
|
|
||||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
|
||||||
@echo
|
|
||||||
@echo "Link check complete; look for any errors in the above output " \
|
|
||||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
|
||||||
|
|
||||||
doctest:
|
|
||||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
|
||||||
@echo "Testing of doctests in the sources finished, look at the " \
|
|
||||||
"results in $(BUILDDIR)/doctest/output.txt."
|
|
@ -1,242 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# sample documentation build configuration file, created by
|
|
||||||
# sphinx-quickstart on Mon Apr 16 21:22:43 2012.
|
|
||||||
#
|
|
||||||
# This file is execfile()d with the current directory set to its containing dir.
|
|
||||||
#
|
|
||||||
# Note that not all possible configuration values are present in this
|
|
||||||
# autogenerated file.
|
|
||||||
#
|
|
||||||
# All configuration values have a default; values that are commented out
|
|
||||||
# serve to show the default.
|
|
||||||
|
|
||||||
import sys, os
|
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
||||||
#sys.path.insert(0, os.path.abspath('.'))
|
|
||||||
|
|
||||||
# -- General configuration -----------------------------------------------------
|
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
|
||||||
#needs_sphinx = '1.0'
|
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
|
||||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
|
||||||
extensions = []
|
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
|
||||||
templates_path = ['_templates']
|
|
||||||
|
|
||||||
# The suffix of source filenames.
|
|
||||||
source_suffix = '.rst'
|
|
||||||
|
|
||||||
# The encoding of source files.
|
|
||||||
#source_encoding = 'utf-8-sig'
|
|
||||||
|
|
||||||
# The master toctree document.
|
|
||||||
master_doc = 'index'
|
|
||||||
|
|
||||||
# General information about the project.
|
|
||||||
project = u'sample'
|
|
||||||
copyright = u'2020, YuCheng Hu'
|
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
|
||||||
# |version| and |release|, also used in various other places throughout the
|
|
||||||
# built documents.
|
|
||||||
#
|
|
||||||
# The short X.Y version.
|
|
||||||
version = 'v0.0.1'
|
|
||||||
# The full version, including alpha/beta/rc tags.
|
|
||||||
release = 'v0.0.1'
|
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
||||||
# for a list of supported languages.
|
|
||||||
#language = None
|
|
||||||
|
|
||||||
# There are two options for replacing |today|: either, you set today to some
|
|
||||||
# non-false value, then it is used:
|
|
||||||
#today = ''
|
|
||||||
# Else, today_fmt is used as the format for a strftime call.
|
|
||||||
#today_fmt = '%B %d, %Y'
|
|
||||||
|
|
||||||
# List of patterns, relative to source directory, that match files and
|
|
||||||
# directories to ignore when looking for source files.
|
|
||||||
exclude_patterns = ['_build']
|
|
||||||
|
|
||||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
|
||||||
#default_role = None
|
|
||||||
|
|
||||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
|
||||||
#add_function_parentheses = True
|
|
||||||
|
|
||||||
# If true, the current module name will be prepended to all description
|
|
||||||
# unit titles (such as .. function::).
|
|
||||||
#add_module_names = True
|
|
||||||
|
|
||||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
|
||||||
# output. They are ignored by default.
|
|
||||||
#show_authors = False
|
|
||||||
|
|
||||||
# The name of the Pygments (syntax highlighting) style to use.
|
|
||||||
pygments_style = 'sphinx'
|
|
||||||
|
|
||||||
# A list of ignored prefixes for module index sorting.
|
|
||||||
#modindex_common_prefix = []
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTML output ---------------------------------------------------
|
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
||||||
# a list of builtin themes.
|
|
||||||
html_theme = 'default'
|
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
|
||||||
# further. For a list of options available for each theme, see the
|
|
||||||
# documentation.
|
|
||||||
#html_theme_options = {}
|
|
||||||
|
|
||||||
# Add any paths that contain custom themes here, relative to this directory.
|
|
||||||
#html_theme_path = []
|
|
||||||
|
|
||||||
# The name for this set of Sphinx documents. If None, it defaults to
|
|
||||||
# "<project> v<release> documentation".
|
|
||||||
#html_title = None
|
|
||||||
|
|
||||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
|
||||||
#html_short_title = None
|
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top
|
|
||||||
# of the sidebar.
|
|
||||||
#html_logo = None
|
|
||||||
|
|
||||||
# The name of an image file (within the static path) to use as favicon of the
|
|
||||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
|
||||||
# pixels large.
|
|
||||||
#html_favicon = None
|
|
||||||
|
|
||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
||||||
html_static_path = ['_static']
|
|
||||||
|
|
||||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
|
||||||
# using the given strftime format.
|
|
||||||
#html_last_updated_fmt = '%b %d, %Y'
|
|
||||||
|
|
||||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
|
||||||
# typographically correct entities.
|
|
||||||
#html_use_smartypants = True
|
|
||||||
|
|
||||||
# Custom sidebar templates, maps document names to template names.
|
|
||||||
#html_sidebars = {}
|
|
||||||
|
|
||||||
# Additional templates that should be rendered to pages, maps page names to
|
|
||||||
# template names.
|
|
||||||
#html_additional_pages = {}
|
|
||||||
|
|
||||||
# If false, no module index is generated.
|
|
||||||
#html_domain_indices = True
|
|
||||||
|
|
||||||
# If false, no index is generated.
|
|
||||||
#html_use_index = True
|
|
||||||
|
|
||||||
# If true, the index is split into individual pages for each letter.
|
|
||||||
#html_split_index = False
|
|
||||||
|
|
||||||
# If true, links to the reST sources are added to the pages.
|
|
||||||
#html_show_sourcelink = True
|
|
||||||
|
|
||||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
|
||||||
#html_show_sphinx = True
|
|
||||||
|
|
||||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
|
||||||
#html_show_copyright = True
|
|
||||||
|
|
||||||
# If true, an OpenSearch description file will be output, and all pages will
|
|
||||||
# contain a <link> tag referring to it. The value of this option must be the
|
|
||||||
# base URL from which the finished HTML is served.
|
|
||||||
#html_use_opensearch = ''
|
|
||||||
|
|
||||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
|
||||||
#html_file_suffix = None
|
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
|
||||||
htmlhelp_basename = 'sampledoc'
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output --------------------------------------------------
|
|
||||||
|
|
||||||
latex_elements = {
|
|
||||||
# The paper size ('letterpaper' or 'a4paper').
|
|
||||||
#'papersize': 'letterpaper',
|
|
||||||
|
|
||||||
# The font size ('10pt', '11pt' or '12pt').
|
|
||||||
#'pointsize': '10pt',
|
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
|
||||||
#'preamble': '',
|
|
||||||
}
|
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
|
||||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
|
||||||
latex_documents = [
|
|
||||||
('index', 'sample.tex', u'sample Documentation',
|
|
||||||
u'Kenneth Reitz', 'manual'),
|
|
||||||
]
|
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
|
||||||
# the title page.
|
|
||||||
#latex_logo = None
|
|
||||||
|
|
||||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
|
||||||
# not chapters.
|
|
||||||
#latex_use_parts = False
|
|
||||||
|
|
||||||
# If true, show page references after internal links.
|
|
||||||
#latex_show_pagerefs = False
|
|
||||||
|
|
||||||
# If true, show URL addresses after external links.
|
|
||||||
#latex_show_urls = False
|
|
||||||
|
|
||||||
# Documents to append as an appendix to all manuals.
|
|
||||||
#latex_appendices = []
|
|
||||||
|
|
||||||
# If false, no module index is generated.
|
|
||||||
#latex_domain_indices = True
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for manual page output --------------------------------------------
|
|
||||||
|
|
||||||
# One entry per manual page. List of tuples
|
|
||||||
# (source start file, name, description, authors, manual section).
|
|
||||||
man_pages = [
|
|
||||||
('index', 'sample', u'sample Documentation',
|
|
||||||
[u'Kenneth Reitz'], 1)
|
|
||||||
]
|
|
||||||
|
|
||||||
# If true, show URL addresses after external links.
|
|
||||||
#man_show_urls = False
|
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Texinfo output ------------------------------------------------
|
|
||||||
|
|
||||||
# Grouping the document tree into Texinfo files. List of tuples
|
|
||||||
# (source start file, target name, title, author,
|
|
||||||
# dir menu entry, description, category)
|
|
||||||
texinfo_documents = [
|
|
||||||
('index', 'sample', u'sample Documentation',
|
|
||||||
u'Kenneth Reitz', 'sample', 'One line description of project.',
|
|
||||||
'Miscellaneous'),
|
|
||||||
]
|
|
||||||
|
|
||||||
# Documents to append as an appendix to all manuals.
|
|
||||||
#texinfo_appendices = []
|
|
||||||
|
|
||||||
# If false, no module index is generated.
|
|
||||||
#texinfo_domain_indices = True
|
|
||||||
|
|
||||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
|
||||||
#texinfo_show_urls = 'footnote'
|
|
@ -1,22 +0,0 @@
|
|||||||
.. sample documentation master file, created by
|
|
||||||
sphinx-quickstart on Mon Apr 16 21:22:43 2012.
|
|
||||||
You can adapt this file completely to your liking, but it should at least
|
|
||||||
contain the root `toctree` directive.
|
|
||||||
|
|
||||||
欢迎来到 Python 示例项目文档
|
|
||||||
============================
|
|
||||||
|
|
||||||
Contents:
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
|
||||||
==================
|
|
||||||
|
|
||||||
* :ref:`genindex`
|
|
||||||
* :ref:`modindex`
|
|
||||||
* :ref:`search`
|
|
||||||
|
|
@ -1,190 +0,0 @@
|
|||||||
@ECHO OFF
|
|
||||||
|
|
||||||
REM Command file for Sphinx documentation
|
|
||||||
|
|
||||||
if "%SPHINXBUILD%" == "" (
|
|
||||||
set SPHINXBUILD=sphinx-build
|
|
||||||
)
|
|
||||||
set BUILDDIR=_build
|
|
||||||
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
|
|
||||||
set I18NSPHINXOPTS=%SPHINXOPTS% .
|
|
||||||
if NOT "%PAPER%" == "" (
|
|
||||||
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
|
||||||
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "" goto help
|
|
||||||
|
|
||||||
if "%1" == "help" (
|
|
||||||
:help
|
|
||||||
echo.Please use `make ^<target^>` where ^<target^> is one of
|
|
||||||
echo. html to make standalone HTML files
|
|
||||||
echo. dirhtml to make HTML files named index.html in directories
|
|
||||||
echo. singlehtml to make a single large HTML file
|
|
||||||
echo. pickle to make pickle files
|
|
||||||
echo. json to make JSON files
|
|
||||||
echo. htmlhelp to make HTML files and a HTML help project
|
|
||||||
echo. qthelp to make HTML files and a qthelp project
|
|
||||||
echo. devhelp to make HTML files and a Devhelp project
|
|
||||||
echo. epub to make an epub
|
|
||||||
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
|
|
||||||
echo. text to make text files
|
|
||||||
echo. man to make manual pages
|
|
||||||
echo. texinfo to make Texinfo files
|
|
||||||
echo. gettext to make PO message catalogs
|
|
||||||
echo. changes to make an overview over all changed/added/deprecated items
|
|
||||||
echo. linkcheck to check all external links for integrity
|
|
||||||
echo. doctest to run all doctests embedded in the documentation if enabled
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "clean" (
|
|
||||||
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
|
||||||
del /q /s %BUILDDIR%\*
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "html" (
|
|
||||||
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "dirhtml" (
|
|
||||||
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "singlehtml" (
|
|
||||||
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "pickle" (
|
|
||||||
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished; now you can process the pickle files.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "json" (
|
|
||||||
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished; now you can process the JSON files.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "htmlhelp" (
|
|
||||||
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished; now you can run HTML Help Workshop with the ^
|
|
||||||
.hhp project file in %BUILDDIR%/htmlhelp.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "qthelp" (
|
|
||||||
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
|
||||||
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
|
||||||
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\sample.qhcp
|
|
||||||
echo.To view the help file:
|
|
||||||
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\sample.ghc
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "devhelp" (
|
|
||||||
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "epub" (
|
|
||||||
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The epub file is in %BUILDDIR%/epub.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "latex" (
|
|
||||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "text" (
|
|
||||||
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The text files are in %BUILDDIR%/text.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "man" (
|
|
||||||
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The manual pages are in %BUILDDIR%/man.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "texinfo" (
|
|
||||||
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "gettext" (
|
|
||||||
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "changes" (
|
|
||||||
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.The overview file is in %BUILDDIR%/changes.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "linkcheck" (
|
|
||||||
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Link check complete; look for any errors in the above output ^
|
|
||||||
or in %BUILDDIR%/linkcheck/output.txt.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
if "%1" == "doctest" (
|
|
||||||
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
|
|
||||||
if errorlevel 1 exit /b 1
|
|
||||||
echo.
|
|
||||||
echo.Testing of doctests in the sources finished, look at the ^
|
|
||||||
results in %BUILDDIR%/doctest/output.txt.
|
|
||||||
goto end
|
|
||||||
)
|
|
||||||
|
|
||||||
:end
|
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="PYTHON_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$" />
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
@ -1 +0,0 @@
|
|||||||
yfinance==0.1.54
|
|
@ -1,23 +0,0 @@
|
|||||||
# for n in range(2, 10):
|
|
||||||
# for x in range(2, n):
|
|
||||||
# if n % x == 0:
|
|
||||||
# print(n, 'equals', x, '*', n // x)
|
|
||||||
# break
|
|
||||||
# else:
|
|
||||||
# # loop fell through without finding a factor
|
|
||||||
# print(n, 'is a prime number')
|
|
||||||
#
|
|
||||||
# #
|
|
||||||
# for num in range(2, 10):
|
|
||||||
# if num % 2 == 0:
|
|
||||||
# print("Found an even number", num)
|
|
||||||
# continue
|
|
||||||
# print("Found a number", num)
|
|
||||||
|
|
||||||
# alphabet = ["A", "B", "C"]
|
|
||||||
# for x in alphabet:
|
|
||||||
# print(x)
|
|
||||||
|
|
||||||
strOssez = "ossez.com"
|
|
||||||
for x in strOssez:
|
|
||||||
print(x)
|
|
@ -1 +0,0 @@
|
|||||||
from .core import hmm
|
|
@ -1,12 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
from . import helpers
|
|
||||||
|
|
||||||
def get_hmm():
|
|
||||||
"""Get a thought."""
|
|
||||||
return 'hmmm...'
|
|
||||||
|
|
||||||
|
|
||||||
def hmm():
|
|
||||||
"""Contemplation..."""
|
|
||||||
if helpers.get_answer():
|
|
||||||
print(get_hmm())
|
|
@ -1,7 +0,0 @@
|
|||||||
def get_answer():
|
|
||||||
"""Get an answer."""
|
|
||||||
|
|
||||||
return True
|
|
||||||
|
|
||||||
|
|
||||||
print("Hello Python")
|
|
@ -1,25 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# Learn more: https://github.com/kennethreitz/setup.py
|
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
|
||||||
|
|
||||||
with open('README.rst') as f:
|
|
||||||
readme = f.read()
|
|
||||||
|
|
||||||
with open('LICENSE') as f:
|
|
||||||
license = f.read()
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='sample',
|
|
||||||
version='0.1.0',
|
|
||||||
description='Sample Package Python Tutorials',
|
|
||||||
long_description=readme,
|
|
||||||
author='Kenneth Reitz',
|
|
||||||
author_email='me@kennethreitz.com',
|
|
||||||
url='https://github.com/kennethreitz/samplemod',
|
|
||||||
license=license,
|
|
||||||
packages=find_packages(exclude=('tests', 'docs'))
|
|
||||||
)
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
|
||||||
|
|
||||||
import sample
|
|
@ -1,16 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from .context import sample
|
|
||||||
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
|
|
||||||
class AdvancedTestSuite(unittest.TestCase):
|
|
||||||
"""Advanced test cases."""
|
|
||||||
|
|
||||||
def test_thoughts(self):
|
|
||||||
self.assertIsNone(sample.hmm())
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
@ -1,16 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from .context import sample
|
|
||||||
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
|
|
||||||
class BasicTestSuite(unittest.TestCase):
|
|
||||||
"""Basic test cases."""
|
|
||||||
|
|
||||||
def test_absolute_truth_and_meaning(self):
|
|
||||||
assert True
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
@ -1,16 +0,0 @@
|
|||||||
from decimal import Decimal, ROUND_HALF_UP, Context
|
|
||||||
|
|
||||||
import yfinance as yf
|
|
||||||
|
|
||||||
msft = yf.Ticker("MSFT")
|
|
||||||
msft.info
|
|
||||||
|
|
||||||
print(msft.dividends)
|
|
||||||
|
|
||||||
# print(round(2.3, 2))
|
|
||||||
# print(round(2.45, 1))
|
|
||||||
# print(round(2.675, 2))
|
|
||||||
#
|
|
||||||
# print(Decimal(1.325))
|
|
||||||
#
|
|
||||||
# print(Context(prec=3, rounding=ROUND_HALF_UP).create_decimal('2.675'))
|
|
28
spring.md
Normal file
28
spring.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# CWIKIUS SPRING 文档和项目快速导航
|
||||||
|
|
||||||
|
欢迎来到 CWIKIUS SPRING 文档和手册的空间
|
||||||
|
|
||||||
|
Spring 有关的文档和项目 Confluence Wiki,请访问:[https://www.cwiki.us/display/CWIKIUSDOCS/Spring+Docs](https://www.cwiki.us/display/CWIKIUSDOCS/Spring+Docs)
|
||||||
|
|
||||||
|
|
||||||
|
如果您有兴趣参与我们的小组和项目,请使用下面的联系方式和我们联系:
|
||||||
|
|
||||||
|
| 联系方式名称 | 联系方式 |
|
||||||
|
|---|---|
|
||||||
|
| 电子邮件 | [service@ossez.com](mailto:service@ossez.com) |
|
||||||
|
| QQ 或微信 | 103899765 |
|
||||||
|
| QQ 交流群 Spring | 15186112 |
|
||||||
|
| 社区论坛 | [https://www.ossez.com/](https://www.ossez.com/) |
|
||||||
|
|
||||||
|
## Spring Data JPA
|
||||||
|
|
||||||
|
在下面的表格中,我们列出了一些比较有用的 CWIKIUS 相关软件开发使用教程的导航,在我们文档的整理中,也参考了一些这些文档。
|
||||||
|
|
||||||
|
在这里对原作者表示感谢。
|
||||||
|
|
||||||
|
| 网站名称 | URL | NOTE |
|
||||||
|
|---|---|---|
|
||||||
|
| 源代码 | [https://github.com/cwiki-us-spring/spring-data-jpa](https://github.com/cwiki-us-spring/spring-data-jpa) | 下面编译结果使用的源代码 |
|
||||||
|
| 参考 | [https://cdn.ossez.com/docs/spring-docs/spring-data-jpa/reference/html/index.html](https://cdn.ossez.com/docs/spring-docs/spring-data-jpa/reference/html/index.html) | 从官方代码库中 Fork 下来的代码后进行中文化编译后的的文档 |
|
||||||
|
| API | [https://cdn.ossez.com/docs/spring-docs/spring-data-jpa/apidocs/index.html](https://cdn.ossez.com/docs/spring-docs/spring-data-jpa/apidocs/index.html) | 官方代码库中 Fork 下面的代码后编译的 API 参考 |
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user