Search Results

Search found 10677 results on 428 pages for 'feature comparison'.

Page 42/428 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • Finding whether a value is equal to the value of any array element in MATLAB

    - by James
    Hi, Can anyone tell me if there is a way (in MATLAB) to check whether a certain value is equal to any of the values stored within another array? The way I intend to use it is to check whether an element index in one matrix is equal to the values stored in another array (where the stored values are the indexes of the elements which meet a certain criteria). So, if the indices of the elements which meet the criteria are stored in the matrix below: criteriacheck = [3 5 6 8 20]; Going through the main array (called array) & checking if the index matches: for i = 1:numel(array) if i == 'Any value stored in criteriacheck' ... "Do this" end Does anyone have an idea of how I might go about this? Thanks in advance

    Read the article

  • How to match words as if in a dictionary, based on len-1 or len+1? Python

    - by pearbear
    If I have a word 'raqd', how would I use python to have a spellcheck, so to speak, to find the word 'rad' as an option in 'spellcheck'? What I've been trying to do is this: def isbettermatch(keysplit, searchword): i = 0 trues = 0 falses = 0 lensearchwords = len(searchword) keysplits = copy.deepcopy(keysplit) searchwords = copy.deepcopy(searchword) #print keysplit, searchwords if len(keysplits) == len(searchwords)-1: i = 0 while i < len(keysplits): j = 0 while j < lensearchwords: if keysplits[i] == searchwords[j]: trues +=1 searchwords.pop(j) lensearchwords = len(searchwords) elif keysplits[i] != searchwords[j]: falses +=1 j +=1 i +=1 if trues >= len(searchwords)-1: #print "-------------------------------------------------------", keysplits return True keysplit is a list like ['s', 'p', 'o', 'i', 'l'] for example, and the searchword would be a list ['r', 'a', 'q', 'd']. If the function returns True, then it would print the keyword that matches. Ex. 'rad', for the searchword 'raqd'. I need to find all possible matches for the searchword with a single letter addition or deletion. so ex. 'raqd' would have an option to be 'rad', and 'poted' could be 'posted' or 'potted'. Above is what I have tried, but it is not working well at all. Help much appreciated!

    Read the article

  • What is the most efficient way to handle points / small vectors in JavaScript?

    - by Chris
    Currently I'm creating an web based (= JavaScript) application thata is using a lot of "points" (= small, fixed size vectors). There are basically two obvious ways of representing them: var pointA = [ xValue, yValue ]; and var pointB = { x: xValue, y: yValue }; So translating my point a bit would look like: var pointAtrans = [ pointA[0] + 3, pointA[1] + 4 ]; var pointBtrans = { x: pointB.x + 3, pointB.y + 4 }; Both are easy to handle from a programmer point of view (the object variant is a bit more readable, especially as I'm mostly dealing with 2D data, seldom with 3D and hardly with 4D - but never more. It'll allways fit into x,y,z and w) But my question is now: What is the most efficient way from the language perspective - theoretically and in real implementations? What are the memory requirements? What are the setup costs of an array vs. an object? ... My target browsers are FireFox and the Webkit based ones (Chromium, Safari), but it wouldn't hurt to have a great (= fast) experience under IE and Opera as well...

    Read the article

  • Regex vs. string:find() for simple word boundary

    - by user576267
    Say I only need to find out whether a line read from a file contains a word from a finite set of words. One way of doing this is to use a regex like this: .*\y(good|better|best)\y.* Another way of accomplishing this is using a pseudo code like this: if ( (readLine.find("good") != string::npos) || (readLine.find("better") != string::npos) || (readLine.find("best") != string::npos) ) { // line contains a word from a finite set of words. } Which way will have better performance? (i.e. speed and CPU utilization)

    Read the article

  • Comparing arrays with sql

    - by Nissim
    I want to perform a 'SELECT' statement with a byte array (binary) parameter as a condition. I tried to google it, but didn't find anything useful. In general, I keep information of files in the database. one of the properties is the file's hash (binary). I want to give a hash to the SELECT statement, and get all rows with the same hash value.

    Read the article

  • Quickest way to compute the number of shared elements between two vectors

    - by shn
    Suppose I have two vectors of the same size vector< pair<float, NodeDataID> > v1, v2; I want to compute how many elements from both v1 and v2 have the same NodeDataID. For example if v1 = {<3.7, 22>, <2.22, 64>, <1.9, 29>, <0.8, 7>}, and v2 = {<1.66, 7>, <0.03, 9>, <5.65, 64>, <4.9, 11>}, then I want to return 2 because there are two elements from v1 and v2 that share the same NodeDataIDs: 7 and 64. What is the quickest way to do that in C++ ? Just for information, note that the type NodeDataIDs is defined as I use boost as: typedef adjacency_list<setS, setS, undirectedS, NodeData, EdgeData> myGraph; typedef myGraph::vertex_descriptor NodeDataID; But it is not important since we can compare two NodeDataID using the operator == (that is, possible to do v1[i].second == v2[j].second)

    Read the article

  • Perl check for the existence of a value in a regular array

    - by Mel
    I am trying to figure out a way of checking for the existence of a value in an array without iterating through the array. I am reading a file for a parameter. I have a long list of parameters I do not want to deal with. I placed these unwanted parameters in an array @badparams I want to read a new parameter and if it does not exist in @badparams, process it. If it does exist in @badparams, go to the next read.

    Read the article

  • Comparing the values of two nsstrings

    - by user1776234
    So I have been trying to compare two NSStrings in xcode. However, it is not working. What am I doing wrong? NSString Prog are characters that are xml parsed from mysql char *cStr = "YES"; NSString *str3 = [NSString stringWithUTF8String:cStr]; if ([str3 isEqualToString:prog]) { [switch1 setOn:YES animated:YES]; } else { [switch1 setOn:NO animated:YES]; }

    Read the article

  • How much does precomputation (matching a series of strings and their permutations with a set number

    - by nipun
    Consider a typical slots machine with n reels(say reel1: a,b,c,d,w1,d,b, ..etc). On play we generate a concatenated string of n objects (like for above, chars) We have a paytable which lists winning strings with payout amounts. The problem is a wild character (list of wilds: w1,w2) which can replace {w1:a,b,c},{w2:a} ..etc. Is it really worthwhile to have all possible winning strings permutations with the wilds precomputed and used or simply at the time of occurance, generate all combinations with the pattern in hand accordingly. I did'nt really see much difference initially, but now if I need to scale the machine to handle 11+ reels with a much higher concentration of wilds than previously, I need to figure out the exact approach for this particular bit. Any ideas will be really appreciated :)

    Read the article

  • SQL SERVER – Another lesser known feature of SQL Server Management Studio 2012 – Guest Post by Balmukund Lakhani

    - by Pinal Dave
    This is a fantastic blog post from my dear friend Balmukund ( blog | twitter | facebook ). He had presented a fantastic session in our last UG and there were lots of requests from attendees that he blogs about it. Well, here is the blog post about the same very popular UG session. Let us read the entire blog post in the voice of the Balmukund himself. In one of my previous guest blog on SQL Authority, I wrote about “Additional Connection Parameter” tab of login screen in SQL Server Management Studio (a.k.a. SSMS). On the similar lines, this blog is going to show little less known new feature of login main screen (“Connect to Server”) of SSMS 2012. You might have seen below screen countless times and you might wonder what is there is blog about in this simple screen. Well, continue reading and you would get the answer. Many times, DBA have to login to production server from non-regular machine, may be a developer’s workstation. Once you login to SQL, do your work and close the management studio. Do you know that your server name is saved in management studio? Of course, very useful feature because you may not like to type server name/IP address every time. Whatever servers you have connected, it would be stored by management studio. But sometime, it’s annoying! What you would do if you want SQL Server Management Studio to forget “all” the servers listed in drop down of Server name? To do that, you need to know how and where it’s stored. You can use one of my favorite tool from sysinternals called Process Monitor (also known as ProcMon) and easily figure out that this is stored in a file under your windows user profile. Below is the file in SQL 2008 R2 Management Studio. %appdata%\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin For SQL Server 2012, here is what we can see in ProcMon So, the path is %appdata%\Microsoft\Microsoft SQL Server\110\Tools\Shell\SqlStudio.bin So far, you might wonder, where is the new feature? I have been asked by many users to delete entries from SSMS “Connect to Server” server name list. Well, unofficially, you can delete the file directly which we found via ProcMon. Note that delete file to get rid of server list is not officially supported by Microsoft. Better way to achieve this is provided in SSMS 2012. To delete the servers from the list, highlight the name we want to delete (via keyboard or mouse) and then press delete key via keyboard. We can’t be multi-select and has to be done one by one. We can delete as many entries we want. I have delete few from first screenshot taken and here is the modified version. This is not available in SQL 2008 R2 and its previous version. This came from feedback given to SQL Server Product group. Hope you have learned something new today! Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • How to Place DialogBar or Dialog box into pane in vc 2008 or vc 2010 Beta

    - by gbalajimecse
    Hi now i am working in 2003 vc++ and i am converting(migrating) my project in to vc 2008 or new vc 2010 Beta,i saw the feature pack of 2008,2010 regards CDockable Pane(Auto Hode,floating),so i require this features ,i want to place a dialogbox or dialog bar into pane(CDockable Pane class), so i done this in my following code Myframe Code snippet is : if (!m_MyPane.Create(L"MyPane", this, CRect(0,0,0,0), true, IDD_DIALOG1, WS_CHILD|WS_VISIBLE)) return -1; AddDockSite(); EnableDocking(CBRS_ALIGN_ANY); EnableAutoHidePanes(CBRS_ALIGN_ANY); m_MyPane.EnableDocking(CBRS_ALIGN_ANY); DockPane(&m_MyPane, AFX_IDW_DOCKBAR_RIGHT); MyPane class Definition is : include "stdafx.h" include "Pane.h" include "Resource.h" include "MainFrm.h" include "soft1.h" ifdef _DEBUG undef THIS_FILE static char THIS_FILE[]=FILE; define new DEBUG_NEW endif CPane1::CPane1() { } CPane1::~CPane1() { } BEGIN_MESSAGE_MAP(CPane1, CDockablePane) ON_WM_CREATE() ON_WM_SIZE() END_MESSAGE_MAP() int CPane1::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDockablePane::OnCreate(lpCreateStruct) == -1) return -1; return 0; } void CPane1::OnSize(UINT nType, int cx, int cy) { CDockablePane::OnSize(nType, cx, cy); } when i build it wont shows any error and executed without error in the output the frame show the mypane but mypane didn't show IDD_DIALOG1 So is it anything am i missed please rectify my code and how to place a IDD_DIALOG1 dialogbox in to mypane PLEASE HELP ME REGARDS G.BALAJI

    Read the article

  • javascript: detect if XP or Classic windows theme is enabled

    - by mkoryak
    Is there any way to detect which windows XP theme is in use? I suspect that there is no specific api call you can make, but you may be able to figure it out by checking something on some DOM element, ie feature detection. Another question: does the classic theme even exist on windows vista or windows 7? edit - this is my solution: function isXpTheme() { var rgb; var map = { "rgb(212,208,200)" : false, "rgb(236,233,216)" : true }; var $elem = $("<button>"); $elem.css("backgroundColor", "ButtonFace"); $("body").append($elem); var elem = $elem.get(0); if (document.defaultView && document.defaultView.getComputedStyle) { s = document.defaultView.getComputedStyle(elem, ""); rgb = s && s.getPropertyValue("background-color"); } else if (elem.currentStyle) { rgb = (function (el) { // get a rgb based color on IE var oRG =document.body.createTextRange(); oRG.moveToElementText(el); var iClr=oRG.queryCommandValue("BackColor"); return "rgb("+(iClr & 0xFF)+","+((iClr & 0xFF00)>>8)+","+ ((iClr & 0xFF0000)>>16)+")"; })(elem); } else if (elem.style["backgroundColor"]) { rgb = elem.style["backgroundColor"]; } else { rgb = null; } $elem.remove(); rgb = rgb.replace(/[ ]+/g,"") if(rgb){; return map[rgb]; } } Next step is to figure out what this function returns on non-xp machines and/or figure out how to detect windows boxes. I have tested this in windows XP only, so vista and windows 7 might give different color values, it should be easy to add though. Here is a demo page of this in action: http://programmingdrunk.com/current-projects/isXpTheme/

    Read the article

  • What is the correct way to deal with similar but independent features?

    - by Koviko
    Let's say we have a feature request come in and we begin work on it, which we'll call feature-1. It introduces some new logic to the application, which we'll call logic-A and logic-B. A programmer branches from the release branch and begins work on the feature. Soon after, we get another feature request, which we'll call feature-2. It will implement logic-A and logic-C into the application. The logic A being implemented by this feature is the same logic-A as was implemented in feature-1. Let's also say that given logic-B, logic-A might be implemented slightly differently than it would have been given logic-C, and also differently given both logic-B and logic-C (eg. with only one feature, the code would be less flexible than with both). How should this situation be handled? Concrete Example (to help with any confusion in my wording) feature-1 is a feed from programmers.stackexchange.com. feature-2 is a feed from gaming.stackexchange.com. logic-A is the implementation of a feed at all (assuming the application currently has no feeds), which links to the content as well and gives related information. logic-B is that the feed's source is from programmers.stackexchange.com. Adds to logic-A that the related programming language is displayed. logic-C is that the feed's source is from gaming.stackexchange.com. Adds to logic-A that the related game's name and box art is displayed.

    Read the article

  • How can I change the "timeout" duration for Nautilus "find the filename as you type" feature?

    - by fred.bear
    I often get stalled by the long timeout while typeing the first few letters of a file name in Nautilus... The current timeout seems to be 5 seconds. I'd prefer 1 second ...(as per item 2 on this page about Response Times) I don't use the mouse much, which means I either wait, or press Escape, when I don't find the file... I realize that this is a feature to some, but I'd rather not wait. Is there any way to change this timeout behaviour?

    Read the article

  • What is the Coded UI feature of VS2010 and VS2012?

    - by TATWORTH
    A question recently arose as to what is coded UI? It is a feature of the ultimate and premium versions of Visual Studio 2012 (and 2010).It is described as "Automate user interface tests to validate application UI"Here are some useful links about it:http://codedui101.blogspot.co.uk/2011/07/what-is-codedui.htmlhttp://msdn.microsoft.com/en-us/vstudio/ee957688.aspxhttp://msdn.microsoft.com/en-us/library/dd286726.aspxhttp://www.microsoft.com/visualstudio/eng/products/comparehttp://www.dotnetcurry.com/ShowArticle.aspx?ID=798http://channel9.msdn.com/Blogs/kmcgrath/Introduction-to-Creating-Coded-UI-Tests-with-Visual-Studio-2010

    Read the article

  • Le Service Pack 1 de Visual Studio 2010 est disponible, avec le Feature Pack de Team Foundation Server-Project Server Integration

    Le Service Pack 1 de Visual Studio 2010 est disponible Avec le Feature Pack de Team Foundation Server - Project Server Integration Mise à jour du 10/03/11 Disponible en version bêta depuis décembre 2010, le Service Pack 1 (SP1) de Visual Studio 2010 est désormais disponible en version finale pour les développeurs. Cette version corrige plusieurs bogues de la version beta et offre des fonctionnalités permettant un meilleur support ainsi que l'IntelliTrace pour SharePoint. L'IntelliTrace permet une amélioration du débogage en donnant la possibilité aux développeurs de suivre les événements lors du processus, au lieu d'avoir à les ...

    Read the article

  • PHP - Parse XML subitems using foreach()

    - by Nate Shoffner
    I have an XML file that needs parsing in PHP. I am currenlty using simplexml_load_file to load the file like so: $xml = simplexml_load_file('Project.xml'); Inside that XML file lies a structure like this: <?xml version="1.0" encoding="ISO-8859-1"?> <project> <name>Project 1</name> <features> <feature>Feature 1</feature> <feature>Feature 2</feature> <feature>Feature 3</feature> <feature>Feature 4</feature> </features> </project> What I am trying to do is print the <name> contents along with EACH <feature> element within <features>. I'm not sure how to do this because there is more than 1 element called <feature>. Any help is greatly appreciated.

    Read the article

  • Aironet 1200's Auto-Channel Feature: When should it be used?

    - by Josh Brower
    In our building we have around 25 1200 series Aironets, with a bit of overlap in some areas. Up until this point, we have had them deployed in alternating 1/6/11 channels, but we are wondering if we would get better performance if we used the auto-channel select feature. In looking around, I have seen comments that this feature should not be used as the WAP does a channel scan only on the radio startup, but I have not found this in any Cisco docs. Anybody have anymore information, or real-world experience with this feature? Thanks! -Josh

    Read the article

  • Show CMFCRibbonStatusBar

    - by praetorian20
    Hi, I'm creating a simple SDI app using the new VS2008 service pack. I added ribbon support but all I want on the ribbon are the Open & Close buttons. I commented out all the code that creates the other default buttons and categories but doing this also gets rid of the status bar (CMFCRibbonStatusBar). I can't find what member function is called when I click the checkbox that displays the statusbar in the default generated code. I've tried the following but it doesn't work: m_wndStatusBar.ShowWindow( SW_SHOWNORMAL ); How do I have the status bar showing without having to have the 'Home' category and 'View' panel (with the 'Show status bar' checkbox) being generated? Thanks, Ashish.

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >