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 Sub ListVerweisAktualisieren(ListControl As Control, TableName As String, TableLinkName As String, Values As Variant, IDDataSet As String, IDDataSetName As String, LinkDataSetName As String) | |
Dim db As DAO.Database | |
Set db = CurrentDb | |
Dim AnzahlItems As Integer | |
AnzahlItems = ListControl.ListCount | |
Dim ValueIndex As Integer | |
ValueIndex = 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
Public Sub VerweisErstellen(TableVerw As String, IDSource As String, IDSourceValue As Integer, IDDest As String, IDDestValue As Integer) | |
Dim db As DAO.Database | |
Set db = CurrentDb | |
'Delete of all Register data in link table | |
db.Execute "DELETE * FROM " & TableVerw & " WHERE " & IDSource & " = " & IDSourceValue, dbFailOnError | |
'Link the Register to the selected value | |
db.Execute "INSERT INTO " & TableVerw & " (" & IDSource & "," & IDDest & " ) VALUES(" & IDSourceValue & ", " & IDDestValue & ")" |
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
#Rewerite canonical URL | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^snippetdb.com$ | |
RewriteRule (.*) http://www.snippetdb.com$1 [R=301] | |
#.htaccess rewrite examples should begin with: ^ | |
Options +FollowSymLinks | |
RewriteEngine On |
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
<!-- Meta windows tile icon --> | |
<meta name="msapplication-TileColor" content="#123456"/> | |
<meta name="msapplication-TileImage" content="your_logo.png"/> | |
<!-- Meta Apple touch icon --> | |
<link rel="apple-touch-icon" href="/apple-touch-icon.png" /> | |
<link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png" /> |
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
# Check for executeable | |
if ((Get-Command "cmdkey.exe") -and (Get-Command "mstsc.exe")) { } | |
# Execute with Powershell version 2 instead of version 3 and higher | |
if($Host.Version.Major -gt 2){ | |
powershell -Version 2 $MyInvocation.MyCommand.Definition | |
exit | |
} | |
# only powershell 2 and higher |
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
<# | |
$Metadata = @{ | |
Title = "" | |
Filename = "" | |
Description = "" | |
Tags = "" | |
Project = "" | |
Author = "Janik von Rotz" | |
AuthorContact = "http://janikvonrotz.ch" | |
CreateDate = "yyyyy-mm-dd hh:mm" |
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
<# | |
.SYNOPSIS | |
Sends a default error Report based on the PowerShell Profile configurations. | |
.DESCRIPTION | |
Sends a default error Report based on the PowerShell Profile configurations. | |
.PARAMETER FileName | |
The description of the ParameterA parameter. |
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
Get-SPsite -Limit all | %{ | |
$_ | Get-SPWeb -Limit all | %{ | |
$_.Lists | %{ | |
$_ | |
} | |
} | |
} |
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
# import all mdoules | |
Get-Module -ListAvailable | Import-Module | |
# show module commands | |
Get-Command –Module grouppolicy | |
#--------------------------------------------------# | |
# SharePoint | |
#--------------------------------------------------# | |
if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"} |
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
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition') |