« first day (902 days earlier)      last day (4045 days later) » 

7:01 AM
Hi,
Is it better to load javascript at the bottom of a html page? ( jquery and scripts)? I see some sites doing that.
 
I do it too. It's up to you
 
Is it a good practice or not? :)
 
It's neither good practice nor bad practice
 
It prevents the JavaScript from blocking the rendering of the page.
 
So the dom is loaded before jquery loads
 
7:06 AM
Yeah
 
if all of the functionality of your page relies on JS, and it will look bad without it, put it at the top. If it doesn't, put it at the bottom so the user feels like it's loading faster
 
Allright.
I was looking for the best practice :-)
Thanks
 
Or, make up your own mind for what is best
@AmaanCheval, I'm bored
 
@phenomnomnominal Same here.
 
I'm waiting to board a plane
 
7:09 AM
I'm supposed to be studying
 
Oh yeah! @copy's game
 
:D
10 mins ago, by XCritics
 
Ooh yah, time to board!
TTFN!
 
Hahaha
Enjoy
 
!!/urban ttfn
talk to you from...?
 
7:10 AM
In paris?
Refactoring 2019 lines of code yay
 
@Gordon I think the guy might be Q-banned. Check out his latest deleted answer.
 
Good way of starting my day
 
@Mysticial he is now also chat banned
 
Who?
 
@AmaanCheval Check the deleted comment.
 
7:15 AM
Ah
 
Damn It's multi language html -pages yay
6 000 lines of code to refactor
AND START
 
@Gordon Just making sure, you saw his flag-deleted answer right?
 
@Mysticial yes
 
ok :)
 
7:31 AM
Is it just me, or is PHP room utter useless?
So far I've asked 5 questions there over the last two months, and have gotten ignored all times.
 
what kind of questions?
 
Regular expression
Do you know if capture groups include literal text?
 
huh?
Capturing groups capture what they match
a regex is what you type inside a capturing group
 
preg_match('/(\[url=(?:.*?)\])/is', $_GET['test'], $matches); I have the literal text "[url=...]", and my array just gives me what's supposed to be the non capture group (the url)
 
the capturing group should include [url=...]
 
7:37 AM
That's what I thought
Something's not right here :/
 
3v4l.org; prepare a test
 
Okay, I got it, thanks though
I think it was just a dumb moment for me
@JanDvorak nice site btw
 
Hahahahahaha hahaha eval() ;
 
oh, looks to be in safemode 3v4l.org/iRTd4
Though, it's testing in all versions of PHP, and I'm sure there's some safemode security flaws in one of them
damn I get side tract to easy
 
Who's up for an unusual problem?
 
user986408
7:52 AM
nothing really js related but wtf? jsfiddle.net/DGV2j/1 <- is completely ignoring the logo class
 
Code refactoring on friday ==> horror
 
@skripted lol @ text size
looks like a problem with JSfiddle
 
user986408
:D
 
user986408
no it isnt
 
you can manually enter the font size in console, and it works
 
user986408
7:56 AM
dude i encountered this problem locally .. so i copied it into js fiddle
 
oh nm
you're right
 
user986408
it's freaking weird
 
it works if you put it in the style attribute though
dafuq??
 
user986408
right?
 
user986408
what the hell is happening q_q
 
7:58 AM
@FlorianMargain Ta Ta For Now
Flight got delayed... Dammit.
 
it's like the selector isn't working
 
user986408
i even changed the section into a div but still no luck
 
I think you're trolling me
 
user986408
wtf ??
 
you've got some unicode issue or something
 
8:05 AM
Anyone have an idea of how on a canvas I could create a wipe effect (left to right, height 100%) to make the canvas transparent. www3.carleton.ca/clubs/sissa/html5 My site has a canvas which shows pics, after the last one, Id like it to wipe transparent but i can't find anything.
 
or one of the 'L's is a 1, idk
rewrite the class
 
So no one's up for a harder than usual problem? :/
 
@RaghavSood, say your problem, then we'll see if we give a shit.
I'm at an airport and bored. So maybe.
 
0
Q: All Possible Combinations from non uniform table, with only one value from each column

