« first day (1013 days earlier)      last day (4154 days later) » 

18:00
$(document).ready(function() {
	/* Initialise datatables */
	var oTable = $('#example').dataTable();

	/* Add event listeners to the two range filtering inputs */
	$('#min').keyup( function() { oTable.fnDraw(); } );
	$('#max').keyup( function() { oTable.fnDraw(); } );
} );
le sigh
I have like 20 emails I need to forward to someone, I use firebird. Anyone know of a way to bulk this operation?
Why is it doing * 1? To convert it to a number?
It shouldn't be necessary to convert it to a number type.
@rlemon I'd add them as attachments.
Unless it's not a number, in which case an error should be thrown.
@SiddharthaGupta 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.
18:06
@Michael I'm starting to believe that DataTables was written by some Perl developer.
arrrg
in PHP, 14 mins ago, by Neal
-1 by the way. The question asked was "What is hapenning" and this answer makes no effort in answering it. — Shawn 1 hour ago
@rlemon @Darkyen It was far too slow: tinker.io/09826/12
So I optimized it a little bit
@Neal you show him
@BenjaminGruenbaum Thanks?
18:21
Someone said something bad about me on the internet! I know, I'll rant about it in a semi-related chat room! Not only that, but I'll cross-post to another chat room. That'll show him.
-1 by the way. The question asked was "What is hapenning" and this answer makes no effort in answering it. — Shawn 2 hours ago
^ I just upvoted his comment
just for shitz and giggles
My answer basically says there is nothing to do.
There is stuff to do, your answer explains that OP is relying on something he shouldn't be. I think it's a fair answer.
@Neal There is. I have to remember why, but mail happend to say TRUE even if the mail is not send.
@BenjaminGruenbaum True true.
18:24
it returns true if the mail server accepted sending it, you have no control in php over what goes on from that point
@BenjaminGruenbaum Hence:
@Shawn basically there is nothing you really can do in PHP unless you actually check the wire to see what is going on. I would suggest using some mail library that has some indication of whether the mail sent or not (if it exists) — Neal 2 mins ago
@dievardump eh?
Yeah I had a problem with Wordpress one time. PHP was saying mail were sent but it was not. It was a php or apache config if I remember well
The C++ room is just so classy
in Lounge<C++>, 39 secs ago, by Xeo
@rightfold You have sucked a cock before?
That has like 3 stars there
I have pizza.
I win.
I have popcorn.
18:28
I have both. Including the C++ star.
I'm the first one who starred both their messages about cock, wanted to see how shitty they are as a room :)
Next step is to open a meta thread asking if those messages are acceptable and getting a lot of meta rep. Step 3 ??? step 4: profit
They're so weak :P everything I star they mass star as a group...
nah, don't or the moderation will be boring with that
ohh wow
@dievardump Of course I won't, I like meta :P
New JS room game: Downvote whatever question/answer of @Neal's that he posts here (or if it's a comment, downvote his nearest Q/A).
2
18:32
@SomeKittens Huh?
I am not sure what I did to you. Can you explain?
@SomeKittens You're late, it's already in action for some of us.
SomeKittens: The JS room's official Johnny-come-lately
That time when you misread a bad question, then answer it out of pity :/
bonj all
@SimonSarris fill canvas then getImageData or createImageData
speed wise
18:44
is this a javascript coding pattern? if yes whats its name? paste.kde.org/p93a82219
@JeandrePentz 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.
user1125394
@rogcg OOP?
@cx W?
Object literal
@rogcg A javascript Object
18:46
@rlemon can you give me a more complete sentence?
CreateImageData most likely
and If I want to call a function i just do Employer.func1(...);
I see now
actually, depends on what you're trying to do
@rogcg yes?
@rlem if you're modifying just a few pixels on a black canvas for instance
fill all black -> getImageData will be faster
now i see. I was using it without know its name.
18:47
than createImageData -> set all the damn pixels to black
but if you're modifying every single pixel anyway, then createImageData is probably faster
@rlemon did you see the optimization ?
@SimonSarris well I haven't really noticed a difference here.
yes you did
18:47
@dievardump yea but i'm trying to only run with code I understand. I'm working on my own rendering optimizations
Yeah and it's far better than mine
pretty good
@rlemon since you're modifying them all just use createImageData
@rlemon but if performance is the issue USE THIS USE THIS USE THIS
USE IT
it still isn't the overall effect i'm after, but it is at a point where I can (hopefully) tinker around a bit
it does actually make a difference
even though its more annoying to read
18:49
@SimonSarris that's what I did :o
@dievardump but when I'm going to use the Object Literals, will I have to initialize the object, or should I just call "statically", like Employee.func1(); or can I do the both ways?
@SimonSarris hrm, yea that would pull me down to ~2 seconds
@rogcg There is no initialization for an object literal.
6 mins ago, by rogcg
is this a javascript coding pattern? if yes whats its name? http://paste.kde.org/p93a82219/
18:50
maybe i'll re-visit dievardumps optimization
5 mins ago, by Neal
@rogcg A javascript Object
@Neal so its just "statically", for accessing the properties and methods
@rogcg There is no "static"
Awww, my "Croissants" answer was deleted.
@Neal i say "static" just for as a fake name, whateverr.
not exactly static
@SimonSarris yea, (on my pc) generating the map is 10-20ms, rendering it is 3000-3100 ms
:/
@rogcg wha? I think you are confused...
@rlemon same here. Your optimization is really good
I wouldn't have think of it at all
@Neal i get ur point. no initialization for object literals.
18:52
@rlemon what do you mean rendering it vs generating
you mean the call to putImageData is 3 seconds?
@rogcg Yea...
@SimonSarris generating the grid array (diamond square) takes 10ms, rendering the grid on the canvas takes a shit load of time.
160000 draws
var img = context.createImageData(width,height),
	data = img.data;
for (var y = 0; y < my; y++) {
    for (var x = 0; x < mx; x++) {
		var o = (x*4)+(y*4*width),
			v = ~~grid[y][x];
		data[o] = v;
		data[o+1] = v;
		data[o+2] = v;
		data[o+3] = 255;
	}
}
context.putImageData(img, 0, 0);
// ~3 secs
@SimonSarris @rlemon here it's instantaneous
@rogcg I think what he's trying to say is should he use Employer.func(), or should he use var timmy = new Employer(); timmy.func().
for (var y = 0; y < my; y++) {
    for (var x = 0; x < mx; x++) {
        var v = ~~grid[y][x];
        context.beginPath();
        context.rect(x, y, 1, 1);
        context.fillStyle = 'rgba(' + v + ',' + v + ',' + v + ',1)';
        context.fill();
        context.closePath();
    }
}
// 3500ms
18:53
@MattDiamant thankyou!
manipulating the imageData is faster than drawing the rects. that is for sure.. but I wonder if there is an even faster way?
@MattDiamant There is nothing to new, it is an Object Literal...
or should I just use less points and blockier resolution?
@Neal I know, but he wants to use it like a Class
18:54
@Neal that''s what I was asking. and you've answered it.
@MattDiamant again -- he cannot. It is a literal!
Ahhh!
the "initialization" is basically var dog = {};
@rlemon now thats what u dont see my lemon
first time the getImageData call is super dooper expensive
@Neal I know he can't, and I'm not saying that he should. @rogcg look here: stackoverflow.com/questions/111102/…
@rlemon what size are you using?
18:56
var dog = {
  sharedprop: 1
};
var dogFactory = function(props) {
  return Object.extend(dog, props);
}
@rogcg you can do something like this:
also did you get it wrking?
i'd much rather get the data ..
var Animal = (function(){
    function Animal(name) {
        this.name = name;
    }

    return Animal;
})();

var monkey = new Animal('Monkey');
var dog = new Animal('Dog');
18:56
@Loktar 1*1 on a 400px * 400px canvas
first before rending it so that we can do it at 50 fps
@Loktar he forgot the midpoints
@Loktar yea Darkyen pointed out the last few mistakes I had in my thinking
:-)
lemon ... i have a suggestion mate :-)
m59
m59
Does anyone have a suggestion for how an all ajax (html,js) site should deal with authentication? I know about the standard two-token system. I'm just not sure where to store it and when and with what to check.
18:57
since you made exact same mistakes as i did.
512x512 is the closest I have
to 400x400
@Neal
var Animal = function (name) {
    return { name : name };
};
hahaha
not sure what the speed diff is
yea that is so much better than mine
18:57
@rlemon ... Introduction to Algorithms - Cormen
@Zirak but then he cannot new it :-P
and it still doesn't look perfect, but it is close enough that I'm sure I can figure it out
the shadow maps are slow on mine
REALLY SLOW
well he can, but with diff results @Zirak
I need to update that stupid sand color too
I hate it
@Neal Why would he want to? And even if he did, he'd get the same result.
takes ~3-4 seconds to render :/
Unlike your method, which requires new
And is butt-fungus ugly
@Darkyen i'll check it out
18:58
@Zirak Very easy to remove the new part to my fn
heh close
@Zirak Yah, you don't need new. And it isn't ugly, it's incredibly standard.
user1596138
Today I'm the hardware guy I suppose.
Looking for my ESR meter...
@Neal ...there's no reason to remove the new part to mine, because it wasn't there in the first place
@Loktar if you don't mind.... how close?
18:59
no idea I didnt look at the code
@MattDiamant The fact that it's standard is ugly
@Zirak ...
like... ERMAHGAD YOU ARE ALMOST THERE! kk
just going by the image generated
stuff looks backwards
like the avging isn't right
I figure there is just some random mutation i'm missing?

« first day (1013 days earlier)      last day (4154 days later) »