file

What is the .empty file for?

喜夏-厌秋 提交于 2021-02-20 19:31:30
问题 I've recently come across a situation when an "empty" folder used by an application contains a .empty file. For example, an application has a folder for logs, and when there are no logs yet, this folder contains a .empty file. Even when there already are log files, this file isn't deleted. I've opened the file, and it is empty, so I assume it contains no useful information except that the file itself is present. What's the purpose of this empty file? P.S. My only guess is that this file is

How to load Pickle file in chunks?

会有一股神秘感。 提交于 2021-02-20 08:34:02
问题 Is there any option to load a pickle file in chunks? I know we can save the data in CSV and load it in chunks. But other than CSV, is there any option to load a pickle file or any python native file in chunks? 来源: https://stackoverflow.com/questions/59983073/how-to-load-pickle-file-in-chunks

Java won't recognize file in JAR

橙三吉。 提交于 2021-02-20 04:55:27
问题 I have a .csv database file inside my java program's JAR file. The program works fine in NetBeans IDE before I package it, but once I do, it refuses to believe the file is in it, even though I had it print out the path where it was looking and unzipped the JAR to be sure I told it to look in the right place. How do I make Java see this? try { String path = Main.class.getResource("/items.csv").getPath(); db = new java.io.File(path); loadValues(db); } catch (java.io.FileNotFoundException ex1) {

PHP - Open or copy a file when knowing only part of its name?

☆樱花仙子☆ 提交于 2021-02-20 04:40:47
问题 I have a huge repository of files that are ordered by numbered folders. In each folder is a file which starts with a unique number then an unknown string of characters. Given the unique number how can i open or copy this file? for example: I have been given the number '7656875' and nothing more. I need to interact with a file called '\server\7656800\7656875 foobar 2x4'. how can i achieve this using PHP? 回答1: If you know the directory name, consider using glob() $matches = glob('./server/dir/'

Java Swing Apache POI make Word Document read only

五迷三道 提交于 2021-02-19 23:15:56
问题 Hello I am creating a Swing application to create a word document. I have made use of the Apache POI Java API for this purpose. But the problem is --> How do I set the word document to be read only after creation? I have heard of java.io.File.setReadOnly() method, but I don't know how to use it in this context. Here is the code: private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { try{ FileOutputStream outStream=new FileOutputStream("New.docx"); XWPFDocument doc =new

Java Swing Apache POI make Word Document read only

老子叫甜甜 提交于 2021-02-19 23:10:57
问题 Hello I am creating a Swing application to create a word document. I have made use of the Apache POI Java API for this purpose. But the problem is --> How do I set the word document to be read only after creation? I have heard of java.io.File.setReadOnly() method, but I don't know how to use it in this context. Here is the code: private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { try{ FileOutputStream outStream=new FileOutputStream("New.docx"); XWPFDocument doc =new

Java Swing Apache POI make Word Document read only

二次信任 提交于 2021-02-19 23:08:36
问题 Hello I am creating a Swing application to create a word document. I have made use of the Apache POI Java API for this purpose. But the problem is --> How do I set the word document to be read only after creation? I have heard of java.io.File.setReadOnly() method, but I don't know how to use it in this context. Here is the code: private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { try{ FileOutputStream outStream=new FileOutputStream("New.docx"); XWPFDocument doc =new

Java Swing Apache POI make Word Document read only

旧城冷巷雨未停 提交于 2021-02-19 23:08:26
问题 Hello I am creating a Swing application to create a word document. I have made use of the Apache POI Java API for this purpose. But the problem is --> How do I set the word document to be read only after creation? I have heard of java.io.File.setReadOnly() method, but I don't know how to use it in this context. Here is the code: private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { try{ FileOutputStream outStream=new FileOutputStream("New.docx"); XWPFDocument doc =new

Getting filenames from a folder in Sharepoint with VBA

陌路散爱 提交于 2021-02-19 12:50:29
问题 I've done alot of research on this and found a number of help sites but still can't understand why this sometimes doesn't work. I'm trying to access a sharepoint site (to which there are no restrictions for me) and extract all the files in a folder within that site. Sometimes my Path works and it does it, other times it does not. I have a feeling it works if I've gone into the sharepoint site on my browser before but can't confirm that (because I just tried it again now and it doesnt work

Getting filenames from a folder in Sharepoint with VBA

泪湿孤枕 提交于 2021-02-19 12:47:24
问题 I've done alot of research on this and found a number of help sites but still can't understand why this sometimes doesn't work. I'm trying to access a sharepoint site (to which there are no restrictions for me) and extract all the files in a folder within that site. Sometimes my Path works and it does it, other times it does not. I have a feeling it works if I've gone into the sharepoint site on my browser before but can't confirm that (because I just tried it again now and it doesnt work