« first day (1279 days earlier)      last day (3669 days later) » 

10:00 AM
@DavidH No wait
As I understood, you have a problem where you have duplicate keys in your URL, correct?
 
Yea each click on this filter it adds a parameter in the URL
 
Assuming you can't prevent the duplicate keys, the next best thing is to remove them
 
But as you'd probably notice I want a trail of what you clicked meaning no duplicates if spamming the button
Exactly
 
So, are we sure we can't prevent the duplicate keys?
 
I wouldn't know how to.
I used window.history.pushState to add them
 
10:01 AM
In the same way that you'd do for checking for duplicates
The difference is that you get key/value pairs prior to adding the new parameter
If you see it is already there, you don't add anything
 
You're referring to an if statement if I reckon correctly?
 
@DavidH Yes
 
Awesome well I've set that up already with a toggle class and an if statement
 
if (!existsParameter(param))
    addParameter(param)
 
Though my issue is that I wouldn't know what to put in the else to remove it
Hm
 
10:07 AM
@DavidH You shouldn't have to remove it
If you aren't allowed to add duplicates, you need not worry how to remove them, right?
 
Facepalm
That's so true..
 
See :)
The alternative would have been to dedicate the next 2 hours finding and applying an appropriate regular expression for removing duplicates
Most problems of this nature can be solved by seeing things in another light
 
It happens to me so many times
 
It's normal
 
My head just deflects simple solution's/obvious things, when I play with a language i'm not good at xD
 
10:10 AM
You'll learn, don't worry
 
Yep I can excuse myself because i'm still a student :P
 
Oh it'll happen when you work professionally :D
 
Stop reminding me! xD
 
It'll happen even when you're experienced, just less often
 
Mhm that's what we're all working towards or even achieved
Mistakes can't be avoided but at least we'll notice them sooner with experience
 
10:12 AM
The best thing you can do for yourself as you learn is to force yourself to take a step back and think things through
 
Yea exactly I so far haven't really had a plan yet for when being stuck at something
 
If you tackle the problem in the first way that comes to mind, it may not always be the best way
 
True, I mostly just try to write in comments what i've done so far and try to find a flaw
 
When you start off, you get stuck on technical and conceptual problems
But later, you only get stuck on technical problems
Ideas conceptually make sense, but maybe you can't do it due to some problem in the language or something of that sort
 
Do you mean not being familiar with the language in particular or?
With the task being to advanced probably for what knowledge you have
 
10:14 AM
time for dinner, bye buddies.
 
Well sort of. I suppose if you were truly familiar with a language, you would know better than to try it in a way that can't be done
 
Have a nice dinner!
 
But very few programmers know languages that well
 
That's true.
 
@FlorianMargaine anything
 
10:14 AM
@DavidH Thank you
 
Welcome ! Yea unless you write the language itself you probably can't be 'immortal' in it
Actually even than you'll make mistakes probably
 
Most problems are like.. you want to be able to handle multiple requests at once, and so you need to implement a thread pool.. but then you realize you don't know how to implement a thread pool in that language
But the concept is something you know
 
Very well said.
 
Conceptual problems would be like.. how do I handle multiple requests?
 
Mhm. I myself had this on a smaller margin of course at school but we always managed to figure it out.
 
10:17 AM
That's how we all do it
 
Though later comes an important factor, time. I'm not that good with deadlines actually, I mostly manage to figure out things at the last moment which I hate.
 
You kind of have to trudge through yourself in order to truly understand
 
Yea, it's way more than just a philosophy.
 
Oh yeah, I still have problems setting personal deadlines
 
@FlorianMargaine dynamic means anything
 
10:19 AM
Yea and you know what the thing is
It's not even about a schedule
If you can't manage to figure something out you're just screwed in our world :P
 
True, and the problem is that there is no way to know when something is impossible to do or just really hard
 
I honestly think besides coding there's probably nothing that can't be scheduled quite easily.
 
So your boss asks you how long it'll take to fix that bug, and it may even be that it is not possible to fix..
 
Whoa...that though
Gave me some kind of cringey feeling :P
 
Haha, you'll encounter plenty of those in your career
The worst ones are the ones where for you it works, but on the client computer, it doesn't
 
10:21 AM
Tell me about it, i've had plenty at school. Trying to solve things in an incorrect way, heck you even noticed when you helped me probably :P
 
It makes it not only impossible to fix, but devastating for your company (and consequently for you)
 
Oh! IE9/8 :P
The company I'm an intern at requests the customers to download teamviewer and than on the phone they just help them with whatever issue it is if it's in a scenario like you said
 
Right
Don't get me wrong, a lot of the time, your client won't know what the hell he's talking about
But those times when he's right and it doesn't work, but it does for you.. oh man..
I lose sleep over such things.. fortunately it doesn't happen often
 
That's quite saddening to hear yea..
Well they're on Wordpress here to avoid such matters, since users apparently find it easy to use
They completely pull Wordpress out of it's comfort zone and rebuild it into something good to than give the customer a crash course through Wordpress
 
Wordpress is sort of a cheat sheet. It's good to know it well, but you should also know the rest
 
10:25 AM
The rest of the issues are mostly in the admin area where they can just tell them on the phone how and what
Don't get me wrong, i've been working on Wordpress for the past 4 months now but at home I just play with PHP and my own built CMS to keep up :P
 
I'm of the opinion that each language you know is a tool in your toolkit
Your ability as a programmer is dependent upon having the right tool and knowing when to use it
I think PHP is good to know, but there are better languages too ;)
 
Of course! But I wouldn't know where to go to. Currently I can work well with Html/CSS/Php but i'm practicing on Jquery/JS now too
Then when I appear on stack I hear all these people saying things they don't like about PHP and how they use other open source forms of PHP but i'd have no idea what to practice on honestly :P
 
PHP gets a bad wrap because they tend to lump all methods into a global namespace
 
Just an example though almost the same as people preferring Python over JS for some reason
Oh by the way PDO is what I use
Not regular hard coded PHP, should've said that before sorry :P
 
there are plenty of things js can do that python cannot and vice versa
 
10:29 AM
Yup in a multiverse you can't just rely on one language!
 
@AbhishekHingnikar You never told me where to vote, man :P
 
@Neil uh well am trying to produce a top quality video :-)
and that all should be taken care of by tomorrow morning [my time] then you can vote :-)
 
Ok, well remind me in case I forget to ask you for the link :P
 
So much controversy in the game world about the Amazon Fire TV
I think they made the wrong announcement about the games :P
 
Not familiar with Amazon Fire
It's a paid service that Amazon provides?
 
10:32 AM
Nope
You buy the box, get a license (included) and you can watch anything you want if good
 
No? Well I can see why that would be controversial
 
Of what they provide of course
Well it's more something of the way they announced the game side of it
 
Surely that has to be a paid service
Or otherwise they'd have to be free games to begin with
 
You can buy a controller and than cloud-way you can play certain games but they said heavy games should be possible
 
@DavidH it has q core with 2 gigs ram
the device is as good as the past generation consoles
 
10:33 AM
Yea I know @AbhishekHingnikar
Exactly but they said the games and all would be free and as powerful as consoles support
 
hahahaha
in their dreams
 
But you'd not expect that from a multimedia device that was actually based on movies/music
Yea xD
 
I heard of this concept a few years ago.. playing high quality games on cloud, and the cloud server runs it and simply sends you the frames
 
Well if they run windows
they can just create an amazon version of X-Box
 
So you could play games with heavy system requirements on a netbook in theory
 
10:34 AM
but they don't :[
THEY SHOULD COLLABORATE WITH MICROSOFT !
 
@AbhishekHingnikar Blasphemy!
 
x-box one has lots of great games on a shit platform
@Neil no amazon will be savior of the games
 
@Neil People are still trying to work on that
 
@Neil Ps4 is going to do that they said with the older games (Ps3/Ps2)
 
10:35 AM
@AbhishekHingnikar Amazon was considering purchasing the xbox by the way
 
@SomeGuy I think bandwidth would play a major part in that.. if you can't send at least 30 frames per second, people aren't going to want to use it
 
@SomeGuy do you remember about the game concept i was building ?
 
@Neil Yeah, definitely
@AbhishekHingnikar Which one?
 
@SomeGuy the strategy one ?
 
!!afk wouldn't you like to know? (lunch)
 
