close

Redirect jquery ui dialog on close.

I tried different ways to do this but i cant get it work. this is the code: $.ui.dialog.defaults.bgiframe = true; $(function() { $("#category_edit_dialog").dialog({ width: 960, hide: 'slide', position: 'top', show: 'slide', close: function(event, ui) { redirect here? how? } }); });...

BasicDataSource close() method does not close connections

Hello all, I have a short script opening datasource and then closing it. This script is using BasicDataSource. BasicDataSource bds = new BasicDataSource(); bds.setDriverClassName("com.mysql.jdbc.Driver"); bds.setUrl("jdbc:mysql://10.1.1.186:3306/logs"); bds.setUsername("root"); bds.setPassword(""); Connection connection = bds.getConnec...

colorbox close confirmation

$(document).ready(function(){ $('#rest').colorbox(); $("#cboxClose").click(function(){ $.fn.colorbox.close(); }); var cboxClose = $.fn.colorbox.close; $.fn.colorbox.close = function(){ if(confirm("Are you sure?")) { cboxClose(); } } }); this code close my jquery colorbox when i confirm the dialog, but if i click on cancel (!confirm) it...

How can I close a Windows CMD window after I run a Perl program?

Is there a way to close a cmd window when a task is complete and also tell how many are already open? system( qq{ start "List Perl files" perl c:/perlscripts/new_spider.pl $new_href } ) ...

How do I close a file created from command line?

I'm writing command line output to a file and then want to open this file in notepad. So I wrote something like the following (simplified example): set logPath=log.txt echo %date% %time% > %logPath% notepad %logPath% But the problem is that when the last command is run (notepad %logPath%), the file is not yet created (or the contents ...

expand and close tableview cell

from my experience in this forum when i ask for something starting with the word "simple" it turns out to be REALLY difficult after all! at least for a noob like me. what i would like to do: tap on a cell and expanded below to show more information in that cell. tap on an already expanded cell to "restore" it back to its original "n...

Why does this dialog box close immediately after opening?

My issue is that I am trying to create a Opengl/Win32 application and I am unable to keep my dialog box open. It literally flashes as if someone pressed cancel on it RIGHT when it opened. I've looked around google and found a few others with this issue, but none of the solutions they posted have helped me, so I turn to the StackOverflow ...

WCF connections close very slowly with SSL

We have WCF services that operate over multiple protocols for different customers. Most work fine, but when we use SSL the connections take a long time to close. Opening a connection is no problem, but closing is very slow. The strangest behavior is that the close time is proportional to the amount of data that was transmitted on the co...

Closing a listening TCP socket in C

Hi; Suppose you have a socket listening on a TCP port, and some clients are connected. When one issues sock_close(fd) in C and tries to bind again on the same port, binding fails. Some TIME_WAIT state is seen on the "netstat -plutnoa" such as: tcp 0 0 127.0.0.1:4567 127.0.0.1:32977 TIME_WAIT - ...

C# Close Modal Form when mouse click outside form area

I would like to close a modal form when the user clicks outside (anywhere on the computer desktop) the modal form. How can we do this as a modal form is not meant to lose focus. ...

using a viewController to open another instance of the same viewController

I have a MasterViewController.h.m.xib (UIViewController) that is opening a TestDummy.h.m.xib (UIViewController) in the following way: TestDummy *controller = [[TestDummy alloc] initWithNibName:@"TestDummy" bundle:nil]; [scrollView addSubview:controller.view]; I have two buttons in TestDummy: (Open), (Close) and one label: (windowDepth...

swing: programmatic close of JFrame

What's the programmatic equivalent of clicking the close (x) button in the upper right corner of a JFrame? There's the dispose() method but that's not the same thing, since a JFrame can be set to do several different things upon closing (not to mention if there's a WindowListener involved) ...

Python : Closing a socket already opened by a precedent python program or dirty trick to close a socket.

here is my dirty little web server : class Serverhttp: def __init__(self): self.GET = re.compile("GET.*?HTTP") self.POST = re.compile("POST.*?HTTP") try : sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_address = ('localhost', 36000) print >>sys.stderr, 'starting up on %s port %s' % se...

Hibernate session.close() not returning connection to pool

My application has long running transactions and hence I tried the option session.close() at the end of every method to ensure that the connection objects are not held indefinitely for long time. When session.close() option is used, I could see that the Hibernate's session object and the corresponding Connection object obtained from se...

is Stmt.close() needed in my program

Dear All, I would like to know 1.the purpose of statement closing in java 2.what will happen if i didnt give stmt.close() in my program try{ Statement DelQTY=OPConnect.createStatement(); Statement DelPMQTY=OPConnect.createStatement(); Statement DelPReq = OPConnect.createStatement(); Statement DelPro=OPConn...

Will Hibernate flush my updated persistent object when calling session.close()(using FlushMode.AUTO)?

Hi, It's pretty much in the title. I know that session.close() does not flush the session but what I'm not too sure is about the promise of FlushMode.AUTO. From the Docs: FlushMode.AUTO The Session is sometimes flushed before query execution in order to ensure that queries never return stale state. This is the default flush mode. ...

PHP-Script paid subscriptions to the site service

I search a script with follow features: The user can pay the full functional website for some time (week, month, six months, a year - for example). After payment, the script pass a parameter that the user has paid, and the user data insert into the database mySQL (name, start subscription date, the subscription end date). Each time whe...

How can I override the close button to minimize instead for a specific application?

I would like to override the close button to minimize an application instead. Can I write such thing in C#? Or do I need to use C++? How do I write this kind of hook? Do I need a process running or would a driver/dll/service suffice? As far as I got researching I think I have to do something like this but I don't know how exactly: ...

jquery show/hide divs and a counter

I have a random amount of DIVs (minimum 1, max of 10) <div id="container"> <div class="foo">Content</div> <!-- div 1 --> <div class="foo">Content</div> <!-- div 2 --> <div class="foo">Content</div> <!-- div 3 --> <div class="foo">Content</div> <!-- div 4 --> <div class="foo">Content</div> <!-- div 5 --> <div class="foo">Content</div> <!...

Calling "start" to start program and "stop" to close current instance in C

I wrote a simple server in C and would like to have the same functionality calling it as other C daemons (such as calling it with ./ftpd start and closing that instance with ./ftpd stop). Obviously the problem I'm having is that I do not know how to grab the current instance of the running program. I can parse the options just fine (usin...