Search Results

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

Page 55/783 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • Google search box

    - by user343282
    I am working on a google box, something like this, http://mytwentyfive.com/blog/wp-content/uploads/byme/Google%20Search%20Appliances.jpg I am pointing the crawler to a folder where there are html files. before the crawler was crawling the files and indexing them but right now it finds the pattern or the folder but not following any html files within the folder. I have tried everything I could and know but, can't think of anything else. Can someone help? thanks

    Read the article

  • XPath ordered priority attribute search

    - by user94000
    I want to write an XPath that can return some link elements on an HTML DOM. The syntax is wrong, but here is the gist of what I want: //web:link[@text='Login' THEN_TRY @href='login.php' THEN_TRY @index=0] THEN_TRY is a made-up operator, because I can't find what operator(s) to use. If many links exist on the page for the given set of [attribute=name] pairs, the link which matches the most left-most attribute(s) should be returned instead of any others. For example, consider a case where the above example XPath finds 3 links that match any of the given attributes: link A: text='Sign In', href='Login.php', index=0 link B: text='Login', href='Signin.php', index=15 link C: text='Login', href='Login.php', index=22 Link C ranks as the best match because it matches the First and Second attributes. Link B ranks second because it only matches the First attribute. Link A ranks last because it does not match the First attribute; it only matches the Second and Third attributes. The XPath should return the best match, Link C. If more than one link were tied for "best match", the XPath should return the first best link that it found on the page.

    Read the article

  • Delphi Search files and directories fastest alghorithm

    - by radu-barbu
    Hi, I'm using Delphi7 and i need a solution to a big problem.Can someone provide me a faster way for searching through files and folders than using findnext and findfirst? because i also process the data for each file/folder (creation date/author/size/etc) and it takes a lot of time...I've searched a lot under WinApi but probably I haven't see the best function in order to accomplish this. All the examples which I've found made in Delphi are using findfirst and findnext... Also, I don't want to buy components or use some free ones... Thanks in advance!

    Read the article

  • Radial Grid Search Algorithm

    - by grey
    I'm sure there's a clean way to do this, but I'm probably not using the right keywords for find it. So let's say I have a grid. Starting from a position on the grid, return all of the grid coordinates that fall within a given distance. So I call something like: getCoordinates( currentPosition, distance ) And for each coordinate, starting from the initial position, add all cardinal directions, and then add the spaces around those and so forth until the distance is reached. I imagine that on a grid this would look like a diamond.

    Read the article

  • Breadth first search all paths

    - by Amndeep7
    First of all, thank you for looking at this question. For a school assignment we're supposed to create a BFS algorithm and use it to do various things. One of these things is that we're supposed to find all of the paths between the root and the goal nodes of a graph. I have no idea how to do this as I can't find a way to keep track of all of the alternate routes without also including copies/cycles. Here is my BFS code: def makePath(predecessors, last): return makePath(predecessors, predecessors[last]) + [last] if last else [] def BFS1b(node, goal): Q = [node] predecessor = {node:None} while Q: current = Q.pop(0) if current[0] == goal: return makePath(predecessor, goal) for subnode in graph[current[0]][2:]: if subnode[0] not in predecessor: predecessor[subnode[0]] = current[0] Q.append(subnode[0]) A conceptual push in the right direction would be greatly appreciated. tl;dr How do I use BFS to find all of the paths between two nodes?

    Read the article

  • Exploring search options for PHP

    - by Joshua
    I have innoDB table using numerous foreign keys, but we just want to look up some basic info out of it. I've done some research but still lost. 1) How can I tell if my host has Sphinx installed already? I don't see it as an option for table storage method (i.e. innodb, myisam). 2) Zend_Search_Lucene, responsive enough for AJAX functionality of millions of records? 3) Mirror my innoDB with a myisam? Make every innodb transaction end with a write to the myisam, then use 1:1 lookups? How would I do this automagically? This should make MyISAM ACID-compliant and free(er) from corruption no? 4) PostgreSQL fulltext queries don't even look like SQL to me wtf, I don't have time to learn a new SQL syntax I need noob options 5) ???????????????????? This is high volume site on a decently-equipped VPS Thanks very much for any ideas.

    Read the article

  • How to index and search .doc files

    - by Jared
    I have an application that needs to have .doc files uploaded to it. These documents should then be index and the whole collection of documents should be searchable. This will run on a Windows Server, without Word installed, using IIS and SqlServer, but I'd rather not be tied to SqlServer's full text indexing. I was thinking of using Lucene.Net for the indexing part and was wondering what the best way to get the text out of the .doc files would be. I could probably extract the text by reading in the whole stream and then using a regEx to pull out any regular characters, but that seems hefty and prone to error. I saw an article on using iFilters that sounds promising, but I thought I'd put this out there since it's not something I'm familiar with. P.S. If it matters, these .doc files will have mail-merge fields in them and there's no other current alternative for the .doc format.

    Read the article

  • Select distinct... in fulltext search

    - by lam3r4370
    <?php session_start(); $user =$_GET['user']; $conn = mysql_connect("localhost","...","..."); mysql_select_db("..."); $sql= "SELECT filter FROM userfilter WHERE user='$user'"; $mksql = mysql_query($sql); while($row =mysql_fetch_assoc($mksql)) { $filter=$row['filter']; $sql2 = "SELECT DISTINCT * FROM rss WHERE MATCH(content,title) AGAINST ('$filter')"; $mksql2 = mysql_query($sql2) or die(mysql_error()); while($rows=mysql_fetch_assoc($mksql2)) { echo ..... } ?> If I have two rows content that contains the $filter ,it outputs me that content but it's repeating. For example: title|content asd |This is a sample content ,number one das |This is a sample content ,number two .... And if my keywords are "sample" and "number" ,it outputs me twice the title and the content.How to prevent that?

    Read the article

  • C++ file input/output search

    - by Brian J
    Hi I took the following code from a program I'm writing to check a user generated string against a dictionary as well as other validation. My problem is that although my dictionary file is referenced correctly,the program gives the default "no dictionary found".I can't see clearly what I'm doing in error here,if anyone has any tips or pointers it would be appreciated, Thanks. //variables for checkWordInFile #define gC_FOUND 99 #define gC_NOT_FOUND -99 // static bool certifyThat(bool condition, const char* error) { if(!condition) printf("%s", error); return !condition; } //method to validate a user generated password following password guidelines. void validatePass() { FILE *fptr; char password[MAX+1]; int iChar,iUpper,iLower,iSymbol,iNumber,iTotal,iResult,iCount; //shows user password guidelines printf("\n\n\t\tPassword rules: "); printf("\n\n\t\t 1. Passwords must be at least 9 characters long and less than 15 characters. "); printf("\n\n\t\t 2. Passwords must have at least 2 numbers in them."); printf("\n\n\t\t 3. Passwords must have at least 2 uppercase letters and 2 lowercase letters in them."); printf("\n\n\t\t 4. Passwords must have at least 1 symbol in them (eg ?, $, £, %)."); printf("\n\n\t\t 5. Passwords may not have small, common words in them eg hat, pow or ate."); //gets user password input get_user_password: printf("\n\n\t\tEnter your password following password rules: "); scanf("%s", &password); iChar = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iUpper = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iLower =countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iSymbol =countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iNumber = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); iTotal = countLetters(password,&iUpper,&iLower,&iSymbol,&iNumber,&iTotal); if(certifyThat(iUpper >= 2, "Not enough uppercase letters!!!\n") || certifyThat(iLower >= 2, "Not enough lowercase letters!!!\n") || certifyThat(iSymbol >= 1, "Not enough symbols!!!\n") || certifyThat(iNumber >= 2, "Not enough numbers!!!\n") || certifyThat(iTotal >= 9, "Not enough characters!!!\n") || certifyThat(iTotal <= 15, "Too many characters!!!\n")) goto get_user_password; iResult = checkWordInFile("dictionary.txt", password); if(certifyThat(iResult != gC_FOUND, "Password contains small common 3 letter word/s.")) goto get_user_password; iResult = checkWordInFile("passHistory.txt",password); if(certifyThat(iResult != gC_FOUND, "Password contains previously used password.")) goto get_user_password; printf("\n\n\n Your new password is verified "); printf(password); //writing password to passHistroy file. fptr = fopen("passHistory.txt", "w"); // create or open the file for( iCount = 0; iCount < 8; iCount++) { fprintf(fptr, "%s\n", password[iCount]); } fclose(fptr); printf("\n\n\n"); system("pause"); }//end validatePass method int checkWordInFile(char * fileName,char * theWord){ FILE * fptr; char fileString[MAX + 1]; int iFound = -99; //open the file fptr = fopen(fileName, "r"); if (fptr == NULL) { printf("\nNo dictionary file\n"); printf("\n\n\n"); system("pause"); return (0); // just exit the program } /* read the contents of the file */ while( fgets(fileString, MAX, fptr) ) { if( 0 == strcmp(theWord, fileString) ) { iFound = -99; } } fclose(fptr); return(0); }//end of checkwORDiNFile

    Read the article

  • Selectively search and replace certain lines using a regular expression

    - by eneveu
    I have a file containing a lot of SQL statements, such as: CREATE TABLE "USER" ( "ID" INTEGER PRIMARY KEY, "NAME" CHARACTER VARYING(50) NOT NULL, "AGE" INTEGER NOT NULL ); COPY "USER" (id, name, age) FROM stdin; 1 Skywalker 19 2 Kenobi 57 I want the column names in the COPY statements to be uppercased and quoted: COPY "USER" ("ID", "NAME", "AGE") FROM stdin; Using sed, I found the following regexp: sed -r 's/([( ])(\w+)([,)])/\1"\U\2\E"\3/g' It does replace the column names, but it is not selective enough, and replaces other words in the file: ~/test]$sed -r 's/([( ])(\w+)([,)])/\1"\U\2\E"\3/g' star_wars_example CREATE TABLE "USER" ( "ID" INTEGER PRIMARY "KEY", "NAME" CHARACTER VARYING("50")NOT "NULL", "AGE" INTEGER NOT NULL ); COPY "USER" ("ID", "NAME", "AGE") FROM stdin; 1 Skywalker 19 2 Kenobi 57 To avoid this problem, I want sed to only apply my regexp to the lines starting with COPY and ending with FROM stdin;. I have looked into lookahead / lookbehind, but they are not supported in sed. They seem to be supported in super-sed, but I am currently using Cygwin (Windows is mandatory here...) and it does not seem available in the package list. Is there a way to force sed to only consider specific line? I've considered piping my file through grep before applying sed, but other lines will then disappear from the output. Am I missing something obvious? It would be great if the answer was easily applicable on a default Cygwin install. I guess I could try installing super-sed on cygwin, but I'd like to know if there are more obvious ideas

    Read the article

  • how to do reverse fulltext search in MySQL?

    - by Shore
    By default it's like this: select * from main_table where match(col1,col2) against('search_item'); but what I want to fetch is the reverse, say,I've restored all the search_item(1000 records,for example), and I want to see which of them matches a specified row in main_table. Is that doable?

    Read the article

  • Help to learn Image Search algorithm

    - by R Manu
    I am a beginner in image processing. I want to write an application in C++ or in C# for Searching an image in a list of images Searching for a particular feature (for e.g. face) in a list of images. Can anybody suggest where should I start from? What all should I learn before doing this? Where can I find the correct information regarding this?

    Read the article

  • Hibernate-Search: Search records from the last x hours, x days, x months, x years?

    - by Aaron
    @Entity @Table(name = "USERS") public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @Column(name = "USERNAME", nullable = false, length = 20) private String userName; @Column(name = "PASSWORD", nullable = false, length = 10) private String password; @Column(name = "Date", nullable = false ) private Date date; } How can I select the records which have the date between [now | now-x hours] [now | now-x days] [now | now-x months] [now | now-x years]

    Read the article

  • Sphinx search: failed to unpack mysqlcompress column

    - by Un_tangable
    I have compiled sphinx 0.9.9 for debian x64. When I try to index using unpack_mysqlcompress, I get this error: "WARNING: failed to unpack column 'page_text', error=-5" The 'page_text' field is around 5Kb, and unpack_mysqlcompress_maxsize is set to 64M, yet the zlib manual says error -5 indicates Z_BUF_ERROR. Also if mysql does the decompression using UNCOMPRESS(), it works fine. Any ideas why sphinx is generating this error?

    Read the article

  • filtering search results with php

    - by fl3x7
    Hello, Cant really find any useful information on this through Google so hope someone here with some knowledge can help. I have a set of results which are pulled from a multi dimensional array. Currently the array key is the price of a product whilst the item contains another array which contains all the product details. key=>Item(name=>test, foo=>bar) So currently when I list the items I just order by the key, smallest first and it lists the products smallest price first. However I want to build on this so that when a user sees the results they can choose other ordering options like list all products by a name, certain manufacturer, colour, x ,y ,z etc etc from a drop down box(or something similar) This is where I need some guidance. Im just not sure how to go about it or best practise or anything. The only way I can think of is to order all the items by the nested array eg by the name, manufacturer etc. but how do I do that in PHP? Hope you understand what im trying to achieve(if not just ask). Any help on this with ideas, approaches or examples would be great. Thanks for reading p.s Im using PHP5

    Read the article

  • Search a string for certain numbers

    - by Hassan Gulzar
    Hello! I'm trying to come up with a lightning fast solution to find portions in a string. Here is a Sample string: "PostLoad successful! You transferred amount of 17.00 Rs to 03334224222. Now use PostLoad by dialing 123. PostLoad on SMS will end on 01-03-2011." Objective: Need to retrieve the bold values: Amount and Cell Number. The string contents change slightly but the cell number will always be a 11 digit. The amount is always with two decimal precision. Any suggestions using C# and RegEx?

    Read the article

  • PHP MYSQL SIMPLE SEARCH ISSUE

    - by Kunal
    Hi I have a table with the following structure: id int(11), name varchar(250) I have lots of records in the table but when I am trying to find a particluar record which has the following value on the name field: Lorem ipsum d\'olor sit amet The query is simply returning a blank recordset. I am not being able to figure out this weird behaviour, when my query is as simple as follows: SELECT * FROM slot_games WHERE name='Lorem ipsum d\'olor sit amet' Would appreciate your help please! Thanks in advance.

    Read the article

  • What&rsquo;s new in Subtext 2.5: full-text search, related posts and more

    In Subtext 2.5 we changed the internal search provider from the like %term% SQL based one to a more mature and powerful one powered by Lucene.net. I wrote about how Lucene.net is implemented inside Subtext, but it didnt show the benefits for the users. In this post Im explaining the visible features of the full-text search. There are 4 places where the new Lucene.net based search engine has its effect: Full-text search Related links More Results for the search OpenSearch provider...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Index a set of files to search their text quickly?

    - by Ricket
    I have a unique need: I am frequently searching a large set of text files for a keyword. Right now, I open up Notepad++ and use the "Find in files" feature. It works just fine, but with the amount of files, each search takes several minutes to complete. Is there a good program more suited for this purpose, perhaps that indexes a set of files and then lets you search the set repeatedly and very quickly? It would greatly speed up my workflow.

    Read the article

  • Adjusting the Score on Oracle Text search results

    - by Kyle Hatlestad
    When you sort the results of a search by Score using OracleTextSearch as the search engine in WebCenter Content, the results coming back are based on the relevancy on the document.  In theory, the more relevant the search term is to the document, the higher ranked Score it should receive.  But in practice, the relevancy score can seem somewhat of a mystery.  It's not entirely clear how it ranks the importance of some documents over others based on the search term.  And often times, once a word appears a certain number of times within a document, the Score simply maxes out at 100 and the top results can be difficult to discern from one another.  Take for example the search for 'vacation' on this set of documents:  [Read More]

    Read the article

  • How do I search only my twits in twitter?

    - by terrani
    Hi, I am new to twitter. Rather than using twitter to broadcast my text, I would like to organize my ideas using hashtags. One thing I can't figure out is that I can't search my twits ONLY. How do I limit search result so I can only see my twits? I tried from:myid #test, it does not work.

    Read the article

  • Default Search provider in Internet Explorer 8 Via GP?

    - by Bump
    Does anyone know how to change the default search provider in IE8 Via Group Policy? IE7 seemed to work okay but once I rolled out the IE8 browser update via WSUS, it defaults back to Bing search on all clients which is done Via group policy. I have found some people making custom adm templates to change this behavior on Google but I cannot get a strait forward answer.

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >