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
{ | |
"version": 3, | |
"status": "ok", | |
"response": { | |
"data": [ | |
{ | |
"address": "1131 Folsom St", | |
"category_ids": [ | |
358, | |
348, |
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
//addtl info at https://github.com/johncadengo/JCWindowShade/blob/master/JCWindowShade/JCViewController.m#L137 | |
var dragging = false; | |
contentView.AddGestureRecognizer (new UIPanGestureRecognizer ((pan) => { | |
if (dragging){ | |
var origin = pan.LocationInView(View); | |
Console.WriteLine ("dragging at {0}", origin); | |
var translated = pan.TranslationInView(contentView); | |
var cf = contentView.Frame; |
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
var newPosition = newMarker.Spec.GeoPoint; | |
var camera = mapView.Camera; | |
mapView.CameraPositionIdle += MapAnimateForSwipeComplete; | |
CATransaction.Begin (); | |
CATransaction.AnimationDuration = 2.0; | |
mapView.Animate (CameraUpdate.SetTarget (newPosition.ToCLLocationCoordinate2D (), camera.Zoom - 1)); | |
CATransaction.Commit (); |
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
var centerImg = new UIImageView (UIImage.FromBundle ("findme_fab")); | |
centerImg.Frame = new RectangleF ( | |
centerX - (centerImg.Frame.Width / 2) , | |
centerY - centerImg.Frame.Height - 20 , | |
centerImg.Frame.Width , | |
centerImg.Frame.Height); | |
var animation = CABasicAnimation.FromKeyPath("transform.rotation.z"); | |
animation.From = NSNumber.FromFloat (0.0f); | |
animation.To = NSNumber.FromFloat (2f * (float)Math.PI); | |
animation.Duration = 1f; |
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
var pulseAnimation = CABasicAnimation.FromKeyPath ("transform.scale"); | |
pulseAnimation.Duration = 0.15; | |
pulseAnimation.To = NSNumber.FromFloat(1.5f); | |
pulseAnimation.TimingFunction = CAMediaTimingFunction.FromName(CAMediaTimingFunction.EaseInEaseOut); | |
pulseAnimation.AutoReverses = true; | |
pulseAnimation.RepeatCount = 2; | |
_upvoteView.Layer.AddAnimation (pulseAnimation, "scalepulse"); |
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
var status = AVCaptureDevice.GetAuthorizationStatus (AVMediaType.Video); | |
if (status == AVAuthorizationStatus.Authorized) { | |
//yay | |
} else if (status == AVAuthorizationStatus.NotDetermined) { | |
AVCaptureDevice.RequestAccessForMediaType (AVMediaType.Video, (bool accessGranted) => { | |
if (accessGranted) { | |
//yay | |
} else { | |
//boo |
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
SELECT name, avg_fragmentation_in_percent | |
FROM sys.dm_db_index_physical_stats ( | |
DB_ID(N'PrePurchasing') | |
, OBJECT_ID('PrePurchasing') | |
, NULL | |
, NULL | |
, NULL) AS a | |
JOIN sys.indexes AS b | |
ON a.object_id = b.object_id AND a.index_id = b.index_id; |
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
SELECT | |
avg(avg_cpu_percent) AS 'Average CPU Percentage Used', | |
max(avg_cpu_percent) AS 'Maximum CPU Percentage Used', | |
avg(avg_physical_data_read_percent) AS 'Average Physical IOPS Percentage', | |
max(avg_physical_data_read_percent) AS 'Maximum Physical IOPS Percentage', | |
avg(avg_log_write_percent) AS 'Average Log Write Percentage', | |
max(avg_log_write_percent) AS 'Maximum Log Write Percentage', | |
--avg(avg_memory_percent) AS 'Average Memory Used Percentage', | |
--max(avg_memory_percent) AS 'Maximum Memory Used Percentage', | |
avg(active_worker_count) AS 'Average # of Workers', |
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
SELECT name, OBJECT_NAME(a.object_id), avg_fragmentation_in_percent, | |
'ALTER INDEX ' + b.name + ' ON ' + OBJECT_NAME(a.object_id) +' REBUILD WITH (STATISTICS_NORECOMPUTE = ON)' as command | |
FROM sys.dm_db_index_physical_stats ( | |
DB_ID(N'PrePurchasing') | |
, OBJECT_ID('PrePurchasing') | |
, NULL | |
, NULL | |
, NULL) AS a | |
JOIN sys.indexes AS b | |
ON a.object_id = b.object_id AND a.index_id = b.index_id |