锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲欧洲综合在线,99亚洲精品高清一二区,国产AⅤ无码专区亚洲AVhttp://www.tkk7.com/programmer/Tao obeys its own inherent Naturezh-cnSat, 05 Jul 2025 18:39:40 GMTSat, 05 Jul 2025 18:39:40 GMT60鎼浜?/title><link>http://www.tkk7.com/programmer/archive/2011/11/08/363167.html</link><dc:creator>wade</dc:creator><author>wade</author><pubDate>Tue, 08 Nov 2011 05:43:00 GMT</pubDate><guid>http://www.tkk7.com/programmer/archive/2011/11/08/363167.html</guid><wfw:comment>http://www.tkk7.com/programmer/comments/363167.html</wfw:comment><comments>http://www.tkk7.com/programmer/archive/2011/11/08/363167.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/programmer/comments/commentRss/363167.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/programmer/services/trackbacks/363167.html</trackback:ping><description><![CDATA[鎼埌浜?jiǎn)锛?xì) <a >http://theantway.com</a><img src ="http://www.tkk7.com/programmer/aggbug/363167.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/programmer/" target="_blank">wade</a> 2011-11-08 13:43 <a href="http://www.tkk7.com/programmer/archive/2011/11/08/363167.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Could not compile libxml2: /bin/rm: cannot remove `libtoolT': No such file or directoryhttp://www.tkk7.com/programmer/archive/2011/06/02/351574.htmlwadewadeThu, 02 Jun 2011 02:15:00 GMThttp://www.tkk7.com/programmer/archive/2011/06/02/351574.htmlhttp://www.tkk7.com/programmer/comments/351574.htmlhttp://www.tkk7.com/programmer/archive/2011/06/02/351574.html#Feedback0http://www.tkk7.com/programmer/comments/commentRss/351574.htmlhttp://www.tkk7.com/programmer/services/trackbacks/351574.htmllibxml2-2.7.8

緗戜笂鎵句簡(jiǎn)涓浜涘姙娉曢兘涓嶈兘鐢紝鏈鍚庣洿鎺ユ墦寮configure 鏂囦歡錛屾壘鍒?RM "$cfgfile"錛?鏇挎崲涓?nbsp;$RM -f "$cfgfile", 璇寸櫧浜?jiǎn)灏辨槸鍑洪敊浜?jiǎn)涔熶笉瑕佸仠錛岀戶緇墽琛屻傚啀榪愯configure, 鎴愬姛

wade 2011-06-02 10:15 鍙戣〃璇勮
]]>
Connection always successful when installed anti-virus applicationhttp://www.tkk7.com/programmer/archive/2009/07/15/286857.htmlwadewadeWed, 15 Jul 2009 05:30:00 GMThttp://www.tkk7.com/programmer/archive/2009/07/15/286857.htmlhttp://www.tkk7.com/programmer/comments/286857.htmlhttp://www.tkk7.com/programmer/archive/2009/07/15/286857.html#Feedback0http://www.tkk7.com/programmer/comments/commentRss/286857.htmlhttp://www.tkk7.com/programmer/services/trackbacks/286857.htmlWhen I try to use URLConnection to check if a url is accessible using the following code:

try {
    URL url = new URL("http://169.254.169.254/latest");

    URLConnection connection = url.openConnection();
    connection.setConnectTimeout(5000);
    connection.connect();
    System.out.println("Connected successfully using url");
} catch (IOException e) {
        e.printStackTrace();
}

I expected the behavior is: connect should be success if the host is reachable, else throw exception. It works fine without the anti-virus application, but always print 鈥渃onnected successfully鈥?even the host is not reachable.

Then I tried to use Socket to connect:

Socket socket = new Socket();
socket.connect(new InetSocketAddress("169.254.169.254", 80));
if (socket.isConnected()) {
    System.out.println("Connected successfully using socket");
} else {
    System.out.println("Connected failed using socket");
}

But Still got the same problem.

The solution for it:

Disable http check in anti-virus, for example, in ESET NOD32, the settings is Web access protection -> Http, Https -> Http scanner

ESET_http_connection_always_success



