自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(65)
  • 资源 (1)
  • 收藏
  • 关注

转载 python 画图--简单开始及折线图

python 画图--简单开始及折线图

2017-06-19 20:52:03 1260

转载 openmp 学习

OpenMP并行程序设计——for循环并行化详解OpenMP: OpenMP嵌套并行Parallel OpenMP loop with break statement【OpenMP】并行的中断,解决error C3010: “break”: 不允许跳出 OpenMP 结构化块

2017-06-19 20:50:04 855

原创 xcode+opengl

http://www.xuebuyuan.com/1470579.html#title-1http://web.eecs.umich.edu/~sugih/courses/eecs487/glut-howto/

2017-06-19 03:53:23 712

原创 xcode+openmp

参考链接https://stackoverflow.com/questions/38971394/brew-install-clang-omp-not-workinghttp://blog.csdn.net/lkj345/article/details/53148709https://clang-omp.github.io/要先把openmp安装到mac上,网上讲了一些

2017-06-19 03:18:54 2397

原创 数组指针和指针数组

这次在写并行计算作业的时候,遇到一个问题,就是二维数组需要MPI_BcastMPI_Bcast只能发送连续空间里的内容,因此需要定义连续的空间,我的做法是:double* U_storage=new double[M*N];double** U_t= new double*[M];for(int i = 0; i   U_t[i] = &U_storage[i * N];

2017-06-17 15:39:27 403

原创 多线程服务器(一个服务器处理多个客户端,端口复

服务器端#undef UNICODE#define WIN32_LEAN_AND_MEAN#include "stdafx.h"#include #include #include #include #include #define DEFAULT_PORT "27015"#define DEFAULT_BUFLEN 1024

2017-03-16 18:10:31 1166

原创 try

#undef UNICODE#include "stdafx.h"#include #include #include #include #include #include #include #define DEFAULT_PORT "27015"//#define INTERNET_PORT "27014"#define DEFAULT_BUFLEN

2017-03-15 20:40:53 288

转载 success1

#include "stdafx.h"#define  _WINSOCK_DEPRECATED_NO_WARNINGS#include  #include  #define  MAXBUFLEN  20480 #define  HTTPADDLEN 50 #define  TIMEWAIT   2000 #pragma comment(lib,"ws2_32.lib")

2017-03-15 19:02:23 493

转载 success

#include "stdafx.h"#define _WINSOCK_DEPRECATED_NO_WARNINGS#include #include #define MAXBUFLEN 20480 #define HTTPADDLEN 50 #define TIMEWAIT 2000 #pragma comment(lib,"ws2_32.lib")SOCKET Global[1000];//#

2017-03-15 15:54:16 441

转载 mpi环境搭建

http://blog.sina.com.cn/s/blog_bad174440101ihqg.html

2017-03-15 12:41:02 338

转载 tmpddd

#include "stdafx.h" #include #include #include #include #include //#include #pragma comment ( lib , "ws2_32" )#define MAXLINE 10000// 声明函数// 获取文件类型void GetFil

2017-03-15 01:24:54 239

原创 c++ 多线程

#undef UNICODE//#define WIN32_LEAN_AND_MEAN#include "stdafx.h"#include #include //#include //#include #include #include #include #include #include

2017-03-15 01:00:09 214

原创 dd

#undef UNICODE#define WIN32_LEAN_AND_MEAN#include "stdafx.h"#include #include #include #include #include #define DEFAULT_PORT "27015"#define DEFAULT_BUFLEN 10024#pragma com

2017-03-14 18:33:06 322

原创 SOCKET

#include "stdafx.h"#include #include #include #include #include #define DEFAULT_PORT "27015"#define DEFAULT_BUFLEN 1024#pragma comment(lib, "Ws2_32.lib")int main(int argc, char *

2017-03-14 16:03:22 430

原创 queue pair

#include #include #include #include using namespacestd;int main (){    queue<pairint,int> > myq;    myq.push(make_pair(10,20));    pairint ,int> myp =  myq.front();

2017-02-06 14:12:15 1561

原创 最近用到的命令

正则表达式搜索grep -E "uintT[^*]" . -r -n

2016-11-09 23:01:07 299

原创 Makefile自动生成头文件依赖

以makefile编译c工程为例进行解释。在网上搜到的相关教程如下:http://blog.sina.com.cn/s/blog_4b3c1f950102dxh4.htmlhttp://blog.csdn.net/liangkaiming/article/details/6267357http://luzhi1024.blog.51cto.com/8845546/16507

2016-11-04 00:39:29 803

原创 hadoop 用过的命令

1.查看文件hadoop fs -cat /usr/root/output/part-r-000002.执行jar包hadoop jar WordCount.jar WordCount /usr/root/input /usr/root/outputhadoop jar WordCount.jar org.apache.hadoop.examples.WordCou

2016-08-28 11:13:41 513

原创 linux 用过的命令

1.查看版本输入"uname -a ",可显示电脑以及操作系统的相关信息。 输入"cat /proc/version",说明正在运行的内核版本。输入"cat /etc/issue", 显示的是发行版本信息。2.查看ipifconfig -a3.查看主机ip

2016-08-26 18:03:28 517

原创 开始搬砖

博主最近刚入学。要开始努力搬砖发paper啦。回到这个博客以后要经常更新,记录下学术的点点滴滴。==========================================================最近要进入大数据的领域,组里没师兄在这方面有成果,所以得学习怎么快速进入一个领域找到结合web of knowledge和histcite是神器,前者获得全文及引用,后者可

2016-08-25 23:01:38 598

转载 遇到异常java.net.UnknownHostException: 主机名: 主机名

参考http://blog.csdn.net/wocaonima123987/article/details/8807990问题原因是在系统的 /etc/Hostname中配置了“zw_65_43” 作为主机名,而在/etc/hosts文件中没有 相应的“zw_65_43”。简单的解决办法是对应关系配好就可以,甚至删除/etc/Hostname这个文件也可以。 深层的原因:

2016-01-17 11:28:40 24125

原创 linux下使用过的命令

1.将一个文件夹的内容全部拷贝到另一个文件夹cp -Rf /home/user1/* /root/temp/将 /home/user1目录下的所有东西拷到/root/temp/下而不拷贝user1目录本身。即格式为:cp -Rf 原路径/ 目的路径/

2016-01-17 10:50:21 329

转载 大牛分享的 Linux 性能工具

来源:伯乐在线 - 黄利民链接:http://blog.jobbole.com/76103/Brendan Gregg 目前是 Netflix 的高级性能架构师 ,他在那里做大规模计算机性能设计、分析和调优。他是《Systems Performance》等技术书的作者,因在系统管理员方面的成绩,获得过 2013年 USENIX LISA 大奖。他

2016-01-16 22:40:16 463

转载 Spark的性能调优

转载自hadoop123下面这些关于Spark的性能调优项,有的是来自官方的,有的是来自别的的工程师,有的则是我自己总结的。基本概念和原则首先,要搞清楚Spark的几个基本概念和原则,否则系统的性能调优无从谈起:每一台host上面可以并行N个worker,每一个worker下面可以并行M个executor,task们会被分配到executor

2016-01-16 22:34:31 432

转载 SUSE服务器上安装R语言

参考:http://blog.sina.com.cn/s/blog_6caea8bf0100zfbu.html1、解压文件:tar –zvxf R-2.13.2.tar.gz2、进入R源文件目录:cd R-2.13.23、执行./configure命令,提示错误信息为“configure: error: No F77 compiler found”,这个错误是因为没有安

2016-01-16 22:06:30 1526

转载 linux下JDK设置

参考链接:http://jingyan.baidu.com/article/d621e8dae805272865913fa7.html1.下载JDK:http://pan.baidu.com/s/1o7qW6GM下载简单设置可百度到,省略。。。但是很多profile的配置有问题,无效。下面的测试有效:二、配置#vi /etc/profile 在里

2016-01-16 22:01:16 725

原创 linux下手动build spark1.6.0

参考http://spark.apache.org/docs/latest/building-spark.html#building-with-buildmvn里面有详细的步骤,在这里记录一下按照每步做的时候遇到的特殊情况。首先到spark下载地址中下载选择的是1.building with build/mvn报了一个缺失pom的错误,在提示的最后面有相

2016-01-14 23:39:34 568

转载 mac skim设置背景颜色

转载自http://blog.sina.com.cn/s/blog_9d88a5770101hjyc.html“关闭skim在终端中输入defaults write -app skim SKPageBackgroundColor -array 0.94 0.91 0.81 1在运行skim,看页面是不是换了颜色”网上找到的方法,很棒啊!!!不

2015-12-02 09:10:43 2494

转载 gcc 选项

gcc 提供了大量的警告选项,对代码中可能存在的问题提出警 告,通常可以使用-Wall来开启以下警告:            -Waddress -Warray-bounds (only with -O2) -Wc++0x-compat            -Wchar-subscripts -Wimplicit-int -Wimplicit-function-declaration 

2015-10-29 06:33:44 309

转载 Ubuntu下添加程序快捷方式时出现复制时发生错误

在Ubuntu下通过dash搜索的程序要添加快捷方式到桌面时出现了错误的提示:复制时发生错误。获取关于"/"的信息时出错。解决方法:一般情况下,系统可能会自动把软件的快捷方式保存到/usr/share/applications目录中,如图:比如要上图的Chrome快捷方式到桌面,就直接复制并粘贴到桌面,这样就不会有错误了,如图成功了。

2015-10-13 21:32:37 1467

转载 XCode快捷键

转载从雨痕老大的博客上转来的 http://www.rainsts.net/article.asp?id=1066 读书人偷书不算窃 :) 1. 文件CMD + N: 新文件CMD + SHIFT + N: 新项目CMD + O: 打开CMD + S: 保存CMD + SHIFT + S: 另存为CMD + W: 关闭窗口CMD +

2015-10-13 15:06:20 249

原创 ccf 201312-4 有趣的数(动态规划)

链接http://115.28.138.223/view.page?gpid=T2问题描述  我们把一个数称为有趣的,当且仅当:  1. 它的数字只包含0, 1, 2, 3,且这四个数字都出现过至少一次。  2. 所有的0都出现在所有的1之前,而所有的2都出现在所有的3之前。  3. 最高位数字不为0。  因此,符合我们定义的最小的有趣的数是20

2015-09-12 08:32:24 721

原创 ccf 201412-3 集合竞价

链接http://115.28.138.223/view.page?gpid=T19问题描述  某股票交易所请你编写一个程序,根据开盘前客户提交的订单来确定某特定股票的开盘价和开盘成交量。  该程序的输入由很多行构成,每一行为一条记录,记录可能有以下几种:  1. buy p s 表示一个购买股票的买单,每手出价为p,购买股数为s。  2. sell

2015-09-09 22:35:41 2063 1

原创 结构体的优先队列

#include #include #include #include #include #include #include #include #include #define INF 123123123#define MAX_INDEX 100005using namespace std;struct node{    double

2015-09-08 11:24:01 499

原创 ccf 201403-4 无线网络 (广搜解法)

链接:http://115.28.138.223/view.page?gpid=T7分析:这题是要进行搜索,在运动到一个本来没有,但可以设置路由器的地方的时候,就说明这次搜索在那个地方安置了路由器,这让我感到每条路径会影响整张图(设置路由器),所以先试了试深搜,但是数据不水,深搜超时了。转而使用广搜,但由于广搜在某一层的各个结点时不知道当前路径已经访问过哪些路由器,尚未访问过哪些路

2015-09-06 22:01:44 3061 2

原创 poj 3009 深搜

链接 http://poj.org/problem?id=3009题意:打冰球游戏,如图,S为起点,G为目标点。阴影为石块,冰球从起点开始往四个方向扔出,紧挨着石块时不能往那个方向扔出(在图中,不能往右),在一个方向上一直直线运动,要么出界,要么打中一个石块,打中石块后,那个石块会被击碎,然后冰球会停止在石块旁边的空格处,通过一直这样做,目的是能扔到G点,结束游戏。

2015-09-05 22:52:32 289

原创 poj 2488 深搜

链接http://poj.org/problem?id=2488题意按照字典序遍历整个棋盘,(规定了遍历的策略)因此不能使用广搜,必须使用深搜ac code#include #include #include #include #include #include #include #include #include#define INF 123123123#define MAX_INDEX 2

2015-09-05 21:02:41 385

原创 c++ map sort by value and sort by key(字典的遍历)

#include#include#include#include#include#includeusing namespace std;int cmp(const pair &x,const pair &y){    return x.second > y.second;}void sortMapbyValue(map &t_ma

2015-08-31 22:24:16 1761

原创 九度oj 题目1475:IP数据包解析

链接http://ac.jobdu.com/problem.php?pid=1475千万要注意使用gets,getline时多出来的回车换行的读取。在这题里,将'\n'使用scanf读到一个char里会wrong asnwer,必须使用get读到一个char[]里!ac代码#include #include #include #include

2015-08-28 14:32:51 416

原创 九度oj--题目1204:农夫、羊、菜和狼的故事(map 用结构体作key)

使用结构体作为map的key时,一定要重载那个结构体的例子:typedef struct ma{public:    nod left;    nod right;    int now;    bool operator     {        if ((now                ||(now==other.now&&left.s

2015-08-27 22:35:53 725

An introduction to the bootstrap

boostrap很全很好的介绍书籍,google scholar 它引达2W多次,是一本不可多得的好书,上传的资源是全书。

2015-08-15

空空如也

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

TA关注的人

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