Pages

Friday, July 6, 2012

Blogger: In home page, How to display only first few lines of the post with an option " Read More "



Login to your Blogger
Go To Template
Then Click On “Edit HTML”
Check Mark  “Expand Widget Templates”

Press Ctrl+F and search for this line   </head>
Now, copy below script and paste it above the </head> tag:

<script type='text/javascript'><!--//--><![CDATA[//><!--
function removeHtmlTag(strx,chop){
    if(strx.indexOf("<")!=-1)
    {
        var s = strx.split("<");
        for(var i=0;i<s.length;i++){
            if(s[i].indexOf(">")!=-1){
                s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
            }
        }
        strx =  s.join("");
    }
    chop = (chop < strx.length-1) ? chop : strx.length-2;
    while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
    strx = strx.substring(0,chop-1);
    return strx+'...';
}

function createSummaryAndThumb(pID){
    var div = document.getElementById(pID);
    var imgtag = "";
    var img = div.getElementsByTagName("img");
    var summ = summary_noimg;
    if(img.length>=1) {  
        imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="'+img[0].src+'"   width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
        summ = summary_img;
    }
    var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
    div.innerHTML = summary;
}

//--><!]]></script>
  <script type='text/javascript'>

var thumbnail_mode = "no-float" ;
summary_noimg = 530;
summary_img = 440;
img_thumb_height = 180;
img_thumb_width = 180;
</script>




Press Ctrl + F again and search for the below code:  (we are going to replace this code in next step)


<div class='post-header'>
    <div class='post-header-line-1'/>
    </div>

    <div class='post-body entry-content'>
      <data:post.body/>
      <div style='clear: both;'/> <!-- clear for photos floats -->
    </div>

***The below one is optional, you can keep it or replace it!* 


<b:if cond='data:post.hasJumpLink'>
<div class='jump-link'>
<a expr:href='data:post.url + "#more"' expr:title='data:post.title'><data:post.jumpText/></a>
</div>
</b:if>






Replace it with below code:

<div class='post-header'>
     <span class='post-author vcard'>
       </span></div>
<b:if cond='data:blog.pageType != "item"'>
    <div class='post-body entry-content'>
      <div expr:id='"summary" + data:post.id'><p><data:post.body/></p></div>
<script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");</script>
      <div style='clear: both;'/> <!-- clear for photos floats -->
    </div>
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<p><data:post.body/></p>
</b:if>
<div class='singleinfo'>
<div style="float: right;">
<div style="font-weight: bold" class='readmore' > <b:if cond='data:blog.pageType != "item"'><a expr:href='data:post.url'>Read More >>></a>
</b:if></div></div>
</div>



Save the template/blog and your blog is ready as you like.





Suggestions are always welcome..!  Without signing also you can send your comments.

Thursday, July 5, 2012

Subversion configuration in windows

Subversion configuration in windows

To create the repository, issue the following command:
svnadmin create c:/svnrepos


Create your SVN user: Now that your repository is successfully set up, you'll need to create an svn user.  Simply open the file c:/svnrepos/conf/svnserve.conf of your choice and add the following:

anon-access = none
auth-access = write
password-db = passwd
Now you'll need to create a password file: Open passwd file which is located at
c:/svnrepos/conf/passwd
Add a line in that file for your user in the format =
Example_user_name = example_password
Run the svn service: open command prompt (run as administrator)
sc create svnserve binpath= "\"C:\Program Files (x86)\Subversion\bin\svnserve.exe\" --service -r C:\svnrepos" displayname= "Subversion" depend= Tcpip start= auto

sc - is command to create service in windows
svnserve- is service name
binpath : path to executiable file
--service - is to start service at startup
c:\svnrepos: folder which you created in C-drive well act as SVN Repository
displayname : service name in services console
Start = auto - automatic start at system boot
depend= Tcpip - works on ip Check out your repository onto your local machine: Back on your local machine, go to where you keep your nerd stuff.  In my case it's in ~/workspace.  Then use the svn co command to check out a copy of your project.


Test the repo-browser: (need to install TortoiseSVN)
right click on Desktop -> tortoiseSVN -> Repo-browser
svn://localhost -> test if it works internally
svn://192.168.20.204 -> (Example for external ip) test if it works remotely


   


















   Successfully Done..!

Suggestions are always welcome..!  Without signing also you can send your comments.

Wednesday, July 4, 2012

Creating WAS profiles using manageprofiles.sh command


Create a deployment manager profile

The following example creates a deployment manager profile:
./manageprofiles.sh -create -profileName dmgr01 -profilePath /opt/IBM/Websphere/Appserver/profiles/dmgr01 -templatePath  /opt/IBM/Websphere/Appserver/profileTemplates/dmgr -hostName 192.168.1.50 -nodeName dmgr01node01 -cellName cell01
Issue the following parameters:
-create
Creates a profile. (Required)
-templatePath template_path
Specifies the file path to the template. (Required)
Use the following format:
-templatePath install_root/profileTemplates/xd_augment/dmgr
-profileName
Specifies the name of the profile. (Optional)
-profilePath
Specifies the intended location of the profile in the file system. (Optional)
-hostName
Specifies the host name of the profile. (Optional)
-nodeName
Specifies the node name of the profile. The name must be unique within the cell. (Optional)
-cellName
Specifies the cell name of the profile. The cell name must be unique for each profile. (Optional)
-isDefault
Designates the profile as the default target of commands that do not use a profile parameter. (Optional)
-omitAction
Omits optional features. (Optional)
-adminUserName
Specifies the valid username for use with administrative security. (Optional)
-adminPassword
Specifies the password that is used with the name specified with the -adminUserName parameter. (Optional)
-portsFile
Specifies the path to a file that defines port settings for the new profile. Do not use this parameter with the -startingPort or -defaultPortsparameters. (Optional)
-startingPort
Specifies the starting port number for generating all ports for the profile. Do not use this parameter with the -portsFile or -defaultPortsparameters. (Optional)
-defaultPorts
Accepts the default ports for the new profile. Do not use this parameter with the -portsFile or -startingPort parameters. (Optional)
-validatePorts
Specifies which ports to validate to ensure the ports are not already in use or reserved. (Optional)


Create a custom profile

The following example creates a custom profile:
./manageprofiles.sh -create -profileName customNode01 -profilePath /export/home/wasadmin/IBM/Websphere/Appserver/profiles/customNode01 -templatePath  /export/home/wasadmin/IBM/Websphere/Appserver/profileTemplates/managed -hostName 192.168.1.50 -nodeName customNode01 -federateLater false -dmgrHost 192.168.1.50 -dmgrPort 8879 
Issue the following parameters:
-create
Creates a profile. (Required)
-templatePath template_path
Specifies the file path to the template. (Required)
Use the following format:
-templatePath install_root/profileTemplates/xd_augment/managed
-profileName
Specifies the name of the profile. The parameter is optional, but is issued by default if no values are specified.
-profilePath
Specifies the intended location of the profile in the file system. The parameter is optional, but is issued by default if no values are specified.
-hostName
Specifies the host name of the profile. The parameter is optional, but is issued by default if no values are specified.
-nodeName
Specifies the node name of the profile. The name must be unique within the cell. The parameter is optional, but is issued by default if no values are specified.
-cellName
Specifies the cell name of the profile. The cell name must be unique for each profile. The parameter is optional, but is issued by default if no values are specified.
-federateLater
Federates the node at a later time. Specify the value as true. The parameter is optional, but is issued by default if no values are specified.
-dmgrHost
Specifies the workstation in which the deployment manager is running. The parameter is optional, but is issued by default if no values are specified.
-dmgrPort
Specifies the SOAP port of the deployment manager. The parameter is optional, but is issued by default if no values are specified.
-isDefault
Designates the profile as the default target of commands that do not use a profile parameter. (Optional)
-omitAction
Omits optional features. (Optional)
-portsFile
Specifies the path to a file that defines port settings for the new profile. Do not use this parameter with the -startingPort or -defaultPortsparameters. (Optional)
-dmgrAdminUserName
Specifies the username of the deployment manager that you want to federate to. (Optional)
-dmgrAdminPassword
Specifies the password for the deployment manager that you want to federate to. (Optional)


Suggestions are always welcome..!  Without signing also you can send your comments.

Tuesday, May 29, 2012

Double clicking the folder opens search instead of folder

This may cause due to installing some editable or listing software which adds a feature to folders.
When you right click on folder, search option will be on top of the action list. By default Double Click takes the first item in the action list. 
Hence, to get rid of this we need to set back it to default action value which is Open
How to Resolve:
Go to run or command prompt and execute the below command
regsvr32 /i shell32.dll






Suggestions are always welcome..!  Without signing also you can send your comments.

Thursday, March 22, 2012

how to paste link target to the new column in excel

Below screen shot may help you…. Please let me know if you have any questions..

Thursday, December 1, 2011

missing font or text in itunes

After updating my Itunes, I don't see any text there. All blank buttons, checkbox etc.. its all weird, even I cant see menu options like file, edit, view etc..I am tired of re installing itunes.
Later I downloaded/run registry file which is related to fonts. Now my itunes came back with everything. Here you can find the file to download and run >>>>  Click Here  <<<<






Suggestions are always welcome..!  Without signing also you can send your comments.

Wednesday, October 26, 2011

What is Informatica?

Informatica is Engine driven ETL tool, from Informatica Corporation, mostly used in Data Integration and Data warehouse enviornment. It is supported on different environments ( UNIX, WINDOWS, MAINFRAME etc).

