Golang

120

Solutions

1

Articles & Videos

338

Contributors

Golang, also called Go, is an open source programming language that is a statically-typed language with syntax loosely derived from C, adding automatic memory management, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library. Go is a general-purpose systems programming language that aims to be efficient both for development and execution with a focus on fast compilation and increased maintainability of large projects. Go was originally targeted at systems programming tasks such as building server/web applications, high throughput middleware and databases.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi

It's because this option is missing from the gpmc console.
Default location is: Computer > Windows Settings > security settings > Advance Audit Policy Configuration > Audit Policies > Detail tracking

Kind regards
0
Free Tool: IP Lookup
LVL 9
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I have several DT700 to put on my SV8100 switch. I setup all the settings correctly on the phone and can even use the web programming to get to it. What section do I go to for setting it up on the PBX with an extension and such? On the phone's display it shows Full Port.
0
I am trying to build a userform that enables one to select a Powerpoint file, display its section numbers in a listbox, and allow one to selected sections to remove from that listbox (which would then go to a second listbox) and have the macro delete those sections from the copy. I've attached code that copies a Powerpoint file with all of its slides but the code does not copy the sections. So I thought a two-dimensional array that captures the section names and first slides would suffice, so that I could use that array to create the same section names and first slides in the copy --  assuming that I could figure out how to get the firstslide number(s) from the user selections and then delete those sections from the copy. But I cannot figure out how to build this array. I can loop through the sections and get their names and firstslides, but not how to populate the array with that data and then use it to delete whichever sections are chosen from the second listbox. Can someone help get me started?
0
Hi, I uploaded video file to Azure Media Service. it plays but I don't want to go back to the play back.  We are trying to simulate the live streaming. is it possible with Azure Media Service?
0
i need a batch file to create this path: C:\Windows\winwin123
this path already exist: C:\Windows\  but the folder called  ''winwin123 '' must be created ,afetr is created i want to go there: C:\Windows\winwin123
0
So if my understanding is correct from what I have managed to discover, the problem here is that any device connected to a cell phone hotspot, that has an active VPN, will simply route through the public ip connection on the hotspot and not go through the VPN.

Is there a way to 'route' through the VPN any device connected to the cell hotspot?  I have heard that possibly rooting the cell phone may allow this, but I have never rooted a phone before.

Or, is there another way to make this happen?  I am trying to create a secure VPN from our remote offices back to our main office using a cell phone...without having to step up to a LTE router.
1
My HyperV host is licensed with 2012 R2 Standard, and my first attempt at installing the guest OS of 2012 R2 didn't go well, so I deleted it and started over. (I don't remember having to activate that one)
I have this VM all set up and ready for production, but it has a notification that it needs to be activated. Did I do something wrong? It will not activate with my original key either...
0
Hi,

Is it possible to extract certain words from multiple documents and then place them in to an excel spreadsheet sort of like a data miner (I guess?).

Example:

Let's assume I need someone with experience in Java and they need at least 3 years experience, I can then type in those requirements and it will then go through all my CV's and put the people it thinks meets those requirements in to a excel spreadsheet.

I'm sure this is possible but I'm not sure how hard this would be (I'm doing this for a school project)

Thanks,
James
0
Hi Expert,

I have created table name inventory and was trying to insert data but i am getting the following error:--

Msg 257, Level 16, State 3, Line 2
Implicit conversion from data type sql_variant to varchar is not allowed. Use the CONVERT function to run this query.
Please help!

Here is the following details:--

CREATE TABLE [dbo].[inventory](
      [InstanceName] [varchar](255) NULL,
      [Product] [varchar](255) NULL,
      [Edition] [varchar](255) NULL,
      [Version] [varchar](255) NULL,
[IP Address Of SQL Server] [varchar] (20) NULL,
[Machine Name] [varchar] (20) NULL,
      [DatabaseName] [nvarchar](255) NULL,
      [CreateDate] [smalldatetime] NULL,
      [compatibility_level] [nvarchar](255) NULL,
      [state_desc] [char] (7) NOT NULL,
      [RecoveryModel] [char] (10) NOT NULL,
      [Database_Owner] [varchar] (10) NOT NULL,
     
) ON [PRIMARY]

GO


insert  into dbo.inventory select  @@SERVERNAME as InstancName, SERVERPROPERTY('PRODUCTLEVEL') as Product, SERVERPROPERTY('EDITION') as Edition,
 SERVERPROPERTY('PRODUCTVERSION') as Version, name as DatabaseName, create_date as CreateDate, compatibility_level, state_desc,
 recovery_model_desc as RecoveryModel, SUSER_SNAME(owner_sid) as Database_Owner
from [servername].[master].sys.databases where [name] not in ('master','msdb','model','tempdb')


Please help
0
Will not boot up. can hear sounds of hard drive or dvd (pretty sure it is the dvd) doing initial test but hard drive light never lights up. Can hear fan.  Dvd movement  and fan movement seem to be running slower than normal. It does not sound the same. Then it just sits there until I turn it off. Could it be an internal power board problem? That is if this unit has one. Shows full battery charge. Tested output on adapter putting out 19.23v. Adapter says it should put out 19.43v. do not know it that is enough difference to matter.  Please Help. Had this same problem about a year after i bought it. The guys at office depot tested it and said the motherboard was fried. Over $500.00 later it was working again. The computer was $1000.00 new. Felt like i got ripped off. Do not want to go down that road again, unless i have a sharp stick in my hand.
0
Turn Insights into Action
Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

when I go to http://www.alliancesharedsite.com/sst.xml on one pc using ie11 I get the top pic  but when I go there with another pc I get the bottom pic.  what is wrong?  I want the top pic.  See attachment
Presentation1.jpg
0
I have a functioning 2003 terminal server which does not have a licensing server in the domain. The license server listed in the registry is an old domain controller that no longer exists. My issue is that I simply need to know how many per user CALs are being used on the terminal server? Can I simply re-install the terminal server licensing component on the current terminal server to see the license count? I just don't want to activate the license server and mess up current users who are accessing the terminal server. My only other option is to go into the terminal server manager and count how many sessions there are, but that doesn't accurately tell me the amount. thanks for any help in advance
0
I set up one of four laptops as usual, enabling TPM, turn on bitlocker and require a bitlocker PIN at boot to log onto the computer. In my setup, I create an original admin account (named - pallap005), a standard account (named - clinical) and then enable the default admin account. Once that is done then I disable the pallap005 admin account. In this case, I disabled my pallap005 admin account  before I enabled the default admin account leaving only my standard user account (clinical) available. I need to know if I can enable the admin account and how do I go about doing this?
0
I am using go lang for smtp verification of email id's. During that process i got

panic: runtime error: invalid memory address or nil pointer dereference
        panic: runtime error: invalid memory address or nil pointer dereference
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5b3ac2]

goroutine 16 [running]:
panic(0x674140, 0xc42000c0e0)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
net/smtp.(*Client).Close(0x0, 0xc420061280, 0x6bfe79)
        /usr/local/go/src/net/smtp/smtp.go:74 +0x22
panic(0x674140, 0xc42000c0e0)
        /usr/local/go/src/runtime/panic.go:458 +0x243
net/smtp.(*Client).hello(0x0, 0x65d580, 0x0)
        /usr/local/go/src/net/smtp/smtp.go:79 +0x26
net/smtp.(*Client).Quit(0x0, 0xc420061280, 0x6bfe79)
        /usr/local/go/src/net/smtp/smtp.go:381 +0x2f
panic(0x674140, 0xc42000c0e0)
        /usr/local/go/src/runtime/panic.go:458 +0x243
net/smtp.(*Client).Hello(0x0, 0x6c9932, 0x9, 0x9, 0x6bfe79)
        /usr/local/go/src/net/smtp/smtp.go:95 +0x26
smtp/checkme.checkMailbox.func1(0x0, 0xc420181ba0, 0x6c9926, 0x15, 0xc42005f6e0, 0xc4200531d4, 0x15)
        /usr/local/GoProjects/Projects/src/smtp/checkme/checker.go:84 +0xcf
created by smtp/checkme.checkMailbox
        /usr/local/GoProjects/Projects/src/smtp/checkme/checker.go:125 +0x406

Open in new window

0
Hi,
Long story - but basically having to migrate SQL from one server to another using a clone.  Shut down SQL services on the one, copied the DBs and log files to their respective volume on the new server, but SQL not starting.  
Went into SQL configuration manager and changed the startup parameters of SQL service to point to the master db and log file, but now I'm getting errors in the event log like this when I try to start SQL:

FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'C:\Mount\DWSqlLog\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\sg1_maintenance_log.ldf'. Diagnose and correct the operating system error, and retry the operation.

the path:  C:\mount\ has two icons that appear to be shortcuts, dwsqllog and dwsqldata.  even though the data and log volumes are named the same, same drive letter, same contents, for some reason that path isn't working.

is there either
a) a way to change the path SQL is attempting when loading all these databases? or
b) a way to make SQL load WITHOUT loading any databases, so I can go in manually in management studio and attach them?

