Pages

Ads 468x60px

Labels

Showing posts with label Google. Show all posts
Showing posts with label Google. Show all posts

Thursday, May 3, 2012

Web.py versus App Engine

Một so sánh rất thú vị : http://stackoverflow.com/questions/4759565/differences-between-webapp-and-web-py


9
down voteaccepted
web.py experience:
I started to use web.py three years ago when I decided to learn some Python web frameworks.
The first thing I loved of web.py was its simplicity; I was searching for an essential microframework without all the batteries that you can find in other bigger projects like Django or Web2py for example.
So I developed a couple of projects (deployed with fastcgi) and learned all of the web.py library features,Templetor included.
Then I discovered Google App Engine and started to use Webapp; it was a boring process because instead of using python (like Templetor or Mako), it forces you to learn a new templating syntax that it is very restrictive by default.
While Developing StackPrinter I found that Google App Engine was supported by web.py so I removedSqlite, made some minor tweaks and started to use GAE datastore.
Web.py was my first love in term of Python web frameworks and it's fair to say that I'm a little biased to talk about it.
I'm sticking with web.py for my pet-project on GAE because I'm fluent with it and templetor is lightning fast.
I like the fact that I can use Python for templating and the easy way to share some data or functions globally to the views, I like also the rich toolset of utilities for encoding, markdown and so on.
Webapp vs web.py:
I think it's not fair to compare them because Webapp is a simple framework that just provides the minimum easy tools to get started; many features are missing like I18n, validation, processors or even the basic cookies handling.
Check Webapp-improved for something better.
My recommendation:
If your focus is mainly on developing for Google App Engine, I would recommend you to go with some framework made specifically for GAE like Tipfy.
If you are searching for a pythonic web framework to play with on your side-projects, web.py is a good project to study and to follow.


Đọc vô hiểu sơ sơ :))

Sunday, April 8, 2012

The message you are sending is too large [Gmail - Mdaemon]

Gửi attach hơn 4MB giữa các cá nhân thoải mái.
Nhưng Google lại hạn chế khi gửi đến Group, dung lượng attached không được quá 4MB.

Cách xử lý => upload lên host khác như www.Mediafire.com

Wednesday, April 4, 2012

Bảo mật tài khoản Facebook

Các bạn xem hình trên : https://www.facebook.com/settings?ref=mb và vào link này để thiết lập các thông số bảo mật .

Secure Browsing : Khi enable, dữ liệu bạn nhập vào như mật khẩu đăng nhập sẽ được mã hóa .


Login Notifications : Mỗi khi bạn hay ai đó đăng nhập trên một máy tính lạ (tức là khác với máy tính bạn hay dùng) , sẽ có email thông báo đến hộp mail và SMS đến điện thoại của bạn . (thiết lập điện thoại mình sẽ nói sau)

Login Approvals : Với chức năng này, mỗi khi bạn login vào máy tính lạ, Facebook sẽ yêu cầu bạn nhập 1 dãy số, dãy số này được gửi tới điện thoại của bạn .

App Passwords : Bảo vệ bạn trước những ứng dụng có hại, nhưng cái này tốt nhất bạn nên để nguyên vì Facebook sẽ yêu cầu bạn nhập số khi sử dụng 1 apps nào đó .

Active Sessions : Lưu lại những thời điểm bạn đăng nhập trên các thiết bị khác nhau .

*Thiết lập điện thoại*






Nếu bạn chưa thiết lập lần nào, thì vào mục Mobile làm theo hướng dẫn là được.
Ở đây mình đã add 1 phone rồi, nên giờ muốn add thêm thì làm như sau, cũng vào mục Mobile, chọn Add another mobile phone number , nhập password, If you just need to verify your account or your operator isn't listed above, add your number here  .

ăng nhập  Sau đó nhập vào số điện thoại dạng "+84..." (nhớ bỏ số 0 ở đầu), ví dụ số điện thoại bạn là 0123456789 thì bạn nhập +84123456789 .


Bạn NÊN dùng Beeline, nhưng mình cũng đã thử thành công với Viettel rồi.
Bạn KHÔNG NÊNActive Text Messaging (vì nó rất lâu và nói chung là bạn không cần dùng làm gì)



Ed

Saturday, March 17, 2012

FanPage trong Blogger

