address is http://blog.csdn.net/mchdba/article/details/48039035. thank you for your reprinting.
2. start debugging.2.1 paste a script from a friend that fails to run.
@ Echo off setlocal ENABLEEXTENSIONS
Set BACKUP_PATH = D: \ Backup \
Set DATABASES = hoomsun_credit
Set USERNAME = root
Set PASSWORD = root
Set MYSQL = D :\mysql-5.6.21-winx64 \ bin
Set WINRAR = F: \ winrar \ Rar.exe
Set YEAR = % date :~ 0, 4%
Set MONTH = % date :~ 5, 2%
Set DAY = % date :~ 8, 2%
Set HOUR = % time :~ 0, 2%
Se
----------
Set year=%date:~0,4%
Set month=%date:~5,2%
Set day=%date:~8,2%
:: If the input time in DOS to return is not 24-hour system (no 0 fill), please modify this here
Set hour=%time:~0,2%
Set minute=%time:~3,2%
Set second=%time:~6,2%
Set dir=%backup_path%%year%\%month%\%day%\
Set addon=%year%%month%%day%%hour%%minute%%second%
:: Create dir
If not exist%dir% (
mkdir%dir% 2>nul
)
If not exist%dir% (
echo Backup path:%dir% NOT ex
Method One
Specific codeBackup
The code is as follows
Copy Code
@echo Off setlocal enableextensions ::----------Configuration Items---------- :: Backup placement path, plusSet Backup_path=d:backup :: Database name to back up, multiple spaces separatedSet Databases=database1 database2 database3 :: MySQL User NameSet Username=root :: MySQL PasswordSet password=123456 :: MySQL Bin directory, plus:: If you can use Mysqldump directly (add MySQL Bin directory to environm
text. STOP3. If X. node is a file, load X. node as binary addon. STOPLOAD_AS_DIRECTORY (X)1. If X/package. json is a file,A. Parse X/package. json, and look for "main" field.B. let M = X + (json main field)C. LOAD_AS_FILE (M)2. If X/index. js is a file, load X/index. js as JavaScript text. STOP3. If X/index. node is a file, load X/index. node as binary addon. STOPLOAD_NODE_MODULES (X, START)1. let DIRS = N
Provides various official and user-released code examples. For code reference, you are welcome to exchange and learn the self-developed thinkphp plug-in mechanism, which is easier to transplant, upgrade, and secondary development than onethink.
Core
// + ----------------------------------------------------------------------// | Thinkphp [we can do it just think it]// + ----------------------------------------------------------------------// | Copyright (c) 2015 http://www.inuoer.com All rights
Here is a cliché about the behavior extensions and plugins in thinkphp (recommended). Small very good, now share to everyone, also for everyone to make a reference.
Principle Analysis
The correspondence between the label and the class, such as ' App_init ' =>array (' Common\behavior\inithook '), is loaded into the static variable $tags in the hook class via the import or Add method in the Hook class. When executing a static method listen or Exec method in a hook (called Exec in the Listen metho
installation failed, and later found this plug-in baidu souzang URL, can be used.GTranslate dictionary plug-in, very conciseInstall Yongzhong office with source codeDownload source http://www.yozosoft.com/person/Installation CommandTar zxvf yozo_office_6.1.0030.w.zh.tar.gzCd 6.1.0030.20.zh/Sudo./setupInstall the xp font Plugin. You can also copy the required font ).Sudo apt-get install ttf-mscorefonts-installerCd/usr/share/fonts/Sudo tar zxvf xpfonts.tar.gzSudo mkfontscaleSudo mkfontdirSudo fc-
enforced, and an action can be reused.
static public function exec ($name, $tag, $params =null) {if (' Behavior ' = substr ($name,-8)) {Behavior extensions must use the Run Entry method$tag = ' run ';}$addon = new $name ();return $addon-> $tag ($params);}
Add:
The thinkphp provides a hook mechanism, thinkphp provides a set of loading points that allow users to handle some of their own extensions at the
(disk space utilization, memory utilization, CPU load, etc) 3) Simple plug-in interface design, allowing users to easily develop the required detection script 4) Parallel service mode 5) easy description of the network structure, and the ability to distinguish between "down" and "host inaccessible" 6) notify the administrator of the changes in the working status of the host or service by email or user-defined means 7) automatic Log rolling (8) support for host monitoring in redundancy mode (9)
permanently saved. At each startup, it loads the value saved in the. js field to initialize the element in the. xul file.Sample Code:// Define the default value for the variablePref ("login. time ","");Pref ("username," ghostjeky ");Pref ("extensions. {69354808-F0D7-40CC-BB5F-8C1B8F57CECC}. description", "chrome: // my_extension/locale/statusbarOverlay. properties"); // reference multilingual attribute strings
5 components // define the method interface for the extension logic (. xpt,. dll file
We often talk about behavior extensions and plug-ins (recommended) in ThinkPHP.
Principle Analysis
Use the import or add method in the Hook class to set the correspondence between tags and classes (for example, 'app _ init '=> array ('common \ Behavior \ InitHook, load it to the static variable $ tags in the Hook class. When the listen or exec method of the static method in the Hook is executed (exec is called in the listen method), the class corresponding to the tag is instantiated, and the cor
/repository/addon.xmlFound Google APIs, Android API 3, Revision 3Found Google APIs, Android API 4, revision 2Found Google APIs, Android API 5, Revision 1 (obsolete)Found Google APIs, Android API 6, Revision 1 (obsolete)Found Google APIs, Android API 7, Revision 1Found Google APIs, Android API 8, revision 2Found Google APIs, Android API 9, Revision 2 (obsolete)Found Google APIs, Android API 10, revision 2Found Google APIs, Android API 11, Revision 1Found Google APIs, Android API 12, Revision 1Fou
arguments, which add a copy of the second string to the end of the first string, so that the first string is called a new combined string, and the second string does not change. The function is a char* type (a pointer to char), which returns the value of its first argument, the address of the first character of the string after which the second string was added. The approach and ingredients of the plate surfaceInstance Program:
1234567891011121314
#include#include#definesize8
. Statusinternalservererror) W.write ([]byte ("HTTP 500:internal Server Error") Return } W.writeheader (Code) W.write (response)}
It's almost done.
Next, we "assemble" the functions of the blockchain, the Web service, into the function:
Func Main () { ERR: = godotenv. Load () If err! = Nil { Log. Fatal (ERR) } Go func () { T: = time. Now () Genesisblock: = block{0, t.string (), 0, "", ""} Spew. Dump (Genesisblock) Blockchai
to overflow, but it's best to check it out in case.
In this cycle, we do things that are:
Preparing data
Hash the data with SHA-256
Converts a hash to a large integer
Compare this large integer to the target
It's as simple as what you said before. Now we can remove the Block 's sethash method and then modify the newblock function:
func NewBlock(data string, prevBlockHash []byte) *Block { block := Block{time.Now().Unix(), []byte(data), prevBlockHash, []byte{}, 0} pow :=
the moment. Therefore, in any blockchain, there must be at least one chunk, and the first chunk in the blockchain is called the creation block. Below, we implement a method to create a Genesis block:Func newgenesisblock () *block { return Newblock ("Genesis block", [] byte {})}Now, we can implement a function to create a blockchain using the Genesis block:Fun
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.