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 FUNCTION dbo.Split(@String varchar(8000), @Delimiter char(1)) | |
returns @temptable TABLE (items varchar(8000)) | |
as | |
begin | |
declare @idx int | |
declare @slice varchar(8000) | |
select @idx = 1 | |
if len(@String)<1 or @String is null 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
//<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> |
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
//<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
jQuery(document).ready(function($) { | |
ExecuteOrDelayUntilScriptLoaded(function () {sharePointReady();}, "sp.js"); | |
}); | |
function sharePointReady(){ | |
var website = "http://sp.local"; | |
var list = "Mis Contactos"; | |
var pais = "Peru"; | |
getItemsByPais(website, list, pais); |
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 updateListItem(listName, id,title) { | |
var ctx = new SP.ClientContext(); | |
var oList = ctx.get_web().get_lists().getByTitle(listName); | |
var olistItem = oList.getItemById(id); | |
olistItem.set_item("Title", title); | |
olistItem.update(); | |
ctx.load(olistItem); | |
ctx.executeQueryAsync( | |
function () { | |
console.log('updated success'); |
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
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script> | |
$(document).ready(function () { | |
ExecuteOrDelayUntilScriptLoaded(function(){sharePointReady();}, "sp.js"); | |
}); | |
function sharePointReady(){ | |
var list = "MisContactos"; | |
var id = 4; | |
$("#delete").click(function(){ |
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
<script> | |
ExecuteOrDelayUntilScriptLoaded(PageLoad, "sp.js"); | |
function PageLoad() { | |
debugger; | |
this.ctx = SP.ClientContext.get_current(); | |
this.web = ctx.get_web(); | |
this.ctx.load(this.web); | |
ctx.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); | |
} | |
function onQuerySucceeded() { |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.01/jquery.SPServices.min.js"></script> | |
<script type="text/javascript" language="javascript"> | |
$(document).ready(function() { | |
$().SPServices({ | |
operation: "GetListItems", | |
async: false, | |
listName: "MisContactos", | |
CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>", | |
completefunc: function (xData, Status) { |
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
$farm = Get-SPFarm | |
$file = $farm.Solutions.Item("extendeddiagnosticproviders.wsp").SolutionFile | |
$file.SaveAs("c:\temp\extendeddiagnosticproviders.wsp") |
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
#Habilitar | |
$svc=[Microsoft.SharePoint.Administration.SPWebService]::ContentService | |
$ddsetting=$svc.DeveloperDashboardSettings | |
$ddsetting.DisplayLevel=[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand | |
$ddsetting.Update() | |
#Deshabilitar | |
$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService | |
$addsetting =$service.DeveloperDashboardSettings |
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
/** | |
* Created by jagp on 11/10/2014. | |
*/ | |
var TrafficLight = function () { | |
var count = 0; | |
var currentState = new Red(this); | |
this.change = function (state) { | |
// limits number of changes | |
if (count++ >= 10) return; |