FAQ Database Discussion Community


Search for more than one element in a list in Cassandra

search,cassandra,cql3
I'm learning how the data model works in Cassandra, what things you can do and what not, etc. I've seen you can have collections and I'm wondering if you can search for the elements inside the collection. I've seen that you can look for one element with contains, but if...

Copy cell J1 from multiple files and paste into column of master file

excel,vba,excel-vba,search,copy
I currently have this code which will take files from a folder, open one each one, print its name into the first column of my "Master file" close it and loop through the entire folder that way. In each file that is opened, there is information in cell J1 that...

sum of rows maximum and minimum is not correct. whats the issue?

c++,arrays,search
I have a C program. I calculated the sum of each row of array and then compared them to find which row is minimum sum and which is maximum sum. But my program sometimes give correct output but sometime wrong. Where is the issue? please help me. Thanks #include <iostream>...

Android SQLite Like query

sqlite,search,like
The following Query works Fine in my app db.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,KEY_FAULTREF,KEY_WORKNUM,KEY_ORIGNUM,KEY_REPBY,KEY_REPDATTIM,KEY_DESCRIPTION}, KEY_FAULTREF + "='" + strname+ "'", null,null, null, null, null); strname is what I am searching for but it will only bring back records that EXACTLY match this I want to modify so it brings back everything...

C - Print Specific Line From Text File

c,file,search
I'm new to programming so please be nice. Currently I'm trying to write a program that opens a text file, reads in two words, searches through the text file counts how many times the two words appear, and then finally prints the first line that the first word appeared on....

Assigning value to Search Bar Delegate - Swift

ios,swift,uitableview,search
So I was following this link for implementing a Search Bar in my Table View. I had to make a few changes because my cells contained Objects with different values and data types and so I had to adapt the Search function accordingly. I'm pretty sure I have most of...

Elasticsearch Facet List doesn't Match Results

ruby-on-rails,ruby,search,elasticsearch,elastic
Problem When I filter by a particular facet, that specific field's facets are correctly filtered in the result but the other facet fields remain the same. Best way to explain this is with the query and the response. Query { query: { match_all: {} }, filter: { and: [{ term:...

Speech recognition result handler always runs a single action

c#,variables,search,if-statement,speech-recognition
I've been working on an AI in C# for a while now and I finally figured out how to add part of the speech as a variable. However the problem I'm having now is it's running everything I say and searching google. I only want it to start the search...

Swift ios relational picker views and apple dev guidelines

ios,xcode,swift,uitableview,search
Right now I have a picker view that shows up when you press a label, and after you have selected anything from the picker view and hit done it will hide and the label will change to the value you selected. But I want to implement another picker view, and...

How to find number of elements greater/smaller than an element in an array?

c,arrays,algorithm,performance,search
I want to find the fastest way to find the number of elements which are smaller/greater than each element in an array. For example : Array is [5, 6, 8, 2, 4]. Considering first element, no of elements smaller than it is 2. The best I could make myself was...

unindexed field in appengine search document?

google-app-engine,search
In a appengine search document, can I set a field to not be indexed? I looked at the documentation and I think this is not possible, but I don't find anywhere that concretely says so, so trying to make sure. I wonder why this is... perhaps they are trying to...

Tree searching algorithm

string,algorithm,search,graph,tree
I'm looking for suggestions on strategies for searching a tree-like data structure. The structure is a tree where each element is a string, each branch is a period, and a path is the concatenation of several strings and periods starting at the root. The root and edges from the root...

Highlight text that matches a search string in Qt5

c++,qt,search
First let me explain what I'm trying to achieve: In your browser, hit Ctrl + f and type "q". The result of that operation is what I'm trying to achieve. It seems like this should be a solved problem, but despite the many hours I've spent researching, reading documentation, and...

VBA through Internet Explorer, Find String of Text and Use It

vba,excel-vba,search
Within a page that I am able to open with VBA; I want to click on the first link in a table, then copy some data, close that window, click on the second link of the table, etc. <a title="Open" onmouseover="javascript:window.status='Click here!';return true;" onmouseout="javascript:window.status='';return true;" onclick="OpenWindow(this.href, 'Profile_5193622', 760, 565); return...

Using two different templates for search results - Haystack

templates,search,django-haystack
I am totally confused how I can use two different template files for the search results. Suppose I have two different pages for searching and I want to have different decorations for each page search results. This search bar is in one page: <div class="main-header_search"> <form method="get" action="/search1" id="header_find_form" class="main-search...

Elasticsearch advanced search

ruby-on-rails,ruby,search
I find Elasticsearch gem and want to use it. For example I have: Method in app/controller/search_controller.rb: def search if params[:q].nil? @articles = [] else @articles = Article.search params[:q] end end View at app/views/search/search.html.erb: <h1>Articles Search</h1> <%= form_for search_path, method: :get do |f| %> <p> <%= f.label "Search for" %> <%=...

How to efficiently select neighbour in 1-dimensional and n-dimensional space for Simulated Annealing

java,algorithm,search,optimization,simulated-annealing
I would like to use Simulated Annealing to find local minimum of single variable Polynomial function, within some predefined interval. I would also like to try and find Global minimum of Quadratic function. Derivative-free algorithm such as this is not the best way to tackle the problem, so this is...

How do I make a query search in rails case insensitive?

ruby-on-rails,postgresql,ruby-on-rails-4,search
I have this search method in my user.rb model def self.search(query) where("description like ?", "%#{query}%") end but my search is case sensitive. I want to make it case insensitive. How do I do that? I'm hoping it's a quick fix. Thanks...

How to make a big form?

php,search
I want to make a big form with 9 fields of search (html with php/sql). Today, I use Case When Then. But with 9 fields, there are many combinations For example, when I search for 5 fields. I get back the field if there (Null if there is no) and...

How to include more search items

ios,xcode,search,bundle
I created a project, settings its name, say: ABCXYZ. When I use iOS Search app (swipe down in the main menu), type XYZ, my app doesn't appear. What do I have to include in my XCode project in order to get more option in search? Like, type A, type X,...

RegEx Search Pattern for ASP controls with a specific element

c#,asp.net,regex,visual-studio,search
I am currently trying to figure out a RegEx pattern to find certain ASP controls in the entirety of my visual studio solution. For example, I would like to find all the controls that have a CssClass element defined i.e if the pattern were to be applied, the following example...

How to skip a row with file exists condition in laravel

laravel,search,eloquent
This is for a search query based on many input fields, i'm doing if statements inside the query based on the inputs, for example : $query = Model::all(); if($field = Input::get('field')) $query->where('column_name', $field); but what i want to do also is a condition to skip a row if there is...

Treeview search results flat list

c#,search,treeview
How can I make the list on the right populate with only items which meet the search criteria? I'm not asking for the literal code necessarily, but just some general guidance on how to do so. I've already written the code to populate the list on the left with C#,...

JQuery And JavaScript Search AutoComplete

javascript,jquery,search,input,autocomplete
I have an HTML code with this line: <input id="search" type="text" placeholder="Search"> And a JS file with those: var arr = ["A", "B", "C", "D"]; $('#search').autocomplete({ source: arr }); I am trying to make a autocomplete for a search engine, But i cant display my results in my HTML Web...

Searching for a sentence in a file java [closed]

java,file,search
I am really stuck up with this. I am having an input file say input.txt. content of input.txt is Using a musical analogy, hardware is like a musical instrument and software is like the notes played on that instrument. Now I want to search the text like a musical instrument...

How to index plain text files for search in Sphinx

search,sphinx,plaintext
I scanned dozens of articles and forum threads, looked through official documentation, but couldn't find an answer. This article sounds promising, since is says that The data to be indexed can generally come from very different sources: SQL databases, plain text files, HTML files, but unfortunately as all other articles...

An algorithm to search for words in an array of letters

java,arrays,algorithm,search
So I have an Array, and I have to search for words The Array: 0 1 2 3 4 5 6 7 8 9 10 11 text g t c a n d l e t j a q The Keys: 2 can 2 candle 3 a 3 an 3...

KQL - Ignoring items with property not equal to value

search,sharepoint-2013
I have to configure the site search so that it does not include items wich have a property of ModerationStatus != 1. I found out that using a query like ModerationStatus <> 1 can probably solve my problem, but I am not sure if it will work in my environment...

Apache Solr Exception

php,apache,search,drupal,solr
Hello I am trying to run Solr on a Tomcat and have an exception like org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: directory '/var/lib/solr/data/index' does not exist Maybe anyone has some trouble like I do?...

T SQL wildcard searching for a zip code

sql,search,wildcard
I've been messing around all day with some t-sql code for searching a zip code. I'm using a wild card to match the end of the string. However, it is not working. It only works when the whole string is entered correctly. Here is the code I have. IF (@MailFiveDigitZip...

find common string in two text files using batch script

string,parsing,batch-file,search,replace
I'm trying to find common string in two text files. For example, first text file contains following 1.txt //documents #5 ##text //documents/A #6 //documents/B #7 second text file contains following: 2.txt //documents/A #3 output.txt //documents/A #6 If common string found, expected output last number taken from 1.txt file. try.cmd @echo...

Vim: How to search for more than one word in the same search?

search,vim
Is it possible to search within vim for more than one word? For example: Let's say i'm inside vim and I press / in order to start a search for a certain word, is it possible to search for more than one word in the same search?...

If statement for search field in Rails

jquery,ruby-on-rails,search,if-statement
I have a blog site and recently added a search bar for visitors to browse through blog posts. When used, all of the posts go away in the directory and only those which return via the search appear. In order to show the general directory and view all, I would...

Pagination with PDO MySQL Search Multiple Form Fields

php,mysql,search,pdo,pagination
I am having a heck of a time getting this script to work. I have two search fields. That is the reason for the different queries. I can't get the pagination to work with the search script. The pagination alwasy brings back all the records and I get a blank...

Removing date from pages not posts in search results (Wordpress)

wordpress,search,post
I'm trying to remove the date from pages only in search results. I found this: https://wordpress.org/support/topic/search-results-hide-date-for-pages-not-posts - however, I can't seem to figure out where to add it without causing errors. I also found an answer suggesting just removing the date code from page.php but I don't have that in...

Efficient MySQL text search

php,mysql,search,sql-like
I have a forum written in PHP using MySQL, and I'd like to make forum search available. It will allow users to search for particular strings, as well as filter on metadata like post date and subject and so on. The metadata can be efficiently searched because most of these...

grep first n rows, return file name only

regex,linux,search,grep
I can do the following to search for what I need and return the file name: grep -l "mysearchstring" ./*.xml However the files I am searching are huge so this takes forever. The string I am searching will appear in the first 200 rows so how can I search only...

Print Search Query

php,html,search
index.html code: <form action="search.php" method="post" name="search"> <input type="text" id="search_query" class="field" name="search_query" placeholder="Search a website ..."/>&nbsp; <input type="submit" name="search" id="submit" value="Search"/> search.php code: <input type="text" id="go" class="field" name="go" value=""/>&nbsp; <input type="submit" name="search" id="submit" value="Search"/> I want to prefill the search.php search box from the searched text on the index.html page One...

solution search engine website php [closed]

php,file,search,website
I have website and I need to build fast search engine for it. I have to search text in database or files (word, pdf) . I want too when I search a text the result the exact word or a text which have close writing, for example, I type "exemple"...

Show / Hide divs based on search.keypress (filter)

javascript,jquery,html,search,filter
I have a webpage with lots of "cards" I want to filter away some cards as I type into the search field, and when I remove a character, show them again (all when empty). My problem is that it does not seem to work properly, it is "1 character behind"...

(Java) Having trouble with recursive overloading

java,arrays,search,recursion
I'm studying basic Java and I there's a question on a programming assignment that I'm having a lot of trouble with concerning recursive overloading of sort of a search method. Here's what I'm being asked to do: Write a method that accepts a two-dimensional int[][] array as the parameter and...

PHP/mySQL results not being displayed [duplicate]

php,mysql,search,result
This question already has an answer here: mysql_fetch_array() expects parameter 1 to be resource (or mysqli_result), boolean given 29 answers I keep getting a warning on my server after trying to do a search it says: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given inform/search.php on line...

trying to extract a string from a js this keyword

javascript,search,this
I'm trying to execute javascript after a link is clicked before loading the link, using this code: $('body').on("click", 'a', function (evt) { evt.preventDefault(); console.log(this); $('.content').addClass('hide'); if (this.search("AV") > 0) { $('#AVheader').addClass('fullwidth'); } setTimeout(function () { window.open(this, "_self"); }, 500); }); My errors are: this.search Isn't a function and window.open(this, "_self");...

CoreSpotlight indexing not working

ios,swift,search,ios9,corespotlight
I am using the CoreSpotLight api to index some content. For some reason I am not able to find the data when I search in the SpotLight. let atset:CSSearchableItemAttributeSet = CSSearchableItemAttributeSet() atset.title = "Simple title" atset.contentDescription = "Simple twitter search" let item = CSSearchableItem(uniqueIdentifier: "id1", domainIdentifier: "com.shrikar.twitter.search", attributeSet: atset) CSSearchableIndex.defaultSearchableIndex().indexSearchableItems([item])...

Postgres full text search: how to search multiple words in multiple fields?

sql,postgresql,search,indexing,full-text-search
i'm using for the first time Postgresql and i'm trying to create a search engine in my website. i have this table: CREATE TABLE shop ( id SERIAL PRIMARY KEY, name TEXT NOT NULL, description TEXT, address TEXT NOT NULL, city TEXT NOT NULL ); Then i created an index...

Vim Statusline: Word search

search,vim,statusline
I've searched hard for this and haven't been able to find what I'm after. On my statusline I want a count of the number of matches that occur in the current file. The vim command below returns what I want. I need the returned number to be displayed in my...

Creating filtering by 'Created_at' and/or presence of data in multiple columns

ruby-on-rails,search,filter
Big newbie here. Started rails recently. I've been searching and I'm stuck on forward progress where I've reached filtering. Currently on my index page, I'm showing all orders created. Customers (first_name, last_name) pay by 'cash', 'credit', or 'check' (shown in decimal(8,2)). I would like to create a filter where manager...

Search Multiple Words PHP

php,mysql,search
UPDATE: I got a little farther with: $query = mysql_real_escape_string($_POST['search']); $keywords = explode(" ", $query); foreach ($keywords as $keys) { $search_sql .= " AND Name LIKE '%$keys%' "; } But it's still returning nothing. I couldn't find this because I wasn't sure on how to word it. Basically, when a...

Print index table with prawn ruby on rails

ruby,ruby-on-rails-4,search,params,prawn
I'm having trouble trying to print the array that a search produces in the index of my app. Here is my code: appointments controller (index action): def index @appointments = Appointment.search(params[:search]) respond_to do |format| format.html format.pdf do pdf = AppointmentsPdf.new(@appointments) send_data pdf.render, filename: "citas_del_dia", type: "application/pdf", disposition: "inline" end end...

How can I add custom search engine to browser?

search,browser,manifest,provider
Basically what I'm trying to do is to be able to add my own "search engine" (based on PHP and Mod_rewrite) to any browser automatically. Somewhere on the Internet I found that I need to declare a search provider. How can I do this? <link>, manifest or some JavaScript?

TermSuggestionBuilder Java API in elasticsearch does not return any results

exception,search,elasticsearch
I have constructed a TermSuggestionBuilder as shown below TermSuggestionBuilder termSuggest = new TermSuggestionBuilder("rule") .suggestMode("always") // Always, otherwise the results can vary // between requests. .text("plabel").field("_instanceName"); where rule is the name of the index , plabel is text I am searching for and _instancename is the filed . The query runs...

ElasticSearch- “No query registered for…”

search,indexing,elasticsearch
ElasticSearch returns me "No query registered for [likes_count]" error when trying to look up entries using the following query. The field likes_count is a new field of documents and does not exist in every document. The same query works without the sort part. Why does this error appear? Thanks {...

Search code in C# .NET MVC is not working

c#,asp.net-mvc,search
Im trying to use the following code to get a list with the results of a search from another list. Heres what I've got: public ActionResult MedicosList(String order,String Search_Data) { var medicoEntity = new MedsEntities(); var lolo = from stu in medicoEntity.Medico select stu; System.Diagnostics.Debug.WriteLine("NO HAY D:"); { lolo =...

How to search in ArrayList of Custom Objects and then Update ListView with results?

java,android,listview,search,arraylist
I want to make a search from an ArrayList of custom objects and from those objects populate a ListView but I really don't know where to start.... Here's what I've got. I get the search from a EditText and in an EditorActionListener I know when to start looking: edittext.setOnEditorActionListener(new OnEditorActionListener()...

Get Order Details by Order Id

magento,search,order,magento-1.9
I need to retrieve an order from Magento by its id. How do I load a specific order by id?

Recursive solution doesn't iterate correctly

ruby,algorithm,search,recursion
I'm working through a toy problem in Ruby: how to produce all possible 10-digit phone numbers where each successive number is adjacent to the last on the keypad. I've represented the adjacent relationships between numbers, and have a recursive function, but my method isn't iterating through the whole solution space....

Search Multiple directories and return one result

linux,search,aix
I'm trying to bring a piece of code that I had running on an AIX box over to Linux and I just can't get it to work. [ -f $FolderPath/*/FileName.txt ] && echo 1 || echo 0 The above searchs the FolderPath and then the * is all its subdirectories...

Binary search implementations

python,algorithm,search
I'm stuck in implementing 5 different ways of binary chop ( task http://codekata.com/kata/kata02-karate-chop/ ). May you give some ideas for more approaches?That's what I have got: 1) def left_chop(key, arr): l = 0 r = len(arr) while l<r: m = (l+r)/2 if key<=arr[m]: r = m else: l = m+1...

Images not visible in search results

php,wordpress,image,search,advanced-custom-fields
I have this custom search function to search trough custom meta keys in Wordpress. The function works well. However, all the images that I have added to my post using Advanced Custom Fields are now having their URL's changed to the attachment ID. This should not happen according to the...

Elasticsearch - cleaning but no analyzer

search,elasticsearch
I'm working on a problem, which requires us to do exact word matching in Elasticsearch. For example, if you want to search on the term 'Brighton Pier', it should match when searching 'brighton pier', but not on 'brighton' nor 'pier'. I've worked out how to do this simply, by turning...

Programmatically accessing arbitrarily deeply-nested values in a dictionary [duplicate]

python,search,dictionary
This question already has an answer here: Checking a Dictionary using a dot notation string 4 answers I'm working on a Python script where I'm given lists of strings of the format: ['key1', 'key2', 'key2.key21.key211', 'key2.key22', 'key3']. Each value in the list corresponds to an entry in a dictionary,...

