??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品亚洲色婷婷99久久精品,亚洲乱色熟女一区二区三区蜜臀,亚洲av永久无码精品秋霞电影影院 http://www.tkk7.com/writegull/zh-cnFri, 09 May 2025 20:07:28 GMTFri, 09 May 2025 20:07:28 GMT60使用atomikosq接mysql报错 Raised -5: invalid arguments were given for the XA operation ?XAER_INVAL: Invalid arguments (or unsupported command)http://www.tkk7.com/writegull/archive/2017/06/28/432634.htmlwritegullwritegullWed, 28 Jun 2017 11:32:00 GMThttp://www.tkk7.com/writegull/archive/2017/06/28/432634.htmlhttp://www.tkk7.com/writegull/comments/432634.htmlhttp://www.tkk7.com/writegull/archive/2017/06/28/432634.html#Feedback0http://www.tkk7.com/writegull/comments/commentRss/432634.htmlhttp://www.tkk7.com/writegull/services/trackbacks/432634.html
    <Resource name="jdbc/cms" auth="Container"
        type
="com.atomikos.jdbc.AtomikosDataSourceBean" factory="com.atomikos.tomcat.EnhancedTomcatAtomikosBeanFactory"
        uniqueResourceName
="jdbc/cms" xaDataSourceClassName="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"
        xaProperties.URL
="xxxx"
        xaProperties.user
="xxxx" xaProperties.password="xxxx"
        xaProperties.pinGlobalTxToPhysicalConnection
="true" maxLifetime="60" poolSize="4" />

最q项目要q移到maven下,所以把context.xml的数据源配置挪到了spring.xml下,配置如下
    <bean id="myDataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean" init-method="init" destroy-method="close">
       
<property name="uniqueResourceName" value="masterDB" />
       
<property name="xaDataSourceClassName" value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"/>  <!-- SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana]  -->  
       
<property name="poolSize" value="0" /> 
       
<property name="minPoolSize" value="0"/>    
       
<property name="maxPoolSize" value="9"/>    
       
<property name="borrowConnectionTimeout" value="60"/>    
       
<property name="reapTimeout" value="20"/>    
       
<property name="maxIdleTime" value="60"/>    
       
<property name="maintenanceInterval" value="60"/>    
       
<property name="loginTimeout" value="60"/>
       
<property name="xaProperties">  
            
<props>
                
<prop key="url">xxxx</prop>  
                
<prop key="user">xxxx</prop>
                
<prop key="password">xxxx</prop>
            
</props>
        
</property>  
    
</bean>
因ؓ上面q个配置我是照搬|上的,所以觉得没有问题,可是目启动后,用此数据源提交事务时报以下错误Q?br />
Raised -5: invalid arguments were given for the XA operation ?XAER_INVAL: Invalid arguments (or unsupported command)

一开始我以ؓmaven配置的mysql-connector-java驱动版本不对Q或是atomikos版本不对Q可是不如何换版本都不行,快要疯了的时候,我看C原先jndi方式中有q么一行代?
xaProperties.pinGlobalTxToPhysicalConnection="true"
因为缺上面这句话D了问?上网查资料,据说是mysql xa bugQ有兴趣的可以看如下q接Q最后配|如下:
       <property name="xaProperties">  
            
<props>
                
<prop key="pinGlobalTxToPhysicalConnection">true</prop>  <!-- mysql必须配置此参敎ͼ要不然无法提交事?nbsp;-->
                
<prop key="url">xxxx</prop>  
                
<prop key="user">xxx</prop>
                
<prop key="password">xxxx</prop>
            
</props>
        
</property> 





writegull 2017-06-28 19:32 发表评论
]]>
redis未授权访问缺陷导致系l被?/title><link>http://www.tkk7.com/writegull/archive/2015/12/15/428651.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Mon, 14 Dec 2015 17:13:00 GMT</pubDate><guid>http://www.tkk7.com/writegull/archive/2015/12/15/428651.html</guid><wfw:comment>http://www.tkk7.com/writegull/comments/428651.html</wfw:comment><comments>http://www.tkk7.com/writegull/archive/2015/12/15/428651.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.tkk7.com/writegull/comments/commentRss/428651.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/writegull/services/trackbacks/428651.html</trackback:ping><description><![CDATA[事情描述Q?br />本h在阿里云上创Z一个linux服务器,跑了一个自q试web目。搭Zredis。想方便试用,没有对redisq行M安全防护q暴露在了公|上。期间阿里云发现了此问题Q还发短信提醒我Q由于最q在公司一直加班也没有旉理会Q没惛_在今天真的被黑了,事后心想多亏是个试服务器,如果是正式环境,也真危险Q这个黑客也没有停下脚步Q通过redis强大的能力在/root/.ssh目录下面上传了公钥,dȝ了服务器Q免密码d服务器,一般黑客到q步也就看看有没有兴的数据Q这个黑客一看这是个没有h值的试服务器,所以心一横,在我q上面装了个DDOSd软gQ把我的机器当v肉鸡?br /><br />1.q就是黑完后留下的公?U钥Q删除authorized_keysQid_rsaQ?id_rsa.pubq三个文件吧Q除非还惌他l黑下去。。。?br /><img src="http://www.tkk7.com/images/blogjava_net/writegull/redis1.png" alt="" border="0" /><br /><br />2.通过redis的key *命o可以看到有个叫crackit的key。这是黑客在入侵后留下来的Q原先set的值是公钥Q入侉|功之后就Ҏq个了,把这个key也删除掉吧?br /><img src="http://www.tkk7.com/images/blogjava_net/writegull/redis2.png" alt="" border="0" height="216" width="675" /><br /><br />3.修改redis默认端口吧,不让黑客利用6379端口。在redis安装目录中,修改redis.config文g。修改完了别忘了重启redis服务,<div><p># redis-server /etc/redis/redis.conf 开?/p> <p># redis-cli shutdown 关闭</p></div><img src="http://www.tkk7.com/images/blogjava_net/writegull/redis3.png" alt="" border="0" height="64" width="543" /><br /><br />4.重启后查看redis是否q行<br /><div>ps -x | grep redis<br /></div>5.通过指定端口讉Kredis?br />redis-cli -p 6666<br /><br />6.lredis讄密码或者干脆设|成只能内网讉K<br /><br />7.通过top命o发现了几个可疑的E序<br /><img alt="" src="http://www.tkk7.com/images/blogjava_net/writegull/redis4.png" height="584" width="1139" /><br /><br /><br />8.minerdq个E序是个用来挖掘q币的Q这个黑客看来干了不坏事啊。。我们用命o ps -ef|grep minerd 查找一下这个进E,杀掉这个进Ekill -9 18267Qƈ且去/tmp目录删除minerd目录<br /><img alt="" src="http://www.tkk7.com/images/blogjava_net/writegull/redis5.png" height="200" width="995" /><br /><br />9.黑客在tmp目录留下了一个叫1.sh的脚本,是用来下载挖掘莱特币E序的。也把它kill掉吧。以下是脚本内容?br /><img alt="" src="http://www.tkk7.com/images/blogjava_net/writegull/redis6.png" /><br /><br />10.通过cat /etc/passwd命o可以看到有一个叫作syss的非法用P权限q很高,跟root一P删掉他吧Q这是黑客入侵后方便q入的。用命令userdel -f syss 强制删除一个用P哪怕他正在d?br /><img alt="" src="http://www.tkk7.com/images/blogjava_net/writegull/redis7.png" height="280" width="723" /><br /><br />11.?mnt目录上,可以看到黑客挂蝲了很多程序,删除他们吧?br /><img alt="" src="http://www.tkk7.com/images/blogjava_net/writegull/redis8.png" /><br /><br />12.通过nethogs软g可以按进E实时统计网l带宽利用率Q这个用来看是否存在DDOSd最好不q了?br /><br />13.暂时解决对外DDOSdQ最快的办法是用防火墙Q这个阿里云提供的脚本帮了大忙。直接上传到服务器上Q运行一下世界就清静了。下载地址Q?div><a target="_blank" >https://help.aliyun.com/knowledge_detail/5973920.html?spm=5176.7618386.5.1.H8H33f</a><br /><br /> </div><img src ="http://www.tkk7.com/writegull/aggbug/428651.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/writegull/" target="_blank">writegull</a> 2015-12-15 01:13 <a href="http://www.tkk7.com/writegull/archive/2015/12/15/428651.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Eclipse Removing obsolete files from server 问题 http://www.tkk7.com/writegull/archive/2015/01/03/422014.htmlwritegullwritegullSat, 03 Jan 2015 08:58:00 GMThttp://www.tkk7.com/writegull/archive/2015/01/03/422014.htmlhttp://www.tkk7.com/writegull/comments/422014.htmlhttp://www.tkk7.com/writegull/archive/2015/01/03/422014.html#Feedback0http://www.tkk7.com/writegull/comments/commentRss/422014.htmlhttp://www.tkk7.com/writegull/services/trackbacks/422014.html
                Removing obsolete files from server..
               Could not clean server of obsolete files: null
                java.lang.NullPointerException