Copy đoạn mã sau và dán vào mục HTML/JavaScript  là được . Thay URL_PAGE = FANPAGE của bạn :




<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/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


<div class="fb-like-box" data-href="URL_PAGE" data-width="192" height ="350" data-show-faces="true" data-stream="true" data-header="true"></div>

Tuesday, March 13, 2012

Trái tim cho Blogger



Trong Blogger Dashboard : chọn Design > Edit HTML và expand Widget

Tìm  </head> và thêm vào trước đó đoạn code sau :

<!-- Start Heart Bookmarking Gadget Code From http://www.nguyen-vu-long.blogspot.com/ -->
<script src='http://w.sharethis.com/gallery/shareegg/shareegg.js' type='text/javascript'/>
<script src='http://w.sharethis.com/button/buttons.js' type='text/javascript'/>
<script type='text/javascript'>stLight.options({publisher: &quot;ur-98d377f-bdd3-9ad1-fbe5-2a678f0a60ee&quot;, onhover:false}); </script>
<link href='http://w.sharethis.com/gallery/shareegg/shareegg.css' media='screen' rel='stylesheet' type='text/css'/>
<!-- End Heart Bookmarking Gadget Code From http:// www.nguyen-vu-long.blogspot.com / -->

Sau đó tìm </body> và thêm vào trước đó đoạn code sau :


<!-- Start Heart Share Code From  http://www.nguyen-vu-long.blogspot.com  --> <div style='position: fixed; bottom: 2%; left: 2%;'> <div class='shareEgg' id='shareThisShareHeart'/> </div> <script type='text/javascript'>stlib.shareEgg.createEgg(&#39;shareThisShareHeart&#39;, [&#39;facebook&#39;,&#39;twitter&#39;,&#39;pinterest&#39;,&#39;linkedin&#39;,&#39;stumbleupon&#39;,&#39;email&#39;,&#39;sharethis&#39;], {title:&#39; <data:blog.pageTitle/>&#39;,url:&#39;<data:blog.url/>&#39;,theme:&#39;shareheart&#39;});</script><a href="http://www.spiceupyourblog.com/">Blogger Wordpress Gadgets</a> <!-- End Heart Share Code From  http://www.nguyen-vu-long.blogspot.com  -->



Sau đó bạn Save Template lại là xong .
Nguồn  : http://www.spiceupyourblog.com/2012/03/share-this-heart-bookmark-gadget.html

Sunday, March 11, 2012

Tạo Facebook Comment Box

Clip ở bước đầu hơi khác 1 chút do đây là phiên bản Facebook cũ, các bạn làm theo cách sau :

Bước 1 : Vào http://developers.facebook.com/setup/ và điền sao cũng được, như hình sau :


Bước 2 : Nhấn Continue, một bảng hiện ra, bạn copy phần  App ID , lưu lại đâu đó .


Bước 3 : vào phần   Blogger Dashboard > Design > Edit HTML > click Expand Widget Templates
 và tìm <data:post.body/>,  dán đoạn này vào phía DƯỚI dòng vừa tìm được : 



<b:if cond='data:blog.pageType == &quot;item&quot;'>
  <p align='left'><img alt='' class='icon-action' src='http://lh4.googleusercontent.com/-HvqNmNXhkzY/TjATfsEVeSI/AAAAAAAAAjc/yMCvjARROZk/Screenshot.png'/></p>
  <div id='fb-root'/>
  <script>
  window.fbAsyncInit = function() {
  FB.init({appId: &#39;AXID &#39;, status: true, cookie: true,
  xfbml: true});
  };
  (function() {
  var e = document.createElement(&#39;script&#39;); e.async = true;
  e.src = document.location.protocol  +
  &#39;//connect.facebook.net/en_US/all.js&#39;;
  e.async = true;
  document.getElementById(&#39;fb-root&#39;).appendChild(e);
  }());
  </script>
  <fb:comments/>
  </b:if>


Bước 4 : Ctrl + F tìm AXID và thay bằng App ID phía trên .

Bước 5 : Vào Settings > Comments , chọn Hide .


Vậy là xong . Các bạn xem minh họa cuối bài viết này :P .




Các bạn nên xem thêm clip sau để hiểu thêm nếu chưa làm được .


 

Sample text

Sample Text

Sample Text

Everyday, I wake up asking my-self : what is the purpose of Life ?

 
Blogger Templates