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
namespace TinyIoCDemo | |
{ | |
// This is the interface for my aspect - the dependency for my classes. | |
public interface IAspectDependency | |
{ | |
string GetGreeting(); | |
} | |
// And here is an implementation. | |
public class GreetingAspect : IAspectDependency |
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
-- This is the top few lines of my package header, showing the type declarations. | |
create or replace package aims_migration as | |
type r_aims_wo_item is record(ref_identifier varchar(50), geometry sdo_geometry); | |
type t_aims_wo_item is table of r_aims_wo_item; | |
-- Rest of the package spec... | |
end aims_migration |
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.Configuration; | |
using GeomaticTechnologies.Databases; | |
using GeomaticTechnologies.Security.Apm; | |
using GeomaticTechnologies.Security.Apm.ClauseGenerators; | |
using GeomaticTechnologies.Security.Apm.DataServices; | |
using TinyIoC; | |
namespace NewApmDemo | |
{ | |
public static class IoC |
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
// This code requires the following assemblies to be referenced: | |
// ServiceStack.Common | |
// ServiceStack.Interfaces | |
// ServiceStack.ServiceInterface | |
// GeomaticTechnologies.Eis.Yvw.ServiceModel | |
using System.Collections.Generic; | |
using System.Net; | |
using GeomaticTechnologies.Eis.Yvw.ServiceModel; | |
using ServiceStack.Service; |
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
public static class GuidFactory | |
{ | |
public static string Last { get; set; } | |
public static string Next | |
{ | |
get | |
{ | |
Last = System.Guid.NewGuid().ToString().Replace("-", string.Empty); | |
return Last; |
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
require 'sinatra/base' | |
require 'sinatra/async' | |
class MyApp < Sinatra::Base | |
register Sinatra::Async | |
configure do | |
set :raise_errors, false | |
set :show_exceptions, false | |
enable :logging |
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
require 'rubygems' | |
require 'sinatra' | |
include FileUtils::Verbose | |
get '/up' do | |
erb :form | |
end | |
post '/up' do | |
tmpfile = params[:file][:tempfile] |
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
// Method One. | |
var disp = WindowManager.DefaultDisplay; | |
var height = disp.Height; | |
var width = disp.Width; | |
Console.WriteLine("Default Display: {0}x{1}", width, height); | |
// Method Two. |
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
// Payload type extending a slice of items. | |
type Payload []*itemType | |
// Use a pool of Goroutines to run the input action against all the items, with the input concurrency factor. | |
func (payload Payload) ExecuteAction(action func(*itemType), concFactor int) { | |
itemsChl := make(chan *itemType) | |
wg := new(sync.WaitGroup) | |
wg.Add(concFactor) | |
// Set up the pool with a number of Goroutines equal to our concurrency factor. |
OlderNewer