导火线
最近查看一个开源代码中发现一个定时器,采用java.util.Timer.scheduleAtFixedRate()进行的调度.想一想自己之前都是用的quartz做的调度,这个是什么东东.遂查资料.
查资料发现了scheduleAtFixedRate方法介绍的说明.
发现新大陆
大致又看了看其他的内容,发现这个网站上的java.util包下面的类都有讲解,很适合新手入坑啊.
最后附上地址:易百教程
最近查看一个开源代码中发现一个定时器,采用java.util.Timer.scheduleAtFixedRate()进行的调度.想一想自己之前都是用的quartz做的调度,这个是什么东东.遂查资料.
查资料发现了scheduleAtFixedRate方法介绍的说明.
大致又看了看其他的内容,发现这个网站上的java.util包下面的类都有讲解,很适合新手入坑啊.
最后附上地址:易百教程
本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:
Ctrl + BCtrl + ICtrl + QCtrl + LCtrl + KCtrl + GCtrl + HCtrl + OCtrl + UCtrl + RCtrl + ZCtrl + YMarkdown 是一种轻量级标记语言,它允许人们使用易读易写的纯文本格式编写文档,然后转换成格式丰富的HTML页面。 —— [ 维基百科 ]
使用简单的符号标识不同的标题,将某些文字标记为粗体或者斜体,创建一个链接等,详细语法参考帮助?。
本编辑器支持 Markdown Extra , 扩展了很多好用的功能。具体请参考Github.
Markdown Extra 表格语法:
| 项目 | 价格 |
|---|---|
| Computer | $1600 |
| Phone | $12 |
| Pipe | $1 |
可以使用冒号来定义对齐方式:
| 项目 | 价格 | 数量 |
|---|---|---|
| Computer | 1600 元 | 5 |
| Phone | 12 元 | 12 |
| Pipe | 1 元 | 234 |
代码块语法遵循标准markdown代码,例如:
@requires_authorization
def somefunc(param1='', param2=0):
'''A docstring'''
if param1 > param2: # interesting
print 'Greater'
return (param2 - param1 + 1) or None
class SomeClass:
pass
>>> message = '''interpreter
... prompt'''
可以渲染序列图:
张三->李四: 嘿,小四儿, 写博客了没?
Note right of 李四: 李四愣了一下,说:
李四-->张三: 忙得吐血,哪有时间写。
或者流程图:
st=>start: 开始
e=>end: 结束
op=>operation: 我的操作
cond=>condition: 确认?
st->op->cond
cond(yes)->e
cond(no)->op
即使用户在没有网络的情况下,也可以通过本编辑器离线写博客(直接在曾经使用过的浏览器中输入write.blog.csdn.net/mdeditor即可。Markdown编辑器使用浏览器离线存储将内容保存在本地。
用户写博客的过程中,内容实时保存在浏览器缓存中,在用户关闭浏览器或者其它异常情况下,内容不会丢失。用户再次打开浏览器时,会显示上次用户正在编辑的没有发表的内容。
博客发表后,本地缓存将被删除。
用户可以选择 把正在写的博客保存到服务器草稿箱,即使换浏览器或者清除缓存,内容也不会丢失。
注意:虽然浏览器存储大部分时候都比较可靠,但为了您的数据安全,在联网后,请务必及时发表或者保存到服务器草稿箱。
You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.
To add new posts, simply add a file in the _posts directory that follows the convention YYYY-MM-DD-name-of-post.ext and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
Jekyll also offers powerful support for code snippets:
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.Check out the Jekyll docs for more info on how to get the most out of Jekyll. File all bugs/feature requests at Jekyll’s GitHub repo. If you have questions, you can ask them on Jekyll Talk.
Welcome to the sample post for the Jekyll Clean theme.
A simple and clean Jekyll theme using bootstrap (not to be confused with jekyll-bootstrap) that’s easy to modify and very modular in component and element reuse.
It uses Disqus for comments and includes Google Analytics support. Both of these features are disabled by default and can be enabled via _config.yml. You can also rip this code out of the templates if you like (footer.html and post.html). The beauty of Jekyll - keep things clean… Jekyll Clean!
The theme works well on mobile phones, using a collapsable nav bar and hiding the sidebar. The links pane in the sidebar is available on mobile through the nav menu, and you can do the same thing for any other sections added to the sidebar.
Don’t forget to occassionally merge against my upstream repository so you can get the latest changes. Pull requests are encouraged and accepted!
If you don’t have a blog already on github, start by cloning this repository. Best to do that directly on github and then clone that down to your computer.
If you already do have a blog, You can certainly apply this theme to your existing blog in place, but then you won’t be able to merge as the theme changes. If you re-apply your blog history on top of this theme’s gh-pages branch, it’s then easy to update to the latest version of the theme. You also don’t want to have to deal with resolving old conflicts from your existing history, so you may wish to to push your existing master off to a new branch so you have the old history and start a new branch with this as the start, merging in your _posts and other assets (after git rm’ing the current _posts.
Not ideal, but you have to make a choice - either apply it manually or base your blog off this theme’s branch. Either way it will work, and both have their own pros and cons.
You can setup an upstream tracking repository like so:
$ git remote add upstream git@github.com:scotte/jekyll-clean.git
And now when you wish to merge your own branch onto the latest version of the theme, simply do:
$ git fetch upstream
$ git merge upstream/gh-pages
Of course you will have to resolve conflicts for _config.yml, _includes/links-list.html, and _posts, and so on, but in practice this is pretty simple.
This is how I maintain my own blog which is based on this theme. The old history is sitting in an old-master branch that I can refer to when I need to.
Here’s the exact set of packages I need to install on Debian to run jekyll locally with this theme for testing.
$ sudo aptitude install ruby ruby-dev rubygems nodejs
$ sudo gem install jekyll jekyll-paginate
And then it’s just a simple matter of running jekyll locally:
$ jekyll serve --baseurl=''
Now browse to http://127.0.0.1:4000
Running a jekyll site is a bit outside the scope of this doc, but sometimes it can be a bit confusing how to configure jekyll for project pages versus user pages, for example.
To start with, read through the documentation here. This will provide a good overview on how it all works. The git branch and baseurl (in _config.yml) will change depending on the sort of site deployed.
When you clone this repository, it’s set up for project pages, so the deployed branch is “gh-pages” and baseurl is configured to ‘jekyll-clean’, because that’s the name of this project.
If you plan to deploy this as user pages, the deployed branch is “master” and baseurl is configured to ‘’ (i.e. empty).
Jekyll clean supports both isso and disqus comment systems.
After enabling comments, either isso or disquss must be configured. Don’t try configuring both!
Isso requires running a local server, so is not suitable for hosting in github pages, for example. Isso is open source and keeps all your data local, unlike Disqus (who knows exactly what they are doing with your data).
In _config.yml you’ll need to set isso to the fully-qualified URL if your isso server (this is the value for data-isso passed to the isso JS). Make sure comments is true.
Getting Disqus to work can be a bit more work than it seems like it should be. Make sure your Disqus account is correctly configured with the right domain of your blog and you know your Disqus shortname.
In _config.yml you’ll need to set disqus to your Disqus shortname and make sure comments is true.
Finally, in posts, make sure you have comments: true in the YAML front matter.
More information on using Disqus with Jekyll is documented here.
To use code syntax highlighting, use the following syntax:
```python
import random
# Roll the die
roll = random.randint(1, 20)
print('You rolled a %d.' % roll)
``` #REMOVE
(Remove #REMOVE from the end of the last line). Which will look like this in the rendered jekyll output using the default css/syntax.css provided with this theme (which is the colorful theme from https://github.com/iwootten/jekyll-syntax):
import random
# Roll the die
roll = random.randint(1, 20)
print('You rolled a %d.' % roll)
You can, of course, use any theme you wish, see the jekyll and pygments documentation for more details.
The content of this theme is distributed and licensed under a
Creative Commons Attribution 4.0 License
This license lets others distribute, remix, tweak, and build upon your work,
even commercially, as long as they credit you for the original creation. This
is the most accommodating of licenses offered. Recommended for maximum
dissemination and use of licensed materials.
In other words: you can do anything you want with this theme on any site, just please provide a link to the original theme on github so I get credit for the original design. Beyond that, have at it!
This theme includes the following files which are the properties of their respective owners: