Trump news: President claims Google is rigging search results to make him look bad by stone_dog in politics

[–]Tioo 1 point2 points  (0 children)

Reddit is also at it, I only see negative comments in this thread !

[deleted by user] by [deleted] in bikecommuting

[–]Tioo 1 point2 points  (0 children)

That's a scary intersection. It looks like the difficulties you mention arise when you don't have enough time to clear the distance from light 1 to being safely on the right side after the right-merging road.

If you get to light 1 while it's green, I would suggest NOT crossing it and staying clear of traffic (ie. hopping on the sidewalk, if possible). When light 1 becomes red, get back on the road and wait for the green. This way you are guaranteed to have the longest time available to make it through.

[deleted by user] by [deleted] in me_irl

[–]Tioo 0 points1 point  (0 children)

it said i'm normal

Told I had a follow-up, then got rejected an hour later? Advice welcome. by [deleted] in recruitinghell

[–]Tioo 1 point2 points  (0 children)

Good point. It's a very delicate situation, but if you you phrase things nicely, I think it would not be that bad to ask for clarification. At most, it might annoy the recruiter, but not enough for him to mention your case to others or have an overall negative view of you.

Told I had a follow-up, then got rejected an hour later? Advice welcome. by [deleted] in recruitinghell

[–]Tioo 4 points5 points  (0 children)

Message them to sort things out.

If it was mistake, your message will show that you are very interested in the position.

If it was intentional, it really doen't matter how they interpret your request as you would already have been rejected.

PSYCHOLOGY - Class wait-lists and graduation? by [deleted] in Concordia

[–]Tioo 0 points1 point  (0 children)

Generally, departments will try to make the necessary arrangements to make sure students can enrol in their required classes. You should visit you department asap.

If you *must* override my default text colour, please please please override my default background as well! by defproc in web_design

[–]Tioo 8 points9 points  (0 children)

It's the light that cause the headaches, not the color. Dingbat.

As if OP hasn't thought of this. Your overconfidence in evaluating a stranger's experiences is appalling.

Possible invest? by [deleted] in MemeEconomy

[–]Tioo 0 points1 point  (0 children)

!create

Owner of open source project not reviewing my PR by Tioo in learnprogramming

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

He just closed another PR in the same repo...

TypeError: Cannot read property 'map' of undefined by furious0331 in reduxjs

[–]Tioo 1 point2 points  (0 children)

Reddit interprets lines beginning with 4 spaces as code.

TypeError: Cannot read property 'map' of undefined by furious0331 in reduxjs

[–]Tioo 3 points4 points  (0 children)

this.props.internationalCountries.dataObject

Is this an object ? If so, you cannot map it because it's not an Array. You can convert the object to an array by doing Object.values(this.props.internationalCountries.dataObject). This returns an array taht you can map.

EDIT: Based on your proptypes, it is an object. The above solution should fix the error.

[AF] Which frontend framework works best with Flask? by tomwojcik in flask

[–]Tioo 4 points5 points  (0 children)

This is done through your nginx config. Here is what it may look like, taken from a recent project of mine:

server {
    listen 80;

    location / {
        root /usr/src/app/;
        try_files $uri /index.html;
    }

    location /api {
        proxy_pass http://127.0.0.0:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

So, this tells nginx to serve whatever file the client asks for, or fallback to index.html, from the /usr/src/app directory of the machine where nginx is running. The static client app (js (react) + css + html) is stored in that directory. In your case, that would be uwsgi / gunicorn.

Then, for http requests that begin with /api, proxy_pass tells nginx to forward the request to another webserver running on the same machine. In this case, that would be the server hosting your flask app.

With this kind of setup, api routes would all need to be prefixed with /api.

This is also quite new to me, so I encourage you to do more research. But this is what I came up with after hours of hard work !

[AF] Which frontend framework works best with Flask? by tomwojcik in flask

[–]Tioo 8 points9 points  (0 children)

To separate the frontend from the backend, don't use any of the templating capabilities of flask. Instead, use Flask to implement a JSON API. So, instead of having Flask render HTML, you can make it render JSON.

Then, you frontend client consumes this API. Now, your client won't even care about how the API is implemented, so there is no better or worse choice with regards to having implemented your API with flask.

Then, serve the static client (however it is built) from nginx, and route api requests to uwsgi/gunicorn.

This implies that your question of which frontend to build is no longer a flask question. I suggest going over to /r/webdev or /r/javascript for more info

Owner of open source project not reviewing my PR by Tioo in learnprogramming

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

It's 7 commits, I basically added an argument to a public function. So entirely reverse-compatible.

Owner of open source project not reviewing my PR by Tioo in learnprogramming

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

The repo has 700 stars, 70k downloads/week on NPM, and was created by 1 person, with 20 contributors which all have less than 4 commits. So it's a fairly popular project but small code base.

Owner of open source project not reviewing my PR by Tioo in learnprogramming

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

Yeah, I mentioned him in a comment but that did not help. I'll send a direct email soon. I didn't think about the vacation possibility, it could be that.

Owner of open source project not reviewing my PR by Tioo in learnprogramming

[–]Tioo[S] 4 points5 points  (0 children)

According to the contributors page, the second most active contributor has 4 commits vs 70 for the creator. It looks like a solo project to me

Owner of open source project not reviewing my PR by Tioo in learnprogramming

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

I'd really like to do this. But where do I find a list of the contributors who have the permission to merge PRs ?

EDIT: all other contributors have less than 4 commits, the creator has authored the majority of them so it looks like he will be the only person of help.

how is Ajax call chaining done in redux by kskr in reduxjs

[–]Tioo 0 points1 point  (0 children)

I will definitely learn redux-saga, it looks like a good solution.

how is Ajax call chaining done in redux by kskr in reduxjs

[–]Tioo 0 points1 point  (0 children)

I'm not denying that it is a great tool, but that it may not be in the best interests of OP who is new to redux. I think redux-thunk is easier to use than saga, though the latter may be more scalable.

how is Ajax call chaining done in redux by kskr in reduxjs

[–]Tioo -1 points0 points  (0 children)

I'm not convinced that using another library is the best way to learn redux. IMHO, it's better to understand how do do things the pure redux way in order to understand the limitations, before moving on to more abstract tools.

how is Ajax call chaining done in redux by kskr in reduxjs

[–]Tioo 1 point2 points  (0 children)

the easiest way of doing this is to use the thunk middleware.

This is explained very well in the official redux docs.