I'm getting one of these errors for every log file of every database - a few dozen of them.

Any ideas?  Thanks!
0
Dear Experts, I'mt rying to use GO to read a json file that I have.

I'm using the following code:
package main

import (
	"fmt"
	"encoding/json"
	"io/ioutil"
)

func main() {

	b, _ := ioutil.ReadFile("/home/david/jsontest/create.jsontest.campaigns.ninja.json")

	type UserData struct {
		user_id    string
		user_email string
		user_name  string
	}

	type campaign struct {
		domain      string
		Ssl         int64
		server_key  string
		certificate string
		bundle      string
		php_ver     string
		wp          int64
		lang        string
		start_date  string
		end_date    string
		description string
		user_data   UserData
		CampaignID  int64
	}

	var m campaign
	err := json.Unmarshal(b, &m)
	if err != nil {
		panic (err)
	}
	fmt.Printf("%d", m.CampaignID)
	fmt.Printf("%s",m.user_data.user_email)
}

Open in new window


When I run the code however, the Result is this:
/usr/lib/golang/bin/go run /home/david/GoglandProjects/CampaignsNinja/jsontest.go
80099700
Process finished with exit code 0

Which is correct, but partial.. I'm missing the 2nd value which should be 74 (according to the  attached JSON below)

{"domain":"jsontest.campaigns.ninja","ssl":1,"server_key":"","certificate":"","bundle":"","php_ver":"5.6","wp":1,"lang":"english","start_date":"2017-02-02","end_date":"2017-03-02","description":"This is a test","user_data":{"user_id":"74","user_email":"usertest@gmail.com","user_name":"usertest"},"CampaignID":80099700}

Any Ideas why is the code behaving that way?
0
Hey guys.

WE were trying to write a small program in GO to read system load in Linux.

But it always returned strange value.

However, by following this link

We saw the next snippet:

err := syscall.Sysinfo(si)
	if err != nil {
		panic("Commander, we have a problem. syscall.Sysinfo:" + err.Error())
	}
	scale := 65536.0 // magic

	defer sis.mu.Unlock()
	sis.mu.Lock()

	unit := uint64(si.Unit) * 1024 // kB

	sis.Uptime = time.Duration(si.Uptime) * time.Second
	sis.Loads[0] = float64(si.Loads[0]) / scale
	sis.Loads[1] = float64(si.Loads[1]) / scale
	sis.Loads[2] = float64(si.Loads[2]) / scale

Open in new window


Scale seems to be 2 to the power of 16, but why should the RAW value be divided by it? How is that value measured?
0
Hi guys,

I'm very new to Go and I'm afraif the guides regarding JSON aren't very clear.

I have the following JSON output (saved as a .json file in a certain path) the content of which is

{"domain":"jsontest.campaigns.ninja","ssl":1,"server_key":"","certificate":"","bundle":"","php_ver":"5.6","wp":1,"lang":"english","start_date":"2017-02-02","end_date":"2017-03-02","description":"This is a test","user_data":{"user_id":"74","user_email":"usertest@gmail.com","user_name":"usertest"},"CampaignID":80099700}

and the following Piece of code written in Go:

package main

import (
	"io/ioutil"
	"log"
	"strings"
	"encoding/json"
	"os"
)

func main() {
	type Message struct {
		domain      string
		ssl         int
		server_key  string
		certificate string
		bundle      string
		php_ver     string
		wp          int
		lang        string
		start_date  string
		end_date    string
		Description string
	}

	var m Message
	err := json.Unmarshal(b, &m)
}

Open in new window


Where b should be the path to the json file.

but as you can see, the JSON itswelf has nested fields...

My question is,
and I'm sorry if it's a long one but I really tried looking it up just can't get the concept...
How do I include the nested fields in the structure called Message and how do I read each and every value into a variable (preferably not an array but a separate variable for each value)
0
Hello,

I'm throwing together a cheap Ryzen build for a second gaming system and found a decent deal on a Ryzen 1600X combo with the CPU, Asrock X370 motherboard, and 16 GB of DDR4-3000 RAM. I debated between hard between the 1500 and 1600 series of CPU but decided the 1600X would probably be a better long-term decision.

Anyway, I'm looking for a low-profile cooler for this CPU. I have an old Antec Tenor desktop case I'm going to likely use and I probably would be OK keeping it at stock clock speeds or maybe a slight overclock. Any recommendations on a good AM4 cooler? I'm hoping to keep it under $30; if push comes to shove I guess I could scrounge up a mini-tower if there aren't any good low profile coolers available and go with something like the CM Hyper Evo 212.

