Search Results

Search found 2490 results on 100 pages for 'matching'.

Page 22/100 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Search BitmapData object for matching pixel values from another Bitmap.

    - by Cos
    Using Actionscript 3 is there a way to search one bitmap for the coordinates matching pixels of another bitmap? http://dl.dropbox.com/u/1914/wired.png Somehow you would have to loop through the bigger bitmap to find and the the pixel range that matches and return those coordinates. For example the Bitmap with the "E" is 250 pixels over and 14 pixels down in the bigger bitmap. I haven't been able to come up with the solution on my own. Thanks.

    Read the article

  • Mysql: Order Results by number of matching rows in Second Table.

    - by KyleT
    I'm not sure the best way to word this question so bear with me. Table A has following columns: id name description Table B has the following columns: id a_id(foreign key to Table A) ip_address date Basically Table B contains a row for each time a user views a row from Table A. My question is how do I sort Table A results, based on the number of matching rows in Table B. i.e SELECT * FROM TableA ORDER BY (SELECT COUNT(*) FROM TableB where TableB.a_id = TableA.id) Thank you!

    Read the article

  • How to write Haskell function to verify parentheses matching?

    - by Rizo
    I need to write a function par :: String -> Bool to verify if a given string with parentheses is matching using stack module. Ex: par "(((()[()])))" = True par "((]())" = False Here's my stack module implementation: module Stack (Stack, push, pop, top, empty, isEmpty) where data Stack a = Stk [a] deriving (Show) push :: a -> Stack a -> Stack a push x (Stk xs) = Stk (x:xs) pop :: Stack a -> Stack a pop (Stk (_:xs)) = Stk xs pop _ = error "Stack.pop: empty stack" top :: Stack a -> a top (Stk (x:_)) = x top _ = error "Stack.top: empty stack" empty :: Stack a empty = Stk [] isEmpty :: Stack a -> Bool isEmpty (Stk [])= True isEmpty (Stk _) = False So I need to implement a 'par' function that would test a string of parentheses and say if parentheses in it matches or not. How can I do that using a stack?

    Read the article

  • Error "More than one matching bindings are available" when using Ninject.Web.Mvc 2.0 and ASP.NET MVC

    - by Cray
    Hello all, Recently I've switched to Ninject 2.0 release and started getting the following error: Error occured: Error activating SomeController More than one matching bindings are available. Activation path: 1) Request for SomeController Suggestions: 1) Ensure that you have defined a binding for SomeController only once. However, I'm unable to find certain reproduction path. Sometimes it occurs, sometimes it does not. I'm using NinjectHttpApplication for automatic controllers injection. Controllers are defined in separate assembly: public class App : NinjectHttpApplication { protected override IKernel CreateKernel() { INinjectModule[] modules = new INinjectModule[] { new MiscModule(), new ProvidersModule(), new RepositoryModule(), new ServiceModule() }; return new StandardKernel(modules); } protected override void OnApplicationStarted() { RegisterRoutes(RouteTable.Routes); RegisterAllControllersIn("Sample.Mvc"); base.OnApplicationStarted(); } /* ............. */ } Maybe someone is familiar with this error. Any advice?

    Read the article

  • Compiler is able to find function without matching .h file is updated?

    - by Maxim Veksler
    Hello Friends, I'm writing a C University project and stumbled upon a compiler behavior which I don't understand. In this file http://code.google.com/p/openu-bsc-maximveksler/source/browse/trunk/20465/semester/tasks/maman14/alpha/maman14/assembler/phaseOne.c?r=112 I've added a call to function named freeAsmInstruction(). This function is defined in file named lineParser.c, yet I haven't updated the matching lineParser.h header file to include this function declaration. Why does this code compile? I would expect that gcc would fail to compile phaseOne.c until the correct lineParser.h is updated with the declaration of freeAsmInstruction(). I would appreciate an explanation. Thank you, Maxim

    Read the article

  • How to highlight matching sub-strings inside a ListBox?

    - by Kishore Kumar
    I have one TextBox and one listbox for searching a collection of data. While searching a text inside a Listbox if that matching string is found anywhere in the list it should show in Green color with Bold. eg. I have string collection like "Dependency Property, Custom Property, Normal Property". If I type in the Search Text box "prop" all the Three with "prop" (only the word Prop) should be in Bold and its color should be in green. Any idea how it can be done?. Data inside listbox is represented using DataTemplate.

    Read the article

  • scala 2.8.0.RC2 compiler problem on pattern matching statement?

    - by gruenewa
    Why does the following module not compile on Scala 2.8.RC[1,2]? object Test { import util.matching.Regex._ val pVoid = """\s*void\s*""".r val pVoidPtr = """\s*(const\s+)?void\s*\*\s*""".r val pCharPtr = """\s*(const\s+)GLchar\s*\*\s*""".r val pIntPtr = """\s*(const\s+)?GLint\s*\*\s*""".r val pUintPtr = """\s*(const\s+)?GLuint\s*\*\s*""".r val pFloatPtr = """\s*(const\s+)?GLfloat\s*\*\s*""".r val pDoublePtr = """\s*(const\s+)?GLdouble\s*\*\s*""".r val pShortPtr = """\s*(const\s+)?GLshort\s*\*\s*""".r val pUshortPtr = """\s*(const\s+)?GLushort\s*\*\s*""".r val pInt64Ptr = """\s*(const\s+)?GLint64\s*\*\s*""".r val pUint64Ptr = """\s*(const\s+)?GLuint64\s*\*\s*""".r def mapType(t: String): String = t.trim match { case pVoid() => "Unit" case pVoidPtr() => "ByteBuffer" case pCharPtr() => "CharBuffer" case pIntPtr() | pUintPtr() => "IntBuffer" case pFloatPtr() => "FloatBuffer" case pShortPtr() | pUshortPtr() => "ShortBuffer" case pDoublePtr() => "DoubleBuffer" case pInt64Ptr() | pUint64Ptr() => "LongBuffer" case x => x } }

    Read the article

  • How do I select the shallowest matching elements with XPath?

    - by harpo
    Let's say I have this document. <a:Root> <a:A> <title><a:B/></title> <a:C> <item><a:D/></item> </a:C> </a:A> </a:Root> And I have an XmlNode set to the <a:A> element. If I say A.SelectNodes( "//a:*", namespaceManager ) I get B, C, and D. But I don't want D because it's nested in another "a:" element. If I say A.SelectNodes( "//a:*[not(ancestor::a:*)]", namespaceManager ) of course, I get nothing, since both A and its parent are in the "a" namespace. How can I select just B and C, that is, the shallowest children matching the namespace? Thanks. Note, this is XPath 1.0 (.NET 2), so I can't use in-scope-prefixes (which it appears would help).

    Read the article

  • Shall this Regex do what I expect from it, that is, matching against "A1:B10,C3,D4:E1000"?

    - by Will Marcouiller
    I'm currently writing a library where I wish to allow the user to be able to specify spreadsheet cell(s) under four possible alternatives: A single cell: "A1"; Multiple contiguous cells: "A1:B10" Multiple separate cells: "A1,B6,I60,AA2" A mix of 2 and 3: "B2:B12,C13:C18,D4,E11000" Then, to validate whether the input respects these formats, I intended to use a regular expression to match against. I have consulted this article on Wikipedia: Regular Expression (Wikipedia) And I also found this related SO question: regex matching alpha character followed by 4 alphanumerics. Based on the information provided within the above-linked articles, I would try with this Regex: Default Readonly Property Cells(ByVal cellsAddresses As String) As ReadOnlyDictionary(Of String, ICell) Get Dim validAddresses As Regex = New Regex("A-Za-z0-9:,A-Za-z0-9") If (Not validAddresses.IsMatch(cellsAddresses)) then _ Throw New FormatException("cellsAddresses") // Proceed with getting the cells from the Interop here... End Get End Property Questions 1. Is my regular expression correct? If not, please help me understand what expression I could use. 2. What exception is more likely to be the more meaningful between a FormatException and an InvalidExpressionException? I hesitate here, since it is related to the format under which the property expect the cells to be input, aside, I'm using an (regular) expression to match against. Thank you kindly for your help and support! =)

    Read the article

  • PHP - Pull out array keys that have matching values?

    - by MAZUMA
    Is there a way to look inside an array and pull out the keys that have keys with matching values? Questions like this have been asked, but I'm not finding anything conclusive. So if my array looks like this Array ( [0] => Array ( [title] => Title 1 [type] => [message] => ) [1] => Array ( [title] => Title 2 [type] => [message] => ) [2] => Array ( [title] => Title 3 [type] => [message] => ) [3] => Array ( [title] => Title 2 [type] => Limited [message] => 39 ) [4] => Array ( [title] => Title 4 [type] => Offline [message] => 41 ) [5] => Array ( [title] => Title 5 [type] => [message] => ) And I want to get this Array ( [1] => Array ( [title] => Title 2 [type] => [message] => ) [3] => Array ( [title] => Title 2 [type] => Limited [message] => 39 ) )

    Read the article

  • nginx: How can I set proxy_* directives only for matching URIs?

    - by Artem Russakovskii
    I've been at this for hours and I can't figure out a clean solution. Basically, I have an nginx proxy setup, which works really well, but I'd like to handle a few urls more manually. Specifically, there are 2-3 locations for which I'd like to set proxy_ignore_headers to Set-Cookie to force nginx to cache them (nginx doesn't cache responses with Set-Cookie as per http://wiki.nginx.org/HttpProxyModule#proxy_ignore_headers). So for these locations, all I'd like to do is set proxy_ignore_headers Set-Cookie; I've tried everything I could think of outside of setting up and duplicating every config value, but nothing works. I tried: Nesting location directives, hoping the inner location which matches on my files would just set this value and inherit the rest, but that wasn't the case - it seemed to ignore anything set in the outer location, most notably proxy_pass and I end up with a 404). Specifying the proxy_cache_valid directive in an if block that matches on $request_uri, but nginx complains that it's not allowed ("proxy_cache_valid" directive is not allowed here). Specifying a variable equal to "Set-Cookie" in an if block, and then trying to set proxy_cache_valid to that variable later, but nginx isn't allowing variables for this case and throws up. It should be so simple - modifying/appending a single directive for some requests, and yet I haven't been able to make nginx do that. What am I missing here? Is there at least a way to wrap common directives in a reusable block and have multiple location blocks refer to it, after adding their own unique bits? Thank you. Just for reference, the main location / block is included below, together with my failed proxy_ignore_headers directive for a specific URI. location / { # Setup var defaults set $no_cache ""; # If non GET/HEAD, don't cache & mark user as uncacheable for 1 second via cookie if ($request_method !~ ^(GET|HEAD)$) { set $no_cache "1"; } if ($http_user_agent ~* '(iphone|ipod|ipad|aspen|incognito|webmate|android|dream|cupcake|froyo|blackberry|webos|s8000|bada)') { set $mobile_request '1'; set $no_cache "1"; } # feed crawlers, don't want these to get stuck with a cached version, especially if it caches a 302 back to themselves (infinite loop) if ($http_user_agent ~* '(FeedBurner|FeedValidator|MediafedMetrics)') { set $no_cache "1"; } # Drop no cache cookie if need be # (for some reason, add_header fails if included in prior if-block) if ($no_cache = "1") { add_header Set-Cookie "_mcnc=1; Max-Age=17; Path=/"; add_header X-Microcachable "0"; } # Bypass cache if no-cache cookie is set, these are absolutely critical for Wordpress installations that don't use JS comments if ($http_cookie ~* "(_mcnc|comment_author_|wordpress_(?!test_cookie)|wp-postpass_)") { set $no_cache "1"; } if ($request_uri ~* wpsf-(img|js)\.php) { proxy_ignore_headers Set-Cookie; } # Bypass cache if flag is set proxy_no_cache $no_cache; proxy_cache_bypass $no_cache; # under no circumstances should there ever be a retry of a POST request, or any other request for that matter proxy_next_upstream off; proxy_read_timeout 86400s; # Point nginx to the real app/web server proxy_pass http://localhost; # Set cache zone proxy_cache microcache; # Set cache key to include identifying components proxy_cache_key $scheme$host$request_method$request_uri$mobile_request; # Only cache valid HTTP 200 responses for this long proxy_cache_valid 200 15s; #proxy_cache_min_uses 3; # Serve from cache if currently refreshing proxy_cache_use_stale updating timeout; # Send appropriate headers through proxy_set_header Host $host; # no need for this proxy_set_header X-Real-IP $remote_addr; # no need for this proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Set files larger than 1M to stream rather than cache proxy_max_temp_file_size 1M; access_log /var/log/nginx/androidpolice-microcache.log custom; }

    Read the article

  • Nginx: Can I cache a URL matching a pattern at a different URL?

    - by Josh French
    I have a site with some URLs that look like this: /prefix/ID, where /prefix is static and ID is unique. Using Nginx as a reverse proxy, I'd like to cache these pages at the /ID portion only, omitting the prefix. Can I configure Nginx so that a request for the original URL is cached at the shortened URL? I tried this (I'm omitting some irrelevant parts) but obviously it's not the correct solution: http { map $request_uri $page_id { default $request_uri; ~^/prefix/(?<id>.+)$ $id; } location / { proxy_cache_key $page_id } }

    Read the article

  • Can I make Apache drop a connection when matching a URL?

    - by PP
    Using mod_rewrite I can construct a rule to respond with a clean error code (e.g. 404 not found, 410 gone, or 403 unauthorised) when a page is requested that I don't want to serve. But frequently I get completely erroneous requests from hackers scanning my website for vulnerabilities or possibly cross-site scripting attempts. For these customers I do not want to return a clean error - I'd rather do something else like immediately drop the connection with no response or, alternatively, hold the connection open for a lengthy period of time to frustrate the automated process. Any ideas how to accomplish this with Apache? I've read that nginx has the ability to immediately terminate a connection when a particular pattern is matched.

    Read the article

  • usb hub not working on resume from suspend

    - by user1781498
    All the usb ports on my laptop work but when I resume from suspend some the usb ports don't work. lsusb Before Suspend: Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 04f3:014b Elan Microelectronics Corp. Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 002: ID 04f2:b3a6 Chicony Electronics Co., Ltd Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub lsusb After Suspend: Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 04f3:014b Elan Microelectronics Corp. Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    Read the article

  • Is a matching entry in /etc/hosts required for hostname?

    - by JohnWoltman
    I was installing a Tomcat webapp that refused to work until I stumbled on someone else's issue with an unrelated product. The solution was to add the machine's name to /etc/hosts, to match the name returned by hostname. Is this required for general Linux networking to function correctly? My webapp is running in a virtual machine so that I can test the webapp, and I don't normally bother with the /etc/hosts file on VMs. I just shook my fist and cursed Tomcat and webapp's behavior. I read http://serverfault.com/questions/118823, but that doesn't say if it's required or not.

    Read the article

  • How to transform a csv to combine matching rows?

    - by Christian Wolf
    I have a CSV file with some transaction data. Let's say date, volume, price and direction (sell/buy). Additionally there is a ID for each transaction and on each closing transaction (the newer one) there is a reference to the corresponding transaction. Classical database referencing. Now I want to do some statistics and draw some plots. This could be done via Octave, LaTeX/TikZ, Gnuplot or whatever. To do this I need both buy and sell price in one row. My thought was to preprocess the CSV to get another CSV containing the needed information and then to do the statistics. In the end I'd like to have a solution based on scripts and not on a spreadsheet as data might change often (exported from online DB). My actual solution (see http://paste.ubuntu.com/6262822/ ) is a bash script that parses the CSV line by line and checks if there exists a corresponding transaction. If found, a new row is written to the destination CSV. If not a warning is printed. The bad news: For each row in the source file I have to read the whole file a few times. This causes long running times of 10sec for 300 lines. As the line number might rise soon (10k lines), this is not perfect. I am aware, that there are many shells to be opened in the script which might cause the performance problems. Now my questions: Is bash/awk/sed/.... a good way to do things? Should I first import all data into a "real" local database to use SQL? Is there an easy way to achieve the desired results?

    Read the article

  • EDQ Technical Enablement for OPN (Prague - June 17-19)

    - by milomir.vojvodic
    Oracle Enterprise Data Quality (EDQ) Technical Enablement and Partner Training Trusted Data for Your Enterprise Applications Oracle Enterprise Data Quality helps organizations achieve maximum value from their business-critical applications by delivering fit-for-purpose data. These products also enable individuals and collaborative teams to quickly and easily identify and resolve any problems in underlying data. With Oracle Enterprise Data Quality, customers can identify new opportunities, improve operational efficiency, and more efficiently comply with industry or governmental regulation. Oracle Enterprise Data Quality is designed to serve as a very channel friendly platform to OPN.  This means that pre-built extensions, components and even complete business solutions can readily be built and shared.  This allows our customers/partners to be highly efficient in how they deploy custom business solutions, but also allows our partners to develop specialized components, domain knowledge and even complete business solutions. Training is suitable for: · Database administrators · Architects · Technical staff Objectives of the training: After completing this course, participants should: · Have an understanding of the core functionality of EDQ across profiling, auditing, transforming, parsing and matching data · Be able to describe some of the key capabilities and benefits delivered by EDQ · Be able to create and run standalone EDQ processes and jobs · Be ready to start working with data from customers and (with practice) be able to demonstrate EDQ to customers Agenda 17th June Fundamentals For Demoing (Profile, Audit, Transform and More) Profiling Auditing Transforming Writing and exporting data Jobs and scheduling Publishing, packaging and copying EDQ processes Introduction to the Customer Data Extension Pack Realtime Processing via Web Services The Server Console Run Profiles Data Interfaces Sampling Publishing metrics to the Dashboard Users and security 18th June Matching Matching overview Basic matching configuration Matching rule hierarchies Clustering Merging Reviewing possible matches Outputting Match Data Case study 19th June Address Verification Address Verification Overview Configuration Accuracy Flags Parsing Parsing Overview Phrase profiling Tailoring a CDEP Parser Base Tokenization Classification Reclassification Selection Resolution Register Here Don’t miss this FREE event. Space is limited. Oracle University V Parku 2294/4 148 00 Praha 4 17.6. – 19.6. 2014 09:00 a.m.– 17:30 p.m.

    Read the article

  • Why is this MySQL FULLTEXT query returning 0 rows when matching rows are present?

    - by Don MacAskill
    I have a MySQL table with 200M rows which has a FULLTEXT index on two columns (Title,Body). When I do a simple FULLTEXT query in the default NATURAL LANGUAGE mode for some popular results (they'd return 2M+ rows), I'm getting zero rows back: SELECT COUNT(*) FROM itemsearch WHERE MATCH (Title, Body) AGAINST ('fubar'); But when I do a FULLTEXT query in BOOLEAN mode, I can see the rows in question do exist (I get 2M+ back, depending): SELECT COUNT(*) FROM itemsearch WHERE MATCH (Title, Body) AGAINST ('+fubar' IN BOOLEAN MODE); I have some queries which return ~500K rows which are working fine in either mode, so if it's result size related, it seems to crop up somewhere between 500K and a little north of 2M. I've tried playing with the various buffer size variables, to no avail. It's clearly not the 50% threshold, since we're not getting 100M rows back for any result. Any ideas?

    Read the article

  • What filesystem comes closest to matching NTFS for support of ACLs, and highly-granular permissioning?

    - by warren
    It seems that most other filesystems handle the basic *nix permissions (ugo±rwx), with maybe an addition here or there. Or can be "made" to handle ACLs through the use of other tools on top of the system. On the wikipedia pages about filesystems (http://en.wikipedia.org/wiki/List%5Fof%5Ffile%5Fsystems & http://en.wikipedia.org/wiki/Comparison%5Fof%5Ffile%5Fsystems), it appears that while some do support extended meta-data, none support natively the level of permissioning that NTFS does. Am I wrong in this understanding?

    Read the article

  • How to quickly start Programs like "regedit.exe" from the Windows 7 search bar using substring matching?

    - by Palmin
    The search bar in Windows 7 is very convenient to quickly start applications by pressing the Win-key and then entering the name of the application. For applications with a Program Menu entry like Firefox, it is sufficient to type Fire and Firefox will be displayed in the Programs section of the search results. For other applications like regedit.exe, I have to type the full command regedit before the correct choice regedit.exe appears. Is there any way to have regedit.exe appear already when I have just entered a substring? Please note: I have seen Add my applications to Vista’s Start Search, but I don't want to add anything to the Start Menu manually. This question is about if there is some configuration that can be tuned to make the results appear. I have also seen Search behavior of Windows 7 start menu, but my problem is not that the exe appears under Files, regedit.exe correctly appears under Programs, but it should appear already for a substring match.

    Read the article

  • Easy_install the wrong version of python modules (Mac OS)

    - by user73250
    I installed Python 2.7 on my Mac. When typing "python" in terminal, it shows: $ python Python 2.7 (r27:82508, Jul 3 2010, 20:17:05) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. The Python version is correct here. But when I try to easy_install some modules. The system will install the modules with python version 2.6 which are not able be imported to Python 2.7. And of course I can not do the functions I need in my code. Here's an example of easy_install graphy: $ easy_install graphy Searching for graphy Reading pypi.python.org/simple/graphy/ Reading http://code.Google.com/p/graphy/ Best match: Graphy 1.0.0 Downloading http://pypi.python.org/packages/source/G/Graphy/Graphy- 1.0.0.tar.gz#md5=390b4f9194d81d0590abac90c8b717e0 Processing Graphy-1.0.0.tar.gz Running Graphy-1.0.0/setup.py -q bdist_egg --dist-dir /var/folders/fH/fHwdy4WtHZOBytkg1nOv9E+++TI/-Tmp-/easy_install-cFL53r/Graphy-1.0.0/egg-dist-tmp-YtDCZU warning: no files found matching '*.tmpl' under directory 'graphy' warning: no files found matching '*.txt' under directory 'graphy' warning: no files found matching '*.h' under directory 'graphy' warning: no previously-included files matching '*.pyc' found under directory '.' warning: no previously-included files matching '*~' found under directory '.' warning: no previously-included files matching '*.aux' found under directory '.' zip_safe flag not set; analyzing archive contents... graphy.all_tests: module references __file__ Adding Graphy 1.0.0 to easy-install.pth file Installed /Library/Python/2.6/site-packages/Graphy-1.0.0-py2.6.egg Processing dependencies for graphy Finished processing dependencies for graphy So it installs graphy for Python 2.6. Can someone help me with it? I just want to set my default easy_install Python version to 2.7.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >