notes
notes copied to clipboard
notes
### 1、使用homebrew安装bash-completion ```bash brew install bash-completion ........ Add the following line to your ~/.bash_profile: [ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion Bash completion has been installed to: /usr/local/etc/bash_completion.d ``` ###...
> 前提条件: > - MySQL数据库已做好主从同步配置 > - 已安装Java环境并配置好环境变量 ### 分别在主从数据库上为amoeba用户授权 ``` grant all on crm.* to amoeba@'192.168.64.%' identified by 'amoeba'; flush privileges; ``` ### 解压安装配置amoeba ``` tar zxvf amoeba-mysql-binary-2.2.0.tar.gz -Camoeba...
DozerUtil ```java package net.aimeizi.util; import java.util.Collection; import java.util.List; import org.dozer.DozerBeanMapper; import com.google.common.collect.Lists; /** * 简单封装Dozer, 实现深度转换BeanBean的Mapper.实现: * 1. 持有Mapper的单例. * 2. 返回值类型转换. * 3. 批量转换Collection中的所有对象. * 4. 区分创建新的B对象与将对象A值复制到已存在的B对象两种函数. */ public...
Straight up Java ```java public void convert_object_to_map_introspector() throws IntrospectionException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { Account account = new Account(1, "ameizi"); Map objectAsMap = new HashMap(); BeanInfo info = Introspector.getBeanInfo(account.getClass()); for (PropertyDescriptor...
> 环境: > MariaDB 10.1.12 > CentOS Linux release 7.2.1511 ### 安装MariaDB 10.1.12 配置MariaDB 10.1.12 yum源 ``` bash [root@c1 ~]# vim /etc/yum.repos.d/MariaDB.repo [root@c2 ~]# vim /etc/yum.repos.d/MariaDB.repo [root@c3 ~]# vim /etc/yum.repos.d/MariaDB.repo...
### 1、修改`JVM`参数 在`catalina.bat`中添加如下配置 ```bat set "JAVA_OPTS=%JAVA_OPTS% -server -Xms4096m -Xmx4096m -Xmn2048m -Xss512k -XX:PermSize=128m -XX:MaxPermSize=512m -XX:NewSize=1024m -XX:MaxNewSize=2048m -XX:MaxDirectMemorySize=4096m -XX:ReservedCodeCacheSize=240M -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:MaxTenuringThreshold=15 -XX:+ExplicitGCInvokesConcurrent -XX:+ParallelRefProcEnabled -XX:-UseBiasedLocking -XX:-UseCounterDecay -XX:AutoBoxCacheMax=20000 -XX:+AlwaysPreTouch -XX:-OmitStackTraceInFastThrow -XX:SurvivorRatio=18 -XX:+UseParNewGC...
https://android-developers.googleblog.com/2015/05/android-design-support-library.html https://inthecheesefactory.com/blog/android-design-support-library-codelab https://medium.com/@hitherejoe/exploring-the-android-design-support-library-bottom-navigation-drawer-548de699e8e0 https://labs.ribot.co.uk/exploring-the-new-android-design-support-library-b7cda56d2c32 https://guides.codepath.com/android/Design-Support-Library https://www.sitepoint.com/material-design-android-design-support-library
```sql CREATE TABLE `example`(`id` INT, `order` INT, `data` VARCHAR(1)); INSERT INTO `example` (`id`, `order`, `data`) VALUES (1, 1, 'P'), (2, 2, 'Q'), (2, 1, 'R'), (1, 2, 'S'); ``` *...
http://callistaenterprise.se/blogg/teknik/2015/10/09/spring-boot-app-as-a-windows-service/ http://www.baeldung.com/spring-boot-app-as-a-service https://github.com/snicoll-scratches/spring-boot-daemon http://javasampleapproach.com/java-integration/create-windows-service-spring-boot-application-procrun
前奏 ``` bash pip install lxml ``` xunlei.py ``` python #coding=utf-8 import urllib2 import lxml.html import codecs xunlei = codecs.open("xunlei.txt", "wb", "utf-8") response = urllib2.urlopen("http://www.vipfenxiang.com/xunlei/") doc = lxml.html.fromstring(response.read()) link =...