Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

James Gibson james-gibson

🏠
Working from home
View GitHub Profile
@james-gibson
james-gibson / gist:3839713
Created Oct 5, 2012
Stackoverflow Dependency question
View gist:3839713

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:

View graph definition
<amcharts:AmGraph
id="icGraph"
fillAlphas="[1]"
fillColors="[mbtuUsageColor]"
lineAlpha="0"
title=""
type="column"
valueAxis="{contributionAxis}"
valueField="percentOfInstallationMbtuUsage"
/>
View graph definition
<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 Nov 7, 2012
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."]}}"
View mapServer Error.txt
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
lones block changes
View gist:5687817
{
"blockSummary": {
"0": {
"placed": 5,
"destroyed": 150
},
"1": {
"placed": 621,
"destroyed": 0
},
@james-gibson
james-gibson / jsonExample
Created Oct 10, 2013
Describing chart data for a bar or line series chart
View jsonExample
{
"data": [
{
"series": {
"seriesID": "current",
"values": [
{
"value": 90,
"info": "October Usage was 90mbtu"
},
@james-gibson
james-gibson / tabularExample
Created Oct 10, 2013
Prototyped attempt at describing a bar/line series chart through a tabular like format using nested arrays.
View tabularExample
[["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"]]
View gist:7934166
[
null,
null,
null,
null,
null,
null,
null,
null,
null,
View localhost:3001
{
"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"
]
View GET: api
{
"message": "Invalid User and Key",
"code": 401
}