- 详解mybatis的一二级缓存以及缓存失效原因
仰望天花板
缓存数据库mybatisjavamysql
数据库的大部分场景下是从磁盘读取,如果数据从内存进行读取,速度较比磁盘要快得多。但因为内存的容量有限,所以一般只会把使用和查询较多的数据缓存起来,以便快速反应,其他使用率不太多的继续存放在磁盘。mybatis分为一级缓存和二级缓存1.一级缓存一级缓存存放在SqlSqeeion上,默认开启1.1pojo@DatapublicclassRole{privateLongid;privateStringr
- WORD批量转换器MultiDoc Converter
uolian
工作word
WORD批量转换器MultiDocConverterhttps://www.52pojie.cn/thread-1318745-1-1.html可批量将doc、docx等文件格式转成doc、docx、pdf、rtf、txt、html、epub等格式。安装包下载地址:https://wws.lanzouj.com/irvVbiz0pkd最终下载文件打包地址(未作成单文件,不确定是否可以直接使用):h
- MyBatis系统学习(一)——项目结构及其含义
OEC小胖胖
MyBatismybatis学习web后端
1.MyBatis简介MyBatis是一款优秀的持久层框架,它通过SQL映射的方式实现Java对数据库操作的映射,既保留了SQL语句的灵活性,也简化了代码的编写。在一个MyBatis项目中,核心部分主要有:配置文件(mybatis-config.xml)映射文件(Mapper.xml)实体类(Entity/POJO)接口类(Mapper接口)MyBatis会话工厂(SqlSessionFactor
- SpringBoot项目
俺叫啥好嘞
spring系列springspringboot
SpringBoot项目大概分为四层:(1)DAO层:包括XxxMapper.java(数据库访问接口类),XxxMapper.xml(数据库链接实现);(这个命名,有人喜欢用Dao命名,有人喜欢用Mapper,看个人习惯了吧)(2)Bean层:也叫model层,模型层,entity层,实体层,就是数据库表的映射实体类,存放POJO对象;(3)Service层:也叫服务层,业务层,包括XxxSer
- 数据结构OJ作业——队列
nnbs
数据结构数据结构poj队列
POJ3984:http://poj.org/problem?id=3984迷宫,输出最短路径,bfs#include#include#include#includeusingnamespacestd;intmaze[5][5];pairpath[5][5];queue>q;intdx[]={1,-1,0,0};intdy[]={0,0,1,-1};voidbfs(intx,inty){q.pus
- leetcode No518 零钱兑换Ⅱ java
短腿Cat
LeetCode刷题
题目给定不同面额的硬币和一个总金额。写出函数来计算可以凑成总金额的硬币组合数。假设每一种面额的硬币有无限个。示例1:输入:amount=5,coins=[1,2,5]输出:4解释:有四种方式可以凑成总金额:5=55=2+2+15=2+1+1+15=1+1+1+1+1示例2:输入:amount=3,coins=[2]输出:0解释:只用面额2的硬币不能凑成总金额3。示例3:输入:amount=10,c
- 代码随想录训练营 Day38打卡 动态规划 part06 322. 零钱兑换 279. 完全平方数 139. 单词拆分
那一抹阳光多灿烂
力扣动态规划动态规划算法python力扣
代码随想录训练营Day38打卡动态规划part06一、力扣322.零钱兑换给你一个整数数组coins,表示不同面额的硬币;以及一个整数amount,表示总金额。计算并返回可以凑成总金额所需的最少的硬币个数。如果没有任何一种硬币组合能组成总金额,返回-1。你可以认为每种硬币的数量是无限的。示例:输入:coins=[1,2,5],amount=11输出:3解释:11=5+5+1题目中说每种硬币的数量是
- c语言练习:POJ 1005 我想我需要一艘船屋(I Think I Need a Houseboat)
七月初七淮水竹亭~
C语言入门c语言
题目相关信息描述弗雷德·马珀(FredMapper)正在考虑在路易斯安那州购买一些土地来建造他的房子。在调查这片土地的过程中,他了解到,由于密西西比河造成的侵蚀,路易斯安那州实际上每年都在缩小50平方英里。由于弗雷德希望一辈子都住在这所房子里,他需要知道他的土地是否会因侵蚀而消失。在做了更多的研究之后,弗雷德了解到正在失去的土地形成了一个半圆形。这个半圆是以(0,0)为中心的圆的一部分,将圆平分的
- AcWing 532. 货币系统 多重背包问题的变形
罚时大师月色
算法提高课
AcWing532.货币系统在网友的国度中共有 n 种不同面额的货币,第 i 种货币的面额为 a[i],你可以假设每一种货币都有无穷多张。为了方便,我们把货币种数为 n、面额数组为 a[1…n] 的货币系统记作 (n,a)。在一个完善的货币系统中,每一个非负整数的金额 x 都应该可以被表示出,即对每一个非负整数 x,都存在 n 个非负整数 t[i] 满足 a[i]×t[i] 的和为 x。然而,在网
- 动态规划算法之背包问题详细解读(附带Java代码解读)
南城花随雪。
算法分析算法动态规划
动态规划中的背包问题(KnapsackProblem)是经典问题之一,通常用来解决选择一组物品放入背包使得背包的价值最大化的问题。根据问题条件的不同,背包问题有很多种变体,如0-1背包问题、完全背包问题、多重背包问题等。这里,我们详细介绍最经典的0-1背包问题,并提供代码的详细解读。1.0-1背包问题简介在0-1背包问题中,有一个容量为C的背包和n件物品。每件物品有两个属性:重量w[i]和价值v[
- java开发中pojo、model和entity的区别及DTO与VO
leighy
javaspringbootmvc
一、pojo(PlainOrdinaryJavaObject无规则简单Java对象)简单java对象简单的javabean的对象,对应数据库某一张表,表的字段与pojo类的属性都要一一对应?(查阅发现没有具体对pojo描述,有的说是作为业务协作类不需要一一对应)但在实际开发中较少以pojo来对包命名。二、entity(实体类)数据表对应到实体类的映射则类属性与数据库表字段一一对应在实际开发中较多以
- SpringData JPA之Respository接口的使用
OVA_Won
SpringDatamysqljavaspring
SpringDataJPA之Respository接口的使用Respository:最顶层的接口也是标志接口,目的是为了统一所有Repository的类型,且能让组件扫描的时候自动识别。准备工作导入JAR包:别忘了导入Junit测试包,否则后面没法单元测试编写Spring和数据库配置文件applicationContext.xml文件com.OVA.pojojdbc.propertiesjdbc.
- POJ 1062 : 昂贵的聘礼 - 最短路Dijkstra+枚举(难)
bookybooky
图论最短路Dijsktrapojzoj图论
dijkstra处理权值非负情形,最近才开始看最短路。题目大意:(中文题容易理解)大致就是说,最终要得到酋长的许诺,每件物品可能有其他物品(1件)能让此物品价格优惠,你可通过交易获得物品从而以最少金钱达到酋长许诺。交易受到“等级限制”。其中的等级限制处理需要一定的技巧,细节一定要处理好!输入:(单Case输入)第一行两个整数M,N(1>30)-1足够,邻接矩阵用int也足够,并不像DISCUSS中
- 【动态规划】【完全背包】力扣322. 零钱兑换
sjsjs11
精选动态规划动态规划leetcode算法
给你一个整数数组coins,表示不同面额的硬币;以及一个整数amount,表示总金额。计算并返回可以凑成总金额所需的最少的硬币个数。如果没有任何一种硬币组合能组成总金额,返回-1。你可以认为每种硬币的数量是无限的。示例1:输入:coins=[1,2,5],amount=11输出:3解释:11=5+5+1示例2:输入:coins=[2],amount=3输出:-1示例3:输入:coins=[1],a
- LeetCode 算法:零钱兑换 c++
Codec Conductor
力扣算法leetcodec++动态规划数据结构
原题链接:零钱兑换难度:中等⭐️⭐️题目给你一个整数数组coins,表示不同面额的硬币;以及一个整数amount,表示总金额。计算并返回可以凑成总金额所需的最少的硬币个数。如果没有任何一种硬币组合能组成总金额,返回-1。你可以认为每种硬币的数量是无限的。示例1:输入:coins=[1,2,5],amount=11输出:3解释:11=5+5+1示例2:输入:coins=[2],amount=3输出:
- 【Mybatis】Web中的数据库操作
科马
java数据库mybatisservletsql
Mybatis工作机制1.加载配置文件:2.创建SqlSessionFactory:3.获取SqlSession:4.获取Mapper接口:5.执行SQL语句:6.SQL语句解析和执行:7.结果映射:8.事务管理:9.关闭SqlSession:10.返回结果:与JDBC对比三个显著特点代码示例1.配置MyBatis2.创建数据库表3.创建POJO类4.编写Mapper接口5.编写SQL映射文件6.
- spring揭秘-概念以BeanFactory介绍
liangxifeng833
本质:Spring框架为POJO提供的各种服务共同组成了Spring的生命之树Paste_Image.pngspring框架为基础,有很多家庭成员,比如(SpringWebFlow,SpringWebServices,SpringSecurity,SpringBatch等等),这些家族成员全部以ApacheLisenceVersion2.0协议发布,共同组成了SpringProjects组合,因为
- SpringBoot项目中使用SpringData-JPA持久化数据
火星刻苦的杏仁
springbootjavamybatis
目录一、什么是JPA二、SpringData-JPA与MybatisPuls的区别三、项目中使用JPAJPA常用注解JPA进阶使用技巧一、什么是JPAJPA是JavaPersistenceAPI的简称,中文名Java持久层API,其设计目标主要是为了简化现有的持久化开发工作和整合ORM技术。简单地说,JPA就是为POJO(PlainOrdinaryJavaObject)提供持久化的标准规范,即将J
- 完全背包&多重背包问题(动态规划)
能力越小责任越小YA
算法算法动态规划c++
完全背包问题:每个物品使用次数没有限制,与0-1背包的不同之处在于遍历背包的顺序是正序。#includeusingnamespacestd;intmain(){intn,v;cin>>n>>v;vectorweight(n),values(n),dp(v+1,0);//dp[j]:容量为j的背包的最大价值for(inti=0;i>weight[i]>>values[i];}for(inti=0;i
- 算法入门篇(八) 之 查找算法
战族狼魂
算法哈希算法
目录一、哈希表哈希函数哈希函数的应用常见的哈希函数线性探测、二次探测、链地址1.线性探测(LinearProbing)2.二次探测(QuadraticProbing)3.链地址法(Chaining)4.总结POJ3349、POJ1840、POJ2002POJ3349-AncientCipherPOJ1840-MaximumNumberPOJ2002-TournamentScheduling二、字符
- Spring AI
java_heartLake
人工智能人工智能springjava
本文介绍Spring的一级项目SpringAI简介:SpringAI是一个用于AI工程的应用程序框架。其目标是将Spring生态系统的设计原则(如可移植性和模块化设计)应用于AI领域,并推动将POJO(PlainOldJavaObjects,简单老式Java对象)作为应用程序的构建块引入到AI领域。主要特性:支持跨AI提供商的便携式API,用于聊天、文本到图像和嵌入模型。同时支持同步和流API选项
- 【iOS安全】iOS安装Alook浏览器
Jouzzy
iOS安全iOS开发ios浏览器
下载Alook的ipa下载地址参考:https://www.52pojie.cn/thread-1725470-1-1.html其中出现的下载链接:https://wwes.lanzouf.com/iyGQ00icergd下载ipa后使用爱思助手安装
- MyBatis注解开发详解
hoypte
mybatis
MyBatis注解开发详解一、前言MyBatis是一个优秀的持久层框架,它支持定制化SQL、存储过程以及高级映射。MyBatis免除了几乎所有的JDBC代码和手动设置参数以及获取结果集。MyBatis可以使用简单的XML或注解来配置和映射原始类型、接口和JavaPOJO(PlainOldJavaObjects,普通的Java对象)为数据库中的记录。在MyBatis中,注解提供了一种更加简洁和直观的
- 代码随想录算法训练营Day40|| 动态规划part07
傲世尊
算法动态规划
多重背包:相比零一背包和完全背包就是限制了物品的数量。实际上把规定了数量的物品拆开成单独的物品就直接转化成了零一背包问题,面试时不会考,暂时不看了。198打家劫舍:理解了递推公式后非常简单!213打家劫舍II:可以去头去尾计算两个result取最大值,转换为基础打家劫舍问题。337打家劫舍III:暴力解法+记忆化递归方法先跳过。本题综合了二叉树的遍历和动态规划,经典的二叉树后序遍历,状态一步一步向
- 代码随想录算法训练营Day45 ||leetCode 70. 爬楼梯 (进阶)|| 322. 零钱兑换 || 279.完全平方数
qq_44884699
leetcode算法职场和发展
70.爬楼梯(进阶)本质上和leetcode377一样#include#includeusingnamespacestd;intmain(){intn,m;while(cin>>n>>m){vectordp(n+1,0);dp[0]=1;for(inti=1;i=0)dp[i]+=dp[i-j];}}cout&coins,intamount){vectordp(amount+1,INT_MAX);
- @Import注解作用
y我见青山多妩媚
java开发语言
@Import注解作用理解springboot自动装配时,发现@SpringBootApplication注解下的@EnableAutoConfiguration注解头上有一个@Import注解。关于这个注解的作用,上网查找后发现理解的不是很明白,于是写了下面的Demo去理解。两个pojo类:publicclassPerson{}publicclassStudent{}测试类@Configurat
- 【spring boot结合rabbit mq 到点执行,可精确到秒】
ljh_learn_from_base
javaspringbootspringbootjava后端java-rabbitmq
【springboot结合rabbitmq到点执行,可精确到秒】创建队列枚举创建自定义的队列消息pojo创建队列和延迟队列发送mq消息接收mq消息DateTimeUtil测试注意点创建队列枚举publicenumQueueEnum{/***各种异步消息频道*/TEST(1,"test","队列频道"),DELAY_TEST(2,"delay_test","延迟延迟频道"),;privateInte
- Eclipse中Run As On Server和Run As Java Application
CAE虚拟与现实
JavaIDE开发环境javaeclipseide
一、名词释义runjavaapplication(作为Java应用程序运行)是运行javamain方法。runonserver是启动一个web应用服务器。二、两者的区别Eclipse中可以创建javaproject也可以创建javawebpoject。javaproject是可以直接在命令行运行,或者直接在Eclipse中运行此时运行是jvm直接调用了main方法。Eclipse中创建的javaw
- 不同编程网站应当注意的点
见合8
比赛总结c++c语言
文章目录引入:洛谷:POJ:C语言:C++:CF:个人建议:补充:引入:小伙伴们有没有遇到过这种情况:到一个新的网站去编程,思路、算法完全正确,提交上去却是WrongAnswer,RuntimeError,ComplieError,TimeLimitExceed。这里,我总结了以下几个网站的注意点:洛谷:link提交时右上角有一个选项为O2优化。这并不可以随便选。可能有些暴力程序开了O2就过了,但
- 阿里java开发手册泰山版_总结
林坰
Javajava数据库mysql
编程规约常量定义不允许任何预先未定义的常量出现在代码中。不要使用一个常量类维护所有的常量,要按常量功能进行归类,分开维护。OOP规约所有的POJO类属性必须使用包装数据类型。RPC方法的返回值和参数必须使用包装数据类型。POJO类是最简单最普通的JAVA对象,内在含义是有一些private的参数作为对象的属性,然后针对每一个参数定义get和set方法访问的接口。【没有从任何类继承、也没有实现任何接
- C/C++Win32编程基础详解视频下载
择善Zach
编程C++Win32
课题视频:C/C++Win32编程基础详解
视频知识:win32窗口的创建
windows事件机制
主讲:择善Uncle老师
学习交流群:386620625
验证码:625
--
- Guava Cache使用笔记
bylijinnan
javaguavacache
1.Guava Cache的get/getIfPresent方法当参数为null时会抛空指针异常
我刚开始使用时还以为Guava Cache跟HashMap一样,get(null)返回null。
实际上Guava整体设计思想就是拒绝null的,很多地方都会执行com.google.common.base.Preconditions.checkNotNull的检查。
2.Guava
- 解决ora-01652无法通过128(在temp表空间中)
0624chenhong
oracle
解决ora-01652无法通过128(在temp表空间中)扩展temp段的过程
一个sql语句后,大约花了10分钟,好不容易有一个结果,但是报了一个ora-01652错误,查阅了oracle的错误代码说明:意思是指temp表空间无法自动扩展temp段。这种问题一般有两种原因:一是临时表空间空间太小,二是不能自动扩展。
分析过程:
既然是temp表空间有问题,那当
- Struct在jsp标签
不懂事的小屁孩
struct
非UI标签介绍:
控制类标签:
1:程序流程控制标签 if elseif else
<s:if test="isUsed">
<span class="label label-success">True</span>
</
- 按对象属性排序
换个号韩国红果果
JavaScript对象排序
利用JavaScript进行对象排序,根据用户的年龄排序展示
<script>
var bob={
name;bob,
age:30
}
var peter={
name;peter,
age:30
}
var amy={
name;amy,
age:24
}
var mike={
name;mike,
age:29
}
var john={
- 大数据分析让个性化的客户体验不再遥远
蓝儿唯美
数据分析
顾客通过多种渠道制造大量数据,企业则热衷于利用这些信息来实现更为个性化的体验。
分析公司Gartner表示,高级分析会成为客户服务的关键,但是大数据分析的采用目前仅局限于不到一成的企业。 挑战在于企业还在努力适应结构化数据,疲于根据自身的客户关系管理(CRM)系统部署有效的分析框架,以及集成不同的内外部信息源。
然而,面对顾客通过数字技术参与而产生的快速变化的信息,企业需要及时作出反应。要想实
- java笔记4
a-john
java
操作符
1,使用java操作符
操作符接受一个或多个参数,并生成一个新值。参数的形式与普通的方法调用不用,但是效果是相同的。加号和一元的正号(+)、减号和一元的负号(-)、乘号(*)、除号(/)以及赋值号(=)的用法与其他编程语言类似。
操作符作用于操作数,生成一个新值。另外,有些操作符可能会改变操作数自身的
- 从裸机编程到嵌入式Linux编程思想的转变------分而治之:驱动和应用程序
aijuans
嵌入式学习
笔者学习嵌入式Linux也有一段时间了,很奇怪的是很多书讲驱动编程方面的知识,也有很多书将ARM9方面的知识,但是从以前51形式的(对寄存器直接操作,初始化芯片的功能模块)编程方法,和思维模式,变换为基于Linux操作系统编程,讲这个思想转变的书几乎没有,让初学者走了很多弯路,撞了很多难墙。
笔者因此写上自己的学习心得,希望能给和我一样转变
- 在springmvc中解决FastJson循环引用的问题
asialee
循环引用fastjson
我们先来看一个例子:
package com.elong.bms;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import co
- ArrayAdapter和SimpleAdapter技术总结
百合不是茶
androidSimpleAdapterArrayAdapter高级组件基础
ArrayAdapter比较简单,但它只能用于显示文字。而SimpleAdapter则有很强的扩展性,可以自定义出各种效果
ArrayAdapter;的数据可以是数组或者是队列
// 获得下拉框对象
AutoCompleteTextView textview = (AutoCompleteTextView) this
- 九封信
bijian1013
人生励志
有时候,莫名的心情不好,不想和任何人说话,只想一个人静静的发呆。有时候,想一个人躲起来脆弱,不愿别人看到自己的伤口。有时候,走过熟悉的街角,看到熟悉的背影,突然想起一个人的脸。有时候,发现自己一夜之间就长大了。 2014,写给人
- Linux下安装MySQL Web 管理工具phpMyAdmin
sunjing
PHPInstallphpMyAdmin
PHP http://php.net/
phpMyAdmin http://www.phpmyadmin.net
Error compiling PHP on CentOS x64
一、安装Apache
请参阅http://billben.iteye.com/admin/blogs/1985244
二、安装依赖包
sudo yum install gd
- 分布式系统理论
bit1129
分布式
FLP
One famous theory in distributed computing, known as FLP after the authors Fischer, Lynch, and Patterson, proved that in a distributed system with asynchronous communication and process crashes,
- ssh2整合(spring+struts2+hibernate)-附源码
白糖_
eclipsespringHibernatemysql项目管理
最近抽空又整理了一套ssh2框架,主要使用的技术如下:
spring做容器,管理了三层(dao,service,actioin)的对象
struts2实现与页面交互(MVC),自己做了一个异常拦截器,能拦截Action层抛出的异常
hibernate与数据库交互
BoneCp数据库连接池,据说比其它数据库连接池快20倍,仅仅是据说
MySql数据库
项目用eclipse
- treetable bug记录
braveCS
table
// 插入子节点删除再插入时不能正常显示。修改:
//不知改后有没有错,先做个备忘
Tree.prototype.removeNode = function(node) {
// Recursively remove all descendants of +node+
this.unloadBranch(node);
// Remove
- 编程之美-电话号码对应英语单词
bylijinnan
java算法编程之美
import java.util.Arrays;
public class NumberToWord {
/**
* 编程之美 电话号码对应英语单词
* 题目:
* 手机上的拨号盘,每个数字都对应一些字母,比如2对应ABC,3对应DEF.........,8对应TUV,9对应WXYZ,
* 要求对一段数字,输出其代表的所有可能的字母组合
- jquery ajax读书笔记
chengxuyuancsdn
jQuery ajax
1、jsp页面
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()
- JWFD工作流拓扑结构解析伪码描述算法
comsci
数据结构算法工作活动J#
对工作流拓扑结构解析感兴趣的朋友可以下载附件,或者下载JWFD的全部代码进行分析
/* 流程图拓扑结构解析伪码描述算法
public java.util.ArrayList DFS(String graphid, String stepid, int j)
- oracle I/O 从属进程
daizj
oracle
I/O 从属进程
I/O从属进程用于为不支持异步I/O的系统或设备模拟异步I/O.例如,磁带设备(相当慢)就不支持异步I/O.通过使用I/O 从属进程,可以让磁带机模仿通常只为磁盘驱动器提供的功能。就好像支持真正的异步I/O 一样,写设备的进程(调用者)会收集大量数据,并交由写入器写出。数据成功地写出时,写入器(此时写入器是I/O 从属进程,而不是操作系统)会通知原来的调用者,调用者则会
- 高级排序:希尔排序
dieslrae
希尔排序
public void shellSort(int[] array){
int limit = 1;
int temp;
int index;
while(limit <= array.length/3){
limit = limit * 3 + 1;
- 初二下学期难记忆单词
dcj3sjt126com
englishword
kitchen 厨房
cupboard 厨柜
salt 盐
sugar 糖
oil 油
fork 叉;餐叉
spoon 匙;调羹
chopsticks 筷子
cabbage 卷心菜;洋白菜
soup 汤
Italian 意大利的
Indian 印度的
workplace 工作场所
even 甚至;更
Italy 意大利
laugh 笑
m
- Go语言使用MySQL数据库进行增删改查
dcj3sjt126com
mysql
目前Internet上流行的网站构架方式是LAMP,其中的M即MySQL, 作为数据库,MySQL以免费、开源、使用方便为优势成为了很多Web开发的后端数据库存储引擎。MySQL驱动Go中支持MySQL的驱动目前比较多,有如下几种,有些是支持database/sql标准,而有些是采用了自己的实现接口,常用的有如下几种:
http://code.google.c...o-mysql-dri
- git命令
shuizhaosi888
git
---------------设置全局用户名:
git config --global user.name "HanShuliang" //设置用户名
git config --global user.email "
[email protected]" //设置邮箱
---------------查看环境配置
git config --li
- qemu-kvm 网络 nat模式 (四)
haoningabc
kvmqemu
qemu-ifup-NAT
#!/bin/bash
BRIDGE=virbr0
NETWORK=192.168.122.0
GATEWAY=192.168.122.1
NETMASK=255.255.255.0
DHCPRANGE=192.168.122.2,192.168.122.254
TFTPROOT=
BOOTP=
function check_bridge()
- 不要让未来的你,讨厌现在的自己
jingjing0907
生活 奋斗 工作 梦想
故事one
23岁,他大学毕业,放弃了父母安排的稳定工作,独闯京城,在家小公司混个小职位,工作还算顺手,月薪三千,混了混,混走了一年的光阴。 24岁,有了女朋友,从二环12人的集体宿舍搬到香山民居,一间平房,二人世界,爱爱爱。偶然约三朋四友,打扑克搓麻将,日子快乐似神仙; 25岁,出了几次差,调了两次岗,薪水涨了不过百,生猛狂飙的物价让现实血淋淋,无力为心爱银儿购件大牌
- 枚举类型详解
一路欢笑一路走
enum枚举详解enumsetenumMap
枚举类型详解
一.Enum详解
1.1枚举类型的介绍
JDK1.5加入了一个全新的类型的”类”—枚举类型,为此JDK1.5引入了一个新的关键字enum,我们可以这样定义一个枚举类型。
Demo:一个最简单的枚举类
public enum ColorType {
RED
- 第11章 动画效果(上)
onestopweb
动画
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/
- Eclipse中jsp、js文件编辑时,卡死现象解决汇总
ljf_home
eclipsejsp卡死js卡死
使用Eclipse编辑jsp、js文件时,经常出现卡死现象,在网上百度了N次,经过N次优化调整后,卡死现象逐步好转,具体那个方法起到作用,不太好讲。将所有用过的方法罗列如下:
1、取消验证
windows–>perferences–>validation
把 除了manual 下面的全部点掉,build下只留 classpath dependency Valida
- MySQL编程中的6个重要的实用技巧
tomcat_oracle
mysql
每一行命令都是用分号(;)作为结束
对于MySQL,第一件你必须牢记的是它的每一行命令都是用分号(;)作为结束的,但当一行MySQL被插入在PHP代码中时,最好把后面的分号省略掉,例如:
mysql_query("INSERT INTO tablename(first_name,last_name)VALUES('$first_name',$last_name')");
- zoj 3820 Building Fire Stations(二分+bfs)
阿尔萨斯
Build
题目链接:zoj 3820 Building Fire Stations
题目大意:给定一棵树,选取两个建立加油站,问说所有点距离加油站距离的最大值的最小值是多少,并且任意输出一种建立加油站的方式。
解题思路:二分距离判断,判断函数的复杂度是o(n),这样的复杂度应该是o(nlogn),即使常数系数偏大,但是居然跑了4.5s,也是醉了。 判断函数里面做了3次bfs,但是每次bfs节点最多