gloriousCatnip

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Feb 9, 2018 10:30
I'm just making a little application at work and I have no experience using Webpack and Browserify yet
Feb 9, 2018 10:29
well EXCUSE me
Feb 9, 2018 10:29
unless I can render lists in jquery easily
Feb 9, 2018 10:28
I just need a simple React instance to render a list in an application that otherwise runs on jQuery (for $.get) and pure js for the rest
Feb 9, 2018 10:28
how can I use React without Webpack or browserify?
Feb 6, 2018 09:56
ugh, i'll try @DenysSéguret solution then
Feb 6, 2018 09:54
@BenFortune I just tried it out in the console with some arbitrary Date objects, and it worked
Feb 6, 2018 09:54
The question is if QML supports Set
Feb 6, 2018 09:54
Ben's solution worked!
Feb 6, 2018 09:48
Ok, I have an array of dates and I want to filter out to unique dates.
Example: [12.03.2018, 12.03.2018, 14.03.2018, 14.03.2018, 15.03.2018], and I want this output [12.03.2018, 14.03.2018, 15.03.2018]. Does that make sense?
I'm preeeetty sure they are Date objects
Feb 6, 2018 09:45
so i have an array of dates, how can I reduce the list down to all the unique dates (ignoring clock)?
Feb 5, 2018 07:37
are there any way to listen to changes to document.activeElement? I would like a variable to hold that value
Nov 25, 2017 12:41
HTMLElement.prototype.switchClasses = function(cOne, cTwo) {
	// Toggle from one to two
  if(this.classList) {
  	if(this.classList.contains(cOne)) {
    	this.classList.remove(cOne);
      this.classList.add(cTwo);
    }
  } else {
  	console.error("no classlist wtf");
  }
}
Nov 25, 2017 12:41
but for some reason, that is not good to do
Nov 25, 2017 12:41
For being able to extend HTMLElements
Nov 25, 2017 12:25
I have just started to learn JS 4 real, and I started up by extending the HTMLElement, and I'm apparently NOT supposed to do that. Are there any other alternatives in pure JS?
Jul 28, 2017 23:21
I'm making a webpage, how can I make it auto reload with SASS? I tried doing it with livereload (but the project seems dead) and livereloadx (but don't how to do it with SASS)
Jul 27, 2017 07:54
so I've got that going form e
Jul 27, 2017 07:54
Yeah, I got a book called JavaScript: The Good Parts from my library for like $1 because they were having a cleanup sale
Jul 27, 2017 07:49
Oh, okay. I'll do that! Thanks. :D
Jul 27, 2017 07:46
haha, I've had some less than pleasant experience with jQuery, but it might be because I didn't know JS
Jul 27, 2017 07:44
I'd like to learn Vue/Angular, but I think a good understanding of pure JS is in order before taking on those projects
Jul 27, 2017 07:44
that's kind of useful tho
Jul 27, 2017 07:43
That sounds like a good idea. I've tried (and made it somewhat in CLI with Python), but have never managed to do it in JS
Jul 27, 2017 07:42
So I'd prefer learning some GUI/graphical applications
Jul 27, 2017 07:41
Oh, cool! I'd be sure to check that out! I've made an almost working version of Pong using canvas, but I'd like to do more. I find JS very interesting haha
Jul 27, 2017 07:39
I have started learning JS (with a little prior knowledge of programming), are there any small projects I can start doing in pure JS?
Jun 8, 2017 13:02
if/else seemed to work! thanks!
Jun 8, 2017 13:00
so just a window.requestAnimationFrame instead of return?
Jun 8, 2017 12:57
Until yesterday I used an interval function, and I just now converted to requestAnimationFrame
Jun 8, 2017 12:57
My Ping pong game almost works perfectly now, but I can't unpause the game, haha, can anyone see what's wrong? codepen.io/wostensen/pen/LLVxaL
Jun 7, 2017 19:03
codepen.io/wostensen/pen/LLVxaL Can someone tell me why my collision function doesn't work properly? Whenever the ball is to the left of paddle, it starts to vibrate
Jun 7, 2017 16:43
I was thinking about normal bicycles
Jun 7, 2017 16:42
Oh haha
Jun 7, 2017 16:42
bike exam?
Jun 7, 2017 16:40
Maybe i'll try Node as well!
Jun 7, 2017 16:39
yeah, I've tried to get into game dev for a long time and JS really made it easy for me to understand it
Jun 7, 2017 16:38
I also read a lot of "bad" JS is, but I really love it haha
Jun 7, 2017 16:38
@luggage Well, I read many programming subreddits on Reddit and I constantly see titles or jokes like 'node.js is cancer', 'who thought javascript for backend was good' and so on
Jun 7, 2017 16:36
Is Node.js really as bad as people say it is, or is it just exaggerated?
Jun 7, 2017 13:29
so I should not use document.onload()? @rlemon
Jun 7, 2017 13:23
As I've understood it, requestAnimationFrame requires a callback and having the callback recursively call it, and I've done that but no error and nothing shows up
Jun 7, 2017 13:23
I'm trying to use requestAnimationFrame (began using canvas yesterday), but I don't see what I'm doing wrong: s.codepen.io/wostensen/debug/bRdXeZ/LDAmdVnVazQr
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
Dec 24, 2017 17:39
nvm it works now, for some reason haha
Dec 24, 2017 17:37
tried to format the code, here's a gist instead: gist.github.com/wOstensen/0521006013a62968845233d0a952852f
Dec 24, 2017 17:34
I'm trying to make some styling for headers in Sass, but the processed CSS insists of having space between the number and em. Why?

@for $n from 0 through 5
h#{($n + 1)}
font-size: (2 - ($n * 0.15))+em
&.bold
font-weight: 700
&.upper
text-transform: uppercase
&.primary
color: $primary
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Dec 14, 2017 13:43
Looking for sources that will teach me PHP in a good way, any suggestions?
 

Trash can

Like the recycle bin, but trashier.
Nov 25, 2017 12:41
This is what I tried to do:
```
HTMLElement.prototype.switchClasses = function(cOne, cTwo) {
// Toggle from one to two
if(this.classList) {
if(this.classList.contains(cOne)) {
this.classList.remove(cOne);
this.classList.add(cTwo);
}
} else {
console.error("no classlist wtf");
}
}
```
 

 Android Era with Kotlin and Java

Important: Read dos and don'ts here: androidera.github.io . Ma...
Apr 5, 2017 08:22
@ColdFire what do you mean?
Apr 5, 2017 08:20
I'm doing some homework where I have to take two values from a loop and evalute their equality, but it always leaves out the last item if the list length is not even
This is the code: https://gist.github.com/wOstensen/5a786505121fabffcc8e74e987750b4d how can I include the last element of the list as well?