This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* index performance */ | |
SELECT | |
relname, | |
100 * idx_scan / (seq_scan + idx_scan) percent_of_times_index_used, | |
n_live_tup rows_in_table | |
FROM | |
pg_stat_user_tables | |
WHERE | |
seq_scan + idx_scan > 0 | |
ORDER BY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
#if MONODROID | |
using Android.Telephony; | |
#endif | |
#if MONOTOUCH | |
using MonoTouch.Foundation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Drawing; | |
using MonoTouch.CoreAnimation; | |
using MonoTouch.CoreGraphics; | |
using MonoTouch.Foundation; | |
using MonoTouch.ImageIO; | |
using MonoTouch.UIKit; | |
namespace PuppyKittyOverflow.Touch | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH table_scans as ( | |
SELECT relid, | |
tables.idx_scan + tables.seq_scan as all_scans, | |
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes, | |
pg_relation_size(relid) as table_size | |
FROM pg_stat_user_tables as tables | |
), | |
all_writes as ( | |
SELECT sum(writes) as total_writes | |
FROM table_scans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using MonoTouch.UIKit; | |
namespace ViewEffectsDemo | |
{ | |
public class EffectsController : UIViewController | |
{ | |
UIImageView imageView; | |
UIScrollView scrollView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Open native app through iframe so that mobile safari "invalid address" warnings be suppressed when the app is not installed. | |
* `window.location=url` will not open native app in the iframe of android chrome | |
* Android will go to the next page even if the url scheme is not supported | |
*/ | |
function openApp (url) { | |
if (window.chrome && navigator.userAgent.search(/\bChrome\b/)!=-1) { | |
window.location = url; | |
} else { |