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
<?php | |
/* | |
Plugin Name: Plugin práctica 1 | |
Plugin URI: http://www.whatsgoingon.es/ | |
Version: 0.1 | |
Author: scar Andreu Martínez | |
Description: Plugin como práctica docente. | |
License: GPL2 | |
*/ | |
/* Copyright 2012 Óscar Andreu (email : oscarandreu at gmail dot com) |
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
<?php | |
/* | |
Plugin Name: Plugin práctica 2 | |
Plugin URI: http://www.whatsgoingon.es/ | |
Version: 0.1 | |
Author: Óscar Andreu Martínez | |
Description: Plugin como práctica docente. | |
License: GPL2 | |
*/ | |
/* Copyright 2012 Óscar Andreu (email : oscarandreu at gmail dot com) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Class regions</Title> | |
<Author>Óscar Andreu</Author> | |
<Description>Build the structure of a new class.</Description> | |
<Shortcut>Class_Regions</Shortcut> | |
</Header> | |
<Snippet> |
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
/** | |
* Clear all the elements of an array/object without changing the reference, this must be used in objects binded | |
* instead of: | |
* obj = {} | |
* This assignments change the reference of the object (pointer) because they create a new object, with this method this can be avoided. | |
*/ | |
$this.clearObject = function(obj){ | |
var keys = Object.keys(obj); | |
for (var i = 0; i < keys.length; i++) { | |
delete obj[keys[i]]; |
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 TABLE #LINKED | |
( | |
SRV_NAME nvarchar(100) | |
,SRV_PROVIDERNAME nvarchar(100) | |
,SRV_PRODUCT nvarchar(100) | |
,SRV_DATASOURCE nvarchar(100) | |
,SRV_PROVIDERSTRING nvarchar(100) | |
,SRV_LOCATION nvarchar(100) | |
,SRV_CAT nvarchar(100) |
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 TABLE #LINKED | |
( | |
SRV_NAME nvarchar(100) | |
,SRV_PROVIDERNAME nvarchar(100) | |
,SRV_PRODUCT nvarchar(100) | |
,SRV_DATASOURCE nvarchar(100) | |
,SRV_PROVIDERSTRING nvarchar(100) | |
,SRV_LOCATION nvarchar(100) | |
,SRV_CAT nvarchar(100) |
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 TABLE #LINKED | |
( | |
SRV_NAME nvarchar(100) | |
,SRV_PROVIDERNAME nvarchar(100) | |
,SRV_PRODUCT nvarchar(100) | |
,SRV_DATASOURCE nvarchar(100) | |
,SRV_PROVIDERSTRING nvarchar(100) | |
,SRV_LOCATION nvarchar(100) | |
,SRV_CAT nvarchar(100) | |
) |
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 TABLE #LINKED | |
( | |
SRV_NAME nvarchar(100) | |
,SRV_PROVIDERNAME nvarchar(100) | |
,SRV_PRODUCT nvarchar(100) | |
,SRV_DATASOURCE nvarchar(100) | |
,SRV_PROVIDERSTRING nvarchar(100) | |
,SRV_LOCATION nvarchar(100) | |
,SRV_CAT nvarchar(100) | |
) |
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
$folder = (dir 'C:\Resources\Directory' | ? {$_.PSIsContainer -eq $True}) | |
$objFSO = New-Object -com Scripting.FileSystemObject | |
foreach ($folder in $folders){ | |
if($folder.Name -match 'ImageResizerOutputCache'){ | |
$dir = 'C:\Resources\Directory\'+ $folder.Name + '\*' | |
$size = $objFSO.GetFolder($folder.FullName).Size | |
$size /= 1024#1073741824#1048576#1024 | |
if($size -gt 6000){ |
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 edge = require('edge'); | |
var params = { | |
connectionString: "Data Source=xxx-yyy-zzz\instance;Initial Catalog=fooCatalog;Integrated Security=True", | |
source: "SELECT * FROM foobar" | |
}; | |
var testQuery = edge.func("sql", params); | |
testQuery(null, function (error, result) { |
OlderNewer