October 12, 2009

Feedback Workflow Attributes: Sharepoint

Just a quick handy for creating a Sharepoint workFlow sending an email.

1. Actions for Post WorkFlow
1. Subject: CurrentItem:Title
2. Posted By: CurrentItem:PostedBy
3. EncodedAbsoluteUrl/../Post.aspx?ID=CurrentItem:ID
4. span...p..b..body...b..p..span
5. Thanks
2. Actions for Comments WorkFlow
1. Subject: CurrentItem:PostTitle
2. Posted By: Feedbacks..PostedBy..Feedbacks:CreatedBy...Comments:CreatedBy
3. Url: Feedbacks...EncodedUrl...Feedbacks:ID...Comments:PostID
4. Ur;/../Post.aspx?ID=
5. ID: Feedbacks...ID...Feedbacks:ID...Comments:ID
6. Thanks

October 07, 2009

Scopes---Sharepoint

Step 1: Go to "Site Actions", "Site Settings" and under "Site Collection Administration" click on "Search Scopes".

Step 2: Click on "New Scope" and give it a title. Usually the document library you wish to search. Click "OK"

Step 3: Now we need to add a rule. Go to the document library you wish to search and grab the URL. Then repeat Step 1 to get back to the search scope settings page. Click on the search scope you created in Step 2. Under the "Rules" section click on "New Rule". Select "Web Address" and enter the URL of your document library. Click "OK".

Step 4: Click on "New Display Group" and give it a title and a description. In the "Scopes" section select the scope you created in Step 2. The "Default Section" should automatically become the scope you selected.

Step 5: Wait for the server to recognize the new scope and display group.

Step 6: Go back to the page you wish to add a search box. Go to "Site Actions", "Edit Page", click on "Add a Web Part". Select the "Search Box" web part and click "Add".

Step 7: The page should be in "Edit Mode". In the "Search Box" web part click on the "edit" button and go to "Modified Shared Web Part".

Step 8: Expand the "Miscellaneous" section. Uncheck "Use site level defaults". In the "Scope Display Group" sub-section the default display group scope will be "Search Dropdown" change this to the display group you created in Step 4. You cannot browse through the display groups so you will have to type your display group in exactly. Click on "OK".

Step 9: Exit out of "Edit Mode". Your search box should now have the new search scope you created in Step 2 as the default choice.

October 06, 2009

Open A Document in new Window..Sharepoint

Hi All,

Let's take one scenario where your client does not have office installed and you also want to deal with document library.

Now we know that there is a settings in document library settings that if client do not have office installed at machine, then MOSS will automatically open document in the browser window. it automatically check for the availability of office at client side and if not found then opens it in same browser.

The settings for this is as follows :

(1) Go to your document library.
(2) Click on Settings-> document library settings
(3) Click on advanced settings
(4) Check for "Browser-enabled Documents" section and select Display as a Web page.
(5) Press OK.

Now you have set this option and if your client does not have office installed then MOSS will automatically open document in browser.

but but but.....notice that it opens in same browser...So if you want that document opens in new windows, not in the same browser then.....???

so Here is a trick to go for it :

But remember that this change will apply to all document libraries of all web applications. Because we are going to change the Global onet.xml. So be aware..

Here we go..
(1) Open C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL\XML
(2)Open ONET.XML
(3)Search for this line onfocus="OnLink(this)" HREF="
(4)Change it to OnLink(this)" target="_new" HREF="
(5)Rest the IIS and just check.....
now all documents will open in new window..
Source: http://www.sharepointkings.com/2008/07/open-documents-in-new-window.html#

Sharepoint Errors and Solutions

