Posts

php - what means if ($con->connect_errno)? -

i'm learning php , have file connects mysql database, i'd know condition inside brackets of following "if structure" in file, $con instance of class mysqli: if ($con->connect_errno) { echo "fail connect mysql"; } i know $con invoking connect_errno conditioning if(what?){...}? that's status flag mysqli handles. see http://php.net/manual/en/mysqli.connect-errno.php it's not function, property (or "variable" if will). it's 0 when connection correctly established. contains other values (e.g. 1043 ) connection problems (such wrong password, inavailable database server). so if ($con->connect_errno) check asserts $con instance usable. when ->connect_errno == 0 if block skipped. if ->connect_errno > 0 (any other value) error message printed out. (you'd more commonly see die() , trigger_error() or new exception() echo there.) alternatively mysqli can configured throw error/exception itsel...

android activity - how to open different activities when receiving notification from parse -

i have different categories in app such news,weather,sports and technology ,i use parse receive notification ,but want notification customized in once notification regarding news received should open news activity,if notification regarding technology received should open technology activity. don't want custom push receiver,i tried lots of examples can't it.any ideas in advance first need create custom class extends parsepushbroadcastreceiver. , in class override onpushopen method: public class parsepushcustomreceiver extends parsepushbroadcastreceiver { protected static string pushtitle=""; @override protected void onpushopen(context context, intent intent) { super.onpushopen(context, intent); pushtitle=""; try { bundle extras = intent.getextras(); if (extras != null) { string jsondata = extras.getstring("com.parse.data"); jsonobject json; json = new jsonobject(...

android - DatePicker and TimePicker code not working together ("protected Dialog onCreateDialog(int id)" is already defined) -

i have created app, in have datepicker , timepicker. first made datepicker , displayed when selected date textview, worked fine. wanted same time edittext instead of displaying datepicker supposed display timepicker when selected. after implemented code timepicker: error "protected dialog oncreatedialog(int id)" defined , cannot use method twice. any appreciated, thanks in advance i assume have 1 dialogfragment both date , time pickers... create conflict have implemented oncreatedialog. what create class each component have different implementation of oncreatedialog. public class datepickerdialog extends dialogfragment implements datepickerdialog.ondatesetlistener{ @override public dialog oncreatedialog(bundle savedinstancestate) { ... } public class timepickerdialog extends dialogfragment implements timepickerdialog.ontimesetlistener{ @override public dialog oncreatedialog(bu...

Login Failure while send message using WhatsApp api c# -

when i'm trying send message using c# api whatsapp # , handle onloginfailed event and show me message of loginfailed here's code wa.onconnectsuccess += () => { messagebox.show("connected whatsapp..."); wa.onloginsuccess += (phonenumber, data) => { wa.sendmessage(to, mes); messagebox.show("message sent..."); }; wa.onloginfailed += (data) => { messagebox.show("login failed : {0}", data); }; wa.login(); }; wa.onconnectfailed += (ex) => { messagebox.show("connection failed..."); }; wa.connect();

html - JQuery Sortable bootstrap table -

i'm trying implement jquery sortable bootstrap 3 table. works fine, when drag row position want it's not under cursor stays pixels @ top, makes hard see dragging. i'm not sure whether has stylesheet or version of jquery. html <table class="table table-bordered table-striped" id="sortable"> <thead> <tr> <th> title </th> <th> description </th> </tr> </thead> <tbody> <tr data-item-id=3 class="item"> <td> voynich manuscript </td> <td> <a class="btn btn-default pull-right" href="/things/3">show</a> </td> </tr> <tr data-item-id=1 class="item"> <td> ...

Not able to get email address from picked contact in android -

i trying pick contact using intent in android. information need name, phone no , email address of contact. following have tried far. @override public void onactivityresult(int requestcode, int resultcode, intent data) { super.onactivityresult(requestcode, resultcode, data); if (resultcode == activity.result_ok) { // check request code, might usign multiple startactivityforreslut switch (requestcode) { case result_pick_contact: contactpicked(data); break; } } } private void contactpicked(intent data) { cursor cursor = null; try { // getdata() method have content uri of selected contact uri uri = data.getdata(); //query content uri cursor = getactivity().getcontentresolver().query(uri, null, null, null, null); cursor.movetofirst(); int phoneindex = cursor.getcolumnindex(contactscontract.commondatakinds.phone.number); int nameindex = ...

My client sees grossly defective image, not what I uploaded -

obligatory research done without result. client (in state) sees pixelated image. way can replicate view zooming in ctrl + repeatedly. in brief moment, before zoom complete, see defective image. becomes clear again. asked him use computer. far, no response him. must resolve issue. i'll appreciate help. first link shows see (and see). the second link shows sees. client sent me screen capture. http://63pounders.com/faculty-biographies.php#core http://codestruggle.com/bad-image.html that's moiré pattern formed due subsampling dotted (halftone) image without blurring first. low-power viewers implement scaling way, because blurring slow. seems viewer scales way first approximation, in order react quickly, makes scaled version well. you should able fix scaling image yourself. can use responsive images retain ability scale , support high dpi.