上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: Read More
posted @ 2017-04-10 13:48 rainsoul Views(197) Comments(0) Diggs(0) Edit
今天在使用Matlab调用内部的PCA函数的时候,报错: 错误使用 pca输入参数太多。 如下图所示: 网上查找原因之后发现是因为我之前下载过开源的工具包toolbox,并且将它的路径add到了Matlab的path中,于是调用pca的时候,默认就会调用这个工具包中的函数,而Matlab自带的PCA Read More
posted @ 2017-03-30 10:53 rainsoul Views(6931) Comments(0) Diggs(2) Edit
Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear runtime complex Read More
posted @ 2017-03-29 15:54 rainsoul Views(138) Comments(0) Diggs(0) Edit
Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length Read More
posted @ 2017-03-29 15:29 rainsoul Views(170) Comments(0) Diggs(0) Edit
网上有很多关于编译的具体步骤,我也是按照网上的说明一步步操作的,这里主要想记录的是在安装完之后,import cv2不存在以及其他的libopencv_hdf.so.3.1等找不到的问题,如果将这样的问题直接在网上搜的话,一般就是apt-get install python-opencv来解决没有c Read More
posted @ 2017-03-24 15:45 rainsoul Views(1237) Comments(0) Diggs(0) Edit
当一个python任务是需要逐个处理相同的事物时(里面有循环操作,例如对一系列的文件进行处理),这时可以将处理的进度条加进来,下面是一个例子: 运行结果: 网速是在太慢,图片上传不了,算了吧。。。。 Read More
posted @ 2017-03-24 15:34 rainsoul Views(2305) Comments(0) Diggs(0) Edit
不额外申请内存(另外的一个二维数组空间),将一个方阵(二维数组)原地旋转90度,主要的思路是,由外向内,一圈圈的进行旋转(就是依次进行交换),如下图所示,当这些圈圈都交换完了之后,就完成了原地旋转了。 代码如下: 代码中还涉及到了通过new与delete分配与释放一个二维数组,也是面试中的一个问题。 Read More
posted @ 2017-03-23 14:00 rainsoul Views(1847) Comments(0) Diggs(0) Edit
有三个地方需要配置,在配置之前首先要将platform配置好,下面的例子是x64 Release的“ 然后需要将include、lib的路径配置好 然后将dll拷贝至编译生成的Release文件夹中即可。这一步也可以通过将dll所在的文件夹添加到环境变量中来做,都是可以的。具体如下图所示: Read More
posted @ 2017-03-23 10:17 rainsoul Views(164) Comments(0) Diggs(0) Edit
今天编译的过程中遇到的问题以及查阅到的资料,记录在这里,希望可以帮到其他人。 BVLC的caffe源码,如果要编译matlab的接口时,首先需要将makefile.config文件中的matlab的安装路径给到: 然后再 make all 在这里make的过程中,如果采用-j8多和编译的时候,可能会 Read More
posted @ 2017-03-21 16:22 rainsoul Views(1008) Comments(0) Diggs(0) Edit
注意:头文件不用去指定,其是由#include命令进行管理的,只需要编译cpp文件就可以了; 举例: 有以下三个文件: a.h a.cpp main.cpp 那么编译可以有以下两种方式: 1、分开编译: g++ -c a.cpp g++ -c mian.cpp g++ a.o main.o -o t Read More
posted @ 2017-03-10 20:56 rainsoul Views(7429) Comments(0) Diggs(0) Edit
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页