码迷,mamicode.com
首页 >  
搜索关键字:scala for if match while    ( 37974个结果
[Scala] Pattern Matching(模式匹配)
Scala中的match, 比起以往使用的switch-case有著更強大的功能, 1. 傳統方法 def toYesOrNo(choice: Int): String = choice match { case 1 => "yes" case 0 => "no" case _ => "error"...
分类:其他好文   时间:2014-05-26 20:45:46    阅读次数:285
android 往dialog中加入listview,并实现listview中item的点击事件
LinearLayout linearLayoutMain = new LinearLayout(this);//自定义一个布局文件 linearLayoutMain.setLayoutParams(new LayoutParams( LayoutParams.MATCH_PARENT, ...
分类:移动开发   时间:2014-05-26 16:22:12    阅读次数:257
Ruby常用文件操作
#建立一个222.rb文件并且输入字符file = File.open("222.rb","w+")file.puts "123\nwadwa\n12124124\ndwdw"file.close#输出222.rb的内容File.open("222.rb","r+") do |file|while ...
分类:其他好文   时间:2014-05-26 16:07:50    阅读次数:293
数据库 dml
一. SQL语言1.DDL 数据库模式定义语言(create alter drop __对对象操作)2.DML 数据操纵语言(insert delete update)3.DCL 数据控制语言 (grantrevoke)4.流程控制语言(if while)二.输出记录前几条 用limitmysql不...
分类:数据库   时间:2014-05-26 14:27:05    阅读次数:317
php 遍历文件及文件夹
\n"; while($file = $mydir->read()) { if((is_dir("$directory/$file")) AND ($file!=".") AND ($file!="..")) { echo "$fi...
分类:Web程序   时间:2014-05-26 14:22:05    阅读次数:239
归并排序
#includeusing namespace std;///算法重要,但是思想更重要 void MemeryArray(int a[],int n,int b[],int m,int c[])///经典框架,be careful!{ int i,j,k; i = j = k = 0; while(...
分类:其他好文   时间:2014-05-26 11:22:57    阅读次数:204
JS类似Java String.format的函数
String.prototype.format = String.prototype.f = function () { var s = this, i = arguments.length; while (i--) { s = s.replace(new R...
分类:编程语言   时间:2014-05-26 10:49:23    阅读次数:356
Post These Up-Close Shots Of The Runway Bags
Here are some tips to guide you while shopping discount LV bags online. Look at the rack bag. Before you go out and buy handbags online, it is good to...
分类:其他好文   时间:2014-05-26 10:26:29    阅读次数:279
堆排序
#include#include#includeusing namespace std; //void MinHeapFixup(int a[], int i)//{// int j ,temp;// temp = a[i];// j = (i-1)/2;// while(j >= 0 && i !...
分类:其他好文   时间:2014-05-26 10:26:08    阅读次数:212
Scala-LIST
Scala-LIST...
分类:其他好文   时间:2014-05-26 03:10:41    阅读次数:217
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!