Search Results

Search found 13 results on 1 pages for 'flavio capaccio'.

Page 1/1 | 1 

  • Android: how do I switch between game scenes in a game? Any tutorials?

    - by Flavio
    I am trying to create a simple game using the Android SDK without using AndEngine (or any other game engine). I have plenty of experience designing games from the past, but I'm having lots of trouble trying to use the Android SDK to make my game. By far my biggest hurdle right now is switching between views. That is, for example, going from the menu to the first level, etc. I am using a traditional model I learned (I think it's called a scene stack or something?) in which you push the current scene onto a stack and the game's main loop runs the top item of the stack. This model seems non-trivial to implement in the Android SDK, mostly because Android seems to be picky about which thread instantiates which view. My issue is that I want the first level to show up when you press a button on the main menu, but when I instantiate the first level (the level class extends SurfaceView and implements SurfaceHolder.Callback) I get a runtime error complaining that the thread that runs the main menu can't instantiate this class. Something about calling Looper.prepare(). I figured at this point I was probably doing things wrong. I'm not sure how to specifically phrase my issue into a question, so maybe I should leave it as either 1) Does anybody know a good way (or the 'proper' way) to switch between scenes in an Android game? or 2) Are there any tutorials out there which show how to create a game that doesn't take place entirely in one scene? (I have googled for a while to no avail... maybe someone else knows of one?) Thanks!

    Read the article

  • Robotium - Write to file in eclipse workspace or computer file system

    - by Flavio Capaccio
    I'm running some tests using Robotium on an Android application that interacts with a web-portal. I'd like to save some information to file; for example I need to save the id of the username I created from the app and I want to make it read from Selenium to run tests on web-portal to verify a webpage for that user has been created. Is it possible? Could someone suggest me a solution or a work-around? This is an example of code, but it doesn't work (I want to write to a file for example on c:\myworkspace\filename.txt a string): public void test_write_file(){ if(!solo.searchText("HOME")){ signIn("39777555333", VALID_PASSWORD); } try { String content = "This is the content to write into file"; File file = new File("filename.txt"); // if file doesnt exists, then create it if (!file.exists()) { file.createNewFile(); } FileWriter fw = new FileWriter(file.getAbsoluteFile()); BufferedWriter bw = new BufferedWriter(fw); bw.write(content); bw.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } assertTrue(solo.searchText("HOME")); }

    Read the article

  • Postfix : error: unsupported dictionary type: mysql

    - by flavio.troja
    I've a problem w/ postfix problem: # tail -f /var/log/mail.err Aug 20 17:57:50 myserver postfix/smtpd[8243]: error: unsupported dictionary type: mysql Aug 20 17:57:50 myserver postfix/smtpd[8243]: error: unsupported dictionary type: mysql Aug 20 17:58:05 myserver postfix/smtpd[8244]: error: unsupported dictionary type: mysql Aug 20 17:58:05 myserver postfix/smtpd[8244]: error: unsupported dictionary type: mysql Aug 20 18:00:38 myserver postfix/smtpd[8277]: error: unsupported dictionary type: mysql Aug 20 18:00:38 myserver postfix/smtpd[8277]: error: unsupported dictionary type: mysql Aug 20 18:03:32 myserver postfix/smtpd[8320]: error: unsupported dictionary type: mysql Aug 20 18:03:32 myserver postfix/smtpd[8320]: error: unsupported dictionary type: mysql Aug 20 18:03:33 myserver postfix/trivial-rewrite[8322]: error: unsupported dictionary type: mysql Aug 20 18:03:33 myserver postfix/trivial-rewrite[8322]: error: unsupported dictionary type: mysql idea?

    Read the article

  • How to avoid Memory "Hard Fault/sec"

    - by Flavio Oliveira
    i've a problem on my windows 2008 server x64, and i cannot understand how can i solve it. i'm looking to Resource Monitor and see about 100 to 200 hard faults/sec. and generally the machine is slow. As i've readed a bit it is caused by a "memory Page" that is no longer available on physical memory and causes a io operations (disk) and it is a problem. The current hardware is a intel core2duo E8400 (3.0GHz) with 6GB RAM on a Windows Server Web 64-bit. Actually the machine have about 2GB Ram used what having 4Gb available to use, Why is the machine requires that high level of Disk operations? what can i do to increase the performance? Im experiencing a memory issues? what should be my starting point?

    Read the article

  • C#: How to run NUnit from my code

    - by Flavio
    Hello, I'd like to use NUnit to run unit tests in my plug-in, but it needs to be run in the context of my application. To solve this, I was trying to develop a plug-in that runs NUnit, which in turn will execute my tests in the application's context. I didn't find a specific documentation on this subject so I dug a piece of information here and there and I came out with the following piece of code (which is similar to one I found here in StackOverflow): SimpleTestRunner runner = new SimpleTestRunner(); TestPackage package = new TestPackage( "Test" ); string loc = Assembly.GetExecutingAssembly().Location package.Assemblies.Add( loc ); if( runner.Load(package) ) { TestResult result = runner.Run( new NullListener() ); } The result variable says "has no TestFixture" although I know for sure it is there. In fact my test file contains two test. Using another approach I found, which is summarized by the following code: TestSuiteBuilder builder = new TestSuiteBuilder(); TestSuite testSuite = builder.Build( package ); // Run tests TestResult result = testSuite.Run( new NullListener(), NUnit.Core.TestFilter.Empty ); I saw nunit data structures with only 1 test and I had the same error. For sake of completeness, I am using the latest version of nunit, which is 2.5.5.10112. Does anyone know what I'm missing? A sample code would be appreciated. thanks

    Read the article

  • WNetAddConnection2 from a Windows Service

    - by Flavio
    I'm trying to connect to a remote password protected shared folder from a Windows service, which runs as LocalSystem account. It seems that the LocalSystem account is unable to directly access password-protected network shares using WNetAddConnection2() or similar calls. Can anyone confirm this? I've read that impersonating an administrator user might be the way to go. I've tried using LogonUser() and ImpersonateLoggedOnUser() before WNetAddConnection2(), it appears that the mount of the network path succeeds, but then actual accesses (e.g. enumerating of files in remote folder) fail. Any ideas? Thanks.

    Read the article

  • C# Changing class method at run-time

    - by Flavio
    Hi, I need to extend the behavior of an instance, but I don't have access to the original source code of that instance. For example: /* I don't have the source code for this class, only the runtime instance */ Class AB { public void execute(); } in my code I would to intercept every call to execute, compute some sutff and then call the original execute, something like /* This is how I would like to modify the method invokation */ SomeType m_OrgExecute; { AB a = new AB(); m_OrgExecute = GetByReflection( a.execute ); a.execute = MyExecute; } void MyExecute() { System.Console.Writeln( "In MyExecute" ); m_OrgExecute(); } Is that possible? Does anyone have a solution for this problem?

    Read the article

  • How do I test if a variable is a number in bash?

    - by Flávio Amieiro
    I just can't figure out how do I make sure an argument passed to my script is a number or not. All I want to do is something like this: test *isnumber* $1 && VAR=$1 || echo "need a number" Any help? UPDATE: I managed (whit Charles' help) to do it, but I'm not yet sure it's the best way to do that (even though it worked on my tests). This is how it ended up: [[ $1 =~ "^[0-9]+$" ]] && echo "numero" && exit 0 || echo "nao numero" && exit 1

    Read the article

  • Force CL-Lex to read whole word

    - by Flávio Cruz
    I'm using CL-Lex to implement a lexer (as input for CL-YACC) and my language has several keywords such as "let" and "in". However, while the lexer recognizes such keywords, it does too much. When it finds words such as "init", it returns the first token as IN, while it should return a "CONST" token for the "init" word. This is a simple version of the lexer: (define-string-lexer lexer (...) ("in" (return (values :in $@))) ("[a-z]([a-z]|[A-Z]|\_)" (return (values :const $@)))) How do I force the lexer to fully read the whole word until some whitespace appears?

    Read the article

1