2015年11月17日 星期二

[C#] 善用DEBUG模式


善用DEBUG狀態下才執行的程式碼來做開發偵錯



在Web.config裡頭定義
    <compilation debug="true" targetFramework="4.5" />


在程式碼裡面用

#if DEBUG

#endif


或是

if (HttpContext.Current.IsDebuggingEnabled)
{

}



from:http://blog.miniasp.com/post/2009/09/16/How-to-utilize-Debug-mode-to-develop-aspnet-and-other-net-applications.aspx

http://www.dotnetperls.com/isdebuggingenabled

2015年11月4日 星期三

[ubuntu] CPU調頻




以root開啟該設定檔

/etc/cpufreqd.conf


尋找以下內容,調整maxfreq後重開機

[Profile]
name=Performance High
minfreq=50%
maxfreq=80%
policy=performance
#exec_post=echo 8 > /proc/acpi/sony/brightness
[/Profile]



參考
http://ashotw.blogspot.tw/2008/06/cpufrequtils.html
http://ubuntuforums.org/showthread.php?t=764446
http://ashotw.blogspot.tw/2008/06/cpufrequtils.html
http://askubuntu.com/questions/149271/how-to-change-default-scaling-governor-back-to-ondemand

 

MangoHost Copyright © 2009 Cookiez is Designed by Ipietoon for Free Blogger Template