file-search

How to make eclipse “File Search” to also search inside source jars containing some text?

一个人想着一个人 提交于 2019-12-17 15:35:27
问题 I am working on a (Java) project in which I have many jars which have a source-jar file attached. Is there any way to make the eclipse "File Search" search for Java files (and txt, xml etc. for that matter) containing some string literal inside these source jars, not just in the project folder? Or is there any plugin by which this can be achieved? 回答1: Recently discovered the following plugin has beta support for searching into linked source jars: https://github.com/ajermakovics/eclipse

function of searching a string from a file

对着背影说爱祢 提交于 2019-12-11 09:22:57
问题 This is some code I wrote to check a string's presence in a file: bool aviasm::in1(string s) { ifstream in("optab1.txt",ios::in);//opening the optab //cout<<"entered in1 func"<<endl; char c; string x,y; while((c=in.get())!=EOF) { in.putback(c); in>>x; in>>y; if(x==s) return true; } return false; } it is sure that the string being searched lies in the first column of the optab1.txt and in total there are two columns in the optab1.txt for every row. Now the problem is that no matter what string

Android finding files on the SDCard

牧云@^-^@ 提交于 2019-12-11 07:55:32
问题 I'm working on a MP3 application in which I'd like to index the files on my SDCard. What is the best way to do it? My Idea . Search for files when the application is started for the first time and register a broadcast receiver for the SDCard state change intents and search for the files whenever the intent is broadcasted. But in this case the ANR would show up if my broadcast receiver doesn't return within 10 seconds. Looking for better and failsafe ideas. Thanks. 回答1: Agree with Chris,

find specific file type from folder and its sub folder

笑着哭i 提交于 2019-12-10 20:34:16
问题 I am writing a method to get specific file type such as pdf or txt from folders and subfolders but I am lacking to solve this problem. here is my code // .............list file File directory = new File(directoryName); // get all the files from a directory File[] fList = directory.listFiles(); for (File file : fList) { if (file.isFile()) { System.out.println(file.getAbsolutePath()); } else if (file.isDirectory()) { listf(file.getAbsolutePath()); } } My current method list all files but I need

tcl deep recursive file search, search for files with *.c extension

◇◆丶佛笑我妖孽 提交于 2019-12-10 17:40:01
问题 Using an old answer to search for a file in tcl: https://stackoverflow.com/a/435094/984975 First lets discuss what I am doing right now: Using this function:(credit to Jacson) # findFiles # basedir - the directory to start looking in # pattern - A pattern, as defined by the glob command, that the files must match proc findFiles { basedir pattern } { # Fix the directory name, this ensures the directory name is in the # native format for the platform and contains a final directory seperator set

How can I programmatically use Windows File Explorer to perform a Search?

你离开我真会死。 提交于 2019-12-08 04:36:18
问题 We have a folder on our network that we want to search within, including subfolders, from our program. We want to return a list of files whose name contains "String1" or "String2" or "StringN". We would prefer to programmatically open an Explorer window and view all files that match the search results using the native windows file explorer. Is this possible? How? Thanks! 回答1: You can use the .ms-search file format to express a saved search. If you open this file format it will launch a File

Smart image search via Powershell

懵懂的女人 提交于 2019-12-04 09:42:49
问题 I am interested in file searching by custom properties. For example, I want to find all JPEG-images with certain dimensions. Something looks like Get-ChildItem -Path C:\ -Filter *.jpg -Recursive | where-object { $_.Dimension -eq '1024x768' } I suspect it's about using of System.Drawing. How it can be done? Thanks in advance 回答1: That's actually pretty easy to do and your gut feeling about System.Drawing was in fact correct: Add-Type -Assembly System.Drawing $input | ForEach-Object { [Drawing

How to get the last modified file in a directory using VBA in Excel 2010

只谈情不闲聊 提交于 2019-12-04 03:43:52
问题 Im looking for a way to do this in Excel 2010 using VBA. It used to be possible in Excel 2003 using the Application.FileSearch method, but this has be depreciated. (see below) Dim sFileName As String sFileName = "" With Application.FileSearch .NewSearch .LookIn = sDir .Filename = "*.*" .Execute msoSortByLastModified, msoSortOrderDescending If .FoundFiles.Count > 0 Then sFileName = .FoundFiles(1) End With Any ideas how to do this in Excel 2010? Thanks 回答1: If using the FileSystemObject is

Smart image search via Powershell

前提是你 提交于 2019-12-03 03:02:36
I am interested in file searching by custom properties. For example, I want to find all JPEG-images with certain dimensions. Something looks like Get-ChildItem -Path C:\ -Filter *.jpg -Recursive | where-object { $_.Dimension -eq '1024x768' } I suspect it's about using of System.Drawing. How it can be done? Thanks in advance That's actually pretty easy to do and your gut feeling about System.Drawing was in fact correct: Add-Type -Assembly System.Drawing $input | ForEach-Object { [Drawing.Image]::FromFile($_) } Save that as Get-Image.ps1 somewhere in your path and then you can use it. Another

How can I find the newest .pl file in a directory and all its subdirectories using Perl?

牧云@^-^@ 提交于 2019-12-01 20:38:44
问题 How can I scan an entire directory's contents, including its subdirectories' contents, and find the newest .pl file within them using Perl? I want to build a sorted array/list of the full file paths of all .pl files within a directory tree. So, for example, if my base directory is /home/users/cheeseconqueso/ I want to search for .pl files in that directory and any subdirectory within that path and then sort the .pl files by date. The end result would be an array, @pl_paths , where $pl_paths[0