|
|
|
Wednesday, 24 August 2011 18:43 |
// underscore.js mixin to find list class, not relevant to finding the index in jquery.tmpl, but useful otherwise.
_.mixin({
indexClass: function(index, length) {
var result;
result = index % 2 === 0 ? "even" : "odd";
if (index === 0) {
result += " first";
} else if (index === length - 1) {
result += " last";
}
return result;
}
});
columns = []
columns.push({title: "First Column", position: 0, terms: [{key: "One", value: 1, position: 0}, {key: "Two", value: 2, position: 1}]});
columns.push({title: "Middle Column", position: 1, terms: [{key: "A", value: "a", position: 0}, {key: "B", value: "b", position: 1}]});
columns.push({title: "Last Column", position: 2, terms: [{key: "X", value: "x", position: 0}, {key: "Y", value: "y", position: 1}]});
$("#section-template").tmpl({title: "Managing Lists in jQuery.tmpl" columns:columns}).appendTo("body")
 Read more: |
|
|
Wednesday, 28 July 2010 07:00 |
 | About Mac WPS
Track your geographic position using Mac OS X wi-fi geo-tracking and other available hardware to detect your coordinate in the best precise way via Apple core location. Mac WPS shows your position over a zoomable map.
The map can se shown with the zoom level you prefer and maintaining this zoom level during position upgrade. the map can scroll maintaining your position at the window center when you are on a vehicle. Map is interactive and user can drag scroll and drag zoom.
- Uses standard Apple core location library provided with Mac OS X 10.6 Snow Leopard
- Native Modern Intel Cocoa application written for Snow Leopard from start
- Will fully work even if unlicensed
- Continuously updates your position showing it on a map
- Doesn’t requires an established wi-fi connection, just airport turned ON
- It can work using your wireless modem (usb key or bluetooth modem) to query for your position via internet
- Many more features |
Read more: |
|
Monday, 21 June 2010 07:00 |
 | About Mac WPS
Track your geographic position using Mac OS X wi-fi geo-tracking and other available hardware to detect your coordinate in the best precise way via Apple core location. Mac WPS shows your position over a zoomable map.
The map can se shown with the zoom level you prefer and maintaining this zoom level during position upgrade. the map can scroll maintaining your position at the window center when you are on a vehicle. Map is interactive and user can drag scroll and drag zoom.
- Uses standard Apple core location library provided with Mac OS X 10.6 Snow Leopard
- Native Modern Intel Cocoa application written for Snow Leopard from start
- Will fully work even if unlicensed
- Continuously updates your position showing it on a map
- Doesn’t requires an established wi-fi connection, just airport turned ON
- It can work using your wireless modem (usb key or bluetooth modem) to query for your position via internet
- Many more features |
Read more: |
|
|
Monday, 01 March 2010 13:42 |
/** A simple alpha-beta filter example by Adrian Boeing
www.adrianboeing.com
*/
#include
#include
#include
typedef struct {
float alpha; //alpha value (effects x, eg pos)
float beta; //beta value (effects v, eg vel)
float xk_1; //current x-estimate
float vk_1; //current v-estimate
} AlphaBeta;
void InitializeAlphaBeta(float x_measured, float alpha, float beta, AlphaBeta* pab) {
pab->xk_1 = x_measured;
pab->vk_1 = 0;
pab->alpha = alpha;
pab->beta = beta;
}
void AlphaBetaFilter(float x_measured, float dt, AlphaBeta* pab) {
float xk_1 = pab->xk_1;
float vk_1 = pab->vk_1;
float alpha = pab->alpha;
float beta = pab->beta;
float xk; //current system state (ie: position)
float vk; //derivative of system state (ie: velocity)
float rk; //residual error
//update our (estimated) state 'x' from the system (ie pos = pos + vel (last).dt)
xk = xk_1 + dt * vk_1;
//update (estimated) velocity
vk = vk_1;
//what is our residual error (mesured - estimated)
rk = x_measured - xk;
//update our estimates given the residual error.
xk = xk + alpha * rk;
vk = vk + beta/dt * rk;
//finished!
//now all our "currents" become our "olds" for next time
pab->vk_1 = vk;
pab->xk_1 = xk;
}
double frand() {
return 2*((rand()/(double)RAND_MAX) - 0.5);
}
int main(int argc, char *argv[]) {
AlphaBeta ab_x;
AlphaBeta ab_y;
double t; //time
double x,y; //ideal x-y coordinates
double xm,ym; //measured x-y coordinates
double xnoise = 0; //noise we are inserting into our system
double ynoise = 0;
double m_error = 0; //total error (measured vs ideal)
double ab_error = 0; //total error (ab filter vs ideal)
#define DT 0.1
//intialize the AB filters
InitializeAlphaBeta(1,0.85,0.001,&ab_x); //x position
InitializeAlphaBeta(0,1.27,0.009,&ab_y); //y position
srand(0);
for (t = 0; t < 4; t+=DT) {
//our 'true' position (A circle)
x = cos(t);
y = sin(t);
//update our simulated noise & drift
xnoise += frand()*0.01;
ynoise += frand()*0.01;
//our 'measured' position (has some noise)
xm = x + xnoise;
ym = y + ynoise;
//our 'filtered' position (removes some noise)
AlphaBetaFilter(xm,DT, &ab_x);
AlphaBetaFilter(ym,DT, &ab_y);
//print
printf("Ideal position: %6.3f %6.3f\n",x,y);
printf("Mesaured position: %6.3f %6.3f [diff:%.3f]\n",xm,ym,fabs(x-xm) + fabs(y-ym));
printf("AlphaBeta position: %6.3f %6.3f [diff:%.3f]\n",ab_x.xk_1,ab_y.xk_1,fabs(x-ab_x.xk_1) + fabs(y-ab_y.xk_1));
//update error sum (for statistics only)
m_error += fabs(x-xm) + fabs(y-ym);
ab_error += fabs(x-ab_x.xk_1) + fabs(y-ab_y.xk_1);
}
printf("Total error if using raw measured: %f\n",m_error);
printf("Total error if using a-b filter: %f\n",ab_error);
printf("Reduction in error: %d%% \n",(int)((ab_error/m_error)*100));
return 0;
}
 Read more: |
|
Tuesday, 16 February 2010 06:00 |
 | About Advanced Web Ranking
Checking your web site position is a very time consuming task. It may take you days to complete it by manually searching in the search engines. That’s where Advanced Web Ranking comes to help. Advanced Web Ranking is able to query over 1000 search engines and quickly find out if you’re moving up or down in the rankings, or if your site is listed at all. It will track the progress of your rankings over time and display that information in an easy to read and understand graphical and tabular reports. It can help you check not just the position of your website but the position of your competitors’ web sites as well. |
Read more: |
|
|
|
|
|