10:36 AM
@Neil Yea the bandwidth would solely be country dependent as well as companies would probably change their entire membership just for it
 
@AbhishekHingnikar Very vaguely
 
Hmm, no Caprica?
@DavidH I'm anxious to see what people can do with that sort of technology
 
She doesn't respond to afks anymore
Been that way for a while
 
So am I really but we'll see how it'll turn out, I think Sony actually already accomplished it.
 
It's ironic.. computers were expensive at first, so we had terminals connect to a single computer. Later computers were no longer expensive, and so everyone had their own, hence lots of clients. Now we're moving back to cloud type terminals :P
 
10:38 AM
In the end even if Ps4 supports that with Ps2/3 games it'll not be their problem with the bandwidth and it should be considered a prototype anyway
Hahah! That's so true
 
Anyway, off to lunch, later
 
Enjoy!
 
@DavidH Thanks, later
 
@ydaetskcoR Welcome to the JavaScript chat! Please review the room pseudo-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.
 
Lol, @AbhishekHingnikar is suspended :D
This should totally be a meta thread.
Also @AbhishekHingnikar
this is so sad.
0
Q: `TypeError: $.Tween is undefined` in FireFox

TMSI get this error on this page in Firefox, but only sometimes: TypeError: $.Tween is undefined The page worked well for more than 6 month, I haven't changed the code - but strangely, the bug has appeared in the meantime. I have not upgraded any libraries. How can this happen? Can it be problem...

Horrid.
 
10:51 AM
@TienNguyen Welcome to the JavaScript chat! Please review the room pseudo-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.
@Nepster Welcome to the JavaScript chat! Please review the room pseudo-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.
 
@MrAs Welcome to the JavaScript chat! Please review the room pseudo-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.
 
@TMS What's so "deserved" about a 500 point bounty and 17 upvotes for "don't include the same library twice in your code"? — Benjamin Gruenbaum 17 secs ago
@SomeGuy yeah
 
hi
 
11:08 AM
@user3110546 Welcome to the JavaScript chat! Please review the room pseudo-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.
 
Hey, Im trying to get 2 values from this website - http://socialblade.com/youtube/user/TheGuyWithTheBeats
I need to get the value for Views for the Last 30 Days And Networked With / Claimed By:
I use to have it working but it stopped working and I can't fix it, Here is my old code set views to do JavaScript "var elems = document.getElementById('youtube-summary-outer-wrap').getElementsByClassName('Su‌​mmaryWrap');
 
user2509223
@user3110546 and what is the question?
 
How can I do that? Could someone show me how to do it, or send me the code?
 
@Txugo Welcome to the JavaScript chat! Please review the room pseudo-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.
 
user2509223
@user3110546 they removed the class 'SummaryWrap'
 
11:17 AM
Okay, I have tried changing the class to what I though was the new class, but I still had no luck
 
user2509223
@user3110546 theres no new class
 
user2509223
you can use Nth ChildNodes
 
Im kinda new to java, what do you mean?
 
user2509223
@user3110546 ITS JAVASCRIPT!
 
@user3110546 I'm not good either but I think it's an existing function in JS
Something you don't have to define or anything
 
11:19 AM
I know that, Just sorterned it, Probs shouldn't do that whens theres a language called java
 
I'm gonna brew myself a cup of java.
!!coffeescript
 
Haha sorry guys
So @der
 
@derylius By the way, Neil showed me this to prevent duplicate entry's though I don't quite get it, how would this work if existsParameter is not defined?

if (!existsParameter(param))
addParameter(param)
 
user2509223
@user3110546 document.getElementById('youtube-summary-outer-wrap').childNodes[4].childNodes[0].chlidNodes[1];

should be the last 30 days
 
11:21 AM
Okay, Ill try now
Got reply "missing value"
 
user2509223
@user3110546 WARNING! my code may contains typo(s), do not copy-paste it, try to understand and use it
 
Okay
 
user2509223
also
 
user2509223
!!tell user3110546 mdn childnodes
 
@derylius Don't be annoying, drop the @, nobody likes a double-ping.
 
user2509223
11:24 AM
@user3110546 be careful, childnodes include text nodes as well
 
I found the error in your code, fixed it but still got return of missing vaule
value*
 
Why not use document.querySelectorAll?
 
How would i use that?
 
