
逆波兰表达式(Reverse Polish Notation)转换:
逆波兰表示法(Reverse Polish notation,RPN,或逆波兰记法),是一种是由波兰数学家扬·武卡谢维奇1920年引入的数学表达式方式,在逆波兰记法中,所有操作符置于操作数的后面,因此也被称为后缀表示法。逆波兰记法不需要括号来标识操作符的优先级。因此逆波兰记法广泛地被用于计算器。
SPOJ的ONP问题正是逆波兰表达式的生成问题.
list1=[["a1","a2"],["b1","b2"],["c1","c2"],["d1","d2"]]要展开外层列表,得到一个字符串列表形如:
['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2']该怎么操作才最简单?
char path[_MAX_PATH]; ::GetModuleFileName(NULL, path, _MAX_PATH);来获得当前路径,有时候需要将调用第一参数指定为调用dll的入口参数中的module
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )就是上面的hModule.不过如果dll中不存在dllmain函数,无法用全局变量保存该参数,如何得到dll被动态加载时的路径呢?
// debug memory leak
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
// overwrite default definition
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
//Check for memory leaks
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDOUT);
void Foo(char *format, ...)
{
char msg[255];
va_list args;
va_start(args, format);
vsprintf(msg, format, args);
va_end(args);
// 这里msg已经是char数组了,可以任意使用了
// Add code here
}
javascript:(function(){var%20ac,c,f,fa,fe,fea,x,y,z;ac=\"autocomplete\";c=0;f=document.forms;for(x=0;x<f.length;x++){fa=f[x].attributes;for(y=0;y<fa.length;y++){if(fa[y].name.toLowerCase()==ac){fa[y].value=\"on\";c++;}}fe=f[x].elements;for(y=0;y<fe.length;y++){fea=fe[y].attributes;for(z=0;z<fea.length;z++){if(fea[z].name.toLowerCase()==ac){fea[z].value=\"on\";c++;}}}}alert(\"Enabled%20\'\"+ac+\"\'%20on%20\"+c+\"%20objects.\");})();
结尾-se-(-sa-)改为-ze-(-za-)
analyze
binarize (-zation)
categorize (-zation)
criticize
digitalize (-zation)
equalize (-zation)
generalize (-zation)
individualize (-zation)
initialize (-zation)
localize (-zation)
maximize (-zation)
minimize (-zation)
normalize (-zation)
optimize (-zation)
organize (-zation)
parameterize (-zation)
personalize (-zation)
quantize (-zation)
realize (-zation)
recognize (-zation)
standardize (-zation)
synthesize (-zation)
utilize (-zation)
visualize (-zation)
结尾-ce改为-se
defense
license
offense
pretense
结尾-xion改为-ction
connection
inflection
reflection
双写字母-l-省略
councilor
counselor
jeweler
marvelous
modeling
parceled
quarreled
traveling
字母循序调换,re->er
center
fiber
meter
theater
读音相同,拼写各异
check
curb
gray
jail
mustache
plow
skeptical
简化了字母u
behavior
color
favor
favorite
honor
labor
neighbor
简写省略-me或者-ue
program
kilogram
dialog
catalog
prolog