« first day (2412 days earlier)      last day (2535 days later) » 

12:03 PM
wow anyone using grid layout yet? caniuse.com/#feat=css-grid
 
@SuperUberDuper can you tldr whats grid layout and how it is superior / stands against flex?
 
uhm ...
 
is there any other backend js other than NodeJS?
 
if you ask me, css-grid is the opposite of flexbox
 
@hellzone if you count meteor, but I do think it relies on node js the same
It's also outdated if I'm not mistaken
 
12:08 PM
@KarelG then I ask you, what is it, why do we need, what does it solve
 
css-grid doesn't look nice at all.
at least, grid-template-areas doesn't look nice.
 
about cssgrid and flexbox design, really don't get the "basic concept" that suggests the grid for "large scaled applications" and the css-flex for "modules within"
I'd rather state the opposite in fact
!!s/sa/ga/
 
@jAndy @hellzone if you count meteor, but I do think it relies on node js the game (source)
 
12:28 PM
@KarelG ndugger's?
 
I lost the game
 
!!s/ga/sa/
 
@Neil I lost the same (source)
 
jsfiddle.net/weue87q6 is there anyway I can shorten this javascript?
 
@JohnSumner jsfiddle.net/weue87q6/1 done
 
12:41 PM
thanks
 
@JohnSumner Ternary statements, but they'll make your code less human readable
I just got back from being roasted on my project demo by my second marker
 
I can suggest making it longer and not leaking i
 
I've litterally never felt so bad about something I've made, was kind of heart breaking
 
Python room is so boring. They don't have any memes.
 
12:51 PM
my bet is that link will be shared at least ten times in here
that's #4 or #5
 
damn, what number am I?
oh
 
@ndugger import memes
 
gr8
 
You'll need to change things around to match what your receiving and how it works, but it's slightly shorter
 
thanks
 
1:06 PM
might work.
 
@Shubham hey you need help?
 
@DanielCamboim 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.
 
Even better
https://jsfiddle.net/weue87q6/6/
But this is assuming that you don't have the identifyer into each collection.
 
yall keep them leaky vars in there and someones gonna get angry
 
damn!!
Ok updated: https://jsfiddle.net/weue87q6/8/
 
1:10 PM
better :P
I still like mine.
:D
 
Definitely the most performant! That is for sure >D
 
just wondering is it better to use let i = 0 in a for loop or var i =0?
 
Var in modern Js is pointless
Use const until you can't. Then use let
 
it is... Usually I do this but the whole function seems to assume to use good old school js
 
I'd just compile it
 
1:13 PM
but actually a map or forEach is preferred
 
I'd use for..of if I didn't need an index
 
how about this then:
https://jsfiddle.net/weue87q6/9/
 
1:26 PM
@DanielCamboim got the solution for this problem. But thanks for asking (Y)
 
@rlem
 
@joh
 
@rlemon jsfiddle.net/weue87q6/10 i had to get the length to get the desired behaviour
 
    arr.forEach((item, index, { length }) => {
      drawMonster(numberToImage(item), length > 1 ? `${label}-${index}` : label);
    });
 
ok
yup that works thankyou
 
Ced
1:31 PM
Is there an html attribute that I could use for an honey pot to tell blind people to not enter anything in there ?
 
screen readers shouldn't prompt for hidden fields.
 
?
^
 
Ced
So I would like an attribute that when set on an input would read out loud "don't put anything in there" by screen reader
 
no, just display:none; the input
 
Ced
@rlemon it's not hidden, it's under the screen
position: fixed; bottom: -40rem;
 
1:33 PM
ah, you can add in an aria tag of some sort
hold on
 
I'd just hide the input.. like most other honeypot spam preventions do.
 
Ced
Does that actually work ? Seems like it'd be pretty easy to check if the input is hidden..
 
This might be worth checking out
https://www.w3.org/TR/wai-aria/states_and_properties#aria-hidden
 
sure, some bots might be smart enough to do that.
 
Ced
"smart" :p
 
1:35 PM
some are smart enough to execute the js and block you there
it's still good enough
 
Ced
aight
@derp ty
 
but no, follow @rlemon's advice
it'll block the majority
 
googles not-a-bot checkbox is pretty legit.
I'd just use that if I actually wanted to prevent spam
 
Are you worried about blind people getting caught in a honey pot?
 
he's not hiding the input right now. just pushing it off screen.
so screen readers would pick that up. simply hiding it in css (or js if you're paranoid about people reading css) would block the vast majority of bots and not be picked up by screen readers
 
1:38 PM
I still don't see why any accessibility concerns are important in a honey pot
ok. i'll take your word for it. :)
 
Anyone knows a good article/tutorial/walkthrough for setting up proper development/homologation/deployment environments on a agency?
 
best way to test oauth locally still lvh.me ??
 
1 message moved to Trash can
@OtávioBarreto 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
 
close, but no cigar.
 
1 message moved to Trash can
@OtávioBarreto 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
 
1:40 PM
All lines must be 4 or more spaces. even the blank lines.
So just remove blank lines, often helps
 
Ced
@Luggage yes
 
1 message moved to Trash can
@OtávioBarreto 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
 
dude, just use a paste site
 
I am hitting ctrl+k
 
yes, but that just toggles formatting
 
1:41 PM
 <script>
 $(document).ready(function() {

       var userpage = "<?php echo htmlspecialchars($donearray); ?>";
       var number = 10;

       $('#showmore').click(function() {
          $.ajax({
             type: "POST",
             url: "load_more_followers.php",
             data: {'userpage': userpage, 'number': number},
             success: function(html) {
                $('#showmoreresult').append(html);
                $("#loaderIcon").hide();

             }
          });

       });
 
the chat fixed font is weird.
 
how to increment the number variable on click? , I need to send it to db USING OFFSET
 
increment it in your success function
 
How would you increment it outside of a click event?
 
but would't be a problem send this again ? var number = 10;
 
1:44 PM
that's in the document ready function
 
Ced
that makes me think.. I don't need honey pot my site is an angular spa
 
I need to increment and be able to send again via ajax the incremented variable , I don't know it it would be a problem because var number = 10; is in the start of the script
 
What do you think a honey pot is?
 
hahahaha
 
@OtávioBarreto Javascript lets you re-assign a variable to a new value.
We don't help with assigning values to variables.
Well, I don't, at least.
 
1:45 PM
so would be like number = number+10?
 
Give that a try.
 
@Ced are you mad? Honey pot everything
 
Ced
why y'll mocking me
 
1:50 PM
!!learn "developers ".repeat(4); youtube.com/watch?v=d_AP3SGMxxM
 
@jAndy Invalid command name
 
gnah, how would you teach that
 
@Ced Sorry, but you keep saying things that don't make sense. A honey pot is a server designed to lure hackers to be an early warning or diversion. Your app using angular has NO bearing on the decision to have a honey pot or not.
 
@jAndy The best way to teach is to lead by example
 
@Luggage the honeypot technique also describes dummy form elements meant to not be filled.
 
1:51 PM
Maybe @CapricaSix will pick it up in time
 
Ohh. Then I misunderstood. My apologies.
 
Ced
@Luggage if it's an angular app a bot needs to execute the Javascript in order to see the hp
 
I don't like the name.. but yea. it's a thing
 
well, it's still a honeypot
even a honeypot is literally a honeypot
 
ah gawd i'm slow, i just got why there was pooh bear and pictures of bees
 
1:53 PM
I've said enough clever things today. I need to stop
 
HAMMERTIME!
 
what do bees have to do with hidden input fields?
xD
 
@Ced A sophisticated bot could execute the JS, though. The tools available to test app in a headless browser can let bots do all that.
 
Wow, that honey pot search just now probably put me on some watchlist
 
Did you put "porn" at the end of the search?
 
1:55 PM
Not yet...
 
Hello
 
@deyanm 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.
 
though @ced what threat are you protecting against?
 
it's spam all the way down
 
Ced
potential spam
 
1:58 PM
@rlemon good job, That looks really nice! :-)
 
@Ced what trade offs are you willing to make to identify potential spam vs inconveniencing users?
for example, a recaptcha will stop bots from submitting your form
but it'll put a roadblock to real users also
 
google checkbox
simple, very little intrusion, works.
 
Ced
@derp no I'm not willing to do that, there is already one upon registration
 
@rlemon One criticism is would it not be better to still loop over the arguments and provide an identifier through the parameter such as 'north-west' so if he decides he wants more images it's just a case of adding another parameter and passing the correct values?
 
wait do you need to be logged in to submit this form?
 
Ced
2:02 PM
Yeah
 
 
Ced
@derp I'm not fluent in bot prevention, maybe that doesn't make any sens
 
i...wouldn't bother in your case with bot prevention
 
Ced
allright
 
an example might be{images: [1,2,3,4], identifier: 'north-west'}
 
2:03 PM
because they have to create an account already
so hence there's a manual step involved to pass the recaptcha
do you have a spam problem now though?
 
Ced
No, that's why I don't wanna delve into this too much, I figured adding an honey pot was like 2 minutes of work with no drawbacks so..
 
Ced
Can god cook a pizza so hot he couldn't eat it ?
 
'" drop table;
 
even if god could do that, Chuck Norris would have a nice lunch.
after he won the game
 
2:07 PM
Wouldn't the pizza burn?
 
Ced
He would eat the ashes
 
given that there's no universal definition for pizza
 
Ced
looking at god in the eyes to assert his dominance
 
can't you define a collection of random subatomic particles as a "pizza"
 
Hello!
I want to build web app where user will be able to drag and drop clients views, (a lot of items), which frame will be the best solution for it? (I want to use PHP and js)
 
2:08 PM
@Mr.Noob 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.
 
@Ced The problem with questions like that is that if there is a god, he doesn't exist within the confines of our physical existence, so the questions are always entirely moot
 
Hello, Caprica! I LOVE U!!!!
 
Hi guys, can someone please take a look at my question: https://stackoverflow.com/questions/44160791/how-do-i-redirect-in-express-in-my-example

Thanks so much:)
 
Ced
@ndugger if he doesn't exists within the physical world he cannot have any effect on it. Therefor he isn't much of a god
 
@Ced I don't know if that's entirely valid. You can exist outside of an ecosystem and still have an effect on it from the outside
 
2:10 PM
TIL POJO is an accepted abbreviation of Plain Old JavaScript Object
 
Like how I exist outside of minecraft.
 
good to know
 
Ced
@ndugger true, then the effects are limited
 
{} this is a pojo
 
You can't bolt on rationality to an irrational entity.
 
2:11 PM
Guys, anyone, please?
 
@Luggage also true
 
You need to weld.
 
Ced
Ok so god couldn't even cook a pizza to begin with
 
@towc i dunno, i think it came from java origianally
 
God cooked the best pizzas
 
2:13 PM
@Ced basically
or it would be a celestial pizza, of which we can't comprehend
does celestial pizza even have temperature?
 
it's on point
 
Ced
Yes they do, else how would he know it's good or not (aka cold or very hot, not in between)
 
Can someone please take a look at : stackoverflow.com/questions/44160791/… Thanks :)
 