Informatica Corporation products are:

  • Informatica Power Center
  • Informatica on demand
  • Informatica B2B Data Exchange
  • Informatica Data Quality
  • Informatica Data Explorer
Informatica Power Center is a single, unified enterprise data integration platform for accessing, discovering, and integrating data from virtually any business system, in any format, and delivering that data throughout the enterprise at any speed.

Key PowerCenter Client Tools:

  • Designer Tools
  • Workflow Manager
  • Workflow Monitor
  • Repository Manager
  • Administrator Console

Client to Server communication flow looks something like this:

  • The PowerCenter client sends a request to Repository Server.
  • The Repository Server verifies the connectivity information of the target database
  • The Repository Server starts a Repository agent Process
  • The Repository Server uses a Repository agent process to communicate with the Repository.
  • The PowerCenter Server process communicates with the repository to run scheduled workflows. When a workflow is run manually the Power Center Server uses the instructions configured in the mapping (stored in the Repository) to read , transform and write data.


Individual tools will be explored later...

Wednesday, July 27, 2011

How can I select and delete all my unread emails in gmail?

1) type is:unread in the search feild.
2) check All
3) Click on "Select all conversations that match this search"
4) Delete it






Please wait for few minutes. If it doesn't redirect properly please logout from the account and try to relogin.
And you are all set !


Note: This can apply for read, unread, chat, starred also.




Suggestions are always welcome...! Without signing also you can send your comments.



Friday, July 22, 2011

How to change multiple file extensions at once


If all files are located in one directory, I mean without any sub directories. Then its very simple.
Open a command window, enter into your directory and type  ren *.pdf *.tif 
this will change all files with extension .pdf to .tif. 
                                                         or
You can create a txt file copy ren *.pdf *.tif and save it into your directory where the files are located. Change the file extension .txt to .cmd and run it.  Done !

If you have a folder with different file of types (eg jpg/bmp/gif/ico/tga) and want to change ALL files to One type (eg png) then type:
ren *.* *.png
NB – All files in folder WILL change to .png!!
                                                   *****************************

Tool: If you have a directory full of files that need to be changed from .PNG to .JPG, it’s going to take forever to do this using the method above. That’s where you need a freeware application that can batch change file extensions for you.
Extension Renamer is a simple to use, freeware program that I have tested and contains no spyware, etc. Once you install it, it’s a piece of cake to change file extensions!
file extension changer
First, click Select Directory and choose the directory that contains all of the files that you want to modify. You have the option of including subdirectories also. Then you search for files with particular file extensions that you want to change. The *.* means that it will change ALL files to the new extension.
You can type in your the extension you want to change, such as .TXT in the From box along with an asterisk (*) or question mark (?) to help filter down the files. Click Search and the files that will be changed show up in the left box. Once you are satisfied, go ahead and click GO! Now all of your files will have their extensions renamed.


Suggestions are always welcome...! Without signing also you can send your comments.

Monday, July 18, 2011

Sharepoint Fundas

Creating the Web Part

This procedure demonstrates how to create an ASP.NET Web Part to wrap the user control.
To create the ASP.NET Web Part
  1. In Visual Studio, point to New on the File menu, and then click Project.
  2. In the Project types pane, click WSPBuilder. In the Templates pane, click WSPBuilder Project. In the Name box, type MyWebPart, and then click OK.
  3. Right-click the MyWebPart project, point to Add, and then click New Item…
  4. In the Categories pane, click WSPBuilder. In the Templates pane, click Web Part Feature. In the Name box, type MyWebPart, and then click OK.
  5. In the Feature Settings dialog, type My Web Part for the Title, A web part built using WSPBuilder for the Description and set the Scope to be Web. Click OK.
  6. Open the elements.xml file and edit the values for the Group and QuickAddGroups properties. The following code shows the corrected values:
  7. <Property Name="Group" Value="My Group"></Property>
    <Property Name="QuickAddGroups" Value="My Group" />
    
  8. Right-click on the MyWebPart soluction, then select Build Solution. Note the PublicKeyToken for the compiled assembly.
  9. Optional: Add the following property to the Properties block in the MyWebPart.webpartfile to prevent users from closing the web part once it is on a page:
  10. <property name="AllowClose" type="boolean">False</property>

Adding ASP.NET Project Types to the WSPBuilder Project

This procedure demonstrates how to add the ASP.NET web application templates to a WSPBuilder project. This is required to permit the use of the ASP.NET User Control within the WSPBuilder project.
To add the ASP.NET templates
  1. In Visual Studio, right-click on the MyWebPart project and select Unload Project.
  2. Right-click on the MyWebPart project again and select Edit MyWebPart.csproj. Locate the ProjectTypeGuids element and add the ASP.NET web application project type guid{349C5851-65DF-11DA-9384-00065B846F21}. The following code shows the corrected element:
  3. <ProjectTypeGuids>{349C5851-65DF-11DA-9384-00065B846F21};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
  4. Save and then close the MyWebPart.csproj file.
  5. Right-click on the MyWebPart project and select Reload Project.
  6. Right-click on the MyWebPart project and select Properties On the Application tab, change the Target Framework to be .NET Framework 3.5. Save the changes.

