This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (w *HttpBo)Ping(network, address string) error { | |
if transport, ok := w.Client.Transport.(*http2.Transport); !ok { | |
return errors.New("Getting HTTP2 Client Transport failed") | |
} else { | |
ctx, cancel := context.WithCancel(context.Background()) | |
defer cancel() | |
conn, err := tls.Dial(network, address, &tls.Config{NextProtos: []string{http2.NextProtoTLS}}) | |
if err != nil { | |
return err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Pipe creates a synchronous in-memory pipe. | |
// It can be used to connect code expecting an io.Reader | |
// with code expecting an io.Writer. | |
// Reads on one end are matched with writes on the other, | |
// copying data directly between the two; there is no internal buffering. | |
// It is safe to call Read and Write in parallel with each other or with | |
// Close. Close will complete once pending I/O is done. Parallel calls to | |
// Read, and parallel calls to Write, are also safe: | |
// the individual calls will be gated sequentially. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Excel = Microsoft.Office.Interop.Excel; | |
namespace LecturePractice | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using MySql.Data.MySqlClient; | |
namespace LecturePractice | |
{ |