Skip to content Skip to sidebar Skip to footer
Showing posts with the label Coffeescript

For Loop Over Backbone Collection

Fairly new to backbone, so this is a really basic question. I have a Backbone collection passed int… Read more For Loop Over Backbone Collection

Coffeescript Instance Method Encapsulation In An Object

Say I have a Coffeescript class: class Foo MyMethodsBar: () => 'bar' MyMethodsBaz: (… Read more Coffeescript Instance Method Encapsulation In An Object

Using Mouse Cursor Position As A Range Starting Point In Coffeescript/javascript

As the title states, I would like to use my cursor's position as the start point to a range. Ri… Read more Using Mouse Cursor Position As A Range Starting Point In Coffeescript/javascript

How To Get A Model By Array Params From A Collection

I have a model like this: model = from: 'a@b.com' id: 1 to: [c@d.com] and I h… Read more How To Get A Model By Array Params From A Collection

Node.js: Read Params Passed In The Url

In rails I do a POST request to my server: response = Typhoeus::Request.post('http://url.localt… Read more Node.js: Read Params Passed In The Url

Q.js Progress Handler Doesn't Seem To Be Firing

I'm currently using Q.js for promises, since they implement progress handlers. However, it does… Read more Q.js Progress Handler Doesn't Seem To Be Firing

How Should I Keep A Running Total Of Several Values With Bacon.js?

Messing around with a bacon.js. I'd like to keep a running total of values in a group of text i… Read more How Should I Keep A Running Total Of Several Values With Bacon.js?

Order Of Executing Requests With Angularjs's Ng-resource? Pt2

This is a follow-up question to Part1. Part 2: books_ctrl.js.coffee myApp.controller 'BooksCtrl… Read more Order Of Executing Requests With Angularjs's Ng-resource? Pt2

Jquery .on() Isn't Binding Click Events To Dynamically Created Elements

I have a textbox that dynamically adds an element when I press enter, and another that deletes the … Read more Jquery .on() Isn't Binding Click Events To Dynamically Created Elements

Getting Around Asynchronous Requests

So I have a function like this - IPGeocoding = (data) -> coords = [] _.each(data, (… Read more Getting Around Asynchronous Requests

Node.js: Module Does Not Recognize Schema

On server.coffee I have: User = mongoose.model 'User', s.UserSchema addEntryToCustomer = r… Read more Node.js: Module Does Not Recognize Schema

Coffeescript Always Returns

So I have what's probably a stupid question to ask about Coffee Script. I'm giving it a sec… Read more Coffeescript Always Returns

Multiple Callbacks In Coffeescript

I am trying to work out the correct behavior to string multiple callbacks together. class Person … Read more Multiple Callbacks In Coffeescript

Coffeescript Jqcloud Handlers

I'm trying to do this in coffeescript, http://jsfiddle.net/Q6348/8/ Specifically I'm trying… Read more Coffeescript Jqcloud Handlers

Unbinding Events In Node.js

Let's take stdin.on as an example. Callbacks to stdin.on stack, so if I write (in CoffeeScript)… Read more Unbinding Events In Node.js

Easy Way To Convert A String To A Number Or Null?

Is there a slick way to convert a string to a number or null if it cannot be represented by a numbe… Read more Easy Way To Convert A String To A Number Or Null?

Just Can't Get Passport.js To Work

edit: sorry it's so long now, added in the compiled JS! I also added Kevs suggestions. I am dev… Read more Just Can't Get Passport.js To Work

Twitter Bootstrap Tab Shown Event Not Firing On Page Load

In a page where I have n tabs, and the following script (coffeescript, I checked the compiled javas… Read more Twitter Bootstrap Tab Shown Event Not Firing On Page Load

Need Help Implementing The Sequencing Of Jquery Instructions

The problem: I have a simple function and I need the instructions within it to take place one at a … Read more Need Help Implementing The Sequencing Of Jquery Instructions

What Is "Escaped" & "Unescaped" Output

I'm not familiar with Javascript Learning template node.js template engine, it has 'Escaped… Read more What Is "Escaped" & "Unescaped" Output