Search Results

Search found 134 results on 6 pages for 'dusty roberts'.

Page 3/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • AuthSub token from Google/YouTube API is always returned as invalid

    - by Miriam Raphael Roberts
    Anyone out there have experience with the YouTube/Google API? I am trying to login to Google/Youtube using clientLogin, retrieve an AuthSub token, exchange it for a multi-session token and then use it in our upload form. Just a note that we are not going to have other users logging into our (secure) website, this is for our use only (no multi-users). We just want a way to upload videos to our YT account via our own website without having to login/upload to YouTube. Ultimately, everything is dependent on the first step. My AuthSub token is always being returned as invalid (Error '403'). All the steps I used are below with username/password changed. Anyone have an insight on why my AuthSub is always invalid? I am spending an enormous amount of time trying to get this to work. STEP 1: Getting the authsub token from Youtube/Google POST /youtube/accounts/ClientLogin HTTP/1.1 User-Agent: curl/7.10.6 (i386-redhat-linux-gnu) libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.1.4 Host: www.google.com Pragma: no-cache Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Content-Type:application/x-www-form-urlencoded Content-Length: 86 Email=MyGoogleUsername&Passwd=MyGooglePasswd&accountType=GOOGLE&service=youtube&source=Test RESPONSE RECEIVED: Auth=AIwbFAR99f3iACfkT-5PXCB-1tN4vlyP_1CiNZ8JOn6P-......yv4d4zeGRemNm4il1e-M6czgfDXAR0w9fQ YouTubeUser=MyYouTubeUsername CURL COMMAND USED: /usr/bin/curl -S -v --location https://www.google.com/youtube/accounts/ClientLogin --data Email=MyGoogleUsername&Passwd=MyGooglePasswd&accountType=GOOGLE&service=youtube&source=Test --header Content-Type:application/x-www-form-urlencoded STEP 2: Exchanging the AuthSub token for a multi-use token GET /accounts/AuthSubSessionToken HTTP/1.1 User-Agent: curl/7.10.6 (i386-redhat-linux-gnu) libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.1.4 Host: www.google.com Pragma: no-cache Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Content-Type:application/x-www-form-urlencoded Authorization: AuthSub token="AIwbFASiRR3XDKs......p5Oy_VA_9U2yV1enxJoVGSgMlZqTcjKw9mS861vlc9GWTH9D9sQ" Response received: 403 Invalid AuthSub token. curl command used: /usr/bin/curl -S -v --location https://www.google.com/accounts/AuthSubSessionToken --header Content-Type:application/x-www-form-urlencoded -H Authorization: AuthSub token="AIwbFAQR_4xG2g.....vp3BQZW5XEMyIj_wFozHSTEQ-BQRfYuIY-1CyqLeQ" STEP 3: Checking to see if the token is good/valid GET /accounts/AuthSubTokenInfo HTTP/1.1 User-Agent: curl/7.10.6 (i386-redhat-linux-gnu) libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.1.4 Host: www.google.com Pragma: no-cache Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Content-Type:application/x-www-form-urlencoded Authorization: AuthSub token="AIwbFASiRR3XDKsNkaIoPaujN5RQhKs3u.....A_9U2yV1enxJoVGSgMlZqTcjKw9mS861vlc9GWTH9D9sQ" Received response: 403 Invalid AuthSub token. curl command used: /usr/bin/curl -S -v --location https://www.google.com/accounts/AuthSubTokenInfo --header Content-Type:application/x-www-form-urlencoded -H Authorization: AuthSub token="AIwbFAQR_4xG2gHoAKDsNdFqdZdwWjGeNquOLpvp3BQZW5XEMyIj_wFozHSTEQ-BQRfYuIY-1CyqLeQ" STEP 4: Trying to get the upload token using the authsub token POST /action/GetUploadToken HTTP/1.1 User-Agent: curl/7.10.6 (i386-redhat-linux-gnu) libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.1.4 Host: gdata.youtube.com Pragma: no-cache Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Content-Type:application/atom+xml Authorization: AuthSub token="AIwbFASiRR3XDKsNkaIoPaujN5RQhp5Oy_VA_9U2yV1enxJoVGSgMlZqTcjKw9mS861vlc9GWTH9D9sQ" X-Gdata-Key:key="AI39si5EQyo-TZPFAnmGjxJGFKpxd_7a6hEERh_3......R82AShoQ" Content-Length:0 GData-Version:2 Recevied Response: 401 Token invalid - Invalid AuthSub token. Curl command used: /usr/bin/curl -S -v --location http://gdata.youtube.com/action/GetUploadToken -H Content-Type:application/atom+xml -H Authorization: AuthSub token="AIwbFASiRR3XDKs....sYDp5Oy_VA_9U2yV1enxJoVGSgMlZqTcjKw9mS861vlc9GWTH9D9sQ" -H X-Gdata-Key:key="AI39si5EQyo-TZPFAnmGjxJGF......Kpxd6dN2J1oHFQYTj_7a6hEERh_3E48R82AShoQ" -H Content-Length:0 -H GData-Version:2

    Read the article

  • In Asp.Net MVC 2 is there a better way to return 401 status codes without getting an auth redirect

    - by Greg Roberts
    I have a portion of my site that has a lightweight xml/json REST API. Most of my site is behind forms auth but only some of my API actions require authentication. I have a custom AuthorizeAttribute for my API that I use to check for certain permissions and when it fails it results in a 401. All is good, except since I'm using forms auth, Asp.net conveniently converts that into a 302 redirect to my login page. I've seen some previous questions that seem a bit hackish to either return a 403 instead or to put some logic in the global.asax protected void Application_EndRequest() that will essentially convert 302 to 401 where it meets whatever criteria. Previous Question Previous Question 2 What I'm doing now is sort of like one of the questions, but instead of checking the Application_EndRequest() for a 302 I make my authorize attribute return 666 which indicates to me that I need to set this to a 401. Here is my code: protected void Application_EndRequest() { if (Context.Response.StatusCode == MyAuthAttribute.AUTHORIZATION_FAILED_STATUS) { //check for 666 - status code of hidden 401 Context.Response.StatusCode = 401; } } Even though this works, my question is there something in Asp.net MVC 2 that would prevent me from having to do this? Or, in general is there a better way? I would think this would come up a lot for anyone doing REST api's or just people that do ajax requests in their controllers. The last thing you want is to do a request and get the content of a login page instead of json.

    Read the article

  • Unable to find standard libraries when compiling Objective-C using GNUstep on Windows

    - by Jason Roberts
    I just installed GNUstep on my Windows XP machine and I'm attempting to compile the following Objective-C Hello World program from the command line: #import <Foundation/Foundation.h> int main(int argc, const char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLog(@"Hello world\n"); [pool drain]; return 0; } When I try to compile the program from the command line like so gcc hello.m -o hello I end up getting the following error hello.m:1:34: Foundation/Foundation.h: No such file or directory Is there something I need to do order to inform the compiler of where the standard Objective-C libraries are located?

    Read the article

  • Printing PDFs Server-side using Acrobat Reader from ASP.NET

    - by Chris Roberts
    Hi, I have been presented with a problem which requires me to print PDF files from a server as part of an ASP.NET web service. The problem is further complicated by the fact that the PDF files I have to print can ONLY be printed using Adobe Reader (they were created using Adobe LiveCycle and have some strange protection in them). This piece of code seems to do the trick in the Visual Studio development web server, but doesn't do anything when the site's running in IIS. I'm assuming this is probably some sort of permissions issue!? I know this is a FAR from ideal thing to be trying to do, but I haven't really got much choice! Any ideas would be greatly appreciated! Dim starter As ProcessStartInfo Dim Prc As Process ' Pass File Path And Arguments starter = New ProcessStartInfo("c:\program files\...\AcroRd32.exe", "/t ""test.pdf"" ""Printer""") starter.CreateNoWindow = True starter.RedirectStandardOutput = True starter.UseShellExecute = False ' Start Adobe Process Prc = New Process() Prc.StartInfo = starter Prc.Start()

    Read the article

  • "Quoted-printable line longer than 76 chars" warning when sending HTML E-Mail

    - by Chris Roberts
    Hi, I have written some code in my VB.NET application to send an HTML e-mail (in this case, a lost password reminder). When I test the e-mail, it gets eaten by my spam filter. One of the things that it's scoring badly on is because of the following problem: MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars I've been through the source of the e-mail, and I've broken each line longer than 76 characters into two lines with a CR+LF in between, but that hasn't fixed the problem. Can anyone point me in the right direction? Thanks!

    Read the article

  • racket scheme get-argb-pixels

    - by Giles Roberts
    I have a 32 by 32 pixel png file. I'm trying to read the values within it using get-argb-pixels. My code is as follows: #lang racket/gui (require racket/gui/base) (define floor (make-object bitmap% "C:\\floortile.png")) (define pixels (make-bytes (* 32 32 4))) (send floor get-argb-pixels 0 0 32 32 pixels) After executing the code I was expecting a series of 8 bit values to be contained within pixels. Examining pixels gives me the following output: > pixels #"\377\2148\30\377\214<\30\377\234E\30\377\245I\30\377\245I\30\377\234E\30\377\234A\30\377\224A\30\377\224A\30\377\234A\30\377\245E\30\377\255M\30\377\224A\30\377\234E\30\377\245I\30\377\224A\30\377\234E\30\377\234E\30\377\255I\30\377\245I\30\377\245E\30\377\234A\30\377\234E\30\377\234A\30\377\245I\30\377\265Q\30\377\306]\30\377\306Y\30\377\275U\30\377\265Q\30\377\306a!\377\306]!\377\214<\30\377\224A\30\377\224A\30\377\245I\30\377\255M\30\377\255M\30\377\245I\30\377\234E\30\377\234E\30\377\245I\30\377\245I\30\377\255M\30\377\234A\30\377\245E\30\377\265M\30\377\234A\30\377\245I\30\377\245E\30\377\245E\30\377\255M\30\377\245I\30\377\245E\30\377\234A\30\377\234E\30\377\255I\30\377\275U\30\377\306]\30\377\326e!\377\336e!\377\265Q\30\377\326e!\377\326a!\377{8\30\377\224E\30\377\224A\30\377\245I\30\377\245I\30\377\255M\30\377\255M\30\377\255I\30\377\245I\30\377\245I\30\377\245I\30\377\265Q\30\377\214<\30\377\245I\30\377\255M\30\377\265M\30\377\255M\30\377\265M\30\377\265M\30\377\245I\30\377\234E\30\377\234E\30\377\234E\30\377\245E\30\377\275Q\30\377\306]!\377\316a!\377\336i!\377\357q!\377\275Y\30\377\316e!\377\347i!\377k0\20\377\2048\30\377\224A\30\377\265U!\377\234E\30\377\234E\30\377\245M\30\377\255M\30\377\255M\30\377\255I\30\377\255M\30\377\265M\30\377\2048\20\377\245I\30\377\245I\30\377\306Y!\377\265Q\30\377\255M\30\377\265Q\30\377\265M\30\377\265M\30\377\255I\30\377\265Q\30\377\265M\30\377\275U\30\377\316a!\377\326i!\377\347m!\377\367\216)\377\347y)\377\336m)\377\326]!\377s0\20\377{8\30\377{4\20\377\2048\30\377s4\20\377\2048\30\377{4\20\377\214<\30\377\224A\30\377\234A\30\377\224A\30\377\224A\30\377\214<\30\377\2148\30\377\224<\30\377\234A\30\377\214<\30\377\234E\30\377\245I\30\377\265Q\30\377\255M\30\377\265U\30\377\306Y\30\377\265Q\30\377\275U\30\377\326a!\377\336i!\377\347u!\377\357\206)\377\326q)\377\326i)\377\347i!\377s0\20\377{4\20\377{4\30\377\214<\30\377s4\20\377\2048\30\377s4\20\377\224A\30\377\224A\30\377\224<\30\377\234A\30\377\245E\30\377\234E\30\377\234I\30\377\234E\30\377\245I\30\377\245I\30\377\245I\30\377\265Q\30\377\306]\30\377\255M\30\377\255M\30\377\255M\30\377\255M\30\377\275U\30\377\255M\30\377\275U\30\377\316a!\377\306]!\377\326i!\377\367\206)\377\377})\377s4\30\377k,\20\377k,\20\377s4\30\377{4\20\377\2048\30\377c(\20\377\2048\20\377\234A\30\377\245E\30\377\245E\30\377\255I\30\377\245I\30\377\245I\30\377\245I\30\377\265Q\30\377\275U!\377\255M\30\377\255M\30\377\255M\30\377\255M\30\377\275U\30\377\306]!\377\275U\30\377\255M\30\377\306Y!\377\306]!\377\316e!\377\316a!\377\326i!\377\347y)\377\367y)\377c(\20\377c,\20\377k,\20\377s0\20\377s4\20\377\2048\30\377\214<\30\377{4\20\377\214<\30\377\234E\30\377\234A\30\377\245I\30\377\255M\30\377\255M\30\377\255M\30\377\265Q\30\377\265M\30\377\265Q\30\377\265Q\30\377\255M\30\377\265U\30\377\255M\30\377\265Q\30\377\265U\30\377\265U\30\377\265Q\30\377\306Y\30\377\316a!\377\306a!\377\326i!\377\347y)\377\367\202)\377c,\20\377k,\20\377s0\20\377s0\20\377{8\30\377\214<\30\377s,\20\377s0\20\377\214<\30\377\234A\30\377\245E\30\377\255M\30\377\255M\30\377\245I\30\377\255M\30\377\275U\30\377\265U\30\377\265Q\30\377\265Q\30\377\275Y\30\377\255M\30\377\255I\30\377\275U\30\377\275Y!\377\275Y\30\377\265U\30\377\306Y!\377\326e!\377\336m!\377\336q!\377\347})\377\357\202)\377s0\20\377s4\30\377s4\30\377\2048\30\377\234E\30\377\2048\20\377\2148\30\377c(\20\377\2048\30\377\214<\30\377\234E\30\377\265Q\30\377\265Q\30\377\255M\30\377\265M\30\377\316a!\377\275U\30\377\275Y\30\377\265Q\30\377\265Q\30\377\265Q\30\377\265Q\30\377\255M\30\377\275Y\30\377\275Y!\377\275Y\30\377\275U\30\377\316a!\377\347q)\377\367\202)\377\357})\377\347y)\377k0\20\377\2048\30\377{4\30\377\2048\30\377\214A\30\377\2048\30\377\2044\30\377s4\20\377k,\20\377\2048\30\377\224A\30\377\245I\30\377\234A\30\377\234E\30\377\255Q\30\377\275U\30\377\306Y!\377\265Q\30\377\255Q\30\377\265U\30\377\265U\30\377\265Q\30\377\265Q\30\377\316e!\377\316a!\377\306]!\377\275Y!\377\306]!\377\336i!\377\357})\377\367\202)\377\336u)\377k0\20\377s0\30\377\2048\30\377\204<\30\377\204<\30\377\2048\30\377\2048\30\377\214<\30\377s4\20\377\2048\30\377\214A\30\377\224A\30\377\224E\30\377\234E\30\377\265Q\30\377\275U\30\377\306Y\30\377\255M\30\377\265Q\30\377\265Q\30\377\316]!\377\326e!\377\316]!\377\336m)\377\336i)\377\316e!\377\306a!\377\326e!\377\367y)\377\367})\377\367\2061\377\367\2061\377s4\30\377{8\30\377{8\30\377\214<\30\377\214<\30\377\204<\30\377{4\20\377\214<\30\377\214<\30\377\214<\30\377\234E\30\377\234E\30\377\224E\30\377\234E\30\377\245M\30\377\275U\30\377\275U!\377\275U\30\377\306]!\377\306]!\377\316a!\377\326i)\377\347u)\377\326e!\377\347q)\377\336q)\377\326i)\377\326i)\377\347q)\377\367\202)\377\367})\377\367\2061\377{8\30\377s4\30\377{8\30\377\214<\30\377\224A\30\377\234E\30\377\214<\30\377\214<\30\377\224A\30\377\224<\30\377\234E\30\377\255M\30\377\245I\30\377\245I\30\377\255M\30\377\265U\30\377\306]!\377\306]!\377\316a!\377\316e!\377\326e!\377\347m)\377\316e!\377\306]!\377\347u)\377\347u)\377\336m)\377\316e)\377\336q)\377\357y)\377\367\202)\377\367\2021\377{4\30\377s4\30\377\2048\30\377\214A\30\377\224A\30\377\224A\30\377\224E\30\377\214<\30\377\214<\30\377\245I\30\377\234A\30\377\255M\30\377\255M\30\377\245I\30\377\255M\30\377\255Q\30\377\306]!\377\306]!\377\316a!\377\316a!\377\316a!\377\347u)\377\326e!\377\275Y!\377\265Y!\377\336m)\377\306a)\377\336m)\377\336m)\377\326e)\377\347q)\377\336q)\377s0\30\377s0\30\377\204<\30\377\224A\30\377\224E\30\377\234I\30\377\234E\30\377\234E\30\377\255M\30\377\234E\30\377{4\30\377\224<\30\377\245M\30\377\255I\30\377\234A\30\377\255M\30\377\245E\30\377\255M\30\377\265Q\30\377\245I\30\377\275U\30\377\255I\30\377\234A\30\377\224E\30\377\265U\30\377\234I\30\377\224E\30\377\245M\30\377\234M!\377\224A\30\377\234I\30\377\224E\30\377k0\20\377s0\20\377{4\30\377\214<\30\377\224E\30\377\234E\30\377\245I\30\377\234I\30\377\245I\30\377\214<\30\377\214<\30\377\255M\30\377\265Q!\377\265Q!\377\255M\30\377\306]!\377\316a)\377\326e)\377\326a!\377\316]!\377\265Q\30\377\326a!\377\255M\30\377\204<\20\377\245M\30\377\234I\30\377\245M\30\377\275]!\377\234I\30\377\255U!\377\265Y!\377\245M!\377c(\20\377k,\20\377k0\20\377\2048\30\377\224A\30\377\224E\30\377\234I\30\377\245I\30\377\275Y!\377\234E\30\377\245I\30\377\245I\30\377\265U!\377\265Q!\377\265Q!\377\306]!\377\306]!\377\316a!\377\316a!\377\336e)\377\326a!\377\316]!\377\265Q\30\377\224A\30\377\234I\30\377\275]!\377\265Y!\377\275Y!\377\275Y!\377\265U!\377\265])\377\275])\377s4\30\377c(\20\377k,\20\377s0\20\377\214A\30\377\224E\30\377\234E\30\377\306]!\377\234I\30\377\224A\30\377\265U!\377\245I\30\377\265Q!\377\265Q!\377\265M!\377\255M\30\377\306]!\377\306Y!\377\306]!\377\306]!\377\326a)\377\336i)\377\275U!\377\224A\30\377\224A\30\377\306a!\377\275]!\377\275Y!\377\275]!\377\275])\377\275Y!\377\275Y!\377s0\20\377k,\20\377s0\20\377\2048\30\377\214<\30\377\224E\30\377\234E\30\377\245M\30\377\224A\30\377\214A\30\377\245M\30\377\265Q!\377\275U!\377\255I\30\377\245I\30\377\245I\30\377\275U!\377\306Y!\377\275Y!\377\306]!\377\306]!\377\265Q\30\377\255M\30\377\224A\30\377\204<\30\377\255Q\30\377\245M\30\377\255Q!\377\265Y!\377\275]!\377\265Y!\377\275Y!\377s0\20\377k0\20\377{0\20\377\2048\30\377\204<\30\377\204<\30\377\214<\30\377\224A\30\377\316a!\377\245I\30\377\234E\30\377\245I\30\377\265U!\377\265Q!\377\265Q!\377\255M!\377\275U!\377\275U!\377\275U!\377\275Q!\377\255I\30\377\255M\30\377\255Q\30\377\234E\30\377{4\30\377\224A\30\377\214<\30\377\275Y!\377\275Y!\377\275]!\377\255Q!\377\255Q!\377k,\20\377k,\20\377s0\20\377\2044\30\377{4\20\377{4\30\377\2048\30\377\245M\30\377\265U!\377\245I\30\377\214A\30\377\275Y!\377\234A\30\377\255M\30\377\265Q!\377\245M!\377\265U!\377\275Q!\377\245I\30\377\245I\30\377\245M\30\377\265Q!\377\255Q!\377\255M\30\377\214<\30\377\245I\30\377\255Q!\377\306]!\377\306]!\377\275U!\377\265U!\377\255Q!\377c(\20\377Z(\20\377c(\20\377k,\20\377{8\30\377{4\30\377\214<\30\377\214A\30\377\234E\30\377\245I\30\377\245M\30\377\214<\30\377s0\30\377\255M!\377\255I!\377\255M!\377\255M!\377\265Q!\377\265Q!\377\255M!\377\265Q\30\377\245I\30\377\255I\30\377\306Y!\377\275Y!\377\214A\30\377\255Q\30\377\275]!\377\306])\377\306]!\377\255U!\377\255Q!\377k0\30\377k0\20\377k,\20\377s0\20\377s0\20\377s4\30\377{4\30\377\214<\30\377\245I\30\377\224A\30\377\306Y!\377\234A\30\377s0\20\377\245I\30\377\255M!\377\255M!\377\255M!\377\255M!\377\255Q!\377\265M!\377\316]!\377\245E\30\377\316]!\377\306Y!\377\275U!\377{8\30\377\255Q!\377\265Y!\377\275]!\377\275Y!\377\275Y!\377\255Q!\377k0\20\377c,\20\377k,\20\377s0\20\377{4\30\377s0\20\377{4\30\377{4\30\377\2048\30\377\245I\30\377\234E\30\377\234E\30\377k,\20\377\214<\30\377\224A\30\377\245M\30\377\214<\30\377\224E\30\377\214<\30\377\214<\30\377\214<\30\377\245I\30\377\234E\30\377\224A\30\377\224A\30\377k,\20\377\224A\30\377\265Q!\377\265Y!\377\265U!\377\265Y!\377\275Y!\377c(\20\377c,\20\377k,\20\377s0\20\377k,\20\377k0\20\377\2048\30\377\234A\30\377\214<\30\377\224A\30\377\245I\30\377\245I\30\377k0\20\377{4\20\377\214<\30\377\214A\30\377\214<\30\377\204<\30\377\2048\30\377\234I\30\377\224A\30\377\214<\30\377\234E\30\377\234E\30\377\255M\30\377\224A\30\377{8\30\377\255Q!\377\265U!\377\255U!\377\255U!\377\265U!\377c(\20\377k,\20\377s0\20\377s0\20\377{4\20\377\2048\30\377\2048\30\377\2048\30\377\224A\30\377\245M\30\377\245E\30\377\234E\30\377{4\20\377Z(\20\377k0\30\377{8\30\377\2048\30\377\214A\30\377\224A\30\377\234I\30\377\214<\30\377\224A\30\377\224A\30\377\234E\30\377\245I\30\377\255M\30\377{8\30\377\214A\30\377\255U!\377\255U!\377\245Q!\377\265U!\377c,\20\377c(\20\377k,\20\377Z$\20\377Z$\20\377Z(\20\377c(\20\377k,\20\377k,\20\377c(\20\377c(\20\377c,\20\377k0\20\377R \20\377c,\20\377s4\30\377{4\30\377\204<\30\377\2048\30\377\214A\30\377\224A\30\377\224A\30\377\234I\30\377\234I\30\377\224A\30\377\245I\30\377\224E\30\377\2048\30\377\255U!\377\255Q!\377\265U!\377\265Y)\377J \20\377J\34\20\377Z(\20\377k,\20\377k(\20\377c(\20\377R \20\377c(\20\377k,\20\377s0\20\377k0\20\377k0\20\377c,\20\377Z(\20\377c,\20\377s4\20\377s4\20\377\2048\30\377\2048\20\377\2048\30\377\224A\30\377\214A\30\377\234I\30\377\245I\30\377\234I\30\377\245M!\377\245M\30\377\204<\30\377\234M!\377\245Q!\377\265U!\377\255U!\377c,\20\377c,\20\377c(\20\377c(\20\377c(\20\377c(\20\377c(\20\377k,\20\377k,\20\377k,\20\377k0\20\377s4\20\377s0\30\377\204<\30\377c(\20\377s4\20\377s4\30\377{4\20\377{4\30\377\204<\30\377\224A\30\377\234E\30\377\234E\30\377\234E\30\377\234E\30\377\245I\30\377\245I\30\377\224E\30\377\204<\30\377\245Q!\377\255Q!\377\347\327\326\377R$\20\377k,\20\377c(\20\377c(\20\377c(\20\377c(\20\377Z$\20\377c(\20\377c(\20\377k,\20\377k,\20\377k,\20\377s0\20\377{4\30\377\204<\30\377k,\20\377s4\20\377s4\20\377{8\30\377\2048\20\377\214<\30\377\214<\30\377\214A\30\377\234E\30\377\234E\30\377\224A\30\377\224E\30\377\224E\30\377s4\30\377\214A\30\377\265\206s\377\377\377\377\377c,\20\377k,\30\377k0\20\377k,\20\377c(\20\377Z$\20\377Z(\20\377Z$\20\377c(\20\377c(\20\377c(\20\377k,\20\377k0\20\377{4\30\377{8\30\377k,\20\377c,\20\377k0\20\377s0\20\377{8\30\377\2048\30\377\2048\30\377\214<\30\377\224A\30\377\224E\30\377\214<\30\377\214A\30\377\234I\30\377{8!\377\214M1\377\377\373\377\377\377\377\377" This doesn't look like a series of 8 bit values to me. Have I done something wrong or am I misinterpreting the results?

    Read the article

  • Will OpenGL give me any FPS improvement over CoreAnimation for scrolling a large image?

    - by Ben Roberts
    Hi, I'm considering re-writing the menu system of my iPhone app to use Open GL just to improve the smoothness of scrolling a big image (480x1900px) across the screen. I'm looking at doing this as a way to improve on using the method/solution as described here (http://stackoverflow.com/questions/1443140/smoother-uiview). This solution was a big improvement over the previous implementation but it's still not perfect and as this is the first thing the user will see I'd like it to be as flawless as possible. Will switching to OpenGL give me the sort of smooth scrolling I'm looking for? I've stayed clear of OpenGL until now as this is my first app and core animation has handled everything else I've thrown at it well enough, would be good to know if this alternative implementation is likely to work! thanks

    Read the article

  • functional-style datatypes in Python

    - by Danny Roberts
    For anyone who's spent some time with sml, ocaml, haskell, etc. when you go back to using C, Python, Java, etc. you start to notice things you never knew were missing. I'm doing some stuff in Python and I realized what I really want is a functional-style datatype like (for example) datatype phoneme = Vowel of string | Consonant of voice * place * manner datatype voice = Voiced | Voiceless datatype place = Labial | Dental | Retroflex | Palatal | Velar | Glottal datatype manner = Stop | Affricate | Fricative | Nasal | Lateral type syllable = phoneme list Does anyone have a particular way that they like to simulate this in Python?

    Read the article

  • Real-time wmv video encoding in C#

    - by Greg Roberts
    How to encode video on the fly and send it trough the network from C#? Can't find a suitable library. I need to encode in WMV and don't mind if the actual encoding is made in C++ as long as the library has a .NET assembly available. Thanks

    Read the article

  • Masking FLV video in AS3 with PNG alpha channel.

    - by James Roberts
    Hey there, I'm trying to mask an FLV with a PNG alpha channel. I'm using BitmapData (from a PNG) but it's not working. Is there anything I'm missing? Cut up code below: var musclesLoader:Loader = new Loader(); var musclesContainer:Sprite = new Sprite(); var musclesImage:Bitmap = new Bitmap(); var musclesBitmapData:BitmapData; var musclesVideo:Video = new Video(752, 451.2); var connection:NetConnection = new NetConnection(); var stream:NetStream; function loadMuscles():void { musclesLoader.load(new URLRequest('img/muscles.png')); musclesLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, musclesComplete); } function musclesComplete():void { musclesBitmapData = new BitmapData(musclesLoader.content.width, musclesLoader.content.height, true, 0x000000); musclesImage.bitmapData = musclesBitmapData; musclesImage.smoothing = true; musclesContainer.addChild(musclesImage); contentContainer.addChild(musclesContainer); } function loadMusclesVideo():void { connection.connect(null); stream = new NetStream(connection); stream.client = this; musclesVideo.mask = musclesBitmapData; stage.addChild(musclesVideo); musclesVideo.attachNetStream(stream); stream.bufferTime = 1; stream.receiveAudio(true); stream.receiveVideo(true); stream.play("vid/muscles.flv"); } Outside this code I have a function that adds the containers to the stage, etc and places the objects in the appropriate spots. It sort of works - the mask applies, but in a square (the size of the boundaries of musclesBitmapData) rather than with the shape of the alpha channel. Is this the right way to go about this?

    Read the article

  • forward/strong enum in VS2010

    - by Noah Roberts
    At http://blogs.msdn.com/vcblog/archive/2010/04/06/c-0x-core-language-features-in-vc10-the-table.aspx there is a table showing C++0x features that are implemented in 2010 RC. Among them are listed forwarding enums and strongly typed enums but they are listed as "partial". The main text of the article says that this means they are either incomplete or implemented in some non-standard way. So I've got VS2010RC and am playing around with the C++0x features. I can't figure these ones out and can't find any documentation on these two features. Not even the simplest attempts compile. enum class E { test }; int main() {} fails with: 1e:\dev_workspace\experimental\2010_feature_assessment\2010_feature_assessment\main.cpp(518): error C2332: 'enum' : missing tag name 1e:\dev_workspace\experimental\2010_feature_assessment\2010_feature_assessment\main.cpp(518): error C2236: unexpected 'class' 'E'. Did you forget a ';'? 1e:\dev_workspace\experimental\2010_feature_assessment\2010_feature_assessment\main.cpp(518): error C3381: 'E' : assembly access specifiers are only available in code compiled with a /clr option 1e:\dev_workspace\experimental\2010_feature_assessment\2010_feature_assessment\main.cpp(518): error C2143: syntax error : missing ';' before '}' 1e:\dev_workspace\experimental\2010_feature_assessment\2010_feature_assessment\main.cpp(518): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== int main() { enum E : short; } Fails with: 1e:\dev_workspace\experimental\2010_feature_assessment\2010_feature_assessment\main.cpp(513): warning C4480: nonstandard extension used: specifying underlying type for enum 'main::E' 1e:\dev_workspace\experimental\2010_feature_assessment\2010_feature_assessment\main.cpp(513): error C2059: syntax error : ';' ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== So it seems it must be some totally non-standard implementation that has allowed them to justify calling this feature "partially" done. How would I rewrite that code to access the forwarding and strong type feature?

    Read the article

  • VS2010 .filter files and SVN

    - by Noah Roberts
    Since we've switched to VS2010 we've noticed a new .filters file that apparently contains the filter structure of the project. We're also using subversion as our source control. Unfortunately, every time we check in now we end up with merge conflicts if anyone's added a file or filter to the project. SVN seems absolutely incapable of merging this file type correctly even though it's text based. It's getting rather frustrating. Is anyone else dealing with this problem? Has anyone found a solution?

    Read the article

  • VS2010 + Resharper 5 performance issues

    - by Jeremy Roberts
    I have been using VS2010 with Resharper 5 for several weeks and am having a performance issue. Sometimes when typing, the cursor will lag and the keystrokes won't show instantaneously. Also, scrolling will lag at times. There is a forum thread started and JetBrains has been responding. Several people (including myself) have added their voice and uploaded some performance profiles. If anyone here has has this issue, I would encourage you to visit the thread and let JetBrains know about it. Has anyone had this problem and have a suggestion to restore performance?

    Read the article

  • VS2010 profiler/leak detection

    - by Noah Roberts
    Anyone know of a profiler and leak detector that will work with VS2010 code? Preferably one that runs on Win7. I've searched here and in google. I've found one leak detector that works (Memory Validator) but I'm not too impressed. For one thing it shows a bunch of menu leaks and stuff which I'm fairly confident are not real. I also tried GlowCode but it's JUST a profiler and refuses to install on win7. I used to use AQtime. It had everything I needed, memory/resource leak detection, profiling various things, static analysis, etc. Unfortunately it gives bogus results now. My main immediate issue is that VS2010 is saying there are leaks in a program that had none in VS2005. I'm almost certain it's false positives but I can't seem to find a good tool to verify this. Memory Validator doesn't show the same ones and the reporting of leaks from VS doesn't seem rational.

    Read the article

  • Spreadsheet ML Text Color (Colour) Rendering

    - by Chris Roberts
    Hi All, I am writing a tool which generates some Spreadsheet ML (XML) to create an Excel spreadsheet for my users. I have defined a style as follows: <Style ss:ID="GreenText"> <Font ss:FontName="Arial" ss:Size="9" ss:Color="#8CBE50" /> </Style> This works to an extent, but when I open it in Excel the colour rendered for the text isn't the one I specified - it's a brighter version. I can use the same colour reference for a cell border and the colour is rendered correctly. Can anyone shed any light on why the text colour isn't rendered correctly? Thanks!

    Read the article

  • Direct TCP/IP connections in P2P apps

    - by Greg Roberts
    From a Joel's post on Copilot: Direct Connect! We’ve always done everything we can to make sure that Fog Creek Copilot can connect in any networking situation, no matter what firewalls or NATs are in place. To make this happen, both parties make outbound connections to our server, which relays traffic on their behalf. Well, in many cases, this isn’t necessary. So version 2.0 does something rather clever: it sets up the initial connection through our servers, so you get connected right away with 100% reliability. But then once you’re all connected, it quietly, in the background, looks for a way to make a direct connection. If it can’t, no big deal: you just keep relaying through our server. If you can make a direct peer-to-peer connection, it silently shifts your data onto the direct connection. You won’t notice anything except, probably, much faster communication. How do they change the server connection to a P2P connection?

    Read the article

  • Qt, MSVC, and /Zc:wchar_t- == I want to blow up the world

    - by Noah Roberts
    So Qt is compiled with /Zc:wchar_t- on windows. What this means is that instead of wchar_t being a typedef for some internal type (__wchar_t I think) it becomes a typedef for unsigned short. The really cool thing about this is that the default for MSVC is the opposite, which of course means that the libraries you're using are likely compiled with wchar_t being a different type than Qt's wchar_t. This doesn't become an issue of course until you try to use something like std::wstring in your code; especially when one or more libraries have functions that accept it as parameters. What effectively happens is that your code happily compiles but then fails to link because it's looking for definitions using std::wstring<unsigned short...> but they only contain definitions expecting std::wstring<__wchar_t...> (or whatever). So I did some web searching and ran into this link: http://bugreports.qt.nokia.com/browse/QTBUG-6345 Based on the statement by Thiago Macieira, "Sorry, we will not support building Qt like this," I've been worried that fixing Qt to work like everything else might cause some problem and have been trying to avoid it. We recompiled all of our support libraries with the /Zc:wchar_t- flag and have been fairly content with that until a couple days ago when we started trying to port over (we're in the process of switching from Wx to Qt) some serialization code. Because of how win32 works, and because Wx just wraps win32, we've been using std::wstring to represent string data with the intent of making our product as i18n ready as possible. We did some testing and Wx did not work with multibyte characters when trying to print special stuff (even not so special stuff like the degree symbol was an issue). I'm not so sure that Qt has this problem since QString isn't just a wrapper to the underlying _TCHAR type but is a Unicode monster of some sort. At any rate, the serialization library in boost has compiled parts. We've attempted to recompile boost with /Zc:wchar_t- but so far our attempts to tell bjam to do this have gone unheeded. We're at an impasse. From where I'm sitting I have three options: Recompile Qt and hope it works with /Zc:wchar_t. There's some evidence around the web that others have done this but I have no way of predicting what will happen. All attempts to ask Qt people on forums and such have gone unanswered. Hell, even in that very bug report someone asks why and it just sat there for a year. Keep fighting with bjam until it listens. Right now I've got someone under me doing that and I have more experience fighting with things to get what I want but I do have to admit to getting rather tired of it. I'm also concerned that I'll KEEP running into this issue just because Qt wants to be a c**t. Stop using wchar_t for anything. Unfortunately my i18n experience is pretty much 0 but it seems to me that I just need to find the right to/from function in QString (it has a BUNCH) to encode the Unicode into 8-bytes and visa-versa. UTF8 functions look promising but I really want to be sure that no data will be lost if someone from Zimbabfuckegypt starts writing in their own language and the documentation in QString frightens me a little into thinking that could happen. Of course, I could always run into some library that insists I use wchar_t and then I'm back to 1 or 2 but I rather doubt that would happen. So, what's my question... Which of these options is my best bet? Is Qt going to eventually cause me to gouge out my own eyes because I decided to compile it with /Zc:wchar_t anyway? What's the magic incantation to get boost to build with /Zc:wchar_t- and will THAT cause permanent mental damage? Can I get away with just using the standard 8-bit (well, 'common' anyway) character classes and be i18n compliant/ready? How do other Qt developers deal with this mess?

    Read the article

  • Inscribe and center an image within a frame

    - by Brennan Roberts
    Given a div of arbitrary aspect ratio, what's the best way to place and style an image (also with an arbitrary aspect ratio) inside such that: It is both inscribed and centered Its dimensions and position are set using relative values so that the image will remain inscribed and centered automatically when the frame is uniformly scaled (javascript should only be required when the image is initially inserted, or if the frame's aspect ratio changes) Extra markup is minimized Here's the result we want: Here's a fiddle template, which is just: Markup Should pillarbox <div class="frame"> <img src="http://www.placekitten.com/200/300" /> </div> Should letterbox <div class="frame"> <img src="http://www.placekitten.com/300/200" /> </div> CSS .frame { width: 200px; height: 200px; border: 2px solid black; margin: 10px 0px 100px 0; }

    Read the article

  • Connecting private IPs

    - by Greg Roberts
    A friend of mine told me there was a way to connect two private IPs without using a proxy server. The idea was that both computers connected to a public server and some how the server joined the private connections and won't use any more bandwidth. Is this true? How's this technique named? Thanks

    Read the article

  • Cocoa-Created PDF Not Rendering Correctly

    - by Matthew Roberts
    I've created a PDF on the iPad, but the problem is when you have a line of text greater than 1 line, the content just goes off the page. This is my code: void CreatePDFFile (CGRect pageRect, const char *filename) { CGContextRef pdfContext; CFStringRef path; CFURLRef url; CFMutableDictionaryRef myDictionary = NULL; path = CFStringCreateWithCString (NULL, filename, kCFStringEncodingUTF8); url = CFURLCreateWithFileSystemPath (NULL, path, kCFURLPOSIXPathStyle, 0); CFRelease (path); myDictionary = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); NSString *foos = @"Title"; const char *text = [foos UTF8String]; CFDictionarySetValue(myDictionary, kCGPDFContextTitle, CFSTR(text)); CFDictionarySetValue(myDictionary, kCGPDFContextCreator, CFSTR("Author")); pdfContext = CGPDFContextCreateWithURL (url, &pageRect, myDictionary); CFRelease(myDictionary); CFRelease(url); CGContextBeginPage (pdfContext, &pageRect); CGContextSelectFont (pdfContext, "Helvetica", 12, kCGEncodingMacRoman); CGContextSetTextDrawingMode (pdfContext, kCGTextFill); CGContextSetRGBFillColor (pdfContext, 0, 0, 0, 1); NSString *body = @"text goes here"; const char *text = [body UTF8String]; CGContextShowTextAtPoint (pdfContext, 30, 750, text, strlen(text)); CGContextEndPage (pdfContext); CGContextRelease (pdfContext);} Now the issue lies within me writing the text to the page, but the problem is that I can't seem to specify a multi-line "text view".

    Read the article

  • Entity Framework vs LINQ to SQL

    - by Chris Roberts
    Now that .NET v3.5 SP1 has been released (along with VS2008 SP1), we now have access to the .NET entity framework. My question is this. When trying to decide between using the Entity Framework and LINQ to SQL as an ORM, what's the difference? The way I understand it, the Entity Framework (when used with LINQ to Entities) is a 'big brother' to LINQ to SQL? If this is the case - what advantages does it have? What can it do that LINQ to SQL can't do on its own?

    Read the article

  • How can Perl's XML::Simple ignore HTML embedded in XML?

    - by Miriam Raphael Roberts
    I have an XML file that I am pulling from the web and parsing. One of the items in the XML is a 'content' value that has HTML. I am using XML::Simple::XMLin to parse the file like so: $xml= eval { $data->XMLin($xmldata, forcearray => 1, suppressempty=> +'') }; When I use Data::Dumper to dump the hash, I discovered that SimpleXML is parsing the HTML into the hash tree: 'content' = { 'div' = [ { 'xmlns' = 'http://www.w3.org/1999/xhtml', 'p' = [ { 'a' = [ { 'href' = 'http://miamiherald.typepad.com/.a/6a00d83451b26169e20133ec6f4491970b-pi', 'style' = 'FLOAT: left', 'img' = [ etc..... This is not what I want. I want to just grab content inside of this entry. How do I do this?

    Read the article

  • How to access and run field events from extension js?

    - by Dan Roberts
    I have an extension that helps in submitting forms automatically for a process at work. We are running into a problem with dual select boxes where one option is selected and then that selection changes another field's options. Since setting an option selected property to true doesn't trigger the field's onchange event I am trying to do so through code. The problem I've run into is that if I try to access or run functions on the field object from the extension, I get the error Error: uncaught exception: [Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: chrome://webformsidebar/content/webformsidebar.js :: WebFormSidebar_FillProcess :: line 499" data: no] the line causing the error is... if (typeof thisField.onchange === 'function') The line right before it works just fine... thisField.options[t].selected=true; ...so I'm not sure why this is resulting in such an error. What surprises me most I guess is that checking for the existence of the function leads to an error. It feels like the problem is related to the code running in the context of the extension instead of the browser window document. If so, is there any way to call a function in the browser window context instead? Do I need to actually inject code into the page somehow? Any other ideas? Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >