« first day (1991 days earlier)      last day (2961 days later) » 

10:00 PM
if using jquery, it's this.val(); IF this is a jquery object.
if this is from an event, this is not a jquery object.
then you just wrap it in $(this).val();
 
Basically I have a list that is serving as a playlist, and within the list items they have a 'song' attribute. Thats the title of my song. I'm trying to define a function that starts playing the audio that corresponds to the list item that was clicked
so would it be like $(#playlist li attr('song').val();
I didn't mean to say title, the song attribute is the file name. sorry I know I'm being confusing
 
so, $(elem).click(function(){ song=$(this).attr('song'); });
no need for the value
 
thats myy whole function
 
1 message moved to Trash can
@AlexGray 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 or pastie.org
 
$('#playlist li').click(function(){
	//Create AUDIO OBJECT
	audio = new Audio('http://localhost/beats/wp-content/themes/AG_1/html_5_audio_player/media/' +
	     this.val()); // Not sure what the actual value is here, but you need to update what the file that is playing is.

	audio.play();

	$('#play').hide();
	$('#pause').show();
	$('#duration').fadeIn(400);
	showDuration();
});
 
10:04 PM
audio = new Audio('http://localhost/beats/wp-content/themes/AG_1/html_5_audio_player/media/' +  $(this).attr('song'));
 
Awesome! Thanks so much. It's working, but theres some bugs I think I can work them out though
 
No problem
 
so thats jquery right?
 
yes
You're using jquery all of the place.
or is that prototype?
 
its jquery. the $(this)...is that what I can look up to understand that function? I mean I knew what i needed to do I just didnt know the syntax I guess
so what can I search to get abetter understanding if that question makes sens
'jquery $(this)' ?
 
10:06 PM
no
this is inherited into your function.
 
ok thanks guys :D
 
this ... is a variable that is included in all event functions for javascript
doing $(this); lets jquery translate it into a jquery object, and that allows you to execute jquery functions on it.
 
So right now when I click on song titles, they will play over each other, and little things like the song title/artist name doesnt change. I just need to add those things into my function the same as they are in my 'previous' and 'next' functions correct?
 
btw, self taught myself, so my verbage may not be 100% accurate.
 
10:09 PM
maybe not exactly like that, but in short I just need to add on to my function
if statements?
 
I have no idea what your previous and next functions look like.
you should try it and if it works, great
 
yeah i feel you haha
 
@rlemon I think my mutation observer is firing something twice, or at least I'm getting the same element updated twice sometimes. Do you know anything about this offhand?
 
yea I recall something
are you checking pending?
because the DOM updates twice for your own messages
 
it's happening for other messages
but no I'm not
 
10:12 PM
code?
 
new MutationObserver(a => Array.from(a).concatMap(a => Array.from(a.addedNodes)).filter(a => a instanceof Element).concatMap(a => Array.from(a.querySelectorAll(".content"))).forEach(update)).observe(document, {childList: true, subtree: true});
concatMap is a map followed by a flatten
a la SelectMany
 
hrm
idk
 
k
I may just add a class as a flag
 
@KendallFrey is update doing anything to the document?
 
@KendallFrey really weird.
@GregBorbonus if an update triggered the observer in the function it would be triggered endlessly then
not just twice
I would guess he's collecting the nodes twice :/ but I don't see how
check for .message .content
maybe there is a duplicate node outside of the message wrapper
 
10:20 PM
yeah, figured there might be something triggering it and playing off conditionals. but I suppose I might not really have a full grasp of the js that he's using,
 
is there anyway I could make the correct song play without redefining audio?
like can I change something in the () of audio.play();
 
@KendallFrey what does update do
Out of curiosity
 
@AlexGray you can set the src, as new Audio creates an audio element.
So you can do:
if(typeof audio !== "undefined") audio.src='new url';
I have a habit of always checking that variables exist before using them.
but for some reason, always add an extra i in as well. lol
 
ah, thanks for your help but I guess this is just too advanced for me and I need to go back to javascript 101 :'D
 
@AlexGray Change your code to:
 
10:29 PM
Hello everyone, I was wondering if there's a way to get information from the web console into a file? Basically there is a list of URLs i want to extract. I know what js code to run and I see a few links from the web console. Can I save this information?
 
well, that formatting did not work right
 
1 message moved to Trash can
@GregBorbonus 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 or pastie.org
 
    $('#playlist li').click(function(){
	//Create AUDIO OBJECT
	if(typeof audio !== "undefined" ) audio.src='http://localhost/beats/wp-content/themes/AG_1/html_5_audio_player/media/' +
	     $(this).attr('song'); // Not sure what the actual value is here, but you need to update what the file that is playing is.

	audio.play();

	$('#play').hide();
	$('#pause').show();
	$('#duration').fadeIn(400);
	showDuration();
});
That's better
 
@rlemon it does a regex replace on innerHTML
I can't spot any pattern on what messages get triggered twice
 
hey that actually works and does most of what I wanted! thanks man! Now i Just have to add some active class changes and shit like that
 
10:34 PM
@KendallFrey okay, can you try using the selector .message .content
see if that works
just be more specific
because I'm pretty sure I know what is happened if it does.
 
That's not exactly more specific
now I need some messages...
 
poop
 
I haven't noticed it hitting any of my sent messages twice
poop hit twice
someone say something
 
something
you can always use cap as well
 
fuck
it's still happening twice
 
10:41 PM
so didn't work :P
lemmy try mine
damn
 
I wonder if it isn't happening every time a different user posts
i.e. "something" and "so it didn't work :P"
 
well you have .messages container which holds .message which holds .content
.messages is each 'block' of text
 
right
 
.message is each send
so if you're looking for .messages you'll get only on the first block creation
I made that mistake, but it doesn't look like you are
 
it's triggering on .user-container and .message
 
10:46 PM
ohh yea I forgot .user-container
all of my parsers have to watch on that level
 
hahaha my extension fucked with the url and I got a 404
> shut up
nice commit messages bro
 
:P
shut up
 
i am now
 
did you look at the commit?
I spent like 2 hours trying to get that shit working
ended up just adding a timeout looking for the end of the loading element
 
let's try this again
!!bump
 
10:52 PM
@KendallFrey That didn't make much sense. Use the !!/help command to learn more.
 
looks good
so far
 
so what does the extension actually do?
does it give me pizza?
 
I'll give you a sneak peek
 
you check for my friday links?
also what ended up being the solve?
 
@rlemon I just added a filter for only .message
 
10:54 PM
HAHAHA
 
That's the gist of it
 
is it just for you?
 
eventually no
 
did you ever think to just create a stylesheet and when you see the user in the room (or ever) add a ::before rule for their mention style?
 
I wanted to make something else to make use of that $5 for the Chrome Web Store
 
10:55 PM
or are you doing that already? you mentioned innerHTML or something
 
@rlemon Can't do everything I do with CSS
lmao
 
like what?
 
it edited my own message
and I was not prepared
 
I'm just curious, chat extensions obviously peek my interest
 
@rlemon supr sekrit
 
10:56 PM
lemmy heeeeelp
 
too soon
 
Challenge: listen to this song and not dance
 
hey @Greg Borbonus thank you so much man! Your help got me to a point where I could add all the rest of the functionality my self and now I have a very, very nice HTML5/CSS/JS/JQ audio player.

You rock man!
now if I can add some advanced stuff like a UI for adding the songs instead of manually editing the code, turn it to a wordpress plugin, add sales/download options and email capture and it's gonna be a beat lol
beast*
 
No problem
 
11:10 PM
I'm having a weird problem and can't make it to work. I managed to attach mousedown, mousemove and mouseup to my canvas, when I trigger mousedown, it creates a startpoint for a line to be drawn on my canvas, and when mousemove is triggered, it should erase the block that it is writing it and redrawn with the new values.
The problem is that when I trigger mousemove, the block doesn't get redrawn
but it keeps drawing itself on top of each new drawing.
function canvasMouseClick(event) {
    canvasClickX = event.x - 275;
    canvasClickY = event.y;

    if (canvasClickX > posAreaMouseX && canvasClickY > posAreaMouseY)
        if (canvasClickX < posAreaMouseHeight && canvasClickY < posAreaMouseWidth) {

            ctx.beginPath();
            ctx.moveTo(canvasClickX, canvasClickY);
            ctx.lineWidth = 2;
            ctx.strokeStyle = '#000';

            canvas.addEventListener('mousemove', canvasMouseMove, false);
        }
}

function canvasMouseMove(event) {
criaAreaMouse is a function where I draw a new yellow square as placeholder
function criaAreaMouse() {
    ctx.fillStyle = '#FF0';
    ctx.fillRect(posAreaMouseX, posAreaMouseY, posAreaMouseHeight, posAreaMouseWidth);
}
 
11:31 PM
so when I use $(this) inside a function, $(this) refers to the original thing that I targeted in the function correct? and the $() just makes it jquery so I can use jquery functions?
 
Ok, nevermind, I managed to solve it. Had to read a bit more about beginPath and closePath to make it work
 
@AlexGray yes
 
aweeeesome!!!!! thanks
 
@AlexGray if you would like to know more 2ality.com/2014/05/this.html
 
11:32 PM
is an easy read
 
Old code I did forever ago, but looks like you got it now
 
im on both those links now thanks guys. I can feel the light bulbs turning on :P
 
@AlexGray I think Loke mispinged you :P
you don't need Canvas, although it is cool
 
yeah i realized after i poked around in that code hehe
 
lol yeah was a misping
 
11:34 PM
@rlemon have you used kOS?
 
if I ask what kOS is probably no
kOS?
 
it's a KSP scripting mod
I bet you'd like it
 
nope
 
Yeah, I'll just have to learn how to not allow the user to draw outside of a box and if he manages to start drawing inside the box and leaves the box with the mouse, to stop the drawing from going outside
But that is for a later date
 
You're already used to terrible programming languages
 
11:36 PM
:)
 
posted on November 12, 2015 by benogle

Two weeks ago we released Atom 1.1.0 which was first stable release to pass through the new Atom beta channel. We’d like to keep up the release cadence and get new things into your hands as quickly as we can. Today, we’re proud to announce Atom 1.2 stable and 1.3.0-beta0.

posted on November 16, 2015 by thedaniel

To celebrate our 1.0 release at the end of June this year, we produced a limited-edition patch for people that contributed to the editor leading up to this important milestone.

posted on November 17, 2015 by zcbenz

Since the beginning of Electron, starting way back when it used to be called Atom-Shell, we have been experimenting with providing a nice cross-platform JavaScript API for Chromium’s content module and native GUI components. The APIs started very organically, and over time we have made several changes to improve the initial designs.

posted on December 11, 2015 by benogle

Atom 1.3 and 1.4-beta are out. Atom 1.3 comes with start up speed improvements, find performance improvements, and portable mode.

posted on January 07, 2016 by jlord

Building an Electron application means you only need to create one codebase and design for one browser, which is pretty handy. But because Electron stays up to date with Node.js and Chromium as they release, you also get to make use of the great features they ship with. In some cases this eliminates dependencies you might have previously needed to include in a web app.

posted on February 03, 2016 by as-cii

Decorations are a cornerstone of Atom’s hackable core. With a simple API, they provide ways to deeply customize the editor and build awesome user experiences on top of it. Up until now, however, there was no way to display arbitrary content between lines of text, affecting the positions of subsequent lines.

posted on March 17, 2016 by BinaryMuse

Atom 1.6 and 1.7-beta are out. Atom 1.6 comes with pending pane items, improvements to pane management, and new APIs.

posted on March 24, 2016 by gjtorikian

A little over one year ago, we announced The Atom Flight Manual. Intended as an introduction to using the Atom editor, it provides information on installing packages, navigating around the editor, and developing your first extension.

posted on March 25, 2016 by zeke

Electron 0.37 was recently released and included a major upgrade from Chrome 47 to Chrome 49 and also several new core APIs. This latest release brings in all the new features shipped in Chrome 48 and Chrome 49. This includes CSS custom properties, increased ES6 support, KeyboardEvent improvements, Promise improvements, and many other new features now available in your Electron app.

posted on March 28, 2016 by lee-dohm

We have reached an exciting milestone: one million people have launched some version of Atom in the last month. That’s three times the number of active users we had under a year ago at the one-year anniversary of Atom becoming completely open-source.

 
dammit feeds
you need a throttle
 
well, hullo
 
@Loktar Amazing, thanks I'll clean my code later based on your fiddle :)
 
why are we subbed to atom blog?
 
11:37 PM
no problem @AndréSilva
also yeah wtf feeds lol
 
@Loktar @KendallFrey care if I remove the feed?
 
I don't care at all
 
three owners make a hat trick :D
 
seems like it's only noise
 
it's Atom blog.. I can see how it is somewhat js related.
 
11:37 PM
I'd care more if you didn't
 
but kinda specific no?
 
The chat is not mobile responsive.
 
rlemon has stopped a feed from being posted into this room
rlemon has stopped a feed from being posted into this room
 
yeah, on that point it would be cool to add some more relevant feeds
some more general resources would be cool
 
I dunno what atom is besides a small quark cloud and a big electron cloud
 
11:38 PM
why are we following this?
at a glance doesn't really seem all that js specific
 
BTW, has anyone noticed like a font update or something with fancy kerning?
I recently noticed the kerning on "Tr"
 
not on Windows
 
I just was reminded of it by "Atom"
hmm, weird, it didn't happen that time
2 mins ago, by rlemon
it's Atom blog.. I can see how it is somewhat js related.
that message looks funky though
anyway
 
so peter.sh looks like it's about webdev in general. I'll leave it
somethinghitme.com also seems kinda irrelevant
;)
wonder who put that there
 
is using an input element as a button to hide a div/popup a bad practice? should I use a button instead?
 
11:44 PM
People are dumb, thank God they keep me employed
 
i guess the input submit reloads the page and if I want to avoid that i can use a button
 
btw, that comment was not for anyone in this room.
 
they are synonymous @AlexGray
 
@AlexGray an input with type button is perfectly fine, they are virtually the same thing.
 
<button type="submit"></button>
<input type="button" />
you can get away with both in either case
 
11:45 PM
ok cool
nice! when changing type to button, it doesnt reload the page :D haha im such a newb its awesome
 
the other solution is to listen for the form submit event and to cancel it
 
is javascript capable of storing form information in a database and opening a new link on the press of a button, or is something like PHP a better option
 
I remember when I first started with Javascript, the goal was to make a scrolling title bar
 
i know thats a matter of opinion
 
@AlexGray node.js
 
11:48 PM
but im pretty sure thats not what javascript is for
 
my god I have not had this much fun programming in a long time
 
you can do it all in javascript, but you still need a server
 
node.js ok ive heard that before but dont know what it is, i'll look it up
 
awww, he went node.js over php
 
it's a solid choice :)
 
11:49 PM
What are the advantages of node.js over php?
 
@KendallFrey what are you learning/doing? Please don't say Haskell.
 
just out of curiousity
 
@GregBorbonus one language front and back
 
@Luggage Chat plugin
 
ah.
 
11:49 PM
well, I suppose, since HTML and CSS aren't really languages.
node.js developed enough to do all that php can?
 
A shallow point: Modern well-formatted JS can be very nice on the eyes.
 
I've only read about it, never really had a reason to try it
 
it's pretty solid
 
omg it never stops being funny
 
@GregBorbonus Node can do all that php can, but without the terribleness of being php
 
11:51 PM
hey, can I get content_scripts to apply when I reload the extension, not the page?
 
@ndugger I dislike php, but I can't really say JS as a language is better
both are pretty bad
I just like js
:D
 
I'd rather eat sticks than use php
 
@rlemon They're pretty good compared to kOS
 
While both js and php have flaws and warts, JS seems to be growing out of its very fast.
 
but that's jsut because I really like to eat sticks
 
11:51 PM
lmao
 
I should dig up my old landing autopilot
should, but won't
 
php did the same thing
in the beginning
 
@ndugger stick cut stomach. stick win everytime
 
but now, php has become a beast.
 
js has got a lot better with es6
 
11:52 PM
can node.js integrate with all the database types?
 
and node actually getting updates is fucking awesome
@GregBorbonus afaik, yup
 
