Moses Yap
:-) A happy IT Guy

C#: My first foray into Dependency Injection using Spring.NET

August 1, 2008 09:47 by moses.yap
For quite a few months now, I have been hearing a lot about loose coupled components using Dependency Injection patterns.  There are a few frameworks that keeps popping up, including the Unity Framework which is part of Enterprise Library 4.0, String.NET which has been around for a while and is... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | C# | Patterns
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

C#: Randomize Sorting the Items inside a Collection

July 30, 2008 05:18 by moses.yap
Recently, I have been doing some simple games for my web site at ChristianPipes.com and one of the games is a multiple choice type game where choices for a particular question has to come out in random placement.  So, if the same question comes out, the choices would not be sorted the same on t... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | C#
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

C#: Getting a Random Record from a Table inside the SQL Server Database

July 30, 2008 03:56 by moses.yap
I wanted to get a random record from a particular table on the SQL Server database.  For my case, I had a table containing quotes, and I wanted to randomly pick on to show on one corner of my web site.  I am also using LINQ to SQL for this web site, so the solution here will be using LINQ,... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | C# | SQL Server | Lamda
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

.NET: Creating your own Custom Configuration Section

July 28, 2008 09:39 by moses.yap
Sometimes its pretty useful to create your own configuration section on the web.config or app.config file.  It makes much cleaner than using the key/value pair on the appSettigns, and you get a strongly typed object with validations for the values. To create our own configuration section, we n... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | C#
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

LINQ: A pretty interesting LINQ usage

June 30, 2008 13:22 by moses.yap
I was having a problem doing something very simple.  I wanted to bind an array of string to a DataGridView on a windows program, but instead of the values of the strings in the array, I am getting the Length instead.  I guess that is because the Length is the first public property and this... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | C# | Lamda
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

SAP B1: Creating a User Defined Table using C#

May 20, 2008 07:02 by moses.yap
User defined tables are used to store custom information in SAP B1.  A user define table is a tabular container that can contain multiple user defined fields and can be grouped together to form a User Defined Object (UDO).  A user defined table can be of type Master Data, Master Data Row... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | C# | SAP B1
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

SAP B1: Connecting to the DI Server

May 17, 2008 03:51 by moses.yap
The DI (Data Integration) Server exposes services and APIs for a developer to interact with the business objects and eventually the data store of SAP Business One.  This article is about connecting to the DI Server, first using Single Sign On, which uses the instance of an already running SAP B... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | C# | SAP B1
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

C#: Creating a Singly Linked List using Generics

May 4, 2008 14:03 by mosesyap
This is more for exercise more than anything else.  By the way, in .NET 3.5, the System.Collection.Generics has a LinkedList<T> class that represents a doubly linked list.  I wanted to test out some stuff in this practice.  Using an indexer and using an enumerator.  Here's... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | Algorithms | C#
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

C#: Reversing the order of the letters on each words in a sentence

May 4, 2008 13:23 by mosesyap
Here is a simple exercise.  We have a sentence and we want to reverse the order of the characters on each word without reversing the order of the words in the sentence.  I think I read this before from the net as a Microsoft Interview question or something of that line. Ex. Input: The qu... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | Algorithms | C#
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

C#: Converting an Array of String to an Array of int

May 1, 2008 17:32 by MosesYap
This post is about converting an array of a particular datatype to another array of a different type.  The title is a bit misleading in that the procedures described below can be used to convert from an array of any datatype to an array of any datatype.Converting a delimited string to an int ar... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: .NET | Lamda | C#
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed