Search Results

Search found 417 results on 17 pages for 'lance roberts'.

Page 8/17 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • For Programmers familiar with ACM API? Drawing Initials

    - by user71992
    I came across an exercise (in the book "The Art and Science of Java" by Eric Roberts) that requires using only GArc and GLine classes to create a lettering library which draws your initials on the canvas. This should be made independent of the GLabel class. I'd like to know the correct approach to use in solving this problem. I'm not sure what I have so far is good enough (I'm thinking it's too long). The questions requires that I use a good Top-Down approach.

    Read the article

  • Is there a way to hide the Primefaces fileUpload progress bar and buttons in advanced mode and auto mode?

    - by Joe Roberts
    Is there a way to hide the Primefaces fileUpload progress bar and buttons in advanced mode and auto mode? Here is the code that I am using: <p:fileUpload id="scriptUpload" widgetVar="importDevicesWidget" fileUploadListener="#{scriptUploadBean.handleFileUpload}" auto="true" label="Choose.." mode="advanced" update=":infoMessages" sizeLimit="8192" allowTypes="/(\.|\/)(txt)$/" onstart="clearInvalidFileMsg();$('#progress').show();" oncomplete="clearInvalidFileMsg();$('#progress').hide();importDevicesDialogWidget.hide()"/> The problem is that it makes no sense for the buttons that appear next to the progress bar for each file to be there as the mode is auto so the upload already started! Here is a screen shot:

    Read the article

  • RadGrid nestedview sort makes nestedview disappear?

    - by lance
    When I click on the header of my detail table, it disappears entirely, leaving empty white space in the browser where it used to be. The Ajax postback caused by my clicking on the header does fire FooGridNeedDataSource and FooGridItemCommand, but I've used the debugger to skip the code inside those handlers (after clicking the header of the column I'm trying to sort, in the detail table), and I still get the same behavior. I'm hoping someone can tell me what I'm doing wrong? The MasterTableView sorts just fine (my real markup enables that with AllowSorting="true" on MasterTableView). <telerik:RadGrid ID="FooGrid" runat="server" AutoGenerateColumns="false" OnNeedDataSource="FooGridNeedDataSource" OnItemCommand="FooGridItemCommand" > <MasterTableView ClientDataKeyNames="FooData" DataKeyNames="FooData"> <Columns> <telerik:GridBoundColumn DataField="FooData" HeaderText="Foo"></telerik:GridBoundColumn> </Columns> <DetailTables> <telerik:GridTableView AllowSorting="true"> <Columns> <telerik:GridBoundColumn DataField="FooDetailData" HeaderText="Foo Detail" ></telerik:GridBoundColumn> </Columns> </telerik:GridTableView> </DetailTables> </MasterTableView> </telerik:RadGrid>

    Read the article

  • 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

  • Child web.config can't clear <pages><controls> from parent web.config

    - by Lance Rushing
    How can I "clear" the vendor defined <controls> in my child app's web.config? Parent Web Config. <system.web> <pages> <controls> <!-- START: Vendor Custom Control --> <add tagPrefix="asp" namespace="VENDOR.Web.UI.Base" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral /> ... <!-- END: Vendor Custom Control --> ... </controls> <tagMapping> <add tagType="System.Web.UI.WebControls.WebParts.WebPartManager" mappedTagType="Microsoft.Web.Preview.UI.Controls.WebParts.WebPartManager" /> <add tagType="System.Web.UI.WebControls.WebParts.WebPartZone" mappedTagType="Microsoft.Web.Preview.UI.Controls.WebParts.WebPartZone" /> </tagMapping> </pages> </system.web> Child: <system.web> <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> </controls> <tagMapping> <clear/> </tagMapping> </pages> </system.web> I have it working for the <tagMapping> section, but <controls> does not support <clear/> (or ).

    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

  • Komodo Edit 5.2 Django Template Syntax Error - Info: <head> previously mentioned

    - by Lance McNearney
    I am using Komodo Edit 5.2 for editing html and Django template files. It always shows a single syntax error inside the first {% block %} area on the first tag of my template. For example: {% extends "base.html" %} {% load i18n %} {% block title %}Hello{% endblock %} {% block content %} <p>Hello</p> <-- Syntax error on this single line <p>Other lines have no errors</p> {% endblock %} {% block footer %} <p>No errors here</p> {% endblock %} The syntax error given is: Info: <head> previously mentioned I know for a fact that the error has nothing to do with my <head> tag since it occurs in the base template and in child templates (and the IDE isn't smart enough to process the base templates when in a child, etc.) All of my html tags are closed properly and everything validates for XHTML strict. This forum post mentions a similar problem but offers no solution (and may be specific to Smarty syntax highlighting). Any ideas on how to resolve this error (or disable it from being shown)?

    Read the article

  • Test to identify your development environment?

    - by lance
    The code has a runtime dependency which is not available in our development environment (and is available in test and prod). It's expensive to actually test for the dependency, and I want to test for the environment instead. if (isDevEnvironment) { // fake it } else { // actually do it } Without using appSettings, what code/technique/test would you use to set isDevEnvironment? Example answers: check machine name (partial or full) check for running instance of Visual Studio check for environment variable I'm hoping for a test I hadn't considered.

    Read the article

  • FIPS-compliant Isolated Storage in WinXP?

    - by lance
    I've read (but not tested) that Isolated Storage uses Sha1Managed, which is not FIPS-compliant? Is that accurate, and can anything be done to use Isolated Storage on a FIPS-compliant WinXP SP2 box? I've seen mention of "Isolated Storage" within both the ClickOnce and Silverlight spaces. I'd appreciate an informed answer regarding either (or both!).

    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

  • Using SDL2_gfx issues using C++

    - by Lance Zimmerman
    When I use the it with the common.c /common.h files that come with it, if I use the cpp instead of c extension using VS201X I get the LNK2019: unresolved external symbol _SDL_main What that means is if I change the file containing main to test.c it compiles. When I change it back to text.cpp it fails to compile. I think that means it only works as a C compile. Here is the code I copied from SDL2_gfxPrimitives.c. (Spaces added so they would show up.) #include < stdio.h> #include < stdlib.h> #include < string.h> #include < math.h> #include < time.h> #include "common.h" #include "SDL2_gfxPrimitives.h" static CommonState *state; int main(int argc, char* argv[]) { /* Initialize test framework */ state = CommonCreateState(argv, SDL_INIT_VIDEO); return 1; } I need to use the library in C++ but it seems I don't know enough to figure out how. Any help would be appreciated, I've spent two days attempting to figure this out.

    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

  • Example: Communication between Activity and Service using Messaging

    - by Lance Lefebure
    I couldn't find any examples of how to send messages between an activity and a service, and spent far too many hours figuring this out. Here is an example project for others to reference. This example allows you to start or stop a service directly, and separately bind/unbind from the service. When the service is running, it increments a number at 10Hz. If the activity is bound to the service, it will display the current value. Data is transferred as an Integer and as a String so you can see how to do that two different ways. There are also buttons in the activity to send messages to the service (changes the increment-by value). Screenshot: AndroidManifest.xml: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.exampleservice" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <service android:name=".MyService"></service> </application> <uses-sdk android:minSdkVersion="8" /> </manifest> res\values\strings.xml: <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">ExampleService</string> <string name="service_started">Example Service started</string> <string name="service_label">Example Service Label</string> </resources> res\layout\main.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/btnStart" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Start Service"></Button> <Button android:id="@+id/btnStop" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Stop Service" android:layout_alignParentRight="true"></Button> </RelativeLayout> <RelativeLayout android:id="@+id/RelativeLayout02" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/btnBind" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Bind to Service"></Button> <Button android:id="@+id/btnUnbind" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Unbind from Service" android:layout_alignParentRight="true"></Button> </RelativeLayout> <TextView android:id="@+id/textStatus" android:textSize="24sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Status Goes Here" /> <TextView android:id="@+id/textIntValue" android:textSize="24sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Integer Value Goes Here" /> <TextView android:id="@+id/textStrValue" android:textSize="24sp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="String Value Goes Here" /> <RelativeLayout android:id="@+id/RelativeLayout03" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button android:id="@+id/btnUpby1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Increment by 1"></Button> <Button android:id="@+id/btnUpby10" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Increment by 10" android:layout_alignParentRight="true"></Button> </RelativeLayout> </LinearLayout> src\com.exampleservice\MainActivity.java: package com.exampleservice; import android.app.Activity; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.os.Messenger; import android.os.RemoteException; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; public class MainActivity extends Activity { Button btnStart, btnStop, btnBind, btnUnbind, btnUpby1, btnUpby10; TextView textStatus, textIntValue, textStrValue; Messenger mService = null; boolean mIsBound; final Messenger mMessenger = new Messenger(new IncomingHandler()); class IncomingHandler extends Handler { @Override public void handleMessage(Message msg) { switch (msg.what) { case MyService.MSG_SET_INT_VALUE: textIntValue.setText("Int Message: " + msg.arg1); break; case MyService.MSG_SET_STRING_VALUE: String str1 = msg.getData().getString("str1"); textStrValue.setText("Str Message: " + str1); break; default: super.handleMessage(msg); } } } private ServiceConnection mConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { mService = new Messenger(service); textStatus.setText("Attached."); try { Message msg = Message.obtain(null, MyService.MSG_REGISTER_CLIENT); msg.replyTo = mMessenger; mService.send(msg); } catch (RemoteException e) { // In this case the service has crashed before we could even do anything with it } } public void onServiceDisconnected(ComponentName className) { // This is called when the connection with the service has been unexpectedly disconnected - process crashed. mService = null; textStatus.setText("Disconnected."); } }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btnStart = (Button)findViewById(R.id.btnStart); btnStop = (Button)findViewById(R.id.btnStop); btnBind = (Button)findViewById(R.id.btnBind); btnUnbind = (Button)findViewById(R.id.btnUnbind); textStatus = (TextView)findViewById(R.id.textStatus); textIntValue = (TextView)findViewById(R.id.textIntValue); textStrValue = (TextView)findViewById(R.id.textStrValue); btnUpby1 = (Button)findViewById(R.id.btnUpby1); btnUpby10 = (Button)findViewById(R.id.btnUpby10); btnStart.setOnClickListener(btnStartListener); btnStop.setOnClickListener(btnStopListener); btnBind.setOnClickListener(btnBindListener); btnUnbind.setOnClickListener(btnUnbindListener); btnUpby1.setOnClickListener(btnUpby1Listener); btnUpby10.setOnClickListener(btnUpby10Listener); restoreMe(savedInstanceState); CheckIfServiceIsRunning(); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putString("textStatus", textStatus.getText().toString()); outState.putString("textIntValue", textIntValue.getText().toString()); outState.putString("textStrValue", textStrValue.getText().toString()); } private void restoreMe(Bundle state) { if (state!=null) { textStatus.setText(state.getString("textStatus")); textIntValue.setText(state.getString("textIntValue")); textStrValue.setText(state.getString("textStrValue")); } } private void CheckIfServiceIsRunning() { //If the service is running when the activity starts, we want to automatically bind to it. if (MyService.isRunning()) { doBindService(); } } private OnClickListener btnStartListener = new OnClickListener() { public void onClick(View v){ startService(new Intent(MainActivity.this, MyService.class)); } }; private OnClickListener btnStopListener = new OnClickListener() { public void onClick(View v){ doUnbindService(); stopService(new Intent(MainActivity.this, MyService.class)); } }; private OnClickListener btnBindListener = new OnClickListener() { public void onClick(View v){ doBindService(); } }; private OnClickListener btnUnbindListener = new OnClickListener() { public void onClick(View v){ doUnbindService(); } }; private OnClickListener btnUpby1Listener = new OnClickListener() { public void onClick(View v){ sendMessageToService(1); } }; private OnClickListener btnUpby10Listener = new OnClickListener() { public void onClick(View v){ sendMessageToService(10); } }; private void sendMessageToService(int intvaluetosend) { if (mIsBound) { if (mService != null) { try { Message msg = Message.obtain(null, MyService.MSG_SET_INT_VALUE, intvaluetosend, 0); msg.replyTo = mMessenger; mService.send(msg); } catch (RemoteException e) { } } } } void doBindService() { bindService(new Intent(this, MyService.class), mConnection, Context.BIND_AUTO_CREATE); mIsBound = true; textStatus.setText("Binding."); } void doUnbindService() { if (mIsBound) { // If we have received the service, and hence registered with it, then now is the time to unregister. if (mService != null) { try { Message msg = Message.obtain(null, MyService.MSG_UNREGISTER_CLIENT); msg.replyTo = mMessenger; mService.send(msg); } catch (RemoteException e) { // There is nothing special we need to do if the service has crashed. } } // Detach our existing connection. unbindService(mConnection); mIsBound = false; textStatus.setText("Unbinding."); } } @Override protected void onDestroy() { super.onDestroy(); try { doUnbindService(); } catch (Throwable t) { Log.e("MainActivity", "Failed to unbind from the service", t); } } } src\com.exampleservice\MyService.java: package com.exampleservice; import java.util.ArrayList; import java.util.Timer; import java.util.TimerTask; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.os.Messenger; import android.os.RemoteException; import android.util.Log; public class MyService extends Service { private NotificationManager nm; private Timer timer = new Timer(); private int counter = 0, incrementby = 1; private static boolean isRunning = false; ArrayList<Messenger> mClients = new ArrayList<Messenger>(); // Keeps track of all current registered clients. int mValue = 0; // Holds last value set by a client. static final int MSG_REGISTER_CLIENT = 1; static final int MSG_UNREGISTER_CLIENT = 2; static final int MSG_SET_INT_VALUE = 3; static final int MSG_SET_STRING_VALUE = 4; final Messenger mMessenger = new Messenger(new IncomingHandler()); // Target we publish for clients to send messages to IncomingHandler. @Override public IBinder onBind(Intent intent) { return mMessenger.getBinder(); } class IncomingHandler extends Handler { // Handler of incoming messages from clients. @Override public void handleMessage(Message msg) { switch (msg.what) { case MSG_REGISTER_CLIENT: mClients.add(msg.replyTo); break; case MSG_UNREGISTER_CLIENT: mClients.remove(msg.replyTo); break; case MSG_SET_INT_VALUE: incrementby = msg.arg1; break; default: super.handleMessage(msg); } } } private void sendMessageToUI(int intvaluetosend) { for (int i=mClients.size()-1; i>=0; i--) { try { // Send data as an Integer mClients.get(i).send(Message.obtain(null, MSG_SET_INT_VALUE, intvaluetosend, 0)); //Send data as a String Bundle b = new Bundle(); b.putString("str1", "ab" + intvaluetosend + "cd"); Message msg = Message.obtain(null, MSG_SET_STRING_VALUE); msg.setData(b); mClients.get(i).send(msg); } catch (RemoteException e) { // The client is dead. Remove it from the list; we are going through the list from back to front so this is safe to do inside the loop. mClients.remove(i); } } } @Override public void onCreate() { super.onCreate(); Log.i("MyService", "Service Started."); showNotification(); timer.scheduleAtFixedRate(new TimerTask(){ public void run() {onTimerTick();}}, 0, 100L); isRunning = true; } private void showNotification() { nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); // In this sample, we'll use the same text for the ticker and the expanded notification CharSequence text = getText(R.string.service_started); // Set the icon, scrolling text and timestamp Notification notification = new Notification(R.drawable.icon, text, System.currentTimeMillis()); // The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), 0); // Set the info for the views that show in the notification panel. notification.setLatestEventInfo(this, getText(R.string.service_label), text, contentIntent); // Send the notification. // We use a layout id because it is a unique number. We use it later to cancel. nm.notify(R.string.service_started, notification); } @Override public int onStartCommand(Intent intent, int flags, int startId) { Log.i("MyService", "Received start id " + startId + ": " + intent); return START_STICKY; // run until explicitly stopped. } public static boolean isRunning() { return isRunning; } private void onTimerTick() { Log.i("TimerTick", "Timer doing work." + counter); try { counter += incrementby; sendMessageToUI(counter); } catch (Throwable t) { //you should always ultimately catch all exceptions in timer tasks. Log.e("TimerTick", "Timer Tick Failed.", t); } } @Override public void onDestroy() { super.onDestroy(); if (timer != null) {timer.cancel();} counter=0; nm.cancel(R.string.service_started); // Cancel the persistent notification. Log.i("MyService", "Service Stopped."); isRunning = false; } }

    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

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