Search Results

Search found 30 results on 2 pages for 'prescott'.

Page 1/2 | 1 2  | Next Page >

  • Fixing a collision detection bug in Slick2D

    - by Jesse Prescott
    My game has a bug with collision detection. If you go against the wall and tap forward/back sometimes the game thinks the speed you travelled at is 0 and the game doesn't know how to get you out of the wall. My collision detection works by getting the speed you hit the wall at and if it is positive it moves you back, if it is negative it moves you forward. It might help if you download it: https://rapidshare.com/files/1550046269/game.zip Sorry if I explained badly, it's hard to explain. float maxSpeed = 0.3f; float minSpeed = -0.2f; float acceleration = 0.002f; float deacceleration = 0.001f; float slowdownSpeed = 0.002f; float rotateSpeed = 0.08f; static float currentSpeed = 0; boolean up = false; boolean down = false; boolean noKey = false; static float rotate = 0; //Image effect system static String locationCarNormal; static String locationCarFront; static String locationCarBack; static String locationCarBoth; static boolean carFront = false; static boolean carBack = false; static String imageRef; boolean collision = false; public ComponentPlayerMovement(String id, String ScarNormal, String ScarFront, String ScarBack, String ScarBoth) { this.id = id; playerBody = new Rectangle(900/2-16, 700/2-16, 32, 32); locationCarNormal = ScarNormal; locationCarFront = ScarFront; locationCarBack = ScarBack; locationCarBoth = ScarBoth; imageRef = locationCarNormal; } @Override public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { Input input = gc.getInput(); playerBody.transform(Transform.createRotateTransform(2)); float hip = currentSpeed * delta; float unstuckspeed = 0.05f * delta; if(carBack && !carFront) { imageRef = locationCarBack; ComponentImageRender.updateImage(); } else if(carFront && !carBack) { imageRef = locationCarFront; ComponentImageRender.updateImage(); } else if(carFront && carBack) { imageRef = locationCarBoth; ComponentImageRender.updateImage(); } if(input.isKeyDown(Input.KEY_RIGHT)) { rotate += rotateSpeed * delta; owner.setRotation(rotate); } if(input.isKeyDown(Input.KEY_LEFT)) { rotate -= rotateSpeed * delta; owner.setRotation(rotate); } if(input.isKeyDown(Input.KEY_UP)) { if(!collision) { up = true; noKey = false; if(currentSpeed < maxSpeed) { currentSpeed += acceleration; } MapCoordStorage.mapX += hip * Math.sin(Math.toRadians(rotate)); MapCoordStorage.mapY -= hip * Math.cos(Math.toRadians(rotate)); } else { currentSpeed = 1; } } else if(input.isKeyDown(Input.KEY_DOWN) && !collision) { down = true; noKey = false; if(currentSpeed > minSpeed) { currentSpeed -= slowdownSpeed; } MapCoordStorage.mapX += hip * Math.sin(Math.toRadians(rotate)); MapCoordStorage.mapY -= hip * Math.cos(Math.toRadians(rotate)); } else { noKey = true; if(currentSpeed > 0) { currentSpeed -= deacceleration; } else if(currentSpeed < 0) { currentSpeed += acceleration; } MapCoordStorage.mapX += hip * Math.sin(Math.toRadians(rotate)); MapCoordStorage.mapY -= hip * Math.cos(Math.toRadians(rotate)); } if(entityCollisionWith()) { collision = true; if(currentSpeed > 0 || up) { up = true; currentSpeed = 0; carFront = true; MapCoordStorage.mapX += unstuckspeed * Math.sin(Math.toRadians(rotate-180)); MapCoordStorage.mapY -= unstuckspeed * Math.cos(Math.toRadians(rotate-180)); } else if(currentSpeed < 0 || down) { down = true; currentSpeed = 0; carBack = true; MapCoordStorage.mapX += unstuckspeed * Math.sin(Math.toRadians(rotate)); MapCoordStorage.mapY -= unstuckspeed * Math.cos(Math.toRadians(rotate)); } else { currentSpeed = 0; } } else { collision = false; up = false; down = false; } if(currentSpeed >= -0.01f && currentSpeed <= 0.01f && noKey && !collision) { currentSpeed = 0; } } public static boolean entityCollisionWith() throws SlickException { for (int i = 0; i < BlockMap.entities.size(); i++) { Block entity1 = (Block) BlockMap.entities.get(i); if (playerBody.intersects(entity1.poly)) { return true; } } return false; } }

    Read the article

  • Copy all files and folders excluding subversion files and folders on OS X

    - by Michael Prescott
    I'm trying to copy all files and folders from one directory to another, but exclude certain files. Specifically, I want to exclude subversion files and folders. However, I'd like a general yet concise solution. I imagine I'll find the need to exclude several types of files in the near future. For example, I might want to exclude .svn, *.bak, and *.prj. Here is what I've put together so for, but it is not working for me. The first part, find works, but I'm doing something wrong with xargs and cp. I tried cp with and without the -R. Also, I'm using OS X and it appears to have a less featured version of xargs than linux systems. find ./sourcedirectory -not \( -name .svn -a -prune \) | xargs -IFILES cp -R FILES ./destinationdirectory

    Read the article

  • Recommendations for secure business collaboration tools

    - by Michael Prescott
    I'm searching for a secure and easy way for business partners to collaboratively edit and exchange documents, share calendars, create schedules, and assign tasks. I speculate that the ideal collaboration environment or work-flow would actually involve several technologies and services. My co-workers and I have tried a variety of things from Google Apps to Wiki's, but nothing feels very fluid or complete. I suppose defining what we need and our constraints is probably in order: collaboratively edit basic text documents and spreadsheets exchange documents like flow-charts, graphs, and files generated by our other desktop applications, but not source code assign tasks to each other and ourselves and track the history of those tasks easily see when relevant documents have been modified since last viewing and ability to easily push notifications to relevant workers (a clean front page that shows updates would probably suffice) provide limited access to contract workers and guests users if a remote user system is compromised (keystroke logger or other spyware) we don't want the criminal to be able to gain access to all business documents (processes, trade-secrets, customer lists, etc.) simply because they gained access to a single Google account (or whatever web service) Cannot be a difficult to administer VPN infrastructure Cannot cost more than $100 per month (yeah, money is tight) Needs to support up to 25 users We can host our own web applications, but it must be low maintenance solution

    Read the article

  • Best way to create a common folder when creating new users that is a drop box, readable and writeable by all users

    - by Michael Prescott
    What is the best way to provide a common drop box for all users, so that any user that is a part of a particular group can read and write to and from the directory? I thought of creating a directory outside of the /home directory, creating a group specifically for accessing the directory, then adding all desired users to that group, and finally adding a symlink to the home directory of each user that points to the drop box folder. That seems like a lot of work. Is there a better way? I'm running ubuntu 10.04 LTS.

    Read the article

  • How can I safely close this window and forever avoid seeing similar pop-ups from Mackeeper Zeobit's malware and spyware?

    - by Michael Prescott
    The attached image shows a window that just popped up and the only button available is the OK button. I could Force quit Safari, but I've got several sites open right now and don't want to try and find my place again. Besides, I've seen similar hacks in the past and I'd like to learn how to handle them in a way better than just a brute force-quit. I've never heard of MacKeeper or Zeobit, so I opened Firefox and did a few searches while Safari is obviously still stuck, waiting for me to click the sneaky OK button in the dialog window. Anyhow, at least the first few pages of most search results contain lots of blabbering from questionable witnesses about how MacKeeper saved them from some malware or spyware. However, any company that is hacking the browser to maliciously install their product is itself the criminal and not providing a true security application. So, there are three questions here: How can I close this window? Can I do something to Safari to avoid these hacks in the future? (Just curious) Is MacKeeper or Zeobit somehow loading the search results so that no information about their application being malware or spyware is listed (I can't be the only person in the world that is offended by their tactics, even though it appears I am)?

    Read the article

  • What would interfere with changing the default application for opening files on OS X?

    - by Michael Prescott
    I know how to change the default application for opening files. I select a file in Finder, right-click and select Get Info from the context menu. In the file's Info window, expand the Open with: panel. In that panel is a combo box that says, in my case, Adobe Flash CS4. I click the combo box and select Flash Player. It changes. Then I click the Change All... button. A dialog pops up and says: Are you sure you want to change all similar documents to open with the application “Adobe Flash CS4”? This change will apply to all documents with extension “.swf”. Cancel/Continue Well, clicking Continue does exactly what the message says. It sets the Finder to open all swf files with Adobe Flash CS4. What is going on? Why doesn't the message say, .... "Flash Player"

    Read the article

  • How can I easily identify all keyboard shortcuts (hotkeys) on OS X and current running Applications

    - by Michael Prescott
    By default, the function keys on my MacBook Pro control various hardware features and native operating system applications like the brightness of the LCD, Expose, or iTunes. I like these buttons and can use the fn button to take advantage of application Function keys when working with certain applications. Some service-type, background applications also have useful keyboard shortcuts. I tend to forget which keys are active at the moment and sometimes launch the wrong processes. Is there an application or operating system, native way of identifying all of the currently available keyboard shortcuts?

    Read the article

  • How can I copy a VMware Fusion virtual machine to a FAT32 partition?

    - by Michael Prescott
    I created the virtual machine on a host running OS X. I then moved the machine to a FAT32 partition on an external drive. It moved the first time without error. Then I moved it from the external drive to a host running Ubuntu 9.10. I had to move to a FAT32 partition first because Ubuntu doesn't recognize Mac OS Extended partitions on the drive. So, the virtual machine (vm) ran on the ubuntu host for a while and then I moved it back to the FAT32 partition and from there back to the OS X host. I worked on the vm for a while on the OS X host and then attempted to move it back to the FAT32 partition. I get the following system error: The Finder can’t complete the operation because some data in “my-virtual-machine” can’t be read or written. (Error code -36) Interestingly, I can move the file to another OS X partition, just not FAT32. I also perused VMware's forums and found advice to set permissions on all files and folders to 777. I did this, but have had no success. I notice the the files within the vm package are 777 now, but there is an extended attributes symbol on their permission details "rwxrwxrwx@" Since I can copy the vm between OS X partitions, but not to non OS X partitions, and all files and folders withing the vm package and the package itself have permissions of 777, I speculate that the "@" is the problem. How can I remove the "@" or is there something else I need to modify to allow me to copy/move the vm to other hosts?

    Read the article

  • How can I safely close this window and forever avoid seeing similar pop-ups from Mackeeper Zeobit's malware and spyware?

    - by Michael Prescott
    The attached image shows a window that just popped up and the only button available is the OK button. I could Force quit Safari, but I've got several sites open right now and don't want to try and find my place again. Besides, I've seen similar hacks in the past and I'd like to learn how to handle them in a way better than just a brute force-quit. I've never heard of MacKeeper or Zeobit, so I opened Firefox and did a few searches while Safari is obviously still stuck, waiting for me to click the sneaky OK button in the dialog window. Anyhow, at least the first few pages of most search results contain lots of blabbering from questionable witnesses about how MacKeeper saved them from some malware or spyware. However, any company that is hacking the browser to maliciously install their product is itself the criminal and not providing a true security application. So, there are three questions here: How can I close this window? Can I do something to Safari to avoid these hacks in the future? (Just curious) Is MacKeeper or Zeobit somehow loading the search results so that no information about their application being malware or spyware is listed (I can't be the only person in the world that is offended by their tactics, even though it appears I am)?

    Read the article

  • How can I configure Adobe Help so it doesn't chatter so much with Adobe's domain?

    - by Michael Prescott
    Adobe Help that came with Creative Suite 5 and/or Flash Builder Pro is constantly creating network traffic with an Adobe site, www.wip4.adobe.com In the Adobe Help application Preferences, I find that I can change the settings so that I must manually download updates, but apparently the application still likes to call home and chatter non-stop with www.wip4.adobe.com. I could use something like Little Snitch to block all this spyware-like behavior, but I'd really prefer to just change the application's behavior. Is there a hidden setting or configuration file to adjust this behavior to something more appropriate and polite?

    Read the article

  • Is a reboot required to refresh permissions after adding a user to a new group?

    - by Michael Prescott
    On ubuntu server, I've noticed more than once now that after adding a user to a group that user doesn't have group permissions until I reboot the system. For example: User 'hudson' needs permission to read directory 'root:shadow /etc/shadow' So I add hudson to the shadow group. hudson still cannot read. So, I 'sudo shutdown -h -r now' and when the system comes up again user hudson can read. Is a reboot required or is there a better way to get permissions applied after adding the user to the group?

    Read the article

  • How do I get Flex Builder to use the selected framework?

    - by Michael Prescott
    I'm attempting to create a Flex Project that will cause the Flash Player to cache the Flex framework. Flex Builder comes with Flex SDK 3.2.0.3958 and setting the Framework Linkage to use Runtime shared Library (RSL) under Project Properties - Flex Build Path will separate the framework from my main application and I see that my project's bin-debug directory contains framework_3.2.0.3958.swf and *.swz for distribution. Flex SDK 3.4 fixes a few bugs, so I configured it as another available sdk and set it as the default SDK. When I compile, I expect the bin-debug directory to contain framework_3.4.0.9271.swf and *.swz; however, Flex Builder is still writing framework_3.2.0.3958.swf and *.swz. How do I configure Flex Builder to package the correct framework files for Flash Player caching?

    Read the article

  • How do I stop a datagrid's first-row itemRenderer from instantiating/adding/initializing/etc twice?

    - by Michael Prescott
    In a Flex DataGrid's first row, the itemRenderer will initialize twice. Tracing the results reveals that the flex framework is possibly creating two instances of the first row's itemRenderer. In a more complex application, where the itemRenderer contains a data-bound ColorPicker, we're seeing an infinite loop occur because of this problem. Only the first row's itemRenderer is initialized twice. Is there a way to override flex's behavior and stop this from occurring? The following code demonstrates the problem: Main Application: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="on_initialize(event);"> <mx:Script> <![CDATA[ /** * This experiment shows how the first row's itemrenderer is instantiated/added/initialized twice. * We've never even noticed this before we found that a data-bound ColorPicker enters a infinite * loop when it is within an itemRenderer. */ import mx.collections.ArrayCollection; import mx.events.FlexEvent; private var dg_array:Array; private var dg_arrayCollection:ArrayCollection; private function on_initialize(event:FlexEvent):void { dg_array = new Array(); dg_arrayCollection = new ArrayCollection(); dg_arrayCollection.addItem("item 1"); dg_arrayCollection.addItem("item 2"); dg.dataProvider = dg_arrayCollection; } ]]> </mx:Script> <mx:DataGrid id="dg" width="100%" height="100%" rowCount="5"> <mx:columns> <mx:DataGridColumn headerText="Name" itemRenderer="SimpleItemRenderer"/> </mx:columns> </mx:DataGrid> </mx:Application> SimpleItemRenderer: <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" initialize="//on_initialize(event);"> <mx:Script> <![CDATA[ import mx.events.FlexEvent; [Bindable] override public function set data(value:Object):void { _data = value; } override public function get data():Object { return _data; } private var _data:Object; private function on_initialize_textInput(event:FlexEvent):void { trace("initialize:event.target="+event.target+", " + _data); // runs twice, for the first item only } private function on_creationComplete_textInput(event:FlexEvent):void { trace("creationComplete:event.target="+event.target+", " + _data); // runs twice, for the first item only } ]]> </mx:Script> <mx:TextInput text="{data}" id="textInput" initialize="on_initialize_textInput(event);" creationComplete="on_creationComplete_textInput(event);"/> </mx:Canvas> Abbreviated Output: initialize:event.target=ItemRenderers0.dg...SimpleItemRenderer12.textInput, null initialize:event.target=ItemRenderers0.dg...SimpleItemRenderer24.textInput, null creationComplete:event.target=ItemRenderers0.dg...SimpleItemRenderer24.textInput, item 1 initialize:event.target=ItemRenderers0.dg...SimpleItemRenderer29.textInput, null creationComplete:event.target=ItemRenderers0.dg...SimpleItemRenderer29.textInput, item 2 creationComplete:event.target=ItemRenderers0.dg...SimpleItemRenderer12.textInput, item 1

    Read the article

  • Linq and Lamba Expressions - while walking a selected list perform an action

    - by Prescott
    Hey, I'm very new to linq and lamba expressions. I'm trying to walk a collection, and when I find an item that meets some criteria I'd like to add that to another separate collection. My linq to walk the collection looks like this (this works fine): From i as MyCustomItem In MyCustomItemCollection Where i.Type = "SomeType" Select i I need each of the select items to then be added to a ListItemCollection, I know I can assign that linq query to a variable, and then do a for each loop adding a new ListItem to the collection, but I'm trying o find a way to add each item to the new ListItemcollection while walking, not a second loop. Thanks ~P

    Read the article

  • What is the "proper" method for determining if a swf is running within an AIR application?

    - by Michael Prescott
    I've got a Flex Web project and a Flex AIR project that use a common code-base. The common code defines several run-time loaded Flex Modules. I want the Flex Modules to behave differently depending on whether the running base application is WEB or AIR. What is the proper method for determining from the module code whether the module is running in a WEB or AIR application? (I found that Security.sandboxType.toString() returns "application", but I haven't found anything better in the documentation, yet.)

    Read the article

  • What is the proper method to stop loading a Flex Module before it has completely loaded?

    - by Michael Prescott
    I seem to recall that Loader.unload() could once be used to stop loading a swf before it had finished loading. I can no longer find documentation or the blog where I read this. Perhaps it was an unofficial feature. Anyhow, IModuleInfo, returned by ModuleManager.getModule() has an unload() method. If I want to halt loading a Flex Module that is in progress, do I just call iModuleInfo_instance.unload()?

    Read the article

  • P4 vs. i3/i5 *T in power consumption and performance [migrated]

    - by Walter Zomb
    I am running an Intel P4 prescott with HT on my home server (linux file server on encrypted disks on software-RAID5 and virtualisation host for three further machines). The performance for this purpose is really okay. When the system is idle it consumes about 140W power. I am considering buying a new mainboard for an e.g. Intel i3-2100T or an Intel i5-2390T. Both are low power CPUs with a TDP about 40W. Has anyone experiences how much power a recent mainboard with one of these CPUs an 3-4 'green-energy' disks (6W each) consumes? Do I get underneath the 100W threshold? What's about the performance of these low power CPUs? Are they comparable to an Intel P4 with HT? regards, walter

    Read the article

  • How can I compare effective power usage of two CPUs / CPU+Mobo+Mem combinations?

    - by einpoklum
    I have this server which does mostly file sharing (with the associated storage). No serious number crunching and it isn't the firewall. My current box has a Celeron D processor (Prescott 336 2.8 GHz); and I'm considering replacing it with a Pentium D (Smithfield 805 2.66 GHz) - for reasons which do not involve performance. How can I know whether one can expect a higher or lower power consumptipn for the change? And how can I estimate the power consumption for each option?

    Read the article

  • how to link static library into dynamic library in gcc

    - by bob
    Under gcc (g++), I have compiled a static .a (call it some_static_lib.a) library. I want to link (is that the right phrase?) this .a file into another dynamic library (call it libsomeDyn.so) that I'm building. Though the .so compiles, I don't see content of .a under .so using nm command: /usr/bin/g++ -fPIC -g -O2 -Wall -Werror -pipe -march=pentium3 -mtune=prescott -MD -D_FILE_OFFSET_BITS=64 -DLINUX -D_GNU_SOURCE -D_THREAD_SAFE -DUSE_STD_YUTSTRING -DNO_FACTORY -I../../../../../../../../ -I../../../../../../../..//libraries -Wl,-rpath,/usr/lib -o libsomeDyn.so some.o another.o some_static_lib.a -shared -Wl -x -Wl,-soname,libsomeDyn.so I do not see functions under some_static_lib.a under libsomeDyn.so. What am I doing wrong?

    Read the article

1 2  | Next Page >