Searching for content between non-tag strings

python,search
I'm using Python to try to pull data from this old code, and the content of interest is not between neat HTML tags but rather between strings of characters including punctuation and letters. Rather than getting each piece of content though I'm getting everything between the first instance of the...

Elasticsearch partial producttype names

search,elasticsearch,partial
On laptops there is often a "type name" eg. Lenovo T430 Lenovo T430P Lenovo T430S Aso The user expects to find all variants of T430 when searching for T430 But the standard analyzers in elasticsearch tokenizes on space/non-alfanumeric aso. So a search for T430 will only return the T430 variant...

searching in list getting true infinitely in prolog

list,search,prolog
I tried to code a Prolog program that takes 2 value and calculates if the pair is valid or not. If pairs are in different lists, then pairs will be valid and they can make match. If two team in same list(group) then they can't make match which means false....

search and sorting in c program?

c,arrays,sorting,search,bubble-sort
I am writing a program which receives some numbers from the client and then sort them with Bubble sorting function and the other function which receive one number from client and then search it between the other number with binary search function .Please inform me what the problem of this...

How can I remove delta-homes.com from browsers?

search,registry,malware
whenever I open my browsers, delta-homes.com tab is added to the browser. I try to remove delta-homes.com in all of my browsers(IE,FF,chrome,Opera) by registry in run > regedit, about:config in firefox, changing home page and search engine defaults and reset Internet Explorer(and reinstall it from "Turn Windows features on or...

How can i search multiple words in a file on Notepad++

search,notepad++
I'm trying to find a list of Strings in a file (already formated from \n and \r), for example : 0145100841 65722ED01A 657738J000 6584640F00 // this one is found in a file of this : 201506186584640F00AME NMGR01 RUBAT How can i do this in Notepad++ ? Is there an existing...

Sql string search

sql,string,search,select
This is my question: Find the capital and the name where the capital includes the name of the country. This is my answer: SELECT name,capital FROM world WHERE capital=concat(name,"NULL") I dont understand what should i do in the "WHERE" part. Should i do capital=concat(name,something?) or IN or LIKE? Can you...

How do I create a url in django and capture inputs for a search page?

python,django,search
New to Django and to programming. I want to create a search page and currently have the following. My urlpatterns has the following as one of it's patterns. url(r'^search/$', view=search, name='search') my views has a function def search(request): if request.GET.get('q'): message = 'You submitted: %r' % request.GET['q'] else: message =...

What indexer do I use to find the list in the collection that is most similar to my list?

search,indexing,solr,levenshtein-distance
Lets say I have my list of ingredients: {'potato','rice','carrot','corn'} and I want to return lists from a database that are most similar to mine: {'beans','potato','oranges','lettuce'}, {'carrot','rice','corn','apple'} {'onion','garlic','radish','eggs'} My query would return this first: {'carrot','rice','corn','apple'} I've used Solr, and have looked at CloudSearch, ElasticSearch, Algolia, Searchify and Swiftype. These engines only...

Is it possible to search all columns through MySQL table in PHP query, without typing out each column name?

php,mysql,search,like
I am asking this because I am looking for a PHP query for MySQL like the following: SELECT * FROM users WHERE ALL_COLUMNS LIKE '%" . $search . "%' Does a query like this exist? Or do I have to type the query like so: SELECT * FROM users WHERE...

MYSQL - Selecting rows with more than 1 LIKE

search,mysqli,like
My problem here is that, I want to create a simple search engine. I've got it to work by using 2 queries. The first one searches for the full search term and the second one searches for all of the matches word by word. For example if You search for...

places not found using google places api in iOS

ios,search,google-places-api
I am new in iOS. I am trying to show nearby places with selected types types - Bar, Cafe, ATM etc I have created project on developer console. enable API (google places api, google map sdk, direction api) I have created iOS api keys but Api key not working I...

VB.Net - How to dynamicaly search for a string in all TreeView nodes expanding and collapsing nodes matching (or not) the search string?

vb.net,search,treeview,collapse,expand
I´m trying to implement dynamic search on a treeview component, and I´m almost done with it, except that since it´s a dynamic search based on the textchanged event of a textbox, the first characters of the search string are always found, so the search function expand all nodes because they...

Searching a TextField and IntField together seperated by an AND condition In Lucene

java,search,indexing,lucene
I have indexed my documents as: doc.add(new IntField("ID", id, Field.Store.YES)); doc.add(new TextField("First_Name", First_Name, Field.Store.YES)); doc.add(new TextField("Last_Name", Last_Name, Field.Store.YES)); doc.add(new TextField("Address", add, Field.Store.YES)); doc.add(new TextField("City", city, Field.Store.YES)); doc.add(new TextField("State", state, Field.Store.YES)); doc.add(new IntField("Zip_Code", zip, Field.Store.YES)); Where id, FirstName, city, add, state, zip are variables that store the values to be indexed....

How to search for overloaded methods in a class

java,eclipse,search,ide,signature
Is there an easy way to search in a java project, which methods in a Class have the same "name" ? So for example for : public class Banana{ void findBananas(Ananas ananas) { --- } void findBananas(Bananas banana) { --- } void findCiao(Ciao ciao) { --- } void findCiao2(Ciao ciao)...

PHP sum echo result on the fly (difficult)

php,html,mysql,forms,search
This is a difficult one but easy for professionals. I have in mysql the fields: product name, mycost, sellprice and stock. Because I need to know how much I have in investment in my store by each product I created the follow on the fly calculation and is working fine:...

Search barre php+mysql “Page not found”

php,mysql,search,prepared-statement
I've a small issue with this search barre : When I search for the Author or the Session, the search is succesful and everything is fine. But if I search anything in the last box (the Name one) my page is redirected to the site homepage. (with "Page not found"...

Find 2d array inside a 3d array

python,arrays,search,numpy
Is there a fast way to find all indices where a 2d array is inside a 3d array? I have this 3d numpy array: arr = np.array([ [[0,1],[0,2],[0,3],[0,4],[0,4],[0,5],[0,5],[0,5],[0,5],[0,5]], [[0,1],[0,2],[0,2],[0,2],[0,3],[0,4],[0,4],[0,4],[0,5],[0,5]], [[0,1],[0,2],[0,3],[0,3],[0,3],[0,4],[0,4],[0,5],[0,5],[0,5]] ]) And I would like to find all indices where [0,4] occurs. I've tried this one: whereInd = np.argwhere(arr ==...

Parse filterResults findObjects vs findObjectsInBackgroundWithBlock

ios,objective-c,uitableview,search,parse.com
I am filling a tableview in my app with Parse data and then allowing my users to sift through that data with a search field. Long story short it works fine except I am receiving a A long-running operation is being executed on the main thread error. I know it...

SQL find same value on multiple filelds with like operator

mysql,sql,search,like,sql-like
I have this records from my users table: user_id first_name last_name gender email ******* ********** ********* ****** ***** 229 Natalie Fern F [email protected] and I want to search same First Name & Last Name from first_name OR last_name. I have created sql query but not getting record. SELECT * FROM...

SQL statement search for all characters inside field

sql,search,like
I have an address field and address is stored similar to 1111 address info, county $stmt = $db->prepare('SELECT * FROM ' . Config::USER_TABLE . ' WHERE ' . Config::SEARCH_COLUMN . ' LIKE :query ORDER BY '.Config::SEARCH_COLUMN.' LIMIT ' . $start . ', ' . $items_per_page); $search_query = $query.'%'; $stmt->bindParam(':query', $search_query,...

numpy search array for multiple values, and returns their indices

arrays,python-3.x,search,numpy
How can I search for a small set of values in a numpy array (not sorted, and shouldn't be changed)? It should return the indices of those values. For example: a = np.array(['d', 'v', 'h', 'r', 'm', 'a']) # in general it will be large query = np.array(['a', 'v', 'd'])...

SQL weight rows by formula

php,mysql,sql,search,laravel-5
I am trying to make a search form to find users. How can I score the row based on the following formula? score = isInTheSameCityWithMe + isInTheSameStateWithMe + isInTheSameCountryWithMe So, if I live in Paris it should put the people that also live in Paris on the top. My implementation...

Using StringComparer with StringBuilder to search for a string

c#,string,search,stringbuilder,culture
I need to use globalization rules to search for all occurrences of a string within a document. The pseudocode is: var searchText = "Hello, World"; var compareInfo = new CultureInfo("en-US").CompareInfo; DocumentIterator start = null; // the start position if a match occurs var sb = new StringBuilder(); // the document...

AJAX Search System with spaces not working

javascript,php,ajax,search
Below is the code I am using. If I search Hello+World, or Hello%20World then the search on the database is correct However, if I use Hello World then I do not receive any results. How can I mod this code to deal with spaces please? Im not very good with...

Search box/field design with multiple search locations

python,search,design,search-engine,pyramid
Not sure if this question is better suited for a different StackExchange site but, here goes: I have a search page that searches a number of different type of things. All (at the moment) requiring a different input field for each type of search. For example, one might search for...

Angular JS filters working unexpectedly?

javascript,angularjs,search
I'm trying to filter a list of json data (https://api.myjson.com/bins/5a2aw) using an Angularjs filter. When I just use filter exact matching does not take place and for 1 shows results with id = 1,10,11,12. Using true with filter though works very weirdly, a single result whose id is 7 appears...

Understanding Apache Lucene's scoring algorithm

search,solr,lucene,full-text-search,hibernate-search
I'm working with Hibernate Search for months now, but still I'm not able to digest the relevance it brings. I'm overall satisfied with the results it returns, but even simplest test does not satisfy my expectation. First test was using the term frequency(tf). Data: word word word word word word...

Search a string without . character

c#,linq,search,directory
I'm stuck with a search file problem. I have a file say: 1346670589521421983450911196954093762922.nii that is referenced to the file below: 1.3.46.670589.5.2.14.2198345091.1196954093.762922.dcm The difference is that there are (.) placed in different positions. Does anybody know how to search for a file without the fullstop(.)? As i have to go through...

Can anyone help me make the search bar work as I now have the JS prompt? [on hold]

javascript,html5,search,youtube-api,search-engine
I have created a small program that pulls from the YouTube API which allows you to search for a random video for whatever title you enter when prompted. My goal is to have this work like a search engine. I would like to make my search bar the input instead...

If Input is focused trigger X else trigger Y

javascript,jquery,search,input
I'm trying to trigger an opacity animation on a menu when the search input is focused, and when it is not focused for that menu to return to opacity:1. My botched code below. if($('input#edit-keys-2').is(":focus")){ $('#zone-header ul#nice-menu-1').animate({opacity:0}, 300); }else{ $('#zone-header ul#nice-menu-1').animate({opacity:1}, 300); } ...

Change input value when i press Attribute

php,forms,search,onclick,submit
Ok guys already search for it but no results at all, and cant figured it out how to do this, so my problem is: I have this form: <form method="POST" action="search.php" name="form" id="form"> <input type="text" name="search" id="search" placeholder="Introduza a sua Localização"> <input type="submit" name="Submit" value="Pesquisar"> </form> And what i would...

Doing a multi-column search for an item in a listView control using c#

c#,linq,listview,search
I am using a multi-column listView control in Visual Studio 2013 and coding with C#. I want to do a search on multiple columns as if I were doing a database SELECT. For example, if the first three columns were NAME, AGE and CITY, I might want to search for...

Better Search box for wordpress

wordpress,search,wordpress-plugin,wordpress-theming
Please take a look on this WordPress theme, when you click on search icon, a search box appear in the middle of page with a cool effect. I want to add this to my WordPress site. I have looked on google but still no luck, Please suggest me a plugin...

Laravel Search Relations whereHas

laravel,search
I am trying to do a search on products but it does not return any results. I suspect it has something to do with the whereHas function but I just cannot figure it out. Here is my code: My Relations: Categories Model: class Categories extends Eloquent { public function product()...

Hide soft keyboard in android after using library

android,search,android-softkeyboard
I cant hide soft keyboard from my code. I`m using some menthods: in java code: InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY); in manifest: android:windowSoftInputMode="stateHidden|adjustResize" this dont work for me. Can you help me? P.S: Its happend when I use this library https://github.com/Quinny898/PersistentSearch...

How to make Search Dialog size of a toolbar

android,search,layout,toolbar,search-dialog
So I learned how to make Search dialog with this tutorial but it doesn't look pretty and I'm looking for proper way to fix it. As you can see search widget doesn't cover fully the toolbar and I think making it shorter by using constant dp values is not a...

Mysql Fulltext search returns empty result while there are 100+ rows

mysql,search,full-text-search
The query I use to get rows: SELECT * FROM `sentence` WHERE MATCH(text) AGAINST('hello') Mysql returns empty result when I run this query. However if I use LIKE keyword to get rows SELECT * FROM `sentence` WHERE text LIKE '%hello%' Then, Mysql returns 144 rows. And lets come to a...

Adding table and style to php echo code [closed]

php,css,table,search
I'm trying to add a table and style from css to my php echo code here it is: echo " <div class='results'> <table border='2' style='background-color:#FFFFFF;border-collapse:collapse;border:2px solid #6699FF;color:#000000;width:400'> <tr> <div class='title'><a href='$url'><b>$title</b></a></div> <div class='url'><font color='green' size='2'>$url</font></div> <div class='desc'>$desc</div> </div></tr></table></div> <br...