Skip to content

Instantly share code, notes, and snippets.

@crowcoder
crowcoder / BlobWorker.cs
Created June 11, 2014 11:21
Azure Blob Storage Operations
using System;
using System.IO;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
using Microsoft.WindowsAzure.Storage.Auth;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
@crowcoder
crowcoder / OutputParamsCSharp
Created May 14, 2015 22:37
How to use OUTPUT parameters in ADO.Net c#
using System;
namespace OutputParamsInCSharp
{
class Program
{
static void Main(string[] args)
{
System.Data.SqlClient.SqlConnectionStringBuilder connectionBuilder = new System.Data.SqlClient.SqlConnectionStringBuilder();
connectionBuilder.DataSource = "(localdb)\\v11.0";
@crowcoder
crowcoder / TSQLOutput
Created May 14, 2015 22:43
T-SQL Stored Procedure with OUTPUT Parameters
/*
Unit Test:
DECLARE @id int;
DECLARE @FruitName_OUT NVARCHAR(50);
DECLARE @FruitColor_OUT NVARCHAR(50);
DECLARE @FruitGrowsOn_OUT int;
DECLARE @FruitIsYummy_OUT bit;
EXECUTE dbo.[GetFruitByID] 1, @FruitName_OUT OUTPUT, @FruitColor_OUT OUTPUT, @FruitGrowsOn_OUT OUTPUT, @FruitIsYummy_OUT OUTPUT
using System;
using System.IO;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
namespace Blobber
{
public class BlobWorker
{
public string ConxnStr { get; set; }
StringBuilder sb = new StringBuilder();
foreach (DictionaryEntry de in Environment.GetEnvironmentVariables())
{
sb.AppendFormat("{0} : {1}", de.Key.ToString(), de.Value.ToString()).AppendLine();
}
Console.WriteLine(sb.ToString());
using Microsoft.Azure.WebJobs;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
namespace TestWebjob
{
public class Functions
{
var myTable;
// The initialize function is required for all apps.
Office.initialize = function (reason) {
$(document).ready(function () {
myTable = new Office.TableData();
myTable.headers = ["First Name", "Last Name", "Grade"];
myTable.rows = [["Brittney", "Booker", "A"], ["Sanjit", "Pandit", "C"], ["Naomi", "Peacock", "B"]];
var myTable;
// The initialize function is required for all apps.
Office.initialize = function (reason) {
$(document).ready(function () {
myTable = new Office.TableData();
myTable.headers = ["First Name", "Last Name", "Grade"];
myTable.rows = [["Brittney", "Booker", "A"], ["Sanjit", "Pandit", "C"], ["Naomi", "Peacock", "B"]];
var myTable;
// The initialize function is required for all apps.
Office.initialize = function (reason) {
$(document).ready(function () {
myTable = new Office.TableData();
myTable.headers = ["First Name", "Last Name", "Grade"];
myTable.rows = [["Brittney", "Booker", "A"], ["Sanjit", "Pandit", "C"], ["Naomi", "Peacock", "B"]];
//in the game's preload function you load the image like any other
game.load.image('bkgrnd', 'sprites/background.png');
/*Then you add the tileSprite in create(). This constructor's parameters are, in order:
0 - position of the image on the X coordinate of the game
0 - position of the image on the Y coordinate of the game
640 - Width of the tile
480 - Height of the tile
bkgrnd - key you gave to the image when you loaded it in preload()
see: http://phaser.io/docs/2.4.4/Phaser.TileSprite.html */