摘要:
eth0,eth1,eth2,代表网卡一,网卡二,网卡三 lo代表127.0.0.1,即localhost hw 代表hardware 硬件意思 ether 代表ethernet 以太网的意思 ifconfig配置网卡 配置网卡的IP地址 ifconfig eth0 192.168.0.1 netm
阅读全文
posted @ 2018-09-07 19:47
anobscureretreat
阅读(169)
推荐(0)
posted @ 2018-09-07 18:26
anobscureretreat
阅读(222)
推荐(0)
摘要:
开机,不停按delete,进入bios 进入boot,选择USB启动 重新开机,进入安装向导,下一步即可
阅读全文
posted @ 2018-09-07 18:24
anobscureretreat
阅读(1527)
推荐(0)
摘要:
pip install django==1.8.2
阅读全文
posted @ 2018-09-07 18:13
anobscureretreat
阅读(492)
推荐(0)
摘要:
设置Ubuntu 14.04右键终端的方法如下: 首先要安装一个包,即可在右键里面添加一个“打开终端”的菜单。 sudo apt-get install nautilus-open-terminal 注销Ubuntu系统或者重启即可.
阅读全文
posted @ 2018-09-07 17:47
anobscureretreat
阅读(389)
推荐(0)
摘要:
sudo apt-get update
阅读全文
posted @ 2018-09-07 17:45
anobscureretreat
阅读(1551)
推荐(0)
摘要:
对于父进程,fork函数返回了子程序的进程号,而对于子程序,fork函数则返回零,这样,对于程序,只要判定fork函数的返回值,就知道自己是处于父进程还是子进程中。
阅读全文
posted @ 2018-09-07 16:24
anobscureretreat
阅读(227)
推荐(0)
posted @ 2018-09-07 13:32
anobscureretreat
阅读(118)
推荐(0)
摘要:
roslaunch cartographer_ros cartographer_ref.launch resolution:=0.07 #下面是cartographer_ref.launch的内容 <arg name="resolution"/> <node name="cartographer_o
阅读全文
posted @ 2018-09-06 15:26
anobscureretreat
阅读(1812)
推荐(0)
摘要:
sudo service nginx stop 停止 sudo nginx 启动
阅读全文
posted @ 2018-09-04 12:28
anobscureretreat
阅读(505)
推荐(0)
摘要:
/etc/nginx/sites-enabled,修改该目录下的default文件, 将默认端口号80改为其他端口号, /etc/nginx/nginx.conf 文件配置里的80端口就会生效
阅读全文
posted @ 2018-09-04 12:27
anobscureretreat
阅读(1088)
推荐(0)
摘要:
一.修改settings文件 ALLOWED_HOSTS = ['*'] INSTALLED_APPS = [ 'corsheaders' ] #加入该app 安装django-cors-headers: #注释掉跨域的中间件CsrfViewMiddleware,SessionMiddleware要
阅读全文
posted @ 2018-08-24 12:05
anobscureretreat
阅读(266)
推荐(0)
摘要:
ajax部分: 要注意的是content-type,我之前用的是application/json,但是这么做的话,Django后台的是收不到数据的,如果你知道原因,欢迎留言 后台:
阅读全文
posted @ 2018-08-24 11:51
anobscureretreat
阅读(208)
推荐(0)
摘要:
@cherrypy.expose @cherrypy.tools.accept(media="application/json") #加入这个装饰器 @cherrypy.tools.json_out() @cherrypy.tools.json_in() def upload_image_data(
阅读全文
posted @ 2018-08-16 13:40
anobscureretreat
阅读(3433)
推荐(0)
摘要:
本文实例讲述了Python中列表元素转为数字的方法。分享给大家供大家参考,具体如下: 有一个数字字符的列表: numbers = ['1', '5', '10', '8'] 想要把每个元素转换为数字: numbers = [1, 5, 10, 8] 用一个循环来解决: new_numbers = [
阅读全文
posted @ 2018-08-15 21:07
anobscureretreat
阅读(116220)
推荐(9)
摘要:
server { listen 8811 default_server; root /opt/bp; # Make site accessible from http://localhost/ server_name localhost; location / { if ( $request_met
阅读全文
posted @ 2018-08-10 19:35
anobscureretreat
阅读(160)
推荐(0)
posted @ 2018-08-10 19:33
anobscureretreat
阅读(4313)
推荐(0)
摘要:
0.安装所有依赖项 sudo apt-get install -y google-mock libboost-all-dev libeigen3-dev libgflags-dev libgoogle-glog-dev liblua5.2-dev libprotobuf-dev libsuitesp
阅读全文
posted @ 2018-07-31 00:00
anobscureretreat
阅读(308)
推荐(0)
摘要:
生成 swap 文件系统 激活 swap 文件 如果想系统启动时自动挂载,那就修改 /etc/fstab 文件, 新增如下内容 转自:https://blog.csdn.net/qq_29573053/article/details/69665996
阅读全文
posted @ 2018-07-30 23:39
anobscureretreat
阅读(1824)
推荐(0)
摘要:
rostopic bw display bandwidth used by topic// rostopic delay display delay for topic which has header rostopic echo print messages to screen rostopic find find topics by type rostopic hz d...
阅读全文
posted @ 2018-07-26 20:21
anobscureretreat
阅读(432)
推荐(0)
摘要:
1.设置安装源 sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' 2.设置key sudo apt-
阅读全文
posted @ 2018-07-24 19:37
anobscureretreat
阅读(171)
推荐(0)
摘要:
Channels也可以用于将多个goroutine连接在一起,一个Channel的输出作为下一个Channel的输入。这种串联的Channels就是所谓的管道(pipeline)。下面的程序用两个channels将三个goroutine串联起来: 第一个goroutine是一个计数器,用于生成0、1
阅读全文
posted @ 2018-06-10 04:19
anobscureretreat
阅读(164)
推荐(0)
摘要:
如果说goroutine是Go语言程序的并发体的话,那么channels则是它们之间的通信机制。 一个channel是一个通信机制,它可以让一个goroutine通过它给另一个goroutine发送值信息。 每个channel都有一个特殊的类型,也就是channels可发送数据的类型。一个可以发送i
阅读全文
posted @ 2018-06-10 04:09
anobscureretreat
阅读(174)
推荐(0)
摘要:
clock服务器每一个连接都会起一个goroutine。在本节中我们会创建一个echo服务器,这个服务在每个连接中会有多个goroutine。大多数echo服务仅仅会返回他们读取到的内容,就像下面这个简单的handleConn函数所做的一样: 一个更有意思的echo服务应该模拟一个实际的echo的“
阅读全文
posted @ 2018-06-10 03:14
anobscureretreat
阅读(182)
推荐(0)
摘要:
网络编程是并发大显身手的一个领域,由于服务器是最典型的需要同时处理很多连接的程序,这些连接一般来自于彼此独立的客户端。 本小节,我们会讲解go语言的net包,这个包提供编写一个网络客户端或者服务器程序的基本组件,通信可以是使用TCP,UDP或者Unix domain sockets。 我们的第一个例
阅读全文
posted @ 2018-06-10 02:57
anobscureretreat
阅读(166)
推荐(0)
摘要:
Go语言中的并发程序可以用两种手段来实现。本章讲解goroutine和channel,其支持“顺序通信进程”(communicating sequential processes)或被简称为CSP。CSP是一种现代的并发编程模型,在这种编程模型中值会在不同的运行实例(goroutine)中传递,尽管
阅读全文
posted @ 2018-06-10 01:19
anobscureretreat
阅读(154)
推荐(0)
摘要:
1.添加PRIMARY KEY(主键索引) mysql>ALTER TABLE `table_name` ADD PRIMARY KEY ( `column` ) 2.添加UNIQUE(唯一索引) mysql>ALTER TABLE `table_name` ADD UNIQUE ( `column
阅读全文
posted @ 2018-05-30 13:36
anobscureretreat
阅读(130)
推荐(0)
摘要:
[root@1-min etc]# cat -n rsyslog.conf //显示所有行号(包括空行) [root@1-min etc]# cat -b rsyslog.conf //显示所有行号(但不包括空行) 或者: [root@1-min etc]# nl -ba rsyslog.conf
阅读全文
posted @ 2018-05-24 17:25
anobscureretreat
阅读(154)
推荐(0)
摘要:
debug为true ,不用设置static_root debug 为false ,设置static_root
阅读全文
posted @ 2018-05-24 13:46
anobscureretreat
阅读(323)
推荐(0)
摘要:
部署环境的搭建请看此博客https://blog.csdn.net/anifans9350/article/details/80145535 查看nginx.conf 文件, nginx文件(etc/nginx/nginx.conf)配置: 修改http里面的server: 注意location的s
阅读全文
posted @ 2018-05-24 13:02
anobscureretreat
阅读(1234)
推荐(0)
摘要:
查了一下是settings.py设置问题 # Static files (CSS, JavaScript, Images)# https://docs.djangoproject.com/en/1.10/howto/static-files/ STATIC_URL = '/static/' #这个指
阅读全文
posted @ 2018-05-23 23:40
anobscureretreat
阅读(287)
推荐(0)
摘要:
$(document).ready(function(e) { var counter = 0; if (window.history && window.history.pushState) { window.onpopstate = function () { window...
阅读全文
posted @ 2018-05-12 19:02
anobscureretreat
阅读(827)
推荐(0)
摘要:
1.django-admin startproject project_name(创建项目) 2.python manage.py startapp appname(创建应用) 3.python manage.py makemigrations(创建更改文件) 4.python manage.py
阅读全文
posted @ 2018-03-28 11:46
anobscureretreat
阅读(188)
推荐(0)
摘要:
1.安装python3.6(官网下载) 2.pip install virtualenv(安装虚拟环境) 3.virtualenv TestEnv(创建名为TestEnv的虚拟环境) 4.进入TestEnv\Scripts 5.输入.\activate.bat(启动虚拟环境) 6.输入.\deact
阅读全文
posted @ 2018-03-28 11:19
anobscureretreat
阅读(550)
推荐(0)
摘要:
#include <stdio.h> int main() { int i,j,k; printf("\n"); for(i=1;i<5;i++){ for(j=1;j<5;j++){ for (k=1;k<5;k++){ if (i!=k&&i!=j&&j!=k) printf("%d,%d,%d
阅读全文
posted @ 2018-01-21 18:23
anobscureretreat
阅读(257)
推荐(0)
摘要:
const int a;//声明一个常整型数 int const a;//声明一个常整型数 const int *a;//声明指向常整型数的指针,整型数不可修改,指针可以修改 int * const a;//声明指向整型数的常指针,整型数可以修改,指针不可以修改 int const * a cons
阅读全文
posted @ 2018-01-16 20:37
anobscureretreat
阅读(242)
推荐(0)
摘要:
有时候特别需要,个别网页要去掉横向滚动条和竖向滚动条,那该怎么去掉呢,很简单,看代码: 让竖条没有: <body style=`overflow:-Scroll;overflow-y:hidden` > </body> 让横条没有: <body style=`overflow:-Scroll;ove
阅读全文
posted @ 2017-03-20 17:03
anobscureretreat
阅读(4941)
推荐(0)
摘要:
nginx,uwsgi,部署django,静态文件不生效问题
阅读全文
posted @ 2017-03-16 19:04
anobscureretreat
阅读(5487)
推荐(0)
摘要:
3.5版本之后的会自动安装pip,所以我们直接从官网下载3.5.2,下载地址:https://www.python.org/ftp/python/ 下载以后,可以用命令解压,也可以右键进行解压, 切换目录 cd Python-3.5.2 准备安装 这里需要注意一下,我在make install的时候
阅读全文
posted @ 2017-03-07 21:07
anobscureretreat
阅读(5600)
推荐(0)
摘要:
python -m pip install --upgrade pip 升级pip python -m venv myenv Python3.5自带venv,只需执行即可创建,其中myenv是创建的虚拟环境名。 Windows下命令行myenv\Scripts\activate.bat进入环境,使用
阅读全文
posted @ 2017-03-06 21:00
anobscureretreat
阅读(136)
推荐(0)