Search Results

Search found 19563 results on 783 pages for 'binary search'.

Page 161/783 | < Previous Page | 157 158 159 160 161 162 163 164 165 166 167 168  | Next Page >

  • Find Search Replace from landmark to landmark - including everything in between

    - by Erick Tronboll
    Appreciate some Jedi help... I have the following string: gi|374638939|gb|AEZ55452.1| myosin light chain 2, partial [Batrachoseps major] AAMGR repeating sporadically throughout my document and want to remove everything from: gi|37463 to the AAMGR sequence but, I want to keep the blocks where JQ250 appears: gi|374638936|gb|*JQ250*332.1| Batrachoseps major isolate b voucher DBW5974 myosin light chain 2 gene, partial cds GCNGCCATGGGTAAGTGAACGCGCCGGACCAGACCATTCACTGCATGCAATGGGGGCGTTTGTGGGTTGG AAGGTGTGCCAAAGATCTAGGGAACCCCAACTCCTCAGGATACGGGTGGGAGCCCTAAAATATGTCCAGC TATAAGGAGATGACCAATGGAAAAGGGGGTATCAGCAGTACTTTACCTGCTACTATAAGAGAATTGCATC CTGGGAATAGCCTCTGAAAGGTCCCATTTTAGCGACACTGGTAGATGGACACTGGCCTTTGGACAGCACC AGTAAGTAGAGCATTGCATCTTGGGATTCCTTTGCTGTTCACATGCCACTGAAAGCTCTCACCATAGCAG ATTCAAAATGCCTACCCGGCAGGTTGCCAGAAAAGCACTGCATCATGGGAGAACCACTTTTAGTGACAAT TCTAAGAGATGGGTGTCTCTCTGCCAGGCGCTATTATCCAGAGACCCCAGTATGACGTCGTCATTGCTCC CAGGTAACCATGTTCTCACCCCCTCTCCCACAGGCCGC and remove only the lines that have AEZ554 gi|374638939|gb|*AEZ554*52.1| myosin light chain 2, partial [Batrachoseps major] AAMGR ..................................... So, ideally the following block: gi|374638934|gb|JQ250331.1| Batrachoseps major isolate a voucher DBW5974 myosin light chain 2 gene, partial cds GCNGCCATGGGTAAGTGAACGCGCCGGACCAGACCATTCACTGCATGCAATGGGGGCGTTTGTGGGTTGG AAGGTGTGCCAAAGATCTAGGGAACCCCAACTCCTCAGGATACGGGTGGGAGCCCTAAAATATGTCCAGC TATAAGGAGATGACCAATGGAAAAGGGGGTATCAGCAGTACTTTACCTGCTACTATAAGAGAATTGCATC CTGGGAATAGCCTCTGAAAGGTCCCATTTTAGCGACACTGGTAGATGGACACTGGCCTTTGGACAGCACC AGTAAGTAGAGCATTGCATCTTGGGATTCCTTTGCTGTTCACATGCCACTGAAAGCTCTCACCATAGCAG ATTCAAAATGCCTACCCGGCAGGTTGCCAGAAAAGCACTGCATCATGGGAGAACCACTTTTAGTGACAAT TCTAAGAGATGGGTGTCTCTCTGCCAGGCGCTATTATCCAGAGACCCCAGTATGACGTCGTCATTGCTCC CAGGTAACCATGTTCTCACCCCCTCTCCCACAGGCCGC gi|374638935|gb|AEZ55450.1| myosin light chain 2, partial [Batrachoseps major] AAMGR gi|374638936|gb|JQ250332.1| Batrachoseps major isolate b voucher DBW5974 myosin light chain 2 gene, partial cds GCNGCCATGGGTAAGTGAACGCGCCGGACCAGACCATTCACTGCATGCAATGGGGGCGTTTGTGGGTTGG AAGGTGTGCCAAAGATCTAGGGAACCCCAACTCCTCAGGATACGGGTGGGAGCCCTAAAATATGTCCAGC TATAAGGAGATGACCAATGGAAAAGGGGGTATCAGCAGTACTTTACCTGCTACTATAAGAGAATTGCATC CTGGGAATAGCCTCTGAAAGGTCCCATTTTAGCGACACTGGTAGATGGACACTGGCCTTTGGACAGCACC AGTAAGTAGAGCATTGCATCTTGGGATTCCTTTGCTGTTCACATGCCACTGAAAGCTCTCACCATAGCAG ATTCAAAATGCCTACCCGGCAGGTTGCCAGAAAAGCACTGCATCATGGGAGAACCACTTTTAGTGACAAT TCTAAGAGATGGGTGTCTCTCTGCCAGGCGCTATTATCCAGAGACCCCAGTATGACGTCGTCATTGCTCC CAGGTAACCATGTTCTCACCCCCTCTCCCACAGGCCGC gi|374638937|gb|AEZ55451.1| myosin light chain 2, partial [Batrachoseps major] AAMGR gi|374638938|gb|JQ250333.1| Batrachoseps major isolate a voucher MVZ:Herp:249023 myosin light chain 2 gene, partial cds GCCGCCATGGGTAAGTGAACGCGCCGGACCAGACCATTCACTGCCTGCAATGGGGGTGTTTGTGGGTTGG AAGGTGTGCCAAAGATCTAGGGAACCCCAACTCCTCAGGATACGGGTGGGAGCCCTAAAATATGTCCAGC TATAAGGAGATGACCAATGGAAAAGGGGGTATCAGCAGTACTTTACTTGCTACTATAAGAGAATTGCATC CTGGGAATAGCCTCTGAAAGGTCCCATTTTAGCGACACTGGTAGATGGACACTGGCCTTTGGACAGCACC AGTAAGTAGAGCATTGCATCTTGGGATTCCTTTGCTGTTCACATGCCACTGAAAGCTCTCACCATAGCAG ATTCAAAATGCCTACCCGGCAGGTTGCCAGAAAAGCACTGCATCATGGGAGAACCACTTTTAGTGACAAT CCTAAGAGATGGGTGTCTCTCTGCCAGGCGCTATTATCCAAGAGACCCCAGTATGACGTCGTCATTGCTC CCAGGTAACCATGTTCTCACCCCCTCTCCCACAGGCCGC gi|374638939|gb|AEZ55452.1| myosin light chain 2, partial [Batrachoseps major] AAMGR Would be left as just: gi|374638934|gb|JQ250331.1| Batrachoseps major isolate a voucher DBW5974 myosin light chain 2 gene, partial cds GCNGCCATGGGTAAGTGAACGCGCCGGACCAGACCATTCACTGCATGCAATGGGGGCGTTTGTGGGTTGG AAGGTGTGCCAAAGATCTAGGGAACCCCAACTCCTCAGGATACGGGTGGGAGCCCTAAAATATGTCCAGC TATAAGGAGATGACCAATGGAAAAGGGGGTATCAGCAGTACTTTACCTGCTACTATAAGAGAATTGCATC CTGGGAATAGCCTCTGAAAGGTCCCATTTTAGCGACACTGGTAGATGGACACTGGCCTTTGGACAGCACC AGTAAGTAGAGCATTGCATCTTGGGATTCCTTTGCTGTTCACATGCCACTGAAAGCTCTCACCATAGCAG ATTCAAAATGCCTACCCGGCAGGTTGCCAGAAAAGCACTGCATCATGGGAGAACCACTTTTAGTGACAAT TCTAAGAGATGGGTGTCTCTCTGCCAGGCGCTATTATCCAGAGACCCCAGTATGACGTCGTCATTGCTCC CAGGTAACCATGTTCTCACCCCCTCTCCCACAGGCCGC gi|374638936|gb|JQ250332.1| Batrachoseps major isolate b voucher DBW5974 myosin light chain 2 gene, partial cds GCNGCCATGGGTAAGTGAACGCGCCGGACCAGACCATTCACTGCATGCAATGGGGGCGTTTGTGGGTTGG AAGGTGTGCCAAAGATCTAGGGAACCCCAACTCCTCAGGATACGGGTGGGAGCCCTAAAATATGTCCAGC TATAAGGAGATGACCAATGGAAAAGGGGGTATCAGCAGTACTTTACCTGCTACTATAAGAGAATTGCATC CTGGGAATAGCCTCTGAAAGGTCCCATTTTAGCGACACTGGTAGATGGACACTGGCCTTTGGACAGCACC AGTAAGTAGAGCATTGCATCTTGGGATTCCTTTGCTGTTCACATGCCACTGAAAGCTCTCACCATAGCAG ATTCAAAATGCCTACCCGGCAGGTTGCCAGAAAAGCACTGCATCATGGGAGAACCACTTTTAGTGACAAT TCTAAGAGATGGGTGTCTCTCTGCCAGGCGCTATTATCCAGAGACCCCAGTATGACGTCGTCATTGCTCC CAGGTAACCATGTTCTCACCCCCTCTCCCACAGGCCGC gi|374638938|gb|JQ250333.1| Batrachoseps major isolate a voucher MVZ:Herp:249023 myosin light chain 2 gene, partial cds GCCGCCATGGGTAAGTGAACGCGCCGGACCAGACCATTCACTGCCTGCAATGGGGGTGTTTGTGGGTTGG AAGGTGTGCCAAAGATCTAGGGAACCCCAACTCCTCAGGATACGGGTGGGAGCCCTAAAATATGTCCAGC TATAAGGAGATGACCAATGGAAAAGGGGGTATCAGCAGTACTTTACTTGCTACTATAAGAGAATTGCATC CTGGGAATAGCCTCTGAAAGGTCCCATTTTAGCGACACTGGTAGATGGACACTGGCCTTTGGACAGCACC AGTAAGTAGAGCATTGCATCTTGGGATTCCTTTGCTGTTCACATGCCACTGAAAGCTCTCACCATAGCAG ATTCAAAATGCCTACCCGGCAGGTTGCCAGAAAAGCACTGCATCATGGGAGAACCACTTTTAGTGACAAT CCTAAGAGATGGGTGTCTCTCTGCCAGGCGCTATTATCCAAGAGACCCCAGTATGACGTCGTCATTGCTC CCAGGTAACCATGTTCTCACCCCCTCTCCCACAGGCCGC ................................many thanks as I help a struggling Grad Student

    Read the article

  • In search of a network file system with extended caching to speed up file access

    - by Brecht Machiels
    I'm running a small home server that stores my documents. The disks in this server are in a RAID 1 configuration (using Linux md) and it's also periodically being backup up to an external hard drive to make sure I don't lose them. However, I'm always accessing the files from other computers on the home network using an SMB share, and this results in a considerable speed penalty (especially when connected over WLAN). This is quite annoying when editing large files, such as digital camera RAWs, for example. I've been looking for a solution to this problem. It would have to offer some kind of local caching to speed up the file access. The client would preferably not keep a copy of all data on the server, as it consists of a very large collection of photographs, most of which I will not access frequently. Instead, it should only cache the accessed files and sync the changes back in the background. Ideally, it would also do some smart read-ahead (cache the files that are in the same directory as the currently opened file, for examples), but I suppose that's asking a bit much. Synchronization should be automatic (on file change). Conflicting file changes (at the same time on different clients) are unlikely to happen in my use case, but I would prefer if they are handled properly (notification to the user). I've come across the following options, so far: something similar to Dropbox. iFolder seems to be the only thing that comes close, but its reputation (stability) and requirements put me off. A distributed file system such as OpenAFS. I'm not sure this will speed up file access. It is probably overkill for what I need. Maybe NFS or even Samba offer these possibilities. I read a bit about Windows' Offline Files, but its operation seems limited (at least on Windows XP). As this is just for personal use, I'm not willing to spend a lot of money. A free solution would be preferred. Also, the server needs to run on Linux, and I need a client for at least Windows.

    Read the article

  • Unexpected result in C algebra for search algorithm.

    - by Rhys
    Hi, I've implemented this search algorithm for an ordered array of integers. It works fine for the first data set I feed it (500 integers), but fails on longer searches. However, all of the sets work perfectly with the other four search algorithms I've implemented for the assignment. This is the function that returns a seg fault on line 178 (due to an unexpected negative m value). Any help would be greatly appreciated. CODE: 155 /* perform Algortihm 'InterPolationSearch' on the set 156 * and if 'key' is found in the set return it's index 157 * otherwise return -1 */ 158 int 159 interpolation_search(int *set, int len, int key) 160 { 161 int l = 0; 162 int r = len - 1; 163 int m; 164 165 while (set[l] < key && set[r] >= key) 166 { 167 168 printf ("m = l + ((key - set[l]) * (r - l)) / (set[r] - set[l])\n"); 169 170 printf ("m = %d + ((%d - %d) * (%d - %d)) / (%d - %d);\n", l, key, set[l], r, l, set[r], set[l]); 171 m = l + ((key - set[l]) * (r - l)) / (set[r] - set[l]); 172 printf ("m = %d\n", m); 173 174 #ifdef COUNT_COMPARES 175 g_compares++; 176 #endif 177 178 if (set[m] < key) 179 l = m + 1; 180 else if (set[m] > key) 181 r = m - 1; 182 else 183 return m; 184 } 185 186 if (set[l] == key) 187 return l; 188 else 189 return -1; 190 } OUTPUT: m = l + ((key - set[l]) * (r - l)) / (set[r] - set[l]) m = 0 + ((68816 - 0) * (100000 - 0)) / (114836 - 0); m = -14876 Thankyou! Rhys

    Read the article

  • How do I use .htaccess conditional redirects for multiple domains?

    - by John
    I'm managing about 15 or so domains for a particular promotion. Each domain has specific redirects in place, as shown below. Rather than make 15 different .htaccess files that I would later have to manage separately, I'd like to use a single .htaccess file and use a symbolic link into each website's directory. The trouble is that, I can't figure out how to make the rules apply only for a specific domain. Every time I visit www.redirectsite2.com, it sends me to www.targetsite.com/search.html?state=PA&id=75, when it should instead be sending me to www.targetsite.com/search.html?state=NJ&id=68. How exactly do I make multiple RewriteRules apply for a given domain and only that domain? Is this even possible to do within a single .htaccess file? Options +FollowSymlinks # redirectsite1.com RewriteEngine On RewriteBase / # start processing rules for www.redirectsite1.com RewriteCond %{QUERY_STRING} ^$ RewriteCond %{HTTP_HOST} ^www\.redirectsite1\.com$ # rule for organic visit first RewriteRule ^$ http://targetsite.com/search.html?state=PA&id=75 [QSA,R,L] RewriteRule ^PGN$ http://targetsite.com/search.html?state=PA&id=26 [QSA,R,NC,L] RewriteRule ^NS$ http://targetsite.com/search.html?state=PA&id=27 [QSA,R,NC,L] RewriteRule ^INQ$ http://targetsite.com/search.html?state=PA&id=28 [QSA,R,NC,L] RewriteRule ^AA$ http://targetsite.com/search.html?state=PA&id=29 [QSA,R,NC,L] RewriteRule ^PI$ http://targetsite.com/search.html?state=PA&id=30 [QSA,R,NC,L] RewriteRule ^GV$ http://targetsite.com/search.html?state=PA&id=31 [QSA,R,NC,L] # catch-all rule, using the same id as the organic visit RewriteRule ^([a-z]+)?$ http://targetsite.com/search.html?state=PA&id=75 [QSA,R,NC,L] # end processing rules for www.redirectsite1.com # begin rules for redirectsite2.com RewriteCond %{QUERY_STRING} ^$ RewriteCond %{HTTP_HOST} ^www\.redirectsite2\.com$ # rule for organic visit first RewriteRule ^$ http://targetsite.com/search.html?state=NJ&id=68 [QSA,R,L] RewriteRule ^SL$ http://targetsite.com/search.html?state=NJ&id=6 [QSA,R,NC,L] RewriteRule ^APP$ http://targetsite.com/search.html?state=NJ&id=8 [QSA,R,NC,L] # catch-all rule, using the same id as the organic visit RewriteRule ^([a-z]+)?$ http://targetsite.com/search.html?state=NJ&id=68 [QSA,R,NC,L] Thanks for any help you may be able to provide!

    Read the article

  • How do I do an exact whois search?

    - by brianegge
    When I execute the following whois command on my Ubuntu server, I get all sorts of other domains which contain google.com in the name, but clearly aren't owned by google. As this appears to be some sort of spam, I won't paste the output here. I'd like to check for exactly the name I typed in. I thought the following would work, but it doesn't. What is the proper way to do an exact match? whois -Hx google.com

    Read the article

  • search data from FileReader in Java

    - by maya
    hi I'm new in java how to read and search data from file (txt) and then display the data in TextArea or Jtable. for example I have file txt contains data and I need to display this data in textarea after I clicked a button, I have used FileReader , and t1 t2 tp are attributes in the file import java.io.FileReader; import java.io.IOException; String t1,t2,tp; Ffile f1= new Ffile(); FileReader fin = new FileReader("test2.txt"); Scanner src = new Scanner(fin); while (src.hasNext()) { t1 = src.next(); textarea.setText(t1); t2 = src.next(); textarea.setText(t2); tp = src.next(); textarea.setText(tp); f1.insert(t1,t2,tp); } fin.close(); also I have used the inputstream DataInputStream dis = null; String dbRecord = null; try { File f = new File("text2.text"); FileInputStream fis = new FileInputStream(f); BufferedInputStream bis = new BufferedInputStream(fis); dis = new DataInputStream while ( (dbRecord = dis.readLine()) != null) { StringTokenizer st = new StringTokenizer(dbRecord, ":"); String t1 = st.nextToken(); String t2 = st.nextToken(); String tp = st.nextToken(); textarea.setText(textarea.getText()+t1); textarea.setText(textarea.getText()+t2); textarea.setText(textarea.getText()+tp); } } catch (IOException e) { // catch io errors from FileInputStream or readLine() System.out.println("Uh oh, got an IOException error: " + e.getMessage()); } finally { } but both of them don't work ,so please any one help me I want to know how to read data and also search it from file and i need to display the data in textarea . thanks in advance

    Read the article

  • Search XDocument with LINQ with out knowing the Namespace

    - by BarDev
    Is there a way to search a XDocument without knowing the Namespace. I have a process that logs all soap requests and encrypts the sensitive data. I want to find any elements based on name. Something like, give me all elements where the name is CreditCard. I don't care what the namespace is. My problem seems to be with LINQ and requiring a xml namespace. I have other processes that retrieve values from XML, but I know the namespace for these other process. XDocument xDocument = XDocument.Load(@"C:\temp\Packet.xml"); XNamespace xNamespace = "http://CompanyName.AppName.Service.Contracts"; var elements = xDocument.Root.DescendantsAndSelf().Elements().Where(d = d.Name == xNamespace + "CreditCardNumber"); But what I really want, is to have the ability to search xml without knowing about namespaces, something like this: XDocument xDocument = XDocument.Load(@"C:\temp\Packet.xml"); var elements = xDocument.Root.DescendantsAndSelf().Elements().Where(d = d.Name == "CreditCardNumber") But of course this will not work be cause I do no have a namespace. BarDev

    Read the article

  • Search for string allowing for one mismatches in any location of the string, Python

    - by Vincent
    I am working with DNA sequences of length 25 (see examples below). I have a list of 230,000 and need to look for each sequence in the entire genome (toxoplasma gondii parasite) I am not sure how large the genome is but much more that 230,000 sequences. I need to look for each of my sequences of 25 characters example(AGCCTCCCATGATTGAACAGATCAT). The genome is formatted as a continuous string ie (CATGGGAGGCTTGCGGAGCCTGAGGGCGGAGCCTGAGGTGGGAGGCTTGCGGAGTGCGGAGCCTGAGCCTGAGGGCGGAGCCTGAGGTGGGAGGCTT.........) I don't care where or how many times it is found, just yes or no. This is simple I think, str.find(AGCCTCCCATGATTGAACAGATCAT) But I also what to find a close match defined as wrong(mismatched) at any location but only 1 location and record the location in the sequnce. I am not sure how do do this. The only thing I can think of is using a wildcard and performing the search with a wildcard in each position. ie search 25 times. For example AGCCTCCCATGATTGAACAGATCAT AGCCTCCCATGATAGAACAGATCAT close match with a miss-match at position 13 Speed is not a big issue I am only doing it 3 times. i hope but it would be nice it was fast. The are programs that do this find matches and partial matches but I am looking for a type of partial match that is not available with these applications. Here is a similar post for pearl but they are only comparing sequnces not searching a continuous string Related post

    Read the article

  • Creating stored procedure having different WHERE clause on different search criteria without putting

    - by Muhammad Kashif Nadeem
    Is there any alternate way to create stored procedure without putting all query in one long string if criteria of WWHERE clause can be different. Suppose I have Orders table I want to create stored procedure on this table and there are three column on which I wnat to filter records. 1- CustomerId, 2- SupplierId, 3- ProductId. If user only give CustomerId in search criteria then query should be like following SELECT * FROM Orders WHERE Orders.CustomerId = @customerId And if user only give ProductId in search criteria then query should be like following SELECT * FROM Orders WHERE Orders.ProductId = @productId And if user only all three CustomerId, ProductId, and SupplierId is given then all three Ids will be used in WHERE to filter. There is also chance that user don't want to filter record then query should be like following SELCT * FROM Orders Whenever I have to create this kind of procedure I put all this in string and use IF conditions to check if arguments (@customeId or @supplierId etc) has values. I use following method to create procedure DECLARE @query VARCHAR(MAX) DECLARE @queryWhere VARCHAR(MAX) SET @query = @query + 'SELECT * FROM Orders ' IF (@originationNumber IS NOT NULL) BEGIN BEGIN SET @queryWhere =@queryWhere + ' Orders.CustomerId = ' + CONVERT(VARCHAR(100),@customerId) END END IF(@queryWhere <> '') BEGIN SET @query = @query+' WHERE ' + @queryWhere END EXEC (@query) Thanks.

    Read the article

  • Explaining verity index and document search limits

    - by Ahmad
    As present, we currently have a CF8 standard edition server which have some limitations around verity indexing. According to Adobe Verity Server has the following document search limits (limits are for all collections registered to Verity Server): - 10,000 documents for ColdFusion Developer Edition - 125,000 documents for ColdFusion Standard Edition - 250,000 documents for ColdFusion Enterprise Edition We have now reached a stage where the server wide number of documents indexed exceed 125k. However, the largest verity collection consists of about 25k documents(and this is expected to grow). Only one collection is ever searched at a time. In my understanding, this means that I can still search an entire collection with no restrictions. Is this correct? Or does it mean that only documents that were indexed across all collection prior to reaching the limit are actually searchable? We are considering moving to CF9 standard as a solution to this and to use the Solr solution which has no restrictions. The coldfusionjedi highlights some differences between Verity and Solr. However, before we upgrade I am trying to gain a clearer understanding of this before we commit to an upgrade. Can someone provide me a clear explanation as to what this means and how it actually affects verity searching and indexing?

    Read the article

  • Scribe-LinkedIn Search API

    - by Rupeshit
    Hi folks, I want to fetch data from the LinkedIn API for that I am using the Scribe library.All requests are giving me data as expected but when I tried two facet in the url then scribe is not able to get data from LinkedIn API. If I gave this URL : http://api.linkedin.com/v1/people-search?facets=location,network&facet=location,in:0 then it gives me proper result but if I entered this URL: http://api.linkedin.com/v1/people-search?facets=location,network&facet=location,in:0&facet=network,F i.e. URL containing multiple facets then it gives me this output: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <error> <status>401</status> <timestamp>1292487039516</timestamp> <error-code>0</error-code> <message> [unauthorized].OAU:CiEgwWDkA5BFpNrc0RfGyVuSlOh4tig5kOTZ9q97qcXNrFl7zqk- Ts7DqRGaKDCV|94f13544-9844-41eb-9d53-8fe36535bbc3|*01|*01:1292487039:VseHXaJXM2gerxJyn6kHhIka7zw=</message> </error> Any kind of help to solve this will be appreciated.Thanks.

    Read the article

  • Search for index.php and index.html and replace string

    - by Jonas
    Hello. I recently had some sort of Malware on my computer that added to all index.php and index.html ON THE WEBSERVER! the following string(s): echo "<iframe src=\"http://fabujob.com/?click=AD4A4\" width=1 height=1 style=\"visibility:hidden;position:absolute\"></iframe>"; echo "<iframe src=\"http://fabujob.com/?click=AC785\" width=1 height=1 style=\"visibility:hidden;position:absolute\"></iframe>"; So the parameter after "click=" always changes. These two were only examples. Is there a way to do that quick and fast? . . EDIT: It is on my webserver, so no use of find...

    Read the article

  • Content search through source code in finder

    - by gf
    I am using OSX 10.6 and want to have content searches in finder for the source code types i use. This suggests a (10.4 only?) solution, but although i have the developer tools installed i don't have /Library/Spotlight/SourceCode.mdimporter. Is there a different procedure for Snow Leopard or did i miss something?

    Read the article

  • php scandir --> search for files/directories

    - by Peter
    Hi! I searched before I ask, without lucky.. I looking for a simple script for myself, which I can search for files/folders. Found this code snippet in the php manual (I think I need this), but it is not work for me. "Was looking for a simple way to search for a file/directory using a mask. Here is such a function. By default, this function will keep in memory the scandir() result, to avoid scaning multiple time for the same directory." <?php function sdir( $path='.', $mask='*', $nocache=0 ){ static $dir = array(); // cache result in memory if ( !isset($dir[$path]) || $nocache) { $dir[$path] = scandir($path); } foreach ($dir[$path] as $i=>$entry) { if ($entry!='.' && $entry!='..' && fnmatch($mask, $entry) ) { $sdir[] = $entry; } } return ($sdir); } ?> Thank you for any help, Peter

    Read the article

  • Match entities fulfilling filter (strict superset of search)

    - by Jon
    I have an entity (let's say Person) with a set of arbitrary attributes with a known subset of values. I need to search for all of these entities that match all my filter conditions. That is, given a set of Attributes A, I need to find all people that have a set of Attributes that are a superset of A. For example, my table structures look like this: Person: id | name 1 | John Doe 2 | Jane Roe 3 | John Smith Attribute: id | attr_name 1 | Sex 2 | Eye Color ValidValue: id | attr_id | value_name 1 | 1 | Male 2 | 1 | Female 3 | 2 | Blue 4 | 2 | Green 5 | 2 | Brown PersonAttributes id | person_id | attr_id | value_id 1 | 1 | 1 | 1 2 | 1 | 2 | 3 3 | 2 | 1 | 2 4 | 2 | 2 | 4 5 | 3 | 1 | 1 6 | 3 | 2 | 4 In JPA, I have entities built for all of these tables. What I'd like to do is perform a search for all entities matching a given set of attribute-value pairs. For instance, I'd like to be able to find all males (John Doe and John Smith), all people with green eyes (Jane Roe or John Smith), or all females with green eyes (Jane Roe). I see that I can already take advantage of the fact that I only really need to match on value_id, since that's already unique and tied to the attr_id. But where can I go from there? I've been trying to do something like the following, given that the ValidValue is unique in all cases: select distinct p from Person p join p.personAttributes a where a.value IN (:values) Then I've tried putting my set of required values in as "values", but that gives me errors no matter how I try to structure that. I also have to get a little more complicated, as follows, but at this point I'd be happy with solving the first problem cleanly. However, if it's possible, the Attribute table actually has a field for default value: id | attr_name | default_value 1 | Sex | 1 2 | Eye Color | 5 If the value you're searching on happens to be the default value, I want it to return any people that have no explicit value set for that attribute, because in the application logic, that means they inherit the default value. Again, I'm more concerned about the primary question, but if someone who can help with that also has some idea of how to do this one, I'd be extremely grateful.

    Read the article

  • Remove undesired indexed keywords from Sql Server FTS Index

    - by Scott
    Could anyone tell me if SQL Server 2008 has a way to prevent keywords from being indexed that aren't really relevant to the types of searches that will be performed? For example, we have the IFilters for PDF and Word hooked in and our documents are being indexed properly as far as I can tell. These documents, however, have lots of numeric values in them that people won't really be searching for or bring back meaningful results. These are still being indexed and creating lots of entries in the full text catalog. Basically we are trying to optimize our search engine in any way we can and assumed all these unnecessary entries couldn't be helping performance. I want my catalog to consist of alphabetic keywords only. The current iFilters work better than I would be able to write in the time I have but it just has more than I need. This is an example of some of the terms from sys.dm_fts_index_keywords_by_document that I want out: $1,000, $100, $250, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 129, 13.1, 14, 14.12, 145, 15, 16.2, 16.4, 18, 18.1, 18.2, 18.3, 18.4, 18.5 These are some examples from the same management view that I think are desirable for keeping and searching on: above, accordingly, accounts, add, addition, additional, additive Any help would be greatly appreciated!

    Read the article

  • Text box creates gap when floated left in IE7

    - by Sixfoot Studio
    Hi, I've got a left rounded corner box - textbox - right rounded corner box which all make up part of a search box. All's well in FF, Chrome, IE8 but not IE7. I've checked it using the debug tool and and I have tried a number of options, none of which want to work at the moment, so I am hoping someone might know what this issue (bug) might be please? Here's a snippet of my code: <div class="roundBox4"> <img src="../App_Themes/MyChoice2010/Images/reality-box-top.gif" width="228" height="8" /><img src="../App_Themes/MyChoice2010/Images/reality-box-locate.gif" width="228" height="49" /> <asp:ContentPlaceHolder ID="Box4Content" runat="server"> </asp:ContentPlaceHolder> <div class="locateABroker"> <img src="../App_Themes/MyChoice2010/Images/locate-broker-left.gif" class="locateBrokerLeft" height="19" width="3" /><asp:TextBox ID="TextBox1" CssClass="locateBrokerCenter" runat="server"></asp:TextBox><img src="../App_Themes/MyChoice2010/Images/locate-broker-right.gif" height="19" width="3" class="locateBrokerRight" /> <a href="" class="locateBrokerSubmit">Submit</a><img src="../App_Themes/MyChoice2010/Images/box-arrow.gif" class="linkArrow" width="8" height="14" /> </div>

    Read the article

  • search solution to integrate community mailing-lists into a website on shared hosting

    - by Thomas Traub
    The community (300 members), cocktailnetwork, has a website, cocktailnetwork.eu and about ten mailing lists. We want to manage the mailing lists from inside the website (lists and subscribers) and link the list's informations with the member profiles on the site. We are on shared hosting. The community members use the lists to send mails to all other members / groups of members. They can subscribe / unsubscribe from a list. The administrators can in addition create / delete / modify lists. Right now I use ezmlm with QmailAdmin, the lists are completly seperated from the website. I could link the data via remote administration commands, but that's not very satisfactory, does not allow the creation of new lists and it's an deprecated feature of our hosting package, sooner or later we'll need to switch anyway. Do You know of an elegant solution for us ? Any web service with a good, stable API ? Thanks.

    Read the article

  • How to combine a Distance and Keyword SQL query?

    - by Jason
    Hi Folks, I have a tables in my database called "points" and "category". A user will input info into both a location input and a keyword input text box. Then I want to find points in my table where the keyword matches either the "title" field in the points table, or the "category" but are within a certain distance from the user's location. I want to order the results by distance. Here are the 2 queries which btoh work independently: $mysql = "SELECT *, ( 3959 * acos( cos( radians('$search_lat') ) * cos( radians( lat ) ) * cos( radians( longi ) - radians('$search_lng') ) + sin( radians('$search_lat') ) * sin( radians( lat ) ) ) ) AS distance FROM points HAVING distance < '$radius'"; $mysql2 = "SELECT * FROM `points` LEFT JOIN category USING ( category_id ) WHERE (point_title LIKE '%$esc_catsearch%' OR category.title LIKE '%$esc_catsearch%')"; Here is what I tried: $sql_search = sprintf("SELECT *,point_id FROM points WHERE point_title LIKE '%%%s%%' UNION SELECT *, ( 3959 * acos( cos( radians('%s') ) * cos( radians( lat ) ) * cos( radians( longi ) - radians('%s') ) + sin( radians('%s') ) * sin( radians( lat ) ) ) ) AS distance FROM points HAVING distance < '%s' ORDER BY distance LIMIT %d , %d", $esc_catsearch, mysql_real_escape_string($search_lat), mysql_real_escape_string($search_lng), mysql_real_escape_string($search_lat), mysql_real_escape_string($radius), $offset, $rowsPerPage); But it tells me there is no know column "distance". If I remove the "Order By" phrase then it works but I'm still not sure this is giving me the results I want. I also tried the query the other way around with the distance search first but that seems to ignore my keyword. Any thoughts would be much appreciated!

    Read the article

  • Program for remove exact duplicate files while caching search results

    - by John Thomas
    We need a Windows 7 program to remove/check the duplicates but our situation is somewhat different than the standard one for which there are enough programs. We have a fairly large static archive (collection) of photos spread on several disks. Let's call them Disk A..M. We have also some disks (let's call them Disk 1..9) which contain some duplicates which are to be found on disks A..M. We want to add to our collection new disks (N, O, P... aso.) which will contain the photos from disks 1..9 but, of course, we don't want to have any photos two (or more) times. Of course, theoretically, the task can be solved with a regular file duplicate remover but the time needed will be very big. Ideally, AFAIS now, the real solution would be a program which will scan the disks A..M, store the file sizes/hashes of the photos in an indexed database/file(s) and will check the new disks (1..9) against this database. However I have hard time to find such a program (if exists). Other things to note: we consider that the Disks A..M (the collection) doesn't have any duplicates on them the file names might be changed we aren't interested in approximated (fuzzy) comparison which can be found in some photo comparing programs. We hunt for exact duplicate files. we aren't afraid of command line. :-) we need to work on Win7/XP we prefer (of course) to be freeware TIA for any suggestions, John Th.

    Read the article

< Previous Page | 157 158 159 160 161 162 163 164 165 166 167 168  | Next Page >