当前位置:网站首页>[work details] March 18, 2020

[work details] March 18, 2020

2022-06-26 10:46:00 Pig man blogs

The epidemic is not over yet , I had to isolate myself in the rental house , I was thinking about telecommuting , The boss should not arrange many things for me .

in fact ...

Very few things indeed ! This gives me my own time , Make a thesis , Look at the video . Sleep till more than nine in the morning , Get up and get ready , Turn on the computer , Look at the news , A cup of hot water , Hold it in your hand , This is not my old life in the future ??

The morning passed comfortably ..

 Insert picture description here
Afternoon , Start writing papers , Start working on the permissions section , I still don't have enough skills , I feel a little dizzy , Just when I was dizzy , The boss called !!

Toot toot ...( A burst of conversation )
Boss : Xiao Zhu , There should be hundreds of enterprises here , You've arranged , use excle Just send it to me .
I : well ~

.

Look at the hundreds of enterprises on this page , There are more than a dozen in one field , My heart is broken !!!
 Insert picture description here
But there's no way , Who calls me a hard-working worker

Start my madness ctrl+c!!!

I know my fingers are numb , That won't be possible , We have to find a way

Method 1.0

- I arrange my copied enterprise information in this way

 Insert picture description here

  • Start using java Of io flow First use BufferedReader Read the file
  • Reuse readline Method , Read line by line
  • Reuse split, Division “:”, Just take the data on the right , That's it
String fileName = "";// File path 
		File file = new File(fileName);
		BufferedReader reader = null;

		try {
    
			reader = new BufferedReader(new FileReader(file));
			String readerTemp = null;
			while ((readerTemp = reader.readLine()) != null) {
    
				boolean flag = (readerTemp != "");
				if (!readerTemp.contains(" Business address :") || "".equals(readerTemp)) {
    
					continue;
				}
				String[] arr = readerTemp.split(":");
				System.out.println(arr[1].trim());
			}
			reader.close();
		} catch (FileNotFoundException e) {
    
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
    
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		finally {
    
			if (reader != null) {
    
				try {
    
					reader.close();
				} catch (IOException e1) {
    
				}
			}
		}
	}

 Insert picture description here
Copy these to excle in , At least it is much faster than manual operation .

Be accomplished !

It will be improved in the future ,jsoup Crawl the page , Plus generation excle, Let this kind of thing no longer be a stumbling block to oneself

A pig man who has been on the road , invincible , invincible !

原网站

版权声明
本文为[Pig man blogs]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170528339586.html