- Python 实现图片裁剪(附代码) | Python工具
剑客阿良_ALiang
前言本文提供将图片按照自定义尺寸进行裁剪的工具方法,一如既往的实用主义。环境依赖ffmpeg环境安装,可以参考我的另一篇文章:windowsffmpeg安装部署_阿良的博客-CSDN博客本文主要使用到的不是ffmpeg,而是ffprobe也在上面这篇文章中的zip包中。ffmpy安装:pipinstallffmpy-ihttps://pypi.douban.com/simple代码不废话了,上代码
- windows下python opencv ffmpeg读取摄像头实现rtsp推流 拉流
图像处理大大大大大牛啊
opencv实战代码讲解视觉图像项目windowspythonopencv
windows下pythonopencvffmpeg读取摄像头实现rtsp推流拉流整体流程1.下载所需文件1.1下载rtsp推流服务器1.2下载ffmpeg2.开启RTSP服务器3.opencv读取摄像头并调用ffmpeg进行推流4.opencv进行拉流5.opencv异步拉流整体流程1.下载所需文件1.1下载rtsp推流服务器下载RTSP服务器下载页面https://github.com/blu
- pyhon+ffmpeg 常用音视频处理命令
不再游移
ffmpeg音视频python
FFmpeg是多媒体领域的万能工具。只要涉及音视频领域的处理,基本上没有它做不了的事情!通俗点讲,从视频录制、视频编辑再到播放,它都能做!前段时间做了个短视频自动化脚本项目,需要自动处理音视频(包括一些合成、拼接、转场、调色等等),当时做的时候找各种命令还是很痛苦的,因此对用到的所有处理命令做了个汇总,方便以后使用。目录一、获取音频时长二、获取视频信息三、获取视频时长四、多个视频合并五、视频提取视
- bat+ffmpeg批处理图片,图片批量转码
张雨zy
音视频ffmpeg
直接在cmd中输入//批量转码文件for%ain("*.png")doffmpeg-i"%a"-fs1024k"%~na.webp"//删除所有pngdel*.png@echooff表示执行了这条命令后关闭所有命令(包括本身这条命令)的回显。而echooff命令则表示关闭其他所有命令(不包括本身这条命令)的回显,@的作用就是关闭紧跟其后的一条命令的回显脚本完整代码写入脚本中后,需要多加一个%,例如
- ffmpeg批量将tif文件转成jpeg格式
winfredzhang
图像工具ffmpegtifjpeg转换
1、cmd2、切换到安装ffmpeg的路径。3、输入命令:ffmpeg-start_number001-i"D:\ocr\%03d.tif"-start_number001-pix_fmtyuv420p-qscale:v1"D:\ocr\%03d.jpg"结果。
- 设计模式 23 访问者模式
WineMonk
#设计模式设计模式访问者模式
设计模式23创建型模式(5):工厂方法模式、抽象工厂模式、单例模式、建造者模式、原型模式结构型模式(7):适配器模式、桥接模式、组合模式、装饰者模式、外观模式、享元模式、代理模式行为型模式(11):责任链模式、命令模式、解释器模式、迭代器模式、中介者模式、备忘录模式、观察者模式、状态模式、策略模式、模板方法模式、访问者模式文章目录设计模式23访问者模式(VisitorPattern)1定义2结构3
- 今日备忘之星期六 星期天
教育行走林
——这两天干了点啥(二)为了防止落下一项工作,每天都要提前写一个今日备忘,然后晚上查一查,看看有没有落下一项工作没干,俗话说得好“好记性不如烂笔头”。周六周日比平常工作也不少,这两天干了点啥呢,先说周六吧:早自习在八五班上历史,同学们整体背书状态还不错,下课前进行了表扬;上午第一节课在后面办公室盯着给学校伙房送米、面、油、肉、蔬菜的等小贩过秤、开票,严格把好常规食品原料采购关;上午第二节课拿着宿舍
- 使用ffmpeg将pcm格式音频转化为mp3格式音频
布丁小站
ffmpegpcm音视频
voidAudioCode::ENcode(AVCodecContext*cdc_ctx,AVFrame*frame,AVPacket*pkt){intret=0;/*sendtheframeforencoding*/ret=avcodec_send_frame(cdc_ctx,frame);if(ret=0){ret=avcodec_receive_packet(cdc_ctx,pkt);if(
- 解决rsync 同步auth failed on module问题
w36680130
rsyncauthfailedrsync认证失败问题rsync报错
解决rsync同步authfailedonmodule问题参考文章:(1)解决rsync同步authfailedonmodule问题(2)https://www.cnblogs.com/LD-linux/p/3822162.html备忘一下。
- 这个桌面日历真不错 笔记 提醒 生日记录 打卡 翻译都有 真的太方便了!
C盘清理
实用软件笔记待办日历桌面日历电脑日历生日提醒记事本
这个桌面日历真不错笔记提醒生日记录打卡翻译都有真的太方便了!日历产品非常的多,如何选择一个合适自己的桌面日历,这个很重要,今天小编给大家介绍这个芝麻日历,一起看下它有些什么功能,是不是你需要的。1、美观,一个实用的桌面日历,不仅要界面美观,还要功能强大;芝麻日历(https://rili.zhimasoft.cn/?abiw)芝麻日历下载实用的桌面日历万年历农历查询桌面便签/备忘录芝麻日历软件官方
- iPhone备忘录清除缓存
HaloHoohoo
问题iphoneios缓存
前言离剁手只有一张图,就是:遇到问题就去找方法,找方法就要找问题源头,经过我不懈的努力,我终于找到了万恶之源——备忘录。奇怪的是我的东西并不多,而且写图文总结的备忘录,一般都会放在iCloud上,前几日我一直是觉得自己的图片放得太多才导致如此,但狂删除的举动反而让其占用的存储更大了些,我震惊并生气。遂在几次连相机都打不开的时候怒摔(伪)手机并扬言13出来就把你扔了,只是13还得等,日子还得过,微信
- 如何把小米手机便签内容云同步到iPhone XS上?
weixin_34220179
云同步指的是在云平台上以个人为中心的不同设备之间数据共享。那么小米手机与iPhoneXS都是支持用户个人云服务的设备,两款手机上备忘的内容能够实现共享吗?答案显而易见,不可以。因为两款手机系统不同,用来备忘的软件也不同,iPhonexs是以备忘录作为备忘软件,而小米用手机便签。那如何才能让小米手机与iPhoneXS手机实现备忘内容的云同步呢?可以通过能够多端云同步的敬业签来实现。敬业签云便签能够跨
- 已经导出到电脑的荣耀手机便签如何打开
匠心�
virtualenv
手机便签往往记录着我们生活和工作中容易遗忘的信息,荣耀手机又比较耐用,用个两三年没有问题。两三年的时间,足以让我们在便签上记录很多内容了。如果需要在电脑上查看手机便签内容,该如何操作?如果已经导出到电脑上的手机便签内容,该如何打开?现在这篇文章就来详细解答一下这个问题。荣耀手机自带的便签叫备忘录,如果要把备忘录的内容传输到电脑上,用华为云账号就可以了。先在手机上把备忘录内容备份到云账号,然后在百度
- FFmpeg安装与使用教程
vvvae1234
ffmpeg
FFmpeg是一个强大且灵活的命令行工具,用于处理音频和视频文件。无论是视频格式转换、音频提取还是视频编辑,FFmpeg都能够轻松完成。掌握FFmpeg,将为你的视频处理工作提供极大的便利。在本教程中,我们将详细介绍FFmpeg的安装和使用,包括一些实用的操作案例,帮助你更好地理解如何使用这个强大的工具。2.FFmpeg简介2.1什么是FFmpegFFmpeg是一个开源的音视频处理库,提供了丰富的
- Android WebView常见问题及解决方案汇总
zhengxiuchen86
解决解决方案webviewwebandroid问题
AndroidWebView常见问题及解决方案汇总参考文章:(1)AndroidWebView常见问题及解决方案汇总(2)http://www.cnblogs.com/olartan/p/5713013.html备忘一下。
- 遇到的问题及解决方法汇总
w36680130
\N
遇到的问题及解决方法汇总参考文章:(1)遇到的问题及解决方法汇总(2)https://www.cnblogs.com/hd-test/p/12160407.html(3)https://www.codeprj.com/blog/b98d971.html备忘一下。
- Flutter3备忘: GetX常用命令
mulegame
Flutterflutter
D:\flutter_app\getcreatepagesearch//创建一个firstPage在productContent目录中getcreateview:firstPageonproductContentgetcreateview:secondPageonproductContentgetcreateview:thirdPageonproductContentgetgeneratemode
- Ubuntu+Qt+SDL2+FFmpeg
DarcyZhou
此文档用于Ubuntu系统中搭建FFmpeg的开发环境。Qt作为开发软件,SDL2是一套开放源代码的跨平台多媒体开发库。1.安装Qt(1)下载版本:qt-opensource-linux-x64-5.9.8.runimage.png(2)安装给文件添加可执行权限:sudochmod-R777qt-opensource-linux-x64-5.9.8.run开始安装:安装过程中选择全部安装即可。(需
- 在CentOS7中通过yum安装ffmpeg
为技术疯狂
1、升级系统sudoyuminstallepel-release-ysudoyumupdate-ysudoshutdown-rnow2、安装NuxDextopYum源由于CentOS没有官方FFmpegrpm软件包。但是,我们可以使用第三方YUM源(NuxDextop)完成此工作。1)CentOS7sudorpm--importhttp://li.nux.ro/download/nux/RPM-G
- 音视频入门基础:WAV专题(11)——FFmpeg源码中计算WAV音频文件每个packet的pts_time、dts_time的实现
cuijiecheng2018
FFmpeg源码分析音视频技术音视频ffmpeg
=================================================================音视频入门基础:WAV专题系列文章:音视频入门基础:WAV专题(1)——使用FFmpeg命令生成WAV音频文件音视频入门基础:WAV专题(2)——WAV格式简介音视频入门基础:WAV专题(3)——FFmpeg源码中,判断某文件是否为WAV音频文件的实现音视频入门基础:W
- 定性分析检查表
小兵_快跑
作者自己做定性分析时,有一份检查表。老唐在作者基础上,精简整理出一份我认为更适合A股投资需求的清单,共计30条问题大家可以在「瞅地」时,作为备忘的检查清单,也可以作为企业分析的提纲,解决无处下爪的困惑。1)我是否愿意花大量时间研究这家企业和这个行业?(困难度,兴趣)2)现在公司决定聘我担任CEO,三个月后到任。现在我需要赶紧知道哪些东西?3)公司现有生意的获利,“真”钱的比例有多大?4)公司的核心
- FFmpeg编码03——参数设定
ACALJJ32
视频图像处理ffmpeg
编码参数设定//预设编码器参数c->max_b_frames=10;//B帧最大参数intre=av_opt_set(c->priv_data,"preset","ultrafast",0);//设置速度最快编码if(re!=0){qDebug()priv_data,"tune","zerolatency",0);//0延时if(re!=0){qDebug()bit_rate=400000;CQP
- 备忘录模式(Memento)
疯狂的阿吉
c++设计模式设计模式
目录前言一、备忘录模式总结1、模式意图2、参与者3、结构、协作、适用性及效果二、备忘录模式简单示例1、用例描述2、示例代码总结前言本周五参加了Memento(备忘录)模式研讨会,本文的目的是对这个模式的总结和分享,希望对需要学习这个设计模式的同学有所帮助。本文一共分为两个部分,第一个部分是备忘录模式的基础知识总结;第二个部分是分享备忘录模式简单示例。一、备忘录模式总结1、模式意图在不破坏封装性的前
- java设计模式---中介者模式
奔跑的扫地僧
Java设计模式java
首先我们了解下设计模式的总览:GoF提出的设计模式总共有23种,根据目的准则分类分为三大类:创建型模式,共五种:单例模式、工厂方法模式、抽象工厂模式、建造者模式、原型模式。结构型模式,共七种:适配器模式、装饰模式、代理模式、外观模式、桥接模式、组合模式、享元模式。行为型模式,共十一种:策略模式、模板方法模式、观察者模式、迭代器模式、责任链模式、命令模式、备忘录模式、状态模式、访问者模式、中介者模式
- Java设计模式(二十二)行为型- 备忘录模式 Memento Pattern(史上最全备忘录模式)与使用场景以及优缺点
刘了个刘
java设计模式java设计模式备忘录模式
备忘录模式MementoPattern备忘录模式又称为快照模式(SnapshotPattern)或令牌模式(TokenPattern),是指在不破坏封装的前提下,捕获一个对象的内部状态,并在对象之外保存这个状态,这样以后就可将该对象恢复到原先保存的状态。特征:“后悔药”备忘录模式的主要角色如下:发起人(Originator)角色:记录当前时刻的内部状态信息,提供创建备忘录和恢复备忘录数据的功能,实
- 设计模式扫荡-行为型模式-责任链、命令、迭代器、备忘录、观察者、状态、策略、模板、访问者
JunSIr_#
面向对象设计模式责任链命令观察者备忘录
设计模式扫荡-行为型模式-责任链、命令、迭代器、备忘录、观察者、状态、策略、模板、访问者文章目录设计模式扫荡-行为型模式-责任链、命令、迭代器、备忘录、观察者、状态、策略、模板、访问者责任链模式(ChainofResponsibilityPattern)命令模式(CommandPattern)迭代器模式(IteratorPattern)备忘录模式(MementoPattern)观察者模式(Obse
- 【秀娟习惯养成记—2020.10.16】
欧秀娟
2020.10.16日习惯养成第54天每到周日,除了感叹时间过得快,还是感叹时间过得快,一天天,一周周,一月月,2020转眼就将接近尾声,年初定下的目标实现了多少?这一年又有哪些成长呢?多问问自己,珍惜当下的每分每秒,努力去做好一件件小事,不求最好,但求比昨天更好。在剩下来的两个多月时间里,在食饮有节上还要注意再注意,因为一到周末休息,不经意间总会吃多。此刻打开手机备忘录,坐在电脑前,开始完成迟到
- 亚马逊AI产品Amazon Q被指出有各种问题,这将导致客户流失至微软
市象
人工智能网络科技
近日,泄露的消息显示,亚马逊的重要AI产品AmazonQ在发布初期面临不少挑战,并且存在客户转向微软Copilot的风险。这款备受期待的产品在四月份公开发布后,遇到了一系列的问题。内部备忘录显示,八月份时,一些亚马逊网络服务(AWS)的员工在内部Slack频道中表达了对AmazonQ的看法,指出该产品存在功能不足、成本较高以及难以与其他软件集成等问题。更有员工担心,这些问题可能导致客户转投微软的C
- 当代青年人格分裂图鉴
卫校一七药二
分裂,并快乐着当代年轻人真是越活越分裂了。他们一面被动接收着来自社会、长辈的正能量“谆谆教诲”,一面私下里践行着“怎么爽怎么来”的生活哲学。在正能量和丧文化的频频交锋中,他们也在不知不觉间形成了诸多种矛盾人格,我们为各位盘点了以下十种类型的年轻人,相信总有几款是你熟悉的味道:)01每逢新年或xx节点,都是他们大批出没的高峰时段,备忘录里列得满满当当的todolist和朋友圈里洋洋洒洒的“新年献词”
- 软考-常见的23种设计模式整理
ppliu600
软件架构数据仓库数据库数据挖掘
参考:23种设计模式总结设计模式可以将复用别人的解决方案。一、设计模式的分类创建型模式,共5种:单例模式、工厂方法模式、抽象工厂模式、建造者模式、原型模式。结构型模式,共7种:适配器模式、组合模式、代理模式、享元模式、外观模式、桥接模式、装饰器模式、行为型模式,共11种:观察者模式、策略模式、模板方法模式、迭代子模式、责任链模式、命令模式、备忘录模式、状态模式、访问者模式、中介者模式、解释器模式。
- jvm调优总结(从基本概念 到 深度优化)
oloz
javajvmjdk虚拟机应用服务器
JVM参数详解:http://www.cnblogs.com/redcreen/archive/2011/05/04/2037057.html
Java虚拟机中,数据类型可以分为两类:基本类型和引用类型。基本类型的变量保存原始值,即:他代表的值就是数值本身;而引用类型的变量保存引用值。“引用值”代表了某个对象的引用,而不是对象本身,对象本身存放在这个引用值所表示的地址的位置。
- 【Scala十六】Scala核心十:柯里化函数
bit1129
scala
本篇文章重点说明什么是函数柯里化,这个语法现象的背后动机是什么,有什么样的应用场景,以及与部分应用函数(Partial Applied Function)之间的联系 1. 什么是柯里化函数
A way to write functions with multiple parameter lists. For instance
def f(x: Int)(y: Int) is a
- HashMap
dalan_123
java
HashMap在java中对很多人来说都是熟的;基于hash表的map接口的非同步实现。允许使用null和null键;同时不能保证元素的顺序;也就是从来都不保证其中的元素的顺序恒久不变。
1、数据结构
在java中,最基本的数据结构无外乎:数组 和 引用(指针),所有的数据结构都可以用这两个来构造,HashMap也不例外,归根到底HashMap就是一个链表散列的数据
- Java Swing如何实时刷新JTextArea,以显示刚才加append的内容
周凡杨
java更新swingJTextArea
在代码中执行完textArea.append("message")后,如果你想让这个更新立刻显示在界面上而不是等swing的主线程返回后刷新,我们一般会在该语句后调用textArea.invalidate()和textArea.repaint()。
问题是这个方法并不能有任何效果,textArea的内容没有任何变化,这或许是swing的一个bug,有一个笨拙的办法可以实现
- servlet或struts的Action处理ajax请求
g21121
servlet
其实处理ajax的请求非常简单,直接看代码就行了:
//如果用的是struts
//HttpServletResponse response = ServletActionContext.getResponse();
// 设置输出为文字流
response.setContentType("text/plain");
// 设置字符集
res
- FineReport的公式编辑框的语法简介
老A不折腾
finereport公式总结
FINEREPORT用到公式的地方非常多,单元格(以=开头的便被解析为公式),条件显示,数据字典,报表填报属性值定义,图表标题,轴定义,页眉页脚,甚至单元格的其他属性中的鼠标悬浮提示内容都可以写公式。
简单的说下自己感觉的公式要注意的几个地方:
1.if语句语法刚接触感觉比较奇怪,if(条件式子,值1,值2),if可以嵌套,if(条件式子1,值1,if(条件式子2,值2,值3)
- linux mysql 数据库乱码的解决办法
墙头上一根草
linuxmysql数据库乱码
linux 上mysql数据库区分大小写的配置
lower_case_table_names=1 1-不区分大小写 0-区分大小写
修改/etc/my.cnf 具体的修改内容如下:
[client]
default-character-set=utf8
[mysqld]
datadir=/var/lib/mysql
socket=/va
- 我的spring学习笔记6-ApplicationContext实例化的参数兼容思想
aijuans
Spring 3
ApplicationContext能读取多个Bean定义文件,方法是:
ApplicationContext appContext = new ClassPathXmlApplicationContext(
new String[]{“bean-config1.xml”,“bean-config2.xml”,“bean-config3.xml”,“bean-config4.xml
- mysql 基准测试之sysbench
annan211
基准测试mysql基准测试MySQL测试sysbench
1 执行如下命令,安装sysbench-0.5:
tar xzvf sysbench-0.5.tar.gz
cd sysbench-0.5
chmod +x autogen.sh
./autogen.sh
./configure --with-mysql --with-mysql-includes=/usr/local/mysql
- sql的复杂查询使用案列与技巧
百合不是茶
oraclesql函数数据分页合并查询
本片博客使用的数据库表是oracle中的scott用户表;
------------------- 自然连接查询
查询 smith 的上司(两种方法)
&
- 深入学习Thread类
bijian1013
javathread多线程java多线程
一. 线程的名字
下面来看一下Thread类的name属性,它的类型是String。它其实就是线程的名字。在Thread类中,有String getName()和void setName(String)两个方法用来设置和获取这个属性的值。
同时,Thr
- JSON串转换成Map以及如何转换到对应的数据类型
bijian1013
javafastjsonnet.sf.json
在实际开发中,难免会碰到JSON串转换成Map的情况,下面来看看这方面的实例。另外,由于fastjson只支持JDK1.5及以上版本,因此在JDK1.4的项目中可以采用net.sf.json来处理。
一.fastjson实例
JsonUtil.java
package com.study;
impor
- 【RPC框架HttpInvoker一】HttpInvoker:Spring自带RPC框架
bit1129
spring
HttpInvoker是Spring原生的RPC调用框架,HttpInvoker同Burlap和Hessian一样,提供了一致的服务Exporter以及客户端的服务代理工厂Bean,这篇文章主要是复制粘贴了Hessian与Spring集成一文,【RPC框架Hessian四】Hessian与Spring集成
在
【RPC框架Hessian二】Hessian 对象序列化和反序列化一文中
- 【Mahout二】基于Mahout CBayes算法的20newsgroup的脚本分析
bit1129
Mahout
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information re
- nginx三种获取用户真实ip的方法
ronin47
随着nginx的迅速崛起,越来越多公司将apache更换成nginx. 同时也越来越多人使用nginx作为负载均衡, 并且代理前面可能还加上了CDN加速,但是随之也遇到一个问题:nginx如何获取用户的真实IP地址,如果后端是apache,请跳转到<apache获取用户真实IP地址>,如果是后端真实服务器是nginx,那么继续往下看。
实例环境: 用户IP 120.22.11.11
- java-判断二叉树是不是平衡
bylijinnan
java
参考了
http://zhedahht.blog.163.com/blog/static/25411174201142733927831/
但是用java来实现有一个问题。
由于Java无法像C那样“传递参数的地址,函数返回时能得到参数的值”,唯有新建一个辅助类:AuxClass
import ljn.help.*;
public class BalancedBTree {
- BeanUtils.copyProperties VS PropertyUtils.copyProperties
诸葛不亮
PropertyUtilsBeanUtils
BeanUtils.copyProperties VS PropertyUtils.copyProperties
作为两个bean属性copy的工具类,他们被广泛使用,同时也很容易误用,给人造成困然;比如:昨天发现同事在使用BeanUtils.copyProperties copy有integer类型属性的bean时,没有考虑到会将null转换为0,而后面的业
- [金融与信息安全]最简单的数据结构最安全
comsci
数据结构
现在最流行的数据库的数据存储文件都具有复杂的文件头格式,用操作系统的记事本软件是无法正常浏览的,这样的情况会有什么问题呢?
从信息安全的角度来看,如果我们数据库系统仅仅把这种格式的数据文件做异地备份,如果相同版本的所有数据库管理系统都同时被攻击,那么
- vi区段删除
Cwind
linuxvi区段删除
区段删除是编辑和分析一些冗长的配置文件或日志文件时比较常用的操作。简记下vi区段删除要点备忘。
vi概述
引文中并未将末行模式单独列为一种模式。单不单列并不重要,能区分命令模式与末行模式即可。
vi区段删除步骤:
1. 在末行模式下使用:set nu显示行号
非必须,随光标移动vi右下角也会显示行号,能够正确找到并记录删除开始行
- 清除tomcat缓存的方法总结
dashuaifu
tomcat缓存
用tomcat容器,大家可能会发现这样的问题,修改jsp文件后,但用IE打开 依然是以前的Jsp的页面。
出现这种现象的原因主要是tomcat缓存的原因。
解决办法如下:
在jsp文件头加上
<meta http-equiv="Expires" content="0"> <meta http-equiv="kiben&qu
- 不要盲目的在项目中使用LESS CSS
dcj3sjt126com
Webless
如果你还不知道LESS CSS是什么东西,可以看一下这篇文章,是我一朋友写给新人看的《CSS——LESS》
不可否认,LESS CSS是个强大的工具,它弥补了css没有变量、无法运算等一些“先天缺陷”,但它似乎给我一种错觉,就是为了功能而实现功能。
比如它的引用功能
?
.rounded_corners{
- [入门]更上一层楼
dcj3sjt126com
PHPyii2
更上一层楼
通篇阅读完整个“入门”部分,你就完成了一个完整 Yii 应用的创建。在此过程中你学到了如何实现一些常用功能,例如通过 HTML 表单从用户那获取数据,从数据库中获取数据并以分页形式显示。你还学到了如何通过 Gii 去自动生成代码。使用 Gii 生成代码把 Web 开发中多数繁杂的过程转化为仅仅填写几个表单就行。
本章将介绍一些有助于更好使用 Yii 的资源:
- Apache HttpClient使用详解
eksliang
httpclienthttp协议
Http协议的重要性相信不用我多说了,HttpClient相比传统JDK自带的URLConnection,增加了易用性和灵活性(具体区别,日后我们再讨论),它不仅是客户端发送Http请求变得容易,而且也方便了开发人员测试接口(基于Http协议的),即提高了开发的效率,也方便提高代码的健壮性。因此熟练掌握HttpClient是很重要的必修内容,掌握HttpClient后,相信对于Http协议的了解会
- zxing二维码扫描功能
gundumw100
androidzxing
经常要用到二维码扫描功能
现给出示例代码
import com.google.zxing.WriterException;
import com.zxing.activity.CaptureActivity;
import com.zxing.encoding.EncodingHandler;
import android.app.Activity;
import an
- 纯HTML+CSS带说明的黄色导航菜单
ini
htmlWebhtml5csshovertree
HoverTree带说明的CSS菜单:纯HTML+CSS结构链接带说明的黄色导航
在线体验效果:http://hovertree.com/texiao/css/1.htm代码如下,保存到HTML文件可以看到效果:
<!DOCTYPE html >
<html >
<head>
<title>HoverTree
- fastjson初始化对性能的影响
kane_xie
fastjson序列化
之前在项目中序列化是用thrift,性能一般,而且需要用编译器生成新的类,在序列化和反序列化的时候感觉很繁琐,因此想转到json阵营。对比了jackson,gson等框架之后,决定用fastjson,为什么呢,因为看名字感觉很快。。。
网上的说法:
fastjson 是一个性能很好的 Java 语言实现的 JSON 解析器和生成器,来自阿里巴巴的工程师开发。
- 基于Mybatis封装的增删改查实现通用自动化sql
mengqingyu
DAO
1.基于map或javaBean的增删改查可实现不写dao接口和实现类以及xml,有效的提高开发速度。
2.支持自定义注解包括主键生成、列重复验证、列名、表名等
3.支持批量插入、批量更新、批量删除
<bean id="dynamicSqlSessionTemplate" class="com.mqy.mybatis.support.Dynamic
- js控制input输入框的方法封装(数字,中文,字母,浮点数等)
qifeifei
javascript js
在项目开发的时候,经常有一些输入框,控制输入的格式,而不是等输入好了再去检查格式,格式错了就报错,体验不好。 /** 数字,中文,字母,浮点数(+/-/.) 类型输入限制,只要在input标签上加上 jInput="number,chinese,alphabet,floating" 备注:floating属性只能单独用*/
funct
- java 计时器应用
tangqi609567707
javatimer
mport java.util.TimerTask; import java.util.Calendar; public class MyTask extends TimerTask { private static final int
- erlang输出调用栈信息
wudixiaotie
erlang
在erlang otp的开发中,如果调用第三方的应用,会有有些错误会不打印栈信息,因为有可能第三方应用会catch然后输出自己的错误信息,所以对排查bug有很大的阻碍,这样就要求我们自己打印调用的栈信息。用这个函数:erlang:process_display (self (), backtrace).需要注意这个函数只会输出到标准错误输出。
也可以用这个函数:erlang:get_s