热点文章

外链图片转换到本地外链图片转换到本地 最近一直在折腾,无穷无尽的折腾,也就是瞎忙。因为以前的图片是放在微软SkyDrive里的,很稳定没有网上说的链接失效。当然你把图片所在文件夹名字哪怕是改了一下链接肯定会失效,抑或你获得图片真实地址方法不对也会出问题。我换掉SkyDrive根本原因是速度太慢了,其实它比Flickr快。记得WP-Thumbnails还是叫Thumbnails...

Readmore

EBLhost主机EBLhost主机 2011年9月21日再次更新EBLhost2011年域名改了,地址如下http://www.cpanelchina.net更新:现在我已经没使用EBLhost主机了,其实这个主机还是不错的。现在用的主机是合租的bluehost,详见:http://yslove.net/2011/03/bluehost-roommate-01/。 难得做一次广告,今天打个广告,其实也不是广告,囧。不想看的当是没看到。。。直接奔主题,给大家推荐个主机,是国内的不是国外的--EBLhost主机(也可以说是国外的)。说下我试用的感觉,链接速度还是可以的,现在的这个博客就是,怎么样?再是它比较稳定,价格便宜。其它的优点和网上其它主机吹嘘的一样。说说缺点,EBLhost的主机到目前为止其中有一点我不满意的,那就是安装WordPress后无法通过后台自动升级也无法搜索相关插件,EBL说是“景安网络”那边服务器的问题。(问题已解决,好像3月份就OK了,具体时间我记不清楚了)广告来了,嘎嘎-----(我准备开个帖专门发放优惠码,随时提供最新的优惠码) 优惠码497cfbdc(据官方说这是最低折扣了,我以前是9.5折的),9.0折。囧,的确有点少,我也只有9.5折的优惠码。 你也可以通过我的ID链接注册www.eblhost.cn/?u=528...

Readmore

  • Prev
  • Next

测试Highlight高亮

发表于 : 21-12-2011 | 作者 : That5 | 分类 : 其它

2

Python

@requires_authorization
def somefunc(param1, param2):
    r'''A docstring'''
    if param1 > param2: # interesting
        print 'Gre\'ater'
        print ''
    return (param2 - param1 + 1) or None

class SomeClass:
    pass

Ruby

class A < B; def self.create(object = User) object end end
class Zebra; def inspect; "X#{2 + self.object_id}" end end

module ABC::DEF
  include Comparable

  # @param test
  # @return [String] nothing
  def foo(test)
    Thread.new do |blockvar|
      ABC::DEF.reverse(:a_symbol, :'a symbol' + 'test' + test)
    end.join
  end

  def [](index) self[index] end
  def ==(other) other == self end
end

anIdentifier = an_identifier
Constant = 1

php

require_once 'Zend.php';
require_once 'Zend/Uri/Exception.php';
require_once 'Zend/Uri/Http.php';
require_once 'Zend/Uri/Mailto.php';

abstract class Zend_Uri
{

  /**
   * Return a string representation of this URI.
   *
   * @see     getUri()
   * @return  string
   */
  public function __toString()
  {
      return $this->getUri();
  }

  static public function factory($uri = 'http')
  {
      $uri = explode(':', $uri, 2);
      $scheme = strtolower($uri[0]);
      $schemeSpecific = isset($uri[1]) ? $uri[1] : '';

      // Security check: $scheme is used to load a class file,
      // so only alphanumerics are allowed.
      if (!ctype_alnum($scheme)) {
          throw new Zend_Uri_Exception('Illegal scheme');
      }
  }
}

css

body,
html {
  font: Tahoma, Arial, san-serif;
  background: url('hatch.png');
}

@import url('print.css');

@media screen and (-webkit-min-device-pixel-ratio: 0) {
  body:first-of-type pre::after {
    content: 'highlight: ' attr(class);
  }
}

@page:right {
 margin: 1cm 2cm 1.3cm 4cm;
}

@font-face {
    font-family: Chunkfive;
    src: url('Chunkfive.otf');
}

#content {
  width: /* wide enough */ 100% /* 400px */;
  height: 100%
}

p[lang=ru] {
  color: #F0F0F0; background: white !important;
}

相关评论 (2)

高亮代码不错,不知道js大不?

2012了

恭喜发财

发表你的看法