DATE ONLY FORMATS | |||
---|---|---|---|
Format# | Query | Format | Sample |
--- | --- | --- | --- |
1 | SELECT CONVERT(VARCHAR, GETDATE(), 1) | mm/dd/yy | 08/02/22 |
2 | SELECT CONVERT(VARCHAR, GETDATE(), 2) | yy.mm.dd | 22.08.02 |
3 | SELECT CONVERT(VARCHAR, GETDATE(), 3) | dd/mm/yy | 02/08/22 |
4 | SELECT CONVERT(VARCHAR, GETDATE(), 4) | dd.mm.yy | 02.08.22 |
5 | SELECT CONVERT(VARCHAR, GETDATE(), 5) | dd-mm-yy | 02-08-22 |
6 | SELECT CONVERT(VARCHAR, GETDATE(), 6) | dd-Mon-yy | 02 Aug 22 |
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
/** | |
* String manipulation utilities | |
*/ | |
const stringUtils = { | |
capitalize: (str) => str.charAt(0).toUpperCase() + str.slice(1), | |
camelCase: (str) => str.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (_, chr) => chr.toUpperCase()), | |
kebabCase: (str) => str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(), | |
snakeCase: (str) => str.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase(), | |
truncate: (str, length = 50, suffix = '...') => str.length > length ? `${str.slice(0, length)}${suffix}` : str, | |
reverse: (str) => str.split('').reverse().join(''), |
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 Microsoft.AspNetCore.Mvc.Rendering; | |
using Microsoft.AspNetCore.Mvc.ViewFeatures; | |
using Microsoft.AspNetCore.Razor.TagHelpers; | |
[HtmlTargetElement("a", Attributes = "is-active-page")] | |
public class ActivePageTagHelper : TagHelper | |
{ | |
/// <summary> | |
/// The name of Page | |
/// </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
@echo off | |
::SET mypath=%cd% | |
set mypath=%cd% | |
@echo %mypath% | |
::cd /d "F:\" | |
for /d /r %mypath% %%a in (node_modules\) do @if exist "%%d" echo "%%d" && rd /Q /s "%%a" | |
for /d /r %mypath% %%a in (bower_components\) do @if exist "%%d" echo "%%d" && rd /Q /s "%%a" | |
for /d /r %mypath% %%d in (node_modules) do @if exist "%%d" echo "%%d" && rd /s/q "%%d" | |
for /d /r %mypath% %%d in (bower_components) do @if exist "%%d" echo "%%d" && rd /s/q "%%d" | |
for /d /r %mypath% %%d in (Debug Release obj bin) do @if exist "%%d" echo "%%d" && rd /s/q "%%d" |
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 | |
:: c:\windows\system32\cleanmgr.exe /dc | |
:: del c:\windows\prefetch\*.* /q | |
:: del c:\windows\temp\*.* /q | |
REM Clean Temp Folders | |
rmdir /Q /S "C:\Users\hb\AppData\Local\Temp" > nul | |
mkdir "C:\Users\hb\AppData\Local\Temp" > nul | |
rmdir /Q /S "C:\Users\hb\AppData\LocalLow\Temp" > nul |
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
# ASP.NET Core | |
# Build and test ASP.NET Core projects targeting .NET Core. | |
# Add steps that run tests, create a NuGet package, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core | |
trigger: | |
- master | |
pool: | |
vmImage: ubuntu-latest |
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 | |
:: make sure to change the settings from line 4-10 | |
set dbUser=root | |
set dbPassword="root@123" | |
set backupDir=D:\Localhost_MySQL_Backup | |
set mysqldump="C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqldump.exe" | |
set mysqlDataDir="C:\ProgramData\MySQL\MySQL Server 5.7\Data" | |
set zip="C:\Program Files\7-Zip\7z.exe" | |
set dbName="unicenta" |
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
DECLARE @allowAtoZ BIT = 1, | |
@allow0to9 BIT = 1, | |
@allowSpecials1 BIT = 1, | |
@avoidAmbiguousCharacters BIT = 1, | |
@length INT = 8, | |
@range VARCHAR(100) = ''; | |
IF @allowAtoZ = 1 | |
BEGIN |
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
<!-- Amazon S3 --> | |
<link rel="dns-prefetch" href="//s3.amazonaws.com"> | |
<!-- Google CDN --> | |
<link rel="dns-prefetch" href="//ajax.googleapis.com"> | |
<!-- Microsoft CDN --> | |
<link rel="dns-prefetch" href="//ajax.microsoft.com"> | |
<link rel="dns-prefetch" href="//ajax.aspnetcdn.com"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Random color for text in html using css</title> | |
<style> | |
.hue { | |
color: #f35626; |
NewerOlder