Zzx Blog

Since 2017


  • 首页

  • 标签

  • 分类

  • 归档

  • 公益404

  • 搜索

Git使用教程

发表于 2017-11-22 | 分类于 Git

##安装git

  • git官网下载安装,一路下一步就ok
    ##windows配置git SSH服务
  • cmd运行ssh-keygen -t rsa -C “你的邮箱地址”; (即github的登陆地址)
  • 一路回车,文件会存在C:\Users\Administrator.ssh 目录下
  • 记事本打开id_rsa.pub 文件,并复制内容
  • 登陆github,在用户setting —— SSH and GPG keys 下点击 New SSHkey,填入title(自定义),粘贴文件内容到key,然后点击Add SSH key
  • 打开gitbash 输入
    git config –global user.name “你的用户名” git config –global user.email “你的邮箱”
  • 配置完毕
    阅读全文 »

hexo-next使用教程

发表于 2017-11-22 | 分类于 Hexo

##使用github进行多客户端编辑博客

  1. 创建仓库,http://CrazyMilk.github.io;
  2. 创建两个分支:master 与 hexo;
  3. 设置hexo为默认分支(因为我们只需要手动管理这个分支上的Hexo网站文件);
  4. 使用git clone git@github.com:CrazyMilk/CrazyMilk.github.io.git拷贝仓库;
  5. 在本地http://CrazyMilk.github.io文件夹下通过Git bash依次执行npm install hexo (npm install -g hexo)全局安装hexo、hexo init、npm install 和 npm install hexo-deployer-git(此时当前分支应显示为hexo);
  6. 修改_config.yml中的deploy参数,分支应为master;
  7. 依次执行git add .、git commit -m “…”、git push origin hexo提交网站相关的文件;8. 执行hexo g -d生成网站并部署到GitHub上。
    阅读全文 »

文件MD5

发表于 2017-11-22 | 分类于 Java

*根据文件获取MD5

阅读全文 »

MultipartFile上传——使用详解

发表于 2017-11-22 | 分类于 Java

##上传文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@RequestMapping("/uploadfile")
@ResponseBody
private message uploadfile(@RequestParam("attachment") MultipartFile[] multipartfiles, HttpServletRequest request) throws IOException {
MultipartHttpServletRequest mulReq = (MultipartHttpServletRequest) request;
/*MultipartFile file = mulReq.getFile("attachment");*/
String savePath = "E:\\ludy\\mdm\\attachment";//本地地址
String filename = "";
message retmsg = new message();//返回对象

try {
if (null != multipartfiles && multipartfiles.length > 0) {
//遍历并保存文件
for (MultipartFile file : multipartfiles) {
String originname = file.getOriginalFilename();
//String [] suffix=originname.split(".");
String prefix = originname.substring(originname.lastIndexOf(".") + 1);
filename = mD5(file);
file.transferTo(new File(savePath + "\\" + filename + "." + prefix));
retmsg.setRet("200");
retmsg.setMsg(filename + "." + prefix);//后缀
}
}
} catch (Exception e) {
e.printStackTrace();
}
return retmsg;

}

阅读全文 »

Httpclient使用详解

发表于 2017-11-22 | 分类于 Java

##post请求

阅读全文 »

Markdown语法

发表于 2017-11-21 | 分类于 Hexo

#Markdown

###222
-qqq
-123

1.zzx
2.112

个人

图片

阅读全文 »
1…67
Banksy Zhuang

Banksy Zhuang

66 日志
36 分类
40 标签
Github E-Mail
© 2017 — 2024 Banksy Zhuang
本站已运行