在青岛思齐软件记录的笔记

来广州有15个月了,全部分享做前端所学的知识记录。(主要是百度解决问题的所有网址,以及操作代码)

1.mongodb

https://www.mongodb.org/dl/linux/x86_64 //mongodb下载Linux
https://www.jianshu.com/p/0eafa1e68995 ///安装MongoDB
https://www.cnblogs.com/Lovebugs/p/8606000.html ///安装MongoDB

安装mongodb后运行命令:

1
mongod //运行mongodb数据库
1
mongo //执行操作
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
29
30
31
32
33
34
35
36
db.createUser( { "user" : "cms",
"pwd": "123456",
"customData" : { employeeId: 123456 },
"roles" : [ ] },
{ w: "majority" , wtimeout: 5000 })//创建一个用户
> use admin//登录使用admin数据库
switched to db admin  
>db.createUser(
{
user: "root",
pwd: "rootpwd",
roles: [ {role:"root", db:"admin"} ]
}
)//创建admin管理库的用户
> use admin #1数据库切换至admin管理库
switched to db admin
> db.auth('root', 'rootpwd') #2验证root用户
1  
> use mydb #3切换至业务库 在该库创建访问该库的用户
>db.createUser( #4 创建用户
{
user: "mydbDBA",
pwd: "123321",
roles: [ {role:"dbOwner", db:"mydb"} ]
}
)
db.createUser(
{
user: "wmz",
pwd: "wmz",
roles: [ {role:"dbOwner", db:"test"} ]
}
)

adminmongo管理mongodb的工具

https://segmentfault.com/a/1190000015752836 //安装adminMongo
adminmongo操作(linux&windows命令):

1
2
3
4
5
npm install -g admin-mongo //两个操作系统都用的安装命令
linux cd /usr/local/node/node-v6.11.2-linux-x64/lib/node_modules/admin-mongo
windows cmd命令行进入C:\Users\wmz\AppData\Roaming\npm\node_modules\admin-mongo //windows的adminmongo执行位置
npm start //运行

127.0.0.1:1234 //进入界面
mongodb://127.0.0.1:27017 //进入数据库操作界面

mongodb用到的命令

https://www.cnblogs.com/wpjzh/p/5999363.html //MongoDB基本命令

node框架里有操作mongodb数据库的插件mongoose,安装后可以根据文档进行CURD(增删查改)的操作

https://www.jianshu.com/p/2f54b90efe15 //mongoose命令

http://blog.csdn.net/qq_36453032/article/details/72875563//连表查询

导出数据表

1
2
3
cd qq.csv所在位置
iconv -f gbk -t UTF-8 qq.csv > qq1.csv
mongoimport -d sbuy -c commoditys --type csv --headerline --file qq1.csv

//nodejs将Excel中的数据导入MongoDB
https://alfierichou.github.io/2017/12/13/nodejs%E5%B0%86Excel%E4%B8%AD%E7%9A%84%E6%95%B0%E6%8D%AE%E5%AF%BC%E5%85%A5MongoDB/
mongoexport -h 47.254.42.191 -p 27017 -d sbuy -c admins–type=csv -f “aname,telephone,idcard” –out F:\aaa.csv

2.express

express框架是比较成熟多人用的node框架,学习这个框架主要是启动文件配置,路由,控制器,ORM框架(操作数据库的中间件如mongodb的mongoose,mysql的Sequelize),其他的node框架也类似分为这些知识。

1
2
3
4
5
6
7
8
9
10
11
12
//允许跨域 app.js
app.all('*',function (req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Content-Type,Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild');
res.header('Access-Control-Allow-Methods', 'PUT, POST, GET, DELETE,OPTIONS');
if (req.method == 'OPTIONS') {
res.send(200);
}
else {
next();
}
});

3.electron

electron使用也就知道它是一个做桌面应用的框架,现在使用github开源的“想学吗“这个写文章的桌面应用写股市的日记和读书心得,可以用,给它一个赞!

1
2
3
4
5
6
7
8
9
10
11
12
electron-packager . firsteletron --win --out ../firsteleApp --arch=x64 --version=0.0.1 --electron-version=1.4.13//打包
//桌面最大化
const {app, globalShortcut, BrowserWindow} = require('electron')
let mainWindow;
app.on('ready', () => {
mainWindow = new BrowserWindow({width: 800, height: 600})
mainWindow.setFullScreen(true);
globalShortcut.register('ESC', () => {
mainWindow.setFullScreen(false);
})
})

http://blog.csdn.net/j_bleach/article/details/78513282// vue项目生成桌面应用

4.vue

vue用了快两年了,真的容易上手文档易懂,学习成本不高,这样和其他程序员没有差距(别人也容易会),能够使用这个框架的技术含金量不大,面试问的也是百度得到的model的实现原理。

https://blog.csdn.net/qq_37026273/article/details/80192962//vue-cli npm run build打包图片路径问题

https://www.cnblogs.com/zlbrother/p/7823380.html //vue-cli自适应布局

https://blog.csdn.net/hjh15827475896/article/details/78207066 //vue插件

https://blog.csdn.net/qq_39725309/article/details/81558332 //@vue/cli 现在使用3.0版本

http://www.cnblogs.com/zyulike/p/10209562.html // vue||egg-socket.io

vue-router路由技巧

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<route-link :to="{name:'music',query:{id=6}}"></route-link>//vue路由标签跳转
//router.js
嵌套路由:{
name:music,
path:'/music',
component:Music,
children:[
{name:'music_oumei',path:'oumei',component:Oumei},// /oumei是绝对路径,把/music替换/oumei才切换路由,oumei是相对路径,输入/music/oumei切换路由
{name:'music_guochan',path:'guochan',component:Guochan},
]
}
music组件里加
<route-link :to="{name:'music_oumei'}">欧美音乐</route-link>
<route-link :to="{name:'music_guochan'}">国产音乐</route-link>
<router-view></router-view>

https://www.cnblogs.com/XHappyness/p/7919610.html //vue使用axios时在IE浏览器promise错误 :1.  npm install babel-polyfill –save  2.  在main.ts中 import “babel-polyfill”

https://blog.csdn.net/qq_36911154/article/details/78152538 //响应式布局

https://webgradients.com/ //渐变色

5.think.js

http://www.uedsc.com/322603.html //thinkjs
https://www.jianshu.com/p/7481d35a1dd6 //thinkjs的一些方法

cmswing(相关脚手架)

https://newsn.net/say/cmswing-install.html //cmswing安装

6.CSS

1
2
3
4
5
.nav::after{content:'';display:block;clear:both;} //清除浮动流
p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} //单行文字溢出
p{width:300px;height:30px;line-height:15;overflow:hidden;} //多行文字溢出
方案1{text-indent:200px;white-space:nowrap;overflow-hidden;} 方案2{width:190px;height:0px;padding-top:90px;overflow:hidden;bgi:url(...);bgsize:190px 90px;/} //css因网速慢而不加载样式情况操作 p标签不能套块标签 a标签不能套a标签
height: calc(100vh - 100px); //css3元素等于屏幕高度

7.react

react在动脑学院的高级前端课程学了一课程,还需要项目练,以后会更好!

https://segmentfault.com/a/1190000012921279 //react入门 import * as xxx from xxx //对没有export 的xxx文件 以as别名xxx使用

linux

1
2
3
4
ps -ef|grep node //查看node进程 node可改为你相查的进程
netstat -anp|grep 80 //查看使用80端口的进程,80改为你想查的端口都行
如果想结束掉express再启动,则 使用kill 0000(进程号pid)命令把进程杀掉
kill XXX 有 node app.js 的一行数字

niginx

https://blog.csdn.net/yougoule/article/details/78186138 //nginx
https://www.cnblogs.com/Miss-mickey/p/6734831.html //反向代理配置

1
cd /usr/local/nginx/sbin 执行./nginx -s reload

AB压力测试

https://blog.csdn.net/qq_26525215/article/details/79182674 //AB测试
ab -n 100 -c 10 -v 4 -p postdata.txt -T application/x-www-form-urlencoded “http://47.254.42.191:8080/admin/booklist
ab -n 100 -c 10 -p postdata.txt http://mianmianshi.com:8088/index.html 请求100 并发10
https://blog.csdn.net/u010889390/article/details/50561293

https://www.cnblogs.com/apolloren/p/8832868.html //phpstudy linux安装

宝塔

