Search Results

Search found 2677 results on 108 pages for 'eren trigger'.

Page 22/108 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • How to schedule multiple jobs in quartz scheduler using same trigger?

    - by aquero
    Hi, I am using quartz scheduler in my spring project. I have to run a job after another job which is scheduled to run in every 15 mins? I cant run this job concurrently as both of this jobs have to access same mail account using different protocols(one to send:smtp and other to receive: imap) and it may cause problems. Please reply quickly, as its an urgent requirement.

    Read the article

  • Can I trigger PHP garbage collection to happen automatically if I have circular references?

    - by Beau Simensen
    I seem to recall a way to setup the __destruct for a class in such a way that it would ensure that circular references would be cleaned up as soon as the outside object falls out of scope. However, the simple test I built seems to indicate that this is not behaving as I had expected/hoped. Is there a way to setup my classes in such a way that PHP would clean them up correctly when the outermost object falls out of scope? I am not looking for alternate ways to write this code, I am looking for whether or not this can be done, and if so, how? I generally try to avoid these types of circular references where possible. class Bar { private $foo; public function __construct($foo) { $this->foo = $foo; } public function __destruct() { print "[destroying bar]\n"; unset($this->foo); } } class Foo { private $bar; public function __construct() { $this->bar = new Bar($this); } public function __destruct() { print "[destroying foo]\n"; unset($this->bar); } } function testGarbageCollection() { $foo = new Foo(); } for ( $i = 0; $i < 25; $i++ ) { echo memory_get_usage() . "\n"; testGarbageCollection(); } The output looks like this: 60440 61504 62036 62564 63092 63620 [ destroying foo ] [ destroying bar ] [ destroying foo ] [ destroying bar ] [ destroying foo ] [ destroying bar ] [ destroying foo ] [ destroying bar ] [ destroying foo ] [ destroying bar ] What I had hoped for: 60440 [ destorying foo ] [ destorying bar ] 60440 [ destorying foo ] [ destorying bar ] 60440 [ destorying foo ] [ destorying bar ] 60440 [ destorying foo ] [ destorying bar ] 60440 [ destorying foo ] [ destorying bar ] 60440 [ destorying foo ] [ destorying bar ]

    Read the article

  • Why my button can trigger the UI to scroll and my TimerTask inside the activity can't?

    - by Spidey
    Long Story Short: a method of my activity updates and scrolls the ListView through an ArrayAdapter like it should, but a method of an internal TimerTask for polling messages (which are displayed in the ListView) updates the ListView, but don't scroll it. Why? Long Story: I have a chat activity with this layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#fff" > <ListView android:id="@+id/messageList" android:layout_width="fill_parent" android:layout_height="fill_parent" android:stackFromBottom="true" android:transcriptMode="alwaysScroll" android:layout_weight="1" android:fadeScrollbars="true" /> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" > <EditText android:id="@+id/message" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" /> <Button android:id="@+id/button_send" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Send" android:onClick="sendMessage" /> </LinearLayout> </LinearLayout> The internal listView (with id messageList) is populated by an ArrayAdapter which inflates the XML below and replaces strings in it. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:clickable="false" android:background="#fff" android:paddingLeft="2dp" android:paddingRight="2dp" > <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="16sp" android:textColor="#00F" android:typeface="monospace" android:text="2010-10-12 12:12:03" android:gravity="left" /> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/sender" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="16sp" android:textColor="#f84" android:text="spidey" android:gravity="right" android:textStyle="bold" /> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/body" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="14sp" android:padding="1dp" android:gravity="left" android:layout_below="@id/date" android:text="Mensagem muito legal 123 quatro cinco seis." android:textColor="#000" /> </RelativeLayout> The problem is: in the main layout, I have a EditText for the chat message, and a Button to send the message. I have declared the adapter in the activity scope: public class ChatManager extends Activity{ private EditText et; private ListView lv; private Timestamp lastDate = null; private long campaignId; private ChatAdapter ca; private List<ChatMessage> vetMsg = new ArrayList<ChatMessage>(); private Timer chatPollingTimer; private static final int CHAT_POLLING_PERIOD = 10000; ... } So, inside sendMessage(View v), the notifyDataSetChanged() scrolls the ListView acordingly, so I can see the latest chat messages automatically: public void sendMessage(View v) { String msg = et.getText().toString(); if(msg.length() == 0){ return; } et.setText(""); String xml = ServerCom.sendAndGetChatMessages(campaignId, lastDate, msg); Vector<ChatMessage> vetNew = Chat.parse(new InputSource(new StringReader(xml))); //Pegando a última data if(!vetNew.isEmpty()){ lastDate = vetNew.lastElement().getDateSent(); //Atualizando a tela vetMsg.addAll(vetNew); ca.notifyDataSetChanged(); } } But inside my TimerTask, I can't. The ListView IS UPDATED, but it just don't scroll automatically. What am I doing wrong? private class chatPollingTask extends TimerTask { @Override public void run() { String xml; if(lastDate != null){ //Chama o Updater xml = ServerCom.getChatMessages(campaignId, lastDate); }else{ //Chama o init denovo xml = ServerCom.getChatMessages(campaignId); } Vector<ChatMessage> vetNew = Chat.parse(new InputSource(new StringReader(xml))); if(!(vetNew.isEmpty())){ //TODO: descobrir porque o chat não está rolando quando chegam novas mensagens //Descobrir também como forçar o rolamento, enquanto o bug não for corrigido. Log.d("CHAT", "New message(s) acquired!"); lastDate = vetNew.lastElement().getDateSent(); vetMsg.addAll(vetNew); ca.notifyDataSetChanged(); } } } How can I force the scroll to the bottom? I've tried using scrollTo using lv.getBottom()-lv.getHeight(), but didn't work. Is this a bug in the Android SDK? Sorry for the MASSIVE amount of code, but I guess this way the question gets pretty clear.

    Read the article

  • Automation of testing using JUnit

    - by Vijay Selvaraj
    Hi, i am trying to automate manual testing of modules in my project. We are dealing with IBM Websphere Message queue software. We have a trigger component written in core java which when executed polls for availability of message in the configured queue. Its an indefinite while loop that keeps the trigger component running. I have written test cases in JUnit to put message in the queue and now will i be able to start/stop the trigger component on demand? Invoking the trigger component keeps it running and i am not getting the control back to check the expected output. If i start it in thread then the log files to which the trigger component is supposed to update when processing the message is not getting updated. How can i resolve this situation. Your suggestion and directions is highly appreciated. Thanks, -Vijay

    Read the article

  • Should i use a trigger or Behaviors for this?

    - by Michael
    I have an abstract object called Applicant and two different types of objects that inherit from Applicant called Business and Individual. So I have three classes that look like this: public abstract class Applicant { ... } public class Individual : Applicant { ... } public class Business : Applicant { ... } Now in the DataGrid I want to show all the details of Applicant object. When you choose a row I want to show details of either the business or individual as a internal grid. Something like this <DataGrid> <DataGrid.Columns> <!--Show different columns --> </DataGrid.Columns> <DataGrid.RowDetailsTemplate> <!--Show if Individual --> <DataGrid> <DataGrid.Columns> <DataGridTextColumn Header="First Name" ... /> <DataGridTextColumn Header="Last Name" ... /> </DataGrid.Columns> </DataGrid> <!--Show if business --> <DataGrid> <DataGrid.Columns> <DataGridTextColumn Header="Business Name" ... /> <DataGridTextColumn Header="Tax id" ... /> </DataGrid.Columns> </DataGrid> </DataGrid.RowDetailsTemplate> </DataGrid> Now I'm not sure if I need to use a Triggers or Behaviors to accomplish this? Thanks for everyones help! FYI I'm using Silverlight 4.0 with Prism.

    Read the article

  • How can I trigger a server-side event from a client-side event?

    - by danish
    Short version All I need is that, in a ModalPopUp, when the DoubleClick event of a ListItem fires, the click event of my OK button should be executed. Detail I have a ModalPopUpExtender, which hosts a user control. The user control has an OK and a Cancel button. Along with that, it has a dynamic ListBox added to it. So far, I've considered the following possible solutions: Use Ajax.Net. But, I cannot afford to have a WebMethod. Use a ClientScriptCallBack. This will need a lot of JavaScript, since I have made almost every control dynamic. Is there any other way apart from using an UpdatePanel?

    Read the article

  • How to trigger binding source update from code in WPF?

    - by Benny
    In My ViewModel class I have a property: class ViewModel { public string FileName {get;set;} } and in my View I bind a label's content to ViewModel's FileName. now When I do drag-drop a file to my View, How can I update the label's Content property, so that the ViewMode's FileName also get updated via binding? Directly set the label's Content property won't work, it just simply clear the binding.

    Read the article

  • How do I use text in one cell to trigger row to be copied on another sheet in Excel?

    - by Brian Eby
    I provide all of the cut lists for our cabinet manufacturing in Excel. I tally all parts for the entire job on the first worksheet in an Excel file, and then filter the rows based on the "Material" column, and manually copy/paste each row in to its own material-specific worksheet (example: I filter "Materials" column for "Maple Ply", and then copy all "Maple Ply" rows to the "Maple Ply" worksheet). Then the material specific worksheets are sent to the shop floor for cutting. This is time consuming, and if I need to change any data in the first page, I have to go and manually update the copied row in its material-specific page. Is there any way to make each material page "look" for its material, and automatically populate itself with any row that has the appropriate material in the material column (example: any time I enter "Maple Ply" in the material column of sheet one, that row is automatically copied to the "Maple Ply" worksheet)? If so, could this link be dynamic, rather than just a copy, so that if I change a cell in a particular row on sheet one, that data is also updated on the material-specific worksheet copy? Thank you, Brian

    Read the article

  • How do I make my NSNotification trigger a selector?

    - by marty
    Here's the code: - (void)viewDidLoad { [super viewDidLoad]; NSURL *musicURL = [NSURL URLWithString:@"http://live-three2.dmd2.ch/buureradio/buureradio.m3u"]; if([musicURL scheme]) { MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:musicURL]; if (mp) { // save the music player object self.musicPlayer = mp; [mp release]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(popBack:) name:@"MPMoviePlayerDidExitFullscreenNotification" object:nil]; // Play the music! [self.musicPlayer play]; } } } -(void)popBack:(NSNotification *)note { [self.navigationController popToRootViewControllerAnimated:YES]; } The selector method never gets called. I just want to pop back to the root menu when the "Done" button is pressed on the movie player. I put an NSLog in the selector to check if it was even being called, nothing. The music plays fine. Any thoughts?

    Read the article

  • Monitor what users are doing in an .net Application and trigger application functionality changes.

    - by Jamie Clayton
    I need some suggestions for how to implement a very basic mechanism that logs what multiple users are doing in an application. When another feature is running I then need to change the application, to restrict functionality. Use Case Example User can normaly edit unpaid records. If the application then runs a Payrun process (Long), I need to then change parts of the application to restrict functionality for a short period of time (eg. Make existing unpaid records readonly). Any suggestions on how I can do this in a .net application?

    Read the article

  • Is there a way to know in VB.NET if a handler has been registered for an event?

    - by Seth Spearman
    In C# I can test for this... public event EventHandler Trigger; protected void OnTrigger(EventArgs e) { if (Trigger != null) Trigger(this, e); } Is there a way to do this in VB.NET? Test for null I mean? MORE INFO I forgot to mention. I have classes written in C# but I am writing my unit tests in VB.NET. I am trying this in the unit test... If myObject.Trigger IsNot Nothing Then 'do something End If This is causing a compile time error which says ... "Public Event Trigger is an Event and cannot be called directly. Use the RaiseEvent statement to raise an event." Seth

    Read the article

  • Children inside <a href> trigger mouseout. How to prevent that?

    - by stagas
    I have this: <a href="javascript:void(0);"> <div> <span>some content</span> <span>some content</span> </div> </a> The problem is hovering the mouse over from one <span> to another triggers an instant mouseout and mouseover again even though they have no padding or margin between them. Even on the browser's status bar the link flickers for an instant. How can this be prevented?

    Read the article

  • Is it possible to trigger Mouseevents by a divcontainer?

    - by Lara Röpnack
    I have an div Element with the ID mypointer, wich has an absolute position. I animate this div on a page with jquery. The goal is a presentation where the elements show the same reaktion on the div element like the mousepointer. So I want to simulate mouseover, click and rightclick events. Is that possible? Can someone give me an example which show me how to do that? Thank you for your answers Lara

    Read the article

  • Can I make DataGridView.EndEdit trigger the CellValidating event?

    - by Don Kirkby
    I'm using a DataGridView in my WinForms application. My main objective is to make the Enter key not move to the next row in the grid. I still want the enter key to validate and end edit mode. I found this FAQ entry and subclassed DataGridView to override ProcessDialogKey(). If the key pressed is Enter, I call EndEdit(), otherwise I call base.ProcessDialogKey(). It works great, except the CellValidating event isn't fired. Currently, I'm just manually calling my validation logic before I call EndEdit, but it seems like I'm missing something. I guess I could call OnCellValidating, but then I'd be worried I'm missing some other event. What I really want is some flavour of EndEdit() that behaves just like pressing enter on the last row of a grid with adding disabled.

    Read the article

  • How can you trigger the viewWillAppear of a UITableView AFTER its UINavigationController?

    - by Troy Sartain
    I have a situation where I use a tab bar set up but with nav bar controllers on a couple tabs. Those tabs have table views on them. Everything works great, I can pick a tab and get a different table in a nav bar structure. The other tabs are non-nav controllers. Fine. I want to use the same table view controller and even the same detail screen since they are essentially the same format. I have two-dimensional arrays and a couple of vars tracking which tab and which table row so when I get to the detail it's all good. Now to the problem. It all seems to work just fine until I return to a tab that has already been visited. At that point, I do indeed get a viewWillAppear for both the view controller of that specific tab and the table view controller. However, I get the table view one first! It doesn't know which tab was tapped on; the other one does but that's too late to dynamically change the table! Any suggestions? Am I being too greedy about code duplication? I mean I could just make separate controllers for for each table view and then separate detail view controllers but I thought I had a good solution.

    Read the article

  • ControlTemplate with "Control.IsMouseOver" Value="True" and "Control.IsMouseOver" Value="False">

    - by Vinjamuri
    In my WPF control, I have below code. If I don't have a trigger with false, I can see the my storyboard, but if I have both ture and false triggers, I don't see any thing. How to fix this? Appreciate your help! <Trigger Property="Control.IsMouseOver" Value="True"> <StoryBoard> Image with Opacity 1 </StoryBoard> </Trigger> <Trigger Property="Control.IsMouseOver" Value="False"> <StoryBoard> Image with Opacity 0 </StoryBoard> </Trigger>

    Read the article

  • iPhone: How to Trigger the Loading of a View Using a UI Element in a Previous View

    - by Kevin Horvath
    I've been reading the Head First iPhone Development book and I understand how to get to a new view from a table but how exactly would I be able to get to a new view or view controller, by just simply pressing a button? Is that even possible? I mean there are some apps where you click a button, not a table cell and it loads a new view. How exactly is that done? If someone could help out a newbie it would be greatly appreciated!

    Read the article

  • Why does my submit button fail to trigger Javascript MVC?

    - by user54197
    I have a simple code from a book and the code should display data from my controller in the "results" span. What am I missing? <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <script type="text/javascript"> $("form[action$='GetQuote']").submit(function() { $.post($(this).attr("action"), $(this).serialize(), function(response) { $("#results").html(response); }); return false; }); </script> <h2>Index</h2> <%using (Html.BeginForm("GetQuote","Stocks")) { %> Symbol: <%= Html.TextBox("symbol") %> <input type="submit" /> <span id="results"></span> <% } %> <p><i><%=DateTime.Now.ToLongTimeString() %></i></p> </asp:Content>

    Read the article

  • In Javascript, by what mechanism does setting an Image src property trigger an image load?

    - by brainjam
    One of the things you learn early on when manipulating a DOM using Javascript is the following pattern: var img = new Image(); // Create new Image object img.onload = function(){ // execute drawImage statements here } img.src = 'myImage.png'; // Set source path As far as I know, in general when you set an object property there are no side effects. So what is the mechanism for triggering an image load? Is it just magic? Or can I use a similar mechanism to implement a class Foo that supports a parallel pattern? var foo = new Foo(); // Create new object foo.barchanged = function(){ // execute something after side effect has completed } foo.bar = 'whatever'; // Assign something to 'bar' property I'm vaguely aware of Javascript getters and setters. Is this how Image.src triggers a load?

    Read the article

  • How do I trigger specific parts of a storyboard in WPF?

    - by George
    I have several grids in my window. I have created a storyboard that moves them left by x pixels when a button is clicked. I want to make it so that when the button is clicked again those grids move another x pixels, however I'm unable to find out how to do this as it's not a common task on tutorials. I have tried creating a second storyboard to do this, however that won't work as then the grids will be back at their starting positions. One solution might be to create a third set of keyframes after the first two sets, and somehow pause the animation when it gets there, and resumes it again when the button is clicked, however I'm not sure how to pause a storyboard when it reaches a keyframe. This would also make reversing the grids difficult (using this approach http://social.msdn.microsoft.com/forums/en-US/wpf/thread/ac54de71-f750-4940-91a2-231810308727/), as I'd like to make another button make the grids go the other way.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >