- Java垃圾回收器的工作原理
java菜
上课,老师照本宣科,实在难以理解,干脆就看书里的Java书,正好看了Java的垃圾回收器是如何工作的,觉得有必要记录一下。参考于Java编程思想第四版(ThinkinginJava)1.垃圾回收器对于提高对象的创建速度,有明显的效果问题来了,垃圾回收是释放对象,而关创建对象什么事?首先了解一下Java是如何在堆上分配内存的,Java使用“堆指针”,每分配一个对象,指针就往后移一位,类似于堆栈,这样
- Kotlin内联类、内部类、嵌套类
维特or卡顿
Kotlin内联类、内部类、嵌套类在开始介绍Kotlin内联类、内部类、嵌套类之前,先简要回顾一下java中的内部类java中的内部类可以将一个类的定义放在另一个类的定义内部,这就是内部类——《Java编程思想》概述在java中,内部类有一中非常有用的特性,它允许将一些逻辑相关的类组织在一起,并控制位于内部的类的可见性。java内部类拥有其外围类所有元素的访问权,不需要特殊条件就可以访问外围类的所
- Java学习资源 | Java编程好书分享,必读!
Java烂笔头
Java资源合集(书籍版)入门进阶高级样样俱全书籍《JAVA核心技术卷1》有一些编程基础的同学推荐阅读,可以学习一段时间回头再看看《JAVA编程思想》Java圣经,值得仔细品读,作者的功力十分深厚,即使很多内容还无法理解,但每次读完一定会有所收获《EffectiveJava》书并不厚但是干货十足,作者讲述Java的最佳实践和经验规则。它能帮助我们写出清晰、健壮、高效的代码,同时这本书涵盖了非常多的
- Java编程思想——第一章:对象导论
代夫阿普曼
1.抽象过程1.1Java语言的五个基本特性万物皆对象;程序是对象的集合,它们通过发送消息来告知彼此所要的做的;每个对象都有自己的由其他对象所构成的存储;每个对象都拥有其类型;某一特定类型的所有对象都可以接受同样的消息。对象具有状态、行为和标识。意味着每一个对象都可以拥有内部数据和方法,并且每一个对象都可以与其他对象区分开来(每一个对象在内存中都有一个唯一的地址)。2.每个对象都有一个接口因为类描
- 2024Java开发必读书籍推荐
作为一名Java工程师,持续学习和提升是非常重要的。阅读优秀的技术书籍可以帮助我们深入理解Java编程语言的核心概念和最佳实践。在本文中,我将向大家推荐一共10本Java工程师必读的经典书籍,旨在帮助大家扩展知识领域,提高编程技能和解决问题的能力。《Java编程思想》(ThinkinginJava)这是一本非常有名的经典书籍。它不仅介绍了Java编程的基础知识,还深入讨论了各种编程选择和判断,并涵
- 《JAVA编程思想》第七章 多态 读书笔记
小芹菜_4d69
多态(后期绑定)JAVA中所有的函数,除了声明为final,皆使用后期绑定。(final函数存在的意义:防止子类重载)构造函数的调用顺序:1、调用baseclass函数;2、各个成员的声明顺序;3、本身构造函数本体。finalize()函数至少具有protected权限。构造函数中唯一可以安全调用的函数便是basecalss中的final函数(对private函数一样成立)。注:final和pri
- 你都是会点啥技术(四)--- Java
梦是做出来的
javajava后端总结学习
你都是会点啥技术(四)—Java写在前面的话:到2019年6月份为止,真正使用java有两年了,在大学期间老师教过一遍java(学的不好),看过两三个老师讲解的java视频,每次学习都会有新的体验和收获,也读过《java编程思想》和《深入理解Java虚拟机》,从我对我自己的审视来看,万万不敢说掌握了java这门语言,这次是把java从基础到高级梳理一遍,一方面是对java知识回顾,一方面补充工作中
- Java编程思想(第四版)Thinking in Java 4th 读书笔记
虾米记
读书笔记Javajava学习读书笔记
目录前言配书代码使用指南第1章对象导论1.2接口1.4被隐藏的具体实现1.5复用具体实现1.7多态1.8单根继承第2章一切都是对象object2.2必须由你创建所有对象2.2.1五个地方存储数据2.2.2特例:基本类型2.4类2.4.1字段和方法2.6构建一个Java程序2.6.1名字可见性2.7你的第一个Java程序2.8注释和嵌入式文档第3章操作符operators3.1更简单的打印语句3.4
- 2019-3-8晨间日记
Ay_先生
三月八日妇女节同时也是公司周年节日起床:8:27就寝:12点躺床,深夜2点开始深睡天气:阴有雨心情:中纪念日:无任务清单昨日完成的任务,最重要的三件事:改进:十一点半之前睡觉习惯养成:每天晚上学习Java编程思想或其他技术一个章节周目标·完成进度健身1次,目前尚未达成学习·信息·阅读阅读一篇文章健康·饮食·锻炼吃多点人际·家人·朋友维稳工作·思考上周五版本推荐,周一晚上八点才提单,周四晚上下班才搞
- 《JAVA编程思想》学习笔记:第19章(枚举)
编程家园
第十九章、枚举类型概述:关键字enum:可以将一组具名的值的有限集合创建为一种新的类型(Class),而这些具名的值可以作为常规的程序组件使用。创建enum时,编译器会为你自动生成一个相关类,此类自动extendsjava.lang.Enum类。1.基本enum特性Enum类提供的功能如下:values()返回enum实例的数组,而且保持声明的顺序:ordinal()返回一个int值,这是每个en
- 大神的分享:Java程序员的学习生涯中各个阶段的建议
JAVA架构师的圈子
第一部分:对于参加工作一年以内的同学。恭喜你,这个时候,你已经拥有了一份Java的工作。这个阶段是你成长极快的阶段,而且你可能会经常加班。但是加班不代表你就可以松懈了,永远记的那句话,从你入行那一刻起,你就要不停的学习。在这一年里,你至少需要看完《Java编程思想》这本书。这本书的内容是帮助你对于Java有一个更加深入的了解,是Java基础的升级版。这本书很厚,正常速度的话,应该可以在半年左右看完
- java学习书籍推荐
墨雨轩夏
一、Java编程入门类对于没有Java编程经验的程序员要入门,随便读什么入门书籍都一样,这个阶段需要你快速的掌握Java基础语法和基本用法,宗旨就是“囫囵吞枣不求甚解”,先对Java熟悉起来再说。用很短的时间快速过一遍Java语法,连懵带猜多写写代码,要“知其然”。1、《Java编程思想》在有了一定的Java编程经验之后,你需要“知其所以然”了。这个时候《Java编程思想》是一本让你知其所以然的好
- 后端开发工程师需要掌握的内容
Programmer boy
后端知识后端需要学习的知识学习方向
1.语言相关1.1Java核心知识点Java的类加载机制JVM相关:JVM内存模型和结构,GC原理,性能调优泛型集合体系异常体系IO体系多线程编程反射Servlet推荐数据《Java编程思想》《EffectiveJava》《深入理解Java虚拟机》1.2Shell、Python等脚本语言介绍此类脚本语言的意义在于辅助后端开发,包括系统运维,工具集成(借助管道、重定向),文本处理,数据计算等工作,提
- Java编程思想3
Be reborn
Java编程思想java开发语言
文章目录一、访问权限控制1.目的2.访问权限修饰符:3.私有构造器二、复用类1.组合(Composition):2.继承(Inheritance):3.基类的初始化:4.在组合与继承之间选择:使用组合的情况:使用继承的情况:5.final关键字1.final修饰类:2.final修饰方法:3.final修饰变量(字段):三、多态1.多态的基本概念:2.向上转型和向下转型:3.运行时多态性:4.抽象
- 那些年曾经看过的书——工作篇
徐福记456
人生杂谈android音视频程序员的梦想
工作以后,主要是看一些与工作相关的书,比如Android相关:Android开发艺术探索、深入理解Android内核设计思想、Android系统源代码情景分析、精通Android多媒体开发、AndroidC++高级编程。音视频相关:FFmpeg从入门到精通、WebRTCNative开发实战、OpenGLES3.0编程指南、音视频开发进阶指南。语言相关:C++PrimerPlus、Java编程思想。
- 书单
suddennessMan
持续添加1.MIT6.00.1x(计算机科学和Python编程导论)2019-1-2开始预计一个月2.HarvardCS50x(计算机科学)3.SICP(计算机程序的构造和解释)4.Java编程思想5.CSAPP(深入理解计算机系统)6.大话设计模式7.重构改善既有代码的设计8.effectivejava9.深入理解Java虚拟机10.tcp/ip详解卷一、二、三11.数据结构与算法12.Pyth
- Java编程思想——第十一章:持有对象
代夫阿普曼
容器提供完善的方法来保存对象,还拥有一些特性。Java容器类都可以自动地调整自己的尺寸。1.泛型和类型安全的容器通过使用泛型,可以在编译期防止将错误类型的对象放置到容器中。将元素从容器中拿出时,类型转换也不再是必需的了。因为容器直到它保存的是什么类型,因此它会在调用get()时替你执行转型。2.基本概念容器类类库的两个不同概念:Collection:一个独立元素的序列,这些元素都服从一条或多条规则
- Java基础—方法—11方法结构和调用、重载和命令行传参(附:return语句、静态方法的介绍及命令行传参、GBK与Unicode编码问题解决)
冻笠
JavaSEjava开发语言学习
1、科普:System.out.println();调用系统类的标准输出对象out中的方法println()2、Java中方法:类似其他语言的函数,是完成特定功能的代码片段,这也是设计方法的原则。3、方法结构:(其中参数像是一个占位符)1)return语句的作用:根据《java编程思想:第四版》4.5节中介绍:return语句作为一个无条件的分支,无需判断条件即可发生。return语句主要有两个用
- Java编程思想1
Be reborn
Java编程思想java开发语言
文章目录一、对象导论二、一切都是对象1.使用引用操纵对象:2.必须由你创建所有对象:3.对象的存储:4.永远不需要销毁对象:5.特例:基本类型:三、操作符1.算术操作符2.关系操作符3.逻辑操作符4.位操作符5.移位操作符6.instanceof操作符7.条件运算符(三元运算符)四、控制执行流程1.条件语句2.循环结构3.跳转语句《Java编程思想》前4章的粗略总结一、对象导论万物皆对象:Java
- Java编程思想2
Be reborn
Java编程思想java开发语言jvm
文章目录1.构造方法2.对象的初始化顺序1.静态成员初始化2.类加载3.实例化总结3.垃圾回收1.标记阶段(Marking)2.清除阶段(Sweeping)3.垃圾回收的触发时机4.分代垃圾回收5.垃圾回收算法1.标记-清除算法(MarkandSweep)2.复制算法(Copying)3.标记-整理算法(MarkandCompact)4.分代垃圾回收算法5.并发垃圾回收算法Java编程思想第五章初
- 深度解读《Java编程思想》:面向对象导论
码农阿豪
好“物”分享java开发语言面向对象
深度解读《Java编程思想》:面向对象导论前言:欢迎来到本篇博客,我们将深入探讨经典之作《Java编程思想》中的面向对象导论。这本由BruceEckel所著的书籍深入浅出,为Java编程提供了一系列深刻的思考和实践经验。1.Java编程思想简介:作者:BruceEckel出版时间:1998年特点:强调面向对象的编程思想,深入浅出,适合初学者和有经验的开发者。2.面向对象的基本概念:类与对象:类是对
- Java基础常见面试题总结
夜雨风云
面试#Java基础Javajava面试Java基础
梳理Java基础相关的面试题,主要参考《Java编程思想》(第四版,BruceEckel著,陈昊鹏译)一书,其余部分整合网络相关内容。注意,关于JVM和Java并发编程的面试题因为内容较多,单独整理。Java类型系统Java数据类型Java的数据类型主要可以分为三类:基本数据类型(整型、浮点型、字符型、布尔型)、引用类型(Object类及其子类、接口、枚举、数组)、空类型。所以,从数据类型的角度来
- 《Java编程思想》-- 接口
CodeDuck
interface这个关键字产生一个完全抽象的类,它根本就没有提供任何具体实现。它允许创建者确定方法名、参数列表和返回类型,但是没有任何方法体。接口只提供了形式,而未提供任何具体实现。1.有关接口的适配器模式 在介绍继承时,我们举过图形的栗子,对于向上转型的图形必须继承Shape类,合情合理。但假如我们创建一个新的类Line并没有继承Shape类,此时就不能使用Shape来进行操作方法,这就形成
- 优雅处理你的Java异常
生如夏花帅
作者:叶知泉来源:https://my.oschina.net/c5ms/blog/1827907本文介绍本文仅按照业务系统开发角度描述异常的一些处理看法,不涉及java的异常基础知识,可以自行查阅《Java核心技术卷I》和《java编程思想》可以得到更多的基础信息。写在前面的话笔者文笔功力尚浅,言语多有不妥,请慷慨指正,必定感激不尽.本文提出了几个概念:处理反馈;业务异常;代码错误。请认真思考一
- Java基础——方法的异常说明throws关键字在类的继承中的限制规则
Simon Q.Zhu
Java基础知识Java异常处理throws异常的限制方法继承重写异常说明
定义引用《Java编程思想》中文版第四版对throws的说明:“异常说明属于方法声明的一部分,紧跟在形式参数列表之后,使用了附加的关键字throws,后面接一个所有潜在异常类型的列表。”问题一那么既然对“方法潜在异常类型”声明在了方法形式参数后,那么是否在继承中子类重写父类方法时,子类的方法声明后面也要受父类方法的约束抛出父类指定的异常?测试publicclassBaseExceptionexte
- jdbc源码详解(一):示例+Driver注册流程
木东居士
jdbcjava开源项目
0x00前言自己一直说要某个开源项目的源码,但是一直没有真正地好好开始,一是以为看源码其实不容易看懂,而是因为选择犹豫,最后也敲定看哪个。这次正式开始看jdbc的源码有两个三个:一是因为《java编程思想》这本书快看完了,折腾一个多月的时间,里面除了多线程和图形编程这两块基本都看得差不多了;一个是因为《设计模式之禅》这本书看了一半左右,里面的设计模式自己大致都明白是什么隐私,但是印象不深刻,需要有
- Java第六章课堂总结
夕落辞
java
类与对象在Java语言中,经常被提到的两个词是类与对象。实际上,可以将类看作是对象的载体,它定义了对象所具有的功能。学习Java语言必须掌握类与对象,这样可以从深层次去理解Java这种面向对象语言的开发理念,从而更好、更快地掌握Java编程思想与编程方式。本章将详细讲解类的各种方法以及对象,为了使初学者更容易入门,在讲解过程中列举了大量实例。一,面向对象概述在程序开发初期,人们使用结构化开发语言。
- Java字符串 正则表达式总结
半城抹茶
JAVA知识点正则表达式java
在日常Java后端开发过程中,免不了对数据字段的解析,自然就少不了对字符串的操作,这其中就包含了正则表达式这一块的内容,这里面涉及Java包中Pattern类和Macher类,本篇博客就针对这一块内容和常见的用法进行总结,本博客主要的参考资料是《Java编程思想》第4版。以一个问题引出本博客的内容。问题是:检查一个字符串是否以大写字母开头,以句号结尾。Stringlen="^[A-Z].*[\\.
- Java编程思想-读书笔记
zackyG
第一章public,private,protected(继承的类可以访问)访问权限没有声明访问权限时的,默认访问权限(包访问权限)——类可以访问在同一个包(库构建)中的其他类的成员,但是在包之外,这些成员如同指定了private权限如果组合是动态发生的,那么它通常被称为聚合继承的类包含了父类的所有成员,尽管private成员被隐藏起来,并且不可访问在JAVA中,创建对象是在堆上进行,并且只有这一种
- lambda表达式1
冰神9527
先扯会在入正题,首先这是本人第一次写博客,本来也没这个爱好,码字也挺费劲的。但为了某大牛说过,要成为大牛就必须写博客.还要看Java编程思想。所以我果断买了一本二手的Java编程思想,看了总计不超过24小时,我就快吐血了……这tm写的什么玩意?翻译的什么鬼?果断百度,Java编程思想怎么样。不料,网上大牛却一致好评……这我能怎么办,我也很无奈,只怪自己等级太低,内功不行吧。既然圣经看不下去,那就扯
- 统一思想认识
永夜-极光
思想
1.统一思想认识的基础,才能有的放矢
原因:
总有一种描述事物的方式最贴近本质,最容易让人理解.
如何让教育更轻松,在于找到最适合学生的方式.
难点在于,如何模拟对方的思维基础选择合适的方式. &
- Joda Time使用笔记
bylijinnan
javajoda time
Joda Time的介绍可以参考这篇文章:
http://www.ibm.com/developerworks/cn/java/j-jodatime.html
工作中也常常用到Joda Time,为了避免每次使用都查API,记录一下常用的用法:
/**
* DateTime变化(增减)
*/
@Tes
- FileUtils API
eksliang
FileUtilsFileUtils API
转载请出自出处:http://eksliang.iteye.com/blog/2217374 一、概述
这是一个Java操作文件的常用库,是Apache对java的IO包的封装,这里面有两个非常核心的类FilenameUtils跟FileUtils,其中FilenameUtils是对文件名操作的封装;FileUtils是文件封装,开发中对文件的操作,几乎都可以在这个框架里面找到。 非常的好用。
- 各种新兴技术
不懂事的小屁孩
技术
1:gradle Gradle 是以 Groovy 语言为基础,面向Java应用为主。基于DSL(领域特定语言)语法的自动化构建工具。
现在构建系统常用到maven工具,现在有更容易上手的gradle,
搭建java环境:
http://www.ibm.com/developerworks/cn/opensource/os-cn-gradle/
搭建android环境:
http://m
- tomcat6的https双向认证
酷的飞上天空
tomcat6
1.生成服务器端证书
keytool -genkey -keyalg RSA -dname "cn=localhost,ou=sango,o=none,l=china,st=beijing,c=cn" -alias server -keypass password -keystore server.jks -storepass password -validity 36
- 托管虚拟桌面市场势不可挡
蓝儿唯美
用户还需要冗余的数据中心,dinCloud的高级副总裁兼首席营销官Ali Din指出。该公司转售一个MSP可以让用户登录并管理和提供服务的用于DaaS的云自动化控制台,提供服务或者MSP也可以自己来控制。
在某些情况下,MSP会在dinCloud的云服务上进行服务分层,如监控和补丁管理。
MSP的利润空间将根据其参与的程度而有所不同,Din说。
“我们有一些合作伙伴负责将我们推荐给客户作为个
- spring学习——xml文件的配置
a-john
spring
在Spring的学习中,对于其xml文件的配置是必不可少的。在Spring的多种装配Bean的方式中,采用XML配置也是最常见的。以下是一个简单的XML配置文件:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.or
- HDU 4342 History repeat itself 模拟
aijuans
模拟
来源:http://acm.hdu.edu.cn/showproblem.php?pid=4342
题意:首先让求第几个非平方数,然后求从1到该数之间的每个sqrt(i)的下取整的和。
思路:一个简单的模拟题目,但是由于数据范围大,需要用__int64。我们可以首先把平方数筛选出来,假如让求第n个非平方数的话,看n前面有多少个平方数,假设有x个,则第n个非平方数就是n+x。注意两种特殊情况,即
- java中最常用jar包的用途
asia007
java
java中最常用jar包的用途
jar包用途axis.jarSOAP引擎包commons-discovery-0.2.jar用来发现、查找和实现可插入式接口,提供一些一般类实例化、单件的生命周期管理的常用方法.jaxrpc.jarAxis运行所需要的组件包saaj.jar创建到端点的点到点连接的方法、创建并处理SOAP消息和附件的方法,以及接收和处理SOAP错误的方法. w
- ajax获取Struts框架中的json编码异常和Struts中的主控制器异常的解决办法
百合不是茶
jsjson编码返回异常
一:ajax获取自定义Struts框架中的json编码 出现以下 问题:
1,强制flush输出 json编码打印在首页
2, 不强制flush js会解析json 打印出来的是错误的jsp页面 却没有跳转到错误页面
3, ajax中的dataType的json 改为text 会
- JUnit使用的设计模式
bijian1013
java设计模式JUnit
JUnit源代码涉及使用了大量设计模式
1、模板方法模式(Template Method)
定义一个操作中的算法骨架,而将一些步骤延伸到子类中去,使得子类可以不改变一个算法的结构,即可重新定义该算法的某些特定步骤。这里需要复用的是算法的结构,也就是步骤,而步骤的实现可以在子类中完成。
 
