(1)Repeat..until循环是先执行一次循环,只要until表达式为false,程序就继续执行,直到不满足表达式。 1 var 2 i: Integer; 3 begin 4 i:= 0; 5 repeat 6 Inc(i); 7 i:= i+1; 8 until (i>10); 9 Edi ...
分类:
其他好文 时间:
2020-04-05 13:30:39
阅读次数:
110
一、简介: php语言是弱类型语言,声明变量的时候不需要指定数据类型。但每个数值都是有数据类型的。PHP共有九种数据类型。 php基本数据类型共有四种:boolean(布尔型),integer(整型),float(浮点型,也称作 double),string(字符串) 四种基本数据类型又可分为三个类 ...
分类:
Web程序 时间:
2020-04-05 09:42:56
阅读次数:
72
首先要知道CAS CAS Compare and Swap,即比较再交换; 区别于synchronouse同步锁的一种乐观锁(是一种无锁算法) CAS有3个操作数, 内存地址,以直接从内存中获取旧值; 旧的预期值A,代码中的旧值; 要修改的新值B 当且仅当预期值A和内存值V相同时,将内存值V修改为B ...
分类:
其他好文 时间:
2020-04-05 09:40:41
阅读次数:
58
现假设有一个整型数组: Integer[] arr = {20, 20, 4, 4, 21, 7}; // 2020年4月4日21时7分 如何用逗号加空格 “, ” 分割数组元素并放置在“[]”中从而获得如下格式的数组元素字符串呢? [20, 20, 4, 4, 21, 7] Show you th ...
分类:
其他好文 时间:
2020-04-05 00:27:21
阅读次数:
70
s = Student() s.score = 9999没办法检查参数可以在类中设定一个set_score()设置参数(函数内设定参数格式),一个fet_score()获取参数Python内置的@property装饰器负责把一个方法变成属性调用 class Student(object): @pro ...
分类:
其他好文 时间:
2020-04-05 00:15:45
阅读次数:
58
参考了网上很多资料,自己搞了一个适合的 在model 内增加一个函数: class User(db.Model): __tablename__ = 'user' userid = db.Column(INTEGER(11), primary_key=True, comment='用户ID') pho ...
分类:
数据库 时间:
2020-04-04 17:25:13
阅读次数:
98
题目如下: Given an array of integers arr, a lucky integer is an integer which has a frequency in the array equal to its value. Return a lucky integer in t ...
分类:
其他好文 时间:
2020-04-04 14:18:51
阅读次数:
71
一、数值型 1、整型 tinyint、smallint、mediumint、int/integer、bigint 1 2 3 4 8 特点: ①都可以设置无符号和有符号,默认有符号,通过unsigned设置无符号 ②如果超出了范围,会报out or range异常,插入临界值 ③长度可以不指定,默认 ...
分类:
其他好文 时间:
2020-04-03 23:52:14
阅读次数:
78
一 Map特性: 1 Map提供一种映射关系,其中的元素是以键值对(key-value)的形式存储的,能够实现根据key快速查找value; 2 Map中键值对以Entry类型的对象实例形式存在; 3 键,即key不可重复,但是value值可以; 4 每个键最多只能映射一个值; 5 Map接口提供了 ...
分类:
编程语言 时间:
2020-04-03 18:17:42
阅读次数:
81
leetcode 53. Maximum Subarray 链接 "leetcode" 描述 Given an integer array nums, find the contiguous subarray (containing at least one number) which has th ...
分类:
其他好文 时间:
2020-04-03 16:25:10
阅读次数:
60