Editor's note: Anecdotal rumors, there is a master of the CSS in the River Lake has been lost for a long time, the book contains, more for the latest amazing technology and example demonstration, is for the synthesizer, once the study, the code efficiency soared, the ability to upgrade several times, today I get, dare not snub, hurriedly sent to excellent set, hope everyone benefit. Say a word: good thing ah quick look!
In this list,. We've gathered amazing
From: Java translation station
Links: http://it.deepinmind.com/java/2015/03/17/20-examples-of-date-and-time-api-from-Java8.html
In addition to lambda expressions, stream, and a few minor improvements, Java 8 introduces a new set of time-date APIs that we will use in this tutorial to learn how to work with this set of APIs in Java 8 with a few simple task examples. Java's handling of dates, calendar
all variable names with no single underscore at the beginning
The __all__ list is valid only in the form of the FROM * statement, not a private statement
Example:
#test. py
Key= ' Got '
_nooutpute= ' lllllllllllllll '
Error= ' FASDFSA '
Code= ' FSADFSA '
Decode= ' 324324 '
__all__=[' ERROR ', ' Code ', ' decode ']
Print {' already ': (lambda:2+2),
' Got ':(lambda:2*4),
' One ': (lambda:2**4)
}[key] ()
#_X__all__. py
From Test import *
Print (Error)
Print
(); Adding elements to the headAddLast (); Adding elements at the tailGetFirst ();GetLast (); Gets the element but does not delete the element. If there are no elements in the collection, Nosuchelementexception appearsRemovefirst ();Removelast (); Gets the element but deletes the element. If there are no elements in the collection, Nosuchelementexception appearsThere's an alternative approach in JDK1.6.Offerfirst ();Offerlast ();Peekfirst ();Peeklast (); Gets the element, but the element is not
scripts may also switch directories[Email protected]:~$ pushd/var/www/html/var/www/html ~[email protected]:/var/www/html$The above command saves the current directory to memory and then switches to the requested directory. Once poped is executed, it will remove the saved directory location from memory as the current directory[Email protected]:/var/www/html$ popd~[email protected]:~$14. Switch to a directory with a blank name[Email protected]:~$ cd test/tecmint/[email protected]:~/test tecmint$O
switch identities)Su-cOf course, SU can also temporarily execute commands with other users without switching user identities.With the option-C, you can use root to execute commands temporarily, such as:/BIN/SU-At the same time, you can also configure the Sudoers file, authorized other ordinary users, can be switched to other users to execute the command, without having to add sudo every time. For example, simply define a normal user in the sudoers file User4After that, the user user4 only need
-id, true [-f $HOME/ak47]-W filename if filename exists and is writable, true [-w/var/log/mail]-x filename If filename exists and is executable, true [-X./start.sh]Five, a few common grammarWhile basic usage:while [condition]DoCommand1Command2Command3Done#!/bin/bashsudo find-type f-name ' *.log ' |while read mvnameDoMV $mvname ${mvname/.log/. LOG}Done#!/bin/bash#查找当前目录下 *.log and assign the value to Mvname to participate in the loop.sudo find-type f-name ' *.log ' |while read mvnameDo#移动, and re
is doing, and if you do not wish to receive such a letter, please leave a blank in each lineAfter adding >/dev/null 2>1 can beTo create a cron service for the current user1. Type CRONTAB-E edit crontab service fileFor example, the contents of the file are:*/2 * * * */bin/sh/home/admin/jiaoben/buy/deletefile.shSave the file and exit*/2 * * * */bin/sh/home/admin/jiaoben/buy/deletefile.sh*/2 * * * * This field allows you to set when to execute the script/bin/sh/home/admin/jiaoben/buy/deletefile.sh
IP address from small to large to re-order,-U to go heavySort-u-T "."-K1,1N-K2,2N-K3,3N-K4,4N # # #IP addresses from large to small to reorderSort-u-T "."-k1,1nr-k2,2nr-k3,3nr-k4,4nr # # #1.-t "." means "." Separates the 3-bit # # #字符 to sort2.-K1,1N represents the first sequence of characters intercepted by the first point as key, that is, the first segment of the IP, n means to put this 3-bit # # #字符排序时把其作为数值.3.-K1,1NR in reverse orderIntercept all strings following the start of each line with
Official website:http://gstreamer.freedesktop.orgGStreamer Installation:Installing with sudo apt-get installsudo apt-get install Libgstreamer0.10-dev gstreamer-tools gstreamer0.10-tools Gstreamer0.10-docsudo apt-get install gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly Gstreamer0.10-plugins-bad Gstreamer0.10-plugins-bad-multiverseA plugin with the following GST is installed:Gstreamer0.10-toolsGstreamer0.10-xGstreamer0.10-plugins-baseGstreamer0.10-plugins-goodgs
.tcp_keepalive_probes = 5 How many TCP keepalive probe packets are sent before the connection is determined to fail. The default value is 9. This value, multiplied by TCP_KEEPALIVE_INTVL, determines how much time a connection can have without a response after sending keepalive.Net.core.somaxconn = 262144 Listen (function) is the default parameter, the maximum number of pending requests is limited. The BACKLOG of LISTEN functions in Web applications limits the net.core.somaxconn of our kernel par
Today, I saw an interesting loophole in Wooyun. Say it interesting, the first is the idea is very special, of course, because the security is very low, the second use of the Python POC has a small details, hereby share.Website called Fenby Network, mainly for Pythoner online learning, it has an online exercise function, you can enter the code, and then execute, test run the results ...So the landlord registered an account, URL:http://www.fenby.com/course/units/xxxxThen enter the following malici
that the UI root is the parent object.2. Delete anchor (This tutorial we only do a static UI).3. Change the camera to perspective projection perspective Projection.4. Change the camera's near to 0.1 and far to 4.0.5. Move the camera back a bit, probably in (0,0,-550) position.6. Give the panel a little angle, we set the rotation here to (0,345,0).7. To look more dazzling, add panwithmouse to camera.Click to run the game and move the mouse around, if everything is right, you will see a good wind
First question: output these three namesstring[] name = new string[] {"Messi", "Kaka", "Jong"};for (int i = 0; i {Console.Write (name[i]+ "\ t");}Console.Write (Name[name. Length-1]);Console.ReadLine ();Second question: Each element of an array of integers is processed, if the element is positive, the element is added one, if the element is negative, the element is reduced by oneInt[] Shu=new int[]{1,3,5,-2,-3};for (int i = 0; i {if (shu[i]>0){shu[i]++;}else if (shu[i]{shu[i]--;}}for (int i = 0;
", Removeset);Clone a Retainset, the contents and set are identicalHashSet Retainset = (HashSet) set.clone ();Preserve "retainset, elements belonging to Otherset"Retainset.retainall (Otherset);Print RetainsetSystem.out.printf ("Retainset:%s\n", Retainset);Traverse HashSetfor (Iterator Iterator = Set.iterator ();Iterator.hasnext (); )System.out.printf ("Iterator:%s\n", Iterator.next ());Empty HashSetSet.clear ();Whether the output HashSet is emptySystem.out.printf ("%s\n", Set.isempty ()? " Set i
Shell scripting is the most basic knowledge of our OPS management, and here are a few examples of my learning process (compared to Daniel). The purpose of this blog is to record the course of learning scripts, but also to be able to discuss learning with the reader.#example1: template Script name for automatically creating scripts:creat_scripts.sh# function Description: Creat_scripts.shscripts_name If the created script name file does not exist, cre
Source code and the followingExample:1, an error dialog box appears:Joptionpane.showmessagedialog (NULL, "This is the content", "This is the title", Joptionpane.error_message);2, display an information panel with the options "yes/no":Joptionpane.showconfirmdialog (NULL, "This is the content", "This is the title", Joptionpane.yes_no_option);3, a warning dialog box is displayed with the options OK, CANCEL:object[] options = {"OK", "Cancel"};Joptionpane.showoptiondialog (NULL, "This is the content"
= Make (chan int64, 2) if n = = 0 | | n = = 1 {return int64 (n)}runtime. Gomaxprocs (2) go func () {channel Test results:
[Email protected]$ time Go testPASSOK _/home/crbsp/alex/go/fib 6.118s
Real 0m6.674sUser 0m10.268sSYS 0m0.148s
Iterative-based implementation scenarios:Func fib3 (n int) Int64 {var A, b int64a, b = 0, 1for i: = 0; i Test results:
[Email protected]$ time Go testPASSOK _/home/crbsp/alex/go/fib 0.002s
Real 0m0.547sUser 0m0.328sSYS 0m0.172s
Clo
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.