Creating the ASP.NET User Control

This procedure demonstrates how to create an ASP.NET user control that uses SharePoint.
To create the ASP.NET user control
  1. In Visual Studio, right-click the TEMPLATE folder, select Add then click New Folder. Name the folder CONTROLTEMPLATES.
  2. Right-click the CONTROLTEMPLATES folder, select Add then click New Folder. Name the folder MyWebPart
  3. Right-click the MyWebPart folder, select Add then click New Item.
  4. In the Categories pane, click Web. In the Templates pane, click Web User Control. Name the control MyWebUserControl.ascx, and then click Add.
  5. Delete the CodeBehind attribute in the MyWebUserControl.ascx file. Replace theInherits attribute with MyWebPart.MyWebUserControl, MyWebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=[your PublicKeyToken]. The following code shows the corrected file:
  6. <%@ Control Language="C#" AutoEventWireup="true" Inherits="MyWebPart.MyWebUserControl, MyWebPart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9410bf5b454f3bbd" %>
  7. Open the MyWebUserControl.ascx file in the designer view. Click the Toolbox, and then add a Label using a drag-and-drop operation. Switch to the code view and rename the IDproperty to be MyLabel.
  8. Open the MyWebUserControl.ascx.cs file and the MyWebUserControl.ascx.designer.cs file. Change the namespace to MyWebPart in both files.
  9. Open the MyWebUserControl.ascx.cs file. Add a public string property namedDisplayText to the MyWebUserControl class. The following code demonstrates this:
  10. public string DisplayText { get; set; }
  11. Add the following code to the Page_Load method. This will display the value of the DisplayText property using the MyLabel control.
  12. protected void Page_Load(object sender, EventArgs e)
    {
        MyLabel.Text = DisplayText;
    }

Wrapping the User Control and Connecting the Properties

This procedure demonstrates how to wrap the user control inside the web part and connect the properties between SharePoint, the web wart and the user control.
To wrap the user control and connect the properties
  1. Open the MyWebPart.cs file.
  2. Edit the attributes of the MyProperty property. The code below shows the changes:
  3. [Personalizable(PersonalizationScope.Shared)]
    [WebBrowsable(true)]
    [System.ComponentModel.Category("Custom")]
    [WebDisplayName("MyProperty")]
    [WebDescription("Message to be displayed within Web Part")]
    
  4. Within the CreateChildControls() method, delete the single line of code under the // Your code here... comment. Enter code to load the MyWebUserControl, assign the value of MyProperty to the DisplayText property of the control and then add the control to the web part’s Controls collection. The code below demonstrates how to do this:
  5. // Your code here...
    MyWebUserControl myControl =
       (MyWebUserControl)Page.LoadControl("~/_controltemplates/MyWebPart/MyWebUserControl.ascx");
    myControl.DisplayText = MyProperty;
    this.Controls.Add(myControl);
    
  6. Right-click on the MyWebPart solution and select Rebuild Solution.
The completed solution structure is shown below:
SolutionStructure

Deploying the Web Part and Testing Functionality

This procedure demonstrates how to deploy the web part and the user control, and how to test their functionality. This procedure assumes that there is a local instance of SharePoint to deploy to.
To deploy the web part
  1. Right-click on the MyWebPart project, select WSPBuilder and then Build WSP. Follow the progress of the build in the Output window and wait for the process to complete.
  2. Right-click on the MyWebPart project, select WSPBuilder and then Deploy. Follow the progress of the build in the Output window and wait for the process to complete.
  3. Browse to the local SharePoint site.
  4. In the Site Actions drop-down box, click Site Settings. On the Site Settings page, click on the Site features link.
  5. Click on the Activate button next to the My Web Part feature.
  6. Click on the link to the default home page for the SharePoint site.
  7. In the Site Actions drop-down box, click Edit Page.
  8. Click Add a Web Part in one of the Web Part zones on the page, click the My Web PartWeb Part (located in the My Group section), and then click Add.
  9. Click Exit Edit Mode. You should now see the default “Hello SharePoint” message.
  10. To change the text displayed, click the drop-down box on the Web Part, and then clickModify Shared Web Part.
  11. Expand the Custom group, enter the new display message in the My Property box, and then click Apply.
  12. Click Exit Edit Mode. You should now see the new message.

Thanks to : WordPress.com

 Suggestions are always welcome...! Without signing also you can send your comments.