首先,Gitcafe的国内速度已经够快了,加不加速其实没多大区别,只不过是闲的蛋疼而已。
Gitcafe无故page不更新,所以又换回了github。

Hexo加速

Hexo加速可以有以下几个方面:

  1. 使用BootCDN并将图片等资源储存至七牛云。可以使用此项目click here
  2. 使用hexo optimize压缩优化HTML、CSS、JS、Image资源。
  3. 使用InstantClick

InstantClick是一款类似于Turbolinks的js库,利用pjax(pushState and Ajax)技术对网站进行优化,能够极大的提高访问速度。

阅读全文
G+圈子很多这样的网站,大部分是由ss-panel这个开源项目建成。不知道他们是乐于分享还是另有目的。下面是列表: Shadow X(ss-panel作者 阅读全文
有Timestamp修饰的表在修改已有的记录是一定要将该字段复制,也就是说一定要在Edit网页里面添加一行: @Html.HiddenFor(model => model.RowVersion) WebSecurity.C 阅读全文
using System.Web.Mvc;

namespace MvcClassManageSystem.ActionFilters
{
    public class LogStateFilterAttribute : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            base.OnActionExecuting(filterContext);
            //string controller = filterContext.RouteData.Values["controller"].ToString();
            //string action = filterContext.RouteData.Values["action"].ToString();
            //System.Diagnostics.Debug.WriteLine("OnAction:" + controller + "/" + action);

            if (WebMatrix.WebData.WebSecurity.IsAuthenticated == true)
            {
                filterContext.Result = new RedirectToRouteResult(new System.Web.Routing.RouteValueDictionary(new { Controller = "Home", action = "Index" }));
            }
        }
    }
}

阅读全文

几年以前,我曾经嘲笑过某科技界大佬。当时他说:也许90后、95后会慢慢不知道谷歌是什么网站。

  那一年,这对于我来说简直就是世界上最好笑的笑话。谷歌,全世界最卓越的互联网公司,活在互联网的一代中国人,会不知道他们的网站?

  今天,我收回这句嘲笑。因为这件不可能的事,它慢慢变成了现实。

  没有人再关注什么谷歌不谷歌。对他们来说,百度也蛮好用的,反正他们几乎没用过谷歌。没有谷歌又怎样?大家还是开心的刷微博,看微信,听歌,看娱乐节目。对于从来就不知道谷歌的人来说,少了谷歌又有什么影响?

阅读全文

Time Limit: 2 Seconds      Memory Limit: 65536 KB


##Description
Recently, LBH is learning the curse linear algebra. Thus he is very interested in matrix and determinant now. In order to practice his ability of solving the problem of linear algebra, he just invent some problems by himself. Once the problems was create, he would solve it immediately. However, he meet a problem that was so hard that he couldn’t work out even though racked his brains. The problem was described as follow:

To a integer martix Mnn(aij), we define two function add(Mnn(aij))=Mnn(aij + 1) and sub(Mnn(aij))=Mnn(aij - 1) which were exactly like this:

阅读全文

离散型卷积的定义是:$$y(n)=\sum_{m=0}^{n} x(m)h(n-m)$$

注意,h函数是反转的。

在Chipher Messages一题中,b串需要反转再与a串匹配。

比如说:

a串: 110110110,则:

b`串:1011<——这里才是原来b串的头。但是向上对应到a串时,已经是m-1这个位置了。所以说,小于m-1的卷积是没有意义的。

于是,base=m。整体匹配。

阅读全文

原题pdf:click here
##Description
The people of Absurdistan discovered how to build roads only last year. After the discovery, every city
decided to build their own road connecting their city with another city. Each newly built road can be
used in both directions.

Absurdistan is full of surprising coincidences. It took all N cities precisely one year to build their
roads. And even more surprisingly, in the end it was possible to travel from every city to every other
city using the newly built roads.

阅读全文

题目链接:click here
##description
Emperor Palpatine has been ruling the Empire for 25 years and Darth Vader has been the head of the Empire Armed Forces. However, the Rebel movement is strong like it never used to be. One of the rebel leaders, Princess Leia from Alderaan, managed to get hold of secret blueprints of the Death Star, the imperial war station.

The Princess was going to deliver the station plan to the secret base for further analysis and searching for vulnerable spots. But her ship was attacked by the space destroyer “Devastator” headed by Darth Vader. At the last moment Princess Leia managed to send her findings to one of the closest planet called Tatooine with her droid R2-D2. Quite conveniently, an old friend of her father Obi-Wan Kenobi lives on that planet.

阅读全文