Posts

php - MySQL Sleeping Threads Eating up all my Connections -

php - MySQL Sleeping Threads Eating up all my Connections - i've been continually getting "too many connections" errors on site uses php , mysql. in looking @ info mytop (show processlist), find of these connections sleeping ones. tried setting mysql settings interactive_timeout , wait_timeout 120 seconds processes still somehow sleeping longer that. php max_execution_time set 30 seconds why script maintain mysql connection open more 30 seconds? not explicitly calling mysql_close in of scripts , i'm not using pconnect. have suggestions or advice on need or at? give thanks you! try adding explicit mysql_close($conn) or relevant function particular driver scripts you're using see if it's php failing kill connections. php mysql connections

jquery - How to check whether selected node is having child nodes or not in jstree? -

jquery - How to check whether selected node is having child nodes or not in jstree? - i m taking selected node next code. var selected=$("#warehousetree").jstree('get_selected'); and want check kid nodes selected node. try this: var tree = jquery.jstree._reference('#warehousetree'); var children = tree._get_children(selected); which homecoming array of jquery objects of children of selected node. jquery jstree

css - How to force table cell content to wrap? -

css - How to force table cell <td> content to wrap? - heres entire page * wrappable definded in main.css file /* wrappable cell * add together class create sure text in cell wrap. * default, data_table tds not wrap. */ td.wrappable, table.data_table td.wrappable { white-space: normal; } heres entire page: <%@ include file="../../include/pre-header.html" %> <form id="commentform" name="commentform" action="" method="post"> <ctl:vertscroll height="300" headerstyleclass="data_table_scroll" bodystyleclass="data_table_scroll" enabled="${user.scrolltables}"> <ctl:sortabletblhdrsetup toptotal="false" href="show.whatif_edit_entry? entryid=${entry.entryid}"/> <table class="data_table vert_scroll_table"> </tr> <tr> <ctl:sortabletblhdr styleclass="...

"411 Length required"-response from Google Docs Api using Android API 10 and below -

"411 Length required"-response from Google Docs Api using Android API 10 and below - i developing application android devices, , 1 part of enabling downloading , uploading between users google docs , device storage. problem have i'm getting different behavior between different versions of android api. i've been doing of development on api lvl 10 (android 2.3.3). no problems on virtual device (i don't have real device test api lvl or higher). on device , emulator of api lvl 8 (2.2.x) , below run 411 length required error google docs api when requesting start resumable upload session. not happen when running same application on emulator of api lvl 10. i developing eclipse , using google api java client 1.4.1-beta communicate docs api. documentation follow google docs api lies here: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html according said documentation, start resumable upload session 1 send empty post request. "root...

Reading the BitBucket API with Authentication for a Private Repository in C#.net -

Reading the BitBucket API with Authentication for a Private Repository in C#.net - i've been trying few days bitbucket api work me, have come grinding halt when comes getting work private repository authentication (with issues set private, when they're set public , no authentication needed works fine) code sample follows: static void main(string[] args) { webproxy prox = new webproxy("proxygoeshere"); prox.credentials = credentialcache.defaultnetworkcredentials; var address = "repositories/userfoo/slugbar/issues/1"; var repcred = new credentialcache(); repcred.add(new uri("https://api.bitbucket.org/"), "basic", new networkcredential("userfoo", "passbar")); webclient client = new webclient(); client.credentials = repcred; client.proxy = prox; client.baseaddress = "https://api.bitbucket.org/1.0/"; client.usedefaul...

java - Detecting which way mouse is scrolled -

java - Detecting which way mouse is scrolled - there 1 method in mousewheellistener interface. need different things depending on whether mouse scrolled or down. how accomplish such thing? information, have jpanel within jscrollpane. utilize mouse wheel motion zoom in or out. the mousewheelmoved method takes mousewheelevent parameter. there fields in parameter can utilize determine direction of scrolling (see mousewheelevent). 1 time know direction wheel moved in, can decide action perform. java swing event-handling mousewheel

c# - Generic Method where T is List that implements interface -

c# - Generic Method where T is List that implements interface - this similar c# - multiple generic types in 1 list however, want generic method take list of objects implement same interface. this code gives error there no implicit reference conversion. public interface itest { } public class interfaceuser : itest { } public class testclass { void genericmethod<t>(t mylist) t : list<itest> { } void testgeneric() { genericmethod(new list<interfaceuser>()); } } can done? define t itest , take list<t> argument public interface itest { } public class interfaceuser : itest { } public class testclass { void genericmethod<t>(list<t> mylist) t : itest { } void testgeneric() { this.genericmethod(new list<interfaceuser>()); } } c# generics