Search Results

Search found 289 results on 12 pages for 'toy yoda'.

Page 3/12 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to do motion tracking of a object using video

    - by Niroshan
    Could someone direct me to a tutorial or guide me how to track motion of a object moving with 6 DOF. I am planing to use a video stream of a moving toy car. I want to calculate displacement and rotation angle of the toy car. I came across some research papers but couldn't find any libraries to the job. Is there a way to do this using OpenCV or Matlab or some other freely available software? Thank you

    Read the article

  • Checking negative of a condition

    - by oym
    What is the (slightly pejorative) term for checking the negative of a condition (rather than the positive which is often more readable): e.g. if(!someVar) { return null; } else { return doSomethingInteresting(); } instead of doing this (which is arguably more readable) if(someVar) { return doSomethingInteresting(); } else { return null; } I vaguely remember there being a term for this; something in the same spirit as the term Yoda conditions.

    Read the article

  • Ember nested route. Load more models

    - by user3568719
    JsBin http://jsbin.com/EveQOke/153/ I know how to load more then one model to a route, using Ember.RSVP.hash. (see Jsbin Children menu). I use dynamic part to access one elem from a collection children/1. But i cant load more models to a nested resource. In my example i want to populate all the toys for a select, not just list the toys of the child. I have tried to access the model of the route children App.ChildRoute = Ember.Route.extend({ model: function(param){ return Ember.RSVP.hash({ allToys: this.modelFor("children"), child:this.store.find('child', param.child_id) }); } }); and use its model's toy property (since there have already loaded all of the toys) child.hbs <h4>All avaiable toys</h4> <table> {{#each toy in model.allToys.toys}} <tr> <td>{{toy.name}}</td> </tr> {{/each}} </table>

    Read the article

  • HMTL5 Anti Aliasing Browser Disable

    - by Tappa Tappa
    I am forced to consider writing a library to handle the fundamental basics of drawing lines, thick lines, circles, squares etc. of an HTML5 canvas because I can't disable a feature embedded in the browser rendering of the core canvas algorithms. Am I forced to build the HTML5 Canvas rendering process from the ground up? If I am, who's in with me to do this? Who wants to change the world? Imagine a simple drawing application written in HTML5... you draw a shape... a closed shape like a rudimentary circle, free hand, more like an onion than a circle (well, that's what mine would look like!)... then imagine selecting a paint bucket icon and clicking inside that shape you drew and expecting it to be filled with a color of your choice. Imagine your surprise as you selected "Paint Bucket" and clicked in the middle of your shape and it filled your shape with color... BUT, not quite... HANG ON... this isn't right!!! On the inside of the edge of the shape you drew is a blur between the background color and your fill color and the edge color... the fill seems to be flawed. You wanted a straight forward "Paint Bucket" / "Fill"... you wanted to draw a shape and then fill it with a color... no fuss.... fill the whole damned inside of your shape with the color you choose. Your web browser has decided that when you draw the lines to define your shape they will be anti-aliased. If you draw a black line for your shape... well, the browser will draw grey pixels along the edges, in places... to make it look like a "better" line. Yeah, a "better" line that **s up the paint / flood fill process. How much does is cost to pay off the browser developers to expose a property to disable their anti-aliasing rendering? Disabling would save milliseconds for their rendering engine, surely! Bah, I really don't want to have to build my own canvas rendering engine using Bresenham line rendering algorithm... WHAT CAN BE DONE... HOW CAN THIS BE CHANGED!!!??? Do I need to start a petition aimed at the WC3???? Will you include your name if you are interested??? UPDATED function DrawLine(objContext, FromX, FromY, ToX, ToY) { var dx = Math.abs(ToX - FromX); var dy = Math.abs(ToY - FromY); var sx = (FromX < ToX) ? 1 : -1; var sy = (FromY < ToY) ? 1 : -1; var err = dx - dy; var CurX, CurY; CurX = FromX; CurY = FromY; while (true) { objContext.fillRect(CurX, CurY, objContext.lineWidth, objContext.lineWidth); if ((CurX == ToX) && (CurY == ToY)) break; var e2 = 2 * err; if (e2 > -dy) { err -= dy; CurX += sx; } if (e2 < dx) { err += dx; CurY += sy; } } }

    Read the article

  • Mybatis nested collection doesn't work correctly with column prefix

    - by Shikarn-O
    I need to set collection for object in another collection using mybatis mappings. It works for me w/o using columnPrefix, but I need it since there are a lot of repeteable columns. <collection property="childs" javaType="ArrayList" ofType="org.example.mybatis.Child" resultMap="ChildMap" columnPrefix="c_"/> </resultMap> <resultMap id="ChildMap" type="org.example.mybatis.Parent"> <id column="Id" jdbcType="VARCHAR" property="id" /> <id column="ParentId" jdbcType="VARCHAR" property="parentId" /> <id column="Name" jdbcType="VARCHAR" property="name" /> <id column="SurName" jdbcType="VARCHAR" property="surName" /> <id column="Age" jdbcType="INTEGER" property="age" /> <collection property="toys" javaType="ArrayList" ofType="org.example.mybatis.Toy" resultMap="ToyMap" columnPrefix="t_"/> </resultMap> <resultMap id="ToyMap" type="org.example.mybatis.Toy"> <id column="Id" jdbcType="VARCHAR" property="id" /> <id column="ChildId" jdbcType="VARCHAR" property="childId" /> <id column="Name" jdbcType="VARCHAR" property="name" /> <id column="Color" jdbcType="VARCHAR" property="color" /> </resultMap> <sql id="Parent_Column_List"> p.Id, p.Name, p.SurName, </sql> <sql id="Child_Column_List"> c.Id as c_Id, c.ParentId as c_ParentId, c.Name as c_Name, c.SurName as c_Surname, c.Age as c_Age, </sql> <sql id="Toy_Column_List"> t.Id as t_Id, t.Name as t_Name, t.Color as t_Color </sql> <select id="getParent" parameterType="java.lang.String" resultMap="ParentMap" > select <include refid="Parent_Column_List"/> <include refid="Child_Column_List" /> <include refid="Toy_Column_List" /> from Parent p left outer join Child c on p.Id = c.ParentId left outer join Toy t on c.Id = t.ChildId where p.id = #{id,jdbcType=VARCHAR} With columnPrefix all works fine, but nested toys collection is empty. Sql query on database works correctly and all toys are joined. May be i missed something or this is bug with mybatis?

    Read the article

  • How to get all words of a string in c#?

    - by Joseph Lafuente
    I have a paragraph in a single string and I'd like to get all the words in that paragraph. My problem is that I don't want the suffixes words that end with punctuation marks such as (',','.',''','"',';',':','!','?') and /n /t etc. I also don't want words with 's and 'm such as world's where it should only return world. In the example he said. "My dog's bone, toy, are missing!" the list should be: he said my dog bone toy are missing

    Read the article

  • NDC2010: Rob Conery I cant hear you, there is an ORM in my ear

    In this session Rob Conery tried to show of the new Shiny toy NoSQL in as many forms as possible, discussing the pros and and some cons. He based much of the talk on his experiences with building TekPub and the requirements they had around that. He tried to illustrate that this wasnt a magical [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • New DMV… not yet

    - by Michael Zilberstein
    Downloaded and installed new toy: And while reading BOL, stumbled upon new extremely useful DMV: sys.dm_exec_query_profiles . This DMV enables DBA to monitor query progress while it is being executed. Counters in the DMV are per operation per thread. So we’ll be able to monitor in real time which thread (even for parallel processing) processes which node in the plan. Or find heavy operations “post mortem”. We all know the uncomfortable feeling when some heavy query runs and the boss starts asking...(read more)

    Read the article

  • Dependently typed language best suited to “real world” programming?

    - by Kim
    Which dependently typed programming languages could be used for real world application development? I will mostly be writing toy applications at first, after that maybe web development or a simple DBMS. These are some points, that I think are important: documentation example programs a good/big standard library an easy to use foreign function interface a community of people using the language for real world tasks tool support

    Read the article

  • Moss Really Wants that iPhone! [IT Crowd Video]

    - by Asian Angel
    When Moss walks past the toy grabber game at the arcade, he sees a shiny new iPhone sitting inside! There is no way that Moss can walk away from an opportunity like this, but just what will he have to do in order to get that new iPhone? The IT Crowd [via Fail Desk] Java is Insecure and Awful, It’s Time to Disable It, and Here’s How What Are the Windows A: and B: Drives Used For? HTG Explains: What is DNS?

    Read the article

  • Much ado about NULL: Exploiting a kernel NULL dereference

    <b>Ksplice:</b> "We think that it&#8217;s important for developers and system administrators to be more knowledgeable about the attacks that black hats regularly use to take control of systems, and so, today, we&#8217;re going to start from where we left off and go all the way to a working exploit for a NULL pointer dereference in a toy kernel module."

    Read the article

  • Flash VS HTML 5 - A Web Design Agency's Dilemma

    The iPad was released on the Australian market last week to the usual Apple hype. People lining up outside the iconic Apple store to be the first get to play with the new toy. Regarded as a revolution in the way we browse the web, it has brought with it a new headache for all designers and developers of websites.

    Read the article

  • My Mother Bought a Droid

    - by Ben Griswold
    I converted to iPhone two years ago when I left my former employer and my Blackberry behind. The truth is I half-heartedly purchased my iPhone. It was a great looking device, but as far as I was concerned, it was a mere toy compared to my Blackberry.  I remember hiding the toy in my briefcase when attending business meetings because I didn’t consider it to be professional enough.  I’ve since owned all three generations of the iPhone and, well, iPhone seems to have caught on. I still miss the click of the Blackberry keyboard and the blinking red light letting me know that someone/something requires my attention, but I’m officially an iPhone fanboy now.  My mom called last weekend and asked if she should buy an iPhone. I talked her ear off about everything I love about iPhone. I went on for about twenty minutes. I couldn’t help myself. I mentioned everything from my podcast subscriptions to the application which manages my workouts.  I went as far as to say that someday all smart phones will be referred to as iPhones just like all tissues are referred to as Kleenex and all sodas are referred to as Cokes.  I was really on a roll and then I stopped. I had to…the call dropped.  There I was, strategically standing in the far corner of my backyard where I get the most reliable AT&T reception and the call drops in middle of my iPhone pitch.  Folks, I don’t care how good a salesperson you are, it’s tough to recover from a situation like this.   I dialed my mom back and jokingly asked if she was planning to make calls with her new phone. I explained that AT&T is bound to provide better service eventually but I’m not sure she should wait. After all, I have troubles with the network in San Diego and I can only image how bad it would be for her in Western Massachusetts. Mom called back a few days later exclaiming, “I bought a Droid! I love this phone! I haven’t done anything with it but make phone calls, but I love it.”  I had to laugh.  My mom made the right call (pun intended.)  The iPhone is an amazing device, but owners are constantly reminded that its core function (it’s a phone, remember?) is subpar.  If you love gadgets, you’re probably enthralled by iPhone’s many bells and whistles and, relatively speaking, the terrible phone service might not amount to much.  (Maybe it amounts to a rant on your blog.) The overall iPhone offering is so attractive that consumers are willing to wait for AT&T to straighten up their act or wait until Apple grants a choice of carriers.  But I don’t see either of these remedies coming soon. In the interim, I’m willing to take my iPhone for what it is and just continue to enjoy my favorite features while pretending that poor coverage isn’t a big deal. With any luck, more and more reasonable folks will recognize that Android Phones are legitimate players in the smart phone space, they will buy loads of them and there will become plenty of functional phones to borrow when my “phone” is showing zero bars.  Heck, I’m already covered when I visit my mom.

    Read the article

  • Determining the maximum stack depth

    - by Joa Ebert
    Imagine I have a stack-based toy language that comes with the operations Push, Pop, Jump and If. I have a program and its input is the toy language. For instance I get the sequence Push 1 Push 1 Pop Pop In that case the maximum stack would be 2. A more complicated example would use branches. Push 1 Push true If .success Pop Jump .continue .success: Push 1 Push 1 Pop Pop Pop .continue: In this case the maximum stack would be 3. However it is not possible to get the maximum stack by walking top to bottom as shown in this case since it would result in a stack-underflow error actually. CFGs to the rescue you can build a graph and walk every possible path of the basic blocks you have. However since the number of paths can grow quickly for n vertices you get (n-1)! possible paths. My current approach is to simplify the graph as much as possible and to have less possible paths. This works but I would consider it ugly. Is there a better (read: faster) way to attack this problem? I am fine if the algorithm produces a stack depth that is not optimal. If the correct stack size is m then my only constraint is that the result n is n = m. Is there maybe a greedy algorithm available that would produce a good result here?

    Read the article

  • XML Attributes or Element Nodes?

    - by Camsoft
    Example XML using element nodes: <?xml version="1.0" encoding="utf-8"?> <users> <user> <name>David Smith</name> <phone>0441 234443</phone> <email>[email protected]</email> <addresses> <address> <street>1 Some Street</street> <town>Toy Town</town> <country>UK</country> </address> <address> <street>5 New Street</street> <town>Lego City</town> <country>US</country> </address> </addresses> </user> </users> Example XML using attributes: <?xml version="1.0" encoding="utf-8"?> <users> <user name="David Smith" phone="0441 234443" email="[email protected]"> <addresses> <address street="1 Some Street" town="Toy Town" country="UK" /> <address street="5 New Street" town="Lego City" country="US" /> </addresses> </user> </users> I'm needing to build an XML file based on data from a relation database and can't work out whether I should use attributes or elements. What is best practice when building XML files?

    Read the article

  • Best cubicle toys for programming

    - by dlamblin
    I need some employee/co-worker Christmas gift ideas. Do you have any good cubicle toys that help you to do any of: think about programming problems solve programming problems by representing common abstractions can be directly programmed can interface with a PC based IDE to be programmed. it may present problems that can be solved, to kick start problem solving. Disallowed items are: reference material in book, pamphlet, poster or cheat-sheet form, even if it has kick ass pop-cultural references. edibles. [discuss separately] things that need their own lab-space and/or extensive tools to be worked with. So yes, Lego Mindstorms come to mind, but they aren't cubicle toys because they cost more than cubicle toys would, and they have too many losable parts. comments on the answers so far: The 20 Questions game sounds quite neat as it could get you thinking; The bean balls could be used as tokens in a problem, so I can see that working. The magnetic toys like ball of whacks or the ball-and-stick ones present hands on fun of a structural nature... now can there be a similar hands on fun toy that aids in representing a solution to a problem? The Gui Mags clearly could, but they're quite utility oriented. The AVR Butterfly is less of a toy but definitely priced attractively, cheaper and more responsive than a basic stamp. I'm not going to pick an answer; there's several great suggestions here. Thank you.

    Read the article

  • NSCollectionView: Can the same object not be in the array more than once or is this a bug?

    - by Sean
    I may be doing this all wrong, but I thought I was on the right track until I hit this little snag. Basically I was putting together a toy using NSCollectionView and trying to understand how to hook that all up using IB. I have a button which will add a couple of strings to the NSArrayController: The first time I press this button, my strings appear in the collection view as expected: The second time I press the button, the views scroll down and room is made - but the items don't appear to get added. I just see blank space: The button is implemented as follows (controller is a pointer to the NSArrayController I added in IB): - (IBAction)addStuff:(id)control { [controller addObjects:[NSArray arrayWithObjects:@"String 1",@"String 2",@"String 3",nil]]; } I'm not sure what I'm doing wrong. Rather than try to explain all the connections/binds/etc, if you need more info, I'd be grateful if you could just take a quick look at the toy project itself. UPDATE: After more experimentation as suggested by James Williams, it seems the problem stems from having multiple objects with the same memory address in the array. This confuses either NSArrayController or NSCollectionView (not sure which). Changing my addStuff: to this resulted in the behavior I originally expected: [controller addObjects:[NSArray arrayWithObjects:[NSMutableString stringWithString:@"String 1"],[NSMutableString stringWithString:@"String 2"],[NSMutableString stringWithString:@"String 3"],nil]]; So the question now, I guess, is if this is a bug I should report to Apple or if this is intended/documented behavior and I just missed it?

    Read the article

  • How Star Wars Changed the World [Infographic]

    - by ETC
    The Star Wars film franchise has had an enormous impact on the world of film, gaming, and special effects. Check out this interesting infographic to see how Star Wars has impacted the world. Created by Michelle Devereau, the “How Star Wars Changed the World” infographic is a massive under taking of charting and cross-referencing. It does an excellent job highlighting the impact the Star Wars films have had on film, television, gaming, and the surrounding technologies. At minimum you’ll nail down some new trivia (I learned, for example, that famed puppeteer and voice actor Frank Oz was the man behind Yoda), even better you’ll have an appreciate for what a sweeping effect Star Wars has had. For readers behind finicky firewalls, click here to view a local mirror of the image. How Star Wars Changed the World [Daily Infographic] Latest Features How-To Geek ETC Should You Delete Windows 7 Service Pack Backup Files to Save Space? What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions How to Enable User-Specific Wireless Networks in Windows 7 How to Use Google Chrome as Your Default PDF Reader (the Easy Way) Reclaim Vertical UI Space by Moving Your Tabs to the Side in Firefox Wind and Water: Puzzle Battles – An Awesome Game for Linux and Windows How Star Wars Changed the World [Infographic] Tabs Visual Manager Adds Thumbnailed Tab Switching to Chrome Daisies and Rye Swaying in the Summer Wind Wallpaper Read On Phone Pushes Data from Your Desktop to the Appropriate Android App

    Read the article

  • How to determine if you should use full or differential backup?

    - by Peter Larsson
    Or ask yourself, "How much of the database has changed since last backup?". Here is a simple script that will tell you how much (in percent) have changed in the database since last backup. -- Prepare staging table for all DBCC outputs DECLARE @Sample TABLE         (             Col1 VARCHAR(MAX) NOT NULL,             Col2 VARCHAR(MAX) NOT NULL,             Col3 VARCHAR(MAX) NOT NULL,             Col4 VARCHAR(MAX) NOT NULL,             Col5 VARCHAR(MAX)         )   -- Some intermediate variables for controlling loop DECLARE @FileNum BIGINT = 1,         @PageNum BIGINT = 6,         @SQL VARCHAR(100),         @Error INT,         @DatabaseName SYSNAME = 'Yoda'   -- Loop all files to the very end WHILE 1 = 1     BEGIN         BEGIN TRY             -- Build the SQL string to execute             SET     @SQL = 'DBCC PAGE(' + QUOTENAME(@DatabaseName) + ', ' + CAST(@FileNum AS VARCHAR(50)) + ', '                             + CAST(@PageNum AS VARCHAR(50)) + ', 3) WITH TABLERESULTS'               -- Insert the DBCC output in the staging table             INSERT  @Sample                     (                         Col1,                         Col2,                         Col3,                         Col4                     )             EXEC    (@SQL)               -- DCM pages exists at an interval             SET    @PageNum += 511232         END TRY           BEGIN CATCH             -- If error and first DCM page does not exist, all files are read             IF @PageNum = 6                 BREAK             ELSE                 -- If no more DCM, increase filenum and start over                 SELECT  @FileNum += 1,                         @PageNum = 6         END CATCH     END   -- Delete all records not related to diff information DELETE FROM    @Sample WHERE   Col1 NOT LIKE 'DIFF%'   -- Split the range UPDATE  @Sample SET     Col5 = PARSENAME(REPLACE(Col3, ' - ', '.'), 1),         Col3 = PARSENAME(REPLACE(Col3, ' - ', '.'), 2)   -- Remove last paranthesis UPDATE  @Sample SET     Col3 = RTRIM(REPLACE(Col3, ')', '')),         Col5 = RTRIM(REPLACE(Col5, ')', ''))   -- Remove initial information about filenum UPDATE  @Sample SET     Col3 = SUBSTRING(Col3, CHARINDEX(':', Col3) + 1, 8000),         Col5 = SUBSTRING(Col5, CHARINDEX(':', Col5) + 1, 8000)   -- Prepare data outtake ;WITH cteSource(Changed, [PageCount]) AS (     SELECT      Changed,                 SUM(COALESCE(ToPage, FromPage) - FromPage + 1) AS [PageCount]     FROM        (                     SELECT CAST(Col3 AS INT) AS FromPage,                             CAST(NULLIF(Col5, '') AS INT) AS ToPage,                             LTRIM(Col4) AS Changed                     FROM    @Sample                 ) AS d     GROUP BY    Changed     WITH ROLLUP ) -- Present the final result SELECT  COALESCE(Changed, 'TOTAL PAGES') AS Changed,         [PageCount],         100.E * [PageCount] / SUM(CASE WHEN Changed IS NULL THEN 0 ELSE [PageCount] END) OVER () AS Percentage FROM    cteSource

    Read the article

  • How to change theme in Windows 7 with Powershell script?

    - by Greg McGuffey
    I would like to have a script that would change the current theme of Windows 7. I found the registry entry where this stored, but I apparently need to take some further action to get windows to load the theme. Any ideas? Here is the script that I'm trying to use, but isn't working (registry updated, but theme not changed): ###################################### # Change theme by updating registry. # ###################################### # Define argument which defines which theme to apply. param ( [string] $theme = $(Read-Host -prompt "Theme") ) # Define the themes we know about. $knownThemes = @{ "myTheme" = "mytheme.theme"; "alien" = "oem.theme" } # Identify paths to user themes. $userThemes = " C:\Users\yoda\AppData\Local\Microsoft\Windows\" # Get name of theme file, based on theme provided $themeFile = $knownThemes["$theme"] # Build path to theme and set registry. $newThemePath = "$userThemes$themeFile" $regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\" Set-ItemProperty -path $regPath -name CurrentTheme -value $newThemePath # Update system with this info...this isn't working! rundll32.exe user32.dll, UpdatePerUserSystemParameters Thanks!

    Read the article

  • How can I open a file as read-only from Windows Explorer?

    - by Daniel Daranas
    Is there an easy way to open a file as read-only from Windows Explorer? My inmediate interest is in a Microsoft Access file. I am doing some sanity checks in old MS Access databases and I see that their date is automatically updated when I open them. I don't like this, since it will look like all the old files have been modified today. I am working with Windows XP. Update: As Yoda said, "Do, or do not. There is no try." In my case, it was "do not". I ended up copying the entire (big) folder tree to MyDocuments, and then opening all the databases from there.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >