« first day (1687 days earlier)      last day (3255 days later) » 

5:01 PM
hahaha guys microsoft renamed internet explorer to microsoft edge
Microsoft Edge (codenamed Project Spartan) is a web browser in development by Microsoft. Officially unveiled on January 21, 2015, and first publicly released as a preview on March 30, 2015, it will replace Internet Explorer as the default browser on Windows 10 PCs, smartphones and tablets. Microsoft Edge is designed to be a lightweight web browser with a layout engine built around web standards that is "designed for interoperability with the modern web". It removes support for legacy technologies such as ActiveX in favor of extensions and integration with other Microsoft services, such as t...
 
g'morning
 
'morn
 
How's the canvas?
 
it's good. It got a bit fatter since last time, too many pixels
holy shit 0.o this just happened after I posted that question on twitter:
 
Anyone here owns a surface pro?
 
5:13 PM
can't really understand, I'm only on SO XD
and CR, but I didn't do much...
 
@towc read the message
 
yeah, but why?
who decides that?
why now?
I only have one question on CR and have done close to nothing on SO
 
You reached 200 rep I guess
 
read the message
 
oh, that may be it
 
5:15 PM
It is called association bonus @towc
 
that means that 199 + 1 = 300? Seems like smoke in the eyes to me...
but can't complain :P
 
can someone help with a jquery question ?
 
yes, exactly. now you can comment, open bounty, flag on any other SE website.
 
:D
 
68
Q: What is the association bonus?

Tanuj WadhwaI was just awarded +100 reputation on all of my Stack Exchange accounts. What is this bonus for? It simply says Association Bonus on my reputation overview.

@towc
 
5:19 PM
ok, cool
thanks
 
Hello guys :)
 
hello guy
 
I'm really in bad trouble
I need help
May I ask ?
 
@towc not cool, you also have to completely read the original feature request here: meta.stackexchange.com/questions/56506/…, and see your reputation tab here: stackoverflow.com/users/3161092/towc?tab=reputation and here: codereview.stackexchange.com/users/46743/towc?tab=reputation and count everything to confirm that it is working
 
5:21 PM
:(
@AwalGarg Hi :)
 
hi
 
How are you ?
 
I am noob
 
No. Your not
 
( @NickDugger you may have confused him a fair bit )
please, ask
 
5:23 PM
ok thanks @towc
Here's the situation:
I have multi-dimensional array
 
@Zirak will you help me write the split view for ff scratchpad :(
 
I want to loop through each item of this array and then also bring out each element of the inner array
 
@AwalGarg Guess
 
@ZahidSaeed google for "array flattening in js"
 
Then write a second loop.
 
5:25 PM
I did
 
and?
 
@Zirak yes, yes you will! You will get proper credits ofcourse in the fxteam commit log :)
 
@AwalGarg Wrong
 
1 message moved to Trash can
@ZahidSaeed Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
 
$.ajax({
						type: "POST",
						url: "../includes/functions.php",
						data: {project_name: purchases_array[i][j], city: purchases_array[i][j+1], block: purchases_array[i][j+2], plot: purchases_array[i][j+3], address: purchases_array[i][j+4], old_stock: purchases_array[i][j+5], quantity: purchases_array[i][j+6], cost_price: purchases_array[i][j+7], other_cost: purchases_array[i][j+8], amount: purchases_array[i][j+9]},
						success: function(data){

						}
					});
Sorry
Check the 'city' in data
 
5:26 PM
eugh
 
lol
 
@zirak ;) it may be the first time it wasn't a test
 
@Zirak think about the massiveness of the audience of the code you write!
 
@towc and it was a flying success
 
@ZahidSaeed what about it?
 
5:27 PM
I want city have the value purchases_array[0][1]
 
so?
 
@towc second
 
But the problem is the var i and j, both have the same values
 
@AwalGarg awwwh
 
What I want is var i should be zero and j to be 1
 
5:28 PM
nope
you say [0][1], right?
 
Yes
 
[i][j+1]... I don't have to do the maths for you
but if you haven't figured it out, i = j = 0
 
