') formatter = logging. Formatter ('% (name) s% (asctime) s% (levelname) s% (message) s ') Filehandler.setformatter (Formatter) filter= Logging. Filter (' B ') Filehandler.addfilter (filter) Log1.addhandler (Filehandler) Log2.addhandler (Filehandler ) Log1.setlevel (logging.info) log2.setlevel (logging. Debug) Log1.debug (' It is a debug info for log1 ') log1.info (' Normal infor for Log1 ') log1.warning (' Warning info for LOG1:B.C ') lo
What is the meaning of a library backup?Sometimes a company's database has multiple libraries, for example (WWW,BBS,CMS), but the problem may be a certain library, if the backup time to back up all the library as a data file, the recovery of data is more troublesome.Library Backup Method One:[Email protected] ~]# mysql-uroot-p123456-e "Show Databases" | Grep-evi "database|infor|perfor" |sed-r ' s#^ ([a-z].*$) #mysqldump-uroot-p123456--events-b \1|gzip
"Backed-up Commands"1) backing Up the databaseMysqldump-uroot-pwsyht-b Library name >/opt/test.sql #加-B for information on adding use DB and CREATE database db2) View the databaseEgrep-v "#|\*|--|^$"/opt/test.sql #查看test. SQL Library Contents3) Recovering the databaseMysql-uroot-pwsyht 4) Compress backupMysqldump-uroot-pwsyht-b Library Name | gzip >/opt/test.sql.gzip #压缩备份减少占用内存空间, compression efficiency nearly 3 times times5) backing up multiple librariesMysqldump-upeter-pwsyht123-b Test Allow
the related constraints of the table, should add the related constraints of the table in the physical model;2> only in the physical model will the PowerDesigner display the Database menu item. The database Generation option is only available in the Database menu item (for generating SQL statements);step three: in SQL Server 2005 Create a database manually inFor example, I manually created the database "Students" Sample in SQL Server 2005. Fourth step
, = representative settings.File or directoryEg1:infor Original permission is drw-r–r– input command chmod u=rwx,g=rw,x=rx inforInfor Permissions to Drwxrw-r-x (note that there is no space in the middle of the U=rwx,g=rw,x=rx)Eg2:infor Original permission is drw-r–r– input command chmod u-w inforInfor Permissions Change to dr–r–r–5. Copy files: CP source file Target file EG:CP. bashrc. bashrc_testsecond, lo
In a single game there are dozens of scene props, each has its own state (get, not get, get the number) and so on, if in the game is trivial involved in the real-time storage of these props, then the use of text will be slightly slower, you can use the SQLite database to complete.: http://www.sqlite.org/download.htmlAfter downloading, you can import sqlite3.c and sqlite3.h two files in your project.Attach the Use code: (If the table does not exist, create two tables, store two props, and then ge
jailbreak machine, because the jailbreak machine can access to this file, in the non-jailbroken machine, Because the application is not allowed to access directories other than the sandbox environment, the file cannot be read or even the existence of the file will fail.The code is as follows:-(BOOL) apcheckifappinstalled: (NSString *) Bundleidentifier{Static NSString *Const CACHEFILENAME = @"Com.apple.mobile.installation.plist"; NSString *relativecachepath = [[@"Library" stringbyappendingpathco
system broadcasts. For example, one of the built on Android broadcast is and the battery is low. You can create your own custom broadcasts as well.Broadcast receivers is in the application, that listen for broadcasts and take some action. Could, for example, build a broadcast receiver to listen for the battery getting low broadcast event in order to Infor M the user that unsaved data should is saved quickly. Of course, you can also build a broadcast
the data can be displayed simply The function used is arrayadapter (context context , int Textviewresourceid, ListT > objects ) to assemble the data Setadapter transfer the configured adapter inFor adapter issues, the Android Development manual is mainly about three types ofArrayadapter,simpleadapter,simplecursoradapterat the same time there is a point to note that adapter and Adapterview is not the same concept,adapter is the link between data an
What is a URL?Application Example: Can be a picture, such as resource address, browser address bar URL, etc.Uniform Resource Locator Uniform Resource LocatorHttp://www.123.com/infor/index.htmlA URL consists of four parts:The first part: protocol, e.g. http://The second part: domain name (or hostname, server name), such as: www.123.comThird section: folders, such as: inforFourth part: File name, such as: index.html?In HTML, the concept of absolute and
in order to avoid affecting other variables in the scope, it is isolated by the way the function is self-executing ()() ;
Avoid usingfor(var i=0; i的方式,这样的数组长度每次都被计算,效率低于上面的方式。也可以将变量声明放在for的前面来执行,提高阅读性。
There are several ways to jump out of a loop
Return function execution is terminated
Break loop is terminated
Continue loop is skipped
For infor(var item in arr|obj){}Can be used to iterate over arrays and objects
#!/usr/bin/env python#_*_coding:utf8_*_classpeople (object): Infor='Test Info'#class VariablesInfor_dic = { "name":'Dodo', " Age": 30 } #dictionaries can be shared, shallow copy knowledge def __init__(self,name,age,job):#constructor method to implement parameter initializationSelf.name =name self.__age= Age#private variables, not externally callable, can only be called inside the class, cannot be changed externallySelf.job =
ParenthesesFive semantics of parentheses in JavaScriptSemantics 1: parameter table for function declarationFunction func (arg1, arg2 ){//...}Semantic 2, which can be used together with some statements to achieve certain restrictions// Used with for inFor (var a in obj ){//...}// Used with ifIf (boo ){//...}// Used with whileWhile (boo ){//...}// Use do {with do while {//...}While (boo)Note: when used with if, while, And do while, parentheses implicitl
practices:
Record the keywords of the record R [I] from right to left and record R [j] (j = i-1, I-2 ,..., 1) keyword comparison:
① If the keyword of R [j] is greater than the keyword of R [I], the R [j] is moved back to a position;
② If the keyword of R [j] is less than or equal to the keyword of R [I], the search process ends, and j + 1 is the insert position of R [I.
Records with larger keywords than those of R [I] have been moved backward, so the position of j + 1 has been vacated, you only
master_info_repository and relay_log_info_repository to TABLE, and enable relay_log_recovery.
Modify the/etc/my. cnf configuration file and add the following three items:
Master-info-repository = table # can be dynamically modified using set global
Relay-log-info-repository = table # can be dynamically modified using setglobal
Relay-log-recovery = 1 # read-only parameter. you must modify my. cnf to restart mysql.
Then restart the mysql instance.
[References]
LMaster.info and relay-log.info logs
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.