functionGetfourStr($len){$chars_array=array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z",);$charsLen=count($chars_array) - 1;$outputstr="";for($i=0;$i$len;$i++){$outputstr.=$chars_array[mt_rand(0,$charsLen)];}return$outputstr;}echoGetfourStr(4);?>PHP to obtai
About:configMedia.peerconnection.default_iceservers =[{"url": "Stun:stun.services.mozilla.com"}]var servers = undefined;Add same stun server for Chromeif (window.webkitrtcpeerconnection)Servers = {iceservers: [{urls: ' stun:stun.services.mozilla.com '}]};Construct a new rtcpeerconnectionvar pc = new Rtcpeerconnection (servers, mediaconstraints);Listen for candidate eventsPc.onicecandidate = function (ICE) {Skip Non-candidate Eventsif (ice.candidate) {Match just the IP addressvar Ip_regex =/([0-
Small program that shows the directory shows the applet for the specified directory:
#include
According to the parameters output directory structure
#include
Get host basic informationGet host User information:
#include
To obtain the host's own information:
#include exit (1);
}
printf ("Computer host name is%s \ n", Computer);
printf ("System is%s on%s hardware \ n", Uts.sysname, uts.machine);
p
How to get the maximum value in an array (provided by the 71PORT_80 port)
The function is to obtain a set of the largest array of values, very practical and fine code, worthy of collection!
Copy Code code as follows:
Snum= "345,231,56,786,1100,356,1200,300,685,111,134,765"
function Getmax (str)
Num=split (str, ",")
Max=num (0)
For ii=0 to UBound (num)
If CInt (num (ii)) >cint (max) then Max=num (ii)
Response. Write "num=" num (ii
Picture ping: Pictures can be loaded from any URL, so the img SRC is set to the URL of the other domain, that is, you can implement a simple cross-domain, you can use the OnLoad and OnError events to determine whether the response is accepted
var img=new Image ();
Img.onload=img.onerror=function () {
alert (' Done ');
}
var getbody=document.getelementbytagname (' body ') [0];
Getbody.appendchild (IMG);
The above JS from the outside to obtain
index.jsp, so index.jsp through the Request.getremoteaddr () method of IP is actually proxy server address, not the client's IP address.
Then you can get the client real IP address method one:
Public String Getremortip (HttpServletRequest request) {
if (Request.getheader ("x-forwarded-for") = = null) {
return request.getremoteaddr ();
}
Return Request.getheader ("X-forwarded-for");
How to obtain the client's true IP ad
Error contentCannot obtain exclusive access to the database because the database is in use.Solutions1, restart the database before restoring. No, look at 2.2, restart the database, find the database--> properties to restore--> option--> State--> restricted accessChange the Multi_user to Single_userThen start the restore restore and change back to Multi_user No, look at 3.3. If the error occurred above: The database ' XXX ' is turned on, and only one u
This is a simple latitude and longitude conversion into specific address information, supporting international and domestic latitude and longitude conversion.
The effect is shown in the following illustration:
function XmlToArray2 ($xml) {
//convert XML to array
$array _data = Json_decode (Json_encode (simplexml_load_string ($ XML, ' SimpleXMLElement ', libxml_nocdata), true);
return $array _data;
}
function Geturljson ($url, $type = 0) {
$ch = Curl_init ($url);
cu
Share a function method that uses PHP to get the corresponding Ganzhi annals, Zodiac and constellation information based on a date or timestamp, the specific function code, and the following methods:
/** Judge Ganzhi, Zodiac and constellation */function Birthext ($birth) {if (Strstr ($birth, '-') ===falsestrlen ($birth)!==8) {$birth =d
Ate ("y-m-d", $birth); } if (strlen ($birth) ===8) {if (Eregi ([0-9]{4}) ([0-9]{2}) ([0-9]{2}) $ ', $birth, $bir)) $birth = ' {$bir [1]}-{$bir [2]}-{$
Background Color}}
Let this tool class inherit Countdowntimer, and then the display countdown to the view, in the countdown will call the Ontick method, in this method to the view of the countdown interface to refresh, after the countdown to the end, will invoke the OnFinish method, You can restore the view state inside.
2. layout file
View Layout Shape_verify_btn_normal.xml When you have not clicked to obtain the authentication code
The example of this article introduces the method of using winmm.h to obtain the audio stream, the following steps are as follows:
First, you need to include the following reference objects
#include
Second, the acquisition of audio needs to call 7 functions
1. Waveingetnumdevs: Returns the number of waveform sound input devices that are ready in the system
UINT Waveingetnumdevs (VOID);
2. Waveingetdevcaps: Check the char
(Smsbody);
if (Textutils.isempty (Verifycode)) {return;
} if (Medittext = = null) {throw new RuntimeException ("You pass the EditText is empty");
} if (Verifycode.contains ("The authentication code you obtained from the server")) {Medittext.settext (Verifycode);
EditText get focus, 3 properties must be set Medittext.setfocusable (true) at the same time; Medittext.setfocusableintouchmode (TRUE);
Medittext.requestfocus ();
Medittext.setselection (Verifycode.length ());//Set cu
Oracle Cloud Control 12c the entire installation is more complex, light installation path selection, login password, port number and many other configurations are confusing, dizzying. This article describes how to obtain installation after installation of the various port number, URL and how to start, close cloud control and so on, for your reference.
The installation configuration for Cloud control can refer to: Oracle Enterprise Manager Cloud Contr
represents the type of host IP address, whether it is IPv4 (af_inet), or IPv6 (AF_INET6) int h_length Represents the length of the host IP address int **h_addr_lisst represents the IP address of the host, note that this is stored in network byte order. Do not directly with printf with the%s parameter to hit this thing, there will be a problem wow. So to really need to print out this IP, you need to call Inet_ntop (). Const char *inet_ntop (int af, const void *SRC, char *dst, socklen_t c
Objective
In Android development, the SHA1 certificate fingerprint is often acquired. For example: When you embed a gold map, you need to use this stuff. This is directly available in eclipse, but is not provided directly in the Android studio and needs to be manually acquired by other means.
We can use a Java tool: Keytool to get this value. Keytool is a tool provided by the JDK as long as your Java environment variables are configured in OK.
You can execute this command by typing Keytool di
ID card can identify a person's information, the following describes how to use JS through the ID card number to obtain the age and sex of the parties.
Here's a piece of code for you to get people's age and sex through their ID numbers.
The code example is as follows:
The above code implements our requirements, enter the ID number in the text box, and then click the button to pop up the age and sex.
The Jquery.cookie.js plug-in allows you to quickly "click to obtain the authentication code after 60 seconds to prevent regain (anti-refresh)" function
Effect Chart:
First to the official website (http://plugins.jquery.com/cookie/) Download cookie plugin, put to the appropriate folder, the code is as follows:
Copy Code code as follows:
The above is the entire content of this article, I hope you can enjoy.
Micro-letters are now almost universally used, but the micro-mail version has been updated, different versions have different functions, so it is important to understand the micro-letter version number, so that they can update the experience of new features in a timely manner. So how to use JS to obtain the micro-letter version number?
First, to judge the micro-letter version number
var wechatinfo = Navigator.userAgent.match (/micromessenger\\/(
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.