- SpringSecurity初学总结
weixin_66442229
spring
springSecurity安全框架基于Java的安全框架主要有:SpringSecurity和Shiro介绍基础概念安全框架是对用户访问权限的控制,保证应用的安全性。其主要的工作是用户认证和用户授权|鉴权主要应用于Spring的企业应用系统,提供声明式的安全访问控制解决方案。它提供了一组可以在Spring应用上下文中配置的Bean能很好的结合Spring的DI依赖注入和AOP面向切面编程功能应用
- 《Android进阶之光》— Android 书籍
王睿丶
Android永无止境《Android进阶之光》Android书籍Androidphoenix移动开发
文章目录第1章Android新特性1第2章MaterialDesign48第3章View体系与自定义View87第4章多线程编程165第5章网络编程与网络框架204第6章设计模式271第7章事件总线308第8章函数响应式编程333第9章注解与依赖注入框架382第10章应用架构设计422第11章系统架构与MediaPlayer框架460出版年:2017-7简介:《Android进阶之光》是一本And
- 框架必知必会——Autofac概述及应用
Matrix Y
WPFwpfautofac
Autofac概述Autofac是一个依赖注入框架,它遵循控制反转(InversionofControl,IoC)原则,通过构造函数注入、属性注入等方式来管理对象的依赖关系。它的核心原理是将对象的创建和生命周期管理交给容器,而不是在代码中手动管理。Autofac的作用主要有以下几点解耦:通过依赖注入,将组件的创建和依赖关系从业务逻辑中分离,使代码更加模块化和可维护。管理生命周期:可以控制对象的生命
- 深入探究Spring Framework源码与核心组件
纸寿司
本文还有配套的精品资源,点击获取简介:SpringFramework是Java开发中广泛使用的框架,其源码的阅读和理解对于开发者来说是宝贵的学习资源。本文将介绍依赖注入、ApplicationContext、Bean生命周期、AOP、数据访问集成、MVC模式、注解驱动开发、测试支持、SpringBoot以及SpringCloud等关键概念。通过这些核心组件的学习,可以更好地掌握Spring的高级功
- VUE3学习 第五章 Teleport传送组件、keep-alive缓存组件、transition动画组件、transition-group过度、依赖注入Provide/Inject、兄弟组件Mitt
Hyman-ya
vue3+ts+vite学习缓存javascript
一、Teleport传送组件TeleportVue3.0新特性之一。Teleport是一种能够将我们的模板渲染至指定DOM节点,不受父级style、v-show等属性影响,但data、prop数据依旧能够共用的技术;类似于React的Portal。主要解决的问题因为Teleport节点挂载在其他指定的DOM节点下,完全不受父级style样式影响1.使用方法通过to属性插入指定元素位置to=“bod
- Java Web安全与Spring Config对象实战
福建低调
本文还有配套的精品资源,点击获取简介:本课程深入探讨JavaWeb开发中的安全实践,包括认证与授权、输入验证、CSRF和XSS防护以及SQL注入防御等关键安全措施。同时,介绍SpringSecurity框架的应用,以及Config对象在Spring配置管理中的作用,包括依赖注入和外部化配置。课程还包括实战演练,通过设置安全环境和安全漏洞模拟,帮助开发者提升应用的安全性和故障排查能力。1.Web安全
- Spring——依赖注入的注解解析器
招风的黑耳
后端
3.导入person和student-->会在纳入spring的bean范围内查找属性上是否存在@Resource(name="student")*如果存在:继续解析@Resource有没有name属性*如果没有name属性(就会在所属的属性上把属性的名称解析出来,会让属性的名称和spring中的bean中的id进行匹配*如果匹配成功,则把spring容器中相应的对象赋值给该属性*如果匹配不成功,
- FastAPI 深度指南:使用依赖注入处理分页和过滤逻辑
黑金IT
fastapifastapipython
在FastAPI框架中,Depends是一个关键的功能,它允许开发者通过依赖注入来管理和重用代码。这在处理API的分页和过滤逻辑时尤其有用,因为它可以将这些逻辑抽象化,从而减少冗余代码并提高效率。通过Depends,我们可以定义一个函数,该函数负责获取和验证分页参数(如skip和limit)以及过滤参数(如基于名称或价格的筛选)。在路由函数中,我们通过Depends将这些参数作为依赖项注入,Fas
- Spring基础
zzzzzzzziu
springjava后端
前言Spring是一个开源的Java平台,用于构建企业级应用程序。它提供了一系列的模块和工具,以简化Java应用程序的开发。Spring框架的核心特点是轻量级、灵活性和可扩展性。以下是Spring基础知识的详细概述:Spring概述开源框架:Spring是一个开源的Java平台,广泛用于企业级应用开发。核心特性:Spring通过依赖注入(DI)和面向切面编程(AOP)等技术,降低了组件之间的耦合度
- spring如何解决bean的循环依赖
fantasyYan2
springspringjava后端
通过三级缓存解决循环依赖问题。其中一级缓存用于存储完整的bean;二级缓存用于存储已经完成aop动态代理的bean,防止重复创建动态代理;三级缓存存储未实现aop动态代理和为实现依赖注入的bean。getBean()时先从一级缓存取,没有取二级,最后取三级。举个例子:A依赖B,B依赖A。首先创建A发现缓存中没有A,如图实例化A,然后发现A依赖B,把A放入三级缓存。开始创建B,发现B不在缓存中,实例
- 使用 Flutter 实现 MVVM 架构
陆业聪
flutter架构
文章目录一、什么是MVVM架构?二、MVVM架构设计三、代码案例3.1Model3.2ViewModel3.3View四、扩展MVVM架构4.1引入服务层4.2使用依赖注入4.3状态管理4.4遵循最佳实践五、实战案例:待办事项应用5.1Model5.2服务层5.3ViewModel5.4View六、使用Riverpod库实现一个基于MVVM架构的计数器应用6.1Model6.2ViewModel6
- 【spring】依赖注入之@Resource注入
程序java圈
springspringjava后端
@Resource注入本文源码基于spring-framework-5.3.10。源码位置:org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(PropertyValues,Object,String)除了指定BeanName的Bean在注入的时候会进行ByTy
- 习惯在Java使用Spring Boot,转golang之后,也可以简单又高效的开发高性能的web服务
zhuyasen
springbootgolangginrestful
如果你是一个Java开发者,你可能已经习惯了使用SpringBoot这个强大的框架来开发web服务。SpringBoot提供了很多便利的功能,如自动配置、依赖注入、安全管理、监控等,让你可以快速地构建和部署web应用。但是,如果你想尝试转向golang时,你会发现有很多的挑战和困难。golang是一种编译型的语言,它有着不同的语法、类型系统、并发模型、错误处理等,你需要花费很多时间和精力来学习和适
- Vue 3 中 provide 和 inject 高级用法与最佳实践
暖阳浅笑-嘿
vue.js前端javascript
《Vue3中provide和inject高级用法与最佳实践》一、基本概念二、高级用法(一)提供函数(二)响应式数据(三)多值提供三、最佳实践(一)封装通用服务(二)避免过度依赖(三)命名规范(四)结合Vuex四、实际应用场景(一)主题切换(二)国际化(三)全局配置五、注意事项(一)数据变更通知(二)依赖注入的层次(三)测试在Vue3的开发中,provide和inject是一对强大的功能,用于实现组
- Quartz.net-IJobFactory实现任务实例创建的依赖注入
tanzhenyuan
Quartz.net
在使用Quartz.net执行调度任务时,任务类必须实现IJob接口,如下`publicclassDLLExecutor:IJob{publicasyncTaskExecute(IJobExecutionContextcontext){//你的处理逻辑}}`具备如上任务类之后,需要做的就是与JobDetial、Trigger进行关联,为了精简,忽略JobDetial、Trigger相关属性设置,代
- Spring实现纯注解项目开发
dawn191228
JavaWebspringjava后端servlet
目录为什么使用注解开发?Spring开发中的常用注解Bean管理类常用的四个注解(作用相同,名称不同)依赖注入相关的注解(加在成员变量上)对象生命周期注解初始化方法和销毁方法其他注解代码示例1.导入Maven依赖2.创建实体类(用于接收从数据库中查询到的信息)3.编写Service层和Dao层查询3.1Service层3.2Dao层4.创建配置类(代替xml配置文件)5.在配置文件中开启注解扫描6
- IOC 容器
GG编程
java开发语言
基本概念:IOC(InversionofControl,控制反转)容器的原理基于一种设计模式,其中对象的创建和依赖关系的管理由容器负责,而不是在代码中手动创建对象和管理依赖。通过控制反转,应用程序的控制权从代码中“反转”到了容器中。IOC容器通过依赖注入(DI)机制实现这一原理。实现基于以下几个核心概念和技术:1.反射(Reflection)IOC容器利用反射来动态地创建对象并注入依赖。使用反射获
- Quartz .Net 配置以及Job使用依赖注入
FuSh1
.NetCorec#
使用扩展函数的方式在“Util”中进行配置,在WebHost/Host中进行使用。Util中的配置操作在Host中进行使用Host中的DefaultJobFactory以及QuartzJobUtil中的配置操作publicstaticIServiceCollectionConfigureQuartz(thisIServiceCollectioncollection,Listjobs,IJobFac
- Quartz.Net(2)——NetCore3.1整合Quartz.Net
contact97
.Net定时框架Quartz.NetNetCore
在上篇文章中Quartz.Net(1)已经介绍了Quartz.Net的基本运用,该篇文章中将主要介绍NetCore3.1如何整合Quartz.Net,在后台运行定时job,并运用到上篇文章讲到的介绍点。1导入Nuget包Quartz定时框架Quartz.Extensions.DependencyInjection用于在任务中导入其他的服务,整合使用NetCore的依赖注入框架Quartz.Exte
- Spring的IoC是什么?
super_crazy123
Spring15问javaspring
IOC就是控制反转,是指程序将创建对象的控制权转交给Spring框架进行管理,由Spring通过java的反射机制根据配置文件在运行时动态的创建实例,并管理各个实例之间的依赖关系。对象与对象之间松散耦合,有利于功能的扩展和复用。DI就是依赖注入,和控制反转是同一个概念的不同角度的描述,它是指程序在运行时由IoC容器来动态注入对象需要的外部依赖。Spring的IOC有两种注入方式:xml注入、注解注
- 全面解读 Spring 和 Spring MVC 常用注解
胡耀超
Springjava面试常见问题springmvcjava
Spring是一个功能强大的Java框架,用于构建企业级应用程序。SpringMVC是Spring框架的一部分,专注于构建基于Web的应用程序。为了有效地使用这些框架,了解常用注解及其应用场景至关重要。1.总体总结Spring框架和SpringMVC提供了大量注解,用于简化配置、依赖注入、面向切面编程(AOP)等任务。下表概述了一些常见的注解,按类别进行划分,包括核心Spring注解和Spring
- 【spring】Spring的aop
闲着无聊整些资料
Springspringjava后端
之前的文章中我们介绍了Spring的控制反转和依赖注入,今天来详细说说Spring的aop。aop(AspectOrientedProgramming)即面向切面编程,它是Spring提出的一种思想,是为了在不修改源代码的基础上对原代码进行增强,Springaop是aop思想的实现。我们知道java一贯接收的是OOP(ObjectOrientedProgramming,面向对象开发)思想,在开发过
- 系统架构分析
冰冰在努力
企业级技术系统架构c#asp.net.netcore.net
一、速通一图流二、系统架构功能、作用分析1.Furion:框架核心层功能:这是Furion框架的核心层,通常包含框架本身的基本功能和配置。这一层应该是比较稳定的,不应该包含业务逻辑,而是提供项目其他部分需要依赖的基础设施功能。作用:为整个应用程序提供通用的功能支持和框架级别的配置。例如,依赖注入配置、全局异常处理、日志管理等。2.Furion.Application:业务应用层功能:这一层主要负责
- Spring学习笔记——开篇
weixin_30699741
整体架构Spring核心容器Beans包含访问配置文件,通过Spring容器创建和管理Bean,进行依赖注入和控制反转操作相关所有类。Core包含Spring框架的基本核心工具类,Spring其它组件均需要使用该包,是其它组件的基本核心。Context为Spring核心提供扩展,能够找到使用SpringApplicationContext特性时需要的所有类;JNDI特性时需要的所有类;UI方面模板
- Java反射机制
Dream-kid
java开发语言
前言Java反射机制是Java语言提供的一种强大功能,允许在运行时动态检查和操作类的结构。与传统编程方式不同,反射使得程序能够在编译期不确定类型和方法的情况下,对类的构造函数、方法、字段等进行操作。这种灵活性在许多高级编程场景中至关重要,尤其是在框架开发、动态代理、依赖注入、测试工具和序列化等领域。通过反射,开发者可以编写出更加通用、灵活的代码,使应用程序具备更强的动态特性。然而,反射的使用也带来
- 八股文三(Spring、Spring Cloud Alibaba)
优秀的颜
面试宝典springjava
Spring篇什么是SpringSpring是个轻量级的框架,他有两大内核分别是IOC、AOPIOC是什么*依赖注入和控制反转,它是一种思想,创建对象不是直接new出来,而是交给IOC容器,由容器去创建进行管理,这就是控制反转,管理者统一由容器去管理,不是由使用者去管理。比如我们的service和dao层,我们不是直接new出来,而是交给Spring容器,然后通过@Authired注解进行注入,这
- 如何使用Spring IOC的注解进行开发
李李世界爱学Java
springjava后端
目录1、如何使用注解标记和扫描2、如何使用注解配置作用域和周期方法3、如何使用注解进行引用类型自动装配4、如何使用注解对基本类型属性赋值SpringIoC(InversionofControl,控制反转)容器通过注解提供了一种简洁且强大的方式来进行依赖注入和配置管理。注解开发使得Spring应用程序的配置更为简洁和直观,减少了XML配置的冗余和复杂性。注解本身并不能执行,注解本身仅仅只是做一个标记
- Spring中Bean的生命周期管理
angushine
springjava后端
Spring框架中的Bean生命周期是指从创建到销毁的整个过程。在这个过程中,Spring容器会负责管理Bean的状态和行为。以下是Spring中Bean生命周期的详细解释:实例化:Spring容器根据Bean的定义信息,通过反射机制创建Bean对象。设置属性值:Spring容器会根据Bean定义中的配置信息,为Bean对象设置属性值。这包括依赖注入的过程。调用BeanNameAware接口方法:
- Spring Boot使用拦截器(Interceptor)
xiaobai_cpp
javaspringboot后端java
文章目录定义拦截器注册拦截器注意事项 在SpringBoot中,拦截器(Interceptor)是另一种用于在请求被处理之前和之后执行代码的机制。与ServletFilter相比,拦截器是SpringMVC框架的一部分,它提供了更细粒度的控制,特别是针对SpringMVC的Controller层。拦截器可以访问Spring的依赖注入(DI)功能,因此可以轻松地与Spring管理的bean进行交互
- spring入门aop和ioc
eqa11
springjava后端
文章目录spring分层架构表现层服务层(业务层)持久层spring核心ioc(控制反转)1)**接下来是代码示例:**2)**ioc容器的使用过程**3)ioc中的bean管理4)实例化bean的三种方式aop(面向切面开发)定义优势AOP底层原理AOP相关的术语AOP入门aop注解开发aop纯注解开发Di(依赖注入)1)属性的set方法注入值的方式2)构造方法赋值的方法多配置文件多配置文件sp
- 对于规范和实现,你会混淆吗?
yangshangchuan
HotSpot
昨晚和朋友聊天,喝了点咖啡,由于我经常喝茶,很长时间没喝咖啡了,所以失眠了,于是起床读JVM规范,读完后在朋友圈发了一条信息:
JVM Run-Time Data Areas:The Java Virtual Machine defines various run-time data areas that are used during execution of a program. So
- android 网络
百合不是茶
网络
android的网络编程和java的一样没什么好分析的都是一些死的照着写就可以了,所以记录下来 方便查找 , 服务器使用的是TomCat
服务器代码; servlet的使用需要在xml中注册
package servlet;
import java.io.IOException;
import java.util.Arr
- [读书笔记]读法拉第传
comsci
读书笔记
1831年的时候,一年可以赚到1000英镑的人..应该很少的...
要成为一个科学家,没有足够的资金支持,很多实验都无法完成
但是当钱赚够了以后....就不能够一直在商业和市场中徘徊......
- 随机数的产生
沐刃青蛟
随机数
c++中阐述随机数的方法有两种:
一是产生假随机数(不管操作多少次,所产生的数都不会改变)
这类随机数是使用了默认的种子值产生的,所以每次都是一样的。
//默认种子
for (int i = 0; i < 5; i++)
{
cout<<
- PHP检测函数所在的文件名
IT独行者
PHP函数
很简单的功能,用到PHP中的反射机制,具体使用的是ReflectionFunction类,可以获取指定函数所在PHP脚本中的具体位置。 创建引用脚本。
代码:
[php]
view plain
copy
// Filename: functions.php
<?php&nbs
- 银行各系统功能简介
文强chu
金融
银行各系统功能简介 业务系统 核心业务系统 业务功能包括:总账管理、卡系统管理、客户信息管理、额度控管、存款、贷款、资金业务、国际结算、支付结算、对外接口等 清分清算系统 以清算日期为准,将账务类交易、非账务类交易的手续费、代理费、网络服务费等相关费用,按费用类型计算应收、应付金额,经过清算人员确认后上送核心系统完成结算的过程 国际结算系
- Python学习1(pip django 安装以及第一个project)
小桔子
pythondjangopip
最近开始学习python,要安装个pip的工具。听说这个工具很强大,安装了它,在安装第三方工具的话so easy!然后也下载了,按照别人给的教程开始安装,奶奶的怎么也安装不上!
第一步:官方下载pip-1.5.6.tar.gz, https://pypi.python.org/pypi/pip easy!
第二部:解压这个压缩文件,会看到一个setup.p
- php 数组
aichenglong
PHP排序数组循环多维数组
1 php中的创建数组
$product = array('tires','oil','spark');//array()实际上是语言结构而不 是函数
2 如果需要创建一个升序的排列的数字保存在一个数组中,可以使用range()函数来自动创建数组
$numbers=range(1,10)//1 2 3 4 5 6 7 8 9 10
$numbers=range(1,10,
- 安装python2.7
AILIKES
python
安装python2.7
1、下载可从 http://www.python.org/进行下载#wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
2、复制解压
#mkdir -p /opt/usr/python
#cp /opt/soft/Python-2
- java异常的处理探讨
百合不是茶
JAVA异常
//java异常
/*
1,了解java 中的异常处理机制,有三种操作
a,声明异常
b,抛出异常
c,捕获异常
2,学会使用try-catch-finally来处理异常
3,学会如何声明异常和抛出异常
4,学会创建自己的异常
*/
//2,学会使用try-catch-finally来处理异常
- getElementsByName实例
bijian1013
element
实例1:
<!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/1999/x
- 探索JUnit4扩展:Runner
bijian1013
java单元测试JUnit
参加敏捷培训时,教练提到Junit4的Runner和Rule,于是特上网查一下,发现很多都讲的太理论,或者是举的例子实在是太牵强。多搜索了几下,搜索到两篇我觉得写的非常好的文章。
文章地址:http://www.blogjava.net/jiangshachina/archive/20
- [MongoDB学习笔记二]MongoDB副本集
bit1129
mongodb
1. 副本集的特性
1)一台主服务器(Primary),多台从服务器(Secondary)
2)Primary挂了之后,从服务器自动完成从它们之中选举一台服务器作为主服务器,继续工作,这就解决了单点故障,因此,在这种情况下,MongoDB集群能够继续工作
3)挂了的主服务器恢复到集群中只能以Secondary服务器的角色加入进来
2
- 【Spark八十一】Hive in the spark assembly
bit1129
assembly
Spark SQL supports most commonly used features of HiveQL. However, different HiveQL statements are executed in different manners:
1. DDL statements (e.g. CREATE TABLE, DROP TABLE, etc.)
- Nginx问题定位之监控进程异常退出
ronin47
nginx在运行过程中是否稳定,是否有异常退出过?这里总结几项平时会用到的小技巧。
1. 在error.log中查看是否有signal项,如果有,看看signal是多少。
比如,这是一个异常退出的情况:
$grep signal error.log
2012/12/24 16:39:56 [alert] 13661#0: worker process 13666 exited on s
- No grammar constraints (DTD or XML schema).....两种解决方法
byalias
xml
方法一:常用方法 关闭XML验证
工具栏:windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:选择Ignore即可。
方法二:(个人推荐)
添加 内容如下
<?xml version=
- Netty源码学习-DefaultChannelPipeline
bylijinnan
netty
package com.ljn.channel;
/**
* ChannelPipeline采用的是Intercepting Filter 模式
* 但由于用到两个双向链表和内部类,这个模式看起来不是那么明显,需要仔细查看调用过程才发现
*
* 下面对ChannelPipeline作一个模拟,只模拟关键代码:
*/
public class Pipeline {
- MYSQL数据库常用备份及恢复语句
chicony
mysql
备份MySQL数据库的命令,可以加选不同的参数选项来实现不同格式的要求。
mysqldump -h主机 -u用户名 -p密码 数据库名 > 文件
备份MySQL数据库为带删除表的格式,能够让该备份覆盖已有数据库而不需要手动删除原有数据库。
mysqldump -–add-drop-table -uusername -ppassword databasename > ba
- 小白谈谈云计算--基于Google三大论文
CrazyMizzz
Google云计算GFS
之前在没有接触到云计算之前,只是对云计算有一点点模糊的概念,觉得这是一个很高大上的东西,似乎离我们大一的还很远。后来有机会上了一节云计算的普及课程吧,并且在之前的一周里拜读了谷歌三大论文。不敢说理解,至少囫囵吞枣啃下了一大堆看不明白的理论。现在就简单聊聊我对于云计算的了解。
我先说说GFS
&n
- hadoop 平衡空间设置方法
daizj
hadoopbalancer
在hdfs-site.xml中增加设置balance的带宽,默认只有1M:
<property>
<name>dfs.balance.bandwidthPerSec</name>
<value>10485760</value>
<description&g
- Eclipse程序员要掌握的常用快捷键
dcj3sjt126com
编程
判断一个人的编程水平,就看他用键盘多,还是鼠标多。用键盘一是为了输入代码(当然了,也包括注释),再有就是熟练使用快捷键。 曾有人在豆瓣评
《卓有成效的程序员》:“人有多大懒,才有多大闲”。之前我整理了一个
程序员图书列表,目的也就是通过读书,让程序员变懒。 程序员作为特殊的群体,有的人可以这么懒,懒到事情都交给机器去做,而有的人又可以那么勤奋,每天都孜孜不倦得
- Android学习之路
dcj3sjt126com
Android学习
转自:http://blog.csdn.net/ryantang03/article/details/6901459
以前有J2EE基础,接触JAVA也有两三年的时间了,上手Android并不困难,思维上稍微转变一下就可以很快适应。以前做的都是WEB项目,现今体验移动终端项目,让我越来越觉得移动互联网应用是未来的主宰。
下面说说我学习Android的感受,我学Android首先是看MARS的视
- java 遍历Map的四种方法
eksliang
javaHashMapjava 遍历Map的四种方法
转载请出自出处:
http://eksliang.iteye.com/blog/2059996
package com.ickes;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
/**
* 遍历Map的四种方式
- 【精典】数据库相关相关
gengzg
数据库
package C3P0;
import java.sql.Connection;
import java.sql.SQLException;
import java.beans.PropertyVetoException;
import com.mchange.v2.c3p0.ComboPooledDataSource;
public class DBPool{
- 自动补全
huyana_town
自动补全
<!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/1999/xhtml&quo
- jquery在线预览PDF文件,打开PDF文件
天梯梦
jquery
最主要的是使用到了一个jquery的插件jquery.media.js,使用这个插件就很容易实现了。
核心代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.
- ViewPager刷新单个页面的方法
lovelease
androidviewpagertag刷新
使用ViewPager做滑动切换图片的效果时,如果图片是从网络下载的,那么再子线程中下载完图片时我们会使用handler通知UI线程,然后UI线程就可以调用mViewPager.getAdapter().notifyDataSetChanged()进行页面的刷新,但是viewpager不同于listview,你会发现单纯的调用notifyDataSetChanged()并不能刷新页面
- 利用按位取反(~)从复合枚举值里清除枚举值
草料场
enum
以 C# 中的 System.Drawing.FontStyle 为例。
如果需要同时有多种效果,
如:“粗体”和“下划线”的效果,可以用按位或(|)
FontStyle style = FontStyle.Bold | FontStyle.Underline;
如果需要去除 style 里的某一种效果,
- Linux系统新手学习的11点建议
刘星宇
编程工作linux脚本
随着Linux应用的扩展许多朋友开始接触Linux,根据学习Windwos的经验往往有一些茫然的感觉:不知从何处开始学起。这里介绍学习Linux的一些建议。
一、从基础开始:常常有些朋友在Linux论坛问一些问题,不过,其中大多数的问题都是很基础的。例如:为什么我使用一个命令的时候,系统告诉我找不到该目录,我要如何限制使用者的权限等问题,这些问题其实都不是很难的,只要了解了 Linu
- hibernate dao层应用之HibernateDaoSupport二次封装
wangzhezichuan
DAOHibernate
/**
* <p>方法描述:sql语句查询 返回List<Class> </p>
* <p>方法备注: Class 只能是自定义类 </p>
* @param calzz
* @param sql
* @return
* <p>创建人:王川</p>
* <p>创建时间:Jul