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
public static class CSV | |
{ | |
public static string ToCSV(this DataTable table) | |
{ | |
var columnHeaders = (from DataColumn x in table.Columns | |
select x.ColumnName).ToArray(); | |
StringBuilder builder = new StringBuilder(String.Join(",", columnHeaders)); | |
builder.Append("\n"); | |
foreach (DataRow row in table.Rows) |
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
extension UIViewController { | |
func trackScreen(name: String) { | |
let tracker = GAI.sharedInstance().defaultTracker | |
tracker.set(kGAIScreenName, value: name) | |
let builder = GAIDictionaryBuilder.createScreenView() | |
tracker.send(builder.build() as [NSObject : AnyObject]) | |
} | |
func trackEvent(category: String, action: String, label: String, value: NSNumber?) { |