Monthly Archives: June 2011

SharePoint grouping by week

OverviewIn SharePoint 2007, to achieve grouping list items by week, a week start or week end date is required. Calculated columns can be used to work out the start day of the week and end day of the week. Week starting Monday =[Created]-WEEKDAY([Created],2)+1 Week starting Sunday =[Created]-WEEKDAY([Created])+1 Week ending Saturday =[Created]+7-WEEKDAY([Created]) Week ending Sunday =[Created]+7-WEEKDAY([Created],2) […]

Read More

Call a function from string variable in PERL, PHP and C#

PERL my $function_name = “hello”;&$function_name(10);function hello() { my $param = shift; print “hello $paramn”;} PHP $function_name = “hello”;$function_name();function hello($param) { echo “hello $paramn”;} C# class Program{ static void Main(string[] args) { Type type = typeof(MyReflectionClass); MethodInfo method = type.GetMethod(“Hello”); MyReflectionClass c = new MyReflectionClass(); method.Invoke(c, null); }}public class MyReflectionClass{ public void Hello(int num) { Console.WriteLine(“hello […]

Read More

Develop a Windows Service in C#

Have you ever wanted to utilise the Windows service to run background tasks on your Windows server? Use the following starter guides to help you kick start your Windows Service projects. For Visual Studio 2005. A guide posted by The Reddest to creating a simple Windows Service in C# will help get you started.http://www.switchonthecode.com/tutorials/creating-a-simple-windows-service-in-csharp For […]

Read More