宝塔是个很好用的软件集合(专业名称一下忘了!#.#),非常省事,对于linux服务器操作nginx,阿帕奇,数据库,拍黄片,上传文件统统能搞定!!!

http://www.bt.cn/btcode.html //宝塔安装

redis

https://blog.csdn.net/u012343297/article/details/78839063 //windows安装Redis
https://www.cnblogs.com/limit1/p/9045183.html //linux安装Redis

vpn

https://github.com/allenking1028/ss/issues/1 //服务器翻墙

下面连接是要翻墙看,临时可以用蓝灯免费的!!!

https://youtu.be/xrbviAfagrU ///视频教程

测速度(100以内): ipip.net 工具>traceRoute

一些命令

systemctl restart nginx.service
systemctl status httpd.service
systemctl start mongod.service
查看mongo安装位置 whereis mongod
查看修改配置文件 : vim /etc/mongod.conf
3.启动MongoDB
启动mongodb :systemctl start mongod.service
停止mongodb :systemctl stop mongod.service

C\

C#做了两个窗体应用程序,是工程机控制led灯亮灭,存放架开关的项目,很多问题都是直接百度,这个事情我觉得是黑历史^()^·

sqlite

https://blog.csdn.net/weixin_41656968/article/details/80338626 //sqlite
https://blog.csdn.net/a03910/article/details/82856194 //链接sqlite数据库
https://www.cnblogs.com/gates/p/3936974.html //数据库语句

杂项

https://blog.csdn.net/xjc_gx/article/details/38228959 //读卡

http://www.win7zhijia.cn/jiaocheng/win7_14019.html //win7直接进桌面
https://blog.csdn.net/zhouyingge1104/article/details/74853193 //开机自启

https://www.cnblogs.com/e-cat/p/9474646.html //语音

JavaScript

JS现在是很流行的编程语言,能搞web前端开发,后台服务(node.js),做游戏(cocos),webgl(three.js),学好这门语言走遍天下都不怕(划重点啦)!

es6

http://es6.ruanyifeng.com/#docs/promise //阮大神的es6入门,promise是异步请求的原理(面试会问哟)

正则

http://www.cnblogs.com/xinwusuo/p/5948908.html //正则

1
let reg = /^.*4.*$/; //数字选出有4的正则

node.js

npm install font-spider -g //安装根据网页的文字生成对应 的字体

three.js

three.js是网页渲染3D图形的框架,webgl现在好多人用,学习遇到问题加这个群585582495多问,虽然答案会沉没在吹水的文字里,但问了总比没问好~

https://www.cnblogs.com/zhnblog/archive/2017/07/12/7153781.html //three

https://www.jianshu.com/p/906072e60197 //加载模型

egg.js

egg.js是阿里的基于koa的插件齐全并且很受欢迎的node框架,要学就先学这个!

http://www.cnblogs.com/zyulike/p/10209562.html // vue||egg-socket.io

杂项

bitbug.net //ico生成网站

–disable-web-security –user-data-dir //本地运行解决跨域

https://blog.csdn.net/wfg18801733667/article/details/52159830 //优化网页加载速度

https://www.cnblogs.com/lml2017/p/9953429.html //flexible px => rem

https://segmentfault.com/a/1190000011145364 //跨域

PHP

php是因为有个项目是有关*企秀的源码,后台是php写的,项目维护需要接触了一些

https://newsn.net/say/centos-php72-yum.html //安装php

微信开发

微信开发就跟着文档做就ok了,孰能生巧这是真理,刚开始不懂很正常解决方案就是多看!!!

https://segmentfault.com/a/1190000011540768 //微信支付1

https://segmentfault.com/a/1190000011556584 //微信支付2
https://blog.csdn.net/wclimb/article/details/79327988 //node.js微信支付

https://www.cnblogs.com/deng-cc/p/7183239.html //微信支付方法

https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_1 //微信小程序支付
https://www.jianshu.com/p/72f5c1e3f8a5 //小程序支付

博客

现在使用的是很瘦欢饮的博客框架hexo

https://blog.csdn.net/wh211212/article/details/75004199 //GitHub博客教程
https://www.bilibili.com/video/av12931967 //个人博客hexo视频教程

https://liuliansp.github.io/ //刘麟的博客(搞爬虫)