1、配置编辑器(article.component.html):
<ckeditor [editor]="contentEditor" [data]="contentData" [config]="ckConfig" … ></ckeditor>
...
Enjoy java, enjoy life...
Posted by 唧唧 | tags: Angular TypeScript
1、配置编辑器(article.component.html):
<ckeditor [editor]="contentEditor" [data]="contentData" [config]="ckConfig" … ></ckeditor>
...
Posted by 唧唧 | tags: CentOS Nginx
1、下载nginx
# wget https://nginx.org/download/nginx-1.24.0.tar.gz
# tar -zxvf nginx-1.24.0.tar.gz
2、安装ssl模块:
# yum -y install openssl openssl-devel
Posted by 唧唧 | tags: CentOS MySQL
1、下载 安装包:
# wget https://dev.mysql.com/get/Downloads/MySQL-8.2/mysql-8.2.0-linux-glibc2.28-x86_64.tar.xz
...
Posted by 唧唧 | tags: jQuery HTML5 条形码 摄像头
由于工作需要,今天探索了一下在手机端web调用摄像头扫描的方式,实现了条形码的输入。
本次采用的是:quaggaJS 插件:
...#wget http://download.redis.io/releases/redis-3.0.3.tar.gz
#tar xvzf redis-3.0.3.tar.gz
#cd redis-3.0.3
...Posted by 佚名 | tags: validationQuery
在配置数据库连接池的时候,有一个选项validationQuery,该选项用来验证数据库连接的有效性,下表是从网上收集的常用数据库的validationQuery语句。
数据库 | validationQuery |
Oracle | select 1 from dual |
DB2 | select 1 from sysibm.sysdummy1 |
mysql | select 1 |
microsoft sql | select 1 |
hsqldb | select 1 from INFORMATION_SCHEMA.SYSTEM_USERS |
postgresql | select version(); |
ingres | select 1 |
derby | select 1 |
H2 | select 1 |
Posted by 唧唧 | tags: CentOS Linux SVN
1、安装SVN服务端:
[root@localhost ~]# yum install subversion
2、判断SVN是否安装成功:
[root@localhost ~]# svnserve --version
svnserve, version 1.6.11 (r934486)
...
3、创建SVN库目录
[root@localhost /]# mkdir /opt/svn/repos -p
[root@localhost /]# svnadmin create /opt/svn/repos
[root@localhost /]# ll /opt/svn/repos/
total 24
drwxr-xr-x. 2 root root 4096 Apr 2 11:22 conf
drwxr-sr-x. 6 root root 4096 Apr 2 11:22 db
-r--r--r--. 1 root root 2 Apr 2 11:22 format
drwxr-xr-x. 2 root root 4096 Apr 2 11:22 hooks
drwxr-xr-x. 2 root root 4096 Apr 2 11:22 locks
-rw-r--r--. 1 root root 229 Apr 2 11:22 README.txt
1. 查看centos内核的版本:
1)
[root@localhost ~]# cat /proc/version
Linux version 2.6.18-194.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Apr 2 14:58:14 EDT 2010
2)
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
3)
[root@localhost ~]# uname -r
2.6.18-194.el5
2. 查看linux版本:
1) 列出所有版本信息,
[root@localhost ~]# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.5 (Final)
Release: 5.5
Codename: Final
注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
2) 执行cat /etc/issue,例如如下:
[root@localhost ~]# cat /etc/issue
CentOS release 5.5 (Final)
Kernel r on an m
3) 执行cat /etc/redhat-release ,例如如下:
[root@localhost ~]# cat /etc/redhat-release
CentOS release 5.5 (Final)
3. 查看系统是64位还是32位:
1、getconf LONG_BIT or getconf WORD_BIT
[root@localhost ~]# getconf LONG_BIT
64
2、file /bin/ls
[root@localhost ~]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
3、lsb_release -a
[root@localhost ~]# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.5 (Final)
Release: 5.5
Codename: Final
Posted by 唧唧 | tags: CentOS 防火墙
开放端口:
[root@WX32 ~]# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
保存配置:
[root@WX32 ~]# service iptables save
Saving firewall rules to /etc/sysconfig/iptables: [ OK ]
重启防火墙:
[root@WX32 ~]# service iptables restart
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
Loading additional iptables modules: ip_conntrack_netbios_n[ OK ]
Posted by 唧唧 | tags: CentOS JDK
卸载OpenJDK:
[root@WX32 local]# java -version
java version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)
[root@WX32 local]# rpm -qa | grep java
java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
[root@WX32 local]# rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.7.b09.el5
[root@WX32 local]# rpm -e --nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.115