I know it's not good code
I send the complete code
for(var i = 0; i < purchases_array.length; i++){
				for(var j = 0; j < purchases_array[i].length; j++){
					$.ajax({
						type: "POST",
						url: "../includes/functions.php",
						data: {project_name: purchases_array[i][j], city: purchases_array[i][j+1], block: purchases_array[i][j+2], plot: purchases_array[i][j+3], address: purchases_array[i][j+4], old_stock: purchases_array[i][j+5], quantity: purchases_array[i][j+6], cost_price: purchases_array[i][j+7], other_cost: purchases_array[i][j+8], amount: purchases_array[i][j+9]},
 
eek!
 
make a fiddle
don't paste it here
also, the tabbing is real!
 
5:30 PM
I'm to trying to work on it from tomorrow
 
@ZahidSaeed that is horribly broken code
 
What should I do then ?
 
@JanDvorak with a pinch of horrible indentation
 
Did you get what I wanted to do ?
Once all the record of [0][0] is done, I want to move to the [0][1] and continue...
 
actually ,no
 
5:31 PM
@ZahidSaeed as suggested previously by @towc make a fiddle, fix indentation, strip code
 
@ZahidSaeed do you have a 3d array?
 
They will be added as user adds more items
Basically I'm grabbing the data from the table
and then appending each row as inner array in multi-dimensional array
Sorry for my bad english :(
@JanDvorak What should I do ?
 
Your english is fine. Your code logic doesn't make any sense
 
Didn't you got my situation ?
I mean what I'm trying to o
do*
 
No. And if we can't make sense of your logic, how can the computer?
 
5:35 PM
Wait
I tell you in more detail
 
:(
 
will it help?
 
please make a fiddle, and put comments around the code
 
strip all unnecessary code.
 
5:38 PM
See this link please
I sent a screenshot
 
is the word "map" reserved in Javascript?
 
This is a simple table whose data is dynamically added
 
!!tell Charly spec reserved
 
As you can see the user adds some values and then when he/she presses the 'purchase' button
 
5:39 PM
I want the whole record to save in the database
How should I do it ?
 
I don't think you want the inner loop
 
If we forget the inner loop for a while. Then tell me what is the best way to save all these rows in the database ?
 
garlic
 
Huh ?
Please help me with this problem :(
 
5:42 PM
@JanDvorak What garlic ?
 
A 1080p res screen looks so large
 
@AwalGarg can you help me ?
 
kicked for begging strangers
 
How do I do it guys ?
 
I need a big screen :( biiiig one :(
 
5:47 PM
@AwalGarg Get an Oculus
 
@SomeKittens my screen resolution is 1366*768 :( it is too small
 
@AwalGarg >:(
 
@JanDvorak how do I do it ?
 
1280x1024 + 1024x600 here
 
5:50 PM
@ZahidSaeed I have already told you. Stop begging.
 
^ this is from 1080p
I wish I had this large monitor in a usable state
 
@AwalGarg Back in college I did a ton of coding on a 10" netbook
 
In fact, I might just glue my laptop to my monitor sideways
 
@SomeKittens yeah but working seeing a 1080p now and I want.
!!afk brb
 
5:53 PM
@ZahidSaeed Google.
 
I can't find it that's why I came here :(
You guys can help me better than others
 
just apply my advice to your code and link the results here if they don't work
 
ok
Did you saw the screenshot ?
 
is the three kicks per day = flag still a thing?
Yes. I saw it, I printed it out, glued to a table and sawed it in half in disgust.
 
6:01 PM
That's going the extra mile
 
literally. The closest hardware store is pretty far from here.
 
But why don't you want to tell me the solution ? :(
 
@ZahidSaeed we teach, we don't feed
 
That's why I'm here
I want to improve my skills
 
yet you don't listen
 
6:03 PM
I do
 
then practice
 
Believe me, I'm trying to work on it from morning
Now it's making me mad.
 
my advice was "remove the inner loop". Have you done it yet?
 
If I remove the inner loop then how I will I grab the inner arrays data ?
 
similarly to how you already do.
or better yet restructure your app to use sensible data structures
 
6:06 PM
@ZahidSaeed Isn't that your job?
I get paid quite a bit to that sort of thing. I'll rewrite your code if you can afford my hourly rate.
 
This is my currently array:
[Array[10], Array[10], Array[10], Array[10]]
 
That's unfortunate but can be worked with
 
I want the data of each and every array inside that main array
 
That's why I used loop inside loop
 
6:08 PM
@ZahidSaeed Yet you use explicit indexes as well
you don't always want to use loops to access array elements. your arrays aren't really arrays - they are unannotated table dumps
 
What do you mean ?
 
Clearly, you should dump everything and use Angular.
 
But hey, @SomeKittens, my angular runs kind of slow, any tips?
 
@Zirak Have five!
 
We can only help people having atleast some basic understanding of the level of code required to solve their problem. If a user comes here asking how to fix a bug in the kernel without knowing how to run gcc, we can't help him.
 
6:11 PM
@AwalGarg I'd be more impressed they knew the Kernel existed
and found a bug
 
@SomeKittens there is a big list of bugs ready to poke at
 
Now Wanda, our viewers at home don't want to be infested with all those pesky watchers! For the low, low, price of ::, one digest and you'll be free forever!
 
lots of kids in irc trying to fix bugs without knowing anything :/
(not the kernel, I don't know anything about the kernel, but you get the point)
 
In yet another words: we provide a roadmap, not a bus service
 
"I found a bug in $POPULAR_PROJECT!"
"No, you're just incapable of reading docs"
 
6:15 PM
@SomeKittens ALWAYS! Wrap variables in { and }.
sigh
 
@JanDvorak how many times did you kick?
 
> Political Leader : Startups won't do any good to the country.
@AwalGarg ^ our very own Rahul Gandhi today said that :->
 
@SomeKittens thrice so far today
 
@Abhishrek It's true. (good here means fill his pockets)
 
@AwalGarg lmao
 
6:16 PM
got busy here in the morning
 
@Abhishrek Please, keep sending your engineers to us!
 
@SomeKittens you already work at a place with 85% of us :D
(assuming you still work there :P)
 
@SomeKittens hey import me :P
now am officially an engineer ;-)
@SomeKittens you look so damn young :-/
 
can anyone help me understnad why i can't add document.ready to the top of this script ?
$("body").on("click",".slide",function(e){
e.preventDefault();
$(".animated").removeClass('bounceInUp').addClass('bounceOutUp');

  setTimeout(function(){
    var url = $(this).attr('data-url') + ' #' + $(this).attr('data-target');
    $('.tile-area-main').load(url);
    $(".animated").removeClass('bounceOutUp').addClass('bounceInUp');
  }, 2000);
});
 
sure you can
just shouldn't
 
6:30 PM
doesn't work when i do ...
$(document).ready(function(){
$("body").on("click",".slide",function(e){
e.preventDefault();
$(".animated").removeClass('bounceInUp').addClass('bounceOutUp');

  setTimeout(function(){
    var url = $(this).attr('data-url') + ' #' + $(this).attr('data-target');
    $('.tile-area-main').load(url);
    $(".animated").removeClass('bounceOutUp').addClass('bounceInUp');
  }, 2000);
});
 
it should
 
Try to place your script tag just above the </body> tag
 
and am i right in the first place by saying that when document.ready is taken out of the script it only works once
it comes from a sep js file
 
Then you won't need $(document).ready(function(){})
 
@ZahidSaeed but then it loads later
 
6:31 PM
@JanDvorak which is better
 
Yes
 
@AwalGarg no
 
@JanDvorak explain or accept your defeat :D
 
Yes :)
 
@AwalGarg starts loading sooner = ends loading sooner. 'nuff said
 
6:33 PM
@JanDvorak The difference will only be of the time it takes to parse the DOM tree which is so small it really doesn't matter.
 
academic as it doesn't work
 
@AwalGarg no. The the difference is the time it takes to load the DOM tree
which is bounded by the HTML size and network speed
 
@JanDvorak if you have that large of a document tree, something's wrong
 
Plus the number of HTTP requests
 
hmmmm
 
6:36 PM
@AwalGarg perhaps the network is just really slow?
 
@JanDvorak at 56k a 10kb xml doc (which is something) will take half a second to load.
 
@AwalGarg which is perceptible
 
but 56k is not perceptible ;)
 
i don't think there are enough braces closing the whole statement , someone confirm ?
 
@JanDvorak also, putting it at first will block rendering which is way more painful.
 
6:38 PM
$(document).ready(function(){
$("body").on("click",".slide",function(e){
e.preventDefault();
$(".animated").removeClass('bounceInUp').addClass('bounceOutUp');

  setTimeout(function(){
    var url = $(this).attr('data-url') + ' #' + $(this).attr('data-target');
    $('.tile-area-main').load(url);
    $(".animated").removeClass('bounceOutUp').addClass('bounceInUp');
  }, 2000);
});
 
Doesn't your code work ?
 
@AwalGarg <script async ...
 
that stops all js code on that page from working !
 
@havingagoatit Have you attached jquery ?
 
6:38 PM
yup
 
Make sure it is attached above your script
 
if i take the first line out it works but doesn't complete the functions above
 
Show your html code
 
@JanDvorak assuming you use that attribute, then it's a different thing.
 
and assuming the browser supports it
 
6:40 PM
Yeah, Opera (even desktop) doesn't support it.
 
usually I want my page to work ASAP, not to sit there and look beautiful, though
 
So don't use JavaScript
 
<div>
      <a class='slide' href='#' data-url='who-are-musability-music-therapy.html' data-target='mission'>
        <span class='element'>Mission and Values</span>
      </a>
      </div>
      <div>
       <a class='slide' href='#' data-url='who-are-musability-music-therapy.html' data-target='music'>
          <span class='element'>Music</span>
         </a>
      </div>
      <div>


<div id ="overview" class="animated bounceInUp">

<div id ="mission" class="animated bounceInUp">
 
To work you mean show content, which is part of rendering.
If work means javascript code works, then it is likely as SPA..
 
to work I mean react to javascripty controls
 
6:41 PM
in which case, you load all resources and block rendering until they load.
 
think SO: ajaxy but not SPA
when you click the top bar and it navigates away instead of showing a toolbar it's ... bad
 
Open console in your browser
 
And check if there are any errors
 
@JanDvorak I am yet to see a website which uses ajax/pushstate and has more markup than JavaScript.
 
6:44 PM
yup
missing }
 
on line number ?
 
and use of getpreventdefault is deprecated use preventdefault instead
 
I test this code on my browser
wait
 
the last line
 
@AwalGarg noted. Now, how does caching play into this? Loading javascript should be fast
1 message moved to Trash can
 
6:46 PM
nvm
@Filip good evening sir, my name is john how can i help you ?
 
@JanDvorak not sure I follow. An ajaxy site will load once, and fetch any content later lazily via ajax, right?
 
@Abhishrek used to saying that from your workplace, are you?
 
@JanDvorak ofcourse sir !
 
you know I'm right
 
@Filip would you please calm down sir, have you tried to restart your computer, browser ?
 
6:48 PM
@AwalGarg SO loads content immediately, then opens a socket to get updates. The javascript can be cached.
 
@havingagoatit got it
You are missing the } of "click"
 
@ZahidSaeed awesome !
 
No Problem :)
 
@ZahidSaeed where should i put it
 
6:49 PM
@JanDvorak I guess we need to be a lil more patient with him
he might be a newbie, coming from an antique language like java, finding the warp capable JavaScript federation technology intimidating
 
Just after the closing brackets of setTimeout()
 
I love parenthesisation errors. In Python and Haskell you get indentation errors only ;-)
 
@ZahidSaeed like so setTimeout(function(){}
 
@JanDvorak since the JavaScript can be cached, and loaded almost instantly, why can't we push it at the bottom and let it load after dom ready?
 
Just like this
$(document).ready(function(){
  $("body").on("click", ".slide", function(e){
    e.preventDefault();
    $(".animated").removeClass('bounceInUp').addClass('bounceOutUp');
    setTimeout(function(){
        var url = $(this).attr('data-url') + ' #' + $(this).attr('data-target');
        $('.tile-area-main').load(url);
        $(".animated").removeClass('bounceOutUp').addClass('bounceInUp');
    }, 2000);
  });
});
 
6:51 PM
ah
 
@AwalGarg because then you can't respond to events before the DOM is loaded
not that it's any different with doc.ready
that's why you delegate everything to the body
 
@JanDvorak this
 
@havingagoatit It fixes console errors...
 
@ZahidSaeed hey buddy thanks for that it worked ! now i just gotta figure out why it isn't bringing up the data-target for each item
 
@AwalGarg it gets parsed sooner, though
 
6:53 PM
@JanDvorak the time taken to parse is negligible, it really doesn't matter.
 
Glad I was able to help :)
 
@AwalGarg is it? Say, jQuery on mobile, is that still unnoticable?
 
I lose all hope when you say jQuery while discussing performance :(
 
@AwalGarg because it means a lot
Even I'm trying to adopt best practice for best performance
 
@AwalGarg hope for humanity, you mean?
 
6:55 PM
@JanDvorak yes
 
would you prefer Zepto?
 
would you prefer dom ?
 
I would reconsider why I need any of those 2 when I am focusing on browsers supporting the async attribute @JanDvorak
 
perhaps load a tiny shim for normal browsers and full jQuery for IE?
 
would you prefer a live chicken smeared with gravy?
 
6:57 PM
@JanDvorak jQuery API is not compatible with DOM API (you know that) so shims won't help.
Unless you mean two different versions of code.
 
I mean, a jQuery-like bridge to native DOM that is a tiny subset of jQuery
 
@JanDvorak that's a polyfill-ish thing, and using it means I am not using native DOM API anymore; in that case my previous statement applies again:
2 mins ago, by Awal Garg
I would reconsider why I need any of those 2 when I am focusing on browsers supporting the async attribute @JanDvorak
 

« first day (1687 days earlier)      last day (3255 days later) »