Did You Know 4.0



This video explains the shift of information on the Internet – with the help of visualisation.

Quotes from Great Debaters

I recently watched Great Debaters, starring Denzel Washington and Forest Whitaker. It’s a movie about Wiley College debate team in Texas. Some quotes in the movies are really touching.


Creative Commons License photo credit: kairin

“We do what we have to do in order to do what we want to do.”

- James Farmer Jr.

“Education is the only way out. The way out of ignorance, the way out of darkness! Into the glorious light.”

- Narrator

“St Augustine said, “”"An unjust law is no law at all.”"” Which means I have a right, even a duty to resist. With violence or civil disobedience. You should pray I choose the latter.”

- James Farmer Jr.

Do watch this movie. I fully recommend this.

Cross-page PostBack (PostBackURL) & OnClientClick

If you use cross-page postback and javascript validation together, there is a chance that they can conflict. It is because user-defined validation can breaks the cross-page postback (which uses javascript as well to redirect to next page). Solution can be found here.

Google Prediction API

The Prediction API enables access to Google’s machine learning algorithms to analyze your historic data and predict likely future outcomes. Read more

Inside Story: Foxconn

Read this inside story about Foxconn’s suicide cases. Who is responsible? Capitalism or Governments without regulations?

Google Font API

I love typography. And, I’m quite disappointed with limited availability of beautiful fonts in Windows. (I admit that they introduced many better-looking fonts such as Segoe UI, Calbir and Cambria starting from Vista and Office 2010.) But, I just prefer Mac fonts like Lucida Grande or Helvetica.

And, when it comes to web typography, things could get worse. Only a small limited set of fonts are cross-platform. Thus, people start to talk about webfonts. Google announced this new project called Google Font API. I hope it is helpful while choosing best typography for our projects. Currently, only a few fonts are available yet. But, I believe it will grow bigger.

Google Font API

Google’s Mission Statement & Motto

Google’s mission statement is to “organize the world’s information,” and their motto is, “Don’t be evil.”

JavaScript pageLoad() for MasterPage and ContentPage

Sometimes, we need to use pageLoad() function in both MasterPage and ContentPage to get something done. But, if we add two function with such same name, that function residing in ContentPage will be ignored by the browser. To correct this behaviour, we need to extend pageLoad() function in MasterPage as follows:

In MasterPage

function pageLoad(sender, args)
{
...
// ... do my MasterPage JavaScript stuff...
...
if (window.contentPageLoad) {
window.contentPageLoad(sender, args);
}
}

In ContentPage

function contentPageLoad(sender, args)
{
// do something
}

Credit goes to devioblog.

Adding external files to VS project

Sometimes, we need to include files while publishing our web application in Visual Studio. But, those files (e.g. pdf) are not published together. In that case, make sure the file is in project. Right-click the file and if you see ‘Include in Project’, it means that file is not part of project yet. Then, right-click the file again. Select properties and set these values:

Build Action: Content
Copy to Output Directory: Do not copy (This is to copy the file to Bin folder.)

innerText for Firefox

Firefox doesn’t recognise innerText property. Below is the fix.

var AmountLabelControl = document.getElementById('lblAmount');

var amount;

if (AmountLabelControl.textContent) {
// Firefox...
amount = AmountLabelControl.textContent;
}
else if (AmountLabelControl.innerText) {
// IE...
amount = AmountLabelControl.innerText;
}

Thant Zin Oo