« first day (2044 days earlier)      last day (2897 days later) » 

12:19 AM
Can't you just post it?
 
12:33 AM
40
A: A cause for self moderation and query on the events of 20 May '16

Undo I'm going to be frank here, with my thoughts as a user. Everything that follows is my thoughts as a user, and in no way official. This isn't a stance of the moderation team or staff. Okay, I'll bite. I'm deliberately not addressing the specific problem at hand, but rather the constant use of...

holy shit, that's actually a thing? I was just trolling when I used that excuse.
 
How do I target the paragraphs in HTML5 from javascript and set them into a specific class that's in CSS?
 
...
you mean, how do you add a class to a target element
first, you have to get the element
 
Yes that's right Kevin. I have target all elements var paragraphs = document.querySelectorAll("p")
 
This (for example) will make all paragraph backgrounds yellow p { background-color: yellow }
 
Hi Shea, yes I tired it out and everything worked. But I changed color text
Thought I could do paragraphs[i].className += "myClass"; but did not work
 
12:52 AM
are there other classes on the <p> alreadY?
 
yes indeed. a div class
So do I need to create a variable to specific this class first and then use the code above?
 
@Global do paragraphs[i].classList.add('myClass'); instead
 
paragraphs[i].className += " myClass";  //put a space in front or what @Shea said
 
Uncaught InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided (' classBody') contains HTML space characters, which are not valid in tokens.
If using space. The other one does not changing the <p> into class either... hmm
 
take the leading space out if you use classList, or leave it if you use className +=
 
1:01 AM
<p class="classBody></p>
^ Possibly the worst named class, ever. :)
<cat name="dog" />
 
That's just an example here Luggage :) a bad one. I know
bodyCopy should it be.
 
hi friends
 
yea, bodyCopy makes sense.
<cat name="badger" />
 
yeah
 
1:04 AM
paragraphs[i].className += " bodyCopy"; with or wihtout space doesn't work
paragraphs[i].classList.add('bodyCopy'); not that one either.
 
Can someone help with a quick CSS question?
 
That depends on the question.
 
I did it before but forgot how I did it, but say I hover a button and I wanted to zoom an image on the button hover, I forgot how to do it so if button was hovered then do this to the image.
 
:hover is the selector for a style you want to apply on hover.
button:hover { ... } or .specialButton:hover { ... } etc
 
there's like at least 5 ways I can think of, to do the zooming part off the top of my head
 
1:07 AM
so can I do .featured:hover img{...} so it selects image?
that's inside the div
 
an img inside of a .featured you are hovering in, yes.
 
ok
@Luggage thanks
 
It does not work. Could the problem be the div class? However the text color is changed.. but cannot add class.
 
@Global make a fiddle if you want help. I am having a hard time following your problems.
 
1:11 AM
the most beautiful words ever typed into an email client:

> Won't fix. We're deprecating support for ie9 and ie10
contented sigh
 
you typed that?
 
our PM did
 
nice.
 
indeed
 
I just dropped support for gopher
 
1:12 AM
flexbox isn't supported by IE10 and our page blows up without flexbox, soooo yeah
 
not even valid jS syntax, yet.
 
Sorry.. Getting really tired..
 
can't tell if trolling or not
 
Most here won't help until you bother filling in things like: var paragraphs = document.querySelectorAll("p");
you have to show us code with your specific problem, not code that we have to fill in before we can even help with
but.. since I'm in a good mood: jsfiddle.net/cu31wbnr/1
works just fine.
also note how I bothered to click the 'tidy' button at the top and format it so as not to cause bleeding of the eyes.
 
1:25 AM
oh lol. My bad.. first day of this html and css. But I'll understand now.
Of course it wont be changed in html document, only its view for user >_<
 
then welcome to.. umm.. html-land?
:)
er.. if you want the class to be permanent, then just set it in the html. like: jsfiddle.net/cu31wbnr/2
 
all <p> elements might be a bit much. there are likely to be other <p>'s at some point.
 
thanks lol. Im thining of using some parameters to the function so users able to search within element. However, are you recommending to use any if statements as well in functions? To verify and.. possible send out some message if not found any
 
1:41 AM
And would you consider using childnode is better looking?
 
they all have their uses
 
 
1 hour later…
3:10 AM
@Shea ok so PG-13 now?
no blood please.
@KendallFrey lol you got your rift on the best day
 
how so?
 
internet blew up today over Oculus blocking revive
 
what's that?
 
lol just the best day in terms of everyone saying they aren't buying a rift and returning it now, ect.
Revive allowed people with Vives to run Oculus home titles
and Oculus updated Oculus home which renders revive useless
 
3:12 AM
there are giant threads on reddit on every subreddit dealing with gaming/vr/pcs it seems like
everyone in an outrage
 
I'd just like to mention that Lucky's Tale is a fantastic VR experience
 
hah! Yeah I thought it was pretty good as well
it's funny man so many people were saying dumb stuff like "Why is Oculus releasing 3rd person games, that isn't true VR!"
and they still believe that..
just can't understand until you try it really.
 
The odd thing I'm finding is I feel worse without the Rift on
 
haha weird man
you are meant for the virtual world!
 
lmao
do you know of a better way to calibrate IPD?
I feel crosseyed now
 
3:16 AM
I had mine measured by the eye dr
so I could put the correct value in
I do notice no matter what when stuff is right up in my face in the rift I go really cross eyed
I can't focus at that point
 
yeah close up stuff just doesn't work
it might be the focus at infinity thing
 
yeah
 
The HoloLens won't have that problem ;)
 
3:36 AM
hah yeah
too bad the dev kit is so pricey
 
I need to set an interval to check for certain values, but I don't know how to return the values from the setInterval function. I need to do this because the variables need to be available for use within a click function. Please help jsfiddle.net/995s4yye
didnt have jquery in the demo jsfiddle.net/ubLjaeq2
 
3:59 AM
@Loktar I mean, "culture" is just a term I thought up off the top of my head to successfully troll.
 
yeah I hadn't read why you linked that initially, just the link itself
 
I thought it was peculiar that people actually use that term, no wonder it worked.
all in good fun though, right?
 
4:17 AM
HMD hair is on fleek
I look like a retard
 
How do I insert into multiple databases?
with the same tables
 
@KendallFrey LOL
yeah I only wear mine after I get home from work and when I know I'm not going out anywhere
 
I'm usually not going out anywhere
it's the same deal with headphones, just worse
i may need to try wearing a hat underneath
 
5:09 AM
guys how can i contact with that code ?
using ajax
oh my code seems ..
    $httpBody = file_get_contents('php://input');
    $parameters = json_decode($httpBody,true);
    /*
    	Check if parameters are set
    */
    if( !isset($parameters[ "question-id"] , $parameters["answer-id"] , $parameters["time-answered"]) )
    {
    	$response["code"] = "610";
    	$response["message"] = "Invalid Request, question-id and/or answer-id were not given";

    	http_response_code(400);
    	print json_encode($response);
    	return;
   }
}
i use

$.ajax({ method:"POST", url: "/api/answer", data: JSON.stringify(data),
     success: function(data) { alert(JSON.stringify(data); } });
but didnt work
 
5:59 AM
@AwalGarg Nope!
@FlorianMargaine Neat! They have a larruping WOTD feed
 
6:34 AM
@SomeGuy hahaha
 
6:46 AM
Don't mean to be a bother but does anyone have a solution to my problem above?
 
7:24 AM
@Shniper my guess is no
 
@SomeGuy :(
 
@AwalGarg It's alright. I'm not looking actively right now anyway. Got enough to do for a while!
 
w3c did a paymentrequest api. the payment requests be coming
 
Neo
Hi all
I'm trying to use the sort() function
for arrays
var numList = [2, 8, 4, 9, 0, 3, 19, 23, 2, 3];

document.write("Sort array: " + numList.sort() + "<br>");
But the output I get is: Sort array: 0,19,2,2,23,3,3,4,8,9
the array is not sorted
Could someone explain to me why is that
?
 
7:40 AM
Hi @Neo
 
@hisener 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.
 
Because it sorts like string
You should write your own callback function for numbers
 
Neo
Ok, thanks
 
7:55 AM
I need to animate something when the scroll reaches a certain point, but when the animation occurs I don't want it to happen again, but i need the animated item to stay where it animated to. Scroll down, keep scrolling after the animation, there will be flickering because it is trying to set it back to 0 and restart the animation every time you scroll, how can I fix that? jsfiddle.net/5j17vur9
nvm answered my own question. .val(0) shoudlnt be there
 
hi
how are you guys?
 
weird
 
@AwalGarg what's weird?
 
yes
 
wtf
ok
Look, I've got a stupid problem. And I simply can't find what's wrong...
 
8:04 AM
Ignore him. He's our local W3Schools certified PHP expert
They tend to be that way sometimes
 
I know him :))
LOL
 
@SomeGuy that's... pootis. you can't just barf my joke on me
 
So, I have a react component gist.github.com/barbu110/d41a4281b66adce86f5c7ba1b58d6baf (just 40 lines there). In the browser, I get React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of BlueBar.
 
