Skip to content

Instantly share code, notes, and snippets.

View RajaniCode's full-sized avatar

Rajani RajaniCode

View GitHub Profile
@RajaniCode
RajaniCode / CS7.cs
Last active August 17, 2024 00:16
CS7
// CS 7
/*
1. out variables
2. Tuples
3. Discards
4. Pattern Matching
5. ref locals and returns
6. Local Functions
7. Expression-bodied members
8. Throw expressions
@RajaniCode
RajaniCode / CS7.x.cs
Last active August 17, 2024 00:15
CS7.x
// CS 7.1
/*
1. async Main method
// The entry point for an application can have the async modifier.
2. default literal expressions
// You can use default literal expressions in default value expressions when the target type can be inferred.
3. Inferred tuple element names
// The names of tuple elements can be inferred from tuple initialization in many cases.
// Finally, the compiler has two options /refout and /refonly that control reference assembly generation.
4. Reference assembly generation
@RajaniCode
RajaniCode / CS8.cs
Last active August 17, 2024 00:15
CS8
// CS 8
/*
1. Readonly members
2. Default interface methods
3. Pattern matching enhancements:
// Switch expressions
// Property patterns
// Tuple patterns
// Positional patterns
4. Using declarations
@RajaniCode
RajaniCode / CS9.cs
Last active August 17, 2024 00:17
CS9
// CS 9
/*
1. Records
2. Init only setters
3. Top-level statements
4. Pattern matching enhancements
5. Native sized integers
6. Function pointers
7. Suppress emitting localsinit flag
8. Target-typed new expressions
@RajaniCode
RajaniCode / SQLServerSQLCMDSqlPackagebcpxp_cmdshell
Last active December 16, 2021 19:36
SQLServerSQLCMDSqlPackagebcpxp_cmdshell
# (localdb)\MSSQLLocalDB # (localdb)\SampleInstance
# Windows Authentication
--C:\Users\rajanis\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\SampleInstance
sqllocaldb create "SampleInstance"
sqllocaldb stop "SampleInstance"
sqllocaldb delete "SampleInstance"
@RajaniCode
RajaniCode / SQLServer
Last active December 16, 2021 19:35
SQLServer
--SQL Server 2019--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--apply------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
USE [master];
GO
--IF EXISTS(SELECT name FROM sys.databases WHERE name = N'sampledb')
IF DB_ID (N'sampledb') IS NOT NULL
DROP DATABASE [sampledb];
@RajaniCode
RajaniCode / PostgreSQL
Last active December 5, 2021 18:36
PostgreSQL
# PostgreSQL 13.1-1
PostgreSQL data directory:
C:\Users\rajanis\Downloads\PostgreSQL\postgresql-13.1-1-windows-x64-binaries\pgsql\bin\data
PostgreSQL Port:
5432
/*
@RajaniCode
RajaniCode / MySQLMariaDB
Last active August 26, 2021 01:37
MySQLMariaDB
# MySQL-15.1 # MariaDB-10.4.14
$ winpty mysqladmin --version
$ winpty mysqlsh --version
$ winpty mysql --version
> mysqladmin --version
> mysqlsh --version
> winpty mysql --version
@RajaniCode
RajaniCode / Java9.java
Last active March 17, 2024 10:23
Java9.java
// Java 9
/*
1. Private Interface Methods
2. Try-With-Resources on Final Variables
3. Diamond Operator for Anonymous Inner Classes
4. SafeVarargs Annotation on Private Methods
5. Collections Factory Methods
6. Optional Methods
*/
@RajaniCode
RajaniCode / Java10.java
Last active March 17, 2024 10:21
Java10.java
// Java 10
/*
1. Local-Variable Type Inference
2. Time-Based Release Versioning
3. Unmodifiable Collections
4. Optional Methods
*/
import static java.lang.System.out;
import java.io.BufferedReader;