A link is a way to establish a connection between a shared file and several directory items of the users who access it. Linux contains two types of links: hard link and soft link. Soft link is also called symbolic link ). A hard link can be considered as a file with two file names, while a soft link is a new link file created by the system, which points to the file to which it refers.
1. Usage:Ln [Option] source_file dist_file-F: When the file is created, the same file name will be deleted.-I as
-Experience Summary1. The available dialog box (qdialog) simulates the effect similar to the toast in Android.
-Set the program interface style
In the main function
Qapplication: setstyle ("Windows ");
Qapplication: setstyle ("WindowsXP ");
Qapplication: setstyle ("motif ");
Qapplication: setstyle ("CDE ");
Qapplication: setstyle ("Macintosh ");
Qapplication: setstyle ("Plastique ");
The style can be "Windows", "motif", "
to have the potential to become a super application. Ao you is currently conducting technical research in this area.
Short and concise products are not easy to copy
It has always been a problem for entrepreneurs to prevent their products from being replicated by large companies. In this regard, Chen mingjie said: "anti-DDoS is not enough, only faster than it ." Entrepreneurs need to make their products small and refined. "For example, if you have implemented the function ABC and a large company
How can I change my Linux desktop environment?
In the popular KDE and GNOME desktop environments, the default Windows appearance and operation methods are mostly imitating Windows 9X, Which is boring after a long time, enable skin replacement.
1. KDE environment:
Right-click the blank area on the desktop, select "display features"> "style" tab, and remove the "display controls in Windows 95 style" option, and click "OK.
After such processing, the three-dimensional effect of the window control is
In our work, we often need to turn a two-dimensional array into a one-dimensional array. Then we need to loop out, in fact, sometimes we can use a few tips, with the help of PHP built-in functions, but I'm just talking about a simple two-dimensional array $arr= array (' Name ' =>array (' a ' = ' = ' abc ', ' B ' = ' + ') BCD ', ' c ' = ' cde '); If we use Array_pop (), we can get a one-dimensional array, and array_pop () would have deleted and returne
parameter of a negative value.
';$rest = substr("abcdef", -2); // returns "ef"echo $rest.'';$rest = substr("abcdef", -3, 1); // returns "d"echo $rest.'';?>
Program running result:
fefdProgram List: length parameter of a negative value
Start from the start position. if the length is negative, it starts from the end of the string. Substr ("abcdef", 2,-1), that is, starting from c, and then-1 indicates intercepting to e, that is, intercepting cde
After the system is set up, 1. solaris graphical desktop: cde (general desktop) default, jde (java Desktop) improved options-session process-jds-java Desktop System (similar to xp, surprised) 2. maintenance using remote tools: openssh, using securecrt... after the system is set up, 1. solaris graphical desktop: cde (general desktop) default, jde (java Desktop) improved options-session process-jds-java Deskt
: This article describes how to convert a simple two-dimensional array into a one-dimensional array. For more information about PHP tutorials, see. In our work, we often need to convert a two-dimensional array into a one-dimensional array. So we need to take it out cyclically. In fact, sometimes we can use some tips to implement it using php built-in functions, but what I'm talking about is a simple two-dimensional number array $ arr = array ('name' => array ('a' => 'ABC', 'B' => 'bcd ', 'C' =>
string with the specified characters.
The code is as follows:
# Strnset (sStr1, ch, n)SStr1 = '123'Ch = 'R'N = 3SStr1 = n * ch + sStr1 [3:]Print sStr1
13. scan strings
The code is as follows:
# Strpbrk (sStr1, sStr2)SStr1 = 'cekjgdklab'SStr2 = 'gka'NPos =-1For c in sStr1:If c in sStr2:NPos = sStr1.index (c)BreakPrint nPos
14. flip string
The code is as follows:
# Strrev (sStr1)SStr1 = 'abcdefg'SStr1 = sStr1 [:-1]Print sStr1
15. search for strings
The code is as follows:
# Strstr (sStr
This article describes how to find a specified string in python by referring to the following method:
Code
# Query def selStr (): sStr1 = 'jsjtt. com 'sstr2 = 'com' # index to query a string, returns the index nPos = sStr1.index (sStr2) if (nPos> = 0 ): print 'sstr1 contains the character 'print nPos # find 'in sStr2. if the find method is not found,-1 nPos2 = sStr1.find ('ABC') is returned ') print nPos2 # the position where the returned characters are located. print sStr1.find ('com ')
Php two ways to delete array elements unset, array_splice usage difference
$ Arr = array ('A', 'B', 'C', 'D ');
Unset ($ arr [1]);
Print_r ($ arr );
?>
Result: Array ([0] => a [2] => c [3] => d) how to fill in the missing elements and re-index the Array? The answer is array_splice ():Example:
$ Arr = array ('A', 'B', 'C', 'D ');
Array_splice ($ arr, 1, 1 );
Print_r ($ arr );
?>
Result: Array ([
Internet (http://mtools.linux.lu /). Currently, the latest mtools version is 3.9.9. the download link isHttp://mtools.linux.lu/mtools-3.9.9-3.i386.rpm. Download and install it.
2. included commandsMcd Directory Name: change the directory under ms dos.Mcopy source file target File: copy the file between ms dos and Unix.Mdel File name: delete the file in ms dos.Mdir directory name: displays the directory under ms dos.Mformat drive letter: Create a ms dos file system on a low-level formatted flopp
no longer available and you cannot continue to trace back, the first round of matching failed, but it was not complete. the engine drive continued to search for the first qualified double quotation marks from the next position of double quotation marks at location A, to J, then, similar to the previous round of process. "..." Was not found in the end "..."! The process of such a string is tortuous.
From the example above, we can see that: 1. * the efficiency of this form is very low, especially
If you want to delete an element in an array, you can use the unset directly, but the index of the array does not rearrange:
The code is as follows
Copy Code
$arr = Array (' A ', ' B ', ' C ', ' d ');Unset ($arr [1]);Print_r ($arr);?>The result:Array ([0] => a [2] => C [3] => D)
So how do you get the missing elements to be filled and the array will be indexed again? The answer is Array_splice ():
The code is as follows
Copy Code
finished The drive of the engine continues from the next position of the double quotation mark A to continue looking for the first qualifying double quote, to J, and then the same process as the previous round continues to unfold. I didn't find the "..." in the end! Such a string, the process is very tortuous.
As can be seen from the above example: the first is. * This form of efficiency is very low, especially at the time of failure (of course, our few lines of code is almost negligible), and
Transform a simple two-dimensional array into a one-dimensional array, a two-dimensional array of dimensions
In our work, we often need to turn a two-dimensional array into a one-dimensional array. Then we need to loop out, in fact, sometimes we can use a few tips, with the help of PHP built-in functions, but I'm just talking about a simple two-dimensional array $arr= array (' Name ' =>array (' a ' = ' = ' abc ', ' B ' = ' + ') BCD ', ' c ' = ' cde
rangeArraynon-variable group NsarrayNSObject *obj=[[nsobject Alloc]init];Nsarray *array1=[nsarray arraywithobjects:@ "abc", obj,@ "CDE", @ "OPQ", @25, Nil];//nsarray is immutable, so it must be assigned at initialization and ends with nil, The number is nil, not counted.NSLog (@ "%zi", array1.count);//array length, results: 5NSLog (@ "%i", [array1 containsobject:@ "CDE"]);//contains an object, results: 1NS
retrieval. The size of the ArrayList object is dynamically expanded and shrunk according to the data stored in it. Therefore, you do not need to specify the length of the ArrayList object when declaring it."font-family:simsun;font-size:18px;">//ArrayListArrayList List1 =NewArrayList (); //New DataList1. ADD ("CDE"); List1. ADD (5678); //Modifying Datalist[2] = the; //Removing DataList. RemoveAt (0); //Inserting DataList. Insert (0,"qwe"); From the ab
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.