Go install Get link Facebook X Pinterest Email Other Apps - January 19, 2022 Download Goexport PATH=”/usr/local/go/bin:/$PATH”add “Go” VScode extension Get link Facebook X Pinterest Email Other Apps Comments
Go - connect remote SQL server - March 16, 2022 refer from: https://studygolang.com/articles/19117 package sqlsvr import ( "fmt" "database/sql" "strings" "wms.api/model" _ "github.com/denisenkom/go-mssqldb" _ "github.com/mattn/go-adodb" ) type Mssql struct { *sql.DB dataSource string database string windows bool sa SA } type SA struct { user string passwd string } func (m *Mssql) Open() (err error ) { var conf [] string conf = append(conf, "Provider=SQLOLEDB" ) conf = append(conf, "Data Source=" +m.dataSource) if m.windows { // Integrated Security=SSPI :以当前WINDOWS系统用户身去登录SQL SERVER服务器(需要在安装sqlserver时候设置), // 如果SQL SERVER服务器不支持这种方式登录时,就会出错。 conf = ... Read more
Dart - CRUD file in path - October 04, 2020 20201004 import 'dart:io' ; import 'package:flutter/material.dart' ; import 'package:path_provider/path_provider.dart' ; void main () async { WidgetsFlutterBinding. ensureInitialized () ; await getApplicationDocumentsDirectory().then((Directory dir) { File file = File ( ' ${dir. path } /text.txt' ) ; file.writeAsString( '123' ) ; void read() async { String contents = await file.readAsString() ; print(contents) ; } read() ; }) ; } [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: FileSystemException: Cannot open file, path = '//test.txt' (OS Error: Read-only file system, errno = 30) FileSystemException: Cannot open file OS Error: Is a directory reading-writing-files Read more
Comments
Post a Comment