This file contains hidden or 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 C = System.Console; | |
namespace Tafe120.Console | |
{ | |
/// <summary> | |
/// Base class for a command line interface |
This file contains hidden or 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 the devices portal and run this in chrome console | |
var rows = $('#grid-table tr'); | |
rows.each(function(i,val) { | |
var udid = $(val).find('td[aria-describedby=grid-table_deviceNumber]').html(); | |
var name = $(val).find('td[aria-describedby=grid-table_name]').html(); | |
console.log(udid + '\t' + name); | |
}); |
This file contains hidden or 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
<form action="#" id="courseGuideForm" method="post"> | |
<input type="hidden" name="X-Requested-With" value="XMLHttpRequest" /> | |
<input type="text" name="Name" value="" /> | |
<input type="text" name="Email" value="" /> | |
<input type="button" class="submitButton" value="Get Your Guide Now" /> |
This file contains hidden or 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
#!/bin/sh | |
grep -i -r --include=*.xib "$1" . |
This file contains hidden or 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
if (ApiErrorCodeChecker.isCommon(code)) { | |
final boolean shouldLogout = ApiErrorCodeChecker.doesRequireLogout(code); | |
final boolean shouldShowMessage = ApiErrorCodeChecker.shouldShowMessage(code); | |
final boolean shouldGoUnderMaintenance = code == ApiErrorCode.UnderMaintenance; | |
if (shouldShowMessage) { | |
if (shouldLogout || shouldGoUnderMaintenance) { | |
// On pressing Ok, user should be shown the "Service unavailable" message or the user should be logged out | |
AlertDialogHelper.showOk(context, result.getMessage(), new OnClickListener() { |
This file contains hidden or 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
#define UA_invalidateTimer(t) [t invalidate]; t = nil; | |
#define UA_isIPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) | |
#define UA_isIPhone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) | |
#define UA_isRetinaDevice ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] && [[UIScreen mainScreen] scale] >= 2) | |
#define UA_isMultiTaskingSupported ([[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)] && [[UIDevice currentDevice] isMultitaskingSupported]) | |
#define UA_runOnMainThread if (![NSThread isMainThread]) { dispatch_sync(dispatch_get_main_queue(), ^{ [self performSelector:_cmd]; }); return; }; |
This file contains hidden or 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; | |
using C = System.Console; | |
using System.IO; | |
using System.Net; | |
namespace Commands |
This file contains hidden or 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
$('.table-itc-testers tr.ng-scope').each(function(i,val) { | |
var el = $(val); | |
var email = el.find('td:nth-child(2)').find('span:first').text() | |
//console.log(email) | |
var name = el.find('td:nth-child(3)').find('span:first').text(); | |
console.log(name + ','+email); | |
}); |
This file contains hidden or 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 text = ''; | |
$('.itc-tester-view tbody tr').each(function(index, el) { | |
var email = el.querySelector('td:nth-child(2) span:first-child').innerText; | |
var name = el.querySelector('.sorted > span').innerText.split(' '); | |
text = text + name[0] + ', ' + name[1] + ', ' + email+'\n'; | |
}); | |
var a = document.createElement("a"); | |
var file = new Blob([text], {type: 'text/csv'}); | |
a.href = URL.createObjectURL(file); |
This file contains hidden or 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
import UIKit | |
struct Person { | |
let name: String | |
let city: String | |
} | |
let people = [ | |
Person(name: "Chris", city: "Berlin"), | |
Person(name: "Natasha", city: "Tokyo"), |