解决Ҏ是把.metadata\.plugins\org.eclipse.wst.server.coreq个目录下面的tmp0删除掉,再clean下就可以了。可能是~存问题?img src ="http://www.tkk7.com/writegull/aggbug/422014.html" width = "1" height = "1" />

writegull 2015-01-03 16:58 发表评论
]]>
用UIButton且不会按钮变得半透明http://www.tkk7.com/writegull/archive/2013/12/23/407906.htmlwritegullwritegullMon, 23 Dec 2013 02:29:00 GMThttp://www.tkk7.com/writegull/archive/2013/12/23/407906.htmlhttp://www.tkk7.com/writegull/comments/407906.htmlhttp://www.tkk7.com/writegull/archive/2013/12/23/407906.html#Feedback0http://www.tkk7.com/writegull/comments/commentRss/407906.htmlhttp://www.tkk7.com/writegull/services/trackbacks/407906.html有时候需要手动地ȝ用一个uibutton,使用button.enabled = NO的时候虽然能够达到目的但也会带来副作用,那就是按钮变的半透明了。有时候应用不需要这U副作用Q可以尝试用button.userInteractionEnabled = NO来达到这个目的,在禁用按钮的同时也不会得按钮变得半透明?/span>

writegull 2013-12-23 10:29 发表评论
]]>
win8占cpu?/title><link>http://www.tkk7.com/writegull/archive/2013/03/18/396621.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Mon, 18 Mar 2013 14:47:00 GMT</pubDate><guid>http://www.tkk7.com/writegull/archive/2013/03/18/396621.html</guid><wfw:comment>http://www.tkk7.com/writegull/comments/396621.html</wfw:comment><comments>http://www.tkk7.com/writegull/archive/2013/03/18/396621.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/writegull/comments/commentRss/396621.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/writegull/services/trackbacks/396621.html</trackback:ping><description><![CDATA[装win8后发现cpu占用?0%-60%Q而且盘疯狂dQ是com surrogateq个E序Q还有几个服务造成的,之后我把com surrogatel束q程了cpu使用率直接降低到10%以下Q我郁闷了?br />解决ҎQ?br />1Q在“更多电脑讄”那里?#8220;用户”改ؓ“本地用户”?br />2Q?#8220;d”家庭l(一般都是它的原因)<br />3Q?#8220;同步讄”?br />4Q一?#8220;׃n”什么的不到需要都?#8220;?#8221;的状态?br />5Q做完以上几炚w不行Q就真帮不了你了?img src ="http://www.tkk7.com/writegull/aggbug/396621.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/writegull/" target="_blank">writegull</a> 2013-03-18 22:47 <a href="http://www.tkk7.com/writegull/archive/2013/03/18/396621.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MFMessageComposeViewController或MFMailComposeViewController 在IOS6下不昄键盘的问?/title><link>http://www.tkk7.com/writegull/archive/2012/10/30/390482.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Tue, 30 Oct 2012 13:08:00 GMT</pubDate><guid>http://www.tkk7.com/writegull/archive/2012/10/30/390482.html</guid><wfw:comment>http://www.tkk7.com/writegull/comments/390482.html</wfw:comment><comments>http://www.tkk7.com/writegull/archive/2012/10/30/390482.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/writegull/comments/commentRss/390482.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/writegull/services/trackbacks/390482.html</trackback:ping><description><![CDATA[q个问题g只有在手动改变系l状态栏U别的情冉|会出?br /><br />例如Qself.window.windowLevel = UIWindowLevelStatusBar+1;<br /><br />q样讄的话相当于媄响了弹出短信或邮件控制器面window的别,所以造成不显C键盘问题(不过此问题在ios6以下没有Q?br /><br />解决ҎQ在当前视图控制器中加入下面的代码,卛_解决<br /><p>- (void) viewDidAppear:(BOOL)animated {</p> <p>    [super viewDidAppear:animated];</p> <p>    self.window.windowLevel = UIWindowLevelNormal;</p> <p>}</p><img src ="http://www.tkk7.com/writegull/aggbug/390482.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/writegull/" target="_blank">writegull</a> 2012-10-30 21:08 <a href="http://www.tkk7.com/writegull/archive/2012/10/30/390482.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>xcode 4 制作静态库详解http://www.tkk7.com/writegull/archive/2012/10/09/389260.htmlwritegullwritegullTue, 09 Oct 2012 10:14:00 GMThttp://www.tkk7.com/writegull/archive/2012/10/09/389260.htmlhttp://www.tkk7.com/writegull/comments/389260.htmlhttp://www.tkk7.com/writegull/archive/2012/10/09/389260.html#Feedback0http://www.tkk7.com/writegull/comments/commentRss/389260.htmlhttp://www.tkk7.com/writegull/services/trackbacks/389260.html原文地址:http://blog.csdn.net/pjk1129/article/details/7255163

