添加StringEx类public static class StringEx { public static int ToInt(this string str) { int number = default(int); ...
分类:
其他好文 时间:
2014-12-25 18:15:58
阅读次数:
142
首先,图片转化为字节流 public byte[] ImagefileToByte(string srcImagePath) { System.IO.MemoryStream m = new System.IO.MemoryStream(); ...
分类:
Web程序 时间:
2014-12-25 18:13:05
阅读次数:
127
生成1个长度为10的存储int类型元素的数组,以随机的方式为数组元素赋值且其值不得重复,能够打印其中最大的数组元素的值和索引。Main文件import java.util.Random;public class Main { public static void main(String[] a...
分类:
编程语言 时间:
2014-12-25 17:50:22
阅读次数:
172
/// /// 根据经纬度获取城市名称 /// /// 纬度 /// 经度 /// 城市名称 public static string GetCity(string lat, string lng) ...
//定义类 public class MyClass { public int Property1 { get; set; } public string Property2 { get; set; } } MyClass tmp_Class = ne...
分类:
其他好文 时间:
2014-12-25 17:42:41
阅读次数:
105
Given a string containing just the characters '(', ')',
'{', '}', '[' and ']', determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are all valid b...
分类:
其他好文 时间:
2014-12-25 16:25:57
阅读次数:
123
一.@代表引用资源1.引用自定义资源。格式:@[package:]type/nameandroid:text="@string/hello"2.引用系统资源。格式:@android:type/name android:textColor="@android:color/opaque_red"注意:其...
分类:
移动开发 时间:
2014-12-25 16:22:19
阅读次数:
237
工作中遇到这样一个需求,要求把选中的订单导出到一张Word中(要求不能使用Com组件)要求实现图如下下面是代码实现 先引用 DocX 1 string tempName = Guid.NewGuid().ToString() + ".doc"; //word临时文件名 2 ...
分类:
其他好文 时间:
2014-12-25 16:12:34
阅读次数:
262
Java初学者都必须理解的六大问题 对于这个系列里的问题,每个学Java的人都应该搞懂。当然,如果只是学Java玩玩就无所谓了。如果你认为自己已经超越初学者了,却不很懂这些问题,请将你自己重归初学者行列。 问题一:我声明了什么! String s = “Hello world!”; 许多人都做过这....
分类:
编程语言 时间:
2014-12-25 16:10:36
阅读次数:
135
1、分享APP的代码/** * 分享APP * @parampackageName:要分享的应用程序包名 */private void sharedApp(String packageName) { Intent shareIntent = new Intent(); ...
分类:
其他好文 时间:
2014-12-25 16:03:53
阅读次数:
179