1. Constraint violation Occured:
Solution: delete from AD and create again.
2. Invalid Padding Cryptographic Exception
Solution: In web.config of site, Add this under system.web
<machinekey validationKey="6DFDCDE9B71CA61A8DB213CA721B94E4636322D8B675CCD7"
decryptionKey="D0AA80E9A03C73823C7108E11046986717152C97EAEA7C02" validation="SHA1" />
3. Contsratint Violation from Directory Services
Solution: Attribute Editor in AD, attributeMapFailed.....
4. Service Unavailabe when accesing Sites
Solution: Application Pool may be disabled.
1. Configurable in Application Pool Properties ...the password might be changed.
5. net accounts [For Setting Password Policy in AD]
net accounts /minpwage:7
net accounts /minpwlen:7
net accounts /uniquepw:5
6. If role provider doesn't work..see the trust level = "Full" or not.
7. For Account Password Lockout Policy
.....Local Policy settings[Default Grayed Out]
.....From command Line
.....First Set net accounts /lockoutthreshold:30
...............net accounts /lockoutduration:30
...............net accounts /lockoutwindow:30
.....Now you can play aorund from UI itslef
8. You do not have nbecessar permisions...while deploying workflows using sharepoint designer.
Solution:
Click Start, point to All Programs, point to Microsoft Office Server, and then click SharePoint 3.0 Central Administration.
Click the Operations tab.
Under Security Configuration, click Service Accounts.
Click Web application pool, and then click Windows SharePoint Services Web Application in the Web service box.
In the Application pool box, click the application pool that you want to change.
Under Select an account for this component, click Configurable, and then type the user name
and the password for the different user account.
9. Encoded Absolute URl in Custom Workflow email..getting the last part as number.
Solution: [EncodedAbsoulteURL]/../Post.aspx?ID=[ID]
For Comments: Same as above with Lookup to parent one with ID's....I mean relate with PostId
10. How-To Delete SharePoint Shared Services Provider (SSP)
Dont Delete the databases before making sure in website they are deleted, otherwise ssp cannot be deleted.
stsadm -o deletessp -title YourSSPTitleHere -force
11. To Run stsadm commands from anywher
....Start---Control Panel---System---Advanced---Environmental variables---Path---Edit.
At the end of line add ;C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\BIN
12. Windows SharePoint Services Web Application [Never Ever Restart This Service]
When you stop the Web Application service,
it actually undeploys all the vdirs from IIS
and deletes the IIS web sites. Starting it deploys these again.
13. Crawling can be done only against Windows Authentication Websites.
If we have any forms based authentication then extend the website and give that url in the content sources crawling.
14. Internet Not Working in Server.
Server-->Set up DNs Correctly in TCP-IP Properties with Corect Primary IP.
15. Error:
One or more field types are not installed properly. Go to the list settings page to delete these fields.
Solution: Reset IIS first. if still prevails..it's problem with definitions change for the columns and column removals. Dont remove any column and it will work.
16. Restricting Access to tabs in Menu
Solution: Give Relative URL Like /sites/.... instead of absulute URL.
17. IP Address not resolving.
Solution: Central Admin..Operations...Alternative Access mapping..Give The Ip address in the Internet section
18. In the GetItems(SPQuery)..the SPQUERY should not have the query tag, otherwise it will bring all the items.

October 01, 2009

Create a New SharePoint Permission Level and Bind it to an Existing SharePoint Group

This example will create a new permission level, called Example_xxxxxxxxxxx. After creation, it binds the permission level to an existing SharePoint Group called Foo.

using (SPSite site = new SPSite( "http://moss/sites/PermExample" ))
{
using (SPWeb rootWeb = site.RootWeb)
{
string permissionLevelName = "Example_"+System.DateTime.Now.Ticks.ToString();

// Create a new Permission Level
SPRoleDefinition newPermissionLevel = new SPRoleDefinition();
newPermissionLevel.Name = permissionLevelName;
newPermissionLevel.Description = "Example Permission Level";
newPermissionLevel.BasePermissions =
SPBasePermissions.AddListItems |
SPBasePermissions.BrowseDirectories |
SPBasePermissions.EditListItems |
SPBasePermissions.DeleteListItems |
SPBasePermissions.AddDelPrivateWebParts;

// Add the permission level to web
rootWeb.RoleDefinitions.Add(newPermissionLevel);

// Bind to the permission level we just added
newPermissionLevel = rootWeb.RoleDefinitions[permissionLevelName];

// Create a new role Assignment using the SharePoint Group "Foo"
SPRoleAssignment roleAssignment = new SPRoleAssignment( (SPPrincipal)rootWeb.SiteGroups[ "Foo" ] );

// Add the Permission Level to the Foo SharePoint Group
roleAssignment.RoleDefinitionBindings.Add(newPermissionLevel);

// Add the new Role Assignment to the web
rootWeb.RoleAssignments.Add(roleAssignment);

rootWeb.Close();
}
site.Close();
}

July 20, 2009

Superstitions and Explanations

Half Knowing is not healthy especially in Superstitions..so here you go.

Most superstitions were born with an aim to protect and were based on sound reasoning. With time, however, much of the reasoning has been forgotten and the beliefs appear unsubstantiated. But there are also many beliefs that have no reason behind them.