最q在做Apple的IOS开发,有开发静态库的需求,本nIOS的开发,只允讔R态库或者Framework。在Xcode上没有找到允许编译,如同Android上的*.so和Win32上的dllq样的说法。不qFrameworkq样的框Ӟ估计也是cM动态库的实玎ͼ不过没有具体研究q,后箋l箋深入研究?/p>

我这个文的静态库的开发是ZXcode4.2和iOS SDK5.0~写的。Xcode4跟之前的Xcode3q是有不的差别的?br style="line-height: normal; " />
下面q单写一个静态库和一个调用静态库的例子?br style="line-height: normal; " />
静态库的编写:

1.静态库工程的徏立:

Xcode New一个新的projectQ选择IOS下面的Framework&LibraryQ下面有一个Cocoa Touch Static Library。直接nextd立一?span style="font-family: Menlo; color: #ff3f47; ">Printq样的工E?/p>


2.工程建立

我们d很简单的"- (void)printA;"?+ (void)printB;"的方法,q个Ҏ的实C是很单的Q在*.m文g中的实现是一?NSLogQ@“”);"q样我们~译出来的libstaticlib可以被其他的IOS工程q行调用了。这块注意一下,目前我们?span style="color: #ff6666; ">Print->iOS Device



3.~译前准?/span>

q里分release与debug版本Q需要设|一?/p>


4.OKQ编?/span>

我们可以在Products下面扑ֈ我们~译生成的libstaticlib.aq个文g?br />

注意未编译前为红Ԍ?                            ~译后ؓ黑色Q?nbsp;?br />

       

5.ok

在右?nbsp;q个文g上右键Open In Finder。这时候我们打开了一个文件夹Q里面有一?span style="color: #6652cc; ">libPrint.a。后面我们l编写一个调用这?span style="color: #6652cc; ">libPrint.a的App。但是这个App在编译时候会出错Q通过q个错误的解冻I说明Xcode的一些编译相关的东西。这里,我们在command下面Ҏ路径扑ֈq个文gQ用q个非常重要的命令查看一下这个lib的信息!

打开l端写入如下命oQ?span style="color: #ff0000; ">q是什么?q就是所在的路径 

以下均是在自qmac上的路径。你需要将/Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products/ 替换成你的\径?/span>

cd /Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products/  

我们手动打开q个路径Q可以看到如下信息:Release-iphoneos


q个是给真机用的Q那我们要给模拟器和真机装的静态库应该都能用才好。这个下面介l!Q!Q!  


然后再在l端 打开q个文gQ?span style="color: #ff0000; ">cd /Users/user/Library/Developer/Xcode/DerivedData/UItab-dbvoszbzpavyglaboxgflvrnzfce/Build/Products/Debug-iphoneos

