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
open System; | |
open System.IO; | |
open Microsoft.FSharp.Collections; | |
open System.Diagnostics; | |
let projectDirectory = Directory.GetCurrentDirectory() | |
let args = Environment.GetCommandLineArgs(); | |
let watcher = new FileSystemWatcher(projectDirectory) |
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
void Main() | |
{ | |
var f = new DogBuilder(); | |
f.GetInstance().Dump(); | |
} | |
// Define other methods and classes here | |
public class Dog : Entity<Dog> | |
{ | |
public string Name {get;set;} |
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
open System; | |
open System.IO; | |
open Microsoft.FSharp.Collections; | |
//setup the watcher and events | |
let watcher = new FileSystemWatcher(@"C:\Users\brians\Python") | |
let logFileInfo (args:FileSystemEventArgs) = Console.WriteLine(args.Name) | |
let events = [watcher.Changed; watcher.Created; watcher.Deleted] |> List.iter(fun e -> e.Add(logFileInfo)) | |
//read from console |
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
void Main() | |
{ | |
//Create Session Provider With CurrentSessionContext | |
var provider = new SessionFactoryProvider<ThreadStaticSessionContext>( | |
MsSqlConfiguration.MsSql2008.ConnectionString("server=.\\SQLEXPRESS;database=NH3BeginnersGuide;Integrated Security=SSPI"), | |
typeof(SessionFactoryProvider<>), | |
(cfg) => { | |
var schemaExport = new SchemaExport(cfg); | |
schemaExport.Drop(false, true); | |
schemaExport.Create(false,true); |
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
Fluently.Configure() | |
.Database(MsSqlConfiguration.MsSql2008.ConnectionString("server=.\\SQLEXPRESS;database=NH3BeginnersGuide;Integrated Security=SSPI")) | |
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<SessionFactoryProvider>()) | |
.ExposeConfiguration((cfg) => { | |
var schemaExport = new SchemaExport(cfg); | |
schemaExport.Drop(false, true); | |
schemaExport.Create(false,true); | |
}) | |
.BuildConfiguration() | |
.CurrentSessionContext<ThreadStaticSessionContext>() |
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
jQuery.noConflict(); | |
(function() { | |
var $ = this.jQuery, | |
MyNamespace = {}; | |
MyNamespace.SuperAwesomeFunction = function() { | |
//do awesome stuff | |
}; | |
$(function() { | |
MyNamespace.SuperAwesomeFunction(); |
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
(function(exports, undefined){ | |
var Wulib = {}, | |
activeDoc = app.activeDocument; | |
var ArtBoard = function(board) { | |
this.board = board; | |
}; | |
ArtBoard.prototype = { | |
addPadding:function(val) { |
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
SELECT DISTINCT p.ID | |
FROM wp_posts p | |
LEFT JOIN wp_term_relationships tr ON tr.object_id = p.ID | |
LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_id | |
LEFT JOIN wp_terms t ON tt.term_id = t.term_id | |
WHERE p.post_type = "sermon" | |
AND p.post_status = "publish" | |
ORDER BY p.ID ASC |
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
void Main() | |
{ | |
var genericType = typeof(GenericClass<>); | |
Type[] t = { typeof(int) }; | |
var toCreate = genericType.MakeGenericType(t); | |
object o = Activator.CreateInstance(toCreate, "brian", "scaturro"); | |
o.Dump(); | |
} | |
class GenericClass<T> |
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
--Employees | |
CREATE TABLE Employees( | |
Id int not null, | |
LastName nvarchar(50) not null, | |
MiddleName nvarchar(50), | |
FirstName nvarchar(50) not null, | |
primary key(Id) | |
) | |
GO |