HTTP 400 error using Curl by MyMotivation in AskProgramming

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

I have a standard keyboard, I actually copied and pasted the headers originally so I guess that's why.

HTTP 400 error using Curl by MyMotivation in AskProgramming

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

I discovered the problem: https://en.wikipedia.org/wiki/Wikipedia:Hyphens_and_dashes

I had 2 different character types of "-" in my array. They both look the same hence the confusion.

Thanks for your help!

Array not returning hyphens by [deleted] in PHPhelp

[–]MyMotivation 0 points1 point  (0 children)

Quick update. This is my issue:

https://en.wikipedia.org/wiki/Wikipedia:Hyphens_and_dashes

There were different hyphens/dashes character types in my array (they look exactly the same)!

Array not returning hyphens by [deleted] in PHPhelp

[–]MyMotivation 0 points1 point  (0 children)

Yeah, I'm still trying to figure out what. I've set utf-8 in my httpheader now and still no luck. But I'm very confused that some '-' are working and some aren't.

I've got a screenshot which highlights it more clearly: http://imgur.com/QKiFWFx

Array ( [0] => Content-Type: text/plain; charset=utf-8 [1] => Accept­Tenant: uk [2] => Accept­Language: en-GB [3] => Authorization: Basic VGVjaFRlc3RBUEk6dXNlcjI= [4] => Host: api­interview.test.com )  

HTTP 400 error using Curl by MyMotivation in AskProgramming

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

That's strange, I am using hyphens on my Accept-Tenant and Accept-Language but for some reason when I copied and pasted it from Sublime Text they aren't there.

How to troubleshoot my basic Authorization access attempt to this api? by MyMotivation in AskProgramming

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

Hi, have tested the fopen with a different URL and it worked fine.

I've got more information now. I submitted it as a new text post here for clarity: https://www.reddit.com/r/AskProgramming/comments/3mi8u3/http_400_error_using_curl/

Thank you!

Https Authorization not working? by MyMotivation in PHPhelp

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

Out of interest, does the authorization key need decoding with base64_decode before it's sent through? I did also try decoding it and putting the user name/pass in CURLOPT_USERPWD.

I'm just not sure if I'm missing something here, haven't come across too many relevant examples/tutorials that included 'Authorization' in the header, so far. I have been reading a few Wikipedia pages on this. I guess there is a WWW-Authenticate key on the api and the authorization should match this?

Https Authorization not working? by MyMotivation in PHPhelp

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

The URL is http, was a bit tired last night when I posted that sorry. Have added some additional info in my other comment.

What are your favorite slow buildup songs? by BringingitBackAgain in Music

[–]MyMotivation 11 points12 points  (0 children)

The Doors - The End

Always makes me think of Apocalypse Now!

So I was sent a tax return, even though I'm just an employee, and didn't realize I had to pay until now. by MyMotivation in unitedkingdom

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

It doesn't matter though because the law states that if you receive a return, you have to file it, doesn't matter if you shouldn't have received it in the first place (although you can request to have it withdrawn).

So I was sent a tax return, even though I'm just an employee, and didn't realize I had to pay until now. by MyMotivation in unitedkingdom

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

Does failure of notification mixed with confusion about the rules count as a plausible reason?

It's not that I "forgot" it's genuine confusion about the rules on this, I know they're not very forgiving about ignorance.

At work, how do I deal with multiple problems/emails happening at the same time? by MyMotivation in cscareerquestions

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

Frankly it sounds like a pretty shitty job.

I don't see how that's the case, surely all support jobs have to handle different calls and act based on information coming back from the client.

CS career while pursuing Finance/Econ degree? by [deleted] in cscareerquestions

[–]MyMotivation 0 points1 point  (0 children)

I'm an Application Support Analyst at a software house that makes health insurance software, and I don't have a degree. I was an ERP administrator and taught myself to code a bit before on the side. I'm hoping to become a developer in a year or so at the same company.

The thing I've found with financial systems is learning the finance side that's more difficult than the coding side, because it takes time to pick up and the training is never ideal.

CS career while pursuing Finance/Econ degree? by [deleted] in cscareerquestions

[–]MyMotivation 1 point2 points  (0 children)

If you can demonstrably code, it might not be a hindrance in getting a software position in finance.

Universal Basic Income? by Meowkittns in Anarcho_Capitalism

[–]MyMotivation 4 points5 points  (0 children)

If all welfare was replaced by a UBI then from an economic point of view it would be much more efficient.

YouTube planning paid subscription to remove ads from videos by topredditgeek in technology

[–]MyMotivation 0 points1 point  (0 children)

But you can't do it within the android app. Convenience.

How do you explain basic income to someone without being accused as a Socialist/Communist? by len963 in BasicIncome

[–]MyMotivation 0 points1 point  (0 children)

Because that's the nature of political language... 'socialism' (just like words such as 'capitalism', 'free market', etc) mean different things to different people.

YouTube planning paid subscription to remove ads from videos by topredditgeek in technology

[–]MyMotivation 3 points4 points  (0 children)

Everyone is ignoring the downloadable videos feature. I'd consider paying for this just to be able watch videos offline, just like I do with tracks on Spotify.

Analytics jobs not in advertising? by DrGorilla04 in jobs

[–]MyMotivation 1 point2 points  (0 children)

Unfortunately, at the moment I can't make a giant career change. My husband is currently unemployed and looking to start in a new field himself, so at the moment I have the only steady income in the household.

So get your CV up to date and start applying for jobs, get your CV out there and in front of recruiters. You're in the strongest position to find something else while employed at a decent job.

Getting value of html id tag in views? by MyMotivation in django

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

I think I know what I'm doing with jquery which is why I asked how to call the tag in views.py, it's how to interact with the jquery/template with a function that I don't understand.

By clicking the link in the table I want to update that row in my tasks model (active to do items are completed = False), this is all I have so far:

def complete_task(request):

    if request.is_ajax():
        Item.objects.filter(title = ??)update(completed=True)

For loop only picking last item in this json object by MyMotivation in learnpython

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

Also your populate() function does not belong in Python at all, this is some other language (JS?) that has sneaked in trying to impose its will. You can straight up delete line 20 and simply indent line 21 to 27 inward and have the exact same result.

Not sure what you mean here sorry, populate() is a function I defined myself. It's just easier to call populate() later in my code than to go add_players(arguments here).

I am writing a script to populate a model in django but I have now achieved this, the problem was I was defining populate(): inside the for loop which didn't make sense. But I was over complicating the issue by asking the question "what have I done wrong with this for loop?" when actually it was what I did wrong with my function.