现在位置: 首页 > summed发表的所有文章
  • 08月
  • 21日
综合 ⁄ 共 3158字 评论关闭
strcmp() is a library function in C/C++ which compares two strings. It takes two strings as input parameter and decides which one is lexicographically larger or smaller: If the first string is greater then it returns a positive value, if the second string is greater it returns a negative value and if two strings are equal it returns a zero. The code that is used to compare two strings in C/C++ library is shown below: int strcmp(char *s, char *t) {     int i;     for (i=0; s[i]==t[i]......
阅读全文
  • 07月
  • 20日
移动开发 ⁄ 共 3559字 评论关闭
    当用户选中一张图片之后,可以直接将其显示在正中央。 要实现显示图片的切换,那么就要依靠ImageSwitchar类完成。       在main.xml中 <?xml version="1.0" encoding="utf-8"?> <LinearLayout   xmlns:android="http://schemas.android.com/apk/res/android"   android:orientation="vertical"   android:layout_width="fill_parent"   android:layout_height="fill_parent"   android:gravity="bottom">   <ImageSwitcher      android:id="@+id/myImageSwitcher"      android:layout_width="fill_parent"  ......
阅读全文
  • 06月
  • 13日
综合 ⁄ 共 1458字 评论关闭
The Triangle 时间限制:1000 ms  |  内存限制:65535 KB 难度:4 描述 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1) Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top and ends somewhere on the base. Each step can go either diagonally down to the left or diagonally down to the right. 输入 Your program is to read from standard input. The first line contains one integer N: the number of rows in the triangle. The......
阅读全文
  • 02月
  • 28日
算法 ⁄ 共 3205字 评论关闭
Tian Ji -- The Horse Racing Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 9328   Accepted: 2866 Description Here is a famous story in Chinese history.  That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and others.  Both of Tian and the king have three horses in different classes, namely, regular, plus, and super. The rule is to have three rounds in a match; each of the horses must be......
阅读全文
  • 10月
  • 24日
综合 ⁄ 共 21485字 评论关闭
Fifty Ways to Lose Your Data (and How to Avoid Them) Linda Jolley and Jane Stroupe, SAS Institute Inc., Cary, NC   This paper groups possible destructive techniques and their solutions into the following categories: NOVICE PROBLEMS Many errors that beginning SAS® programmers encounter fall into other categories; however, three are identified as common misconceptions. 1. Assuming data must be created before it can be used. data perm.DataSet; proc print data = perm.DataSet; run; Solution:......
阅读全文
  • 05月
  • 27日
综合 ⁄ 共 1830字 评论关闭
输入字节流和字符流的使用原理 1:InputStream包含的三个方法: 1:int read() :从输入流中读取单个字节, int返回的是读取的字节个数; 2:int read(byte[]buff):从输入流中每一次读取的字节个数最大是buff.length()个;       并且读取的字节保存在数组buff里面; int 返回的是每次读取的字节个数的值; 3:int read(byte[]buff,int off,int len):从输入流中每一次读取的字节个数最大为len个字节数,并且存储在buff中不是从0开始 ,而是从off开始; 2:Reader包含的三个方法与InputStream包含的三个方法相同,只是保存的数组......
阅读全文
  • 05月
  • 17日
综合 ⁄ 共 5025字 评论关闭
转载自:http://www.blogjava.net/rabbit/archive/2008/03/27/189009.html import java.io.UnsupportedEncodingException; /**  * 转换字符串的编码  */ public class ChangeCharset {  /** 7位ASCII字符,也叫作ISO646-US、Unicode字符集的基本拉丁块 */  public static final String US_ASCII = "US-ASCII";  /** ISO 拉丁字母表 No.1,也叫作 ISO-LATIN-1 */  public static final String ISO_8859_1 = "ISO-8859-1";  /** 8 位 UCS 转换格式 */  public static final String UTF_8 = "UTF-8";  /** 16 位 UCS 转换格式,Big......
阅读全文
  • 05月
  • 16日
综合 ⁄ 共 204字 评论关闭
svn的线上对比功能: 选中一个文件然后右键compare with,然后选择修订版,就可以从给出的log里面选出想要对比的版本进行比较 svn的本地对比功能: 1单个文件历史对比: 选中一个文件然后右键compare with,然后选择local history,就可以再右边给出的时间范围内选择想要对比的时间点的文本 2.两个文件横向对比,选中这两个文件,然后右键 compare with,然后选择each other即可。
阅读全文
  • 05月
  • 07日
综合 ⁄ 共 440字 评论关闭
        平常我们有时会需要比较两个数据库结构的不同,那么你都是如何操作的呢?导出两个数据库的SQL文件使用文本对比工具进行对比,还是直接逐个表来进行对比?这都不是合适的方法,今天我就给大家介绍一款专门负责Mysql数据库结构对比的软件。就是“MySQL Compare”,读完这篇文章你会发现你原先的操作方式是多么的浪费时间和不合适。 下载地址:http://www.devart.com/dbforge/mysql/schemacompare/download.html 这款软件的功能就是能够快速的比较出两个数据库的不同,并能够根据需求来执行更改或者生成SQL语句。 首先下载后......
阅读全文
  • 05月
  • 05日
综合 ⁄ 共 2279字 评论关闭
事件 浏览器   一般事件       onclick IE3、N2 鼠标点击时触发此事件   ondblclick IE4、N4 鼠标双击时触发此事件 onmousedown IE4、N4 按下鼠标时触发此事件 onmouseup IE4、N4 鼠标按下后松开鼠标时触发此事件 onmouseover IE3、N2 当鼠标移动到某对象范围的上方时触发此事件 onmousemove IE4、N4 鼠标移动时触发此事件 onmouseout IE4、N3 当鼠标离开某对象范围时触发此事件 onkeypress IE4、N4 当键盘上的某个键被按下并且释放时触发此事件. onkeydown IE4、N4 当键盘上某个按键被按下时触发此事......
阅读全文
  • 04月
  • 30日
综合 ⁄ 共 407字 评论关闭
可变参数定义的时候,前边加上* 函数里可以当做元组读取可变参数 例子: def tupleVarArgs(arg1,arg2='defaultB',*theRest):    print 'formal arg 1:',arg1    print 'formal arg 2:',arg2    for eachXtrArg in theRest:        print 'another arg:',eachXtrArg >>> tupleVarArgs('abc')formal arg 1: abcformal arg 2: defaultB>>> tupleVarArgs(23,4.23)formal arg 1: 23formal arg 2: 4.23>>> tupleVarArgs('abc',123,'xyz',344.23)formal arg 1: abcformal arg 2: 123another arg: xyzanother a......
阅读全文
  • 04月
  • 30日
综合 ⁄ 共 165字 评论关闭
Ubuntu需要联网来安装各种软件,但在没网的情况下,可通过安装包安装软件,这首先需要在一台有网的机器上下载安装包。通过新立得(synaptic)软件下载,标记后点击应用,选择“仅下载软件包”复选框。下载的安装包目录在var/cache/apt/archives 安装新立得软件:sudo apt-get install synaptic
阅读全文