现在位置: 首页 > noblesse发表的所有文章
  • 10月
  • 01日
综合 ⁄ 共 520字 评论关闭
在ios 5.0 后有设置UISearchBar的背景图片的接口,可如下设置其背景: //search is a defined UISearchBar UIImage *img = [[UIImage imageNamed:@"nav_bar.png"] stretchableImageWithLeftCapWidth:1 topCapHeight:0]; [search setBackgroundImage:img]; 在ios5.0以前,可用下面的方法: //search is a defined UISearchBar [[[search subviews] objectAtIndex:0] removeFromSuperview]; UIImage *img = [[UIImage imageNamed:@"nav_bar.png"] stretchableImageWithLeftCapWidth:1 topCapHeight:0]; UIImageView *imgView = [[U......
阅读全文
  • 02月
  • 14日
综合 ⁄ 共 2835字 评论关闭
Watto, the owner of a spare parts store, has recently got an order for the mechanism that can process strings in a certain way. Initially the memory of the mechanism is filled with n strings. Then the mechanism should be able to process queries of the following type: “Given string s, determine if the memory of the mechanism contains string t that consists of the same number of characters as s and differs from s in exactly one position”. Watto has already compiled the mechanism, all that’......
阅读全文
  • 05月
  • 17日
综合 ⁄ 共 157字 评论关闭
参考博文:http://blog.csdn.net/cgcoder/article/details/42576823 unigine的输出目录、以来库引用、子系统等比较混乱,需要自己手工重新配置,但debug仍然出现link失败问题,经过半天折腾,发现debug下 忽略了libcmt.lib库,去掉该项即可编译通过。
阅读全文
  • 05月
  • 05日
综合 ⁄ 共 2009字 评论关闭
js代码: <script type="text/javascript">   $(function(){     var a = "${ps.passagetype}";//运营商      $("input[name='passagetype']").get(a-1).checked= true;     var a = "${ps.pasIsSpPerfix}";//sp字冠支持       $("input[name='pasIsSpPerfix']").get(a-1).checked= true;     if("${ps.pasIsSpExpend}"=='1'){      $("#pasIsSpExpend").attr("checked",true);     }if("${ps.pasIsSpLm}"=='1'){      $("#pasIsSpLm").attr("checked",true);     }if("${ps.pasStatus}"=='1'){      $("#pasStatus").attr......
阅读全文
  • 05月
  • 01日
综合 ⁄ 共 1052字 评论关闭
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>JS计算两个日期之间的天数</title></head> <body> <script type="text/javascript">  function  btnCount_Click(){         s1  =  "2006-12-18"         s2  =  "2007-1-5"         alert("第一个日期;"+s......
阅读全文
转自:http://www.cnblogs.com/ychellboy/archive/2012/09/17/2675347.html 上一篇《网络游戏服务器构架设计(二)》介绍了刀剑Online的连接负载服务器CLS,博友提出质疑“说得不够详细,比如你怎么,场景服务器怎么才算一个场景服务器,场景服务器切换怎么处理不断线后连接另一个场景的,还有很多细节问题没有说到”,本篇就来介绍游戏服务器最为核心的部分:游戏逻辑服务器,同时也回答了这位博友的问题。 PS:本篇的文章结构主要分两个部分,前半部分(2.2节)介绍刀剑Online如何实现游戏逻辑服务器,后半部分(2.3节)为本人结合......
阅读全文
原文地址:http://www.warriorpoint.com/blog/2009/07/19/android-simplified-source-code-for-parsing-and-working-with-xml-data-and-web-services-in-android/   In my previous post I linked to a terrific website (Working with XML on Android) which describes how you can read and parse XML documents in Android. The code supplied by that website used polymorphism to show 4 different methods for parsing the XML data. I vowed to simplify that and share the new source code. To download the AndroidXml......
阅读全文
  • 02月
  • 16日
综合 ⁄ 共 6909字 评论关闭
OrmLite可以帮助我们将会数据库操作,不用自己去写SQL语句,而且设置它跟使用Sqlite一样的方式,它是一种关系型数据,我比较喜欢的就是它能够帮助我判断数据表项是更新还是创建等操作,不需要自己去写大量的SQL语句去判断,下面介绍一下它的使用文档以及一些基本的注意点: 官方网址:http://ormlite.com/ JavaDOC地址:http://ormlite.com/javadoc/ormlite-android/  开发文档地址:http://ormlite.com/javadoc/ormlite-core/doc-files/ormlite.html 一、建立模型 首先创建一个Model,作为一个数据表,在Android中我使用的是实现P......
阅读全文
  • 02月
  • 01日
综合 ⁄ 共 1127字 评论关闭
Elevator Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 24941    Accepted Submission(s): 13418 Problem Description The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to move down one floor. The elevator will stay for 5 seconds a......
阅读全文
  • 12月
  • 24日
综合 ⁄ 共 749字 评论关闭
单例模式的要点    显然单例模式的要点有三个; 一是某个类只能有一个实例; 二是它必须自行创建这个实例; 三是它必须自行向整个系统提供这个实例。 在java中,可以使用以下这种方式使用单例模式创建类的实例: 1、Child.java代码如下:  package com.zuxia.lei.singleFactory; public class Child { public void study(){ System.out.println("Child is looking book!"); } } 2、SingleFactory.java代码如下  package com.zuxia.lei.singleFactory; /** * 单例模式就是在内存里只生成一个对象,也就是只提供一个环境 ......
阅读全文
  • 12月
  • 09日
综合 ⁄ 共 3299字 评论关闭
self.dataArray = [[[NSMutableArray alloc]init] autorelease]; NSArray *array = [NSArray arrayWithObjects:[NSArray arrayWithObjects:@"Beijing",@"$500", nil],[NSArray arrayWithObjects:@"ShangHai",@"$510", nil],[NSArray arrayWithObjects:@"Guangzhou",@"$540", nil],[NSArray arrayWithObjects:@"Wuhan",@"$513", nil], nil]; [dataArray addObjectsFromArray:array]; int height = [UIScreen mainScreen].applicationFrame.size.height; self.tableView = [[UITableView alloc]initWithF......
阅读全文
  • 11月
  • 26日
综合 ⁄ 共 3787字 评论关闭
如果你是一名 Web 开发者,很多时候都需要在本地搭建服务器测试环境,比如 Apache+Mysql+PHP 这样的环境。事实上 Mac OS X 中想要搭建这样的环境很简单,本文我们就会将详细的教程分享给大家。 首先需要说明的是,Mac OS X 系统其实已经集成了 Apache+PHP环境,用户手动开启即可。在之前的 OS X 系统中,只需要进入「系统偏好设置——共享」,然后开启「Web 共享」就可以打开 Apache。不过在最新的 Mountain Lion 中苹果取消了这个共享功能的图形界面,只能从命令行开启。 MOUNTAIN LION 中已经没有”WEB共享” 启用 Apache/W......
阅读全文