2014年6月6日 星期五

網路知識

DHCP:
  統一管理IP網路作業參數,動態發配IP位址給區域網路上的主機.

2014年6月5日 星期四

格鬥天王 13 招式

各角色招式表:

http://karasless.pixnet.net/blog/post/34286497-kof13%EF%BC%9A%E8%A7%92%E8%89%B2%E6%8B%9B%E5%BC%8F%E8%A1%A8%E7%B8%BD%E9%9B%86

火八神:
  八稚女+豺華
   我是kof xiii的玩家 ,請問八稚女 + 豺華 要怎麼用搖桿按出來呢?

1p位置:23663214a or c 在八稚女快結束時236x4+ac.成功時會在收尾爆炸時追加
是 八稚女最後要撞頭的瞬間 加 ac嗎?
事前需要bc 爆氣嗎?

不用爆氣 這算是招式追加 爆炸開始後過一點點都還來得及。 稍為練習一下就知道了
ok 謝謝 讚
另外單放豺華之後 可以取消 接 一般必殺技吧?

HTML 與 PHP

下載連結:
    <a href=upload/".$row['link']." download>

2014年6月3日 星期二

Javascript 與 PHP

A.javascript轉頁post呼叫php:

HTML:
 <form action='".$PHP_SELF."' method='post'>
 <input type='hidden' name='filelink' id='filelink' value='say it' >
 <input type='submit' name='parse' value='Parsing' >
</form>
PHP:
  echo("alert('".$_REQUEST["filelink"]."');");
      (一定要加上 ' 符號);

   變數宣告-  echo("var filelink = '".$_REQUEST["filelink"]."';");


B.PHP呼叫帶參數javascript function:
   echo ("<td><input type='button' name='delete' value='delete'            onclick=\"senddelete('".$row['id']."','".$row['link']."')\" > </td>");



C.上傳檔案名稱重複的重新命名:
      $splitname = explode(".", $_FILES['file']['name']);
      $name = $splitname[0];
      $extension = $splitname[1];

      $increment = 1; //start with no suffix
           
      while(file_exists("upload/".$name .'('.$increment . ').' . $extension)) {
         $increment++;
     
      }

      $newfilename = $name .'('.$increment . ').' . $extension;

D.onclick 呼叫 php

  <input id="do" class="button1" type="button" name="bu2"  size="3" onclick="callPHP()" value="getcon2" >


 function callPHP() {
      $.ajax({
           type: "POST",
           url: 'components/com_foxbmi/callurl.php',
           data:{action:'call_this'},
           success:function(html) {
             alert(html);
           }

      });
 }


E.使用PHP做post與get html source:

  <?php
$postdata = http_build_query(
    array(
        'id' => '0123456789',
        'mac' => '112233445566',
        'date' => '2014/10/10 11:11:11',
   
    )
);

$opts = array('http' =>
    array(
        'method'  => 'POST',
        'header'  => 'Content-type: application/x-www-form-urlencoded',
        'content' => $postdata
    )
);

$context  = stream_context_create($opts);

$result = file_get_contents('http://120.126.40.58:8080/FoxLink/UpLoad/RRUpLoad', false, $context);

     echo $result;
   
     /*
    $url = 'http://120.126.40.58:8080/FoxLink/UpLoad/RRUpLoad';
    echo file_get_contents($url);
    */
   
?>

2014年6月2日 星期一

Ubuntu Mysql 用法

登入:mysql -u <username> -p

查詢DB:show databases;

使用DB:USE <dbname>;

顯示所有表格:show tables;

查詢Table型態:DESCRIBE test;

Create範例:CREATE TABLE HRFileRecord ( id INT PRIMARY KEY AUTO_INCREMENT,dateinfo TIMESTAMP DEFAULT CURRENT_TIMESTAMP, des VARCHAR(200) , link VARCHAR(200) )  CHARACTER SET = utf8 ;

Insert範例:insert into HRFileRecord (des , link) values ('hello','get this');




2014年5月28日 星期三

改變造型

http://vvn888888.pixnet.net/blog

A.客製化附圖 submit按鈕
<input type="image" src="images\upload_2.png" alt="Submit Form" />


B.客製化附圖 file(upload)按鈕
(image size:168x33)
CSS:
 .choose_file{
    position:relative;
    display:inline-block;    
 /*border-radius:8px;*/
    border:#ebebeb solid 1px;
    width:168px; 
    height:33px;
    /*padding: 4px 6px 4px 8px;*/
    font: normal 14px Myriad Pro, Verdana, Geneva, sans-serif;
    color: #7f7f7f;
    /*margin-top: 2px;*/
    background-image: url(images/select.png);
  /* background:'url(images\select.png)'; */
}
.choose_file input[type="file"]{
    -webkit-appearance:none; 
    position:absolute;
    top:0; left:0;
    opacity:0; 

}

HTML:
      <div class="choose_file">
        <!-- <span>Choose File</span> -->
        <input name="Select File" type="file" />

    </div>

A,B的整合 Upload檔案(php):
<form action="custom\upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file2">Filename:</label>

<div class="choose_file">
  <input type="file" name="file" id="file"/>
</div>  
<input type="image" src="images\upload_2.png"  name="submit" value="Submit" alt="Submit Form" />


</form>  




C.得到file upload的名字:
JS:
   function alertFilename()
            {
                var thefile = document.getElementById('file');
                alert(thefile.value);

            }
HTML:
 <input type="file" name="file" id="file" onchange="alertFilename()" />