自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(211)
  • 收藏
  • 关注

转载 Apache配置转发

第一种:LoadModule proxy_module modules/mod_proxy.soLoadModule proxy_http_module modules/mod_proxy_http.soProxyRequests OffProxyPreserveHost onProxyPass /xxx/ http://xxx.com:8000/xxx/...

2019-09-01 13:45:00 324

转载 JS 由前端保存到文件

function doSave(value, type, name) { var blob; if (typeof window.Blob == "function") { blob = new Blob([value], {type: type}); } else { var BlobBuilder = window...

2019-09-01 13:42:00 639

转载 git 指定自己的sshkey

在服务器上生成ssh-key以后,需要把公钥放在github上,但是,这个公钥只能放在一个账户里,如果放在第二个账户里,就会提示这个key已经被用了,这是前提一个可能的场景是这样的:  你们公司有好几个项目都托管在git上,然后有一台公用的服务器,这时候,你的同事在服务器上搞了一套ssh-key,添加到他的项目里用于ssh验证拉代码了,这时候你也用到这台服务器,然后把公钥往...

2019-08-22 20:00:00 450

转载 JVM内存模型

转载于:https://www.cnblogs.com/413xiaol/p/11374197.html

2019-08-18 22:07:00 96

转载 JS给XMLHttpRequest添加filter

function XMLHttpRequestFilter(){ let base = XMLHttpRequest.prototype.open; let filter_list = []; let add = function(fun, key='_fn'){ filter_list.push([key, fun]) XMLHttpReq...

2019-07-18 20:37:00 93

转载 JS利用XMLHttpRequest拦截ajax请求

function XMLHttpRequestBreak(fun=()=>false){ let f = XMLHttpRequest.prototype.open; let add = function(){ XMLHttpRequest.prototype.open = function(...args){ check = fun(args...

2019-07-18 20:36:00 1371

转载 JS箭头函数的this

箭头函数的this看定义他的时候,他的外层有没有函数有:外层函数的this就是箭头函数的this无:箭头函数的this就是windowobj = {age:18, getAge: ()=>console.log(this.age)}obj.getAge()//undefined 定义的时候外层没有函数,指向windowobj = {age:18...

2019-07-06 12:28:00 74

转载 Babel编辑ES6代码

1.安装babel依赖npm install --save-dev @babel/core @babel/cli @babel/preset-envnpm install --save @babel/polyfill  2.用node初始化一个项目node init -y  初始化后的package.json长这样{ "n...

2019-07-04 23:00:00 66

转载 JS Generator yield

function show() { console.log('a') console.log('b')}show() // 普通函数function *show2() { console.log('1') yield console.log('2')}let genObj = show2() //返回的是指针对...

2019-07-03 21:33:00 179

转载 JS 类和继承

function User(name, pass) { this.name = name this.pass = pass}User.prototype.showName = function () { console.log(this.name)}User.prototype.showPass = function () { ...

2019-07-02 23:16:00 48

转载 使用http-server在本地搭建一个HTTP服务器

安装http-server在控制台中输入npm install http-server -g进行全局安装共享资源进入需要共享资源的目录,比如 D:\,然后在控制台中输入http-server关闭http-server在控制台按下 Ctrl + C 键即可停止服务转载于:https://www.cnblogs.co...

2019-06-25 23:48:00 521

转载 JS Promise

比如说要打印当前目录下a.txt b.txt c.txt种的内容,直接用读文件(回调)的方式来依次调用时存在问题的无法保证输出顺序:var fs = require("fs")fs.readFile('./a.txt', 'utf8', function(error, data){ if(error){ return console....

2019-06-25 22:51:00 60

转载 npm淘宝镜像

1.得到原本的镜像地址npm getregistry>https://registry.npmjs.org/设成淘宝的npm config set registry http://registry.npm.taobao.org/yarn config set registryhttp://registry.npm.taobao.org/2...

2019-06-16 09:47:00 56

转载 git rebase和merge

mergerebase\  转载于:https://www.cnblogs.com/413xiaol/p/10661561.html

2019-04-06 13:53:00 80

转载 git子模块submodule

添加submodule:  git submodule add 子模块git地址 把这个module放置的文件夹(这个文件夹须事先不存在) git submodule add http://xxx.xxx myModulepush到远程:  执行上一步会生成一个.gitmodules隐藏文件,和module放置的文件夹git add .git ...

2019-04-06 10:36:00 76

转载 git本地与远程分支

已经有远程分支,在本地检出,并且关联到远程分支  git checkout --trach origin/远程分支名  git checkout -b 本地分支名 origin/远程分支名$ git checkout --track origin/dev$ git checkout -b dev origin/dev没有远程分支,本地有一个分支,要...

2019-04-05 17:15:00 58

转载 git别名

git config --global alias.lg 'log --oneline --all --graph --decorate'转载于:https://www.cnblogs.com/413xiaol/p/10658931.html

2019-04-05 15:56:00 56

转载 git diff

git diff比暂存区与工作区的差别$ git init$ echo hello > a.txt$ cat a.txthello$ git add .$ git diff$ echo world >> a.txt$ cat a.txthelloworld$ git diffdiff --git a/a...

2019-04-01 22:59:00 67

转载 git查看某一个文件的修改历史

git blame filename:显示整个文件的每一行的详细修改信息:包括SHA串,日期和作者。其显示格式为:commit ID | 代码提交作者 | 提交时间 | 代码位于文件中的行数 | 实际代码当确定commit ID后,如果想要知道某次提交还改了什么:git show commitID转载于:https://www.cnblogs.com/413xiaol...

2019-03-20 22:14:00 218

转载 git标签

标签一旦打上那么在任何一个分支上都可以看到,标签不依赖于特定的分支显示所有标签:git tag查找标签:git tag -l 'v1.0*'查看某一个标签:git show v1.0.1轻量级标签:git tag v1.0.1带有附注的标签:git tag -a v1.0.2 -m 'release version'删除标签:git tag -d...

2019-03-20 22:02:00 44

转载 git从历史上的某一次提交处建立分支

$ git log --oneline --all --graph --decorate* 1efcf18 (HEAD -> master) 4 commit* 6a7ace8 3 commit* 3be5879 2 commit* 3d1a4d4 1 commit$ git branch* master$ git branch d...

2019-03-20 21:41:00 1106

转载 git版本回退

回退到上一个版本git reset --hard HEAD^git reset --hard HEAD~1回退到某一个版本git refloggit reset --hard commit_id准备环境:$ git init$ echo '1 commit' > test.txt$ git add .$ git ...

2019-03-20 21:04:00 83

转载 git mv与直接mv的区别

git mv行为:  1.创建一个和之前文件内容一样的文件,文件名为新的文件名  2.将原来的文件删除  3.将删除的文件添加到暂存区  4.将新建的文件添加到暂存区$ git mv a a1$ git statusOn branch masterChanges to be committed:   (use "git reset HEAD <fi...

2019-03-18 21:29:00 624

转载 git rm与直接rm的区别

git rm行为:  1.删除一个文件  2.将被删除的这个文件纳入缓存区$ git rm arm 'a'$ git statusOn branch masterChanges to be committed: (use "git reset HEAD <file>..." to unstage) deleted...

2019-03-18 20:36:00 164

转载 Linux安装git

1.查看是否已经安装了git:   git --version2.如果安装的版本不对,就卸载了:   yum remote git3.查看yum中git的版本信息:   yum info git4.如果是自己想要的版本,则可以直接通过yum进行安装:   yum install git。5.下载正确版本的git   进入https://github.com/git/git/rel...

2019-02-24 23:51:00 120

转载 hadoop开发MapReduce程序

准备工作:1.设置HADOOP_HOME,指向hadoop安装目录2.在window下,需要把hadoop/bin那个目录替换下,在网上搜一个对应版本的3.如果还报org.apache.hadoop.io.nativeio.NativeIO$Windows.access0错,把其中的hadoop.dll复制到c:\windows\system32目录依赖的jar...

2018-12-02 18:02:00 158

转载 运行hadoop自带的wordcount例子程序

1.准备文件 [root@master ~]# cat input.txt hello java hello python hello c hello java hello js hello html hello java [root@master ~]# hadoop fs -mkdir /input [root@master ~]# hadoop fs -put input.txt...

2018-11-14 23:07:00 112

转载 配置YARN

1.配置yarn-site.xml(所有节点)   路径:     /usr/local/hadoop-2.7.3/etc/hadoop/yarn-site.xml   配置项:     <property>       <!-- 指明resourcemanager在什么地方 -->       <name>yarn.resourceman...

2018-11-14 23:06:00 156

转载 分布式计算hadoop三大组件

设计原则:移动计算,而不是移动数据计算层:Map/Reduce调度层:YARN数据层:HDFS这三层之间没有必然的依赖性,只是经常这么搭配,而且都是hadoop那个包里一起安装的,三层都可以独立运行,某一层或者某两层换成其他的而另外两层或者一层不换也是可以的YARN 调度系统   ResourceManager   NodeManagerHDFS 存放数据   NameN...

2018-11-14 23:02:00 264

转载 访问HDFS报错:org.apache.hadoop.security.AccessControlException: Permission denied

import org.apache.hadoop.conf.Configuration;import org.apache.hadoop.fs.FileSystem;import org.apache.hadoop.fs.Path;public class TestHDFS { public static void main(String[] args) t...

2018-11-12 23:36:00 149

转载 访问hdfs里的文件

准备工作:  给hdfs里上传一份用于测试的文件   [root@master ~]# cat hello.txt   hello 1  hello 2  hello 3  hello 4  [root@master ~]# hadoop fs -put ./hello.txt /  [root@master ~]# hadoop fs -ls /  Found 1 item...

2018-11-12 23:08:00 316

转载 hadoop namenode

存储文件系统元数据,例如:文件目录结构,不同文件的分块情况,每块存储在那个节点,权限等这些元数据全部存储在内存中,所以,namenode要求内存比较大hdfs在存文件的时候会按照块存储,每一块默认128M如果存储的文件很小,他在hdfs里也会占用128M,所以hdfs适合存储大块的数据如果文件大于128M,文件将会被分成多个块存储。hdfs中每个块会默认备份2份,算上...

2018-11-10 11:52:00 61

转载 Linux ssh面密码登录

1.生成自己的公钥和私钥  ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa  进入~/.ssh目录看多了两个文件:id_rsa id_rsa.pub 其中一个是公钥一个是私钥2.把自己的公钥发送到目标主机上  ssh-copy-id 192.168.0.105  这时候需要输入一次密码  到目标主机上看,会发现多了一个auth...

2018-11-10 10:55:00 93

转载 Linux服务管理(开启关闭防火墙)

1、firewalld的基本使用启动: systemctl start firewalld关闭: systemctl stop firewalld查看状态: systemctl status firewalld开机禁用 : systemctl disable firewalld开机启用 :systemctl enable firewalld2....

2018-11-10 10:14:00 136

转载 启动hadoop集群

1.配置core-site.xml(每个节点上都要配置)   路径:     /usr/local/hadoop-2.7.3/etc/hadoop/core-site.xml   配置项1:     name: fs.defaultFS     value: hdfs://master的地址:端口  作用:    告诉所有机器master的相关信息   例如:     &lt...

2018-11-10 09:33:00 140

转载 Linux设置HostName

hostnamectl set-hostname xiaol转载于:https://www.cnblogs.com/413xiaol/p/9937831.html

2018-11-10 00:36:00 72

转载 安装hadoop

依赖:  1.jdk    jdk-8u91-linux-x64.rpm  2.hadoop  hadoop-2.7.3.tar.gz把这两个依赖放到/usr/local/ 下安装JDK  这里直接用rpm安装    rpm -ivhjdk-8u91-linux-x64.rpm  安装好以后,会在 /usr目录下建立一个 java的文件夹,里面...

2018-11-09 23:42:00 40

转载 VM和Windows Ping不通

连接模式:桥接Linux上1.修改 /etc/sysconfig/network-scripts/ifcfg-enp0s3 文件 ONBOOT=yes2.service network restartWindows上打开windo防火墙->高级设置->入站规则->找到“公用”的“文件和打印共享(回显请求 – ICMPv4-In)”规则,右击启用规则转载于:...

2018-11-08 23:59:00 82

转载 项目管理者的职业病

项目管理者的职业病时间;周末下午地点:家人物:你,你老婆,你6个月大的孩子事件:买些日用品,菜等1.分析一下,目前家里(需求分析)2.准备清单,一式两份,不同颜色,同类东西写在一起(迅速找到东西,提高效率),优先级排列(砍需求用)3.估算一下购物清单,大概会花多少钱(成本估算)4.选择:去超市还是网上购物?(利弊分析)(去超市可以在路上顺便做团建,团建可以不用那么形式...

2018-09-18 21:52:00 75

转载 Spring Boot启动流程

1:判断是否是web环境2:加载classpath下所有的META-INF/spring.factories  ApplicationContextInitializer3:加载classpath下所有的META-INF/spring.factories  ApplicationListener4:推断main方法所在的类5:开始执行run方法6:设置java.awt...

2018-05-26 13:20:00 43

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除