函数功能:该函数将一个字符串转为字形下标的数组。此函数可用来确定一种字体里是否存在某个字形
控制台下代码:
#include "stdafx.h"
#include
#include"stdio.h"
void main()
{
char ch[] = {'0'};
WORD chnl[20] = {0};
HDC hdc;
hdc = GetWindowDC(0)...
分类:
其他好文 时间:
2014-05-12 15:14:13
阅读次数:
267
一、不允许使用汉语拼音命名 不规范示例: public void
zengjiaYongHu{}//拼音方法名称 规范示例: public void addUser(){} 解析:应该使用国际化语音,拼音使代码难懂
二、Package名称必须全部小写,尽量使用单个单词 不规范示例:...
分类:
编程语言 时间:
2014-05-12 09:06:00
阅读次数:
434
C语言提供了几个标准库函数,可以将任意类型(整型、长整型、浮点型等)的数字转换为字符串。以下是用itoa()函数将整数转换为字符串的一个例子:
#include #include voidmain(void) { intnum=100; charstr[25]; itoa(num,str,10);
...
分类:
编程语言 时间:
2014-05-12 07:51:06
阅读次数:
297
import java.util.*;
//泛型定容栈
//泛型:类型参数化,便于处理不同类型的数据
public class FixedCapacityStack {
private Item[] a;
private int N;
public FixedCapacityStack(int cap){
// java中不允许直接创建泛型数组,此处用类型转换来实现
// 这样写...
分类:
其他好文 时间:
2014-05-11 15:05:07
阅读次数:
233
//求gcd(a, b)
LL gcd(LL a, LL b)
{
return b ? gcd(b, a%b) : a;
}
//求整数x和y,使得ax+by=d, 且|x|+|y|最小。其中d=gcd(a,b)
void gcd(LL a, LL b, LL& d, LL& x, LL& y)
{
if(!b)
{
d = a;
x = 1;
y = 0...
分类:
其他好文 时间:
2014-05-11 14:45:32
阅读次数:
240
import java.util.Scanner;
public class FixedCapacityStackOfStrings {
private String[] a;
private int N;
public FixedCapacityStackOfStrings(int cap){
a=new String[cap];
}
public boolean isEmpty...
分类:
其他好文 时间:
2014-05-11 14:09:33
阅读次数:
251
代码不多,话不多说
/**
* 重写datePicker 1.只显示 年-月 2.title 只显示 年-月
* @author lmw
*/
public class MonPickerDialog extends DatePickerDialog {
public MonPickerDialog(Context context, OnDateSetList...
分类:
其他好文 时间:
2014-05-11 13:50:08
阅读次数:
264
import java.util.Iterator;
import java.util.Scanner;
public class Stack implements Iterable {
private Node first;// 栈顶
private int N;// 元素数量
// 定义结点的嵌套类
private class Node{
Item item;
Node nex...
分类:
其他好文 时间:
2014-05-11 13:20:22
阅读次数:
257
static是Java中的一个关键字,它能够声明在方法中,如public static void test(),这就是一个静态方法,...
分类:
编程语言 时间:
2014-05-11 05:59:05
阅读次数:
471
插入数据 1 public void InsertDataToSQL() 2 { 3
string conStr =
ConfigurationManager.ConnectionStrings["NorthwindConnectionStri...
分类:
Web程序 时间:
2014-05-11 00:33:45
阅读次数:
325