本博文介绍了基本的Spinner的使用方法首先写一下xml中的代码部分<Spinner
android:id="@+id/myspinner"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>再写一下Strings.xml中的文件部分<string-array
name="tongxue"
>
<ite..
分类:
移动开发 时间:
2015-06-23 13:45:51
阅读次数:
182
代码接第(4)章;
private void writeLogWithModule(FileWriter fw, LogConfigBean lc)
throws IOException {
String pkgName = lc.getModuleName();
String append = LOG4J_APPEND_KEY_PREFIX + pkgName;
initData(fw...
分类:
其他好文 时间:
2015-06-23 13:38:25
阅读次数:
134
代码接第(5)章:
/**
* 读取资源信息
*
* @param filePath
* 资源路径(包含文件名称)
* @return Properties [返回类型说明]
* @see [类、类#方法、类#成员]
*/
private Properties readProperties(String filePath) {
Properties p...
分类:
其他好文 时间:
2015-06-23 13:37:54
阅读次数:
108
按张网上的做法 给pdo添加两个参数 PDO::ATTR_STRINGIFY_FETCHES和PDO::ATTR_EMULATE_PREPARES(都设为FALSE)
PDO::ATTR_STRINGIFY_FETCHES = 表示提取的时候将数值转换为字符串
PDO::ATTR_EMULATE_PREPARES = 启用或禁用预处理语句的模拟。 有些驱动不支持或有限度地支持本地预...
分类:
其他好文 时间:
2015-06-23 13:36:07
阅读次数:
355
题目:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed fo...
分类:
其他好文 时间:
2015-06-23 13:24:20
阅读次数:
114
//字符串宏
#define EMPTY_STRING(string) ( [string isKindOfClass:[NSNull class]] || string == nil || [string isEqualToString:@""])
#define GET_STRING(string) (EMPTY_STRING(string) ? @"...
分类:
移动开发 时间:
2015-06-23 12:06:46
阅读次数:
141
增新语言打开Project-Info-Localizations点击Localization下的+ 新增语言定义多语言文件新增String Files在Supporting Files上,新增String Files,命名为Localizable.strings
设置设置完显示如下:
字符串本地化定义Localizable.strings(English)"welcome"="Welcome";...
分类:
移动开发 时间:
2015-06-23 11:55:58
阅读次数:
179
#14 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
这个题求多个字符串的公共前缀,除了要考虑串空外,如果存在公共前缀,那么必定也是第一个串的前缀。
所以可以以第一个串为基准,比较其他串的前缀是否与第一个串相同。
c...
分类:
其他好文 时间:
2015-06-23 11:55:01
阅读次数:
129
引用:using System;using System.Collections.Generic;using System.Aspose.Words;using System.Windows.Forms;获取模版路径:string = "路径"; //如:string = "e:\\word\\.....
分类:
Windows程序 时间:
2015-06-23 11:29:56
阅读次数:
1124
【一】何为可变性可变性是.NET4.0中的一个新特性,可变性可分为 : 协变性、逆变性、不可变性.那么在.NET4.0之前是否有可变性? 答案是肯定的,我们可以通过下面的几个实例来简单的了解一下.NET4.0之前的协变和逆变.实例 1 : 方法参数的协变static void Main(string...
分类:
Web程序 时间:
2015-06-23 11:26:55
阅读次数:
169