Upload image preview JS script Input file image preview implementation example, js image Preview
When working on a project in Shenzhen, a user needs to upload the Avatar preview function! I found a lot on the Internet, but I am not satisfied with it. Either flash, or the path of the image returned after Ajax upload, or it cannot be used at all. Fortunately, someone previously wrote an image preview function
On the Internet to write the data wrote a need for PHP curl function, call is Baidu API get data: function GetData ($add) {$post _data = Array (' AK=KKKK ', ' callback=renderoption ', ' Output=json ', ' city=xxx, ' address= '. $add); Parameter assembly of the transmissionPrint_r ($post _data);$post _data = Implode (' ', $post _data);$url = ' http://api.map.baidu.com/geocoder/v2/? '; Route assembly, the parameters you need do not need to be put here, the above assembly is OK.Here is some initial
Examples of airs Swath HDF data in polar stereographic (South Pole) projection close to the rectangle, you need to read from the data latitude and longitude and related data array, using the Surfacem function to draw Swath data (scatter), In the Surfacem function, the latitude data is projected into the destination projected coordinate system (defined in the AXESM function), and surface data (that is, lattice data) is generated from the 2-D scatter data using the so-called surface interpolation
Flexpart is a hysplit-like diffusion pattern, its output netcdf file refers to the WRF, but the global properties are not written, such as only a projection name (such as Lambert), there is no relevant projection parameters: central longitude, standard latitude and so on. The WRF header file must be consulted to reconstruct the projection (why not tiger the property all over?). )。 The latitude and longitude coordinates of the data are some, but the coordinates under the Lambert projection are no
The subplot command can automatically allocate multiple coordinate systems (Axes) with equal spacing, with three parameters in the command, the first two defining the number of rows and columns, the third specifying the current coordinate system (Axes), and the drawing command acting in the current coordinate system.Script Program:def f (t): return exp (-t) * cos (2*pi* = Arange (0., 5.,0.1 = arange (0., 5., 0.02) subplot (2,1,1 'bo'k') subplot (2,1,2) Plot (t2, cos ('r--') show ()Meteoinfo
Adding the following script to the page will immediately redirect visitors to the specified URL.
Location. href and location. the difference between replace and replace is location. href creates a history record in the visitor's browser. this means that when a visitor clicks the back button, it will be forcibly redirected back to the specified url to form a loop. using the following code, you can jump back to the original page to avoid damages to
Label:grepnullexistcount Connection status onlyblogpassbin 1-100 the sum of the natural numbers: Law one: For Loop #!/bin/bash#declare-i sum=0for ((i=0;i Shell Script Small Example
Amway an introductory article on the neural network of a foreign Daniel I translated
Here is an example script that enters the Docker container via Nsenter:File name: NSHow to use: Put the file into the system path path, into the container mode NS
#!/bin/bash
If [-E $ (dirname "$")/nsenter]; then
nsenter=$ (dirname "$")/nsenter
else
nsenter= Nsenter
fi
If [-Z] $ ", then
echo" Usage: ' basename "$" ' CONT
1. Using OpenDataSourceSelect top *from opendatasource (' SQLOLEDB ', ' Data source=ip address; User id= connection name; password= Connect user password '). Remote target database. dbo. Table name2. Using a junction server--Create Linkserverexec sp_addlinkedserver ' alias ', ' ', ' SQLOLEDB ', ' IP address '--Landing Linkserverexec sp_addlinkedsrvlogin ' Alias ', ' false ', NULL, ' Connect user name ', ' Connect user password '--QuerySELECT * from alias. Library name. dbo. Table name--Remove li
the two-point time can calculate the second-level difference between the cashier.However, it is important to note that when calculating the nanosecond time difference, consider whether you want to convert 1 seconds to 10^9 nanoseconds to ensure that a positive value is obtained when the nanosecond is subtracted.(2). " %N "of the nanosecond portion if the length is less than 9, will be 0. For example, 999 nm, will be filled to 000000999. However, in m
This article is reproduced from lazy Fat rabbit : http://www.xuanhao360.com/linux-expects/Shell script implementation SSH Automatic login remote Server example:#!/usr/bin/expectspawn ssh [email protected]expect "*password:" Send "123\r" expect "*#" interactExpect is a command to handle interactions . With expect, we can write the interactive process on a script s
First, the grammar:Loadscript (Url[,callback])OrLoadscript (Settings)Second, the settings supported parameters:URL: Script PathAsync: Asynchronous, default false (HTML5)CharSet: File EncodingCache: Caching, default to TrueSuccess: A function that executes after the load succeeds, giving priority to executing the callback.Third, the invocation example:
Copy Code code as follows:
Loadscript (Ur
This example describes the asynchronous script loading method for JavaScript with callback functions. Share to everyone for your reference. The implementation methods are as follows:
var Loader = function () {}
Loader.prototype = {
require:function (scripts, callback) {
This.loadcount = 0;
this.totalrequired = scripts.length;
This.callback = callback;
for (var i = 0; i
U
Coding | scripting | Sample Encoding Example
The following is a short example that contains JScript code that needs to be protected:
The page, which is run after the script encoder, looks like this:
-----------------------------------------------------------
Important: After coding, if you change the encoded text, even if only one word change. The integrit
to reduce fragmentation, reduce index size, and improve query efficiency. when the text is deleted from the table, the Oracle text tag deletes the document, but does not immediately modify the index. As a result, the document information takes up unnecessary space, resulting in additional overhead for querying. You must optimize the index in full mode to remove invalid old information from the index. This process is called garbage disposal. Garbage processing is necessary when you frequen
Use Whil for if to print a prime number less than 100#!/bin/bash#author Alvin#version 1.0.0#test for 1-100 Zhishua=2While [$a-le 100];DoZ=1for ((j = 2; $j If [$ ($a% $j))-eq 0];thenZ=0BreakFiDoneIf [$z-eq 1];thenEcho-ne $a "\ T"FiLet A+=1Done2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97This article is from the "Wen Zhao" blog, please be sure to keep this source http://zhaowencheng.blog.51cto.com/7821671/1655294Shell script wit
Shell Basics: http://bbs.chinaunix.net/forum.php?mod=viewthreadtid=452942First, cycle 1-100, and calculate the 1+2+3+4+5+6+7+8+9+10 and#!/bin/bashSum=0For ((i=1;iDoWhile [$i-le 10]Dosum=$ (($sum + $i))BreakDoneDoneEcho $sum#me: Notice the time1.sum=0 the initialization of a variable2.while control loop exit condition, use break to exit the loop.3. Note the syntax for the For loop, the syntax for the shell to execute the variable addition, and the syntax to use while using [] as a judgment additi
following two:#yum-y Install perl-extutils-makemaker*#yum-y Install perl-time-hires*
6.mysqldump and Mysqlhotcopy Backup shell script example, mysqlbackup.sh
The code is as follows
Copy Code
#!/bin/bash # enviromentPath=/usr/local/sbin:/usr/bin:/bin # Configure the Directory of BackupBackupdir=/data/backup/mysql # mysql Backup dirSave=4 #how many days to
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.