Monday, December 31, 2012
Windows 8 Application tile update
Ref:
http://msdn.microsoft.com/en-us/library/windows/apps/hh761490.aspx
Updating notification tile:
//1. Choose a tile contents template:
var tmpl = Windows.UI.Notifications.TileTemplateType.tileWideImageAndText01;
//2. Get tile xml dom:
var xml = Windows.UI.Notifications.TileUpdateManager.getTemplateContent( tmpl )
//3. Update text:
var txt = xml.getElementsByTagName("text");
txt[0].appendChild( xml.createTextNode("Hello World") );
//4. UpdateImage:
var img = xml.getElementsByTagName("img");
img[0].setAttribute("src", "ms-appx:///images/logo.png");
//5. Create a notification via the new xml and set it to expire in 10 minutes:
var notification = new Windows.UI.Notifications.TileNotification( xml );
notification.expirationTime = new Date( (new Date()).getTime() + 600 * 1000 );
//6. Send the tile update
Windows.UI.Notifications.TileUpdateManager.createTileUpdateForApplication().update(notification);
Wednesday, November 28, 2012
Wednesday, November 21, 2012
CSS: box-sizing
Don't Overthink It Grids | CSS-Tricks: "Gutters
The hardest part about grids is gutters. So far we've made our grid flexible by using percentages for widths. We could make the math all complicated and use percentages for gutters as well, but personally I don't like percentage gutters anyway, I like fixed pixel size gutters. Plus, we're trying to keep too much thinking out of this.
The first step toward this is using box-sizing: border-box;. I like using it on absolutely everything.
*, *:after, *:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
Now when we set a width, that element stays that width, despite padding or borders being applied."
'via Blog this'
The hardest part about grids is gutters. So far we've made our grid flexible by using percentages for widths. We could make the math all complicated and use percentages for gutters as well, but personally I don't like percentage gutters anyway, I like fixed pixel size gutters. Plus, we're trying to keep too much thinking out of this.
The first step toward this is using box-sizing: border-box;. I like using it on absolutely everything.
*, *:after, *:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
Now when we set a width, that element stays that width, despite padding or borders being applied."
'via Blog this'
Saturday, September 29, 2012
Monday, September 3, 2012
MySQL: fix : Could not parse relay log event entry
Steps:
- mysql> stop slave;
- mysql> show slave status\G
- copy the values Relay_Master_Log_File, Exec_Master_Log_Pos
- mysql> CHANGE master TO master_log_file=<Relay_Master_Log_File>, master_log_pos=<Exec_Master_Log_Pos>;
- mysql> start slave;
Reference:
- mysql> stop slave;
- mysql> show slave status\G
- copy the values Relay_Master_Log_File, Exec_Master_Log_Pos
- mysql> CHANGE master TO master_log_file=<Relay_Master_Log_File>, master_log_pos=<Exec_Master_Log_Pos>;
- mysql> start slave;
Reference:
- http://www.gustavomejia.com/blog/2008/12/02/1228210800000.html
- http://www.mysqlperformanceblog.com/2008/08/02/troubleshooting-relay-log-corruption-in-mysql/
- https://www.google.com/#hl=en&sugexp=les%3B&gs_nf=1&tok=i8vkKBQNNInCf7ZBcqQgIg&cp=20&gs_id=27&xhr=t&q=could+not+parse+relay+log+event+entry&pf=p&output=search&sclient=psy-ab&oq=could+not+parse+rela&gs_l=&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&fp=77b9feddd4c5d47e&biw=702&bih=461
Subscribe to:
Posts (Atom)