Windows 7 theme in XP

Author posted by Jitendra on Posted on under category Categories Tech Tips with Leave a comment on Windows 7 theme in XP

First,  download some of the themes you like to your Windows XP or Vista desktop.

dowload windows 7 themes

These files have a unique .themepack extension which is just another zip format containing all of the elements of a theme including the background images, Aero glass colors, sounds, cursors, icons, screen savers, etc.

To use these files on an older version of Windows, you first need to extract them as only Windows 7 can natively understand the themepack format. You can either change the file extension of the Windows 7 theme file from .themepack to .cab and then extract the files with a right-click, or install the free 7 zip  utility as 7-Zip can automatically hand the themepack file format.

windows 7 themepack file Extract themepack with 7-Zip Rename to CAB and extract in Explorer

Once extracted, your theme files will now be in a new folder that has the same name as your original themepack.

Most Windows 7 themes consist of multiple background images and Windows 7 will automatically change your desktop background at periodic intervals using one of the images from the themepack. Windows Vista and XP do not support desktop slideshows, but you can easily bring that feature use the excellent and free John’s Background Switcher program.

To create a desktop slideshow, click the add button and choose “A folder on your computer.” Now select the Windows 7 theme folder that contains all the background images. The program allows lot of tweaking but you can skip that because the default settings are very similar to what you need for simulating Windows 7 behavior on your XP or Vista computer.

Add folder containing Windows 7 wallpapers Choose your Windows 7 Theme Folder

However, John’s Background Switcher by default shows the name of the image in the top right hand corner of the picture.  To remove this, click the “More…” button that has a gear icon on it.  Uncheck the box beside the 3rd entry which says “Show picture info on the top-right corner of the screen.”  Now click Ok, and then click Ok in the main window, and your desktop slideshow is all ready.

ClearType in IE

Author posted by Jitendra on Posted on under category Categories HTML and tagged as Tags , , with Leave a comment on ClearType in IE

Recently, during development i encountered in interesting issue related to internet explorer.

There is one property in IE known as cleartype, which results in different display of font.

you can see in below snap :

clear type font style in IE
clear type font style in IE

The Browse button at left side has shadow effect in font or we can say Cleart type is enable for that control.

the control at right side is normal Button control of HTML. you can see difference very clearly.

Remove ClearType property from IE:

To remove clearType property, we just need below trick in CSS.


<style type="text/css">
body {
filter:none
}
</style>

By using property filter:none we can remove the cleart type behavior of IE.

Text without clear type
Text without clear type

Style File upload control in ASP / HTML

Author posted by Jitendra on Posted on under category Categories HTML and tagged as Tags , , , with 2 Comments on Style File upload control in ASP / HTML

As most of us know that we cannot style the file upload control to much level, still we can give it a stunning effect with the help of CSS.

There is nothing in code to explain.

I took three upload control and one button to give effect.

Lets say upload control is in ASP.net or in HTML.

<asp:FileUpload ID="FileUpload1" CssClass="Cntrl1" runat="server" />
Or
html file upload
<input id="readFile" type="file" runat="server" class="Cntrl1" />

Then create a simple CSS class of name “Cntrl1”.

  <style id="cssStyle" type="text/css" media="all">
       .Cntrl1
      {
       background-color:#abcdef;
       color: Yellow;
       border: 1px solid #AB00CC;
       font: Verdana 10px;
       padding: 1px 4px;
       font-family: Palatino Linotype, Arial, Helvetica, sans-serif;
      }
</style>

Out put in different browsers will look like :

Output in Chrom
Output in Chrom
Output in Mozilla
Output in Mozilla
Output in Internet explorer
Output in Internet explorer

View Demo of FileUpload

Highlight Current field using JQuery

Author posted by Jitendra on Posted on under category Categories HTML and tagged as Tags , , , with 1 Comment on Highlight Current field using JQuery

Write below HTML code :

This will create two text boxes.

<form>
	<div>
		<label for="Name">Name:</label>
		<input name="Name" type="text"></input>
	</div>
	<div>
		<label for="Email">Email:</label>
		<input name="Email" type="text"></input>
	</div>
</form>

Using jQuery, we can watch for an event where an input form comes into focus:

Add link to JQuery file in script tag as shown in below line:

<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" />

Now, add below CSS in document.

div.curFocus {
background: #fdecb2;
}

Then at last write JQuery / javascript code on focus event and blur event (opposite of focus event in javascript ) .

$(document).ready(function(){

$("input").focus(function() {

$(this).parent().addClass("curFocus")

});

$("input").blur(function() {

$(this).parent().removeClass("curFocus")

});

});

We are using the advantage of jquery of adding and removing the CSS class. we cannot left blank to CSS class, as it may remove the existing other class from the tag.

$(document).ready(function(){

This line causes the execution of jquery after complete loading of page.

Output:

Selecting field using jquery
Selecting field using jquery

View Demo

Install Avast Antivirus in Ubuntu

Author posted by Jitendra on Posted on under category Categories Linux and tagged as Tags , , with Leave a comment on Install Avast Antivirus in Ubuntu

avast! Home Edition is a complete anti-virus package, that is is free for registered home non-commercial users. It contains an on-demand scanner with two interfaces (simple for novices and advanced for experienced users), an on-access scanner with Standard Shield (which protects against execution and opening malware programs) and an embedded e-mail scanner which scans incoming and outgoing email messages.
Install Avast Antivirus in Ubuntu

First you need to download the .deb package from here

wget http://files.avast.com/files/linux/avast4workstation_1.0.6-2_i386.deb

Now you have avast4workstation_1.0.6-2_i386.deb package.Install .deb package using the following command

sudo dpkg -i avast4workstation_1.0.6-2_i386.deb

This will complete the installation now you need to get the registration key for this you need to fill the on-line form available here and they will send registration key to your mail address

Applications Menu Setup

or this you need to run a script from the following location

cd /usr/lib/avast4workstation/share/avast/desktop

sudo ./install-desktop-entries.sh install

This will complete the application menu setup.

If you want to access you need to go to Applications—>;Accessories—>avast!Antivirus

Open Avast Antivirus in ubuntu
Open Avast Antivirus in ubuntu

Install MySQL and Query Browser in Ubuntu

Author posted by Jitendra on Posted on under category Categories Linux and tagged as Tags , , , , with 12 Comments on Install MySQL and Query Browser in Ubuntu

To open the Terminal, go to Application > Accessories > Terminal

Open terminal in ubuntu
Open terminal in ubuntu

Type the following command at terminal.

  • $sudo apt-get install mysql-server
console screen look like during downloading the mysql in Ubuntu
console screen look like during downloading the mysql in Ubuntu

  • mysql comes with no root password. To set the root password, type:

$mysqladmin -u root password your-new-password

$sudo /etc/init.d/mysql restart

  • Install mysql query browser

$sudo apt-get install mysql-query-browser

  • After installing, go to Applications > Programming > MySQL Query Browser to connect to mysql as shown below.
open mysql query browser in ubuntu
open mysql query browser in ubuntu

Enter Server Hostname, Username and Password. Click on Connect and MySQL is now installed on Ubuntu.

Connect to MySQL using Query Browser in Ubuntu
Connect to MySQL using Query Browser in Ubuntu

How to change the Meta Tag link in WordPress

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags , with Leave a comment on How to change the Meta Tag link in WordPress

How to change the Meta Tag link in Wordpress

Edit /wp-includes/default-widgets.php file at line 296

Old code:

<?php wp_register(); ?>

<li><?php wp_loginout(); ?></li>

<li><a href=”<?php bloginfo(‘rss2_url’); ?>” title=”<?php echo esc_attr(__(‘Syndicate this site using RSS 2.0’)); ?>”><?php _e(‘Entries <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>

<li><a href=”<?php bloginfo(‘comments_rss2_url’); ?>” title=”<?php echo esc_attr(__(‘The latest comments to all posts in RSS’)); ?>”><?php _e(‘Comments <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>

<li><a href=”http://wordpress.org/” title=”<?php echo esc_attr(__(‘Powered by WordPress, state-of-the-art semantic personal publishing platform.’)); ?>”>WordPress.org</a></li>

<?php wp_meta(); ?>

New Code:

<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href=”<?php bloginfo(‘rss2_url’); ?>” title=”<?php echo esc_attr(__(‘Syndicate this site using RSS 2.0’)); ?>”><?php _e(‘Entries <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>
<li><a href=”<?php bloginfo(‘comments_rss2_url’); ?>” title=”<?php echo esc_attr(__(‘The latest comments to all posts in RSS’)); ?>”><?php _e(‘Comments <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>
<li><a href=”https://www.jitendrazaa.com” title=”<?php echo esc_attr(__(‘Powered by Shiva, the supreme solution.’)); ?>”>ShivaSoft</a></li>

Change the Login Image of WordPress in Simple steps

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags , , , with Leave a comment on Change the Login Image of WordPress in Simple steps

Change the Login Image of WordPress in Simple steps

Hi,

Follow below steps to change the login image and tooltip of the wordpress.

for this hack, you will require following Two files :

/wp-login.php
/wp-admin/login.css

in wp-login.php page search for the “powered by” and replace that tooltip as per your convenience / requirement.

Now open login.css and search for the logo image. normally its in tag h1 a.

So you can change image like :

h1 a{background:url(../images/ShivaLogo.png)

where “ShivaLogo.png” is your new image name.

Salesforce Interview Questions – Part 1

Author posted by Jitendra on Posted on under category Categories Salesforce and tagged as Tags with 120 Comments on Salesforce Interview Questions – Part 1

Set of most often asked questions on the salesforce.com developement

1. What is Apex Ans: It is the in-house technology of salesforce.com which is similar to Java programming with object oriented concepts and to write our own custom logic.


2. What is S-Control ?
Ans: S-Controls are the predominant salesforce.com widgets which are completely based on Javascript. These are hosted by salesforce but executed at client side. S-Controls are superseded by Visualforce now.


3. What is a Visualforce Page ?
Ans: Visualforce is the new markup language from salesforce, by using which, We can render the standard styles of salesforce. We can still use HTML here in Visualforce. Each visualforce tag always begins with “apex” namespace. All the design part can be acomplished by using Visualforce Markup Language and the business logic can be written in custom controllers associated with the Page.


4. Will Visual force still supports the merge fields usage like S-control ?
Ans: Yes. Just like S-Controls, Visualforce Pages support embedded merge fields, like the {!$User.FirstName} used in the example.


5. Where to write Visualforce code ?
Ans: You can write the code basically in 3 ways.

  1. setup->App Setup->Develop->Pages and create new Visulaforce page.
  2. Setup -> My Personal Information -> Personal Information -> Edit check the checkbox development mode. When you run the page like this, https://ap1.salesforce.com/apex/MyTestPage. you will find the Page editor at the bottom of the page. You can write you page as well as the controller class associated with it, there it self.
  3. Using EclipseIDE you can create the Visulaforce page and write the code.

6.What are Apex Governor Limits?

Governor limits are runtime limits enforced by the Apex runtime engine. Because Apex runs in a shared, multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that code does not monopolize shared resources. Types of limits that Apex enforces are resources like memory, database resources, number of script statements to avoid infinite loops, and number of records being processed. If code exceeds a limit, the associated governor issues a runtime exception.


7. How to create and host S Control in Salesforce ?

https://jitendrazaa.com/blog/webtech/salesforce/how-to-create-s-control-in-salesforce/

https://jitendrazaa.com/blog/webtech/salesforce/how-to-host-s-control-in-visualforce-page/


8. Difference between Sandbox and Development environment?

https://jitendrazaa.com/blog/webtech/salesforce/difference-between-sandbox-and-developer-edition-in-salesforce/


9. How to schedule export or take the backup of salesforce?

https://jitendrazaa.com/blog/webtech/salesforce/backup-the-salesforce-data/

ASP.Net Error: Response is not available in this context

Author posted by Jitendra on Posted on under category Categories ASP.NET and tagged as Tags with 2 Comments on ASP.Net Error: Response is not available in this context

This error occurred when  i tried to call Response.Redirect method from a class file. Then i tried to find the solution and i got to know that when we use the response object from an aspx page either from aspx page or it’s codebehind page, the response object is directly available because all these derived from the page object.

When we use the response object in our own class, the object is not directly available, so we got this message.

But we can use it by the following method :

HttpContext.Current.Response.Redirect(http://google.com“);

Same problem happens when we tried to call a function from Response object.

Thank You.