網頁設計下載檔案安裝
1. 先到NVIDIA下載驅動程式NVIDIA-Linux-x86_64-470.239.06.run
CentOS 8 下安裝NVIDIA RTX 3070 驅動 

CentOS 8 下安裝NVIDIA RTX 3070 驅動

文章標籤

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

網頁設計jQuery分類過濾和排序結構插件-Isotope,jquery-isotope
Isotope是一款結果異常神奇的元素分類過濾和排序佈局jQuery插件。網頁設計Isotope是Masonry佈局的作者David DeSandro的一款力作,該分類過濾和排序插件允許你以非常簡單和炫酷的體例來埋沒和顯示元素,和對元素依照指定的法則進行排序。
Isotope可以設置多種結構方式:masonry佈局、水平結構、垂直結構、合適行結構、合適列結構等等。

注意:Isotope不是完全免費的軟件。用於商業用處時需要向作者購置。作為非貿易用處利用時,在遵循GPL v3 License 規範的前提下,你可以自由使用該插件。
文章標籤

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

下載安裝請看此篇


本篇文在申明如何讓 Arduino IDE 可使用 ESP32 開辟板。

我手上今朝的這兩塊 ESP32 開辟板,都同時具有 WiFi 和藍芽功能,個人感覺大塊的這片(ESP32 Wemos D1) 比較好用,因為它可以合用 Arduino UNO 擴大板。


在 Arduino IDE 上面安裝 ESP32 網頁設計 

在 Arduino IDE 上面安裝 ESP32 網頁設計

在 Arduino IDE 上面安裝 ESP32 網頁設計

文章標籤

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

記實一下批量抓取 Google 搜尋後果裡的貫穿連接的方法。


若是還沒有安裝以下,要先下載安裝:
 

網頁設計
  1. pip install beautifulsoup4
  2. pip install google
文章標籤

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

從2020年5月起頭
Google SEO增添了加強功能
從以下網址可知增加了那些功能
https://developers.google.com/search/docs/advanced/structured-data/search-gallery


SEO寫好以後,到以下網址測試是不是完成
https://search.google.com/test/rich-results?utm_campaign=devsite&utm_medium=jsonld&utm_source=article


測試網址
http://www.netyea.com/
SEO 網頁優化 若何用 Google Search ConSEO 網頁優化 若何用 Google Search Con

點選預覽就能夠看到下面圖片
SEO 網頁優化 若何用 Google Search Con

SEO 網頁優化 若何用 Google Search Con


網頁設計,網站架設 ,網路行銷,網頁優化,SEO - NetYea 網頁設計

文章標籤

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

網頁設計
  1. #查抄是不是安裝lm_sensors
  2. rpm -qa|grep lm_sensors
  3.  
  4. #安裝
  5. yum install *lm_sensors*
  6.  
  7. #設置裝備擺設lm_sensors 所有提醒均輸入yes
  8. sensors-detect
  9.  
  10. #使用lm_sensors
  11. sensors #查温度
  12. watch -n 1 -d sensors #每秒刷新
  13.  
複製代碼
文章標籤

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

Python 使用 MySQL Connector 操作 M

介紹若何利用 Python 的 MySQL Connector 模組毗連 MySQL/MariaDB 資料庫,進行查詢、新增或刪除等各類操作。



Python 有很多 MySQL/MariaDB 資料庫相關的模組,而最常被利用的就是 MySQL Connector 與 MySQLdb 這兩個模組,以下是 MySQL Connector 模組的利用方式。
安裝 MySQL Connector 模組
開啟 Windows 中的饬令提醒自元,使用 pip 安裝 Python 的 MySQL Connector 模組:

 

文章標籤

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

測試後果(夜神慢 雷電9)
文章標籤

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

OpenVino概念
openvino 若何run demo applicatioopenvino 若何run demo applicatio

圖改自https://www.learnopencv.com/using-openvino-with-opencv/#openvino-opencv
將已練習好的深度學習model顛末Model Optimizer優化後
(何謂優化請見下面Model Optimizer條目)
經由Inference Engine  跟 硬體(CPU/ GPU /VPU)
達到加快Inference 的目的

★ Model Optimizer
      ●摘錄自:【AI_Column】運用 Intel OpenVINO 土炮自駕車視覺系統
       協助去除已練習好的模子中的冗餘參數,並可將 32bits 浮點數的參數降階,
      以犧牲數個百分點准確率來換取推論速度提升數十倍到百倍。

   ●把深度進修框架Train出來的model, 轉換成 Inference Engine 可以用的IR file
       今朝支援的深度進修框架有 Caffe*, TensorFlow*, MXNet*, and ONNX*.
     ●之前以為所有由Caffe*, TensorFlow*, MXNet*, and ONNX* 訓練出的model
     都可以由Model Optimizer轉換成IR file  ,但看了 的Supported Models章節
     好像不是這麼一回事,需找一個底下沒提到的model來實行看看
     有成績我再更新
      Supported Models
        For the list of supported models refer to the framework or format specific page:
•        Supported Caffe* models
•        Supported TensorFlow* models
•        Supported MXNet* models
•        Supported ONNX* models
•        Supported Kaldi* models
   ●有script可以 configure Model Optimizer  以導入
     所有OpenVino supported的深度進修框架或單一深度學習框架
       若要手動configure Model Optimizer也有文件可以參考 ->  Model Optimizer Developer Guide.

★ IR file
   包括train model的topology 跟weight,利用者只要知道如何將
   練習好的model change to IR file,就可以利用OpenVino加快Inference

★ Inference Engine
   用來run 最好化後的深度學習model
   C:\Program Files (x86)\Intel\openvino_2021.4.689\
   deployment_tools\inference_engine\samples底下有放一些IE的samples   
   各Samples申明  
   延伸浏覽 → 若何run Inference Engine Samples
★ VPU plugin
    這份文件彷佛在講如何的model能被vpu 支援
■OpenVino不供應Model Training
   OpenVino的model起原以我的理解就以下這幾種
   1.本身用OpenVino supported的深度學習框架去train  model
      或去Model Zoo下載所需model
1.        Caffe [ Model Zoo ]
2.        Tensorflow [ Model Zoo ]
3.        MxNet [ Model zoo ] 貫穿連接失效
4.        Open Neural Network Exchange (ONNX) [ Model zoo ]
   2.OpenVino裡面附的pre-trained model  
      不外紛歧定有相符你需求的
   3.OpenCV DNN sample model
■相關名詞
★ OpenVino用的是CNN( Convolutional Neural Networks )模型 ;
   還包括了Deep Learning Deployment Toolkit (Intel® DLDT).
    openvino 若何run demo applicatioopenvino 若何run demo applicatio
      Convolution:影像->filter->擷掏出特徵,好比邊緣。
      此種過程叫做Convolution
★ OpenCV和OpenVX有什么联系和区别?
★ 機械進修
   機器學習理論主要是設計和闡明一些讓電腦可以主動進修的演算法。
    機械進修演算法是一類從資猜中主動分析取得紀律,並使用紀律對未知資料進行展望的演算法。
★ 深度進修
   是機械進修的分支。 深度進修框架比力
■若何安裝OpenVino
照著 安裝步調做即可 (英文看不懂請自行克服)
-------------------------------------------------------------------------------------------------------------------------------
上述的工具都認識之後,接下來開始DEMO OpenVino附的兩個script
■Run the Image Classification Verification Script
   ★在C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo下
   可以找到demo_squeezenet_download_convert_run.bat。
   這個demo使用squeezenet model 判斷照片中的Object屬於什麼種別
   可判定的類別有一千種,有哪一千種可以看底下這個檔案
   C:\Program Files (x86)\Intel\openvino_2021.4.689\
   deployment_tools\demo\squeezenet1.1.labels
   *路徑中的openvino_2019.1.148的2019.1.148這數字代表版本, 是以若安裝的OpenVino版本跟我分歧,那數字也會不同
   *若安裝不只一個版本的OpenVino,分歧版本的OpenVino會有屬於本身的資料夾
   而openvino誰人捷徑會指向最後安裝的阿誰版本
