摘要: 写多了Java代码,对String类很是喜爱,可惜经典的C语言没有。。。最近在做程序过程中,发现对C语言字符串的处理很模糊,一会儿用数组,一会儿用指针,一会儿又引入string.h。。。于是决定总结一下C语言中字符串的处理,一则作为笔记,二则作为技术交流和大家分享。Form:http://hi.baidu.com/rxpeng/item/6bd3ebfbfc025b07c7dc45bb字符串字面量(字符串常量,在C标准中称为,字符串字面量)如何存储字符串字面量 从本质上而言,C语言把字符串字面量作为字符数组来处理。当C语言编译器在程序中遇到长度为n的字符串字面量时,它会为字符串字面量分配长度. 阅读全文
posted @ 2013-02-07 17:28 hack25 阅读(641) 评论(0) 推荐(0) 编辑
摘要: http://souldoor.codeplex.com/ 阅读全文
posted @ 2013-01-21 18:51 hack25 阅读(125) 评论(0) 推荐(0) 编辑
摘要: WP7中页面间传值:WP7页面间传值跟普通的web页面间的传值很类似。this.NavigationService.Navigate(new Uri("/Page1.xaml?pagetitle=hello", UriKind.Relative));另一个页面取值:this.PageTitle.Text = NavigationContext.QueryString["pagetitle"].ToString();当然可以直接利用应用程序状态来存值:PhoneApplicationService.Current.State["key" 阅读全文
posted @ 2013-01-16 10:35 hack25 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 打开数据库:SQLiteConnection db = null;private string fileName = "System.DB";if (db == null){ db = new SQLiteConnection(fileName); db.Open(); } 建表:SQLiteCommand cmd = db.CreateCommand("Create table Banji (ClassNumber text,Teacher text,Introduction text)");int i = cmd.ExecuteNonQuery(); 阅读全文
posted @ 2013-01-16 10:33 hack25 阅读(1856) 评论(0) 推荐(0) 编辑
摘要: http://msdn.microsoft.com/zh-cn/magazine/cc721608.aspx使用 XAML 和 Expression Blend 创建动画Lawrence Moroney本文将介绍以下内容:基本转换和合并的转换使用触发器和事件线性关键帧动画和离散关键帧动画使用 Expression Blend 制作动画本文使用以下技术:Silverlight 2、Expression Blend本文基于 Silverlight 2 的预发布版本。文中的所有信息均有可能发生变更。本文是根据 Laurence Moroney 的《Microsoft Silverlight 2 简介 阅读全文
posted @ 2013-01-15 12:21 hack25 阅读(413) 评论(0) 推荐(0) 编辑
摘要: public static class Utils { public static BitmapImage GetImage(string filename) { string imgLocation = Application.Current.Resources["ImagesLocation"].ToString(); StreamResourceInfo imageResource = Application.GetResourceStream(new Uri(imgLocation + filenam... 阅读全文
posted @ 2013-01-12 22:11 hack25 阅读(1539) 评论(0) 推荐(0) 编辑
摘要: //注册事件PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame; //离开页面事件触发(如来电)if (frame != null){ frame.Obscured += new EventHandler<ObscuredEventArgs>(frame_Obscured); frame.Unobscured += new EventHandler(frame_Unobscured);} 阅读全文
posted @ 2013-01-07 21:30 hack25 阅读(224) 评论(0) 推荐(0) 编辑
摘要: Creating a lock screen iconCreate a 38 x 38 pixel PNG image that will identify your app on the lock screen. The image must contain only white pixels plus some level of transparency.Update the app manifest file by following these steps:InSolution Explorer, expandProperties, right-clickWMAppManifest.x 阅读全文
posted @ 2013-01-04 14:25 hack25 阅读(1166) 评论(0) 推荐(0) 编辑
摘要: Tile的使用:Tile和Toast的push notification使用同样的命名空间:using Microsoft.Phone.Shell;接着产生ShellTile和StandardTileData对象如下(以下是在MainPage的构造函数中实现):StandardTileData tileData = new StandardTileData(){ Title = "Title", Count = 1, BackTitle = "BackTitle", BackContent = "BackContent",};fore 阅读全文
posted @ 2012-12-28 17:15 hack25 阅读(192) 评论(0) 推荐(0) 编辑
摘要: http://www.codeproject.com/KB/windows-phone-7/ 阅读全文
posted @ 2012-12-26 17:49 hack25 阅读(106) 评论(0) 推荐(0) 编辑