- 【iOS】系统框架
温柔何曾赋我
ios
文章目录前言四十七、熟悉系统框架四十八、多用块枚举,少用for循环四十九、对自定义其内存管理语义的collection使用无缝桥接五十、构建缓存时选用NSCache而非NSDictionary五十一、精简initialize与load的实现代码五十二、别忘了NSTimer会保留其目标对象前言本次博客撰写小蓝书的最后一章系统框架四十七、熟悉系统框架OC的Foundation框架,像NSObjectN
- 构建缓存时选用NSCache而非NSDictionary
雪丹妮_66865
NSCache胜过NSDictionary的之处在于:当系统资源将要耗尽时,它可以自动删减缓存。NSCache还会先行删减“最久未使用的”(leaserecentlyused)对象。NSCache并不会“拷贝”键,而是会“保留”它。NSCache对象不拷贝键的原因在于:很多时候,键都是有不支持拷贝操作的对象来充当的。因此,NSCache不会自动拷贝键,所以说,在健不支持拷贝操作的情况下,该类用起来
- iOS UITableViewCell 高度的缓存
LuKane
关于如何让tableViewCell的高度给缓存起来1.在网上看了很多人写的关于UITableViewCell高度的缓存,有的是用数组,NSCache,模型中回调Cell方法,来存储Cell的高度.可往往这么做牺牲的东西就太多了.2.网上大部分程序猿都希望的做法:模型中有一个cellHeight简简单单的记录住当前cell的高度.3.我也是这样的做法,将cell的高度放在当前数据的模型中,如果没有
- NSCache小记
继续向前冲
可怜的NSCache一直处于NSMutableDictionary的阴影之下。就好像没有人知道它提供了垃圾处理的功能,而开发者们却费劲力气地去自己实现它。没错,NSCache基本上就是一个会自动移除对象来释放内存的NSMutableDictionary。无需响应内存警告或者使用计时器来清除缓存。唯一的不同之处是键对象不会像NSMutableDictionary中那样被复制,这实际上是它的一个优点(
- 第50条:构建缓存时选用NSCache而非NSDictionary
MrSYLong
开发中,有时需要将因特网上下载的图片保存到字典中,这样的话稍后使用就无须再次下载了,其实用NSCache类更好,它是Foundation框架专门为处理这种任务而设计的。NSCache胜于NSDictionary之处在于:当系统资源将要耗尽时,它可以自动删除最久未使用的缓存。NSCache并不会拷贝键,而是保留它,在键不支持拷贝操作的情况下,使用更方便。可以通过调整缓存中的对象总数和所有对象的“总开
- DownloadingImages 下载缓存图片,显示图片文字列表
Hanyang Li
SwiftUIContinuedLearningiOSSwiftUI
1.用到的技术点:1)Codable:可编/解码JSON数据2)backgroundthreads:后台线程3)weakself:弱引用4)Combine:取消器/组合操作5)PublishersandSubscribers:发布者与订阅者6)FileManager:文件管理器7)NSCache:缓存2.网址:2.1测试接口网址:jsonplaceholderhttps://jsonplaceho
- iOS面试了20几家总结出来的面试题(下)
iOS开发之家
27.SDWebImage是怎么做缓存的?首先说,缓存采用了二级缓存策略。图片缓存的时候,在内存有缓存,在磁盘中也有缓存,其中内存缓存是用NSCache做的(下面会有NSCache的说明)。一、如何做缓存的步骤:0、下载图片1、将图片缓存在内存中2、判断图片的格式png或jpeg,将图片转成NSData数据3、获取图片的存储路径,其中图片的文件名是通过传入Key经过MD5加密后获得的4、将图片存在
- SDWebImage缓存使用心得
alien0312
最近项目一直在研究图片缓存和压缩,所以就找了SDWebImage第三方。在使用的过程中也大致了解了SDWebImage的缓存机制。SDWebImage的缓存放在了两个地方,分别是内存缓存和沙盒缓存。内存缓存放在了SDImageCache的NSCache*memCache中,在SDWebImage读取图片时也会第一时间在这个里面来寻找,这个是临时的,在内存警告或退到后台的时候会清理内存图片缓存,并且
- 多线程面试题2020-1
执笔时光er
1NSArray是线程安全的吗?NSMutableArray是线程安全的吗?NSDictionary呢?NSCache呢?NSArray是线程安全的,因为创建出来就不允许修改了NSMutableArray是线程不安全的,在读取的同时有可能其他线程正在执行修改操作NSDictionary自然也是线程不安全的,NSMutableArray可能出现的问题在这里同样存在。NSCache是线程安全的。NSC
- iOS缓存系列之内存缓存
二毛的希望
主要关注这三个框架的内存缓存。以及LRU算法的实现。一:TMMemoryCache1.1TMMemoryCache简介TMCache相比较于NSCache,新增了memoryCache的缓存大小,缓存时长的控制,进入后台和收到内存警告时的处理。TMCache的内存缓存实现是用三个字典来实现的。image.png第一个是存储缓存对象,第二个字典是用来存储缓存时效,第三个使用来存储缓存大小。TMCac
- iOS崩溃处理机制:Container类型crash防护
光之盐汽水
Container类型的crash指的是容器类的crash,常见的有NSArray/NSMutableArray/NSDictionary/NSMutableDictionary/NSCache的crash。一些常见的越界,插入nil,等错误操作均会导致此类crash发生。解决方案:对于容易造成crash的方法,自定义方法进行交换,并在自定义的方法中加入一些条件限制和判断。具体方式:1、NSArr
- NSCache-最佳的缓存方式
CB7D
原文链接NSCache基本上就是一个会自动移除对象来释放内存的NSMutableDictionary。无需响应内存警告或者使用计时器来清除缓存。唯一的不同之处是键对象不会像NSMutableDictionary中那样被复制,这实际上是它的一个优点(键不需要实现NSCopying协议)。先列一下使用NSCache的好处NSCache是一个类似NSDictionary一个可变的集合。提供了可设置缓存的
- WMMenuView(WMPageController)
一代骄马
1.WMPageController继承自UIViewController通过代理WMPageControllerDataSource设置数据源WMPageControllerCachePolicy的缓存策略对加载的页面进行缓存处理NSCache用于缓存加载过的VCWMPageControllerPreloadPolicy可以对ViewController进行预加载//过程为1.init方法初始化
- 源码阅读笔记NSCache
__huangkun__
这里是源码地址,该文章是基于commit43d94d7on25Jan的NSCache版本从源码看本质NSCache可以用内存缓存对象(比如常见的图片),相比于NSMutableDictionary,使用NSCache会有以下特点:线程安全KeyType不需要实现NSCopying支持限制缓存空间和数量,达到峰值自动清理NSCache的内部实现包含:NSMutableDictionary:保存数据和
- NSCache
DPL1024
创建NSCache对象NSCache*cache=[[NSCachealloc]init];保存数据[cachesetObject:objforKey:key];读取数据idobj=[self.cacheobjectForKey:key];删除数据[cacheremoveObjectForKey:key];删除所有数据[cacheremoveAllObjects];设置自动回收设置最大开销设置最大
- 缓存组件中的NSCache
校长很火
背景缓存是App中必不可少的机制之一,它能大幅提高程序数据的读取效率,尤其是针对一些需要较大开销的资源,缓存显得尤其重要。缓存分类不考虑网络缓存的话,一般的数据缓存环境主要有:内存、NSUserDefaults、磁盘。效率就效率而言将数据缓存到内存的效率应该是最高的,NSUserDefaults应该介于内存和磁盘之间(因为它也是持久化到默认的数据库的,不过Apple可能对其做了优化处理,这里没有通
- 面了20多家总结出来的部分iOS面试题(五)
JoeyM
27.SDWebImage是怎么做缓存的?首先说,缓存采用了二级缓存策略。图片缓存的时候,在内存有缓存,在磁盘中也有缓存,其中内存缓存是用NSCache做的(下面会有NSCache的说明)。一、如何做缓存的步骤:0、下载图片1、将图片缓存在内存中2、判断图片的格式png或jpeg,将图片转成NSData数据3、获取图片的存储路径,其中图片的文件名是通过传入Key经过MD5加密后获得的4、将图片存在
- (转)VM:CG raster data-关于SDWebImage中的decodedimagewithimage引发的内存大量消耗的解决办法
playboy
问题来源于SDWebImage这个库。使用这个库加载了网络图片之后,会将图片存到NSCache中去,然后再显示出来。但是在使用中,出现了一个最简单却又最粗暴的问题,内存的爆炸。在用它加载出图片了之后,内存会发生惊人的爆炸。通过Instrument的leaks可以看到在特定的某个图片的加载中内存爆炸了,这块空间的名字叫VM:CGrasterdata。百度了一下这个名字,只有一条记录,简直是逼我再也不
- 【iOS-系统框架】
神奇阿道和小司
iosobjective-cxcode分类
文章目录前言47.熟悉系统框架CoreFoundation框架其他框架要点48.多用块枚举,少用for循环for循环NSEnumerator遍历快速遍历基于块的遍历方式要点49.对自定义其内存管理语义的collection使用无缝桥接要点50.构建缓存时选用NSCache而非NSDictionaryNSCacheNSCache实例要点51.精简initialize与load的实现代码loadini
- iOS高性能缓存框架
梅庆
有关iOS缓存的框架挺多的,有系统自带的NSCache,或者一些三方的,比如YYCahce,以及SDWebImage里的SDImageCache。这些都是性能比较高的,代码质量也是比较高,所以今天就把它们拿出来做个比较。前面我对YYCache做了两篇分析笔记,在研读这篇文章之前大家先去阅读一下。YYCache内存缓存是用字典进行的数据存储,然后以双向链表关联起来一个逻辑结构。YYCache的磁盘缓
- iOS面试题:简单的描述一下 SDWebImage的缓存策略?
iOS猿_员
面试题:简单的描述一下SDWebImage的缓存策略?首先,SDWebImage的图片缓存采用的是Memory(内存)和Disk(硬盘)双重Cache机制,SDImageCache中有一个叫做memCache的属性,它是一个NSCache对象,用于实现我们对图片的MemoryCache,其实就是接受系统的内存警告通知,然后清除掉自身的图片缓存。DiskCache,也就是文件缓存,SDWebImag
- 《重读SDWebImage》-Cache部分
我是繁星
最近终于有些时间重读SD的源码了,本篇文章侧重分析SDWebImage缓存部分逻辑,以及其中的一些细节。一.SDImageCache提供的功能SDImageCache功能SDWebImage为整个图片加载逻辑提供缓存支持,包括内存缓存(NSCache实现)和磁盘缓存,且支持同步和异步操作。提供单例对象可进行全局操作。SDImageCache提供了两个枚举:三种缓存选项SDImageCacheTyp
- 聊聊NSCache
Harry_upup
特点1.使用方便,类似字典2.线程安全3.内存不足,自动释放存储对象(下面会介绍)4.NSCache的key不会被拷贝,不需要实现Copying协议(了解NSMapTable)属性和方法1)属性介绍name:名称delegete:设置代理totalCostLimit:缓存空间的最大总成本,超出上限会自动回收对象。默认值为0,表示没有限制countLimit:能够缓存的对象的最大数量。默认值为0,表
- NSCache & NSDictionary & NSURLCache
lllaa
NSCache和NSURLCache一点关系也没有NSCache和NSURLCache一点关系也没有NSURLCache为您的应用的URL请求提供了内存中以及磁盘上的综合缓存机制。作为基础类库URL加载系统的一部分,任何通过NSURLConnection加载的请求都将被NSURLCache处理。NSCache苹果提供的一套缓存机制主要作用于内存缓存的管理方面;在没有引入NSCache之前,我们要管
- AWCache设计思路
molangwu
前言最近阅读YYCache和SDImageCache源码,学到了挺多东西,为了验证学习结果,模仿写了AWCache。内存缓存实现方案SDImageCache:NSCache+weakCacheYYCache:双链表+NSDictionaryAWCache:NSCache+weakCache磁盘缓存实现方案SDImageCache:文件YYCache:SQLite+文件AWCache:文件AWMem
- SDWebImage之缓存策略
小篆风
目录取值-内存缓存取值-磁盘缓存存值-内存/磁盘缓存简介本章节只是对SDWebImage中内存策略一块的理解。取值-内存缓存1、判读类型不等与SDImageCacheTypeDisk,从内存中取值2、从self.memoryCache中取值,key是url3、self.memoryCache是SDMemoryCache类型,SDMemoryCache是NSCache类型1、从内存缓存中取值首先会判
- NSCache缓存机制
iOS_Coder_One
NSCache相关查了一些资料,没有找到核心思想的阐述,自己试验了下,验证了NSCache使用了LRU缓存算法策略。在这里不再说明NSCache一些调用API和代理回调相关基础知识,直接贴代码。NSCache*cache=[NSCachenew];cache.delegate=self;cache.countLimit=5;[cachesetObject:@"1"forKey:@"1"];[cac
- 网络优化
代码之路
网络深度优化的点-NSCache缓存、Last-Modified、ETag-失败重发、缓存请求有网发送-DNS解析-数据压缩:protobuf,WebP-弱网:2G、3G、4G、wifi下设置不同的超时时间-TCP对头阻塞:GOOGLE提出QUIC协议,相当于在UDP协议之上再定义一套可靠传输协议
- IOS源码解析:SDWeblmage (下)
时光啊混蛋_97boy
原创:知识点总结性文章创作不易,请珍惜,之后会持续更新,不断完善个人比较喜欢做笔记和写总结,毕竟好记性不如烂笔头哈哈,这些文章记录了我的IOS成长历程,希望能与大家一起进步温馨提示:由于不支持目录跳转,大家可通过command+F输入目录标题后迅速寻找到你所需要的内容续文见上篇:IOS源码解析:SDWeblmage(上)目录四、SDImageCache缓存1、NSCache与NSURLCache2
- 内存缓存那些事
Joolybgo
内存缓存缓存分为2类,内存缓存和磁盘缓存,今天说的是内存缓存。内存缓存实现很多种方式,最简单的是就是用NSMutableDictionary来实现,性能也是最好的,但是它不是线程安全的,而且也没有存到一定程度删除的机制。内存缓存实现的比较好的有苹果官方的NSCache,ibireme的YYMemoryCache,Pinterest的PINMemoryCache。他们都是线程安全的,也都提供了数量限
- 面向对象面向过程
3213213333332132
java
面向对象:把要完成的一件事,通过对象间的协作实现。
面向过程:把要完成的一件事,通过循序依次调用各个模块实现。
我把大象装进冰箱这件事为例,用面向对象和面向过程实现,都是用java代码完成。
1、面向对象
package bigDemo.ObjectOriented;
/**
* 大象类
*
* @Description
* @author FuJian
- Java Hotspot: Remove the Permanent Generation
bookjovi
HotSpot
openjdk上关于hotspot将移除永久带的描述非常详细,http://openjdk.java.net/jeps/122
JEP 122: Remove the Permanent Generation
Author Jon Masamitsu
Organization Oracle
Created 2010/8/15
Updated 2011/
- 正则表达式向前查找向后查找,环绕或零宽断言
dcj3sjt126com
正则表达式
向前查找和向后查找
1. 向前查找:根据要匹配的字符序列后面存在一个特定的字符序列(肯定式向前查找)或不存在一个特定的序列(否定式向前查找)来决定是否匹配。.NET将向前查找称之为零宽度向前查找断言。
对于向前查找,出现在指定项之后的字符序列不会被正则表达式引擎返回。
2. 向后查找:一个要匹配的字符序列前面有或者没有指定的
- BaseDao
171815164
seda
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
public class BaseDao {
public Conn
- Ant标签详解--Java命令
g21121
Java命令
这一篇主要介绍与java相关标签的使用 终于开始重头戏了,Java部分是我们关注的重点也是项目中用处最多的部分。
1
- [简单]代码片段_电梯数字排列
53873039oycg
代码
今天看电梯数字排列是9 18 26这样呈倒N排列的,写了个类似的打印例子,如下:
import java.util.Arrays;
public class 电梯数字排列_S3_Test {
public static void main(S
- Hessian原理
云端月影
hessian原理
Hessian 原理分析
一. 远程通讯协议的基本原理
网络通信需要做的就是将流从一台计算机传输到另外一台计算机,基于传输协议和网络 IO 来实现,其中传输协议比较出名的有 http 、 tcp 、 udp 等等, http 、 tcp 、 udp 都是在基于 Socket 概念上为某类应用场景而扩展出的传输协
- 区分Activity的四种加载模式----以及Intent的setFlags
aijuans
android
在多Activity开发中,有可能是自己应用之间的Activity跳转,或者夹带其他应用的可复用Activity。可能会希望跳转到原来某个Activity实例,而不是产生大量重复的Activity。
这需要为Activity配置特定的加载模式,而不是使用默认的加载模式。 加载模式分类及在哪里配置
Activity有四种加载模式:
standard
singleTop
- hibernate几个核心API及其查询分析
antonyup_2006
html.netHibernatexml配置管理
(一) org.hibernate.cfg.Configuration类
读取配置文件并创建唯一的SessionFactory对象.(一般,程序初始化hibernate时创建.)
Configuration co
- PL/SQL的流程控制
百合不是茶
oraclePL/SQL编程循环控制
PL/SQL也是一门高级语言,所以流程控制是必须要有的,oracle数据库的pl/sql比sqlserver数据库要难,很多pl/sql中有的sqlserver里面没有
流程控制;
分支语句 if 条件 then 结果 else 结果 end if ;
条件语句 case when 条件 then 结果;
循环语句 loop
- 强大的Mockito测试框架
bijian1013
mockito单元测试
一.自动生成Mock类 在需要Mock的属性上标记@Mock注解,然后@RunWith中配置Mockito的TestRunner或者在setUp()方法中显示调用MockitoAnnotations.initMocks(this);生成Mock类即可。二.自动注入Mock类到被测试类 &nbs
- 精通Oracle10编程SQL(11)开发子程序
bijian1013
oracle数据库plsql
/*
*开发子程序
*/
--子程序目是指被命名的PL/SQL块,这种块可以带有参数,可以在不同应用程序中多次调用
--PL/SQL有两种类型的子程序:过程和函数
--开发过程
--建立过程:不带任何参数
CREATE OR REPLACE PROCEDURE out_time
IS
BEGIN
DBMS_OUTPUT.put_line(systimestamp);
E
- 【EhCache一】EhCache版Hello World
bit1129
Hello world
本篇是EhCache系列的第一篇,总体介绍使用EhCache缓存进行CRUD的API的基本使用,更细节的内容包括EhCache源代码和设计、实现原理在接下来的文章中进行介绍
环境准备
1.新建Maven项目
2.添加EhCache的Maven依赖
<dependency>
<groupId>ne
- 学习EJB3基础知识笔记
白糖_
beanHibernatejbosswebserviceejb
最近项目进入系统测试阶段,全赖袁大虾领导有力,保持一周零bug记录,这也让自己腾出不少时间补充知识。花了两天时间把“传智播客EJB3.0”看完了,EJB基本的知识也有些了解,在这记录下EJB的部分知识,以供自己以后复习使用。
EJB是sun的服务器端组件模型,最大的用处是部署分布式应用程序。EJB (Enterprise JavaBean)是J2EE的一部分,定义了一个用于开发基
- angular.bootstrap
boyitech
AngularJSAngularJS APIangular中文api
angular.bootstrap
描述:
手动初始化angular。
这个函数会自动检测创建的module有没有被加载多次,如果有则会在浏览器的控制台打出警告日志,并且不会再次加载。这样可以避免在程序运行过程中许多奇怪的问题发生。
使用方法: angular .
- java-谷歌面试题-给定一个固定长度的数组,将递增整数序列写入这个数组。当写到数组尾部时,返回数组开始重新写,并覆盖先前写过的数
bylijinnan
java
public class SearchInShiftedArray {
/**
* 题目:给定一个固定长度的数组,将递增整数序列写入这个数组。当写到数组尾部时,返回数组开始重新写,并覆盖先前写过的数。
* 请在这个特殊数组中找出给定的整数。
* 解答:
* 其实就是“旋转数组”。旋转数组的最小元素见http://bylijinnan.iteye.com/bl
- 天使还是魔鬼?都是我们制造
ducklsl
生活教育情感
----------------------------剧透请原谅,有兴趣的朋友可以自己看看电影,互相讨论哦!!!
从厦门回来的动车上,无意中瞟到了书中推荐的几部关于儿童的电影。当然,这几部电影可能会另大家失望,并不是类似小鬼当家的电影,而是关于“坏小孩”的电影!
自己挑了两部先看了看,但是发现看完之后,心里久久不能平
- [机器智能与生物]研究生物智能的问题
comsci
生物
我想,人的神经网络和苍蝇的神经网络,并没有本质的区别...就是大规模拓扑系统和中小规模拓扑分析的区别....
但是,如果去研究活体人类的神经网络和脑系统,可能会受到一些法律和道德方面的限制,而且研究结果也不一定可靠,那么希望从事生物神经网络研究的朋友,不如把
- 获取Android Device的信息
dai_lm
android
String phoneInfo = "PRODUCT: " + android.os.Build.PRODUCT;
phoneInfo += ", CPU_ABI: " + android.os.Build.CPU_ABI;
phoneInfo += ", TAGS: " + android.os.Build.TAGS;
ph
- 最佳字符串匹配算法(Damerau-Levenshtein距离算法)的Java实现
datamachine
java算法字符串匹配
原文:http://www.javacodegeeks.com/2013/11/java-implementation-of-optimal-string-alignment.html------------------------------------------------------------------------------------------------------------
- 小学5年级英语单词背诵第一课
dcj3sjt126com
englishword
long 长的
show 给...看,出示
mouth 口,嘴
write 写
use 用,使用
take 拿,带来
hand 手
clever 聪明的
often 经常
wash 洗
slow 慢的
house 房子
water 水
clean 清洁的
supper 晚餐
out 在外
face 脸,
- macvim的使用实战
dcj3sjt126com
macvim
macvim用的是mac里面的vim, 只不过是一个GUI的APP, 相当于一个壳
1. 下载macvim
https://code.google.com/p/macvim/
2. 了解macvim
:h vim的使用帮助信息
:h macvim
- java二分法查找
蕃薯耀
java二分法查找二分法java二分法
java二分法查找
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
蕃薯耀 2015年6月23日 11:40:03 星期二
http:/
- Spring Cache注解+Memcached
hanqunfeng
springmemcached
Spring3.1 Cache注解
依赖jar包:
<!-- simple-spring-memcached -->
<dependency>
<groupId>com.google.code.simple-spring-memcached</groupId>
<artifactId>simple-s
- apache commons io包快速入门
jackyrong
apache commons
原文参考
http://www.javacodegeeks.com/2014/10/apache-commons-io-tutorial.html
Apache Commons IO 包绝对是好东西,地址在http://commons.apache.org/proper/commons-io/,下面用例子分别介绍:
1) 工具类
2
- 如何学习编程
lampcy
java编程C++c
首先,我想说一下学习思想.学编程其实跟网络游戏有着类似的效果.开始的时候,你会对那些代码,函数等产生很大的兴趣,尤其是刚接触编程的人,刚学习第一种语言的人.可是,当你一步步深入的时候,你会发现你没有了以前那种斗志.就好象你在玩韩国泡菜网游似的,玩到一定程度,每天就是练级练级,完全是一个想冲到高级别的意志力在支持着你.而学编程就更难了,学了两个月后,总是觉得你好象全都学会了,却又什么都做不了,又没有
- 架构师之spring-----spring3.0新特性的bean加载控制@DependsOn和@Lazy
nannan408
Spring3
1.前言。
如题。
2.描述。
@DependsOn用于强制初始化其他Bean。可以修饰Bean类或方法,使用该Annotation时可以指定一个字符串数组作为参数,每个数组元素对应于一个强制初始化的Bean。
@DependsOn({"steelAxe","abc"})
@Comp
- Spring4+quartz2的配置和代码方式调度
Everyday都不同
代码配置spring4quartz2.x定时任务
前言:这些天简直被quartz虐哭。。因为quartz 2.x版本相比quartz1.x版本的API改动太多,所以,只好自己去查阅底层API……
quartz定时任务必须搞清楚几个概念:
JobDetail——处理类
Trigger——触发器,指定触发时间,必须要有JobDetail属性,即触发对象
Scheduler——调度器,组织处理类和触发器,配置方式一般只需指定触发
- Hibernate入门
tntxia
Hibernate
前言
使用面向对象的语言和关系型的数据库,开发起来很繁琐,费时。由于现在流行的数据库都不面向对象。Hibernate 是一个Java的ORM(Object/Relational Mapping)解决方案。
Hibernte不仅关心把Java对象对应到数据库的表中,而且提供了请求和检索的方法。简化了手工进行JDBC操作的流程。
如
- Math类
xiaoxing598
Math
一、Java中的数字(Math)类是final类,不可继承。
1、常数 PI:double圆周率 E:double自然对数
2、截取(注意方法的返回类型) double ceil(double d) 返回不小于d的最小整数 double floor(double d) 返回不大于d的整最大数 int round(float f) 返回四舍五入后的整数 long round