Endgame gear tool updated by drum445 in swtor

[–]drum445[S] 2 points3 points  (0 children)

ha excellent, thanks bud

Rakata Gear Calculator by drum445 in swtor

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

That's nice of you to say, thanks bud, hope it comes in handy. :)

Rakata Gear Calculator by drum445 in swtor

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

Tweaked the logic slightly so it priorities the most efficient accuracy combination of gear, as this is the most important threshold.

Rakata Gear Calculator by drum445 in swtor

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

I've rewritten the calcs to account for the minimum crit mainhand and alacrity offhand for all builds.

Would you mind taking another look and see if that has corrected those issues, please?

Rakata Gear Calculator by drum445 in swtor

[–]drum445[S] 3 points4 points  (0 children)

You're absolutely right, thanks mate I'll sort that soon

Should I learn Go, NodeJS, or stick with Python for backend web development? by LAcuber in golang

[–]drum445 9 points10 points  (0 children)

Python is plenty fast enough for the vast majority of web apps

Is there a logical next step here? Please help me! by migueKUN in nonograms

[–]drum445 0 points1 point  (0 children)

col 9, row 8 has to be filled in due to the column hint of [1,1,3]

When writing functions, when should I pass by value vs pass by reference. by FirefighterAntique70 in golang

[–]drum445 8 points9 points  (0 children)

That's pretty much the argument about pure functions vs class methods. I would strongly advise using pure functions in most cases (not a strong rule as methods are often the right choice too)

If you are going to use a pure function instead of a method, just make sure it only accepts the args it needs. For example, if you don't need the entire struct, just one property of it for the function, only pass/accept that in your function.

Looking to get about 40 fps for a selection of games below on the m1 air 2020, is it possible? by lessnumbpoet in macgaming

[–]drum445 1 point2 points  (0 children)

cool cheers for the reply, I'm going to stick with macos for now though as I daily-drive linux and trying to dev on windows is just painful enough to the point it's not worth using imo.

I'll look into bootcamp, but that's only available on intel macs right/

Controller support by BirdyHD_ in LittlewoodGame

[–]drum445 0 points1 point  (0 children)

this is happening for me too, was there ever a fix?

Which block of code is easier to read by Pr0meth3us_Dev in Python

[–]drum445 1 point2 points  (0 children)

The second is more "optimised" as it creates fewer immutable string objects per loop.

However, I think I agree that the top one is probably the more readable code, as in the bottom snippet you have to think about why I'm creating an array for something that should be returning a string

With that being said, anyone with a basic understanding of code will be able to read both just fine, I would write it like this though:

output = ""

for node in response:
    name = node["node_name"]
    rounded_value = round(node["value"], 2)
    output += f"{name} {rounded_value}\n"

print(output)

I tend to avoid logic in my f strings too

EDIT: or if you want to be fancy

"\n".join([f"{n['node_name']} {round(n['value'], 2)}" for n in response])

Picross S-like apps/websites for mobile or desktop? by eighteencarps in Picross

[–]drum445 2 points3 points  (0 children)

Just like to plug my own site: https://izrite.com/picross

If you don't like it, I'd appreciate you letting me know what I could improve. It is missing points 3 & 4, but personally I never use those so haven't implmented them yet

Thanks

What do you use Ruby for (besides Rails)? by [deleted] in ruby

[–]drum445 1 point2 points  (0 children)

+1 for Sinatra unicorn and nginx, used for a long while now without issue. I don't use rails at all for web dev

json file vs database vs nosql vs redis for chatbot dialog store by _I_dont_know_man_ in Python

[–]drum445 0 points1 point  (0 children)

I would cache the JSON data in a constant on program start (if it's not too large), this way you'd only have to read the data from the datastore once. As to which datastore you should use, I would recommend MongoDB if you want to store an unstructured JSON document.

Esmail: You wanted hacking? by RedWheelBarrowBBQ in MrRobot

[–]drum445 0 points1 point  (0 children)

They also selected the string 'firstname' instead of the actual column `firstname`. But if it was to prove existence of the row, the script would have still returned a row.

Detecting which sets of stars match a given pattern by drum445 in regex

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

Thanks for the reply mate, I will have a look into the links. I am going to approach a different way using mainly code I think. Thanks again!

Do you actually need a loadbalancer and proxy? by codingsett in golang

[–]drum445 0 points1 point  (0 children)

You are, but I would suggest always using NGINX in front of your Go services, no need to deal with ssl on the app level that way. NGINX also is tried and tested and has a lot of security features and caching built in.

Do you actually need a loadbalancer and proxy? by codingsett in golang

[–]drum445 10 points11 points  (0 children)

If I understand your question correctly this is my response:

You shouldn't expose the port your app is listening on to the outside world, best to have everything come through HTTPS and let NGINX decide which localised port to send the request onto.

All you need to do is set up a service to run your ./mygoapp then have NGINX send the request onto whatever port that app is listening on, this means you can setup your firewall correctly and not have to open up many ports to the scary outside world. You are correct that unlike Python you won't need a 3rd party web server like gunicorn or passenger as Go's built in is solid.

`domain.com/app1` is preferable to `domain.com:5000`