wade 2009-07-15 13:30 鍙戣〃璇勮
]]>
Adding text to an image using Preview on Mac(Most difficult to use feature I have met in ten years)http://www.tkk7.com/programmer/archive/2009/07/14/286647.htmlwadewadeTue, 14 Jul 2009 02:49:00 GMThttp://www.tkk7.com/programmer/archive/2009/07/14/286647.htmlhttp://www.tkk7.com/programmer/comments/286647.htmlhttp://www.tkk7.com/programmer/archive/2009/07/14/286647.html#Feedback0http://www.tkk7.com/programmer/comments/commentRss/286647.htmlhttp://www.tkk7.com/programmer/services/trackbacks/286647.htmlPreview support edit images, but the menu item is disabled by default when I open an image file. I thought it was because the Preview does not support this kind of file type. Recently, when I try to find a simple image editor only for add some text, oval or rectangle, I found that the Preview support it perfectly.

After customized the toolbar, the buttons enabled, and it鈥檚 very easy to add comments, but the menu item still disabled.

The following is what I found about how to customize the toolbar from the Preview Help.

 

Adding text to an image

You can add text to an image to describe what鈥檚 in it or when the image was created.

After you save the image, you can鈥檛 edit, move, or delete any text you added to it. If you think you鈥檒l need to edit the text, convert the image to a PDF document, and then add notes to the PDF document. Notes added to a PDF document can be edited after they鈥檙e saved.

To add text to an image:

  1. If the Annotate pop-up menu isn鈥檛 in the toolbar, choose View > Customize Toolbar and drag the Annotate pop-up menu to the toolbar.
  2. Choose Note from the Annotate pop-up menu in the toolbar.
  3. Drag over the area where you want the text to appear.
  4. Enter your text.

Before you save the image, you can move, resize, edit, or delete the text. First choose Text Annotation from the Annotation pop-up menu in the toolbar. Then to edit the text, double-click it. To delete the text, click it so resize handles appear, and then press Delete.



wade 2009-07-14 10:49 鍙戣〃璇勮
]]>
鍩轟簬JavaScript鐨勪唬鐮佽嚜鍔ㄧ敓鎴愬伐鍏?/title><link>http://www.tkk7.com/programmer/archive/2008/03/05/183945.html</link><dc:creator>wade</dc:creator><author>wade</author><pubDate>Wed, 05 Mar 2008 05:28:00 GMT</pubDate><guid>http://www.tkk7.com/programmer/archive/2008/03/05/183945.html</guid><wfw:comment>http://www.tkk7.com/programmer/comments/183945.html</wfw:comment><comments>http://www.tkk7.com/programmer/archive/2008/03/05/183945.html#Feedback</comments><slash:comments>18</slash:comments><wfw:commentRss>http://www.tkk7.com/programmer/comments/commentRss/183945.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/programmer/services/trackbacks/183945.html</trackback:ping><description><![CDATA[     鎽樿: 蹇熺敓鎴愮▼搴忎唬鐮? 姣斿Struts, Spring, Jdbc/Hibernate鎵鏈夊墠鍚庡彴鐨勪唬鐮? <br>鏀寔Mysql, 浠ュ強(qiáng)鏀寔Ado榪炴帴鐨勬暟鎹簱. <br>鏀寔鎵歸噺鐢熸垚閮ㄥ垎/鍏ㄩ儴妯℃澘錛?淇濆瓨閫変腑鐨勬ā鏉垮埌Working Set <br>浣跨敤Javascript浣滀負(fù)妯℃澘鑴氭湰璇█  <a href='http://www.tkk7.com/programmer/archive/2008/03/05/183945.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/programmer/aggbug/183945.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/programmer/" target="_blank">wade</a> 2008-03-05 13:28 <a href="http://www.tkk7.com/programmer/archive/2008/03/05/183945.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Introduce a tool to generate code by writing JavaScripthttp://www.tkk7.com/programmer/archive/2008/03/04/183810.htmlwadewadeTue, 04 Mar 2008 14:48:00 GMThttp://www.tkk7.com/programmer/archive/2008/03/04/183810.htmlhttp://www.tkk7.com/programmer/comments/183810.htmlhttp://www.tkk7.com/programmer/archive/2008/03/04/183810.html#Feedback0http://www.tkk7.com/programmer/comments/commentRss/183810.htmlhttp://www.tkk7.com/programmer/services/trackbacks/183810.htmlSupport Mysql, and database which support Ado connection
Support generate file/project files and batch generate, and you can save you selection to a named working set in batch generate mode.
Using Javascript as the template engine  闃呰鍏ㄦ枃

wade 2008-03-04 22:48 鍙戣〃璇勮
]]>
HOWTO: Compare folder under linuxhttp://www.tkk7.com/programmer/archive/2008/02/29/182984.htmlwadewadeFri, 29 Feb 2008 08:52:00 GMThttp://www.tkk7.com/programmer/archive/2008/02/29/182984.htmlhttp://www.tkk7.com/programmer/comments/182984.htmlhttp://www.tkk7.com/programmer/archive/2008/02/29/182984.html#Feedback0http://www.tkk7.com/programmer/comments/commentRss/182984.htmlhttp://www.tkk7.com/programmer/services/trackbacks/182984.htmldiff -r -q -X exclude.list . testing

wade 2008-02-29 16:52 鍙戣〃璇勮
]]>
闆嗘垚ACEGI 榪涜鏉冮檺鎺у埗http://www.tkk7.com/programmer/archive/2008/01/30/178565.htmlwadewadeWed, 30 Jan 2008 09:28:00 GMThttp://www.tkk7.com/programmer/archive/2008/01/30/178565.htmlhttp://www.tkk7.com/programmer/comments/178565.htmlhttp://www.tkk7.com/programmer/archive/2008/01/30/178565.html#Feedback7http://www.tkk7.com/programmer/comments/commentRss/178565.htmlhttp://www.tkk7.com/programmer/services/trackbacks/178565.html澧炲姞Junit 嫻嬭瘯, 榪欐牱鍙互鍦ㄦ敼鍙樻潈闄愬悗, 鏂逛究鍦版鏌ユ槸鍚﹁緗紜?
Acegi 鎻愪緵鐨凾ag涓嶈兘鍒ゆ柇褰撳墠鐢ㄦ埛瀵規(guī)煇涓涓猆RL鏈夋病鏈夋潈闄? 鐢變簬寰堝鏃跺欓渶瑕佹牴鎹綋鍓嶇敤鎴風(fēng)殑鏉冮檺鏉ユ帶鍒舵煇浜涘姛鑳芥槸鍚︽樉紺? 鎵浠ュ鍔犵浉搴旂殑Tag
濡傛灉褰撳墠鐢ㄦ埛娌℃湁鎸囧畾url鐨勬潈闄?鏄劇ず鏈儴鍒嗗唴瀹?/auth:ifNotAuthrized>
濡傛灉褰撳墠鐢ㄦ埛鏈夋寚瀹歶rl鐨勬潈闄?鏄劇ず鏈儴鍒嗗唴瀹?/auth:ifAuthrized>

  闃呰鍏ㄦ枃

wade 2008-01-30 17:28 鍙戣〃璇勮
]]>
How To: Using symfony to add a join between tableshttp://www.tkk7.com/programmer/archive/2007/12/05/165599.htmlwadewadeWed, 05 Dec 2007 09:26:00 GMThttp://www.tkk7.com/programmer/archive/2007/12/05/165599.htmlhttp://www.tkk7.com/programmer/comments/165599.htmlhttp://www.tkk7.com/programmer/archive/2007/12/05/165599.html#Feedback0http://www.tkk7.com/programmer/comments/commentRss/165599.htmlhttp://www.tkk7.com/programmer/services/trackbacks/165599.html1. simple join two tables

purpose:
generate sql like:   

select * from photo p
    left join artist a on p.artist_id = a.artist_id
      where a.genre = 'something' and p.genre = 'something'

code:           

if(!CriteriaUtil::hasJoin($criteria, ArtistPeer::TABLE_NAME)){
    $criteria->addJoin(PhotoPeer::ARTIST_ID, ArtistPeer::ARTIST_ID, Criteria::LEFT_JOIN);
}
$criteria->add(ArtistPeer::GENRE, $genre);    
$criteria->add(PhotoPeer::GENRE, $genre);

2. join two tables, add AND OR between conditions
purpose:
generate sql like:    

select * from photo p
    left join artist a on p.artist_id = a.artist_id
      where (a.genre = 'some' or p.genre='something')
        and a.name = 'something'

code:   

if(!CriteriaUtil::hasJoin($criteria, ArtistPeer::TABLE_NAME)){
   $criteria->addJoin(PhotoPeer::ARTIST_ID, ArtistPeer::ARTIST_ID, Criteria::LEFT_JOIN);
}
$criteria->add(ArtistPeer::GENRE, $genre);
$c = $criteria->getCriterion(ArtistPeer::GENRE);
if($c != null){
   $c->addOr($criteria->getNewCriterion(PhotoPeer::GENRE, $genre));
}
$criteria->add(ArtistPeer::NAME, $name);

 

Note:
It's a good habit to check if we have joined the table already. to check this, you can use the following util class, it get all the joined tables, and check if the table exists in them.

class CriteriaUtil{
    public static function hasJoin($c, $table_name){
        $joins = $c->getJoins();
        if($joins != null){
            foreach($joins as $join){
                if($join->getRightTableName() == $table_name){
                    return true;
                }
                if($join->getLeftTableName() == $table_name){
                    return true;
                }
            }
        }
        return false;
    }
}


wade 2007-12-05 17:26 鍙戣〃璇勮
]]>
WLW: QI for IEnumVARIANT failed on the unmanaged server.http://www.tkk7.com/programmer/archive/2007/12/05/165594.htmlwadewadeWed, 05 Dec 2007 09:08:00 GMThttp://www.tkk7.com/programmer/archive/2007/12/05/165594.htmlhttp://www.tkk7.com/programmer/comments/165594.htmlhttp://www.tkk7.com/programmer/archive/2007/12/05/165594.html#Feedback0http://www.tkk7.com/programmer/comments/commentRss/165594.htmlhttp://www.tkk7.com/programmer/services/trackbacks/165594.htmlIt maybe popup an error message to say that "QI for IEnumVARIANT failed on the unmanaged server" when open the Windows Live Writer.

After search on google, I found the resolution is import some settings into registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}]
@="IEnumVARIANT"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\NumMethods]
@="7"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\ProxyStubClsid]
@="{00020421-0000-0000-C000-000000000046}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{00020404-0000-0000-C000-000000000046}\ProxyStubClsid32]
@="{00020421-0000-0000-C000-000000000046}"

 

You can also download the file here, unzip and import it to your registry.



wade 2007-12-05 17:08 鍙戣〃璇勮
]]>
How To: Clear cache for symfonyhttp://www.tkk7.com/programmer/archive/2007/11/13/165571.htmlwadewadeTue, 13 Nov 2007 09:23:00 GMThttp://www.tkk7.com/programmer/archive/2007/11/13/165571.htmlhttp://www.tkk7.com/programmer/comments/165571.htmlhttp://www.tkk7.com/programmer/archive/2007/11/13/165571.html#Feedback0http://www.tkk7.com/programmer/comments/commentRss/165571.htmlhttp://www.tkk7.com/programmer/services/trackbacks/165571.htmlOriginal article: http://www.symfony-project.com/book/1_0/18-Performance

Clearing Selective Parts of the Cache

During application development, you have to clear the cache in various situations:

  • When you create a new class: Adding a class to an autoloading directory (one of the project's lib/ folders) is not enough to have symfony find it automatically. You must clear the autoloading configuration cache so that symfony browses again all the directories of the autoload.yml file and references the location of autoloadable classes--including the new ones.
  • When you change the configuration in production: The configuration is parsed only during the first request in production. Further requests use the cached version instead. So a change in the configuration in the production environment (or any environment where SF_DEBUG is turned off) doesn't take effect until you clear the cached version of the file.
  • When you modify a template in an environment where the template cache is enabled: The valid cached templates are always used instead of existing templates in production, so a template change is ignored until the template cache is cleared or outdated.
  • When you update an application with the sync command: This case usually covers the three previous modifications.

The problem with clearing the whole cache is that the next request will take quite long to process, because the configuration cache needs to be regenerated. Besides, the templates that were not modified will be cleared from the cache as well, losing the benefit of previous requests.

That means it's a good idea to clear only the cache files that really need to be regenerated. Use the options of the clear-cache task to define a subset of cache files to clear, as demonstrated in Listing 18-14.

Listing 18-14 - Clearing Only Selective Parts of the Cache

// Clear only the cache of the myapp application
> symfony clear-cache myapp

// Clear only the HTML cache of the myapp application
> symfony clear-cache myapp template

// Clear only the configuration cache of the myapp application
> symfony clear-cache myapp config

You can also remove files by hand in the cache/ directory, or clear template cache files selectively from the action with the $cacheManager->remove() method, as described inChapter 12

 

Note:

1. We can use $cacheManager->remove() to clear cache after we deployed a new version product.

2. write code to generate models from database, and then call $cacheManager->remove() to clear cache.


 


wade 2007-11-13 17:23 鍙戣〃璇勮
]]>
How To: using bash script to backup MySqlhttp://www.tkk7.com/programmer/archive/2007/11/13/165573.htmlwadewadeTue, 13 Nov 2007 07:49:00 GMThttp://www.tkk7.com/programmer/archive/2007/11/13/165573.htmlhttp://www.tkk7.com/programmer/comments/165573.htmlhttp://www.tkk7.com/programmer/archive/2007/11/13/165573.html#Feedback0http://www.tkk7.com/programmer/comments/commentRss/165573.htmlhttp://www.tkk7.com/programmer/services/trackbacks/165573.html
#get the first parameter as the database name
DATABASE=$1
#if no database specified, then you can set the default one
if [ -z $DATABASE ]; then
DATABASE=default_database_name_here
fi

