publicclassScheduler1 { publicvoidexecute() { System.out.println("The task has been completed..."); System.out.println("Tasks to complete!"); System.out.println(newDate()); } }
DEBUG - Calling execute on job DEFAULT.SpringQtzJobMethod DEBUG - batch acquisition of 1 triggers The task has been completed... Tasks to complete! Wed Jun 20 11:46:20 CST 2018
# Version of the Icarus theme that is currently used version: 2.6.0 # 你的网站图标,可以搜索在线图标制作,并将其放在images文件夹中 favicon: /images/favicon.svg # Additional HTML meta tags in an array. meta: # Path or URL to RSS atom.xml rss: /atom.xml # 显示在导航栏左侧的网站logo,同样可以自己制作 logo: /images/hxx.jpg # Open Graph metadata # https://hexo.io/docs/helpers.html#open-graph open_graph: # Facebook App ID fb_app_id: # Facebook Admin ID fb_admins: # Twitter ID twitter_id: # Twitter site twitter_site: # Google+ profile link google_plus: # Navigation bar link settings navbar: #菜单(显示名称:对应文件夹) menu: 主页: / 归档: /archives 分类: /categories 标签: /tags 关于: /about # 导航栏右侧图标链接 links: My GitHub: icon: fab fa-github url: 'https://github.com/h2pl/' # Footer section link settings footer: # 页脚图标链接 links: Creative Commons: icon: fab fa-creative-commons url: 'https://creativecommons.org/' Attribution 4.0 International: icon: fab fa-creative-commons-by url: 'https://creativecommons.org/licenses/by/4.0/' Download on GitHub: icon: fab fa-github url: 'https://github.com/ppoffice/hexo-theme-icarus' # 文章显示设置 article: #代码主题atom-one-light亮色,atom-one-dark暗色 highlight: # Code highlight themes # https://github.com/highlightjs/highlight.js/tree/master/src/styles theme: atom-one-dark # Show code copying button clipboard: true # Default folding status of the code blocks. Can be "", "folded", "unfolded" fold: unfolded # 是否显示文章主图 thumbnail: true # 是否显示估算阅读时间 readtime: true # 搜索插件设置 # https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Search search: # Name of the search plugin type: insight # 评论插件设置 # https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Comment comment: #可选valine,disqus(科学上网)等 # Name of the comment plugin avatar: retro # Gravatar style : mm/identicon/monsterid/wavatar/retro/hide placeholder: 要不要说点啥... # Comment Box placeholder type: valine shortname: 黄小斜 # 打赏功能 # https://ppoffice.github.io/hexo-theme-icarus/categories/Donation/ donate: - # 阿里巴巴支付宝 type: alipay # 二维码图片 qrcode: '/images/hxx.jpg' - # 微信 type: wechat # 二维码图片 qrcode: '/images/hxx.jpg'
# 分享插件设置 # https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Share share: # Share plugin name type: sharejs # Sidebar settings. # Please be noted that a sidebar is only visible when it has at least one widget sidebar: # 左侧边栏设置 left: # 是否不随页面滚动 # https://ppoffice.github.io/hexo-theme-icarus/Configuration/Theme/make-a-sidebar-sticky-when-page-scrolls/ sticky: false # right sidebar settings right: # 是否不随页面滚动 # https://ppoffice.github.io/hexo-theme-icarus/Configuration/Theme/make-a-sidebar-sticky-when-page-scrolls/ sticky: false # 边栏小部件设置 # https://ppoffice.github.io/hexo-theme-icarus/categories/Widgets/ widgets: - # Widget name type: profile # Where should the widget be placed, left or right position: left # Author name to be shown in the profile widget author: 黄小斜 # Title of the author to be shown in the profile widget author_title: 蚂蚁金服Java工程师 # Author's current location to be shown in the profile widget location: 浙江 杭州 # Path or URL to the avatar to be shown in the profile widget avatar: /images/gzh.jpg # Email address for the Gravatar to be shown in the profile widget gravatar: # Whether to show avatar image rounded or square avatar_rounded: false # 关注我的链接,可设为你的GitHub主页 follow_link: 'https://github.com/h2pl/' # 个人介绍部件底部图标社交链接 social_links: Github: icon: fab fa-github url: 'https://github.com/h2pl' RSS: icon: fas fa-rss url: / - # Widget name type: toc # Where should the widget be placed, left or right position: left - # Widget name type: links # Where should the widget be placed, left or right position: left # Links to be shown in the links widget links: CSDN: 'https://blog.csdn.net/a724888' 知乎: 'https://www.zhihu.com/people/h2pl/activities' 简书: 'https://www.zhihu.com/people/h2pl/activities' - # Widget name type: category # Where should the widget be placed, left or right position: left - # Widget name type: tagcloud # Where should the widget be placed, left or right position: left - # Widget name type: recent_posts # Where should the widget be placed, left or right position: right - # Widget name type: archive # Where should the widget be placed, left or right position: right - # Widget name type: tag # Where should the widget be placed, left or right position: right # Other plugin settings plugins: # Enable page animations animejs: true # Enable the lightGallery and Justified Gallery plugins # https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/gallery-plugin/ gallery: true # Enable the Outdated Browser plugin # http://outdatedbrowser.com/ outdated-browser: true # Enable the MathJax plugin # https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/mathjax-plugin/ mathjax: true # Show the back to top button on mobile devices back-to-top: true # Google Analytics plugin settings # https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/site-analytics-plugin/#Google-Analytics google-analytics: # Google Analytics tracking id tracking_id: # Baidu Analytics plugin settings # https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/site-analytics-plugin/#Baidu-Analytics baidu-analytics: # Baidu Analytics tracking id tracking_id: 2289335dd443797b5867abbd156e7575 # Hotjar user feedback plugin # https://ppoffice.github.io/hexo-theme-icarus/Plugins/General/site-analytics-plugin/#Hotjar hotjar: # Hotjar site id site_id: # Show a loading progress bar at top of the page progressbar: true # BuSuanZi site/page view counter # https://busuanzi.ibruce.info busuanzi: true busuanzi: enable: true # CDN provider settings # https://ppoffice.github.io/hexo-theme-icarus/Configuration/Theme/speed-up-your-site-with-custom-cdn/ # Show PV/UV of the website/page with busuanzi. # Get more information on http://ibruce.info/2015/04/04/busuanzi/ busuanzi_count: # count values only if the other configs are false enable: true # custom uv span for the whole site site_uv: true site_uv_header: 访客数 site_uv_footer: 人 # custom pv span for the whole site site_pv: true site_pv_header: 总访问量 site_pv_footer: 次 # custom pv span for one page only page_pv: true page_pv_header: <i class="fa fa-file-o"></i> 阅读数 page_pv_footer:
providers: # Name or URL of the JavaScript and/or stylesheet CDN provider cdn: jsdelivr # Name or URL of the webfont CDN provider fontcdn: google # Name or URL of the webfont Icon CDN provider iconcdn: fontawesome
Next comes the main part: which users can run what software on
which machines (the sudoers file can be shared between multiple
systems).
Syntax:
user MACHINE=COMMANDS
The COMMANDS section may have other options added to it.
Allow root to run any commands anywhere
root ALL=(ALL) ALL
1 2 3 4 5 6
## Allows members of the 'sys' group to run networking, software, ## service management apps and more. # %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands %wheel ALL=(ALL) ALL
在 root ALL=(ALL) ALL 下加入
kaiccomic ALL=(ALL) NOPASSWD:ALL
修改完毕后 键盘按下“ESC”键入,结束修改 并且输入 :wq保存并退出 OR :q!强制关闭并退出
✔ Checking system Node.js version ✔ Checking logged in user ✔ Checking current folder permissions ℹ Checking operating system compatibility [skipped] ✔ Checking memory availability ✔ Checking for latest Ghost version ✔ Setting up install directory ✔ Downloading and installing Ghost v1.24.5 ✔ Finishing install process
若自检发现 出现 X 叉号即为问题所在,问题会以 message+error 文件形式供大家查看,纯英文很容易得出解决方法 出现 Shipped 则为跳过此步骤,大多表示建议性或不重要的注意性 看不懂英文可以翻译
完成自检无错误后开始操作
第一操作步骤 Enter your blog URL? 输入您的博客 URL 地址,这里输入 http/https 都可以 [https://blog.xxx.com](https://blog.xxx.com) Enter 回车
第二操作步骤 Do you wish to set up Nginx 是否自动配置 Nginx 服务 y 这里会发现报 Shipped 跳过,因为 Ghost-CLI 在 CentOS 上会不识别已安装的 Nginx,稍后我们自己手动设置 Enter 回车
第三操作步骤 Do you wish to set up Systemd? 是否接下来自动完成系统配置 y Enter 回车
第四操作步骤 Do you want to start Ghost? 是否接下来立刻启动 Ghost n 我们需要稍后启动,完成 Nginx 设置,启动也是会报错,无用功 Enter 回车
第二种安装方法:
使用 MySQL 作为数据库安装指令
ghost install --no-stack
enter 回车便开始自检安装环境
1 2 3 4 5 6 7 8 9 10
✔ Checking system Node.js version ✔ Checking logged in user ✔ Checking current folder permissions ℹ Checking operating system compatibility [skipped] ✔ Checking for a MySQL installation ✔ Checking memory availability ✔ Checking for latest Ghost version ✔ Setting up install directory ✔ Downloading and installing Ghost v1.24.5 ✔ Finishing install process
完成自检无错误后开始操作
第一操作步骤 Enter your blog URL? 输入您的博客 URL 地址,这里输入 http/https 都可以 [https://blog.xxx.com](https://blog.xxx.com) Enter 回车
第二操作步骤 Enter your MySQL hostname: 输入 MySQL 的登陆地址,本机登陆就是 localhost 直接回车即可,非本机记得带端口,也可以键入 localhost Enter 回车
第三操作步骤 Enter your MySQL username: 输入 MySQL 的登陆用户名 xxxxxx Enter 回车
第四操作步骤 Enter your MySQL password: [input is hidden] 输入 MySQL 的登陆口令密码,输入会隐藏请不要输错 xxx Enter 回车
第五操作步骤 Enter your Ghost database name: (blog_imzhengfei_com_prod) 输入 MySQL 的数据库名,需要提前创建好!默认 blog_imzhengfei_com_prod 不更改请直接 Enter 回车,或者 blog_imzhengfei_com_prod Enter 回车
第六操作步骤 Do you wish to set up "ghost" mysql user? 是否针对 ghost 建立一个新的访问用户,可以不需要 n Enter 回车
第七操作步骤 Do you wish to set up Nginx 是否自动配置 Nginx 服务 y 这里会发现报 Shipped 跳过,依旧是因为 Ghost-CLI 在 CentOS 上会不识别已安装的 Nginx,稍后我们自己手动设置 Enter 回车
第八操作步骤 Do you wish to set up Systemd? 是否接下来自动完成系统配置 y Enter 回车
第九操作步骤 Do you want to start Ghost? 是否接下来立刻启动 Ghost n 我们需要稍后启动,完成 Nginx 设置,启动也是会报错,无用功 Enter 回车
配置 Nginx
1.找到 Conf 配置文件
cd /usr/local/nginx/conf/vhost 值得注意这里我是使用了二级域名部署 Ghost 所以存放在 vhost 下,若是一级目录,一般存放在/usr/local/nginx/conf/下
一、查找表中多余的重复记录,重复记录是根据单个字段(Id)来判断 select * from 表 where Id in (select Id from 表 group byId having count(Id) > 1)
二、删除表中多余的重复记录,重复记录是根据单个字段(Id)来判断,只留有 rowid 最小的记录 DELETE from 表 WHERE (id) IN ( SELECT id FROM 表 GROUP BY id HAVING COUNT(id) > 1) AND ROWID NOT IN (SELECT MIN(ROWID) FROM 表 GROUP BY id HAVING COUNT(*) > 1);
三、查找表中多余的重复记录(多个字段) select _from 表 a where (a.Id,a.seq) in(select Id,seq from 表 group by Id,seq having count(_) > 1)
四、删除表中多余的重复记录(多个字段),只留有 rowid 最小的记录 delete from 表 a where (a.Id,a.seq) in (select Id,seq from 表 group by Id,seq having count(_) > 1) and rowid not in (select min(rowid) from 表 group by Id,seq having count(_)>1)
五、查找表中多余的重复记录(多个字段),不包含 rowid 最小的记录 select _from 表 a where (a.Id,a.seq) in (select Id,seq from 表 group by Id,seq having count(_) > 1) and rowid not in (select min(rowid) from 表 group by Id,seq having count(*)>1)
因为映射表在程序 C 中并没有实际意义,需要将映射表的某些字段与 B 实际业务表的数据进行同步,可以采用 程序进行操作 或者 利用触发器和存储过程。
触发器示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
drop TRIGGER updateFromFed; #删除触发器,建立后需要删除才能修改
delimiter $$ #修改语句结束标志为$$ create TRIGGER insertFromFederated AFTER INSERT on federated_table for each ROW begin #状态=1执行插入操作 DECLARE de VARCHAR(128); set de = CONCAT(IFNULL(new.name,''),'-',IFNULL(new.age,''),'-',IFNULL(new.office,'')); if new.sts="1" THEN
INSERT into local1(id,name,description,sts) values (new.id,new.name,de,new.sts); INSERT into local2(id,name,office,sts) values (new.id,de,new.office,new.sts); END IF; END $$ delimiter ;
#mysql 下面的例子在把select into 的ID写死的时候设置参数值为空,但是在使用传进来的ID作为参数时设置参数值不为空。 show create procedure test;#查看 CALL test();#调用 drop procedure if exists test;#删除 in id VARCHAR(32) delimiter $$ create PROCEDURE test() begin DECLARE id VARCHAR(32); set id='8302'; DECLARE v_name VARCHAR(128)
SELECT local2.name INTO v_name from local2 where id = 5; select id,v_name; #INSERT into local2(id,name,office,sts) VALUES (id,des,'办公室','8'); end $$ delimiter ;
Beginning with MySQL 5.0.64, the FEDERATED storage engine is not enabled by default in the running server; to enable FEDERATED, you must start the MySQL server binary using the –federated option.
从 mysql 官方文档可以看出, 从 5.0.64 以后 Federated 存储引擎默认不开启, 但我们需要使用的时候, 需要手动开启