directory-structure

TypeScript - How to keep compiled files in a separate directory?

做~自己de王妃 提交于 2019-11-26 19:13:14
问题 I'm fairly new to TypeScript, and right now I have .ts files in several places throughought my project structure: app/ |-scripts/ |-app.ts | |-classes/ | |-classA.ts | |-classB.ts | |-controllers/ | |-controllerA.ts | |-controllerB.ts | |-otherStuff/ |-otherstuffA.ts Right now, when my files are compiled, they are compiled to the same directory that the .ts fles are in: app/ |-scripts/ |-app.ts |-app.js | |-classes/ | |-classA.ts | |-classB.ts | |-classA.js | |-classB.js | |-controllers/ | |

Listing directory contents using C and Windows

浪尽此生 提交于 2019-11-26 18:46:26
I'm looking to list and store the contents of a directory in a struct using C on Windows. I'm not necessarily looking for anyone to write out the code I'm looking for, rather point me in the right direction when it comes to which library I should be looking at. I've been Googling for a few hours now and all I'm finding is C#, C++ solutions so any help would be greatly appreciated. Just like everyone else said (with FindFirstFile, FindNextFile and FindClose)... but with recursion! bool ListDirectoryContents(const char *sDir) { WIN32_FIND_DATA fdFile; HANDLE hFind = NULL; char sPath[2048]; /

Populate TreeView with file system directory structure

試著忘記壹切 提交于 2019-11-26 18:36:44
i am new with Nodes here.. :) i came up with this algorithm but it only shows the list of parent nodes.. like this.. a a.txt b c c m n b o p etc... i want the next node will be put in one of the node inside the previous node.. so it will come up like this.. a a.txt b o p c m n etc... i have some ideas in mind but i can implement it to codes.. :) any help please.. private void ListDirectory(TreeView treeView, String path) { Stack<string> stack = new Stack<string>(); TreeNode DirFilesCollection = new TreeNode(); stack.Push(path); while (stack.Count > 0) { string dir = stack.Pop(); try { List

C# OpenFileDialog Lock To Directory

天大地大妈咪最大 提交于 2019-11-26 18:34:52
问题 I am making a software that needs to ONLY be able allow people to select files and folders using the OpenFileDialog that are in the same directory as the program and that are in deeper folders. I don't want the OpenFileDialog to be able to select stuff outside of the program's current directory. Is this possible to do in C# using the OpenFileDialog? Please let me know Thanks 回答1: you can check if the path is correct after selected if its just accept or send message box tell him you select

Java: How can I compile an entire directory structure of code ?

余生颓废 提交于 2019-11-26 12:57:01
The use case is simple. I got the source files that were created using Eclipse. So, there is a deep directory structure, where any Java class could be referring to another Java class in the same, child, sibling or parent folder. How do I compile this whole thing from the terminal using javac ? You have to know all the directories, or be able to use wildcard .. javac dir1/*.java dir2/*.java dir3/dir4/*.java dir3/dir5/*.java dir6/*src/*.java With Bash 4, you can just enable globstar shopt -s globstar and then do javac **/*.java If all you want to do is run your main class (without compiling the

OO Design in Rails: Where to put stuff

本小妞迷上赌 提交于 2019-11-26 11:57:47
I'm really enjoying Rails (even though I'm generally RESTless), and I enjoy Ruby being very OO. Still, the tendency to make huge ActiveRecord subclasses and huge controllers is quite natural (even if you do use a controller per resource). If you were to create deeper object worlds, where would you put the classes (and modules, I suppose)? I'm asking about views (in the Helpers themselves?), controllers and models. Lib is okay, and I've found some solutions to get it to reload in a dev environment , but I'd like to know if there's a better way to do this stuff. I'm really just concerned about

AngularJS application file structure

删除回忆录丶 提交于 2019-11-26 11:56:12
问题 On a large AngularJS application having all my controllers in a single \"controllers.js\" file seems a little un-maintainable to me. Is there a better way to do this such as: \\js\\controllers\\myController.js \\js\\controllers\\yourController.js \\js\\controllers\\ourController.js and that also applies for filters, services, directives etc... 回答1: There are lot's of ways to organize your code. You can look in the following links Building Huuuuuge Apps with AngularJS Code Organization in

How to specify the JDK version in android studio?

£可爱£侵袭症+ 提交于 2019-11-26 09:37:17
问题 Android Studio is giving me a Gradle build error that looks like this: Error:(3, 22) compileSdkVersion android-22 requires compiling with JDK 7 Now it gives me these clickable prompts: Download JDK 7 Select a JDK from the File System Open build.gradle File And I have already downloaded and installed JDK 7. The problem is when I go to select it in the \"File System\" i can only find a directory named 1.6.0 JDK. Furthermore, the installation of JDK 7 skipped the bullet point where I would\'ve

List directory tree structure in python?

青春壹個敷衍的年華 提交于 2019-11-26 07:54:50
问题 I know that we can use os.walk() to list all sub-directories or all files in a directory. However, I would like to list the full directory tree content: - Subdirectory 1: - file11 - file12 - Sub-sub-directory 11: - file111 - file112 - Subdirectory 2: - file21 - sub-sub-directory 21 - sub-sub-directory 22 - sub-sub-sub-directory 221 - file 2211 How to best achieve this in Python? 回答1: Here's a function to do that with formatting: import os def list_files(startpath): for root, dirs, files in os

How to get only images using scandir in PHP?

試著忘記壹切 提交于 2019-11-26 07:33:04
问题 Is there any way to get only images with extensions jpeg , png , gif etc while using $dir = \'/tmp\'; $files1 = scandir($dir); 回答1: You can use glob $images = glob('/tmp/*.{jpeg,gif,png}', GLOB_BRACE); If you need this to be case-insensitive, you could use a DirectoryIterator in combination with a RegexIterator or pass the result of scandir to array_map and use a callback that filters any unwanted extensions. Whether you use strpos , fnmatch or pathinfo to get the extension is up to you. 回答2: