Search Results

Search found 116 results on 5 pages for 'stranger'.

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

  • Using Event Driven Programming in games, when is it beneficial?

    - by Arthur Wulf White
    I am learning ActionScript 3 and I see the Event flow adheres to the W3C recommendations. From what I learned events can only be captured by the dispatcher unless, the listener capturing the event is a DisplayObject on stage and a parent of the object firing the event. You can capture the events in the capture(before) or bubbling(after) phase depending on Listner and Event setup you use. Does this system lend itself well for game programming? When is this system useful? Could you give an example of a case where using events is a lot better than going without them? Are they somehow better for performance in games? Please do not mention events you must use to get a game running, like Event.ENTER_FRAME Or events that are required to get input from the user like, KeyboardEvent.KEY_DOWN and MouseEvent.CLICK. I am asking if there is any use in firing events that have nothing to do with user input, frame rendering and the likes(that are necessary). I am referring to cases where objects are communicating. Is this used to avoid storing a collection of objects that are on the stage? Thanks Here is some code I wrote as an example of event behavior in ActionScript 3, enjoy. package regression { import flash.display.Shape; import flash.display.Sprite; import flash.events.Event; import flash.events.EventDispatcher; import flash.events.KeyboardEvent; import flash.events.MouseEvent; import flash.events.EventPhase; /** * ... * @author ... */ public class Check_event_listening_1 extends Sprite { public const EVENT_DANCE : String = "dance"; public const EVENT_PLAY : String = "play"; public const EVENT_YELL : String = "yell"; private var baby : Shape = new Shape(); private var mom : Sprite = new Sprite(); private var stranger : EventDispatcher = new EventDispatcher(); public function Check_event_listening_1() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { trace("test begun"); addChild(mom); mom.addChild(baby); stage.addEventListener(EVENT_YELL, onEvent); this.addEventListener(EVENT_YELL, onEvent); mom.addEventListener(EVENT_YELL, onEvent); baby.addEventListener(EVENT_YELL, onEvent); stranger.addEventListener(EVENT_YELL, onEvent); trace("\nTest1 - Stranger yells with no bubbling"); stranger.dispatchEvent(new Event(EVENT_YELL, false)); trace("\nTest2 - Stranger yells with bubbling"); stranger.dispatchEvent(new Event(EVENT_YELL, true)); stage.addEventListener(EVENT_PLAY, onEvent); this.addEventListener(EVENT_PLAY, onEvent); mom.addEventListener(EVENT_PLAY, onEvent); baby.addEventListener(EVENT_PLAY, onEvent); stranger.addEventListener(EVENT_PLAY, onEvent); trace("\nTest3 - baby plays with no bubbling"); baby.dispatchEvent(new Event(EVENT_PLAY, false)); trace("\nTest4 - baby plays with bubbling"); baby.dispatchEvent(new Event(EVENT_PLAY, true)); trace("\nTest5 - baby plays with bubbling but is not a child of mom"); mom.removeChild(baby); baby.dispatchEvent(new Event(EVENT_PLAY, true)); mom.addChild(baby); stage.addEventListener(EVENT_DANCE, onEvent, true); this.addEventListener(EVENT_DANCE, onEvent, true); mom.addEventListener(EVENT_DANCE, onEvent, true); baby.addEventListener(EVENT_DANCE, onEvent); trace("\nTest6 - Mom dances without bubbling - everyone is listening during capture phase(not target and bubble phase)"); mom.dispatchEvent(new Event(EVENT_DANCE, false)); trace("\nTest7 - Mom dances with bubbling - everyone is listening during capture phase(not target and bubble phase)"); mom.dispatchEvent(new Event(EVENT_DANCE, true)); } private function onEvent(e : Event):void { trace("Event was captured"); trace("\nTYPE : ", e.type, "\nTARGET : ", objToName(e.target), "\nCURRENT TARGET : ", objToName(e.currentTarget), "\nPHASE : ", phaseToString(e.eventPhase)); } private function phaseToString(phase : int):String { switch(phase) { case EventPhase.AT_TARGET : return "TARGET"; case EventPhase.BUBBLING_PHASE : return "BUBBLING"; case EventPhase.CAPTURING_PHASE : return "CAPTURE"; default: return "UNKNOWN"; } } private function objToName(obj : Object):String { if (obj == stage) return "STAGE"; else if (obj == this) return "MAIN"; else if (obj == mom) return "Mom"; else if (obj == baby) return "Baby"; else if (obj == stranger) return "Stranger"; else return "Unknown" } } } /*result : test begun Test1 - Stranger yells with no bubbling Event was captured TYPE : yell TARGET : Stranger CURRENT TARGET : Stranger PHASE : TARGET Test2 - Stranger yells with bubbling Event was captured TYPE : yell TARGET : Stranger CURRENT TARGET : Stranger PHASE : TARGET Test3 - baby plays with no bubbling Event was captured TYPE : play TARGET : Baby CURRENT TARGET : Baby PHASE : TARGET Test4 - baby plays with bubbling Event was captured TYPE : play TARGET : Baby CURRENT TARGET : Baby PHASE : TARGET Event was captured TYPE : play TARGET : Baby CURRENT TARGET : Mom PHASE : BUBBLING Event was captured TYPE : play TARGET : Baby CURRENT TARGET : MAIN PHASE : BUBBLING Event was captured TYPE : play TARGET : Baby CURRENT TARGET : STAGE PHASE : BUBBLING Test5 - baby plays with bubbling but is not a child of mom Event was captured TYPE : play TARGET : Baby CURRENT TARGET : Baby PHASE : TARGET Test6 - Mom dances without bubbling - everyone is listening during capture phase(not target and bubble phase) Event was captured TYPE : dance TARGET : Mom CURRENT TARGET : STAGE PHASE : CAPTURE Event was captured TYPE : dance TARGET : Mom CURRENT TARGET : MAIN PHASE : CAPTURE Test7 - Mom dances with bubbling - everyone is listening during capture phase(not target and bubble phase) Event was captured TYPE : dance TARGET : Mom CURRENT TARGET : STAGE PHASE : CAPTURE Event was captured TYPE : dance TARGET : Mom CURRENT TARGET : MAIN PHASE : CAPTURE */

    Read the article

  • Updating an Uploaded Zip File without re-uploading the whole files

    - by Stranger
    Imagine I have uploaded a zip file which contains thousands of images and its size is about 2GB. Now I want to add 100 new pictures which their size is about 10MB. The only way I can imagine is that I add these images to my 2GB collection, then upload the whole collection AGAIN!!! But I'm looking for a way that I can inject only new files without re-uploading the whole collection. So is there any way to do this? any good way or software?

    Read the article

  • Strange Email Activity Ruby on Rails

    - by Stranger
    Environment.rb ActionMailer::Base.delivery_method = :sendmail ActionMailer::Base.sendmail_settings = { :address = "mail.example.org", :domain = "example.org", :port = 25, :authentication = :login, :user_name = "email+email.org", :password = "password" } ActionMailer::Base.perform_deliveries = true ActionMailer::Base.raise_delivery_errors = true ActionMailer::Base.default_charset = "utf-8" Development.log Sent mail to [email protected] Date: Sat, 17 Apr 2010 19:38:08 -0500 From: example.org To: [email protected] Subject: Hello Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 The process of sending email is ok but when I check my email I didn't recive any. What seems to be wrong?

    Read the article

  • How to keep up the interest in job?

    - by stranger
    Hi, I have been working as Software Developer for 6+ yrs. And I have worked from start ups to big companies. I always feel some elements missing in me and those are interest, passion etc. In short, I don't feel motivated while coming to work. This makes me think how my work-life balance will look like once I reach at more responsible positions. I don't want to change my field and I feel blessed as well but I think I am not working passionately for my learning, future growth, improvement, skills etc. Any pointers will be highly appreciated. Thx

    Read the article

  • How does this RegEx for parsing emails work in PHP?

    - by George Edison
    Okay, I have the following PHP code to extract an email address of the following two forms: Random Stranger <[email protected]> [email protected] Here is the PHP code: // The first example $sender = "Random Stranger <[email protected]>"; $pattern = '/([\w_-]*@[\w-\.]*)|.*<([\w_-]*@[\w-\.]*)>/'; preg_match($pattern,$sender,$matches,PREG_OFFSET_CAPTURE); echo "<pre>"; print_r($matches); echo "</pre><hr>"; // The second example $sender = "[email protected]"; preg_match($pattern,$sender,$matches,PREG_OFFSET_CAPTURE); echo "<pre>"; print_r($matches); echo "</pre>"; My question is... what is in $matches? It seems to be a strange collection of arrays. Which index holds the match from the parenthesis? How can I be sure I'm getting the email address and only the email address? Update: Here is the output: Array ( [0] => Array ( [0] => Random Stranger [1] => 0 ) [1] => Array ( [0] => [1] => -1 ) [2] => Array ( [0] => [email protected] [1] => 5 ) ) Array ( [0] => Array ( [0] => [email protected] [1] => 0 ) [1] => Array ( [0] => [email protected] [1] => 0 ) )

    Read the article

  • Good Practices in Software Outsourcing

    When an organization has dedicated to outsource a job to other company outside its organizational structure, it may have to deal with risks pertaining to software outsourcing. Hiring a stranger to ge... [Author: Chirag Vyas - Web Design and Development - April 09, 2010]

    Read the article

  • Cyber Stalking Victims May Know Their Offenders

    Not every victim of cyber stalking is accosted by a stranger. In a surprisingly large number of cases the person being victimized may know the person who is harassing them. Many times this unwanted a... [Author: Ed Opperman - Computers and Internet - May 25, 2010]

    Read the article

  • Extremely slow login after upgrade from 11.10 to 12.04

    - by ocalex86
    I just upgraded my xubuntu 11.10 to 12.04 and now, when I login into the GUI, I have to wait about 3 minutes before the desktop appears. Only the background image is displayed. The login into the console works fine (with ctrl+alt+f2) Even stranger: If I login first in the console and then in the GUI, it boots quickly. If I login first in the GUI, switch to console and login, it takes 3 minutes to boot in the GUI. My machine is a thinkpad T420s.

    Read the article

  • Using Nmap to Fix a Problem

    <b>Systhread:</b> "Ever had an ipv4 network address that is supposed to migrate over via a high availability mechanism simply not work, or even stranger if there were several addresses some do and some do not?"

    Read the article

  • Why does not my laptop detect my LCD television when I use a cable VGA?

    - by user48221
    Sometimes I want to see a movie or some video one, and to be able to see it better want to connect my laptop to my LCD television using an exit VGA, but when I put him where he says screens, it does not detect the LCD screen to me and arrives at the left side there goes out a little that "stranger" says, I select the option that he says " to detect monitors " but nothing happens. I use ubuntu 11.10

    Read the article

  • Massive Minecraft Creation Is a Functional Graphing Calculator

    - by Jason Fitzpatrick
    We’re no stranger to cool Minecraft creations, but this project takes Minecraft design to a whole new level. An industrious teen has built functional graphing calculator out of Minecraft blocks. It’s an absolutely enormous project that, if constructed in real life instead of in a virtual Minecraft space, would loom over a city. To fully appreciate how much ingenuity and effort went into the project, we’d suggest hitting up the comments over at Slashdot where commenters discuss the numerous obstacles and design tricks he would have needed to overcome and employ to pull the project off. [via Slashdot] What’s the Difference Between Sleep and Hibernate in Windows? Screenshot Tour: XBMC 11 Eden Rocks Improved iOS Support, AirPlay, and Even a Custom XBMC OS How To Be Your Own Personal Clone Army (With a Little Photoshop)

    Read the article

  • If I release a program under GPL, do I have to continue to do so?

    - by Kos
    Consider this scenario: I am developing a program FooSuite that uses a GPL-licenced library QuuxTools I release the program FooSuite 1.0 under GPL Later on I discover that, for some reason, I need to licence the program to someone on different terms. Hence: I remove the dependency on GPL via QuuxTools, by either... rewriting the program not to use this library any longer obtaining a different licence for QuuxTools (if it's dual-licenced; see PyQt) I release FooSuite 1.1 under a non-GPL licence. However, FooSuite 1.1 is still a derivative work from FooSuite 1.0. I understand that it's not legal for a stranger to do what I did, but am I myself - as the owner of FooSuite - free from this restriction?

    Read the article

  • Numlock doesn't work after logging in

    - by Tobi
    I've a strange problem after upgrading to Ubuntu 11.10 The Numlock of my Apple Keyboard (white, wired) doesn't work anymore. Strange thing because it works with the guest account but not with my user account. I did change the lightdm.conf to get the numlock working for the login and it works, but nor in my user account. Even stranger, pushing zero effects a right click? I also tried different keyboard layouts, but it shows Numlock on (stuck on) but doesn't work. Any idea which config file stores information about this?

    Read the article

  • My Inbox: How to save changes coming from disconnected POCOs

    I receive a lot of random emails from developers with Entity Framework questions. (This is not a request for more! :)) If I’m too busy to even look or if it’s something I can’t answer off the top of my head, I swallow my pride and ask the person to try the MSDN forums. If the email is from a complete stranger and has gobs and gobs of code that email will surely get a "please try MSDN forums" reply.  But sometimes I’m not in my usual state of “too...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Render {embed} for each entry in {exp:weblog:entries} loop

    - by eyelidlessness
    {exp:weblog:entries [args]} [content] {embed="path/to/sub-template" [args]} {/exp:weblog:entries} The sub-template only renders for the first entry, and the {embed} template tag is swallowed for all subsequent entries. Is there a way to make it render the sub-template for each iteration? Edit: stranger yet, if caching is enabled for the sub-template, it renders for each iteration—but, of course, the arguments on the embed tag aren't passed to subsequent iterations, as the sub-template is cached.

    Read the article

  • Comparison of IPEndPoint objects not working

    - by Martin Mizzell
    I have an IPEndPoint a and b, whose IPAddress and Port are exactly the same, but the == operator is on the IPEndPoint not returning true. To make things even stranger, I tried to circumvent the problem by simply comparing the IPAddress and Port individually and it is STILL not returning true. Has anyone encountered this before? If so, I am all ears to performant solutions. We have collections of as many as 10k IPEndPoints and are querying into them via LINQ (PLINQ pretty soon).

    Read the article

  • Printer Management in AD Domain

    - by Untalented
    Hello, I normally push out all my printers via group policy preferences. However, the new copy machines I have are using some stranger drivers and I can not install x64/x86 drivers on the same machine for my clients to pull drivers from. So now I have two machines setup with the printer so they can pull drivers. Ontop of this there is specific driver configuration settings such as requiring the user to enter an access code to print set. Once the printer is installed via GPP, it puts everything to the default such as color mode, and other custom settings we like. I considered just using a Windows Print Server for this, but I do not know a way to push/delete these from clients like I can with GPP. Does anyone know how I can have a GPP copy the custom configuration I have set in the driver or have any recommendations?

    Read the article

  • MS Access: Why can I no longer right-click to add a hyperlink?

    - by gef05
    I've been working in an MS Access system for a while now. It's a form system where users enter data, add links, contacts etc. Pretty simple. On the form is a hyperlink field. For months I could right-click the field, and from the popup context menu select Hyperlink Add a hyperlink (something like that). This would allow me to browse to a network location, select a folder, click okay, and have the path automatically added to the field. Then it stopped working. It works fine for everyrone else but not me. What's stranger, if I go to another machine and login, I get the functionality back. Any ideas?

    Read the article

  • Debian: Firefox or Iceweasel default printer for POS station

    - by Bubnoff
    Context Using Debian 6.04 "Squeeze" as POS station. There are two printers installed: Network printer and a receipt printer It absolutely must be able to print by default to the receipt printer on a certain website though the system default is a network printer. In Debian ...it doesn't. Problem I've set up XP, 7, Ubuntu and even Mac OSX this way, so I'm no stranger to setting Firefox up this way ...same Iceweasel/Firefox settings ...complete fail. Always uses system default no matter what the settings, or, which printer you print from. To get this to work on other systems you do this: Print a page in Firefox using desired printer. Ensure print.save_settings is true. Firefox remembers last printer used Set print.always_print_silent = true The end. This works on every OS I've set up ....except Firefox and Iceweasel in Debian. My only recourse seems to be to set the receipt printer as default or go back to bloaty Ubuntu/Mint ...etc.

    Read the article

  • How would one run a task sequence within a task sequence in SCCM 2012 SP1

    - by BigHomie
    A Shining Example: Inside all of my task sequences I have a group that installs driver packages conditionally based on computer model: And of course, this list does nothing but grow. The fact that it grows isn't a big deal, what is a big deal is that every time it changes I have to manually copy and paste those changes across every task sequence I have, which of course leaves huge room for human error. The same goes for other groups of tasks that are common across task sequences. Looking for a solution where I could centrally manage these tasks, be it link other task sequences to a group within another task sequence, or create a separate task sequence and link to that. I came across a solution by John Marcum (SCCM MVP) that mentioned this ability, but this was a while ago and I can't find the link to it anymore to see if it's even still being updated/maintained, but I'm looking for more of a free solution, or even using Powershell or the ConfigMgr SDK is fine with me, I'm no stranger to either. Update Getting close: http://msdn.microsoft.com/en-us/library/jj217869.aspx

    Read the article

  • Server 2008 R2 Datacenter (and all other version) not detecting hardware

    - by Mitchell Skurnik
    I upgraded my ASUS KFN32-D SLI/SAS motherboard to the latest BIOS version and swapped out the 2 dual-core procs with 2 quad core procs. After installing Server 2008 Datacenter onto the system I noticed that it was not connected to the network. I open device manager and see no network adapters. I have to go up to View - Show hidden devices to even see the virtual WAN Miniport adapters. This problem happens in Vista and Windows 7 (all x64). What is even stranger is it all works in x86 mode. What in x64 could be causing windows to not even detect hardware that works in x86? Is the boot manager possibly the culprit?

    Read the article

  • What is the default value for Empty Temporary Internet Files when browser is closed in IE8?

    - by schellack
    We have four different machines that all have "Empty Temporary Internet Files when browser is closed" set to true (checked) in IE8's Internet Options (located under the Security section in the Advanced tab). No one remembers checking that checkbox to turn on the setting. What is the default value supposed to be? I'm specifically interested in Windows 7 and Windows XP. I have run rsop.msc on one of the corporate machines—3 of the 4 are members of a corporate network/domain—and see this under User Configuration, which makes the current scenario seem even stranger: The Local Group Policy Editor (gpedit.msc) also shows the Configure Delete Browsing History on exit setting to be Not configured (under Computer ConfigurationAdministrative TemplatesWindows ComponentsInternet ExplorerDelete Browsing History).

    Read the article

  • WSUS Showing Incorrect Version & Client Update Failure but they can check-in

    - by user132199
    One of the issues we are having is the clients will not download the updates from our WSUS server. They check-in as they are suppose too and find applicable updates but they are unable to actually download and install them. The GPO is set correctly. We decided to install the patch KB2720211to see if it would help eleviate this issue but it did not. In fact, even stranger, if I check the version that is installed on WSUS it reads 3.2.7600.226 but as far as I know it should read 3.2.7600.251. If I check Add/Remove programs to see what Windows Updates have been installed it even lists for WSUS that KB2720211 has been installed at version 3.2.7600.251. To install this update I followed the following directions Question: Has anyone seen this issue where the patch is installed yet not showing the correct version? What can I try to get my clients to update?

    Read the article

1 2 3 4 5  | Next Page >