directory

Attempting to link to root directory on home computer

被刻印的时光 ゝ 提交于 2020-01-16 20:36:30
问题 I'm attempting to build a website on my computer and I'm having issues linking with my root directory from anywhere on the website. I know I can use ../ to go up 1 directory as many times as needed, but I need a way to link to my root directory without using the whole address so I can use "absolute links" to use in my PHP pages which I want to use all over my site for ease of editing. I've been told that / will take me back to the root, but it isn't working on my computer. Here is the address

Directory traversal and file selection with .bat

ぐ巨炮叔叔 提交于 2020-01-16 19:49:13
问题 I am trying to write a .bat file that allows me to traverse through directories (up or down) and let me select a file from the current directory, passing that filename out at the end of the routine. Ideally, it would handle if it is at the root of a drive (i.e. C:) or that there are no more sub directories. (If there are more elegant ways of doing what I am asking, please feel free to suggest them!) @echo off setlocal enabledelayedexpansion set FVAR= :start ::---------------------------------

Directory traversal and file selection with .bat

天大地大妈咪最大 提交于 2020-01-16 19:48:12
问题 I am trying to write a .bat file that allows me to traverse through directories (up or down) and let me select a file from the current directory, passing that filename out at the end of the routine. Ideally, it would handle if it is at the root of a drive (i.e. C:) or that there are no more sub directories. (If there are more elegant ways of doing what I am asking, please feel free to suggest them!) @echo off setlocal enabledelayedexpansion set FVAR= :start ::---------------------------------

Scikit-learn: Loading images from folder to create a labelled dataset for KNN classification

为君一笑 提交于 2020-01-16 19:25:28
问题 I want to do handwritten digit recognition using K-Nearest Neighbours classification with scikit-learn. I have a folder that has 5001 images of handwritten digits (500 images for each digit from 0-9). I am trying to find a way to create a dataset based on these images, so that I can then create a training and testing set. I have read a lot of online tutorials about how to do K-Nearest Neighbours classification using scikit-learn but most of the tutorials load existing datasets such as the

Linux C read a directory

扶醉桌前 提交于 2020-01-16 18:58:27
问题 Hello I want to read from and write to a directory just like reading from and writing to files. I always use the open , read , write and close functions, which means I use descriptors. But doing this on a directory doesn't work, the open call works, but read returns -1 and errno is EISDIR. Am I forced to use streams to read a directory? 回答1: The read() and write() system calls cannot be used on directories. Instead, the getdents() / getdents64() system calls are used to read a directory.

Recursive Perl detail need help

本秂侑毒 提交于 2020-01-16 18:27:20
问题 i think this is a simple problem, but i'm stuck with it for some time now! I need a fresh pair of eyes on this. The thing is i have this code in perl: #!c:/Perl/bin/perl use CGI qw/param/; use URI::Escape; print "Content-type: text/html\n\n"; my $directory = param ('directory'); $directory = uri_unescape ($directory); my @contents; readDir($directory); foreach (@contents) { print "$_\n"; } #------------------------------------------------------------------------ sub readDir(){ my $dir = shift

Trying to create folder, but Its indicate logcat error? how to solve?

本小妞迷上赌 提交于 2020-01-16 16:16:53
问题 Hi Now I am trying to create folders in my gallery...so I am implement these line in my galleryview.java file.......but nothing to be change normal process is going on....please help me..... File nfile=new File(Environment.getExternalStorageDirectory()+"/picture"); nfile.mkdir(); Galleryview.java public class Galleryview extends Activity { /** Called when the activity is first created. */ private Cursor imagecursor, actualimagecursor; private int image_column_index, actual_image_column_index;

Trying to create folder, but Its indicate logcat error? how to solve?

蓝咒 提交于 2020-01-16 16:15:05
问题 Hi Now I am trying to create folders in my gallery...so I am implement these line in my galleryview.java file.......but nothing to be change normal process is going on....please help me..... File nfile=new File(Environment.getExternalStorageDirectory()+"/picture"); nfile.mkdir(); Galleryview.java public class Galleryview extends Activity { /** Called when the activity is first created. */ private Cursor imagecursor, actualimagecursor; private int image_column_index, actual_image_column_index;

android access folder using environment.getexternalstoragedirectory on device with only internal memory would return?

落爺英雄遲暮 提交于 2020-01-16 13:20:35
问题 im using this code to access a folder: String path = Environment.getExternalStorageDirectory().getAbsolutePath()+ "/somefolder"; on devices with sdcard this is ok, i don't have a device with only internal memory to test what happens, what would happen if this is executed on a device without sdcard? will it automatically set to the internal memory path? the user of the app would put this folder in the root of the available memory. is there a way to get internal path? is there a way to check

How to prevent access to a directory with htaccess?

旧街凉风 提交于 2020-01-16 07:56:17
问题 How do I prevent access to a given directory ? Here is the structure of my website : config.php .htaccess classes/ |----lib/ | |----... |----classes.php webroot/ |----index.php |----ctrl/ | |----... |----pages/ | |----... |----style/ |----... The DocumentRoot is webroot . I want to prohibit access to the following folders : ctrl , pages , style . But the files stored in these folders still have to be available to be included in the index.php file. In other words, there is an index.php file.