码迷,mamicode.com
首页 >  
搜索关键字:scala for if match while    ( 37974个结果
整数加减法练习
程序自动产生随机数(srand 设置种子为系统时间,以保证每次运行程序产生的随机数有差别 ),然后用户输入结果,程序判断用户输入是否正确减法运算时要保证随机产生的a要大于b(用while循环判断,当然前提条件是用户选择的为减法运算,这里只保证式子产生的结果为非负整数)。#include #inclu...
分类:其他好文   时间:2014-05-01 23:59:45    阅读次数:499
Linux shell脚本中shift的用法说明
Linux shell脚本中shift的用法说明 shift命令用于对参数的移动(左移)。 示例1:依次读取输入的参数并打印参数个数: run.sh: #!/bin/bash while [ $# != 0 ];do echo "第一个参数为:$1,参数个数为:$#" shift done 输入如下命令运行:run.sh a b c d e...
分类:系统相关   时间:2014-05-01 22:06:54    阅读次数:475
【HDOJ】2149 Public Sale
看Discuss说是博弈论,没学到这个分类。不过仔细想了想,发现。如果m 2 3 int main() { 4 int m, n; 5 int i; 6 7 while (scanf("%d %d", &m, &n) != EOF) { 8 if (m <...
分类:其他好文   时间:2014-05-01 19:38:17    阅读次数:368
libpcre.so.1 cannot be found
./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory...
分类:其他好文   时间:2014-04-30 22:43:38    阅读次数:346
uva 11988 这题可以看出c++中string效率的底下
用c语言实现 #include #include #include using namespace std; typedef struct node { char x; struct node *next; }chan; chan *root = new chan; char a[100010]; int main() { while(scanf("%...
分类:编程语言   时间:2014-04-29 13:47:20    阅读次数:358
Perl生成excel文件
#生成excel #ljl use Spreadsheet::WriteExcel; my %us; while(($key, $value) = each %us){ print "$key|$value\n"; } # 创建一个新的EXCEL文件 my $workbook = Spreadsheet::WriteExcel->new('poi_count_top15....
分类:其他好文   时间:2014-04-29 13:33:21    阅读次数:327
[TroubleShooting]Neither the partner nor the witness server instance for database is availble
Problem: You are trying to setup a mirroring on a Database called xxxDB(SQL server 2012). You are getting this error while trying to setup mirroring. “Neither the partner nor the witness server ins...
分类:数据库   时间:2014-04-29 13:33:20    阅读次数:444
链表《2》使用函数操作链表
使用函数操作链表 1:计算链表中结点的个数:定义一个Length_list()函数用于计算链表中结点的个数 函数代码: //计算链表中结点的个数 void Length_list(PNODE pHead) { PNODE p = pHead->pNext; int len = 0; while(NULL != p) { len++; p = p->pNext; ...
分类:其他好文   时间:2014-04-29 13:28:21    阅读次数:302
创建Hive/hbase相关联的表异常
FAILED: Error in metadata: java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.hbase.HBaseSerDe: columns has 3 elements while hbase.columns.mapping has 4 elements (counting the key if implic...
分类:其他好文   时间:2014-04-29 13:17:21    阅读次数:387
android:layout_weight的真实含义
首先声明只有在Linearlayout中,该属性才有效。之所以android:layout_weight会引起争议,是因为在设置该属性的同时,设置android:layout_width为wrap_content和match_parent会造成两种截然相反的效果。如下所示: <LinearLayout android:layout_width="match_parent" ...
分类:移动开发   时间:2014-04-29 13:14:20    阅读次数:391
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!