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 toBaseN(num, base) { | |
| if (num === 0) { | |
| return '0'; | |
| } | |
| var digits = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
| var len = Math.min(digits.length, base); | |
| var result = ''; | |
| while (num > 0) { | |
| result = digits[num % len] + result; | |
| num = parseInt(num / len, 10); |
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
| import winsdk.windows.ui.notifications as notifications | |
| import winsdk.windows.data.xml.dom as dom | |
| from winsdk.windows.ui.notifications import ToastActivatedEventArgs, ToastDismissedEventArgs, ToastFailedEventArgs | |
| # create notifier | |
| nManager = notifications.ToastNotificationManager | |
| notifier = nManager.create_toast_notifier() | |
| # define your notification as string | |
| tString = """ |
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
| $XmlString = @" | |
| <toast> | |
| <visual> | |
| <binding template="ToastGeneric"> | |
| <text>Default Notification</text> | |
| <image src="C:\Windows\IdentityCRL\WLive48x48.png" placement="appLogoOverride" /> | |
| </binding> | |
| </visual> | |
| <audio src="ms-winsoundevent:Notification.Default" /> | |
| </toast> |
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
| PS C:\Users\Admin> [Threading.Thread]::CurrentThread.CurrentUICulture | |
| LCID Name DisplayName | |
| ---- ---- ----------- | |
| 1041 ja-JP ζ₯ζ¬θͺ (ζ₯ζ¬) | |
| # example: Set-PowerShellUICulture -Name "en-US" | |
| function Set-PowerShellUICulture { | |
| param([Parameter(Mandatory=$true)] |
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
| let getRandomBytes = ( | |
| (typeof self !== 'undefined' && (self.crypto || self.msCrypto)) | |
| ? function() { // Browsers | |
| var crypto = (self.crypto || self.msCrypto), QUOTA = 65536; | |
| return function(n) { | |
| var a = new Uint8Array(n); | |
| for (var i = 0; i < n; i += QUOTA) { | |
| crypto.getRandomValues(a.subarray(i, i + Math.min(n - i, QUOTA))); | |
| } | |
| return a; |
OlderNewer