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
public IActionResult RdlcReportPreview() | |
{ | |
// Require package: AspNetCore.Reporting | |
var path = $"{this._IWebHostEnvironment.WebRootPath}\\Report\\NewReport.rdlc"; // Local Path | |
AspNetCore.Reporting.LocalReport localReport = new LocalReport(path); | |
localReport.AddDataSource("DataSetOne", #DataListOne); | |
localReport.AddDataSource("DataSetTwo", #DataListTwo); | |
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
"API Watch": { | |
"commandName": "Executable", | |
"executablePath": "dotnet", | |
"commandLineArgs": "watch run", | |
"workingDirectory": "$(ProjectDir)", | |
"launchBrowser": true, | |
"applicationUrl": "https://localhost:5001;http://localhost:5000", | |
"environmentVariables": { | |
"ASPNETCORE_ENVIRONMENT": "Development" | |
}, |
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
<?php | |
$host = 'localhost'; | |
$user = 'root'; | |
$password = '123456'; | |
$dbname = 'pdoposts'; | |
// Set DSN | |
$dsn = 'mysql:host='. $host .';dbname='. $dbname; | |
// Create a PDO instance |
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
# Usage: powershell ExportSchema.ps1 "SERVERNAME" "DATABASE" "C:\<YourOutputPath>" | |
# Start Script | |
Set-ExecutionPolicy RemoteSigned | |
# Set-ExecutionPolicy -ExecutionPolicy:Unrestricted -Scope:LocalMachine | |
function GenerateDBScript([string]$serverName, [string]$dbname, [string]$scriptpath) | |
{ | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null |
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
#disable automatic repair on Windows 10 | |
------------------------------------------ | |
Here is a step-by-step guide on how to stop automatic repair on Windows 10: | |
Open Start | |
In the list of programs, search for Command Prompt, right- click it and choose Run as Administrator. | |
Type the command “bcdedit” and press the Enter button. | |
Under the Windows boot loaders section, look for the identifier and recoveryenabled values. They should read: | |
identifier: {current} | |
recoveryenabled: yes | |
To disable automatic repair input the following command followed by pressing the Enter key: bcdedit /set {current} recoveryenabled no |
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
Process cmd = new Process(); | |
cmd.StartInfo.FileName = "cmd.exe"; | |
cmd.StartInfo.RedirectStandardInput = true; | |
cmd.StartInfo.RedirectStandardOutput = true; | |
cmd.StartInfo.CreateNoWindow = true; | |
cmd.StartInfo.UseShellExecute = false; | |
cmd.Start(); | |
cmd.StandardInput.WriteLine(@"cd 'C:\Users\Monir\Desktop\Exchange Script'"); | |
cmd.StandardInput.WriteLine(@"dir"); |
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
var IdleTime = 0; | |
setTime(); | |
$(this).on("mousemove keypress", function () { | |
IdleTime = 0; | |
}); | |
function setTime() { | |
setTimeout(function () { | |
IdleTime += 1; | |
console.log(IdleTime + " Second passed."); | |
checkTime(); |
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
public string SEND_PUSH_NOTIFICATION() | |
{ | |
// one or more ids. Change "ANDROID_CLIENT_ID" with real ids | |
var REGISTRATIONS_IDS = new List<string>() { "ANDROID_CLIENT_ID" }; | |
Dictionary<string, string> OptionalData = new Dictionary<string, string>() | |
{ | |
{ "Category", "NEW_INDIVIDUAL_REQUEST"}, | |
{ "Title", "Title"}, | |
{ "SubTitle", "SubTitle"} |
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
LINQ Cheat Sheet By: Monir Hossain | |
Restriction | |
context.Courses.Where(c => c.Level == 1); | |
Ordering | |
context.Courses | |
.OrderBy(c => c.Name) // or OrderByDescending | |
.ThenBy(c => c.Level); // or ThenByDescending | |
Projection |
NewerOlder