[-] Hammerheart@programming.dev 6 points 2 months ago

Thats actually not a terrible idea.

[-] Hammerheart@programming.dev 7 points 3 months ago* (last edited 3 months ago)

Damn, I wanted to mention sqlite.

[-] Hammerheart@programming.dev 7 points 3 months ago

Isnt that what stash is for?

[-] Hammerheart@programming.dev 7 points 3 months ago

what do you mean by the Fuck you pay me thing?

[-] Hammerheart@programming.dev 5 points 4 months ago

I think it's safe to say guns are an offensive weapon

[-] Hammerheart@programming.dev 7 points 4 months ago

Can you elaborate because this is not obvious to me. Maybe we sre thinking different things when we talk about "openness" in this context.

[-] Hammerheart@programming.dev 7 points 4 months ago

Thank you SO MUCH. This is exactly the kind of response i wanted, and also thought it would be naive to hope for. Seriously, you'rr awesome.

And i really appreciate how you even looked for something nice to say too. :)

[-] Hammerheart@programming.dev 6 points 4 months ago

What are some goos resources for learning jq? I really struggle when it comes to nested keys/values which obviously limits my ability to use it.

[-] Hammerheart@programming.dev 7 points 6 months ago

That was it! I moved the two lines above the .configure() call into the outermost scope, and it works now.

Should probably just bite the bullet and OOP it out. I was putting that off until I figured out how I wanted the whole thing to work, but it will probably be easier to just do it and change it as I go instead of trying to raw dog it for too long.

[-] Hammerheart@programming.dev 6 points 10 months ago* (last edited 10 months ago)

I started learning to program in February, which reinvigorated my love of computers. I discovered awesome new software like syncthing, and just recently started daily driving linix (debian 12) and its been great. Just little things like customizing my wall paper which i havent done for years. 2023 was a great year for me and tech.

Oh and i switched from chrome to Firefox, looks like that's been a common theme for the year!

[-] Hammerheart@programming.dev 8 points 10 months ago

I never got into Spotify. Soulseek is all I need.

[-] Hammerheart@programming.dev 9 points 1 year ago

I remember thinking, "i am not essential. I am expendable"

1

I am working on user authentication in Flask. I have my User class, which inherits from db.Model (SQLAlchemy) and UserMixins (flask-login):

class User(db.Model, UserMixin):
    id = db.Column(db.Integer, primary_key=True)
    email = db.Column(db.String(100), unique=True)
    password = db.Column(db.String(100))
    name = db.Column(db.String(1000))

and I create a new User object during registration:

        new_user = User(
            name=request.form["name"],
            password=generate_password_hash(password=request.form.get("password"),
                                            salt_length=8,
                                            method="pbkdf2:sha256"),
            email=request.form["email"])

Since I inherited from UserMixins, I started to get an "unexpected arguments" warning from pycharm when I create new_user. can someone explain to me why that is? If I don't inherit from UserMixins, the warning goes away.

3

So, it used to work just fine. Then jerboa became basically unusable due to some bug. That was a few weeks ago. I saw an update was available, so I thought to give it another try. It's much more stable after the update, and my lemmy.one account works just fine. But when I try to log in with this account on jerboa, I get an incorrect login error. I set the instance to "programming.dev" and I know I used the right credentials because my password manager filled them in, just like it does in the browser.

Any ideas on a cause or fix? It might be a jerboa issue but I don't get why it seems to only impact this instance.

1
submitted 1 year ago* (last edited 1 year ago) by Hammerheart@programming.dev to c/c_lang@programming.dev

I was looking over the first kata i did on codewars, and I thought it would be fun to try and solve it in C. The object was to return a string based on a boolean input. it took a lot of trial and error, googling, chat gippity, but I eventually got it to work. I am still focused on learning python, but I've had it in my mind that I should branch out once I've reached a competence plateau in python. I'm nowhere near that plateau yet, but this seemed simple enough to warrant the necessary investment in time to accomplish it.

// C:
#include <stdbool.h>
// FIRST EVER C PROGRAM
const char *bool_to_word (bool value){
// you can return a static/global string or a string literal
  if (value == 1){
  return "Yes";
    }
  else{
    return "No";
  }
}

I realize this is pretty trivial, but still, it's a milestone for me and I wanted to do my part to get the ball rolling on this community.

view more: ‹ prev next ›

Hammerheart

joined 1 year ago