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
var http = require("http"), | |
url = require("url"); | |
function unshortenUrl(unshortedUrl, returnFunction) { | |
var urlObj = url.parse(unshortedUrl); | |
var options = { | |
host: urlObj.host, | |
port: urlObj.port, | |
path: urlObj.pathname | |
}; |
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
-5-----0--0--5-----0- | |
-7--6--5--5--7--3--5- | |
-6--7--6--6--6--4--6- | |
-7--7--7--5--7--4--7- | |
-5--x--x--x--5--x--x- | |
----7--5--5-----3--5- |
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
{:ssl-client-cert nil, :remote-addr \"127.0.0.1\", :scheme :http, :context \"/file-sharing-service/files\", :multipart-params {}, :request-method :post, :query-string \"\", :route-params {}, :content-type \"text/plain; charset=UTF-8\", :path-info \"/\", :uri \"/file-sharing-service/files\", :server-name \"accounting-app1-staging.snc1\", :params {}, :headers {\"user-agent\" \"Apache-HttpClient/4.2.2 (java 1.5)\", \"host\" \"accounting-app1-staging.snc1:5000\", \"content-type\" \"text/plain; charset=UTF-8\", \"content-length\" \"8347\", \"user-uuid\" \"26c62164-d71f-48e8-8854-e650f36620b8\", \"accept-encoding\" \"gzip, deflate\", \"connection\" \"close\"}, :content-length 8347, :server-port 5000, :character-encoding \"UTF-8\", :body #<ReusableInputStream org.immutant.web.ReusableInputStream@5de69e66>} | |
{:ssl-client-cert nil, :remote-addr \"10.20.32.17\", :scheme :http, :context \"/file-sharing-service/files\", :multipart-params {\"file-data\" {:size 8125, :tempfile #<File /tmp/ring-multipart-6304585165691814722 |
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
App.FormRoute = Ember.Route.extend | |
model: (params)-> @store.get('form', params.id) | |
renderTemplate: (controller, model)-> | |
this.render "forms/#{model.get('formVersion')}/#{model.get('formName')}" |
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
AuthRoute = Ember.Route.extend | |
authorize: (-> | |
@transitionTo 'login' unless @modelFor('application') | |
).on('willTransition') | |
## Which is the same as.... | |
AuthRoute = Ember.Route.extend | |
willTransition: -> |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'input', | |
attributeBindings: ['type', 'accept', 'multiple'], | |
type: 'file', | |
multiple: false, | |
initialize: function() { | |
this.$().on('change', function(e) { | |
this.sendAction('on-change', e.currentTarget.files); |
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
var get = Ember.get; | |
var run = Ember.run; | |
/** | |
* Ember select-2 component wrapping the jQuery select2 plugin while | |
* respecting Ember data bindings and getter/setter methods on the content. | |
* | |
* Terminology: | |
* - Value: The currently selected value(s). Propagated to controllers etc. | |
* through the "value=..."" binding. Types: |
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
"// noprotect"; | |
var a = function() { | |
'use strict'; | |
var examples = [ | |
{inputs: {a: -1, b: -1}, output: -1}, | |
{inputs: {a: -1, b: 1}, output: -1}, | |
{inputs: {a: 1, b: -1}, output: 1}, | |
{inputs: {a: 1, b: 1}, output: -1}, | |
]; |
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
[ | |
{ | |
"w0": -0.7201748196966946, | |
"w1": 0.5520502417348325, | |
"w2": -0.6326597002334893 | |
}, | |
{ | |
"w0": -0.3573158294893801, | |
"w1": 0.8063981863670051, | |
"w2": -0.53787044249475 |
OlderNewer