Daily Archives

Articles indexed Tuesday June 8 2010

Page 13/122 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Cocoa touch SDK 3.2 - How to play video

    - by teepusink
    Hi, How do I play video on SDK 3.2 (iPad)? Read many questions here but they talked mostly for iPhone. For example, the MoviePlayer example here http://developer.apple.com/iphone/library/samplecode/MoviePlayer_iPhone/Introduction/Intro.html That works on 3.1.3 but when I run it on 3.2, it doesn't work. So basically I'm able to play a video on 3.1.3 using this code but the same code won't run on 3.2 NSString *moviePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Movie.mp4"]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:moviePath]]; moviePlayer.movieControlMode = MPMovieControlModeDefault; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer]; [moviePlayer play]; Thanks, Tee

    Read the article

  • Android P2P Multiplayer game (with a) XMPP/Google talk b) JXTA peerdroid c) other way)

    - by Kristof
    Hi, I am an android developer and I made some board games. Now i want to make some of my board games multiplayer. I don't want to create and host my own web service, so i thought about P2P. The first thing i found was the XMPP protocol, however it's not real P2P, but if i can use the existing google talk service, i'm ready to go. Is this possible while using your existing google account without interfering with the normal working of your google talk client? Then i heard about JXTA, a real P2P solution, and it's already ported from J2ME to Android (http://code.google.com/p/peerdroid/). Maybe i am overcomplexing things here (as i do sometimes) I just want to know the easiest way to do simple P2P for a boardgame. All your opinions are welcome! Thanks in advance

    Read the article

  • Generating JSON request manually, returned HTML causing issues.

    - by mrblah
    Hi, I am generating my JSON manually, and I even escaped for quotes with a preceding backslash. It is causing me problems. My HTML returned looks something like: <div class="blah"><div class="a2">This is just a test! I hope this work's man!</div></div> string json = "MY HTML HERE"; json = json.Replace(@"""", @"\"""); Is there more to replace than just the double quotes?

    Read the article

  • Is it possible to set two encodings for one hml?

    - by Horace Ho
    Is there a way to specify certain part of a html file as another encoding? The default encoding for the (generated) html is utf-8. However, some of the included data to be inserted in the html is in another encoding. It's something like: <div> the normal html in utf-8 </div> <div> <%= raw_data_in_another_encoding %> </div> Is there a way to hint a browser to render the 2nd <div> in another encoding? thanks

    Read the article

  • How do you make cin typesafe?

    - by cactusbin
    It is well known that cin is not typesafe (e.g. cin integer; and entering "fifty five" will cause it to flip out). I have seen many not-so-elegant ways to hand this, such as getlining a string and using sstream to convert it to a number, or looping with cin.fail() and clearing the stream and reentering it, etc. Is there any library or anyway to overload the inserter operator to make cin automatically typesafe?

    Read the article

  • Using Full-Text Search in SQL Server 2005 across multiple tables, columns

    - by crisgomez
    Hi, I have a problem, I created a full text search query which return a record(s), in which the paramater I have supplied match(es) in every fields(full-text indexed) of multiple tables. The problem is , when the user.id is equal to ceritification.AId it returns a records eventhough it was not satisfied with the parameter supplied. For this example I supplied a value "xandrick" which return an Id=184, but the problem is it returns two ids which is 184 and 154.What is the best way to return an ID(s) that satisfied of the supplied given value? User table Id Firstname Lastname Middlename Email AlternativeEmail 154 Gregorio Honasan Pimentel [email protected] [email protected] 156 Qwerty Qazggf fgfgf [email protected]. [email protected] 184 Xandrick Flores NULL [email protected] null Certification table Id AID Certification School 12 184 sdssd AMA 13 43 web-based and framework 2 Asian development foundation college 16 184 hjhjhj STI 17 184 rrrer PUP 18 154 vbvbv AMA SELECT DISTINCT Users.Id FROM Users INNER JOIN Certification on Users.Id=Certification.aid LEFT JOIN FREETEXTTABLE (Users,(Firstname,Middlename,Lastname,Email,AlternativeEmail), 'xandrick' )as ftUsr ON Users.Id=ftUsr.[KEY] LEFT JOIN FREETEXTTABLE (Certification,(Certification,School), 'xandrick' )as ftCert ON Certification.Id=ftCert.[KEY]

    Read the article

  • SFTP transfer file and move file to folder

    - by molecule
    Hi all, This is my first post so please excuse my ignorance. I am using a vbscript to zip all .csv type files in a particular folder. After some google searches, I have found a workable vbscript to do this and have enabled a scheduled task to automate this. What I need to do next is to transfer the zip file via sftp and then "move" that zip file into another folder. I believe the former can be achieved using pscp.exe via command line but can someone show me how to do the latter? Basically the zipping will be done twice a day and so it will have a timestamp similar to yyyymmdd0900.zip (for 9am schedule) and yyyymmdd1800.zip (for 6pm schedule). After the transfer, I want to move (not copy) the zip file generated into another folder. Any pointers would be greatly appreciated. Thank you all in advance.

    Read the article

  • Save jQuery callback functions in a separate file

    - by Danny Herran
    Probably I missed something, but lets say I have this: $('a.delete').click(function(){ resp=window.confirm("Are you sure you want to delete this?"); if(resp) return true; else return false; } Now, I want to save that callback function into a separate js file, because I will use it in several pages. My logic told me to do this: $('a.del').click(delete_element()); Having my js file like this: function delete_element(){ resp=window.confirm("Are you sure you want to delete this?"); if(resp) return true; else return false; } This doesn't work. Everytime my page loads, it displays the confirm window, even if I haven't clicked the link. It is clear that my logic failed this time. What am I missing?

    Read the article

  • Extracting note onset from Polyphonic MIDI using jMusic API

    - by Dolphin
    Hi May I know whether it's possible to extract note onset and other musical details (e.g. pitch, note duration) form polyphonic MIDI(i.e. either multiples notes played from treble and bass voices, or chords) using the jMusic API? It has a method to extract note onset - but it returns zero each time for a given note. However extracting pitch and duration for monophonic (i.e. single note) MIDI using jMusic is possible. But when there exist chords it only captures a single note of the chord, and note onset returns zero each time. Is there a way I can resolve this? Appreciate any insight asap. Thanks in advance

    Read the article

  • Ruby Large HTML getting error, limit to header size

    - by Joe Stein
    def mailTo(subject,msg,folks) begin Net::SMTP.start('localhost', 25) do |smtp| smtp.send_message "MIME-Version: 1.0\nContent-type: text/html\nSubject: #{subject}\n#{msg}\n#{DateTime.now}\n", '[email protected]', folks end rescue => e puts "Emailing Sending Error - #{e}" end end when the HTML is VERY large I get this exception Emailing Sending Error - 552 5.6.0 Headers too large (32768 max) how can i get a larger html above max to work with Net::SMTP in Ruby

    Read the article

  • IE7 - jquery addClass() breaks floating elements

    - by Patrick
    I have this nav that uses addClass('hover') when the mouse is rolled over an item. This works fine except in IE7 when the addClass function is called every element with float:left stops floating and the page totally loses its structure. This is my JS: _this.position_sub_menus = function(){ $('#header #nav > ul > li').mouseenter( function(e){ pos = $(this).offset(); height = $(this).height(); lvl2 = '#' + $(this).attr('id') + '-submenu'; if( $(this).position().left > ($('#nav').width()/2)){ pos.left = pos.left - $(lvl2).width() + $(this).width(); } $(this).addClass('hover'); $(lvl2).show(); $(lvl2).css( { 'left' : (pos.left - 12) + 'px', 'top' : pos.top + height + 'px'}); } ); This is the CSS of the of the elements that break: display: inline; float: left; margin-left: 10px; margin-right: 10px; position: relative; It's CSS from the 960 grid system. When I comment out the $(this).addClass('hover'); line the floated elements dont break. Is anyone familiar with this IE7 problem? Thanks guys

    Read the article

  • RewriteRule - take all urls with dash

    - by Qiao
    I need to redirect all urls with dash to a specific page. For example: site.com/this-url to site.com/page.php?url=this-url RewriteRule RewriteRule ^(.+-.+)$ page.php?url=$1 just hang http. No response. What is wrong and how it can be done?

    Read the article

  • Eclipse - limiting a command's visibility to a specific perspective

    - by Tom
    How do I limit the visibility of an Eclipse command in menus and the toolbar to just one perspective? It is currently showing up in all perspectives, but it only makes sense to have it around when working in this particular perspective. It seems like this could be done with "contexts", but I was wondering if there was something simpler.

    Read the article

  • Treeview Childern

    - by Arpit
    HI I have treeview as below . Account Payable Address Customer Account Receivable Address Area If I will select Parent nodes then how I can display in listview of particular childern nodes .Also when I click on root node then How I can display only all parent nodes in listview . Thanks .

    Read the article

  • GCC compiling a dll with __stdcall

    - by Chad
    When we compile a dll using __stdcall inside visual studio 2008 the compiled function names inside the dll are. FunctionName Though when we compile the same dll using GCC using wx-dev-cpp GCC appends the number of paramers the function has, so the name of the function using Dependency walker looks like. FunctionName@numberOfParameters or == FunctionName@8 How do you tell GCC compiler to remove @nn from exported symbols in the dll?

    Read the article

  • Xcode: gcc-4.2 failed with exit code 1

    - by genesys
    Hi! I'm working on a game for the iPhone where I use the Oolong engine for rendering, and now I just tried to update my project to the newest version. However - now I get the following error when I try to compile: gcc-4.2 failed with exit code 1 in the build results I see in which cpp file the error happens, but I don't see any additional information. how can I get more info about what is going wrong in order to track down the problem? edit: after inspecting the compile output, i got the following lines, where the error occurs: {standard input}:61:selected processor does not support 'fmrx r0, fpscr' {standard input}:62:unshifted register required -- 'bic r0,r0,#0x00370000' ...somemorelines {standard input}:69:selected processor does not support 'fmxr fpscr,r0' this is some VFO code from one of the #include files. it works fine in the examples that come with the egnine. could there be something screwed up with my project settings? I compared them to the one of the example and they seem to be identical

    Read the article

  • Force compile-time linking of all classes in a SWC

    - by aaaidan
    Using Flash CS4, I am making a game that has a dozen or so sounds and a couple of music tracks. To cut down on publish/compile time, I have moved the sounds and music into an (external) SWC, which is located in a "Library Path" for the project. This works, but with a caveat... Until before I externalised the assets, I had been dynamically instantiating the Sound objects of the embedded sound by getting their classes with getDefinitionByName. // something like... var soundSubClass:Class = Class(getDefinitionByName(soundClassName)); var mySound:Sound = new soundSubClass(); But now that they're located in an external SWC, I need to have "concrete" references to the classes in order to load them like this, otherwise they are not included in the published SWF, and there is a runtime error when getDefinitionByName tries to get a class that doesn't exist. So, my question: in Flash Professional CS4, is there any way to force a library's assets to be included, regardless of whether they are statically linked? FlashDevelop has a compiler option "SWC Include Libraries", which is exactly what I want, and is distinct from the "SWC Libraries" option. The description of the "SWC Include Libraries" option is "Links all classes inside a SWC file to the resulting application SWF file, regardless of whether or not they are used." (Also, it's important to me that all the assets are contained within the one compiled SWF. Linking at runtime isn't what I'm after.)

    Read the article

  • runtime loading of ValidateAntiForgeryToken Salt value

    - by p.campbell
    Consider an ASP.NET MVC application using the Salt parameter in the [ValidateAntiForgeryToken] directive. The scenario is such that the app will be used by many customers. It's not terribly desirable to have the Salt known at compile time. The current strategy is to locate the Salt value in the web.config. [ValidateAntiForgeryToken(Salt = Config.AppSalt)] //Config.AppSalt is a static property that reads the web.config. This leads to a compile-time exception suggesting that the Salt must be a const at compile time. An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type How can I modify the application to allow for a runtime loading of the Salt so that the app doesn't have to be re-salted and recompiled for each customer? Consider that the Salt won't change frequently, if at all, thereby removing the possibility of invalidating form

    Read the article

  • VB.net Unique Hardware ID ideas

    - by xzerox
    I was wondering if there would be anything else I could use in my Hardware ID protection that would make it much more unique. I am currently using Processor ID Volume ID Mac Address Graphics Card Name If you guys can provide source codes to anything else that would make it even more unique please tell me.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >