matching

pywinauto: taking more than one app windows

I have a GUI application which can create many similar windows on desktop. All windows have same title. I have to enumerate all dialogs with same title and make some tests against each of such dialogs. If I call: dialog = app['Window Name'] pywinauto returns a WindowSpecification object which is useful along with accessing controls b...

Comparing an array of users to an array of structs with user object as attribute, and returning matches in another array of structs

I have an array of users who are friends. Let us call this array: friends I then have an array of structs. Each struct has a user object as an attribute (it also has a rank attribute). Here's what the struct class looks like, to add some context: class Leader < Struct.new(:rank, :user); end Let us call this array of structs: all_...

Stereo Matching - Dynamic Programming

Hi, I am supposed to implement Dynamic programming algorithm for Stereo matching problem. I have read 2 research papers but still haven't understood as to how do I write my own c++ program for that ! Is there any book or resource that's available somewhere that I can use to get an idea as to how to start coding actually ? Internet sea...

Algorithm for multiple word matching in a text, count the number of every matched word

I have noticed that it has solutions for matching multiple words in a given text, such as below: http://stackoverflow.com/questions/1099985/algorithm-for-multiple-word-matching-in-text If I want to know exactly the number of appearances of each matched word in the text, my solution is like this: step 1: using ac-algorithm to obtain the...

getting service from wsdd via xpath not wroking (xmltask)

Hi, I am trying to get the XPath "/deployment/service". Tested on this site: http://www.xmlme.com/XpathTool.aspx <?xml version="1.0" encoding="UTF-8" standalone="no"?> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org /axis/wsdd/providers/java"> <service name="kontowebservice" provider="java:RPC...

What is the base open source java package to filter/match URLs?

Hi, I have an high performance application which deals with URLs. For every URL it needs to retrieve the appropriate settings from a predefined pool. Every settings object is associated with a URL pattern which indicates which URLs should use these settings. The matching rules are as follows: "google.com" match pattern should match al...

Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators?

Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators? I'd specifically like to know if it's possible under the .NET Platform. ...

Blob ID matching over multiple frames in C++ (image analysis)

Dear reader, I'm working on a blob matching and tracking library in C++. Currently I'm using openCV to detect blobs and try to match blobs in a new frame by checking the position, velocity and size of the blob. This works quite okay and I'm receiving a high blob match rate (95% or higher). Sometimes blobs fall out of the image or new b...

ocaml pattern match question

I'm trying to write a simple recursive function that look over list and return a pair of integer. This is easy to write in c/c++/java but i'm new to ocaml so somehow hard to find out the solution due to type conflict it should goes like .. let rec test p l = ... ;; val separate : (’a -> bool) -> ’a list -> int * int = <fun> test (fun ...

How to use case insensitive pattern matching with PostgreSQL and Umlauts?

I'm trying to get PostgreSQL 8.4.3 to do case insensitive pattern matching with its ~* operator when the strings contain non-ASCII characters like German umlauts. The database, terminal, and everything else is configured to use UTF-8. Here's the problem in a nutshell: SELECT 'Ö' ~* 'ö'; -- false There are other variants which do...

Matching, ranking based on relevance of each criteria

I have a growing database containing: a table of demands (multiple criteria) a table of offers (multiple criteria) Criteria can be string (e.g.: country name), boolean, numeric, ... I would like to find all demand-offer which match more or less (a little like job banks, matchmaking, ...) If tables didn't contain many rows I would c...

hashtag boundaries matching regex in javascript

I'm trying to match a set of hashtags or words in a javascript string. (#hashtag|word) almost does it, except I'd like to consider word boundaries. \b(#hashtag|word)\b doesn't match the beginning word boundary, since of course '#' is not a word character. ideally i'd like to have something like a '\b' anchor that matches hashtags...

Elegant way to count the number of lines that contain a string in a file

Hi, I have a quick question. As the title says, I'd like to find a way to count the number of lines that contain a specified string in a file, in PHP. I know I could simply open the file and loop through all the lines and see if anything matches, but that seems kind of cumbersome. Is there a better way? To further illustrate what I wa...

Matching filenames with id

I have 1 text file which contains numbers from 1 to 11644. Beside the numbers are the names of the xml files that i have in another folder. I have a total of 8466 xml files. I need to match the filename of all the xml files with the id in the text file and extract the value of the id out. All of the id are in random position. An example ...

[Haskell] Pattern Matching and Recursion

I am new to both Haskell and programming. My question about binding in pattern-matched, recursive functions. For instance, suppose I have a function which checks whether a given list (x:xs) is a sublist of another list, (y:ys). My initial thought, following the examples in my textbook, was: sublist [] ys = True sublist xs [] = False sub...

Min Max-Matching Problem

I have a matching problem and I don't know how to solve it: Given a complete bipartite graph (A, B). Each node a_i in A, has two states: s(a_i)=0 or s(a_i)=1 Weighted edges are declared as: w(a_i, b_j, s(a_i)) Fixing a configuration for the states, the problem becomes a max-matching. The goal is to find the configuration with minimum...

String searching algorithms in Java

Hi all! I am doing string matching with big amount of data. EDIT: I am matching words contained in a big list with some ontology text files. I take each file from ontology, and search for a match between the third String of each file line and any word from the list. I made a mistake in overseeing the fact that what I need to do is no...

Line matches not showing during File Search in Eclipse 3.5 / Zend 7.2

Somehow my Eclipse (Zend 7.2) doesn't show the line matches in the treeview when doing a File Search. It shows the files that match, but I can't unfold it to see what lines the matches are on. On my other computer at work (same software) it does work like it should. Is there any way to reinstall the Search-module or does anybody know w...

Mask / Zero out area outside specified ROI

Greetings! I am working on a project using OpenCV on template matching, and I want to limit the search region on an image. Image is captured continuously from a camera. Is there any way to Zero / mask out image outside ROI defined, so that template matching process can be specific on remaining region, faster and accurate? Thanks is ad...

Match a user drawn path to an image

Does anyone know of any tutorials or sample code that could help me achieve the following in an iPhone app (other than the offical Apple developer videos). A user draws a path on screen The path is compared to an already existing path to see if it matches A match is determined not just by shape but also by starting and ending at the co...