命o是:lipo -info libPrint.aQ可以看到显C的l果是:Arch?nbsp; Arm7。下面我会具体介l一下?/p>


6.建立一个调用这个libPrint.a的应?/span>

应用很单了Q我们添加刚才libPrint.a?.h文g?nbsp;然后在这个工E的Build Phases的Link Binary With Library里面d我们刚才拯出来的那个libPrint.a?br />



7.插入了h和a文g?/span>

我们可以在control里面调用q个libPrint.a 函数了?br />

#import "AstroDiskAppDelegate.h"

#import "Print.h"


@implementation AstroDiskAppDelegate


@synthesize window = _window;


- (void)dealloc

{

    [_window release];

    [_viewController release];

    [super dealloc];

}


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{

    

    //调用libPrint.a

    [Print printB];

    Print  *print = [[[Print alloc] init] autorelease];

    [print printA];


    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];

    [self.window makeKeyAndVisible];

    return YES;

}


8.OKQ编译运行这个应用程序?/span>

~译出现错误了。这个就是这文档的关键了。主要就是ؓ了介l编译静态库相关的东ѝ?br />



9.可以看到undefine symbols for architecture i386q样的错误?/span>

其实q个错误原因很简单,是因ؓQ我们用错了~译出来的libUITab.a libQ在模拟器里面,我们需要的是基于i386构架~译的static libQ但是这个a文gQ大家还记得前面说的arm6 arm7构架的么。这个a其实是在iphoneq个arm构架上运行的代码。其实show in finder指向的是一个ios device的库Qƈ不是i386模拟器下的库。那如何~译i386的库呢?看见W二张图片的Print>IOS Device了么Q我们将q个iOS Device修改成iPhone5.0 Simulator。在q行~译Q这样就可以~译出i386下面的库。这个时候我们show in finder打开的文件夹q是ios device下的库。我们最好自己去那个目录下看一下。这里我们用commandL看了一下目录情况,如下Q可以看C个iphoneos的目录和一个simulator的目录?br />


然后我们再看看这个目录与W?条所C的目录有什么不同! 同样也有一个libPrint.a文g?br />



10.错误原因分析

Release-iphoneos里面的是Zarm6 arm7~译出来的库文g。Release-iphonesimulator文g夹下面的是基于i386~译出来的文件?/span>

11.合ƈ.a文gQ制作通用静态库

q二个库一个是用于真机q行的一个是用于模拟器运行的.其实我们可以利用lipo这二个文g打包成一个通用的a文g。命令如下:

?span style="color: #ff0000; ">/Users/user/Library/Developer/Xcode/DerivedData/UITab-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products替换成你的\径?nbsp;

?span style="color: #0055ff; ">/Users/user/Desktop/libPrint.a替换成合q后的\径?nbsp;

lipo -create /Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products/Release-iphonesimulator/libPrint.a  /Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products/Release-iphoneos/libPrint.a  -output /Users/pjk1129/Desktop/libPrint.a


12.打包以后的库文gQ我们查看信?/span>

然后打入如下命oQlipo -info /Users/pjk1129/Desktop/libPrint.a 

可以看到如下信息Q?br />


如上Q你已经看到了,它具备了i386和arm7的条件?nbsp;现在我们q个静态库Q支持的构架已经是armv7 i386了?br />


13.okQ经q上q步骤后

q个通用库生成后Q我们将原来Q调用这个库q行替换一下,在进行编译,成功~译Q运行结果如下所C:




writegull 2012-10-09 18:14 发表评论
]]>
three20 Debugging 讲解http://www.tkk7.com/writegull/archive/2012/09/27/388664.htmlwritegullwritegullThu, 27 Sep 2012 02:30:00 GMThttp://www.tkk7.com/writegull/archive/2012/09/27/388664.htmlhttp://www.tkk7.com/writegull/comments/388664.htmlhttp://www.tkk7.com/writegull/archive/2012/09/27/388664.html#Feedback0http://www.tkk7.com/writegull/comments/commentRss/388664.htmlhttp://www.tkk7.com/writegull/services/trackbacks/388664.html

