??xml version="1.0" encoding="utf-8" standalone="yes"?>久久成人国产精品,99久久综合狠狠综合久久,久久久久九国产精品http://www.shnenglu.com/michaelgao/zh-cnWed, 07 May 2025 13:44:12 GMTWed, 07 May 2025 13:44:12 GMT60find number in a gvien S and arrayhttp://www.shnenglu.com/michaelgao/archive/2012/12/10/196141.htmlmicheal's techmicheal's techMon, 10 Dec 2012 03:38:00 GMThttp://www.shnenglu.com/michaelgao/archive/2012/12/10/196141.htmlhttp://www.shnenglu.com/michaelgao/comments/196141.htmlhttp://www.shnenglu.com/michaelgao/archive/2012/12/10/196141.html#Feedback0http://www.shnenglu.com/michaelgao/comments/commentRss/196141.htmlhttp://www.shnenglu.com/michaelgao/services/trackbacks/196141.html

Given an array S of n integers, are there elements x, y, z in S such that x + y + z = 0? Find all unique triplets in the array which gives the sum of zero.

Note:

  • Elements in a triplet (a,b,c) must be in non-descending order. (ie, a ≤ b ≤ c)
  • The solution set must not contain duplicate triplets.

    一个重要的优化是如果上个数已l求q集合了 例如[-1 -1 0 2 2]已经包含了[-1 0 2 2] 当然也包含了 [-1 0 2]集合的?/li>


micheal's tech 2012-12-10 11:38 发表评论
]]>
C++ 11 timer callbackhttp://www.shnenglu.com/michaelgao/archive/2012/12/04/195980.htmlmicheal's techmicheal's techTue, 04 Dec 2012 10:10:00 GMThttp://www.shnenglu.com/michaelgao/archive/2012/12/04/195980.htmlhttp://www.shnenglu.com/michaelgao/comments/195980.htmlhttp://www.shnenglu.com/michaelgao/archive/2012/12/04/195980.html#Feedback0http://www.shnenglu.com/michaelgao/comments/commentRss/195980.htmlhttp://www.shnenglu.com/michaelgao/services/trackbacks/195980.html
#include <thread>

template <typename Duration, typename Function>
void timer(Duration const & d, Function const & f)
{
    std::thread([d,f](){
        std::this_thread::sleep_for(d);
        f();
    }).detach();
}


micheal's tech 2012-12-04 18:10 发表评论
]]>
error C2011: 'sockaddr' : 'struct' type redefinitionhttp://www.shnenglu.com/michaelgao/archive/2012/12/04/195971.htmlmicheal's techmicheal's techTue, 04 Dec 2012 07:39:00 GMThttp://www.shnenglu.com/michaelgao/archive/2012/12/04/195971.htmlhttp://www.shnenglu.com/michaelgao/comments/195971.htmlhttp://www.shnenglu.com/michaelgao/archive/2012/12/04/195971.html#Feedback0http://www.shnenglu.com/michaelgao/comments/commentRss/195971.htmlhttp://www.shnenglu.com/michaelgao/services/trackbacks/195971.htmlThis problem is caused when including <windows.h> before <winsock2.h>. Try arrange your include list that <windows.h> is included after <winsock2.h> or define _WINSOCKAPI_ first:

先包含winsock2.h
再包含windows.h



micheal's tech 2012-12-04 15:39 发表评论
]]>
zmq 在类成员中不用指针的Ҏ(gu)Q?/title><link>http://www.shnenglu.com/michaelgao/archive/2012/12/03/195928.html</link><dc:creator>micheal's tech</dc:creator><author>micheal's tech</author><pubDate>Mon, 03 Dec 2012 09:51:00 GMT</pubDate><guid>http://www.shnenglu.com/michaelgao/archive/2012/12/03/195928.html</guid><wfw:comment>http://www.shnenglu.com/michaelgao/comments/195928.html</wfw:comment><comments>http://www.shnenglu.com/michaelgao/archive/2012/12/03/195928.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/michaelgao/comments/commentRss/195928.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/michaelgao/services/trackbacks/195928.html</trackback:ping><description><![CDATA[<pre id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown" style="line-height: normal;">普通类调用中必dzmq讄为指?否则单纯构造无法初始化<br />直接用初始化列表<br /><br /><div>context(1),netsocket(zmq::socket_t(context, ZMQ_REP))</div><br /></pre><img src ="http://www.shnenglu.com/michaelgao/aggbug/195928.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/michaelgao/" target="_blank">micheal's tech</a> 2012-12-03 17:51 <a href="http://www.shnenglu.com/michaelgao/archive/2012/12/03/195928.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ҏ(gu)学习Ҏ(gu)http://www.shnenglu.com/michaelgao/archive/2012/11/14/195180.htmlmicheal's techmicheal's techWed, 14 Nov 2012 02:17:00 GMThttp://www.shnenglu.com/michaelgao/archive/2012/11/14/195180.htmlhttp://www.shnenglu.com/michaelgao/comments/195180.htmlhttp://www.shnenglu.com/michaelgao/archive/2012/11/14/195180.html#Feedback0http://www.shnenglu.com/michaelgao/comments/commentRss/195180.htmlhttp://www.shnenglu.com/michaelgao/services/trackbacks/195180.html

