Questions tagged as 'coffeescript'

1
answer

About (function () {...} ()) and callThis ()

CoffeeScript compiles your files into one: (function(){ // código aqui }()).callThis(); JSFiddle: link Sometimes we find a variation on the internet: (function(){ // código aqui }()); JSFiddle: link What is the use of th...
asked by 08.07.2014 / 13:30
2
answers

Use of '@' in variables

I see in some languages that compile for javascript, like TypeScript and CoffeeScript, the use of @ in variables, as well as cases where it is not used. For example: w = 10; @v = 11; In the end, what is the @ and what is the d...
asked by 19.04.2017 / 16:23
1
answer

Dealing with events in elements added later

Consider the following HTML: <div id="div"> <button class="foo">Botão1</button> </div> And the following script: $(".foo").click -> alert "foobar" $("#div").append '<button class="foo">Botão2</...
asked by 11.09.2014 / 14:42
1
answer

$ http angularjs return not expected

Description I'm implementing a $ http request with angular. I want to return the objects from the database. Code CompanyService.coffee angular.module('vaultfactor').factory 'CompanyService', ($http, $q) -> getCompanies: -> p...
asked by 27.11.2014 / 13:38
0
answers

Control Dslr camera via web

Personal is as follows: I have a web application that I would like to be connecting to a dslr (professional camera) camera that would be displaying the live image on a Canvas in html or something, and that could literally control the camera thro...
asked by 28.10.2017 / 05:56
0
answers

How to test Web Server CoffeeScript application using windows cmd?

I'm trying to test this angled design . I have already installed angular, bower, grunt and coffescript. I was able to get to the Web Server startup stage where the author says:    Use Terminal to start the CoffeeScript, built-in Quizzl...
asked by 11.05.2017 / 15:06
1
answer

CoffeeScript on Rails - select items from a table

Hello! I have the following code generated by Scaffold: <p id="notice"><%= notice %></p> <h1>Produtos</h1> <table class="table table-striped" id="tabelaProdutos"> <thead> <tr> <t...
asked by 26.05.2017 / 16:26
0
answers

Finding brackets through the Atom API

Using the Atom code editor I came up with the idea of making a simple yet useful feature for it. But for this the first step is to find the beginning of the scope, for that I look for a pair of brackets . The function can be accessed using...
asked by 04.11.2015 / 03:03
1
answer

Error adding new instances to an array in Javascript [closed]

I have the following problem I have an array that adds the instance of an auxiliary object to the instance of an HTMLElement, but only the last element is being added, I tested it in the Chrome, Chromium, Opera and Mozilla Firefox browser and in...
asked by 13.04.2014 / 23:51
1
answer

Pre processors and how to work with them

Hello folks from the community, I have doubts about how to work with preprocessors, after all I will have to rewrite the code twice? or will I have to copy and paste into an online convertor? I have a lot of knowledge about using pug, stylus and...
asked by 22.04.2018 / 21:55