You can use Three20's debugging facilities instead of NSLog() / assert(). This would give you an ability to turn off debugging messages without commenting out all NSLog's, sort log messages by importance (errorwarninginfo).

Turn on debuggingQ打开调试Q?/h1>

These instructions are for Xcode 3:

  • Right-click on project, choose "Get Info".
  • In the "Build" tab, choose "Configuration => Debug" (you probably want to enable this only for debug builds)
  • While in the "Build" tab, search for "Preprocessor Macros" under the "GCC 4.2 - Preprocessing" section.
    • Add a declaration that reads DEBUG. That way you enable debugging in general.
    • Add a declaration that reads TTMAXLOGLEVEL=TTLOGLEVEL_INFO. By doing this, you set the default debugging output to beTTLOGLEVEL_INFO, the most descriptive one.

Debugging preprocessor macro

Use debugging

Logging

Use these instead of NSLog(). Which level gets printed to the console and which doesn't depends on what's set in preprocessor macros asTTMAXLOGLEVEL (see above).

TTDERROR(text, ...)    // Log level 1 TTDWARNING(text, ...)  // Log level 3 TTDINFO(text, ...)     // Log level 5 TTDPRINT(text, ...) 

Example

If I got this in AppDelegate.m of my project HelloWorld:

- (void)applicationDidFinishLaunching:(UIApplication *)application {	     TTDINFO(@"Hello!"); } 

...the console output would look like this:

2010-05-15 01:04:20.107 HelloWorld[65222:207] -[AppDelegate applicationDidFinishLaunching:](22): Hello! 

Conditional logging

This is a type of logging facility which only outputs something if a particular condition is met:

TTDCONDITIONLOG(condition, text, ...); 

Example

TTDCONDITIONLOG(TTDFLAG_URLREQUEST, @"Request parameters: %@", request.parameters); 

Debug-only assertions

Three20 also provides support for assertions which only work in the debug build.

TTDASSERT(condition_which_would_lead_to_application_termination_when_true); 

Example

// Not that implementing safeAddSubview: is a good idea - (void)safeAddSubview:(UIView*)view {     TTDASSERT(nil != view);     if (nil == view) {         return;     }     [self addSubview:view]; } 

See also

Links