Many omens relate to animals, birds and reptiles. The most auspicious omen is to see an elephant when one is on a journey, for it represents Ganesha, the god of good luck and the remover of obstacles. The cawing of a crow in one's house foretells the coming of guests. A peacock seen while on a journey is said to be good but hearing its shrill call indicates robbery by highway men. A dog howling near a sick man's chamber predicts his death. Seeing a cat or a cow's face early in the morning brings ill luck. A sparrow is encouraged to build a nest in a new house for good fortune. A yellow or white substance dropped on the threshold by a cow indicates the gain of gold or silver. To protect cats, which were useful in destroying rats and other pests, the Brahmins imposed a ban on its killing, to be redeemed expensively with an offering of a golden cat to a Brahmin.

The wall lizard boasts the most superstitions. Every movement of this reptile holds some significance, indeed, a science called the Gowli Shastra enumerates these. The colour, spots, stripes, chirping or twittering of the lizard and where it falls on a person's body are said to indicate future happenings.

Leaving on a journey is a very important occasion and precautions have to be taken depending on the importance of the journey. The astrologer is consulted to select an auspicious time to begin. There are several beliefs linked with starting on a journey. A sneeze or terms of dissuasion like "Stay, don't go", or "Where are you going?" used accidentally by someone at this crucial time are ill omens and a person must start again if this happens. It is considered auspicious to see cowdung, cereals, paddy, cotton, hay or a newly wed before starting on a journey.

There is also a strong belief in the power of dreams, as divine warnings. Dreaming of gods, demons, auspicious animals or any other auspicious thing is good. Whereas, dreaming of gold or iron, falling stars or earthquakes is bad. There are many people who claim to be able to decipher dreams and their talents are employed by believers.

Daily life is governed by do's and don'ts for each day of the week. Thus Monday is not an auspicious day for shaving or Tuesday for washing one's hair or Saturday for buying oil.

Most of these superstitions are linked to the respective planets presiding over each day (see Hindu Calendar). The kitchen is virtually the temple of a Hindu home and the highest levels of hygiene are expected to be maintained. Most Hindus do not enter a kitchen with their shoes on, as it is said to induce the wrath of the gods. This belief originated when kitchens were traditional, with mud stoves in a corner. Families sat on the floor and ate off plates or leaves placed on the ground. This required the kitchen to be absolutely clean. Another belief linked to this was that before eating their food, people sprinkled water around their plates supposedly in remembrance of their ancestors. Actually, the water around the plate acted as a barrier against the ants and insects that crept about the kitchen floor.

There are other common beliefs devised for protection. One should neither clip one's nails at night nor use scissors for fear of angering evil spirits. This diktat prevailed in the days before electricity as a deterrent to injuring one's fingers in the dark, but many mothers still enforce this rule at home, the reasoning being lost in time. A persistent belief is that one must not sweep the floor after the sunsets, otherwise Lakshmi would also be swept away. This too is a pre-electricity precaution against inadvertently losing fallen valuables.

Some other popular superstitions are if a person hiccups, it is believed that someone is talking about him or remembering him. One theory holds that this is a way of keeping alive the memory of family members who are travelling or live far away.

The falling of utensils on the floor foretells the coming of guests. Breaking a mirror is extremely inauspicious. This belief is meant to urge caution while handling something as fragile and potentially injurious as glass, as most people were barefoot inside the house.

To protect foolhardy wanderers from snakes and other lurking dangers, it is held that evil spirits infest trees and empty houses, resulting in a lively fear of going to these places at night.

There are also many superstitions related to a pregnant woman, which originated for her protection. Some of the most widespread are: A pregnant woman should not wander out alone at night or enter an empty house because evil spirits might infest her. The husband of a pregnant woman should not build a house as that might rouse the wrath of the earth spirit. He must not bathe in the sea for the seashore is thick with ghosts. All these rules were imposed on people, as ways to protect the prospective mother and father against any dangers. In addition, when a woman is pregnant, her husband's presence is important for moral support and help with the chores. Therefore unnecessary journeys or the involvement of the husband in any major tasks is postponed.

There is a superstitious belief in some parts of the country that when a child is born, its father must not see its face till it is six months old as it might lead to ill-luck. Therefore some time before the child is born, the mother is sent to her parents' home. This serves two practical purposes: the mother is pampered by her own mother, and so is the baby, as all the mother's attention is centered on her child, with no distractions of looking after her husband or doing other chores.

In the post-partum period and while menstruating, a woman is debarred from attending any ceremony. She is also not allowed to enter the kitchen or mingle with others, as she is believed to be impure and unclean at this time. The underlying idea is that a woman at this time requires complete rest and a religious edict protects her from unnecessary exertion. Personal appearance, gait, manner and speech are all said to indicate the future. The location, size and number of moles on the body brand someone as auspicious or inauspicious. It is believed that the presence of a sign resembling a wheel on any part of the body is extremely lucky. The right side of the body is considered to be more auspicious than the left. This is so because the left hand is used for all 'unclean' actions. Therefore a man ensures that he first puts his right foot into a house. All ceremonies are conducted with the right hand. Gifts are also given and accepted only with the right hand.

