Friday, 11 May 2018

Adding emoji to chat

I'm using chat with one to one and multiple rooms , how can I add emojis to it using socket.io ?

Submitted May 11, 2018 at 01:38PM by ovaix_

Most Popular Web App Development Frameworks 2018

https://ift.tt/2I7Km4z

Submitted May 11, 2018 at 01:22PM by mydevskills

How do I know if file got deleted when the file is being watched?

I am reading a book, where the author asked to improve the code by handling the below 2 questions:In the file-watching examples, what happens if the target file doesn’t exist?What happens if a file being watched gets deleted?I handled the first question. But not able to solve the Q #2. Can anyone teach me a good technique on this #2?My code:const fs = require('fs'); const filename = process.argv[2]; if(!filename) { throw Error('A file to watch must be specified!'); } if (!fs.existsSync(filename)) { throw Error(`The target file ${filename} doesn't exist.`) } fs.watch( filename, (eventType, file) => console.log(`File ${file} changed!`, `Event received: ${eventType}`) ); console.log(`Now watching ${filename} for changes...`);

Submitted May 11, 2018 at 11:37AM by arup_r

node deployment help

Hi everyone!I apologize if this is a relatively simple or dumb question. im a self taught programmer with a lot to learn.I'm building a website for my first customer and im trying to implement the Stripe payment platform. I am building with React.js express and Node. I've been using this article for most of the setup: https://ift.tt/2rB9A0h my test api everyone works absolutely perfect. i can see the test data with payments and everything. for whatever reason when i'm on the live website with the live api keys it doesnt create a charge. it posts the api call and has all the correct information but it never actually creates or charges the card.Halfway down the article he mentions PAYMENT_SERVER_URL which after all my digging i think might be the problem. I'm not 100% what he means by 'myapidomain'. when im not on production its just my localhost:8080. im not sure what it would be on my production site.I am hosting with HostGator if that helps. I've been trying to figure this out for about 3 days and am not sure where else to turn!Any help would be GREATLY appreciated, I'm at quite the loss

Submitted May 11, 2018 at 11:56AM by rogerdodgerr2

Code from 9.x not working in 10.x. Hoping for discussion and advice

Possibly the code was illegal syntax to start with, but happened to work OK up until now (pre node 10). If the syntax is in fact legal, it's worth making a node issue about it on Github.str_arr_mapify can almost be ignored here - it allows a function to be called with an array of strings rather than single ones and be executed multiple times.The error I get is SyntaxError: 'super' keyword unexpected hereThe code:var core_extension = str_arr_mapify(function (tagName) { jsgui[tagName] = class extends Control { 'constructor' (spec) { super(spec); this.dom.tagName = tagName; } }; jsgui[tagName].prototype._tag_name = tagName; map_Controls[tagName] = jsgui[tagName]; }); The problem may come from treating a class that gets defined here as just another variable. Am I allowed to do this, but V8 or node is broken, or is it successfully noticing my invalid syntax?

Submitted May 11, 2018 at 12:02PM by jsgui

need to create a subgroup system

Helo, so... i would like to create a sub group system based on Ntree method, each group will be a node and has it's children, in the end i would like it to be like that: if your'e typing an existing group name it will ask you if you would like to have a sub group for it, problem is, i'm getting nothing, the child doesn't added to the main group from the beginning. i hope someone can help me:From the menu i would like it to a handler function: const programdata = { groups: new groups(), Group: new Group() function createGroup (rl, programdata, callback) { rl.question('Select Chatroom name: \n', (name) => { programdata.groups.MakeChatRoom(name); console.log(programdata.Group.children) console.log('Existing groups:',programdata.Group.name)//for debugging purposes return callback(); }) } than its calling for a function requested on the model file:class groups { constructor() { this.root = new Group(); } makeChatRoom(name) { if (this.root.name !== name ) { this.root.name = new Group(name); return true; } else { new Group().children.pop(); } return false; } the tree is on another model file:class Group { constructor(name,children,parent,users) { this.name = name; this.children = children || []; this.parent = parent || null; this.users = {}; } Thank you

Submitted May 11, 2018 at 12:10PM by CyberPavarotti

Node 10 breaks grunt@? and gulp@3 and some webpack@3 plugins