Please help.
Thanks.
I didn't find the right solution from the internet.
References:

https://forums.anandtech.com/threads/low-profile-air-cooler-recommendations-for-ryzen-1600x.2505153/
3D Animated Video Examples.
0
Raise the IQ of Your IT Alerts
Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

I'm trying to copy the usedrange of a excel worksheet and paste it to as a image in a powerpoint Template of 4th slide and from there on it should move to the next slides and copy the remaining worksheets to the next further slides. I've 20 worksheets in a workbook with different data and with different used Range  with 40 slides in a template of a powerpoint presentation.  So, it is pasting the data in 4th slide but not adjusting it to the slide as it is throwing the error as

Object Doesn't support this property or method a Runtime Eror 438

 
PPslide.Shapes.PasteSpecial DataType:=2 '2 = ppPasteEnhancedMetafile
Set myshape = PPslide.Shapes(PPslide.Shapes.Count)

Open in new window



So, I Need a macro to loop through all the sheets and if the usedrange is not fitting in the current slide then it should automatically  split  and go to next slide and then split and paste the remaining data and even if the data is more than that slide also then it should again go to next slide and  split and paste the data. Likewise it should automatically paste all the remaining worksheets usedrange to slides and adjust its position according to the data.

I'm attaching sample workbook with 3 worksheets with same data as of now. I do have a powerpoint template of around 40 slides in which it should be started from 4th slide to paste to powerpoint from worksheet.

I'm also providing the code which is working currently . Any Suggestions are highly appreciated!!!


Private Sub 

Open in new window

0
I have a hp ML350 g9 server which is configured with RAiD 5.  It has 4 SSD hard disks.  recently we had a power outage and our master boot record is damaged, and I can only get to "the drive where windows is installed is locked.  Unlock the drive and try again.  I cant fix this, so wanted to restore the whole windows backup I have.  

When I launch from the CD, I go into the option to restore, but when I select the target destination, there is no drive showing.  I went into the HP untility and can see the array there, but not when I launch from CD and try to run the backup.  

i did a fresh install just to another single disk, and still when I launch off the CD, i cant see the disk when I try and run the recovery.  I think im having the same issue where the drive cant be seen because I don't have the drivers for the smart controller.  I tried those links you provided, but they are just executables.
0
I have a hp ML350 g9 server which is configured with RAiD 5.  It has 4 SSD hard disks.  recently we had a power outage and our master boot record is damaged, and I can only get to "the drive where windows is installed is locked.  Unlock the drive and try again.  I cant fix this, so wanted to restore the whole windows backup I have.  

When I launch from the CD, I go into the option to restore, but when I select the target destination, there is no drive showing.  I went into the HP untility and can see the array there, but not when I launch from CD and try to run the backup.  

i did a fresh install just to another single disk, and still when I launch off the CD, i cant see the disk when I try and run the recovery.  I think im having the same issue where the drive cant be seen because I don't have the drivers for the smart controller
0
I will be entering data, moving around a spreadsheet with the arrow keys.  Then the keyboard will go completely unresponsive.  I can change cells with the mouse, but still not enter any data.  This "spell" can only be broken by hitting one of the Enter keys, which pulls up a spreadsheet (none in particular) that had been minimized.  From there, i can go back to the previous spreadsheet and continue working as normal.  
I have not noticed any pattern to this.  There do not seem to be any favorite spreadsheets.
0
I have a Delphi Console app that I need to call from a batch file.
The batch file starts cmd and creates a console.
The app also creates a console.
I need to write to the window/console that the batch file creates
and ignore the one the console app created.

Please go slow, I'm not very smart.
0
I have a issue with Dialing out and some inbound.. I have a As5400XM with CT3 card on my TDM side all my b channels are up so are my d channels. My main issue is my dial peer setup when i dial out it will go over 2 dial peers ar the same time and i get no audio. My question is im have 28 T1s and i want them all to do inbound and outbound dialing what is a sample config for some like this. I know a dial peer out going needs a pots dial peer and a voip dial peer just a little confused
0

Golang

120

Solutions

1

Articles & Videos

338

Contributors

Golang, also called Go, is an open source programming language that is a statically-typed language with syntax loosely derived from C, adding automatic memory management, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library. Go is a general-purpose systems programming language that aims to be efficient both for development and execution with a focus on fast compilation and increased maintainability of large projects. Go was originally targeted at systems programming tasks such as building server/web applications, high throughput middleware and databases.