openvino 若何run demo applicatio    openvino 若何run demo applicatio
★這個batch的內容以下
   Step1 :  下載SqueezeNet model (利用downloader.py)
   Step2: 用 Model Optimizer 把SqueezeNet轉成IR file。
                (利用mo.py)
   Step3: Build Inference Engine samples
                batch檔執行過程中, 會看到cmd 畫面卡在
                Build Inference Engine samples using MS Visual Studio (MSBuild.exe)一段時間
                請耐煩等待 。此步會產生 classification_sample.exe
   Step4: 把car.png & IR file當作iInference Engine的input 來闡明car.png
   ↓This is car.png
    openvino 若何run demo applicatio
openvino 若何run demo applicatio
   ↓針對照片中的Object,分類前十名的了局依序從Prob.高到低分列
   分類了局最高分數是sport car
openvino 若何run demo applicatio
   openvino 若何run demo applicatio
★重跑demo_squeezenet_download_convert_run.bat
   跑過一次batch以後,若再履行一次batch,
   因為某些檔案跑過一次batch以後就已經存在了
   batch裡的寫法偵測到某些檔案存在以後就會疏忽掉某些Step
   若想要完整地再跑一次,需刪除以下檔案
   ●刪除model
   C:\Users\$(username)\Documents\Intel\OpenVINO\openvino_models
    \models\FP32\classification
   底下全部squeezenet 資料夾刪掉
   注意:FP32是針對CPU device的,若是VPU devide ,對應到的folder name是FP16

   ●刪除 IR       
   C:\Users\$(username)\Documents\Intel\OpenVINO\openvino_models\ir\FP32
    \classification\squeezenet\1.1\ 底下全部caffe 資料夾刪掉
   注意:FP32是針對CPU device的,若是VPU devide ,對應到的folder name是FP16
------------------------------------------------------------------------------------------------
■Run the Inference Pipeline Verification Script
★demo_security_barrier_camera.bat 這個batch的內容以下
Step1 : 下載 three pre-trained models IRs
Step2:build Security Barrier Camera Demo Inference Engine來分析car1.bmp
Step3: 圖片裡的object會被第一個model判定成是車輛,
              這個判定了局被看成input 導入到下一個model,
              這個model可以指出車輛的一些屬性 ex:車牌
              最後 車牌被看成input導入到第三個model,這個model可以把車牌的字元辨認出
              會被稱做Pipeline 我想應當是辨認了局從第一個model傳到第三個model
             像水流在管線裡流動一樣吧...

        
★重跑全部bat
  跑過一次batch以後,有些step會被疏忽掉,因為某些檔案已存在了
  若要乾乾淨淨的再跑一次,需要刪除以下檔案
  ●刪除 IR      
  C:\Users\$(username)\Documents\Intel\OpenVINO\openvino_models\
  ir\FP32\classification\squeezenet\1.1\
  底下整個caffe 資料夾刪掉

----------------------------------------------------------------------------------------------------------
以上範例是利用openvino在 CPU
若用其他intel 硬體, 好比movidius gpu vpu  FPGA or MYRIAD
請參考安裝文件中 Optional Steps這部分
-----------------------------------------------------------------------------------------------------------
■OpenVino PreTrained Model
★OpenVINO供給好幾個pre-trained models
可以用Model Downloader 或到
https://download.01.org/opencv/2019/open_model_zoo/ 去下載
下載的model是被優化過的model,稱作IR file( xml 檔+ bin 檔)

★可在這邊 https://docs.openvinotoolkit.org/latest/_demos_README.html
Demos that Support Pre-Trained Models章節
看各個pre-trained model support哪些Device
Object Detection Models
裡面包括好幾個model可以用來偵測object
包括:人臉,人,車輛
Object Recognition Models
用來分類或特徵辨識,使用在其他detector之後。好比先做人臉偵測,再做年齒/性別辨識

Semantic Segmentation Models
原文網址:https://kknews.cc/zh-tw/tech/mgqvl9.html
語義朋分(Semantic Segmentation)的目標是給定一張圖片,對於圖片中的每個像素做分類。
例如圖1(a)中給出的原始輸入圖片,語義朋分算法對圖片中的每個像素分類,
得到如圖1(b)的成果。在圖1(b)中,分歧色彩代表分歧類別:
如紅色代表行人,藍色代表汽車,綠色代表樹,灰色代表建築物等。
語義分割問題在良多利用場景中都有著十分重要的作用(例如圖片理解,主動駕駛等)
openvino 若何run demo applicatio
openvino 若何run demo applicatio

Instance Segmentation Models
INSTANCE SEGMENTATION可以知道同類object的數量(分歧顏色示意)
https://arxiv.org/pdf/1405.0312.pdf
openvino 若何run demo applicatio openvino 若何run demo applicatioopenvino 若何run demo applicatio
openvino 若何run demo applicatio
Human Pose Estimation Models
Image Processing
提高影象品質
openvino 若何run demo applicatioopenvino 若何run demo applicatio

Text Detection
Action Recognition Models
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
■Trouble Shooting
● 安裝時碰到CMake*/ Python* version  xxx or higher is not detected.
openvino 若何run demo applicatio網頁設計       openvino 若何run demo applicatio

      ->Fixed by 安裝如提醒的CMake & Python版本後
      再重安裝一次OpenVino
● 電腦已有安裝Python3.6.5了
      照舊會出現Python* version  xxx or higher is not detected.
      ->Fixed by 再安裝一次Python >選Modify  >勾選Add Python.....
      ->再安裝一次OpenVino就能夠了
openvino 若何run demo applicatio
      openvino 若何run demo applicatio

● 履行demo_squeezenet_download_convert_run.bat前
      若沒有安裝cmake 會呈現以下Error
       'cmake' is not recognized as an internal or external command,
       operable program or batch file.
       ->Fixed by 安裝cmake
       請參考 Install CMake* 3.4 or higher章節
  ● 履行demo_squeezenet_download_convert_run.bat産生以下Err
      target_precision = FP32
      Python 3.6.6
      ECHO is off.
      PYTHONPATH=C:\Program Files (x86)\IntelSWTools\openvino\python\python3.6;
      [setupvars.bat] OpenVINO environment initialized
      INTEL_OPENVINO_DIR is set to C:\Program Files (x86)\IntelSWTools\openvino
      Python 3.6.6
      ECHO is off.
      Collecting pyyaml
      Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by       'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required (         Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )',))':                 /simple/pyyaml/
       ...
      Could not find a version that satisfies the requirement pyyaml (from versions: )
      No matching distribution found for pyyaml
      ->Fixed by 更改proxy設定
      憑據Cannot connect to proxy這個訊息判定應該是proxy問題
      本來我是使用公司內網run script
      後來將proxy調劑成以下設定&連手機熱點就能夠執行了  
       openvino 若何run demo applicatioopenvino 若何run demo applicatio
  ● 出現以下Error
     ###############|| Generate VS solution for Inference Engine samples using cmake ||###############

     Waiting for 2 seconds, press a key to continue ...
     Creating Visual Studio 15 2017 x64 files in      
     C:\Users\$(userName)\Documents\Intel\OpenVINO\inference_engine_samples_build...
     CMake Error at CMakeLists.txt:7 (project):
     Generator
     Visual Studio 15 2017
     could not find any instance of Visual Studio.
     -- Configuring incomplete, errors occurred!
     ->fixed by reboot
    因為在安裝openvino之前我有開visual studio installer去 modify設定
    設定完後沒有按照指導重開機
    因此泛起以上issue
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
●其它參考貫穿連接
  - OPENvINO with openCV
  - 既跨平台又開源 英特爾開啟聰明視覺立異
    跨越20個預先訓練的模子,以及針對OpenCV和OpenVx的最好化電腦視覺庫。
    OpenVINO對象套件可透過CPU、GPU、FPGA、Movidius VPU(AI晶片 )等硬體進行擺設,
    加強視覺系統功能和機能
-   SqueezeNet
     SqueezeNet 是圖片分類模子,最合適參數較少及較小的模型利用,相較於現代圖片分類模型 (AlexNet),
     不會犧牲品質。
-   C:\Program Files (x86)\Intel\openvino_2021.4.689\documentation

 

文章標籤

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

申明:在Linux下把excel數據導入到mysql數據庫中,這實在是很搞笑的一個舉動!幾近很少有法式員研究過這個問題吧?如斯失常的問題,估計我是第一個研究的!呵呵,完滿是自找苦吃~~,然則今天完了這項太有挑戰性的工作!
先清算一下思緒先,~~
起首:需要把文件上傳到辦事器上
然後:讀取excel數據列顯示出來
然後:讓用戶選擇字段的對應關係
然後:提交數據,讀取字段的對應關係
最後:批量導入數據,刪除暫時文件
一共是以上五步驟!我們一步步分析~~~
第一步:下載附件中的phpexcelparser4.rar ,這個文件是上傳excel盜服務器上並以web形式展現出來的!這個一般沒有問題的!問題是程序的做法是把表存為臨時表而沒有真正保存下來,所以起首要更改法式代碼為
網頁設計

 

  1.  
  2. //uc轉換成html
  3. function uc2html($str) {
  4.    $ret = '';
  5.    for( $i=0; $i<strlen($str)/2; $i++ ) {
  6.        $charcode = ord($str[$i*2])+256*ord($str[$i*2+1]);
  7.        // $ret .= '&#'.$charcode;
  8.        if($charcode<127)
  9.          $ret .=chr($charcode);
  10.        else
  11.            $ret .= iconv("utf-8","utf-8",u2utf8($charcode));
  12.    }
  13.        return $ret;
  14. }
  15. //html轉成utf8
  16. function u2utf8($c) {
  17. $str="";
  18. if ($c < 0x80) {
  19.   $str.=$c;
  20. } else if ($c < 0x800) {
  21.   $str.=chr(0xC0 | $c>>6);
  22.   $str.=chr(0x80 | $c & 0x3F);
  23. } else if ($c < 0x10000) {
  24.   $str.=chr(0xE0 | $c>>12);
  25.   $str.=chr(0x80 | $c>>6 & 0x3F);
  26.   $str.=chr(0x80 | $c & 0x3F);
  27. } else if ($c < 0x200000) {
  28.   $str.=chr(0xF0 | $c>>18);
  29.   $str.=chr(0x80 | $c>>12 & 0x3F);
  30.   $str.=chr(0x80 | $c>>6 & 0x3F);
  31.   $str.=chr(0x80 | $c & 0x3F);
  32. }
  33. return $str;
  34. }
  35.  
  36. if (trim($_POST["cmd"])=="upload")
  37. {
  38. $err_corr = "Unsupported format or file corrupted";
  39. $excel_file_size;
  40. $excel_file = $_FILES['excel_file'];
  41. $uploadservername=$UploadAbsPath."tmpexcel/".$_FILES['excel_file']['name'];
  42. echo($uploadservername);
  43.      if (!is_writeable($UploadAbsPath."tmpexcel/"))
  44.      {
  45.      echo "目錄不行寫!"; exit;
  46.      }
  47.      else
  48.      {
  49.      echo "目次可寫!";
  50.      }
  51. if (move_uploaded_file($_FILES['excel_file']['tmp_name'], $uploadservername))
  52. {
  53.     echo("上傳成功");
  54. }
  55. else
  56. {
  57.     echo("上傳失敗");
  58. }
  59. $excel_file=$uploadservername;
  60. //if( $excel_file )
  61. //    $excel_file = $_FILES['excel_file']['tmp_name'];
  62.  
  63.  
  64. if( $excel_file == '' ) fatal("No file uploaded");
  65.  
  66.  
  67. $exc = new ExcelFileParser("debug.log", ABC_NO_LOG);//ABC_NO_LOG ABC_VAR_DUMP);
  68.     //echo($excel_file."|");
  69.    
  70. $style = $_POST['style'];
  71. if( $style == 'old' )
  72. {
  73.     $fh = @fopen ($excel_file,'rb');
  74.     if( !$fh ) fatal("No file uploaded");
  75.     if( filesize($excel_file)==0 ) fatal("No file uploaded");
  76.     $fc = fread( $fh, filesize($excel_file) );
  77.     @fclose($fh);
  78.     if( strlen($fc) < filesize($excel_file) )網頁設計
  79.     fatal("Cannot read file");
  80.    
  81.     $time_start = getmicrotime();
  82.     $res = $exc->ParseFromString($fc);
  83.     $time_end = getmicrotime();
  84. }
  85. elseif( $style == 'segment' )
  86. {
  87.     $time_start = getmicrotime();
  88.     $res = $exc->ParseFromFile($excel_file);
  89.     $time_end = getmicrotime();
  90. }
  91.  
  92.  
  93. switch ($res) {
  94.     case 0: break;
  95.     case 1: fatal("Can't open file");
  96.     case 2: fatal("File too small to be an Excel file");
  97.     case 3: fatal("Error reading file header");
  98.     case 4: fatal("Error reading file");
  99.     case 5: fatal("This is not an Excel file or file stored in Excel < 5.0");
  100.     case 6: fatal("File corrupted");
  101.     case 7: fatal("No Excel data found in file");
  102.     case 8: fatal("Unsupported file version");
  103.  
  104.  
  105.     default:
  106.     fatal("Unknown error");
  107. }
  108.  
  109.  
  110. /*
  111. print '<pre>';
  112. print_r( $exc );
  113. print '</pre>';
  114. exit;
  115. */
  116.  
  117.  
  118. show_time();
  119.  
  120.  
  121. echo <<<LEG
  122. <b>Legend:</b><br><br>
  123. <form name='doform' action='' method='post'>
  124. <input type='hidden' name='action' value='do'>
  125. <input type='hidden' name='excel_file' value=$excel_file>
  126. <input type='hidden' name='style' value=$style>
  127. <table border=1 cellspacing=0 cellpadding=0>
  128. <tr><td>Data type</td><td>Description</td></tr>
  129. <tr><td class=empty>&nbsp;</td><td class=index>An empty cell</td></tr>
  130. <tr><td class=dt_string>ABCabc</td><td class=index>String</td></tr>
  131. <tr><td class=dt_int>12345</td><td class=index>Integer</td></tr>
  132. <tr><td class=dt_float>123.45</td><td class=index>Float</td></tr>
  133. <tr><td class=dt_date>123.45</td><td class=index>Date</td></tr>
  134. <table>
  135. <br><br>
  136.  
  137.  
  138. LEG;
  139. /*
  140. print "<pre>";
  141. print_r ($exc->worksheet);
  142. print_r($exc->sst);
  143. print "</pre>";
  144. */
  145.     for( $ws_num=0; $ws_num<count($exc->worksheet['name']); $ws_num++ )
  146.     {
  147.     print "<b>Worksheet: \"";
  148.     if( $exc->worksheet['unicode'][$ws_num] ) {
  149.     print uc2html($exc->worksheet['name'][$ws_num]);
  150.     } else
  151.     print $exc->worksheet['name'][$ws_num];
  152.  
  153.  
  154.     print "\"</b>";
  155.     $ws = $exc->worksheet['data'][$ws_num];
  156.  
  157.  
  158.     if( is_array($ws) &&
  159.          isset($ws['max_row']) && isset($ws['max_col']) ) {
  160.      echo "\n<br><br><table border=1 cellspacing=0 cellpadding=2>\n";
  161.  
  162.  
  163.      print "<tr><td>&nbsp;</td>\n";
  164.      for( $j=0; $j<=$ws['max_col']; $j++ ) {
  165.     print "<td class=index>&nbsp;";
  166.     if( $j>25 ) print chr((int)($j/26)+64);
  167.     //這裡要顯示一個下拉列表來顯示數據
  168.     //注意是循環數據<br />
  169.     echo("\n<select name='".$j."'>");
  170.     echo("\n<option value='0'>不選擇</option>");
  171.    echo("\n<option value='costomernum'>客戶編號</option>");
  172.    echo("\n<option value='name'>客戶姓名</option>");
  173.    echo("\n<option value='phone1'>德律風1</option>");
  174.    echo("\n<option value='phone2'>德律風2</option>");
  175.    echo("\n<option value='address1'>地址1</option>");
  176.    echo("\n<option value='address2'>地址2</option>");  
  177.    echo("\n<option value='company'>公司</option>");
  178.    echo("\n<option value='levelc'>職稱</option>");   
  179.    echo("\n<option value='ps'>備註</option>");
  180.    
  181.     echo("</select>");
  182.     print "</td>";
  183.      }
  184.  
  185.  
  186.      print "<tr><td>&nbsp;</td>\n";
  187.      for( $j=0; $j<=$ws['max_col']; $j++ ) {
  188.     print "<td class=index>&nbsp;";
  189.     if( $j>25 ) print chr((int)($j/26)+64);
  190.     print chr(($j % 26) + 65)."&nbsp;列名</td>";
  191.      }
  192.  
  193.  
  194.  
  195. //表頭輸出終了
  196.     if ($ws['max_row']>9)
  197.     {
  198.     $shownum=9;
  199.     }
  200.     else
  201.     {
  202.     $shownum=$ws['max_row'];//只輸出前10條數據
  203.     }
  204.      for( $i=0; $i<=$shownum; $i++ ) {
  205.      print "<tr><td class=index>".($i+1)."</td>\n";
  206.      if(isset($ws['cell'][$i]) && is_array($ws['cell'][$i]) ) {
  207.          for( $j=0; $j<=$ws['max_col']; $j++ ) {
  208.  
  209.  
  210.     if( ( is_array($ws['cell'][$i]) ) &&
  211.          ( isset($ws['cell'][$i][$j]) )
  212.          ){
  213.  
  214.  
  215.      // print cell data
  216.      print "<td class=\"";
  217.      $data = $ws['cell'][$i][$j];
  218.  
  219.  
  220.      $font = $ws['cell'][$i][$j]['font'];
  221.      $style = " style ='".ExcelFont::ExcelToCSS($exc->fonts[$font])."'";
  222.  
  223.  
  224.          switch ($data['type']) {
  225.     // string
  226.     case 0:
  227.         print "dt_string\"".$style.">";
  228.         $ind = $data['data'];
  229.         if( $exc->sst['unicode'][$ind] ) {
  230.         $s = uc2html($exc->sst['data'][$ind]);
  231.         } else
  232.         $s = $exc->sst['data'][$ind];
  233.         if( strlen(trim($s))==0 )
  234.         print "&nbsp;";
  235.         else
  236.         print $s;
  237.         break;
  238.     // integer number
  239.     case 1:
  240.         print "dt_int\"".$style.">&nbsp;";
  241.         print $data['data'];
  242.         break;
  243.     // float number
  244.     case 2:
  245.         print "dt_float\"".$style.">&nbsp;";
  246.         echo $data['data'];
  247.         break;
  248.     // date
  249.     case 3:
  250.         print "dt_date\"".$style.">&nbsp;";
  251.  
  252.  
  253.         $ret = $data[data];//str_replace ( " 00:00:00", "", gmdate("d-m-Y H:i:s",$exc->xls2tstamp($data[data])) );
  254.         echo ( $ret );
  255.         break;
  256.     default:
  257.         print "dt_unknown\"".$style."> &nbsp;";
  258.         break;
  259.          }
  260.      print "</td>\n";
  261.     } else {
  262.         print "<td class=empty>&nbsp;</td>\n";
  263.     }
  264.          }
  265.      } else {
  266.     // print an empty row
  267.     for( $j=0; $j<=$ws['max_col']; $j++ )
  268.         print "<td class=empty>&nbsp;</td>";
  269.     print "\n";
  270.      }
  271.      print "</tr>\n";
  272.      }
  273.  
  274.  
  275.      echo "</table><br>\n";
  276.     } else {
  277.     // emtpty worksheet
  278.     print "<b> - empty</b><br>\n";
  279.     }
  280.     print "<br>";
  281.  
  282.  
  283.     }
  284.     echo("<input type='submit' name='Submit' value='轉換' />");
  285.     echo("</form>");
  286. /*    print "Formats<br>";
  287.     foreach($exc->format as $value) {
  288.     printf("( %x )",array_search($value,$exc->format));
  289.     print htmlentities($value,ENT_QUOTES);
  290.     print "<br>";
  291.     }
  292.  
  293.  
  294.      print "XFs<br>";
  295.     for( $i=0;$i<count($exc->xf['format']);$i++) {
  296.     printf ("(%x)",$i);
  297.     printf (" format (%x) font (%x)",$exc->xf['format'][$i],$exc->xf['font'][$i]);
  298.  
  299.  
  300.     print "<br>";
  301.     }
  302. */
  303. }
文章標籤

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