mardi 27 avril 2021

CSS debugging on Macbook for different Windows laptops

My web pages being developed on Macbook breaks on windows laptop(margin and padding are abnormal).

Any way of checking my css during development on different screens ?

PS : Browser is same (Chrome).




How do I show the files of a FTP directory on a wordpress page and make it available for download?

So I got a task in which I need to make a download page. The files for that download page are on a ftp server and when a new file gets uploaded to the ftp it should be automatically updated.

I looked for plugins but I didn't really find any. I got the word press download manager and the automatic ftp add on. With that I automatically got it onto same ftp on which the website is, but that is still not shown on the page.

Do you have any idea of a plugin or a way on how to do that? (or maybe even on how to do it with wpdm?)

I really feel like I searched through 50% of google and don't know what else to do to get that task done. Thanks in advance.




lundi 26 avril 2021

Как в cookie хранить значение checkbox, чтобы у сайта была возможность вкл темный режим django

мой инпут☝

views.py👇👇

def layout(request):
    form = UserLogin()
    return render(request, 'layout.html', {'user': form})



How can I send data from Server to Client without GET request from the client?

(Sorry for my bad english)

Hi! I asking me a question... If I want to create a chatting web-application with NodeJS, how can I send data from the server to the client without GET request from the client ?


(example)

That I want :

Server - WRITE -> Client

That I know :

Client - GET -> Server - WRITE -> Client

The major problem with the second one is that I need to refresh data all the time. I search for a solution OTHER than Socket.IO, but it seems to be impossible or very complicated :/

Please help me :c !




Web developer job interview questions

I was given two questions required to submit prior to the interview. If you could give me some ideas it'd help me a lot. Thanks.

  1. One is in the situation where Restful API has to be provided but the server is not ready or fully developed yet. Then in this case, how can one provide service to Front-End first?

  2. One is in the situation where database isn't ready or fully developed yet. How then can one find the way to test whether his or her developed service is working well with the database?

Thank you.




RSS from web app - CORS problems - simple solution [duplicate]

I want to add RSS to my webApp.

I encountered this “CORS” problem which cause the request to be failed (in the dev env anyway),

Access to XMLHttpRequest at 'http://rss.cnn.com/rss/edition.rss' from origin 'http://localhost:3007' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

and I’m aware to such solution of using “CORS” proxies, or create one proxy by myself.

There are problems with such online server since, it’s restricted, I need to request temp access each time.

https://cors-anywhere.herokuapp.com/

My question is how do I should do it?

And why this problem has no other simple solution that can be implemented in the code level?

The web is full with “simple data” pages which CORS same origin restrictions aren’t relevant there. To open new proxy only for access data from localhost seems exaggerate task in my eyes.




Lateral distance inside flex

There is a site Test site. How in the mobile version to set the lateral distance inside the flex containing the text Internet shop and an arrow rotated by 90 degrees? For an online store, the distances to the left and top are 15px and 25px from the contact block, for the down arrow, the distances to the right and top are 18px and 30.62px from the contact block.

What is the default distance for justify-content: space-between?