Like all programmers, I'm lazy. So in my utils.js there's a simple line:  window.log = console.log   This works fine in firefox, but it makes Chrome cry like a little boy. I have to write console.log to make it work.  Any suggestions?...
When I create a new coffeescript file, I cannot access the code in the compiled code from another file because it gets wrapped in some function scope. For example:  CoffeeScript:  class ChatService   constructor: (@io) ->   Generated Javascript:...
ECMAScript allows us to define getters or setters as following:  [text/javascript]  var object = {   property: 7,   get getable() { return this.property + 1; },   set setable(x) { this.property = x / 2; } };   I can work around if I'm using a cla...
I am starting a new Node.js app and this time, I'm trying to organize the code correctly instead of having everything in the same file.  I only have a simple setup now at server.coffee:  express = require 'express' app = module.exports =...
I'm making chaining selects with backbone.js by this article http://blog.shinetech.com/2011/07/25/cascading-select-boxes-with-backbone-js/, but got errors, when extending classes.  So, i have LocationsView class:  class Blog.Views.LocationsView e...
I'm using Mocha for testing my apps. Currently, I'm using Makefiles, but I want to switch to Cakefiles. When I run my test through Cake, the colors from Mocha are not displayed on console.  Here's an example:  task 'test', 'te...
I'm trying to find a good way to work on CoffeeScript on Windows and be able to process these files quickly to JavaScript in the IDE.  RubyMine - if I just open a .coffee file in RubyMine this seems to work. But I see no button or menu option to...
I'm dynamically loading jQuery and jQuery UI into a page, and I need to know when jQuery UI has successfully extended jQuery.  At the moment I'm using the readystate of the script element that loads jQuery UI to trigger the running of my code...
obj1 = Object.create({}, { property: { enumerable: true, value: 42 } })  > obj1.property = 56 > 56 > obj1.property > 42   with use strict there is an error.  I want to combine multiple objects: with jQuery.extend():  new_obj = $.extend(tr...
Phone.find {number : "12345678"}, (err,phone) ->             phone.forEach (item, i) ->                 console.log item                 console.log item.subdomain                 console.log item.subdomain_id                 console.lo...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.