Yii – How to add static pages

Just create the page you want under protected/views/site/pages/ folder. Remember that the name you give the file is the name with which you will browse the page.
For example, if, you create a page termsofservice.php in the pages folder you will browse the page like this:

To create a link to the static page:

Yii::app()->createUrl('/site/page', array('view'=>'termsofservice'));

Apple Is Now the World’s Most Valuable Brand

According to Interbrand’s 2013 global brand rankings, Apple has overtaken Coca Cola to become the world’s most valuable brand, with its value estimated at a whopping $98.3 billion.

Apple’s rise through the rankings has truly been meteoric: In 2011, the company sat at eight place with an estimated $33 billion brand value.

Google has also leaped past Coca Cola this year, and it now sits in second place, with its brand value estimated at $93.3 billion. It’s followed by Coca Cola with $79.2 billion, IBM with $78.8 billion and Microsoft with $59.5 billion.General Electric, McDonald’s, Samsung, Intel and Toyota round up the top 10.Amazon and Facebook, which are placed 19th and 52nd, have been labeled “top risers,” having risen by 27% and 43%, respectively, since last year.

CGLineCap and CGLineJoin Style in xcode

- (id)initWithCoder:(NSCoder *)coder {
	self = [super initWithCoder:coder];
	if (self) {
		_lineCap = kCGLineCapButt;
		_lineJoin = kCGLineJoinMiter;
	return self;

- (void)setLineJoin:(CGLineJoin)lineJoin {
	if (self.lineJoin != lineJoin) {
		_lineJoin = lineJoin;
		[self setNeedsDisplay];

- (void)setLineCap:(CGLineCap)lineCap {
	if (self.lineCap != lineCap) {
		_lineCap = lineCap;
		[self setNeedsDisplay];

- (void)drawRect:(CGRect)rect {

	CGContextRef context = UIGraphicsGetCurrentContext();

	CGContextSetLineCap(context, self.lineCap);
	CGContextSetLineJoin(context, self.lineJoin);
	CGContextSetLineWidth(context, 20);

	CGContextMoveToPoint(context, 50, 250);
	CGContextAddLineToPoint(context, 160, 150);
	CGContextAddLineToPoint(context, 270, 250);

Adding Stroke, Shadow, Reflection and Opacity to an Image in Keynote

In keynote software, we will be able to stroke, apply shadow or reflection or opacity to an image. For this, follow these steps :

1. Click on the image.

2. Open Inspector by clicking the inspector button on the toolbar.

3. Go to Graphic tab of the image inspector.

4. Here you will see different sections for chafing the stroke, shadow, reflection and opacity. Use these options to implement those items.

You can see that what ever change you are making on the inspector is reflected simultaneously in the object.

Android alert view/pop up example

AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
builder.setMessage("your message")
					.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {


AlertDialog alert = builder.create();