@AwalGarg Aren't you both the same person anyway?
 
we've got like 300 people controlling all the things together. I don't know what you are talking about.
 
8:07 AM
guys stop this
and help me instead. please :))
I don't have any idea what to look for, I don't know what's wrong
 
secretly all front-end programmers are in the same state. some realize that and some don't.
 
@AwalGarg
 
glares
 
why?
 
I was just wondering did you get any reply from XHP devs?
 
8:15 AM
@AwalGarg nope. I ended up approaching things differently
and I think this is better than what I had before
I decided I would write the entire UI in React and rely on the REST API to actually get information from the server
I think this is better because it allows me create a much more dynamic UI (like logout without even refreshing the page)
 
Hello every one
 
@Rahul 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.
 
I am having an issue with javascript in my new wordpress website, can anyone here help?
I am learning wordpress and js
error in console is: Uncaught Error: Syntax error, unrecognized expression: .navbar-nav li a[href^=#]
 
@Rahul some context?
 
in jquery library file I am gettiing this error
@vi
here I have uploaded the WordPress demo website
in console you can see the error,
 
8:29 AM
yeah, as well as the COMPRESSED code that nobody can read
you should post the snippet that causes this here
 
in chrome you can prettify it
last line of chrome develper tool bar has two braces
it will prettify the code
but its library file, so i guess the problem is somewhere else
 
that's why you should post the snippet that causes the error
I think this is what you're actually looking for
right?
 
how can i remove that error
because the error is in library file, where else should I modify the code
 
@Victor while I don't necessarily agree about refresh-less UIs being better, congrats on leaving XHP-JS. It wasn't really worth your time.
 
Hi
 
8:37 AM
@AwalGarg you seem like that old-fashion AJAX-hater guy
:))
 
sure
 
He is a troll
 
@Abhishrek whatever happened to your vow of not coming to the internet chats? :P
!!define troll
 
@AwalGarg troll (fantasy) A supernatural being of varying size, now especially a grotesque humanoid creature living in caves or hills or under bridges. [from early 17th c.]
 
@AwalGarg the same thing that happened to your vow of celibacy
 
8:41 AM
Can confirm. I am exactly that.
 
Doesn't seem that way for future.
 
@Abhishrek I still follow that. vow unbroken.
 
right
 
*r
 
What is the best way to throttle streams in nodejs?
 
8:43 AM
pipe them to a rx stream and throttle the rx stream, use the rx stream as a proxy
 
:-|
@AwalGarg I don't exactly want to throttle it
I want to actually chunk it into chunks of fixed size n
I think extending stream.Transform should be fine?
 
not sure if stream.Transform lets you defer the incoming event. if it does, sure
 
@AwalGarg it won't do anything until you do this.push
 
should work then
 
Dunno if its the best way of doing it :S
 
8:54 AM
See you are missing the point. The reason we use nodejs is because with other platforms, you get confused at many splits. "Should I do it this way or that? Which way is better?". The best selling point about nodejs is that you don't have to worry about that. There is no better way in the first place.
(yeah I copy pasted. who cares)
 
@AwalGarg So, you're saying nodejs isn't flexible?
 
Although there is a hard problem, I have no Idea how to go ahead or behind in node-lame
 
9:09 AM
is there a media query for max-width less than?

for this there will be both media queries applied at width @sm which I don't want
@media (min-width: @sm) {
  .hidden-sm-up{  // hidden from small size and above
    display: none;
  }
}
@media (max-width: @sm) {
  .hidden-sm-down{  // hide anything up to small size
    display: none;
  }
}
maybe I'll try @media (max-width: @sm - 1) {
 
@SuperUberDuper not sure if this helps css-tricks.com/logic-in-media-queries
 
Could someone help with a simple jQuery script?
 
@bobjomes 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.
 
I'm trying to make it so that when a user selects text in a contenteditable div, they can add a link to the selected text
i tried using this code
 
1 message moved to Trash can
@bobjomes Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
9:21 AM
okay
$('#link').click(function() {
  var linkURL = prompt("Enter the URL for this link:", "http://");
  document.execCommand("CreateLink", false, linkURL);
  updateInput()
});
 
@Shniper thats not about less maths calculations
I need a width 1 px less than @sm
I don't want to create another variable for it
 
9:55 AM
how would i execute a command if the selected text is a link?
 
10:51 AM
@Neil a followup on the streams thing :P
turns out I cannot do the encoder as is, so this is what I ended up doing (slightly-untested) pastie.margaine.com/c6fdc7ea-14f7-4a1f-95be-b8d931c5c62c
I will probably make it accept a resolution parameter aswell which removes the 1 second madness
@MadaraUchiha ping
 
11:14 AM
nodejs.org/docs/v5.11.1/api/all.html This shouldn't lag a desktop browser, should it? Or are browsers outright useless
 
works fine in FF along with 125 tabs
If it works fine in FF, can't imagine it lagging in chrome
 
@AwalGarg It lags in chrome
but I am used to 60fps scroll
 
Actually I am cheating a bit since I have enabled skia azure backend on FF
 
also chrome is eternally doomed for big images and stuff
IE 10 performed better than chrome on svg and huge images
yep chrome sucks, EDGE is silky smooth there
 
let the browser war begin
 
11:18 AM
but only in desktop mode
ugh I am going to get to the depth of this after I am done with work.
 
11:39 AM
Hi guys could any one tell me how to continiously check the value of a particular input field once the page is loaded?
 
11:57 AM
@astrosixer two options: use setInterval() to check the input field periodically or check when the input got changed by oninput or key events on that input field
 
Okay quick question
    micStream
      .pipe(micResampler)
      .pipe(micTimedChunker)
      .pipe(micTimedPanner);

    mp3In
      .pipe(mp3InDecoder)
      .pipe(timedChunker)
      .pipe(timedPanner);

    mixer.pipe(encoder);
 
Off the tops of their heads, anyone know of a free / open REST endpoint? Entirely for the sake of a tutorial. I just need to find one, the lower the barriers to using it the better (No subscription, no authkey, no private account)
 
and then mixer.connect(micTimedPanner, timedPanner); (connect can take n arguments)
 
are you using js for recording mic sounds?
 
@KarelG yes, mixing multiple source streams and encoding one out
 
12:10 PM
neat.
 
so far mixer kept its own buffers
for timesyncing but I added timedPanner
to allow seeking (maybe rename it to seekable stream)
I wonder what would be the idiomatic way of re-implementing mixer
so that it checks both all the streams for data
writes silence if no stream has any audio
 
I don't have experience with using sound(stream)s I hope that someone helps you though. It seems impressive to use js for creating a sound mixer
 
@KarelG JS is merely orchestrating streams though
 
i don't know ^^
 
Most heavy lifting is done by very very very stable native libraries
 
12:22 PM
if you ask me to program something to fiddle with sound you will get a product that opens the gates of oblivion when you run it.
 
like libsamplerate libmpg123 liblame etc.
xD
 
@Abhishrek pong
 
details about the riddle, I can do it from next sunday (:
 
May 16 at 7:56, by Madara Uchiha
@Shmiddty It's going to be a JavaScript based riddle, aimed at attracting JavaScript developers. For example, a possible concept would be "you're presented with an image of a safe, and your goal is to open the safe", and opening the safe would require reading the JavaScript code, understanding what to do, and then perform it. Your job would be to develop this, working alongside a designer and the project manager from the company.
It's a serious project with deadlines and stuff, probably
(a freelance contract, if you will)
 
12:42 PM
it's pretty funny how all types of industries want to adopt Agile
in their business
such as marketing, supermarket, even McDonalds
In Supermarket Manager says: Hey employees, we are adopting Agile in our business. I know it's for software development but I like the idea so why not have it here?

Ok Peter, I am timeboxing you to clean up the toilet in 30 minutes GO! SPRINT!
 
@Abhishrek That's way over my head
But if I had to interweave two streams, that's how I'd do it for sure. ;)
 
It won't work with panning though
at all
so I wrote this
 
Manager: Sarah, I am locking you into a sprint to work very hard for 24 hours per day 4 weeks. Check your burndown chart to see exactly what I mean by this.
 
And that my friend is where I am stuck :P
 
They will find out that using Agile methodology wouldn't work in let's say supermarket operations
 
12:49 PM
Sarah complains: Hey Manager, are you abusing my work hours?
Manager: No, not at all. Have you thought about making your work efficient and faster so you can go home early?
 
i have doubts on that. Only an idiot manager would try that
 
In my current job everyone would laugh at me for even mentioning "efficient and faster".
 
you are in the best job @JanDvorak
Congratulations
 
Apart from the pay, yes, it's a dream job :-D
 
Oh, yes ofcourse
Pay matters
 
12:55 PM
I don't have high desires. I'm used to an S10-3t, so I was delighted to get the work laptop for personal use.
 
nice
Manager: Sarah, why are you crying?
Sarah: You didn't let me go home for 48 hours!
Manager: Well, in Agile, while Sprint is running, you cannot go home
 
In that case, I would expect lots of coffee, paid by the company ofc :-D
 

« first day (2044 days earlier)      last day (2897 days later) »