網頁

2015年4月5日 星期日

Making a Purchase - python


shopping_list = ["banana", "orange", "apple"]

stock = {
    "banana": 6,
    "apple": 0,
    "orange": 32,
    "pear": 15
}

prices = {
    "banana": 4,
    "apple": 2,
    "orange": 1.5,
    "pear": 3
}

# Write your code below!
def compute_bill (food):
    total = 0
    for item in food :
        total +=  prices[item]
    return total

print compute_bill(shopping_list)

7.5

2015年3月21日 星期六

facebooke api

https://developers.facebook.com/docs/plugins

How to test Facebook App on localhost ?


 Blogger安裝Facebook臉書Like讚按鈕

https://developers.facebook.com/docs/plugins/like-button

Setting
---
https://developers.facebook.com/apps

status [Yes]


<head>
<meta content='xxx' property='fb:admins'/>
<meta content='xxx' property='fb:app_id'/>

<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/zh_TW/sdk.js#xfbml=1&appId=595869923788527&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


  js.src = &quot;//connect.facebook.net/zh_TW/sdk.js#xfbml=1&amp;appId=595869923788527&amp;version=v2.0&quot;;



    <div class='post-header-line-1'/>
<div class="fb-like" data-href="http://htshboy.blogspot.tw" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>

<div class='fb-like' data-action='like' data-layout='standard' data-share='false' data-show-faces='false' expr:href='data:post.url'/>




在blogger部落格中增加Facebook留言版(2013介面更新版)


<div class='post-footer-line post-footer-line-2'><span class='post-labels'>
..
<div class='fb-comments' data-num-posts='10' data-width='470' expr:href='data:post.url'/>




【留言板】安裝並管理facebook留言板



2015年1月12日 星期一

git

`git checkout develop `

`git fetch`

develop_fetch  讓你的branch與develop同一層



`git pull`

develop_pull  讓本地develop與遠端develop相同



`git merge yourbranch`

合併develop與你的branch