micheal's tech 2012-11-14 10:17 发表评论
]]>
dynamic programminghttp://www.shnenglu.com/michaelgao/archive/2012/05/17/175176.htmlmicheal's techmicheal's techThu, 17 May 2012 01:54:00 GMThttp://www.shnenglu.com/michaelgao/archive/2012/05/17/175176.htmlhttp://www.shnenglu.com/michaelgao/comments/175176.htmlhttp://www.shnenglu.com/michaelgao/archive/2012/05/17/175176.html#Feedback0http://www.shnenglu.com/michaelgao/comments/commentRss/175176.htmlhttp://www.shnenglu.com/michaelgao/services/trackbacks/175176.html感觉动态规划中最隄部分是在L 从状态j到状态i的递归式,像证明归纳法一P你得扑և具体的式子来?br />top bottom
bottom up
1. Longest Increasing Subsequence:
L[i] = max(1+L(j))(j<l && a[j]<a[i])
//if not exist any a[j]<a[i]
L[i] = 1;

getmaxvalueof array a[]


2. Maximum Sum Increasing Subsequence
almost same with above

3. Maximum continous sum

4. rod cutting


micheal's tech 2012-05-17 09:54 发表评论
]]>
【外刊IT评论|】你做过的最有效的提高你的编E水q的一件事情是什?/title><link>http://www.shnenglu.com/michaelgao/archive/2012/04/17/171700.html</link><dc:creator>micheal's tech</dc:creator><author>micheal's tech</author><pubDate>Tue, 17 Apr 2012 00:40:00 GMT</pubDate><guid>http://www.shnenglu.com/michaelgao/archive/2012/04/17/171700.html</guid><wfw:comment>http://www.shnenglu.com/michaelgao/comments/171700.html</wfw:comment><comments>http://www.shnenglu.com/michaelgao/archive/2012/04/17/171700.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/michaelgao/comments/commentRss/171700.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/michaelgao/services/trackbacks/171700.html</trackback:ping><description><![CDATA[最q在stackexchange|站上看C一个非常好的问{,有h问:你做q的最有效的提高你的编E水q的一件事情是什? 回首作ؓ一个程序员q些q来的生zd职业道\Q我使用了很多种不同的方法来提高我的~程技?—— 阅读代码Q编写程序,阅读书籍Q听讲Q看视频Q等{? 我的问题是:你做q的最有效的提高你的编E水q的一件事情是什?对于那些x高水q的E序员,你的是什么? 我希望你们提供的{案是各U各LQƈ且不是U?#8220;放之四v而皆?#8221;的答?—— 我希望得到适用于不同h的不同的{案? 有很多hl出了自q{案Q在q里Q我其中最受认可的前三U答案选出来翻译给大家? 最受欢q的回答Q学无止? 没有特别的先后次?#8230; 和比自己更聪明的Z起工作永q乐意听取他人的意见Q不对Ҏ(gu)低水^Q一般水qI资深Q还是大师。职U头衔ƈ不代表一切。学习其它的框架/语言Q学习它们是的工作原理和思想Q拿它们跟你已知的技术做比较。学习各U设计模式,最?jng)_느论,然后用它们检查自己先前的知识Q在需要的时候用这些模式。结对编E? 反对Joel说的一切? W二受欢q的回答Q成为多面手 争取成ؓ一?#8216;多面手万事?#8217; 在我职业生的早期,我在一U数据库和编E语a上是个专家。不q的是,q种数据库在“数据库战?#8221;中落败了Q我才发现我的职业道?#8230;很窄。在此之后,我下定决心以后决不能把自己封在一个小I间里。我开始学习所有手头上能接触到的东西:WindowsQUnixQCQC++QJavaQC#QPerlQPythonQAccessQSQL ServerQOracleQInformixQMySQLQ等{。不什么样的新的,不常见的工具或技术,我都成ؓ“大拿” —— “去问克雷?作者自?Q他要是不会Q他会去学会的?#8221;l果Q我做了各种各样的项目,从ؓ环境监测做嵌入式pȝQ到为导弚w御做命o和控制系l? 我在各种的公叔R唯一遇到的问题是Q它们坚持要把我固定在一个专门的研究方向内,而我的专门研I是要成Z个多面手。[~辑Q也叫做学识渊博的h或多才多艺的人或多领域专家。] 有些事情需要留?… 高科技界里知识的半衰期是多?Ҏ(gu)摩尔定律(Moore’s law)Q?8-24月内Q半C学到的知识都会过时。错误的遵@q种规律的专家会L的在q种技术发展的压力崩溃Q一个多面手要做的事是不断的丰富自q技能,q从应用q些技能的l历中吸取教训? W三受欢q的回答Q不要跟臭棋子下棋 我一直认己在不错的程序员中也是?#8220;灌篮高手”。直到有个家?#8212;—我们叫他艾u——被招q团队。艾伦很昄在很多方面都比我优秀。也比我q轻。他让我认识刎ͼ在过ȝq些q里Q我没有多少长进。我是一个特定技术方向的E序员,而且是水q一般? q惊醒我应该自觉的不断提高自q水^Q特别是我写的代码的水^? 艾u引导我学会了很多东西。他告诉我,大部分我写的代码在今后的数年里都一直维护和q行扩展Q写代码时要这炚w记在心。我应该为我的代码写自动试E序。艾伦说代码的开发一定不能停止在W一版上Q应该不断的重构Q提|让它辑ֈ完美。我发现Q我对这些语a和工L使用都还有还很大的改q空间? 从艾伦那我学到的最重要的一件事情是Q永q不要停止学习? 数年后,艾ud了公司。我的心里突然感觉空荡荡的。这些年与他Z让我在技能上提升C一个全新的水^Q我知道现在我比团队里的其他ZU很多。他们仍然写着p糕的代码,犯着以前犯过的错误。我努力教育他们Q但他们Ҏ(gu)不感兴趣。事实上Q他们讨厌有样傲慢自大的指出他们犯的错误? 于是Q几个月后,我也dq这个公司。我M一个很的公司Q在一个很的团队里工作。那里每个h都(f)望学习更多知识,我喜Ƣ这L? 我很q运能遇到艾伦。没有他Q我也许现在仍然待在那家L沉沉的公司和那帮食古不化的家伙在一P哪都M了,想的全是自己的私利? q个讨论在stackexchange|站上的地址是这里? 从我个h而言Q我觉得W三个答案对我最有h(hun)|不知各位同行们有什么感受?请写在评论里与大家分享? <img src ="http://www.shnenglu.com/michaelgao/aggbug/171700.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/michaelgao/" target="_blank">micheal's tech</a> 2012-04-17 08:40 <a href="http://www.shnenglu.com/michaelgao/archive/2012/04/17/171700.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>NLP起了 lucene也v?/title><link>http://www.shnenglu.com/michaelgao/archive/2012/04/12/171084.html</link><dc:creator>micheal's tech</dc:creator><author>micheal's tech</author><pubDate>Thu, 12 Apr 2012 05:56:00 GMT</pubDate><guid>http://www.shnenglu.com/michaelgao/archive/2012/04/12/171084.html</guid><wfw:comment>http://www.shnenglu.com/michaelgao/comments/171084.html</wfw:comment><comments>http://www.shnenglu.com/michaelgao/archive/2012/04/12/171084.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/michaelgao/comments/commentRss/171084.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/michaelgao/services/trackbacks/171084.html</trackback:ping><description><![CDATA[今天开始记?img src ="http://www.shnenglu.com/michaelgao/aggbug/171084.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/michaelgao/" target="_blank">micheal's tech</a> 2012-04-12 13:56 <a href="http://www.shnenglu.com/michaelgao/archive/2012/04/12/171084.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Install package http://www.shnenglu.com/michaelgao/archive/2009/12/01/102348.htmlmicheal's techmicheal's techTue, 01 Dec 2009 09:20:00 GMThttp://www.shnenglu.com/michaelgao/archive/2009/12/01/102348.htmlhttp://www.shnenglu.com/michaelgao/comments/102348.htmlhttp://www.shnenglu.com/michaelgao/archive/2009/12/01/102348.html#Feedback0http://www.shnenglu.com/michaelgao/comments/commentRss/102348.htmlhttp://www.shnenglu.com/michaelgao/services/trackbacks/102348.html


