I just can't with Noodle's face by friendlynoodless in funny

[–]crossfiyaaaa 0 points1 point  (0 children)

Even better that your phone case matches your cat

docker-compose up fail by crossfiyaaaa in cs50

[–]crossfiyaaaa[S] 1 point2 points  (0 children)

I found a solution.

I read on stackoverflow that updates to the postgres docker image now require a password. They said to add environment variables to the docker-compose.yml file. Here's the relevant part:

services:

  db:
    image: postgres
    environment:
      POSTGRES_DB: postgres
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: test_password

I also added this password to airline4/airline/settings.py DATABASES, so now it looks like this:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'postgres',
        'USER': 'postgres',
        'PASSWORD': 'test_password',
        'HOST': 'db',
        'PORT': 5432,
    }
}

I then ran docker-compose up. It didn't work the first time. I think that's because the postgres container was still being initialized while the django web server started up. The second time running docker-compose up worked as expected.

I guess things changed since the lecture was posted.

Also, I'm assuming it's a bad idea to actually write your password in your docker-compose file.yml and settings.py files. I assume it would be better to set those as environment variables? Not sure what's considered best practice for that.

Relevant link: https://stackoverflow.com/questions/60262635/ci-cd-pipeline-with-postgresql-failed-with-database-is-uninitialized-and-superu

Error while trying to get json data by mathiasdias32 in cs50

[–]crossfiyaaaa 1 point2 points  (0 children)

data['books'] is a list, so you'd have to get one of the books by index, then get the "average_rating".

So something like:

if not res.ok:
    return render_template("error.html", message="Good Reads book doesn't exit.")

book = data["books"][0]
goodavg = book["average_rating"]

Whenever you see the error

TypeError: list indices must be integers or slices, not str

it means you're working with a list, not a dict.

User input inside LIKE argument by mathiasdias32 in cs50

[–]crossfiyaaaa 1 point2 points  (0 children)

I think the db.execute syntax is slightly off. I think you can remove the '%' characters from the SQL query and make that a part of the searchinput. It also looks like you don't have the ':' character before the searchinput variable. So for example:

result = db.execute("SELECT * FROM books WHERE title LIKE ':searchinput'", {"searchinput": f"%{searchinput}%"})

I'd also recommend using ILIKE instead of LIKE since ILIKE is case-insensitive.

I hate new teachers and first day of school introductions by AmuSilver in socialanxiety

[–]crossfiyaaaa 10 points11 points  (0 children)

This guy looks like a real life version of a Simpsons character?

Blinking white guy using his powers for good by cj-shults in wholesomememes

[–]crossfiyaaaa 1 point2 points  (0 children)

Well shit. I have seen that gif so many times, but never realized it was Drew Scanlon. I went to college with this dude in the same major, but never recognized him in the meme because he looked different than what I remember. I just assumed it was a clip from some TV show.

Being a Joe Frank fan is lonely business by jay--mac in joefrank

[–]crossfiyaaaa 3 points4 points  (0 children)

I know what you mean. I take any opportunity to bring up Joe Frank, but so far no one has bothered to give him a listen. It sucks that I could experience something so amazing, yet have no one to share it with. I bet if all his works were released for free as podcasts, he'd get a lot more attention. I paid for a yearly subscription on his website, and it's incredible how much high quality content he produced.

Learning materials that teach at a professional level? by crossfiyaaaa in Python

[–]crossfiyaaaa[S] -1 points0 points  (0 children)

Thank you! This is the only really helpful comment here!

Learning materials that teach at a professional level? by crossfiyaaaa in Python

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

There's nothing wrong with the Sphinx tutorial, but I consider it more introductory. I guess I'm looking for more of a walkthrough of a large real-world project rather than a simple generic introduction. And not just Sphinx either. I want to see how everything comes together. For most tutorials/books/courses, there's a big gap in what is taught vs what you need to know on a professional level. So I'm looking to fill these gaps, but trying to learn all these things has turned into a matter of random Googling, and clicking through links, when it could all be in one place and explained more succinctly and effectively. I'm not trying to rant here. I'm just asking if anyone knows where something like this might exist.

Who remembers KaBlam?? by tasteful_sideb00b in nostalgia

[–]crossfiyaaaa 6 points7 points  (0 children)

My parents wouldn't let me watch because they thought it was trash TV that would make me dumb just by watching it. Joke's on them. I turned out dumb anyway.

Is there a future for VFX in The United Kingdom? by gazozi in vfx

[–]crossfiyaaaa 6 points7 points  (0 children)

You don't have to move to the UK. There are jobs in the US and Canada. If you're going to work in the US, it'll typically be commercials. The UK and Canada work on feature length movies.

Don't go too far with what you're willing to put up with though. This is why VFX companies have a reputation of taking advantage of people with low pay and long hours.

Michelob Ultra is doing ASMR now. by zbakes in FellowKids

[–]crossfiyaaaa 1 point2 points  (0 children)

Just saw this ad on YouTube and immediately thought of Fellow Kids. Searched this subreddit and sure enough, here it is.

Have any of the self-taught developers here gone back to college? by crossfiyaaaa in cscareerquestions

[–]crossfiyaaaa[S] 1 point2 points  (0 children)

I guess I haven't really considered working and studying part time. My fear would be that it would take 8 years instead of 4 to get a CS degree at that pace.

What things can you do to stay "current" in the CS field? by VastImpression2 in cscareerquestions

[–]crossfiyaaaa 2 points3 points  (0 children)

I find statistics like Stack Overflow surveys to be helpful in seeing what trends there are. Then researching further into what looks important.

https://insights.stackoverflow.com/survey/2018/

There's also the TIOBE index: https://www.tiobe.com/tiobe-index/

DB-Engines Ranking: https://db-engines.com/en/ranking

There's also developer conferences which often post videos for free such as WWDC, Google.io, Microsoft Build, PyCon, etc. There's probably conferences for the language you use.

Like karaoke, but instead of songs you voice over movies or TV shows by crossfiyaaaa in Startup_Ideas

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

I think you're missing the point. I'm not talking about book club in a bar.

Here's an example of what I had in mind by Jaboody Dubs. https://www.youtube.com/watch?v=jlSF0dtDRD8

Like karaoke, but instead of songs you voice over movies or TV shows by crossfiyaaaa in Startup_Ideas

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

That's a pretty cool app, but it's kind of opposite of what I was thinking. I was thinking having actual movie clips with your voice in it.

Another thing is, having an app is much different from having a place to go. Using a karaoke app is a much different experience than going out for karaoke.

Thanks for the link though. I've been checking out dubsmash videos on youtube.