- Linux常用命令(摘录)
sunjing
crondchkconfig
chkconfig --list 查看linux所有服务
chkconfig --add servicename 添加linux服务
netstat -apn | grep 8080 查看端口占用
env 查看所有环境变量
echo $JAVA_HOME 查看JAVA_HOME环境变量
安装编译器
yum install -y gcc
- 【Hadoop一】Hadoop伪集群环境搭建
bit1129
hadoop
结合网上多份文档,不断反复的修正hadoop启动和运行过程中出现的问题,终于把Hadoop2.5.2伪分布式安装起来,跑通了wordcount例子。Hadoop的安装复杂性的体现之一是,Hadoop的安装文档非常多,但是能一个文档走下来的少之又少,尤其是Hadoop不同版本的配置差异非常的大。Hadoop2.5.2于前两天发布,但是它的配置跟2.5.0,2.5.1没有分别。 &nb
- Anychart图表系列五之事件监听
白糖_
chart
创建图表事件监听非常简单:首先是通过addEventListener('监听类型',js监听方法)添加事件监听,然后在js监听方法中定义具体监听逻辑。
以钻取操作为例,当用户点击图表某一个point的时候弹出point的name和value,代码如下:
<script>
//创建AnyChart
var chart = new AnyChart();
//添加钻取操作&quo
- Web前端相关段子
braveCS
web前端
Web标准:结构、样式和行为分离
使用语义化标签
0)标签的语义:使用有良好语义的标签,能够很好地实现自我解释,方便搜索引擎理解网页结构,抓取重要内容。去样式后也会根据浏览器的默认样式很好的组织网页内容,具有很好的可读性,从而实现对特殊终端的兼容。
1)div和span是没有语义的:只是分别用作块级元素和行内元素的区域分隔符。当页面内标签无法满足设计需求时,才会适当添加div
- 编程之美-24点游戏
bylijinnan
编程之美
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
public class PointGame {
/**编程之美
- 主页面子页面传值总结
chengxuyuancsdn
总结
1、showModalDialog
returnValue是javascript中html的window对象的属性,目的是返回窗口值,当用window.showModalDialog函数打开一个IE的模式窗口时,用于返回窗口的值
主界面
var sonValue=window.showModalDialog("son.jsp");
子界面
window.retu
- [网络与经济]互联网+的含义
comsci
互联网+
互联网+后面是一个人的名字 = 网络控制系统
互联网+你的名字 = 网络个人数据库
每日提示:如果人觉得不舒服,千万不要外出到处走动,就呆在床上,玩玩手游,更不能够去开车,现在交通状况不
- oracle 创建视图 with check option
daizj
视图vieworalce
我们来看下面的例子:
create or replace view testview
as
select empno,ename from emp where ename like ‘M%’
with check option;
这里我们创建了一个视图,并使用了with check option来限制了视图。 然后我们来看一下视图包含的结果:
select * from testv
- ToastPlugin插件在cordova3.3下使用
dibov
Cordova
自己开发的Todos应用,想实现“
再按一次返回键退出程序 ”的功能,采用网上的ToastPlugins插件,发现代码或文章基本都是老版本,运行问题比较多。折腾了好久才弄好。下面吧基于cordova3.3下的ToastPlugins相关代码共享。
ToastPlugin.java
package&nbs
- C语言22个系统函数
dcj3sjt126com
cfunction
C语言系统函数一、数学函数下列函数存放在math.h头文件中Double floor(double num) 求出不大于num的最大数。Double fmod(x, y) 求整数x/y的余数。Double frexp(num, exp); double num; int *exp; 将num分为数字部分(尾数)x和 以2位的指数部分n,即num=x*2n,指数n存放在exp指向的变量中,返回x。D
- 开发一个类的流程
dcj3sjt126com
开发
本人近日根据自己的开发经验总结了一个类的开发流程。这个流程适用于单独开发的构件,并不适用于对一个项目中的系统对象开发。开发出的类可以存入私人类库,供以后复用。
以下是开发流程:
1. 明确类的功能,抽象出类的大概结构
2. 初步设想类的接口
3. 类名设计(驼峰式命名)
4. 属性设置(权限设置)
判断某些变量是否有必要作为成员属
- java 并发
shuizhaosi888
java 并发
能够写出高伸缩性的并发是一门艺术
在JAVA SE5中新增了3个包
java.util.concurrent
java.util.concurrent.atomic
java.util.concurrent.locks
在java的内存模型中,类的实例字段、静态字段和构成数组的对象元素都会被多个线程所共享,局部变量与方法参数都是线程私有的,不会被共享。
- Spring Security(11)——匿名认证
234390216
Spring SecurityROLE_ANNOYMOUS匿名
匿名认证
目录
1.1 配置
1.2 AuthenticationTrustResolver
对于匿名访问的用户,Spring Security支持为其建立一个匿名的AnonymousAuthenticat
- NODEJS项目实践0.2[ express,ajax通信...]
逐行分析JS源代码
Ajaxnodejsexpress
一、前言
通过上节学习,我们已经 ubuntu系统搭建了一个可以访问的nodejs系统,并做了nginx转发。本节原要做web端服务 及 mongodb的存取,但写着写着,web端就
- 在Struts2 的Action中怎样获取表单提交上来的多个checkbox的值
lhbthanks
javahtmlstrutscheckbox
第一种方法:获取结果String类型
在 Action 中获得的是一个 String 型数据,每一个被选中的 checkbox 的 value 被拼接在一起,每个值之间以逗号隔开(,)。
所以在 Action 中定义一个跟 checkbox 的 name 同名的属性来接收这些被选中的 checkbox 的 value 即可。
以下是实现的代码:
前台 HTML 代码:
- 003.Kafka基本概念
nweiren
hadoopkafka
Kafka基本概念:Topic、Partition、Message、Producer、Broker、Consumer。 Topic: 消息源(Message)的分类。 Partition: Topic物理上的分组,一
- Linux环境下安装JDK
roadrunners
jdklinux
1、准备工作
创建JDK的安装目录:
mkdir -p /usr/java/
下载JDK,找到适合自己系统的JDK版本进行下载:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
把JDK安装包下载到/usr/java/目录,然后进行解压:
tar -zxvf jre-7
- Linux忘记root密码的解决思路
tomcat_oracle
linux
1:使用同版本的linux启动系统,chroot到忘记密码的根分区passwd改密码 2:grub启动菜单中加入init=/bin/bash进入系统,不过这时挂载的是只读分区。根据系统的分区情况进一步判断. 3: grub启动菜单中加入 single以单用户进入系统. 4:用以上方法mount到根分区把/etc/passwd中的root密码去除 例如: ro
- 跨浏览器 HTML5 postMessage 方法以及 message 事件模拟实现
xueyou
jsonpjquery框架UIhtml5
postMessage 是 HTML5 新方法,它可以实现跨域窗口之间通讯。到目前为止,只有 IE8+, Firefox 3, Opera 9, Chrome 3和 Safari 4 支持,而本篇文章主要讲述 postMessage 方法与 message 事件跨浏览器实现。postMessage 方法 JSONP 技术不一样,前者是前端擅长跨域文档数据即时通讯,后者擅长针对跨域服务端数据通讯,p