« first day (2383 days earlier)      last day (2568 days later) » 

12:18 AM
No
 
12:38 AM
6 of us renting this for ~25 EUR in beautiful Seville :/ imgur.com/gallery/nN84H
 
 
1 hour later…
1:42 AM
25 EUR a day?
 
 
3 hours later…
4:39 AM
is anyone here?
 
i am kinda?
 
@MuggyAte Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
@MuggyAte im trying to think of the best way to make a unique id, i thought of having the date and time in milliseconds so something like 01/02/17 04:25:34:234 would be 010217042534234, do u think thats a good idea?
 
personally no i dont think that's a very good idea
immagine if you have a sudden spike in traffic and you get a bunch of requests at once
that system would very likely break
 
yeh thats the only problem, it wouldnt break but 2 people would get the same id and essentially be logged on the same account, which is very bad
 
4:44 AM
also it would likely result in some kind of exploit where someone can just keep increment IDs while attack your server and fetch data that you normally wouldn't be allowing
 
i did also think of just making an array of id's and then assign something like 238u4283423jfsdfkw and then it checks the array if it exists, if not then assign it. would that be better?
 
personally i'd say you should generate a long string of random characters that have high variance and thus astronomically low chance of repeat
are you using SQL in your stack?
 
no its node js
when someone joins i wanna give them a session id
 
the way i generally solve this problem is to make the ID a primary key and just attempt to insert it into the SQL and if i get a primary key conflict i try with a different random key and i keep going until i insert successfully
oh
what i do is i have something like globalSessions = {}
newSessionKey = genRandomString()
 
wouldnt the chance of genRandomString producing the same string be higher than the chance of 2 people joining at the same 1000th of a second?
 
4:47 AM
if (!globalSession[newSessionKey]) {globalSession[newSessionKey] = {}}
else {newSessionKey=genRandomString(); try again recursively}
sorry i'm new to this cant format code that well >.<
 
ohh thats good, so that way if the 1 in a million chance 2 do match, it will generate a new one
 
ya
that's the idea
 
thats good i like that, im gonna try it
 
i generally have 64 character ID string
and each character in the ID is a-z, A-Z, 0-9, -, _
 
is there a simple line that generates that?
or is it a complex function i should google for
 
4:50 AM
so there's 64 character and 64 different characters that can be chosen from
errr i have a chunk of code that does that
let me find it xD
 
thats like 64^64 possibilies i think
that would be great thankyou
 
nope that didn't format it right x3x
 
1 message moved to Trash can
@MuggyAte Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
 
its ok i think i got it from the trash can
 
4:52 AM
there v,v
i'm a mixed stack dev so i try to write my stuff in a way that's platform independent so it'll work in Node or Browser XD
 
thanks im gonna try implement that
 
ya
i use the same method actually
 
length = length || 16 - sorry what does this do?
64 = 64 or 16?
 
that's a default value
 
ah ok, i thought that was the or operator
 
4:55 AM
basically if you have a || statement if the first statement is truethful the second one will not fire
so basically it's a shorthand for if (!length) {length = 16}
it is the or opperator
 
oh right i get it
 
alot of people use statement || statement2
as a shorthand for if (!statment) {statement2} and i use statement && statement2 sometimes as a shorthand for if (statement) {statement2}
alright good luck with your app :)
i'm gonna go to bed now
 
i never saw that before, thanks
good night
 
 
1 hour later…
5:59 AM
Hello Can anyone help me to solve browser cache issue for javascript files? I have tried multiple solutions but nothing can work properly. Have tried meta tag, window.location and many others solution. By using meta tag, we can get changed javascript file but if we continuously changing that file and it will not update with simple reload. Also tried file versioning methods.
 
@sgajera Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
6:25 AM
 
can you rephrase your sentence?
 
@KarelG What pattern people use for constructing/generating dynamic User Interface
Is there any general/generic pattern that people use ?
 