#mysql user and password to backup the database. MYSQLUSER=mysql_user MYSQLPWD=mysql_password #path to backup ARCHIVEPATH=~/backup/db_backup DATE=`date +%Y%m%d` YEAR=`date +%Y` MONTH=`date +%m` FOLDER_MONTH=$ARCHIVEPATH/$YEAR$MONTH if [ ! -d $FOLDER_MONTH ]; then
echo "mkdir $FOLDER_MONTH" mkdir $FOLDER_MONTH fi # Backup echo "mysqldump -u$MYSQLUSER -p$MYSQLPWD $DATABASE | gzip > $FOLDER_MONTH/$DATABASE-$DATE.sql.gz" mysqldump -u$MYSQLUSER -p$MYSQLPWD $DATABASE | gzip > $FOLDER_MONTH/$DATABASE-$DATE.sql.gz

 

and you can add the script to cron job under *nix and schedule under windows:

*nix:

Save the following text in file: db_backup.at

10 * * * * ~/backup/backup_db.sh databasename

and call

crontab db_backup.at

You need to change the period to run the script for your business, e.g. each day, each week etc.


 


wade 2007-11-13 15:49 鍙戣〃璇勮
]]>
How To: open Mysql binary loghttp://www.tkk7.com/programmer/archive/2007/11/13/165572.htmlwadewadeTue, 13 Nov 2007 07:49:00 GMThttp://www.tkk7.com/programmer/archive/2007/11/13/165572.htmlhttp://www.tkk7.com/programmer/comments/165572.htmlhttp://www.tkk7.com/programmer/archive/2007/11/13/165572.html#Feedback0http://www.tkk7.com/programmer/comments/commentRss/165572.htmlhttp://www.tkk7.com/programmer/services/trackbacks/165572.html
#server-id       = 1
log-bin         = /var/log/mysql/mysql-bin.log
#if you set the expire_logs_days = x var in the [mysqld] section of your my.cnf it will automatically rotate your bin logs after x days.
expire_logs_days = 30
#it will create a new log file when the current file reach the specified size.
max_binlog_size = 100M

 


wade 2007-11-13 15:49 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲综合久久久久久中文字幕| 一级毛片在线免费播放| 男人进去女人爽免费视频国产| 亚洲熟妇无码久久精品| 黄页免费在线观看| 国产免费av片在线无码免费看| 亚洲色图黄色小说| 两性刺激生活片免费视频| 亚洲国产精品成人综合久久久| 思思re热免费精品视频66| 亚洲色欲色欲www| 岛国岛国免费V片在线观看| 精品国产人成亚洲区| 国产亚洲精品免费视频播放| 亚洲精品无码久久千人斩| 国产免费无码一区二区| 亚洲成人黄色网址| 在线播放免费人成视频在线观看| 日韩国产精品亚洲а∨天堂免| 免费一看一级毛片全播放| 亚洲av无码av制服另类专区| 在线看亚洲十八禁网站| 久久午夜夜伦鲁鲁片无码免费| 亚洲人成亚洲精品| 欧美日韩国产免费一区二区三区 | 四虎影院免费视频| 老司机亚洲精品影院在线观看| 亚洲&#228;v永久无码精品天堂久久 | 亚洲精品无码人妻无码| 久久综合国产乱子伦精品免费| 亚洲精品视频观看| 韩国二级毛片免费播放| 亚洲卡一卡二卡乱码新区| 91人成网站色www免费下载| 国产99在线|亚洲| 亚洲国产午夜中文字幕精品黄网站 | 97人妻精品全国免费视频| 亚洲一级毛片视频| AV在线播放日韩亚洲欧| 亚洲免费在线视频播放| 亚洲综合图片小说区热久久|