Posts

codeigniter - Email library not sending the correct link -

i have following code: $link = "www.domain.com/profile/forgot_password?user=".$username . "&key=".$key; $this->email->message('you requested reset password. follow link. <a href="'.$link.'"> ' . $link . "</a>. thank you,system support."); all trying here create friendly message user when wish reset password. supposed be: you requested reset password. click here so! on click here word should have link in href go reset page. not working above code seems escaping html showing below in message sent. should interpret html tags not send them. <a href='hdkjahskjdaskhdsjkahd'> djadjalksjdklasjdkajsd</a> ensure have set appropriate email preferences send email in html format, particularly mailtype preference: //you can add more email preferences here $config['mailtype'] = html; $this->email->initialize($config); $link = "www.domain.com/profile...

java - Hibernate: how to get a list of all the objects currently in the session -

i'm getting good, old , dreaded transientobjectexception , and, happens in such case, i'm having problems locating kind of subtle bug in code causing problem. my question is: there way obtain list of every object that's in current hibernate session? i'll have solved current problem time answer question, but, anyway, being able list session lot in next time happens. hibernate not expose internals public, won't find searching in public api. can find answer in implementation classes of hibernate interfaces: method (taken http://code.google.com/p/bo2/source/browse/trunk/bo2implhibernate/main/gr/interamerican/bo2/impl/open/hibernate/hibernatebo2utils.java ) tell if object exists in session: public static object getfromsession (serializable identifier, class<?> clazz, session s) { string entityname = clazz.getname(); if(identifier == null) { return null; } sessionimplementor sessionimpl = (session...

php - SQL querying for a record and then searching in the previous records for existence -

i have task in have search details of ids in csv file. have used 'in' clause can process 1000 ids @ time. problem after getting records example email associated id have search database if same email has made entry within given time period (one year) , declare id old , not new otherwise new. database large. i have used 'in' clause again this. have around 1,00,000 ids process. every 1000 ids requires 2 queries 1 getting email , second searching them. entire process taking me more 25 minutes. trying find better ways achieving same result.

javascript - tabcontainer with active tab when page load -

i using tabcontainer 3 tabs.using css tabcontainer,not ajax tabcontainer.then set automatic refresh of every 1 minute.now select tab2,but when page refresh automatically go tab1.so how maintain selected tab when page load or refresh,i want jquery.please me.i trying,tab click event got tab selected index,then value pass page load,but not working,is other way keep selected tab when page load.cookies try no use,then hidden field used,but don't know how hidden value cs page.my code <div id="nav" class="tabnav" style="width: 80%; height: auto; float: left; margin-left: 8.9%;" onclick="pageload()"> <ul class="tabnav" id="tab"> <li><a href="#nogo" title="address info" linkrel="#tab-1">address info</a> </li> <li><a href="#nogo" title="additional info" linkrel="#tab-2">additional info</a...

Using Nanoc with Bower and CoffeeScript -

i had use static datasource bower packages because nanoc ( filesystem_unified datasource) not allow multiple files same filename , different extension. but static datasource treats each item binary , not allow me apply filters , can not apply filter .coffee files in order compile .js any suggestions? it lets apply filters, not text filters, since static data source items "binary". nanoc 4 fixing whole mess of things this, need fix sooner :) the easiest fix drop copy of static data source in lib directory, change name/class unique, switch item type text, , use version instead.

c# - The main form is frozen after finishing copying file (with a progress indicator) using CopyFileEx? -

i have main form, form has button clicking on show copying window progressbar. use thread copying job, after finishing copying (the file copied ok , copying window closed) main form frozen (the controls on form seem not interactive with). task manager shows there not work (0%). there strange here. here code copying dialogue, please see: public partial class filecopier : form { [dllimport("kernel32")] private extern static int copyfileex(string source, string destination, copyprogressroutine copyprogress, int data, ref int cancel, int flags); private delegate int copyprogressroutine(long totalbytes, long bytescopied, long streamsize, long streamcopied, int streamnumber, int callbackreason, int source, int destination, int data); public filecopier() { initializecomponent(); } #region private members int cancel; int copyfinished = -1; #endregion #region public methods public void copy(strin...

ruby on rails - cucumber step: how do i get the input data from a different step? -

i have scenario: given on edit_stamp page , change date "14.5.2010" #<-- need data ... should see new times has been set #<-- down here i'm updating date of model, , in last step want verify model indeed updated date selected in first step. how can grab selected date top, in last step-definition? then(/^i should see new times has been set$/) s = stamp.first find_by_id("day_date#{s.id}").has_text?("14.5.2010") end this have now, don't want write date(14.5.2010) step-definition, want fetch previous step. try this: and (/^i change date "(.*?)"$/) |input_date| @new_date = input_date # , here whatever doing date end then(/^i should see new times has been set$/) s = stamp.first s.date_or_whatever_attribute_you_are_using.to_s.should == @new_date end those instance variables (@xx) persist alongside whole scenario.