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 void AddRating(string productId, int rating) | |
{ | |
var products = GetProducts(); | |
var query = products.First(x => x.Id == productId); | |
if(query.Ratings == null) | |
{ | |
query.Ratings = new int[] { rating }; | |
} | |
else |
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
0-mail.com | |
007addict.com | |
020.co.uk | |
027168.com | |
0815.ru | |
0815.su | |
0clickemail.com | |
0sg.net | |
0wnd.net | |
0wnd.org |
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 System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
namespace FileAnalyzer | |
{ | |
public class Record | |
{ | |
public DateTime Start => DateTime.Parse(_line.Split(' ')[0]); |
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
# >>> Virtual env deactivate hook >>> | |
# Same as deactivate in "<venv>/bin/activate" | |
deactivate () { | |
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then | |
PATH="${_OLD_VIRTUAL_PATH:-}" | |
export PATH | |
unset _OLD_VIRTUAL_PATH | |
fi | |
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then |
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
# Long command with many parameters all on one line | |
Send-MailMessage -From "[email protected]" -To "[email protected]" -Subject "Test Email" -Body "This is a test email." -SmtpServer "smtp.example.com" -Port 587 -UseSsl -Credential (Get-Credential) -Attachments "C:\path\to\file.txt" -Priority High -DeliveryNotificationOption OnSuccess, OnFailure | |
# Equivalent command using splatting for readability | |
$mailParams = @{ | |
From = "[email protected]" | |
To = "[email protected]" | |
Subject = "Test Email" | |
Body = "This is a test email." | |
SmtpServer = "smtp.example.com" |
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
SELECT 'ALTER TABLE ' + QUOTENAME(ss.name) + '.' + QUOTENAME(st.name) + ' ADD created_date DATETIME NULL;' | |
FROM sys.tables st | |
INNER JOIN sys.schemas ss on st.[schema_id] = ss.[schema_id] | |
WHERE st.is_ms_shipped = 0 | |
AND NOT EXISTS ( | |
SELECT 1 | |
FROM sys.columns sc | |
WHERE sc.[object_id] = st.[object_id] | |
AND sc.name = 'created_date' | |
) |
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
#!/bin/bash | |
# Colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NO_COLOR='\033[0m' | |
BLUE='\033[0;34m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' |
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
[*.{cs,vb}] | |
dotnet_diagnostic.CA1062.severity = none | |
# IDE0022: Use block body for method | |
csharp_style_expression_bodied_methods = true | |
# IDE0032: Use auto property | |
dotnet_style_prefer_auto_properties = true | |
#CSharpier Incompatible Rules |
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
<PropertyGroup> | |
<PathMap>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))=./</PathMap> | |
</PropertyGroup> |
NewerOlder