jQuery Cycle what a cool stuff!!!

http://www.malsup.com/jquery/cycle/

Posted in Uncategorized | Leave a comment

putting ?contents=1 at end of the web part page

Did you know putting ?contents=1 at end of the any page you get list of all web parts?

Posted in Uncategorized | Tagged | Leave a comment

PowerShell goodies and usefull links

Syntax
http://ss64.com/ps/syntax.html

Posted in Uncategorized | Tagged | Leave a comment

Sign up at Gen App (Generationapp) for Windows 8

http://www.generationapp.com/

Posted in Uncategorized | Leave a comment

Learned something new on The Reactive Extensions (Rx)…

http://msdn.microsoft.com/en-us/data/gg577609.aspx

Posted in Uncategorized | Leave a comment

Installed SharePoint 2013 Preview on the Hyper-V

The location is
http://technet.microsoft.com/en-US/evalcenter/hh973397.aspx?wt.mc_id=TEC_121_1_4

Training

http://technet.microsoft.com/en-US/sharepoint/fp123606

http://msdn.microsoft.com/en-US/office/apps/fp123626

Posted in Uncategorized | Tagged | Leave a comment

Weird error in VS2010 for SharePoint project.

Error 5 Both “ListDefinition2” and “ListDefinition2” contain a file that deploys to the same Package location: SPCustomListFormDemo_Feature2\ListDefinition2\EYDisplay.aspx D:\root\fdr\SandBox\POC\spcustomlistformdemo\SPCustomListFormDemo\Package\Package.package SPCustomListFormDemo

Never thought the .spdata file will be a culprit. The error was caused a duplicate entries in the .spdata file. This happens because we did few moves and copies.

More details can be found at

http://blog.beckybertram.com/Lists/Posts/Post.aspx?ID=94

 

Posted in Uncategorized | Leave a comment

I got the following error with one solution.

Error 1 Error occurred in deployment step ‘Add Solution’: The solution cannot be deployed.  Directory “SPCustomListFormDemo_Feature1” associated with feature ‘f0fb0300-f1a4-493b-ac43-68977d7d6e2d’ in the solution is used by feature ‘2d8b49b9-ba7c-4f7f-82f7-447e596ba96c’ installed in the farm. All features must have unique directories to avoid overwriting files.
  0 0 SPCustomListFormDemo
 

I used the following command to remove the feature with the ID “‘2d8b49b9-ba7c-4f7f-82f7-447e596ba96c’ ”

stsadm -o uninstallfeature -id 2d8b49b9-ba7c-4f7f-82f7-447e596ba96c -force

The next deploy from the Visual Studio 2010 worked.

Posted in Uncategorized | Leave a comment

Taxonomy Service and its output parsing code

The following code is created using this link. The code will need the Taxonomy Service ASMX file, termstore ID, term set ID.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Globalization;
using System.IO;
namespace ConsoleApplication2
{
class Program
{
#region “Constants…”
const string TERMSET_ELEMNODE = “TS”;
const string TERMSETNAME_ATTR = “a12”;
const string TERMSETID_ATTR = “a9”;
const string TERM_ELEMNODE = “T”;
const string TERMID_ATTR = “a9”;
const string TERMMOREINFO_ELEMNODE = “TMS”;
const string TERMMOREINFOCHILD_ELEMNODE = “TM”;
const string PARENTTERMSETID_ATTR = “a24”;
const string LABELSET_ELEMNOE = “LS”;
const string LABELTERM_ELEMNOE = “TL”;
const string LABELNAME_ATTR = “a32”;
const string ISDEFAULTLABELNAME_ATTR = “a31”;
const string DESCRIPTIONS_ELEMNOE = “DS”;
const string TERMDESCRIPTION_ATTR = “TD”;
const string DESCRIPTIONTEXT = “a11”;
const string PARENTTERMID_ATTR = “a25”;
const string SETOFTERMSID_ATTR = “a45”;
#endregion
static void Main(string[] args)
{
ServiceReference1.TaxonomywebserviceSoapClient taxonomyClient = new ServiceReference1.TaxonomywebserviceSoapClient();
taxonomyClient.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
string result = null;
try
{
XElement termStoreIds = new XElement(“termStoreIds”,
new XElement(“termStoreId”, “35fa6bf3-f651-478a-a676-79d145c6aa09”));
XElement termSetIds = new XElement(“termSetIds”,
new XElement(“termSetId”, “ecc449d7-6370-4b43-8a7c-6d0c13668ee9”));
CultureInfo myCIintl = new CultureInfo(“en-US”, false);
XElement oldtimestamp = new XElement(“timeStamps”,
new XElement(“timeStamp”, “633992461437070000”));
XElement clientVersion = new XElement(“versions”,
new XElement(“version”, “1”));
string serverTermSetTimeStampXml = “”;
result = taxonomyClient.GetTermSets(
termStoreIds.ToString(SaveOptions.DisableFormatting),
termSetIds.ToString(SaveOptions.DisableFormatting),
myCIintl.LCID,
oldtimestamp.ToString(SaveOptions.DisableFormatting),
clientVersion.ToString(SaveOptions.DisableFormatting),
out serverTermSetTimeStampXml);
//
// Open the root file…
//
StringReader strReader = new StringReader(result);
XElement mainRoot = XElement.Load(strReader, LoadOptions.None);
ProcessRootElement ( mainRoot.Element(“TermStore”) );
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
#region “Helper methods..”
/// <summary>
///
/// </summary>
/// <param name=”root”></param>
public static void ProcessRootElement(XElement root)
{
//
// List all term sets
//
IEnumerable<XElement> termSets =
from termSet in root.Elements(TERMSET_ELEMNODE)
select termSet;
foreach (XElement el in termSets)
{
//
// Print term set name
//
PrintTermSetName(el);
//
// Enumberate all the child terms
//
IEnumerable<XElement> terms =
from term in root.Elements(TERM_ELEMNODE)
where (string)term.Element(TERMMOREINFO_ELEMNODE)
.Element(TERMMOREINFOCHILD_ELEMNODE)
.Attribute(PARENTTERMSETID_ATTR) == el.Attribute(TERMSETID_ATTR).Value
select term;
foreach (XElement el2 in terms)
{
//
// Check if it has parent element
//
if (IsParentTerm(el2))
{
//
// print the term name
//
PrintTermName(2, el2);
//
// Enumerate child terms from this term
//
string parentTermID = el2.Attribute(TERMID_ATTR).Value;
IEnumerable<XElement> terms1 =
from term in root.Elements(TERM_ELEMNODE)
where (string)term.Element(TERMMOREINFO_ELEMNODE)
.Element(TERMMOREINFOCHILD_ELEMNODE)
.Attribute(PARENTTERMID_ATTR) == parentTermID
select term;
foreach (XElement el3 in terms1)
{
//
// print the term name
//
PrintTermName(4, el3);
}
}
}
}
}
 
/// <summary>
///
/// </summary>
/// <param name=”count”></param>
/// <returns></returns>
public static string Indent(int count)
{
return “”.PadLeft(count);
} /// <summary>
/// <summary>
///
/// </summary>
/// <param name=”el”></param>
/// <returns></returns>
private static bool IsParentTerm(XElement el)
{
return (null == el.Element(TERMMOREINFO_ELEMNODE).Element(TERMMOREINFOCHILD_ELEMNODE).Attribute(PARENTTERMID_ATTR));
}
/// <summary>
///
/// </summary>
/// <param name=”el”></param>
private static void PrintTermSetName(XElement el)
{
Console.WriteLine(Indent(0) + el.Attribute(TERMSETNAME_ATTR).Value);
}
/// <summary>
///
/// </summary>
/// <param name=”indent”></param>
/// <param name=”el2″></param>
private static void PrintTermName(int indent, XElement el2)
{
Console.WriteLine(Indent(indent) + GetTermName(el2));
}
/// <summary>
///
/// </summary>
/// <param name=”el2″></param>
/// <returns></returns>
private static string GetTermName(XElement el2)
{
return el2.Element(LABELSET_ELEMNOE).Element(LABELTERM_ELEMNOE).Attribute(LABELNAME_ATTR).Value;
}
#endregion
}
}
Posted in Uncategorized | Leave a comment

Managed Metadata Column Limitations

I liked the following article “Managed Metadata Column Limitations”

http://todosharepoint.blogspot.com/2012/01/managed-metadata-column-limitations.html

Posted in Uncategorized | Leave a comment