hand, memory holding time is long; After all, we all like to look at the output of the running results of the brush, rather than waiting hard;Here's a sample example:Package Com.zhy.concurrency.executors;import Java.util.arraylist;import Java.util.list;import java.util.Random; Import Java.util.concurrent.callable;import Java.util.concurrent.executionexception;import Java.util.concurrent.executorservice;import Java.util.concurrent.executors;import java.util.concurrent.Future; public class Testin
Configure the batch job, and start the two parallel task Processdata,synctabletask, performing a third task Job:playdurationtask.The XML configuration is as follows:JobID= "Stattask"xmlns= "Http://xmlns.jcp.org/xml/ns/javaee"version= "1.0"> Properties> Propertyname= "TargetDate"value= "20001010" /> Propertyname= "Bitcoinfile"value= "Bitcoins.txt" /> Properties> SplitID= "Split1"Next= "Processdatabase"> FlowID= "Flow1">
:01Completed NSE at 21:02, 13.32s elapsedInitiating NSE at 21:02Completed NSE at 21:02, 0.00s elapsedNmap Scan Report for www.zifangsky.cn (121.42.81.9)Host is up (0.047s latency).Not shown:999 filtered portsPORT State SERVICE VERSION21/TCP Open FTP vsftpd (before 2.0.8) or wu-ftpdWarning:osscan results May is unreliable because we could not find at least 1 open and 1 closed portDevice type:specialized| WapRunning:ipxe 1.X, Linux 2.4.x|2.6.xOS cpe:cpe:/o:ipxe:ipxe:1.0.0%2b cpe:/o:linux:linux_ker
Think that using the IDE to generate MAVEN projects will get stuck, very slowly. A cmd Batch command was written with CMD to generate the MAVEN project. The effect is as followsBuild Project import idea after the structure is as followsThe batch command code is as follows@echo Off::echo Please select the project type: Echo 1.maven-archetype-quickstartecho 2.maven-archetype-webappset/p webtype= Please select
, data security requires digital signature and data encryption.
The first consideration is the HTTP based transmission mode. But the author through relatively quickly found to meet the above requirements:
1: Upload with HTTP protocol, seems to be more suitable for web programming convenience, upload less than 1M file speed than with FTP protocol upload file slightly faster. But for the bulk and large file transmission may be powerless. Of course, it also has its advantages, if not like FTP, you
Today learned the Java file operation, and then took the interest, wrote a can batch processing file naming small program, small program also has some imperfect place, but wins in interesting. For example, you can quickly change the files you don't want others to see ... Personal use, resulting in the consequences of data loss at your own risk.ImportJava.io.File;Importjava.sql.Date;ImportJava.util.Scanner;
Today, I saw some friends asking questions about Java call batch processing. I have done this before, so I will record it here:
1. batch file: F:/testbat. bat, whose content is:
Ping www.csdn.net
Pause
2. Test. Java,CodeAs follows:
Import java. Io. ioexception;
Every time I feel set Java environment variable good trouble ah. Setting environment variables with batches is a good choice, but it is not a global environment variable that is set up in DOS. Later found WMIC can set the global environment variables, so directly to do batch processing slightly
Copy horizontal down to Notepad, save as a. bat suffix file, double-click to set the environment variable automati
;
File file = new file (path);
if (file.exists ()) {
InputStream ins = new FileInputStream (path);
Bufferedinputstream bins = new Bufferedinputstream (INS);//put in the buffer stream
OutputStream outs = response.getoutputstream ();//Get file output IO stream
Bufferedoutputstream bouts = new Bufferedoutputstream (outs);
Response.setcontenttype ("Application/x-download");//Set the type of response content
Response.setheader (
"Content-disposition",
"Attachment; filename=
Java. SQL. Batch Update Exception: ORA-12899
Recently, when I used the JDOM component to parse XML file data and store the data to the oracle database, the following error occurs:
Exception in thread "main" java.sql.BatchUpdateException: ORA-12899: value too large for column "SCOTT"."EMP1"."JOB" (actual: 12, maximum: 9)at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)at o
queue, the consumer takes the result from the queue, and does not wait in the order of the task submission, as long as the results are consumed. Completionservice is the encapsulation of executor and asynchronous queues.completionservicefutureThe result of the printout is 1, which is the result of the first calculation. Whoever finishes first will take who.4. Make the most of your timeThe previous two scenarios set a fixed wait time for each task, and the sum of the two does not exceed the time
to create a " photo " and " photo 1" Two folders in the C drive beforehand1ImportJava.io.*;2 3 Public classJack {4 Public Static voidMain (string[] args) {5File File =NewFile ("c:\\ photos"); Create a File object that represents a directory6 modifyfilename (file);7 }8 Public Static voidmodifyfilename (File dir) {9 intI=1;Ten if(Dir.exists ()) {//To determine if an incoming file object exists Onefile[] Files =Dir.listfiles (); Get the file array A for(f
();//Close (Workbook) object } Public Static voidMain (string[] args) {//Java program main entrance Try{System. out. println ("1. Create an Excel file, enter the Excel file name (including path and suffix)"); Scanner Scan=NewScanner (System.inch); Final String FileName= Scan.next ();//Get keyboard valueWriteexcel (FileName);//call the Generate Excel methodSystem. out. println ("2. Writing content to an Excel file"); Writecontenttoex
Get some files after the filename is just number, also a txt description
Hey, who let us be programmers, make a small program change is old
Import Java.io.BufferedReader;
Import Java.io.File;
Import Java.io.FileReader;
Import java.io.IOException; public class Chengefilename {/** * Title: Using IO Stream to implement file batch modification name * Copyright:copyright (c) * @author: Beacon * Version 1.0 2012-09-24 * @throws ioexception * * public st
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.