//把一个字符串里的所有单词的第一个字符转换为大写 用到 了字符串方法split slice join charAt toUpperCase var str = 'ni hao ma!' function getUpper(str){ var words = str.split(' '); for( ...
分类:
其他好文 时间:
2018-10-19 23:44:36
阅读次数:
147
环境:MAC PD虚拟机安装centos7 修改完网卡配置,重启网络服务报错 使用提示命令查看:systemctl status network.service 发现报错为Failed to start LSB: Bring up/down networking 百度了很多解决办法,无外乎是修改ma ...
分类:
Web程序 时间:
2018-10-19 02:24:20
阅读次数:
179
1.打开anaconda prompt 2.添加清华镜像1:https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ 3.添加清华镜像2:https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/ma ...
1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 4 #!/usr/bin/env python 5 # -*- coding: utf-8 -*- 6 7 class car(): #定义一个类 8 9 def __init__(self,ma... ...
分类:
编程语言 时间:
2018-10-19 02:12:40
阅读次数:
252
有同学会发现,自己使用 有时候会生成不了较大的值,这是为什么呢? C++ 的 包含在 头文件内,没有参数; 生成的随机数范围是 $[0, RAND\_MAX]$,其中 $RAND\_MAX$ 是 中定义的常量,值和 C++ 的版本有关; 我们在比赛前可以使用以下语句得到比赛用机的 $RAND\_MA ...
分类:
编程语言 时间:
2018-10-18 22:05:47
阅读次数:
446
1. 迭代器协议:对象必须提供一个next方法,执行改方法要么返回迭代中的下一项,要么就引起一个stopiteration异常,以终止迭代(只能外后走不能往前退) 2. 可迭代对象:实现了迭代器协议的对象 3. 协议的一种约定:可迭代对象实现了迭代器协议,python的内部工具(sum、min、ma ...
分类:
其他好文 时间:
2018-10-15 12:02:28
阅读次数:
106
#include<iostream>using namespace std;int max(int a,int b){ if(a>b) {return a;}else{ return b;}}int maxsum(int a[],int n){ int i;int maxsofar=0;int ma ...
分类:
编程语言 时间:
2018-10-14 16:53:13
阅读次数:
174
题目标签:String 首先把vowel letters 保存入 HashSet。 然后把S 拆分成 各个 word,遍历每一个 word: 当 word 第一个 字母不是 vowel 的时候,把第一个char 加到最后; 然后添加“ma” 和 “a“ 到最后; 添加新的"a"; 把新的 word ...
分类:
其他好文 时间:
2018-10-14 01:57:27
阅读次数:
242
#include<iostream>using namespace std;int max(int a,int b){ if(a>b) {return a;}else{ return b;}}int maxsum(int a[],int n){ int i;int maxsofar=0;int ma ...
分类:
编程语言 时间:
2018-10-14 01:55:19
阅读次数:
185
cgroup https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/resource_management_guide/ch01 http://man7.org/linux/man-pages/ma ...
分类:
系统相关 时间:
2018-10-13 20:22:21
阅读次数:
176