directory

XSL, get current working directory

限于喜欢 提交于 2020-01-03 15:33:11
问题 I'm looking for a concrete example of an XSL stylesheet storing the current working directory into a variable. I need this because in my situation, I need to import certain library stylesheets using a relative path. Knowing the path my processor is choosing as the current directory would be sufficient. EDIT Nothing vendor specific please. 回答1: In XSLT 2.0 one can use the standard XPath 2.0 function resolve-uri(). Do note, that the relative URIs of the included/imported stylesheet modules are

What are ways to compress directory into single file

爷,独闯天下 提交于 2020-01-03 10:21:15
问题 Don't know how to ask it so I will explain situation. I need to store a few compressed files. The original idea was to create a folder and store as many compressed files as were needed and also create a file that holds data about every compressed file. However, I was not allowed to create many files and must only have one. I decided to create a compressed file which has a header about further data and after header keep compressed data. But this option has disadvantages, e.g. editing such file

Guidelines for using jQuery plugins and their dependencies [closed]

时光总嘲笑我的痴心妄想 提交于 2020-01-03 07:25:34
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . jQuery plugins often have dependencies on external files: jQuery library, style sheets (CSS), images, other plugins, etc. What are the guidelines for using (and writing) jQuery plugins that would address the placement of the dependencies? In the other words, where should the

How can I list all files in a directory using Perl?

吃可爱长大的小学妹 提交于 2020-01-03 07:18:07
问题 I usually use something like my $dir="/path/to/dir"; opendir(DIR, $dir) or die "can't open $dir: $!"; my @files = readdir DIR; closedir DIR; or sometimes I use glob , but anyway, I always need to add a line or two to filter out . and .. which is quite annoying. How do you usually go about this common task? 回答1: I will normally use the glob method: for my $file (glob "$dir/*") { #do stuff with $file } This works fine unless the directory has lots of files in it. In those cases you have to

How can I list all files in a directory using Perl?

守給你的承諾、 提交于 2020-01-03 07:17:10
问题 I usually use something like my $dir="/path/to/dir"; opendir(DIR, $dir) or die "can't open $dir: $!"; my @files = readdir DIR; closedir DIR; or sometimes I use glob , but anyway, I always need to add a line or two to filter out . and .. which is quite annoying. How do you usually go about this common task? 回答1: I will normally use the glob method: for my $file (glob "$dir/*") { #do stuff with $file } This works fine unless the directory has lots of files in it. In those cases you have to

Applescript - Creating folders based on the first word of the filename

放肆的年华 提交于 2020-01-03 05:04:19
问题 Essentially i'm looking for an applescript that allow me to order the massive 50.000 files by creating folders that have just the first word of the files, ignoring the rest of the filename after the first space. For eaxmple the 50.000 files are named like this: - amazingfrog -shootingbase.jpg - frog 2sHDn1_9fFs12s.jpg - frog 29adjjdd39939.mov - Horse IUS39aosdja.mov - horse 282131888.jpg - HORSE.jpg And so on..... - I would like to be like this: - amazingfrog -amazingfrog -shootingbase.jpg -

Get folders and files recursively from a folder in alphabetical order in PHP?

老子叫甜甜 提交于 2020-01-03 03:30:34
问题 I need to get all the folders and files from a folder recursively in alphabetical order (folders first, files after) Is there an implemented PHP function which caters for this? I have this function: function dir_tree($dir) { $path = ''; $stack[] = $dir; while ($stack) { $thisdir = array_pop($stack); if ($dircont = scandir($thisdir)) { $i=0; while (isset($dircont[$i])) { if ($dircont[$i] !== '.' && $dircont[$i] !== '..' && $dircont[$i] !== '.svn') { $current_file = "{$thisdir}/{$dircont[$i]}";

Unity - Move Script-Files to other directory without reference loss

做~自己de王妃 提交于 2020-01-03 03:27:07
问题 I have to move my GameManager-Script to a higher directory, due to accessability from another script. But if I try to move the script from one folder to another directory - all references die! And I mean like - all references from all scripts. It would be really hard to configure all scripts again from the scratch. Its like starting from the beginning. Here is the GameManagement-Directory (Assets->Standard Assets): Here is the the Directory, where I have to move the "GameManagement" to

How to calculate md5 checksum on directory with java or groovy?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 02:49:53
问题 I am looking to use java or groovy to get the md5 checksum of a complete directory. I have to copy directories for source to target, checksum source and target, and after delete source directories. I find this script for files, but how to do the same thing with directories ? import java.security.MessageDigest def generateMD5(final file) { MessageDigest digest = MessageDigest.getInstance("MD5") file.withInputStream(){ is -> byte[] buffer = new byte[8192] int read = 0 while( (read = is.read

Java机制

对着背影说爱祢 提交于 2020-01-02 21:49:08
1.Java怎么实现跨平台性 核心机制–Java虚拟机 Jvm是一个虚拟的计算机,具有指令集并使用不同的存储区域。负责执行指令、管理数据、内存、寄存器 JVM用于运行Java应用程序 对于不同的平台,有不同的虚拟机 Java虚拟机制屏蔽了底层运行平台的差别,实现了“一次编译,到处运行”。 2.什么是垃圾回收机制 垃圾回收机制指Java的健壮性 吸收了C/C++语言的优点,但去掉了其影响程序健壮性的部分 3.jdk,jre,jvm分别是什么,他们之间的关系是什么 使用JDK的提供的开发工具完成Java程序的开发,使用JRE运行开发好的Java应用程序JDK(Java Development Kit Java开发工具包):JDK是提供给Java开发人员使用的,其中包含了Java的开发工具,也包括了JRE。所以安装了JDK,就不用再单独安装JRE了JRE(Java Runtime Environment Java运行环境):包括Java虚拟机(JVM:Java Virtual Machine)和Java程序所需要的核心库等,如果想要运行一个开发好的Java程序,计算机中只需要安装JRE即可。 三者之间的关系 Jdk包含Jre包含Jvm 4.什么是JDK、JRE JDK(Java Development Kit Java开发工具包):JDK是提供给Java开发人员使用的