Search Results

Search found 54 results on 3 pages for 'flavio oliveira'.

Page 1/3 | 1 2 3  | Next Page >

  • 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

  • Android SDK PATH Error: doesn´t find home directory [migrated]

    - by THeo Oliveira
    I use Ubuntu 12.10 and I tried to follow this guide Install android sdk and eclipse in Ubuntu 12.04 but I keep getting this error: Error: The AVD manager normally uses the user's profile directory to store AVD files. However it failed to find the default profile directory. To fix this, please set the environment variable ANDROID_SDK_HOME to a valid path such as ¨~¨. Any ideas how can I fix this?

    Read the article

  • Android SDK PATH Error: doesn´t find home directory

    - by THeo Oliveira
    I use Ubuntu 12.10 and I tried to follow this guide Install android sdk and eclipse in Ubuntu 12.04 but I keep getting this error: Error: The AVD manager normally uses the user's profile directory to store AVD files. However it failed to find the default profile directory. To fix this, please set the environment variable ANDROID_SDK_HOME to a valid path such as ¨~¨. Any ideas how can I fix this?

    Read the article

  • Improve speed of "start menu" in Linux Mint 10 - Ubuntu 10.10 derivative [closed]

    - by Gabriel L. Oliveira
    I have a global menu (including application, administration and system tabs) that is taking too much time (for me) to load (about 2.5 seconds). Of course, this time is taken only during first start. After it have loaded, next times are better ( less than 0.2 miliseconds) The menu was taking more time before (about 5 seconds), and I found that was because of the 'Other' part of the menu, that included many applications installed with Wine, so I removed all of them (I didn't need them at all). I have a "normal" knowledge of programming, and I think that the process of starting the menu for the first time has some kind of "cache function", that tries to find which apps are present that need to be placed under menu to be shown to user. But didn't found this function so that I could analyze in details what he is doing (if searching for files under "~/.local/share/applications" or anything else). Also, I found that hitting "Alt-F2" also fires this "cache function", because after waiting it to load, the process of opening the menu took less than 0.2 miliseconds. So, could anyone help me in order to reduce this time? I found on internet that some user could reduce the time by resizing the icons of applications. But found here that most of my icons are already at 25x25 size. Any other idead? Maybe a multiprocess to load it, or include it under startup... don't know. Ps: Sorry if this is an awkward question, but I just do not like waiting for things to happen, and think that this process should be smoother than it's now. Also, thanks in advance!

    Read the article

  • sudo apt-get install -f doesn't fix broken packages. And now?

    - by Du Oliveira
    $ sudo apt-get install -f [sudo] password for ...: Lendo listas de pacotes... Pronto Construindo árvore de dependências Lendo informação de estado... Pronto Corrigindo dependências... Pronto Os seguintes pacotes foram instalados automaticamente e já não são necessários: python-pyasn1 libconfig++8 python-twisted-runner linux-headers-3.0.0-12 libvamp-sdk2 python-twisted-mail libgnomecanvasmm-2.6-1c2a python-twisted-lore python-twisted-conch python-twisted-news python-twisted-words python-twisted libffado2 linux-headers-3.0.0-12-generic libaubio2 Use 'apt-get autoremove' para removê-los. Os pacotes extra a seguir serão instalados: libmpeg3cine Os NOVOS pacotes a seguir serão instalados: libmpeg3cine 0 pacotes atualizados, 1 pacotes novos instalados, 0 a serem removidos e 0 não atualizados. 2 pacotes não totalmente instalados ou removidos. É preciso baixar 0 B/2.573 kB de arquivos. Depois desta operação, 6.762 kB adicionais de espaço em disco serão usados. Você quer continuar [S/n]? S (Lendo banco de dados ... 317732 ficheiros e directórios actualmente instalados.) Desempacotando libmpeg3cine (de .../libmpeg3cine_1%3a2.2-0.3~ppa1~oneiric1_i386.deb) ... dpkg: erro processando /var/cache/apt/archives/libmpeg3cine_1%3a2.2-0.3~ppa1~oneiric1_i386.deb (--unpack): a tentar sobre-escrever '/usr/bin/mpeg3cat', que também está no pacote mpeg3-utils 1.5.4-5ubuntu1 Erros foram encontrados durante o processamento de: /var/cache/apt/archives/libmpeg3cine_1%3a2.2-0.3~ppa1~oneiric1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1) .....:~$ apt-get autoremove E: Não foi possível abrir arquivo de trava /var/lib/dpkg/lock - open (13: Permissão negada) E: Não foi possível travar o diretório administrativo (/var/lib/dpkg/), você é root?

    Read the article

  • VirtualBox Share permissions

    - by Eduardo Oliveira
    at the moment i'm running ubuntu server 12.04 on top of a virtual box running as service in M$ w7x64, I've configured the shares on fstab with E /media/E vboxsf auto,rw,uid=1000,gid=1000 0 0 the mount is ok drwxrwxrwx 1 knoker knoker 16384 Sep 1 20:02 E but i cant change the permissions inside of /media/E ,chmod runs but doesn't do nothing. on a specific case /media/E/Docs/Downloads i have dr-xr-xr-x 1 knoker knoker 163840 Sep 1 19:30 Downloads and since i cant seem to be able to change from linux i tried it on the windows, and all users listed have full control... Any ideas on what is happening? Best Regards, Knoker

    Read the article

  • Switch vs Polymorphism when dealing with model and view

    - by Raphael Oliveira
    I can't figure out a better solution to my problem. I have a view controller that presents a list of elements. Those elements are models that can be an instance of B, C, D, etc and inherit from A. So in that view controller, each item should go to a different screen of the application and pass some data when the user select one of them. The two alternatives that comes to my mind are (please ignore the syntax, it is not a specific language) 1) switch (I know that sucks) //inside the view controller void onClickItem(int index) { A a = items.get(index); switch(a.type) { case b: B b = (B)a; go to screen X; x.v1 = b.v1; // fill X with b data x.v2 = b.v2; case c: go to screen Y; etc... } } 2) polymorphism //inside the view controller void onClickItem(int index) { A a = items.get(index); Screen s = new (a.getDestinationScreen()); //ignore the syntax s.v1 = a.v1; // fill s with information about A s.v2 = a.v2; show(s); } //inside B Class getDestinationScreen(void) { return Class(X); } //inside C Class getDestinationScreen(void) { return Class(Y); } My problem with solution 2 is that since B, C, D, etc are models, they shouldn't know about view related stuff. Or should they in that case?

    Read the article

  • What could be the reason for my resolution to be right running 11.10 on VirtualBox and not on machine?

    - by Hadrian de Oliveira
    When I install Ubuntu 11.10 on my VirtualBox (running on Windows 7) and update the packages, it recognizes the display as the VirtualBox display, and gives me the options of various resolutions, one of them being right for my display, all works well. But then, when i install it on my machine (like was Windows 7) it doesn't give me the resolution options, even with the system updated and the openchrome graphics driver installed (which was also when running on Virtualbox). What could be the reason for this happening? (Could the VB guest software influence on this?)

    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

  • iChat Screen Sharing - Keyboard shortcut to switch back to my computer without messing with the mous

    - by Sergio Oliveira Jr.
    When you are watching a screen sharing session commanded by the other user, in other words, you are watching the other user doing stuff in his computer, how do I switch back to my computer without disrupting the other user by stealing the mouse to click on the "My Computer" window? Put simply: To go back to my computer I have to click in the "My computer" little window at the bottom, but that requires me to use the mouse which is being used by the other user. There must be a way to use a keyboard shortcut to perform that action without bothering the other user who is using the mouse to do something important. Anyone? Thanks, -Sergio

    Read the article

  • Just want to send emails from my Ubuntu Server. What simple SMTP server solution to use?

    - by Sergio Oliveira Jr.
    Basically I have a Ubuntu Server machine and I would like an idiot-proof solution for sending emails from my website that is also running in this same machine. My doubts are: 1) Should I use postfix or there are more simple solutions for an smtp server? 2) Do I need to be able to receive emails as well? I just want to send emails... 3) I did I simple test with postfix that came with my Ubuntu server and the email got sent, but it went to the spam box of my gmail. Anyway to avoid the spam box? 4) The email sender was [email protected]. How do I change that? Thanks very much! -Sergio

    Read the article

  • Reserving an IP with Netgear router from Time Warner

    - by Sergio Oliveira Jr.
    I tried everything but keep getting the following error: "Duplicated MAC address". Nothing is duplicated. I disconnected the PC that I would like to assign the IP. Basically this is important as I will configure some port forwarding and my notebook must always get the same IP from DHCP. This is called DHCP reservation but apparently is not working on this router. Has anyone being luck to have this working? The model is CG814WG and you have to click on LAN IP under web administration, -Sergio

    Read the article

  • Improve speed of "start menu" in Linux Mint 10 - Ubuntu 10.10 derivative

    - by Gabriel L. Oliveira
    I have a global menu (including application, administration and system tabs) that is taking too much time (for me) to load (about 2.5 seconds). Of course, this time is taken only during first start. After it have loaded, next times are better ( less than 0.2 miliseconds) The menu was taking more time before (about 5 seconds), and I found that was because of the 'Other' part of the menu, that included many applications installed with Wine, so I removed all of them (I didn't need them at all). I have a "normal" knowledge of programming, and I think that the process of starting the menu for the first time has some kind of "cache function", that tries to find which apps are present that need to be placed under menu to be shown to user. But didn't found this function so that I could analyze in details what he is doing (if searching for files under "~/.local/share/applications" or anything else). Also, I found that hitting "Alt-F2" also fires this "cache function", because after waiting it to load, the process of opening the menu took less than 0.2 miliseconds. So, could anyone help me in order to reduce this time? I found on internet that some user could reduce the time by resizing the icons of applications. But found here that most of my icons are already at 25x25 size. Any other idead? Maybe a multiprocess to load it, or include it under startup... don't know. Ps: Sorry if this is an awkward question, but I just do not like waiting for things to happen, and think that this process should be smoother than it's now. Also, thanks in advance!

    Read the article

  • Python: Check existence of shell command before execution

    - by Gabriel L. Oliveira
    Hi all. I'm trying to find a way to check the existence of a shell command before its execution. For example, I'll execute the command ack-grep. So, I'm trying to do: import subprocess from subprocess import PIPE cmd_grep = subprocess.Popen(["ack-grep", "--no-color", "--max-count=1", "--no-group", "def run_main", "../cgedit/"], stdout=PIPE, stderr=PIPE) Than, if I execute cmd_grep.stderr.read() I receive '' like the output. But I don't have the command ack-grep on my path. So, why Popen is not putting the error message on my .stderr variable? Also, is there a easyer way to do what I'm trying to do?

    Read the article

  • How to check if cell contains a value of another cell

    - by Antonio Oliveira
    Here is the scenario: On column A each cell has random text within it (names, address, account numbers, etc). Column A extends down to over 40 thousand rows. On column B I have a list of (account) numbers. Column B extends down to about 5 thousand rows. I need to filter column A to show only the rows that contain the account numbers that are part of column B. Neither column A nor B are in any specific order. I think he above scenario speaks for itself, but I can provide a quick example if needed (don't want to over complicate it).

    Read the article

  • Google I/O 2012 - Multi-Versioning Android User Interfaces

    Google I/O 2012 - Multi-Versioning Android User Interfaces Bruno Oliveira, Adam Powell This session will show you how to build user interfaces that work consistently across Android versions, from Eclair to today. We'll cover topics including the Action Bar, Fragments, style, size qualifiers, app structure, and navigation. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 1533 51 ratings Time: 48:22 More in Science & Technology

    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

  • 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

1 2 3  | Next Page >