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
//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 */ |
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> | |
<!-- stuff... --> | |
</head> | |
<body> | |
<div id="gameDiv"></div> | |
<script src="https://newupwaititsfun.z13.web.core.windows.net/frog/game.js" integrity="sha384-qoRzVFhcu3MPqU4+hUIAG45mJWAXYwf1QDlkHQY2519KjBjFyETk7mTDV/wY9AD1" | |
crossorigin="anonymous"></script> | |
</body> |
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.Collections; | |
using System.Collections.Generic; | |
namespace ConsoleApplication4 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
static void Main(string[] args) | |
{ | |
SqlConnectionStringBuilder bldr = new SqlConnectionStringBuilder(); | |
bldr.DataSource = "(localdb)\\DEV"; | |
bldr.InitialCatalog = "DbParams"; | |
bldr.ApplicationName = "ParameterBehavior"; | |
bldr.IntegratedSecurity = true; | |
using (SqlConnection con = new SqlConnection(bldr.ConnectionString)) | |
using (SqlCommand cmd = con.CreateCommand()) |
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 static void InputWithNoDefault(SqlCommand cmd) | |
{ | |
cmd.CommandType = CommandType.StoredProcedure; | |
cmd.CommandText = "usp_Input_No_Default"; | |
SqlParameter par = new SqlParameter("@param1", SqlDbType.VarChar); | |
par.Direction = ParameterDirection.Input; | |
par.Value = "Foo"; | |
cmd.Parameters.Add(par); | |
} |
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
CREATE PROCEDURE [dbo].[usp_Input_No_Default] | |
@param1 varchar(50) | |
AS | |
SELECT @param1; | |
RETURN 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
private static void InputWithNoDefault_NullValue(SqlCommand cmd) | |
{ | |
cmd.CommandType = CommandType.StoredProcedure; | |
cmd.CommandText = "usp_Input_No_Default"; | |
SqlParameter par = new SqlParameter("@param1", SqlDbType.VarChar); | |
par.Direction = ParameterDirection.Input; | |
par.Value = null; | |
cmd.Parameters.Add(par); | |
} |
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 static void InputWithNoDefault_DBNullValue(SqlCommand cmd) | |
{ | |
cmd.CommandType = CommandType.StoredProcedure; | |
cmd.CommandText = "usp_Input_No_Default"; | |
SqlParameter par = new SqlParameter("@param1", SqlDbType.VarChar); | |
par.Direction = ParameterDirection.Input; | |
par.Value = DBNull.Value; | |
cmd.Parameters.Add(par); | |
} |
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
CREATE PROCEDURE [dbo].[usp_Input_Has_Default] | |
@param1 varchar(50) = 'I''m a default value' | |
AS | |
SELECT @param1; | |
RETURN 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
private static void InputNullWithDefault(SqlCommand cmd) | |
{ | |
cmd.CommandType = CommandType.StoredProcedure; | |
cmd.CommandText = "usp_Input_Has_Default"; | |
SqlParameter par = new SqlParameter("@param1", SqlDbType.VarChar); | |
par.Direction = ParameterDirection.Input; | |
par.Value = null; | |
cmd.Parameters.Add(par); | |
} |