??xml version="1.0" encoding="utf-8" standalone="yes"?>浙江福彩快乐12:BlogJava - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/I Love Programming As My Life!zh-cnSat, 15 Dec 2018 20:53:51 GMTSat, 15 Dec 2018 20:53:51 GMT60Hybrid开发资源网站汇?/title><link>//www.ot7t.com.cn/fastzch/archive/2014/08/05/416566.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Tue, 05 Aug 2014 01:45:00 GMT</pubDate><guid>//www.ot7t.com.cn/fastzch/archive/2014/08/05/416566.html</guid><wfw:comment>//www.ot7t.com.cn/fastzch/comments/416566.html</wfw:comment><comments>//www.ot7t.com.cn/fastzch/archive/2014/08/05/416566.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/fastzch/comments/commentRss/416566.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/fastzch/services/trackbacks/416566.html</trackback:ping><description><![CDATA[@import url(//www.ot7t.com.cn/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); //cubiq.org/ <div id="xunlei_com_thunder_helper_plugin_d462f475-c18e-46be-bd10-327458d045bd"></div> <div class="yibqv">包含iscroll, infinity wall?/div> <div class="yibqv"><br /> </div> <div class="yibqv"><br /> </div><img src ="//www.ot7t.com.cn/fastzch/aggbug/416566.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/fastzch/" target="_blank">Robin's Programming World</a> 2014-08-05 09:45 <a href="//www.ot7t.com.cn/fastzch/archive/2014/08/05/416566.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>?USB 设备启动 Surface - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2014/04/01/411761.htmlRobin's Programming WorldRobin's Programming WorldMon, 31 Mar 2014 16:15:00 GMT//www.ot7t.com.cn/fastzch/archive/2014/04/01/411761.html//www.ot7t.com.cn/fastzch/comments/411761.html//www.ot7t.com.cn/fastzch/archive/2014/04/01/411761.html#Feedback0//www.ot7t.com.cn/fastzch/comments/commentRss/411761.html//www.ot7t.com.cn/fastzch/services/trackbacks/411761.html
?Surface 关闭时从可启?USB 设备启动
步骤 1?    将可启动 USB 设备连接?USB 端口?br />步骤 2?    按住音量减小 (-) 控制键?br />步骤 3?    按下并释放电源按钮?br />步骤 4?    当显?Surface 徽标时,释放音量控制键?Surface 将启?USB 设备上的软件?br />
?Surface 启用时从可启?USB 设备启动
步骤 1?    将可启动 USB 设备连接?USB 端口?br />步骤 2?    从屏幕右边缘向左轻扫,然后点?#8220;设置”?br />(如果您使用鼠标,请指向屏幕的右上角,将鼠标指针下移并单?#8220;设置”。)
步骤 3?    点击或单?#8220;更改电脑设置”?br />步骤 4?    点击或单?#8220;更新和恢?#8221;,然后点击或单击“恢复”?br />步骤 5?    ?#8220;高级启动”下,点击或单?#8220;立即重新启动”?br />步骤 6?    ?#8220;选择一个选项”屏幕中,点击或单?#8220;使用设备”?br />步骤 7?    ?#8220;疑难解答”屏幕中,点击或单?#8220;高级选项”?br />步骤 8?    ?#8220;高级选项”屏幕中,点击或单?USB 设备的名称。Surface 将重新启动并?USB 设备启动?br />
BTW, 还是官方文靠谱,还是Google靠谱!!?br />原文地址://www.microsoft.com/surface/zh-cn/support/storage-files-and-folders/boot-surface-pro-from-usb-recovery-device


Robin's Programming World 2014-04-01 00:15 发表评论
]]>
XCode Plugins Package Manager - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2014/02/05/409533.htmlRobin's Programming WorldRobin's Programming WorldTue, 04 Feb 2014 18:28:00 GMT//www.ot7t.com.cn/fastzch/archive/2014/02/05/409533.html//www.ot7t.com.cn/fastzch/comments/409533.html//www.ot7t.com.cn/fastzch/archive/2014/02/05/409533.html#Feedback1//www.ot7t.com.cn/fastzch/comments/commentRss/409533.html//www.ot7t.com.cn/fastzch/services/trackbacks/409533.htmlXCode Plugins Package Manager
https://github.com/mneorr/Alcatraz

通过这个工具,我还装了以下插件:
AJKExtendedOpening
BBUDebuggerTuckAway
BBUncrustifyPlugin
CocoaPods
CodePilot
DLAutoresizeMaskPlugin
DerivedData Exterminator
FuzzyAutocomplete
HOStringSense
KSImageNamed
OMColorSense
OMQuickHelp
PluginConsole
QuickLocalization
SCXcodeMinimap
VVDocumenter-Xcode
XCFixin_CurrentLineHighlighter
XcodeAutoCloseDebug
XcodePlus Delete Line

这些插件都是相当的好用呀!!?br />

Robin's Programming World 2014-02-05 02:28 发表评论
]]>
Ubuntu环境下Apache2与Tomcat集成 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2014/02/05/409532.htmlRobin's Programming WorldRobin's Programming WorldTue, 04 Feb 2014 18:21:00 GMT//www.ot7t.com.cn/fastzch/archive/2014/02/05/409532.html//www.ot7t.com.cn/fastzch/comments/409532.html//www.ot7t.com.cn/fastzch/archive/2014/02/05/409532.html#Feedback4//www.ot7t.com.cn/fastzch/comments/commentRss/409532.html//www.ot7t.com.cn/fastzch/services/trackbacks/409532.html    apt-get install apache2

重启命令?/etc/init.d/apache2 restart

/etc/apache2/conf.d/charset
这个是网站编码配置,需要将最后行?#AddDefaultCharset UTF-8 前面?去掉,使用UTF-8编码,当然也可以?UTF-8改成别的编码?br />
这个是网站目录配置,想更改网站目录的话,就修改这个,上面的目录的 apache2.conf 里面也有网站目录?br />/etc/apache2/sites-available/default


2?install JK connector.
apt-get install libapache2-mod-jk
so文件会被安装到目录: /usr/lib/apache2/modules 中?br />安装完后,在/etc/apache2/mods-enabled下会多出一个jk.load文件,重启apache2后,apache自动装载这个文件以加载mod_jk.


3、修改httpd.conf,一开始它是空?增加
#Server Name
ServerName 127.0.0.1

