- 博客(11)
- 收藏
- 关注
原创 spark-submit提交集群命令
简单的记录提交命令参数,先切换到spark 的bin文件夹下--master spark填写自己的spark集群,最后/home/jll/home/jll/test_word-0.0.1-SNAPSHOT.jar改成自己的jar包存放路径./spark-submit --name "your app name" --master spark://ctrl241:7077 --executor-
2017-10-24 16:47:23
513
原创 Scala一元二次方程求解
package im.com//可以改成自己的包import math.sqrt//导入数学工具包object Function { def fun(a:Double,b:Double,c:Double):List[Double]= { var flag:Double=0; flag=b*b-4*a*c if(flag<0) { prin
2017-08-08 13:42:59
559
原创 Java用户自定义异常Exception处理
//类文件名名为jisuanqi,类名命名为"jisuanqi.java"//分5步走//1 用户自定义异常类型(注:需继承系统异常类其中之一)//2 在方法名写出要抛出异常的类型//3 在考虑出现的异常后面,throw异常对象//4 在代码中出现异常的语句块用try检查//5 捕捉异常后的处理(catch语句内处理),具体例子如下:public class jisuanqi {
2017-08-01 14:41:38
1069
原创 有关的插入排序、选择排序、快速排序和冒泡排序C++的实现
#includeusing namespace std;void quick(int a[], int low, int high)//快速排序{if (low >= high)return;int first = low;int last = high;int key = a[first];while (first {while (first = ke
2016-09-09 18:26:24
273
原创 c++字符串和整数的转换
#includeusing namespace std;void fun1(char s[], const int a)//数字转换为字符,或者用库函数itoa(){int temp = a;int i = 0;while (temp){s[i] = temp % 10 + '0';temp = temp / 10;i++;}s[i] = '\0';
2016-08-22 09:48:40
668
原创 C++ 冒泡、插入和选择排序
#includeusing namespace std;void maopao(int a[], const int n)//冒泡排序{ for(int i = 0; i for (int j = 0; j { if (a[j]>a[j + 1]) { int temp = a[j];
2016-08-19 12:23:53
294
原创 ASCII文件操作
#include#includeusing namespace std;void set_w()//输入字符,保存到磁盘{ofstream outf;outf.open("dat1.txt", ios::out);char a[10];for (int i = 0; i {cin >> a[i];outf }outf.close();
2016-05-31 21:27:24
527
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人