Search Results

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

Page 156/783 | < Previous Page | 152 153 154 155 156 157 158 159 160 161 162 163  | Next Page >

  • Song search and stream preview API

    - by teepusink
    Hi, Is there an API where I can search for a song, and then stream the preview of the song on my site? Looked into Amazon MP3, but I can't seem to find an API for Amazon MP3. Also looked into last.fm Track.Search api, but seems like the return value doesn't seem to give the actual filename. (i.e mp3 etc), which means I can't stream it on my site. Please let me know if there are other different APIs I can use as well. Thanks, Tee

    Read the article

  • Efficient Search function with Linq to SQL

    - by Bayonian
    Hi, I'm using VB.NET and Linq to SQL. I have a table with thousands of rows and growing. Right now I'm using .Contains() in the Where clause to perform the query. Below is my search function : Public Shared Function DemoSearchFunction(ByVal keyword As String) As DataTable Dim db As New BibleDataClassesDataContext() Dim query = From b In db.khmer_books _ From ch In db.khmer_chapters _ From v In db.testing_khmers _ Where v.t_v.Contains(keyword) And ch.kh_book_id = b.kh_b_id And v.t_chid = ch.kh_ch_id _ Select b.kh_b_id, b.kh_b_title, ch.kh_ch_id, ch.kh_ch_number, v.t_id, v.t_vn, v.t_v Dim dtDataTableOne = New DataTable("dtOne") dtDataTableOne.Columns.Add("bid", GetType(Integer)) dtDataTableOne.Columns.Add("btitle", GetType(String)) dtDataTableOne.Columns.Add("chid", GetType(Integer)) dtDataTableOne.Columns.Add("chn", GetType(Integer)) dtDataTableOne.Columns.Add("vid", GetType(Integer)) dtDataTableOne.Columns.Add("vn", GetType(Integer)) dtDataTableOne.Columns.Add("verse", GetType(String)) For Each r In query dtDataTableOne.Rows.Add(New Object() {r.kh_b_id, r.kh_b_title, r.kh_ch_id, r.kh_ch_number, r.t_id, r.t_vn, r.t_v}) Next Return dtDataTableOne End Function I would like to know other methods for doing efficient search using Linq to SQL. Thanks.

    Read the article

  • How to find or search in jquery grid using Uppercase or Lowercase

    - by kumar
    Hello Friends, I have jquery grid, with User data i am using same type of grid.. http://www.trirand.com/blog/jqgrid/jqgrid37/jqgrid.html when you want to search any user in the grid.. I can do it exactly what data( Uppercase or lowercase letters).. but if the data in the grid is UpperCase( STUDENT) if i am searcing with student.. I am not getting the result.. i need to give exact work like STUDENT.. is there any way that I can search option case sensetive.? is this the thing exactly what I am looking for? jQuery.expr[':'].Contains = function(a, i, m) { return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0; }; I used this code in my document.ready funtion but nothing happening thanks thanks

    Read the article

  • Adding # & search sign to TableIndex in UITableView

    - by sagar
    In iPhone native Phone book - there is a search character at the top & # character at the bottom. I want to add both of that character in my table Index. Currently I have implemented following code. atoz=[[NSMutableArray alloc] init]; for(int i=0;i<26;i++){ [atoz addObject:[NSString stringWithFormat:@"%c",i+65]]; } - (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView{ return atoz; } How to have # character & search symbol in my UITableView? Thanks in advance for sharing your knowledge. Sagar

    Read the article

  • Fast search in XMl files in .NET (or How to index XML files)

    - by codymanix
    I have to implement a search feature which is able to quickly perform arbitrary complex queries to XML-data. If the user makes a query, all XML files must be searched to find possible matches. The users will have lots of XML-Files (a few 10000 or more) which are typically a few kilobytes in size. All the XML-files have almost the same structure. I already benchmarked XPath, it is too slow for my needs. How can it be done most efficiently? Is is possible to create indexes for the contents of the XML files (preserving content semantics, not just plain fulltext search)? Will it be useful to put the XML data into an (embedded) SQL database and do the queries with SQL? What other possibilities do I have?

    Read the article

  • Search over multiple fields

    - by schneck
    Hi there, I think I don't unterstand django-haystack properly: I have a data model containing several fields, and I would to have two of them searched: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True, default=None) twitter_account = models.CharField(max_length=50, blank=False) My search index settings: class UserProfileIndex(SearchIndex): text = CharField(document=True, model_attr='user') twitter_account = CharField(model_attr='twitter_account') def get_queryset(self): """Used when the entire index for model is updated.""" return UserProfile.objects.all() But when I perform a search, only the field "username" is searched; "twitter_account" is ignored. When I select the Searchresults via dbshell, the objects contain the correct values for "user" and "twitter_account", but the result page shows a "no results": {% if query %} <h3>Results</h3> {% for result in page.object_list %} <p> <a href="{{ result.object.get_absolute_url }}">{{ result.object.id }}</a> </p> {% empty %} <p>No results</p> {% endfor %} {% endif %} Any ideas?

    Read the article

  • adldap class, need to search for user in two groups

    - by Brad
    http://adldap.sourceforge.net/wiki/doku.php?id=api_user_functions#user_ingroup_username_group_recursive_null I am using the adLDAP class above to authenticate users against our ldap server. I was wondering how I could check multiple groups to see if the user belongs to either, if they belong to either. I don't know if user_ingroup($username,$group,$recursive=NULL); can handle search two different groups for the user, need help coding it to search for the user in two different groups, and as soon as it finds it in one of those, break the operation and set a variable to true. Any help is appreciated.

    Read the article

  • Bing search API using Jsonp not working, invalid label

    - by Blankman
    Struggling with Bing's json request (bing search, not map), I am getting an error back that says 'Invalid Label' My query url is: var bingurl="http://api.search.live.net/json.aspx?Appid=##APIKEY##&query=Honda&sources=web"; $.ajax({ type: "GET", url: bingurl, data: "{}", contentType: "application/json; charset=utf-8", dataType: "jsonp", success: function(data) { $callBack(data); }, error: function(msg) { alert("error" + msg); } }); Firebug reports 'invalid label' and then dumps the json response. No idea what is wrong? help appreciated.

    Read the article

  • DRYing Search Logic in Rails

    - by Kevin Sylvestre
    I am using search logic to filter results on company listing page. The user is able to specify any number of parameters using a variety of named URLs. For example: /location/mexico /sector/technology /sector/financial/location/argentina Results in the following respectively: params[:location] == 'mexico' params[:sector] == 'technology' params[:sector] == 'financial' and params[:location] == 'argentina' I am now trying to cleanup or 'DRY' my model code. Currently I have: def self.search(params) ... if params[:location] results = results.location_permalink_equals params[:location] if results results = Company.location_permalink_equals params[:location] unless results end if params[:sector] results = results.location_permalink_equals params[:sector] if results results = Company.location_permalink_equals params[:sector] unless results end ... end I don't like repeating the searchs. Any suggestions? Thanks.

    Read the article

  • google search as an rss feed

    - by Jonathan
    Hi guys, Is there a way to have treat google serach results as an rss feed? For example say I worked for stackoverflow and wanted to montior how if the results from the following search url: http://www.google.com/search?hl=en&q=stackoverflow changes from day today. It would be cool if I could append &output=rss to the url and get back a feed like with google news. But that does not seem to be supported. Anyone have ideas? (Note I am programing with Ruby and Rails, if that matters) Thanks! Jonathan

    Read the article

  • Grouping search results with thinking_sphinx plugin for rails

    - by Shagymoe
    I can use the following to group results, but it only returns one result per group. @results = Model.search params[:search_query], :group_by => 'created_at', :group_function => :day, :page => params[:page], :per_page => 50 So, if I display the results by day, I only get one result per day. <% @results.each_with_groupby do |result, group| %> <div class="group"><%= group %></div> <ul class="result"> <li><%= result.name %></li> </ul> <% end %> Do I have to parse the @results array and group them by date manually or am I missing something? Here is the line from the sphinx docs: http://sphinxsearch.com/docs/current.html#clustering "The final search result set then contains one best match per group."

    Read the article

  • shortest path search in a map represented as 2d shapes

    - by joe_shmoe
    Hi, I have a small library of a few shortest path search algorithms. They were developed for simple undirected graphs (the normal representation - vertices and edges). Now I'd like to somehow apply them on a bit different scenario - where the maps are represented as 2-dimensional shapes, connected by shared edges (edges of the polygons, that is). In this scenario, the search can start/end either at a map object or some point (x,y). What would be the best approach? Try to apply the algorithms onto shapes? or try to extract a 'normal' graph out of the shapes (I have preprocessing time available)? Any advice would be much appreciated, as I'm really not sure which way to go, and I don't have enough time (and skill) to explore many options... Thanks a lot

    Read the article

  • live search with Jquery

    - by user272899
    Hello! I am trying to implement a live search on my site. I am using a script somebody has already created. http://www.reynoldsftw.com/2009/03/live-mysql-database-search-with-jquery/ I have got the Jquery, css, html working correctly but am having troubles with the php. I need to change it to contain my database information but everytime I do I recieve an error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\search.php on line 33 These are the details of my database: database name: development table name: links Columns: id, sitename, siteurl, description, category This is the php script <?php $dbhost = "localhost"; $dbuser = "root"; $dbpass = "password"; $dbname = "links"; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); mysql_select_db($dbname); if(isset($_GET['query'])) { $query = $_GET['query']; } else { $query = ""; } if(isset($_GET['type'])) { $type = $_GET['type']; } else { $query = "count"; } if($type == "count") { $sql = mysql_query("SELECT count(url_id) FROM urls WHERE MATCH(url_url, url_title, url_desc) AGAINST('$query' IN BOOLEAN MODE)"); $total = mysql_fetch_array($sql); $num = $total[0]; echo $num; } if($type == "results") { $sql = mysql_query("SELECT url_url, url_title, url_desc FROM urls WHERE MATCH(url_url, url_title, url_desc) AGAINST('$query' IN BOOLEAN MODE)"); while($array = mysql_fetch_array($sql)) { $url_url = $array['url_url']; $url_title = $array['url_title']; $url_desc = $array['url_desc']; echo "<div class=\"url-holder\"><a href=\"" . $url_url . "\" class=\"url-title\" target=\"_blank\">" . $url_title . "</a> <div class=\"url-desc\">" . $url_desc . "</div></div>"; } } mysql_close($conn); ?> Can anybody help me input this database info correctly? I have tried many times but keep getting an error. Thanks in advance.

    Read the article

  • YASR - Yet another search and replace question

    - by petronius31
    Environment: asp.net c# openxml Ok, so I've been reading a ton of snippets and trying to recreate the wheel, but I'm hoping that somone can help me get to my desination faster. I have multiple documents that I need to merge together... check... I'm able to do that with openxml sdk. Birds are singing, sun is shining so far. Now that I have the document the way I want it, I need to search and replace text and/or content controls. I've tried using my own text - {replace this} but when I look at the xml (rename docx to zip and view the file), the { is nowhere near the text. So I either need to know how to protect that within the doucment so they don't diverge or I need to find another way to search and replace. I'm able to search/replace if it is an xml file, but then I'm back to not being able to combine the doucments easily. Code below... and as I mentioned... document merge works fine... just need to replace stuff. protected void exeProcessTheDoc(object sender, EventArgs e) { string doc1 = Server.MapPath("~/Templates/doc1.docx"); string doc2 = Server.MapPath("~/Templates/doc2.docx"); string final_doc = Server.MapPath("~/Templates/extFinal.docx"); File.Delete(final_doc); File.Copy(doc1, final_doc); using (WordprocessingDocument myDoc = WordprocessingDocument.Open(final_doc, true)) { string altChunkId = "AltChunkId2"; MainDocumentPart mainPart = myDoc.MainDocumentPart; AlternativeFormatImportPart chunk = mainPart.AddAlternativeFormatImportPart( AlternativeFormatImportPartType.WordprocessingML, altChunkId); using (FileStream fileStream = File.Open(doc2, FileMode.Open)) chunk.FeedData(fileStream); AltChunk altChunk = new AltChunk(); altChunk.Id = altChunkId; mainPart.Document.Body.InsertAfter(altChunk, mainPart.Document.Body.Elements<Paragraph>().Last()); mainPart.Document.Save(); } exeSearchReplace(final_doc); } protected void exeSearchReplace(string document) { using (WordprocessingDocument wordDoc = WordprocessingDocument.Open(document, true)) { string docText = null; using (StreamReader sr = new StreamReader(wordDoc.MainDocumentPart. GetStream())) { docText = sr.ReadToEnd(); } Regex regexText = new Regex("acvtClientName"); docText = regexText.Replace(docText, "Hi Everyone!"); using (StreamWriter sw = new StreamWriter(wordDoc.MainDocumentPart.GetStream(FileMode.Create))) { sw.Write(docText); } } } } }

    Read the article

  • Windows Sharepoint Service (WSS) 3.0 search Issue

    - by dewacorp.alliances
    Based on this http://servergrrl.blogspot.com/2008/02/how-to-use-wss-30-to-search-more-than.html blog, I've created a domain account for testing and sets the permission at the side level as well as Document Library to allow specific user (DOMAIN/TestUser1) allow accessing this folder. Now, it's interesting that the user can see the document by drilling though BUT it won't be able to search and the document couldn't find it. But if I tested with the site owner (both primary and secondary), it works nicely. What did I do wrong then? It must be related on permission but I cound't work out what it is. BTW ... I am using WSS not MOSS 2007. Thanks

    Read the article

  • KRL and Yahoo Local Search

    - by Randall Bohn
    I'm trying to use Yahoo Local Search in a Kynetx Application. ruleset avogadro { meta { name "yahoo-local-ruleset" description "use results from Yahoo local search" author "randall bohn" key yahoo_local "get-your-own-key" } dispatch { domain "example.com"} global { datasource local:XML <- "http://local.yahooapis.com/LocalSearchService/V3/localsearch"; } rule add_list { select when pageview ".*" setting () pre { ds = datasource:local("?appid=#{keys:yahoo_local()}&query=pizza&zip=#{zip}&results=5"); rs = ds.pick("$..Result"); } append("body","<ul id='my_list'></ul>"); always { set ent:pizza rs; } } rule add_results { select when pageview ".*" setting () foreach ent:pizza setting pizza pre { title = pizza.pick("$..Title"); } append("#my_list", "<li>#{title}</li>"); } } The list I wind up with is . [object Object] and 'title' has {'$t' => 'Pizza Shop 1'} I can't figure out how to get just the title.

    Read the article

  • Lucene.Net memory consumption and slow search when too many clauses used

    - by Umer
    I have a DB having text file attributes and text file primary key IDs and indexed around 1 million text files along with their IDs (primary keys in DB). Now, I am searching at two levels. First is straight forward DB search, where i get primary keys as result (roughly 2 or 3 million IDs) Then i make a Boolean query for instance as following +Text:"test*" +(pkID:1 pkID:4 pkID:100 pkID:115 pkID:1041 .... ) and search it in my Index file. The problem is that such query (having 2 million clauses) takes toooooo much time to give result and consumes reallly too much memory.... Is there any optimization solution for this problem ?

    Read the article

  • How to save search, choose a recent search and then populate the form using jQuery and/or asp.net

    - by user187870
    I want to do something similar to what priceline does. It saves the recent searches in a dropdown menu. When you pick one from the recent search. The form will be populated accordingly. (See screen shot http://yfrog.com/5fscreenshot20100501at105p) This is what I am thinking. (1) Save the searches into an array in a cookie (2), when a recent search item is chosen, retrive the corresponding array element from the cookie and then populate the form. What do you think is the best way to implement this? I especially want to know how to save the form entries into the cookie and how to populate the form.

    Read the article

  • Ldap search query with parameters

    - by djerry
    Hey guys, I'm using a ldap server to store phonerecords. I want to select a record with a specific telnumber. So this is what I'm doing: LdapSearchResults lsc = _conn.Search(dnForPhonebook, 1, "(&(objectClass=*)(uid=" + id + "))", null, false); I'm using novell library for ldap commands. The options i need to give in for the Search command are the dn to the node "phonebook" (string), scope (int), filter (string), attrrs (string[]) and typesOnly (bool). As you can see, for the filter, i'm pasting the parameter as string in de stringfilter. I was wondering, does ldap have the same way of work as mysql or sql server, which can work with paramaters? Thanks in advance.

    Read the article

  • Performance - User defined query / filter to search data

    - by Cagatay Kalan
    What is the best way to design a system where users can create their own criterias to search data ? By "design" i mean, data storage, data access layer and search structure. We will actually refactor an existing application which is written in C# and ASP .NET and we don't want to change the infrastructure. Our main issue is performance and we use MSSQL and DevExpress to build queries. Some queries run in 4-5 minutes and all the columns included in the queries have indexes. When i check queries, i see that DevExpress builds too many "exists" clauses and i'm not happy with that because i have doubts that some of these queries skip some indexes. What may be the alternatives to DevExpress? NHibernate or Entity Framework? Can we build dynamic criteria system and store these to database in both of them ? And also do we need any alternative storage like a lucene index or OLAP database?

    Read the article

< Previous Page | 152 153 154 155 156 157 158 159 160 161 162 163  | Next Page >