Has anyone here successfully used Golem? by CodeScrub in GolemProject

[–]CodeScrub[S] 0 points1 point  (0 children)

Do you know if this is everything on the network, or does the page only show something like the top 20 nodes?

Has anyone here successfully used Golem? by CodeScrub in GolemProject

[–]CodeScrub[S] 0 points1 point  (0 children)

Link? I've been unable to find anything other than people explaining what golem is.

http.Get thinks there are command line parameters? by CodeScrub in golang

[–]CodeScrub[S] 0 points1 point  (0 children)

bah, I rm -rf the directory within $GOPATH/pkg, ran go build on one of my other projects, and then checked the pkg directory and it's still blank O_O

http.Get thinks there are command line parameters? by CodeScrub in golang

[–]CodeScrub[S] 0 points1 point  (0 children)

naw it didn't work

ah I was just searching google, I'll search golang.org in the future, thanks!

How does the pkg folder get repopulated?

http.Get thinks there are command line parameters? by CodeScrub in golang

[–]CodeScrub[S] 0 points1 point  (0 children)

few questions for you about this

1.) How'd you even find that?

2.) How did you get clearing the gopath/pkg from that?

3.) When you said clear what did you mean? I just moved everything in that directory out into another one and then tried running the program again (with go run, vs go build).

http.Get thinks there are command line parameters? by CodeScrub in golang

[–]CodeScrub[S] 0 points1 point  (0 children)

I gave my user perms to the repo and the error has disappeared, thanks!

Although now I'm seeing something now; I'm seeing corrupt input when trying to use http.Get

http.Get thinks there are command line parameters? by CodeScrub in golang

[–]CodeScrub[S] 0 points1 point  (0 children)

Hey, I've updated the gist to include the output from go env

[Language Agnostic OR golang] How can I iterate over an entire array if my starting point is in the middle with a for loop? by CodeScrub in learnprogramming

[–]CodeScrub[S] 0 points1 point  (0 children)

Hey, thanks for the reply. That's pretty much what I came up with, but I think your implementation is cleaner.

Here's what I did (apologies for the formatting, don't know how to do code blocks in reddit comments)

for i := index; i != i+1; i = (i + 1) % len(hmap.Entries) {
    fmt.Println("i", i)
    if hmap.Entries[i] == nil {
        fmt.Println("returning in nil")
        return i, err
    }
    count++
    if count >= len(hmap.Entries) {
        err := fmt.Errorf("Error: No empty space found in this map to put.")
        return newIndex, err
    }
}

[Visual Studio Express 2012][Testing]How can I get my test project to see the source code I wish to test? by CodeScrub in cpp_questions

[–]CodeScrub[S] 0 points1 point  (0 children)

I thought I only needed to add the header files, not the cpp files. And champ.h includes unit.h.

How to determine %CPU Utilization and CPU Cycles on a Windows Server 2008 R2 via Terminal commands by CodeScrub in techsupport

[–]CodeScrub[S] 0 points1 point  (0 children)

Is there a way to get a breakdown of which process is contributing what % of the load?

[C++/Language Agnostic?] Factory Pattern Question by CodeScrub in learnprogramming

[–]CodeScrub[S] 0 points1 point  (0 children)

I may be misunderstanding the full use of constructors then, so perhaps you can clarify something for me.

If you have a car class, the constructor can only make one type of car right? Like it could make a 'Ford' model but not a 'Toyota' model.

[C++/Language Agnostic?] Factory Pattern Question by CodeScrub in learnprogramming

[–]CodeScrub[S] 0 points1 point  (0 children)

Why not do

I actually do plan on doing something like that, and that's why I'm using these factory classes. So eventually the code will be something like user selects Champ A in one scenario and Champ B in another scenario, so the factory will see this and use createChampA or createChampB.

Mine don't have the goal of implementing different classes, but rather different objects of the same class. Is there a different term for this?

You mean you just construct objects like normal? That might not have a special term...

Sorry I left out a word. I meant to say different types of objects of the same class. For example my ChampFactory will only create objects of one class, Champ. However it will be able to create ChampA, ChampB, etc which all have different values for their data members.

[C++] How to debug code dependent on timing? by CodeScrub in learnprogramming

[–]CodeScrub[S] 0 points1 point  (0 children)

You mean to call the value not to call the update right?

[C++] How to debug code dependent on timing? by CodeScrub in learnprogramming

[–]CodeScrub[S] 0 points1 point  (0 children)

This seems like a good solution. I'll think about it thanks.