120 karma · joined August 23, 2012
Tim: A better approach would be to iterate through all children and find the maximum using elem.offset(Height|Width).
Then create a new <style> in the head for your plugin if it doesn't exist and append a new rule like:
style.innerHTML += '#' + (elem.id || (elem.id = 'eq' + (Date.now() % 1e9))) + '>*{' + equalize + ':' + val + '}';
If you don't like this you could still use elem.style.(width|height) (and maybe even detach the container beforehand to prevent unnecessary reflows), which will be faster and doesn't require a 90KB lib.I do it because I can.
When I opened it the first time, or everytime I press Ctrl+Shift+R it works, but it shows the URL, and a litte icon in the upper left corner: http://i.imgur.com/B7jFE.png
If I press F5 or Ctrl+R it doesnt work, just as you said.
But I completely agree with "the rewrite thing". I guess the other factors made it necessary to still do it....
> I'm sorry, but if you are only good in JS, or PHP, the very first thing you should do is become good with some better tools.
And I don't know what the hell is wrong with you, that you assume that you are the wisest of all men and know what is wrong with everything and what to use in any situation and what I know and what I do and what I should do...
> and have a cost you will pay during the lifetime of your application, in security, reliability, scalability and maintainability.
So thanks for this lesson. I swear I will spread the word, but before I will go and worship JS/PHP, as the little, stupid fanboy I am. (fyi that's called the language of sarcasm)
As I said: Don't go around and "insult" programming languages, because most of them have their right to exist and nobody forces you to use something you don't like, nor anybody else. Most programmer choose to use node.js and if they fail it's not necessarily the fault of the "tool" (though it can be), but also the fault of the programmer in question, by choosing a "tool" which didn't fit. I mean: You wouldn't try to put a screw in the wall with a hammer. Am I right?
is there any real advantage over I think that's the wrong way to choose a platform. Are you good in Ruby? Then use RoR. Are you good in JS? Then use node.js. Maybe RoR is a much better platform than node.js, maybe it's not. But I finished writing my framework/application 10 times, before you even typed RoR. :D Furthermore: You. Don't. Use. node.js. For. CPU heavy. tasks! Don't do it. For everything else I think it's a wonderful framework, if you want to write something I/O heavy.
btw: The strict asynchronous programming style, using JSs closures, is pretty much the same thing you would write in C (except for that you don't have closures). I recommend everyone to look at least once into https://github.com/joyent/libuv/ But unfortunately many "programmers" here won't do it, since C is stupid and for old farts. I mean: I can do anything in C# in a tenth of the time compared to you with C (http://programmers.stackexchange.com/q/164017)
For things like P2P UDP is a much better fit, because TCP sends an ACK (ACKnowledgement) to the sender for every received packet.
Since UDP is unreliable no such ACKs will be send and it's up to the programmer to detect packet loss. The latency is therefore with UDP lower (and hence throughput higher), because the provider can push packets without waiting for a response.
For instance in P2P the receiver only needs to send a NAK (Negative AcKnowledgment) if and only if a packet/part is missing and then it will be resend by the provider.