冒泡排序,每次循环选出一个最大/最小的数在队伍的末端,循环n-1次 1 # include 2
3 int main (void) 4 { 5 int a[10]; 6 int i, j, t; 7 8 printf("请输入10个整数:"); 9 10
...
分类:
编程语言 时间:
2014-05-30 03:10:52
阅读次数:
336
调用: BLL.Area bll = new BLL.Area();//实例化BLL对象
DataTable dt = null; private void FormArea_Load(object sender, EventArgs e) {...
分类:
其他好文 时间:
2014-05-30 01:52:28
阅读次数:
249
这里举一个简单的例子: public class Test{ public static
void main(String[] args){ String s; s = "h...
分类:
编程语言 时间:
2014-05-30 01:43:17
阅读次数:
278
最上层的父类:public interface IXmlModel { public void
initModel(); 初始化 public void doSaveXML(); 保存为xml文件 public void
rebuildFromXml(Elemen...
分类:
其他好文 时间:
2014-05-30 00:41:27
阅读次数:
231
一.主要理解一下几个方法和属性:1.QWidget *
QScrollView::viewport () const2.void QWidget::paintEvent ( QPaintEvent * )
[虚保护]3.void QWidget::repaint ( int x, int y, in...
分类:
其他好文 时间:
2014-05-30 00:32:12
阅读次数:
199
我的战斗算法的核心代码private void aHitb(HeroBean
a,HeroBean b){ ///*自身状态(已经移到aHitBTeam那里) //判断A能否出招或者受到伤害什么的 //*/
//if(this->checkStatus(a) == 1) // return...
分类:
其他好文 时间:
2014-05-29 21:57:43
阅读次数:
322
一、方法传不固定值的用法 public void Test(int a,Person
...Persons) { for(Person p:Persons){ System.out.println(p.age); } }
好处是不用去构造数组Persons...
分类:
编程语言 时间:
2014-05-29 21:53:36
阅读次数:
337
#region 实现窗口移动 private bool m_isMouseDown = false;
private Point m_mousePos = new Point(); protected override void
OnMouseDown(Mo...
分类:
移动开发 时间:
2014-05-29 20:34:27
阅读次数:
247
synchronized 关键字,它包括两种用法:synchronized 方法和
synchronized 块。1. synchronized 方法:通过在方法声明中加入 synchronized关键字来声明 synchronized
方法。如:public synchronized void a...
分类:
编程语言 时间:
2014-05-29 16:46:25
阅读次数:
234
有时候我们会需要在界面上拖动view;uiview是继承于uiresponder的,所以可以响应触摸相关的事件。重点是以下一组方法:-
(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event-
(void)touchesMoved...
分类:
移动开发 时间:
2014-05-29 15:23:07
阅读次数:
247