tomhat的博客
tomhat · 共 156 篇文章
[置顶] Git 常用操作命令
可以创建私有项目的git网站: https://bitbucket.org http://git.oschina.net/ master : 默认开发分支; origin : 默认远程版本库 初始化操作 $ git config --global user.name <name> #设置提交者名字 $ git config --global user.email <email> #设置提交者邮箱 $ git config --global core.editor <editor> #设置默认文本编辑器 $ git config --global merge.tool <tool> #设置解决…
2014-05-13 11:15 · git · 评论(0)
[置顶] GWT CellTable
package com.cn.client; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.google.gwt.cell.client.CheckboxCell; import com.google.gwt.cell.client.DateCell; import com.google.gwt.cell.client.EditTextCell; import com.google.gwt.cell.client.FieldUpdater; import com.goo…
[置顶] Gwt ListBox MultipleSelect
当ListBox设置属性MultipleSelect时取值方法如下: package com.cn.client; import java.util.ArrayList; import java.util.List; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; i…
[置顶] 重写BASE64Encoder
今天发现JDK1.4中的sun.misc.BASE64Encoder有两个问题 1)编码的字节较长时,encode出来的字符窜会在中间插入\n\r 比如 编码"中华人名共和国 呵呵呵呵呵呵呵呵呵呵呵呵呵中华人名共和国 呵呵呵呵呵呵呵呵呵呵呵呵呵" 生成的字符窜居然有两行,中间多了回车换行符。 2)效率较差(见后面的比较) 下面是我的实现: public class BASE64Encoder { private static char codec_table = { 'A', 'B', 'C', 'D', 'E', 'F', 'G','H', 'I', 'J', 'K', 'L', 'M',…
2010-12-30 00:09 · java · 评论(0)
[置顶] BASE64转码成字符串和字符串转化为bytebuffer
import sun.misc.BASE64Decoder; import java.nio.ByteBuffer; public class Base64Utils { public static String getFromBASE64(String s) { if (s == null) return null; BASE64Decoder decoder = new BASE64Decoder(); try { byte b = decoder.decodeBuffer(s); return new String(b, "UTF-8"); } catch (Exception e) …
2010-12-16 16:10 · java · 评论(0)
[置顶] JSTL获取list的大小,jstl获取list 的长度,EL表达式获取list的长度,EL表达式获取list大小
在jsp页面中不能通过${list.size}取列表长度,而是 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> list的长度是:${fn:length(list)}
2010-10-14 15:26 · web前端 · 评论(0)
IDEA 设置Get Set模板
Intellij IDEA中boolean 生成带有is的字段的Get&Set方法,is会被自动除去; 网络上查找资料,外加自己研究得出如下配置: Get(源自网络) #set($paramName = $helper.getParamName($field, $project)) #if($field.modifierStatic) static ## #end $field.type ## #set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper…
2022-08-20 21:04 · 评论(0)
Anolis安装DDE桌面
如何在Anolis OS中安装部署DDE 1、下载Anolis GA镜像并使用最小化安装 2、配置Anolis DDE仓库源命令行执行如下命令: sudo yum install -y yum-utils sudo yum-config-manager --enable DDE sudo yum-config-manager --enable Plus 处理kwin-libs安装问题 vim /etc/yum.repo.d/myrepo.repo [myrepo_01] name=myrepo_01 baseurl=https://download-ib01.fedoraproject.or…
2021-11-02 11:26 · Linux · 评论(0)
jquery-chosen.js示例使用方法
jquery-chosen.js示例使用方法 (https://harvesthq.github.io/chosen/) (https://cdnjs.com/libraries/chosen) <select id="fruit" name="fruit" class="chosen-choices" data-placeholder="单选水果"> <option value="apple">苹果</option> <option value="orange">橘子</option> <option value="banana">香蕉</option> <option value="pe…
2021-02-21 17:18 · jQuery · javascript · 评论(0)
jquery-validate示例使用方法
示例使用方法 <form class="form-horizontal m-t" id="signupForm"> <div class="form-group margin-bottom-20"> <label class="col-sm-3 control-label required">云信息:</label> <div class="col-sm-8"> <select id="cloudId" name="cloudId" class="chosen-choices" data-placeholder="请选择云" onchange="loadInstanceParam()"> <…
2021-02-21 14:19 · jQuery · javascript · 评论(0)
CenOS扩容跟磁盘
一、使用背景 Linux根目录磁盘空间不够用了,当修改了虚拟机模版增加磁盘大小或者插入了一块新硬盘,但是发现系统里的大小还是没改变。 产生的原因是没有给磁盘格式化,没有增加分区。 二、操作方法 查看磁盘空间大小,使用df -h 命令 增加磁盘空间,例如下图使用VM虚拟机增加的方式。 具体操作请查看 https://gitee.com/tomhat/sources/blob/master/Linux/CentOS/%E6%89%A9%E5%AE%B9%E8%B7%9F%E7%A3%81%E7%9B%98.md
2020-09-21 18:54 · 评论(0)
bitnami版redmine迁移升级
bitnami版redmine迁移升级 1、版本说明 迁移版本:3.1.1-1 升级版本:3.4.6-5 2、备份迁移版本 2.1 、查询数据库密码 root@localhost:# cat /opt/redmine-3.1.1-1/apps/redmine/htdocs/config/database.yml --- # Default setup is given for MySQL with ruby1.9. # Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end. # Line indenta…
2019-04-16 15:38 · redmine · 评论(0)
编译安装自定义目录MySQL5.7
构建环境 yum -y groupinstall "Development Tools" yum -y install ruby ruby-devel rubygems gcc openssl-devel 安装FPM gem sources --add http://mirrors.aliyun.com/rubygems/ --remove http://rubygems.org/ gem install arr-pm fpm 编译安装 yum install libaio-devel ncurses-devel libgcrypt perl make cmake gcc gcc-c++ b…
2019-03-22 16:34 · mysql · 评论(0)
构建mysqlRPM安装包
构建环境 yum -y groupinstall "Development Tools" yum -y install ruby ruby-devel rubygems gcc openssl-devel 安装FPM gem sources --add http://mirrors.aliyun.com/rubygems/ --remove http://rubygems.org/ gem install arr-pm fpm 获取安装安装编译后的安装文件 获取安装的MySQL [root@localhost ~]# rpm -qa | grep mysql mysql-community-…
Apache HTTPClient 忽略证书
/** * httpclient4.5.2版 * 忽略服务器证书,采用信任机制 * @return */ public static HttpClientConnectionManager init(){ try { SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() { @Override public boolean isTrusted(X509Certificate[] arg0, String arg1) throws CertificateException…
2019-01-25 15:03 · java · 评论(0)