- 博客(211)
- 收藏
- 关注
转载 Apache配置转发
第一种: LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so ProxyRequests Off ProxyPreserveHost on ProxyPass /xxx/ http://xxx.com:8000/xxx/...
2019-09-01 13:45:00
452
转载 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
769
转载 git 指定自己的sshkey
在服务器上生成ssh-key以后,需要把公钥放在github上,但是,这个公钥只能放在一个账户里,如果放在第二个账户里,就会提示这个key已经被用了,这是前提 一个可能的场景是这样的: 你们公司有好几个项目都托管在git上,然后有一台公用的服务器,这时候,你的同事在服务器上搞了一套ssh-key,添加到他的项目里用于ssh验证拉代码了,这时候你也用到这台服务器,然后把公钥往...
2019-08-22 20:00:00
571
转载 JVM内存模型
转载于:https://www.cnblogs.com/413xiaol/p/11374197.html
2019-08-18 22:07:00
146
转载 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
129
转载 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
1529
转载 JS箭头函数的this
箭头函数的this看定义他的时候,他的外层有没有函数 有:外层函数的this就是箭头函数的this 无:箭头函数的this就是window obj = {age:18, getAge: ()=>console.log(this.age)} obj.getAge() //undefined 定义的时候外层没有函数,指向window obj = {age:18...
2019-07-06 12:28:00
114
转载 Babel编辑ES6代码
1.安装babel依赖 npm install --save-dev @babel/core @babel/cli @babel/preset-env npm install --save @babel/polyfill 2.用node初始化一个项目 node init -y 初始化后的package.json长这样 { "n...
2019-07-04 23:00:00
102
转载 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
230
转载 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
71
转载 使用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
594
转载 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
93
转载 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
85
转载 git rebase和merge
merge rebase \ 转载于:https://www.cnblogs.com/413xiaol/p/10661561.html
2019-04-06 13:53:00
117
转载 git子模块submodule
添加submodule: git submodule add 子模块git地址 把这个module放置的文件夹(这个文件夹须事先不存在) git submodule add http://xxx.xxx myModule push到远程: 执行上一步会生成一个.gitmodules隐藏文件,和module放置的文件夹 git add . git ...
2019-04-06 10:36:00
110
转载 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
93
转载 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
85
转载 git diff
git diff 比暂存区与工作区的差别 $ git init $ echo hello > a.txt $ cat a.txt hello $ git add . $ git diff $ echo world >> a.txt $ cat a.txt hello world $ git diff diff --git a/a...
2019-04-01 22:59:00
96
转载 git查看某一个文件的修改历史
git blame filename:显示整个文件的每一行的详细修改信息:包括SHA串,日期和作者。 其显示格式为:commit ID | 代码提交作者 | 提交时间 | 代码位于文件中的行数 | 实际代码 当确定commit ID后,如果想要知道某次提交还改了什么:git show commitID 转载于:https://www.cnblogs.com/413xiaol...
2019-03-20 22:14:00
263
转载 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
69
转载 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
1301
转载 git版本回退
回退到上一个版本 git reset --hard HEAD^ git reset --hard HEAD~1 回退到某一个版本 git reflog git reset --hard commit_id 准备环境: $ git init $ echo '1 commit' > test.txt $ git add . $ git ...
2019-03-20 21:04:00
114
转载 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
724
转载 git rm与直接rm的区别
git rm 行为: 1.删除一个文件 2.将被删除的这个文件纳入缓存区 $ git rm a rm 'a' $ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) deleted...
2019-03-18 20:36:00
210
转载 Linux安装git
1.查看是否已经安装了git: git --version2.如果安装的版本不对,就卸载了: yum remote git 3.查看yum中git的版本信息: yum info git4.如果是自己想要的版本,则可以直接通过yum进行安装: yum install git。 5.下载正确版本的git 进入https://github.com/git/git/rel...
2019-02-24 23:51:00
214
转载 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
209
转载 运行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
160
转载 配置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
202
转载 分布式计算hadoop三大组件
设计原则:移动计算,而不是移动数据 计算层:Map/Reduce调度层:YARN数据层:HDFS 这三层之间没有必然的依赖性,只是经常这么搭配,而且都是hadoop那个包里一起安装的,三层都可以独立运行,某一层或者某两层换成其他的而另外两层或者一层不换也是可以的 YARN 调度系统 ResourceManager NodeManagerHDFS 存放数据 NameN...
2018-11-14 23:02:00
306
转载 访问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
205
转载 访问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
359
转载 hadoop namenode
存储文件系统元数据,例如:文件目录结构,不同文件的分块情况,每块存储在那个节点,权限等 这些元数据全部存储在内存中,所以,namenode要求内存比较大 hdfs在存文件的时候会按照块存储,每一块默认128M 如果存储的文件很小,他在hdfs里也会占用128M,所以hdfs适合存储大块的数据 如果文件大于128M,文件将会被分成多个块存储。 hdfs中每个块会默认备份2份,算上...
2018-11-10 11:52:00
81
转载 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
138
转载 Linux服务管理(开启关闭防火墙)
1、firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status firewalld 开机禁用 : systemctl disable firewalld 开机启用 :systemctl enable firewalld 2....
2018-11-10 10:14:00
177
转载 启动hadoop集群
1.配置core-site.xml(每个节点上都要配置) 路径: /usr/local/hadoop-2.7.3/etc/hadoop/core-site.xml 配置项1: name: fs.defaultFS value: hdfs://master的地址:端口 作用: 告诉所有机器master的相关信息 例如: <...
2018-11-10 09:33:00
183
转载 Linux设置HostName
hostnamectl set-hostname xiaol 转载于:https://www.cnblogs.com/413xiaol/p/9937831.html
2018-11-10 00:36:00
98
转载 安装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
62
转载 VM和Windows Ping不通
连接模式:桥接 Linux上1.修改 /etc/sysconfig/network-scripts/ifcfg-enp0s3 文件 ONBOOT=yes2.service network restart Windows上打开windo防火墙->高级设置->入站规则->找到“公用”的“文件和打印共享(回显请求 – ICMPv4-In)”规则,右击启用规则 转载于:...
2018-11-08 23:59:00
108
转载 项目管理者的职业病
项目管理者的职业病 时间;周末下午地点:家人物:你,你老婆,你6个月大的孩子事件:买些日用品,菜等 1.分析一下,目前家里(需求分析) 2.准备清单,一式两份,不同颜色,同类东西写在一起(迅速找到东西,提高效率),优先级排列(砍需求用) 3.估算一下购物清单,大概会花多少钱(成本估算) 4.选择:去超市还是网上购物?(利弊分析)(去超市可以在路上顺便做团建,团建可以不用那么形式...
2018-09-18 21:52:00
99
转载 Spring Boot启动流程
1:判断是否是web环境 2:加载classpath下所有的META-INF/spring.factories ApplicationContextInitializer 3:加载classpath下所有的META-INF/spring.factories ApplicationListener 4:推断main方法所在的类 5:开始执行run方法 6:设置java.awt...
2018-05-26 13:20:00
68
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人