system
The Code is as follows:
Var BrowserDetect = {Init: function (){This. browser = this. searchString (this. databrown) | "An unknown browser ";This. version = this. searchVersion (navigator. userAgent)| This. searchVersion (navigator. appVersion)| "An unknown version ";This. OS = this. searchString (this. dataOS) | "an unknown OS ";},SearchString: function (data ){For (var I = 0; I
Var dataString = data [I]. string;
Var dataProp = data
");Fileconnection fc = NULL;Outputstream OS = NULL;Try {Fc = (fileconnection) connector. Open (PATH );If (! FC. exists () // if the file does not existFC. Create (); // create a fileElseFC. truncate (0); // clear file dataOS = FC. openoutputstream ();OS. Write (B); // Write File dataOS. Close ();OS = NULL;Addstr ("completed file writing ");FC. Close ();Fc = NULL;} Catch (ioexception e ){E. printstacktrace
Browser detection is often used in the work, if it is simple to judge what the current browser can be done by window.navigator.useragent such a JS to directly judge you can!But for the browser version requirements are relatively high, if only a simple judgment of the name of the browser can not solve the problem, it will be done by other means! The existing jquery has abandoned the use of $.browser, so here I introduce a program called "Browser sniffer" to achieve!The code is as follows: (Browse
A common but overestimated Javascript function is browser detection. Sometimes, you may want to give a description or load a page to prompt users to avoid using browsers such as Safari.
Usage:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Browser name: BrowserDetect. browser
Browser version: BrowserDetect. version
OS name: BrowserDetect. OS
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Var Br
To make some data into an XML file, but not on your hard disk, compress the file into a zip format and write it to your hard disk. The final result is: The hard disk has a test.zip file, decompression after the Test.xml file.
Add the. xml suffix to the name after you declare zipentry ... The
example follows: Public
static void Main (string[] arg) throws exception{
String xml;
* * generates your XML data, which exists in string XML.
*/
Zipoutputstream zipout = new Zipoutputstream (New
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.