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
// I2C Scanner | |
// Written by Nick Gammon | |
// Date: 20th April 2011 | |
#include <Wire.h> | |
void setup() { | |
Serial.begin (115200); | |
Serial.println (); |
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
// assuming that sTitle = a string of the title | |
'<Where><Eq><FieldRef Name="Title" /><Value Type="Text">' + sTitle + '</Value></Eq></Where>'; |
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
static void SCRAPcopySomeFilesWithVersions(SPListItem srcItem, SPList destList) | |
{ | |
SPFile oFileSrc = srcItem.File; | |
//Console.WriteLine(oFileSrc.Title.ToString()); | |
byte[] srcByteArray = null; | |
SPFile SPFileDestination = null; | |
SPFileCollection collFilesDest = destList.RootFolder.Files; | |
SPTimeZone timezone = destList.ParentWeb.RegionalSettings.TimeZone; |
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 http = require("http"); | |
http.createServer(function(request, response) { | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.write("Hello World"); | |
response.end(); | |
}).listen(8888); |
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
#Create a standard SPWeb object with admin credentials | |
$spweb = get-spweb http://url | |
#grab the user you want to instanciate under | |
$usr = $spweb.allusers | ? {$_.displayname -like "User Name"} | |
#make the user token accessable | |
$token = $usr.UserToken |
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 IN A MODAL DIALOG | |
$(".ms-dlgFrame").contents().find('td.ms-formlabel:contains("Hospital")').siblings('.ms-formbody').text().length; | |
OTHERWISE: |
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
function CloseCallback(result, target) | |
{ | |
if(result === SP.UI.DialogResult.OK) | |
{ | |
$('#canceledDiv').hide(); | |
$('#displayDiv').hide(); | |
$('#thankYouDiv').show(); | |
//window.location.replace("http://stackoverflow.com"); | |
} | |
if(result === SP.UI.DialogResult.cancel) |
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
$web = Get-SPWeb http://demo2010a:20905 | |
$pages = "http://demo2010a:20905/Pages/TvAndRadioAlerts.aspx","http://demo2010a:20905/Pages/Systems.aspx" | |
$pages | ForEach-Object { | |
$item = $web.GetListItem($_) | |
if ($item.File.CheckOutType -ne "None") | |
{ | |
$item.File.CheckIn("Automatically checked in by Powershell", "MajorCheckIn"); | |
} | |
if ($item.Versions[0].Level -ne "Published") | |
{ |
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
While ((Get-SPTimerJob | ?{ $_.Name -like "*solution-deployment*" }) -ne $null) {Write-Host -NoNewLine .;Start-Sleep -s 2} |
OlderNewer