writegull 2012-09-27 10:30 发表评论
]]>
旧的推送通知从通知中心U除?/title><link>http://www.tkk7.com/writegull/archive/2012/09/14/387745.html</link><dc:creator>writegull</dc:creator><author>writegull</author><pubDate>Fri, 14 Sep 2012 09:51:00 GMT</pubDate><guid>http://www.tkk7.com/writegull/archive/2012/09/14/387745.html</guid><wfw:comment>http://www.tkk7.com/writegull/comments/387745.html</wfw:comment><comments>http://www.tkk7.com/writegull/archive/2012/09/14/387745.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/writegull/comments/commentRss/387745.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/writegull/services/trackbacks/387745.html</trackback:ping><description><![CDATA[<p style="background-color: #fef3dd; border: 0px; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline; color: #292929; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 17px; ">译:http://www.joshsunshine.me.uk/2012/02/29/ios-development-remove-old-notifications-from-notification-center.html</p><p style="background-color: #fef3dd; border: 0px; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline; color: #292929; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 17px; ">不逐字译了,只是大体说一下?br />看作者的意思,应该是他l常收到N多通知Q而通过其中一条通知打开一个app以后Q发现那个app的其它通知q在通知中心。作者不喜欢q样的情c我以ؓ我也存在的这L情况Q马上检查了一下,发现没有。看来是数app的问题。但是也记录一下。作者ȝ的从通知中心U除通知的三U方法:<br />1.app的BadgeNumber设ؓ0Q就是app图标右上角那?/p><div text="" default"="" style="background-color: #f1f1f1; border: 1px solid #9f9f9f; margin: 0px 0px 10px; vertical-align: baseline; font-size: 13px; line-height: 1.4em; font-family: Monaco, 'Lucida Console', monospace; overflow: auto; white-space: nowrap; width: 740px; "><div codecolorer"="" style="border: 0px; margin: 0px; padding: 5px; vertical-align: baseline; line-height: 1.4em; ">[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];</div></div><p style="background-color: #fef3dd; border: 0px; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline; color: #292929; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 17px; "><br />2.如果BadgeNumber本n是0的情况,可以先将其设1再设|成0</p><div text="" default"="" style="background-color: #f1f1f1; border: 1px solid #9f9f9f; margin: 0px 0px 10px; vertical-align: baseline; font-size: 13px; line-height: 1.4em; font-family: Monaco, 'Lucida Console', monospace; overflow: auto; white-space: nowrap; width: 740px; "><div codecolorer"="" style="border: 0px; margin: 0px; padding: 5px; vertical-align: baseline; line-height: 1.4em; ">[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1];<br style="line-height: 1.4em; " />[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];</div></div><p style="background-color: #fef3dd; border: 0px; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline; color: #292929; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 17px; ">3.如果以上的办法都不好使的话,那就用本地通知ƺ骗一下?/p><div text="" default"="" style="background-color: #f1f1f1; border: 1px solid #9f9f9f; margin: 0px 0px 10px; vertical-align: baseline; font-size: 13px; line-height: 1.4em; font-family: Monaco, 'Lucida Console', monospace; overflow: auto; white-space: nowrap; width: 740px; "><div codecolorer"="" style="border: 0px; margin: 0px; padding: 5px; vertical-align: baseline; line-height: 1.4em; ">UIApplication* application = [UIApplication sharedApplication];<br style="line-height: 1.4em; " />NSArray* scheduledNotifications = [NSArray arrayWithArray:application.scheduledLocalNotifications];<br style="line-height: 1.4em; " />application.scheduledLocalNotifications = scheduledNotifications;</div></div><p style="background-color: #fef3dd; border: 0px; margin: 0px 0px 24px; padding: 0px; vertical-align: baseline; color: #292929; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 17px; ">p么多了,我仔l想了一下,Z么我的应用从其中一条通知打开的时候,其它的通知消失掉:<br />因ؓ我在E序启动的时候就执行了第一?)</p><img src ="http://www.tkk7.com/writegull/aggbug/387745.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/writegull/" target="_blank">writegull</a> 2012-09-14 17:51 <a href="http://www.tkk7.com/writegull/archive/2012/09/14/387745.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MFMessageComposeViewController 界面语言问题http://www.tkk7.com/writegull/archive/2012/09/10/387412.htmlwritegullwritegullMon, 10 Sep 2012 10:12:00 GMThttp://www.tkk7.com/writegull/archive/2012/09/10/387412.htmlhttp://www.tkk7.com/writegull/comments/387412.htmlhttp://www.tkk7.com/writegull/archive/2012/09/10/387412.html#Feedback0http://www.tkk7.com/writegull/comments/commentRss/387412.htmlhttp://www.tkk7.com/writegull/services/trackbacks/387412.html使用MFMessageComposeViewController ~写发短信模块时界面是英文的情况下,用下面的Ҏ可以解决问题

在plist里面Localization native development region 选择 china Q然后Localized resources can be mixed ?YESQ如果没有Localized resources can be mixedQ需手动d


writegull 2012-09-10 18:12 发表评论
]]>
վ֩ģ壺 AAѹۿ1000Ӱ| ޹СƵƷþþ| պ| www.91| 99ֻоƷ6| ޾Ʒ˾þվ| AV˵| 2019ĻƵ| Ʒ| ޹ƷԲĵӰ| ëƬƵѹۿ| ѳߵӰ| Ʒ߹ۿ| ޹Ʒպ߹ۿ| ZZIJZZIJձٸJIZJIZ| ձվ| ɫƵѿ| ɫ͵͵ۺav78| AVպAV̾| AëƬþð| Ʒ1024Ƶ| йͽxxxxxѿ| ޹Ʒ߹ۿ| þþƷav | ƷٸAVѾþϴ| йͽxxxxxѿ| ˸һ91| ޾Ʒ鶹ר| ˴ս˾Ʒһ | ҹëƬ| þþþѿӰƬ| һһͰһƵ| ۺavһ| avһas| ޸߲| ѿһ| Ʒһ| Ƶ| ˬˬƵ߹ۿ | ͵͵APP| ˳ѹۿ|