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
#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
#include <windows.h> | |
LRESULT CALLBACK WinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); | |
TCHAR WinClassName[] = TEXT("NoMoveWinClass"); | |
int WINAPI WinMain( | |
_In_ HINSTANCE hInstance, | |
_In_opt_ HINSTANCE hPrevInstance, | |
_In_ LPSTR lpCmdLine, |
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 <windows.h> | |
#include <tlhelp32.h> | |
#include <tchar.h> | |
void PrintHeader() | |
{ | |
_tprintf(TEXT("%10s %40s\n"), TEXT("Process ID"), TEXT("Process Name")); | |
} | |
void PrintProcessEntry(PROCESSENTRY32 pe) |
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.Security.Cryptography; | |
using System.Security.Cryptography.Xml; | |
using System.Xml; | |
namespace NS | |
{ | |
class SignedXmlWithReferenceIdAttributeName : SignedXml | |
{ | |
private string _referenceIdAttributeName; |
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
void ShowErrorMessage(const char* format, ...) | |
{ | |
va_list argp; | |
va_start(argp, format); | |
vShowErrorMessage(format, argp); | |
va_end(argp); | |
} | |
void vShowErrorMessage(const char* format, va_list argp) | |
{ |
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.VisualStudio.TestTools.UnitTesting; | |
using System; | |
namespace MSTestDataTestMethodSample | |
{ | |
[TestClass] | |
public class NumberCheckerTests | |
{ | |
[TestMethod] | |
[DataTestMethod] |
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
USE DATABASE_NAME | |
DECLARE @SearchStr nvarchar(100) = 'SEARCH_TEXT' | |
DECLARE @Results TABLE (ColumnName nvarchar(370), ColumnValue nvarchar(3630)) | |
SET NOCOUNT ON | |
DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110) | |
SET @TableName = '' | |
SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''') |
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
<?xml version="1.0"?> | |
<configuration> | |
<configSections> | |
<!-- config sections --> | |
</configSections> | |
<system.web> | |
<!-- 20 MB max. request, 1800s (30min) timeout --> | |
<httpRuntime maxRequestLength="20480" executionTimeout="1800" /> | |
</system.web> | |
</configuration> |
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 string GetRemoteIP(this HttpRequestBase request, bool useForwardedForHeader = false) | |
{ | |
if (request == null) | |
throw new ArgumentNullException(nameof(request)); | |
const string FORWARDED_FOR = "HTTP_X_FORWARDED_FOR"; | |
const string REMOTE_ADDR = "REMOTE_ADDR"; | |
string ipAddress = null; |