Posts

PHP-jQuery Displaying items properly -

i have problem. want display every "subject" (titles) in page , not first 1 now. when add new message, index displays first one, , when click on "open" button can see messages. any suggestion? many thanks. this de code: <?php require_once("config.php"); if (isset($_session['username']) === false){ header('location:login.php'); exit(); } $where = ""; $searchcriteria = ""; if (isset($_get['search']) && $_get['search'] != '') { $searchcriteria = mysql_real_escape_string($_get['search']); $where = " subject '%" . $searchcriteria . "%'"; $where .= " or message '%" . $searchcriteria . "%'"; } $sql = "select * notes " . $where . " limit 30"; $result = mysql_query($sql); ?> <!doctype html> html> <head> <meta http-equiv="content-type" content="te...

java - How to match any integer in hibernate? -

to match string table , use restrictions.like("fieldname","%") . how achieve same when matching field integer? restrictions has many methods eq, ge,gt,le, lt, in you can use 1 above depending on contition check. refer api doc

openid - Switched for Federated Login in App Engine, now users must login every few hours -

i switched google accounts api federated login today , users reporting must login every few hours now, before logged in permanently. is there can extend time users logged in when using federated login? somebody suggested increase cookie expiration 1 or 2 weeks , should solve issue. come , delete answer if not.

jquery - Ajax call throwing an error but I see response on Fiddler -

my page using ajax call username. see response in fiddler still throws error. here code: $.ajax({ type: "post", url: "selection.aspx/getuser", data: "{}", contenttype: "application/json; charset=utf-8", datatype: "json", success: function (response) { var username = response.d; if (username.indexof("error") > 0) { jalert(username); } else { if( username!= "" ) { $("#maincontent_lbluser").text(username); } } }, error: function (xhr, status, error) { if (xhr.responsetext != "") { var err = eval(...

jquery - jqxgrid aggregates 'sum' ,replace dollar to an other symbol -

Image
i used jqxgrid of jqwidgets, works well, when use aggregates special column used statistics total cost, want replace $ in front of number other symbol, searched long time on google, still not fixed problem. can me? in advance here piece of girds' snapshot: get script, var getlocalization = function () { var localizationobj = {}; localizationobj.currencysymbol = "your symbol "; return localizationobj; } then during grid initialization: $("#jqxgriddata").jqxgrid( { width: 850, height: 250, localization: getlocalization(), ... ... } hope help, jms

drools - How to get output result from guvnor rule in java code -

i uploaded patient model jar on guvnor, class has name , result field. i created rule in guvnor insert result "pass" whenever name has particular value: code of rule below: rule "isjohn" dialect "mvel" when patient( name == "john") patient fact0 = new patient(); fact0.setresultstring( "pass" ); fact0.setname( "patient: john" ); insert( fact0 ); end below java code call rule. knowledgebase knowledgebase = readknowledgebase(); statefulknowledgesession session = knowledgebase.newstatefulknowledgesession(); patient patient = new patient(); patient.setname("john"); system.out.println("patient.name "+patient.getname()); session.insert(patient); session.fireallrules(); system.out.println("************patient.name "+patient.getname()); system.out.println("patient result string "+patient.ge...

ios - Crashing application on ios7 with DT set to iOS5 ( UIKeyAutomaticallyAdjustsScrollViewInsets -is not an integer number) -

had such issue: there 2 storyboards in project - ipad , iphone. deployment target set ios 5. when try run on ios7 using ipad-simulator app crashes message - [nskeyedunarchiver decodeint32forkey:]: value key (uikeyautomaticallyadjustsscrollviewinsets) not integer number the strange thing iphone simulator runs well. storyboard settings set to: 1)opens in xcode5 2)builds project dt 3)views ios 7 , later. 4)xcode 5 dp4. in storyboard select view / navigation controller , view controller layout make sure adjust scroll view insets checked.