Javascript functions and declaring

When working with functions in JavaScript, are variables declared as parameters in a function different from variables declared within the function itself? For example, is function functionName (var1, var2) different to Function (var1, var2) { ...
more »

2017-02-22 23:02 (1) Answers

Facebook Graph x Google sheets

I've got a basic code to connect to facebook through an app, and then grab comments from a particular post. The code works and generates an access token but gives an error when returning the text in Google sheets. The problem is that if i copy and p...
more »

2017-02-22 22:02 (0) Answers

Functional programming and DOM manipulation

How is most "pure" way to manipulate DOM in script written in "functional" way. For example if I simply need to change element width should I use typical syntax like: document.querySelector(".class").style.width = ... or write dedicated function...
more »

2017-02-22 21:02 (1) Answers

Multiple Facebook Live reaction polls in 1 post

Does anybody know how to add multiple polls in a Facebook live post, as shown in this example by Super Deluxe: My idea was to create a button to store the current reactions count as ...
more »

2017-02-22 21:02 (0) Answers

Use same jQuery function in multiple instances

I have this function and it needs to work in 54 different buttons on a page, what am I missing to make it work ONLY in the corresponding FLIP? $(document).ready(function() { $(".flip").mouseenter(function() { $(".panel").slideDown("mediu...
more »

2017-02-22 18:02 (3) Answers

Reactjs and material-ui library import error

I've got a quick question. I have react and all included but I want to import component from a material-ui library and the path is all good but it cannot find the module. My code: import React from 'react'; import ReactDOM from 'react-dom'; ...
more »

2017-02-22 17:02 (1) Answers

How to get first two URL path segments?

How to get first two parts of the URL using AngularJS? For example, I would like to get the two first path of this URL (as admin/password/): http://localhost:3000/admin/password/57045b10eba5ca1dfd01a8fc4adb4f6c4efc6454b9454514 ...
more »

2017-02-22 15:02 (4) Answers

javascript : data validation Error in mongoose

I wrote This code in Product.model.js file : /** * Created by yahya on 2/22/17. */ var mongoose = require('mongoose'); var category = require('../models/category.model'); var dial = require('./dial'); var schema = new mongoose.Schema({ "name"...
more »

2017-02-22 15:02 (0) Answers

Concat array into one array (JS or Lodash)

Input: var array1 = ["12346","12347\n12348","12349"]; Steps: Replace \n with ',' and Add into list. Output: var array2 = ["12346","12347","12348","12349"]; I tried below logic but not reach to output. Looks like something is missing. va...
more »

2017-02-22 13:02 (3) Answers

How to convert API data into local langugae data?

Hi I am working on a reactJS+Flux Project.I am trying to convert my website into multi-language. I already have my dictionary of all the possible value coming from my API. I want to replace actual value of API with my dictionary value. for example: ...
more »

2017-02-22 12:02 (1) Answers

node js, how to parse strings like this?

I want to parse the following strings 3693,"Toxic Avenger, The (1985)",Comedy|Horror to 3693, "Toxic Avenger, The (1985)", Comedy|Horror. similarly, the following 161944,The Last Brickmaker in America (2001),Drama should be p...
more »

2017-02-22 10:02 (2) Answers

Caching DOM elements javascript

I am trying to cache all the DOM elements on the page intialisation using the following code: init:function(){ this.cacheDom(); } cacheDom:function(){ var that = this; this.$jsTabs = this.container.find('....
more »

2017-02-22 10:02 (1) Answers

Javascript Random Image Losing Styling

trying to set up random background images for my Jumbotron. Here is what I have so far. function randomImage() { var images = [ "", ...
more »

2017-02-22 06:02 (1) Answers

fillStyle not a function

I'm getting an unusual error "ctx_wrap.fillStyle is not a function". this line produces the error: ctx_wrap.fillStyle('#b8b8b8'); in this: ... this.paint = function() { self.path(ctx_wrap); if (!isOver) { ctx...
more »

2017-02-22 04:02 (1) Answers