This file contains 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.SqlServer.TransactSql.ScriptDom; | |
using ServiceStack.OrmLite.SqlServer; | |
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Text; | |
using System.Threading.Tasks; |
This file contains 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
<Query Kind="Program"> | |
<NuGetReference>MedallionShell</NuGetReference> | |
<Namespace>System.Threading.Tasks</Namespace> | |
<Namespace>Medallion.Shell</Namespace> | |
<Namespace>Medallion.Shell.Streams</Namespace> | |
</Query> | |
DumpContainer dc; | |
async Task Main() | |
{ var input = @"D:\Temp\fieldtest.mxf".Dump("input file"); |
This file contains 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
<# | |
# Run these two lines to download the Microsoft Powershell Tools. | |
Project URL: https://github.com/Microsoft/ReportingServicesTools | |
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" | |
Invoke-Expression (Invoke-WebRequest https://raw.githubusercontent.com/Microsoft/ReportingServicesTools/master/Install.ps1) | |
#> |
This file contains 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
<# | |
# Run these two lines to download the Microsoft Powershell Tools. | |
Project URL: https://github.com/Microsoft/ReportingServicesTools | |
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" | |
Invoke-Expression (Invoke-WebRequest https://raw.githubusercontent.com/Microsoft/ReportingServicesTools/master/Install.ps1) | |
#> |
This file contains 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
PdfReader pdf = new PdfReader("in.pdf"); | |
PdfStamper stp = new PdfStamper(pdf, new FileOutputStream("c:\\out.pdf")); | |
PdfWriter writer = stp.getWriter(); | |
Image img = Image.getInstance("image.png"); | |
PdfDictionary pg = pdf.getPageN(1); | |
PdfDictionary res = | |
(PdfDictionary)PdfReader.getPdfObject(pg.get(PdfName.RESOURCES)); | |
PdfDictionary xobj = | |
(PdfDictionary)PdfReader.getPdfObject(res.get(PdfName.XOBJECT)); | |
if (xobj != null) { |
This file contains 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.ServiceModel; | |
using System.ServiceModel.Channels; | |
namespace WCFClient | |
{ | |
[ServiceContract] | |
public interface IStringReverser | |
{ | |
[OperationContract] |
This file contains 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 ServiceStack.DataAnnotations; | |
using ServiceStack.OrmLite; | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace SSOrmLiteTest |
This file contains 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
factory('sse', ['$rootScope', '$http', function($rootScope, $http) { | |
// https://gist.github.com/migajek | |
var splitOnFirst = function (s, c) { if (!s) return [s]; var pos = s.indexOf(c); return pos >= 0 ? [s.substring(0, pos), s.substring(pos + 1)] : [s]; }; | |
return { | |
start: function(handlers) { | |
var opt = {}; | |
var sse = new EventSource('/event-stream'); | |
sse.addEventListener('message', function(e) { | |
var parts = splitOnFirst(e.data, ' '); | |
var selector = parts[0]; |
This file contains 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> | |
<title>tableToExcel Demo</title> | |
<script src="tableToExcel.js"></script> | |
</head> | |
<body> | |
<h1>tableToExcel Demo</h1> | |
<p>Exporting the W3C Example Table</p> |
This file contains 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
private void GetTemperatureAndHumidity(out double RH, out double T_C) | |
{ | |
RH = 0d; | |
T_C = 0d; | |
try | |
{ | |
byte[] write = new byte[] { (0x27 << 1) | 0x01 }; | |
byte[] read = new byte[4]; | |
// Inspired by http://www.phanderson.com/arduino/hih6130.html |
NewerOlder