CoffeeScript is a little language that compiles into JavaScript. Underneath all of those embarrassing braces and semicolons, JavaScript has always had a gorgeous object model at its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way. CoffeeScript can be ...
0
votes
0answers
13 views
Node.js DRY with MySQL clients
so here's a quick question. Basically I'm making an express application that connects to a MySQL server. Pretty simple. But how do I stop adding all the connection code between files so I don't have ...
0
votes
1answer
68 views
Quick Check for CoffeeScript
Does it exist? I can't find it and it isn't listed on wikipedia. (which means it doesn't exist :) )
I know node.js has it. Not sure if writing my node app in coffeescript and applying quick check ...
0
votes
1answer
20 views
static property inheritance CoffeeScript
Let's define this simple code :
class Foo
@foo = 'blah'
console.log(@foo)
class Bar extends Foo
constructor: () ->
console.log(@foo)
bar: () ->
console.log(@foo)
b = new Bar
...
5
votes
0answers
24 views
Detecting when a user leaves or enters a channel with hubot
I am trying to make Hubot detect when a user enters or leaves a channel, but so far I have been unable to actually find ANY information pertaining to this.
Does anyone have any ideas of how to do ...
1
vote
1answer
49 views
How do I use One-to-Many Relationships in Tower.js?
So, I've been generating different scaffolds trying to use the One-to-Many relationship features of Tower, but I can't figure out how to actually link up the related instances to make use of the ...
0
votes
0answers
20 views
Focus() first input in current modal tab
I have two buttons that popup the same Modal window, but display a different tab inside the Modal window. In each tab is a form with a number of inputs. My issue is getting the Focus() on the first ...
5
votes
3answers
147 views
Functional javascript? [closed]
I'd like to use a "javascript derived language" in order to learn and use some of the usual web technologies today like node.js, jquery, etc.
After toying for a while with functional concepts and ...
2
votes
1answer
25 views
coffeescript extend class constructor
class RedGuy
constructor : (@name) ->
@nameElem = $ @name
@nameElem.css color : red
class WideRedGuy extends RedGuy
constructor : ->
...
1
vote
1answer
36 views
What is the proper way to define instance variables in Backbone models?
I'm wondering how I should define instance variables inside a Backbone Model. This is the way I'm currently doing it:
class GeneSet extends Backbone.Model
initialize: (parsedGenes)->
...
0
votes
1answer
24 views
Possible to render a partial from a link_to?
I'm trying to create a fancy login form for my webapp in Ruby On Rails using Twitter-Bootstraps modal feature.
Here' s my form currently.
_login_form.html.erb
<div class="modal hide" ...
1
vote
3answers
37 views
Arrays of Literals in Coffeescript
When creating an array of literals in JS:
[{ name: 'david', value: 'blue' }, { name: 'harold', value: 'orange' }]
The only way I can see of writing this in Coffeescript is:
[
name: 'david'
...
0
votes
2answers
34 views
Coffeescript JS version?
If I am going to develop using Coffeescript I will need to know what browsers are supported by the coffeescript JS code - I'm sure there will be a webpage somewhere on the subject :)
0
votes
0answers
5 views
node-orm sync to Alter Tables (similar to DataMapper.auto_upgrade)
I'm using node-orm to try to setup my database. Here is the model code.
db = orm.connect("mysql", client, (success, db) ->
Strain = db.define("strain",
name:
type: "string"
...
2
votes
0answers
16 views
jQuery UI switchClass and css3 transforms
I am trying to use jQuery UI effects core for .switchClass as a fallback to a css3 transition.
CSS:
.smaller{
-webkit-transform: scale(0.5);
-moz-transform: scale(0.5);
-o-transform: ...
0
votes
1answer
33 views
CoffeeScript scope issues with an array of functions
CoffeeScript newbie here. I'm having a weird problem with the scope of a function that I've pushed onto an array and then executed within the class's member function. Basically, it seems like this ...