This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'tk' | |
root = TkRoot.new { title "Hello World" } | |
TkLabel.new(root) do | |
text "Hello All! \n dddd" | |
pack { padx 15; pady 15; side 'left'; } | |
end | |
Tk.mainloop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="grids-wrap"> | |
<div class="grids-inner"> | |
<div class="grid-250"> | |
250(px) | |
</div> | |
<div class="grid-440"> | |
440(px) | |
</div> | |
<div class="grid-250"> | |
250(px) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.grid-50.no-margin { | |
margin:0; | |
} | |
</style> | |
<div class="grids-wrap no-margin"> | |
<div class="grids-inner"> | |
<div class="grid-170 no-margin"> | |
170 (px) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.any { | |
float:left; | |
width: 100px; | |
height: 100px; | |
font-size: 14px; | |
font-family: 'pmingliu'; | |
color: #000; | |
background-color: #FFF; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="header multiple"> | |
<h1 class="brand"><a href="#" title="brand name">brand name</a></h1> | |
<div class="navigation-multiple"> | |
<div class="nav-inner"> | |
<div class="nav-grid"> | |
<dl> | |
<dt><a href="#">分类</a></dt> | |
<dd><a href="#">分类</a></dd> | |
<dd><a href="#">分类</a></dd> | |
<dd><a href="#">分类</a></dd> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="navigation"> | |
<div class="nav-inner"> | |
<ul class="rows-4"> | |
<li class="active"><a href="#">首页</a></li> | |
<li><a href="#">导航名称</a></li> | |
<li><a href="#">导航名称</a></li> | |
<li><a href="#">导航名称</a></li> | |
<li><a href="#">导航名称</a></li> | |
<li><a href="#">导航名称</a></li> | |
<li><a href="#">导航名称</a></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#endcoding: UTF-8 | |
require "open-uri" | |
require "nokogiri" | |
require "date" | |
require "mysql2" | |
apps_uri = Nokogiri::HTML.parse(open('http://itunes.apple.com/cn/genre/ios-shang-ye/id6000'), nil, "UTF-8") | |
db = Mysql2::Client.new(:host => "localhost", :username => "root", :database => "iosdb") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table> | |
<tr> | |
<th></th> | |
<th></th> | |
<th></th> | |
<th></th> | |
<th></th> | |
</tr> | |
<tr> | |
<td></td> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for post in posts %} | |
<div id="test" class="test"> | |
<h1>{{ post.id }}{{ post.subject }}</h1> | |
<p>{{ post.content }}</p> | |
<cite>{{ post.pub_date|date:'Y年m月j日' }}</cite> | |
</div> | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def index_list(request): | |
posts = post.objects.all() | |
return render_to_response('post_list.html', {'posts':posts}) |