Skip to main content

Posts

Showing posts from 2013

How To: Create Facebook App in 2 Minutes (With Pictures)

If you are assigned a task of working with an Facebook App and want to try-out by creating an App from scratch; Just follow these easy five Step and it will cook you a 'Five Step Facebook App' First of all Login to Facebook, check your updates and notifications ,When you get rid of repeated photos and notification; Go to the url : https://developers.facebook.com/   and start creating your Five Step Facebook App. 1. First Create an App on Facebook. For this Click on 'APP' menu from top-menu and then Click on 'Create New App' Step 1: Creating a Facebook App 2. As you will set the App Name and click on 'SAVE'. It will navigate to 'Dash-Board'. You can check your APP ID and APP Secret under Dashboard. Step 2 :  Dashboard | Facebook App 3. Now Click on 'Settings' from Left menu. You will be navigated to 'BASIC' tab. Here You should do some basic preparation for your App. Note APP ID : ***********      APP Secr

It Happens Only in India

What do you think is this ??? This image belongs to a famous temple  Maa Chamunda Tekri in Dewas . Generally its a saying in Hindu and Muslim religion that if you tie a thread or band in temple somewhere, it may get your 1 wish come true.  But till now I was believing and noticing this thing working with "Thread" only. Today I watched a gate of temple packed of small polythene packs. People are actually using incense sticks in temple and the polythene packet of these sticks to get their wish come true. Interesting isn't it . . . It happens only in India !!!

How To Eat Like Animals

No description required for this one .

A Roadside School In Ahmedabad

A road-side school in Ahmedabad(Gujrat) In Ahmedabad(Gujrat), It’s a school on road side started in 2001 by Mr.Kamal Bhai Parmar, now his son run this school. Beside the school is a main road, vehicles pass-away from there and near are the benches where students used to study. When its lunch- time , students get mid day meal here. The more important thing about this school is, all the students here having poor background and can't afford the fees/books/lunch, this all managed by the school owner himself. Definitely he is not making money out of it but creating some good wishes for himself . While writing the above line of this post it reminded me dialogue from a Hindi Movie ( Once Upon A Time In Mumbai ) where Ajay Devgan has a dialogue “Dua Me Yaad Rakhna” If you want to do something do it anyways !!!

How To: Set Connection Timeout in SQL SERVER

If you have just started SQL SERVER and frustrated because its asking you for username/password everytime you execute a query or try to open a window for new query. Then a simple reason behind that is connection timeout of your SQL SERVER(i am using 2008). Microsoft SQL Server Connection Properties Just follow these steps : Click on File -> Connect Object Explorer This will make Login panel appears again. Now Click on Connection Properties and set Connection Timeout to a bigger value(I set it here to 3600 seconds = 1 hour) This will only make you free from this issue only. I hope you'll find other issues to surf web in some time !!! :P

jQuery Menu

I was just surfing stackoverflow and found a question about Navigation Menu. Just picked the solution from there and modified a bit to get a sleek one around. And here is the recipe: Create a Place Holder Div for the navigation menu. Now add some divs(Menu Items) to this container.  This div will work as container for the Main Menu and Submenu under it.  Now Add a paragraph and a UL - LI structure under each of Menu Item Div created in last step. We can add some a-tags in LIs to work as a link. I have added some simple css style to get it noticeable. You can apply yours to make it handsome. Thats all to do with HTML. Home option 1 option 2 option 3 option 4 option 5 Shows option 1 option 2 option 3 option 4 option 5 Search option 1 option 2 option 3 option 4 option 5 Ok so now we just have to add some jQuery that will Do some animation for our menu. We are using all around

How To Find An Object By Text In SQL Server

How to search for a 'text' in SQL Server. So here is the magic query : You have to declare a sql variable @Search and set this variable as our text. This query will get you all the objects under the selected database containing the "text" set in sql variable. And also this will get you the object type. So you are good to know if this is stored procedure or view or anything-else. DECLARE @ Search varchar ( 255 ) SET @ Search = '[10.10.100.50]' SELECT DISTINCT     o . name AS Object_Name , o . type_desc     FROM sys . sql_modules        m         INNER JOIN sys . objects  o ON m . object_id = o . object_id     WHERE m . definition Like '%' +@ Search + '%'     ORDER BY 2 , 1 Here is the output of the query looks like: Find By Text in SQL Server

Google Conversion Tracking Using Contact Form 7 Without Redirection

I was searched for the problem at least a day and found nothing that works Cool. All the solutions to set a Google Conversion Tracking for wordpress suggest to redirect the user to a "thank-you.html" page , and to put there the actual Javascript code for Google Coversion Tracking. Some suggested to use an iFrame while displaying "Successful Form submission", and this sparked the idea to set the actual Google Conversion Tracking Javascript code to the field where we set Thanks-giving message. Here is my Google Conversion tracking code Script that I have to fire after successful submission of contact-form-7.  I just append this code to the input box where we use Successful Form Submission message. i.e. (Thanks. We will contact you soon. < Google Conversion tracking code Here >)    As the response msg generated through contact form 7, it also runs the google script containing code for Adsense. This is working cool for me. Share your valuable comments

How to switch between two CSS files on a page

The basic idea for changing applied CSS is to tells the browser which one is to be used. For the purpose we have to do 3 things : 1. Use 2 CSS files in our page as given below (with title tag, we will later recognize these files through title): 2. Change the applied CSS file so theme can be changed. we can set two buttons somewhere on page so we can switch theme when we click on any of them. Light Dark 2. Tells browser to memorize , what is our current CSS , so it would render the right one for the user. For this we are using javascript and doing 3 things here : to set Cookie and a function to switch the current CSS applied to other one, and a method to read cookie to get current CSS applied during page loads function setActiveStyleSheet(title) { var i, a, main; for (i = 0; (a = document.getElementsByTagName("link")[i]); i++) { if (a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute(&

How to change background color of selected text

I was willing to see how some of websites have beautiful colors when we select text on the pages. Just searching for the trick and got that its a simple CSS property to override default behaviour of browsers. You have to just apply background color and its done, more over if you want to change the text color also you can apply color in CSS. This simple CSS class will do it all for you. ::-moz-selection{ background:#66b0e6; } ::selection{ background:#66b0e6; } Fiddle : (select the text below)

How To Get Height Of An Element In jQuery

There is are three methods in JQuery that deals with the height of a element. .height() : it measure the height of the element/container excluding applied padding, margin and border-width. .innerHeight() : it measure the height of the element/container excluding applied margin. It includes applied padding but not border-width of the element. .outerHeight() : It measures the height of the element/container including all applied padding + border width but not margin. If you want to include margin too, you should use .outerHeight(true) Any of the method will provide 'pixel' value of the height of container. We just have to select the method which that suits our requirement. first of all apply style="height:auto;" in element, so it can get the height as per content in it. then use these methods as below: Loading .... The point to be noted here is, I'm using ('#element-id').ready() and not DOM ready. Sometimes when we use it on DOM ready

Resize Textarea on 'Enter' pressed

1. Add a textarea to a simple HTML template 2. Now include jQuery CDN or downloaded jquery to your page in head section 3. Add a key press event in document scope. 4. Check if the pressed key is 'Enter'. Also check if control is textarea. (I added event only for Text Area, so no need to check here) 5. Add another event on blur to reduce its size if white space added by user. 6. Get the height of existing control and add some more height. Check-it-out with below snippet. :)