随笔分类 - 源代码
摘要:在发布产品程序包时,往往需要对程序文件进行编码检查,写了一个可以批量修改文件编码格式的辅助工具,希望对有同样需求的童鞋有帮助。1.程序界面:2.核心代码: /// /// 取得文件编码方式 /// /// /// ...
阅读全文
摘要:效果图: 百度地图API显示多个标注点带提示的代码 百度地图API显示多个标注点带提示的代码 完整demo下载
阅读全文
摘要://// main.m// 01.基本数据类型//// Created by zhangqs008 on 14-2-13.// Copyright (c) 2014年 zhangqs008. All rights reserved.//#import int main(int argc, const char * argv[]){ @autoreleasepool { //01.基本数据类型长度 NSLog(@"01.基本数据类型长度"); NSLog(@"The size of an int is: %lu bytes....
阅读全文
摘要://// main.m// 字符串-可变字符串//// Created by zhangqs008 on 14-2-13.// Copyright (c) 2014年 zhangqs008. All rights reserved.//#import int main(int argc, const char * argv[]){ @autoreleasepool { NSString *str1=@"this is string A"; NSString *search; NSString *replace; ...
阅读全文
摘要:1.关键字命名:为了避免与已有的c,C++关键字冲突,ObjectC关键字都有@开始:如:@classs,@interface,@private,@try,@catch,@protocol等。2.oc类分为2个文件,一个是.h文件,一个是.m文件:.h文件:存放类,函数的申明;类申明使用关键字@interface @end来申明;.m文件:存放类的具体实现;类实现使用关键字@implementation @end来实现;3.对象的方法和类的方法:+表示类的方法;-表示对象的方法4.类的申明 Dog.h:#import@interface Dog:NSObject{}@end5.类的实现 Dog
阅读全文
摘要:#import int main(int argc, const char * argv[]){ @autoreleasepool { NSString *str1=@"this is string A"; NSString *str2=@"this is string B"; NSString *temp; NSComparisonResult compareResult; //01.计算字符串中字符个数 NSLog(@"字符串长度:%@的长度为%lu",str1...
阅读全文
摘要:#import int main(int argc, const char * argv[]){ @autoreleasepool { /* Object-C中的数字对象: 1.int,float,long,double等都是Object-C中的基本数据类型,不是对象,也就是说不能够向他们发送消息。 2.有时需要将值类型作为对象使用,如NSArray,要求存储的必须是对象,因此不能直接将基本数据类型放入数组。 3.如果需要存储基本数据类型(包括char),可以使用NSNumber类。 ...
阅读全文
摘要:/// /// 将DataTable导出到Excel /// /// html表格内容 /// 仅文件名(非路径) /// 返回Excel文件绝对路径 public static string E...
阅读全文
摘要:/// /// 将DataTable导出到Excel /// /// html表格内容 /// 仅文件名(非路径) /// 返回Excel文件绝对路径 public static string E...
阅读全文
摘要:在开发过程中,经常会对xml,json,html数据打交道,查看这三类数据时,有一个快捷的格式化工具,往往能大大的提高效率。结合多方资源,本人写了个小工具,对这三类数据进行格式化,不废话了,贴图贴代码:程序界面:程序下载:http://download.csdn.net/detail/a497785609/4170938源码下载:http://download.csdn.net/detail/a497785609/41709471.Xml格式化:using System;
using System.Collections.Generic;
using System.Text;
using ..
阅读全文
摘要:private string FormatXml(string sUnformattedXml) { XmlDocument xd = new XmlDocument(); xd.LoadXml(sUnformattedXml); StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); XmlTextWriter xtw = null; ...
阅读全文
摘要:最近项目需要做一个双语的网站,需要将对资源文件进行翻译,在vs里翻译感觉不够方便,参考SimpleResxEditor,自己写了个资源文件编辑助手,自己DIY的才是最好用的,呵呵,软件界面:使用方法:实现思路:1.资源文件对应的实体namespace ResxEditor
{ public class ResourceItem { public ResourceItem() { } public ResourceItem(int id, string key, string value, string comment) ...
阅读全文
摘要:using System;
using System.Data;
using System.Text.RegularExpressions;
using System.Xml;
using System.IO;
using System.Collections;
using System.Data.SQLite; namespace SQLiteHelper
{ /// <summary> /// SQLiteHelper is a utility class similar to "SQLHelper" in MS /// Data Access Applic
阅读全文
摘要:namespace Framework
{ using System; using System.Collections; using System.IO; using KTDictSeg; /// <summary> /// 关键字辅助类 /// </summary> public class KeyWordHelper { public static CSimpleDictSeg m_SimpleDictSeg; /// <summary> /// 提取关键字 ...
阅读全文
摘要:namespace Framework
{ using System; using System.Globalization; using System.Text; /// <summary> /// 随机数辅助类 /// </summary> public sealed class RandomHelper { private static readonly char[] RandChar = { '0', '1', '2', '3', '4', '5', '6&#
阅读全文
摘要:using System;
using System.Collections.Generic; using System.Text;
using System.Globalization;
using System.Text.RegularExpressions; namespace Framework
{ /// <summary> /// 字符串辅助类 /// </summary> public static class StringHelper { /// <summary> /// 截取字符串的后部分 ...
阅读全文
摘要:using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Collections; namespace Framework
{ /// <summary> /// 将xml转换为json /// </summary> public class XmlToJson { /// <summary> /// 将xml转换为json ///...
阅读全文
摘要:using System;
using System.Collections.Generic; using System.Text;
using System.Net;
using System.IO;
using Newtonsoft.Json;
using System.Web; namespace Framework
{ /// <summary> /// 语言翻译类 /// </summary> public class Translater { /// <summary> /// 翻译方法 中文:"zh-cn...
阅读全文
摘要:using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.Net; namespace Framework
{ /// <summary> /// 网页采集辅助类 /// </summary> public static class CollectionHelper { /// <summa...
阅读全文
摘要:比如需导出如下形式的报表:里面数据字段分类很多,又含公式统计等情况。解决方案:利用NPOI组件,制作导出模板,对单元格精确控制,通过读取单元格里的模板字段,进行数据匹配替换;模板形式如下:核心方法: /// <summary> /// 根据Excel模板单元格内容,找出单元格,并设置单元格的值 /// </summary> /// <param name="sheet">ExcelSheet</param> /// <param name="rowIndex">行索引</param>
阅读全文