Some slides were not posted.
Speaker: Jessica Kerr
const R = require('ramda'); | |
const dbFn = require('./sql-db'); | |
const shipmentModelFn = require('shipment-model'); | |
const db = dbFn(); | |
const shipmentModel = shipmentModelFn(db.create); | |
// provide shipmentModel to the controller or something... |
// @flow | |
import React from 'react'; | |
import R from 'ramda'; | |
import { fieldFn } from '../field'; | |
import { addField, onSave } from '../actions/object-type-editor'; | |
import type { | |
ObjectTypeEditorFormArg, | |
ObjectTypeEditorFormComp, | |
} from '../components/ObjectTypeEditorForm'; | |
const mapIdx = R.addIndex(R.map); |
const createListItem = (key, C, props, i) => { | |
return <li key={key + '-' + i}> <C {...props} /> </li>; | |
}; |
// the way you'd normally think to do it. This requires mocking out writeFileSync to test | |
var fs = require('fs'); | |
function writeXmlToFile(fileName, data) { | |
// do stuff with data | |
// make data into xml | |
var xml = toXml(data); | |
fs.writeFileSync(fileName, {encoding: 'utf-8'}, xml); | |
} |
package com.myapp.filters; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
describe('my category', function() { | |
beforeEach(module('LocalForageModule')); | |
it('does stuff', function() { | |
inject(function($localForage) { | |
// test stuff goes here | |
}); | |
}); | |
}); |
/******************************************************************************* | |
The MIT License (MIT) | |
Copyright (c) 2015 Logan Barnett ([email protected]) | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
// how it was done before we saw the light | |
var hats = ['cone', 'horse']; | |
var buzzers = ['foo', 'bar', 'bazz']; | |
var drinkFn = function() { | |
drunkify(); | |
} | |
var partyObj = {}; | |
partyObj.throw = function() { | |
// reach outside of our local scope to get what we need. Ick! |
Some slides were not posted.
Speaker: Jessica Kerr
it("check for untranslated strings", function() { | |
// WIP for the new version | |
const textRegexp = /.+/; | |
const templateBindingRegexp = /^({{.+}})$/; | |
const results = _.map(tmplArray, $tc.get) // load the template from the path | |
.map(angular.element) // process the template data into Angular's DOM | |
.map((e) => e.text()) // remove all markup - only text should remain | |
.map((t) => t.trim()) // remove whitespace | |
// strip out bindings - they are dynamic and thus translated. Probably. | |
.map((t) => t.replace(templateBindingRegexp, '')) |