Golang

443

Solutions

955

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

I have created 4 input types name, price, description, brand and one input file type image. on being clicked on submit button i want all the 5 inputs to go into database table "product" but on submit being clicked it just displays the exception as output "Some of your fields are empty" but all fields are being filled. i can even provide the html code

 
<?php
    // Do we have a Form Submission
    if (isset($_POST['submit'])) {

        try {

            // Check that all your fields have values
            if (
                (!isset($_POST['name']) || empty($_POST['name'])) ||
                (!isset($_POST['desc']) || empty($_POST['desc'])) ||
                (!isset($_POST['price']) || empty($_POST['price'])) ||
                (!isset($_POST['brand']) || empty($_POST['brand'])) ||
                (!isset($_POST['image']) || empty($_POST['image']))
            ) {
                throw new Exception('Some of your fields are empty.');;
            }
                $filename = $_FILES['fileToUpload']['name'];
                $filetemp = $_FILES['fileToUpload']['temp_name'];
                $filesize = $_FILES['fileToUpload']['size'];
                $filebasename = basename($_FILES['fileToUpload']['name']);
                $dir="uploads/";
                $finaldir=$dir.$filebasename;
                move_uploaded_file($filetemp,$finaldir);

            // Prepare your Query and bind the parameters to the POST array
            $stmt = $db->prepare("INSERT INTO 

Open in new window

0
Hello:

I am preparing to transfer the FSMO Roles from 1 Windows Domain Controller to another DC.  I have reviewed the process from the following web site: https://www.petri.com/seizing_fsmo_roles  ... and I have created more specific instructions for my network (Attached).  

I unfortunately do not have a test Lab or Test Domain to practice with on and I have not transferred roles in a very long time.  Hence, I wanted to verify the steps involved.  I created a similar question earlier
 ( https://www.experts-exchange.com/questions/28977018/How-to-swap-out-existing-domain-controllers-with-2-new-domain-Controllers.html ) ; but this is a little different and specifically focused on transferring the FSMO roles.

I am particularly concerned with the process to "To Transfer the Schema Master Role:" section (page 5, #8).  Even though I received a warning I think I should be able to transfer the Schema Master Role, as documented.  Or am I wrong and I should go about it a different way?

I wanted to ask other Network Administrators who may have done this before.  Just to put my mind at ease.
Procedure-to-transfer-the-Time-setti.pdf
0
Hello experts,

I have the following code
$mystring = @()
$DCName = "test1.net"
$ServiceName="spooler"
try {   $mystring += Get-Service -ComputerName $DCName  -Name $serviceName | Select name, Status }
 Catch {
$mystring += "$DCName Error"
write-host "Error $DCName"
}

When the DC is down, and I cant connect to this DC, it does not go into the catch block, instead it throws the default error that Get-Service: cannot find any service .....
Please assist.
0
Hi Guys

we have roaming profiles for users on our window file server. We are now moving to Net apps for storage with new domain infrastructure.

We have new domain configured, with new user name and new profiles. Whats best way to migrate old user home drives and users desktop to the new domain? is there any softwares that can automate this process? as we plan to go round put current machine to work group and then re-add to new domain.
0
If you have a vSphere with hundreds of servers configured - how do you find one when you only know the IP address and it's not in DNS? If I go to Virtual machines and type in the IP in Search of Find that does not work.??
0
OS = Win2008 server standard

I have a new situation where my workstation drives,  mapped to a NAS, are becoming unreachable. When I try to open them it says something like that network name is in use. Figuring it would resolve with a reboot, I did to find I had 2 servers (both the DC's) return the following error message upon reboot and attempt to logon.
"the trust relationship between this workstation and the primary domain failed"

Game on! I located a Netdom command that restored the trust credential so I can logon again. But I found that group policy was not being done. none of the mapped drives showed up on these servers.

Typing \\sysvol fails, typing \\servername\sysvol works to show the files within.
Net Share shows NETLOGON and SYSVOL
 
Opening \windows\Sysvol\sysvol on the 2 DC's showed that there was a file missing from one of them, so I copied it there and ran GPupdate /force - this restored the mapped drives after a logon cycle

DCDIAG
Starting test: NCSecDesc
         Error NT AUTHORITY\ENTERPRISE DOMAIN CONTROLLERS doesn't have Replicating Directory Changes In Filtered Set  access rights for the naming context:
         DC=DomainDnsZones,DC=MyDomain
         Error NT AUTHORITY\ENTERPRISE DOMAIN CONTROLLERS doesn't have Replicating Directory Changes In Filtered Set  access rights for the naming context:
         DC=ForestDnsZones,DC=MyDomain
         .........................DC2 failed test NCSecDesc
and several instances of this

0
I want a particular workstation to login automatically.  When I go to user accounts there is no check mark option for "Users must enter a username and password to use this computer"

1) Computer is on a domain, so this is controlled by GPO.  Any idea where I could find this in group policy?

2) What would be the best way to exclude this workstation from the Group policy?
0
I’m trying to give users access to do their timesheets from home using a web browser.  I have set this up in the accounting software that runs on a server on our local network.  

I want the users to go to timesheet@domainname.com, .  Do I add an A record in the DNS called timesheet@domainname.com point it to the public IP address of the firewall for that entry?

 I will then set the firewall to forward the request to the server on the internal network.  Is this correct as far as name resolution of timesheet@domain.com?

Thanks,
cja
0
I have a command button that makes the selection for the pivot table. I use below VBA code to make the selection. However it takes too long to run. is there a way to optimize the code where it doesnt go thru each line...clears all filters and selects where SlicerItems("").Selected=True

Sub HenkelOnly()
'
' HenkelOnly Macro
'

'
    ActiveWorkbook.SlicerCaches("Slicer_Manufacturer1").ClearManualFilter
    With ActiveWorkbook.SlicerCaches("Slicer_Manufacturer1")
        .SlicerItems("HENKEL").Selected = True
        .SlicerItems("3M").Selected = False
        .SlicerItems("ADVANCED BEAUTY CARE INC").Selected = False
        .SlicerItems("ADVANCED BEAUTY INC").Selected = False
        .SlicerItems("AGILITY SPORTS").Selected = False
        .SlicerItems("ALAMO MANUEL MARTIARENA").Selected = False
        .SlicerItems("ALEN USA").Selected = False
        .SlicerItems("AMERICAN SAFETY RAZOR").Selected = False
        .SlicerItems("AMPRO INDUSTRIES").Selected = False
        .SlicerItems("ANIKA LABORATORIES").Selected = False
        .SlicerItems("AP DEAUVILLE").Selected = False
        .SlicerItems("APOLLO").Selected = False
        .SlicerItems("ASPEN BRANDS").Selected = False
        .SlicerItems("AWESOME PRODUCTS").Selected = False
        .SlicerItems("B&G FOODS INC").Selected = False
        .SlicerItems("BEIERSDORF").Selected = False
        .SlicerItems("BELLA CURLS").Selected = False
        .SlicerItems("BIOCARE LABS").Selected = False
        …
0
when I do below process, I get error: ALTER DATABASE is not permitted while a database is in the Restoring state.
I run the process again and it seems to work OK, most of the time.. is there a way to foolproof this?
~~~
--PRIMARY NODE
USE MASTER

IF
(
SELECT COUNT(*) FROM sys.availability_databases_cluster WHERE database_name = 'database_one'
)
=1

ALTER AVAILABILITY GROUP [POS1AG] REMOVE DATABASE [database_one];
GO


 

--SECONDDARY NODE
GO
  WAITFOR DELAY '00:01'
/* WAIT ONE MINUTE for sync */
GO
IF  EXISTS
(SELECT name FROM master.sys.databases WHERE name = 'database_one')
BEGIN
        ALTER DATABASE database_one  SET SINGLE_USER WITH  ROLLBACK IMMEDIATE
        DROP  DATABASE database_one  
END
0
Trying to determine the best way to accomplish the following in an excel 2010 worksheet

I have a employeeid and employee name combination for about 20 Employees

I would like to have the employee name in a data validation

Is  there a way to pick the name and have it go in to say cell A2 and have the id go into cell a3????


I'm open to any option
0
I looking into disabling TLS 1.0 and 1.1 on our public IIS web servers but want a way to warn users that are running browser clients that don't support TLS 1.2. I was hoping IIS would have a way to redirect these users to another site hosted on a server that did support lower TLS versions that the site they were trying to go to has a few minimal requirements. I am not sure if this is possible though since the server should refuse the connection before it has a chance to redirect the client.  

If that is the case and there is no way to do this directly on the IIS server hosting the site then are there any revers proxy solutions or WAF like solutions that could provide this kind of service?
0
At work, I have Windows 8.1. Another team mate has the same and we're both getting this error

 I click on Visual Studio 2013 and I get this
   "Microsoft Visual Studio 2013 has stopped working. A problem caused the program to stop working correctly. Please close the progrm"

We have a workaround --> we click "Debug Program", a box pops up and on top, it has "An unhandled Microsoft .Net Framework exception ocurred in devenv.exe". From the list of possible debuggers we choose "New Instance of Microsoft Visual Studio 2013". Click Continue and that's how we can open the solution.

What I did:

1. I started VS command prompt and ran devenv and looked at the log. This was last week and I saw this error
   The CTM file is out of date and should be deleted and rebuilt but the file c:\programdata\microsoft\visualstudio\12.0\1033\devenv.ctm could not be deleted I don't see that file in the folder (I'm checking it now)

 I don't know how I ran it for errors to get logged in ActivityLog.XML. I want to do it again but don't remember the command.

2. I had our support "repair" VS and we still get the error

3. If I go to command prompt and type devenv...VS starts without any errors

4. I did devenv /resetsettings but that didn't work either. Still the same error

5. I thought there might be GitExtensions but I don't see any (came across a post that talked about that)

6. Followed this and deleted and renamed a folder but still didn't work Solution
0
Ok I have a form that I will use to add Serial Numbers to a table called "ProdSerNmbrs". The form is called "sbfrmProdSerNmbrs" I have two fields
ProductID
SerialNumber

 I need to check and see if either IsNull. This all happens OnClick of a Close button. If one or either IsNull I need it to Pop up a MsgBox VbYesNo. If the User Picks No Then go back to the form.  If the user picks yes then Me.Undo and then close the form.

I can't figure this out because I have to many Else's.  Here is just something I have been working with but can't get it to come out right. It may be even more messed up after trying over and over. thanks for the help.

On Error GoTo Command13_Click_Err

    'Call the macro to check for empty records
    If IsNull(Me.SerialNumber) = True Then
      GoTo DirtyCheck
     Else
   'Forms!frmSkusEntry!SerialNumber.Requery
        GoTo Command13_Click_Exit
     End If
DirtyCheck:
If Me.Dirty = True Then
        msgbox "Not All Fields Were Completely Filled Out! Do you want to Still Exit Without Saving?", vbYesNo
        If vbNo Then
      Exit Sub
        Else
        Me.Undo
      Else
    If Me.Dirty = False Then
    GoTo Command13_Click_Exit
End If
End If
Command13_Click_Exit:
DoCmd.Close ObjectType:=acForm, ObjectName:=Me.Name, Save:=acSavePrompt
    Exit Sub

Command13_Click_Err:
    msgbox Error$
    Resume Command13_Click_Exit

End Sub

Open in new window

0
My Site is - http://s650346707.onlinehome.us/ (only temp til i get it working flawlessly)
 
  THE PLATFORM:::::::
  i'm using WP 4.6.1 and i just updated WooCommerce to the latest version.
  I'm selling medical stuff. it's gross i know. but i'm stuck and need your help bc it has to up and  working by 6pm tmrw.
 
  THE TASK:::::
  Create a website and make it RFQ - request for quote - because pricing changes so frequently.
 
  THE PROBLEMs::::
  PROBLEM 1::::
  when i add a product to the cart, and go to a new product to add more products to the cart - i get an error. The error reads.
  ['x' has been removed from your cart because it can no longer be purchased. Please contact us if you need assistance.]
 
  PROBLEM 2::::
  When trying to add an item to the cart and i select a variation from the dropdown on the product, i get this error;
  [Sorry, this product is unavailable. Please choose a different combination.]
  NOTE:::: if i remove the product from the cart, i do not get this error.
0
Hi, I have voicemail server (Shoretel) and Office 365. The voicemail server sends out email just fine until recently. i got bad mail showing up as below:

Diagnostic-Code: smtp;550 5.7.606 Access denied, banned sending IP [xxx.xx.xxx.x]. To request removal from this list please visit https://sender.office.com/ and follow the directions. For more information please go to  http://go.microsoft.com/fwlink/?LinkID=526655 (AS16012609)

I called shoretel, but they couldn't help. MS Office haven't answered.  I submit the delist but doesn't help: I got below reply:

Please note that your ticket number is in the subject line of this mail.
xxx.xx.xxx.x/24

Note: Errors are unlikely, however, if an error is indicated, please resubmit the specific IP or IP range.
Thank you,
Outlook.com Deliverability Support
0
Where do you go on a RDS server to add volume licensing for Office 2016 standard (not MS Office 365)?
0
how can the below logic be made to work? (the goal is to delete a database only if it exists.. then this will be part of automated code.. the need for SINGLE_USER logic is to make sure the database is not in use when tried to be deleted..)

USE MASTER

IF
(
SELECT COUNT(*) FROM sys.databases WHERE name = 'db1'
)
=1
BEGIN
USE db1
ALTER DATABASE db1 SET SINGLE_USER WITH  ROLLBACK IMMEDIATE
USE master
DROP  DATABASE db1  
END

GO
0
Since when did it go to 10,000? Thats ridiculous. Seriously. Whats wrong with 3000? Like I have nothing better to do than hang out on EE. Please.
0
If you go to this page: http://inspyrus(DOT)com/solutions/dynamic-discounting/ and resize your browser to the size of a tablet and scroll down to: Unparalleled Innovation

In Chrome you will see an animated graphic (mp4) but the CSS has not changed in FF or on the ipad.  What may be causing this?
0
Hi - We are currently have DCs running 2008 R2 (Current functional level). I want to get to Server 2016. I will go 2012R2 first. Are there any known issues with ADFS when changing the functional level of the domain? ADFS is configured on Server 2012 R2 in our environment.
0
I open a client supplied .xlxs file in excel 2013 or 2010 and I have this result (which is correct)
Date: 01/03/2016
SerialNumber: 00000065987
I open the same in 2016 and I get
Date: 1/3/2016
SerialNumber: 65987
There are a multitude of ways of repairing this however no way to detect what was affected in simply opening a file.
Rather than go backwards and downgrade to 2013 is there a setting that can ensure that Excel doesn't take it upon itself to alter the clients data? We actually have to print the zeros and all on marketing pieces and emails.
sample.xlsx
0
Hi Experts

I am looking for creating some sort of a Button or some other shortcut type of thing in excel, such that I can place it anywhere within any excel worksheets. And when I click on it, that will take me to 100 cells below, in the very same column.

I should have the freedom to place this button anywhere in any of my excel sheets. And just with one click on it, my mouse will go down 100 cells, without any need of manual scrolling. I am doing this, because I have to work with very large excel sheets and I get tired of scrolling and scrolling more, all the time.

I am using Microsoft Excel Professional x64

Thanks for any help
0
We have a Xerox Phaser 7760 with a finisher (folds and staples).

For our in house printing we use thin coated paper, but the factory drivers won't allow paper that is specified as coated to go to the folding and stapling unit.   The finisher handles the coated paper fine, as long as you specify plain paper, but the print quality of coated paper suffers if you specify plain paper in the setup.

I need a driver that will accept a coated paper setting when folding and stapling.  We would pay for the driver or would appreciate help learning how to write one ourselves.

- Ron
0
All, I currently have a Remote Desktop (Terminal Server) that will be used for providing RemoteApps to clients in our domain using Windows Server 2012 Standard R2 . The following roles were installed on the one server: Connection Broker, Session Host, Gateway, Licensing, Web Access. My question is if I wanted to add a second server for load balancing/redundancy how would I go about adding the second server to the pool?

1. Would I install the same roles on the second server?
2. Would I need create new certificates for the servers?

Thanks!
0

Golang

443

Solutions

955

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.