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; | |
using System.Data; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
namespace GenericHid | |
{ | |
internal sealed partial class DeviceManagement | |
{ |
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
namespace ibuddylib { | |
public enum TorsoYaw { Middle, Left, Right }; | |
public enum WingPosition { Low, High }; | |
public enum HeadColor { Off, White, Cyan, Purple, Blue, Yellow, Green, Red }; | |
public enum HeartLight { Off, On }; | |
/// <summary> | |
/// The interface that both physical and virtual i-Buddies respond to | |
/// </summary> | |
public interface IBuddy { |
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.Web.Mvc; | |
namespace SharePirates.BuddyWeb.Controllers | |
{ | |
public interface IBuddyCommands | |
{ | |
ActionResult Flash(string color); | |
ActionResult Twist(); | |
ActionResult HeartBeat(int ms=-1); | |
ActionResult HeadColor(string color); |
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.Web.Mvc; | |
using ibuddylib; | |
namespace SharePirates.BuddyWeb.Controllers | |
{ | |
public class BuddyController : Controller, IBuddyCommands | |
{ | |
private static BuddyAnimator _animator; |
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
while($true){ | |
$error = Get-SPLogEvent -StartTime ([DateTime]::Now).Subtract([Timespan]::FromHours(1))|? { $_.Level -eq "Error" -or $_.Level -eq "Critical"} | |
if($error){ | |
[ibuddylib.BuddyManager]::Global.AnyBuddy.HeadColor = "Red"; | |
Start-Sleep -Minutes 5; | |
[ibuddylib.BuddyManager]::Global.AnyBuddy.HeadColor = "Off"; | |
} else{ |
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 class SecureController : Controller | |
{ | |
public SecureController(IMemberService memberService, ISecurityContext securityContext) : base(memberService, securityContext) | |
{ | |
} | |
} | |
public class AccountController : SecureController | |
{ | |
public AccountController(IMemberService memberService,ISecurityContext securityContext) : base(memberService,securityContext) |
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 class SecureController : Controller | |
{ | |
protected SecureController(IMemberService memberService, ISecurityContext securityContext) : base(memberService, securityContext) | |
{ | |
} | |
} | |
public class AccountController : SecureController | |
{ | |
public AccountController(IMemberService memberService,ISecurityContext securityContext) : base(memberService,securityContext) |
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
<ul class="carousel" data-role='items-list' | |
rn-carousel | |
rn-carousel-index="data.selectedIndex" | |
rn-carousel-watch | |
rn-carousel-indicator> | |
<li ng-repeat="card in data.items" ng-class="{true:'insuranceCard', false:'insuranceCard disabled'}[card.isValid]"> | |
<table> | |
<tr> | |
<td colspan="2"> | |
<h3> |
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
controller : function ($scope, $log, $stateParams, init, service) { | |
var ctrl = new slideController($scope,$log,$stateParams,init); | |
$scope.addInsuranceCard = function(){ | |
$scope.data.items.push({}); | |
} | |
$scope.removeInsuranceCard = function(card){ | |
var confirmed = confirm('Do you want to remove this item?'); | |
if(confirmed){ |
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
$scope.removeInsuranceCard = function(card){ | |
var confirmed = confirm('Do you want to remove this item?'); | |
if(confirmed){ | |
$log.debug("Removing item @"+$scope.data.selectedIndex); | |
$scope.data.items.splice($scope.data.selectedIndex,1); | |
$scope.selectedItem = $scope.data.items[$scope.data.selectedIndex]; | |
$stateParams.index = $scope.data.selectedIndex; | |
// Force GUI TO be updated when removing the item bug in the carousel | |
$state.transitionTo($state.current, $stateParams, { |
OlderNewer