directory

install a R package from directory

别说谁变了你拦得住时间么 提交于 2019-12-22 16:45:03
问题 Hi is it possible to install an R package directly from a directory without going the intermediate step of building a tar.gz from source and then calling install? I know that devtools support load_all but for my purposes (deploying to several opencpu servers) is not sufficient and a "proper" installation is needed. 来源: https://stackoverflow.com/questions/30733459/install-a-r-package-from-directory

Why can't I delete files from my XCode project?

余生长醉 提交于 2019-12-22 15:23:22
问题 This is probably a very easy question, but I'm having trouble deleting resources from my XCode project. I added them using "Create Folder References for any added folders" so that I could import a whole offline HTML site with its correct folder structure. Unfortunately, now it has been added like this I don't seem to be able to delete individual files in the structure (it's not available from the Edit menu). Can anyone help please? Thanks! 回答1: That isn't how folder references work. The idea

Move all .jpeg from directory structure into one folder on Mac OS X

别来无恙 提交于 2019-12-22 14:14:12
问题 Recently my iPhoto database got all screwed up and I need to extract all of the originals from a folder structure to a central folder on the desktop. Instead of going one by one through all of the folders, I would like to move all of them through a bash command or script. Any suggestions. I looked into rsync but I think that only takes the folders structure. 回答1: find /path/to/original/folder -type f -name "*.jpg" -exec mv {} /path/to/new/folder \; 来源: https://stackoverflow.com/questions

FAT32 number of files per directory limit

我与影子孤独终老i 提交于 2019-12-22 11:05:45
问题 I'm currently trying to code a FAT system in C on a Xillinx Kintex 7 card. It is equipped with a MicroBlaze and I've already managed to create most of the required functions. The problem I'm facing is about the total capacity of a folder, I've read on the web that in FAT32 a folder should be able to contain more than 65 000 files but with the system I've put in place I'm limited to 509 files per folder. I think it's because of my comprehension of the way FAT32 works but here's what I've made

Git on Windows: “merging” 2 directories with the same name but different case

我的未来我决定 提交于 2019-12-22 10:58:23
问题 The word "merge" does not refer to a git merge, but just moving all the files to the same directory. We somehow came to have two directories with the same name but different cases in our git repository. Windows is case-insensetive in this respect so it works fine just checking out all the files from both directories into one directory on disk. Still would like to get rid of this "duality" Is there a way to fix this using Windows git clients? I've tried git mv, but it appears to be case

Create a directory and store files inside it in Swift

自古美人都是妖i 提交于 2019-12-22 10:47:29
问题 i am creating a directory so that i can save temp videos onto it as TempVideos is a folder now my video clips will be inside the folder... func createTempDirectoryToStoreVideos(){ var error: NSError? let paths = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.UserDomainMask, true) let documentsDirectory: AnyObject = paths[0] tempVideoPath = documentsDirectory.stringByAppendingPathComponent("TempVideos") if (!NSFileManager.defaultManager()

Read all files in directory sub folders

若如初见. 提交于 2019-12-22 10:21:37
问题 I have a folder - "C:\scripts" Within "scripts" I have several sub folders e.g. - "C:\scripts\subfolder1" "C:\scripts\subfolder2" etc, that contain html files. I am trying to use the following code - foreach (string file in Directory.EnumerateFiles(@"C:\scripts","*.html")) { string contents = File.ReadAllText(file); } However this does not work due to the html files being in the sub folders. How can I access the html files in the sub folders without having to manually put in the path of each

How to create directories and sub directories efficiently and elegantly in Python 2.7?

此生再无相见时 提交于 2019-12-22 10:20:00
问题 I am trying to create a bunch of directories and sub directories at a specific location in my PC. My process is something like this: Check if there's any directory with the same directory name. Skip if so. If not, create the directory and the pre-defined sub directories under that directory. This is the code I came up with using os module: def Test(): main_dir = ["FolderA", "FolderB"] common_dir = ["SubFolder1", "SubFolder2", "SubFolder3"] for dir1 in main_dir: if not os.path.isdir(dir1): for

Scan current folder using PHP

情到浓时终转凉″ 提交于 2019-12-22 10:13:32
问题 I have a folder structure like this: /articles .index.php .second.php .third.php .fourth.php If I'm writing my code in second.php, how can I scan the current folder(articles)? Thanks 回答1: $files = glob(dirname(__FILE__) . "/*.php"); http://php.net/manual/en/function.glob.php 回答2: foreach (scandir('.') as $file) echo $file . "\n"; 回答3: From the PHP manual: $dir = new DirectoryIterator(dirname($path)); foreach ($dir as $fileinfo) { if (!$fileinfo->isDot()) { var_dump($fileinfo->getFilename());

ZipArchives stores absolute paths

血红的双手。 提交于 2019-12-22 09:05:56
问题 Can I zip files using relative paths? For example: $zip->addFile('c:/wamp/www/foo/file.txt'); the ZIP should have a directory structure like: foo -> file.txt and not: wamp -> www -> foo -> file.txt like it is by default... ps: my full code is here (I'm using ZipArchive to compress contents of a directory into a zip file) 回答1: See the addFile() function definition, you can override the archive filename: $zip->addFile('/path/to/index.txt', 'newname.txt'); 回答2: If you are trying to recursively