Search Results

Search found 3371 results on 135 pages for 'compare'.

Page 10/135 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • How does Dijkstra's Algorithm and A-Star compare?

    - by KingNestor
    I was looking at what the guys in the Mario AI Competition have been doing and some of them have built some pretty neat Mario bots utilizing the A* (A-Star) Pathing Algorithm. (Video of Mario A* Bot In Action) My question is, how does A-Star compare with Dijkstra? Looking over them, they seem similar. Why would someone use one over the other? Especially in the context of pathing in games?

    Read the article

  • Compare double till precision 2

    - by Ram
    Hi, I want to compare two double values till the second digit from decimal point. I am using following statement but I think it is not working properly. dbl1.ToString("g2", CultureInfo.InvariantCulture).Equals( dbl2.ToString("g2", CultureInfo.InvariantCulture)) Am I missing anything here?

    Read the article

  • How to compare arrays in Perl?

    - by devtech
    I have two arrays A & B. I want to do a compare among the elements of the two arrays. my @a = qw"abc def efg ghy klm ghn"; my @b = qw"def ghy jgk lom com klm"; If any element matches then set a flag. Is there any simple way to do this? Please advise.

    Read the article

  • Convert SQL server datetime fields to compare date parts only, with indexed lookups

    - by Caveatrob
    I've been doing a convert(varchar,datefield,112) on each date field that I'm using in 'between' queries in SQL server to ensure that I'm only accounting for dates and not missing any based on the time part of datetime fields. Now, I'm hearing that the converts aren't indexable and that there are better methods, in SQL Server 2005, to compare the date part of datetimes in a query to determine if dates fall in a range. What is the optimal, indexable, method of doing something like this: select * from appointments where appointmentDate='08-01-2008' and appointmentDate<'08-15-2008'

    Read the article

  • Compare term to current date in HQL (with .Net)

    - by Jan-Frederik Carl
    Hello, I want to compare a column value to the current date, using HQL. I tried IQuery someQuery = session.CreateQuery(String.Format( @"Select s.Id From InventoryProductStateItem s where s.ValidFrom < current_date()")); This throws the exception "Incorrect syntax near keyword current_date()" Can someone help me?

    Read the article

  • sql to compare two strings in MS access

    - by tksy
    I am trying to compare a series of strings like the following rodeo rodas carrot crate GLX GLX 1.1 GLX glxs the comparision need not be case sensitive i am trying to write a sql where i am updating the first string with the second string if they match approximately. Here except the second string all the other examples match. I would like to write a query which updates the strings except the second one. is this possible directly in a query in ACCESS thanks

    Read the article

  • How to compare two floating-point values in shell script

    - by Reem
    I had to do a division in shell script and the best way was: result1=`echo "scale=3; ($var1 / $total) * 100"| bc -l` result2=`echo "scale=3; ($var2 / $total) * 100"| bc -l` but I want to compare the values of $result1 and $result2 Using if test $result1 -lt $result2 or if [ $result1 -gt $result2 ] didn't work :( Any idea how to do that?

    Read the article

  • Common way to compare timestamp in oracle, postgres and SQL Server

    - by Pratik
    I am writing a sql query which involves finding if timestamp falls in particular range of days. I have written that in the postgres but it doesn't works in Oracle and SQL Server: AND creation_date < (CURRENT_TIMESTAMP - interval '5 days') AND creation_date >= (CURRENT_TIMESTAMP - interval '15 days') Is there are common way to compare the timestamp across different databases?

    Read the article

  • Compare two Xcode build settings

    - by John Smith
    I have a project where I use two build settings predominantly. Unfortunately today something went wrong. One compiles and the other doesn't. How can I compare the two build settings in XCode to see what the differences are? (For those interested, the error I get in one build is jump to case label crosses initialization of 'const char* selectorName' if you know what this means I'll be very grateful )

    Read the article

  • How can I compare arrays in Perl?

    - by devtech
    I have two arrays, @a and @b. I want to do a compare among the elements of the two arrays. my @a = qw"abc def efg ghy klm ghn"; my @b = qw"def ghy jgk lom com klm"; If any element matches then set a flag. Is there any simple way to do this?

    Read the article

  • how to compare two wav files?

    - by saptarshi
    Lets say we have taken a mic input (say "hello") and stored it as a wav file.Then we take the same input "hello" from the mic .Now if the two are identical then we trigger an action.So how do we compare and check the raw data of the two inputs?

    Read the article

  • How can compare arrays in Perl?

    - by devtech
    I have two arrays A & B. I want to do a compare among the elements of the two arrays. @a = "abc,def,efg,ghy,klm,ghn" @b = "def,ghy,jgk,lom,com,klm" If any element matches then set a flag. Is there any simple way to do this? Please advise.

    Read the article

  • Perl: Compare and edit underlying structure in hash

    - by Mahfuzur Rahman Pallab
    I have a hash of complex structure and I want to perform a search and replace. The first hash is like the following: $VAR1 = { abc => { 123 => ["xx", "yy", "zy"], 456 => ["ab", "cd", "ef"] }, def => { 659 => ["wx", "yg", "kl"], 456 => ["as", "sd", "df"] }, mno => { 987 => ["lk", "dm", "sd"] }, } and I want to iteratively search for all '123'/'456' elements, and if a match is found, I need to do a comparison of the sublayer, i.e. of ['ab','cd','ef'] and ['as','sd','df'] and in this case, keep only the one with ['ab','cd','ef']. So the output will be as follows: $VAR1 = { abc => { 123 => ["xx", "yy", "zy"], 456 => ["ab", "cd", "ef"] }, def => { 659 => ["wx", "yg", "kl"] }, mno => { 987 => ["lk", "dm", "sd"] }, } So the deletion is based on the substructure, and not index. How can it be done? Thanks for the help!! Lets assume that I will declare the values to be kept, i.e. I will keep 456 = ["ab", "cd", "ef"] based on a predeclared value of ["ab", "cd", "ef"] and delete any other instance of 456 anywhere else. The search has to be for every key. so the code will go through the hash, first taking 123 = ["xx", "yy", "zy"] and compare it against itself throughout the rest of the hash, if no match is found, do nothing. If a match is found, like in the case of 456 = ["ab", "cd", "ef"], it will compare the two, and as I have said that in case of a match the one with ["ab", "cd", "ef"] would be kept, it will keep 456 = ["ab", "cd", "ef"] and discard any other instances of 456 anywhere else in the hash, i.e. it will delete 456 = ["as", "sd", "df"] in this case.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >