Posts

Thrift TThreadPoolServer returns "Segmentation fault; core dumped;" when handle concurrent MySQL database requests -

i'm developing simple assignment using apache thrift , c++ poco library. assignment requires me make benchmark creating multiple concurrent threads make same request thrift tthreadpoolserver . this client-side code, creates 10 concurrent threads, of them make same get request (request info 1 user d ) server: // define myworker class inherits runnable class myworker : public runnable { public: myworker(int k = -1) : runnable(), n(k) { } void run() { // create connection boost::shared_ptr<ttransport> socket(new tsocket("localhost", 9090)); boost::shared_ptr<ttransport> transport(new tbufferedtransport(socket)); boost::shared_ptr<tprotocol> protocol(new tbinaryprotocol(transport)); apisclient client(protocol); try { transport->open(); int res = -1; // make request res = client.get("d"); printf("thread %d,...

ios - How to fix issue with Enterprise Account? -

i updating in-house app client have previous version on over 200+ devices of company. i want update new version app, when try sign app distribution provisioning profile asks me private key. after searching, people suggested revoke old certificate , generate new 1 on machine. file build success, devices install failed. how fix issue ? logs : jun 26 10:22:29 dungnguyens-iphone installd[76] : 0x100794000 -[micodesigningverifier performvalidationwitherror:]: 188: failed verify code signature of : 0xe8008018 (invalid signing certificate (it may have expired or been revoked)) jun 26 10:22:29 dungnguyens-iphone installd[76] : 0x100794000 -[miinstaller performinstallationwitherror:]: verification stage failed jun 26 10:22:29 dungnguyens-iphone mobile_installation_proxy[1398] : 0x10050c000 __mobileinstallationinstallforlaunchservices_block_invoke240: returned error error domain=miinstallererrordomain code=13 "failed verify code signature of : 0xe8008018 (in...

jquery - how to bind data to jqureyevent calendar using Ajax -

$.ajax({ type: "post", contenttype: "application/json", data: "{eventdata:" + json.stringify(eventtosave) + "}", url: "business/dashboardcfc.cfc?method=funtodayevent&returnformat=json", datatype: "json", success: function (data) { var events = new array(); $.map(data.d, function (item, i) { var event = new object(); event.id = item.event_id; event.start = new date(item.even_date); event.title = item.eventname; event.allday = false; events.push(event); }) $('div[id*=calendar]').fullcalendar('addeventsource', events); $("#loading").dialog("close"); }, } }); the question vague enough can deduce title of question code isn't working you. here came out of comments questions above: $.ajax({ type: "post", contenttype: "application/json", d...

java - Correct way to change Collapseble Toolbar title -

when change title of collapsed collapsingtoolbar, title not change. tried getsupportactionbar.settitle , collapsetoolbar.settitle. did not help. tell me , what's problem ? i believe this issue describes experiencing. had issue , solved today. code handles collapsing text update text when current text null or size of text changes. bug closed , patch scheduled future release of design library. use workaround of changing size of text , changing back. this have private void setcollapsingtoolbarlayouttitle(string title) { mcollapsingtoolbarlayout.settitle(title); mcollapsingtoolbarlayout.setexpandedtitletextappearance(r.style.expandedappbar); mcollapsingtoolbarlayout.setcollapsedtitletextappearance(r.style.collapsedappbar); mcollapsingtoolbarlayout.setexpandedtitletextappearance(r.style.expandedappbarplus1); mcollapsingtoolbarlayout.setcollapsedtitletextappearance(r.style.collapsedappbarplus1); } in styles.xml have <style name="expande...

javascript - What does {x:expression(...)} do? -

this question has answer here: how polyfill work document.queryselectorall? 1 answer i came across polyfill of queryselectorall ie7: https://gist.github.com/connrs/2724353 i had thought okayish in javascript, have never seen quoted part in line 9 of polyfill: {x:expression(document.__qsaels.push(this))} apparently, javascript object key x , value expression(document.__qsaels.push(this)) , other know, mysterious me. expression function do? not able find close via google. you looking @ generated css rule. not javascript object, css declaration block. the line styletag.stylesheet.csstext = selector + "{x:expression(document.__qsaels.push(this))}"; concatenates css selector declaration block string of css. declaration block contains dummy css property called x value of expression(document.__qsaels.push(this)) . what expression() is...

ios - Converting PFObject (Parse) into JSON in Swift? -

is there way convert pfobject parse json? saved json, when try load i'm getting [anyobject] back. casting json won't work: class func loadpeople() -> [string : person] { var peopledictionary: [string : person] = [:] let query = pfquery(classname: "userpeeps") query.findobjectsinbackgroundwithblock { (objects, error) -> void in if error == nil { //this returns first entry, how them all? if let peoplefromparse = objects?.first?.objectforkey("userpeeps") as? json { name in peoplefromparse.keys { if let personjson = peoplefromparse[name] as? json, let person = person(json: personjson) { peopledictionary[name] = person } } } below save function, works , saves json parse want: class datamanager { typealias json = [string: anyobject] class ...

Java JDBC display first 500 records at a time, commit, than display the next 500 records and etc -

so want able display 500 records @ time, commit , print has been displayed records 1 500 records have been committed. , next 500 records , commit again until reached maximum records on 20k records. managed first 500 records stuck how can commit them , in commit them , continue next 500 records , on. public static void selectrecordsicore() throws sqlexception { connection dbconnection = null; preparedstatement preparedstatement = null; statement statement = null; string selecttablesql = "select profile_id, ingress_flag, egress_flag, ce_ingress_flag, ce_egress_flag cos_profile" + " profile_id >= ? , profile_id <= ?;"; try { dbconnection = getinformixconnection(); //connects icore database system.out.println("i in try"); //gets max profile_id record statement = dbconnection.createstatement(); resultset r = statement.executequery("select max(profile_id) rowcount cos_profil...