How to use LINQ, Anonymous Functions, and Lambda Expressions
var results = myStackPanel.Children.OfType<TextBox>().Where(x => x.Text == "");
if (results.Count() >0)
{
// Something is blank.
}
var results = myStackPanel.Children.OfType<TextBox>().Where(x => x.Text == "");
if (results.Count() >0)
{
// Something is blank.
}
""" | |
Script that finds all build breakers in CC.NET build logs | |
""" | |
import os | |
import sys | |
import xml.dom.minidom | |
SCollins@APPDEVLAP08 /e/git/Case Refresh - CS Exam Updates (master)
$ git diff-index tfs/default
:100644 100644 ecacaf2775aff46db60f4e66413a17998b2a0300 9f7c340d9ce0f70d8919cb2b
1b80131f07769727 M Development/Source/TPN/TPN/TPNHomePage.xaml.cs
SCollins@APPDEVLAP08 /e/git/Case Refresh - CS Exam Updates (master)
$ git status
# On branch master
# Untracked files:
Call stack.
git2.dll!determine_status(status_st * st, int in_head, int in_index, int in_workdir, const git_tree_entry * tree_entry, const git_index_entry * index_entry, git_buf * full_path, const char * status_path, path_type path_type) Line 294 C
git2.dll!dirent_cb(void * state, git_buf * a) Line 446 + 0x49 bytes C
git2.dll!alphasorted_futils_direach(git_buf * path, int (void *, git_buf *)* fn, void * arg) Line 770 + 0xb bytes C
git2.dll!process_folder(status_st * st, const git_tree_entry * tree_entry, git_buf * full_path, path_type path_type) Line 248 + 0x12 bytes C
git2.dll!determine_status(status_st * st, int in_head, int in_index, int in_workdir, const git_tree_entry * tree_entry, const git_index_entry * index_entry, git_buf * full_path, const char * status_path, path_type path_type) Line 304 + 0x15 bytes C
git2.dll!dirent_cb(void * state, git_buf * a) Line 446 + 0x49 bytes C
Welcome to Git (version 1.7.7.1-preview20111027) | |
SCollins@APPDEVLAP08 /e/git/Case Refresh - CS Exam Updates (master) | |
$ git checkout test | |
Switched to branch 'test' | |
SCollins@APPDEVLAP08 /e/git/Case Refresh - CS Exam Updates (test) | |
$ git diff-index --cached master | |
:100644 100644 fe80d363360a2e1bce9509f16c78ce353a4770c5 0fe967c8774f1fa36afc8707 | |
41738b129bdd9c5a M Development/Source/TPN/TPN installer/Product.wxs |
C:\Documents and Settings\scollins\My Documents\Visual Studio 2010\Projects\libgit2\build\Debug [carlosmn +1 ~0 -0 !]> .
.\libgit2_clar.exe
TAP version 13
# *** attr::file ***
ok 1 - assign_variants
ok 2 - check_attr_examples
ok 3 - match_variants
ok 4 - simple_read
# *** attr::lookup ***
e 0x03298270 {mtime={...} head_oid={...} index_oid={...} ...} status_entry * | |
+ mtime {seconds=1331737193 nanoseconds=0 } git_index_time | |
+ head_oid {id=0x03298280 "" } _git_oid | |
+ index_oid {id=0x03298294 "Zvfc[ Ë,B“A¿/‘¸b" } _git_oid | |
+ wt_oid {id=0x032982a8 "Zvfc[ Ë,B“A¿/‘¸b" } _git_oid | |
status_flags 0 unsigned int | |
path 0x032982c0 "Development/Source/TPN/WCFTPN/WCFTPN/FactoryService/TPNGets.svc" char [1] | |
zero {id=0x0013e848 "" } _git_oid | |
+ id 0x0013e848 "" unsigned char [20] | |
head_zero 0 int |
Mar 16 19:30:21 masakari sm-mta[1880]: q2GNUL3F001880: from=<[email protected]>, size=2919, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=IPv4, relay=server.proking.de [88.198.44.83] (may be forged) | |
Mar 16 19:30:23 masakari sm-mta[1880]: q2GNUL3F001880: Milter add: header: X-Spam-Flag: YES | |
Mar 16 19:30:23 masakari sm-mta[1880]: q2GNUL3F001880: Milter add: header: X-Spam-Status: Yes, score=28.0 required=4.5 tests=ADVANCE_FEE_2_NEW_MONEY,\n\tADVANCE_FEE_3_NEW,ADVANCE_FEE_3_NEW_MONEY,ADVANCE_FEE_4_NEW,\n\tADVANCE_FEE_4_NEW_MONEY,ADVANCE_FEE_5_NEW,ADVANCE_FEE_5_NEW_MONEY,BAYES_05,\n\tFORM_FRAUD_3,FORM_FRAUD_5,FREEMAIL_FROM,FREEMAIL_REPLYTO,HK_SCAM_N3,\n\tLOTS_OF_MONEY,MONEY_FRAUD_3,MONEY_FRAUD_5,RCVD_IN_BL_SPAMCOP_NET,\n\tRCVD_IN_BRBL_LASTEXT,RCVD_IN_PSBL,RCVD_IN_SORBS_WEB,SPF_NEUTRAL,\n\tT_FILL_THIS_FORM_SHORT,T_FRT_BELOW2,US_DOLLARS_3 autolearn=spam version=3.3.1 | |
Mar 16 19:30:23 masakari sm-mta[1880]: q2GNUL3F001880: Milter: data, reject=550 5.7.1 Blocked by SpamAs |
Development\Source\GetNotes\GetNotes.suo | |
Untracked | |
Development\Source\GetNotes\GetNotes\bin\Debug\GetNotes.vshost.exe | |
Untracked | |
Development\Source\GetNotes\GetNotes\bin\Debug\GetNotes.vshost.exe.manifest | |
Untracked | |
Development\Source\GetNotes\GetNotes\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache | |
Untracked | |
Development\Source\GetNotes\GetNotesTest\GetNotesTest.csproj | |
Added, Missing |
var a = new List<string>{ "a", "b", "c", "d" }; | |
var b = new List<string>{"a","d","f","z"}; | |
// Find items that exist in both collections | |
foreach (String item in a.Intersect<string>(b)) | |
Console.WriteLine(item); | |
//Find items that only exist in b | |
foreach (String item in b.Where<string>(x => a.Contains(x) == false)) | |
Console.WriteLine(item); |