#JK config
#JkWorkersFile /etc/libapache2-mod-jk/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info
JkMount /*.jsp ajp13_worker
JkMount /*/servlet/ ajp13_worker
JkMount /*.do ajp13_worker

4?etc/apache2/sites-available中增加一个文件,文件名随?
如我的tomcat,内容如下:
<VirtualHost 127.0.0.1>
  ServerAdmin fastzch@gmail.com
  DocumentRoot "/var/www"
  ErrorLog "/var/log/apache2/ediskmanage_errors.log"
  CustomLog "/var/log/apache2/ediskmanage_accesses.log" common

  JkMount /servlet/* ajp13_worker
  #让Apache支持对servlet传送,用以Tomcat解析
  JkMount /*.jsp ajp13_worker
  #让Apache支持对jsp传送,用以Tomcat解析
  JkMount /*.do ajp13_worker
  #让Apache支持?do传送,用以Tomcat解析
</VirtualHost>

5、执?a2ensite tomcat

6?etc/init.d/apache2 reload

7、部署应用后重启Tomcat即可

Robin's Programming World 2014-02-05 02:21 发表评论
]]>
Phonegap Debug Note - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2014/01/02/408382.htmlRobin's Programming WorldRobin's Programming WorldThu, 02 Jan 2014 06:17:00 GMT//www.ot7t.com.cn/fastzch/archive/2014/01/02/408382.html//www.ot7t.com.cn/fastzch/comments/408382.html//www.ot7t.com.cn/fastzch/archive/2014/01/02/408382.html#Feedback0//www.ot7t.com.cn/fastzch/comments/commentRss/408382.html//www.ot7t.com.cn/fastzch/services/trackbacks/408382.html
The following are notes for debug feature:
The "console" is a plugin now, so we need to add it by following command:
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git

And then you could use console API now, e.g.:
console.log('onSuccess! contacts.length:' + contacts.length );

You will see logs on output console of Xcode or Logcat of Eclipse.
Pls see following screenshots:







Robin's Programming World 2014-01-02 14:17 发表评论
]]>
iOS App -- WHETC 发布 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2012/11/10/391148.htmlRobin's Programming WorldRobin's Programming WorldSat, 10 Nov 2012 12:06:00 GMT//www.ot7t.com.cn/fastzch/archive/2012/11/10/391148.html//www.ot7t.com.cn/fastzch/comments/391148.html//www.ot7t.com.cn/fastzch/archive/2012/11/10/391148.html#Feedback0//www.ot7t.com.cn/fastzch/comments/commentRss/391148.html//www.ot7t.com.cn/fastzch/services/trackbacks/391148.html主要是为武汉车主提供ETC查询的功能?/div>

有需要的朋友,可直接?App Store上搜WHETC,然后下载?/div>
也可通过下载链接直接下载:https://itunes.apple.com/cn/app/whetc/id558349225

有什么好的建议或问题请留言。谢谢!



]]>How to uninstall dnscrypt client on MAC - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2012/09/16/387829.htmlRobin's Programming WorldRobin's Programming WorldSun, 16 Sep 2012 10:14:00 GMT//www.ot7t.com.cn/fastzch/archive/2012/09/16/387829.html//www.ot7t.com.cn/fastzch/comments/387829.html//www.ot7t.com.cn/fastzch/archive/2012/09/16/387829.html#Feedback0//www.ot7t.com.cn/fastzch/comments/commentRss/387829.html//www.ot7t.com.cn/fastzch/services/trackbacks/387829.html//shared.opendns.com/dnscrypt/packages/osx-client/


Robin's Programming World 2012-09-16 18:14 发表评论
]]>
首个iOS App终于提交?/title><link>//www.ot7t.com.cn/fastzch/archive/2012/09/03/386856.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Mon, 03 Sep 2012 03:45:00 GMT</pubDate><guid>//www.ot7t.com.cn/fastzch/archive/2012/09/03/386856.html</guid><wfw:comment>//www.ot7t.com.cn/fastzch/comments/386856.html</wfw:comment><comments>//www.ot7t.com.cn/fastzch/archive/2012/09/03/386856.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/fastzch/comments/commentRss/386856.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/fastzch/services/trackbacks/386856.html</trackback:ping><description><![CDATA[@import url(//www.ot7t.com.cn/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); 经过两个月左右的时间策划和开发,我个人的首个iOS App终于提交了,先冒个泡,等Review通过后会再开一个专贴进行介绍和技术支持? <div class="yibqv">至于是个什么应用,我想可能还得先保密一两周什么的,这得看Apple的速度了,哈哈...</div> <div class="yibqv"><br /> </div> <div class="yibqv">有兴趣的可以猜猜看?/div><img src ="//www.ot7t.com.cn/fastzch/aggbug/386856.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/fastzch/" target="_blank">Robin's Programming World</a> 2012-09-03 11:45 <a href="//www.ot7t.com.cn/fastzch/archive/2012/09/03/386856.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>XP IIS出现The specified module could not be found解决方法 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2012/07/03/382092.htmlRobin's Programming WorldRobin's Programming WorldTue, 03 Jul 2012 07:09:00 GMT//www.ot7t.com.cn/fastzch/archive/2012/07/03/382092.html//www.ot7t.com.cn/fastzch/comments/382092.html//www.ot7t.com.cn/fastzch/archive/2012/07/03/382092.html#Feedback0//www.ot7t.com.cn/fastzch/comments/commentRss/382092.html//www.ot7t.com.cn/fastzch/services/trackbacks/382092.html

Robin's Programming World 2012-07-03 15:09 发表评论
]]>
Open Mac Ftp Server - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2012/06/30/381890.htmlRobin's Programming WorldRobin's Programming WorldSat, 30 Jun 2012 15:15:00 GMT//www.ot7t.com.cn/fastzch/archive/2012/06/30/381890.html//www.ot7t.com.cn/fastzch/comments/381890.html//www.ot7t.com.cn/fastzch/archive/2012/06/30/381890.html#Feedback0//www.ot7t.com.cn/fastzch/comments/commentRss/381890.html//www.ot7t.com.cn/fastzch/services/trackbacks/381890.htmlWhile this hint will work as stated, it's pretty much incorrect usage of launchctl for the purpose of the hint.

launchctl load...loads the FTP service into launchd's database of services. When you do an unload, you are telling launchd to not manage it anymore.

So a better way to do this--probably the proper way--is to first issue the command to load the service:

sudo launchctl load -w /System/Library/LaunchDaemons/ftp.plist

Then, if you'd like to stop FTP, issue this command:

sudo launchctl stop com.apple.ftpd

And if you decide you'd like to bring it back up, use this command:

sudo launchctl start com.apple.ftpd

If you'd like for launchd to forget about FTP, that is when you would run this:

sudo launchctl unload /System/Library/LaunchDaemons/ftp.plist

The hint as-is will work, but seems a little counter-productive to make launchd remember and forget about FTP all the time.



Robin's Programming World 2012-06-30 23:15 发表评论
]]>
Spring 3 MVC and JSON example - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2012/06/04/379962.htmlRobin's Programming WorldRobin's Programming WorldMon, 04 Jun 2012 15:06:00 GMT//www.ot7t.com.cn/fastzch/archive/2012/06/04/379962.html//www.ot7t.com.cn/fastzch/comments/379962.html//www.ot7t.com.cn/fastzch/archive/2012/06/04/379962.html#Feedback1//www.ot7t.com.cn/fastzch/comments/commentRss/379962.html//www.ot7t.com.cn/fastzch/services/trackbacks/379962.html原文地址://www.mkyong.com/spring-mvc/spring-3-mvc-and-json-example/


Published: July 28, 2011 , Updated: July 27, 2011 , Author: mkyong

 

In Spring 3, you can enable “mvc:annotation-driven” to support object conversion to/from JSON format, if Jackson JSON processor is existed on the project classpath.

In this tutorial, we show you how to output JSON data from Spring MVC.

Technologies used :

Spring 3.0.5.RELEASE
Jackson 1.7.1
JDK 1.6
Eclipse 3.6
Maven 3
1. Project Dependencies

To use JSON in Spring MVC, you need to include Jackson dependency.

    <properties>
        <spring.version>3.0.5.RELEASE</spring.version>
    </properties>
 
    <dependencies>
 
        <!-- Jackson JSON Mapper -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.7.1</version>
        </dependency>
 
        <!-- Spring 3 dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
        </dependency>
 
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
 
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
 
    </dependencies>

 
2. Model

A simple POJO, later convert this object into JSON output.

package com.mkyong.common.model;
 
public class Shop {
 
    String name;
    String staffName[];
 
    //getter and setter methods
 
}

 
3. Controller

Add “@ResponseBody” in the return value, no much detail in the Spring documentation.

As i know, when Spring see

Jackson library existed on classpath
“mvc:annotation-driven” is enabled
Return method annotated with @ResponseBody
It will handle the JSON conversion automatically.

package com.mkyong.common.controller;
 
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.mkyong.common.model.Shop;
 
@Controller
@RequestMapping("/kfc/brands")
public class JSONController {
 
    @RequestMapping(value="{name}", method = RequestMethod.GET)
    public @ResponseBody Shop getShopInJSON(@PathVariable String name) {
 
        Shop shop = new Shop();
        shop.setName(name);
        shop.setStaffName(new String[]{"mkyong1", "mkyong2"});
 
        return shop;
 
    }
 
}
4. mvc:annotation-driven

Enable “mvc:annotation-driven” in your Spring configuration XML file.

<beans xmlns="//www.springframework.org/schema/beans"
    xmlns:context="//www.springframework.org/schema/context"
    xmlns:mvc="//www.springframework.org/schema/mvc"
    xmlns:xsi="//www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        //www.springframework.org/schema/beans    
        //www.springframework.org/schema/beans/spring-beans-3.0.xsd
        //www.springframework.org/schema/context
        //www.springframework.org/schema/context/spring-context-3.0.xsd
        //www.springframework.org/schema/mvc
        //www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
 
    <context:component-scan base-package="com.mkyong.common.controller" />
 
    <mvc:annotation-driven />
 
</beans>
5. Demo

URL : //localhost:8080/SpringMVC/rest/kfc/brands/kfc-kampar


Download Source Code

Download it – SpringMVC-JSON-Example.zip (7 KB)
References

mvc-annotation-driven documentation
High-performance JSON processor
Spring MVC and XML example


Robin's Programming World 2012-06-04 23:06 发表评论
]]>
MongoDB install notes on Mac: - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2012/06/03/379837.htmlRobin's Programming WorldRobin's Programming WorldSat, 02 Jun 2012 17:15:00 GMT//www.ot7t.com.cn/fastzch/archive/2012/06/03/379837.html//www.ot7t.com.cn/fastzch/comments/379837.html//www.ot7t.com.cn/fastzch/archive/2012/06/03/379837.html#Feedback0//www.ot7t.com.cn/fastzch/comments/commentRss/379837.html//www.ot7t.com.cn/fastzch/services/trackbacks/379837.htmlReference page: //docs.mongodb.org/master/tutorial/install-mongodb-on-os-x/

1, install brew, if it is exist, skip this step.
Reference page:  //mxcl.github.com/homebrew/
Execute the following command:
#/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

2, install MongoDB:
#brew update
#brew install mongodb

3, use mondod command to startup MongoDB
#nohup mongod &

4, enter mongo shell for testing:
#mongo

MongoDB shell version: 2.0.5
connecting to: test
> db.test.save({a:1})
> db.test.find()
{ "_id" : ObjectId("4fca4824293f5115fa740813"), "a" : 1 }

5, GUI client recommendations:

MongoExplorer
MongoHub

6, MongoDB has provided a web base management inerface:
//localhost:28017/

7, export and import:
$ mongodump -h test.xxxx.com:52000 -d dataname -o /home/aa/dev/mongodb/data

mongodump mongo导出数据库命?mongodump --help 可以查看该命令下所有的帮助

-h 导出?br /> -d 要导出的数据库名?br /> -o 数据库要导出的位?br />
在终端滚过N行之后,数据库导出完成,可以?home/aa/dev/mongodb/data 目录下查看导出的文件,bson格式的(我导出后没有马上就看到文件,等了一会才出现的,原因不明?br />
然后数据库恢复使用:mongorestore 命令

$ mongorestore -d cmsdev  /home/xx/dev/mongodb/data/cmsdev

-d 使用的数据库名称
后面直接加你刚才导出的目录,这样是直接恢复所有表

如果-c 是恢复一个表


Robin's Programming World 2012-06-03 01:15 发表评论
]]>
永久恢复联?iPhone4 ?YouTube - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2012/01/17/368638.htmlRobin's Programming WorldRobin's Programming WorldTue, 17 Jan 2012 02:43:00 GMT//www.ot7t.com.cn/fastzch/archive/2012/01/17/368638.html//www.ot7t.com.cn/fastzch/comments/368638.html//www.ot7t.com.cn/fastzch/archive/2012/01/17/368638.html#Feedback2//www.ot7t.com.cn/fastzch/comments/commentRss/368638.html//www.ot7t.com.cn/fastzch/services/trackbacks/368638.html

原文地址?/span> //www.inanu.net/post/314.html
iOS 5.0.1 亲测


永久恢复联?iPhone4 ?YouTube

作? Nanu 日期: 2011-05-18

在有 G.F.W. “保护”下的天朝网络,联通竟然还阉割掉了 iPhone4 ?Youtube 应用,真是断子绝孙啊!不甘心,一定要?Youtube 找回来!

在网上看了很关于恢复联?iPhone4 YouTube 的方法,总结下大致就 2 种方法:
1. 利用SBSettings恢复;(我测试是没有效果的)
2. ?Safari 上访?m.youtube.com 之后挂个主屏幕的标签;(图标太恶心)

下面终极恢复方法来了?/p>

  • 该方法只适用于联?iPhone4?/strong>
  • iPhone4 必须已经越狱,如果不想越狱的,请使用上面的方?2?/strong>
  • 该方法适用于所有的 iOS 固件版本?/strong>

1. ?iPhone4 连接?i-Funbox,并进入?//Applications/YouTube.app 目录?/p>

2. 将目录中?Info.plist 文件复制到你的电脑上(做个备份,以防万一);

3. 将下面的代码复制粘贴到一个文件中,并命名?Info.plist?/p>

4. 将新建的 Info.plist 复制?iPhone4 中的 YouTube.app 目录,覆盖原文件?/p>

5. 重启 iPhone4?/p>

HOHO! 熟悉?YouTube 图标回来啦!


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "//www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0" converted_by="i-funbox.com">
<dict> 
    <key>DTXcode</key>
        <string>0324</string>
        <key>DTSDKName</key>
        <string>iphoneos4.1.internal</string>
        <key>CFBundleName</key>
    <string>YouTube</string>
    <key>UIApplicationExitsOnSuspend</key>
        <true />
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
    <key>DTPlatformName</key>
    <string>iphoneos</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleSupportedPlatforms</key>
    <array>
        <string>iPhoneOS</string>
    </array>
    <key>SBUsesNetwork</key>
    <integer>3</integer>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleExecutable</key>
    <string>YouTube</string>
    <key>DTCompiler</key>
    <string>4.2</string>
    <key>SBMatchingApplicationGenres</key>
    <array>
        <string>Entertainment</string>
        <string>Social Networking</string>
    </array>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLName</key>
            <string>YouTube Internal URL</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>youtube</string>
            </array>
        </dict>
 
    </array>
    <key>CFBundleIdentifier</key>
    <string>com.apple.youtube</string>
    <key>CFBundleResourceSpecification</key>
    <string>ResourceRules.plist</string>
    <key>DTPlatformVersion</key>
    <string>4.1 GM</string>
        <key>CFBundleIconFiles</key>
        <array>
               <string>icon-72.png</string>
               <string>icon.png</string>
               <string>icon@2x.png</string>
        </array>
        <key>CFBundleDisplayName</key>
        <string>YouTube</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleDisplayName</key>
    <string>YouTube</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>MinimumOSVersion</key>
    <string>4.1</string>
    <key>UIDeviceFamily</key>
    <array>
        <integer>1</integer>
        <integer>2</integer>
    </array>
</dict>
</plist>



]]>
[转]查找 EXC_BAD_ACCESS 问题根源的方?/title><link>//www.ot7t.com.cn/fastzch/archive/2012/01/05/367925.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Thu, 05 Jan 2012 08:18:00 GMT</pubDate><guid>//www.ot7t.com.cn/fastzch/archive/2012/01/05/367925.html</guid><wfw:comment>//www.ot7t.com.cn/fastzch/comments/367925.html</wfw:comment><comments>//www.ot7t.com.cn/fastzch/archive/2012/01/05/367925.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/fastzch/comments/commentRss/367925.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/fastzch/services/trackbacks/367925.html</trackback:ping><description><![CDATA[<div class="yibqv">原文地址?//www.cocoachina.com/macdev/objc/2011/0219/2661.html<br /><br /><div style="margin-top: 19px; margin-right: 10px; margin-bottom: 20px; margin-left: 10px; height: 58px; width: 609px; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #ebf1ed; border-right-color: #ebf1ed; border-bottom-color: #ebf1ed; border-left-color: #ebf1ed; border-image: initial; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; font-size: 12px; line-height: normal; "><p style="margin-top: 4px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; height: 50px; width: 601px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f3f4f4; "><span style="display: block; height: 31px; width: 578px; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-top: 8px; line-height: 1.4; overflow-x: hidden; overflow-y: hidden; ">写程序遇?Bug 并不可怕,大部分的问题,通过简单的 Log 或?代码分析并不难找到原因所在。但是在 Objective-C 编程中遇?EXC_BAD_ACCESS 问题的时候,通过简单常规的手段很难发现问题?/span></p></div><div id="article_text_font" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; height: auto; width: 643px; line-height: 1.8; font-family: 'Lucida Grande', Geneva, Arial, Verdana, Tahoma, Arial, 微软雅黑, 黑体, 宋体; "><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    写程序遇?Bug 并不可怕,大部分的问题,通过简单的 Log 或?代码分析并不难找到原因所在。但是在 Objective-C 编程中遇?EXC_BAD_ACCESS 问题的时候,通过简单常规的手段很难发现问题。这篇文章,给大家介绍一个常用的查找 EXC_BAD_ACCESS 问题根源的方法?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    首先说一?EXC_BAD_ACCESS 这个错误,可以这么说?0%的错误来源在于对一个已经释放的对象进行release操作。举一个简单的例子来说明吧,首先看一段Java代码?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">public class Test{<br />        public static void main(String[] args){<br />                String s = “This is a test string”;<br />                s = s.substring(s.indexOf(“a”),(s.length()));<br />                System.out.println(s);<br />                <br />        }<br />}</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    这种写法在Java中很常见也很普遍,这不会产生任何问题。但是到?Objective-C 中,就会出事,考虑这个程序?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; "><span style="color: #339966; ">#import <Foundation/Foundation.h><br /><br />int main (int argc, const char * argv[]) {<br />NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];<br />        NSString* s = [[NSString alloc]initWithString:@”This is a test string”];<br />        s = [s substringFromIndex:[s rangeOfString:@"a"].location];//内存泄露<br />        [s release];//错误释放<br />[pool drain];//EXC_BAD_ACCESS<br />return 0;<br />}</span><br /><br />    这个例子当然狠容易的看出问题所在,如果这段代码包含在一个很大的逻辑中,确实容易被忽略。Objective-C 这段代码有三个致命问题:1、内存泄露;2、错误释放;3、造成 EXC_BAD_ACCESS 错误?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    1?NSString* s = [[NSString alloc]initWithString:@”This is a test string”]; 创建了一?NSString Object,随后的 s = [s substringFromIndex:[s rangeOfString:@"a"].location]; 执行后,导致创建的对象引用消失,直接造成内存泄露?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    2,错误释放。[s release]; 这个问题,原因之一是一个逻辑错误,以?s 还是我们最初创建的那个 NSString 对象。第二是因为?substringFromIndex:(NSUInteger i) 这个方法返回?NSString 对象,并不需要我们来释放,它其实是一个被 substringFromIndex 方法标记?autorelease 的对象。如果我们强行的释放了它,那么会造成 EXC_BAD_ACCESS 问题?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    3?EXC_BAD_ACCESS。由?s 指向?NSString 对象被标记为 autorelease, 则在 NSAutoreleasePool 中已有记录。但是由于我们在前面错误的释放了该对象,则当 [pool drain] 的时候,NSAutoreleasePool 又一次的对它记录?s 对象调用?release 方法,但这个时?s 已经被释放不复存在,则直接导致了 EXC_BAD_ACCESS问题?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    那么,知道了 EXC_BAD_ACCESS 的诱因之一后,如何快速高效的定位问题?/p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">1: 为工程运行时加入 NSZombieEnabled 环境变量,并设为启用,则?EXC_BAD_ACCESS 发生时,XCode ?Console 会打印出问题描述?/p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">首先双击 XCode 工程中,Executables 下的 可执行模组,</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; text-align: center; "><img width="469" height="311" border="0" alt="" src="//www.cocoachina.com/cms/uploads/allimg/110219/8_110219221940_1.png" data-pinit="registered" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; cursor: pointer; " /></p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">在弹出窗口中,Variables to be set in the environment,添?NSZombieEnabled,并设定?YES,点击选中复选框启用此变量?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; text-align: center; "><img width="290" height="415" border="0" alt="" src="//www.cocoachina.com/cms/uploads/allimg/110219/8_110219222206_1.png" data-pinit="registered" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; cursor: pointer; " /></p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    这样,运行上?Objective-C 时会看到控制台输出:Untitled[3646:a0f] *** -[CFString release]: message sent to deallocated instance 0x10010d340</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; text-align: center; "><img width="472" height="344" border="0" alt="" src="//www.cocoachina.com/cms/uploads/allimg/110219/8_110219222424_1.png" data-pinit="registered" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; cursor: pointer; " /></p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    这条消息对于定位问题有很好的提示作用。但是很多时候,只有这条提示是不够的,我们需要更多的提示来帮助定位问题,这时候再加入 MallocStackLogging 来启用malloc记录?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; text-align: center; "><img width="291" height="414" border="0" alt="" src="//www.cocoachina.com/cms/uploads/allimg/110219/8_110219222612_1.png" data-pinit="registered" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; cursor: pointer; " /></p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; "><br />    当错误发生后,在终端执行?/p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; "><span style="color: #339966; ">malloc_history ${App_PID} ${Object_instance_addr}</span></p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    则会获得相应?malloc 历史记录,比如对于上一个控制台输出</p><p style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; "><span style="color: #339966; ">Untitled[3646:a0f] *** -[CFString release]: message sent to deallocated instance 0x10010d340</span></p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    则我们可以在终端执行,结果如下:</p><p id="" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">Buick-Wongs-MacBook-Pro:Downloads buick$ malloc_history 3646 0x10010d340<br />malloc_history Report Version: 2.0<br />Process: Untitled [3646]<br />Path: /Users/buick/Desktop/Untitled/build/Debug/Untitled<br />Load Address: 0×100000000<br />Identifier: Untitled<br />Version: ??? (???)<br />Code Type: X86-64 (Native)<br />Parent Process: gdb-i386-apple-darwin [3638]<br /><br />Date/Time: 2011-02-01 15:07:04.181 +0800<br />OS Version: Mac OS X 10.6.6 (10J567)<br />Report Version: 6<br /><br />ALLOC 0x10010d340-0x10010d357 [size=24]: thread_7fff70118ca0 |start | main | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | +[NSString initialize] | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | NXCreateMapTableFromZone | malloc_zone_malloc<br />—-<br />FREE 0x10010d340-0x10010d357 [size=24]: thread_7fff70118ca0 |start | main | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | _finishInitializing | free<br /><br />ALLOC 0x10010d340-0x10010d357 [size=24]: thread_7fff70118ca0 |start | main | -[NSPlaceholderString initWithString:] | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | _class_initialize | +[NSMutableString initialize] | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | NXCreateMapTableFromZone | malloc_zone_malloc<br />—-<br />FREE 0x10010d340-0x10010d357 [size=24]: thread_7fff70118ca0 |start | main | -[NSPlaceholderString initWithString:] | objc_msgSend | lookUpMethod | prepareForMethodLookup | _class_initialize | _class_initialize | _finishInitializing | free<br /><br />ALLOC 0x10010d340-0x10010d35f [size=32]: thread_7fff70118ca0 |start | main | -[NSCFString substringWithRange:] | CFStringCreateWithSubstring | __CFStringCreateImmutableFunnel3 | _CFRuntimeCreateInstance | malloc_zone_malloc</p><p id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown" style="margin-top: 20px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.8; ">    这样就可以很快的定位出问题的代码片段了,注意输出的最后一行,,,这行虽然不是问题的最终原因,但是离问题点已经很近了,随着它找下去,八成就会找到问题?/p></div></div><img src ="//www.ot7t.com.cn/fastzch/aggbug/367925.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/fastzch/" target="_blank">Robin's Programming World</a> 2012-01-05 16:18 <a href="//www.ot7t.com.cn/fastzch/archive/2012/01/05/367925.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[copy]创业公司应该如何招人?/title><link>//www.ot7t.com.cn/fastzch/archive/2011/12/31/367620.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Sat, 31 Dec 2011 02:24:00 GMT</pubDate><guid>//www.ot7t.com.cn/fastzch/archive/2011/12/31/367620.html</guid><wfw:comment>//www.ot7t.com.cn/fastzch/comments/367620.html</wfw:comment><comments>//www.ot7t.com.cn/fastzch/archive/2011/12/31/367620.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/fastzch/comments/commentRss/367620.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/fastzch/services/trackbacks/367620.html</trackback:ping><description><![CDATA[<div class="yibqv"><div id="xvh" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 8px; margin-left: 0px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 22px; "><h2 class="yibqv">创业公司应该如何招人?/h2></div><div xu"="" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; height: 1px; width: 632px; border-top-style: solid; border-top-width: 3px; border-top-color: #dddddd; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #dddddd; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 22px; "></div><div id="xwg" style="outline-style: none; outline-width: initial; outline-color: initial; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #dddddd; margin-top: 0px; margin-right: 0px; margin-bottom: 6px; margin-left: 0px; color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 22px; "><div id="aa-1091" style="outline-style: none; outline-width: initial; outline-color: initial; margin-top: 6px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; position: relative; border-image: initial; "><div style="outline-style: none; outline-width: initial; outline-color: initial; "><h3><a style="color: #105cb6; outline-style: none; outline-width: initial; outline-color: initial; text-decoration: none; float: right; height: 25px; width: 25px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 5px; "><img src="//p1.zhimg.com/73/ae/73ae1de85_s.jpg" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; border-image: initial; float: left; height: 25px; margin-top: 0px; margin-right: 10px; margin-bottom: 5px; margin-left: 0px; width: 25px; border-color: initial; " alt="" /></a><a style="color: #105cb6; outline-style: none; outline-width: initial; outline-color: initial; text-decoration: none; ">周源</a> <strong title="知乎 001 号员?>,知?001 号员?/strong></h3></div><div style="outline-style: none; outline-width: initial; outline-color: initial; font-size: 12px; color: #999999; ">374 票,来自 金错刀, ZX, 程非 <a id="xbtw" style="color: #105cb6; outline-style: none; outline-width: initial; outline-color: initial; text-decoration: none; ">更多</a></div><div style="outline-style: none; outline-width: initial; outline-color: initial; "><div style="outline-style: none; outline-width: initial; outline-color: initial; ">其实?08 年到现在,我一直想这事能不能有点窍门,或者是实用的方法,结论是几乎没有?br /><br />我用过的大家都用的方法:<br /><br /><ul style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; "><li class="yibqv">在水木上发贴子(有点效果?br /></li><li class="yibqv">在蓝色理想上发贴子(无效?br /></li><li class="yibqv">在技术邮件组里发贴子(无效)</li><li class="yibqv">?51job/智联 最便宜的服务(有点效果?/li><li class="yibqv">给所有可以想到的人打电话,请他们推荐(无效)<br /></li><li class="yibqv">给所有和你讨论过创业,喝过点小酒的人打电话(无效?br /></li><li class="yibqv">约前同事私下谈(有效?br /></li></ul><br />我用过的大家可能没有用的方法?br /><br /><ul style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 20px; "><li class="yibqv">?twitter,看 XXX ?follower,一个一个看,看他们?twitter,博客,Google Reader 分享,想办法搞到邮件,联系,半夜电话骚扰?br /></li><li class="yibqv">上豆瓣,前端后端挑几本重量级的书,去找想看,看过,正在看这本书的人,一个一个看,看他们的活动,博客,Google Reader 分享,想办法搞到邮件,联系,半夜电话骚扰?br /></li><li class="yibqv">找同事,问他们都看什么技术博客,想办法搞到邮件,联系,半夜电话骚扰?br /></li></ul><br />谈几点体会:<br /><br /><strong class="yibqv">不要太指望周围的?/strong><br /><br />从社招和校园招聘筛选初级人才的方法不适合创业公司,所以创业者只能靠自己去当猎头,从你周围的人,同学,朋友,和接触过的公司员工开始?br /><br />这是事实,也是陷阱。周围的人在能力上恰好满足创业需求的可能极低,人情债又超高,对方其实很勉强,但你却臆想他完全胜任,动之以情拉入伙,结果就是撑不了多久,单纯靠交情为纽带,很快就会透支得一干二净?br /><br /><strong class="yibqv">别以为人人都想创?/strong><br /><br />我在招人的过程中遇到过很多很聪明的人,也遇到过很多独特的人,但到了最后一刻,他们会犹豫,把创业视为机会者,会自己鼓励自己,但问题是太多的人实际上都只看到了创业风险的一面,选择时会倾向于规避风险?br /><br />还有,即使是有能力的心有梦想者,也会有很多的实际情况,为知乎招人时,有人家里有重病患者,无法从事需要加班的工作,有人无法换城市,有人自由习惯了,有时候,他们和你通电话,只是想知道你正在做的事情?/div></div></div></div></div><img src ="//www.ot7t.com.cn/fastzch/aggbug/367620.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/fastzch/" target="_blank">Robin's Programming World</a> 2011-12-31 10:24 <a href="//www.ot7t.com.cn/fastzch/archive/2011/12/31/367620.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转]自定义UITableView - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2011/12/29/367465.htmlRobin's Programming WorldRobin's Programming WorldThu, 29 Dec 2011 01:12:00 GMT//www.ot7t.com.cn/fastzch/archive/2011/12/29/367465.html//www.ot7t.com.cn/fastzch/comments/367465.html//www.ot7t.com.cn/fastzch/archive/2011/12/29/367465.html#Feedback1//www.ot7t.com.cn/fastzch/comments/commentRss/367465.html//www.ot7t.com.cn/fastzch/services/trackbacks/367465.html
原文地址?//blog.sina.com.cn/s/blog_7e3132ca0100wyls.html
在XCode对应头文件中修改该类所继承的父类:
@interface TableViewController:UIViewController <UITableViewDataSource, UITableViewDelegate>
{
}
在对应的.m文件中添加如下代码:
@implementation TableViewController
{
UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectMake(0,0,320,460) style:UITableViewStylePlain];
tableView.dataSource = self;
tableView.delegate = self;
[self.view addSubview:tableView];
}
这样就在view上添加了一个tableView,但其样式是默认的,其中的内容也是空白的,而且此时是无法运行的,因为在头文件中添加了UITableViewDataSource和UITableViewDelegate两个类,所以必须设置一些自定义tableView样式的方法,下面列举了一些相关的方法?/div>
设置Cell高度?/div>
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
设置SectionHeader高度?/div>
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
设置SectionFooter高度?/div>
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
设置Section数目?/div>
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
 
设置SectionHeader内容?/div>
-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
设置各个Section中的Cell个数?nbsp;
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
设置Cell内容?nbsp;
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 
设置Cell行缩进量?/div>
-(NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath
设置Cell被选中响应前动?例如:可用以判断选中的Cell,来阻止其响应?/div>
-(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
设置Cell选中触发响应?/div>
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath


]]>【转】Xcode分析CrashLog的方?/title><link>//www.ot7t.com.cn/fastzch/archive/2011/12/28/367403.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Wed, 28 Dec 2011 04:24:00 GMT</pubDate><guid>//www.ot7t.com.cn/fastzch/archive/2011/12/28/367403.html</guid><wfw:comment>//www.ot7t.com.cn/fastzch/comments/367403.html</wfw:comment><comments>//www.ot7t.com.cn/fastzch/archive/2011/12/28/367403.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/fastzch/comments/commentRss/367403.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/fastzch/services/trackbacks/367403.html</trackback:ping><description><![CDATA[<h1>浙江福彩快乐12: </h1> <div class="entry-content" style="border-top-width: 0px; clear: both; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px; word-spacing: 0px; font: 16px/24px Georgia, 'Bitstream Charter', serif; vertical-align: baseline; text-transform: none; color: rgb(51,51,51); text-indent: 0px; padding-top: 12px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">原文地址?a >//www.acwind.net/blog/?p=1090</a><br /><br />Bug是永远伴随着程序员们的东西,各种各样的情况造成程序crash掉也是家常便饭。Windows下的很多大型软件在崩溃的时候,都会弹出提示框,询问用户是否将crash的信息发送到软件厂商,以供软件开发商debug。App store中的软件也有这个功能,用户在使用软件的时候,如果程序崩溃,错误信息会发送到Apple的服务器中,软件的开发者们可以很方便在后台获得自己程序的crash log,供自己调试?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">但随之而来的问题是,我们收到的程序崩溃调试信息多半是汇编语言一样的堆栈代码,同时这些信息并不是在我们debug的时候产生,所以看到这一串crash log的天书,常常无可奈何。Xcode很好的解决了这一问题,它所提供的Orgainzer分析器加上symbolicatecrash,可以分析二进制文件以及源代码和crashlog之间的连接,直接找出源程序中出错的代码行。方法网上到处是,本文不讨论?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">但是如果使用symbolicatecrash无法定位到出错的代码行的话,怎么整呢?有一个办法,如下?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">首先查看crash log中的崩溃线程,假如是这样的:</p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">Thread 0 Crashed:<br />0   libobjc.A.dylib              <span class="Apple-converted-space"> </span><span style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px; vertical-align: baseline; padding-top: 0px; white-space: pre; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial"> </span>0x00003ec0 objc_msgSend + 24<br />1   MyApp               0x000036d2 0×1000 + 9938?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">我们得到了用户发生崩溃情况的内存地址?x000036d2?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">然后回到我们应用程序的build目录,目录下一定要包含MyApp.app 和MyApp.app.dSYM两个文件?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">在控制台使用dwarfdump命令,解析出内存地址,如?nbsp;</p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">dwarfdump –lookup 0x000036d2 –arch armv6 MyApp.app.dSYM</p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">输出信息如下?/p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial"><img title="dwarfdump.jpg" style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial" height="149" alt="dwarfdump.jpg" src="//www.acwind.net/blog/wp-content/uploads/2010/06/dwarfdump.jpg" width="534" border="0" /></p> <p style="border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px 0px 24px; vertical-align: baseline; padding-top: 0px; background-color: transparent; border-right-width: 0px; background-origin: initial; background-clip: initial; border-image: initial">直接定位到代码的出错行,Cool?/p></div><img src ="//www.ot7t.com.cn/fastzch/aggbug/367403.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/fastzch/" target="_blank">Robin's Programming World</a> 2011-12-28 12:24 <a href="//www.ot7t.com.cn/fastzch/archive/2011/12/28/367403.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转] Objective-C内存管理教程和原理剖析口诀与范?/title><link>//www.ot7t.com.cn/fastzch/archive/2011/12/01/365258.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Thu, 01 Dec 2011 01:25:00 GMT</pubDate><guid>//www.ot7t.com.cn/fastzch/archive/2011/12/01/365258.html</guid><wfw:comment>//www.ot7t.com.cn/fastzch/comments/365258.html</wfw:comment><comments>//www.ot7t.com.cn/fastzch/archive/2011/12/01/365258.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/fastzch/comments/commentRss/365258.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/fastzch/services/trackbacks/365258.html</trackback:ping><description><![CDATA[<span style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; line-height: normal; "> <table width="100%" class="Framework" cellspacing="0" cellpadding="0" style="background-color: #eeeeee; "> <tbody> <tr> <td class="MainCell" width="100%" style="font-size: 12px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; background-color: white; vertical-align: top; "> <div id="main"> <div class="post" style="border-left-color: #cccccc; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-bottom: 28px; "> <div class="posthead" style="background-color: #eeeeee; background-image: url(//www.cnblogs.com/Skins/HabaHaba/images/PostHeaderBg.gif); padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; color: #444444; font-size: 9px; background-position: 50% 100%; background-repeat: repeat no-repeat; "> <h2 style="margin-top: 0px; font-size: 13px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a id="ctl03_TitleUrl" class="singleposttitle" style="color: #223355; text-decoration: none; ">iPhone/Mac Objective-C内存管理教程和原理剖??口诀与范?/a></h2> Posted on 2010-03-08 00:35 <a style="color: #223355; text-decoration: none; ">Vince Yuan</a> 阅读(2331) <a style="color: #223355; text-decoration: none; ">评论(1)</a> <a rel="nofollow" style="color: #223355; text-decoration: none; ">编辑</a> <a style="color: #223355; text-decoration: none; ">收藏</a> <img src="//www.cnblogs.com/VinceYuan/aggbug/1680492.html?type=1&webview=1" width="1px" height="1px" alt="" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; " /></div> <div class="postbody" style="padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; margin-bottom: 14px; font-size: 13px; line-height: 1.5; "> <div id="cnblogs_post_body"> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span style="font-size: 13px; font-family: 宋体; ">版权声明</span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span style="font-size: 13px; font-family: 宋体; ">此文版权归作?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">Vince Yuan (vince.yuan#gmail.com)</font></span><span style="font-size: 13px; font-family: 宋体; ">所有。欢迎非营利性转载,转载时必须包含原始链?/span><span lang="EN-US" style="font-size: 13px; "><a target="_blank" style="color: #1d58d1; text-decoration: none; "><font face="Calibri">//vinceyuan.cnblogs.com</font></a></span><span style="font-size: 13px; font-family: 宋体; ">,且必须包含此版权声明的完整内容?/span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span style="font-size: 13px; font-family: 宋体; "></span><span style="font-size: 13px; font-family: 宋体; "></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span style="font-size: 13px; font-family: 宋体; "></span> </p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span style="font-size: 13px; font-family: 宋体; ">版本</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"> 1.1<span style="font-size: 13px; "> </span></font></span><span style="font-size: 13px; font-family: 宋体; ">发表?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">2010-03-08</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "> </p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span style="font-size: 13px; font-family: 宋体; ">?/span><font face="Calibri"> </font><span style="font-size: 13px; font-family: 宋体; ">口诀与范?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 21.25pt; margin-bottom: 0pt; text-indent: -21.25pt; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">1</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">           </span></span></span><span style="font-size: 13px; font-family: 宋体; ">口诀?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">1.1</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">谁创建,谁释放(类似?#8220;谁污染,谁治?#8221;)。如果你通过</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">alloc</font></span><span style="font-size: 13px; font-family: 宋体; ">?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">new</font></span><span style="font-size: 13px; font-family: 宋体; ">?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">copy</font></span><span style="font-size: 13px; font-family: 宋体; ">来创建一个对象,那么你必须调?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">。换句话说,不是你创建的,就不用你去释放?/span><span lang="EN-US" style="font-size: 13px; "><br /> </span><span style="font-size: 13px; font-family: 宋体; ">例如,你在一个函数中</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">alloc</font></span><span style="font-size: 13px; font-family: 宋体; ">生成了一个对象,且这个对象只在这个函数中被使用,那么你必须在这个函数中调?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">。如果你在一?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">class</font></span><span style="font-size: 13px; font-family: 宋体; ">的某个方法中</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">alloc</font></span><span style="font-size: 13px; font-family: 宋体; ">一个成员对象,且没有调?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">,那么你需要在这个类的</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">方法中调?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">;如果调用了</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">,那么在</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">方法中什么都不需要做?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">1.2</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">除了</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">alloc</font></span><span style="font-size: 13px; font-family: 宋体; ">?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">new</font></span><span style="font-size: 13px; font-family: 宋体; ">?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">copy</font></span><span style="font-size: 13px; font-family: 宋体; ">之外的方法创建的对象都被声明?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">1.3</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">retain</font></span><span style="font-size: 13px; font-family: 宋体; ">,谁</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">。只要你调用?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">retain</font></span><span style="font-size: 13px; font-family: 宋体; ">,无论这个对象是如何生成的,你都要调?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">。有时候你的代码中明明没有</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">retain</font></span><span style="font-size: 13px; font-family: 宋体; ">,可是系统会在默认实现中加入</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">retain</font></span><span style="font-size: 13px; font-family: 宋体; ">。不知道为什么苹果公司的文没有强调这个非常重要的一点,请参考范?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">2.7</font></span><span style="font-size: 13px; font-family: 宋体; ">和第三章?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 21.25pt; margin-bottom: 0pt; text-indent: -21.25pt; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">           </span></span></span><span style="font-size: 13px; font-family: 宋体; ">范式?/span><span lang="EN-US" style="font-size: 13px; "><br /> </span><span style="font-size: 13px; font-family: 宋体; ">范式就是模板,就是依葫芦画瓢。由于不同人有不同的理解和习惯,我总结的范式不一定适合所有人,但我能保证照着这样做不会出问题?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.1</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">创建一个对象?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">ClassA *obj1 = [[ClassA alloc] init];</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.2</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">创建一?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">的对象?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">ClassA *obj1 = [[[ClassA alloc] init] autorelease];</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.3</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">Release</font></span><span style="font-size: 13px; font-family: 宋体; ">一个对象后,立即把指针清空。(顺便说一句,</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">一个空指针是合法的,但不会发生任何事情?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">[obj1 release];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">obj1 = nil;</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.4</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">指针赋值给另一个指针?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">ClassA *obj2 = obj1;</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">[obj2 retain];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">//do something</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">[obj2 release];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">obj2 = nil;</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.5</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">在一个函数中创建并返回对象,需要把这个对象设置?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">ClassA *Func1()</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">  </span>ClassA *obj = [[[ClassA alloc]init]autorelease];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">  </span>return obj;</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.6</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">在子类的</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">方法中调用基类的</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">方法</span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">-(void) dealloc</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>…</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>[super dealloc];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 49.6pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">          </span></span></span><span style="font-size: 13px; font-family: 宋体; ">在一?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">class</font></span><span style="font-size: 13px; font-family: 宋体; ">中创建和使用</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">?/span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.1</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">声明一个成员变量?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.5pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">ClassB *objB;</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.2</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">声明</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">,加?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">retain</font></span><span style="font-size: 13px; font-family: 宋体; ">参数?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@property (retain) ClassB* objB;</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.3</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">定义</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">。(</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">的默认实现请看第三章?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.2pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@synthesize objB;</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.4</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">除了</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">方法以外,始终用</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">.</font></span><span style="font-size: 13px; font-family: 宋体; ">操作符的方式来调?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.5pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">self.objB </font></span><span style="font-size: 13px; font-family: 宋体; ">或?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">objA.objB</font></span></p> <p class="MsoListParagraph" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.5</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">dealloc</font></span><span style="font-size: 13px; font-family: 宋体; ">方法?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">这个成员变量?/span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63.5pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">[objB release];</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span style="font-size: 13px; font-family: 宋体; ">示例代码如下(详细代码请参考附件中?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">memman-property.m</font></span><span style="font-size: 13px; font-family: 宋体; ">,你需要特别留意对象是在何时被销毁的。)?/span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@interface ClassA : NSObject</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>ClassB* objB;</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><o:p><font face="Calibri"> </font></o:p></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@property (retain) ClassB* objB;</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@end</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><o:p><font face="Calibri"> </font></o:p></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@implementation ClassA</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@synthesize objB;</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">-(void) dealloc</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>[objB release];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>[super dealloc];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">@end</font></span></p> <p class="MsoListParagraph" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 70.9pt; margin-bottom: 0pt; text-indent: -1cm; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><span style="font-size: 13px; "><font face="Calibri">2.7.6</font><span style="font-size: 13px; font: normal normal normal 7pt/normal 'Times New Roman'; ">     </span></span></span><span style="font-size: 13px; font-family: 宋体; ">给这?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">property</font></span><span style="font-size: 13px; font-family: 宋体; ">赋值时,有手动</span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">release</font></span><span style="font-size: 13px; font-family: 宋体; ">?/span><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">autorelease</font></span><span style="font-size: 13px; font-family: 宋体; ">两种方式?/span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">void funcNoAutorelease()</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>ClassB *objB1 = [[ClassB alloc]init];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>ClassA *objA = [[ClassA alloc]init];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>objA.objB = objB1;</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>[objB1 release];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>[objA release];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><o:p><font face="Calibri"> </font></o:p></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">void funcAutorelease()</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">{</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>ClassB *objB1 = [[[ClassB alloc]init] autorelease];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>ClassA *objA = [[[ClassA alloc]init] autorelease];</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri"><span style="font-size: 13px; ">         </span>objA.objB = objB1;</font></span></p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 63pt; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span lang="EN-US" style="font-size: 13px; "><font face="Calibri">}</font></span></p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "> </p> <p class="MsoNormal" align="left" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; text-align: left; "> </p> <p class="MsoNormal" style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0pt; text-indent: 0px; font-size: 13px; line-height: 19px; "><span style="font-size: 13px; font-family: 宋体; ">示例代码文件链接?/span><span lang="EN-US" style="font-size: 13px; "><a target="_blank" style="color: #1d58d1; text-decoration: none; "><font face="Calibri">//files.cnblogs.com/VinceYuan/objective-c-memman.zip</font></a></span></p> </div> </div> </div> </div> </td> </tr> </tbody> </table> </span> @import url(//www.ot7t.com.cn/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);<img src ="//www.ot7t.com.cn/fastzch/aggbug/365258.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/fastzch/" target="_blank">Robin's Programming World</a> 2011-12-01 09:25 <a href="//www.ot7t.com.cn/fastzch/archive/2011/12/01/365258.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MAC上查看Adobe AIR的版?/title><link>//www.ot7t.com.cn/fastzch/archive/2011/10/09/360246.html</link><dc:creator>Robin's Programming World</dc:creator><author>Robin's Programming World</author><pubDate>Sun, 09 Oct 2011 01:19:00 GMT</pubDate><guid>//www.ot7t.com.cn/fastzch/archive/2011/10/09/360246.html</guid><wfw:comment>//www.ot7t.com.cn/fastzch/comments/360246.html</wfw:comment><comments>//www.ot7t.com.cn/fastzch/archive/2011/10/09/360246.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.ot7t.com.cn/fastzch/comments/commentRss/360246.html</wfw:commentRss><trackback:ping>//www.ot7t.com.cn/fastzch/services/trackbacks/360246.html</trackback:ping><description><![CDATA[<p id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown" style="font-size: 1.025em; line-height: 1.462; margin-top: 0px; padding-bottom: 1px; margin-bottom: 1.2em; color: #444444; font-family: Arial, Helvetica; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; ">MAC上看个Adobe AIR的版本没想到如此复杂,备忘一下:</p> <p id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown" style="font-size: 1.025em; line-height: 1.462; margin-top: 0px; padding-bottom: 1px; margin-bottom: 1.2em; color: #444444; font-family: Arial, Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; "><strong class="yibqv">M</strong><strong class="yibqv">ac OS X</strong></p> <ul style="list-style-type: disc; margin-left: 2em !important; padding-left: 2.5ex; margin-top: -8px; margin-bottom: 1.35em; color: #444444; font-family: Arial, Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 15px; orphans: 2; text-align: text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff; "> <li id="" style="line-height: 1.25em; font-size: 1.025em; padding-bottom: 0.5em; "><span id="">Open the<span class="apple-converted-space"> </span></span><span id="">/Library/Frameworks/Adobe AIR.framework/Versions/1.0/Resources/Info.plist</span><span class="apple-converted-space"> </span>text file and locate<span class="apple-converted-space"> the<span class="apple-converted-space"> </span></span><key>CFBundleVersion</key><span id="">entry. The corresponding string entry represents the version of AIR, for example:<span class="apple-converted-space"> </span></span><string>1.5.3.9130</string> </li> </ul> <div class="yibqv"><font color="#444444" face="Arial, Helvetica"><span style="font-size: 12px; line-height: 15px;">原文地址?/span></font></div> <div class="yibqv"><font color="#444444" face="Arial, Helvetica"><span style="font-size: 12px; line-height: 15px;"><a >//kb2.adobe.com/cps/407/kb407625.html</a></span></font></div> @import url(//www.ot7t.com.cn/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);<img src ="//www.ot7t.com.cn/fastzch/aggbug/360246.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.ot7t.com.cn/fastzch/" target="_blank">Robin's Programming World</a> 2011-10-09 09:19 <a href="//www.ot7t.com.cn/fastzch/archive/2011/10/09/360246.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Android Media Player 深入观察 - 四川福利彩票快乐12快乐12开奖直播快乐12开奖辽宁福彩快乐12快乐彩12选5走势图//www.ot7t.com.cn/fastzch/archive/2011/08/06/355906.htmlRobin's Programming WorldRobin's Programming WorldSat, 06 Aug 2011 00:36:00 GMT//www.ot7t.com.cn/fastzch/archive/2011/08/06/355906.html//www.ot7t.com.cn/fastzch/comments/355906.html//www.ot7t.com.cn/fastzch/archive/2011/08/06/355906.html#Feedback1//www.ot7t.com.cn/fastzch/comments/commentRss/355906.html//www.ot7t.com.cn/fastzch/services/trackbacks/355906.html    A. Open core,stagefright等agent不支持同时存在join stereo ?stereo两种类型的音乐数据,否则抛出 onCompeletion 事件?/div>
    B. QuickTime支持得很好,没问题?/div>

2,Media Player用流数据的话,如果超?秒种没有任何数据写入,便会抛出broken pipe异常,这个也是很让人费解的,在网络不好时,常常超?秒得不到数据?/div>

3,Android 2.3.3中,低于128K的音乐数据需要很长时间prepare,如果是一?6K的音乐数据,需要超?20秒,据观察,至少需?250,000 bytes以上数据才能使其prepared. 或许这是为了更好的播放体验在考虑,但是有时候似乎适得其反?/div>

4,Android 2.2中,低于56K数据的音乐,用流播放时,getCurrentPosition数据不准确,通常播了一秒,这个position只走?00?00ms(依bitrate不同而有所区别)?nbsp;

另:ImageView 不支持u.s. web coated (SWOP) color workflow。不管是你放在drawable中,用BitmapFactory去decode,都无法支持?/div>
    其实似乎整个Java都不支持,这个比较奇怪!这可是很流行的一种格式呀!做Java的人的杯具!


]]>