Daily Archives

Articles indexed Sunday June 13 2010

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

  • c++ OpenCV CVCalibrateCamera2 is causing multiple errors

    - by tlayton
    I am making a simple calibration program in C++ using OpenCV. Everything goes fine until I actually try to call CVCalibrateCamera2. At this point, I get one of several errors: If the number of images which I am using is equal to 4 (which is the number of points being drawn from each image: OpenCV Error: Sizes of input arguments do not match (Both matrices must have the same number of points) in unknown function, file ......\src\cv\cvfundam.cpp, line 870 If the number of images is below 20: OpenCV Error: Bad argument (The total number of matrix elements is not divisible by the new number of rows) in unknown function, file ......\src\cxcore\cxarray.cpp, line 2749 Otherwise, if the number of image is 20 or above: OpenCV Error: Unsupported format or combination of formats (Invalid matrix type) in unknown function, file ......\src\cxcore\cxarray.cpp, line 117 I have checked the arguments for CVCalibrateCamera2 many times, and I am certain that they are of the correct dimensions relative to one another. It seems like somewhere the program is trying to reshape a matrix based on the number of images, but I can't figure out where or why. Any ideas? I am using Eclipse Galileo, MINGW 5.1.6, and OpenCV 2.1.

    Read the article

  • PYTHON: Look for match in a nested list

    - by elfuego1
    Hello everybody, I have two nested lists of different sizes: A = [[1, 7, 3, 5], [5, 5, 14, 10]] B = [[1, 17, 3, 5], [1487, 34, 14, 74], [1487, 34, 3, 87], [141, 25, 14, 10]] I'd like to gather all nested lists from list B if A[2:4] == B[2:4] and put it into list L: L = [[1, 17, 3, 5], [141, 25, 14, 10]] Would you help me with this?

    Read the article

  • What coding standards do you follow?

    - by Mark Szymanski
    I was just curious what coding standards people followed. I for one use the following: Brackets ALWAYS go on the next line. For instance: int main() { //Blah... } I never use code folding. (Yes my IDE's do support it (Xcode and Eclipse). Put related functions/methods single-spaced, otherwise double space. Here is an example: int foo = 0; printf("%d",foo); those are related while these are not: printf("Hello, World!"); return(0); I don't put else statements on the same line as the closing bracket for the preceding if statement. Most of the time in Java if a program needs multiple try catch statements I will just put the whole thing in one try catch.

    Read the article

  • DropDownList doesn't postback on SelectedIndexChanged

    - by Sergey Volegov
    I'm writing an ASP.Net webform with some DropDownList controls on it. Then user changes selected item in one of dropdowns, ASP.Net doesn't seem to handle SelectedIndexChanged event until form is submitted with a 'Submit' button click. How do I make my dropdowns handle SelectedIndexChanged instantly? P.S. It's a classic question I have answered too many times, but it seems no one asked it before on stackoverflow.

    Read the article

  • how to detect escape characters in a string

    - by mix
    Given a string named line whose raw version has this value: \rRAWSTRING how can I detect if it has the escape character \r? What I've tried is: if repr(line).startswith('\r'): blah... but it doesn't catch it. I also tried find, such as: if repr(line).find('\r') != -1: blah doesn't work either. What am I missing? thx!

    Read the article

  • Register filetype with the browser?

    - by Lord.Quackstar
    In Android, I am trying to make it so that the user downloads a font from the browser, and I am able to view the font when downloaded. After multiple issues, I still have one lingering one: Registering the filetype with the browser. When trying to download with the Emulator (2.1-u1), I get "Cannot download. The content is not supported on this phone". Okay, so maybe its my manifest file. Updated with this: <activity android:name=".MainActivity" android:label="MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> <catagory android:name="android.intent.category.BROWSABLE"/> <data android:scheme="http"/> <data android:scheme="https"/> <data android:scheme="ftp"/> <data android:host="*"/> <data android:mimeType="*/*"/> <data android:pathPattern=".*zip"/> </intent-filter> </activity> Went back to the browser, and fails again. Restart the Emulator, still fails. Note that I got this format from posts here. Any suggestions on what to do?

    Read the article

  • what possible workarounds are there for "only parameterless constructors are support in Linq to Enti

    - by Ralph Shillington
    In my query I need to return instances of a class that doesn't have a default constructor (specifically this is in a custom Membership provider, and MembershipUser is the culprit) var users = from l in context.Logins select new MembershipUser( Name, l.Username, // username l.Id, // provider key l.MailTo, l.PasswordQuestion, l.Notes.FirstOrDefault().NoteText, l.IsApproved, l.IsLockedOut, l.CreatedOn, l.LastLoginOn.HasValue ? l.LastLoginOn.Value : DateTime.MinValue, l.LastActivityOn.HasValue ? l.LastActivityOn.Value : DateTime.MinValue, DateTime.MinValue, l.LastLockedOutOn.HasValue ? l.LastLockedOutOn.Value : DateTime.MinValue ); is syntacitally correct, but results in a runtime error as Only parameterless constructors and initializers are supported in LINQ to Entities.

    Read the article

  • Oracle .NET Provider DLL hell

    - by Pablo Santa Cruz
    I am currently developing on a Win7-32bits computer. Everything works fine. It's a ASP.NET application. I was able to use Microsoft's Oracle deprecated .NET provider to connect to Oracle (using 32 bit instant client) and also ODP.NET. No problems at all. Application runs fine. The problem comes when I deploy it to IIS7 on Windows 2008 Server 64bit computer. I can't get Microsoft's deprecated .NET provider or ODP.NET to work easily. Is there a straightforward way to use a 32bit based ODP.NET or Microsoft's Oracle deprecated .NET provider in Windows 2008 Server 64bits? DLL hell here! Thanks.

    Read the article

  • NHibernate QueryOver Issue

    - by Yoann. B
    Hi, I've a query that works well with the NH 3.0 LINQ Provider but not with the QueryOver API. I got a "could not resolve property : Profile.Customer.CustomerId" Exception var query = Session.QueryOver<Suggest>() .Where(p => p.Profile.Customer.CustomerId == customerId) .And(p => p.Job.Customer.CustomerId != customerId); var total = query.RowCount(); Any help ? Thanks.

    Read the article

  • Perl throws an error message about syntax

    - by Ben Dauphinee
    So, building off a question about string matching (this thread), I am working on implementing that info in solution 3 into a working solution to the problem I am working on. However, I am getting errors, specifically about this line of the below function: next if @$args->{search_in} !~ /@$cur[1]/; syntax error at ./db_index.pl line 16, near "next " My question as a perl newbie is what am I doing wrong here? sub search_for_key { my ($args) = @_; foreach $row(@{$args->{search_ary}}){ print "@$row[0] : @$row[1]\n"; } my $thiskey = NULL; foreach $cur (@{$args->{search_ary}}){ print "\n" . @$cur[1] . "\n" next if @$args->{search_in} !~ /@$cur[1]/; $thiskey = @$cur[0]; last; } return $thiskey; }

    Read the article

  • Updating a session variable on a page that uses enablesessionstate=readonly attribute doesn't fail f

    - by chandmk
    Asp.Net allows you you set the session state to readonly at individual page level or in the web.config for all pages. But it doesn't prevent you from creating a brand new session variable on that page or modify an existing session variable. But when you try to use that session variable it is either not available or its value is not modified. Why wouldn't the asp.net framework throw a run time error, if not compile time error, when a write attempt is made to a session on the pages where that is not allowed?

    Read the article

  • Importing a large delimited file to a MySQL table

    - by Tom
    I have this large (and oddly formatted txt file) from the USDA's website. It is the NUT_DATA.txt file. But the problem is that it is almost 27mb! I was successful in importing the a few other smaller files, but my method was using file_get_contents which it makes sense why an error would be thrown if I try to snag 27+ mb of RAM. So how can I import this massive file to my MySQL DB without running into a timeout and RAM issue? I've tried just getting one line at a time from the file, but this ran into timeout issue. Using PHP 5.2.0. Here is the old script (the fields in the DB are just numbers because I could not figure out what number represented what nutrient, I found this data very poorly document. Sorry about the ugliness of the code): <? $file = "NUT_DATA.txt"; $data = split("\n", file_get_contents($file)); // split each line $link = mysql_connect("localhost", "username", "password"); mysql_select_db("database", $link); for($i = 0, $e = sizeof($data); $i < $e; $i++) { $sql = "INSERT INTO `USDA` (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17) VALUES("; $row = split("\^", trim($data[$i])); // split each line by carrot for ($j = 0, $k = sizeof($row); $j < $k; $j++) { $val = trim($row[$j], '~'); $val = (empty($val)) ? 0 : $val; $sql .= ((empty($val)) ? 0 : $val) . ','; // this gets rid of those tildas and replaces empty strings with 0s } $sql = rtrim($sql, ',') . ");"; mysql_query($sql) or die(mysql_error()); // query the db } echo "Finished inserting data into database.\n"; mysql_close($link); ?>

    Read the article

  • A walkthrough to Application State

    This artcile discuss about the Application Level events,Application state with a simple example...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

  • Software to add Lyrics to MP3 files ID3 metadata

    - by Leniel Macaferi
    What software do you use to automatically add lyrics to MP3 files? I mean the kind of sotware that can scan your entire Windows Media Player or iTunes library and do the job. I want to add lyrics to my MP3 files so that when I'm listening to music on my iPhone I can see the lyrics on the screen. Thank you very much for helping me out to find the best software out there. Edit: the operating system I use is Windows 7.

    Read the article

  • Why I am not getting Row value on click using this?

    - by rockers
    $("#grid td:first-child").click(function() { var value = $(this).closest('tr').find('td:eq(2)').text(); // for third column alert(value); var value = $(this).closest('tr').find('td:eq(3)').text(); // for fourth column alert(value); var AccountName = accountid; var x = function() { $(this).click($("#showregiongrid").load('/analyst/ror/regionspeexc/?a=' + AccountName)); } clickTimer = window.setTimeout(x, 300); }); Why i am not getting the row values of eq(2) and eq(3).. is there anyting I am doing wrong? if I delete td:first-child from my click event I am getting null vallues on popup? thanks

    Read the article

  • MooTools/JavaScript variable scope

    - by 827
    I am trying to make each number displayed clickable. "1" should alert() 80, "2" should produce 60, etc. However, when the alert(adjust) is called, it only shows 0, not the correct numbers. However, if the commented out alert(adjust) is uncommented, it produces the correct number on page load, but not on clicking. I was wondering why the code inside addEvents cannot access the previously defined variable adjust. <html> <head> <script type="text/javascript" charset="utf-8" src="mootools.js"></script> <script type="text/javascript" charset="utf-8"> window.addEvent('domready', function() { var id_numbers = [1,2,3,4,5]; for(var i = 0; i<id_numbers.length; i++) { var adjust = (20 * (5 - id_numbers[i])); // alert(adjust); $('i_' + id_numbers[i]).addEvents({ 'click': function() { alert(adjust); } }); } }); </script> </head> <body> <div id="i_1">1</div> <div id="i_2">2</div> <div id="i_3">3</div> <div id="i_4">4</div> <div id="i_5">5</div> </body> </html> Thanks.

    Read the article

  • change dojo namespace

    - by Robert
    I need to change the dojo namespace to something else. I found this stackoverflow post, but it refers to a dojo documentation page that no longer exists. Below is something I tried based on this page, but didn't work: <html <head <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js" djConfig="scopeMap: [[ 'dojo', 'newns' ]]"</script <script newns.addOnLoad(function(){ console.debug("hello world"); }); </script </head <body </body </html Help!

    Read the article

  • PortableArea and MasterPages

    - by Sunny
    How can I design my portable areas such that the consumer can specify the MasterPage & various content placeholders & my portable area renders into those regions at run time? Any code samples and/or ideas? Thanks!

    Read the article

  • Loading Native library to external Package in Eclipse not working. is it a Bug?

    - by TacB0sS
    I was about to report a but to Eclipse, but I was thinking to give this a chance here first: If I add an external package, the application cannot find the referenced native library, except in the case specified at the below: If my workspace consists of a single project, and I import an external package 'EX_package.jar' from a folder outside of the project folder, I can assign a folder to the native library location via: mouse over package - right click - properties - Native Library - Enter your folder. This does not work. In runtime the application does not load the library, System.mapLibraryName(Path) also does not work. Further more, if I create a User Library, and add the package to it and define a folder for the native library it still does not. If it works for you then I have a major bug since it does not work on my computer I test this in any combination I could think of, including adding the path to the windows PATH parameter, and so many other ways I can't even start to remember, nothing worked, I played with this for hours and had a colleague try to assist me, but we both came up empty. Further more, if I have a main project that is dependent on few other projects in my workspace, and they all need to use the same 'EX_package.jar' I MUST supply a HARD COPY INTO EACH OF THEM, it will ONLY (I can't stress the ONLYNESS, I got freaked out by this) work if I have a hard copy of the package in ALL of the project folders that the main project has a dependency on, and ONLY if I configure the Native path in each of them!! This also didn't do the trick. please tell me there is a solution to this, this drives me nuts... Thanks, Adam Zehavi.

    Read the article

  • rails fragment cache store

    - by ash34
    Hi, I am unable to figure out where my cached fragments are being stored. What is the default location for fragment caching. Cached fragment hit: views/listed_products (0.1ms) I cannot find anything in the rails_root/public or rails_root/tmp/cache dirs thanks, ash

    Read the article

  • HP tx2510us shuts down without warning, now won't boot, no BIOS codes, screen doesn't light

    - by Tim S
    Hey all, HP tx2150us worked great for a year and a half, rarely it would shut down instead of sleeping. It started running hot sometimes, I installed Win7, worked great, still running hot. Before Xmas, it gave me evidence of video errors - jagged lines, rows missing. That same night, it started rebooting, then it shut off and wouldn't boot. It gave me a BIOS code, I shut it off to look up the code online. When I turned it on again, it won't boot at all. The LEDs all light up, the fan, HD, and optical all spin up, but the screen never lights up and it doesn't try to boot, nor does it blink any BIOS codes. It just acts like it's sleeping, and won't wake up. I suspected heat problems, so I disassembled it, cleaned the crap out of the fan, and reassembled it, breaking the stereo mic connector. Oh well. When I reassembled it, it booted up into Win7 again, but kept shutting down for no discernible reason. After a dozen or so random reboots like that, it is now back to where it was - turns on but doesn't boot or give BIOS codes. The screen never lights, and everything spins up then idles. Any ideas? I really can't afford to buy a new one and I use(d) it to take ALL my notes, that's why I got a tablet in the first place.

    Read the article

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