timeout

Flex Web Application Timeout after a specific time and redirect to login

怎甘沉沦 提交于 2019-12-24 21:30:07
问题 All, We have a Flex, Blazeds & Spring based Web application. The requirement is that if the browser is idle for 30 minutes, we have to popup an error message to the user and then redirect to the login page. I have searched on this and was not able to find a suitable solution to this. If someone can point me in the right direction, that would be great. I really appreciate that Thanks Harish 回答1: Here's how I would approach it. When the app loads, start a 30 minute timer and add a listener to

Powershell timeout service [closed]

牧云@^-^@ 提交于 2019-12-24 18:12:44
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 8 years ago . I am trying to start a service in Powershell. If the service does not start within a specified time limit, the attempt to start should be killed,

How to reject promise on d3 xhr request timeout?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 17:42:26
问题 I want to set a timeout value so that if the server does not respond in that particular time frame then UI should move ahead and not wait for response. I have used the below syntax so far but the UI gets hanged waiting for response. How can I specify a callback to reset the values and inform UI that no longer needed to wait. q.promise(function(resolve, reject) { d3.xhr(my_url) .header('Content-Type', 'text/xml') .timeout(2000) .send(this.my_method, my_xmlData, function(error, data) { }) }); I

TransactionScope and Timeout Issue

不打扰是莪最后的温柔 提交于 2019-12-24 17:18:04
问题 We know that TransactionScope class can use user-defined timeout value. But timeout exception is thrown while exiting from the using {} block. How to throw this timeoutexception immediately after elapsed timeout value? 回答1: This is not possible. The TransactionScope simply stores the time that you started the transaction, then checks that time when committing the transaction. It has no way to throw an exception at any arbitrary point. In general, the only exception that can be thrown at any

C++: Timeout for an external application call

时光总嘲笑我的痴心妄想 提交于 2019-12-24 15:24:20
问题 For a c++ program I'm working on, I have to call an external application to do some operations. I can't modify the application. This operations may take too much time so I have to add a timeout. I tried using system() and boost threads int main() { [...] boost::thread t(function1); t.timed_join(boost::posix_time::seconds(10)); [...] return 0; } void function1() { system("external application"); } but when I return to the main 10 seconds later, the external application is still running in

Stop functions in 5 minutes if they dont end running

ぃ、小莉子 提交于 2019-12-24 13:41:41
问题 I want to add a feature in my project. I have 2 functions running in a for-loop because I want to find the solution of the functions in random arrays. I also have an function that makes random arrays. In each loop the array that is made by the random_array fun are the input of the 2 functions. The 2 functions print solutions in the screen , they dont return an argument. int main(){ for (i=0;i<50 i++) { arr1=ramdom_array(); func1(arr1) func2(arr1) } } I need to stop the functions running if

Increment times out; set always succeeds after retry

a 夏天 提交于 2019-12-24 13:33:18
问题 I'm getting strange behavior in memcached, in particular, behavior that is strange in its consistency. Here is my test: @Test public void testMemc() { logger.info("Setting head."); memc.set(env.memcachedQueueKeys().head, 3600, 0); logger.info("Set head; incrementing."); memc.incr(env.memcachedQueueKeys().head, 1); logger.info("Incremented."); } And here is the output: 28 11:04:52.932 INFO; Setting head. 2014-01-28 11:04:52.933 WARN net.spy.memcached.MemcachedConnection: Could not redistribute

Error in jquery syntax

依然范特西╮ 提交于 2019-12-24 11:54:16
问题 This code is supposed to produce the following effect: when .expander is moused over, it waits 400 milliseconds and then expands to 150% of its original size over the course of 270 milliseconds. If the mouse leaves .expander , the expansion is cancelled. <div class="expander"><%=image_tag("expander.jpg")%></div> <script type="text/javascript"> $(".expander").on('mouseenter', function () { $.data(this, 'timer', setTimeout(function () { $(this).stop(true, true).animate({width: "150%"}, 270,

SQL_ATTR_QUERY_TIMEOUT Not Timing Out

我们两清 提交于 2019-12-24 11:39:10
问题 Setup Using SQL Server 2008 R2. I have an ODBC call to a stored procedure that should time out after 3 seconds by using the SQLSetStmtAttr function with the SQL_ATTR_QUERY_TIMEOUT parameter. SQLSetStmtAttr( command, SQL_ATTR_QUERY_TIMEOUT, (SQLPOINTER)&timeOut, NULL ); Test I set a delay in the stored procedure for 15 seconds. The stored proc does indeed take just over 15 seconds to return. WAITFOR DELAY '00:00:15' Issue The problem is that the stored procedure returns correctly, where I am

Java HTTP GET response waits until timeout

浪尽此生 提交于 2019-12-24 11:22:05
问题 I am supposed to develop a program that reads a web page with the specified URL, but the problem is that I am not allowed to use any HTTP libraries, I am only allowed to use TCP. Below is the code that reads the response message: private static String readMultiline (BufferedReader inStr) { String message=""; String line=readLine(inStr); while (line != null) { message += line + "\r\n"; line=readLine(inStr); } if (message.length() == 0) return null; return message; } private static String