Posts

postgresql - What's the unit of buffers_checkpoint in pg_stat_bgwriter table? -

i'm using postgresql-9.1.6 , trying build monitoring application postgresql server. i'm planning select physical , logical i/o stat pg_stat_* information tables. according manual unit of fields in pg_stat_database block means size of 8kb . postgres=# select * pg_stat_database datname='postgres'; -[ record 3 ]-+------------------------------ datid | 12780 datname | postgres numbackends | 2 xact_commit | 974 xact_rollback | 57 blks_read | 210769 blks_hit | 18664177 tup_returned | 16074339 tup_fetched | 35121 tup_inserted | 18182015 tup_updated | 572 tup_deleted | 3075 conflicts | 0 i figure out size of physical read usging blks_read * 8kb. however, there no comments on unit of stats in pg_stat_bgwriter . postgres=# select * pg_stat_bgwriter; -[ record 1 ]---------+------------------------------ checkpoints_timed | 276 checkpoints_req | 8 buffers_checkpoint | 94956 buffers_clean | 0 maxwrit...

javascript - How to remove index.html from url on website based on angularjs -

i didn't find way remove index.html url, because looks ugly. mydomain.com/index.html#/myview1 mydomain.com/index.html#/myview2 is there way remove part, url clear user is. mydomain.com/myview1 mydomain.com/myview2 tnx in advance time. edit: find way work like: mydomain.com/#/myview1 mydomain.com/#/myview2 which pretty better index.html. but still if there way shorter solution let me know. maybe approach help: add $locationprovider.hashprefix(); , removes index.html in url, in app.js config. don't forget add new dependency. after app.js similar this: angular.module('myapp', [ 'ngroute' ]). config(['$locationprovider', '$routeprovider', function($locationprovider, $routeprovider) { $locationprovider.hashprefix(); // removes index.html in url $routeprovider.otherwise({redirectto: '/someroute'}); }]); note not remove hashtag. can find new route at: .../app/#/someroute

python - wxgrid cell renderer set col size -

i made class whic extends pygridcellrenderer , can set size of columns self.colsize = some_size, sets same size columns, how can set size specific column? try this: setcellsize(row, col, num_rows, num_cols); thissets cell @ coordinates row, col flow on num_rows rows , num_col columns. if not want , want work pixel then: setcolsize(col, width); setrowsize(row, height); you can determine current size of row or column using : getcolsize(col) getrowsize(row) let me know if not work.

asp.net mvc - Format BalloonText with amCharts.AmGraph jquery -

i trying format tag [[value]] in balloontext using amcharts , jquery. need show number tag [[value]] without decimals , thousand comma separator, example 64578 64,578. how can format balloontext? thanks!. // creates graph , adds actual chart var creategraph = function (title, valuefield, color, unit) { try { var graph = new amcharts.amgraph(); graph.title = title; graph.labeltext = "[[value]]"; graph.balloontext = title + " of [[value]] " + unit + " \nrepresents [[percents]]% of total [[category]]"; graph.valuefield = valuefield; graph.type = "column"; graph.linealpha = 1; graph.fillalphas = 0.6; graph.linecolor = color; chart.addgraph(graph); } catch (err) { showmodalmessage("error in creategraph() method: " + err); } } you should set chart.numberformatter = {precision:0, decimalseparator:'.', thousandsseparator:','...

ios - UTF8 encoding in NSString -

i used following code encode unicode character "\u1000" utf8 encoding. nsstring *unicodestring = @"\u1000"; nslog(@"%s", [unicodestring utf8string]); the expected result \u00e1\u0080\u0080 getting \u00b7\u00c4\u00c4. am missing here?

javascript - My app crashes with a java.lang.IllegalArgumentException -

i crash report every few weeks java.lang.illegalargumentexception , don't know start looking. have never had app crash while testing far can tell app gets opened around 300 times week crash doesn't happen still fix it. says on dialog dismissal have multiple dialogs in app. can 1 tell me more crash report means , how arrived @ conclusion? java.lang.illegalargumentexception: view not attached window manager @ android.view.windowmanagerglobal.findviewlocked(windowmanagerglobal.java:402) @ android.view.windowmanagerglobal.removeview(windowmanagerglobal.java:304) @ android.view.windowmanagerimpl.removeview(windowmanagerimpl.java:79) @ android.app.dialog.dismissdialog(dialog.java:325) @ android.app.dialog$1.run(dialog.java:120) @ android.os.handler.handlecallback(handler.java:725) @ android.os.handler.dispatchmessage(handler.java:92) @ android.os.looper.loop(looper.java:137) @ android.app.activitythread.main(activitythread.java:5293) @ java.lang.reflect.method.invokenative(...

javascript - Change background of navigation on change of section in single page website -

i have keep background of navigation on "home" section transparent. when viewport change on selection of other sections. background color of navigation permanent black. <header class="clearfix"> <nav> <a href="#fbsection1">home</a> <a href="#fbsection2">about us</a> <a href="#fbsection3">events</a> <a href="#fbsection4">contact us</a> </nav> </header> here fiddle as understand it, want header background change based on section of site user on, correct? look @ jquery waypoints plugin -- allows dynamically set classes elements based on scroll position. see here: http://imakewebthings.com/jquery-waypoints/#about or, if want pure css solution, take @ following codepen: http://cdpn.io/kftam you use separate element background , use z-index layer these things correctly. have black background element z-index of...