upgrade code.





micheal's tech 2009-12-01 17:20 发表评论
]]>
How can I run another application or batch file from my Visual C# .NET code?http://www.shnenglu.com/michaelgao/archive/2009/11/17/101188.htmlmicheal's techmicheal's techTue, 17 Nov 2009 05:10:00 GMThttp://www.shnenglu.com/michaelgao/archive/2009/11/17/101188.htmlhttp://www.shnenglu.com/michaelgao/comments/101188.htmlhttp://www.shnenglu.com/michaelgao/archive/2009/11/17/101188.html#Feedback0http://www.shnenglu.com/michaelgao/comments/commentRss/101188.htmlhttp://www.shnenglu.com/michaelgao/services/trackbacks/101188.htmlHow can I run another application or batch file from my Visual C# .NET code?
Published 01 June 04 11:54 PM

Posted by: Duncan Mackenzie, MSDN
This post applies to Visual C# .NET 2002/2003

Suppose you want to run a command line application, open up another Windows program, or even bring up the default web browser or email program... how can you do this from your C# code?

The answer for all of these examples is the same, you can use the classes and methods in System.Diagnostics.Process to accomplish these tasks and more.

Example 1. Running a command line application, without concern for the results:

private void simpleRun_Click(object sender, System.EventArgs e){
 System.Diagnostics.Process.Start(@"C:\listfiles.bat");
}