When the right hand itches it means good luck and the reverse applies to the left hand. This relates simply to the clean (right) and unclean (left) sides of the body. Paradoxically, twitching of the right eye is considered inauspicious and of e left eye, auspicious.

Marriage, one of the most important events in life, has many superstitions associated with it. It is believed that a new bride brings luck and prosperity with her and that her fortune is mingled with that of the groom's family. For the first one year of marriage, all happenings in the family are monitored and accordingly the bride is termed auspicious or inauspicious. Any good or bad occurrence in the family during this time is said to result from the presence of the bride. A new bride is however, generally considered to be auspicious.

On the other hand, widows were considered especially inauspicious. This belief probably stemmed from her traditional financial powerlessness. Widows were debarred from attending any auspicious ceremony, as it was believed that their presence might negatively affect its success. A new bride was protected from the glance of a widow for the same reason. Therefore widows had separate areas to live in where they cooked their own food. They were not allowed to eat meat, onions, garlic or spices for these were considered excitatory, and a widow was supposed to suppress, not inflame her passions. Most of these rules have fallen into disuse now.

A barren woman is still considered inauspicious by many, given the patriarchal social system and its emphasis on children especially sons. Such a woman, though not debarred, is avoided during all auspicious occasions by those with a rigidly traditional outlook. During the nuptial bath and other ceremonies related to marriage, which require the presence of suhagans, it is generally women with sons, pregnant women or the newly married, who participate. A barren woman is not brought near a bride or child for whom a ceremony is being performed for fear that her ill fate will rub off onto them.

People are also very superstitious about their mornings. It is believed that the whole day is affected by the morning. Seeing a bride, the statue of a deity, or a Brahmin is considered auspicious, while sighting widows, barren women and unlucky people is considered inauspicious. To avoid the risk

of seeing anything unpleasant in the morning, many people look at the palms of their hands as soon as they awaken and recite this invocation: "In the tips of the fingers resides Lakshmi; in the middle, Sarasvati; in the palm of the hand resides Parvati; looking at my hands, I begin my day."

There are also many superstitions related to death. The most important among them is that food is not cooked in a house where death has occurred. At this time, all the members of the family are considered to be unclean and do not enter the kitchen. Neighbors are expected to cook and send food for them. This belief probably results from the fact that when a death occurs in a family, the relatives of the deceased are , and have neither the desire nor the time to cook. This practice also reinforces the sense of community at times of trouble.

Hinduism - A Way of Life

Caste System/ State of Mind
1. Priests
2. Warriors/Rulers
3. Merchants/Farmers
4. Laborer
5. Sin People

According to Individual Personal Actions he will be in one of the above State's at that particular moment.

God
1. Creator
2. Preserver
3. Destroyer

Karma
1. Good Begets Good
2. Bad Begets Bad

Reincarnation
1. Good Karma - Higher Caste/State
2. Bad Karma - Lower Caste/State

Niravana
1. Tuning into the Brahma Within.

Sri Rama
1. As a Son
2. As a Brother
3. As a Husband
4. As a Priest
5. As a Warrior
6. As a Merchant/Farmer
7. As a Relative
8. As a Friend
9. As a Student
10. Elder's / Youngster's
11. Friends/Foe's
12. Small/Big

Man/Women
1. Food
2. Sleep
3. Fear
4. Sex & Pleasure
5. Dharma - Control & Discipline

Yoga Sutras
1. Maitribhavana
Be Friendly with Others
2. Karunabhavana
Be Kind to Others
3. Muditabhava
Be in Touch with others who are more knowledgeable
and respectable in this Society
4. Upekshabhava
Keep away from those who always keep expectations from you.

Sarvagamanamachara Prathamam Parikalpate
Aacharaprabhavo Dharma Dharmasya Prabhurachyutaha

To be with Correct Aachara is given first priority as per our Dharma Shastra.
Being in good achara will only give birth to Dharma.
And Being to Dharma only once can achieve Darshana to God.
Those who live according to Dharma are treated as Pavithra Atma and full of Character.
Only these kind of People are given importance in society and are liked by God.

SonarQube with Jenkins Setup using Docker Images

https://funnelgarden.com/sonarqube-jenkins-docker/  https://medium.com/@hakdogan/an-end-to-end-tutorial-to-continuous-integration-and-con...