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.Threading; | |
using System.Threading.Tasks; | |
using System.Reflection; | |
namespace AsyncAwaitExperimentation | |
{ | |
class Program | |
{ | |
static async Task Main(string[] args) |
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; | |
namespace testFirstOrDefault | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
const vector<CaseItem> vCases = ((eLoginMode == LoginContinueCase) ? GetContinuableCases() | |
/*else if*/ : ((eLoginMode == LoginNewCase) ? LoginDialog::GetCaseManager().GetPreOpCases() | |
/*else if*/ : ((eLoginMode == LoginReviewCase) ? GetReviewableCases() | |
/*else if*/ : ((eLoginMode == LoginAmendCase) ? GetAmendableCases() | |
/*else*/ : vector<CaseItem>())))); | |
if (Row < vCases.size()) | |
{ | |
if (LoginDialog::GetSelectedCase() == vCases[Row].strCaseName) | |
{ |
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
if (eLoginMode == LoginContinueCase) | |
const vector<CaseItem> vCases = GetContinuableCases(); | |
if (Row < vCases.size()) | |
{ | |
if (LoginDialog::GetSelectedCase() == vCases[Row].strCaseName) | |
{ | |
LoginDialog::SelectCase(EMPTY_STRING); | |
} | |
else | |
{ |
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
typedef struct hasSmrtPtr | |
{ | |
vector<unique_pointer<int>> unq; | |
} hsSmrtPtr; | |
hsSmrtPtr g; | |
void smrtPtrScope(int len) | |
{ | |
for(int i = 0; i < len; ++i) |
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
// TestLanguageGenerator.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <iostream> | |
#include <string> | |
#include <cwctype> | |
#include <clocale> | |
std::wstring translatedString; |
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> | |
<head> | |
<script type="text/javascript"> | |
init(); | |
var count = 0; | |
function init() | |
{ |
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
// Make a note of how many return statements there are! | |
// Also note that there is a memory leak generated because I don't always delete myObj | |
void lotsoReturns(int randomlyGennerated) | |
{ | |
someObject * myObj = new someObject(); | |
switch(randomlyGennerated / 100) | |
{ | |
case 1: | |
switch((randomlyGennerated % 100) / 10) | |
{ |
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
class foo | |
{ | |
int a; | |
int b; | |
int c; | |
GenericLargeExistingClass glec = new GenericLargeExistingClass(); | |
foo() | |
{ |
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
foo[5] a = { 1, 2, 3, 4, 5 }; //foo is a type | |
foo[3] b = { 1, 2, 3 }; | |
List<foo> unMatched = new List<foo>(); | |
foreach (foo c in a) | |
{ | |
bool wasMatched = false; | |