- 深入浅出 -- 系统架构之负载均衡Nginx的性能优化
xiaoli8748_软件开发
系统架构系统架构负载均衡nginx
一、Nginx性能优化到这里文章的篇幅较长了,最后再来聊一下关于Nginx的性能优化,主要就简单说说收益最高的几个优化项,在这块就不再展开叙述了,毕竟影响性能都有多方面原因导致的,比如网络、服务器硬件、操作系统、后端服务、程序自身、数据库服务等,对于性能调优比较感兴趣的可以参考之前《JVM性能调优》中的调优思想。优化一:打开长连接配置通常Nginx作为代理服务,负责分发客户端的请求,那么建议开启H
- PostgreSQL进阶教程
爱分享的码瑞哥
postgresql
PostgreSQL进阶教程目录事务和并发控制事务事务隔离级别锁高级查询联合查询窗口函数子查询CTE(公用表表达式)数据类型自定义数据类型数组JSON高级索引部分索引表达式索引GIN和GiST索引性能调优查询优化配置优化备份与恢复物理备份逻辑备份扩展与插件PostGISpg_cron集群与高可用StreamingReplicationPatroni事务和并发控制事务事务是一个或多个SQL语句的组合
- 双十一亿级电商系统JVM性能调优实战
YonchanLew
(1)JDK体系结构这个是JDK的体系结构,JDK包含JRE,JRE包含JVM,所以JDK无非就是一些工具集和支持java运行的类库以及java虚拟机java跨平台就是靠JVM进行的(2)JVM组成部分那么JVM由什么部分组成?由类装载子系统、运行时数据区、字节码执行引擎组成。先由类装载子系统加载class字节码文件到数据区(内存区)中,再由字节码执行引擎执行内存区中的代码附上官方文档,这里教一下
- Linux系统性能调优技巧
A_aspectJ项目开发
JavaWeb技术网络工具linux运维服务器
前言Linux系统因其稳定性和灵活性广泛应用于服务器、开发环境和企业级应用中。然而,为了确保最佳性能,尤其是在负载较高的情况下,系统调优变得至关重要。Linux系统性能调优技巧主要包括硬件优化、软件优化、内核参数优化、进程管理优化等方面。一、硬件优化:内存优化:增加物理内存是最直接的方法,同时可以通过优化内存使用策略来减少内存的浪费,使用内存管理工具如free、vmstat等来监控和调整内存
- Java面试题--JVM大厂篇之高并发Java应用的秘密武器:深入剖析GC优化实战案例
青云交
Java大厂面试题Java虚拟机(JVM)专栏Javajavajvm不同场景中优化CMSGC高并发Java应用的秘密武器CMSGC电商实战优化案例CMSGC大数据优化案例CMSGC金融系统优化案例
引言:晚上好,Java开发者们!在高并发的现代应用中,垃圾回收器(GC)是Java性能优化的重要环节。尤其在CMS(ConcurrentMark-Sweep)GC曾经担任主角的日子里,适当的调优和优化措施至关重要。本篇文章将通过三个实际案例,探讨如何在不同场景中优化CMSGC,为你揭示Java性能调优的秘密。vQingYunJiao,无论你是新手还是资深工程师,希望这篇文章能为你提供实践中的宝贵经
- Java面试题--JVM大厂篇之掌握JVM性能优化:选择合适的垃圾回收器
青云交
Java大厂面试题Java虚拟机(JVM)专栏Java技术栈JVM串行垃圾回收器并行垃圾回收器并发标记清除垃圾回收器GarbageFirst选择合适的垃圾回收器GC
掌握JVM性能优化:选择合适的垃圾回收器引言: 在Java开发中,性能优化往往是提高应用稳定性和用户体验的关键所在。而垃圾回收器的选择和优化,是JVM性能调优的核心环节。如何在众多垃圾回收器中选出适合自己应用需求的那一个?如何通过合理配置和监控,最大限度地提升系统效率?本文将为你详细解析。正文:1.了解不同垃圾回收器的特点SerialGC(串行垃圾回收器):适用场景:小型单线程应用。优点:实现简
- Java 入门指南:初识 JVM Java虚拟机(Java Virtual Machine)
ZachOn1y
Javajavajvm开发语言后端个人开发java-ee
文章目录引言JVM架构类加载器子系统(ClassLoaderSubsystem)运行时数据区(RuntimeDataArea)执行引擎(ExecutionEngine)垃圾回收器(GarbageCollector)内存管理堆内存方法区垃圾回收机制性能调优总结引言Java虚拟机(JVM)是一种抽象计算模型,它在软件层面模拟了一个计算机,允许开发者编写平台无关的程序。Java程序被编译成一种中间表示—
- @Slf4j注解 - javaweb日志记录
需要重新演唱
webweb日志注解
1.引言在现代的JavaWeb开发中,日志记录是一个非常重要的组成部分。良好的日志记录可以帮助开发者快速定位问题、监控系统运行状态以及进行性能调优。@Slf4j注解是Lombok库提供的一个便捷工具,用于简化日志记录的代码编写。本文将详细讲解@Slf4j注解的相关内容,包括其概念、使用方法以及一些最佳实践。2.什么是Lombok?Lombok是一个Java库,它通过注解的方式帮助开发者减少样板代码
- Linux系统性能调优技巧
Min_nna
ai分析android
Linux系统性能调优是一个复杂而广泛的主题,涉及多个方面,包括CPU、内存、磁盘I/O、网络等。以下是一些常用的Linux性能调优技巧,帮助你优化系统性能。1.CPU调优调整CPU调度器:使用cpupower或cpufrequtils工具调整CPU的调度策略,以适应特定应用的需求,例如设置为“性能”模式。使用nice和renice:在启动进程时使用nice命令来调整进程的优先级。renice可以
- Java中的性能调优技巧与工具推荐
省赚客APP开发者@聚娃科技
java开发语言
Java中的性能调优技巧与工具推荐大家好,我是免费搭建查券返利机器人省钱赚佣金就用微赚淘客系统3.0的小编,也是冬天不穿秋裤,天冷也要风度的程序猿!今天我们来探讨Java中的性能调优技巧与工具推荐。Java作为一门广泛应用的编程语言,性能问题是开发者不可忽视的一个方面。通过合理的性能调优,可以显著提升应用程序的响应速度和资源利用效率。1.性能调优的必要性性能调优是指通过一系列的方法和工具,对应用程
- 11 个简单的 Java 性能调优技巧,傻瓜都能学会!这就是你和P7相差的距离!
javap
1.在你知道必要之前不要优化2.使用分析器查找真正的瓶颈3.为整个应用程序创建性能测试套件4.首先处理最大的瓶颈5.使用StringBuilder以编程方式连接String6.使用+连接一个语句中的String7.尽可能使用基元8.试着避免BigInteger和BigDecimal9.首先检查当前日志级别10.使用ApacheCommonsStringUtils.Replace而不是String.
- JVM性能调优之5种垃圾收集器
golove666
后端垃圾回收JVM性能调优Java
JDK垃圾收集器一、SerialGC垃圾收集器SerialGC的工作原理SerialGC的特点SerialGC的配置参数SerialGC的适用场景SerialGC的优缺点优点:缺点:SerialGC的总结二、ParallelGC垃圾收集器ParallelGC的工作原理ParallelGC的特点ParallelGC的配置参数ParallelGC的适用场景ParallelGC的优缺点优点:缺点:总结三
- Linux 性能调优技巧
云夏之末
运维linux运维服务器
1理解Linux性能的基本组成CPU使用率:衡量CPU在单位时间内被占用的程度。内存使用:关注的是活跃内存与缓存内存的比例,以及是否有过多的交换。I/O性能:磁盘读写速度直接影响应用程序的响应时间和吞吐量。网络性能:数据包的丢失率、延迟和带宽都是衡量标准。内核与进程管理:内核如何调度进程、管理内存、处理中断等都会影响性能。2.CPU性能调优处理器亲和性:taskset命令用于将进程固定到特定的CP
- 利用Spring Boot Actuator进行应用性能调优
潘多编程
springboot后端java
引言在现代的微服务架构中,SpringBoot因其便捷性和可扩展性而广受欢迎。SpringBootActuator模块更是为开发者提供了无需编写额外代码即可监控和管理应用程序的能力。本文将探讨如何使用SpringBootActuator来优化应用性能,包括如何配置、监控以及利用其提供的端点来进行调优。SpringBootActuator简介SpringBootActuator是一个可以让你轻松地暴
- 【操作系统】详述linux系统性能调优及技巧
Dylanioucn
linux性能优化
Linux系统性能调优是一个涉及多个方面的复杂过程,包括CPU、内存、磁盘I/O、网络等多个方面的优化。以下是一些常用的性能调优技巧和方法:性能监控基础:使用top、htop、vmstat、iostat和sar等工具来监控系统性能,这些工具可以帮助你全面掌握系统的实时状态。CPU性能调优:优化进程调度,调整调度策略。限制CPU密集型进程,使用cpulimit限制进程的CPU使用率。使用taskse
- JVM性能调优监控工具jps、jstack、jmap、jhat、jstat使用详解
web718
Java
JDK本身提供了很多方便的JVM性能调优监控工具,除了集成式的VisualVM和jConsole外,还有jps、jstack、jmap、jhat、jstat等小巧的工具,本博客希望能起抛砖引玉之用,让大家能开始对JVM性能调优的常用工具有所了解。现实企业级Java开发中,有时候我们会碰到下面这些问题:OutOfMemoryError,内存不足内存泄露线程死锁锁争用(LockContention)J
- 【Linux】Linux系统性能调优技巧
大雨淅淅
linuxlinux
目录一、Linux系统性能指标二、Linux系统性能调优技巧2.1保持系统更新2.2磁盘I/O性能优化2.3内存管理调整2.4关闭不必要的服务2.5进程资源限制2.6网络性能调整2.7监控和分析工具2.8编译器优化2.9预读取和写入缓存2.10内核参数调整2.11性能分析工具2.12NUMA优化2.13数据库性能调优2.14使用交换空间2.15更新和维护2.16负载均衡和分布式计算2.17使用固态
- ethtool如何让接口闪灯_ethtool原理介绍和解决网卡丢包排查思路
waytobethunder
ethtool如何让接口闪灯
前言之前记录过处理因为LVS网卡流量负载过高导致软中断发生丢包的问题,RPS和RFS网卡多队列性能调优实践,对一般人来说压力不大的情况下其实碰见的概率并不高。这次想分享的话题是比较常见服务器网卡丢包现象排查思路,如果你是想了解点对点的丢包解决思路涉及面可能就比较广,不妨先参考之前的文章如何使用MTR诊断网络问题,对于Linux常用的网卡丢包分析工具自然是ethtool。更新历史2020年06月22
- Linux性能调优:如何优化NAT性能?
小小小糖果人
Linux性能优化linux
1、NAT的目的由于IPV4地址短缺,为解决公网IP地址短缺的问题,所以诞生了NAT技术,来重写IP数据包源IP或者目的IP。2、NAT分类静态NAT,即内网IP与公网IP是一对一的永久映射关系;动态NAT,即内网IP从公网IP池中,动态选择一个进行映射;网络地址端口转换NAPT(NetworkAddressandPortTranslation),即把内网IP映射到公网IP的不同端口上,让多个内网
- 阅读APUE需要考虑的问题
m风满楼
在io部分,每一章都提到了效率问题,用户cpu时间,系统cpu时间始终时间,这些都将称为程序性能调优的一些关键点=========================================================================第一章文件I/O系统调用和库调用文件属性指什么进程的工作目录是什么,相对路径指什么文件描述符是什么不用缓冲的i/o真的不用缓冲吗?答:当一个进
- Linux系统性能调优技巧
jie201107
linux
Linux系统性能调优是一个复杂的过程,涉及到多个层面的优化,包括硬件、操作系统、应用程序等。以下是一些常见的Linux系统性能调优技巧:1.**监控系统性能**:-使用工具如`top`,`htop`,`vmstat`,`iostat`,`mpstat`,`netstat`等来监控系统资源使用情况。2.**优化磁盘I/O**:-使用`noatime`挂载选项减少磁盘写入。-调整`swappines
- java jmap jstat_JVM性能调优监控工具jps、jstack、jstat、jmap、jinfo使用详解
小五咔咔咔
javajmapjstat
是什么jps查看所有的jvm进程,包括进程ID,进程启动的路径等等。我自己也用PS,即:ps-ef|grepjavajstack观察jvm中当前所有线程的运行情况和线程当前状态。系统崩溃了?如果java程序崩溃生成core文件,jstack工具可以用来获得core文件的javastack和nativestack的信息,从而可以轻松地知道java程序是如何崩溃和在程序何处发生问题。系统hung住了?
- Linux 系统性能调优 1
Wade_Crab
linux
Linux系统性能调优涉及多个方面,包括CPU、内存、I/O子系统、网络等。以下是一些常见的Linux系统性能调优技巧,可以帮助提升系统的整体性能。###1.**CPU调优**-**CPU绑定(CPUAffinity)**:通过`taskset`或`cgroups`设置进程或线程与特定CPU核心绑定,减少上下文切换带来的开销。-**CPU频率调节**:利用`cpufreq`工具,选择适当的CPU调
- 汇总:20个Linux服务器性能调优技巧
开源Linux
数据库linuxjava大数据mysql
Linux是一种开源操作系统,它支持各种硬件平台,Linux服务器全球知名,它和Windows之间最主要的差异在于,Linux服务器默认情况下一般不提供GUI(图形用户界面),而是命令行界面,它的主要目的是高效处理非交互式进程,响应时间并不是那么重要,相反,能够长时间处理高负载才是最关键的。Linux高可用服务器集群解决方案让IT系统管理员可以从容应对许多常见的硬件和软件故障,允许多台计算机一起工
- Spring Boot 一个极简且完整的后台框架
搬砖养女人
数据库架构javaspringsqltomcat
一个完整的极简后台框架,方便做小项目的时候可以快速开发。这里面多贴图片和代码,做个参考吧,代码可以下载下来自己看看,里面这套后台模板不错,喜欢的拿去。先放几张图imageimageimage项目介绍SpringBoot,实现了一个极简单的后台框架image小编提供免费的Java架构学习资料(里面有高可用、高并发、高性能及分布式、Jvm性能调优、Spring源码,MyBatis,Netty,Redi
- Kafka命令详解:从零开始,掌握Kafka集群管理、主题操作与监控的全方位技能,理解每一条命令背后的逻辑与最佳实践
长风清留扬
大数据KafkaLinuxkafka分布式linux大数据命令模式
本文主要是关于Kafka的命令详解,每个命令都进行了非常详细的注释,帮助大家能更好的理解这些命令背后的含义,从底层去理解,如果大家喜欢,请多多点赞关注,欢迎评论!为大家推荐几篇比较好的Kafka文章:Kafka分布式集群部署实战:跨越理论,直击生产环境部署难题与解决方案,性能调优、监控与管理策略大揭秘,轻松上手分布式消息中间件-CSDN博客ApacheKafka是一个开源的分布式消息系统,也是一个
- Linux系统性能调优技巧
shiming8879
linuxjava服务器
Linux系统性能调优技巧Linux系统作为服务器和桌面操作系统的主流选择之一,其性能调优是系统管理员和开发人员的重要任务。一个优化良好的Linux系统可以显著提高系统的运行效率和稳定性,从而为用户提供更好的使用体验。本文将从硬件、软件、内核参数、进程管理等多个方面详细介绍Linux系统性能调优的技巧,并给出具体的实施步骤和注意事项。一、硬件优化1.内存优化内存是系统性能的关键因素之一。优化内存使
- Linux系统性能调优详细讲解和案例示范
J老熊
linux服务器java运维开发面试
Linux系统以其稳定性和高效性广受欢迎,但在实际使用过程中,随着负载的增加,性能问题也不可避免地出现。本文将深入探讨Linux系统性能调优的核心概念,介绍一些常用的性能定位命令,并结合实际案例详细说明如何解决常见的性能问题。一、性能调优概述在Linux系统中,性能调优是确保系统在高负载下依然能够稳定、高效运行的重要环节。调优的目标包括优化系统资源的利用率(如CPU、内存、磁盘和网络),减少瓶颈,
- Kafka快速入门:Kafka驱动JavaApi的使用
不止会JS
Java中间件kafkajava
生产者和消费者是Kafka的核心概念之一,它们在客户端被创建和使用,并且包含了许多与Kafka性能和机制相关的配置。虽然Kafka提供的命令行工具能够执行许多基本操作,但它无法实现所有可能的性能优化。相比之下,使用JavaAPI可以充分利用编程语言的灵活性,对生产者和消费者进行更精细的性能调优。对于大多数中间件,熟悉服务器的命令行操作可能足以帮助学习其API的使用。然而,Kafka则不同,要全面掌
- Java虚拟机(JVM)性能调优指南
NAMELZX
javajvm开发语言
Java虚拟机(JVM)是Java平台的核心组件,负责运行Java程序。JVM性能调优对于确保应用程序性能至关重要。在本文中,我们将探讨如何对JVM进行有效的调优,以优化内存使用和提高应用程序性能。##JVM调优的重要性-**内存管理**:合理分配和管理堆内存、栈内存和直接内存。-**垃圾收集**:选择合适的垃圾收集器,减少GC(垃圾收集)暂停时间。-**性能监控**:实时监控JVM性能,快速定位
- 深入浅出Java Annotation(元注解和自定义注解)
Josh_Persistence
Java Annotation元注解自定义注解
一、基本概述
Annontation是Java5开始引入的新特征。中文名称一般叫注解。它提供了一种安全的类似注释的机制,用来将任何的信息或元数据(metadata)与程序元素(类、方法、成员变量等)进行关联。
更通俗的意思是为程序的元素(类、方法、成员变量)加上更直观更明了的说明,这些说明信息是与程序的业务逻辑无关,并且是供指定的工具或
- mysql优化特定类型的查询
annan211
java工作mysql
本节所介绍的查询优化的技巧都是和特定版本相关的,所以对于未来mysql的版本未必适用。
1 优化count查询
对于count这个函数的网上的大部分资料都是错误的或者是理解的都是一知半解的。在做优化之前我们先来看看
真正的count()函数的作用到底是什么。
count()是一个特殊的函数,有两种非常不同的作用,他可以统计某个列值的数量,也可以统计行数。
在统
- MAC下安装多版本JDK和切换几种方式
棋子chessman
jdk
环境:
MAC AIR,OS X 10.10,64位
历史:
过去 Mac 上的 Java 都是由 Apple 自己提供,只支持到 Java 6,并且OS X 10.7 开始系统并不自带(而是可选安装)(原自带的是1.6)。
后来 Apple 加入 OpenJDK 继续支持 Java 6,而 Java 7 将由 Oracle 负责提供。
在终端中输入jav
- javaScript (1)
Array_06
JavaScriptjava浏览器
JavaScript
1、运算符
运算符就是完成操作的一系列符号,它有七类: 赋值运算符(=,+=,-=,*=,/=,%=,<<=,>>=,|=,&=)、算术运算符(+,-,*,/,++,--,%)、比较运算符(>,<,<=,>=,==,===,!=,!==)、逻辑运算符(||,&&,!)、条件运算(?:)、位
- 国内顶级代码分享网站
袁潇含
javajdkoracle.netPHP
现在国内很多开源网站感觉都是为了利益而做的
当然利益是肯定的,否则谁也不会免费的去做网站
&
- Elasticsearch、MongoDB和Hadoop比较
随意而生
mongodbhadoop搜索引擎
IT界在过去几年中出现了一个有趣的现象。很多新的技术出现并立即拥抱了“大数据”。稍微老一点的技术也会将大数据添进自己的特性,避免落大部队太远,我们看到了不同技术之间的边际的模糊化。假如你有诸如Elasticsearch或者Solr这样的搜索引擎,它们存储着JSON文档,MongoDB存着JSON文档,或者一堆JSON文档存放在一个Hadoop集群的HDFS中。你可以使用这三种配
- mac os 系统科研软件总结
张亚雄
mac os
1.1 Microsoft Office for Mac 2011
大客户版,自行搜索。
1.2 Latex (MacTex):
系统环境:https://tug.org/mactex/
&nb
- Maven实战(四)生命周期
AdyZhang
maven
1. 三套生命周期 Maven拥有三套相互独立的生命周期,它们分别为clean,default和site。 每个生命周期包含一些阶段,这些阶段是有顺序的,并且后面的阶段依赖于前面的阶段,用户和Maven最直接的交互方式就是调用这些生命周期阶段。 以clean生命周期为例,它包含的阶段有pre-clean, clean 和 post
- Linux下Jenkins迁移
aijuans
Jenkins
1. 将Jenkins程序目录copy过去 源程序在/export/data/tomcatRoot/ofctest-jenkins.jd.com下面 tar -cvzf jenkins.tar.gz ofctest-jenkins.jd.com &
- request.getInputStream()只能获取一次的问题
ayaoxinchao
requestInputstream
问题:在使用HTTP协议实现应用间接口通信时,服务端读取客户端请求过来的数据,会用到request.getInputStream(),第一次读取的时候可以读取到数据,但是接下来的读取操作都读取不到数据
原因: 1. 一个InputStream对象在被读取完成后,将无法被再次读取,始终返回-1; 2. InputStream并没有实现reset方法(可以重
- 数据库SQL优化大总结之 百万级数据库优化方案
BigBird2012
SQL优化
网上关于SQL优化的教程很多,但是比较杂乱。近日有空整理了一下,写出来跟大家分享一下,其中有错误和不足的地方,还请大家纠正补充。
这篇文章我花费了大量的时间查找资料、修改、排版,希望大家阅读之后,感觉好的话推荐给更多的人,让更多的人看到、纠正以及补充。
1.对查询进行优化,要尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。
2.应尽量避免在 where
- jsonObject的使用
bijian1013
javajson
在项目中难免会用java处理json格式的数据,因此封装了一个JSONUtil工具类。
JSONUtil.java
package com.bijian.json.study;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
- [Zookeeper学习笔记之六]Zookeeper源代码分析之Zookeeper.WatchRegistration
bit1129
zookeeper
Zookeeper类是Zookeeper提供给用户访问Zookeeper service的主要API,它包含了如下几个内部类
首先分析它的内部类,从WatchRegistration开始,为指定的znode path注册一个Watcher,
/**
* Register a watcher for a particular p
- 【Scala十三】Scala核心七:部分应用函数
bit1129
scala
何为部分应用函数?
Partially applied function: A function that’s used in an expression and that misses some of its arguments.For instance, if function f has type Int => Int => Int, then f and f(1) are p
- Tomcat Error listenerStart 终极大法
ronin47
tomcat
Tomcat报的错太含糊了,什么错都没报出来,只提示了Error listenerStart。为了调试,我们要获得更详细的日志。可以在WEB-INF/classes目录下新建一个文件叫logging.properties,内容如下
Java代码
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHa
- 不用加减符号实现加减法
BrokenDreams
实现
今天有群友发了一个问题,要求不用加减符号(包括负号)来实现加减法。
分析一下,先看最简单的情况,假设1+1,按二进制算的话结果是10,可以看到从右往左的第一位变为0,第二位由于进位变为1。
 
- 读《研磨设计模式》-代码笔记-状态模式-State
bylijinnan
java设计模式
声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/
/*
当一个对象的内在状态改变时允许改变其行为,这个对象看起来像是改变了其类
状态模式主要解决的是当控制一个对象状态的条件表达式过于复杂时的情况
把状态的判断逻辑转移到表示不同状态的一系列类中,可以把复杂的判断逻辑简化
如果在
- CUDA程序block和thread超出硬件允许值时的异常
cherishLC
CUDA
调用CUDA的核函数时指定block 和 thread大小,该大小可以是dim3类型的(三维数组),只用一维时可以是usigned int型的。
以下程序验证了当block或thread大小超出硬件允许值时会产生异常!!!GPU根本不会执行运算!!!
所以验证结果的正确性很重要!!!
在VS中创建CUDA项目会有一个模板,里面有更详细的状态验证。
以下程序在K5000GPU上跑的。
- 诡异的超长时间GC问题定位
chenchao051
jvmcmsGChbaseswap
HBase的GC策略采用PawNew+CMS, 这是大众化的配置,ParNew经常会出现停顿时间特别长的情况,有时候甚至长到令人发指的地步,例如请看如下日志:
2012-10-17T05:54:54.293+0800: 739594.224: [GC 739606.508: [ParNew: 996800K->110720K(996800K), 178.8826900 secs] 3700
- maven环境快速搭建
daizj
安装mavne环境配置
一 下载maven
安装maven之前,要先安装jdk及配置JAVA_HOME环境变量。这个安装和配置java环境不用多说。
maven下载地址:http://maven.apache.org/download.html,目前最新的是这个apache-maven-3.2.5-bin.zip,然后解压在任意位置,最好地址中不要带中文字符,这个做java 的都知道,地址中出现中文会出现很多
- PHP网站安全,避免PHP网站受到攻击的方法
dcj3sjt126com
PHP
对于PHP网站安全主要存在这样几种攻击方式:1、命令注入(Command Injection)2、eval注入(Eval Injection)3、客户端脚本攻击(Script Insertion)4、跨网站脚本攻击(Cross Site Scripting, XSS)5、SQL注入攻击(SQL injection)6、跨网站请求伪造攻击(Cross Site Request Forgerie
- yii中给CGridView设置默认的排序根据时间倒序的方法
dcj3sjt126com
GridView
public function searchWithRelated() {
$criteria = new CDbCriteria;
$criteria->together = true; //without th
- Java集合对象和数组对象的转换
dyy_gusi
java集合
在开发中,我们经常需要将集合对象(List,Set)转换为数组对象,或者将数组对象转换为集合对象。Java提供了相互转换的工具,但是我们使用的时候需要注意,不能乱用滥用。
1、数组对象转换为集合对象
最暴力的方式是new一个集合对象,然后遍历数组,依次将数组中的元素放入到新的集合中,但是这样做显然过
- nginx同一主机部署多个应用
geeksun
nginx
近日有一需求,需要在一台主机上用nginx部署2个php应用,分别是wordpress和wiki,探索了半天,终于部署好了,下面把过程记录下来。
1. 在nginx下创建vhosts目录,用以放置vhost文件。
mkdir vhosts
2. 修改nginx.conf的配置, 在http节点增加下面内容设置,用来包含vhosts里的配置文件
#
- ubuntu添加admin权限的用户账号
hongtoushizi
ubuntuuseradd
ubuntu创建账号的方式通常用到两种:useradd 和adduser . 本人尝试了useradd方法,步骤如下:
1:useradd
使用useradd时,如果后面不加任何参数的话,如:sudo useradd sysadm 创建出来的用户将是默认的三无用户:无home directory ,无密码,无系统shell。
顾应该如下操作:
- 第五章 常用Lua开发库2-JSON库、编码转换、字符串处理
jinnianshilongnian
nginxlua
JSON库
在进行数据传输时JSON格式目前应用广泛,因此从Lua对象与JSON字符串之间相互转换是一个非常常见的功能;目前Lua也有几个JSON库,本人用过cjson、dkjson。其中cjson的语法严格(比如unicode \u0020\u7eaf),要求符合规范否则会解析失败(如\u002),而dkjson相对宽松,当然也可以通过修改cjson的源码来完成
- Spring定时器配置的两种实现方式OpenSymphony Quartz和java Timer详解
yaerfeng1989
timerquartz定时器
原创整理不易,转载请注明出处:Spring定时器配置的两种实现方式OpenSymphony Quartz和java Timer详解
代码下载地址:http://www.zuidaima.com/share/1772648445103104.htm
有两种流行Spring定时器配置:Java的Timer类和OpenSymphony的Quartz。
1.Java Timer定时
首先继承jav
- Linux下df与du两个命令的差别?
pda158
linux
一、df显示文件系统的使用情况,与du比較,就是更全盘化。 最经常使用的就是 df -T,显示文件系统的使用情况并显示文件系统的类型。 举比例如以下: [root@localhost ~]# df -T Filesystem Type &n
- [转]SQLite的工具类 ---- 通过反射把Cursor封装到VO对象
ctfzh
VOandroidsqlite反射Cursor
在写DAO层时,觉得从Cursor里一个一个的取出字段值再装到VO(值对象)里太麻烦了,就写了一个工具类,用到了反射,可以把查询记录的值装到对应的VO里,也可以生成该VO的List。
使用时需要注意:
考虑到Android的性能问题,VO没有使用Setter和Getter,而是直接用public的属性。
表中的字段名需要和VO的属性名一样,要是不一样就得在查询的SQL中
- 该学习笔记用到的Employee表
vipbooks
oraclesql工作
这是我在学习Oracle是用到的Employee表,在该笔记中用到的就是这张表,大家可以用它来学习和练习。
drop table Employee;
-- 员工信息表
create table Employee(
-- 员工编号
EmpNo number(3) primary key,
-- 姓