These work well when a small graph is needed in a small space. Includes minimal mouseover interaction.
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
<ul class="list-unstyled"> | |
<li class="market-item"> | |
<div class="market-item-image"> | |
<div class="market-item-circle circle-image"> | |
<img src="filename_of_image" width="40" height="40"/> | |
</div> | |
</div> | |
<h4 class="market-item-title primary-color"> |
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
1) include <script src="{{STATIC_URL}}v2/js/backgrid-custom.js" type="text/javascript"></script> after the final backgrid js file. | |
2) use the following to render a filter: | |
var processGroupFilter = new simpleFilter({ | |
collection: this.collection, | |
placeholder: "Search Process Groups", | |
fields: ["name", "template", "target"]; | |
}); |
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
initialize: function() { | |
this.submit = _.debounce(this.submit, 300); | |
}, | |
filterOnKeyUp: function(e) { | |
this.submit(); | |
}, |
####D3 "force" layout with nodes situated around a circle
This network graph uses the D3 force layout to draw nodes and links, but instead of using d3.force() to find the best node positions, we draw an invisible arc and evenly places nodes along the circumference.
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
/* | |
showMore() Adds more models to the first page of a pageable collection. | |
It does this by resetting the collection to the current collection plus a number of models | |
from fullCollection, and increases the page size to the number of currently-visible models. | |
*/ | |
Backbone.ShowMoreCollection = Backbone.PageableCollection.extend({ | |
showMore: function(num) { | |
var num = num || 10; | |
var state = this.state; | |
var pageNum = state.currentPage; |
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
var TagAdder = (function(regExp, openTag, closeTag) { | |
var regExp = regExp || /(?:)/gi; | |
var openTag = openTag || '<span class="highlighted">'; | |
var closeTag = closeTag || '</span>'; | |
function spliceSlice(str, index, count, add) { | |
return str.slice(0, index) + (add || "") + str.slice(index + count); | |
} | |
return { |
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
Choose the letter that best represents the time statement given in quotes. | |
If none of the answers are correct, answer 'none' or tell me what a better option would be. | |
If right now is Feb 19 10:14 AM... | |
1. "Last Hour" | |
A) Feb 19 9:00 AM - Feb 19 10:00 AM | |
B) Feb 19 9:14 AM - Feb 19 10:14 AM | |
2. "Past Hour" |
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
var RandomSize = Backbone.Collection.extend({ | |
pageSize: 25, | |
nextPage: 1, | |
fullCollection: undefined, | |
url: '/forensics/api/random/', | |
parse: function(resp) { | |
return resp.data | |
}, | |
getNextPage: function() { | |
var self = this; |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: deep-green; icon-glyph: tree; | |
// change to the station id closest to you. station id can be found in the purple air url when you click on a sensor circle | |
// e.g. https://www.purpleair.com/map?opt=1/i/mAQI/a10/cC0&select=21057 | |
const purpleAirStationID = 21057 | |
let items = await loadItems() | |
let widget = await createWidget(items) | |
// Check if the script is running in |