9,716 questions
1
vote
0
answers
55
views
How does triggers clicked worked in backbone.js
Recently, I have got a rails project project with backbone.js and CoffeeScript to support however I don't have previous work experience with backbone.js.
Some of model relationship of the projects are:...
2
votes
1
answer
117
views
ExecJS::RuntimeError with rails, how get details of error?
I use rails 6 app with execJS, Sass and coffeeScript.
There is an error in my coffee code, but I don't have information to find where...
there is just an exception like this :
ExecJS::RuntimeError in ...
3
votes
2
answers
115
views
How to correctly use functions inside loops in CoffeeScript 2?
1. Summary
I can’t find, what is the correct way to use functions inside loops (or what to replace it with) in CoffeeScript 2 in 2024.
Should I use one of the variations I’ve given below, or ...
0
votes
0
answers
57
views
How to instantiate a class that requires DOM with Puppeteer?
I want to instantiate a class called DataBinding that uses document.querySelector inside a CoffeeScript file. To achieve this, I'm using Puppeteer to create the DOM environment. However, inside page....
3
votes
1
answer
226
views
Searching for emails with empty subjects using IMAP
I am trying to search emails from my draft folder using node-imap package
So what my file does is, it uses an imap search function based on Subjects and since the number of subjects is dynamic, we ...
0
votes
1
answer
39
views
Übersicht (macOS) question: prevent image caching in widget
I am maintaining an old CoffeeScript in Übersicht that spits out a random image from Photos. The widget refreshes every 30 minutes.
What happens is that an AppleScript executes and overwrites an image ...
1
vote
0
answers
32
views
Why does installing grunt(npm install grunt --save-dev) into my project stops in between and doesn't make any chnages to package.json?
Installing grunt stops in between and does not move forward, please see image attached
Reasons why this is happening and solution to it?
Uglified js files via brunch before but it is no more ...
0
votes
1
answer
41
views
how put an id unique in a button in a rails loop?
I have a grid where the receipts are listed with their information and the display button. The idea is that pressing the button that appears in the actions column (button_tag) sends the information of ...
0
votes
1
answer
112
views
Prioritize Gmail filter using Gmail API
I am creating a filter in Gmail using Gmail API but the problem is that any filter created via API is moved to the top of the existing filters. I need it to be put at the bottom. There does not seem ...
3
votes
0
answers
606
views
custom script languages (such as coffeescript) no longer supported in vue 3.3?
UPDATE 2: This seems to be like an undocumented change to how the compiler works with the code in the tags (most likely unintentional, so probably a regression)
Here's how the compiler handles ...
0
votes
1
answer
58
views
CoffeeScript and Service Workers
When trying to register a service worker in CoffeeScript, it looks like the latest Chrome browser doesn't support service workers, which I know is not true. Here is my app.coffee, which is converted ...
0
votes
0
answers
82
views
In rails how to require a coffeescript file
In a rails application. I want to create a coffeescript function that can be shared by multiple coffeescripts.
for example
app/assets/javascripts/util.js.coffee
sample_function = (word) -> ...
0
votes
1
answer
45
views
CoffeeScript function syntax with nesting
I've come across a use of functions in JavaScript that I can't seem to convert, correctly, to CoffeeScript syntax. I'd appreciate it if someone could let me know how to do this:
JavaScript version:
...
2
votes
1
answer
807
views
webpack-electron, [11440:0125/075150.232:ERROR:CONSOLE(1)] "Request Network.loadNetworkResource failed
I try to run electron using webpack, when I run electron with the watcher running then elecrone spits out the following in the console
"[11440:0125/075150.232:ERROR:CONSOLE(1)]
"Request ...
0
votes
0
answers
201
views
How to add a loader in a Vue/Webpack app to support non JS files used in a dependency of a node module
I have a Vue 2 app that uses Webpack, and I am trying to use in it the node module PSD.js, which in itself utilizes CoffeeScript as part of it's dependencies. When I try to compile i get the error:
...
0
votes
0
answers
48
views
Porting: how can i convert those coffeescript into lua?
((contextObject) ->
return (contextObject.isInherent or contextObject.isAdditionalInherent) and !contextObject.isHiddenToUI and !@getGameSession().getModifierClassForType(contextObject....
1
vote
0
answers
17
views
import packages in CoffeeScript [duplicate]
I'm trying to import a package inside an old coffe script file:
import Quill from 'quill/core'
But keep getting the error:
Uncaught SyntaxError: Cannot use import statement outside a module
I set type:...
2
votes
0
answers
58
views
Facing issue after converting code from JavaScript to CoffeeScript, Code is not working nor displaying any Error?
counters = document.querySelectorAll('.counter')
counters.forEach (counter) ->
incrementButton = counter.querySelector('.plus')
decrementButton = counter.querySelector('.minus')
...
0
votes
1
answer
314
views
Adding and using current geolocation for weather application (widget) using OpenWeatherAPI
I am trying to add/use current geolocation on the weather widget that I am trying to make.
Currently, I am able to display information of cities based on an external file. I have very little knowledge ...
1
vote
1
answer
286
views
Calling AJAX in Coffeescript
I have an ajax call that works well in a view, but I would like to make it in a coffee script, right inside a datatable call. The code looks like:
$(document).ready(function () {
$.ajax({
...
1
vote
1
answer
187
views
how can put ruby tag with javascript (coffescript)?
I am working with ruby on rails (rails 4.2). Given a validation done in javascript I need to run a ruby tag or not. I found something similar here but it didn't work for me.
html:
<div id="...
0
votes
0
answers
207
views
How do I make VSCODE understand source maps for concatenated coffeescript files?
Trying to use the VSCODE debugger on some coffeescript but part of the build process has grunt-contrib-coffee concatenate a bunch of the sources then compile it and create source maps.
ie Gruntfile:
&...
0
votes
1
answer
99
views
Dropzone Rails Gem How to Send with 0 Files
I want to know the right way on how I handle still sending even when I have 0 files uploaded. I have a form that has a lot of data to input and the images are optional.
I could probably send this with ...
0
votes
0
answers
36
views
Trouble with toggling visibility of a link_to in a tag
It's been a very long time since I've touched anything to do with Javascript or Coffeescript, still pretty new to RoR and I'm having some trouble getting an eventlistener to work.
Currently tags on my ...
4
votes
3
answers
913
views
how add coffeescript in svelte on Rails 7?
I have a Rails 7 app with esbuild :
esbuild.config.js :
#!/usr/bin/env node
const watch = process.argv.includes("--watch");
const esbuild = require('esbuild')
const ...
3
votes
1
answer
611
views
nodejs debugging with non-javascript
In my case, I want to debug CoffeeScript, but this question is NOT CoffeeScript specific. It relates to debugging ANY non-JavaScript language that compiles to JavaScript. To do that, you need to ...
0
votes
1
answer
77
views
Coffeescript if condition for date
This is my 1st mini project using coffeescript dcaf.
Im currently doing some function in coffeescript, my roadblock is i cant compare 2 dates on if statement. Any thoughts?
0
votes
1
answer
401
views
Ruby/Rails button and search filtering
I've added the Active and Archived buttons to this page for extra filtering.
The existing search box functionality uses the following js.coffee which calls the controller index to pull the data from ...
-1
votes
1
answer
56
views
i am using node cron for running jobs , i will this run every day including saturday and sunday '00 00 22 * * *'
i am using node cron for running jobs , i am confused will this
pattern run every day including Saturday and Sunday as well
'00 00 22 * * *'
0
votes
1
answer
857
views
CoffeeScript can't use spread operator with class fields
I can't understand why this syntax of spread method is wrong for CoffeeScript in WebStorm
class Test
fruit: {apple: "apple"}
init: ->
console.log 1, @fruit
spread: ->
...
0
votes
0
answers
179
views
How do I resolve this javascript 404 error?
Im running into what seems like an odd issue. We made a slight change to our coffee javascript and then ran the clobber and precompile. Now for some reason the script works for about 30 seconds then ...
0
votes
0
answers
309
views
DB connectivity failure in Cypress while running from console
I was trying to connect MSSQL from Cypress and finally got a solution by following the steps provided in this link:
https://github.com/cypress-io/cypress/issues/6621
The solution worked perfectly fine ...
0
votes
1
answer
153
views
Get unique values from an array of objects using Cofeescript
I have an array that looks like this:
[
{
"id": 1,
"name": "Paul",
"parent": "Jane"
},
{
"id": 2,
"name"...
0
votes
2
answers
4k
views
MongoDB aggregate function with find function
I am using coffeescript with nodejs to query monogodb data but for some custom data i need to perform aggregate function on my collection but using Session.aggregate(query) in the code is giving me ...
0
votes
1
answer
416
views
Set Atom config.cson location
Is it possible to set Atom config.cson location, instead of using the default ~/.atom/config.cson?
Or at least to be able to use project-relative paths in the config.cson?
0
votes
1
answer
320
views
How to execute a python code from coffee script and get the output [duplicate]
I am developing a CoffeeScript which needs to execute a Python program and get the responses from the Python code.
My coffee script is
module.exports = (robot) ->
robot.respond /greetme/i, (msg)...
0
votes
1
answer
90
views
Create a coffeescript to access config.ini file
i am trying to use config.ini in an existing coffeescript.
this is my config.ini
[env]
RUNNING_ENV = 'dev'
[dev]
security="no"
priority="P2"
[prod]
security="yes"
...
1
vote
3
answers
4k
views
Get checked value from radio button group
I am populating radio buttons dynamically, and on submit button click I need to get value of the checked radio button from the group.
<ul data-bind="foreach: Numbers">
<li&...
-1
votes
3
answers
4k
views
Show/Hide Html sections on button click
I have 3 sections of code in the same page, in those 3 sections I have submit buttons.
Initially 1st section should be visible, 2nd and 3rd sections are hidden. On button click from 1st section, 2nd ...
0
votes
1
answer
621
views
show/hide on radio button checked/unchecked- knockout js
I have 2 radio buttons, When I click on the option A, a particular div has to be shown, and when click on the option B, 1st div should be hidden and 2nd div should be shown. Below is the code.
<div ...
0
votes
1
answer
51
views
Array element presence check quirks in CoffeeScript
When checking element presence in inline arrays via the in keyword, CoffeeScript ignores indexOf and rather does that many equality checks.
However, when referring to an array via a variable, it calls ...
-2
votes
1
answer
67
views
SetTimeOut inside a Javascript Promise [duplicate]
I have this code snippet , basically I want to add some interval in between calling myfunc for each element in myCol .
Promise.all(
_.map(myCol, (o) ->
...
1
vote
1
answer
137
views
Get string from html to coffeescript
I cannot seem to be able to pass a string from html
<div class="download-by-date" data-hello="dd/mm/yy">
to coffeescript:
$('.datepicker').datepicker({ dateFormat: $(this)....
0
votes
1
answer
38
views
How to get those tr of a table containing a text_field with a certain value?
I have a table with several rows in which each td has a field, but I need to search for those tr containing the value "Egress" in a text_field. The value "Egress" is entered by the ...
0
votes
1
answer
505
views
SOLVED: Rails 6, Webpacker, Bootstrap 5, Coffee on Heroku is not working
Problem with coffee script on heroku.
At local machine (Ubuntu Linux) all working perfectly, but after deploying changes to Heroku, coffee script stop working, and I can't understand why.
Tried to &...
2
votes
2
answers
1k
views
How add the sizes of the slices in the pie chart (at the top) in Chart.js?
I am starting to learn the chart.js library.
I drew a pie chart (like "pie"). When you hover over the slices of the diagram, a number appears in the pop-up window that sets the size of the ...
0
votes
1
answer
78
views
coffeescript promise recursion chain issue
My Initial data is like
[{"id":1,"type":"value","pid":"123"},
{"id":2,"type":"value1","pid":"451"},
...
1
vote
1
answer
4k
views
Node.JS Video Upload
Can anyone help me with video upload in Node.JS?
Currently, I am using the express-fileupload module for uploading a video it works fine till 70MB but when the size increases it's not able to parse ...
2
votes
2
answers
158
views
Coffeescript wait until flag is set from a callback and then move on to the next part of the code
I have here a simple program using coffeescript which creates a server on a Raspberry pi, and this receives data from a python script running on a Windows machine on the same network, does some ...
0
votes
1
answer
81
views
Atom Snippets for tex files
I have a .tex file to which I want to add snippets. I have tried the following
'.source.tex':
'console.log':
'prefix': 'Hello'
'body': 'Hello World!'
but it doesn't seem to work. (I have ...