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.
0
votes
0answers
13 views
Generate Alternative when Unique Index fails on MongoDB
So when users sign up via Google, Twitter or such, names can overlap. Within my app, usernames have a unique index. Since a new document is put into the collection whenever someone signs in for the ...
0
votes
2answers
33 views
javascript unable to display weather
I copy the code from jsfiddle and make css javascrip and html in one file, and use wampserver to run it. The css background shows well in gray, but there is no weather information.I double checked ...
0
votes
0answers
17 views
Incorrect path for generated coffee sourcemaps when serving with nodejs
I'm using coffeescript to do some work. The coffeescript is compiled to js with grunt and served with a simple nodejs express app.
My folder structure does follow the common one with a assets folder ...
0
votes
0answers
41 views
Java Play! - display formatted JSON
I am trying to display information from a JSON object to a view, following this tutorial
I'd like the JSON to be rendered on a view titled "allBusinesses"
I am able to print the raw JSON to the ...
0
votes
0answers
21 views
IE Compatibility issue: Javascript submit to other frame
The following coffescript code is to simulate a submit button with a link.
add_hidden = (name, i = 0) ->
input = document.createElement('input')
input.type = 'hidden'
input.name = name
...
0
votes
3answers
34 views
opacity 0.5 except this dd
I want to change body opacity to 0.5 except a focused area selected 'dd'.
In backbone with coffeescript;
I tried and searched for examples;
body changing but not 'dd'.
my code is:
@$el is selected ...
0
votes
1answer
27 views
Coffeescript Error: 'undefined' is not an object (evaluating 'mydata.length')
This code works normally on the view where the coffee_input hash is being passed to the coffeescript code
#if coffee_input?
if typeof coffee_input isnt "undefined"
mydata = JSON.parse ...
0
votes
1answer
23 views
How can I split this Coffeescript into separate files?
Using the Garber method for DOM execution:
SITENAME = {
common: {
init: function() {
// application-wide code
}
},
users: {
init: function() {
// controller-wide code
...
0
votes
0answers
22 views
google maps zoom to fit bounds to display all poly lines
In the following Coffeescript code get the tracksegments from database and display all of them on the map (poly lines shape). i want to fit to zoom on map for showing all of poly lines. but this code ...
1
vote
1answer
22 views
coffeescript sourcemaps not working with Chrome developer tool
I configured the coffeescript compiler to run map (-m) using IntelliJ with NodeJS.
I assume with the source maps I should be able to debug in coffeescript files in Chrome developer tool. The enable ...
2
votes
1answer
24 views
node.js coffeescript - issues with requiring modules
I'm having another issue with node.js, this time I cannot get my javascript code to recognize that a coffeescript module's class has functions.
In my main file, main.js I have the following code:
...
0
votes
2answers
26 views
Global variable in Coffeescript in Ruby on Rails
I have this code in my rails application. in this code calculate area of poly lines and i want to calculate sum of poly lines and save in a global variable and finally show that. but my global ...
0
votes
0answers
8 views
Yeoman Generator CoffeeScript Entry Point
Is it possible to hook a 'index.coffee' file up as an entry point for a Yeoman generator?
The 'generator-generator' generator creates an 'index.js' file. Replacing it with a 'index.coffee' hides the ...
1
vote
2answers
43 views
Translate d3.js JavaScript function to CoffeeScript
Afraid I'm making a simple error in in how I convert this JavaScript to CoffeeScript within a class
In this original example of a world map we have a function :
var quantize = d3.scale.quantize()
...
0
votes
0answers
27 views
Post json with JavaScript to Rails - undefined method stringify keys
I am trying to post a Javascript object to my Rails API in order to create a model object on my server.
Here is how I define my Javascript object (coffee script) :
createList: (list) ->
...