@Ced I prefer cold pizza
 
rewarmed pizza is great
 
Ced
2:16 PM
But I was wondering, if you take out atoms of a pizza one by one. At which point is it no longer a pizza ?
 
when there are no more atoms
 
The point at which people start calling it the pizza of Theseus
 
Ced
back to work, I'm having an existential crisis
 
@Ced Pizza is never lost. It is only converted into new forms of pizza
 
nvm, you're german. that makes sense
:D
 
2:24 PM
@ndugger Nothing like cold pizza after a night of drinking.
 
@rlemon Perfect :D
 
my inlaws are German. they also appreciate those jokes. :P
 
:D
I didn't even catch the pre-edit :\
 
1 message moved to Trash
@tholo please don't spam your question.
 
2:26 PM
Sorry mate.
 
@ndugger
 
@tholo I don't quite understand the problem. It sounds like you're starting out with XHR (Ajax) and you're trying to figure out how to make proper use of your responses?
 
@OliverSalzburg, Sorry for mess up. I have logged in via twitter or facebook, now I need to post to twitter in this example. I thought of making the xhr request to express and then render the page that would automatically post to twitter..
When I make console.log(url); I get the object
{"data":{"url":"https://twitter.com/intent/tweet?url=http%3A%2F%2Fgoogle.com"}}
is there some better way to do this, so I don't need to go to node back and forth?
 
