Search Results

Search found 25579 results on 1024 pages for 'complex event processing'.

Page 89/1024 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • Nmock2 and Event Expectations

    - by Kildareflare
    Im in the process of writing a test for a small application that follows the MVP pattern. Technically, I know I should have written the test before the code, but I needed to knock up a demo app quick smart and so im now going back to the test before moving on to the real development. In short I am attempting to test the presenter, however I cannot even get an empty test to run due to an Internal.ExpectationException. The exception is raised on a unexpected invocation of an event assignation. Here is the presenter class, public LBCPresenter(IView view, IModel model) { m_model = model; m_model.BatteryModifiedEvent += new EventHandler(m_model_BatteryModifiedEvent); } Model Interface public interface IModel { event EventHandler BatteryModifiedEvent; } And here is the test class, I can't see what im missing, ive told NMock to expect the event... [TestFixture] public class MVP_PresenterTester { private Mockery mocks; private IView _mockView; private IViewObserver _Presenter; private IModel _mockModel; [SetUp] public void SetUp() { mocks = new Mockery(); _mockView = mocks.NewMock<IView>(); _mockModel = mocks.NewMock<IModel>(); _Presenter = new LBCPresenter(_mockView, _mockModel); } [Test] public void TestClosingFormWhenNotDirty() { Expect.Once.On(_mockModel).EventAdd("BatteryModifiedEvent", NMock2.Is.Anything); //makes no difference if following line is commented out or not //mocks.VerifyAllExpectationsHaveBeenMet(); } } Every time I run the test I get the same expectation Exception. Any ideas?

    Read the article

  • event.stopPropagation(); doesn't behave as expected

    - by Ciprian Amaritei
    I read couple articles related to event.stopPropagation(); but none of the solutions provided works for me. Basically what I have is an accordion widget with all the elements collapsed by default. On each element header (dt tag) there is also a checkbox. Clicking the checkbox shouldn't trigger the accordion to make its elements expand. <dt data-toggle="collapse"> <span class="subscribe-checkbox"><button type="button" class="btn toggle-btn" data-toggle="button"></button></span> </dt> <dd> <p>Accordion content...</p> </dd> Clicking the span (which should act as a checkbox ) should add class "checked" to it. However it also expands the accordion element (dd tag). What I'm doing in jQuery is: $('.accordion-group .btn.toggle-btn').click(function (event) { event.stopPropagation(); }); While the accordion content isn't shown ( which is good) the element doesn't change class either, so it doesn't become 'checked'. I tried with .live() too and didn't work either. Thanks in advance, Ciprian.

    Read the article

  • Network Services disabled (not starting) on Windows XP

    - by Rickesh John
    I am currently running Windows XP Service Pack 3 on my system. But today, when I failed to connect to the internet, via a LAN cable, I realized that almost all of the vital network services had stopped functioning. Any attempts to start it through services.msc gives me the following message: Could not start the DNS Client Service on Local Computer Error 1068: The dependency service group failed to start All my software or services that are related to networking have stopped functioning, for example, Windows Firewall is turned off permanently, so is my Avast Anti-Virus' service of Real Time Shields and Web Shield. When I insert the LAN wire into my laptop, it registers itself, but this is what I get when I do a ping localhost C:>ping localhost Unable to contact IP driver, error code 2 Moveover, with ipconfig I get this : Windows IP Configuration An internal error occurred: The request is not supported. Please contact Microsoft Product Support Services for further help. Additional Information: Unable to query host name On some further poking around, I saw that none of the "NETWORK SERVICE" process in task manager, except svchost.exe were running. Also, when I first opened the task manager, I saw some 20 processes running with username column empty for most of them. With some search in Google, I found out that these services were important, DHCP DNS Net logon Network connection Network location Awareness TCP/IP Net BIOS Helper none of them, except Network Connections are working, they do not start. The event viewer of my system shows a bunch of 7000 and 7001 event errors. I have tried re installing the network driver, booting in safe mode with networking and tried to enable those services mentioned above. I had disabled System Restore some time back, so I have no restore points for my system. I tried a lot of things from Google searches but none of them worked. Also, with such a long list of issue, I am a little confused as to what should I search on the internet. :( One more thing I would like to mention, previous morning, my anti-virus Avast detected a RootKit buried deep in my system folders. It was removed, but maybe this was a problem caused by the root kit. I did run a boot-time scan but no viruses were found. Please please please advice. Is formatting and re-installation of Windows my only option?

    Read the article

  • JPanel not listening to key event when there is a child component with JButton on it

    - by Yifu
    I'm working on a map editor for my college project. And I had a problem that the map panel is not listening key event while it should. This happens when I add a ToolBarPane (which extends JPanel) with JComponent such as JButton, JComboBox that implements ActionListener on it AND the map panel (which extends the JPanel) together on to the Frame (I used BorderLayout). I have System.out.println statement to test if the key press is received, and it's not printing, if I remove the ToolBar, the key listener works again, so is the mouseListenner is disabled just like the keyListener, which means I can't handle press events etc, but the mouseListener works fine and I can still handle mouse move event. Here is a screen shot how it works without the ToolBarPane http://img684.imageshack.us/img684/3232/sampleku.png note that you can use the mouse to put images on the map, you can also select images using the mouse just like a laser tool, and by pressing number key you can switch between different images, this works fine until I add the ToolBarPane which shows like this: img291.imageshack.us/img291/8020/failve.png (please add http before that, i can only post one hyperlink) (I can't post images here cuz im a new user) With the ToolBarPane on I was no longer able to handle the key event. I guess it might by that the focus as been transfered to that panel somehow, but not sure at all. Does and body know this and can help me out? Thanks very much

    Read the article

  • Core jQuery event modification problem

    - by DSKVR
    I am attempting to overwrite a core jQuery event, in this case the keydown event. My intention is to preventDefault() functionality of Left(37), Up(38), Right(39) and Down(40) to maintain the consistency of hot keys in my web application. I am using the solution provided here for the conditional charCode preventDefault problem. For some reason, my function overwrite is simply not firing, and I cannot put my finger on the problem. I am afraid that over the past 30 minutes this issue has resulted in some hair loss. Anybody have the remedy? /* Modify Keydown Event to prevent default PageDown and PageUp functionality */ (function(){ var charCodes = new Array(37,38,39,40); var original = jQuery.fn.keydown; jQuery.fn.keydown = function(e){ var key=e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0; alert('now why is my keydown mod not firing?'); if($.inArray(key,charCodes)) { alert('is one of them, do not scroll page'); e.preventDefault(); return false; } original.apply( this, arguments ); } })();

    Read the article

  • How to Prevent PostBack Event Handler from Firing

    - by user331744
    I have a custom class (ServerSideValidator.vb) that validates user input on server side (it doesn't use any of the .NET built in validators, therefore Page.Validate() is not an option for me). I am calling the Validate() method on page.IsPostback event and the class performs without any problem My issue is, when validation fails (returns false), I want to stop the postback event handler from firing, but load the page along with all the controls and user-input values in them. If I do, Response.End(), the page comes up blank. I can programmatically instruct the page to go to the previous page (original form before postback), but it loses all user-inputs. I thought of creating a global boolean variable in the page code behind file and check the value before performing any postback method, but this approach takes away from my plan to provide all functionalities inside the class itself. The page object is being referenced to ServerSideValidator. Seems like all the postback related properties/variables I come across inside Page class are 'Readonly' and I can't assign value(s) to control/prevent postback event from firing. Any idiea on how I can accomplish this? Please let me know if you need further details

    Read the article

  • Event Source Live streaming in Ruby on rails onError method

    - by kishorebjv
    I'm trying to implement basic rails4 code with eventsource API & Action controller live, Everything is fine but I'm not able to reach event listner . Controller code: class HomeController < ApplicationController include ActionController::Live def tester response.headers["Content-Type"] = "text/event-stream" 3.times do |n| response.stream.write "message: hellow world! \n\n" sleep 2 end end Js code: var evSource = new EventSource("/home/tester"); evSource.onopen = function (e) { console.log("OPEN state \n"+e.data); }; evSource.addEventListener('message',function(e){ console.log("EventListener .. code.."); },false); evSource.onerror = function (e) { console.log("Error State \n\n"+e.data); }; & When i reloading the page, My console output was "OPEN state" & then "Error State" as output.. event-listener code was not displaying . 1.When I'm curling the page, "message: Hellow world!" was displaying. 2.I changed in development.rb config.cache_classes = true config.eager_load = true 3. My browsers are chrome & firefox are latest versions, so no issues with them, Where I'm missing? suggestions please!

    Read the article

  • Completed Event not triggering for web service on some systems

    - by Farukh
    Hi, This is rather weird issue that I am facing with by WCF/Silverlight application. I am using a WCF to get data from a database for my Silverlight application and the completed event is not triggering for method in WCF on some systems. I have checked the called method executes properly has returns the values. I have checked via Fiddler and it clearly shows that response has the returned values as well. However the completed event is not getting triggered. Moreover in few of the systems, everything is fine and I am able to process the returned value in the completed method. Any thoughts or suggestions would be greatly appreciated. I have tried searching around the web but without any luck :( Following is the code.. Calling the method.. void RFCDeploy_Loaded(object sender, RoutedEventArgs e) { btnSelectFile.IsEnabled = true; btnUploadFile.IsEnabled = false; btnSelectFile.Click += new RoutedEventHandler(btnSelectFile_Click); btnUploadFile.Click += new RoutedEventHandler(btnUploadFile_Click); RFCChangeDataGrid.KeyDown += new KeyEventHandler(RFCChangeDataGrid_KeyDown); btnAddRFCManually.Click += new RoutedEventHandler(btnAddRFCManually_Click); ServiceReference1.DataService1Client ws = new BEVDashBoard.ServiceReference1.DataService1Client(); ws.GetRFCChangeCompleted += new EventHandler<BEVDashBoard.ServiceReference1.GetRFCChangeCompletedEventArgs>(ws_GetRFCChangeCompleted); ws.GetRFCChangeAsync(); this.BusyIndicator1.IsBusy = true; } Completed Event.... void ws_GetRFCChangeCompleted(object sender, BEVDashBoard.ServiceReference1.GetRFCChangeCompletedEventArgs e) { PagedCollectionView view = new PagedCollectionView(e.Result); view.GroupDescriptions.Add(new PropertyGroupDescription("RFC")); RFCChangeDataGrid.ItemsSource = view; foreach (CollectionViewGroup group in view.Groups) { RFCChangeDataGrid.CollapseRowGroup(group, true); } this.BusyIndicator1.IsBusy = false; } Please note that this WCF has lots of other method as well and all of them are working fine.... I have problem with only this method... Thanks...

    Read the article

  • Esper generating episodes

    - by Jasonojh
    I would like to use Esper to generate episodes of events. I am trying to detect the changes in robot movement during each time period and was wondering what would be the best way of implementation. The rules for generation of episodes from the events would be If the new event time(eg. 7sec, robot A) of a robot is more than 3 sec than the latest event(eg. 3 sec, robot A) of the same robot, the new event belongs to a new episode. Each episode should represent only one robot (eg. 2sec, robotA and 3sec, robotB should output 2 episodes) Input data: Event Time Robot Position 1 1 A 0 2 2 A 1 3 6 A 2 Output data should be: Array[0]={Event 1,Event 2} Array[1]={Event 3} //more than 3 sec Input data: Event Time Robot Position 1 1 A 0 2 2 A 1 3 4 B 0 4 6 A 2 Output data should be: Array[0]={Event 1,Event 2} Array[1]={Event 3} //different robot Array[2]={Event 4} Please help provide suggestions. I have tried using mulitple listeners, one for each robot, to create episodes and it works but I am trying to use a single EPL statement to do it. I have tried win:time_accum(3sec) group by robot but the second example output: Array[0]={Event 1,Event 2, Event 4} Array[1]={Event 3} as the time window is shifted everytime an event comes in, the system still thinks that event 4 is less than 3 sec due to event 3. how do I create a unique time window for each robot? Thank you for your suggestions and any help is greatly appreciated.

    Read the article

  • jQuery .die isnt killing an attached event?

    - by adam
    Hi I've just started experimenting with .live and .die and having some great results but one thing isn't working. I've been tinkering with firebugs console to try out my written code live to see if i can figure out the reason why .die isn't killing off an attached event. First if i do this //attach ajax submission $('a[href$=edit]').live("click", function(event) { $.get($(this).attr("href"), null, null); return false; }); Then as expected when I click on a link the ajax fires off and my server side code injects a form for inline editing. But sometimes I want to disable this behaviour and also make the link unclickable so I do the following //unbind ajax form creation when we click on a link, then disable its semantic behaviour $('a[href$=edit]').die("click").click( function(){ return false; } ); which works but if then try to remove this and restore that ajax goodness with the code below it doesn't work, Instead the link remains unclickable. I cant figure out why? Can anyone help? //remove any previous events from the links $('a[href$=edit]').die(); //attach ajax submission $('a[href$=edit]').live("click", function(event) { $.get($(this).attr("href"), null, null); return false; });

    Read the article

  • ASP .NET Dynamically adding EventHandlers to button on Page_Load. EventHandler's do not fire the fir

    - by John
    Background: I am customizing an existing ASP .NET / C# application. It has it's own little "framework" and conventions for developers to follow when extending/customizing its functionality. I am currently extending some of it's administrative functionality, to which the framework provides a contract to enforce implementation of the GetAdministrationInterface() method, which returns System.Web.UI.Control. This method is called during the Page_Load() method of the page hosting the GUI interface. Problem: I have three buttons in my GUI, each of which have been assigned an Event Handler. My administration GUI loads up perfectly fine, but clicking any of the buttons doesn't do what I expect them to do. However, when I click them a second time, the buttons work. I placed breakpoints at the the beginning of each event handler method and stepped through my code. On the first click, none of the event handlers are triggered. On the second click, they are triggered. Any ideas? Example of Button Definition Button btn = new Button(); btn.Text = "Click Me Locked Screen"; bth.Click += new EventHandler(Btn_Click); Example of Event Handler Method Definition void Btn_Click(object sender, EventArgs e) { // Do Something }

    Read the article

  • javascript error handling

    - by pankaj
    I have a javascript function for checking errors which I am calling on OnClicentClick event of a button. Once it catch a error I want to stop execution of the click event. But in my case it always it always executes the onclick event. Following is my function: function DisplayError() { if (document.getElementById('<%=txtPassword.ClientID %>').value.length < 6 || document.getElementById('<%=txtPassword.ClientID %>').value.length > 12) { document.getElementById('<%=lblError.ClientID %>').innerText = "Password length must be between 6 to 12 characters"; return false; } var str = <%=PhoneNumber()%>; if(str.length <10) { alert('<%=phoneNum%>'.length); document.getElementById('<%=lblError.ClientID %>').innerText = "Phone Number not in correct format"; return false; } } button html code: <asp:Button runat="server" Text="Submit" ID="btnSubmit" ValidationGroup="submit" onclick="btnSubmit_Click" OnClientClick="DisplayError()"/> It should not execute the button click event once it satisfies any of the IF condition in the javascript function.

    Read the article

  • Adding an keyUp-event to form objects

    - by reporter
    Hello folks, I've got the issue to add a browser event to some input fields. The challenge I have to face is, that one parameter of my target function is the 'event'-variable and the second one an object. For a better understanding here some codes:The HTML object: <div id="1_dateFieldAdvanced" class="xp set"> <div id="1_dateFieldAdvanced_label" class="label">Birthday</div> <div id="1_dateFieldAdvanced_value" class="value date"> <input class="day" name="dayOfBirth" value="66" maxlength="2" type="text"> <input class="month" name="monthOfBirth" value="67" maxlength="2" type="text"> <input class="year" name="yearOfBirth" value="" maxlength="4" type="text"> </div> </div> The source code of target method is like below: function advancedDateFields(currentFieldAsObject, nextField, currentValueLength, ev){} Unfortunatly the HTML and the Javascript code is generated automatically, so I'm unable to refactore the code. My question is, how can I pass the key word 'event' and the other parameters? My tries did always fail. :-(

    Read the article

  • Adding a Click event to a submit button and then submitting the form

    - by Abs
    Hello all, I have a form with a submit button. I have attached a click event to that submit button using JQuery. Once I did this my form wasn't submitting, I thought this was because of the event I added- if I remove that click event it submits the form successfully. I have tried giving my form an id and calling the submit function but this was not successful either. What can I do? $('#submit_gen').click(function() { $('#genbtn').html('<img src="images/ajax-loader.gif" alt="loading" />'); $('#action_form').submit(); }); The HTML: <form id="action_form" action="generate.php" method="post" enctype="multipart/form-data"> <input id="file_upload" type="file" name="upload" onchange="file_select();"/> <input type="text" id="overlay_input"> <div id="genbtn" class="genbtn"> <input id="submit_gen" type="submit" value="Upload"> </div> </form> Thanks all

    Read the article

  • C# + Programmatically Working with Event Handlers

    - by Villager
    Hello, I have a TextBox that has the TextChanged event set declaratively. In some cases, I want programmatically set this value. In these cases, I want to disable the TextChanged event until I'm done programmatically setting the value. Then, when I'm done, I want to restore the event handler to behave as it was. For a single TextBox, I know I can accomplish this by doing the following: myTextBox.TextChanged -= myTextBox_TextChanged; myTextBox.Text = "[Some Value]"; myTextBox.TextChanged += myTextBox_TextChanged; However, I want to write this functionality into a single method that can be accessed by several methods. For instance, I'm trying to do so something like the following private void UpdateTextValue(TextBox textBox, string newValue) { object eventHandler = textBox.TextChanged; textBox.TextChanged -= eventHandler; textBox.Text = newValue; textBox.TextChanged += eventHandler; } Unfortunately, this approach doesn't work. It won't even compile. Is there a way I can encapsulate the functionality I'm trying to accomplish in a method such as the one shown above? If so, how? Thank you,

    Read the article

  • psloglist -w into a file

    - by user11588
    I'm trying to redirect windows event log continuously into a file. psloglist.exe has the -w feature (that listens for new events and outputs to console) so I tried combining it with redirection into a file like so: psloglist -w > out.txt It doesn't work. As new events are logged they do not show up in the file. However, if I remove > out.txt new events do shows up in the console!

    Read the article

  • YouTube API Security Error Flex

    - by 23tux
    Hi, I've tried to use the YoutTube API within a Flex project. But i got this error: *** Security Sandbox Violation *** SecurityDomain 'http://www.youtube.com/apiplayer?version=3' tried to access incompatible context 'file:///Users/YouTubePlayer/bin-debug/YouTubePlayer.html' Here are the two files: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" xmlns:youtube="youtube.*" creationComplete="init();"> <fx:Script> <![CDATA[ [Bindable] private var ready:Boolean = true; private function init():void { Security.allowInsecureDomain("*"); Security.allowDomain("*"); Security.allowDomain('www.youtube.com'); Security.allowDomain('youtube.com'); Security.allowDomain('s.ytimg.com'); Security.allowDomain('i.ytimg.com'); } private function changing():void { /* trace("currentTime: " + player.getCurrentTime()); trace("startTime: " + player.startTime); trace("stopTime: " + player.stopTime); timeSlider.value = player.getCurrentTime() */ } private function startPlaying():void { player.play(); } private function checkStartSlider():void { if(startSlider.value > stopSlider.value) stopSlider.value = startSlider.value + 1; } private function checkStopSlider():void { if(stopSlider.value < startSlider.value) startSlider.value = stopSlider.value - 1; } ]]> </fx:Script> <s:VGroup> <youtube:Player id="player" videoID="DVFvcVuWyfE" change="changing();" ready="ready=true"/> <s:HGroup> <s:Button label="play" click="startPlaying();" /> </s:HGroup> <s:HGroup> <s:HSlider id="timeSlider" width="250" minimum="0" maximum="{player.stopTime}" snapInterval=".01" enabled="{ready}"/> <s:Label id="currentTimeLbl" text="current time: 0" /> </s:HGroup> <s:HGroup> <s:HSlider id="startSlider" width="250" minimum="0" maximum="{player.stopTime}" snapInterval=".01" change="checkStartSlider();" enabled="{ready}" value="0"/> <s:Label id="startTimeLbl" text="start time: {player.startTime}" /> </s:HGroup> <s:HGroup> <s:HSlider id="stopSlider" width="250" minimum="0" maximum="{player.stopTime}" snapInterval=".01" change="checkStopSlider();" enabled="{ready}" value="{player.stopTime}"/> <s:Label id="stopTimeLbl" text="stop time: {player.stopTime}" /> </s:HGroup> </s:VGroup> </s:Application> Here is the player package youtube { import flash.display.Loader; import flash.events.Event; import flash.events.TimerEvent; import flash.net.URLRequest; import flash.system.Security; import flash.utils.Timer; import mx.core.UIComponent; [Event(name="change", type="flash.events.Event")] [Event(name="ready", type="flash.events.Event")] public class Player extends UIComponent { private var player:Object; private var loader:Loader; private var _startTime:Number = 0; private var _stopTime:Number = 0; private var _videoID:String; private var metadataTimer:Timer = new Timer(200); private var playTimer:Timer = new Timer(200); public function Player() { // The player SWF file on www.youtube.com needs to communicate with your host // SWF file. Your code must call Security.allowDomain() to allow this // communication. Security.allowInsecureDomain("*"); Security.allowDomain("*"); // This will hold the API player instance once it is initialized. loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit); loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3")); } private function onLoaderInit(event:Event):void { addChild(loader); loader.content.addEventListener("onReady", onPlayerReady); loader.content.addEventListener("onError", onPlayerError); loader.content.addEventListener("onStateChange", onPlayerStateChange); loader.content.addEventListener("onPlaybackQualityChange", onVideoPlaybackQualityChange); } private function onPlayerReady(event:Event):void { // Event.data contains the event parameter, which is the Player API ID trace("player ready:", Object(event).data); // Once this event has been dispatched by the player, we can use // cueVideoById, loadVideoById, cueVideoByUrl and loadVideoByUrl // to load a particular YouTube video. player = loader.content; // Set appropriate player dimensions for your application player.setSize(0, 0); } private function onPlayerError(event:Event):void { // Event.data contains the event parameter, which is the error code trace("player error:", Object(event).data); } private function onPlayerStateChange(event:Event):void { // Event.data contains the event parameter, which is the new player state trace("player state:", Object(event).data); } private function onVideoPlaybackQualityChange(event:Event):void { // Event.data contains the event parameter, which is the new video quality trace("video quality:", Object(event).data); } [Bindable] public function get videoID():String { return _videoID; } public function set videoID(value:String):void { _videoID = value; } [Bindable] public function get stopTime():Number { return _stopTime; } public function set stopTime(value:Number):void { _stopTime = value; } [Bindable] public function get startTime():Number { return _startTime; } public function set startTime(value:Number):void { _startTime = value; } public function play():void { if(_videoID!="") { player.loadVideoById(_videoID, 0); // add the event listener, so that all 200 milliseconds is an event dispatched metadataTimer.addEventListener(TimerEvent.TIMER, metadataTimeHandler); // if the timer is running, stop and reset it if(metadataTimer.running) metadataTimer.reset(); else metadataTimer.start(); } } private function metadataTimeHandler(e:TimerEvent):void { if(player.getDuration() > 0) { startTime = 0; stopTime = player.getDuration(); metadataTimer.reset(); metadataTimer.stop(); metadataTimer.removeEventListener(TimerEvent.TIMER, metadataTimeHandler); player.playVideo(); playTimer.addEventListener(TimerEvent.TIMER, playTimerHandler); dispatchEvent(new Event("ready")); } } private function playTimerHandler(e:TimerEvent):void { if(getCurrentTime() > _stopTime) { seekTo(startTime); } dispatchEvent(new Event(Event.CHANGE)); } public function getCurrentTime():Number { if(!player.getCurrentTime()) return 0; else return player.getCurrentTime(); } public function seekTo(time:uint):void { player.seekTo(time); } } } Hope someone can help. thx, tux

    Read the article

  • doubt regarding carrying data in custom events using actionscript

    - by user267530
    Hi I am working on actionscript to generate a SWF dynamically using JSON data coming from an HTTP request. I receive the data on creationComplete and try to generate a tree like structure. I don’t create the whole tree at the same time. I create 2 levels, level 1 and level 2. My goal is to attach custom events on the panels which represent tree nodes. When users click the panels, it dispatches custom events and try to generate the next level. So, it goes like this : On creation complete - get JSON- create top tow levels - click on level 2- create the level 2 and level 3 - click on level 3- create level 3 and 4. …and so on and so on. I am attaching my code with this email. Please take a look at it and if you have any hints on how you would do this if you need to paint a tree having total level number = “n” where( 0 import com.iwobanas.effects.*; import flash.events.MouseEvent; import flash.filters.BitmapFilterQuality; import flash.filters.BitmapFilterType; import flash.filters.GradientGlowFilter; import mx.controls.Alert; private var roundedMask:Sprite; private var panel:NewPanel; public var oldPanelIds:Array = new Array(); public var pages:Array = new Array();//cleanup public var delPages:Array = new Array(); public function DrawPlaybook(pos:Number,title:String,chld:Object):void { panel = new NewPanel(chld); panel.title = title; panel.name=title; panel.width = 100; panel.height = 80; panel.x=pos+5; panel.y=40; // Define a gradient glow. var gradientGlow:GradientGlowFilter = new GradientGlowFilter(); gradientGlow.distance = 0; gradientGlow.angle = 45; gradientGlow.colors = [0xFFFFF0, 0xFFFFFF]; gradientGlow.alphas = [0, 1]; gradientGlow.ratios = [0, 255]; gradientGlow.blurX = 10; gradientGlow.blurY = 10; gradientGlow.strength = 2; gradientGlow.quality = BitmapFilterQuality.HIGH; gradientGlow.type = BitmapFilterType.OUTER; panel.filters =[gradientGlow]; this.rawChildren.addChild(panel); pages.push(panel); panel.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){onClickHandler(e,title,chld)}); this.addEventListener(CustomPageClickEvent.PANEL_CLICKED, function(e:CustomPageClickEvent){onCustomPanelClicked(e,title)}); } public function onClickHandler(e:MouseEvent,title:String,chld:Object):void { //var panel:Panel; for each(var stp1:NewPanel in pages){ if(stp1.title==title){ var eventObj:CustomPageClickEvent = new CustomPageClickEvent("panelClicked"); eventObj.panelClicked = stp1; dispatchEvent(eventObj); } } } private function onCustomPanelClicked(e:CustomPageClickEvent,title:String):void { //cleanup itself Alert.show("onCustomPanelClicked" + title); var panel:NewPanel; for each(var stp:NewPanel in pages){ startAnimation(e,stp); } if(title == e.panelClicked.title){ panel = new NewPanel(null); panel.title = title; panel.name=title; panel.width = 150; panel.height = 80; panel.x=100; panel.y=40; this.rawChildren.addChild(panel); // var slideRight:SlideRight = new SlideRight(); slideRight.target=panel; slideRight.duration=750; slideRight.showTarget=true; slideRight.play(); //draw the steps var jsonData = this.map.getValue(title); var posX:Number = 50; var posY:Number = 175; for each ( var pnl:NewPanel in pages){ pages.pop(); } for each ( var stp1:Object in jsonData.children){ //Alert.show("map step=" + stp.text ); panel = new NewPanel(null); panel.title = stp1.text; panel.name=stp1.id; panel.width = 100; panel.id=stp1.id; panel.height = 80; panel.x = posX; panel.y=posY; posX+=150; var s:String="hi" + stp1.text; panel.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){onChildClick(e,s);}); this.addEventListener(CustomPageClickEvent.PANEL_CLICKED, function(e:CustomPageClickEvent){onCustomPnlClicked(e)}); this.rawChildren.addChild(panel); // Alert.show("map step=" + this.getChildIndex(panel) ); // oldPanelIds.push(panel); pages.push(panel); //this.addEventListener(CustomPageClickEvent.PANEL_CLICKED, //function(e:CustomPageClickEvent){onCustomPanelClicked(e,title)}); var slide:SlideUp = new SlideUp(); slide.target=panel; slide.duration=1500; slide.showTarget=false; slide.play(); } } } public function onChildClick(e:MouseEvent,s:String):void { //var panel:Panel; //Alert.show(e.currentTarget.title); for each(var stp1:NewPanel in pages){ if(stp1.title==e.currentTarget.title){ var eventObj:CustomPageClickEvent = new CustomPageClickEvent("panelClicked"); eventObj.panelClicked = stp1; dispatchEvent(eventObj); } } } private function onCustomPnlClicked(e:CustomPageClickEvent):void { for each ( var pnl:NewPanel in pages){ pages.pop(); } //onCustomPanelClicked(e,e.currentTarget.title); //Alert.show("hi from cstm" + e.panelClicked.title); } private function fadePanel(event:Event,panel:NewPanel):void{ panel.alpha -= .005; if (panel.alpha <= 0){ //Alert.show(panel.title); panel.removeEventListener(Event.ENTER_FRAME, function(e:Event){fadePanel(e,panel);}); }; panel.title=""; } private function startAnimation(event:CustomPageClickEvent,panel:NewPanel):void{ panel.addEventListener(Event.ENTER_FRAME, function(e:Event){fadePanel(e,panel)}); } Thanks in advance. Palash

    Read the article

  • Backup multiple Exchange Accounts without direct access to exchange server

    - by Mike Wallace
    For e-mail, we use Microsoft Exchange and it is hosted by 1and1.com. We have about 30 Exchange accounts that I would like to backup to a PST file. That is, for each account that we have (all 30), I would like to create a single PST file (1.pst thru 30.pst). I do not have direct access to the Exchange server. Basically, for each Exchange account, I can supply: The IP address for the Exchange server or the URL to the OWA. The Username The Password Is there a tool out there that can do this for me? It seems that Microsoft's "Online Services Migration Tools" comes awfully close, but it appears that its geared to pull data out of any Exchange server and push it into Microsoft Online. I don't believe it can be used to simply pull the data out and generate PST's.

    Read the article

  • PBS batch jobs - the qalter command

    - by Ryan Budney
    I've got a giant computation running on a Scientific Linux cluster. At present I have over 600 jobs parked in the queue, waiting for processor time, while a few are running. I'm trying to use the qalter command on some of the idle but scheduled jobs. I'd like to schedule them for a later time, so that other users can jump part of the queue, sort of as an act of politeness. Is this doable? For example, JOBNAME 292399 is currently idle, scheduled to be run whenever a spot in the queue opens up. But if I run qalter -a 10051000 292398 followed by qrerun 292398 I get qrerun: Request invalid for state of job 292398.euler. From the qalter documentation, I thought 10051000 refers to tomorrow (oct 5th, 10am) but perhaps I'm misunderstanding something? If I'm going about this the wrong way, please let me know. The main thing I'm looking for is a command that's easily scriptable, so that I can modify when my queued tasks get run. qalter seems good for those purposes if I can get it working. I'd rather avoid running qdel and re qsubbing the computations, as there's a bookkeeping issue on which tasks to restart (vs which ones not to). I want to avoid that kind of bookkeeping. From googling around I notice some qalter commands have rather different date formats, but the above appears to be correct, as far as I can tell from the man docs. Any help would be appreciated.

    Read the article

  • I want to change DPI with Imagemagick without changing the actual byte-size of the image data

    - by user1694803
    I feel so horribly sorry that I have to ask this question here, but after hours of researching how to do an actually very simple task I'm still failing... In Gimp there is a very simple way to do what I want. I only have the German dialog installed but I'll try to translate it. I'm talking about going to "Picture-PrintingSize" and then adjusting the Values "X-Resolution" and "Y-Resolution" which are known to me as so called DPI values. You can also choose the format which by default is "Pixel/Inch". (In German the dialog is "Bild-Druckgröße" and there "X-Auflösung" and "Y-Auflösung") Ok, the values there are often "72" by default. When I change them to e.g. "300" this has the effect that the image stays the same on the computer, but if I print it, it will be smaller if you look at it, but all the details are still there, just smaller - it has a higher resolution on the printed paper (but smaller size... which is fine for me). I am often doing that when I am working with LaTeX, or to be exact with the command "pdflatex" on a recent Ubuntu-Machine. When I'm doing the above process with Gimp manually everything works just fine. The images will appear smaller in the resulting PDF but with high printing quality. What I am trying to do is to automate the process of going into Gimp and adjusting the DPI values. Since Imagemagick is known to be superb and I used it for many other tasks I tried to achieve my goal with this tool. But it does just not do what I want. After trying a lot of things I think this actually is be the command that should be my friend: convert input.png -density 300 output.png This should set the DPI to 300, as I can read everywhere in the web. It seems to work. When I check the file it stays the same. file input.png output.png input.png: PNG image data, 611 x 453, 8-bit grayscale, non-interlaced output.png: PNG image data, 611 x 453, 8-bit grayscale, non-interlaced When I use this command, it seems like it did what I wanted: identify -verbose output.png | grep 300 Resolution: 300x300 PNG:pHYs : x_res=300, y_res=300, units=0 (Funny enough, the same output comes for input.png which confuses me... so this might be the wrong parameters to watch?) But when I now render my TeX with "pdflatex" the image is still big and blurry. Also when I open the image with Gimp again the DPI values are set to "72" instead of "300". So there actually was no effect at all. Now what is the problem here. Am I getting something completely wrong? I can't be that wrong since everything works just fine with Gimp... Thanks for any help in this. I am also open to other automated solutions which are easily done on a Linux system...

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >