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 printJavascriptArrayOfPropsAsAngularScopeAssignment = function (longArrayOfProperties, useOneTimeBindingSyntax) { | |
/// <summary>Takes a long list of properties, strips the names, | |
/// creates angular.js assignments/ bindings and outputs to console for copy+paste | |
/// | |
/// - If you have an array of Json data, use angular.fromJson(jsonString) or JSON.parse(jsonString) first to get it in the right format | |
/// View the output in your javascript console (e.g. in Chrome) | |
/// Example Input -> var myProps = { myProperty1: 3, MyProperty2: 'Dave' }; | |
/// Example Output | |
/// $scope.myProperty = inputData.myProperty; | |
/// $scope.myProperty2 = inputData.MyProperty2; |
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
// Usage | |
// {{myIntValue | number:0 | replacestringfilter:',':'.'}} | |
// {{myStringValue | replacestringfilter:'ABC':'DEF'}} | |
myApp.filter('replacestringfilter', function () { | |
return function (item, oldstring, newstring) { | |
if (!item) | |
return item; | |
var sItem = item.toString(); | |
var find = oldstring; | |
var re = new RegExp(find, 'g'); |
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; | |
namespace TestConsole | |
{ | |
public interface IProcessor | |
{ |
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
/** | |
* The seekbars min value cannot be changed in the sdk. It has to be zero | |
* Total = 240seconds represented | |
* Start Value = 30 seconds | |
* Each interval of the seekbar = 5 seconds. | |
* <SeekBar | |
android:id="@+id/settings_seekbar_time_interval" | |
android:layout_span="2" | |
android:minWidth="200dp" | |
android:max="42" |
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
// This might need tweaking for uppercase/lowercase comparisons | |
// Source - Javscript: The Good Parts, by Douglas Crockford | |
var by = function (name, minor) { | |
// Array sorting | |
// myArray.sort(by('FirstName', by('LastName'))); | |
return function (o, p) { | |
var a, b; | |
if (typeof o === 'object' && typeof p === 'object' && o && p) { | |
a = o[name]; |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>IP Address</title> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> | |
<link rel="stylesheet" href="css/styles.css?v=1.0"> | |
<script> |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title></title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/> | |
<link rel="stylesheet" href=""/> | |
<!-- http://qnimate.com/javascript-scroll-by-dragging/ --> |
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
// Calling client | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string answer = ""; | |
//string baseUrl = "http://localhost:56539/"; | |
string baseUrl = "http://169.254.80.80/winauth/"; |
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
Add-PSSnapin Microsoft.TeamFoundation.PowerShell | |
# This file requires the TFS Power Tools (2015+). When installing, you must select Custom Installation and select PowerShell Cmdlets | |
# *VSTS Login* | |
# YOU MUST go to 'Options' and turn on 'Allow scripts to access OAuth token' for the buld | |
$url = "$($env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$env:SYSTEM_TEAMPROJECTID/_apis/build/definitions/$($env:SYSTEM_DEFINITIONID)?api-version=2.0" | |
Write-Host "URL: $url" | |
$definition = Invoke-RestMethod -Uri $url -Headers @{ | |
Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN" | |
} |
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
Add-PSSnapin Microsoft.TeamFoundation.PowerShell | |
#Add-Type -Path "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Client.dll" | |
# *VSTS Load Above* Load the TFS powershell | |
# NOTE: Must allow build to access tokens in the options | |
Clear-Host | |
$buildToStart = "My-Build-Name e.g. Test - CLI" | |
$newLine = [System.Environment]::NewLine |
OlderNewer