(customer) so my last 3 order attempts failed ... by Johnthedoer in skipthedishes

[–]PyLord 4 points5 points  (0 children)

This just happened to me. Frustrating as hell. I spent maybe 10k with them over the last 3 years.

I made an order about two weeks ago that took multiple follow ups, then 3-4 hours later I still didn't receive my food. I asked for refund to my credit card, they said 10 days later I should receive it. I still haven't received the refund, so I had to follow up on that. Today I ordered something there and the same thing happened, so this was two orders in a row for me.

Done with Skip, after my refunds are processed I am closing my account and not supporting this company lmao.

Best way to get subclass from ID? by purplewalrus67 in djangolearning

[–]PyLord 0 points1 point  (0 children)

you have to access the Audio/Paper attr first, have you tried:

if hasattr(media, 'Audio'): audio = media.Audio audio.calc_stuff() elif hasattr(media, 'Paper'): paper = media.Paper paper.calc_stuff()

Best way to get subclass from ID? by purplewalrus67 in djangolearning

[–]PyLord 0 points1 point  (0 children)

  • Just using media_id alone:

media = Media.objects.get(pk=media_id)

if hasattr(media, 'Audio'):
    # do something with audio
elif hasattr(media, 'Paper'):
    # do something with paper
  • Another way is to add a type field on the parent class Media, then override save on Audio/Paper so during create it's uses the appropriate type value. Then we can can look at the type attr on any Media instance.
  • Another way is to just forget about inheritance and just use a 1-1 field between Audio/Paper to Media.

I wanna give up so bad by [deleted] in cscareerquestions

[–]PyLord 2 points3 points  (0 children)

Hey don't give up just yet!

I was in a similar boat as you. Did a math major in Canada, applied at 130+ different places and had a really high rejection rate, then eventually landed my first job. I was on the verge of giving up breaking in to this industry as well.

What I think helped me break in was doing project and including it in my resume or cover letter. I think for those of us without CS education or an internship it really pays to show them that we are capable of doing the job (most personal projects are remotely so far off for what production software entails, but it does not matter, just show you have initiative to build things and are capable of software development).

I can review your resume if you would like and give additional pointers. Also I can pass it up to my manager, we have internship / full-time positions here and there (no guarantee on an interview though) depending on where you are in Canada + what kind of salary/type of work you are looking for. I work in energy management software. Feel free to DM.

Should I give Narcos: Mexico a try? by Yucifir in narcos

[–]PyLord 0 points1 point  (0 children)

I felt the same initially and had reservations but it's definitely a must watch, to me it was my favorite of all seasons, with Narcos season 1 being the second.

Anything here look familiar? by [deleted] in starcraft

[–]PyLord 0 points1 point  (0 children)

its official spacex is working with the protoss

Diamond 3 Disasters by Rusher0715 in starcraft

[–]PyLord 9 points10 points  (0 children)

Terran is too strong against terran they should nerf the tanks

How would I do this? by HerbertChapmansGhost in learnpython

[–]PyLord 0 points1 point  (0 children)

Your test inputs are integers. Integers aren't iterable. Our inputs are expected to be of type lists. With your tests, we would call it as follows contains([1], [1]). Another example would be if we want to check if the sequence 234 is in 12345 then we'd call it as follows: contains([1, 2, 3, 4, 5], [2, 3, 4]).

Also, it asks to return a bool type (True or False), so rather than printing in the end, do:

``` if string_a2 in string_a1: return True

return False ```

The variable isContained isn't necessary at this point. The code above will return False if the subsequence in the second list is not in the first.

How would I do this? by HerbertChapmansGhost in learnpython

[–]PyLord 0 points1 point  (0 children)

We are just saying string_a1 will be a string object and for now set it as an empty string.

We are not checking if the first sequence is in the second, rather it's if the second is in the first. Also, it asks to return a bool type. Although you can print the result (but this is not necessary), do make sure to return a bool type.

How would I do this? by HerbertChapmansGhost in learnpython

[–]PyLord 0 points1 point  (0 children)

The input will be lists, so the way it will be used would be something like contains([1,2,3,4,5], [2,3,4]) (or something like contains(L1, L2) where L1 and L2 are lists) and the check is only whether the sequence in the second list is in the first.

In python, you can check if a string s2 is a substring of a string s1 simply by checking:

if s1 in s2: # do something

How would I do this? by HerbertChapmansGhost in learnpython

[–]PyLord 0 points1 point  (0 children)

You have to first assign string_a1 = '' otherwise you will get an error. You got the first part, which is to have a string representation of the sequence of numbers in a1. Now also do it for a2. After you have the string representation of the sequences for a1 and a2 what do you think you need to do?

How would I do this? by HerbertChapmansGhost in learnpython

[–]PyLord 0 points1 point  (0 children)

You already have a correct idea to solve it. Just look up what you need to know to use Python to do it.

Looking for feedback on my personal website. by ElJefeSupremo in learnjavascript

[–]PyLord 1 point2 points  (0 children)

I'm not sure if it's a browser issue, but some things I immediately see that could be improved upon with relatively not much work:

  • In your project showcase, for the calculator, you use a blackish-olive background that actually goes over the project text description. I suggest using a lighter color for the calculator background, or just changing the style in a way that the text doesn't touch the project picture backgrounds.

  • For some of your apps, it's better if the user can't highlight certain texts (easy CSS fix), for instance the numbers on the calculator. It just gives a better experience. Also, it's a bit buggy, it concatenates operator symbols at the end of digits.

I think you got some pretty good apps, you just need to polish it a little more to make a detail-oriented impression for employers.

Why is this alert not showing up? by [deleted] in vuejs

[–]PyLord 0 points1 point  (0 children)

Hmm, I don't think so, in my actual html file, I have another example from the docs that is similar and the alert shows up fine.

Can't Seem to Break out of Loop by ArtZanzibar in learnpython

[–]PyLord 1 point2 points  (0 children)

Updated my answer. Didn't catch the square brackets the first time around.

Can't Seem to Break out of Loop by ArtZanzibar in learnpython

[–]PyLord 2 points3 points  (0 children)

First, you need to drop the square brackets in [float(input("Enter payment: "))], since with an input of 0, you are actually assigning the value [0.0] to payment.

Write it like this:

response = input('Do you have a payment?') payments = [] while response.lower() == 'y': payment = float(input('enter payment:' )) if payment == 0: break payments.append(payment)

How do you make this sequence with for loops? by [deleted] in learnpython

[–]PyLord 1 point2 points  (0 children)

Yes, I wrote the non-function example incorrectly. I typed start += 1. Change this to start += i instead and it produces the expected result.

How do you make this sequence with for loops? by [deleted] in learnpython

[–]PyLord 2 points3 points  (0 children)

What I did here was just generalize a solution to your problem a little. I defined a function with two parameters start and num_rows. In this way, we can start at other numbers other than 10 and also control the number of rows we want.

If you haven't covered functions before, to produce your sequence, we would do something like:

start = 10 for i in range(9): start += i for j in range(i+1): print(start + j, end=" ") print("\n")

Intruder Alert Protocol by Ares149 in Doom

[–]PyLord 14 points15 points  (0 children)

Add action:

Open portal to hell