@Loktar @SterlingArcher i.imgur.com/evXQk52.gifv butwhy.gif
 
@rlemon looks like he wanted to go to sleep
 
2:32 PM
@tholo I would handle this completely on the client-side
 
I think he thought he'd hit the stairs and just slide the rest of the way like a slip'n'slide
 
@rlemon That's a high grade nap.
 
Let me show you my template, okay?
 
But I'm not sure how this is "normally" done
 
do you want to go to private chat?
 
2:33 PM
$4.99/minute
 
I'm still at work. Can't get nasty right now
 
haha, sure
 
only $4.99 a minute?
 
hump-day deals.
 
Also I'm working on CloudWatch dashboard and I'm having a way too fun time with it
 
2:35 PM
Oh, I see..
 
Tihihi
 
That's fun :D
I have no idea how to solve this, I'm doing the OAuth via passportjs
 
Well, OAuth is one thing, sharing a tweet is another
You use OAuth to establish authentication trust through a 3rd party. When you want your user to share a tweet, they will authenticate against Twitter themselves
 
Okay, fair enough. Now, my template has Facebook and Twitter checkboxes
 
2:37 PM
what if user has logged in via twitter and wants to post to facebook
 
@tholo Those two use cases are unrelated
 
I agree mate
Do you have any example, how you would do it?
 
Well, we support OAuth as well. That is one subject for itself and, as mentioned, is unrelated to sharing through another service
And those "social sharing buttons" are littered throughout the web. There are like 1000 solutions
addthis.com/get/share is kinda popular, I guess
Rolling your own should be trivial as well
 
my template is like this:

<p id="greeting">Hello, <%= user.displayName %>. You just came from <span id="social-provider"><%= user.provider %></span>.</p>

<div class="col-md-10">
<form class="form" name="postForm" onsubmit="return false;" id="post-form">
<div class="form-group">
<input id="share-input" type="text" class="center-block" placeholder="Please copy url to be shared to social networks"required><br>
<div>
<input type="checkbox" id="fb" required>
<label for="fb">Facebook</label>
<input type="checkbox" id="tw" required>
 
I have a personal preference towards panzi.github.io/SocialSharePrivacy
 
2:43 PM
which makes it more interesting
So I don't need a button..
 
Personally I wouldn't invest a single second into thinking about this. I would pick any of the many available solutions that users already know from other sites and move on to the stuff that actually matters
 
@OliverSalzburg You must be a native English speaker.
 
@ZhengquanBai No, but I play one in DnD
 
DnD stands for "drag and drop"
 
Dungeons n Dragons
 
2:51 PM
Dip n Dots
 
I wield a level 2 Webster's Dictionary
 
Oxford4lyfe
 
Should you encrypt any more persistent data other than passwords?
 
@OliverSalzburg, do you have couple more minutes to waste on me?
 
Urban4lyfe
 
2:52 PM
@tholo Yes. That's what I do
 
How would you post it, if you have 2 checkboxes and a post button
 
@towc I read that as ... Java ...
it would make things difficult if those pojo is also used in javascript ...
 
W O W E E
O
W
E
E
 
J Q U E R Y
Q
U
E
R
Y
 
λ
 
L O C A T E D
O           E
C           T
A           A
T           C
E           O
D E T A C O L
 
@rlemon Still weighs magnitudes less than @KendallFrey's mom.
Anyone watch Boogie2998?
 

« first day (2412 days earlier)      last day (2535 days later) »