- Linux内存管理--系列文章柒——硬件架构
csdn_dyq111
Linuxlinux硬件架构
一、引子之前文章讲解的是系统的虚拟内存,本章讲述这些硬件的架构和系统怎样统一管理这些硬件的。二、物理内存模型物理内存模型描述了计算机系统中的物理内存如何由操作系统组织和管理。它定义了物理内存如何划分为单元,如何寻址这些单元以及如何将它们映射到虚拟内存地址。物理内存模型对于确保高效和可靠的内存管理至关重要。物理内存模型对操作系统管理内存分配、虚拟内存映射和内存访问模式产生重大影响。它会影响内存碎片化
- Linux内存管理--系列文章八——内存管理架构
csdn_dyq111
Linuxlinux架构
一、引子上篇文章讲述了目前内存的硬件架构,本篇阐述内核中是怎么表示不同架构的物理内存页。二、平坦内存模型(FlatMemoryModel)在该模型下,物理内存是连续的,所以物理地址也是连续的。这时内核使用structpage*mem_map的全局数组来统一管理整个物理内存,page结构体代表的是每一个内存页的具体属性。如图:structpage{unsignedlongflags;/*Atomic
- 【Linux内存】Linux的内存管理机制
Stay_Hun_forward
linux驱动开发
Linux内存管理机制不管是在用户空间还是在内核空间,程序代码一律不能直接访问物理地址。用户空间和内核空间访问必须要访问虚拟地址,只是各个空间对应的虚拟地址是不一样的。内核空间的设备驱动程序要想访问各个寄存器的物理地址,只需要将物理地址映射到内核空间的虚拟地址上,一旦映射成功,以后在内核空间的设备驱动程序中访问虚拟地址就是在访问对应的物理地址(MMU实现地址的转换)一个物理地址可以有多个虚拟地址,
- RK3568平台(内存篇)Linux内存管理
嵌入式_笔记
瑞芯微linux
一.什么是内存最直观的,我们买手机,电脑,内存条,都会标明内存是多大,例如途中的8G,16G,128G都指的内存大小。我们应该都听说过RAM存储器,它是一种半导体存储器件。RAM是英文单词Random的缩写,即“随机”的意思。所以RAM存储器也称为“随机存储器”。那么RAM存储器和内存有什么关系呢?内存就是许多RAM存储器的集合,就是将许多RAM存储器集成在一起的电路板。RAM存储器的优点是存取速
- Linux内存管理:CMA(连续内存分配)(DMA)
rtoax
【Linux内核】
目录什么是CMA数据结构CMA区域cma_areas的创建dts方式commandline方式将CMA区域添加到BuddySystemCMA分配《Linux内存管理:什么是CMA(contiguousmemoryallocation)连续内存分配器?可与DMA结合使用》《Linux内存管理:CMA(连续内存分配)》《Linux内存管理之CMA》什么是CMACMA是reserved的一块内存,用于分
- lv14 内核内存管理、动态分频及IO访问 12
4IOT
嵌入式开发linuxarm开发
一、内核内存管理框架内核将物理内存等分成N块4KB,称之为一页,每页都用一个structpage来表示,采用伙伴关系算法维护补充:Linux内存管理采用了虚拟内存机制,这个机制可以在内存有限的情况下提供更多可用的内存空间。每个进程都有自己独立的虚拟地址空间,应用程序只能访问自己的地址空间,而不能直接访问其他进程的地址空间或内核空间。当应用程序需要访问某些数据时,它会使用虚拟地址来引用这些数据。实际
- Linux内存管理:(十一)页面分配之慢速路径
显微镜下的内核
Linux内存管理篇linux
文章说明:Linux内核版本:5.0架构:ARM64参考资料及图片来源:《奔跑吧Linux内核》Linux5.0内核源码注释仓库地址:zhangzihengya/LinuxSourceCode_v5.0_study(github.com)1.水位管理和分配优先级页面分配器是按照zone的水位来管理的,zone的水位分成3个等级,分别是高水位(WMARK_HIGH)、低水位(WMARK_LOW)以及
- Linux内存管理:(十二)Linux 5.0内核新增的反碎片优化
显微镜下的内核
Linux内存管理篇linux
文章说明:Linux内核版本:5.0架构:ARM64参考资料及图片来源:《奔跑吧Linux内核》Linux5.0内核源码注释仓库地址:zhangzihengya/LinuxSourceCode_v5.0_study(github.com)外碎片化发生时,页面分配器还是会认为系统可以分配出内存,因为__zone_watermark_ok()函数会返回TRUE,但是我们认为系统应该及时采取一些补救措施
- linux的子系统
跟 屁 虫
Linux使用armlinux运维
文章目录前言1.宏观的五个子系统2.文件系统3.mtd前言1.宏观的五个子系统Linux内核主要由进程调度(SCHED)、内存管理(MM)、虚拟文件系统(VFS)、网络接口(NET)和进程间通信(IPC)5个子系统组成:进程调度进程调度控制系统中的多个进程对CPU的访问内存管理主要作用是控制多个进程安全地共享主内存区域(当CPU提供内存管理单元(MMU)时,Linux内存管理完成为每个进程进行虚拟
- Linux内存管理
YAOPRINCESS
的Markdown我真的服了,以后我会把笔记源码上传到其他地方,大家可以下载后用Typora看,我感觉这个软件不错6个段寄存器CSSSDSES/FS/GS保护模式下,16位的寄存器无法存放32位的段基地址段寄存器中存放的不是某个段的基地址,而是某个段的选择子(Selector)段基地址存放在段描述符表中状态和控制寄存器标志寄存器EFLAGS指令指针EIP4个控制寄存器CR0/1/2/3[图片上传失
- gitbook linux内存管理,附录一:常见问题总结
意呆
gitbooklinux内存管理
常见问题总结镜像相关如何批量清理临时镜像文件?答:可以使用dockerimageprune命令。如何查看镜像支持的环境变量?答:可以使用dockerrunIMAGEenv命令。本地的镜像文件都存放在哪里?答:与Docker相关的本地资源默认存放在/var/lib/docker/目录下,以overlay2文件系统为例,其中containers目录存放容器信息,image目录存放镜像信息,overla
- linux -- 内存管理 -- 页面分配器
三境界
操作系统嵌入式Linuxlinuxarm开发kernel
linux内存管理为什么要了解linux内存管理分配并使用内存,是内核程序与驱动程序中非常重要的一环。内存分配函数都依赖于内核中一个非常复杂而重要的组件-内存管理。linux驱动程序不可避免要与内核中的内存管理模块打交道。linux内存管理可以总体上分为两大块:一是对物理内存的管理,二是对虚拟内存的管理。物理内存管理对物理内存的定义,引入了三个概念:内存节点node,内存区域zone,内存页pag
- 一口气搞懂【Linux内存管理】,就靠这60张图、59个问题了
linux大本营
linux内存管理linux内核malloc内存
按:基于x86处理器上,以系统启动过程中内存管理的逐步构建为主轴,分析内存的管理方式与其相关的安全防护功能。1、如何知道计算机内存布局?内存空间有多少?春江水暖鸭先知,计算机上电启动的时候,BIOS会检测并计算物理内存大小。比方说现在通用的内存都是DIMM针脚插槽类型的,它的PIN针脚有两百多个,各个针脚各有自己的定义,BIOS就是通过对不同针脚的高低电平设置,由内存反馈其规格信息给BIOS,然后
- linux内存管理(十三)-内存规整过程分析
小坚学Linux
Linuxkernellinux内存管理linux内存管理
现在看看内存规整迁移再分配函数,__alloc_pages_direct_compact,函数在mm/page_alloc.c文件中:/*Trymemorycompactionforhigh-orderallocationsbeforereclaim*/staticstructpage*__alloc_pages_direct_compact(gfp_tgfp_mask,unsignedintor
- Linux内存管理:(八)页面迁移
显微镜下的内核
Linux内存管理篇linux
文章说明:Linux内核版本:5.0架构:ARM64参考资料及图片来源:《奔跑吧Linux内核》Linux5.0内核源码注释仓库地址:zhangzihengya/LinuxSourceCode_v5.0_study(github.com)1.可迁移页面页面迁移机制支持两大类内存页面:传统LRU页面,如匿名页面和文件映射页面非LRU页面,如zsmalloc或者virtio-balloon页面,以vi
- Linux内存管理:(九)内存规整
显微镜下的内核
Linux内存管理篇linux
文章说明:Linux内核版本:5.0架构:ARM64参考资料及图片来源:《奔跑吧Linux内核》Linux5.0内核源码注释仓库地址:zhangzihengya/LinuxSourceCode_v5.0_study(github.com)1.引言伙伴系统以页面为单位来管理内存,内存碎片也是基于页面的,即由大量离散且不连续的页面组成的。从内核角度来看,出现内存碎片不是好事情,有些情况下物理设备需要大
- 中移(苏州)软件技术有限公司面试问题与解答(2)—— Linux内核内存初始化的完整流程1
蓝天居士
面试面试
接前一篇文章:中移(苏州)软件技术有限公司面试问题与解答(1)——可信计算国密标准本文参考以下文章:启动期间的内存管理之初始化过程概述----Linux内存管理(九)Linux初始化特此致谢!本文对于中移(苏州)软件技术有限公司面试问题中的“(8)Linux内核内存初始化的完整流程。”进行解答与解析。实际上早有此心,把Linux内核尤其是进程管理、内存管理和文件系统的代码都筛一遍。但是一直由于种种
- 程序员必备知识(操作系统篇3-内存管理)
程序员耶耶
计算机基础我来了,我来了。(ૢ˃ꌂ˂⁎)本篇为大家介绍的是内存管理部分,涉及的知识点有:虚拟内存,内存分段,内存分页,简单分页,多级页表,页表缓存,Linux内存管理。本篇篇幅很长,共五千多字,16张图表。文章详细请参考B站@不秃头的程序员_,所以耐心点慢慢看,这篇的图表看着可能会很晕菜,慢慢理解咯。毕竟学习多是一件美逝啊~ヽ(。_°)ノ冲冲冲!操作系统篇3-内存管理虚拟内存先来了解一下单片机,单
- linux内存访问和页表建立,linux内存管理笔记(十二)----准备页表
李一雷
linux内存访问和页表建立
Linux是为通用的操作系统而设计,为了便于移植需要抽象出一些硬件细节,在驱动代码中看到大量的抽象层的思想。内核中只有和硬件相关的代码才会单独实现,这样做便于移植和添加新硬件。内核里所有进程和内核线程都共享1GB的地址空间,而每个应用程序对应的进程都有独立的3GB的地址空间,相互不干扰用户空间:在Linux中,每个用户进程都可以访问4GB的线性地址空间,从0到3GB的虚拟地址空间是用户空间,每个用
- Linux内存管理:(七)页面回收机制
显微镜下的内核
Linux内存管理篇linux
文章说明:Linux内核版本:5.0架构:ARM64参考资料及图片来源:《奔跑吧Linux内核》Linux5.0内核源码注释仓库地址:zhangzihengya/LinuxSourceCode_v5.0_study(github.com)1.触发页面回收Linux内核中触发页面回收的机制大致有3个:直接页面回收机制。在内核态里调用页面分配接口函数alloc_pages()分配物理页面时,由于系统内
- linux内存管理
一天开始了
c4g内存
内存分布1.代码区(text):可执行指令、字面值常量、具有常属性的全局和静态局部变量。只读。2.数据区(data):初始化的全局和静态局部变量。3.BSS区:未初始化的全局和静态局部变量。进程一经加载此区即被清0。数据区和BSS区有时被合称为全局区或静态区。4.堆区(heap):动态内存分配。从低地址向高地址扩展。5.栈区(stack):非静态局部变量,包括函数的参数和返回值。从高地址向低地址扩
- 深入理解Linux虚拟内存管理
许愿offer多多
linuxjava服务器前端运维ubuntu
1.简介在现代计算机系统中,内存管理是操作系统最核心的功能之一。Linux作为一种广泛使用的操作系统,其高效的内存管理机制使其在服务器和嵌入式系统中表现出色。虚拟内存管理是Linux内存管理的关键组成部分,它通过抽象化的层次将物理内存转换成为应用程序所见的虚拟内存。这篇文章旨在深入探讨Linux虚拟内存管理的工作原理和关键概念,为系统管理员和开发者提供深入的理解。2.虚拟内存的基础虚拟内存是一种内
- Linux内存管理(8):页回收和反向映射
张帅峰_
Linux内核/驱动linux
一、内存回收内存回收指的是物理内存紧缺以致可能无法满足新的内存分配请求时,内核想办法腾挪出一些空闲页面的处理机制,也叫页帧回收算法(PageFrameReclaimingAlgrithom,PFRA)。内存回收分为直接回收和周期性回收二种:前者在内存分配函数得不到满足时直接触发,后者是内核线程kswapd的周期性扫描和评估。高优先级的分配请求会忽略WMARK_MIN水位线而动用保留页面,高阶连续的
- Linux内存管理:(四)缺页异常处理
显微镜下的内核
Linux内存管理篇linux
文章说明:Linux内核版本:5.0架构:ARM64参考资料及图片来源:《奔跑吧Linux内核》Linux5.0内核源码注释仓库地址:zhangzihengya/LinuxSourceCode_v5.0_study(github.com)malloc()和mmap()只是建立了进程地址空间,没有建立虚拟内存和物理内存之间的映射关系,当进程访问这些还没有建立映射关系的虚拟内存时,处理器自动触发一个缺
- Linux内存管理:(六)页交换算法
显微镜下的内核
Linux内存管理篇linux
文章说明:Linux内核版本:5.0架构:ARM64参考资料及图片来源:《奔跑吧Linux内核》Linux5.0内核源码注释仓库地址:zhangzihengya/LinuxSourceCode_v5.0_study(github.com)1.引言在Linux操作系统中,当内存充足时,内核会尽量多地使用内存作为文件缓存(pagecache),从而提高系统的性能。文件缓存页面会添加到文件类型的LRU链
- linux内存管理-反向映射
wjx5210
linux
反向映射的需求正向映射是通过虚拟地址根据页表找到物理内存,反向映射就是通过物理地址找到哪些虚拟地址使用它。什么时候需要进行反向映射呢?在页面回收的时候,在还没有修改完所有引用该页帧的页表项之前是不可以将页帧swap到硬盘上。没有修改页表项但是物理页已经swapout了并且再次分配给其他申请者了,此时再次访问那访问的可能是其他上下文的数据,如果仅仅是脏数据也还好,但是如果访问到的是内核的数据或者其他
- Linux内存管理:(五)反向映射RMAP
显微镜下的内核
Linux内存管理篇linux
文章说明:Linux内核版本:5.0架构:ARM64参考资料及图片来源:《奔跑吧Linux内核》Linux5.0内核源码注释仓库地址:zhangzihengya/LinuxSourceCode_v5.0_study(github.com)1.前置知识:page数据结构中的相关字段本文主要对反向映射RMAP进行讲解,在讲解之前,我们先了解下page数据结构中与RMAP相关的几个字段:mapping:
- Linux内存管理-简述
心远气自静
linux性能四大相关子系统,cpu,内存,磁盘io,网络。内存的使用贯彻系统,任何活的东西都是活在内存中。内存的管理:段式管理+页式管理。段式管理,Linux中将段基址设为0,即兼容了intel的段的要求,又可以让不支持分段的架构能够绕过分段。这使得逻辑地址=线性地址。页式管理,是将物理内存分成固定大小的frame,然后通过mmu,在虚拟空间中页设成为同样大小page,一般是4K。随着物理内存越
- 一步一图带你深入理解 Linux 物理内存管理(上)
bin的技术小屋
1.前文回顾在上篇文章《深入理解Linux虚拟内存管理》中,笔者分别从进程用户态和内核态的角度详细深入地为大家介绍了Linux内核如何对进程虚拟内存空间进行布局以及管理的相关实现。在我们深入理解了虚拟内存之后,那么何不顺带着也探秘一下物理内存的管理呢?所以本文的目的是在深入理解虚拟内存管理的基础之上继续带大家向前奋进,一举击破物理内存管理的知识盲区,使大家能够俯瞰整个Linux内存管理子系统的整体
- 一步一图带你深入理解 Linux 物理内存管理(上)
bin的技术小屋
1.前文回顾在上篇文章《深入理解Linux虚拟内存管理》中,笔者分别从进程用户态和内核态的角度详细深入地为大家介绍了Linux内核如何对进程虚拟内存空间进行布局以及管理的相关实现。在我们深入理解了虚拟内存之后,那么何不顺带着也探秘一下物理内存的管理呢?所以本文的目的是在深入理解虚拟内存管理的基础之上继续带大家向前奋进,一举击破物理内存管理的知识盲区,使大家能够俯瞰整个Linux内存管理子系统的整体
- Java开发中,spring mvc 的线程怎么调用?
小麦麦子
springmvc
今天逛知乎,看到最近很多人都在问spring mvc 的线程http://www.maiziedu.com/course/java/ 的启动问题,觉得挺有意思的,那哥们儿问的也听仔细,下面的回答也很详尽,分享出来,希望遇对遇到类似问题的Java开发程序猿有所帮助。
问题:
在用spring mvc架构的网站上,设一线程在虚拟机启动时运行,线程里有一全局
- maven依赖范围
bitcarter
maven
1.test 测试的时候才会依赖,编译和打包不依赖,如junit不被打包
2.compile 只有编译和打包时才会依赖
3.provided 编译和测试的时候依赖,打包不依赖,如:tomcat的一些公用jar包
4.runtime 运行时依赖,编译不依赖
5.默认compile
依赖范围compile是支持传递的,test不支持传递
1.传递的意思是项目A,引用
- Jaxb org.xml.sax.saxparseexception : premature end of file
darrenzhu
xmlprematureJAXB
如果在使用JAXB把xml文件unmarshal成vo(XSD自动生成的vo)时碰到如下错误:
org.xml.sax.saxparseexception : premature end of file
很有可能时你直接读取文件为inputstream,然后将inputstream作为构建unmarshal需要的source参数。InputSource inputSource = new In
- CSS Specificity
周凡杨
html权重Specificitycss
有时候对于页面元素设置了样式,可为什么页面的显示没有匹配上呢? because specificity
CSS 的选择符是有权重的,当不同的选择符的样式设置有冲突时,浏览器会采用权重高的选择符设置的样式。
规则:
HTML标签的权重是1
Class 的权重是10
Id 的权重是100
- java与servlet
g21121
servlet
servlet 搞java web开发的人一定不会陌生,而且大家还会时常用到它。
下面是java官方网站上对servlet的介绍: java官网对于servlet的解释 写道
Java Servlet Technology Overview Servlets are the Java platform technology of choice for extending and enha
- eclipse中安装maven插件
510888780
eclipsemaven
1.首先去官网下载 Maven:
http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.2.3-bin.tar.gz
下载完成之后将其解压,
我将解压后的文件夹:apache-maven-3.2.3,
并将它放在 D:\tools目录下,
即 maven 最终的路径是:D:\tools\apache-mave
- jpa@OneToOne关联关系
布衣凌宇
jpa
Nruser里的pruserid关联到Pruser的主键id,实现对一个表的增删改,另一个表的数据随之增删改。
Nruser实体类
//*****************************************************************
@Entity
@Table(name="nruser")
@DynamicInsert @Dynam
- 我的spring学习笔记11-Spring中关于声明式事务的配置
aijuans
spring事务配置
这两天学到事务管理这一块,结合到之前的terasoluna框架,觉得书本上讲的还是简单阿。我就把我从书本上学到的再结合实际的项目以及网上看到的一些内容,对声明式事务管理做个整理吧。我看得Spring in Action第二版中只提到了用TransactionProxyFactoryBean和<tx:advice/>,定义注释驱动这三种,我承认后两种的内容很好,很强大。但是实际的项目当中
- java 动态代理简单实现
antlove
javahandlerproxydynamicservice
dynamicproxy.service.HelloService
package dynamicproxy.service;
public interface HelloService {
public void sayHello();
}
dynamicproxy.service.impl.HelloServiceImpl
package dynamicp
- JDBC连接数据库
百合不是茶
JDBC编程JAVA操作oracle数据库
如果我们要想连接oracle公司的数据库,就要首先下载oralce公司的驱动程序,将这个驱动程序的jar包导入到我们工程中;
JDBC链接数据库的代码和固定写法;
1,加载oracle数据库的驱动;
&nb
- 单例模式中的多线程分析
bijian1013
javathread多线程java多线程
谈到单例模式,我们立马会想到饿汉式和懒汉式加载,所谓饿汉式就是在创建类时就创建好了实例,懒汉式在获取实例时才去创建实例,即延迟加载。
饿汉式:
package com.bijian.study;
public class Singleton {
private Singleton() {
}
// 注意这是private 只供内部调用
private static
- javascript读取和修改原型特别需要注意原型的读写不具有对等性
bijian1013
JavaScriptprototype
对于从原型对象继承而来的成员,其读和写具有内在的不对等性。比如有一个对象A,假设它的原型对象是B,B的原型对象是null。如果我们需要读取A对象的name属性值,那么JS会优先在A中查找,如果找到了name属性那么就返回;如果A中没有name属性,那么就到原型B中查找name,如果找到了就返回;如果原型B中也没有
- 【持久化框架MyBatis3六】MyBatis3集成第三方DataSource
bit1129
dataSource
MyBatis内置了数据源的支持,如:
<environments default="development">
<environment id="development">
<transactionManager type="JDBC" />
<data
- 我程序中用到的urldecode和base64decode,MD5
bitcarter
cMD5base64decodeurldecode
这里是base64decode和urldecode,Md5在附件中。因为我是在后台所以需要解码:
string Base64Decode(const char* Data,int DataByte,int& OutByte)
{
//解码表
const char DecodeTable[] =
{
0, 0, 0, 0, 0, 0
- 腾讯资深运维专家周小军:QQ与微信架构的惊天秘密
ronin47
社交领域一直是互联网创业的大热门,从PC到移动端,从OICQ、MSN到QQ。到了移动互联网时代,社交领域应用开始彻底爆发,直奔黄金期。腾讯在过去几年里,社交平台更是火到爆,QQ和微信坐拥几亿的粉丝,QQ空间和朋友圈各种刷屏,写心得,晒照片,秀视频,那么谁来为企鹅保驾护航呢?支撑QQ和微信海量数据背后的架构又有哪些惊天内幕呢?本期大讲堂的内容来自今年2月份ChinaUnix对腾讯社交网络运营服务中心
- java-69-旋转数组的最小元素。把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。输入一个排好序的数组的一个旋转,输出旋转数组的最小元素
bylijinnan
java
public class MinOfShiftedArray {
/**
* Q69 旋转数组的最小元素
* 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。输入一个排好序的数组的一个旋转,输出旋转数组的最小元素。
* 例如数组{3, 4, 5, 1, 2}为{1, 2, 3, 4, 5}的一个旋转,该数组的最小值为1。
*/
publ
- 看博客,应该是有方向的
Cb123456
反省看博客
看博客,应该是有方向的:
我现在就复习以前的,在补补以前不会的,现在还不会的,同时完善完善项目,也看看别人的博客.
我刚突然想到的:
1.应该看计算机组成原理,数据结构,一些算法,还有关于android,java的。
2.对于我,也快大四了,看一些职业规划的,以及一些学习的经验,看看别人的工作总结的.
为什么要写
- [开源与商业]做开源项目的人生活上一定要朴素,尽量减少对官方和商业体系的依赖
comsci
开源项目
为什么这样说呢? 因为科学和技术的发展有时候需要一个平缓和长期的积累过程,但是行政和商业体系本身充满各种不稳定性和不确定性,如果你希望长期从事某个科研项目,但是却又必须依赖于某种行政和商业体系,那其中的过程必定充满各种风险。。。
所以,为避免这种不确定性风险,我
- 一个 sql优化 ([精华] 一个查询优化的分析调整全过程!很值得一看 )
cwqcwqmax9
sql
见 http://www.itpub.net/forum.php?mod=viewthread&tid=239011
Web翻页优化实例
提交时间: 2004-6-18 15:37:49 回复 发消息
环境:
Linux ve
- Hibernat and Ibatis
dashuaifu
Hibernateibatis
Hibernate VS iBATIS 简介 Hibernate 是当前最流行的O/R mapping框架,当前版本是3.05。它出身于sf.net,现在已经成为Jboss的一部分了 iBATIS 是另外一种优秀的O/R mapping框架,当前版本是2.0。目前属于apache的一个子项目了。 相对Hibernate“O/R”而言,iBATIS 是一种“Sql Mappi
- 备份MYSQL脚本
dcj3sjt126com
mysql
#!/bin/sh
# this shell to backup mysql
#
[email protected] (QQ:1413161683 DuChengJiu)
_dbDir=/var/lib/mysql/
_today=`date +%w`
_bakDir=/usr/backup/$_today
[ ! -d $_bakDir ] && mkdir -p
- iOS第三方开源库的吐槽和备忘
dcj3sjt126com
ios
转自
ibireme的博客 做iOS开发总会接触到一些第三方库,这里整理一下,做一些吐槽。 目前比较活跃的社区仍旧是Github,除此以外也有一些不错的库散落在Google Code、SourceForge等地方。由于Github社区太过主流,这里主要介绍一下Github里面流行的iOS库。 首先整理了一份
Github上排名靠
- html wlwmanifest.xml
eoems
htmlxml
所谓优化wp_head()就是把从wp_head中移除不需要元素,同时也可以加快速度。
步骤:
加入到function.php
remove_action('wp_head', 'wp_generator');
//wp-generator移除wordpress的版本号,本身blog的版本号没什么意义,但是如果让恶意玩家看到,可能会用官网公布的漏洞攻击blog
remov
- 浅谈Java定时器发展
hacksin
java并发timer定时器
java在jdk1.3中推出了定时器类Timer,而后在jdk1.5后由Dou Lea从新开发出了支持多线程的ScheduleThreadPoolExecutor,从后者的表现来看,可以考虑完全替代Timer了。
Timer与ScheduleThreadPoolExecutor对比:
1.
Timer始于jdk1.3,其原理是利用一个TimerTask数组当作队列
- 移动端页面侧边导航滑入效果
ini
jqueryWebhtml5cssjavascirpt
效果体验:http://hovertree.com/texiao/mobile/2.htm可以使用移动设备浏览器查看效果。效果使用到jquery-2.1.4.min.js,该版本的jQuery库是用于支持HTML5的浏览器上,不再兼容IE8以前的浏览器,现在移动端浏览器一般都支持HTML5,所以使用该jQuery没问题。HTML文件代码:
<!DOCTYPE html>
<h
- AspectJ+Javasist记录日志
kane_xie
aspectjjavasist
在项目中碰到这样一个需求,对一个服务类的每一个方法,在方法开始和结束的时候分别记录一条日志,内容包括方法名,参数名+参数值以及方法执行的时间。
@Override
public String get(String key) {
// long start = System.currentTimeMillis();
// System.out.println("Be
- redis学习笔记
MJC410621
redisNoSQL
1)nosql数据库主要由以下特点:非关系型的、分布式的、开源的、水平可扩展的。
1,处理超大量的数据
2,运行在便宜的PC服务器集群上,
3,击碎了性能瓶颈。
1)对数据高并发读写。
2)对海量数据的高效率存储和访问。
3)对数据的高扩展性和高可用性。
redis支持的类型:
Sring 类型
set name lijie
get name lijie
set na
- 使用redis实现分布式锁
qifeifei
在多节点的系统中,如何实现分布式锁机制,其中用redis来实现是很好的方法之一,我们先来看一下jedis包中,有个类名BinaryJedis,它有个方法如下:
public Long setnx(final byte[] key, final byte[] value) {
checkIsInMulti();
client.setnx(key, value);
ret
- BI并非万能,中层业务管理报表要另辟蹊径
张老师的菜
大数据BI商业智能信息化
BI是商业智能的缩写,是可以帮助企业做出明智的业务经营决策的工具,其数据来源于各个业务系统,如ERP、CRM、SCM、进销存、HER、OA等。
BI系统不同于传统的管理信息系统,他号称是一个整体应用的解决方案,是融入管理思想的强大系统:有着系统整体的设计思想,支持对所有
- 安装rvm后出现rvm not a function 或者ruby -v后提示没安装ruby的问题
wudixiaotie
function
1.在~/.bashrc最后加入
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
2.重新启动terminal输入:
rvm use ruby-2.2.1 --default
把当前安装的ruby版本设为默