Posts

php - Session data not getting destroyed from cache in CodeIgniter -

i new codeigniter. in website have logout option. have written code destroy session , logout works first time in both ie , chrome. if login again logout not work till clear cache , manual refresh. both ie , chrome showing problem. have tried writing cache clear method not working. known issue or doing wrong. my logout code class logout extends ci_controller { public function __construct() { parent::__construct(); } function index() { $this->home_model->unsetsessions(); redirect('', 'refresh'); }} my home model function unsetsessions() { $newdata = array( 'session_id' => '', 'user_id' => 0, 'user_name' => null, 'user_type' => null ); $this->session->unset_userdata($newdata); }

spring - org.hibernate.QueryParameterException -

i newbie in spring. i'm trying perform add,delete,edit operation on database through spring , hibernate.delete , add operation executed when trying edit clicking on edit. i'm getting error: full stacktrace: org.hibernate.queryparameterexception: not locate named parameter [userid] @ org.hibernate.engine.query.parametermetadata.getnamedparameterdescriptor(parametermetadata.java:75) @ org.hibernate.engine.query.parametermetadata.getnamedparameterexpectedtype(parametermetadata.java:81) @ org.hibernate.impl.abstractqueryimpl.determinetype(abstractqueryimpl.java:413) @ org.hibernate.impl.abstractqueryimpl.setparameter(abstractqueryimpl.java:383) @ userdao.userdaoimpl.getuserbyid(userdaoimpl.java:48) @ userservice.userserviceimpl.getuserbyid(userserviceimpl.java:41) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodacces...

mysql - PHP Display hours until a certain event from a time given -

so basically, wanted happen was, wanted submit article submits current time() , amount of hours until event. wished calculate amount of time in hours time() in database amount of hours since article posted. if posted article event happening @ 3pm, , current time 12pm, "event in 3 hours". , if check again @ 2pm, "event in 1 hours". sorry if seems noob question, quite stupid person when comes maths , stuff. in advance input, appreciate it! presuming store time of article timestamp, , retrieve value in variable $articletime: $hoursleft = floor(($articletime - time()) / 3600);

Python script not triggering jQuery form reset via ajaxForm -

i've searched no luck, please forgive me if redundant. i'm new python, , have simple html form (on submission) clears form, sends email via action.py script, , alerts message (alertify js) on same form page. email gets sent correctly, form not clear , not receive alert message. (stripped down) html form is: <form id="myform" method="post" title="contact info request form" action="action.py"> <fieldset> <input type="text" title="field entering name" name="name" id="name" maxlength="50" placeholder="name" /> <input type="text" title="field entering email address" name="email" id="email" maxlength="50" placeholder="email" /> <textarea title="field entering message" name="message" id="message" rows="5" cols="4"...

c# - How to display xml string in a Label? -

i trying html method below, encode string , display on label, keep getting blank page, on client-side. i have checked viewsource , shows no html output also. public partial class : page { protected void page_load(object sender, eventargs e, string data) { if (!ispostback) { string = createxmlpub(data); // label1.text = httputility.htmlencode(a); label1.text = server.htmlencode(a); } } public static string createxmlpub(string data ) { xelement xeroot = new xelement("pub"); xelement xename = new xelement("name", "###"); xeroot.add(xename); xelement xecategory = new xelement("category", "#####"); xeroot.add(xecategory); xdocument xdoc = new xdocument(xeroot); data = xdoc.tostring(); return data; } html <asp:content runat="server" id="bodycontent" contentplaceholderid="maincontent"> ...

How to disable connection pooling with PostgreSQL in flask-sqlalchemy? -

i want use pgpool or pgbouncer external connection pooler flask app. flask-sqlalchemy extension not seem expose way change connection pooler nullpool . there way this? while should possible apply_driver_hacks method, recommend against it. the tcp overhead negligible on local machine, authentication , negotiation (encoding example) isn't. keeping pool useful within flask , if needed can configured sqlalchemy_pool_size , sqlalchemy_pool_timeout , sqlalchemy_pool_recycle , sqlalchemy_max_overflow settings . if want cut down on overhead (albeit negligible) , 1 instance flask app thing connecting postgres, removing pgbouncer/pgpool mix better.

asp.net - Update command not throwing any errors, but not working either -

update button executes onclick="updatelogo", nothing shows in database. know executes because can put other instruction refresh or redirect page, , executes, doesn't update. tried using commandname property instead of onclick property, no luck there either. thoughts why? i've moved in , out of updatepanel , can see i've got inside formview right now. i've tried couple of variations on variables @atty_id or ? , can't seem work. here markup: <asp:updatepanel id="updatepanel19" runat="server"> <contenttemplate> <asp:accessdatasource id="chamberlogodatasource" runat="server" datafile="~/app_data/attorneys.mdb" selectcommand="select attorneys.chamber attorneys atty_id = ?" updatecommand="update attorneys set chamber = ? att_id = ?"> ...