from threading import Thread from time import sleep a = 1 def foo(): global a a = 1000 def bar(): sleep(1) print("a = ",a) t1 = Thread(target = foo) t ...
分类:
编程语言 时间:
2021-01-13 10:50:50
阅读次数:
0
1.创建包和类 package com.example.HelloWorld; public class HelloWorld 2.运行方法 3.打jar包 File | Project Settings | Artifacts 选择主类 OK | OK 4.build artifacts buil ...
分类:
编程语言 时间:
2021-01-12 11:07:35
阅读次数:
0
建表 class User(models.Model) name = models.CharField(max_length) age = models.InterField() register_time = models.DateField() ## models.DateTimeField() ...
分类:
其他好文 时间:
2021-01-12 11:01:49
阅读次数:
0
参数初始化日期 // 日期 LocalDate date = LocalDate.of(2021, 1, 11); // 时间 LocalTime time = LocalTime.of(20, 53); // 日期时间 LocalDateTime datetime = LocalDateTime. ...
分类:
其他好文 时间:
2021-01-12 10:55:21
阅读次数:
0
import time flag=1 def time_out(flag): def timer(func): def inner(*arg,**kwargs): if flag: start_time=time.time() ret=func(*arg,**kwargs) end=time.tim ...
分类:
其他好文 时间:
2021-01-12 10:52:30
阅读次数:
0
一 导读 接着上一篇我们说到的日本和韩国做贸易。几周后,韩国方面和日本起了一些小矛盾,于是两国准备断交。韩国总统说:“安倍啊,我们们经过商量确认,决定和你们断交,501台三星我已经发出去了,你的51辆汽车我们已收到。不知你收到没有”,同时韩国方取关安倍 的推特账号。安倍收到后回复:“小文啊,确认收到 ...
分类:
其他好文 时间:
2021-01-12 10:52:17
阅读次数:
0
此博客链接: 买卖股票的最佳时机 题目链接:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/ 题目 给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格。 如果你最多只允许完成一笔交易(即买入和卖出一支股票一 ...
分类:
其他好文 时间:
2021-01-12 10:51:05
阅读次数:
0
c++ 常用头文件 输入输出 #include <ios> //基本输入/输出支持#include <iostream> //数据流输入/输出#include <istream> //基本输入流#include <ostream> //基本输出流#include <fstream> //文件输入/输 ...
分类:
其他好文 时间:
2021-01-11 11:18:18
阅读次数:
0
只需要 toHHmmss(时间戳)即可 function toHHmmss (data) { var time; var hours = parseInt((data % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var minutes = parseI ...
分类:
其他好文 时间:
2021-01-11 11:07:41
阅读次数:
0
# #!/usr/bin/env python # # coding: utf-8 # # https://www.cnblogs.com/scolia/p/6132950.html import threading import time import signal def set_timeout ...
分类:
编程语言 时间:
2021-01-11 10:54:45
阅读次数:
0