morning
 
php is a beast, alright. A nasty, ugly beast, carrying disease throughout the internet
 
node extensions and bindings can be written in c++
 
Yes, it can access all the major DBs. Searching npm is a good way to find those things.
 
11:53 PM
@ndugger seriously?
 
Yes
 
what is npm
:O
 
node package manager
 
it's the package manager mainly used by nodejs
 
npm = node package manager. like pip for python or.. something else for something else.
 
11:55 PM
or maven for kill me now
 
i guess nodejs.org/en is a good place to start learning?
 
I don't want to sound too philosophical but the way I see it; We live in an imperfect world. A lot of imperfect things are actually beautiful and, even within misery beauty will always be there.
 
like: nuget for .net,
 
@happy not php
 
11:56 PM
my goal is fairly simple...store email adresses from a form in a database I can look at later to send out 'mass emails', and when the user presses submit a download starts from my s3 server
if that makes sense
 
then you'll want to pick a db. I recommend postgresql ofc
pg is a great npm package :D
 
Just use mailchimp.com
 
oh god mailchimp
 
@ndugger I understand you might encounter memorable situation but still, a language, as nasty as it can be must exist.
 
I wrote an integration for it waaay back
 
11:58 PM
@happy not php
 
I could use mailchimp but i want to have control of everything
 
my friend, let's agree to disagree
 
or just to learn
 
email is a hard problem. not getting flagged as spam, complying with laws. That's that mailchimp is for
 
@AlexGray Yeah, you'll need to be POTUS for that
 
11:58 PM
thats true
I dont really want to run too advanced of campaigns
 
also, they let you export mailing lists, so you can leave whenever you want.
no risk.
 
i just wanted to build something but I guess instead of reinventing the wheel I can integrate mailchimp nstead
can you import lists?
 
netflix needs gameshows. I would love to get some wheel or some super market sweep on here
 

« first day (1991 days earlier)      last day (2961 days later) »