PIXNET Logo登入

逗點大的雨滴

跳到主文

工作日記、心情日記

部落格全站分類:心情日記

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 3月 13 週日 201122:22
  • PHP - google tanslate api PHP source code





<?php
function translate( $text, $destLang = 'zh-cn', $srcLang = 'en' ) {
$text = urlencode( $text );
$destLang = urlencode( $destLang );
$srcLang = urlencode( $srcLang );
$trans = @file_get_contents( "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q={$text}&langpair={$srcLang}|{$destLang}" );
$json = json_decode( $trans, true );
if( $json['responseStatus'] != '200' ) return false; else return $json['responseData']['translatedText'];
}
echo translate('me');
?>






(繼續閱讀...)
文章標籤

= = 發表在 痞客邦 留言(0) 人氣(61)

  • 個人分類:web programer
▲top
  • 12月 10 週五 201000:35
  • javascript 防右鍵



<body ONDRAGSTART="window.event.returnValue=false" ONCONTEXTMENU="window.event.returnValue=false" onSelectStart="event.returnValue=false">
<noscript><iframe src=*.html></iframe></noscript>
<script>
if(self != top) top.location.href = window.location.href; 
</script>
</body>


(繼續閱讀...)
文章標籤

= = 發表在 痞客邦 留言(0) 人氣(67)

  • 個人分類:web programer
▲top
  • 11月 30 週二 201016:04
  • fixed location text with scroll bar of windows in CSS

CSS 


<style type="text/css">
p.pos_fixed
{
position:fixed;
top:30px;
right:5px;
}
</style>


(繼續閱讀...)
文章標籤

= = 發表在 痞客邦 留言(0) 人氣(41)

  • 個人分類:web programer
▲top
  • 11月 30 週二 201015:31
  • Create a new windows

html 


<html>
<head>
<script type="text/javascript">
</script>
</head>
<body>
<input type="button" value="Open 'myWindow'" onclick="openWin()" />
<input type="button" value="Close 'myWindow'" onclick="closeWin()" />
</body>
</html>


(繼續閱讀...)
文章標籤

= = 發表在 痞客邦 留言(0) 人氣(7)

  • 個人分類:web programer
▲top
  • 11月 30 週二 201015:24
  • A clock created with a timing event

html 


<html>
<head>
<script type="text/javascript">
</script>
</head>
<body onload="startTime()">
<div id="txt"></div>
</body>
</html>


(繼續閱讀...)
文章標籤

= = 發表在 痞客邦 留言(0) 人氣(8)

  • 個人分類:web programer
▲top
  • 11月 30 週二 201015:15
  • Create a welcome cookie





<html>
<head>
<script>


//TODO something
</script>
</head>
<body onLoad="checkCookie()">
</body>
</html>




(繼續閱讀...)
文章標籤

= = 發表在 痞客邦 留言(0) 人氣(10)

  • 個人分類:web programer
▲top
1

個人資訊

= =
暱稱:
= =
分類:
心情日記
好友:
累積中
地區:

最新文章

  • Android Hello
  • 2013面試之旅-1-x鴻(監視系統)
  • bat批次檔
  • 查出電腦佔port的程式pid
  • ruby - create directory
  • ruby - log file
  • c - 進制轉換
  • ruby - hadle excel file (xls)
  • Linux - 壓縮、解壓縮
  • c - 關於ip (16進轉10進轉字串)

文章分類

  • Android (1)
  • Interview (1)
  • window系統 (2)
  • ruby (3)
  • linux (2)
  • perl (3)
  • shell (3)
  • web programer (6)
  • c (12)
  • 未分類文章 (1)

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣:

熱門文章

  • (492)bat批次檔
  • (293)c - 關於ip (16進轉10進轉字串)
  • (118)thread of C language
  • (10)Create a welcome cookie

最新留言

    文章精選

    文章搜尋

    動態訂閱