user2509223
@Oleg because jQuery using that, and so its not as hype as the node functions
 
Okay, @derylius do you know why I'm getting missing value?
 
user2509223
11:26 AM
@Oleg also in his case the query string would be really complicated to be sure not to match anything else
 
I have no idea what your requirements are, but I'd rather query the DOM than iterate through children.
 
user2509223
@user3110546 maybe i counted the nodes wrong, thats why i told you, try to understand and then modify it for your needs
 
Okay
What exactly does the first node, second node and third node mean in the code you gave me?
 
user2509223
@Oleg hes looking for a specific node with the nearest class/id being a 3rd level parent
 
oh lol, they don't use classes on elements... mkay
 
user2509223
11:29 AM
!!tell user3110546 mdn childnodes
 
user2509223
@user3110546 read this
 
Cheers
 
user2509223
@Oleg i guess they found out that others outsource their site and they try to protect against like this
 
@derylius I don't think so.
 
user2509223
11:31 AM
otherwise why would they remove the already existing classes?
 
user2509223
but keeping the same structure
 
Maybe, instead of looking for data inside of highly unreliable html source, you could simply query the youtube api?
 
user2509223
@Oleg that would require the knowledge of using APIs
 
@iRudoy Welcome to the JavaScript chat! Please review the room pseudo-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.
 
@derylius and is that bad?
 
user2509223
11:33 AM
@Oleg if you have no idea about what are nodes, then i suppose yes
 
learning is bad? mkay, I'm outta here
 
user2509223
@Oleg if you ask for replacement for a code you dont understand then learning should start from the root
 
user2509223
@Oleg in this case 1-2 years of knowledge is what we are talking about, and i suppose our colleague dont have that time to replace a oneliner
 
Im having no luck at all, I got 4, 0, 0 for the nodes, but still didn't work
 
user2509223
@user3110546 try it level by level to see where you get lost
 
11:38 AM
 
Im using google chromes inspect element, is that what I'm meant to do
I have no idea what I'm doing
 
no, just scroll
hahaha
to take shortcuts, i select the last word of a phrase and press shift + right
it's realy too long
 
Yeah, I can't get the node values, I don't know how to read it :/
 
sorry i responded far away...
 
Hi guyz :)
 
11:49 AM
okay, Does anyone know what the values are? @derylius
 
On my chrome console, on some websites $("#xxx") works just fine... but on some others it returns null... I don't understand why ?
 
Because jQuery isn't included on all pages
 
cause it's jQuery
 
user2509223
@user3110546 what have you tried so far?
 
browsers now have $ for debugging in console (not jquery)
 
11:52 AM
ow, it uses the websites downloaded jQuery ? I tought it loads it locally
 
It was first a firebug feature but it's now in chromium and chrome
 
4 0 1, 4 0 0, 4 1 0,
I know the first values 4
 
And is there a solution for that ?
 
@Enissay when there's jquery, it uses jquery
 
user2509223
@Enissay dont use jquery
 
11:53 AM
@Enissay what site? Do you have an element with id "xxx" in that site ? Is it SFW ?
 
@MustafaP Welcome to the JavaScript chat! Please review the room pseudo-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.
 
@derylius Can you tell me the values? Then ill try to work it out for Partnership status
 
@dystroy, yes the element exists...
Can't I load jquery locally and use it on those websites ?
 
@Enissay you don't need jquery just for that
 
i'm just trying to extract some data on the fly from some websites xD
 
user2509223
11:56 AM
@user3110546 here is the 30 days:
document.getElementById("youtube-summary-outer-wrap").childNodes[9].childNodes[1].childNodes[1]
 
@Enissay There's already $ (which isn't jquery) in chrome, even in this site
 
user2509223
@user3110546 as it turns out theres a text node between every div (the linebreak and tabs)
 
when $ doesn't work (because it has been shadowed) you can always use document.getElementById
 
user2509223
how is that everybody tries to extract data from site? is it a homework for a class?
 
@dystroy, well, why does $ returns null... I just tried with document.getElementById and it works fine... but why $ is not ?
@derylius, lol, not really, I'm almost doing it for fun [extracting some infos]... It doesnt worth it to make a script for that xD
 

« first day (1279 days earlier)      last day (3669 days later) »