https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Net.NetworkInformation; | |
using System.Net; | |
namespace AvailablePort | |
{ | |
class Program |
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
@echo off | |
@rem throw this file in jetbrains installation folder, it takes the last created PyCharm folder (the latest ide update) for the script | |
FOR /F "delims=" %%i IN ('dir /b /ad-h /t:c /od -filter "PyCharm*"') DO SET a=%%i | |
SET PyCharmPath=C:\Program Files (x86)\JetBrains\%a%\bin\PyCharm64.exe | |
echo %PyCharmPath% | |
echo Adding file entries |
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
$DotNETCoreUpdatesPath = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Updates\.NET Core" | |
$DotNetCoreItems = Get-Item -ErrorAction Stop -Path $DotNETCoreUpdatesPath | |
$NotInstalled = $True | |
$DotNetCoreItems.GetSubKeyNames() | Where { $_ -Match "Microsoft .NET Core.*Windows Server Hosting" } | ForEach-Object { | |
$NotInstalled = $False | |
Write-Host "The host has installed $_" | |
} | |
If ($NotInstalled) { | |
Write-Host "Can not find ASP.NET Core installed on the host" | |
} |
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
private void showMultiTiff(string tiffFileName){ | |
FileStream tifFS = new FileStream( tiffFileName , FileMode.Open , FileAccess.Read ) ; | |
Image gim = Image.FromStream( tifFS ) ; | |
FrameDimension gfd = new FrameDimension(gim.FrameDimensionsList[0]); | |
int pageCount = gim.GetFrameCount( gfd ) ;//全体のページ数を得る | |
System.Diagnostics.Debug.WriteLine(pageCount); | |
Graphics g = pictureBox1.CreateGraphics(); | |
for(int i=0;i<pageCount;i++){ | |
gim.SelectActiveFrame(gfd, i); | |
g.DrawImage(gim, 0,0, pictureBox1.Width, pictureBox1.Height);//PictureBoxに表示してます |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace MyApp.Hmac | |
{ | |
public static class AuthenticationConstants | |
{ |
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 System; | |
using Abp.Runtime.Session; | |
namespace Abp.Temp | |
{ | |
public static class AbpSessionExtensions | |
{ | |
public static IDisposable Override(this IAbpSession abpSession, int? tenantId, long? userId) | |
{ | |
var overridableSession = abpSession as OverridableSession; |
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
//Demo usage | |
public class HomeController : MyControllerBase | |
{ | |
private readonly IRepository<MyEntity> _myEntityRepository; | |
public HomeController(IRepository<MyEntity> myEntityRepository) | |
{ | |
_myEntityRepository = myEntityRepository; | |
} |
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 System; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
namespace AbpWebSite.Templates | |
{ | |
/// <summary> | |
/// Used to rename a solution | |
/// </summary> |
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
/// <summary> | |
/// Gets the console secure password. | |
/// </summary> | |
/// <returns></returns> | |
private static SecureString GetConsoleSecurePassword( ) | |
{ | |
SecureString pwd = new SecureString( ); | |
while ( true ) | |
{ |
NewerOlder