Wednesday, September 18, 2013
Stored Procedure for Add Master and Detail
https://www.blogger.com/blogger.g?blogID=2984821582526309017#editor/target=post;postID=1068201323384154429
Saturday, September 14, 2013
Convert a delimited string to a table in SQL
SQL Server
Convert a delimited string to a table using Recursive Common Table Expression
declare @string as varchar(200),@start as int, @finish as int
set @string='Sinthiya,I,,Love,You,Very,Much,'+','
with cte(start,finish) as
(
select 1 as start,CHARINDEX(',',@string) as finish
union all
select cte.finish+1 as start, CHARINDEX(',',@string,cte.finish+1) as finish
from cte where cte.finish <>0
)
select SUBSTRING(@string,cte.start,cte.finish-cte.start) from cte where cte.finish<>0
Thursday, March 7, 2013
Online Editor
Let's say you're away from your computer and all you've got is a web browser. You'd still like to run a piece of code (e.g. to check an answer on SO). What are your options?
Let's create a list of on-line interpreters of various programming languages. Here are some examples:
Let's create a list of on-line interpreters of various programming languages. Here are some examples:
- Haskell: http://tryhaskell.org/
- Scala: http://www.simplyscala.com/
- Many languages: http://ideone.com/
- Many languages: http://codepad.org/
Thursday, February 7, 2013
JavaScript Intellisense for SharePoint 2010 Client Object Model in Script .js file
/// <reference path ="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js" />
/// <reference name="MicrosoftAjax.js" />
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.core.debug.js" />
/// <reference path="file://C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/14/TEMPLATE/LAYOUTS/SP.debug.js" />
JavaScript Intellisense for SharePoint 2010 Client Object Model in Application Page .aspx file
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> <SharePoint:ScriptLink ID="ScriptLinkB" runat="server" Name="sp.js"> </SharePoint:ScriptLink> <script type="text/javascript" src="/dev/_layouts/SP.debug.js" /> <script type="text/javascript"> var ctx = SP.ClientContext.get_current(); ctx.get_serverVersion(); </script> </asp:Content>
JavaScript Intellisense for SharePoint 2010 Client Object Model in Visual WebPart .aspx file<% #if XXXX %> <script type="text/javascript" src="/dev/_layouts/MicrosoftAjax.js" /> <script type="text/javascript" src="/dev/_layouts/SP.debug.js" /> <% #endif %> <script type="text/ecmascript" language="ecmascript"> var x = SP.ClientContext.get_current(); </script>
JavaScript Intellisense for SharePoint 2010 Client Object Model in Visual WebPart (SandBox) .aspx file
<% #if XXXX %> <script type="text/javascript" src="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\MicrosoftAjax.js" /> <script type="text/javascript" src="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.debug.js" /> <% #endif %> <script type="text/ecmascript" language="ecmascript"> var x = SP.ClientContext.get_current(); </script>
Labels:
CSOM,
JavaScript,
SharePoint
Location:
Chundukuli, Jaffna, Sri Lanka
Subscribe to:
Posts (Atom)