- Android 基础技术——Bitmap
我不勤奋v
Android基础技术androidandroid基础
笔者希望做一个系列,整理Android基础技术,本章是关于BitmapBitmap内存如何计算占用内存=宽*缩放比例*高*缩放比例*每个像素所占字节缩放比例=设备dpi/图片所在目录的dpiBitmap加载优化?不改变图片质量的情况下怎么优化?不同的Conifg代表每个像素不同的占用空间,所以如果我们把默认的ARGB_8888改成RGB_565,那么每个像素占用空间就会由4字节变成2字节了,那么图
- 关于C# 使用 sqlite 映射实体类笔记
Ds萝卜
C#笔记c#sqlite
1、安装SQLite在nuget搜索System.Data.SQLite安装2、在app.conifg文件中添加如下信息解决问题:NoEntityFrameworkproviderfoundfortheADO.NETproviderwithinvariantname‘System.Data.SQLite’.Makesuretheproviderisregisteredinthe‘entityFra
- 一年了,我们都用 Spring Cloud 干了啥?
荒城9510
一、微服务构建框架SpringBoot配置SpringBoot是一个在Spring的基础上面做了很多简化的框架。首先得益于它习惯用于配置的设计理念,所以从整个启动的容易的难度上来讲要简单非常多。它有一个conifg的架包,里面有非常非常多的第三方依赖的基础的配置,可以直接在applicationb.yml对应的数据库UIL,包括DB的名字、用户密码、用户名等做设置,可以快速的启动一个我们的应用。2
- 迈普路由器访问控制列表配置命令_思科路由器基础配置命令
weixin_39853155
迈普路由器访问控制列表配置命令
展开全部基础配32313133353236313431303231363533e59b9ee7ad9431333436316266置命令如下一、1.router(config)#routerrip启动rip进程2.router(conifg-router)#network172.17.0.0指定rip协议的主网络3.router(config-router)#passive-interfacef0
- axios发送post和get请求的时候,带请求头的写法
Xeon_CC
遇坑经验
axios发送post请求的时候,headers请求头的写法:axios.post方法实际上有3个形式参数axios.post(url,data,config)注意的是,这个headers请求头必须要写在conifg形参里边,不要误写在data形参里边了,如果这个data形参是空的,直接写个空的{}花括号如果带两个形参,默认就是axios.post(url,data)并且headers里面的键值对
- 树莓派程序自启动
咆哮的狮子座
树莓派linux
树莓派程序自启动前言树莓派程序自启动的几种方法1)将程序置于rc.local下2)通过.conifg文件夹下新建*.desktop文件3)树莓派用服务器方式设置开机启动4)利用crontab-e定时查询(能实现自检)----crontab简述----------操作步骤------文章目录前言树莓派程序自启动的几种方法1)将程序置于rc.local下2)通过.conifg文件夹下新建*.deskt
- 树莓派 —— 配置程序开机自启
信必诺
树莓派Linux树莓派linux
说明 配置程序开机自启方式很多,这里仅记录本人用到的方式,下次用到不同方法会持续更新。 方式一通过.conifg文件夹下新建*.desktop文件 /home/pi/.config下创建一个文件夹,名称为autostart,并在该文件夹下创建一个xxx.desktop文件 写入内容如下,然后重启即可。[DesktopEntry]Type=ApplicationExec=/home
- Java 获取properties的几种方式
目录第1种:直接在spring的xml中使用第2种:在java启动加Conifg库中或者在controller中调用第3种:不要在spring.xml中引用commonConfig.properties,在类注入时引用,然后使用Environment获取它的值第4种:不需要借用spring,直接在类中读取.但要注意:(redisson.properties配置文件中不能有.句号),否则将报错spr
- Springboot配置文件加载位置
SkyFang2016
springboot启动会扫描以下位置的application.properties或者application.yml文件作为Springboot的默认配置文件-file:./conifg/-file:./-classpath:/config/-classpath:/以上是按照优先级从高到低的顺序,所有位置的文件都会被加载,高优先级配置内容会覆盖低优先级配置内容。SpringBoot会从这四个位置
- System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Codec007
VisualStudio.Net
这是使用Resharper清理项目引用导致的MVC框架依赖程序集丢失。解决办法。1、打开Web.Conifg查看assemblyBinding节下的dependentAssembly。2、打开packages.config把Web.Conifg中引用到的程序集的package节一个一个对应删除(如果不删除packages.config中的package节将无法从nuget安装程序集)3、参照W
- yii2basic模版之:6、修改默认控制器
安安1120
yii2
额,这里有点话是直接用的别人的按照网上所说,终于在/vendor/yiisoft/yii2/web/Application.php的第28行找到了:public$defaultRoute='site';但改框架源码我总感觉不好,最好找到了自己扩展的配置文件在/config/web.php。于是在$conifg=[]里添加了一行代码:'defaultRoute'=>'index',这样,我的项目的默
- vuecli3多个项目共用组件动态打包单个项目
苏轻
前端webpackvuecli3
需求项目处于缓冲期,时间充裕,于是从vuecli2.x将脚手架升级为vuecli3.x,并且需要多个项目引用一些公用封装的组件库,工具库或资源之类,于是集成在一起.当时做的时候,vuecli4正好出来了,前项目就是用的vuecli3.x,只是说这个项目加入进来的时候,还是vue2.x其实很简单,多个项目多种配置,根据明确启动项目的命令,找到项目,按照项目的配置打包即可.如何配置vue.conifg
- 解决Failed to connect session for conifg 故障
weixin_34124651
运维后端java
服务器升级openssh之后jenkins构建报错了,报错信息如下:Failedtoconnetorchangedirectoryjenkins.plugins.publish_over.BapPublisherException:Failedtoconnectsessionforconfig.....Message[Algorithmnegotiationfail]升级前ssh版本:OpenSS
- zap——logger的创建及logger的使用过程
yuchenfw
golang源码分析
文章目录根据Conifg创建LoggerbuildEncoderopenSinksCombineWriteSyncerslog的使用checklevelWirteEncodeEntryc.out.WriteSync总结根据Conifg创建Logger//BuildconstructsaloggerfromtheConfigandOptions.func(cfgConfig)Build(opts..
- Shell中#*/和%/*是什么意思?
白杨树
Linux
shell中有许多奇特的语法:比如有以下一段脚本;#!/bin/shfiles=`find-name*.conifg`foriin$filesdoname=${i#*/}dir=${name%/*}donename和dir都代表什么呢?假如i=this/is/a/path.config那么name=is/a/path.configdir=this/is/a也就是说%/*代表取从头到最后一个slas
- MySQL NDB Cluster 最新版7.6.7 安装部署
当代小学生
数据库-
MySQLNDBCluster安装MySQL集群是一个无共享的(share-nothing)、分布式节点架构的存储方案,目的是提供容错性和高性能。MySQLNDBCluster架构如图:MySQLNDBCluster架构按照节点类型分为三部分:管理节点:管理节点通过对配置文件conifg.ini的维护来对其他节点进行管理。该文件可以用来配置有多少副本需要维护、在数据节点上为数据和索引分配多少内存、
- Qt quick性能提升
于大博
QT
Qtquick性能优化使用时间驱动避免定时轮询;使用信号槽形式;使用多线程C++;QMLWorkerScript元件;使用QtQuickCompiler只需要再PRO文件中添加一行:CONIFG+=qtquickcompiler避免使用CPU渲染的元件;Canvas、QtCharts;使用异步加载图片异步加载使用C++处理大数据加载QtQuick图片和布局优化降低图片加载时间和内存开销异步加载;设
- 树莓派玩耍笔记4 -- 树莓派ssh党必备的配置
i龙家小少
树莓派玩耍笔记
1.关闭桌面显示对于ssh党,当然不需要系统花费资源在显示上。所以我们先在"raspi-conifg"下选择默认启动为Text启动(这好像也是Raspbian的默认配置)。其次,我们还可以直接关闭HDMI接口,使用"/opt/vc/bin/tvservice-o"(直接使用tvservice-o亦可,如想了解更多请使用tvservice--help查阅此命令更多地使用方法)命令即可轻易做到。pi@
- Mongdb分片实战三(性能和优化)
永远的18岁记忆
mongdb
插入、查询和更新插入:MongoDB会根据片键和conifg中的信息写入到指定的分片上。读取:以下内容摘抄自《深入学习MongoDB》关于读取:上一节故障恢复中已经有所验证。更新:如果要更新单个文档一定要在片键中使用片键(update的第一个参数)。我们现在OSSP10.bizuser(已经在_id上进行哈希分片)中插入一条记录:1.mongos>useOSSP102.switchedtodbOS
- ldap
York_Wu_
这里使用的是centos7安装的安装服务[root@ldap~]#yuminstallopenldapopenldap-serversopenldap-clients拷贝数据库配置文件并授权;DB_CONIFG中主要是关于BerkeleyDB的相关的一些配置[root@ldap~]#cp/usr/share/openldap-servers/DB_CONFIG.example/var/lib/ld
- MySQL-Python实现-测试/生产环境各个表与字段进行对比的小工具
广深-小龙
前言有时候测试环境跑的很正常,一上线可能报错缺少一些字段,于是写了一个sql_diff直接运行,看结果。一、简要说明1.conifg.py:修改你的测试/生产数据库连接信息。2.run_cases.py:运行只需运行它,如:pythonrun_cases.py3、其余不需要关心,适当看下html报告或看控制台输出即可。PS:小龙写得有点low,ddt只能通过excel进行先存储(咋整?)但基本可以
- git配置用户名和邮箱
奋斗吧_青年
git配置文件的优先级.git/conifg>~/.gitconfig>etc/gitconfig第一个指的是特定版本库的配置文件,第二个是当前系统用户环境下的配置文件,第三个是系统级别的配置文件。配置用户名和邮箱(一)通过config--global来改变~/.gitconfig文件里的user.name和user.email:$gitconfig--globaluser.name"yourna
- springboot配置文件抽离 git管理统 配置中心详解
yu_fly
springboot配置文件抽离,便于服务器读取对应配置文件,避免项目频繁更改配置文件,影响项目的调试与发布1.创建统一配置中心项目conifg1)pom配置依赖org.springframework.bootspring-boot-starter-parent2.0.6.RELEASEUTF-8UTF-81.8Finchley.SR2org.springframework.cloudspring
- gradle打包springboot项目并部署到linux服务器
lizy928
Java
添加打包插件applyplugin:'war'添加依赖排除springboot自带的tomcatprovidedRuntimegroup:'org.springframework.boot',name:'spring-boot-starter-tomcat',version:'1.5.8.RELEASE'重写启动类,继承SpringBootServletInitializer,重写conifg方法
- .NET MVC数据库连接字符串
楚景然
.NETMVC
首先创建一个【.config】比如database.config。里面代码###########以下是解释部分############然后web.conifg中###以下是解释部分###然后创建Model时候注意一定要加一个【[key]】否则页面报错=》【没有定义键。定义这个EntityType的关键。】[Key]publicintOs_Id{get;set;}publicstringOs_Nam
- C# SqlHelper应用开发学习
蒙小米
本文实例为大家分享了C#SqlHelper应用技巧,供大家参考,具体内容如下使用App.config配置文件封装连接字符串,方便重复使用--->添加App.conifg配置文件--->Add:ConnectionString:--->添加引用封装一个SQLHelper类方便使用usingSystem.Configuration;usingSystem.Data;//DatSet..TableSql
- C#开发学习——SqlHelper的应用
weixin_33766168
使用App.config配置文件封装连接字符串,方便重复使用--->添加App.conifg配置文件--->Add:ConnectionString:--->添加引用封装一个SQLHelper类方便使用1usingSystem.Configuration;2usingSystem.Data;//DatSet..TableSqlDataAdapter3usingSystem.Data.SqlClie
- VS web.config/app.conifg配置文件自定义类型使用智能感知功能
HTL
大家使用VS编辑web.config或app.config时可以使用智能感知功能的,像下面这样很是方便当然如果是我们自定义的类型也是可以使用智能感知的,因为智能感知的内容是来自你或其他公司(MS)提供的xsd文件所有智能感知的文件(xml,xhtml等)均在此目录: %ProgramFiles%\MicrosoftVisualStudio8\XML\Schemas如果自定义的类型也需要在web.c
- VS web.config/app.conifg配置文件自定义类型使用智能感知功能
HTL
大家使用VS编辑web.config或app.config时可以使用智能感知功能的,像下面这样很是方便当然如果是我们自定义的类型也是可以使用智能感知的,因为智能感知的内容是来自你或其他公司(MS)提供的xsd文件所有智能感知的文件(xml,xhtml等)均在此目录: %ProgramFiles%\MicrosoftVisualStudio8\XML\Schemas如果自定义的类型也需要在web.c
- 使用SVCUtil.exe生成客户端代理类和配置文件
util
Demo:
SVCUtil.exe 目录:C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin 下
生成代码命令:
SvcUtil /language:c# /out:HellowWCFServiceClient.cs /config:App.conifg http://localhost:8371/HelloWCFService
上面命令
- 集合框架
天子之骄
java数据结构集合框架
集合框架
集合框架可以理解为一个容器,该容器主要指映射(map)、集合(set)、数组(array)和列表(list)等抽象数据结构。
从本质上来说,Java集合框架的主要组成是用来操作对象的接口。不同接口描述不同的数据类型。
简单介绍:
Collection接口是最基本的接口,它定义了List和Set,List又定义了LinkLi
- Table Driven(表驱动)方法实例
bijian1013
javaenumTable Driven表驱动
实例一:
/**
* 驾驶人年龄段
* 保险行业,会对驾驶人的年龄做年龄段的区分判断
* 驾驶人年龄段:01-[18,25);02-[25,30);03-[30-35);04-[35,40);05-[40,45);06-[45,50);07-[50-55);08-[55,+∞)
*/
public class AgePeriodTest {
//if...el
- Jquery 总结
cuishikuan
javajqueryAjaxWebjquery方法
1.$.trim方法用于移除字符串头部和尾部多余的空格。如:$.trim(' Hello ') // Hello2.$.contains方法返回一个布尔值,表示某个DOM元素(第二个参数)是否为另一个DOM元素(第一个参数)的下级元素。如:$.contains(document.documentElement, document.body); 3.$
- 面向对象概念的提出
麦田的设计者
java面向对象面向过程
面向对象中,一切都是由对象展开的,组织代码,封装数据。
在台湾面向对象被翻译为了面向物件编程,这充分说明了,这种编程强调实体。
下面就结合编程语言的发展史,聊一聊面向过程和面向对象。
c语言由贝尔实
- linux网口绑定
被触发
linux
刚在一台IBM Xserver服务器上装了RedHat Linux Enterprise AS 4,为了提高网络的可靠性配置双网卡绑定。
一、环境描述
我的RedHat Linux Enterprise AS 4安装双口的Intel千兆网卡,通过ifconfig -a命令看到eth0和eth1两张网卡。
二、双网卡绑定步骤:
2.1 修改/etc/sysconfig/network
- XML基础语法
肆无忌惮_
xml
一、什么是XML?
XML全称是Extensible Markup Language,可扩展标记语言。很类似HTML。XML的目的是传输数据而非显示数据。XML的标签没有被预定义,你需要自行定义标签。XML被设计为具有自我描述性。是W3C的推荐标准。
二、为什么学习XML?
用来解决程序间数据传输的格式问题
做配置文件
充当小型数据库
三、XML与HTM
- 为网页添加自己喜欢的字体
知了ing
字体 秒表 css
@font-face {
font-family: miaobiao;//定义字体名字
font-style: normal;
font-weight: 400;
src: url('font/DS-DIGI-e.eot');//字体文件
}
使用:
<label style="font-size:18px;font-famil
- redis范围查询应用-查找IP所在城市
矮蛋蛋
redis
原文地址:
http://www.tuicool.com/articles/BrURbqV
需求
根据IP找到对应的城市
原来的解决方案
oracle表(ip_country):
查询IP对应的城市:
1.把a.b.c.d这样格式的IP转为一个数字,例如为把210.21.224.34转为3524648994
2. select city from ip_
- 输入两个整数, 计算百分比
alleni123
java
public static String getPercent(int x, int total){
double result=(x*1.0)/(total*1.0);
System.out.println(result);
DecimalFormat df1=new DecimalFormat("0.0000%");
- 百合——————>怎么学习计算机语言
百合不是茶
java 移动开发
对于一个从没有接触过计算机语言的人来说,一上来就学面向对象,就算是心里上面接受的了,灵魂我觉得也应该是跟不上的,学不好是很正常的现象,计算机语言老师讲的再多,你在课堂上面跟着老师听的再多,我觉得你应该还是学不会的,最主要的原因是你根本没有想过该怎么来学习计算机编程语言,记得大一的时候金山网络公司在湖大招聘我们学校一个才来大学几天的被金山网络录取,一个刚到大学的就能够去和
- linux下tomcat开机自启动
bijian1013
tomcat
方法一:
修改Tomcat/bin/startup.sh 为:
export JAVA_HOME=/home/java1.6.0_27
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
export PATH=$JAVA_HOME/bin:$PATH
export CATALINA_H
- spring aop实例
bijian1013
javaspringAOP
1.AdviceMethods.java
package com.bijian.study.spring.aop.schema;
public class AdviceMethods {
public void preGreeting() {
System.out.println("--how are you!--");
}
}
2.beans.x
- [Gson八]GsonBuilder序列化和反序列化选项enableComplexMapKeySerialization
bit1129
serialization
enableComplexMapKeySerialization配置项的含义
Gson在序列化Map时,默认情况下,是调用Key的toString方法得到它的JSON字符串的Key,对于简单类型和字符串类型,这没有问题,但是对于复杂数据对象,如果对象没有覆写toString方法,那么默认的toString方法将得到这个对象的Hash地址。
GsonBuilder用于
- 【Spark九十一】Spark Streaming整合Kafka一些值得关注的问题
bit1129
Stream
包括Spark Streaming在内的实时计算数据可靠性指的是三种级别:
1. At most once,数据最多只能接受一次,有可能接收不到
2. At least once, 数据至少接受一次,有可能重复接收
3. Exactly once 数据保证被处理并且只被处理一次,
具体的多读几遍http://spark.apache.org/docs/lates
- shell脚本批量检测端口是否被占用脚本
ronin47
#!/bin/bash
cat ports |while read line
do#nc -z -w 10 $line
nc -z -w 2 $line 58422>/dev/null2>&1if[ $?-eq 0]then
echo $line:ok
else
echo $line:fail
fi
done
这里的ports 既可以是文件
- java-2.设计包含min函数的栈
bylijinnan
java
具体思路参见:http://zhedahht.blog.163.com/blog/static/25411174200712895228171/
import java.util.ArrayList;
import java.util.List;
public class MinStack {
//maybe we can use origin array rathe
- Netty源码学习-ChannelHandler
bylijinnan
javanetty
一般来说,“有状态”的ChannelHandler不应该是“共享”的,“无状态”的ChannelHandler则可“共享”
例如ObjectEncoder是“共享”的, 但 ObjectDecoder 不是
因为每一次调用decode方法时,可能数据未接收完全(incomplete),
它与上一次decode时接收到的数据“累计”起来才有可能是完整的数据,是“有状态”的
p
- java生成随机数
cngolon
java
方法一:
/**
* 生成随机数
* @author
[email protected]
* @return
*/
public synchronized static String getChargeSequenceNum(String pre){
StringBuffer sequenceNum = new StringBuffer();
Date dateTime = new D
- POI读写海量数据
ctrain
海量数据
import java.io.FileOutputStream;
import java.io.OutputStream;
import org.apache.poi.xssf.streaming.SXSSFRow;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.streaming
- mysql 日期格式化date_format详细使用
daizj
mysqldate_format日期格式转换日期格式化
日期转换函数的详细使用说明
DATE_FORMAT(date,format) Formats the date value according to the format string. The following specifiers may be used in the format string. The&n
- 一个程序员分享8年的开发经验
dcj3sjt126com
程序员
在中国有很多人都认为IT行为是吃青春饭的,如果过了30岁就很难有机会再发展下去!其实现实并不是这样子的,在下从事.NET及JAVA方面的开发的也有8年的时间了,在这里在下想凭借自己的亲身经历,与大家一起探讨一下。
明确入行的目的
很多人干IT这一行都冲着“收入高”这一点的,因为只要学会一点HTML, DIV+CSS,要做一个页面开发人员并不是一件难事,而且做一个页面开发人员更容
- android欢迎界面淡入淡出效果
dcj3sjt126com
android
很多Android应用一开始都会有一个欢迎界面,淡入淡出效果也是用得非常多的,下面来实现一下。
主要代码如下:
package com.myaibang.activity;
import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.os.CountDown
- linux 复习笔记之常见压缩命令
eksliang
tar解压linux系统常见压缩命令linux压缩命令tar压缩
转载请出自出处:http://eksliang.iteye.com/blog/2109693
linux中常见压缩文件的拓展名
*.gz gzip程序压缩的文件
*.bz2 bzip程序压缩的文件
*.tar tar程序打包的数据,没有经过压缩
*.tar.gz tar程序打包后,并经过gzip程序压缩
*.tar.bz2 tar程序打包后,并经过bzip程序压缩
*.zi
- Android 应用程序发送shell命令
gqdy365
android
项目中需要直接在APP中通过发送shell指令来控制lcd灯,其实按理说应该是方案公司在调好lcd灯驱动之后直接通过service送接口上来给APP,APP调用就可以控制了,这是正规流程,但我们项目的方案商用的mtk方案,方案公司又没人会改,只调好了驱动,让应用程序自己实现灯的控制,这不蛋疼嘛!!!!
发就发吧!
一、关于shell指令:
我们知道,shell指令是Linux里面带的
- java 无损读取文本文件
hw1287789687
读取文件无损读取读取文本文件charset
java 如何无损读取文本文件呢?
以下是有损的
@Deprecated
public static String getFullContent(File file, String charset) {
BufferedReader reader = null;
if (!file.exists()) {
System.out.println("getFull
- Firebase 相关文章索引
justjavac
firebase
Awesome Firebase
最近谷歌收购Firebase的新闻又将Firebase拉入了人们的视野,于是我做了这个 github 项目。
Firebase 是一个数据同步的云服务,不同于 Dropbox 的「文件」,Firebase 同步的是「数据」,服务对象是网站开发者,帮助他们开发具有「实时」(Real-Time)特性的应用。
开发者只需引用一个 API 库文件就可以使用标准 RE
- C++学习重点
lx.asymmetric
C++笔记
1.c++面向对象的三个特性:封装性,继承性以及多态性。
2.标识符的命名规则:由字母和下划线开头,同时由字母、数字或下划线组成;不能与系统关键字重名。
3.c++语言常量包括整型常量、浮点型常量、布尔常量、字符型常量和字符串性常量。
4.运算符按其功能开以分为六类:算术运算符、位运算符、关系运算符、逻辑运算符、赋值运算符和条件运算符。
&n
- java bean和xml相互转换
q821424508
javabeanxmlxml和bean转换java bean和xml转换
这几天在做微信公众号
做的过程中想找个java bean转xml的工具,找了几个用着不知道是配置不好还是怎么回事,都会有一些问题,
然后脑子一热谢了一个javabean和xml的转换的工具里,自己用着还行,虽然有一些约束吧 ,
还是贴出来记录一下
顺便你提一下下,这个转换工具支持属性为集合、数组和非基本属性的对象。
packag
- C 语言初级 位运算
1140566087
位运算c
第十章 位运算 1、位运算对象只能是整形或字符型数据,在VC6.0中int型数据占4个字节 2、位运算符: 运算符 作用 ~ 按位求反 << 左移 >> 右移 & 按位与 ^ 按位异或 | 按位或 他们的优先级从高到低; 3、位运算符的运算功能: a、按位取反: ~01001101 = 101
- 14点睛Spring4.1-脚本编程
wiselyman
spring4
14.1 Scripting脚本编程
脚本语言和java这类静态的语言的主要区别是:脚本语言无需编译,源码直接可运行;
如果我们经常需要修改的某些代码,每一次我们至少要进行编译,打包,重新部署的操作,步骤相当麻烦;
如果我们的应用不允许重启,这在现实的情况中也是很常见的;
在spring中使用脚本编程给上述的应用场景提供了解决方案,即动态加载bean;
spring支持脚本