[VB]將文字寫入或讀出文字檔案(VB .NET)

參考網址:程式設計者之春

以下程式碼範例示範將文字寫入文字檔案的簡易方法。

Imports System
Imports System.IO

Class Test
    Public Shared Sub Main()
        ' Create an instance of StreamWriter to write text to a file. 
        Dim sw As StreamWriter = New StreamWriter("TestFile.txt")
        ' Add some text to the file.
        sw.Write("This is the ")
        sw.WriteLine("header for the file.")
        sw.WriteLine("-------------------")
        ' Arbitrary objects can also be written to the file.
        sw.Write("The date is: ")
        sw.WriteLine(DateTime.Now)
        sw.Close()
    End Sub
End Class

 

以下程式碼範例示範從文字檔案讀取文字的簡易方法。

Imports System
Imports System.IO

Class Test
    Public Shared Sub Main()
        Try
            ' Create an instance of StreamReader to read from a file.
            Dim sr As StreamReader = New StreamReader("TestFile.txt")
            Dim line As String
            ' Read and display the lines from the file until the end 
            ' of the file is reached.
            Do
                line = sr.ReadLine()
                Console.WriteLine(Line)
            Loop Until line Is Nothing
            sr.Close()
        Catch E As Exception
            ' Let the user know what went wrong.
            Console.WriteLine("The file could not be read:")
            Console.WriteLine(E.Message)
        End Try
    End Sub
End Class

 

發表於 程式設計 | 發表迴響

[sport]翔聆資訊有限公司

參考網址:http://www.shulink.com.tw/

發表於 程式設計 | 發表迴響

雙敗淘汰圖形產生器

參考網址:http://ren1244.pixnet.net/blog/post/313772779-%e9%9b%99%e6%95%97%e6%b7%98%e6%b1%b0%e5%9c%96%e5%bd%a2%e7%94%a2%e7%94%9f%e5%99%a8

※ 儲存的SVG圖檔可以直接給 LibreOffice 使用,MS Office 則要 2016 版之後才支援 SVG 圖片格式。

發表於 程式設計 | 發表迴響

[sport]混合運動計分表

參考網址:http://www.sport.mlc.edu.tw/docs/multievents/

搜尋關鍵字combined events scoring tables
http://www.sport.mlc.edu.tw/docs/multievents/combinedEventsScoring.htm
http://www.sport.mlc.edu.tw/docs/multievents/
http://www.sport.mlc.edu.tw/docs/multievents/functions.js

 

IAAF Scoring Tables for Combined Events Tables de Cotation …

USA Track & Field

http://legacy.usatf.org/statistics/calculators/combinedEventsScoring/

 

發表於 程式設計 | 發表迴響

[firefox] standlone install 離線安裝版下載

Download Mozilla Firefox Full Standalone Offline Installers

 

chrome

https://www.google.com/chrome/?system=true&standalone=1&platform=win64

 

edge
https://www.microsoft.com/en-us/edge/business/download

發表於 軟體使用 | 發表迴響

Uniserver zero install

參考網址:
vcruntime.dll

ZeroXIV – 14.0.1 需新版vcruntime.dll 14.24.28127.4

 

發表於 Windows系統, 軟體使用 | 發表迴響

[php]php測試執行時間

參考網址:S小學生

<?php
/**
 * 測試php執行時間
 */
function microtime_float()
{
    list($usec, $sec) = explode(" ", microtime());
    return ((float)$usec + (float)$sec);
}

$time_start = microtime_float();

//休息一下或程式碼放這裡
usleep(100);

$time_end = microtime_float();
$time = $time_end - $time_start;


echo "執行時間".$time.'秒<br />';

 

發表於 程式設計 | 發表迴響

筆電教學-ACER Win10 筆電,如何進BIOS;如何設定FN鍵;

參考網址: 藤小二 https://www.youtube.com/watch?v=U4OGPtKBAF4

完整關機 shift+關機

進入BIOS Fn+F2 按著 再按電源鍵

修改function key behavior 模式
media模式:F1..F12
function模式 : Fn+F1..F12

還原進入鍵
Fn + Alt + F10 + 電源鍵

發表於 硬體維修 | 發表迴響

[excel]去除括號及括號內的文字

參考網址:如何刪除Excel中的括號/括號內的文本?

要刪除括號內的文字,可以找出它們,然後將它們替換為空白。

1。 按 Ctrl + H 鍵來啟用 查找和替換 對話框中 查找內容 文本框,輸入 (*) 進入它,然後去 更換 文本框,輸入 () 進去。 看截圖:

2。 然後點擊 “全部替換”。 然後會彈出一個對話框提醒您更換次數。 點擊 OK 關閉它。

 

相關函數
儲存格C2:=LEFT(B2,FIND("(",B2)-1)

發表於 軟體使用 | 發表迴響

[scratch]夾娃娃機

參考網址:進學國小

https://scratch.mit.edu/projects/229134627/

發表於 程式設計 | 發表迴響