vendredi 1 septembre 2017

git - track contents of folder outside that folder

I wish to track all of the contents of my public_html folder, outside of my public_html folder. I know it's possible as I've seen it done before, but cannot remember how to do so.

I need the repository to think that it is inside of public_html, when it's actually outside of it.




Better understand how internet works

I'm looking for an online course / reading material to better understand how the Internet is organised. I have no problem using the Internet, but there are many seemingly basic concepts that I don't understand, such as webserver, ISP provider, web hosting provider, internet protocols, and many more. I have found that looking up all these concepts one by one on Google only leads to further questions and believe that a single comprehensive material will be more helpful.

The reason why I want this is primarily general interest.




HTML input type number format large number. Introducing space or other separator

I am presenting the user on one device with a large number, like this:

123 879 233 223 211 782 782 

The numbers are presented in chunks of three, as can be seen.

Now the user is supposed to enter these numbers on another device.

I would like to present them the same way as he/she are typing them.

So I CURRENTLY have a

  input type=number pattern='\d*'

I would like it to basically be (pseudo) :

 type=text keyboard=numbers pattern='[0-9]{3}[0-9]{3} ...' 

The type number is useful on mobile devices because it brings up the numbers keypad only which in this case is more relevant and user friendly.

1) Is there a way to get the numbers keyboard for a standard input type=text?

2) If not, is there a way to format the numbers entered into the numbers input field?

3) If not, can we fire all people involved with W3C due to incompetence? Rather than keeping the input type=text they could have introduced pattern allowed on that, and allowed for an attribute that says, keyboard=numbers.




Is there a way to drag a file from a Web Application to a Desktop Application?

How programmatically implement a way to drag a local File from a Web Application to a Desktop Application?




How to implement and hide admin zone on the website without login/registration system?


I'm new to web development, and I'm currently making a presentation website(home, services, news, vacancies) for a small company. I'm using Node.js,Express and MongoDB.

The client wants to manage certain content on the website, therefore there needs to be a dashboard, where only admins could login/register. But website design does not provide any login/registration system for users.

The question is, where do I put a dashboard and how should I hide it from ordinary users? Should I just use url, like mysite.com/admin, which should be typed by the admin, whenever he wants to get to the admin login/dashboard zone(it seems quite unsafe, since everybody on the internet could type that and get to the login form)? Or maybe I should make a separate desktop app for managing website content?

How should I approach this problem, what are the best practices?

Thanks!




Push data to web socket by triggering externally

I want to push data to to all the connected socket when a rest api is called

I have a express based node js application.

On App launch, I create the socket server as mentioned in the docs.

And when the rest call is made, am pushing the data to socket client as

io.sockets.to('client_name').emit('message', 'Some message');

The problem is, this works fine, when I start the node/socket server and launch the client.

But when I restart the node/socket server , the client no longer receives the message. I will have to reload the client to start receiving the message.

What could be the issue




App development and how its useful?

How app development service are helping the humans in their day to day activity?