« first day (1270 days earlier)      last day (3903 days later) » 

09:00
@DrogoNevets hell ya :D tank is almost empty
hell
didn't knew this trick
count($arr, COUNT_RECURSIVE) // PHP
What is count?
when did they add that ?
And what is $arr? :D
looks like PHP to me
09:02
I see.
Could be perl :P
it's PHP yes, sorry for confusions
MOAR global functions
the confusion is, youre in a JS chat room posting PHP :P
go over to the naughty corner.....
naughty corner ? with females ? Surely with pleasure !
lol! id join but my fiancée would confiscate my motorbike
09:05
we have a corner?
its more a meta-corner
/showing all corners of the room
Cool, facebook added placeholders before the data is loaded for better user experience
Yeah, I think it does help
@AdiNistor 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.
09:08
proxy :¬@
i use 0.facebook since it got out .. Ad-free , only messages, .. no PC access
proxy blocked whole of the domain, subdomains and all it seems
going back to PHP in JavaScript, lets muddy the water
I guess Facebook devs read Luke Wroblewski's blog: lukew.com/ff/entry.asp?1797 :P
I disagree with him, at least he needs to differentiate more.
yea its nice to have a very fast app/page without spinners, but if something really goes wrong or takes a while for whatever reason, its way more worse to see like "nothing"
09:16
@FagnerBrack 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.
@jAndy : i use a loader gif ...
progress bars are better than spinners, at least you see some progress ..
@jAndy yeah, what if you're on a phone and your coverage is shitty and shit is just slow
make things simple
@Phoenix most progress bars are faked, lets be honest
09:17
Always use system spinner instead of your own.
KISS: Keep It Simple Stupid
and there is NOTHING more annoying than a progress bar filling up and it not being done!
the progressbar also comes with two faces.. yes its nicer to "see" progress instead of just waiting, but then again, if things are really slow the progress bar is maybe even worse
Change cursor on desktop or use a gif spinner which looks like native on the mobile
stand up time, bbs
09:18
because either nothing happens or you have to "fake" progress and then what..
!!youtube rock n roll all night
^ KISS
@phenomnomnominal yeah exactly, thats really awful
it would work, but then you would have to make sure that you have access to every process going on, from client to server, database, IO, etc.
How do progress events work with XHR2?
Do you have to send back special headers? Or is it based on the size of the response?
09:21
it only monitors the transfer of bytes from the server
^ +1
it provides the "max byte" and the "bytes transfered", thats it
onprogress event, e.loaded and e.total
its very good for file uploads, but thats a very easy and isolated task
that works of course with progress bars
but for more complex scenarios, like login processes or anything which requires more action on the server and client->server communication, I think progress bars are not sufficient
(unless you can provide feedback from any blocking/time intensive task going on)
don't know, every time that i see progress bar it reminds me of a game loading screen
09:24
Progress bars are pointless in this scenario :P
Use a spinner instead
or a placeholder, like the Facebook example
use this for a spinner:
hehe
use a small meatspin gif!
For those of you who don't know what that is, google it
Preferably without your boss standing behind you
09:27
the very first line is very true... "performance means, many different things for many different people"
like.. if you think your "great performance" in the bedroom on your wife is "great".. that might be not true for her
@Mosho : lol'd
still single here
its so nice to have a relatively high rep-count.. you can just answer a simple question where like 5 other guys already answered and you'll get the checkmark in like 95%
and I just use 'like', like.. too often
but ...
i try to add explanation to the solution, in purpose to help the asker to understand the problem and the solution
naah blasphemy ! rep comes to rep !
09:32
But i see people just posting solutions without info. Ofc that doesn't take time while my answer often come after 1~3th reply >.>
I like being a black hole
maybe i'm not so naive :)
depends on the type of question I think, as I mentioned earlier, the quality of questions is pretty low and many people ask the wrong questions or just want to vampire
in fact, if you ask the right questions or .. in other words you are aware of your problem in such great detail so you can ask a very precise question
I'd say you're actually very close to the solution already
@KarelG I have adopted this approach: answer minimally as fast as possible then race to edit the rest
@AntonBoritskiy 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.
09:35
suggested by someone here, I think
yeah, its like progressive enhancement
:P
That's how most answers work
Get the MVP out
Most Valued Player ?
minimum viable product?
@phenomnomnominal Yeah
09:37
when I was young and enthusiastic I attended on some discussions on meta how to solve that "fastest gun" problem.. but it seems like StackExchange wants it to be like that
minimum viable answer?
!!fabulous
heh heh heh
You really enjoy your GIFs, don't you?
09:39
!!infiniteriot
!!phucket
Hahaha, shit, that's awesome
@AzDesign 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.
09:40
user2509223
mornin
@SomeGuy Mine's better :P
ALL THEH INTERNETZ MEMES!
wow @ that
nice find
@derylius : late morning
user2509223
@KarelG my boss dropped a 1T work on me in the mornin
09:45
ricgteo im back
ive just done my first bit of SASS as well
watch the sass captain sassy pants !
i want one of those buttons!
user2509223
@Neil ....
@derylius What's up?
user2509223
09:47
i hate slave traders calling me up when im not looking
ok so compeltely off topic, i am building shelves, how many do i want? (these are for a whole bunch of collectibles)
@DrogoNevets SASS/SAAS = Software as a Service or the language compiled to CSS? :P
lol :P
@Miszy the css one
@derylius :
09:50
"no time to explain, grab on!"
user2509223
user2509223
@KarelG
@DrogoNevets I hate SASS
@jAndy cat action film
I prefer SCSS.
SCSS >>> SASS
09:51
i dont know enough to be able to form an opinion
is SCSS not SASS? the files i was just looking at were using SCSS files but using the SASS command
@derylius : pseudo-kungfu panda ;)
user2509223
@KarelG its an advertisment
I love this crazy ads
I was once told to write pseudo-pseudo-code at the interview and got told of for saying that meant they wanted to me to write the actual code
09:52
@user1654209 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.
4 min ad ? lolwut
@KarelG It's a collection of all panda ads :P
@DrogoNevets Wait, whaat? Does pseudo-pseudo mean double negation? So pseudo-pseudo-code === code
thats what i assumed
09:54
@Miszy : yeah noticed it
@Oleg poor you
drowned in this...
heh, scumbag coworker... "i'm sorry" - "what?" - "i just farted"
@KarelG no its valid
user2509223
@Oleg did my best
Thanks guys, I knew there was light in the end of the tunnel.
user2509223
09:58
@KarelG we got your back ;)
if I comment on my own answer after the asker commented, does he get notified?
should do
user2509223
should
You can "@" him/her too to be sure.
10:01
@Mosho I think asker gets notified without explicitly mentioning his name if you're commenting on his question, otherwise no
alright, pinged this sombitch
@Miszy : thx for the vid, but judging to the screens, it's an old one. Does that cheese still exist ? is it made of panda milk ? ect ... ?
I remember seeing it on tarrant TV in the 90s
@dingalapadum 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.
@AlexStanese 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.
yay i should be unblocked
10:05
Hello! may I ask a question here?
you just did ;)
You may not ask if you may ask, but you may ask another question.
haha
allright then
you only have one question left, use it wisely.
allleft
10:07
@alex 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
@OneKitten I did some research, hope it helps clarify some things
after that, you will have to go on paypal to get further answers.
@derylius: is this about JS or meta? ;)
user2509223
@OneKitten JS
10:08
@derylius: go ahead
I'm stuggeling for a day now... I want to check if the img with src "..._1.jpg" exists in the array... this is my jsfiddle: jsfiddle.net/alecstheone/br4bS/2 What am I doing wrong because it's not working? I'm a beginner
user2509223
@OneKitten just commented
coolies
@AlexStanese $('img').error(function() {
alert('Image does not exist !!');
});
@AlexStanese $('.selected').attr('src', '_1.jpg') is setting the source of all these files to '_1.jpg', you realize that right?
10:12
@derylius excellent thank you
and than how to check if the omage with src: "*_1.jpg exists in the array"?
you could try doing an ajax call to the image and if it errors......
its not pretty though
your best bet is to let browser load them and then do the suggestion i posted
10:15
selected.each(function (i, el) {
        if (el.src.indexOf('_1.jpg') >= 0) {
            alert('found!');
        }
});
!!afk
@Miszy omg thank you so much!
@Miszy function (el, i) { ...
i thought its easyer
but what does this function "(el, i)" do?
so I'll know for future..
@AlexStanese each function calls the passed function with parameters i and el, i being the index of the item in the list and el being the dom element
aham..
I got it
Thank you!
10:20
If you want to just use ele, you still have to have i parameter since that's how javascript works
and if I want to search 3 elements in the array (ex. 1_1.jpg, 1_2.jpg, 1_3.jpg) isn't this the correct approach? jsfiddle.net/alecstheone/br4bS/6
ooh, jquery does it backwards?
@AlexStanese No :P
because of the each function?
it checks just one elment?
You're checking if one particular element contains strings _1.jpg, _2.jpg, and _3.jpg
10:23
at once
If you want to check that all three exist, you need 3 boolean vars outside your each call which get assigned true once you find it
After the call, you check that all three boolean vars have been set to true (initially being false of course)
Better still if you use some sort of an array of items to check, since you're statically checking for the existence of these strings, and maybe you'd like to generalize
it would be better to generalize.. because I'll use this in an app and in other lvls i'll the number of images that will be searched in the array will differ
ive just had to say no to a motorbike trip ..... because im getting married, i should be happy about this, but im sad
@DrogoNevets where did you want to go?
@AlexStanese Then you'd need an array of strings to check and an array of booleans of the same length
For each object, you'd need to loop in this array to see if one of them exists, and if so, you mark the boolean value in the array at the same position to true
Afterwards you check that all booleans in the array are set to true
10:33
@Neil how to add element in an array?
an img
var arr = [];
arr[arr.length] = 'string to append';
vorges regoin of france
its been years since ive done a proper bike tour
@Neil but I dont want to add string, I want to add the element with the string _1.jpg
@phenomnomnominal that is insane.
10:36
@AlexStanese So add the element with the string _1.jpg
@mikedidthis mind blowing.
is this peaches geldof thing in the news anywhere but UK??
why do we care?
Because it's sad
10:38
its sad that the old woman at the hospital down the road died today, thats not in the news
@Neil is this working so:
arr[] = $("img[src*='_1.jpg']");
arr[] = $("img[src*='_2.jpg']");
etc.
or do I also need a variable for index of array?
It doesn't an auto increment?
@DrogoNevets its sad when anyone dies, period. Can we move on please.
@Oleg (i, el) is correct
@Oleg it's jQuery's .each, not Array.prototype.forEach
@Miszy They're both techincally correct if you use them correctly
@Neil They have arguments swapped.
10:42
@Miszy Yes, but you think javascript cares about what names they're given?
@Neil ??
@GustavoSanchez 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.
No?
@Miszy Nvm, it's a pedantic point
I care about the order.
i === index, el === actual element
10:42
@Miszy Yes, you and I care because of readability, not because it's syntactically incorrect
What are you talking about?
I guess it was a pretty terrible design decision by Resig to push in the index first in most interative methods
but then again, when starting jQuery, ES5 wasn't really there
@Miszy function(a, b) { console.log(a); } function(b, a) { console.log(b); }
@Neil That's not the case.
@Miszy No?
10:44
function (el, i) { console.log(el); } function (i, el) { console.log(el); }
that's the case
> @Miszy They're both techincally correct if you use them correctly
nothing personal.. but MAN I can't stand listening to Lea Verou
@Neil or can I use add() or push() or toArray() to skip the increment part?
@Neil They're not the same.
GRRRRR kinda makes me angry and aggresive listening to that voice for longer than 10 seconds
10:46
@Miszy I didn't say they were the same. I said that javascript does not care either way
We do it for readability
@Neil Do what?
ok param names dont matter, BUT thery should represent what is being passed in, end of, move along now please
Params order does matter and that what we were talking about.
@Miszy Ok, now I think you're trolling me. One more like that and I won't have any qualms ignoring you for the rest of the day
10:47
if you use (el, i) or (i, el) in this examples makes a huge difference.
My code was
selected.each(function (i, el) {
        if (el.src.indexOf('_1.jpg') >= 0) {
            alert('found!');
        }
});
So the arguments order matters
@Miszy Not if you use them correctly..
@Neil What's you point?
If you replace el with i, and i with el, you will have a function which does the same
Yeah, I don't see how they matter if you're using them correctly
10:49
@Neil Yes. But that's not the case.
4 mins ago, by Miszy
function (el, i) { console.log(el); } function (i, el) { console.log(el); }
These are not the same, right?
@Miszy is your point that if they changed it, lots of existing code would break?
Assuming that the first is ES5, and the latter is jQuery, they'd work fine
@SomeGuy Exactly.
10:50
So, that's what Neil is saying. That if you use the correct argument order, the code inside the function stays the same
@phenomnomnominal My point is that @Oleg said I put them in wrong order so I wanted to emphasize it's not native forEach, it's .each from jQuery.
Thus my code is correct.
That is true
Seems like this was a big waste of time then.
@SomeGuy I honestly think we're all saying the same thing in different ways
user2509223
10:53
@Neil that is an oximoron over there
Just misunderstandings
user2509223
As a hungarian politican said once to a journalist, "I do not agree with the statement in the question"
Almost at 1000 days
967

« first day (1270 days earlier)      last day (3903 days later) »