天生我才必有用

获取所安装的Django版本?

Posted in 技术    作者:Ray    2011年三月25日
1
2
>>> import django
>>> django.VERSION
标签:

Andorid View对象常用方法

Posted in 技术    作者:Ray    2011年三月22日
  • getParent(): Finds the parent widget or container.
  • findViewById(): Finds a child widget with a certain ID.
  • getRootView(): Gets the root of the tree (e.g., what you provided to the activity via setContentView()).
标签:

/res下的子目录说明

Posted in 技术    作者:Ray    2011年三月15日
  • anim: Compiled animation files
  • drawable: Bitmaps
  • layout: UI/view definitions
  • values: Arrays, colors, dimensions, strings, and styles
  • xml: Compiled arbitrary XML files, Android-supplied XML readers to read
  • raw: Noncompiled raw files (Audio & Video), stream-based APIs to read
标签:

Android Resource-Reference Syntax

Posted in 技术    作者:Ray    2011年三月15日

@[package:]type/name

The type corresponds to one of the resource-type namespaces available in R.java, some of which are:

  • R.drawable
  • R.id
  • R.layout
  • R.string
  • R.attr

The corresponding types in XML resource-reference syntax are as follows:

  • drawable
  • id
  • layout
  • string
  • attr
标签:

Android ADT 地址

Posted in 技术    作者:Ray    2011年三月13日

Eclipse 3.5 (Galileo) and 3.6 (Helios)

  1. Start Eclipse, then select Help > Install New Software….
  2. Click Add, in the top-right corner.
  3. In the Add Repository dialog that appears, enter “ADT Plugin” for the Name and the following URL for the Location:

    https://dl-ssl.google.com/android/eclipse/

    Note: If you have trouble acquiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).

    Click OK.

  4. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  5. In the next window, you’ll see a list of the tools to be downloaded. Click Next.
  6. Read and accept the license agreements, then click Finish.
  7. When the installation completes, restart Eclipse.

Eclipse 3.4 (Ganymede)

  1. Start Eclipse, then select Help > Software Updates…. In the dialog that appears, click the Available Software tab.
  2. Click Add Site.
  3. In the Add Site dialog that appears, enter this URL in the “Location” field:

    https://dl-ssl.google.com/android/eclipse/

    Note: If you have trouble acquiring the plugin, you can try using “http” in the URL, instead of “https” (https is preferred for security reasons).

    Click OK.

  4. Back in the Available Software view, you should see the plugin listed by the URL, with “Developer Tools” nested within it. Select the checkbox next to Developer Tools, which will automatically select the nested tools. Then click Install
  5. On the subsequent Install window, all of the included tools should be checked. Click Next.
  6. Read and accept the license agreements, then click Finish.
  7. When the installation completes, restart Eclipse.
标签:

Android SDK r10下载地址

Posted in 技术    作者:Ray    2011年三月13日

由于developer.android.com无法连接,但实际的地址其实是可以连接上的,记录一下。

Platform Package Size MD5 Checksum
Windows android-sdk_r10-windows.zip 32832260 bytes 1e42b8f528d9ca6d9b887c58c6f1b9a2
installer_r10-windows.exe (Recommended) 32878481 bytes 8ffa2dd734829d0bbd3ea601b50b36c7
Mac OS X (intel) android-sdk_r10-mac_x86.zip 28847132 bytes e3aa5578a6553b69cc36659c9505be3f
Linux (i386) android-sdk_r10-linux_x86.tgz 26981997 bytes c022dda3a56c8a67698e6a39b0b1a4e0
标签:

Magento定制主菜单

Posted in PHP    作者:Ray    2011年三月10日
标签:

Magento转换URL

Posted in PHP    作者:Ray    2011年三月4日

Get the base url

1
2
3
4
5
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK); // default
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);

Get the skin url

1
$this->getSkinUrl();
标签:

@font-face support across browsers

Posted in 技术,网站设计    作者:Ray    2011年三月4日

EOT: Internet Explorer

The EOT (Embedded Open Type) format typefaces are supported in all versions of Internet Explorer.

TTF: Safari, Opera, Chrome, and Firefox

Safari version 3.2 onwards, Opera version 10 onwards, Firefox version 3.5 onwards, and all versions of Chrome support the TTF (TrueType Format) for typefaces in @font-face.

OTF: Safari, Opera, Chrome, and Firefox

Similarly to the TrueType Format, OTF (OpenType Format) is supported by Safari version 3.2 onwards, Opera version 10 onwards, Firefox version 3.5  onwards, and all versions of Chrome support the TTF (TrueType Format) for typefaces in @font-face.

SVG: iPhone and Chrome

The SVG (Scalable Vector Graphics format) is supported by the iPhone and Chrome browsers. SVG font files are specially formatted .svg files that contain vector graphics for each glyph and character of the typeface it represents, allowing for easy scalability.

WOFF: Firefox

The WOFF (Web Open Font Format) is currently supported by Firefox, but is in the process of becoming a standard for font formats across all major browsers, including those by Opera, Microsoft, and Mozilla.

标签:

Magento定制Sidebar

Posted in PHP,技术    作者:Ray    2011年三月3日

删除Paypal Partner

<remove name=”paypal.partner.right.logo” />  <!–paypal logo–>

删除Community Poll

<remove name=”right.poll”/>
<remove name=”left.poll”/>

删除Tags

<remove name=”tags_popular”/>

删除Compare Products

<remove name=”catalog.compare.sidebar” />  <!–product compare–>

删除Reorder

<remove name=”sale.reorder.sidebar”/>

删除WishList

<remove name=”wishlist_sidebar”/>

删除Dog

<remove name=”left.permanent.callout” />  <!–the dog–>

删除Back to School

<remove name=”right.permanent.callout” />  <!–back to school–>

删除购物车

<remove name=”cart_sidebar” /> <!–cart sidebar–>

删除recently viewed product

<remove name=”left.reports.product.viewed” /> <!–recently viewed prod–>
<remove name=”right.reports.product.viewed” /> <!–recently viewed prod–>

删除recently compared product

<remove name=”right.reports.product.compared” /> <!–recently compared prod–>

更多信息请参考Turning On and Off Magento’s Default Blocks

标签: