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
| Update-VMVersion -VMName <VMName> |
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
| # Set VM Folder | |
| New-Item -Path "E:\Hyper-V" -ItemType Directory | |
| Set-VMHost -VirtualHardDiskPath 'E:\Hyper-V' | |
| Set-VMHost -VirtualMachinePath 'E:\Hyper-V' | |
| # Create an Internal Network | |
| New-VMSwitch -name InternalSwitch -SwitchType Internal |
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
| Get-WindowsFeature *Hyper-V* | |
| Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart |
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 Write-FormattedOutput | |
| { | |
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$True,Position=1,ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True)][Object] $Object, | |
| [Parameter(Mandatory=$False)][ConsoleColor] $BackgroundColor, | |
| [Parameter(Mandatory=$False)][ConsoleColor] $ForegroundColor | |
| ) | |
| # save the current color |
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 Write-Messages | |
| { | |
| [CmdletBinding()] | |
| param() | |
| Write-Host "Host message" | |
| Write-Output "Output message" | |
| } | |
| # Run with: |
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 Write-Messages | |
| { | |
| [CmdletBinding()] | |
| param( | |
| [string]$warningFilePath = "C:\Temp\warning.txt", | |
| [string]$errorFilePath = "C:\Temp\error.txt" | |
| ) | |
| Write-Host "Host message" |
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
| param($ProjectDir) | |
| $TargertDir = $env:LOCALAPPDATA + "\Totem" | |
| $OrigineRisorse = $ProjectDir + "\Resources" | |
| $OrigineTemi = $ProjectDir + "\Themes" | |
| $DestRisorse = $TargertDir + "\Resources" | |
| $DestTemi = $TargertDir + "\Themes" | |
| $OrigineLang = $ProjectDir + "\Languages" | |
| $DestLang = $TargertDir + "\Languages" | |
| Write-Output "Esecuzione azioni Post Build" |
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 type=”text/javascript”> | |
| function pageLoad(){ | |
| var myPic = [ | |
| {url: ‘pic/lellone1.jpg’, description: “lellone”}, | |
| {url: ‘pic/lellone2.jpg’, description: “lellone”} | |
| ]; | |
| $create( | |
| Sys.UI.DataView, | |
| {data:myPic}, |
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
| //Salva la mia foto con dimensioni normali | |
| string myImage = Server.MapPath("~/") + "public/images/" + fuImg.FileName; | |
| fuImg.SaveAs(myImage); | |
| //crea e salva il thumbinail | |
| System.Drawing.Image img = System.Drawing.Image.FromFile(myImage); | |
| System.Drawing.Image.GetThumbnailImageAbort myCallback = new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback); | |
| System.Drawing.Image myThumbnail = img.GetThumbnailImage(65, 65, myCallback, IntPtr.Zero); | |
| myThumbnail.Save(Server.MapPath("~/") + "public/thumbs/" + fuImg.FileName); |