I have a module, that fetches some object. Then other modules can use this object. Here is a little example of this task:
var Structure = (function(){
var tree = null,
df = $.ajax({
'url' : '/some/path',
'type' : 'POST',
'data' : ...
I have a module, that fetches some object. Then other modules can use this object. Here is a little example of this task:
var Structure = (function(){
var tree = null,
df = $.ajax({
'url' : '/some/path',
'type' : 'POST',
'data' : ...
I am using the Google Analytics Javascript library to let users view a GeoMap of the particular page they are on. However, everytime they attempt to do so, thye have to go through an authentication process only to have my data displayed on my page. How can I find an alternative to this. I only wa...
@Purmou Purmou, GGG, Zirak, Jbm, Thomas Blobaum, Mike, Ryan Kinal, Dennis, tereško, Ivo Wetzel, Tim Stone, Esailija, Mathew Paul, Shog9, Charles Sprayberry, Phelios, Z-Lite
@Purmou a was already submitted
@Purmou a was already submitted
@GGG e was already submitted
@GGG e was already submitted
+---+
| |
| O
|
|
__+__
a, e
--e------
This is the proof-of-concept code with drafts for widgets for my current project that uses google maps. As a result the code produces 3 buttons in the top right corner:
Any advices how I may improve it? (personally I'm specifically server-side developer and don't use javascript extensively, so...
@Thomas Blobaum Only alphanumeric and whitespace characters allowed @Thomas Blobaum Only alphanumeric and whitespace characters allowed @Thomas Blobaum Only alphanumeric and whitespace characters allowed @Thomas Blobaum Only alphanumeric and whitespace characters allowed
@Thomas Blobaum Only alphanumeric and whitespace characters allowed @Thomas Blobaum Only alphanumeric and whitespace characters allowed @Thomas Blobaum Only alphanumeric and whitespace characters allowed @Thomas Blobaum Only alphanumeric and whitespace characters allowed
@GGG e was already submitted
@GGG e was already submitted
@GGG e was already submitted
@GGG e was already submitted
@GGG e was already submitted
+---+
| |
|
|
|
__+__
e
---e----e-
@GGG e was already submitted @GGG e was already submitted @GGG e was already submitted @GGG e was already submitted @GGG e was already submitted @GGG e was already submitted
After the success of last weeks Code-Bowling, we present you yet another
chance to write the worst code you have ever written.
Code-Bowling is a challenge for writing the most obscure, unoptimized,
horrific and bastardized code possible. Basically, the exact opposite of
Code-Golf.
Th...
RT @stoyanstefanov: Performance calendar day #27: @pavelpaulau on tracking x-browser perf data with HARStorage http://calendar.perfplanet.com/2011/a-simple-way-to-measure-website-performance/
If you want to come to Mobilism 2012, 10th and 11th of May in Amsterdam, it’s best to buy your ticket before Saturday. Early bird prices, which knock off €100 of the ticket price, ends with the outgoing year, and why should you pay more than necessary? Mobilism 2011 was a blast; see also the videos. We’re set to repeat and extend this success in May. with seven world-class sp…
hmm, I started working on this stuff yesterday. Require had the most examples
Another thing
Say I have a screen that has multiple drop downs (e.g. country and county) and I have to wait till they are done loading before showing the add page. The first thing I tried is nesting callbacks, which is a PITA. Then I looked around and found the jquery promises
is this the way to go to wait for multiple async calls?
Amdahl's law, also known as Amdahl's argument, is named after computer architect Gene Amdahl, and is used to find the maximum expected improvement to an overall system when only part of the system is improved. It is often used in parallel computing to predict the theoretical maximum speedup using multiple processors.
The speedup of a program using multiple processors in parallel computing is limited by the time needed for the sequential fraction of the program. For example, if a program needs 20 hours using a single processor core, and a particular portion of 1 hour cannot be parallelize...
var reactionTypes = new reactionCollection();
$.when(reactionTypes.fetch()).then(function(reactionTypes){
var data = {
types : reactionTypes
}
var compiledTemplate = _.template( reactionAddTemplate );
this.el.html( compiledTemplate );
});
When comparing this benchmark with chrome 16 vs opera 11.6 we find that
in chrome native bind is almost 5 times slower
in opera native bind is almost 4 times faster
Are there good reasons why there is such a difference or is this just a matter of v8 not optimizing enough?
it does have an actual effect raynos... inline created anonymous function in deep will hold everything in memory while a dumb function created as top level as possible will hold much less stuff in memory
function asd() {
var a = 10,
b = 10,
c = 10;
(function(){
var d = 10;
[].forEach( function(){
//will know about a,b,c,d
});
[].forEach( iterate );
})()
}
function iterate(){
//will not know about a,b,c and d
}