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 clippy={};clippy.Agent=function(a,b,c){this.path=a,this._queue=new clippy.Queue($.proxy(this._onQueueEmpty,this)),this._el=$('<div class="clippy"></div>').hide(),$(document.body).append(this._el),this._animator=new clippy.Animator(this._el,a,b,c),this._balloon=new clippy.Balloon(this._el),this._setupEvents()},clippy.Agent.prototype={gestureAt:function(a,b){var c=this._getDirection(a,b),d="Gesture"+c,e="Look"+c,f=this.hasAnimation(d)?d:e;return this.play(f)},hide:function(a,b){this._hidden=!0;var c=this._el;this.stop();if(a){this._el.hide(),this.stop(),this.pause(),b&&b();return}return this._playInternal("Hide",function(){c.hide(),this.pause(),b&&b()})},moveTo:function(a,b,c){var d=this._getDirection(a,b),e="Move"+d;c===undefined&&(c=1e3),this._addToQueue(function(d){if(c===0){this._el.css({top:b,left:a}),this.reposition(),d();return}if(!this.hasAnimation(e)){this._el.animate({top:b,left:a},c,d);return}var f=$.proxy(function(e,f){f===clippy.Animator.States.EXITED&&d(),f===clippy.Animator.States.WAITING&&th |
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
Function Rename-SQLDatabase { | |
param ( | |
[string] $ServerName, | |
[string] $SourceDb, | |
[string] $DestDb | |
) | |
$connection = New-Object System.Data.SqlClient.SqlConnection | |
$command = New-Object System.Data.SqlClient.SqlCommand |
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
$configType = read-host "Do you wish to create a new farm? (Y/N)" | |
if ($ConfigType -eq "N") { | |
$DatabaseServer = read-host "Preparing to join existing farm. Please specify the name of your SQL Server"; | |
$ConfigDB = read-host "Next, specify the name of your Farm Configuration Database"; | |
$Passphrase = read-host "Finally, please enter your Farm passphrase" -assecurestring | |
if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) { | |
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue; | |
} |
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.Web; | |
namespace System.Web.Routing | |
{ | |
public class HttpHandlerRoute : IRouteHandler | |
{ | |
private String _virtualPath = null; |
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 double Calculate(double sLatitude,double sLongitude, double eLatitude, | |
double eLongitude) | |
{ | |
var sLatitudeRadians = sLatitude * (Math.PI / 180.0); | |
var sLongitudeRadians = sLongitude * (Math.PI / 180.0); | |
var eLatitudeRadians = eLatitude * (Math.PI / 180.0); | |
var eLongitudeRadians = eLongitude * (Math.PI / 180.0); | |
var dLongitude = eLongitudeRadians - sLongitudeRadians; | |
var dLatitude = eLatitudeRadians - sLatitudeRadians; |
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 Behavior | |
{ | |
//Branch | |
public static Action Selector(Func<bool> cond, Action ifTrue, Action ifFalse) { | |
return () => { if (cond()) { ifTrue(); } else { ifFalse(); } }; | |
} | |
public static Action Sequencer(Action a, Action b) { | |
return () => { a(); b(); } | |
} |
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
First you define some data. This will be the data that will define how one player differs to another. | |
class PlayerDetails { | |
var TotalHP : float = 100.0; | |
var HP : float = 100.0; | |
var EXP : int = 0; | |
var jumpSpeed:float = 8.0; | |
var runSpeed:float = 5.0; | |
var attackSpeed: float = 1.0; |
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
//In SP Header template xslt have you ever noticed the attribute mode | |
<xsl:template name="someTemplateName" match="*[@GroupStyle='someTemplateName']" mode="header"> | |
//well there is another option mode="footer" now by default it isnt hooked up so you need to copy CallHeaderTemplate or modify CallFooterTemplate to the following: | |
<xsl:template name="OuterTemplate.CallFooterTemplate"> | |
<xsl:value-of disable-output-escaping="yes" select="$EndList" /> | |
<xsl:apply-templates select="." mode="footer"> | |
</xsl:apply-templates> | |
<xsl:value-of disable-output-escaping="yes" select="$EndListItem" /> |
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 ContentDisplayWebPart : ContentByQueryWebPart | |
{ | |
protected override void OnLoad(EventArgs e) | |
{ | |
base.OnLoad(e); | |
string headerlink = "/Style%20Library/XSL%20Style%20Sheets/CustomXsl/______.xsl"; | |
string itemlink = "/Style%20Library/XSL%20Style%20Sheets/CustomXsl/______.xsl"; | |
if (this.HeaderXslLink != headerlink) { this.HeaderXslLink = headerlink; } | |
if (this.ItemXslLink != itemlink) { this.ItemXslLink = itemlink; } | |
if (this.CommonViewFields != (string)HttpContext.Current.Cache[this.Title + "_CommonViewFields"]) |
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
@echo off | |
@echo Stopping SharePoint 2010 services... | |
iisreset /stop /noforce | |
net stop "SharePoint 2010 User Code Host" | |
net stop "SharePoint 2010 Timer" |
NewerOlder