Daily Archives

Articles indexed Sunday May 2 2010

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

  • Cannot play a recorded sound on device.

    - by B_
    I'm using the exact code from the iPhone Application Programming Guide Multimedia Support to use AVAudioRecorder to record a file to the disk and then AVAudioPlayer to load and play that file. This is working fine in the simulator but is not working on the device. The file gets loaded (we can see the NSTimeInterval) but does not play (play returns false). After it didn't work with the sample code from the website, we tried changing to a bunch of different codecs with no success. And of course, the sound is on. Thanks a bunch.

    Read the article

  • Make a connection to a HTTPS server from Java and ignore the validity of the security certificate

    - by justinhj
    I've been testing some that works with a bunch of https servers with different keys, some of which are invalid and all of them are not in the local key store for my JVM. I am really only testing things out, so I don't care about the security at this stage. Is there a good way to make POST calls to the server and tell Java not to worry about the security certificates? My google searches for this have brought up some code examples that make a class to do the validation, that always works, but I cannot get it to connect to any of the servers.

    Read the article

  • video streaming infrastructure

    - by alchemical
    We would like to set-up a live video-chat web site and are looking for basic architectural advice and/or a recomendation for a particular framework to use. Here are the basic features of the site: Most streams will be broadcast live from a single person with a web cam, etc., and viewed by typically 1-10 people, although there could be up to 100+ viewers on the high side. Audio and video do not have to be super-high quality, but do need to be "good enough". The main point is to convey the basic info in the video (and audio). If occasionally the frame-rate drops low and then goes back to normal fairly soon, we could live with that. Budget is an issue, so we are in general looking for a lower cost solution that will give us most of what we need in temers of performance and quality. We are looking at Peer1 for co-lo. The rest of our web site will be .Net / Windows platform. We are open to looking at any platform for the best streaming solution, although our technical expertise is currently more on the Windows side.

    Read the article

  • How to configure Synaptics TrackPoint/UltraNav for specific applications?

    - by user35825
    I have a ThinkPad X61, and I'd like to configure sensitivity of the Synaptics pointing stick scrolling feature on a per-application basis. I did this about 4 years ago on my ThinkPad T41, using a configuration file - but I can no longer find any info on this configuration file, and there are no configuration files under C:\Program Files\Synaptics. The pointing stick is usually known as TrackPoint or UltraNav in IBM material. Specifically, I'm trying to reduce scrolling sensitivity in Google Chrome on a Windows 7 64-bit X61 ThinkPad.

    Read the article

  • Mono ASP.NET COM Reference

    - by Benny
    I am sure this is a very dumb question to be asking for such a platform as Mono, but I am really stuck with .NET on one of my only remaining projects on MS platforms and would like to move away from it. The only problem is that the web site is dependent on a COM library that is simply a socket wrapper enforcing a messaging protocol. I could reverse the code (I actually made a 10k line attempt) but there's nothing better than the original if it works. Is there any way to reference a tlb export on Mono? Any advice would be greatly appreciated. Thanks in advance!

    Read the article

  • javascript "this" points to Window object again

    - by terrani
    Hello, I asked a question on http://stackoverflow.com/questions/2719643/javascript-this-points-to-window-object regarding "this" points to Window object. here is source code var archive = function(){} archive.prototype.action = { test: function(callback){ callback(); }, test2: function(){ console.log(this); } } var oArchive = new archive(); oArchive.action.test(oArchive.action.test2); Tim Down wrote "but that function is then called using callback(), which means it is not called as a method and hence this is the global object". What are differences between calling a function by its actual name and callback() as shown on the source code? How does console.log(this) in test2 points to Window when it is inside archive.action???

    Read the article

  • Could Grand Central Dispatch (`libdispatch`) ever be available on Windows?

    - by elliottcable
    I’m looking into multithreading, and GCD seems like a much better option than manually writing a solution using pthread.h and pthreads-win32. However, although it looks like libdispatch is either working on, or soon going to be working on, most newer POSIX-compatible systems… I have to ask, what about Windows? What are the chances of libdispatch being ported to Windows? What are the barriers preventing that from happening? If it came down to it, what would I need to do to preform that portage?

    Read the article

  • Binding jQuery UI plugin after $.load

    - by TomWilsonFL
    I have a function that attaches the jQuery UI DatePicker (with my options) to a passed jQuery object: function bindDatepicker($obj) { if ($obj == null) $obj = $("input.date"); $obj.datepicker( { appendText: '(yyyy-mm-dd)', autoSize: true, changeMonth: true, changeYear: true, closeText: 'Done', dateFormat: 'yy-mm-dd', defaultDate: '+1m', minDate: +1, numberOfMonths: 2 } ); } I call this at the beginning of every page to bind it to input elements: $(function() { bindDatepicker($("input.date")); }); This works fine. My problem comes in when I load form elements using $.load(). I cannot attach the DatePicker to any of the loaded elements. For example: $("#id").load("urlToLoad", function() { bindDatepicker($("input.date")); }); Loads the form elements into a div just fine, but will not attach the DatePicker. Why is this? I am stumped. :( Thanks, Tom

    Read the article

  • How can I force PHP's fopen() to return the current version of a web page?

    - by Edward Tanguay
    The current content of this google docs page is: However, when reading this page with the following PHP fopen() script, I get an older, cached version: I've tried two solutions proposed in this question (a random attribute and using POST) and I also tried clearstatcache() but I always get the cached version of the web page. What do I have to change in the following script so that fopen() returns the current version of the web page? <?php $url = 'http://docs.google.com/View?id=dc7gj86r_32g68627ff&amp;rand=' . getRandomDigits(10); echo $url . '<hr/>'; echo loadFile($url); function loadFile($sFilename) { clearstatcache(); if (floatval(phpversion()) >= 4.3) { $sData = file_get_contents($sFilename); } else { if (!file_exists($sFilename)) return -3; $opts = array('http' => array( 'method' => 'POST', 'content'=>'' ) ); $context = stream_context_create($opts); $rHandle = fopen($sFilename, 'r'); if (!$rHandle) return -2; $sData = ''; while(!feof($rHandle)) $sData .= fread($rHandle, filesize($sFilename)); fclose($rHandle); } return $sData; } function getRandomDigits($numberOfDigits) { $r = ""; for($i=1; $i<=$numberOfDigits; $i++) { $nr=rand(0,9); $r .= $nr; } return $r; } ?>

    Read the article

  • How to use bundler gem binaries in path

    - by Sean Chambers
    I just started using bundler for gem packaging in vendor/. The problem is with certain gems (like rspec and cucumber) that have binaries. The binary path that is under my_app/vendor/gems/ruby/1.8/...cucumber-0.6.2/bin/ is not in my path, therefore when I go to run cucumber i get command cannot be found. What is the easiest way to execute the bundled gem binaries from within the app rather than adding a large number of folders to my path? Thanks

    Read the article

  • SQL SERVER The Difference between Dual Core vs. Core 2 Duo

    I have decided that I would not write on this subject until I have received a total of 25 questions on this subject. Here are a few questions from the list: Questions: What is the difference between Dual Core and Core 2 Duo? Which one is recommended for SQL Server: Core 2 Duo or Dual [...]...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

  • Debugging runtime error "Terminating app due to uncaught exception 'NSInternalInconsistencyException

    - by Bill
    I'm going through the Beginning iPhone Development book & stuck in chapter 9. I've spent a few hours trying to debug this error w/o avail: 2010-05-01 19:27:51.361 Nav2[4113:20b] *** Assertion failure in -[UITableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit/UIKit-984.38/UITableView.m:4709 2010-05-01 19:27:51.362 Nav2[4113:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:' 2010-05-01 19:27:51.364 Nav2[4113:20b] Stack: ( ... ) I'm not looking for help w/ the book, but tips for how to debug this error? Can I pin down which of my cellForRowAtIndexPath methods is the problem? And how to inspect the type? Or other things should I look at?

    Read the article

  • C++ LPTSTR to int (but memory overwrite problem using atoi)

    - by Dexter
    I have the following code, m_edit is a MFC CEdit (I know I would never use MFC but project demanded it). It's a simple loop, that gets the text from a text edit, converts it to integer after getting the first line, then stores it in m_y vector. LPTSTR szTemp; vector<int> m_y; for(int i = 0; i < m_edit->GetLineCount(); i++){ szTemp = s_y.GetBuffer(0); m_edit->GetLine(i, szTemp); // get line text store in szTemp y = atoi(szTemp); m_y.push_back(y); szTemp = ""; y = 0; } IMPORTANT EXAMPLE: So let's say the CEdit has 6 numbers: 0 5 2 5 18 6 If you use Visual Studio's debugger you will notice an anomaly!! Here's what it shows: y = 0 y = 5 y = 2 y = 5 y = 18 y = 68 Do you see that? szTemp when inserted into atoi, it returns the number 6, but concatenates the 2nd digit of the last number!!! This is why I did szTemp = "";, but the problem persists. Also, let's say the last number was 17 (not 18), then this time debugger would say y = 67, so it is definitely this problem. However, Visual Studio debugger, when you hover over szTemp during this iteration, it says '6' <--- not '68' inside szTemp. So somehow atoi is ruining it. Am I suppose to concatenate a \0 into szTemp before putting it into atoi? How do I solve this easily?

    Read the article

  • Why aren't the :locals hash variables being passed in to a partial, when called from inside my rake

    - by marshally
    I need to render a bunch of painfully long running partials using a rake task. When I try to pull the partial from a rake task, I get the dreaded "Called id for nil, which would mistakenly be 4" error, which usually means that my locals hash has not been properly set into the partial. Here's the rake task (some variable names have been changed to protect the innocent): namespace :precache do desc "Precache stuff" task :precache => :environment do av = ActionView::Base.new(Rails::Configuration.new.view_path, {}) av.class_eval do include ApplicationHelper end @user = User.find(21) @rank = Rank.find(2) data = av.render(:partial => "reports/listing", :locals => {:user => @user, :rank => @rank}) end end And this is the error that I am getting: ** Execute precache:precache rake aborted! Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id On line #1 of app/views/reports/listing.html.erb 1: <%- @rid = @rank.id %> 2: <%- @cid = @user.id %> 3: <%- cache(:action => 'reports', :key => [arg1, arg2, arg3] ) do %> 4: <%- app/views/reports/_downline_js.html.erb:1 lib/tasks/precache_fragments.rake:12 rake (0.8.7) lib/rake.rb:636:in `call' rake (0.8.7) lib/rake.rb:636:in `execute' rake (0.8.7) lib/rake.rb:631:in `each' rake (0.8.7) lib/rake.rb:631:in `execute' rake (0.8.7) lib/rake.rb:597:in `invoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' rake (0.8.7) lib/rake.rb:590:in `invoke_with_call_chain' rake (0.8.7) lib/rake.rb:583:in `invoke' rake (0.8.7) lib/rake.rb:2051:in `invoke_task' rake (0.8.7) lib/rake.rb:2029:in `top_level' rake (0.8.7) lib/rake.rb:2029:in `each' rake (0.8.7) lib/rake.rb:2029:in `top_level' rake (0.8.7) lib/rake.rb:2068:in `standard_exception_handling' rake (0.8.7) lib/rake.rb:2023:in `top_level' rake (0.8.7) lib/rake.rb:2001:in `run' rake (0.8.7) lib/rake.rb:2068:in `standard_exception_handling' rake (0.8.7) lib/rake.rb:1998:in `run' rake (0.8.7) bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19 details: I'm using Rails 2.3.5 and Ruby 1.8.7. Developing on Mac OSX. Eventually I will be deploying to Heroku.

    Read the article

  • Could Grand Central Dispatch (`libdispatch`) ever be made available on Windows?

    - by elliottcable
    I’m looking into multithreading, and GCD seems like a much better option than manually writing a solution using pthread.h and pthreads-win32. However, although it looks like libdispatch is either working on, or soon going to be working on, most newer POSIX-compatible systems… I have to ask, what about Windows? What are the chances of libdispatch being ported to Windows? What are the barriers preventing that from happening? If it came down to it, what would I need to do to preform that portage? Edit: Some things I already know, to get the discussion started: We need a blocks-compatible compiler that will compile on Windows, no? Will PLBlocks handle that? Can we use the LLVM blocks runtime? Can’t we replace all the pthread.h dependencies in userspace libdispatch with APR calls, for portability? Or, alternatively, use pthreads-win32 I suppose…

    Read the article

  • Silverlight DataGrid Refresh Between Xaml Files

    - by GB
    Hello, I have a Page.xaml file and a AddNewProject.xaml. In the Page.xaml file I have a ProjectDetailsDataGrid and a button to add a new Project. When I click on the Add New Project button the AddNewProject.xaml file becomes visible for the user to enter new project information. I am having a problem trying to refresh the ProjectDetailsDataGrid (on the Page.xaml page) to display the new info. entered from the AddNewProject.xaml page. Is there anyway to accomplish refreshing a datagrid between two seperate xaml files? Thank you for your help.

    Read the article

  • Python's JSON module doesn't use __get__?

    - by Matt
    When I serialize a list of objects with a custom __get__ method, __get__ is not called and the raw (unprocessed by custom __get__) value from __set__ is used. How does Python's json module iterate over an item? Note: if I iterate over the list before serializing, the correct value returned by __get__ is used.

    Read the article

  • WPF: Combine Geometries / Canvas for Geometries?

    - by stefan.at.wpf
    Hello, I have 2 geometries A and B which I'd like to combine like shown at the end of the following drawing: http://www.imagebanana.com/view/9vm6zoy/geocombine.png How could one do this? Is there something like a "virtual canvas for geometries" where I can place A and B, move B accordingly and then get a geometrie from this? Thanks for any hint!

    Read the article

  • How do you deal with denormalization / secondary indexes in database sharding?

    - by Continuation
    Say I have a "message" table with 2 secondary indexes: "recipient_id" "sender_id" I want to shard the "message" table by "recipient_id". That way to retrieve all messages sent to a certain recipient I only need to query one shard. But at the same time, I want to be able to make a query that ask for all messages sent by a certain sender. Now I don't want to send that query to every single shard of the "message" table. One way to do this is to duplicate the data and have a "message_by_sender" table sharded by "sender_id". The problem with that approach is that every time a message has been sent, I need to insert the message into both "message" and "message_by_sender" tables. But what if after inserting into "message" the insertion into "message_by_sender" fail? In that case the message exists in "message" but not in "message_by_sender". How do I make sure that if a message exists in "message" then it also exists in "message_by_sender" without resorting to 2 phase commit? This must be a very common issue for anyone who shards their databases. How do you deal woth it?

    Read the article

  • Need help with regex parsing (in perl)

    - by Charlie
    Hi all, need some help parsing an html file in perl. I used the LWP module to retrieve a webpage into $_ with $/ undefined so there are no newline issues. Then I'm trying to find all strings matching a pattern. How do I do that? I know how to find 1 instance of it, but how do I match all instances? and what data structure would the results go to? a multi dimensional array? my text (excerpt) looks like the following: <TR> <TD BGCOLOR=EEEEEE><A HREF="/program.cgi?pid=1233"><FONT FACE="ARIAL,HELVETICA,SANS-SERIF" SIZE=2>Title 1</A></FONT></TD> <TD BGCOLOR=EEEEEE nowrap><FONT FACE="ARIAL,HELVETICA" SIZE=2>Jun 27 2010 3:00PM</FONT></TD> <TD BGCOLOR=EEEEEE>&nbsp;</TD> </TR> <TR><TD BGCOLOR=EEEEEE COLSPAN=3><IMG SRC="http://images.domain.com/images/spacer.gif" WIDTH=1 HEIGHT=2><BR></TD></TR> <TR><TD COLSPAN=3 BGCOLOR=999999><IMG SRC="http://images.domain.com/images/spacer.gif" HEIGHT=1 WIDTH=1></TD></TR> <TR><TD COLSPAN=3 ><IMG SRC="http://images.domain.com/images/spacer.gif" WIDTH=1 HEIGHT=2><BR></TD></TR> <TR> <TD><A HREF="/program.cgi?pid=1234"><FONT FACE="ARIAL,HELVETICA,SANS-SERIF" SIZE=2>Title 2</A></FONT></TD> <TD nowrap><FONT FACE="ARIAL,HELVETICA" SIZE=2>Jun 29 2010 7:00PM</FONT></TD> <TD>&nbsp;</TD> </TR> <TR><TD COLSPAN=3><IMG SRC="http://images.domain.com/images/spacer.gif" WIDTH=1 HEIGHT=2><BR></TD></TR> <TR><TD COLSPAN=3 BGCOLOR=999999><IMG SRC="http://images.domain.com/images/spacer.gif" HEIGHT=1 WIDTH=1></TD></TR> <TR><TD COLSPAN=3 BGCOLOR=EEEEEE><IMG SRC="http://images.domain.com/images/spacer.gif" WIDTH=1 HEIGHT=2><BR></TD></TR> <TR> <TD BGCOLOR=EEEEEE><A HREF="/program.cgi?pid=1235"><FONT FACE="ARIAL,HELVETICA,SANS-SERIF" SIZE=2>Title 3</A></FONT></TD> <TD BGCOLOR=EEEEEE nowrap><FONT FACE="ARIAL,HELVETICA" SIZE=2>Jul 3 2010 7:00PM</FONT></TD> <TD BGCOLOR=EEEEEE>&nbsp;</TD> </TR> I want to get the following into an array (or any structure): { ["/program.cgi?pdi=1233", "Title 1"], ["/program.cgi?pdi=1234", "Title 2"], ["/program.cgi?pdi=1235", "Title 3"] } Thanks

    Read the article

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