php在iis中安装后出现500问题的解决方法
花了两个小时解决php总是配置不对的问题,原因是Microsoft Visual C++ 2008 Redistributable...
View Article修复远程桌面网关
突然有一天,在iis服务器上上了一个新站点后,远程桌面网关连不上了。找不到原因,于是我把rpc和rpcwithcert两个虚拟目录给删了。然后手动配置C:\Windows\System32\inetsrv\config\applicationHost.config文件,配了多次仍然不行。于是把rpc onver htpp...
View Article#pragma once 与 #ifndef 解析(转)
转自:http://blog.csdn.net/slimfox/article/details/1565950 为了避免同一个文件被include多次,C/C++中有两种方式,一种是#ifndef方式,一种是#pragma once方式。在能够支持这两种方式的编译器上,二者并没有太大的区别,但是两者仍然还是有一些细微的区别。 方式一: #ifndef __SOMEFILE_H__...
View ArticleCCSprite 改变图片的方法
在使用CCSpriteFrameCache 初始化的情况下更换sprite图片的方法。p.s : 如果使用spriteWithFile 则使用setTexture.CCSpriteFrameCache* cache = [CCSpriteFrameCache sharedSpriteFrameCache]; CCSpriteFrame* frame = [cache...
View Articlehadoop面试时可能遇到的问题
面试hadoop可能被问到的问题,你能回答出几个 ?1、hadoop运行的原理?2、mapreduce的原理?3、HDFS存储的机制?4、举一个简单的例子说明mapreduce是怎么来运行的 ?5、面试的人给你出一些问题,让你用mapreduce来实现?...
View Article求一个数,二进制表示中含有多少个1
// 1. 求一个数,二进制表示中含有多少个1.int func(x){ int countx = 0; while(x) { countx ++; x = x&(x-1); } return countx;} // 2. 请编写函数 strcpy。char *strcpy(char *strDest, const char...
View ArticleVC控件ListCtrl的使用方法总汇
以下未经说明,listctrl默认view 风格为report ------------------------------------------------------------------------------- 1. CListCtrl 风格 LVS_ICON: 为每个item显示大图标 LVS_SMALLICON: 为每个item显示小图标...
View Articlepoj1008Maya Calendar
两种日历间的转换,转换思路是将Haab日历转换为实际天数,然后再转换为Tzolkin日历。进制转换时需要注意,取模时为了避免结果为0时的特殊情况,我们要采取一个小技巧。下面我举例说明:假设每月有30天,每月日期编号从1开始(也就是说日期号为1~30),请问今年的第11天是几号?第60天呢?第61天呢?回答上面的问题并不困难,可是程序中我们应该怎样计算呢?(11-1)%30 + 1 =...
View ArticleLingosHook: Compatible with Lingoes 2.9.0
恭喜Lingoes发布新版本2.9.0,同喜LingosHook还能继续兼容新版本...codejie 2013-03-18 16:06 发表评论
View Article【原创】模拟点击Outlook命令栏中的某个按钮
几乎2年没来这blog了,欣慰的是居然原来的数据还在。。。。正好今天帮同事解决了一个有意思的小问题,就随手写一篇blog,记录这个事情。背景是这样的:需要通过一个和Outlook没有关系的单独exe,来执行Outlook中的某个命令按钮,而不是靠手动点击去执行。有这个需求的原因是,他希望在用户按下按钮后,起一个线程去工作,但不能block住Outlook导致用户不能正常操作。当线程结束后,再自动触发...
View ArticleSQL 文本导入 方式 bcp OpenRowset opendatasource BULK INSERT
select * from OpenRowset('MSDASQL', 'Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=C:\Users\Administrator\Desktop;','select * from Num.txt') select * from...
View ArticleCString 常用操作种种
摘要: //A.构造函数,CStringT提供了19个构造函数,其中一个旨在.NET平台托管C++工程中才被编译,我只写几个我觉得常用的 //1.默认构造函数,生成一个""字符串 CString cstr1; //2.拷贝构造函数 CString cstr2(cstr1); /... 阅读全文聂文龙 2013-03-18 21:58 发表评论
View ArticlePalindrome Partitioning-leetcode
Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ["aa","b"],...
View ArticlePalindrome Partitioning II - leetcode
Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s. For example, given s = "aab", Return 1...
View ArticleIOS 绘制PDF
1 -(void)createPdf:(UIImage *)img andText:(NSString *)text{ 2 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 3 NSString *saveDirectory =...
View ArticleLongest Consecutive Sequence - leetcode
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is [1, 2, 3, 4]....
View Article九种引人瞩目的开源大数据技术
越来越多的公司开始聚焦于大数据技术领域,而开源恰恰是大数据技术的灵魂。以下将为您介绍九大引人注目的开源大数据技术,请拭目以待: 1.Apache Hadoop Apache hadoop是 一个开源的分布式计算框架,最初由Doug为支持其开源Web搜索引擎Nutch所创立。通过集成MapReduce技术,Hadoop将大数据分布到多 个数据节点上进行处理。Hadoop遵循Apache...
View Article迭代器
// std::map<std::string ,DataInfo>::iterator iter = m_ImageInfoList.begin();//// while (iter!=m_ImageInfoList.end())// {// CString pathArchiveTemp,pathImageTemp,ImagePath;// pathImageTemp =...
View ArticleC语言 malloc 工作机制
void *malloc (size_t stSize);该函数在内存的动态存储区中分配 stSize 连续空间,返回值是一个指向所分配的连续存储域的起始地址的指针。void free(void *firstbyte);如果给定一个由先前的 malloc 返回的指针,那么该函数会将分配的空间归还给进程的“空闲空间”。malloc...
View Article算法:数字知识(1)
排列组合排列的定义及其计算公式:从n个不同元素中,任取m(m≤n,m与n均为自然数,下同)个元素按照一定的顺序排成一列,叫做从n个不同元素中取出m个元素的一个排列; 从n个不同元素中取出m(m≤n)个元素的所有排列的个数,叫做从n个不同元素中取出m个元素的排列数,用符号 A(n,m)表示。A(n,m)=n(n-1)(n-2)……(n-m+1)= n!/(n-m)! 此外规定0!=1 A(n,m)...
View Article