- 博客(5)
- 资源 (6)
- 收藏
- 关注
原创 C/C++中,多个指针指向同一个内存,只能free一次
#include<stdio.h>#include<malloc.h>int main(){ printf("hello main\n"); int N = 1000; int* p1 = (int*)malloc(N * sizeof(int)); int* p2 = p1; //同一个内存地址只能free一次( free(p1);和free(p2...
2018-11-22 10:14:54 3306
原创 ubuntu更新源为国内
1、备份源文件sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak2、编辑sources.list,用新的源文件替换sudo gedit /etc/apt/sources.list清华数据源地址:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/自行选择相应的版本3、更新源:...
2018-11-14 16:11:35 181
原创 ubuntu16安装NFS服务
1、安装NFSsudo apt install nfs-kernel-server2、创建并设置共享目录mkdir /home/zhenglf/nfssudo gedit /etc/exports在最后一行加入/home/zhenglf/nfs *(rw,sync,no_root_squash)各段表达的意思如下,根据实际进行修改/home :共享的目录* ...
2018-11-14 15:58:08 659
转载 Win10下python3和python2同时安装并解决pip共存问题
特别说明,本文是在Windows64位系统下进行的,32位系统请下载相应版本的安装包,安装方法类似。 使用python开发,环境有Python2和 python3 两种,有时候需要两种环境切换使用,下面提供详细教程一份。1、下载python3和python2 进入python官网,链接https://www.python.org/选择Downloads--->Wind...
2018-11-08 00:17:53 100
原创 内存指针
#include "stdio.h"#include "stdlib.h"int main() { int ROW = 3; int COL = 3; int* P = (int*)malloc(sizeof(int)*ROW*COL); int** PP = (int**)malloc(sizeof(int*)*ROW); for (int i=0; i<ROW; i...
2018-11-01 10:18:40 201
单层感知机的Matlab实现
2018-02-11
Perceptrons An introduction to computational geometry, expanded edition,1988
2018-02-11
CUDA并行排序(2)——二维Double型——分成大小两组
2017-12-14
CUDA并行排序(1)——整数
2017-12-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人