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
const { JSDOM } = require('jsdom') | |
const jsdom = new JSDOM('<!doctype html><html><body></body></html>') | |
const { window } = jsdom; | |
const { mount, render, shallow } = require('enzyme') | |
global.mount = mount; | |
global.render = render; | |
global.shallow = shallow; | |
let exposedProps = ['window', 'navigator', 'document'] |
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
// This file is written in ES5 since it's not transpiled by Babel. | |
/* This file does the following: | |
1. Sets Node environment variable | |
2. Registers babel for transpiling our code for testing | |
3. Disables Webpack-specific features that Mocha doesn't understand. | |
4. Requires jsdom so we can test via an in-memory DOM in Node | |
5. Sets up global vars that mimic a browser. | |
This setting assures the .babelrc dev config (which includes | |
hot module reloading code) doesn't apply for tests. | |
But also, we don't want to set it to production here for |
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
ROUNDTRIP PRICES: | |
Calgary (YYC): | |
Albuquerque (ABQ) - $276 | |
Atlanta (ATL) - $273 | |
Austin (AUS) - $297 | |
Billings (BIL) - $265 | |
Boston (BOS) - $295 | |
Bozeman (BZN) - $253 |
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
class FilterAdd extends Filter { | |
constructor(props) { | |
super(props); | |
this.state = { | |
Filter: { | |
Name: "", | |
Field: 0, | |
Operation: 0, | |
Arguments: [""] | |
} |
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
class FilterDisplay extends Filter { | |
constructor (props) { | |
super(props); | |
} | |
render() { | |
console.log(this.fieldOptions); // this doesn't work | |
return ( | |
<div className="filter"> | |
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
class FilterDisplay extends React.Component { | |
constructor (props) { | |
super(props); | |
} | |
render = () => { | |
console.log(this.fieldOptions); // this doesn't work | |
return ( | |
<div className="filter"> | |
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
public class Filter | |
{ | |
public enum Operations | |
{ | |
Equals = 1, | |
NotEquals = 2, | |
GreaterThan = 3, | |
LessThan = 4, | |
GreaterThanEq = 5, | |
LessThanEq = 6, |
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
private void RainbowBullets(PdfContentByte overContent, BaseColor color, float fontSize, float startX, float startY, string[] list, BaseFont font) | |
{ | |
List<BaseColor> colors = RainbowColors(); | |
ColumnText column = new ColumnText(overContent); | |
column.SetSimpleColumn(startX + 15, 0, startX + 250, startY + 20); | |
string item; | |
for (int index = 0; index < list.Length; index++) { | |
item = list[index]; | |
overContent.RoundRectangle(startX, startY - 2.5, 8, 8, 2); | |
overContent.SetColorFill(colors[index % colors.Count]); |
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
public class SomeModel | |
{ | |
public int[] Features { get; set; } | |
public string[] SelectedFeatures { get { | |
var collection = new string[]{ | |
"apple", | |
"orange", | |
"banana", | |
"grape", | |
"kiwi" |
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
private List<string> GetAllImages() | |
{ | |
List<dynamic> foo = new List<dynamic>(){ | |
new { VendorID = "514213c4bd686310a061e741", Logo = "1800flowers_logo.jpg" }, | |
new { VendorID = "56d60913c65af00ee46d60c3", Logo = "amc_logo.jpg" }, | |
new { VendorID = "5331ecf93019cd0670c649dd", Logo = "applebees_logo.jpg" }, | |
new { VendorID = "5142173abd686310a061e784", Logo = "avis_logo.jpg" }, | |
new { VendorID = "c3055640", Logo = "bedbathbeyond_logo.jpg" }, | |
new { VendorID = "l38606", Logo = "bestbuy_logo.jpg" }, | |
new { VendorID = "514377c1bd686309bcb72ca2", Logo = "budget_logo.jpg" }, |
NewerOlder