Raghav SoodBackground In grade 11 in my school, we are required to take 4 subjects and English from a list of predefined subjects. Today, we were given a grid which helps us make our combo, such that you can only take one subject from each column. The Grid | Economics | Maths | Psychology/Polit...

Its not JavaScript related, technically, but I'd like a final solution in JS
 
user986408
your code just wants to work .. my code doesnt even if i change class names and tags .. maybe you were right with that about the encoding
 
8:07 AM
Any up for something really unusual, that might leave your butthole sore? You need to say yes or no, before I say what it is though.
@skripted delete class, start over
there's some problem with whitespace, unicode, or a letter
@skripted actually...
just rewrite the ".logo {" part, and it works
 
user986408
okay
 
actually... just delete the white space in that part
 
user2157210
Morning followers of the evil
 
user986408
i just found out it's been a alt+space
 
user986408
thanks @Shea
 
8:16 AM
np
 
user986408
didn't know this inserts a different whitespace
 
what editor are you using?
 
user986408
sublime
 
oh
what a pain in the ass, just for a single invisible character
 
user986408
oh yes ..
 
user2157210
8:24 AM
Meh writing Manuals for the guy who has to maintain my shit ...
 
8:39 AM
Q; Anyone knows why compatibility mode is gone from my IE?
 
user2157210
IE version?
 
9.0.8112.16421
:p
A few minuts ago the button was still there.. ;/
 
user2157210
are you on some new website?
 
user2157210
who set the tag that they are compatible?
 
I was.
 
user2157210
8:41 AM
I E will not present the Compatibility View button if either:

the content of the meta tag equals the version of IE you are using; or
the content of the meta tag is set to IE=edge.
 
Im building a new website but I received a mail from a visitor, he said the website was not working well in compatibillity mode
 
user2157210
or are you local?
 
yes
 
user2157210
there is the problem
 
Oh
Didn't know that.
 
user2157210
8:43 AM
there is some setting to make it work for local pages
 
Uploading it on our beta test environment
Thanks for helping me out. :)
 
0
Q: How to handle "animated" game where the visual should "animate" instead of abruptly change?

user48998I've been playing around and learning javascript/KineticJS by making some simple games (think like board games). I have the game model that is relatively logically simple. When a "move" is given to my game model, it updates the properties of all the pieces. However, I would like to make the vie...

 
user2157210
@MostafaShahverdy tried using vpn?
 
@Nexxpresso All vpn are blocked :(
 
user2157210
 
all ports
 
user2157210
well
 
@Nexxpresso this is filtered too :)
 
user2157210
get some ssh tunnel running on port 443
 
@Nexxpresso good idea ... Do you know any hosts ?
It should be free, because I can't pay (due to US sanctions )
 
user2157210
8:46 AM
just get some cheapass vps
 
user2157210
ok
 
user2157210
iran or something right?
 
user2157210
uhm try to get a free shell here
 
user2157210
 
8:50 AM
@Nexxpresso Hmm, let me try ... thanks
 
user2157210
or this
 
user2157210
dont know if it works
 
user2157210
9:25 AM
!!/karma ImIn
 
!!/live
I guess it crashed. @rlemon can you check?
 
user2157210
stupid bot hating on me
 
hey
 
user2157210
hello
 
9:40 AM
hi
 
Hey Folks
 
10:00 AM
Helloo
I'm stuck in counting objects
Please help me
I'm getting object as a result in ajax response
Like this:
{r1:[{k1:v1,k2,v2}],r2:[{k1:v1,k2,v2}]}
 
now I'm trying to alert
alert(res.length)
res = above object
its alerting "undefined"
 
of course
it's an object, not an array
you want alert(res.r1.length)
and alert(res.r2.length)
 
@Nexxpresso, I tried most of them, these fu**king as**oles has filtered ALL of them :(
 
I want to alert length complete res
 
10:04 AM
it's an object, not an array
you want 2 for example?
 
@MostafaShahverdy What are you trying to host?
 
Then how to count object?
 
you can't count an object
you want to count the number of keys?
 
select_mode is a value retrieved from the HTML input

var on_hand_order = select_mode + '_kg';
on_hand_order = result.rows[0].on_hand_order;

on_hand_order returns as undefined, and looks like [object][object]_on_hand?
Can anyone help me please?
 
you want to count the sum of each array's length?
 
10:05 AM
@BenjaminGruenbaum I just want to access twitter ...
 
@Dhaval what's the result you want for your example?
 
all ssh servers are filtered
 
I want to count r1,r2
 
so you want 2 as a result?
 
Yes
 
10:06 AM
k
which browsers do you have to support?
 
@MostafaShahverdy And you're saying it doesn't work under TOR?
 
all
Chrom, FF, Safar & IE
 
all is not a correct answer
which version of IE?
 
Tor is blocked at all ... I can't use it ...
I used "toonel" instead
 
8
 
10:07 AM
using toonel I can access blogger, which is filtered too
 
but not facebook or twitter
 
then you have to use for (var prop in obj)
and manually count the number of times you're going through the loop
google "for in javascript" if you want to know more about it
 
@FlorianMargaine not accurate, but mmk.
 
Hmm..is there any other way for latest version of IE and rest of the browser?
 
10:08 AM
@MostafaShahverdy hmph, that sucks. What about remote desktop, does that work?
 
@BenjaminGruenbaum I expect him to find out about hasOwnProperty :-)
@Dhaval starting IE9, you can use Object.keys(obj).length
 
remote desktop to where? there must be a server possible ...
available *
 
Object.keys() returns an array of the object's keys
 
@FlorianMargaine getOwnPropertyNames more likely :)
 
@BenjaminGruenbaum uh? why?
 
10:09 AM
@MostafaShahverdy Can you open a free account on Windows Azure
@FlorianMargaine Object.Keys only shows enumerable properties
 
Okk..but it will not be supported in IE 8 right?
 
@BenjaminGruenbaum yeah. that's the point
@Dhaval correct
@Dhaval you can easily shim Object.keys though
 
@BenjaminGruenbaum hmm let me see ...
 
@FlorianMargaine An object might have non-enumerable properties and still be an object
 
10:10 AM
Okk
Hmm
Thanks Florian
 
@Dhaval overall, it's 5 lines in IE8 vs 1 line in IE9
 
Yes :)
 
or 1 line of code + 20 lines of shim if you want to support IE8
of course, the shim isn't used if the function already exists
 
@MostafaShahverdy windowsazure.com/en-us/manage/windows/how-to-guides/… you can open one of those, log into it and use IE to use twitter,
 
thanks, I'm on it, a possible three months solution ;)
 
10:13 AM
@MostafaShahverdy Just don't get caught :)\
 
@BenjaminGruenbaum ;)
 
user2157210
Iran so much harder on this shit than China
 
@BenjaminGruenbaum my situation sucks. really suck. It doesn't allow me to use a free trial account, I have to verify my account, and in order to verify I must provide billing information (which we don't have at all)
 
@MostafaShahverdy Ever heard of Beverly Hills 90210 ?
 
@BenjaminGruenbaum what is it ? :)
I mean where is it ?
:)
 
10:19 AM
are you kidding me @copy
 
@MostafaShahverdy It's an old TV show about people who live in the USA in a place called Beverly Hills, with zip code 90210, just saying
 
is that even possible ? what to do :p
 
@jAndy Try the original kayin.pyoko.org/iwbtg
It's insane
 
@MostafaShahverdy It's in LA, called Beverly Hills, zip code 90210. Maybe you forgot abotu your billing address there?
 
@AmaanCheval are YOU kidding me ?
I am the guy !
since 2010 !
 
10:20 AM
Oh, yeah, you've finished Super Meat Boy
Of course you are the guy
 
I played through on hard tho
 
@BenjaminGruenbaum :D no, not only address, It asks for paypal card number or something ...
 
@jAndy Have you played Bit Trip Runner?
 
nope
 
Try it
 
10:21 AM
I tried I wanna be the boshy couple of month ago
thats... too crazy
I could not pass Ryan
 
I've heard that it gets close to the level of frustration Super Meat Boy gives you in the end
 
@MostafaShahverdy you might want to try cross-browser testing apps. try browserstack.com
 
0
Q: How to calculate the time inside a company?

