These are chat archives for FreeCodeCamp/HelpJavaScript

3rd
Nov 2018
Christopher McCormack
@cmccormack
Nov 03 2018 00:00
@JLuboff later gator
DMZ
@DMZ011
Nov 03 2018 00:00
am out of ideas for widgets
what can I make to put in our intranet?
what can I put in the bot am making? I can't think of any useful thing to make it do
Christopher McCormack
@cmccormack
Nov 03 2018 00:03
no clue
Brad
@bradtaniguchi
Nov 03 2018 00:10
@Pagnito Yes, github audits your packages for you and warns you about security risks
Pagnito
@Pagnito
Nov 03 2018 00:10
@bradtaniguchi i see thnx
Brad
@bradtaniguchi
Nov 03 2018 00:11
@DMZ011 Take a page from slack, any minor thing you can do in your intranet apps, or apps could be a command that is executed from your bot. (like sending a followup email for a given record or something)
DMZ
@DMZ011
Nov 03 2018 00:12
hmm
@bradtaniguchi the thing is, I made it understand natural language .. so not sure that making commands would work
aaaah
maybe I can make it like ::commandname
Brad
@bradtaniguchi
Nov 03 2018 00:13
that's usually how it works
DMZ
@DMZ011
Nov 03 2018 00:13
for now if u ask it: what can u do for me, it'll give you buttons as suggestions
when u click on one, it'll tell u how that works
Brad
@bradtaniguchi
Nov 03 2018 00:13
you can also use it to "ping" other apps, to see their status, uptime, other info you have access to
The bot can show buttons?
DMZ
@DMZ011
Nov 03 2018 00:14
yep
Brad
@bradtaniguchi
Nov 03 2018 00:14
Is this a chatbot?
DMZ
@DMZ011
Nov 03 2018 00:14
let me show u
u can use "adaptive cards"
is the chat on this site working?
Brad
@bradtaniguchi
Nov 03 2018 00:16
nope
DMZ
@DMZ011
Nov 03 2018 00:17
like this
Brad
@bradtaniguchi
Nov 03 2018 00:17
Its getting an error about this line: const params = BotChat.queryParams(location.search); BotChat is not defined
Brad
@bradtaniguchi
Nov 03 2018 00:17
thats cool, lots of potential
DMZ
@DMZ011
Nov 03 2018 00:17
yeah
Brad
@bradtaniguchi
Nov 03 2018 00:18
But yea I've heard of a lot of tech companies making slack bots act like secondary UI's for apps.
DMZ
@DMZ011
Nov 03 2018 00:19
yeah, what am doing is that I say stuff like can u help me? and she says: what can I do for u
when I say: what can u do for me, she says: I can do the following, and present 2 buttons
one for the weather, another for converting currency
so when you choose one of them, u'll get guidance about how to use it, so u can say: convert 500 american to australian, and it'll give u the answer
but that's all useless ..
plus, our intranet is just people working and many pages and apps
ticket support app, hr apps, people search app, so my bot will be just links to these apps.. so dunno what I can put in there, or useful commands
Brad
@bradtaniguchi
Nov 03 2018 00:21
You could literally hook it up to all of those things
DMZ
@DMZ011
Nov 03 2018 01:07
hmm
Amit Patel
@AmitP88
Nov 03 2018 02:06
hey guys, besides the FCC projects, how many React/redux projects do you think would be enough to get a junior React position?
I'm aiming to get 10 done by the end of this year, but I'm not sure if it'll be enough
Brad
@bradtaniguchi
Nov 03 2018 02:09
@AmitP88 I would say it depends upon complexity. 1 complex, thought out, fully developed, clean, feature rich app is better than 10 todo-list apps
Amit Patel
@AmitP88
Nov 03 2018 02:12
@bradtaniguchi oh I know that. I plan to make my projects more thought out. For example, I'm starting off building a simple virtual business card creator app. The user uses a form to input their personal info and on submit it gets displayed in a virtual business card. I'll also have a panel for the user to select fonts and styles, and later I plan to add a feature to enable the user to export their card to their linkedin or other social media
it'll also have css animations so that the user can rotate the card as a 3d object
I'm not sure if I need to build a full stack app though since I'm mainly aiming for a front end job
Brad
@bradtaniguchi
Nov 03 2018 02:17
A fullstack app is more impressive no doubt, otherwise the focus would be on UX and UI
Amit Patel
@AmitP88
Nov 03 2018 02:21
for sure. I'm still working on the API and Microservices certification. I haven't really learned express or node yet
Pagnito
@Pagnito
Nov 03 2018 03:06
for some reason my screen keeps jumping on a scroll event when i scroll up even tho i have the parent elment set to 100vh height
Amit Patel
@AmitP88
Nov 03 2018 03:49
@GitHub-Henry hmmm, that's a good idea. I never really thought about it. I've mostly been focused on trying to improve my skills, but I'll definitely check it out
Mohammed Boudad
@matrixersp
Nov 03 2018 04:55
@cmccormack It's an Electron app, you mean main.js ?
Christopher McCormack
@cmccormack
Nov 03 2018 05:06
@matrixersp sorry I've lost the context of the conversation
Mohammed Boudad
@matrixersp
Nov 03 2018 05:07

@cmccormack This is what I commented before
Hey everyone, I'm following a tutorial on how to create a chat app using nodejs-websocket, although I followed the tutorial word by word, I get this error:

WebSocket connection to 'ws://127.0.0.1:8001/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

These files can be helpful: Client.js Server.js App.js main.js

Screenshot from 2018-11-03 06-09-09.png
Christopher McCormack
@cmccormack
Nov 03 2018 05:13
Is main invoking Server?
Doesn't look like the server is running
Mohammed Boudad
@matrixersp
Nov 03 2018 05:14
App.js is what envoking both the client and the server
I guess the problem is with the client, It returns an error
Christopher McCormack
@cmccormack
Nov 03 2018 05:17
The server, your computer, is denying connections to localhost on that port
I don't see where in main you are calling your
Server code
Mohammed Boudad
@matrixersp
Nov 03 2018 05:25
main.js just create the window, runs the app and listens for different events
In App.jsx we create an instance for both Client and Server, then pass client as a paramater to Server connect method, there we try to connect them
this.client = new Client();
this.server = new Server();
this.server.connect(
      HOST,
      PORT,
      this.client
    );
Pagnito
@Pagnito
Nov 03 2018 07:02
hey anyone know how to add www. to a github page custom domain
homebrainbox
@homebrainbox
Nov 03 2018 10:46

Hey! Could someone take a look at my Record Collection code, please?

link to the challenge: https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/record-collection

function updateRecords(id, prop, value) {


  if (prop === "tracks"){
    if(!collection[id].hasOwnProperty("tracks")){
      collection[id][prop] = [];
    }
    collection[id][prop] = value;
  }
  else if (prop !== "tracks" && value !== ""){
    collection[id][prop].push(value);
  }
  else {
    delete collection[id][prop];
  }
  return collection;
}
Prashant Acharya
@Prashant-Acharya
Nov 03 2018 13:09
console.log('Hello guys')
lokendra singh chouhan
@loks15
Nov 03 2018 15:19
@loks15
https://www.technolush.com/blog/why-you-must-upgrade-php-to-7-1-or-above
is it gud time to migrate existing php project on php 7.3 ?
Joshua Arnett
@josha5
Nov 03 2018 21:58
Anyone have any suggestions for importing a large csv file into MySQL? Everytime I try to import my csv file mysql crashes.
Christopher McCormack
@cmccormack
Nov 03 2018 22:02
Are you getting an error or anything?
Joshua Arnett
@josha5
Nov 03 2018 22:12
No error MySQL workbench is just timing out and I have to force quit the program
@cmccormack
Stephen James
@sjames1958gm
Nov 03 2018 23:12
@daddycardona Yeah. Main job plus two side gigs. one is developing android app and arduino code for a guy, the other is helping my last company with some code.
@homebrainbox You don't need the prop !== tracks check as you are at the else for the === check