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
#include <iostream> | |
#include <fstream> | |
#include <algorithm> | |
#include <functional> | |
using namespace std; | |
int main() | |
{ | |
ifstream inf("input.txt"); |
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
public class ServerVar | |
{ | |
public string Key { get; set; } | |
public string Value { get; set; } | |
} | |
public class ServerVarsViewModel | |
{ | |
public IList<ServerVar> ServerVariables { get; set; } | |
} |
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
public static class Ensure | |
{ | |
public static void ArgumentNotNull<T>(T argument, string argumentName) where T : class | |
{ | |
if (argument == null) | |
throw new ArgumentNullException(argumentName); | |
} | |
public static void ArgumentNotNull<T>(Nullable<T> argument, string argumentName) where T : struct | |
{ |
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 @cnt INT = 0; | |
WHILE @cnt < 10 | |
BEGIN | |
PRINT 'Doing Something in loop #' + Convert(VARCHAR(10),@cnt); | |
--Use RAISEERROR to flush PRINT buffer | |
RAISERROR(N'', --message | |
0, --severity | |
1) --state | |
WITH NOWAIT; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <sys/wait.h> | |
#include <unistd.h> | |
int main() | |
{ | |
int pid; | |
int status; |
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
#include <iostream> | |
#include <string> | |
#include <cstring> | |
#include <sstream> | |
#include <vector> | |
#include <algorithm> | |
#include <unistd.h> | |
#include <sys/wait.h> | |
#include <signal.h> |
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
#include <stdio.h> | |
#include <string.h> | |
#include "Animal.h" | |
void Animal_Ctor(Animal* pa) | |
{ | |
pa->pfspeak=Animal_Speaking; | |
} | |
void Animal_Speaking(Animal* pa) |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
public class StringUtils | |
{ | |
public static string SafeFormat(string format, params object[] parameters) | |
{ | |
const int MAX_NUMBER_OF_UNPASSED_PARAMETERS = 50; |
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
Get-ChildItem -Recurse .|where {$_.PSISContainer -and @($_ | Get-ChildItem).Count -eq 0 }|Remove-Item |
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
public class MachineKeyProtector : IDataProtector | |
{ | |
private readonly string[] _purpose = | |
{ | |
typeof(OAuthAuthorizationServerMiddleware).Namespace, | |
"Access_Token", | |
"v1" | |
}; | |
public byte[] Protect(byte[] userData) |