« first day (2603 days earlier)      last day (2330 days later) » 

11:00 AM
When I use redux how does the program know which function in reducers has to call?
 
@All hi
i need to add a line break to my javascript text object
below are the thing that i tried
var tempVar = "Total records &<br/> grams";
var tempVar = "Total records \n grams";
 
310
Q: JavaScript string newline character?

Landon KuhnIs \n the universal newline character sequence in Javascript for all platforms? If not, how do I determine the character for the current environment? I'm not asking about the HTML newline element (<BR/>). I'm asking about the newline character sequence used within JavaScript strings.

 
@QuicoLlinaresLlorens You will combine your reducers for the store..So whenever a redux action type is returned it will search inside the reducers you have combined for that type
 
@JayabalajiJ Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
11:18 AM
Hey everybody. I just found out that mobile simulation on firefox and chrome are not working correctly. Do you have any advice for a good simulator on desktop ?
 
The basic ones aren't paid
 
Looking for something which is working with local env :/
 
If you want really old legacy or some weird clients you will have to pay for those
@Baldráni oh. You can input them html and CSS iirc
So you should be fine
 
:/ Really not sure since I'm using Vue components
 
@towc help your brethren
 
11:21 AM
fuuuuuuuuuuuuuuuuuck
who has a christmas party on a thursday
 
Wasnt a christmas party lol
 
@Baldráni try virtual machines
 
They opened a brand new, 10 000sq m warehouse with autonomous forklift thingies
So to celebrate that and their clients in general
Wait I thought im still on slack
 
@towc i'll try some docker android-emulator
 
how about just a virtual machine
docker may not be what you think it is
it's not meant to emulate an environment, but it's meant to act as a standardized environment everyone can code for
 
11:29 AM
@JayabalajiJ so, if I have a LoginContainer component it will search the loginReducer in reducers?
I am having an error now, Cannot read property store of undefined
store is not being initialized
 
@QuicoLlinaresLlorens No
Reducers should not be component specific :|
Reducers should have nothing to do with Components Actually
 
can we do in react js something like $(btn).click(function(){ <a href="hello.html"}) ? i am trying to submit a form and when user submit form it should naviagate to hello.html with its content . not like routing, just like we navigate to web pages normaly.
 
If i can only emulate the browser of android I'll be fine :/ the thing is I'm wondering how to do cross hosts
 
Reducers operate on your state inside the store. Which the components render.
 
Brrr this is way out of my range lets just forget it haha
 
11:36 AM
@BenFortune had a wipe out?
 
@GNi33 Didn't get home till 3am, up for work at 8am
 
nice
 
I found styled components turn your JSX into hell
 
You're already in hell if you're using JSX
 
I'd prefer BEM or CSS Module
What other options do you have in React?
 
11:45 AM
So, I was going to through an askreddit thread about unexpected places in which the Fibonacci sequence shows up. And one of the comments mentioned this song, which is really the work of a mathematical genius: youtube.com/watch?v=eDexY0yEfZw.
4
 
anyone can give direction to my query ??
 
yeah, JSX somewhat sucks, I agree
I like Vuejs template because of directives
everything really sucks
 
u sux
 
that's why we have jobs because things suck so bad
I don't suck
 
JSX is great
 
11:47 AM
@JasonMarsh Spot on!
 
^^
 
@ShrekOverflow so, I don't have to have a function in reducers per component?
 
No
Who suggested you that?
 
@JasonMarsh perhaps JSX doesn't fit your needs right now, but it doesn't mean it can be very useful for other things
 
come on, stop misinterpreting what I say. I said "I don't suck" meaning "I do not lack in technical skills"
 
11:49 AM
:')
 
@JasonMarsh maybe. I was just commenting on you as a person
 
@ShrekOverflow yes, you are right
but I have two components in my app
the Login component
 
and the Article component
 
@littlepootis you got me all worked up
 
11:50 AM
I believe that Login Component will have something to do with user or auth part of your state
 
I think I should have two funtions in reducers
 
thank you for doing that towc, I like receiving feedbacks. But I really do not suck and JSX suck and Facebook needs to listen to my advice
 
one for my Login and other for my article
 
otherwise their beloved framework is going to die
 
@JasonMarsh what's your advice?
 
11:50 AM
JSX suck
 
with that in mind lets assume your state is like

{
    auth: { currentUser: {}, token: ''},
    articles: [],
    currentArticle: -1

}
 
also, people, I forget. Is this a known troll?
@JasonMarsh that's not advice
 
I'm a new troll here, I rarely come here because I have a life to maintain
 
Then you'll have reducer functions like login(state, userInfo) and logout(state)
 
but I now have different states for login and reducer
 
11:51 AM
@JasonMarsh don't bother
 
which update the state.
 
wait, I share you my actual reducers
 
@QuicoLlinaresLlorens If you are using Redux
I will strongly recommend reading redux.js.org
 
Sometimes I want to forget my duty and go full troll online, it makes me feel like I have freedom of speech in this society and come on, it's friday
 
it explains all of this very well
 
@ShrekOverflow would you mind kicking obvious troll?
 
this what I have
ok, thanks
 
Ok I will stop trolling now
 
@towc Not at all, My trigger finger is itching
If he trolls again, I'll kick him.
 
right in the nuts, please
 
11:55 AM
Uncool he was pretty decent troll
plus he got a point : it's friday !
 
@Baldráni you're next
 
:'(
It's abuse of power !
 
@Baldráni Towc is not the Mod
 
my words have very little meaning, it's an empty threat
 
I am. I'll not do whatever Towc says
 
11:57 AM
I know guys :)
 
After setting up and debugging VS Code, I feel a lot better about our own setup
 
@OliverSalzburg Did you find what you were looking for ?
 
@ShrekOverflow To some extent
Having to run a file watcher as part of your initial setup is really the most confusing part
You simply have no idea when it's done and you assume to early that it simply entered the "watching" phase
But it didn't. It's still transpiling stuff
 
!!>Array.isArray(Array.prototype)
 
@BenFortune true
 
12:01 PM
wtf lol
 
And sadly one of the primary launch configs worked for me either. So I was left with the in-proc DevTools, which is not ideal
And for some reason I can't evaluate symbols while debugging. Maybe that's just my lack of experience with their process model, but it's annoying
 
@BenFortune have you seen the Array.prototype.push thing? :D
 
how to get ```[[accountId,serviceLocationId,regionId,zoneId,description,locationPriority,accountTypeId,locationType,location/makani,location/lng, location/lat,deliveryDays,serviceTimeTypeId,timeWindowTypeId,address1,address2,phone,city,county,state,country,zipcode,imageUrl,contact/name,contact/phone,contact/email,status,createdBy,createdDate,updatedBy,updateDate],
[100,1,DXBZONE1,Masafi Park Al Quoz,1,0,DEPOT,,55.21082,25.123091,MTWRFSU,1,,,,,,,,,,,,,,ACTIVE,,,,],
[33662,1,DXBZONE1,Carrefour(Mall of Emirates),1,3,SERVICELOCATION,,55.203742,25.117596,MTWRFSU,1,1,,,,,,,,,,,,,ACTIVE,,,,]]```
{'accountId,serviceLocationId,regionId,zoneId,description,locationPriority,acco‌​untTypeId,locationType,location/makani,location/lng, location/lat,deliveryDays,serviceTimeTypeId,timeWindowTypeId,address1,address2,p‌​hone,city,county,state,country,zipcode,imageUrl,contact/name,contact/phone,contac‌​t/email,status,createdBy,createdDate,updatedBy,updateDate\r\n1,100,1,DXBZONE1,Mas‌​afi Park Al Quoz,1,0,DEPOT,,55.21082,25.123091,MTWRFSU,1,,,,,,,,,,,,,,ACTIVE,,,,\r\n'}
 
you can also do stuff like Array.prototype[0] = 1 to fuck things up
 
@OliverSalzburg that sounds menacing
@KARTHIKEYAN.A Now that is one fat table.
 
12:06 PM
I have object of sting and i want to convert it to array of array strings
[[accountId,serviceLocationId,regionId,zoneId,description,locationPriority,accountTypeId,locationType,location/makani,location/lng, location/lat,deliveryDays,serviceTimeTypeId,timeWindowTypeId,address1,address2,phone,city,county,state,country,zipcode,imageUrl,contact/name,contact/phone,contact/email,status,createdBy,createdDate,updatedBy,updateDate],
[100,1,DXBZONE1,Masafi Park Al Quoz,1,0,DEPOT,,55.21082,25.123091,MTWRFSU,1,,,,,,,,,,,,,,ACTIVE,,,,],
[33662,1,DXBZONE1,Carrefour(Mall of Emirates),1,3,SERVICELOCATION,,55.203742,25.117596,MTWRFSU,1,1,,,,,,,,,,,,,ACTIVE,,,,]]`
{'accountId,serviceLocationId,regionId,zoneId,description,locationPriority,acco‌​untTypeId,locationType,location/makani,location/lng, location/lat,deliveryDays,serviceTimeTypeId,timeWindowTypeId,address1,address2,p‌​hone,city,county,state,country,zipcode,imageUrl,contact/name,contact/phone,contac‌​t/email,status,createdBy,createdDate,updatedBy,updateDate\r\n1,100,1,DXBZONE1,Mas‌​afi Park Al Quoz,1,0,DEPOT,,55.21082,25.123091,MTWRFSU,1,,,,,,,,,,,,,,ACTIVE,,,,\r\n'}
from this
yes
 
!!tell KARTHIKEYAN.A mcve
 
@ShrekOverflow yes
 
@towc Don't be annoying, drop the @, nobody likes a double-ping.
@KARTHIKEYAN.A If you would like assistance, please create a Minimal, Complete, and Verifiable Example
 
@KARTHIKEYAN.A string.split(os.EOL).split(','); // you can use '\n' if you are sure that its going to be a \n endline.
 
and make it for yourself, it will probably make it easier for you to understand it
 
12:08 PM
os.EOL means
 
google it
 
ok i will
 
end of line
 
!!vpn or something else?
 
os is undefined
 
12:09 PM
@ShrekOverflow something else
 
@KARTHIKEYAN.A I assumed you are in Node.js nodejs.org/api/os.html
 
hmm, would be great if string.trim could accept either a regex, an array of characters, or a string as a parameter so you can specify more stuff to trim
so you can have string.trim("{'}").split(',')
 
@towc you'll still need the split '\n'
and all of it won't work if he wants to parse CSV :D
 
yes my data is csv
file
 
12:13 PM
@towc .replace() accepts a regex
 
@OliverSalzburg but behaves differently from trim
 
I feel like it provides a superset of functionality
 
it does, but can be confusing if you're using it to trim
 
Good point
 
apparently trim is equivalent to this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
and it might take me a while to figure that regex out, even if it was just /^\s+|\s+$/g
 
12:15 PM
This is not working
 
change jobs
you might be happier doing something else
just don't spend too much money on unnecessary things and you'll be fine
no more coffee in the morning, beer on fridays, new phones...
 
@ShrekOverflow my professor didn't say to use the react-redux package
I have to use just redux package
 
Email him and ask
react-redux is defacto for react & redux
 
sorry
 
@QuicoLlinaresLlorens react-redux contains redux, and providex good hooks. Unless the assignment was to build the hooks yourself, which is pretty dumb
 
12:17 PM
nevertheless you can just start listening on the Store directly
 
can any one help to resolve
 
I already told you
 
yes I passed as a prop the store
 
os is a node package, ` const os = require('os')`
 
but it says is undefined
and I have defined like this:
 
12:18 PM
and the code I gave will not work if \n is guarunteed and you test it on windows :P
 
import React from 'react'
import ReactDOM from 'react-dom'
import { createStore } from 'redux'

import rootReducer from './redux/reducers'
//Al ser un export default, al importarlo podemos cambiarle el nombre
import LoginContainer from './LoginContainer'
import EventEmitter from 'wolfy87-eventemitter'

var store = createStore(rootReducer)

ReactDOM.render(<LoginContainer store={store}/>
            , document.getElementById('login'));
 
Oh boy
@QuicoLlinaresLlorens this.props.store?
 
That is very weird
 
handleUserNotExist() {
    this.props.store.dispatch(userNotExist())
}
 
12:20 PM
share the LoginContainer code ?
 
Exactly that
 
also dispatch
 
handleUserNotExist() {
    this.props.store.dispatch(userNotExist())
}
 
There it is
 
12:21 PM
when calling this make sure
you don't lose this
 
oh, you are right
=>
 
whats with the . . . . . ?
eww
 
what you mean?
componentDidMount should have an arrow function?
 
this . alpha ?
 
sorry, I don't get what you mean
 
12:23 PM
Thanks everyone i will try myself :)
 
With arrow functions I don't get that error, but nothing is being rendered?
I think the state in store is not changing
how can I see the store?
 
I could not find a networking chat, so I will ask here. I try to run a node app on localhost. I have 2 projects open in atom. Tried various ports. Both console logs confirm the apps are running.
One loads the page, the other loads infinitelly, never renders.
I run one in git bash, the other with the regular cli
reg cli works
 
@Loktar @rlemon @KendallFrey tu-tu-tu-tuduuuuh
 
any good alternative to nightwatch?
 
12:50 PM
baywatch?
overwatch?
 
user5891775
@SterlingArcher what do you mean who is Farty. And what did I do
 
user5891775
I'm Farty
 
user5891775
Why would you kick
 
@FlorianMargaine weird the M50x's actually make it sound not that peircing, and I have never heard the full song before D:
/cc maker people
 
1:07 PM
I know a common mod for the Anet A8 is to stick a laser on it for laser etching, it's pretty neat-o.
 
I'm trying to end an email to my previous english teacher in a funny way
 
@ShrekOverflow Yes. 3d printer parts are so simple that people make laser cutters, cnc machines, lathes, plotters
 
I was thinking something like "I'll also offer a piece of advice to all the students who are going to be interviewed: ...."
I'm sure there's so much fun stuff I can put in the ...
but I'm sure someone here can, in a few seconds, come up with something much better than I could in a few minutes
 
1 power supply, 1 controller board for as many axis as you need, a pile of motors and belts, etc. You can even order the frame bars pre-cut for cheap online.
 
I swear you have to spend hours just setting up and configuring shits in JS :|
 
1:16 PM
@Luggage nice I didn't know that :D
 
all that water cooling and stuff they did in the video is extra and cool, though
 
@KendallFrey @Loktar @FlorianMargaine 7amwakingupinthemorning
okay I asked this last night, and I'm probably just being obtuse. How can I pass a header with my websocket connection? It looks like you can't
 
when establishing it?
 
yea
I see url, [protocols] for a constructor signature
 
no idea, I just wanted to understand the question anyway
 
1:24 PM
but on the node side of life I have a verifyClient method that looks into the header to find a token
if I'm connecting from nodes ws package I can provide headers
 
Is there any way to not show an error in console when I do this?
            throw Error(respuesta.status);
 
new WebSocket(url, { headers });
 
you can send a token as a websocket message after connecting to make a 'session' that way, maybe.
 
I do that throw in order to get the catch of the promise
 
@Luggage yea and that's how I see it done, but then I have to have a separate method to validate that
trying to reuse what I got
 
1:25 PM
sorry, no idea. I only do a few things over socket.io. i never really dug into websockets for realz
 
no worries. thanks
 
If you catch it, it wont show on console
I dont get what you mean by catch of the promise.. you always want to reject instead of throw if youre dealing with Promises
 
1:39 PM
I've just tough of clarifying my earlier question.
Do you know a solution to access localhost of my computer on my smartphone ?
 
google "localhost from mobile"
if there is a solution, it'll be there
 
@Baldráni Browse to your computer's ip
 
@Facebook Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Oh.... sorry about that
 
1:53 PM
Why post this here ?
Don't you have a wall?
 
Why are you asking folks on an unrelated site to re-open someone else's spam?
 
1 message moved to Trash can
 
founded something cool : browserstack.com
 
Wow, what an amazing discovery!
 

« first day (2603 days earlier)      last day (2330 days later) »