HI GUYS ,
if pymongo.version >= "3.2.2":
mongos_conn = pymongo.MongoClient(host, port)
else:
mongos_conn = pymongo.Connection(host, port)
chunks_count= mongos_conn.config.chunks.count()#rs.conf()
shards_count= mongos_conn.config.shards.count()#rs.conf()
sharded
OS UBUNTU 12.04 32 bit
GOLANG 1.9
On Monday, August 28, 2017 at 11:55:02 AM UTC+5:30, Vijay Kumar Giri wrote:
>
> package main
>
>
> import (
>
> "fmt"
>
>
> "github.com/go-redis/redis"
>
> )
>
>
> func main() {
>
>
> client := redis.NewClient(&redis.Options{
>
> Addr: "lo
hi ,
I am also having the same problem, can you please elaborate
invalid operation: dat["connections"]["current"] (type interface {} does
not support indexing)
Thanks
On Friday, August 21, 2015 at 4:22:22 PM UTC+5:30, Giulio Iotti wrote:
>
> On Friday, August 21, 2015 at 11:51:32 AM UTC+2, V
small runnable code sample that demonstrates the
> problem.
>
> On Thursday, 22 December 2016 18:13:14 UTC+11, kumargv wrote:
>>
>> GO 1.7
>> centos 7.2.1511
>>
>> On Thursday, December 22, 2016 at 12:35:44 PM UTC+5:30, Dave Cheney wrote:
>>>
>>
GO 1.7
centos 7.2.1511
On Thursday, December 22, 2016 at 12:35:44 PM UTC+5:30, Dave Cheney wrote:
>
> Can you please give a few more details. Which version of Go, which
> operating system, that kind of thing.
--
You received this message because you are subscribed to the Google Groups
"golang
Hi,
I was trying to connect with DialTimeout as:
address:= "127.0.0.1:5"
address:= "127.0.0.1:7432"
conn, err := net.DialTimeout("tcp", address, time.Duration(30)*time.Second)
if err != nil {
fmt.Println("error in conn : ",err)
return nil, err
}
My program Stuck in Net.DialTimeout
I am n
I am trying to calculate n/w interface speed in Golang .
I am using CGO to Calculate But In some device it is failing.
My source code Link
https://play.golang.org/p/3wvLzfPrIV
It is falling
rc = ioctl(sock, SIOCETHTOOL, &ifr);
In above line it is falling. I don't have any clue
I tried usi
Hi Mate,
why Don't you try to make a static binary
go build --ldflags ' -extldflags "-static"' filename.go
On Thursday, October 27, 2016 at 8:10:55 PM UTC+5:30, pat.s...@gmail.com
wrote:
>
> Folks,
>
> Two of my packages have dependency on the same C library. I have linked
> them successfully
cursor = conn.cursor(MySQLdb.cursors.DictCursor)
cursor.execute('SHOW SLAVE STATUS')
result = cursor.fetchone()
cursor.close()
I am unable to Impement this in golang
Please suggest
--
You received this message because you are subscribed to the Google Groups
"golang-nuts
import MySQLdb
import MySQLdb.cursors
conn = MySQLdb.Connect(
host='localhost', user='user',
passwd='secret', db='test')
cursor = conn.cursor(cursorclass=MySQLdb.cursors.DictCursor)
cursor.execute("SELECT this,that FROM foobar")
rows = cursor.fetchall()
for row in rows:
print row['this
import MySQLdb
conn = MySQLdb.Connect(
host='localhost', user='user',
passwd='secret', db='test')
cursor = conn.cursor()
cursor.execute("SELECT this,that FROM foobar")
rows = cursor.fetchall()
cursor.close()
conn.close()
I am unable to Implement The above code in golang
Please suggest
me := []byte("eth0\x00")// interface name eth0,eth1,wlan0 etc.
sp := C.get_interface_speed((*C.char)(unsafe.Pointer(&ifname[0])))
fmt.Println(sp)
}
Please give some suggestion .
On Monday, March 28, 2016 at 5:21:59 PM UTC+5:30, kumargv wrote:
>
> i am able to get new_inby
Hello friends,
i am trying to write some win api in golang ,because these API not
implemented any PKG.
"syscall"
"github.com/contester/runlib/win32"
"golang.org/x/sys/windows"
API are code in C++
OpenDesktop
hdesk = OpenDesktop(
_T("default"), // the interacti
:30, kumargv wrote:
>
> Hello friends,
>
> i am trying to write some win api in golang ,because these API not
> implemented any PKG.
>
> "syscall"
>
> "github.com/contester/runlib/win32"
>
> "golang.org/x/sys/windows"
>
>
Hello friends,
i am trying to write some win api in golang ,because these API not
implemented any PKG.
"syscall"
"github.com/contester/runlib/win32"
"golang.org/x/sys/windows"
API are code in C++
OpenDesktop
hdesk = OpenDesktop(
_T("default"), // the interacti
I am getting SID of my system using WMI
>wmic useraccount where name='vijay' get sid
SID
S-1-5-21-742204146-2006990925-2362806598-1001
But still i am not able to get sid structure .
package main
import (
"fmt"
"golang.org/x/sys/windows"
)
func main() {
sid , domain, accType , err := windo
package main
import (
"fmt"
"github.com/contester/runlib/win32"
"syscall"
"unsafe"
)
var PATH string = "C:\\Program Files (x86)\\Vistara\\Agent\\utils\\1.exe"
var kernel32 = syscall.NewLazyDLL("kernel32.dll")
var procCreatePipe = kernel32.NewProc("CreatePipe")
func main() {
var hTo
Hello guys,
i am using this cron pkg
https://godoc.org/github.com/robfig/cron
what i am trying to achieve here is
1) run a job on 2nd friday of every month
2)run a job on 4nd sunday of every month
3)run a job on 1 monday of every month
etc
Please suggest
thanks
--
You received th
e a binary with all dependence ,so that it can run on any
m/c without any problem
Can you suggest something
Thanks for trying.
On Monday, July 18, 2016 at 5:55:37 PM UTC+5:30, kumargv wrote:
>
> go 1.6.2
> OS 16.04 LTS ubuntu
> On Monday, July 18, 2016 at 5:25:21 PM UTC+5:30, Peter
go 1.6.2
OS 16.04 LTS ubuntu
On Monday, July 18, 2016 at 5:25:21 PM UTC+5:30, Peter Waller wrote:
>
> I just tested this here on amd64 with go1.7rc1, and it works fine with no
> crash, so I don't know why it is crashing for you.
>
> What version of go are you using?
>
--
You received this messa
This is the Link of program what i am compiling
https://play.golang.org/p/drJGhsWiEi
when i am using- go build program.go ,it generating ->program(binary)
file ./program
program: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked, interpreter /lib64/ld-linux-x86-64.so.2
This is the Link of program what i am compiling
https://play.golang.org/p/drJGhsWiEi
when i am using- go build program.go ,it generating ->program(binary)
file ./program
program: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked, interpreter /lib64/ld-linux-x86-64.so.
hello guys,
i am trying to download this pkg
go get github.com/xeodou/go-sqlcipher
I am using TDM-GCC
C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
cannot find -lcrypto
collect2.exe: error: ld returned 1 exit status
I tried every possible way
23 matches
Mail list logo