<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/xindrace</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; xindrace]]></copyright><item><title><![CDATA[IOS中Json解析的四种方法]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/9615055</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/9615055</guid><author>xindrace</author><pubDate>Mon, 29 Jul 2013 12:53:36 +0800</pubDate><description><![CDATA[作为一种轻量级的数据交换格式，json正在逐步取代xml，成为网络数据的通用格式。

有的json代码格式比较混乱，可以使用此“http://www.bejson.com/”网站来进行JSON格式化校验（点击打开链接）。此网站不仅可以检测Json代码中的错误，而且可以以视图形式显示json中的数据内容，很是方便。


从IOS5开始，APPLE提供了对json的原生支持（NSJSONSe]]></description><category></category></item><item><title><![CDATA[Java程序员必知的8大排序]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697213</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697213</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:36:04 +0800</pubDate><description><![CDATA[下载了文档自己截图存留
8种排序之间的关系:

1， 直接插入排序
   （1）基本思想：在要排序的一组数中，假设前面(n-1)[n>=2] 个数已经是排
好顺序的，现在要把第n个数插到前面的有序数中，使得这n个数
也是排好顺序的。如此反复循环，直到全部排好顺序。
 （2）实例


 
（3）用java实现
 package com.njue;
 
public cla]]></description><category></category></item><item><title><![CDATA[实现ScrollView的嵌套]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697212</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697212</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:36:02 +0800</pubDate><description><![CDATA[今天忽然需要写两个ScrollView嵌套，如：
 

    ……
    
    ……
    
    ……
 

但是这样会用问题，只有最外层的ScrollView有效。
 
有研究了一下，发现了下面这种解决方法：
 
ScrollView sv01 = (ScrollView) findViewById(R.id.scroll_01); 
ScrollVie]]></description><category></category></item><item><title><![CDATA[Mysql日期和时间函数]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697211</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697211</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:36:00 +0800</pubDate><description><![CDATA[对于每个类型拥有的值范围以及并且指定日期何时间值的有效格式的描述见7.3.6 日期和时间类型。  

这里是一个使用日期函数的例子。下面的查询选择了所有记录，其date_col的值是在最后30天以内：  

mysql> SELECT something FROM table  
WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) 

DAYOFWEEK]]></description><category></category></item><item><title><![CDATA[Android4.0新的SDK新特性 （汉化）]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697209</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697209</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:58 +0800</pubDate><description><![CDATA[Android 4.0 是一次重要的平台发布版，为用户和应用程序开发者增加了大量的新特性。在下面我们将讨论的所有新特性和API中，因为它将 Android 3.x 版本中广泛使用的API和全息图像主题带给了小屏幕设备，因此我们说 Android 4.0 是一次重要的平台发布版。作为一名开发者，现在你拥有了单一的平台和统一的 API 框架，使你可以开发，并通过一个APK 来发布你的应用程序，并且可以]]></description><category></category></item><item><title><![CDATA[Fragments (Android官方文档中文版)]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697208</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697208</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:56 +0800</pubDate><description><![CDATA[原作者为： 苍山。感谢他分享的内容
 
 
概述







        Fragment 表现 Activity 中用UI的一个行为或者一部分.可以组合多个fragment放在一个单独的activity中来创建一个多界面区域的UI,并可以在多个activity里重用某一个fragment.把fragment想象成一个activity的模块化区域, 有它自己的生命周期,]]></description><category></category></item><item><title><![CDATA[仿iphone实现两个view切换翻转动画]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697207</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697207</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:53 +0800</pubDate><description><![CDATA[看那些iPhone的view的切换效果非常帅，今天研究了一下从一个view到另一个view的切换翻转的效果，现在和大家分享一下




 

 
我先重写了Animation类，然后在类里先写一个接口，用来传递动画进度的
 

/** 用于监听动画进度。当值过半时需更新的内容。 */
	private InterpolatedTimeListener listener;]]></description><category></category></item><item><title><![CDATA[android瀑布流]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697205</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697205</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:51 +0800</pubDate><description><![CDATA[今天研究了一下瀑布流，来说一下我实现它的方法。
看一下效果图：




 
 
 
基本的思路是重写了 ScrollView，让它包含一个LinearLayout，然后你要实现几列的就在里面添加几个LinearLayout，然后在循环在那几个LinearLayout里添加图片（也可以是别的view等）。
想看看重写ScrollView的LazyScrollView类
在Laz]]></description><category></category></item><item><title><![CDATA[Hashtable、synchronizedMap、ConcurrentHashMap 比较]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697204</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697204</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:49 +0800</pubDate><description><![CDATA[Doug Lea的util.concurrent包除了包含许多其他有用的并发构造块之外，还包含了一些主要集合类型List和Map的高性能的、线程安全的实现。Brian Goetz向您展示了用ConcurrentHashMap替换Hashtable或synchronizedMap，将有多少并发程序获益。


在Java类库中出现的第一个关联的集合类是Hashtable，它是JDK 1.0的一部]]></description><category></category></item><item><title><![CDATA[Android 连接WIF获取的信息剖析]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697203</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697203</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:47 +0800</pubDate><description><![CDATA[Android的参数大致分成两块：系统服务参数和平台系统信息。
系统服务参数：Android的系统服务不仅指服务组件，而且还包括 Android 系统提供的服务功能。Android为这些系统服务参数提供了接口---管理器，不同的组件会有不同的管理器进行管理，主要有Wi-Fi管理，连接管理， 电话管理，电源管理，振动管理，音量管理，输入法管理，窗口管理等等，我们通过这些系统服务接口就可以方便地获取]]></description><category></category></item><item><title><![CDATA[JAVA中IP和整数相互转化介绍]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697202</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697202</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:45 +0800</pubDate><description><![CDATA[在项目中经常会用到IP（v4）范围判定比较的功能，一般将IP转化为整数再进行比较。 
一、基本知识点 


 

IP ——> 整数：

把IP地址转化为字节数组通过左移位（

整数 ——> IP：

将整数值进行右移位操作（>>>），右移24位，再进行与操作符（&）0xFF，得到的数字即为第一段IP。将整数值进行右移位操作（>>>），右移16位，再进行与操作符（&）0xF]]></description><category></category></item><item><title><![CDATA[IOS开发天气预报]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697200</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697200</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:43 +0800</pubDate><description><![CDATA[使用的WebService是http://www.webxml.com.cn/WebServices/WeatherWebService.asmx
其中的getWeatherByCityName函数
 
常使用的技术有：SOAP，HTTP GET， HTTP POST三种方式
 
(一) SOAP（简单对象访问协议）方式
 
当你使用SOAP时，必须用到POST方式
 
(1)]]></description><category></category></item><item><title><![CDATA[IOS播放gif图]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697199</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697199</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:41 +0800</pubDate><description><![CDATA[-(void)gifImageView:(NSString *)imageName
{
    NSLog(@"%@",imageName);
    // 设定位置和大小
    CGRect frame = CGRectMake(50,50,0,0);
    frame.size = [UIImage imageNamed:imageName].size;
    
    N]]></description><category></category></item><item><title><![CDATA[cocos2d-iphone安装错误]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697197</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697197</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:39 +0800</pubDate><description><![CDATA[下载了cocos2d 2.0beta，在安装时碰到了两个错误：

1.习惯性的使用sudo ./install-templates.sh –f

结果提示从2.0beta开始，不允许再使用 root 安装

 

2.进入相关目录，使用标准化的./install-templates.sh –u –f安装，杯具来了：

 

Installing Xcode 4 cocos2]]></description><category></category></item><item><title><![CDATA[UIScrollView循环滚动]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697196</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697196</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:36 +0800</pubDate><description><![CDATA[我弄了半天终于弄出UIScrollView循环了，分享一下，方法感觉有点不好，要是有大侠有更好的方法指点一下。
 

 
创建了一些文件，ScrollView就是要在ScrollViewController循环的View

//_colorArray.count+2是因为需要在前后多加一个View
    CGSize newSize = CGSizeMake(MDefaultScr]]></description><category></category></item><item><title><![CDATA[NSString与int和float的相互转换]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697194</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697194</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:34 +0800</pubDate><description><![CDATA[NSString *tempA = @"123";

  NSString *tempB = @"456";

 

1，字符串拼接

 NSString *newString = [NSString stringWithFormat:@"%@%@",tempA,tempB];

 

2，字符转int

int intString = [newString intVa]]></description><category></category></item><item><title><![CDATA[iOS如何利用Delegate来实现两个UIView之间的传值]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697193</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697193</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:32 +0800</pubDate><description><![CDATA[转至：http://blog.youkuaiyun.com/whaomian/article/details/6802162
 


两个View之间的传值可以有多种方式。但本人觉得最合理最自然并且最安全的方式是通过Delegate方式。

设想一个场景：

1. 有两个View，分别是A和B。

2. 点击A中的某个按钮，出来B。

3. 对B做某些操作（比如输入文字到textFie]]></description><category></category></item><item><title><![CDATA[切换两个UIVIew动画]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697192</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697192</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:30 +0800</pubDate><description><![CDATA[#pragma mark - Animation code block
- (void)exchangeViewWithAnimation:(UIView *)view changeView:(UIView *)sView withView:(UIView *)eView animationType:(NSInteger)type
{
    
    NSUInteger sv = [[]]></description><category></category></item><item><title><![CDATA[将UILabel旋转90度]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697190</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697190</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:28 +0800</pubDate><description><![CDATA[[*yourlabelname* setTransform:CGAffineTransformMakeRotation(-M_PI / 2)];]]></description><category></category></item><item><title><![CDATA[UIAlertView的使用方法]]></title><link>https://blog.youkuaiyun.com/xindrace/article/details/8697188</link><guid>https://blog.youkuaiyun.com/xindrace/article/details/8697188</guid><author>xindrace</author><pubDate>Wed, 20 Mar 2013 16:35:26 +0800</pubDate><description><![CDATA[UIAlertView类似于C#中的模态对话框 或 Messagebox ，但是，ios中使用起来要麻烦得多。
下面这段代码是一段典型的应用：
UIAlertView *alert =[[UIAlertView alloc] initWithTitle:@"hello" 
 message:@"ipad ,i come"
     
         delegate:self]]></description><category></category></item></channel></rss>