- 博客(45)
- 资源 (11)
- 收藏
- 关注
原创 vs无法识别的外部符号 main
一、原因:1, 你用vc建了一个控制台程序,它的入口函数应该是main,而你使用了WinMain.2. 你用vc打开了一个.c/.cpp文件,然后直接编译这个文件,这个文件中使用了WinMian而不是main作为入口函数。vc这时的默认设置是针对控制台程序的。二、解决方案1.进入project->setting->c/c++,在category中选择prepro
2015-06-08 11:30:28 2669
原创 sql-server多字段去重
sqlserver不支持多字段in not-in就像:delete from user_geo_simplifiedwhere (user_id,user_gor_simplified) in (select [user_id],user_gor_simplified from #temp1)and timeDate not in (select max(timeDate) fro
2015-04-16 11:03:45 2963
原创 const修饰函数
const可以认为是保护变量的作用,在函数前面与函数后面保护的对象是不同的一、关于function() const1、一个函数名字后有const,这个函数必定是成员函数,也就是说普通函数后面不能有const修饰2、在一个类里定义了一个const成员函数后,则此函数不能修改类中的成员变量3、如果定义了一个类的const对象(非const对象可以调用const成
2015-03-25 21:01:41 639
原创 "CL.EXE"错误
最近vs2010总是出现“cl.exe”停止工作或退出,解决方案如下:1、尝试新建是否也有同样的问题2、如果是其他项目都有这个问题,可能是由于更新了.NETFRAMEWORK造成的,这时候需要对vs也同样进行更新博主遇到vs2010 sp1更新,1.5G链接:http://pan.baidu.com/s/1i3rIsrr 密码:jkvd3、如果其他项目正常,那就可能是这个项目配
2015-03-25 18:37:31 1195
原创 jdk1.8中使用sql server
java 1.8放弃了对jdbc的支持,使用sql server可以使用microsoft的,地址:点击打开链接一、配置CLASSPATH路径右击 我的电脑 → 属性 → 高级系统设置(高级) → 环境变量,在系统变量中双击CLASSPATH变量(或选中CLASSPATH后 → 编辑),在最后面追加 “;D:\sqljdbc4 \sqljdbc4.jar” (注意最前面有个 ;
2015-03-19 14:42:04 4791 2
原创 CreateProcess failure, error 2
the general solution to the problem that port "5037" is used can simply be:adb nodaemon servernetstat -ano|finstr "5037"//the port may not be the sametaskkill pid/0000 /fadb start-server i
2015-01-30 20:02:12 3106
原创 android sdk install
1、download Android SDK .zip2、UNZIP the file3、run the SDK Manager.exe4、now you may see the bottom Fecthing http:..... Generally speaking, in China mainland, the google site is unaccessable, so yo
2015-01-30 10:39:33 496
原创 error 0x0007b in vs10 with opencv+64bit system
1、generally, you can solve it by add both .../opencv/build/x64/vc10/bin and .../opencv/build/x86/vc10/bin to your Path of your system, and restart your PC2、you can also copy all the dll file to
2015-01-27 17:06:54 668
原创 friend & operator
class Vector{private:int x;int y;public:Vector(){};Vector(int X, int Y){x = X;y = Y;}Vector(Vector & b){x = b.x;y = b.y;}//友元函数不是类的成员,但是与类有同样的访问权限//利用友元函数重载二元操作符”-“时,
2015-01-15 21:47:32 738
转载 static in c++
static关键字至少有下列n个作用:(1)设置变量的存储域,函数体内static变量的作用范围为该函数体,不同于auto变量,该变量的内存只被分配一次,默认初始化为0,因此其值在下次调用时仍维持上次的值;(2)限制变量的作用域,在模块内的static全局变量可以被模块内所用函数访问,但不能被模块外其它函数访问;(3)限制函数的作用域,在模块内的static函数只可被这一模块内
2014-12-22 22:50:34 357
原创 data structure in PCL
show you some code here first:void PointXYZRGBAtoXYZI (pcl::PointXYZRGBA& in, pcl::PointXYZI& out){ out.x = in.x; out.y = in.y; out.z = in.z; out.intensity = 0.299f * static_cast (in.r) + 0.58
2014-12-08 10:12:49 726
原创 ICP in PCL
This is an simple demo of icp.in the future, I shall make it faster by means of down sampling
2014-11-26 20:26:03 418
原创 集合
List是接口 定义了一些方法 但是方法没有被实现 ArrayList是一个类 实现了List这个接口List里边定义的方法 在ArrayList里边都实现了 同时List也可以被别的类所实现 例如Vector, Vector和ArrayList对List定义的方法的实现就有所区别。
2014-11-23 22:02:59 426
原创 PCL grabber for kinect & PCD write
#include "stdafx.h"#include #include class SimpleOpenNIViewer { public: SimpleOpenNIViewer () : viewer ("PCL OpenNI Viewer") {} const pcl::PointCloud::ConstPtr cloud; void cloud
2014-11-19 10:28:35 1518
转载 boost::bind
boost::bindPurposeboost::bind is a generalization of the standard functions std::bind1st and std::bind2nd. It supports arbitrary function objects, functions, function pointers, and member fu
2014-11-19 10:26:07 599
原创 using namespace&using
using namespace xxx 表示命名空间 xxx 下所有的域变成可见的。using namespace std;则 代码中可以用cout using xxx只有bns是本身是可用的。对于ns下的域仍然必须使用 ns.xxx 如using std;则代码中必须这样写std::cout
2014-11-18 16:27:51 478
原创 java IKAnalyzer配置
IK Analyzer是基于lucene实现的分词开源框架,下载路径:http://code.google.com/p/ik-analyzer/downloads/list需要在项目中引入:IKAnalyzer.cfg.xmlIKAnalyzer2012.jarlucene-core-3.6.0.jarstopword.dic什么都不用改示例
2014-11-05 19:14:29 598
转载 c考试
指出下面代码的输出,并解释为什么。main() { int a[5]={1,2,3,4,5}; int *ptr=(int *)(&a+1); printf("%d,%d",*(a+1),*(ptr-1)); } 输出:2,5 *(a+1)就是a[1],*(ptr-1)就是a[4],执行结果是2,5 &a+1不是首地址+1,系统会认为加一个a数组的偏移,是偏移了一个
2014-11-01 13:02:41 399
转载 malloc-free new-delete
1,malloc与free是C++/C语言的标准库函数,new/delete是C++的运算符。它们都可用于申请动态内存和释放内存。2,对于非内部数据类型的对象而言,光用maloc/free无法满足动态对象的要求。对象在创建的同时要自动执行构造函数,对象在消亡之前要自动执行析构函数。由于malloc/free是库函数而不是运算符,不在编译器控制权限之内,不能够把执行构造函数和析构函数的任务强加于m
2014-10-27 18:51:16 363
原创 cuda julia & ripple
#include #include #include #include #include #include #define DIM 1000__device__ struct cuComplex{float r;float i;__device__ cuComplex(float a, float b) : r(a), i(b) {
2014-10-27 18:39:59 495
原创 c++二叉树
// BinTree.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include//the struct of the Nodestruct binNode{ int data; binNode *leftNode; binNode *rightNode;};class binaryTree{public: unsigned
2014-10-24 21:22:47 424
原创 cuda内建变量
dim3 blocks(bx,by);dim3 threads(tx,ty);ker>>()则每个线程块有tx行ty列的线程,x=threadIdx.x,y=threadIdx.y代表第x行第y列的那个线程;整个网格有bx行by列的线程块,blockIdx.x,blockIdx.y代表第x行第y列的那个线程块。行数和列数都可以从0开始,所以threadIdx.x必然小于tx...因为每个线程块
2014-10-22 22:02:08 449
原创 (void**) &p的技巧
很多时候会用到(void**) &p ,尤其是在diao(void**) &p 它是空类型 这样做的好处 你将来要使用它 无论什么类型都能用如果直接用一个类型(比如 char、int)*p 这样指针p的类型就被定死了 没有上面那个灵活、方便
2014-10-22 19:59:54 1147
转载 c头文件
c标准文件解释:标准文件要3点特征:1)幂等性:包含包含没差别2)相互独立性:标准文件间互相包含//说明楼cpazstido错3)文件级别:文件要全局作用域内包含其作用域内(例函数块内)包含行未定义另外c允许良性重定义重定义名字没造危害重定义导致编译错或报警解释两文件都exit函数标准c要求c库实现exit函数早标准c没支持线程所exitstdlib.h声明线程现c支持线程现pro
2014-10-22 10:42:19 447
原创 cuda + vs assistant
1、打开注册表,在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Languages\File Extensions\ 下面添加子键 .cu 然后copy .cpp的键值到.cu。这样才能表示cu也是VS下的VC的工程文件。 2、 打开注册表,HKEY_CURRENT_USER\Software\Whole Tomato\Vi
2014-10-21 12:19:09 577
原创 java for
JDK 1.5对for语句进行了改进,为更好遍历数组,改进后的for语句格式如下: for(声明循环变量 : 数组名) { ... }如: char b[]={'a','b','c','d'}; for(char ch : b) { System.out.println(ch);//打印出数组b中的元素 }
2014-10-10 22:48:10 406
原创 #pragma region和#pragma endregion关键字
#pragma region和#pragma endregion关键字使用#pragma region和#pragma endregion关键字定义可以扩展和收缩的代码区域的开头和结尾例如,可以修改为#pragma endregion 这样就可以把这些代码行收缩为一行,以后要查看其细节时,可以再次扩展它。
2014-09-26 15:34:44 431
原创 泛型、异常
import javax.swing.*;import java.util.*;public class Demo2 extends JFrame{/*** @param args*/public static void main(String[] args) {// TODO Auto-generated method stub/*Animal an = ne
2014-09-24 21:46:26 548
原创 抽象类、接口
//方法为抽象方法cry//父类申明抽象类Animal1、不能被实例化:Animal an = new Animail();2、抽象类可以没有抽象方法3、一旦一个类被申明为抽象方法,该类一定是abstract4、一定不能有主题,也就是后面一定不能加{}5、抽象类里面可以有实现的方法abstract class Animal{abstract public voi
2014-09-23 15:16:05 300
原创 java多态
class Animal{public void cry(){System.out.println("cry");}}class Cat extends Animal{public void cry(){System.out.println("");}}class Dog extends Animal{public void cry(){
2014-09-23 14:22:01 323
原创 java类
1、抽象2、封装尽量把变量,函数写为私有,对程序进行保护访问控制修饰符class Clerk{public String name;private int age;private float salary;public Clerk(String name, int age, float salary){this.name = name;this.
2014-09-22 20:32:27 269
原创 sift
让我们把opencv_nonfree243d.lib 加入lib库中当然我的是opencv_nonfree246d.lib然后还是不管用肿么办~~于是乎加上#include#include搞定,成功识别SurfFeatureDetector和SiftFeaureDetector当然,在之后又碰到了坑爹的BruteForceMatche
2014-09-20 19:18:47 256
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人