activities to add some additional control flag for the Intent. The Intent can call addFlags () method to add control flag for the Intent.
(1) Use intent-filter configuration to start the system programBecause of the system program in the Android mobile phone
Attribute settings can be said to be common, so using this method is more convenient and reliable than the previous method. The sample code is as follows:
Enable System camera Intent intent = new Intent (); intent. setAction (Me
Java ClassPath and java classpath
Java class pathThe Java class path tells the java interpreter and the javac compiler where to find the class they want to execute or import. Class (the ones you may notice *. class files) can be stored in a directory or jar file, or in a combination of the two, but they can be found by the Java compiler or interpreter only when they are located somewhere in the class path.In Windows, multiple items in the class path are separated by semicolons (;), while in UNIX
. ACTION_DIAL); // set the intent attribute to the predefined Intent. ACTION_VIEW intent. setData (Uri. parse (tel: 18819465188); // parse the Uri object based on the specified characters // 3. start Activity startActivity (intent );}});}}The effect is as follows: Scenario 2: Start internal application components(1) Implement an Intent object and start the componentIntent intent = new Intent (); // create an Intent object String data = lee: // www.fkjava.org: 8888/
server. Request filemgr/?request=get_filefilename= case video 8.mp4charset=utf-8 FileName file name, if in a subdirectory, should contain a complete relative directory, such as Mypath/myfile.mp4, with UTF-8 encoding CharSet The actual character set encoding of the file name on the server, which is returned in the Query file list interface. Response {"Code": 0, "data": {"Count": 1, "items": [{"filename": "/Case Video 8.mp4", "CharSet": "U
(""); //Find the directory where the current project is locatedString mypath = new File (Urlpath.getpath (), "... /"). Getcanonicalpath ();The absolute path to the stitching fileMyPath = mypath + "Specific directory of files in the project"2. Web EngineeringThe location of the files under the project can be divided into:1. Get the absolute path to the file in the normal classThrough the above methods under
Wrote a script to view the APK signature with the shell. The code is very small and simple.Supports recursive directory queries#!/bin/bash# how to use the./getcertificate.sh xx.apkget_signature () {path= ' jar tf ' $ ' | grep RSA ' #查找apk中RSA文件 jar XF $ $p Ath #把RSA文件解压出来 keytool-printcert-file $path #查看指纹证书 rm-r $path #删除之前解压的文件}mypath= ' pwd ' filepath= "" if [-D. Temp_f Or_certificate]then echo ". Temp_for_certificate is Exist,remove it first!"
) {
Model.addattribute ("message", "Hello world!");
return "HelloWorld";
}
}
@RequestMapping ("/A") is a class level (Class-level), @RequestMapping ("/helloworld") is a method level (Method-level). The example is to map the request address/a/helloworld to the HelloWorld processor.
properties for A.2, @RequestMapping
a.2.1, Value
The primary mapping expressed by this annotation.
The main mapping is expressed through this annotation.
In a Servlet environment:the path mapping URIs (e.g. "/mypath.
There is a method in the FSO that is createfolder, but this method can only create a new folder in the presence of a folder above it, so I wrote a function to create a multilevel folder automatically, which is very convenient for the generation of static pages.
Function:' --------------------------------' Automatically create a specified multilevel folder' strpath is an absolute path' Reference please retain the copyright' By Im286_anjer' 2005-4-3Function Autocreatefolder (strpath) ' as Boolean
Actual production caseThe production room self-built PPTP client is connected to the production room by dial-up, but once the client network is accidentally disconnected and then dialed againGenerates an IP conflict, so a script is written to monitor whether PPTP IP is multiple (2 IPs will be generated after a general conflict)#!/bin/bash#author liuyueming. /etc/profile #开始没有加这个环境变量for i in {10..35}do n= ' ifconfig|grep 10.13.0.${i}|wc-l ' #循环取ip并计数 # E Cho ' Ifconfig|grep 10.13.0.${i} '
the variable is to be quoted with the $ symbol. The $ symbol is the reference symbol for the variable.Note: When using the $ symbol, the string after the $ symbol is parsed into a variable and parsed, and if the subsequent string is undefined, then parsing the variable that has no definition and assignment will be resolved to a variable with an empty value, and the reference will be empty.In the shell, strings can be used without double quotes, but if the flaw without double quotes is, you cann
" )); } The above example refers to the blog address: 51895823Method Two:Example 1: Public StaticString Getmydir () {//gets the absolute path of the current class fileString Jarwholepath = Configerpraram.class. Getprotectiondomain (). Getcodesource (). GetLocation (). GetFile ();Try { //for the sake of insurance, decode transcoding the pathJarwholepath = Java.net.URLDecoder.decode (Jarwholepath, "UTF-8"); } Catch(unsupportedencodingexception e) {System.out.println (e.tostring ());}//get the
message header attribute is present, the child object is an attachment, the attachment name is encoded and the attachment is downloaded to the specified directory#since messages transmitted over the network are encoded in a later format, you need to specify decode=true at Get_payload to convert to an output encoding#if the message is in text or HTML format, print the format and output the sub-object content after transcodingdefPrint_info (msg): forHeaderinch[' from',' to','Subject']:Value = Msg
) from MS
TCP/IP:
"Provider=db2oledb; Network transport LIBRARY=TCPIP; Network Address=xxx.xxx.xxx.xxx;initial CATALOG=MYCTLG; Package Collection=mypkgcol;default Schema=schema; User Id=myuser; PASSWORD=MYPW "
APPC:
"Provider=db2oledb; APPC local LU Alias=myalias; APPC Remote LU alias=myremote;initial catalog=myctlg; Package Collection=mypkgcol;default Schema=schema; User Id=myuser; PASSWORD=MYPW "
Odbc
Standard:
"Driver={sybase SYSTEM 11}; Srvr=aron1; Uid=username; Pwd=password; "
inte
J2ee|oracle oracle9ias containers for Java EE (oc4j)
1.OC4J contains
A JSP Translator, a Java servlet container (Deployment method: First, the servlet is packaged as a standard Web application aRchive (War) file, OC4J provides the WAR file deployment tool to unzip it to the J Ava servlet container. Package using JAR commands.
), and an Enterprise JavaBeans (EJB) container.
Oc4j contains two methods of JDBC access to Oracle databases:
Oracle Thin JDBC Driver
Oracle Jdbc-oci Driver
2. Installati
Turn on FSO permission to execute Regsvr32.exe scrrun.dll in Start-"run". If you want to turn off FSO permissions, add the/u parameter in the above command. The key value location in the registry: HKEY_CLASS_BOOT\F.S.O. There is a method in the FSO that is createfolder, but this method can only create a new folder in the presence of a folder above it, so I wrote a function to create a multilevel folder automatically, which is very convenient for the generation of static pages. Function:
_____________________________________________________________________________________________
The Soaprequest.open has five parameters, but only the first two are required, which means that the other three are free to choose from.
Parameter explanation:
Oserverxmlhttprequest.open Bstrmethod, bstrURL, Basync, Bstruser, Bstrpassword
Parameters
Bstrmethod
HTTP method used to open the connection, such as put or PROPFIND.
bstrURL
Requested URL. This must is an absolute URL, such as "http://Myserver/
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.