Daily Archives

Articles indexed Wednesday June 16 2010

Page 25/119 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • How to draw an unfilled square on top of a stream video using a mouse and track the object enclosed

    - by Haxed
    Hi, I am making an object tracking application. I have used Emgucv 2.1.0.0 to load a video file to a picturebox. I have also taken the video stream from a web camera. Now, I want to draw an unfilled square on the video stream using a mouse and then track the object enclosed by the unfilled square as the video continues to stream. This is what people have suggested so far:- (1) .NET Video overlay drawing(DirectX) - but this is for C++ users, the suggester said that there are .NET wrappers, but I had a hard time finding any. (2) DxLogo sample DxLogo – A sample application showing how to superimpose a logo on a data stream. It uses a capture device for the video source, and outputs the result to a file. Sadly, this does not use a mouse. (3) GDI+ and mouse handling - this area I do not have a clue. And for tracking the object in the square, I would appreciate if someone give me some research paper links to read. Any help as to using the mouse to draw on a video is greatly appreciated. Thank you for taking the time to read this. Many Thanks

    Read the article

  • Eclipse Pydev Ctrl-Click (Go to Definition) Doesn't Work OSX

    - by Koobz
    My Pydev set up in OS X is kind of busted. I'm working on a Django project and I find that Ctrl-Click never actually goes to the definitions of any of my objects or functions. I actually have a symlink to Django/django in my workspace so that it's easier to cross reference Django code. My guess is that something is wrong with the builder, but it doesn't throw up any errors. Does anyone have advice here? Different topic: does anyone know of a good way to use Ctrl-Shift-R (Open resource) and filter files by folder? It's not that useful in python projects where you have 20 urls.py showing up.

    Read the article

  • plupload variable upload path?

    - by SoulieBaby
    Hi all, I'm using plupload to upload files to my server (http://www.plupload.com/index.php), however I wanted to know if there was any way of making the upload path variable. Basically I need to select the upload path folder first, then choose the files using plupload and then upload to the initially selected folder. I've tried a few different ways but I can't seem to pass along the variable folder path to the upload.php file. I'm using the flash version of plupload. If someone could help me out, that would be fantastic!! :) Here's my plupload jquery: jQuery.noConflict(); jQuery(document).ready(function() { jQuery("#flash_uploader").pluploadQueue({ // General settings runtimes: 'flash', url: '/assets/upload/upload.php', max_file_size: '10mb', chunk_size: '1mb', unique_names: false, // Resize images on clientside if we can resize: {width: 500, height: 350, quality: 100}, // Flash settings flash_swf_url: '/assets/upload/flash/plupload.flash.swf' }); }); And here's the upload.php file: <?php /** * upload.php * * Copyright 2009, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ // HTTP headers for no cache etc header('Content-type: text/plain; charset=UTF-8'); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // Settings $targetDir = $_SERVER['DOCUMENT_ROOT']."/tmp/uploads"; //temp directory <- need these to be variable $finalDir = $_SERVER['DOCUMENT_ROOT']."/tmp/uploads2"; //final directory <- need these to be variable $cleanupTargetDir = true; // Remove old files $maxFileAge = 60 * 60; // Temp file age in seconds // 5 minutes execution time @set_time_limit(5 * 60); // usleep(5000); // Get parameters $chunk = isset($_REQUEST["chunk"]) ? $_REQUEST["chunk"] : 0; $chunks = isset($_REQUEST["chunks"]) ? $_REQUEST["chunks"] : 0; $fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : ''; // Clean the fileName for security reasons $fileName = preg_replace('/[^\w\._]+/', '', $fileName); // Create target dir if (!file_exists($targetDir)) @mkdir($targetDir); // Remove old temp files if (is_dir($targetDir) && ($dir = opendir($targetDir))) { while (($file = readdir($dir)) !== false) { $filePath = $targetDir . DIRECTORY_SEPARATOR . $file; // Remove temp files if they are older than the max age if (preg_match('/\\.tmp$/', $file) && (filemtime($filePath) < time() - $maxFileAge)) @unlink($filePath); } closedir($dir); } else die('{"jsonrpc" : "2.0", "error" : {"code": 100, "message": "Failed to open temp directory."}, "id" : "id"}'); // Look for the content type header if (isset($_SERVER["HTTP_CONTENT_TYPE"])) $contentType = $_SERVER["HTTP_CONTENT_TYPE"]; if (isset($_SERVER["CONTENT_TYPE"])) $contentType = $_SERVER["CONTENT_TYPE"]; if (strpos($contentType, "multipart") !== false) { if (isset($_FILES['file']['tmp_name']) && is_uploaded_file($_FILES['file']['tmp_name'])) { // Open temp file $out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? "wb" : "ab"); if ($out) { // Read binary input stream and append it to temp file $in = fopen($_FILES['file']['tmp_name'], "rb"); if ($in) { while ($buff = fread($in, 4096)) fwrite($out, $buff); } else die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}'); fclose($out); unlink($_FILES['file']['tmp_name']); } else die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}'); } else die('{"jsonrpc" : "2.0", "error" : {"code": 103, "message": "Failed to move uploaded file."}, "id" : "id"}'); } else { // Open temp file $out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? "wb" : "ab"); if ($out) { // Read binary input stream and append it to temp file $in = fopen("php://input", "rb"); if ($in) { while ($buff = fread($in, 4096)){ fwrite($out, $buff); } } else die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}'); fclose($out); } else die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}'); } //Moves the file from $targetDir to $finalDir after receiving the final chunk if($chunk == ($chunks-1)){ rename($targetDir . DIRECTORY_SEPARATOR . $fileName, $finalDir . DIRECTORY_SEPARATOR . $fileName); } // Return JSON-RPC response die('{"jsonrpc" : "2.0", "result" : null, "id" : "id"}'); ?>

    Read the article

  • How does one go about understanding GNU source code?

    - by Max Dwayne
    I'm really sorry if this sounds kinda dumb. I just finished reading K&R and I worked on some of the exercises. This summer, for my project, I'm thinking of re-implementing a linux utility to expand my understanding of C further so I downloaded the source for GNU tar and sed as they both seem interesting. However, I'm having trouble understanding where it starts, where's the main implementation, where all the weird macros came from, etc. I have a lot of time so that's not really an issue. Am I supposed to familiarize myself with the GNU toolchain (ie. make, binutils, ..) first in order to understand the programs? Or maybe I should start with something a bit smaller (if there's such a thing) ? I have little bit of experience with Java, C++ and python if that matters. Thanks!

    Read the article

  • Adding new record to a VFP data table in VB.NET with ADO recordsets

    - by Gerry
    I am trying to add a new record to a Visual FoxPro data table using an ADO dataset with no luck. The code runs fine with no exceptions but when I check the dbf after the fact there is no new record. The mDataPath variable shown in the code snippet is the path to the .dbc file for the entire database. A note about the For loop at the bottom; I am adding the body of incoming emails to this MEMO field so thought I needed to break the addition of this string into 256 character Chunks. Any guidance would be greatly appreciated. cnn1.Open("Driver={Microsoft Visual FoxPro Driver};" & _ "SourceType=DBC;" & _ "SourceDB=" & mDataPath & ";Exclusive=No") Dim RS As ADODB.RecordsetS = New ADODB.Recordset RS.Open("select * from gennote", cnn1, 1, 3, 1) RS.AddNew() 'Assign values to the first three fields RS.Fields("ignnoteid").Value = NextIDI RS.Fields("cnotetitle").Value = "'" & mail.Subject & "'" RS.Fields("cfilename").Value = "''" 'Looping through 254 characters at a time and add the data 'to Ado Field buffer For i As Integer = 1 To Len(memo) Step liChunkSize liStartAt = i liWorkString = Mid(mail.Body, liStartAt, liChunkSize) RS.Fields("mnote").AppendChunk(liWorkString) Next 'Update the recordset RS.Update() RS.Requery() RS.Close()

    Read the article

  • how to open HTML page stored on client machine from aspx page.

    - by shania
    Hi, I m developing asp.net application in which I m opening HTML page that is stored on client machine on that page I have a link which will open aspx page on server, On that aspx page I have a button that will open another html page stored on client machine. Since I m new to web development Plz help me and suggest me some solutions for this ASAP. Thanks....

    Read the article

  • python hbase exception

    - by kula
    when i use client.mutateRow(self.tableName, row, mutations) to write data to hbase . there is a exception, IOError: IOError(message="Trying to contact region server Some server, retryOnlyOne=true, index=0, islastrow=true, tries=9, numtries=10, i=0, listsize=1, region=test,,1276665207312 for region test,,1276665207312, row 'hello', but failed after 10 attempts.\nExceptions:\n") i use http://pypi.python.org/pypi/hbase-thrift/0.20.4 to write hbase. seems it is a library bug. anyone can help me ?

    Read the article

  • To create new DB connection or not?

    - by Yeti
    I'm running a cron job (every 15 minutes) which takes about a minute to execute. It makes lots of API calls and stores data to the database. Right now I create a mysql connection at the beginning and use the same connection through out the code. Most of the time is spent making the API calls. Will it be more efficient to create a new database connection only when it's time to store the data (below)? Kill the last connection Wait for API call to complete Create new DB connection Execute query Goto 1

    Read the article

  • Shortcuts and MSI updates

    - by Filip Navara
    We have an installer for application that is compiled using WiX and each version is updated using a new setup package. The installer creates advertised shortcut in Start menu and users often copy this shortcut to desktop or other location. During an application update a major upgrade is performed and the old shortcuts are removed, which causes the ones copied by users to disappear. This causes a major annoyance to the users. Is there a way to update advertised shortcuts when doing MSI major upgrade (ie. different product code)? Or, is there a way to allow minor updates by just running the setup.msi file (without passing a REINSTALLMODE option on the command line)? Or, is the only way to solve this problem to use non-advertised shortcuts?

    Read the article

  • internet service providers

    - by gautam kumar
    I am unclear about the differences between international, national, regional and local ISPs. Please explain the differences and their importance, with examples. I am new to this site, so please forgive me if my question is not up to your expectations.

    Read the article

  • Manage Sending 2010 Documents to the Web with Office Upload Center

    - by Mysticgeek
    One of the main new features being touted in Office 2010 is the ability to upload documents to the Web for sharing and collaboration. Today we look at using Office Upload Center to help manage your uploaded documents. Microsoft Office Upload Center  When you upload an Office 2010 document to the web, a handy tool to manage them is the Office Upload Center. It’s a way to see what is being uploaded or what might have failed to reach the servers. It lets you know if a document failed to upload for some reason. In this case it looks like the incorrect credentials were entered when signing into Windows Live. Click on the Resolve button to get a list of actions you can take to get things corrected.   You can access the Upload Center from the icon which appears on the System Tray when uploading documents. Right-click the icon to control notifications, pause uploads, and access its settings. In the Settings section you can choose how Upload Center displays notifications, select the number of days to keep files in Cache, and delete currently cached files. If you find yourself uploading several documents to the web during the day, the Office Upload Center is a nice feature for managing them. Similar Articles Productive Geek Tips How To Upload Office 2010 Documents to Web Apps Technical PreviewStore, Edit, and Share Documents with Microsoft Web AppsHow To Rip a Music CD in Windows 7 Media CenterKeep Your Office 2007 Documents Readily Available the Easy WayMake Excel 2007 Always Save in Excel 2003 Format TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips HippoRemote Pro 2.2 Xobni Plus for Outlook All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server Greate Image Viewing and Management with Zoner Photo Studio Free Windows Media Player Plus! – Cool WMP Enhancer Get Your Team’s World Cup Schedule In Google Calendar Backup Drivers With Driver Magician TubeSort: YouTube Playlist Organizer XPS file format & XPS Viewer Explained

    Read the article

  • hide vertical scrollbar

    - by Codeffect
    How to hide the vertical scroll bar of a Listbox that is present inside a div. <div id="lstQueriesDiv" style="overflow-y: hidden !important; overflow-x: auto !important; Width: 650px; height:167px;" > <asp:ListBox ID="lstQueries" runat="server" CssClass="cssLstQueries" Rows="9"></asp:ListBox> </div> css: .cssLstQueries{ Width:auto; } I want to hide the vertical scrollbar of the listbox not the the vertical scrollbar of the div.

    Read the article

  • What are "named tuples" in Python?

    - by Denilson Sá
    Reading the changes in Python 3.1, I found something... unexpected: The sys.version_info tuple is now a named tuple: I never heard about named tuples before, and I thought elements could either be indexed by numbers (like in tuples and lists) or by keys (like in dicts). I never expected they could be indexed both ways. Thus, my questions are: What are named tuples? How to use them? Why/when should I use named tuples instead of normal tuples? Why/when should I use normal tuples instead of named tuples? Is there any kind of "named list" (a mutable version of the named tuple)?

    Read the article

  • metrics in sonar

    - by senzacionale
    http://docs.codehaus.org/display/SONAR/Metric+definitions how can i use metrics in sonar? Is there any plugin for all this metrics? here are plugins but not for all metrics: http://docs.codehaus.org/display/SONAR/Sonar+Plugin+Library/

    Read the article

  • Rails - Permission denied when try to save uploaded file in windows

    - by logoin
    I'm writing my own file upload in rails. I saw some related questions but it doesn't answer my question. I use File.open ("#{RAILS_ROOT}/public/docs/attachments/#{@file_name}", "wb") {|f| f.write(@temp_file.read)} to write the file on my local machine (OS: Windows XP) instead of saving it in database. I got a Permission denied error on the File.open method. Since I have cygwin installed, I chmod 777 the folder that files should write to and also make sure the file I upload can be read. But I'm still getting the same error. Any ideas? Thanks!

    Read the article

  • mysql - combining columns and tables

    - by Phil Jackson
    Hi, I'm not much of a SQL man so I'm seeking help for this one. I have a site where I have a database for all accounts and whatnot, and another for storing actions that the user has done on the site. Each user has their own table but I want to combine the data of each user group ( all users that are "linked together" ) and order that data in the time the actions took place. Heres what I have; <?php $query = "SELECT `TALKING_TO` FROM `nnn_instant_messaging` WHERE `AUTHOR` = '" . DISPLAY_NAME . "' AND `TALKING_TO` != ''"; $query = mysql_query( $query, $CON ) or die( "_error_ " . mysql_error()); if( mysql_num_rows( $query ) != 0 ) { $table_str = ""; $select_ref_clause = "( "; $select_time_stamp_clause = "( "; while( $row = mysql_fetch_array( $query ) ) { $table_str .= "`actvbiz_networks`.`" . $row['TALKING_TO'] . "`, "; $select_ref_clause .= "`actvbiz_networks`.`" . $row['TALKING_TO'] . ".REF`, "; $select_time_stamp_clause .= "`actvbiz_networks`.`" . $row['TALKING_TO'] . ".TIME_STAMP`, "; } $table_str = $table_str . "`actvbiz_networks`.`" . DISPLAY_NAME . "`"; $select_ref_clause = substr($select_ref_clause, 0, -2) . ") AS `REF`, "; $select_time_stamp_clause = substr($select_time_stamp_clause, 0, -2) . " ) AS `TIME_STAMP`"; }else{ $table_str = "`actvbiz_networks`.`" . DISPLAY_NAME . "`"; $select_ref_clause = "`REF`, "; $select_time_stamp_clause = "`TIME_STAMP`"; } $where_clause = $select_ref_clause . $select_time_stamp_clause; $query = "SELECT " . $where_clause . " FROM " . $table_str . " ORDER BY TIME_STAMP"; die($query); $query = mysql_query( $query, $CON ) or die( "_error_ " . mysql_error()); if( mysql_num_rows( $query ) != 0 ) { }else{ ?> <p>Currently no actions have taken place in your network.</p> <?php } ?> The code above returns the sql statement: SELECT ( `actvbiz_networks`.`john_doe.REF`, `actvbiz_networks`.`Emmalene_Jackson.REF`) AS `REF`, ( `actvbiz_networks`.`john_doe.TIME_STAMP`, `actvbiz_networks`.`Emmalene_Jackson.TIME_STAMP` ) AS `TIME_STAMP` FROM `actvbiz_networks`.`john_doe`, `actvbiz_networks`.`Emmalene_Jackson`, `actvbiz_networks`.`act_web_designs` ORDER BY TIME_STAMP I really am learning on my feet with SQL. Its not the PHP I have a problem with ( I can quite happly code away with PHP ) I'ts just help with the SQL statement. Any help much appreciated, REgards, Phil

    Read the article

  • Ruby - Manipulating Time/DateTime by the Hour/Day?

    - by viatropos
    Where can I find some examples on how to manipulate the time objects by days/hours/etc? I would like to do this: time.now_by_hour #=> "Tue Jun 15 23 MST 2010" time.now_by_day #=> ""Tue Jun 15 MST 2010" time.now_by_hour - 4.weeks - 3.days #=> "Sat May 15 MST 2010" What is the recommended order of operations? The reason for this is I would like to run through lists of times and sort them by date to the hour, not to the minute and second.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >