directory for the log fileString fname = Directory.GetCurrentDirectory () + "\\LogFile.txt";/**/Defining File Information objectsFileInfo finfo = new FileInfo (fname);if (!finfo. Exists){FileStream FS;FS = File.create (fname);Fs. Close ();Finfo = new FileInfo (fname);}/**/Determine if the file exists and is greater than 2Kif (finfo. Length > 1024 * 1024 * 10){/**/File is renamed over 10MBFile.move (Directory.GetCurrentDirectory () + "\\LogFile.txt", directory.getcurrentdirectory () + DateTime.N
Today, I saw the carloads provided by the website recommended by the inspiration source. excelxmlwriter, I think it is good. I have a look at the decompilation. In fact, I am constructing an XML document and then using writer1.writeprocessinginstruction ("MSO-application", "progid = 'excel. sheet '"); To set to open in Excel, so we can easily obtain an Excel. Obviously, this method does not require the server to install Excel.
I suddenly thought that
Maven project-fixed Plugin execution not covered by lifecycle configuration: org. codehaus. mojo: build-helper-maven-plugin: 1.8: add-resource (execution: add-resource, phase: generate-resources) pom. xml error,
1: pom. xml Code
2: the error message is as follows:
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-pl
XML data
// Access the attributes of the XML node and generate table data
Xmldocument xmldoc = new xmldocument ();
Xmldoc. Load (file name or textreader );
Xmlnodelist xnl = xmldoc. selectnodes ("/citylist/City"); // query XML nodes
// Create a able
Datatable dt = new datatable ();
If (xnl. Count> 0)
{
// Add a table
/// It must be in stdafx. add // # import "msxml3.dll" // import the Type Library # define MSXML msxml2 // start dxdiag.exe and use it to generate an XML file // use javasdxdiag.exe /?] To view usage // startupinfo Si = {sizeof (SI), 0}; process_information Pi = {0}; tchar szcmdline [max_path] = _ T ("dxdiag.exe/WHQL: off/X dxdiag_output.xml "); // replace it with [/X], that is, if (CreateProcess (null, sz1
oracle|sql|xml| Generate XML
Of course you can encode the recordset as XML yourself, but it's cumbersome and inefficient. Here's a new way to do this:VB Code:Dim objconn as New ADODB. ConnectionDim objRS as New ADODB. RecordsetDim objstream as New ADODB. Stream
objConn.Open "Provider=SQLOLEDB.1; password=; Persist Sec
Jquery collects page parameters to generate xml for data interaction with the server. jqueryxml
If there are any deficiencies, I hope to point them out!
Respect originality, repost or reference, and indicate the source.
Link: http://www.cnblogs.com/king-xg/p/6382603.html
In fact, three knowledge points are integrated, including how to access mysql, how to generate xml files, and how to use webservice development.
Okay, let's not talk about it. Stick the Code directly.
Package com. service; import java. io. fileOutputStream; import java. io. IOException; import java. SQL. *; import org. jdom. *; import org. jdom. output. XMLOutputter; public class NewsImpl implements NewsI
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.