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
@echo off | |
setlocal enabledelayedexpansion | |
for /d %%F in (*.*) do ( | |
set "folder=%%F" | |
set "newfolder=!folder:.= !" | |
ren "%%F" "!newfolder!" | |
) |
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
//using state management | |
import { useState } from 'react'; | |
const Wizard = () => { | |
const [step, setStep] = useState(1); | |
const nextStep = () => setStep(prev => prev + 1); | |
const prevStep = () => setStep(prev => prev - 1); | |
return ( |
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
# Add a packet size on both server (ffmpeg) and client (vlc) sides; | |
# in ffmpeg: | |
ffmpeg -re -i "path/to/my/video.mp4" -vcodec libx264 -f mpegts udp://127.0.0.1:1234?pkt_size=1316 | |
# in vlc: | |
udp://127.0.0.1:1234?pkt_size=1316 |
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
When you initialize a new Git repository with `git init`, Git creates a single branch named `master` by default. This is the branch where your initial commit will go when you make it. | |
However, starting from Git 2.28, you can customize this behavior using the `init.defaultBranch` configuration option. For example, if you want your default branch to be named `main`, you can set this option globally with the following command: | |
```bash | |
git config --global init.defaultBranch main | |
``` | |
After running this command, new repositories you create with `git init` will have a single branch named `main` by default. |
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
catch (Exception ex) | |
{ | |
tbOutput.Text = GetExceptionMessages(ex); | |
} | |
... | |
private string GetExceptionMessages(Exception ex) | |
{ | |
var message = ex.Message; |
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
private void Button_Click(object sender, RoutedEventArgs e) | |
{ | |
// Change the cursor to an hourglass | |
Mouse.OverrideCursor = Cursors.Wait; | |
try | |
{ | |
// Perform the long-running operation here | |
// ... |
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
<Window x:Class="WpfApp.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MainWindow" Height="350" Width="525"> | |
<StackPanel> | |
<Expander Header="Expander 1"> | |
<UniformGrid Rows="2" Columns="2"> | |
<Button Content="Button 1"/> | |
<Button Content="Button 2"/> | |
<Button Content="Button 3"/> |
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
# change to the folder where you want to create newBranchName | |
git clone --single-branch --branch features/upgrade ^ | |
C:\Projects\DevOps\MyRepoName newBranchName | |
# C:\Projects\DevOps\MyRepoName is the repo where the branch you want to clone resides in; | |
# newBranchName is relative to current folder; |
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
Random 11-digit numbers that pass the ABN algorithm: | |
NOT EXISTS | |
------------------------ | |
18 123 456 789 | |
EXISTS (REAL ABN's) | |
------------------------ | |
46657833902 | |
25091850654 |
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
1. **Google**: Google provides OpenID Connect authentication services that can be used to authenticate users with Google accounts. You can find more information about it [here](https://developers.google.com/identity/protocols/oauth2/openid-connect). | |
2. **Microsoft**: Microsoft provides OpenID Connect authentication services that can be used to authenticate users with Microsoft accounts. You can find more information about it [here](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc). | |
OpenID Connect (OIDC) on the Microsoft identity platform. | |
https://learn.microsoft.com/en-us/entra/identity-platform/v2-protocols-oidc. | |
Set up an OpenID Connect provider | Microsoft Learn. | |
https://learn.microsoft.com/en-us/power-pages/security/authentication/openid-provider. | |
3. **Okta**: Okta is a cloud-based identity management platform that provides OpenID Connect authentication services. You can find more information about it [here](https://developer.okta.com/docs/guides/implement-openid-conn |
NewerOlder