Skip to content

Instantly share code, notes, and snippets.

View james-gibson's full-sized avatar
:shipit:
Exiting VSCode with :wq

James Gibson james-gibson

:shipit:
Exiting VSCode with :wq
View GitHub Profile
@james-gibson
james-gibson / gist:3839713
Created October 5, 2012 13:07
Stackoverflow Dependency question

My colleagues and I are working to develop a more robust domain model for an application we are working on. The core entities that we are working with are "World", "Region", "Installation", and "Facility". The relationship to one another can be drawn as:

![enter image description here][1]

This means that our World object contains a collection of Regions, the Region object contains a collection of Installations, and the Installation object contains a collection of Facilities. This can be modeled as such:

![enter image description here][2]

With this design each collection is responsible for loading the appropriate objects. This includes executing an web service to obtain the proper objects. The owner of each collection is responsible for telling its collection when load itself. For instance:

<amcharts:AmGraph
id="icGraph"
fillAlphas="[1]"
fillColors="[mbtuUsageColor]"
lineAlpha="0"
title=""
type="column"
valueAxis="{contributionAxis}"
valueField="percentOfInstallationMbtuUsage"
/>
<amcharts:AmGraph
id="icGraph"
fillAlphas="[1]"
fillColors="[mbtuUsageColor]"
lineAlpha="0"
title=""
type="column"
valueAxis="{contributionAxis}"
valueField="percentOfInstallationMbtuUsage"
/>
@james-gibson
james-gibson / mapServer Error.txt
Created November 7, 2012 16:03
result "{"currentVersion":10.01,"error":{"code":400,"message":"Unable to complete operation.","details":["Service 'World_Imagery' of type 'MapServer' does not exist or is inaccessible."]}}"
Main Thread (Suspended: TypeError: Error #1034: Type Coercion failed: cannot convert mx.rpc::Fault@bf8e3c1 to mx.rpc.events.FaultEvent.)
mx.rpc::AsyncResponder/fault
com.esri.ags.tasks::BaseTask/handleError
com.esri.ags.tasks::BaseTask/handleResult
Function/com.esri.ags.tasks:BaseTask/esri_internal:sendURLVariables2/com.esri.ags.tasks:result
mx.rpc::Responder/result
mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult
mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders
HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler
@james-gibson
james-gibson / gist:5687817
Created May 31, 2013 20:38
lones block changes
{
"blockSummary": {
"0": {
"placed": 5,
"destroyed": 150
},
"1": {
"placed": 621,
"destroyed": 0
},
@james-gibson
james-gibson / jsonExample
Created October 10, 2013 22:17
Describing chart data for a bar or line series chart
{
"data": [
{
"series": {
"seriesID": "current",
"values": [
{
"value": 90,
"info": "October Usage was 90mbtu"
},
@james-gibson
james-gibson / tabularExample
Created October 10, 2013 22:30
Prototyped attempt at describing a bar/line series chart through a tabular like format using nested arrays.
[["month","current","prior","current-info","prior-info"],
["October",90,55,"October Usage was 90mbtu","October Usage was 55mbtu"],
["November",null,75,"November Usage is unavailable","November Usage was 75mbtu"],
["December",null,88,"December Usage is unavailable","December Usage was 88mbtu"],
["January",89,78,"January Usage was 89mbtu","January Usage was 78mbtu"]]
@james-gibson
james-gibson / gist:7934166
Created December 12, 2013 19:44
JS array goof
[
null,
null,
null,
null,
null,
null,
null,
null,
null,
@james-gibson
james-gibson / localhost:3001
Created December 18, 2013 17:54
Unauthenticated
{
"version": "0.1",
"about": "This API exists as a description of James Gibson and his skills",
"why": "PDF's are so 2001",
"authentication": {
"URL": "http://localhost:3001/api/authenticate",
"queryParameters": [
"user",
"key"
]
@james-gibson
james-gibson / GET: api
Created December 18, 2013 17:55
Unathenticated
{
"message": "Invalid User and Key",
"code": 401
}