暂无个人介绍
建议读取文件时,都用with 的方式,美观又方便
with open("file_path.txt", "w") as f:
f.write("good")
python2 print 后加上逗号
print 'no',
print 'new',
print 'line'
python3
print ('no new line',end='')
和 java 一样的 !=
if 1 != 2:
print("haha")
python 的list 使用中括号就行 :
a = [1,2,3]
a.append(4)
自己写到文件中, 或者使用python 的json dump:
json = json.dumps(dict)
import
我用的是pycharm,推荐之。上网搜一下直接安装就好。
不行的。会提示 incompatible types
当然是 Integer会占用更多的内存啊。Integer是一个对象。
jdk 7 之前,不支持(支持 byte、short、char、int)。
jdk 7 之后支持的。
System.getProperty("sun.arch.data.model")
执行的
public static void main(String[] args) {
try {
String str = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z",
Locale.ENGLISH).format(new Date());
System.out.println(str);
return;
} catch (Exception e) {
System.out.println("Exception!");
} finally {
System.out.println("Finally!");
}
}
输出:
2019-01-14 17:05:23.169 +0800
Finally!
执行的
public static void main(String[] args) {
try {
String str = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z",
Locale.ENGLISH).format(new Date());
System.out.println(str);
return;
} catch (Exception e) {
System.out.println("Exception!");
} finally {
System.out.println("Finally!");
}
}
输出:
2019-01-14 17:05:23.169 +0800
Finally!
执行的
String str = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z",
Locale.ENGLISH).format(new Date());
System.out.println(str);
output: 2019-01-14 17:02:17.016 +0800
String str = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z", Locale.ENGLISH).format(new Date());
System.out.println(str);
嗯?是我没理解还是怎么的?不是直接打印吗...
for (String str: list) {
System.out.println(str);
}
双向。直接看下源码。看到前、后的节点都有。
private static class Node<E> {
E item;
Node<E> next;
Node<E> prev;
Node(Node<E> prev, E element, Node<E> next) {
this.item = element;
this.next = next;
this.prev = prev;
}
}
Pattern pattern = Pattern.compile("[0-9]*");
Matcher isNum = pattern.matcher(str);
if( !isNum.matches() ){
return false;
}
return true;
参考 csdn https://blog.csdn.net/liujian8654562/article/details/81207858
1.修改Maven的Settings.xml文件添加如下内容
jdk-1.8
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
1
2.在项目的pom.xml文件中添加:
1.8
1.8
1
3.打开项目配置,设置Modules的Language Level为”8”
4.最后按”Ctrl+Alt+S”打开设置,搜索”Java Compiler”,将默认jdk和当前modual的jdk版本切换为1.8即可
pyHook,参考下这里 https://blog.csdn.net/xiaoliu5396/article/details/46457585
pyHook,网上搜一下很多。pip install PyHook3 。有前置依赖注意也要安装,包括 pythoncom 之类的
这两个不是一个概念吧?
Full outer join是全连接,返回左右表中的所有记录。
MapJoin是Hive的一种优化操作,适用于小表JOIN大表的场景,这时表的JOIN操作是在Map端且在内存进行的。