. Configuring the JDKThe full version of the system comes with OPENJDK and is replaced with Oracle's JDKFirst, the OpenJDK uninstall#查找带有openjdk的安装项目rpm-qa | grep java# Delete rpm-e--nodeps by name xxxxxDownload the Linux version jdk to the/home directory and pass the tar--xzvf jdk-xxxx.tar.gz/jdk1.8.0Vi/etc/profileand add the following content,Export Java_home=/home/jdk1.8.0export classpath=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib /tools.jarexport path= $PATH: $JAV
certainly affect performance.However, there are special cases:public static void Main (string[] args) {//(1) String S1 = "Hello"; String s2 = "world!"; String s3 = s1 + s2; System.out.println (S3); Output:hello world!//(2) String s = "Hello" + "world!"; /(3) StringBuffer sb = new StringBuffer ("Hello"); Sb.append ("world!");}in these three cases, sort by speed: (2) > (3) > (1), which is a feature of the JVM, when the concatenation of the string object is interpreted as a concatenation of the St
1#include 2 using namespacestd;3 #defineSwap (b) {a^= B; b^=a; a^=b;}//You can also define macros like this4 5 voidRightShift (int*array,intNintM)6 {7 intI, J;8 if(m>0 m!=n)//M==0 | | Do not cycle right when m==n9 {Ten for(i=0, j=n-1; i ) One swap (array[i],array[j]); A - for(i=0, j=m-1; i ) - swap (array[i],array[j]); the - for(I=m, j=n-1; i ) - swap (array[i],array[j]); - } + } - + intMain () A { at intN, M; - while(cin>>n>>M) -
First, learn the VIM native shortcut keys and related commands before adding plugins. (When used to record, temporarily will be chaotic, irregular sorting)Ps:ctrl+s means stop output to terminal; The ctrl+q resumes to the terminal output stream. Using various shortcut keys may be mistakenly pressed to ctrl+s, when the button window is unresponsive, using ctrl+q recovery.
Vim Auto Completion:Vi/vim Use advanced: Auto-complete (ctrl+x CTRL + Phase key, personal feeling mainly used: n the cur
To facilitate rapid development projects, I intend to integrate the Django and bootstrap frameworks together, and here is the consolidation process.Environment:Python version: 2.7.8Django Version: 1.7.1Bootstrap version: 3.3.0First GitHub has two open source projects to consolidate Django and bootstrap.Https://github.com/dyve/django-bootstrap-toolkit corresponds to the bootstrap 2.0 version.HTTPS://GITHUB.COM/DYVE/DJANGO-BOOTSTRAP3 corresponds to the
password change:0Maximum number of days between password change:90Number of days of warning before password expires:7
View the Oracle password has been found to have expired time. The workaround is set to never expire or modify the password of the Oracle user. To further verify the problem, try to discover the problem resolution by setting the never expired attempt:
[Root@irora11 ~]# chage-m 99999 Oracle[Root@irora11 ~]# Su-oracle[Oracle@irora11 ~]$ Crontab-l0 3,7,11,15,19,23 * * */home/oracl
The day before yesterday solved the integration of spring and hibernateWhen I was full of confidence, I began to do spring and Struts2 integration, I wrote an action and Web page, the browser run action when actually error, The original is I web. XML did not increase the STRUTS2 information, increase or error, the original does not increase the time, you can also visit index.jsp, increase the later can not, spent my nearly two days, the afternoon asked the Li Xia, the results he did not find out
For arrays, we can print out all of the objects by reflection:Package Com.test;import Java.lang.reflect.array;import Java.lang.reflect.field;public class ReflectTest {public static void Main (String []args) throws exception{int[] A=new int[]{1,2,3,4};p rintobject (a);} private static void PrintObject (Object obj) {Class clazz = Obj.getclass (); if (Clazz.isarray ()) {int len = array.getlength (o BJ); for (int i =0;iJava Foundation Consolidation Series
To use reflection, you first need to get the class object for the Class class object. A Field object corresponds to the attribute (member variable) information of a reflection classThere is a method in this field.setaccessible (Boolean b), this method is very important, there is a comment in the code, is used to improve the speed of Java reflection.First, we need to define a javabean that the bean uses as our reflection class:we then write a concrete reflection method in main:Note that the Setac
Mail-1.4.7.jar Send mail jar package Activation-1.1.jar JavaMail related jar package, use javamail should join with Mail.jar to the LibMysql-connector-java-5.1.45-bin.jar get the jar package for the database connectionCommons-dbutils-1.6.jar let JDBC quickly manipulate the jar package for the databaseCommons-pool-1.5.4.jar Commons-dbcp-1.4.jar Get the jar package for the database connection poolJstl-1.2.jar Jstl jar PackageUsed JAR Package Consolidation
After the spring consolidation JavaMail succeeded, a large amount of code was configured into the spring configuration file, reducing the JavaMail to mailboxes, ports, protocols, topics, content ... The coupling. You can send a message only if you need to invoke one line of code on the client.
First, you don't have to import jars into the project's lib, but you need to import 3 jar file Activation.jar in Tomcat's Lib, Jspsmartupload.jar,mail.jar impo
printing:
Mainly this line Summary
Unit tests can run through, indicating that access to the persistent layer database is not a problem Spring cache consolidation Redis completes the service layer cache Redis connection Information cache/redis-config.properties
# Redis Settings
# server IP
redis.host=your_redis_ip
# server Port
redis.port=63799
# Server Pass
Redis.pass=your_redis_secret
# use Dbindex
redis.database=0
# Control a pool up to how many
Spring Boot Consolidation RABBITMQ (topic mode)Reproduced September 07, 2017 14:33:46 259
Introduction to 1.Topic Converter
Topic Exchange forwarding messages are based primarily on wildcard characters. Under this switch, the binding of queues and switches defines a routing pattern, and the wildcard will have to be matched between this routing mode and the routing key before the switch can forward messages.In this switch mode:The routing key must be a
The pit you stepped on in the morning, it is necessary to record!
Problem: Spring consolidation WebSocket Injection service failed
Solution:
Step one: Add a jar package to the Pom.xml file
Step Two: Add configurator = springconfigurator.class on the server side
@ServerEndpoint (value = "/api/websocket", configurator = springconfigurator.class)
@Component public
class Websocketservice {
@Autowired
}Step three: You need to configure Appl
installation confluence's home directory ( ) and then select Restore , which is recommended for large XML files.
Note: If you choose not to reply to the data during the confluence installation process, you can import the data after the installation is successful. Go to the Administrator console of the confluence and select Restore from an XML backup. Please refer to the content on the Site Backup and Restore page.Step 7: Copy all of your attachmentsCopy the contents of the
together.#Nature: Each operation of the database will automatically create a session connection, finished automatic shutdownBlinker#SignalWtforms#Form Componentscomponents and versions used PIP3 freeze#get all installed modules in the environmentPIP3 Freeze >A.TXTPIP3 Freeze>Requirements.txt#pip3 Install Pipreqs #帮你找到当前程序的所有模块, and automatically generate requirements.txt files, write contentPipreqs./#root directoryafter someone gives you a program to tell you a folder to install components: Req
nodes are hanging off. The MongoDB node sends the pings packet once every two seconds to the other nodes in the replica set, and if the other node does not return within 10 seconds, it is marked as unreachable. A State mapping table is maintained inside each node to indicate what the current role, log timestamp, and other key information is for each node.
If it is a master node, in addition to maintaining the mapping table, you also need to check whether you can communicate with most of the no
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.