ios

MKOverlay

Write your own overlay class (for example, MapOverlay) confirm to MKOverlay, synthesize coordinate and boundingMapRect, so that we can assign value to them while initializing it.

Note that the type of coordinate is CLLocationCoordinate2D with latitude and longitude, while boundingMapRect is MKMapRect. And we need to use MKMapPointForCoordinate method to convert a CLLocationCoordinate2D type data to MKMapPoint type data. If we assign the CLLocationCoordinate2D data directly to boundingMapRect, the overlay will be too small to draw, and the mapView:rendererForOverlay: method will not be called at all. It is very hard for debugging.

Read on →

[updated 2015.09.13] This adding method is only for my project pages (gh-pages) GitBlogs, and for octopress, the way is builded in.

[updated 2015.06.07] For adding category or tag automatically through python script, go to here.

Introduction

The index page includes cat_tag_for_index.html for showing all the categories and tags, and the number of the corresponding posts.

The _layouts/default.html describes the content of a post, because post includes it. In the _layout/default.html file, it includes the cat_tag.html template as the category and tag info in the beginning of the post. And cat_tag.html also includes the date behind.

_data/categories.yml and _data/tags.yml describe all the categories and tags.

Read on →

[updated 2015.10.30] The followings ways for deploying posts is deprecated. Refer to deploying octopress for details. But if you knows things this post descripbes, you will have better understanding of octopress.

[updated 2015.09.13] Github has two kind of pages: user/orgnization pages and project pages (gh-pages).

Currently, I am using the user/orgnization pages deployed by octopress. This is recommended, due to the easy deployment.

If you are using the project pages (gh-pages), the following references may be help.

How to get started

Refer to “一步步在GitHub上创建博客主页”.

Categories and tags

I tried the this one. It works well.

Jekyll debugging

I didn’t try the debugger yet.

[updated 2015.10.30] The following way is deprecated, and octopress way is prefered. But the To make the post searchable by Google part is still in use.

Contents:

The first two sections are only for my project pages (gh-pages) GitBlogs, and currently in cotopress blog, we have other new simpler ways to do these things. See Migrate Blog to Octopress.

Description

This post is not for how to deploy the environment of writing posts in github pages, but how to use the environment you deployed before.

Read on →

1
2
3
4
5
6
7
8
Function.prototype.clone = function() {
    var that = this;
    var temp = function temporary() { return that.apply(this, arguments); };
    for( key in this ) {
        temp[key] = this[key];
    }
    return temp;
};