- SpringBoot学习历程(六):集成Lombok
RabbitsInGrass
1.简介 ProjectLombokmakesjavaaspicierlanguagebyadding‘handlers’thatknowhowtobuildandcompilesimple,boilerplate-free,not-quite-javacode.即Lombok通过增加一些“处理程序”,可以让java变得简洁、快速。 Lombok能通过注解的方式,在编译时自动为属性生成构造器、
- java注释
尘心cx
java开发语言
注释1、单行注释2、多行注释3、文档注释(重点)/***@authorcx*@version1.0*/publicclassComment{//编写一个main方法publicstaticvoidmain(String[]args){System.out.println("hello,world~");}}1.在D盘找到javacode文件,在搜索栏输入cmd,进入控制台。2.在控制台下,输入"j
- Java之解压Tar.gz和Gz文件到指定的目录下
码农秃头老李
工作实战内容java
工作中的需求:需要读取指定路径下的压缩文件,然后解压到指定的目录下引入maven依赖org.apache.antant1.10.5packagecom.example.javacode;importorg.apache.tools.tar.TarInputStream;importjava.io.*;importjava.util.zip.GZIPInputStream;/***@program:
- Python遍历某一文件夹下的所有txt文件,并将这些txt文件的内容写到一个新的txt文件中
abtgu
Pythonpython开发语言
写在前面:最近在某视频网站学习java,视频中老师将所有知识点写在了当天代码文件夹下的txt文件中,我每天早晨复习的时候,要打开n多个目录才能找到要复习的全部内容,不胜其烦,因此写下此代码,将整个项目中所有的知识点txt文件内容统一写到一个新的txt文件中。使用场景如图所示,只有以_teacher为结尾的文件夹下的txt文件记录有内容。|–JavaCode|-----Chaper01|------
- Windows 11上边两个空格导致我多熬了1个多小时
zhaoseaside
Javajava
将图中的文件路径复制,然后到文件管理器里边去搜索。发现找不到,可是明明就在这里啊。我百思不得其解,还以为是IDEA出了问题,我只能是重新启动项目,结果还是告诉我找不到文件。要是同一个目录下已经有一个名为a.txt的文件,那么在这个目录下再建一个文件a.txt会报错。但我在D:\Code\JavaCode\TomcatDemo\webroot下边重新建一个hello.txt(没有空格)文件,结果还能
- 【JVM】 Chapter 2 - Just In Time Compilation and the Code Cache
天涯古巷
JVMjvm
1.Theconceptof“JustInTimeCompilation”像C语言这种编译出来的机器码可以直接被操作系统理解,因此运行速度很快。Java为了跨平台,引入JVM,而JVM其实和很多Interpreter一样。我们将JavaCode编译成JavaByteCode,然后JVM负责解释JavaByteCode。这样解释的速度肯定没有直接执行机器码的速度快,因此JVM搞了一个JIT1.1Pu
- 经典面试题 之 JDK动态代理和CGLIB动态代理
好好学习,天天上当!
java开发语言proxy模式springspringboot
为什么要用代理我们先来看一个案例。有一个接口IService,如下:package com.javacode2018.lesson001.demo15;public interface IService { void m1(); void m2(); void m3();}接口有2个实现类ServiceA和ServiceB,如下:package com.javacode2018.
- 使用lombok提高编码效率
xxxcyzyy
CoreJava
https://blog.csdn.net/v2sking/article/details/73431364Lombok简介ProjectLombokmakesjavaaspicierlanguagebyadding‘handlers’thatknow>howtobuildandcompilesimple,boilerplate-free,not-quite-javacode.github上官方是
- 【LeetCode】循环队列
此号不用,请关注 夜雨柠檬
LeetCodeLeetCode队列Java
Javacode通过神器通过神器通过神器通过神器通过神器通过神器classMyCircularQueue{privateintfront;privateintrear;privateintmaxSize;privateintsize;privateint[]arr;publicMyCircularQueue(intk){front=0;rear=0;size=0;maxSize=k;arr=new
- Mybatis系列第9篇:延迟加载、鉴别器、继承怎么玩?
Tian_Peng
文章转载自:http://www.itsoku.com/article/254Mybatis系列目标:从入门开始开始掌握一个高级开发所需要的Mybatis技能。这是mybatis系列第9篇,源码位于文章尾部!建库建表创建一个db:javacode20184张表:t_user(用户表)t_goods(商品表)t_order(订单表)t_order_detail(订单明细表)表之间的关系:t_orde
- 【Java】图书管理系统
学习不积极
java开发语言
目录搭建框架建包包中的类大致思路整体融合完整代码码云链接:20220518/src·地瓜/JavaCode-码云-开源中国(gitee.com)搭建框架建包主函数一个包;图书一个包;我们对图书的各种操作,例如查找图书,借阅图书,添加图书等,放在一个包里;使用者一个包;包中的类主函数自然不用多说;图书包:图书包里我们需要创建哪些类呢?我们试想一下,图书要有属性:书名,作者,书的类型,价格,可否借阅,
- 原生的方式接入redis哨兵集群
十七家的猫
导入依赖redis.clientsjedis2.8.0org.springframework.dataspring-data-redis1.6.4.RELEASEorg.apache.commonscommons-pool22.4.2Javacode//连接池配置JedisPoolConfigjedisPoolConfig=newJedisPoolConfig();jedisPoolConfig.
- Java-HelloWorld编写与执行(记事本)错误: 编码GBK的不可映射字符
Siobhan. 明鑫
JAVA环境搭建开发java开发语言
上一篇文章中我们已安装jdk,配置好Java环境变量。这一节使用记事本编写Java代码做一个简单测试。目录Java程序开发三步骤:1、新建JavaCode文件夹2、新建Java文件3、编写代码4、cmd编译、运行Java文件5、总结1、Java程序编写和执行的过程:2、针对于步骤1的编写进行说明。3、针对于步骤2的编译进行说明。4、针对于步骤3运行进行说明。5、一个源文件中可以声明多个类,但是最多
- 【java web】JSP-Java Server Page
岩塘
java开发语言
前言这个框架我用得不多,感觉和python的django一样,前后端结合太紧密了,适合个人开发get明文请求,可以被直接收藏post密文请求JSPJavaServerPage(JSP)=HTML+Javacode步骤:1.安装驱动2.连接数据库3.利用conn建立Statement4.利用Statement发送Sql语句5.遍历resultSet,获取结果6.关闭连接Scopepagescope只
- 解决npm install报错: No module named gyp
kingtopest
nodenpmsass
今天运行一个以前vue项目,启动时报错如下:ERRORFailedtocompilewith1error上午10:19:33errorin./src/App.vue?vue&type=style&index=0&lang=scss&SyntaxError:Error:MissingbindingD:\javacode\Springboot-MiMall-RSA\VueFront\node_modu
- 121. Best Time to Buy and Sell Stock
春草恨离
题目链接:https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/此题比较简单,对第i天max_profit[i]=max(max_profit[i-1],price[i]-min(price[:i]))等号右边第一项是第i-1天的最大利润,第二项是如果卖出第i的股票可能产生的最大利润。完整javacode
- 你真的了解这一段Java程序的生命史吗?
Java丶python攻城狮
作为一名程序猿,我们每天都在写Code,但你真的了解它的生命周期么?今天就来简单聊下它的生命历程,说起一段JavaCode,从出生到gameover大体分这么几步:编译、类加载、运行、GC。编译Java语言的编译期其实是一段“不确定”的过程,因为可能是一个前端编译器把.java文件转变为.class文件的过程;也可能是指JVM的后端运行期编译器(JIT编译器)把字节码转变为机器码的过程;还可能是指
- Maven - 7、聚合、继承、单继承问题详解
Q.E.D.
Mavenmavenjavaintellij-idea
1、聚合1.1、原始需求我们需要使用java做一个电商网站,涉及到:pc端网站、h5微站、移动端接口部分,那么我们可以使用maven创建3个项目用于这3块业务的开发,3个项目名称如下:javacode2018-pcjavacode2018-h5javacode2018-api这3个项目的groupId都是com.javacode2018,artifactId取上面的,我们使用maven来搭建项目结
- 博客导航——一站式搜索
yearHeaven
Android-FLAndroid博客导航
原文:点击打开链接JavaCode123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
- Java中System.loadLibrary() 的执行过程
autumn_xl
android开发android动态连接库
System.loadLibrary()是我们在使用Java的JNI机制时,会用到的一个非常重要的函数,它的作用即是把实现了我们在Javacode中声明的native方法的那个libraryload进来,或者load其他什么动态连接库。算是处于好奇吧,我们可以看一下这个方法它的实现,即执行流程。(下面分析的那些code,来自于android4.2.2aosp版。)先看一下这个方法的code(在li
- Apache jakarta 各项目主要用途及简单说明
lihua2915
其他Apache项目管理MVCJSPWebwork
[size=medium]为了让大家进入jakarta的世界没有语言界限特别写出来各项目的主要用途及简单说明jakarta的项目主要有下面几项(1)共享函式库,工具集及通用API◎BCEL-这是用来分析你的javacode变成class的情形,可以透过此共享函式库来了解JVM运作模式◎BSF-这是一组提供java应用程序(application)去使用Scriptinglanguage的工具◎Co
- 在Idea中用maven方式创建servlet
滨海之君
1.创建一个project2.填写GroupId和Artifactid一路下一步,直至finish;建好后的工程结构如下:3.创建项目的跟目录在main上面右键>new>Directory文件名随意,建成后:此时javacode文件夹为普通文件夹,需要将其变成根目录:此时,就可以在javacode跟目录下建包,写servlet类了,但是由于刚才没有导入servlet依赖,还需要在pom.xml文件
- Mybatis系列第6篇:恕我直言,mybatis增删改你未必玩得转!
Tian_Peng
文章转载自:http://www.itsoku.com/article/250Mybatis系列目标:从入门开始开始掌握一个高级开发所需要的Mybatis技能。这是mybatis系列第6篇。主要内容建库建表mybatis增删改返回值说明及源码解析jdbc获取自增值的3种方式详解mybatis获取自增值的3种方式详解建库建表/*创建数据库javacode2018*/DROPDATABASEIFEXI
- Gradle实战:发布aar包到maven仓库
wy_888
Gradle实战:发布aar包到maven仓库aar简介aar文件是Google为Android开发所设计的一种library格式,全名为AndroidArchiveLibrary,与JavaJarLibrary不同的是,aar除了javacode之外还包含资源文件,即xml文件、图片、文字等。文中的maven仓库是指公司搭建的maven仓库,如果要发布到jCenter或mavencentral,
- java求三角形周长 面积_用java如何求三角形的周长和面积?
仙女山的仙女鹿
java求三角形周长面积
Javacode/**Triangle.java*@authorWenzeeYann,
[email protected]*@version0.1000*@since2009.05.04*/publicclassTriangle{//正三角形publicTriangle(doubleside){this.side1=side;this.side2=side;this.side3=side;this.a
- JVM - 本地方法接口和本地方法栈
目目沐沐
JavaJVMjavajava-eespringboot
#JVM本地方法接口和本地方法栈JDK版本:1.8#1、本地方法使用Java代码调用非Java代码的接口称作为NativeMethod。该方法的实现由非Java语言实现,比如C或者C++。这是JavaDoc中给出的解释:AnativemethodisaJavamethodwhoseimplementationisprovidedbynon-javacode.在定义一个NativeMethod时,并
- 本地方法接口
Mr.huang
JVMjvmjavac++
本地方法接口什么是本地方法?JDK文档中有一段这样的描述:"AnativemethodisaJavamethodwhoseimplementationisprovidedbynon-javacode."简单地讲,一个NativeMethod就是一个Java调用非Java代码的接口。一个NativeMethod是这样一个Java方法:该方法的实现由非Java语言实现,比如C。这个特征并非Java所特
- Linux 部署jar
過眼云烟
查找出java的进程ps-ef|grepjava推出进程2.kill-94394启动进程3.nohupjava-jarjar包名&//输入对应的jar包名回车就可启动jar包tail-fnohup.out//可查看当前jar包的日志输出Ctrl+C//可退出日志前端:1.进入代码文件夹。如:E:\javaCode\eomsFront2.进入cmd页面3.运行npmrunbuild:prod命令4.
- getRequestDispatcher()与sendRedirect()的区别
wonderfulpersuit
JavawebJavawebServlet重定向
1.RequestDispatcher是一个Web资源的包装器,可以用来把当前request传递到该资源,或者把新的资源包括到当前响应中。RequestDispatcher接口中定义了两个方法:include/forwarda.由于只能指定固定的jsp文件名,不能动态指定jsp文件名。我们需要把翻译为Javacode–RequestDispatcher.include();用法:2.服务器端的重定
- Java转Konlit时碰到的坑
HEXG_
在把java文件转换成konlit文件时碰到的坑,记录一下。Javacode:MethodforName=Class.class.getDeclaredMethod("forName",String.class);MethodgetDeclaredMethod=Class.class.getDeclaredMethod("getDeclaredMethod",String.class,Class[
- LeetCode[Math] - #66 Plus One
Cwind
javaLeetCode题解AlgorithmMath
原题链接:#66 Plus One
要求:
给定一个用数字数组表示的非负整数,如num1 = {1, 2, 3, 9}, num2 = {9, 9}等,给这个数加上1。
注意:
1. 数字的较高位存在数组的头上,即num1表示数字1239
2. 每一位(数组中的每个元素)的取值范围为0~9
难度:简单
分析:
题目比较简单,只须从数组
- JQuery中$.ajax()方法参数详解
AILIKES
JavaScriptjsonpjqueryAjaxjson
url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址。
type: 要求为String类型的参数,请求方式(post或get)默认为get。注意其他http请求方法,例如put和 delete也可以使用,但仅部分浏览器支持。
timeout: 要求为Number类型的参数,设置请求超时时间(毫秒)。此设置将覆盖$.ajaxSetup()方法的全局
- JConsole & JVisualVM远程监视Webphere服务器JVM
Kai_Ge
JVisualVMJConsoleWebphere
JConsole是JDK里自带的一个工具,可以监测Java程序运行时所有对象的申请、释放等动作,将内存管理的所有信息进行统计、分析、可视化。我们可以根据这些信息判断程序是否有内存泄漏问题。
使用JConsole工具来分析WAS的JVM问题,需要进行相关的配置。
首先我们看WAS服务器端的配置.
1、登录was控制台https://10.4.119.18
- 自定义annotation
120153216
annotation
Java annotation 自定义注释@interface的用法 一、什么是注释
说起注释,得先提一提什么是元数据(metadata)。所谓元数据就是数据的数据。也就是说,元数据是描述数据的。就象数据表中的字段一样,每个字段描述了这个字段下的数据的含义。而J2SE5.0中提供的注释就是java源代码的元数据,也就是说注释是描述java源
- CentOS 5/6.X 使用 EPEL YUM源
2002wmj
centos
CentOS 6.X 安装使用EPEL YUM源1. 查看操作系统版本[root@node1 ~]# uname -a Linux node1.test.com 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux [root@node1 ~]#
- 在SQLSERVER中查找缺失和无用的索引SQL
357029540
SQL Server
--缺失的索引
SELECT avg_total_user_cost * avg_user_impact * ( user_scans + user_seeks ) AS PossibleImprovement ,
last_user_seek ,
 
- Spring3 MVC 笔记(二) —json+rest优化
7454103
Spring3 MVC
接上次的 spring mvc 注解的一些详细信息!
其实也是一些个人的学习笔记 呵呵!
- 替换“\”的时候报错Unexpected internal error near index 1 \ ^
adminjun
java“\替换”
发现还是有些东西没有刻子脑子里,,过段时间就没什么概念了,所以贴出来...以免再忘...
在拆分字符串时遇到通过 \ 来拆分,可是用所以想通过转义 \\ 来拆分的时候会报异常
public class Main {
/*
- POJ 1035 Spell checker(哈希表)
aijuans
暴力求解--哈希表
/*
题意:输入字典,然后输入单词,判断字典中是否出现过该单词,或者是否进行删除、添加、替换操作,如果是,则输出对应的字典中的单词
要求按照输入时候的排名输出
题解:建立两个哈希表。一个存储字典和输入字典中单词的排名,一个进行最后输出的判重
*/
#include <iostream>
//#define
using namespace std;
const int HASH =
- 通过原型实现javascript Array的去重、最大值和最小值
ayaoxinchao
JavaScriptarrayprototype
用原型函数(prototype)可以定义一些很方便的自定义函数,实现各种自定义功能。本次主要是实现了Array的去重、获取最大值和最小值。
实现代码如下:
<script type="text/javascript">
Array.prototype.unique = function() {
var a = {};
var le
- UIWebView实现https双向认证请求
bewithme
UIWebViewhttpsObjective-C
什么是HTTPS双向认证我已在先前的博文 ASIHTTPRequest实现https双向认证请求
中有讲述,不理解的读者可以先复习一下。本文是用UIWebView来实现对需要客户端证书验证的服务请求,网上有些文章中有涉及到此内容,但都只言片语,没有讲完全,更没有完整的代码,让人困扰不已。但是此知
- NoSQL数据库之Redis数据库管理(Redis高级应用之事务处理、持久化操作、pub_sub、虚拟内存)
bijian1013
redis数据库NoSQL
3.事务处理
Redis对事务的支持目前不比较简单。Redis只能保证一个client发起的事务中的命令可以连续的执行,而中间不会插入其他client的命令。当一个client在一个连接中发出multi命令时,这个连接会进入一个事务上下文,该连接后续的命令不会立即执行,而是先放到一个队列中,当执行exec命令时,redis会顺序的执行队列中
- 各数据库分页sql备忘
bingyingao
oraclesql分页
ORACLE
下面这个效率很低
SELECT * FROM ( SELECT A.*, ROWNUM RN FROM (SELECT * FROM IPAY_RCD_FS_RETURN order by id desc) A ) WHERE RN <20;
下面这个效率很高
SELECT A.*, ROWNUM RN FROM (SELECT * FROM IPAY_RCD_
- 【Scala七】Scala核心一:函数
bit1129
scala
1. 如果函数体只有一行代码,则可以不用写{},比如
def print(x: Int) = println(x)
一行上的多条语句用分号隔开,则只有第一句属于方法体,例如
def printWithValue(x: Int) : String= println(x); "ABC"
上面的代码报错,因为,printWithValue的方法
- 了解GHC的factorial编译过程
bookjovi
haskell
GHC相对其他主流语言的编译器或解释器还是比较复杂的,一部分原因是haskell本身的设计就不易于实现compiler,如lazy特性,static typed,类型推导等。
关于GHC的内部实现有篇文章说的挺好,这里,文中在RTS一节中详细说了haskell的concurrent实现,里面提到了green thread,如果熟悉Go语言的话就会发现,ghc的concurrent实现和Go有点类
- Java-Collections Framework学习与总结-LinkedHashMap
BrokenDreams
LinkedHashMap
前面总结了java.util.HashMap,了解了其内部由散列表实现,每个桶内是一个单向链表。那有没有双向链表的实现呢?双向链表的实现会具备什么特性呢?来看一下HashMap的一个子类——java.util.LinkedHashMap。
- 读《研磨设计模式》-代码笔记-抽象工厂模式-Abstract Factory
bylijinnan
abstract
声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/
package design.pattern;
/*
* Abstract Factory Pattern
* 抽象工厂模式的目的是:
* 通过在抽象工厂里面定义一组产品接口,方便地切换“产品簇”
* 这些接口是相关或者相依赖的
- 压暗面部高光
cherishLC
PS
方法一、压暗高光&重新着色
当皮肤很油又使用闪光灯时,很容易在面部形成高光区域。
下面讲一下我今天处理高光区域的心得:
皮肤可以分为纹理和色彩两个属性。其中纹理主要由亮度通道(Lab模式的L通道)决定,色彩则由a、b通道确定。
处理思路为在保持高光区域纹理的情况下,对高光区域着色。具体步骤为:降低高光区域的整体的亮度,再进行着色。
如果想简化步骤,可以只进行着色(参看下面的步骤1
- Java VisualVM监控远程JVM
crabdave
visualvm
Java VisualVM监控远程JVM
JDK1.6开始自带的VisualVM就是不错的监控工具.
这个工具就在JAVA_HOME\bin\目录下的jvisualvm.exe, 双击这个文件就能看到界面
通过JMX连接远程机器, 需要经过下面的配置:
1. 修改远程机器JDK配置文件 (我这里远程机器是linux).
 
- Saiku去掉登录模块
daizj
saiku登录olapBI
1、修改applicationContext-saiku-webapp.xml
<security:intercept-url pattern="/rest/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<security:intercept-url pattern=&qu
- 浅析 Flex中的Focus
dsjt
htmlFlexFlash
关键字:focus、 setFocus、 IFocusManager、KeyboardEvent
焦点、设置焦点、获得焦点、键盘事件
一、无焦点的困扰——组件监听不到键盘事件
原因:只有获得焦点的组件(确切说是InteractiveObject)才能监听到键盘事件的目标阶段;键盘事件(flash.events.KeyboardEvent)参与冒泡阶段,所以焦点组件的父项(以及它爸
- Yii全局函数使用
dcj3sjt126com
yii
由于YII致力于完美的整合第三方库,它并没有定义任何全局函数。yii中的每一个应用都需要全类别和对象范围。例如,Yii::app()->user;Yii::app()->params['name'];等等。我们可以自行设定全局函数,使得代码看起来更加简洁易用。(原文地址)
我们可以保存在globals.php在protected目录下。然后,在入口脚本index.php的,我们包括在
- 设计模式之单例模式二(解决无序写入的问题)
come_for_dream
单例模式volatile乱序执行双重检验锁
在上篇文章中我们使用了双重检验锁的方式避免懒汉式单例模式下由于多线程造成的实例被多次创建的问题,但是因为由于JVM为了使得处理器内部的运算单元能充分利用,处理器可能会对输入代码进行乱序执行(Out Of Order Execute)优化,处理器会在计算之后将乱序执行的结果进行重组,保证该
- 程序员从初级到高级的蜕变
gcq511120594
框架工作PHPandroidhtml5
软件开发是一个奇怪的行业,市场远远供不应求。这是一个已经存在多年的问题,而且随着时间的流逝,愈演愈烈。
我们严重缺乏能够满足需求的人才。这个行业相当年轻。大多数软件项目是失败的。几乎所有的项目都会超出预算。我们解决问题的最佳指导方针可以归结为——“用一些通用方法去解决问题,当然这些方法常常不管用,于是,唯一能做的就是不断地尝试,逐个看看是否奏效”。
现在我们把淫浸代码时间超过3年的开发人员称为
- Reverse Linked List
hcx2013
list
Reverse a singly linked list.
/**
* Definition for singly-linked list.
* public class ListNode {
* int val;
* ListNode next;
* ListNode(int x) { val = x; }
* }
*/
p
- Spring4.1新特性——数据库集成测试
jinnianshilongnian
spring 4.1
目录
Spring4.1新特性——综述
Spring4.1新特性——Spring核心部分及其他
Spring4.1新特性——Spring缓存框架增强
Spring4.1新特性——异步调用和事件机制的异常处理
Spring4.1新特性——数据库集成测试脚本初始化
Spring4.1新特性——Spring MVC增强
Spring4.1新特性——页面自动化测试框架Spring MVC T
- C# Ajax上传图片同时生成微缩图(附Demo)
liyonghui160com
1.Ajax无刷新上传图片,详情请阅我的这篇文章。(jquery + c# ashx)
2.C#位图处理 System.Drawing。
3.最新demo支持IE7,IE8,Fir
- Java list三种遍历方法性能比较
pda158
java
从c/c++语言转向java开发,学习java语言list遍历的三种方法,顺便测试各种遍历方法的性能,测试方法为在ArrayList中插入1千万条记录,然后遍历ArrayList,发现了一个奇怪的现象,测试代码例如以下:
package com.hisense.tiger.list;
import java.util.ArrayList;
import java.util.Iterator;
- 300个涵盖IT各方面的免费资源(上)——商业与市场篇
shoothao
seo商业与市场IT资源免费资源
A.网站模板+logo+服务器主机+发票生成
HTML5 UP:响应式的HTML5和CSS3网站模板。
Bootswatch:免费的Bootstrap主题。
Templated:收集了845个免费的CSS和HTML5网站模板。
Wordpress.org|Wordpress.com:可免费创建你的新网站。
Strikingly:关注领域中免费无限的移动优
- localStorage、sessionStorage
uule
localStorage
W3School 例子
HTML5 提供了两种在客户端存储数据的新方法:
localStorage - 没有时间限制的数据存储
sessionStorage - 针对一个 session 的数据存储
之前,这些都是由 cookie 完成的。但是 cookie 不适合大量数据的存储,因为它们由每个对服务器的请求来传递,这使得 cookie 速度很慢而且效率也不