;} @Overridepublic void Run () {System.out.printf ("%s:going to print a job\n", Thread.CurrentThread (). GetName ()); Printqueue.printjob (New Object ()); System.out.printf ("%s:the document has been printed\n", Thread.CurrentThread (). GetName ());}}Package Chapter3;public class Main {/** * Can modify the fairness of the semaphores, in the default case the entry of the semaphore is not fair. If the second parameter of the initialization is set to true, the time-to-wait entry is selected.Referen
Only = yes (NO)//directory is read-only (readable and writable)Dont compress =. gz. bz2. zip. Z. rar//File types that are not compressed two times during the transfer process.Auth users = backuper//Authorized Backup UserSecrets file =/etc/rsyncdusers.db//Specify the location of data files for account information(2) Create a data file for the backup accountVim/etc/rsyncdusers.dbbackuper:123.com//user and password, no need to establish the same name System userchmod 600/etc/rsyncd_users.dbRsync–d
from a bit, but printed out 2. That is, thread 2 before and after the operation of the data, the data has been modified by thread 3, once again to prove that Semaphere does not realize the synchronization of the common data, in the operation of public data, we need to implement ourselves.Semaphere If the semaphore is set to 1, then it means that only one thread at a time to operate the task, then there is no thread safety problem, so if the set signal volume of 1, you can remove the synchronize
http://www.browsersync.cn/Time-saving browser synchronization test toolBrowsersync allows the browser to instantly and quickly respond to your file changes (HTML, JS, CSS, sass, less, etc.) and automatically refresh the page. More importantly, Browsersync can be in the PC, tablet, mobile phone and other equipment input debugging . You can imagine: "Suppose your desk has a PC, ipad, iphone, Android and other devices, while opening the page you need to debug, when you use Browsersync, any time you
directory has test1, test2 and test3 These three directories, all of these three directories have a test.txt file. The following are different configuration information to achieve different synchronization requirements.Envision--config--test1--test.txt|| ——— Test2--test.txt|| ——— Test3--test.txt5.1 Exceptions to the Test1 directory through the Exclude keyword=/cygdrive/d/envision/ from == test1/false= Yes Lock file = Rsyncd. Lock5.2 Exceptions to the Test2 and TEST3 directories with the Exclud
over, take the heroin and run!" "); } } }); } }From the code, I seem to see two people trading drugs in the scene ... Take a look at how the trading results are:
Thread pool-1-thread-1 is taking heroin out of the drug.Thread pool-1-thread-2 is taking 3 million out.Thread pool-1-thread-2 got heroin in 3 million.Thread Pool-1-thread-1 3 million in heroin.Finish the deal, run with heroin!The deal's over, take the money and run!
Run fast, from the run
must be paired, and if the thread is odd, then two will be exchanged successfully and the other will wait for the swap.ImportJava.util.concurrent.Exchanger;ImportJava.util.concurrent.ExecutorService;Importjava.util.concurrent.Executors; Public classExchangertest { Public Static voidMain (string[] args) {Executorservice service=Executors.newcachedthreadpool (); FinalExchangerNewExchanger(); Service.execute (NewRunnable () { Public voidrun () {Try{String data1= "Zxx"; System.out.println ("Threads
entering this method;
is interrupted while waiting,
Interruptedexception is thrown, and the current thread's interrupted state is cleared. If the specified wait time is exceeded, the return value is false. If the time is less than or equal to zero, this method does not wait at all. parameter:timeout-the time unit of the Unit-timeout parameter to wait for the longest time. Returned : returns True if the count reaches 0, or False if the wait time is exceeded before the count reaches 0 T
[email protected]::test/test1//tmp/test8/--password-file=/etc/passWhere/etc/pass content is a password, permission to change to 600Second, Linux system log/var/log/messages/etc/logrotate.conf Log Cutting configuration fileRefer to https://my.oschina.net/u/2000675/blog/908189 DMESG command/VAR/LOG/DMESG LogLast command, called the file/var/log/wtmpLASTB command to view the user who failed the login, the corresponding file is/var/log/btmp/var/log/secureThird, screen toolsIn order not to accidenta
-accessibleContinuing without password filePassword:Reason:This is because the permissions of the Rsyncd.pwd rsyncd.secrets are not correct and should be set to 600. such as: chmod rsyncd.pwdQuestion five:rsync:failed to connect to 218.107.243.2:no route to host (113)Rsync error:error in Socket IO (code ten) at CLIENTSERVER.C (104) [receiver=2.6.9]Reason:The other side does not boot, firewall blocking, through the network has a firewall blocking, it is possible. Shutting down the firewall actual
Label:Need to contact me qq:786211180 Hkronline Syncnavigator is a professional SQL Server, MySQL database synchronization software. It provides you with a simple and intelligent way to complete complex database data synchronization, distribution operations.
Supports Windows xp/windows 2003 or more of all operating systems
Support homogeneous database synchronization, heterogeneous database synchronization, timing synchronization, incremental synchronization, breakpoint continuat
?pretty '// index have new?? Curl-xget ' Http://localhost:9200/test/ffcs/_search?pretty '// fetch display Data Query by various criteria Curl ' localhost:9200/test/ffcs/_search?pretty '-d ' { "Filter": {"term": {"name": "John"}} }‘ Curl ' localhost:9200/test/ffcs/_search?pretty '-d ' { "Filter": {"term": {"id": "5"}} }‘ The above can be explained that you are done oh ~ ~ I've tried the elasticsearch-1.7.1 version before, and I'm having an error. [ERROR] [Importer.jdbc.source.standard] [Poo
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.