Showing posts with label Tricks. Show all posts

Making Images Fit in Post Body on Blogger

Hey Guys its Dharun MK ,If you are working on a responsive design for your Blogger blog, or you are just tired of resizing your images in post editor to fit in the post container then this tutorial will show you an easy way to make images fit with it's surrounding.

This problem occurs often when you try to post images of the dimension larger than your content area or you are just using a responsive layout and when it down-sizes, the images overflows the content area.



Before you continue with the tutorial, check the demo:
Demo: Without the CSS Demo: With the CSS

In the first demo, the image in the container overflows because the width of the image is larger than that of the image, but in the second demo, if the image width is greater than the container's, it will fit itself to the container.

The Code!

All this can be achieved with a small block of CSS code. Before I start giving you lectures on how this works, here's the code for you to use (can be used in most Blogger Templates, but you might need to change the selectors if you are using a custom designed template):

?
1
2
3
4
.post-body img {
    max-width:100%;
    max-height:auto;
}

Now you just need to apply this code to your blog

How does it work?

If you are not a web designer or coder, then this might all seem like a magical charm to you, but it's just code, code that's made to make your life easier. Well, so if you are ready to get bored then I am starting my chapter on CSS.

What actually does the magic is the max-width CSS property which gives any element a maximum width limit. So if you specify an element the the maximum width of 200px, it wouldn't exceed it. The 100% value tells the browser that the element(s) must not exceed the full content width of the container.

The max-height property helps in keeping the original proportion of the image intact. To know more about what would happen if you specify a value in percentage then try and check the results ;)

Easiest Way To Use WhatsApp on PC using firefox

Using WhatsApp on PC has been really a hot topic, one obvious answer is to use an Android emulator and then use WhatsApp, but it has its own difficulties. I will show an easy way to use WhatsApp on PC or even Mac.

I don't usually write about such things on my blog, but the method I am using is closely related to one thing I love the most, and that's web technologies.



The most popular method and the only one known to be legit is using the Bluestack Android Emulator, then download WhatsApp and use it, but getting Bluestack to work on your system is a challenge in itself, and if you have a system with old graphics card or low memory then you have no chance of getting it work!

How? Let's get this started!


Let's first compare the size of things you need to download to get started with using Whatsapp on PC:

Firefox Method : 87MB (Firefox OS Simulator Download) + 38MB (Firefox Browser Download) + 3MB (ConnectA2 App) = 128MB, and no need to download Firefox if you already have Firefox > 32 (latest version)

We will move ahead step by step, as even this isn't easy, just require proper concentration on what you are doing.

1. Download Mozilla FireFox 32+

If you already have the latest version of FireFox then skip this step, else go to http://www.mozilla.org/firefox and download and install the latest version of Firefox on your computer.

2. Installing Firefox OS Simulator

Using your Firefox browser, go to the following URLhttps://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/ and install Firefox OS 2.0 or the latest stable release (note: downloading older version might not work properly.)



Running Firefox OS Simulator

We are halfway down there! If you have successfully passed the previous steps then bravo, the next steps are really easy.

In Firefox, open the App Manager from Tools -> Web Developer -> App Manager 

Now start the Emulator by click on the blue "Start Emulator" button at the bottom menu


You are now ready.. select the Firefox OS 2.0 or any version of emulator you have installed and a new window might open:


Installing ConnectA2

Whoa! See you are using a mobile OS, that's the fun of Firefox OS simulator. Unlock the lock screen and use it the way you would use any other smartphone OS.

You would need ConnectA2 app to use WhatsApp, so open the Firefox App Marketplace


After it's downloaded, open it and enter your country and phone number, you will be sent an SMS for verification. Enter the code and you are ready to use it!

To add new contacts in your chat list you first have to add that contact in the Contacts list on the Firefox OS. Use the Contacts app to add contacts and then you can simply add them in your WhatsApp.

Confirm Friend Request on Facebook All At Once

Popular on Facebook? So you have got 100s of friend requests pending on your Facebook profile, confirming them one by one can be a pain. This small block of JavaScript code can save you time and energy.


Before we start I want to tell you that it's not guaranteed this code might work in the future. If Facebook's website structure changes, there's a possibility that this code might become obsolete, but that doesn't mean you can use a script to do that, we will work on a new script and update it on the blog.

Last Tested: 10 Apirl 2015 (Works)



But for now this code must work perfectly for confirming all the friends request at once. Login to your Facebook profile and go to the friend requests page where you can view your pending friends requests, use either Mozilla Firefox or Google Chrome or Safari.

Keep showing up more friend requests pending by clicking on "Show more" button until you reach the end.

JavaScript Code by Dharun MK

?
1
2
3
4
5
6
var confirmBtns = document.getElementsByTagName('button');
for (var i = 0; i < confirmBtns.length; i++) {
    if (confirmBtns[i].innerHTML == "Confirm") {
        confirmBtns[i].click();
    }
}

Copy the JavaScript code

STEPS


To open Developer Console

Press CTRL+SHIFT+J (for Chrome), CTRL+SHIFT+K (for FireFox) to open the JavaScript Console. 


Paste the code in the console and press ENTER to run the code. If done correctly your pending friend requests will get confirmed one by one in a matter of seconds.

What is Trojan horse virus and how to Remove it.



Are you facing virus threats on your computer? Is your computer behaving abruptly or are you the victim of a disk crash?  Is your computer hacked by a Trojan horse virus attack? A Trojan horse virus attack is one of the most dangerous threats to your computer and needs to be fixed immediately. If it is not protected on time, then the virus can lead to failures in connecting to the IRC network or even worse can lead to your computer hacking and then your computer might be used by some anti social elements in shaping some criminal attacks.

About Trojan Horse Virus


Before knowing how to remove this evil threat first one should know what actually a trojan horse is? It is a security breaking program, also malicious to your computer and is disguised in some benign object. It can be downloaded unknowingly through any document, executable, zip, movie or music file and unleashes a dangerous malware into your drive on executing the files.
This malware can completely wipe your disk or can even send your credit card details and passwords to any stranger on the web. It is not at all operating system specific. It can affect any operating system but affects windows more promptly due to its popularity and weaknesses. This is a silent attacker and many people come to know about its attack after it has infected other connections.

How to Remove Trojon Horse Virus


  • There are many ways one can avoid itself from being a victim of this malicious virus but the best is to be attentive in downloading and executing files form an unknown source or person and also doing a background check of it, if downloading from a known source. But if you have already been a victim of it then you need to take immediate steps to remove it from your drive before it creates some major problem. You need to repair and then reformat your system completely to remove all malwares which may take from several hours to several days of time.
It is quite possible that the removal has not been done properly and may lead to coming back of the virus again and again in such cases you must take stronger measures to curb this problem.
  • Firstly you need to have anti-virus software installed in your system and that too an updated one or else they will miss the latest species of Trojan horse. Anti-virus software helps prevent the system from many Trojan viruses. Then make sure you have updated your operating system as well with all new security patches.
  • One may also have to install Anti-trojan programs like The Cleaner which specialize in Trojans. Once it is installed reboot your computer in safe mode and use the cleaner to clean all registries and drives for any Trojan suspected. Make sure the internet is unplugged while cleaning. Once cleaning is complete reboot the system again.
  • After using the cleaner make sure that you have updated your operating system and have changed all the passwords. Once the system is repaired make sure to take a backup of every data and reformat the system completely.