Example 2. Retrieving the results and waiting until the process stops (running the process synchronously):

private void runSyncAndGetResults_Click(object sender, System.EventArgs e){
 System.Diagnostics.ProcessStartInfo psi =
  
new System.Diagnostics.ProcessStartInfo(@"C:\listfiles.bat");
 psi.RedirectStandardOutput =
true;
 psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
 psi.UseShellExecute =
false;
 System.Diagnostics.Process listFiles;
 listFiles = System.Diagnostics.Process.Start(psi);
 System.IO.StreamReader myOutput = listFiles.StandardOutput;
 listFiles.WaitForExit(2000);
 
if (listFiles.HasExited)
 {
  
string output = myOutput.ReadToEnd();
  
this.processResults.Text = output;
 }
}

 Example 3. Displaying a URL using the default browser on the user's machine:

private void launchURL_Click(object sender, System.EventArgs e){
 
string targetURL = @http://www.duncanmackenzie.net;
 System.Diagnostics.Process.Start(targetURL);
}

In my opinion, you are much better off following the third example for URLs, as opposed to executing IE with the URL as an argument. The code shown for Example 3 will launch the user's default browser, which may or may not be IE; you are more likely to provide the user with the experience they want and you will be taking advantage of the browser that is most likely to have up-to-date connection information.

C# code download available from http://www.duncanmackenzie.net/Samples/default.aspx

By the way, this post is a simple port of an earlier VB FAQ post... just in case you thought you had seen it already in your feeds...



micheal's tech 2009-11-17 13:10 发表评论
]]>
þþƷŷպ99| þۺ| þþƷרѶ| Ʒþۺ123| 99reþþƷҳ2020| ҹƷþþþþ99| ޹Ʒþ | þþþAV| þþþAVۿ| þһŷպ| þþþAVվ| Ʒۺþþþþ| þþþӰԺС| þþ뾫Ʒҹ| ҹAVëƬþ| Ⱦþԭɫwww| þ޾Ʒϵַ| ˾þav| ɫþAVۺ| ƷŮþþm| 99þ99þþƷƬ| ԭۺϾþô˵| ŷƷһþ | þþþùƷ鶹ARӰԺ| þˬˬˬav| 2021ھþþƷ| ҹƷþþþ| ߳߳þþ91 | ݺݸɺݺݾþ| þù˾Ʒ| 㽶99þùۺϾƷլ | Ʒպþ| þþþavר| 99þùһ| þ޹ӰԺ| 99þþƷһ| þþþþϸ| ó˾þAvѸ | ݺɫɫݺݺۺϾþ| 97þþþ| һɫþۺϺݺƪ |