Posts

java - This application may be doing too much work in its main thread -

i using following piece of code add item mysql database.when button clicked,it should begin async task uploads data server.but when run error message "this application may doing work in main thread" logcat.how can fix code problem,thanks. public class newproductactivity extends activity { // progress dialog private progressdialog pdialog; jsonparser jsonparser = new jsonparser(); edittext inputname; edittext inputprice; edittext inputdesc; // url create new product private static string url_create_product = "http://localhost/android_connect/create_product.php"; // json node names private static final string tag_success = "success"; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.add_product); // edit text inputname = (edittext) findviewbyid(r.id.inputname); inputprice = (edittext) findviewbyid(r.id.inputprice); inputdesc = (edittext) findviewbyid(r.i...

java - TextArea without scrollbars (awt) -

i'm using java.awt.textfield , annoys me vertical scrollbar on right. wondered if can disable it? found constant "scrollbars_none", guess should possible. use following constructor textarea : public textarea(string text, int rows, int columns, int scrollbars) this way can use scrollbars_none constant in last value in constructor.

ORACLE vs SQL Server from text data type point of view -

these days facing problem related text datatype differences between oracle , sql server. more comparing concatenation of chars oracle varchar column sql server. here condition: rtrim(num1) || ' ' || rtrim(num2) <> d2.num and launched oracle. where num1 & num2 varchar2 data type oracle while num varchar in sql server. i want condition false but, unfortunately true. normally, both variables have same value = '7 a' not recognized being same. i trying manually hardcoded comparison, meaning '7 a' <> d2.num false, because oracle considers values same when comparing rtrim(num1) || ' ' || rtrim(num2) '7 a', oracle consider them different. does have idea why oracle consider rtrim(num1) || ' ' || rtrim(num2) <> '7 a' true?

css - QuickSand jQuery - want to modifications some options -

i'm using quicksand right now, cant things. want create small gallery 3 categories, example: all, bus, cars. if quicksand via default setting, it's problem, cos when click categorie else image hidden. want move focus image @ top of gallery, , else bottom ( not hiding ). i have sample right there: sample . want on site sort by: name, size. categories. trying that, no result :( maybe me. best cheers! i recommend using jquery isotope because sorting function seems little more advanced you're using. quicksand seems offer filtering pretty well, sorting function seems lacking bit. example getsortdata: { symbol: function ($elem) { return $elem.attr('data-symbol'); }, category: function ($elem) { return $elem.attr('data-category'); }, number: function ($elem) { return parseint($elem.find('.number').text(), 10); }, weight: function ($elem) { ...

php - MYSQL_FREE_RESULT How to properly use? -

i have large queries on pages(about 30 fields on row). heard mysql_free_result improve memory performance. wanna ask you, how can use mysql_free_result. i did on class: // buffered query private function query($querystr) { $this->querycount++; $starttime = microtime(); $this->queryres = mysql_query($querystr, $this->conn); $this->querytime = $this->querytime + (microtime() - $starttime); if ($this->queryres) { $this->query_log($querystr,$this->querytime); } else { $this->error("sql error: " . $querystr); } return $this->queryres; $this->free_result($this->queryres); } // free result public function free_result($result) { mysql_free_result($result); } is using true? if not true, how can use properly? mysql_free_result() needs called if concerned how memory bein...

cordova - PhoneGap iOS oAuth redirect failing (NSURLErrorDomain error -999.) -

meteorjs: https://github.com/zeroasterisk/presenteract phonegap: https://github.com/zeroasterisk/presenteract-phonegap-ios i running meteorjs application inside phonegap 2.7 on ios. the meteorjs application loaded via external url, setup in config.xml <content src="http://presenteract.meteor.com" /> i have no problems oauth within browser the access config setup full wildcard <access origin="*" /> the application works well, identical browser version of it.... but when attempt oauth within phonegap, end following error: failed load webpage error: operation couldn’t completed. (nsurlerrordomain error -999.) (note: oauth attempts google, facebook, , twitter same. loads external site, login proceeds normal, , upon redirect application's main url) i have looked through other stackoverflow reports , done googeling... useful 1 found is: facebook dialog failed error: operation couldn’t completed. (nsurlerrordomain error -999.) ...

contravariance - Real World Use of the keyword In in .NET Framework -

i have accidentally come across keyword "in". read article on msdn - in (generic modifier) (c# reference) still don't quite understand why useful. can provide real world example show reason why keyword "in" useful? thanks.