NithuI want to create a html page for calculating the time spent at the inside the room.For that I have code $(function() { $("#intime").focusout(function() { var intime=$('#intime').val(); var re=re = /^\d{1,2}:\d{2}([ap]m)?$/; if(intime != '' && !intime.match(re)) { ...

 
@MostafaShahverdy browserstack.com , gives you free 30 minutes, go to 10minutemail.net/en and use that for email, for password use the anonymous email, works here
 
I'm on it ... ;) thanks
 
user2157210
10:25 AM
@AmaanCheval I thought about automating it
 
@Nexxpresso I did too. But I had no idea how I'd implement something like that
 
user2157210
Shouldnt be to hard if you do it dirty with pixels lol
 
user2157210
press space when fucking thing is infront of you
 
user2157210
will work for the first levels
 
user2157210
dont know about the later
 
10:28 AM
Hello
Recently I discussed about my question of counting object
Florian
gave me one nice solution
But I want to access all the data and value of the returned object
and I think for that I'll need to count all the object and inlcuded all the value
 
user2157210
@AmaanCheval sounds like some fun for the weekend
 
I tried to run loop with setting limit till number of object
but it doesn't seem working
 
can somebody what is wrong with this line
var msg2div='<div style="margin-bottom: 4px" class="controls" id="msg2div'+j+'">'' <input type="text" class="inputContactName" name="inputcontactName'+j +'"placeholder="Name"> <input type="number" class="inputContactNumber" name="inputContactNumber'+j+'" placeholder="Number"> <input type="text" id="inputContactEmail" placeholder="Email" name="inputContactEmail'+j'"></div>';
 
I'm getting this kind of object from an AJAX
{r1:[k1:v1,k2:v2,k3:v3],r2:[k1:v1,k2:v2,k3:v3],r3:[k1:v1,k2:v2,k3:v3]}
 
user2157210
holy format
 
10:33 AM
Can somebody tell me how can I check each value of this object?
 
user2157210
@DineshVenkata you forgot a +
 
user2157210
at the end
 
As I'm stuck and can't think anymore
 
user2157210
last j
 
@Dhaval can we see the code?
 
10:34 AM
@Nexxpresso added it but no change
 
ok
 
figured it out
the problem was after the first div a double quote was there
@Nexxpresso
 
user2157210
ok
 
function(p1,p2){
			var d = $.Deferred();
			var url ='URL_TO_SERVER';

			// Created Promise for AJAX call
			promises = $.ajax({
						type:'GET',
						url:url,
						dataType:'json',
						header:{'Accept-Encoding':'gzip'},
					contentType:'application/json'
					}).done(function(res){// When AJAX call is done


							var sections = [];
							var nums = 0;	// Incremental variable for loop
							for(var k in res)
							{
								sections.push(k);

							}
							var poiLen = sections.length; // Number of POIs from an API
What I want is check each value of returned object
 
@Nexxpresso Should make for a good challenge
 
user2157210
10:40 AM
@AmaanCheval but no time
 
@Dhaval It's called pastebin / jsfiddle and many more
 
user2157210
aoe release today
 
Haha
 
@Dhaval then use res[k] instead of k in the loop
 
user2157210
@AmaanCheval have you bought it?
 
10:43 AM
@Nexxpresso Nope
 
user2157210
die and burn in hell
 
I haven't tried the first one either
 
user2157210
even more burning for you
 
Hahaha. My exams are going on, so I plan on letting those end before I get into new possibly addictive games
 
user2157210
exams exams exams
 
10:44 AM
exams... kids
 
I already spend too much time playing Awesomenauts
 
Hey
 
user2157210
@FlorianMargaine old people die earlier.
 
@Nexxpresso not necessarily.
 
user2157210
if everything goes as planned
 
user2157210
10:45 AM
they do
 
user2157210
and you are only 24-25?
 
@Nexxpresso Should I have played the older AoE games, or should I just start with AoE 3?
 
user2157210
aoe3?
 
user2157210
you shouldnt even play aoe 3
 
user2157210
10:48 AM
start with aoe 2 hd
 
Okay
 
user2157210
and then wait for aom hd
 
aom?
 
user2157210
age of mythology
 
@AndersMetnik Its including API link which I can't reveal
@Florian Thanks
 
10:57 AM
@AmaanCheval ah yeah, I remember that you were shocked by "fuck George Bush"
 
Haha, yeah
 
@Nexxpresso :(
 

« first day (902 days earlier)      last day (4045 days later) »