A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
/// <summary> | |
/// Serializer Class. | |
/// </summary> | |
public class Serializer | |
{ | |
//types: | |
// N = null | |
// s = string | |
// i = int | |
// d = double |
img:hover { | |
-webkit-filter: grayscale(0%); | |
-webkit-transition: .5s ease-in-out; | |
-moz-filter: grayscale(0%); | |
-moz-transition: .5s ease-in-out; | |
-o-filter: grayscale(0%); | |
-o-transition: .5s ease-in-out; | |
} | |
img { |
public static bool SubsetSum(IEnumerable<int> list, int s) | |
{ | |
var arr = list.ToArray(); | |
Array.Sort(arr); | |
var a = arr.Where(i => i < 0).Sum(); | |
var b = arr.Where(i => i > 0).Sum(); | |
if(a > s || b < s) | |
{ | |
return false; | |
} |
select.form-control + .chosen-container.chosen-container-single .chosen-single { | |
display: block; | |
width: 100%; | |
height: 34px; | |
padding: 6px 12px; | |
font-size: 14px; | |
line-height: 1.428571429; | |
color: #555; | |
vertical-align: middle; | |
background-color: #fff; |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
Install CNTLM in a folder where you have full rights to run it as administrator.
Open cntlm.ini
and fill it :
Username YOUR_USERNAME
Domain YOUR_DOMAIN
@echo off | |
cmdkey.exe /list > "%TEMP%\List.txt" | |
findstr.exe Target "%TEMP%\List.txt" > "%TEMP%\tokensonly.txt" | |
FOR /F "tokens=1,2 delims= " %%G IN (%TEMP%\tokensonly.txt) DO cmdkey.exe /delete:%%H | |
del "%TEMP%\List.txt" /s /f /q | |
del "%TEMP%\tokensonly.txt" /s /f /q | |
echo All done | |
pause |
More info can be found at, https://docs.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=netframework-4.7.2
// C:\ProgramData\
var path1 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData);
// C:\Users\USERNAME\AppData\Roaming
var path2 = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);