Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x

Golang

194

Solutions

521

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

Totally new at coding. Having a really tough time on the following assignment. This is the first task, and I cannot go on to finish the other three tasks until I master this one:

I need to return a hash map of YouTubeID's to Song objects containing all the information from a csv file. I am provided a filename for a csv file containing song ratings. Each line of these files will include: YouTubeID,artist,songName,rating. The YouTubeID is to be the key in the hashmap, the values will be Song objects containing the information for each file. The Song object is (String, String, String)

When a song has multiple ratings in the file I cannot just add the original song a second time, or it will over write the first instance. I only want to add another rating to the existing song entry in the map. We are given an addRating method that is supposed to help:

public void addRating(int rating){
this.ratings.add(rating);

I am having difficulty with the part where I add the song to the map without overwriting and only add the rating. I know I need to do something with the "Song" object but I have no idea what. The code I have thus far is:

public HashMap<String, Song> readCSVFile(String filename){
HashMap<String,Song> songs = new HashMap<String,Song>();

try{
for(String line : Files.readAllLines(Paths.get(filename))){
String allValues = line;
String[] data = allValues.split(",");


}}


catch (IOException ex){
ex.printStackTrace();
}
return (songs);
}
0
Free Tool: Port Scanner
LVL 10
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

HI All


I have did the below and go english uk as default language  on it i will have to add  english us keyboard too


Please help
CLASS USER

   CATEGORY "Keyboard Layout"

     POLICY "Keyboard Layout switching"

     KEYNAME "Software\Microsoft\Windows\CurrentVersion\Run"

       VALUENAME "internat.exe"

       VALUEON "internat.exe"

       VALUEOFF DELETE

       END POLICY

     

     POLICY "Keyboard layout"

     KEYNAME "Keyboard Layout\Preload"

         PART "Enable English" CHECKBOX

           DEFCHECKED

          VALUENAME "1"

           VALUEON "00000809"

           VALUEOFF DELETE

         END PART
0
Hi,
Is it possible to register vmx file on an another ESXi when the hosting ESXi host dies and still the vm file is registered on the dead esxi?
We have a vcsa. It is possible one day the  ESXi might go wrong so the VCSA will not be available.
0
I have a series of pages I need to print each week. They have always defaulted to 8.5 x 14, which is how they need to be printed. Suddenly, today, I had to go and either manually check that box, or do it in the page set-up. This affects my efficiency and I'd like to know how I can set the PDF's to automatically print the correct size as they used to.
0
CODE ATTACHED

I had this question after viewing Download file from remote ftp site via VBA (Excel).

Norie gave me instructions on how to call this code and INDIVIDUALLY it works.  I have a form that allows the user to make multiple selections.  Using variables, the code CALLs Norie's code.  If I make only one selection and run, the code works.  I can run Option1-let it finish, go back to the form and run Option2-Let it finish, run Option3-let it finish...etc ALL of my files download.

My problem is that when I select more than ONE Option, only the FIRST Option selected will download..all others will fail. I have attached the code with the FTP site, Password, and UserName changed for protection (my true data works).  Can anyone figure out why this works ONE-At-A-Time but NOT in multiples

My current Work Around is to download files one at a time which is time consuming!
FTP-CODE.docx
0
Hi,

We have been asked to setup mandatory TLS by one of our customers, for all incoming and outgoing mail to their domain.

We run Exchange 2010 servers, Sophos Email Appliance, and we also use a cloud based spam filter.
All incoming and outgoing email goes through the Sophos smarthost, also incoming mail hits the spam filter first then is passed to Sophos.  Outgoing mail doesn't go through the spam filter.

I've researched and think I know how to configure TLS on Exchange, Sophos, and our spam filter.

Will I need to configure TLS on Exchange for the send and receive connector?
Exchange isn't externally facing, so I am assuming the self-signed certificate will work for TLS with our internal smarthost?   The smarthost is externally facing so it will need a public cert and configuring for TLS.

I had a thought that maybe for incoming email I wouldn't need to configure TLS on our internal Exchange, but I could be wrong?

Thanks in advance.
0
Excel 2016 - my formatting is going crazy!  I have no idea what happened.  I have a workbook that I use alot.  I use save as and go on to the next job, every version that I open has the same issue...
0
I need a powershell command that will go through all the on-prem mailboxes which do not have a sip address in the e-mailaddress tab. i tried running with the below script, but then it does not give me what i want. i want the result to show up with the Primary SMTP address of the on-prem mailbox which does not have the sip address value

Get-ADUser -filter * -Properties proxyAddresses |
    Where {$_.proxyAddresses} |
    Where {-not($_.proxyAddresses  -like "*sip*")}
0
A woman was fired from her teaching position because allegedly made a post telling nwords to go back to Africa.  Other people see the post, but when she opens her own page, it is not there.  What kind of expert could i hire from here that could go back to her events Monday and prove she was hacked ?   Thanks,   Probably some neo-Nazi wannabe getting his rocks off from getting nwords shorts all in a bunch.  This is some serious stuff.
0
Hi,

I'm aware others have had similar issues to mine but none of those fixes resolved my issue.  We have 10 sites, each with a SonicWall (various models).  At site A, we recently switched our primary ISP and now our other sites aren't able to ping the LAN IP address of site A even though the VPN is up and running from site A to the other sites.  The other sites can successfully ping other devices at Site A (such as computers) but not the SonicWall LAN IP.  Site A can ping out normally to any other site.  This issue occurred when we switched ISP.  The settings seem to be correct but something is causing the ping not to go through.  It seems "Ping" is enabled in Site A SW where applicable.  I will appreciate any suggestions.
0
Tech or Treat! - Giveaway
LVL 10
Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

This is in reference to trying to gather "tracking information" when sending a calendar invite to a Firm Distribution List.  The issue here is that the firm Distribution List does NOT expand (whereas if sending to a personal Distribution List it does expand) so the user cannot get the tracking information when someone accepts or decline.  The person will of course get the "accept" or "deny" email but they want to be able to go into their calendar invite and look at ALL of the tracking information at once.

Let me know.  Thanks.

Jackie
0
I have a workbook with debits and credits. The debits and credits are each in a debit and credit column and they are also in separate rows. Each debit and credit is on a separate row. I wish to start at the first debit enty in the debit column and put its value in a variable then go to credit column and find the same value as the variable. Once it finds the equal value it must delete that row, go back to the cell in the debit row and delete that row as well. Then to the next value in the debit column and into a variable find the credit value and delete.

I have nearly succeeded but once the variable hits a blank cell the vsb program gets an error. I alse experienced that each time the 2 rows are deleted then the value of <<lastrow>> changes and i do not know how to do this in the first loop.

Please help

Hannes
0
Dear experts,

My linked call bridge for Skype meetings is not working when you click the skype go to meeting link.


Error : Cannot connect the call.please contact your administrator.
0
I have 2 VMs running server 2016 and they are running different versions of our software.  I know how to get it so that certain users access the correct server by the collection and published app and the .rdp file it creates for them and that works no problem.  The boss however wants it to where they would get redirected before that to a certain server based on their domain name or group so that way if we move a bunch of people over to different versions we wouldn't have to change their .rdp shortcut on all their computers.  On a time crunch and trying to figure out whats the best way to go about this.  

My setup is I have a Hyper V 2016 server host and 2 vms both server 2016 running off of it we will call them Test 10.5 and Test 11.0.  Test 10.5 has one version of our software and 11.0 has another.  These are all in a domain which is on another 2008 server that has the AD and is the DC and also stores the data.  Right now the Test 10.5 VM is the RDSH, RDGW, RDWA, and the connection broker.  The Test 11.0 server is only a RDSH and we plan on adding more as time goes on as just RDSH.

He also would prefer it that way over using just the published app to direct them to a certain server for when we have to do maintenance etc.  Just trying to get some other ideas on if maybe there's a better way to go about this setup.
0
Hi,

I'm a network manager for a school and one of the heads of year has asked me to come up with a solution for him.

Essentially he would like to photograph the students work at various stages but simplify the process of saving the pictures to each students folder.

Is there a program, script or something similar that will allow you to go into a folder in a windows environment, take a picture with a webcam or smartphone and have it automatically save to that location? I might be thinking of this backwards but the most simple way I can think of to do it is:

Create folders for each student on a public drive on the server
Have the teacher take pictures of the work with a webcam or similar
Drag and drop the photo to the relevant students folder

Is there a more straight forward way?

Many thanks

Simon
0
Can someone point me to how to go about creating a sharepoint list form with a repeating and non repeating section?
0
I'm hoping someone can help with this problem.  I have a computer running Windows 7 Enterprise and for some reason I can't update/change the delimiter.  I will navigate to Control Panel/Region and Language/Additional Settings/ then go to List Separator.  There I updated the character from "," to "|" then clicked Apply.  I then clicked OK to close the window.  When I would click Additional Settings again to confirm the List Separator was "|" I found it is not and it was changed back to ",".

Has anyone ever come across this problem?  I've asked 3 Helpdesk guys, 2 application/desktop support managers, 2 developers, and 3 finance analysts and none have been able to figure out why the change won't save properly.  We know it this change can be done since I have another computer with the exact same OS and I can make this change. So since I know this can be done it makes it even more frustrating.  

So if anyone has run into this or know how to resolve this please let me know.  Even if you have a theory or suggestion please let me know.  I'm stuck so all suggestions are good ones to me right now :)
0
I'm trying to figure out how to have wildcard sub-directories on my webserver. In example:

domain.com/1/weiurfda83/
domain.com/1/weiu9234usd/
domain.com/1/fj4329fj/

would go to domain.com/1/ without redirecting

Also

domain.com/1/weiurfda83/1.jpg
domain.com/1/weiu9234usd/1.jpg
domain.com/1/fj4329fj/1.jpg

would go to domain.com/1/1.jpg without redirecting.

Any help would be appreciated, thank you!
0
Hello,
I have tried to read the threads on here but I just can't figure out how to create my chart.  In my main report I have subreport data that is added to my main report data. I am determining how many deals each person has; the main report has full deals and the subreport shows the half deals I am adding them together to give me a variable for Total Deals, which is the value I want to chart on. Of course when I go to chart it, I only get the full deals.  I have read where you should put the chart in a subreport because of the way Crystal evalutes.  But I don't understand how that works.  Subtotals are always calculated last.  So how do I ever get the subtotal variable in the chart?  Banging my head on the wall.....
0
New feature and membership benefit!
LVL 10
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Hi
Having difficulty connecting a fibre cable in an old Mill. Fibre Cable could be 15-20 years old. It has male SC connectors at each end, which go into an 10/100 TX to FX Ethernet converter, with a single Ethernet port. These units are old and the power supply on it has failed a few times.
 I am replacing these units with 2 x Zyxel GS1900 10H using some HP transceivers with LC connections.
I bought some LC to SC male to male fibre patch cables  and 2 x SC to SC female couplers. When I connect both switches together on a table using the 2 patch leads and one coupler everything works, lights on both fibre modules on the switch are working and connection is good.
However, when I put the setup in the mill it doesn't work. Tried reversing A & B at either end, but no light comes on the switch for the transceivers. Put back the old modules and all OK. Any help much appreciated.
0
I am at long last trying to learn VBA, and have a Kindle version of Excel VBA Programming for Dummies by John Walkenbach. I have followed exactly the instructions he gives for creating the simplest of macros to create my name and the date, in bold text and 16pt. I followed the instructions EXACTLY, and do not get the expected result. I attach my spreadsheet with this Question, and also a screenshot of the Visual Basic Editor shown in the Dummies book.
What have I done wrong? I want to be able to go through this book and learn VBA, but with this bad start I am already foxed.
Any ideas?Macro-Lesson-No.-1.xlsmThe 'Dummies' VB Editor page screenshot
0
My table X has 1 billion records it is partitioned  by range using a surrogate key.table has 250 partitions.
I need to extract  209 million records (scattered in all partition) from X and insert into table Y
I need to process multiple partitions (say 5 at a time) of table X at one go and store it in table y.
Could you please provide sample query for the same and let me know multiple partitions permissible limit.
For example
Insert into table Y from partition 1 to 5 of table x
0
When we go to print to PDF a word document nearly everything prints fine.
There is a area of the right side of the page that has some border coloring that isn't following the pdf. I believe its shading.

We highlight a couple of values with green but they don't come through as shaded when we convert the word document to a PDF.
I have gone through and tried to adjust acrobat and word settings. But the document conversion still doesn't appear to be working.
0
For example as per attachment, i would like a  function that looks at a single occurrence of females first on the management level field and Gender field and gives an additional column a label for example VP Black women, and at the same time look at the occurrence of both male and female and the management level and gender field and give a label/column field of for example VP Black. I would like to use this label or column in SSRS to show a field grouped by females only and a combination of males and females. Your assistance will be highly appreciated.

for example, the query i had in mind would go like this. Excuse i am a complete novice

select [Management level],[gender],[Corporate grade]
case when patindex(%Black%,[Management level]) AND patindex(%Female%,[Gender key]) the 'VP Black women' else 'VP Black'
0
There are descriptions for switching back to classic on youtube but it does not appear for me.

The same google account has the old classic view on other computers

How can I switch back to classic?
0

Golang

194

Solutions

521

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.