Turn from: http://blog.csdn.net/javazejian/article/details/75043422
From "Zejian's blog."
Related articles:
Deep understanding of Java type information (class object) and reflection mechanism
Deep understanding of Java Enum Types (enum)
Deep understanding of Java Annotation Types (@Annotation)
Deep understanding of the Java Class loader (ClassLoader)
Deep understanding of the synchronized implementation principle of Java concurrency
Java concurrent Programming-non-lock CAs and unsafe classes
Quick Start
Import re pattern
= "This"
Text = ' Does this text match the pattern? '
Match = Re.search (pattern, text)
s = Match.start ()
e = match.end ()
print (' Found ' {0} ' \nin ' {1} '. Format ( Match.re.pattern, match.string))
print (' from {0} to {1} ' (' {2} ') '. Format (S, E, text[s:e])
Execution results:
#python re_simple_match.py
Found ' This ' in
' does this text match the ' pattern? '
From 5 to 9 ("this")
import
Recently done a project daemon, need to multi-threading MySQL database service operation, in order to strengthen the robustness of the Guardian support, the connection was successful after unplugging the network cable, and then test the daemon to disconnect the robustness of the reconnect, but found that the network is disconnected, re-plug the cable, with Mysql_real_ Conncet The reconnection returned is always false, that is, reconnection fails, afte
Refer to Region.
Regular Expressions (also known as res, RegEx, and RegEx pattens) are small and highly specializedProgramming LanguageIt is embedded in the python development language and can be used through the re module. Regular Expression
Pattern can be compiled into a series of bytecode and then executed using the engine written in C. The following describes the regular expression syntax.
The regular expression contains a metacharacter list
Mac terminal by default in the opening of a new Tab/window need to re-enter the password ssh, very inconvenient. This article completes the setting in the Mac, realizes the clone session function in the Securecrt/xshell, namely opens a terminal SSH connection without re-entering the password.The principle is very simple, open an SSH connection in the background, and later need to use SSH to the same host, t
Re module: What is a regular? is to combine a series of strings of special meanings into regular expressions, and invoke the regular method through the RE module;1 ImportRe2 Print(Re.findall ('\w','Kermitjam Kermitjam _ [email protected]$%#^%*) _)')) #\w alphanumeric underline3 Print(Re.findall ('\w','Kermitjam Kermitjam _ [email protected]$%#^%*) _)')) #\w non-alphanumeric underline4 Print(Re.findall ('\d
---restore content starts---Because a long time useless MySQL, suddenly found the password forgotten, toss a half-day after, how also changed not to come! Again, the process of re-installation is completely removed.Step1. Unloading:sudo apt-get remove--purge mysql-server mysql-client mysql-commonsudo apt-get autoremovesudo apt-get AutoClean 为了防止安装时再出问题,删除mysql 文件夹,甚至最好再重启一下sudo rm-rf/var/lib/mysqlsudo rebootStep2.
from the beginning)Print (Re.findall (' ^yang ', ' yangzz\n age_18 Yang aaa bb\nb ')) #[' Yang '$ match End of stringPrint (Re.findall (' b$ ', ' yangzz\n age_18 Yang aaa bb\nb ')) #[' B ']. Matches any character, except line breaksPrint (Re.findall ('. ', ' yangzz\n age_18 *% Yang aaa bb\nb ')For example 2 A.G is actually a three-bit character,. Can be any non-line break (followed by re.) Dotall can also be taken in the middle. \ n)Print (Re.findall
The Delphi thread can run synchronously in the main thread by calling Athread.synchronize (Aproc), where Athread will hang until the main thread finishes executing aproc.If there is Bthread, Bthread.synchronize (Bproc) is called, and Athread is released in Bprocprocedure Tbthread.bproc begin athread.terminate; athread.waitfor; Athread.free; End;At this point our program will be stuck, the following code can avoid deadlocks, is a generic thread waiting for the end code. athread.terminate;
1. Summary of the usage of re regular(1), ^ indicates which character to start with eg: ' ^g ' denotes a string starting with G. means that any character ' ^g.d ' represents a second character starting with G, and a third string of B indicates that a character appears any number of timesImport re ' bobby123 ' '^b.*' # Any string that begins with B appears any number of times ^ begins with . Any cha
1. What is an exception(1) The basic idea of the anomaly is to let a function find itself unable to solve the error when throwing an exception, let the caller to solve. Exception handling mechanism is similar to compile-time type checking and ambiguity control at runtime counterpart, it is a non-local control structure, when throwing an exception, we use the stack fallback to find the upper function that can handle the exception. Some people think of an anomaly as a big, irreparable mistake in t
,Constmcontainer);}; TemplateclassT>classmy_array{/*...*/}; McontainerDouble, my_arrayDouble> > mc;(2) A class can contain a member that is itself a template:templateclass s>class complex{ S Re, im; Templateclass t> Complex (const complexC): Re (C.real ( )), Im (C.imag ()) {} //... };complexfloat> F (0.0); complexdouble// can: There are conversions of float to doubleHowever, the templa
infinity for the previous character{} Repeat M times for previous character{m,n} repeats to M to n times for the previous character\d matching number, equivalent to [0-9]\d matches any non-numeric character, equivalent to [^0-9]\s matches any white space character, equivalent to [FV]\s matches any non-white-space character, equivalent to [^ FV]\w matches any alphanumeric character, equivalent to [a-za-z0-9_]\w matches any non-alphanumeric character, equivalent to [^a-za-z0-9_]\b Match the start
using less time
Do not run all your backups at the same time.
Do not run a batch program at the same time as a large backup.
Use the backup option to write to multiple files. This will scatter your I/O and increase the number of threads.
Use several backup technologies at the same time: complete, differentiated, and log.
Local recovery
From a recovery standpoint, most of the time mentioned above is used for recovery. Here are some additional tips:
Different phases are used in different a
;height:450px;" alt= "Wkiol1nzz72awx3-aax41bxmdms870.png-wh_50"/>But at this time through the Disk Manager also see to this disk, supposedly, if there is no data, I can immediately format, the disk should be able to re-use immediately, but there is no way, I must get the data back, in order to ensure that the data back to copy one of the other hard disk before the disk can be processed, Thus, the following processes are available:Download diskgenius--
Originally learned time, quite smooth, did not expect to use again, or encountered a lot of problems, resulting in the failure of the update, so, can only reconstruct the migration, so as not to look at the chaos.First, delete the migration, restore the data to the (a) End state1. Delete Folder2. Delete a table3. Delete Columns4. Comment out the newly added attributesSecond, re-operation EF6 in the original database using Codefirst Total review (secon
This article mainly describes the Python decorator, iterator amp; Generator, re regular expression, and string formatting. if you are interested, refer to this chapter:
Decorator
Iterator generator
Re regular expression
String formatting
Decorator
The decorator is a well-known design model and is often used in scenarios with cut-plane requirements. it is more classic in terms of log insertion, performanc
(1) Background之前删除文件时候,不小心将文件夹里面所有文件都删除了,包括一些应用软件(pycharm,eclipse),在使用恢复软件恢复之后,不过没能成功,文件是没有回来,于是决定重新安装.(2) Description of the problem本想着文件被删除了,也就是应用被卸载,但情况不是.Download the file from Pycharm official website, unzip the installation, the installation step is to run under the ./bin folder pycharm.sh , so the problem comes, when the execution of this script, will run the Pycharm program directly, unable to implement reinstall program.-–> guess whether there are some files or configuration is not dele
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.