Powering small DC load ( 1W ) using 220V AC supply
Let's do a quick analysis:

Note that the current into a linear regulator (like the LM7805) will be the same as the load current.

You need 1 W at 5 V, that means a current of 1 W / 5 V = 0.2 A

That current needs to flow through the 100 k&Omega; resistor, that means a voltage drop of 100 k&Omega; &times; 0.2 A = 20 kV across the resistor! That's not going to work.

The idea of that 100 k&Omega; resistor is to drop around 300 V (220V AC rectified gives around 311 V, 11 V for the LM7805 that leaves 300 V). 300 V / 0.2 A = 1500 &Omega;, OK.

But let's calculate how much power is lost in that resistor: 300 V &times; 0.2 A = 60 Watt !!!

That's a lot.

It is much more efficient to use a regular AC adapter (like the ones used to charge a phone) or a capacitive dropper circuit but do note that the capacitive dropper does not provide mains isolation; your complete circuit would be mains live and cannot be touched by humans while in operation and also cannot connect to phones, PCs and laptops etc.