统计String中每个单词出现的个数(不区分大小写)输入描述:输入一个字符串,例如:“abAv”输出描述:v:1:3b:1a:2defcountEach(strs):dic={}strs=strs.lower()lens=len(strs)i=0whilei
Codeforces Round #956 (Div. 2) C. Have Your Cake and Eat It Too
abTao_lx
c语言算法开发语言
CodeforcesRound#956(Div.2)C.HaveYourCakeandEatItToo题目大意:有长度为nnn的数组a,b,ca,b,ca,b,c,三个数组的和相同,把nnn分为三段非空连续段[la,ra],[lb,rb],[lc,rc][l_a,r_a],[l_b,r_b],[l_c,r_c][la,ra],[lb,rb],[lc,rc],互不重合。保证∑i=laraai,∑i=
Codeforces Round #787 (Div. 3)个人题解
旋转卡题
算法贪心算法图论动态规划
CodeforcesRound#787(Div.3)个人题解文章目录CodeforcesRound#787(Div.3)个人题解A.FoodforAnimals题目大意思路参考代码B.MakeItIncreasing题目大意思路参考代码C.DetectiveTask题目大意思路参考代码D.VerticalPaths题目大意思路参考代码E.ReplaceWiththePrevious,Minimiz
Codeforces Round 966 (Div. 3) ABCDEF
菜比乌斯反演
Codeforces算法c++数据结构
A题:PrimaryTask题意Dmitry写了t个整数,但是在写幂的时候写错了,将^符号给省略掉了。问哪几个是写幂时写错的思路写错的数符合10X,其中X(X>=2)是不含前导零的正整数,我们依此进行判断即可。代码inlinevoidsolve(){strings;cin>>s;intn=s.size();if(n='2'||n>3&&s[2]!='0')cout>n;vectorvis(n+2)
python解最小二乘(least square)
HackerTom
机器学习数学scipynumpy最小二乘leastsquarepython
给定A∈Rd×nA\in\R^{d\timesn}A∈Rd×n、b∈Rdb\in\R^db∈Rd,求x=argminx∥Ax−b∥2x=\arg\min_x\parallelAx-b\parallel^2x=argminx∥Ax−b∥2。numpy和scipy都有相应的包,见[1,2]。需要注意的是,传入的A、b是按列向量排,即A是[d,n]形状的,bbb只有一个就是[d],多个就是[d,m]
【设计模式】结构型模式:桥接模式
KunQAQrz
意图将一个大类或一系列紧密相关的类拆分为抽象和实现两个独立的层次结构,从而能在开发时分别使用。问题有一个几何形状Shape类,从它能扩展出两个子类:圆形Circle和方形Square。希望对这样的类层次结构进行扩展以使其包含颜色,所以你打算创建名为红色Red和蓝色Blue的形状子类。但是由于你已有两个子类,所以总共需要创建四个类才能覆盖所有组合,例如蓝色圆形BlueCircle和红色方形RedSq
程序员进阶之算法练习(四十)Codeforces
落影loyinglin
正文题目1题目链接题目大意:在一维坐标轴上有三个点,坐标是a、b、c;现在需要移动这三个点的位置,使得三个点之间两两间隔大于d;每次只能移动一个点,每秒只能移动距离1;问最少需要多少秒,才能满足要求。输入:一行,四个数字,,,(1≤,,,≤10^9)输出:最少的秒数。Examplesinput5263output2题目解析:a、b、c之间没有关系,可以先排序,使得a=d的时候,ans=max(0,
Codeforces Round 938 (Div. 3)
沫刃起
codeforces算法c++数据结构
A.YogurtSale#include#defineendl'\n'#defineintlonglongusingnamespacestd;intn,a,b;voidsolve(){cin>>n>>a>>b;if(2*a>t;while(t--){solve();}return0;}B.ProgressiveSquare#include#defineendl'\n'#defineintlongl
2023ICPC济南站训练补题
farawaytravelerchy
ACM-ICPC训练补题算法python
title:2023ICPC济南站VP补题记录(第48届)date:2024-01-1812:16:23mathjax:truetags:XCPCcategories:Algorithm文章目录2023ICPC济南站训练补题注:暂时更新vp时ac的4道题,其余题目之后持续更新[Problem-D-LargestDigit](https://codeforces.com/gym/104901/pro
cf973Div3E
Colinnian
codeforces
https://codeforces.com/contest/2008/problem/Eusingll=longlong;voidsolve(){intn;std::cin>>n;std::strings;std::cin>>s;intans=n;//_____________________________//_____________________________//首先将奇数位置和偶数位
JOULWATT/杰华特代理 JW5250S SOT23-5 1A、6V、1.5MHz、40uA IQ 同步降压转换器
宏源世纪-niki
其他
JW5250S是一款基于恒定导通时间(COT)控制的单片降压开关稳压器,用于快速瞬态响应。JW5250S的输入范围为2.7V-6.0V,通过集成P沟道和N沟道MOSFET提供1A的连续输出电流。内部同步电源开关提供了高效率。在轻负载下,调节器在低频率下运行,以保持高效率和低输出纹波。JW5250S通过打嗝输出短路保护、FB短路保护、启动电流流失保护、输入欠压锁定和热插拔以及热保护来保证坚固性。JW
Codeforces Round 969 (Div. 2 ABCDE题) 视频讲解
阿史大杯茶
Codeforces算法c++数据结构
A.Dora’sSetProblemStatementDorahasasetssscontainingintegers.Inthebeginning,shewillputallintegersin[l,r][l,r][l,r]intothesetsss.Thatis,anintegerxxxisinitiallycontainedinthesetifandonlyifl≤x≤rl\leqx\leq
MATLAB生成mif文件
梦梦梦梦子~
matlab人工智能算法
MATLAB代码%参数设置N=4096;%数据点数量t=linspace(0,2*pi,N);%时间向量width=12;%位宽%正弦波sine_wave=2.5*sin(t)+2.5;%幅度在0到5之间%三角波tri_wave=5-abs(mod(t/(2*pi)*4,2)-1);%方波square_wave=2.5*(square(t)+1);%将范围调整为0到5之间%将波形数据保存为MIF文
MATLAB生成COE文件
梦梦梦梦子~
matlab人工智能算法
MATLAB代码%参数设置N=4096;%数据点数量t=linspace(0,2*pi,N);%时间向量width=12;%位宽%正弦波,幅度在0到5之间sine_wave=2.5*sin(t)+2.5;%三角波,幅度在0到5之间tri_wave=5*(1-abs(mod(t/(2*pi)*4,2)-1));%方波,幅度在0到5之间square_wave=2.5*(square(t)+1);%将范
CF C. Candy Store
Jiu-yuan
算法
原题链接:Problem-C-Codeforces题意:多测,先给出n代表n种糖果,每种糖果分别给出数量和单价,可以将糖果平均分成若干袋,每一袋的的价格是一袋糖果数量×单价,对于每一种糖果都求出一袋的价格,对于每种糖果都需要用标签贴出一袋的价格,但是如果相邻的糖果价格相同,那么就可以用一个标签来代表价格,问最少使用几个标签。思路:如果一段糖果价格是一样的,那么设置价格为cost。因为每一袋糖果的价
Codeforces Round 969 (Div. 2):A - Dora‘s Set题解C++,给自己陷入死胡同了,果然真理总是简洁朴素优美
醒了不起的盖茨比Z
c++算法leetcode动态规划c语言图论笔记
先说答案,有需要的大家看看:#includeusingnamespacestd;#defineendl'\n'intmain(){ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);intt,l,r;cin>>t;while(t--){cin>>l>>r;intab=r-l+1;//这一行数字的长度if((ab%4==3)&&r%2!=0)//奇数结尾会有
【Android】最好用的网络库:Retrofit
愿相知
网络retrofit
最好用的网络库:Retrofit文章目录最好用的网络库:RetrofitRetrofit的基本用法Retrofit的使用逻辑Retrofit的基本操作处理复杂的接口地址类型进阶删除提交header中指定参数Retrofit构建器的最佳写法Retrofit的使用封装Retrofit的基本用法Retrofit是一款由Square公司开发的网络库,但是它和OkHttp的定位完全不同。OkHttp侧重的是
【设计模式之工厂方法模式——积木工厂】
ao-it
设计模式设计模式工厂方法模式java
题目描述小明家有两个工厂,一个用于生产圆形积木,一个用于生产方形积木,请你帮他设计一个积木工厂系统,记录积木生产的信息。输入描述输入的第一行是一个整数N(1≤N≤100),表示生产的次数。接下来的N行,每行输入一个字符串和一个整数,字符串表示积木的类型。积木类型分为“Circle”和“Square”两种。整数表示该积木生产的数量输出描述对于每个积木,输出一行字符串表示该积木的信息。输入示例3Cir
关于求数组中两部分是否相等问题可以考虑前缀和的思路
shadowcase
算法c++
当之后你不记得标题由何而来时,请回顾codeforcesround918(div4)的E题/*这道题的核心就是题干中等式的转化,然后利用前缀和。还要注意flag[0]=1不能漏,不然就都是yes了*/#includeusingnamespacestd;#definelllonglongconstintmaxn=2e5;constintmod=1e6+7;intmain(){ios::sync_wi
ZCC1130T双节锂电池充电控制芯片
ZCWC123
社交电子
1.特点:.涓流/恒流/恒压三段式充电,内设充电电流可达1A;.支持对OV电池充电;短路保护功能;.电池正负极反接保护智能温控技术,充电电流会随温度升高而降低,在不会出现过热保护的前提下输出最大充电电流;异常电池检测;.电池平衡充电.自动再充电;.外部NTC拓展功能,根据温度管理充电高度集成,极少的外围元器件。2.应用领域:两节鲤电池充电3.概述ZCC1130T是一款完整的双节离子电池充电器带电池
codeforces round 748 题解 A~D2
刘心奶黄包qaq
算法算法c++
文章目录A.Elections题目大意思路AC代码B.MakeitDivisibleby25题目大意思路AC代码C.SaveMoreMice题目大意思路AC代码D1.AllareSame题目大意思路AC代码D2.HalfofSame题目大意思路AC代码A.ElectionsA.Elections题目大意有三个候选人,每个候选人都有一个初始票数,问每个候选人至少增加多少票才能绝对被选上。思路判断其中
SQLSERVER将子查询数据合并拼接成一个字段
xiaoweiwei99
面试学习路线阿里巴巴android前端后端
业务场景:有两张表,部门表和员工表部门表:部门编码部门名称1A2A3A4B员工表:员工名称所属部门张三1李四1王五1赵六2现在需要一个部门人员报表,要求将该部门的员工合并显示在一列,如:部门编码部门名称所属人员1A张三、李四、王五2B赵六解决方案:通过SQLSERVER的FORXMLPATH函数+STUFF函数,对查询出来的数据进行合并拼接,放到指定的字段selectSTUFF((select‘,
Codeforces Round 963 (Div. 2)
lskkkkkkkkkkkk
题解dp动态规划思维模拟数论
CodeforcesRound963(Div.2)A.QuestionMarks题意有一场考试一共4∗n4*n4∗n道题目,其中答案为A,B,C,D的题目各nnn道,现在你有一份考试的结果,由字母A,B,C,D组成,请问最多得到多少分。思路每种选项最多答对n道题目,我们统计每个选项的出现次数,和n取较小值,将结果加起来即可。代码#includeusingnamespacestd;#defineIO
Codeforces Round 935 (Div. 3)
lskkkkkkkkkkkk
算法数据结构c++
题目链接A.SettingupCamp题意有一些屋子,每个屋子最多容纳三个人,有三种人,内向人必须一个人一个屋,外向人必须三个人同时一个屋子,综合人随意(一个两个三个都可)现在有aaa个内向人,bbb个外向人,ccc个综合人。问最少需要多少个屋子才能满足所有人的要求,如果无论如何都不能满足那么就输出-1思路我们很容易发现,对于内向人,不会导致输出-1.因为给他们一人一个屋子即可。对于综合人同样不会
Codeforces Round 936 (Div. 2)
lskkkkkkkkkkkk
c++算法数据结构
CodeforcesRound936(Div.2)题目链接A.MedianofanArray题意给出一个数组aaa,每次操作可以让其中一个数增加一。问最少需要几次操作能改变中位数的值。长度为n的数组a的中位数表示为,令b是a排完序后的数组,那么b⌈n2⌉b_{\lceil\frac{n}{2}\rceil}b⌈2n⌉即为a的中位数。思路假设中位数为mmm,那么我们就需要让最终的中位数变为m+1m+
低功耗高效率同步降压变换器SiLM6880/SiLM6881 为工业应用领域电源提供强力支撑
Hailey深力科
深力科同步降压变换器深力科SiLM6880深力科SiLM6881数明深力科
为了满足现代电子设备对性能和能耗的更高要求,并不断推动电源技术的优化与创新,深力科推荐一款——低功耗、高效率的同步降压变换器SiLM6880/SiLM6881。SiLM6880/SiLM6881具有宽泛的输入电压范围(6V~80V),能适应各种电池或其他输入电源条件,并支持1A的连续输出电流,确保电源稳定和高效的功率输出。该变换器采用高效率的COT(恒定导通时间)控制架构,具备快速、准确和稳定的动
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 速度很慢而且效率也不