CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of Action
C#
//Attempted to convert from http://www.ics.uci.edu/~eppstein/numth/frap.c
 
 public static class ContinuedFractions
    {
        public static Fraction FindApproximation(double numberToApprox, long maxDenominator)
        {
 
            var result = new Fraction();
 
            long[,] m = new long[2, 2];
by Jason Rowe   December 13, 2010 @ 4:25pm
145 Views
no comments
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Page</title>
 
    <script type="text/javascript">
 
     //For more info http://www.ics.uci.edu/~eppstein/numth/frap.c
 
      function FindApproximation(numberToApprox, maxDenominator)
by Jason Rowe   December 13, 2010 @ 4:22pm
200 Views
no comments
 
C#
/// <summary>
/// Extracts a string from between a pair of delimiters. Only the first 
/// instance is found.
/// </summary>
/// <param name="source">Input String to work on</param>
/// <param name="StartDelim">Beginning delimiter</param>
/// <param name="endDelim">ending delimiter</param>
/// <param name="CaseInsensitive">Determines whether the search for delimiters is case sensitive</param>
/// <returns>Extracted string or ""</returns>
public static string ExtractString(string source, string beginDelim,
by Rick Strahl   July 23, 2010 @ 5:20pm
302 Views
no comments
 
C#
public IQueryable<T> Query(Expression<Func<T, bool>> predicate)
{
    IQueryable<T> returnValue;
    using (ITransaction transaction = _session.BeginTransaction())
    {
        try
        {
            returnValue = _session.Linq<T>().Where(predicate);
            transaction.Commit();
        }
by Chris Brandsma   May 14, 2010 @ 2:09pm
273 Views
no comments
 
SQL
set nocount on
 
-- build a working table called x
 
if (object_id('x') is not null) 
    drop table x
create table x (col1 varchar(50))
 
declare @sql nvarchar(500)
set @sql = 'insert into x select ''test'';'
by Jerry Nixon   April 09, 2010 @ 2:47pm
374 Views
1 comments
 
C#
// handle the completed event 
_Service.MyMethodCompleted += (s, e) =>
{
    // an Action is just a built-in delegate 
    Action _Action = () =>
    {
    // access the UI here
    this.MyLabel.Text = e.Result;
    }
    // change the thread context
by Jerry Nixon   March 05, 2010 @ 8:41am
Tags: C#, Thread, Action
428 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate