摘要: http://stackoverflow.com/questions/6349125/are-c-sharp-delegates-thread-safeRegarding the invocation of the delegate the answer is yes.Invoking a delegate is thread-safe because delegates are immutable. However, you must make sure that a delegate exists first. This check may require some synchroniza 阅读全文
posted @ 2013-06-07 17:25 Alan Yang 阅读(266) 评论(0) 推荐(0) 编辑
摘要: http://www.geeksforgeeks.org/write-a-c-program-to-print-all-permutations-of-a-given-string/A permutation, also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. A string of length n has n! permutation.So 阅读全文
posted @ 2013-06-07 16:40 Alan Yang 阅读(473) 评论(0) 推荐(0) 编辑
摘要: heatoi()function takes a string (which represents an integer) as an argument and returns its value.Following is a simple implementation. We initialize result as 0. We start from the first character and update result for every character.// A simple C++ program for implementation of atoi#include <s 阅读全文
posted @ 2013-06-07 14:38 Alan Yang 阅读(169) 评论(0) 推荐(0) 编辑