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
| <# | |
| Utility functions for deleting old files. | |
| Source: http://blog.danskingdom.com/powershell-functions-to-delete-old-files-and-empty-directories/ | |
| #> | |
| # Function to remove all empty directories under the given path. | |
| # If -DeletePathIfEmpty is provided the given Path directory will also be deleted if it is empty. | |
| # If -OnlyDeleteDirectoriesCreatedBeforeDate is provided, empty folders will only be deleted if they were created before the given date. | |
| # If -OnlyDeleteDirectoriesNotModifiedAfterDate is provided, empty folders will only be deleted if they have not been written to after the given date. | |
| function Remove-EmptyDirectories([parameter(Mandatory)][ValidateScript({Test-Path $_})][string] $Path, [switch] $DeletePathIfEmpty, [DateTime] $OnlyDeleteDirectoriesCreatedBeforeDate = [DateTime]::MaxValue, [DateTime] $OnlyDeleteDirectoriesNotModifiedAfterDate = [DateTime]::MaxValue, [switch] $OutputDeletedPaths, [switch] $WhatIf) |
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
| {{ $original := .Get "src" }} | |
| <div id="docsy_swagger_ui"></div> | |
| <script> | |
| window.onload = function () { | |
| const ui = SwaggerUIBundle({ | |
| url: {{ $original | relURL }}, | |
| dom_id: '#docsy_swagger_ui', | |
| deepLinking: true, | |
| presets: [ | |
| SwaggerUIBundle.presets.apis, |
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
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "regexp" | |
| "gopkg.in/yaml.v2" |
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
| void GetDefaultPaperSize() | |
| { | |
| var devMode = PInvoke.PrinterHelper.GetPrinterDevMode(null); | |
| string s = String.Format("{0} : {1} x {2}", devMode.dmPaperSize, devMode.dmPaperWidth, devMode.dmPaperLength); | |
| Console.WriteLine(s); | |
| } | |
| void SetDefaultPaperSize() | |
| { | |
| string formName = "User defined"; |
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
| using Azure; | |
| using Azure.AI.OpenAI; | |
| var key = "0bc0xxxxxxxxxxxxxxxx7971"; | |
| var endpoint = "https://my-demo-ai-app.openai.azure.com/"; | |
| var deployment = "turbo-michael-35"; | |
| Console.Write("Ask me anything: "); | |
| var prompt = Console.ReadLine(); |
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
| @API_KEY = 0bc0xxxxxxxxxxxx7971 | |
| @RESOURCE_NAME = my-demo-ai-app | |
| @DEPLOYMENT_ID = turbo-michael-35 | |
| ### OpenAI Test | |
| POST https://{{RESOURCE_NAME}}.openai.azure.com/openai/deployments/{{DEPLOYMENT_ID}}/chat/completions?api-version=2023-05-15 | |
| api-key: {{API_KEY}} | |
| { | |
| "messages": [ |
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
| <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" /> | |
| <link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" /> |
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
| @inherits LayoutComponentBase | |
| <div class="page"> | |
| <div class="sidebar"> | |
| <NavMenu /> | |
| </div> | |
| <main> | |
| <div class="top-row px-4"> | |
| <a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a> |
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
| @page "/" | |
| <PageTitle>Index</PageTitle> | |
| <h1>Hello, world!</h1> | |
| Welcome to your new app. | |
| <SurveyPrompt Title="How is Blazor working for you?" /> |
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
| <Router AppAssembly="@typeof(App).Assembly"> | |
| <Found Context="routeData"> | |
| <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> | |
| <FocusOnNavigate RouteData="@routeData" Selector="h1" /> | |
| </Found> | |
| <NotFound> | |
| <PageTitle>Not found</PageTitle> | |
| <LayoutView Layout="@typeof(MainLayout)"> | |
| <p role="alert">Sorry, there's nothing at this address.</p> | |
| </LayoutView> |
NewerOlder