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; | |
| namespace StronglyTypedPipelines | |
| { | |
| public abstract class BasePipelineStep<INPUT, OUTPUT> : IPipelineStep<INPUT, OUTPUT> | |
| { | |
| public event Action<INPUT> OnInput; | |
| public event Action<OUTPUT> OnOutput; | |
| // note need for descendant types to implement this, not Process() |
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; | |
| namespace StronglyTypedPipelines | |
| { | |
| /// <summary> | |
| /// Base type for individual pipeline steps. | |
| /// Descendants of this type map an input value to an output value. | |
| /// The input and output types can differ. | |
| /// </summary> |
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 @tableName varchar(200) | |
| declare @columnName varchar(200) | |
| declare @nullable varchar(50) | |
| declare @datatype varchar(50) | |
| declare @maxlen int | |
| declare @sType varchar(50) | |
| declare @sProperty varchar(200) | |
| DECLARE table_cursor CURSOR FOR |
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
| <html> | |
| <head> | |
| <title>DataTables + yadcf + Google Maps</title> | |
| <script type="text/javascript" charset="utf8" src="http://maps.google.com/maps/api/js?libraries=geometry&v=3.22&key={YOUR_API_KEY}"></script> | |
| <script type="text/javascript" charset="utf8" src="https://code.jquery.com/jquery-1.12.0.min.js"></script> | |
| <script type="text/javascript" charset="utf8" src="http://cdn.datatables.net/1.10.11/js/jquery.dataTables.js"></script> | |
| <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.11/js/dataTables.bootstrap.min.js"></script> | |
| <script type="text/javascript" charset="utf8" src="maplace.min.js"></script> | |
| <script type="text/javascript" charset="utf8" src="jquery.dataTables.yadcf.min.js"></script> | |
| <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> |
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
| Response.ContentType = "application/pdf"; | |
| Response.AddHeader("content-disposition", "attachment;filename=Export.pdf"); | |
| Response.Cache.SetCacheability(HttpCacheability.NoCache); | |
| StringWriter sw = new StringWriter(); | |
| HtmlTextWriter hw = new HtmlTextWriter(sw); | |
| HtmlForm frm = new HtmlForm(); | |
| GrdView.Parent.Controls.Add(frm); | |
| frm.Attributes["runat"] = "server"; | |
| frm.Controls.Add(GrdView); | |
| frm.RenderControl(hw); |
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.Concurrent; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| namespace ProducerConsumer | |
| { | |
| /// <summary> | |
| /// Queue Service | |
| /// </summary> |
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
| #!/bin/sh | |
| # sips resample images | |
| sips --resampleHeightWidth 100 80 *.png | |
| sips --resampleWidth 80 *.png | |
| sips --resampleHeight 80 *.png |
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 SampleApi.Results; | |
| using System; | |
| using System.Net.Http; | |
| using System.Web.Http; | |
| namespace SampleApi | |
| { | |
| public static class IHttpActionResultExtensions | |
| { | |
| public static IHttpActionResult With(this IHttpActionResult inner, string responsePhrase = null, Action<HttpResponseMessage> responseAction = null) |
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
| namespace WebRole.Controllers | |
| { | |
| public class MyController : ApiController | |
| { | |
| private readonly ICache cache; | |
| private readonly IMyRequestQueue myRequestQueue; | |
| public MyController( | |
| ICache cache, |
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
| /// <summary> | |
| /// Execute the function with retries on throttle | |
| /// </summary> | |
| /// <typeparam name="V"></typeparam> | |
| /// <param name="client"></param> | |
| /// <param name="function"></param> | |
| /// <returns></returns> | |
| private static async Task<V> ExecuteWithRetries<V>(DocumentClient client, Func<Task<V>> function) | |
| { | |
| TimeSpan sleepTime = TimeSpan.Zero; |