码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果)
【JUC】9. AtomicInteger源码
首先要知道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
6.2、使用@property
s = Student() s.score = 9999没办法检查参数可以在类中设定一个set_score()设置参数(函数内设定参数格式),一个fet_score()获取参数Python内置的@property装饰器负责把一个方法变成属性调用 class Student(object): @pro ...
分类:其他好文   时间:2020-04-05 00:15:45    阅读次数:58
sqlalchemy 查询结果转json个人解决方案
参考了网上很多资料,自己搞了一个适合的 在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
【leetcode】1394. Find Lucky Integer in an Array
题目如下: 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
4.3 DDL 数据类型
一、数值型 1、整型 tinyint、smallint、mediumint、int/integer、bigint 1 2 3 4 8 特点: ①都可以设置无符号和有符号,默认有符号,通过unsigned设置无符号 ②如果超出了范围,会报out or range异常,插入临界值 ③长度可以不指定,默认 ...
分类:其他好文   时间:2020-04-03 23:52:14    阅读次数:78
JAVA集合框架之Map
一 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 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
JAVA集合框架之List和Set、泛型
一 List是有序可重复的集合 可以进行增删改查,直接看代码 1 package com.collection; 2 3 import java.util.ArrayList; 4 import java.util.Arrays; 5 import java.util.Iterator; 6 imp ...
分类:编程语言   时间:2020-04-03 11:58:34    阅读次数:71
C++-析构函数
使用析构函数,进行函数的删除 /* 析构函数 */ #include <iostream> using namespace std; class Integer { public: Integer(int i) { m_pi = new int; *m_pi = i; } ~Integer(void ...
分类:编程语言   时间:2020-04-02 19:53:57    阅读次数:75
共14932条   上一页 1 ... 77 78 79 80 81 ... 1494 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!