码迷,mamicode.com
首页 >  
搜索关键字:void    ( 62627个结果
c# for循环获取dictionary的键和值
protected void Button1_Click ( object sender, EventArgs e ) { Dictionary DicTest = new Dictionary(); DicTest.Add( "a", "1" ); DicTest.Add( "b", "2" );...
分类:其他好文   时间:2014-10-08 13:52:25    阅读次数:165
android禁止状态栏下拉
[html]?view plaincopyprint? public?void?onWindowFocusChanged(boolean?hasFocus)?? ????{?? ????????//?TODO?Auto-generated?method?stub?? ????????System.out.println("h...
分类:移动开发   时间:2014-10-08 13:30:55    阅读次数:204
try-catch-finally
通过中间代码窥探try-catch-finally本质: class Program { static void Main(string[] args) { Program p = new Program(); Console.WriteLine(p.Test1()); //Conso...
分类:其他好文   时间:2014-10-08 13:08:45    阅读次数:129
编程之美2.10 寻找数组中的最大值和最小值
这个问题其实很容易解决,就是循环遍历一遍数组,然后找到数组中存在的最大值和最小值就可以了,书中主要讨论的问题是比较次数较小的方法,不过,书中已经证明了,无论用什么方法最少的比较次数也就是循环遍历一遍的比较,结果是O(1.5N)的,所以,很容易的可以解决这个问题。      第一种方法:      函数声明:void DutFindMaxAndMinInArray_1(int*, int, int&...
分类:其他好文   时间:2014-10-08 13:04:35    阅读次数:149
【特种兵系列】String中的==和equals()
1.1 小样示例 public static void main(String[] args) { String a = "a" + "b" + 123; String b = "ab123"; System.out.println(a == b); }true public static void...
分类:其他好文   时间:2014-10-08 12:24:25    阅读次数:208
王立平--Unity中的GUI Skin
C#脚本: public class NewBehaviourScript2 : MonoBehaviour { public Texture t; public GUISkin skin; // Use this for initialization void Start () { }  void OnGUI(){ GUILayout.BeginArea(new Rect(0...
分类:其他好文   时间:2014-10-08 12:02:25    阅读次数:201
切换view的动画
代码:#import "MainViewController.h"@interface MainViewController ()@end@implementation MainViewController- (void)viewDidLoad{ [super viewDidLoad]; ...
分类:其他好文   时间:2014-10-08 11:29:15    阅读次数:179
经典排序之插入排序
插入排序的思想很简单,就是每向有序序列中插入一个数,就把这个数依次与其他数比较,逐次替换。 下面是代码public class InsertSort { public void insertSort(int a[]){ int length=a.length; int i; int keyword; for(int j=1;j<length;j...
分类:其他好文   时间:2014-10-08 10:31:05    阅读次数:161
Java基础知识
1、Properties public class PropertiesTest { public static HashMap hashMap = new HashMap(); public static String filename = "my"; /** * @param args */ public static void main(String[] args) {...
分类:编程语言   时间:2014-10-08 10:28:15    阅读次数:170
C++调用C中编译过的函数要加extern "C"
C++语言支持函数重载,C语言不支持函数重载。函数被C++编译后在库中的名字与C语言的不同。假设某个C 函数的声明如下:void foo(int x, int y);该函数被C 编译器编译后在库中的名字为_foo,而C++编译器则会产生像_foo_int_int之类的名字用来支持函数重载和类型安全连...
分类:编程语言   时间:2014-10-08 04:18:24    阅读次数:215
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!