-----automatically back up MongoDB data and compress---#!/bin/bashFilename= ' Date +%y%m%d%h 'Backmongodbfile=mongodb$filename.tar.gzcd/home/mongo/back//usr/mongodb/bin/mongodump-h 192.168.1.7-port 37017-d Mongodbagent-o mongodb_dump//usr/mongodb/bin/mongodump-h 192.168.1.7-port 37017-d Mongodbbg-o mongodb_dump//usr/mongodb/bin/mongodump-h 192.168.1.7-port 37017-d Mongomodelactor-o mongodb_dump/Tar czf $backmongodbFile mongodb_dump/RM MONGODB_DUMP-RF-----automatically unzip and restore MONGODB d
Create a virtual table @tmpDECLARE @Tmp TABLE INT, RESULR XML)--Inserting dataINSERT into @Tmp(ID,RESULR)VALUES(1,'')INSERT into @Tmp(ID,RESULR)VALUES(2,'')--Original result setSELECT * from @Tmp as TRoot> Row> ID>1ID> score>80score> Row> Row> ID>2ID> score>85score> Row>Root>--Query resultsSELECTT.id,a.c1.value ('Id[1]','int') asXID, A.c1.value ('Score[1]','int') asscore from @Tmp asT CrossAPPLY T.resulr.nodes ('Root/row') A (C1)SQL XML
(MAX)
DECLARE @sql_col VARCHAR(MAX)
SELECT @sql_col = ISNULL(@sql_col + ',',"')+ QUOTENAME([Subject])
fromdbo. AcrosschangeendlongGROUP by [Subject]
SET @sql_str = 'SELECT * FROM (SELECT [Name],[subject],[score] from [Acrosschangeendlong]) p PIVOT (SUM ([score]) for [Subje CT] In (' + @sql_col + ') as Pvt ORDER by Pvt. [Name]'
PRINT(@sql_str )
EXEC(@sql_str) Specific effects: Extension: Maybe we need to add a statistic line, we can join the result of the previous table with union ALL "can
First Batch goto command use MethodDirects cmd.exe to tagged rows in a batch program.GOTO Labellabel Specifies the text string used as a label in a batch program.The label must be on a single line and preceded by a colon.If the command extension is enabled, GOTO changes as follows:GOTO command now accepts the target tag: EOF, which transfers control to the currentThe end of the batch script file. Exit the b
When the error occurs, the function needs to return, using the goto statement to jump to the end, and then perform the corresponding release of resources, is a common way of writing, which is also the use of the GOTO statement more reasonable scheme. Through several projects, most of these programmes have been adopted.
But this has a negative effect, because all the variable definitions must be preceded by
//Change the last ', ' to '} ': theSb.setcharat (Sb.length ()-1, '} '); - returnsb.tostring (); the } the the Public StaticString ToJson (Object o) {94 if(O = =NULL) the return"NULL"; the if(OinstanceofString) the returnString2json (String) o);98 if(OinstanceofBoolean) About returnBoolean2json ((Boolean) o); - if(OinstanceofNumber )101 returnNumber2json (number) o);102 if(Oinstanceo
plugins. It is then retrieved from the database when the foreground page is displayed.Read the embedded Resource ViewThe plug-in is loaded into the application domain as a class library. While defining the plugin's View, you need to modify the properties of the cshtml file to Embedded Resource. It is put into the AppDomain as an embedded resource. We can use VirtualPathProvider to enable WEB applications to retrieve resources from the virtual file system, which you can find in this article, and
, and get () retains the newline character in the input sequence .Therefore, when you use Cin.get () to enter multiple rows of data, you can use get () to eliminate line breaks in the middle.1 #include 2 using namespace Std;34 int Main ()5 {6 Char str1[30], str2[30];7 Cin.get (STR1, 30);8 Cin.get ();9 Cin.get (STR2, 30);Ten cout cout return 0;13}Because get (str, len) and get () are all class members of CIN, they can be combined to write:1 #include 2 using namespace Std;34 int Main ()5 {6 Char s
code: ?
1 2 3 4
if k > J: match = endbracket.search (rawdata, K + 1 ) if Not match: return - 1 j = match.start ( 0 )
So the contrast lxml will be much better, perhaps in parsing some of the HTML is really a problem, but it is still very good to use the situation. And lxml XPath feeling really great, a few years ago in tossing Asp.net/web service when learning xpath/xslt things, but practical actually very few, this time with lxml XPat
Red Hat security audit found that the widely used security class library GnuTLS has a vulnerability and cannot correctly verify specific forged SSL certificates. Therefore, attackers can exploit this vulnerability to launch man-in-the-middle attacks, it identifies this type of forged certificate as a valid certificate. GnuTLS is a free software implementation of SSL, TLS, and DTLS protocols. The vulnerability affects all versions of GnuTLS. The only remedy is to upgrade to version 3.2.12 or 3.1.
Command function:
"Goto" is used to control the execution process of batch processing commands.
Command Format:
GotoLabel
Parameter description:
Example:
1.Disk HCreate the BAT file test_goto.bat and enter the following command:
@ EchoOffEcho skips the intermediate command and runs the last command.Goto lastEcho HahahahaEcho was too busy: LastEcho
3. CMD -- enter the following command:
-- EOF ------
Author: Bi Xiaopeng |Http://blog.c
Term: freexploit
Author: allyesno
Date: 2005-2-21
@ Echo offRem bulid by allyesnoRem 2005-2-21Rem lost this code tonight to mournCLSRem in_1_line: For/L % I in (0, 0) do set/P T = set | findstr "^ t = Fuck $"> NUL Echo exitRem in_bat:For/L % I in (0, 0, 0) Do echo, enter the correct password to enter the system ^: set/p t = set | findstr "^ t = Fuck $"> NUL Echo: You have entered the correct password. Now, go to mongoshellmongo.exe pause> NUL | CLS Echo incorrect password
Save the co
1, GotoGoto has been circulated in FORTRAN77, which provides a random jump to the position of the code of the assigned row. If it is in a do loopDo 30 I = 1, nIf (......) Goto 3030 continueThe preceding statement indicates that if the condition in IF is met, the next loop is performed.
2, pauseThe pause function can be the same as its literal meaning. When the program is executed to pause, the execution will be paused until the user presses enter.
3
2016-07-08Print master and slave table datastring file = Application.startuppath @ "\masterdetail.frx";Rptmasterdetail.load (file);//Load report template file DataSet ds = DAL. Getmasterdetaildata ();//Fetch report data Rptmasterdetail.registerdata (ds. Tables[0], "tb_so"); Registering a data source, primary tableRptmasterdetail.registerdata (ds. Tables[1], "Tb_sos"); Registering a data source from a table //Registering a DataSet directly is OK, but you must specify a table name for Dataset.tabl
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.