@Meredith did some searches on the word "madame" in online english dictionaries because you said that it's creepy. Didn't know that it has a negative connotation in english ( it's even used for a female that runs a brothel... ) . However, it has a positive connotation in my language. It's a respectful way to greet a woman.
@Mathematics there are no "general" patterns. You use a pattern to solve a problem, or turn a complex problem into a more solvable problem. Also, in which way do you mean "dynamic"
is the UI being generated on the data provided, or on access rights ? (or something else)
 
@rlemon, you run Cap, not?
This is kinda silly. I wonder if we cen restrict her !!welcome to this room only?
 
6:42 AM
she can look to the url to get the room name
 
@Cerbrus Yeah... If he make that to take current room name, that will be good.
 
@SankarRaj :D
 
@GaneshKumar Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
@SankarRaj No. The whole message, and the room rules, are specific to this room.
Also, @rlemon: Typo: Pleasedon't
 
@KarelG generated on data provided
 
6:50 AM
@Cerbrus Okay.. then Please review the room rules. this words should be removed for others. rest are useful.
 
I am going to make this thing work first, and then refactor code, maybe everyone does that way ?
 
@SankarRaj Again, no. It's unlikely the welcome message is going to be configured conditionally.
 
@Mathematics Take it in small steps
Otherwise you either end up with code that's very hard to refactor, or the refactor ends up taking too long.
 
^--
but, can you give an example of your dataset ?
 
@Cerbrus okay then will wait for @rlemon response on this...
I think she was lost some of her memory, I was banned from her by rlemon
but now she is responding to me.
 
7:09 AM
@KarelG yes, please stay with me, brb
 
7:23 AM
@KarelG here it is - jsfiddle.net/ntbkyuau
This is a edm model
It will be used to generate queries A.K.A Urls for Odata web services
will add some working code to make more sense of it
 
7:44 AM
and your goal is to have an UI based on those object keys ? (kinda organic UI ? )
If you ask me: don't. That API provides a lot keys, which gives you a very large UI. Only stick to what you need to do/use
 
@KarelG yes but that's not entirely true, I am trying to create a skeleton of what I want, it will help :)
 
8:05 AM
@KarelG this is the direction I am going in - jsfiddle.net/ntbkyuau/2
I want to add 3 levels of selects for user to select columns from
Let me know if doesn't makes sense... there is one part I am yet to add... which is to construct urls when user select these datasets and there fields/columns
 
@towc well, chrome doesn't auto-update on *Nix afaik
 
8:40 AM
use it correctly ?
get a good mouse ?
I've never got pain at my right hand. And I use it a lot.
 
@Dr.Sam get a mac touchpad, windows mouse might give your hand a break
and or a good mouse
Poor people don't get to choose. :(
 
o/
 
29
Q: What do you do about wrist pain?

andrewrkI use the computer for many more hours per day than any human should, and consequentially I have wrist pain. It hurts to hold the mouse in my hand. Typing is fine, and I've learned how to stop using the mouse. Mostly. I'm otherwise entirely healthy; I eat right and exercise on a regular basis. ...

 
@GNi33 \o
 
There are some touchpads at my workplace where my colleagues can use it if they've pain when using the mouse.
it helps, but excessive use of a touchpad led to wrist pain more quickly ... really
 
8:52 AM
I used one of those vertical mice for a while, couldn't get used to it
 
Hello
all
I am able to get notification in my app
but how can i give it to web
 
I got accustomed to a eyboard-centric workflow.
I rarely touch my mouse.
 
That's probably ideal
 
yeah same here
 
can any one help
 
8:54 AM
Have you tried this? @AdityaVyas-Lakhan
 
Keyboard-centric workflow is hard in Photoshop though :\
 
I only wish that chrome has a shortcut to display all tabs in a big view, so that i can navigate between the tabs more easily than just Ctrl+Tab
 
im kinda forced to learn react
 
tahnks akshay
let me try
:)
 
:)
 
8:56 AM
firefox had that feature before (tab group or something). now it doesn't :/
 
if I have
<comp1>
<comp2>{comp1.propvalue}<comp2>
how can I render a prop value of comp1 inside of comp2
 
@Dr.Sam Put it around your neck
 
LOL
 
@KarelG you didn't said anything then :P
 
9:18 AM
@Mathematics oh, ... well that's an organic UI :P But you can use factory methods.
 
@KarelG factory methods, hmmm never heard of this, thank you will google it
 
I have some little knowledge on Angular 4. Why all these tutorials are starting with a seed? why they can't start it from the scratch? Does anyone know any tutorial which starts from that level?
 
@JudeNiroshan what do you mean by seed
 
@Mathematics a github repo.
 
@JudeNiroshan Because people are idiots and just want to publish some crap that explains stuff that is already explained hundreds of times
 
9:33 AM
I find this one useful progur.com/2017/03/…
 
@JudeNiroshan It seems like that is something someone should be able to build by reading the "Getting Started" section of the Angular docs
But, hey, whatever helps
 
@KarelG I think builder pattern fits better then factory methods for this
 
How would I implement a N: Merge -> Process -> Split: N
in Node? (Merge -> Process -> Split) is my code
 
^
 
9:46 AM
Why do people use .distinctUntilChanged() in RX for autocomplete ? I don't understand. This will cause not to search "AAA" - while it might be what the user wants
 
in conjunction with a debounce it makes the code not do another request if someone goes AA -> AAA -> AA
 
@Mosho IIUC - debounce will only execute AA in AA -> AAA -> AA
 
yeah you're right
 
So what will happen If I actually want AAA ?
 
@OliverSalzburg basically a mux and demux
 
9:52 AM
debounce will yield AAA , but distinct until changed will yield A . no ?
 
no
 
oh
 
distinct means that if it stays AA nothing will happen
but AAA will get passed
 
multiple streams will write into my stream, I need to merge their messages, process this and then split it again for everyone.
 
@Shrek Now put everything back together in your head and put it into a proper question ;P
 
9:55 AM
@Shrek do that
 
vOv dunno xD
Yeah HOW?
 
@Mosho Read it again and again and it make sense. Thanks. BTW why did they remove the FLAT keyword from flapMap (which is now a mergeMap) ? the name should indicate the FLAT
 
the only thing you need to think about is a way to define a chunk that you want to process
@Royi no idea
 
^ That is exactly where I'm confused
 
@Shrek you can either use a delimiter string or define a length for a "package"
 
9:58 AM
The real question is, if you have no clue how to do it, how do you even know it's the right approach for your problem?
 
>
The real question is,
Thats pretty much where I'm stuck
I'll figure it out :)
 
you would also need a way to keep track of who sent what messages
which is simple enough
what are you trying to achieve?
 
Mux and demux in AV is pretty trivial as you know what type a stream is, so you simply have to grab all the frames from the same stream
But your description is so generic, it's impossible to give any real advise
Putting files into a ZIP archive and then downloading that file over the web and extracting it, that also fits your description
 
Hi all
0
Q: uniq two array objects and give priority to true value

Mr_GreenI am trying to do array manipulations inside an arrays object as shown below: var first = [{ a: "one", x: false }, { a: "two", x: true }, { a: "three", x: false }, { a: "one", x: true }, { a: "two", x: true }, { a: "four", x: false }]; Expected r...

^ Any help?
 
@Mr_Green Just run one _.uniqBy pass, then iterate the array again, checking for x=true and set that accordingly
 
10:11 AM
If I do _.uniqBy first then there is a chance that I will lose the object which has x as true
oh you want me to loop again?
 
@Mr_Green Yeah
I would even assume it's probably faster than doing some "lodash magic"
 
:(
ok thanks
 
Or sort your array by x first ;)
 
hey guys@BenFortune @rlemon could some of you unban Tcat from using caprica?
thank you
 
Why are they banned?
 
10:20 AM
I dont know
Tcat never misused her
maybe some trolls put him in mindjail
 
!!are you dead?
 
Yes :)
 
@BenFortune Not a chance
 
She usually tells you if you're mindjailed
 
!!help
 
10:22 AM
yes she does for TCat
 
!!are you dead?
 
!!unban tcat
 
@Mr_Green Doubtfully
@BenFortune tcat freed from mindjail!
 
thank you
 
!!hans
 
10:22 AM
there you go@TCat
 
@TCat hans is a catmaster
 
!!ban Mr_Green
 
@Mr_Green The user will be thrown into mindjail in 1 more invocations
 
woo hoooo
thank you guys
 
oh I can ban myself.. great
 
10:37 AM
do that and then you see that cannot unban yourself. haha
 
why when you do npm publish with a yarn.lock file does it take ages?
 
!!help
 
@Abhi Information on interacting with me can be found at this page
@Abhi Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
 
@rlemon heh
 
10:43 AM
!!give rlemon a lick
 
@RaisingAgent That didn't make much sense. Maybe you meant: live
@RaisingAgent Mmmm! rlemon tastes just like raisin
 
Oh, does he? :)
 
bah raisin
 
can you make caprica lick "raisin" ?
or are there multiple answers to what X tastes like?
 
just checked the source code. Answer ("just like raisin") is still same
 
10:59 AM
@MadaraUchiha I am not developing something really big, but it's small - medium, not sure if you had a look my fiddle earlier :)
 
@Mathematics ?
 
@rlemon that was a big adventure: gfycat.com/MammothDifferentGhostshrimp
 
Could I /learn Caprica a command?
 
No, it's a punishable offence.
 
11:04 AM
@MadaraUchiha :|
 
offense*
 
@towc offensce*
 
I'll offensd you
 
@towc I'm used to the British English spelling.
 
*English
 
11:08 AM
oh damn
I thought the british wrote offense too
 
@KarelG That ending haha
 
Upgrading to zesty.
> You have to download a total of 3,601 M. This download will take
about 10 minutes with your connection.
 
@MadaraUchiha Trying to understand "?" means
 
It means he doesn't understand what you're talking about.
Will learning Haskell make me less retarded?
 
ofc
Haskell cures cancer
eventually
also, I'm noticing a trend
Meredith is slowly taking Sterling's place
my kid littlepootis doesn't like change
 
11:18 AM
@MadaraUchiha Is @littlepootis right up there ?
 
this is scaring him
 
@towc are you talking about currenicies ?
@Dr.Sam are you a real doctor ?
 
@Dr.Sam Doc, this isn't the Java room.
 
@Dr.Sam do you work on humans or animals
@Dr.Sam I was being serious :P
@Dr.Sam what sort of field you're in ? dental, heart, ENT etc.. ?
 
*created
 
11:26 AM
so this is how the german national criminal office is portraying their "cybercrime competence centre". Jesus freaking christ
 
@Dr.Sam Do you have to be a doctor for that ?
anyway, why are you programming then
change of career ?
@Dr.Sam General Physician
 
Part time troll is strong in this one.
 
Ugh, the junk answers that get upvotes some times...
 
@littlepootis Depends
What languages do you already know?
And to what extent?
 
11:44 AM
@Shrek Are you new to this room ? as never seen you trolling before LOL
 
@BenFortune another doors in KSP: i.redditmedia.com/…
 

« first day (2383 days earlier)      last day (2568 days later) »