Subscribe to The Madman Scribblings        RSS Feed
- - - - -

More Natural Looking Recursive Functions

Icon 1 Comments
In all of the mathematical textbooks (I've seen) the following two functions are defined like this;-

Fibonacci Sequence

f(n) = f(n-1) + f(n-2)

Where f(0) = 1, f(1) = 1

Factorial

f(n) = n * f(n-1)

Where f(0) = 1...
- - - - -

Listboxes with alternate lines background colors.

Icon Leave Comment
In the C# Programmers Topics PsychoCoder started this thread and it reminded be of my attempt to achieve this effect a few months back.

Here's what I came up with.
...
- - - - -

Periodic Table (2 Class 1 XML File+Loads of Exts.)

Icon Leave Comment
In this topic the user is wanting to replicate the periodic table with class, and I though I'll have a go at it.

They are after code the that looks like this.
MyTable.Carbon.AtomicNumber

I decided to store the data on the atomic elements in xml file, so it is easy update.

Class: AtomicElement
...
- - - - -

Trying to implement a valid StringOf<T> .

Icon Leave Comment
The following April Fool Joke by Scott Hanselman as been bugging be for ages;- StringOr<T>
So I been attempting to bring it in to realisation a valid implementation of it.

First a attempt: StringOf(Of T) Code Snippet
It has it problems. Like you to hard code each

Second attempt:
...
- - - - -

VB.NET Coolness is LINQ + XML Literals

Icon Leave Comment
Using the w3schools xml example: XML CD catalog

Task: From this catelogue I want you group the cds by date descending and display the titles, artist and price.
...
- - - - -

Coding:

Icon Leave Comment
Currently writing a class so you can map class properties to controls.

Public Class Test Protected m_Text As String=""Public Property Text() As String Get End Get Set(ByVal Value As String) End SetEnd PropertyEnd Class


...
- - - - -

Embarrassing Coding Mistake (Flat World)

Icon Leave Comment
An embarrassing coding mistake. (Took a hour to realise it.)

Thinking the world is Flat.
- - - - -

Extension Methods

Icon Leave Comment
This is just for me to remember how to implement them.
 <System.Runtime.CompilerServices.Extension()> _  Public Function LastDayOfMonth(ByVal thismonth As Date) As Date  Return New Date(thismonth.Year, thismonth.Month, Date.DaysInMonth(thismonth.Year, thismonth.Month)) End Function
- - - - -

Huge Tract Of ...

Icon 2 Comments
Resolution

Today I decided to buy the two 22'' wide-screen LCD monitors (Edge10 W223 to be exact) i've been look at for a while now.
Total Cost 238! :^:...
- - - - -

Decided to learn a new language.

Icon Leave Comment
Today i decided to venture into the land of a new programming language.
Picking C#
First comments.
Its case sensitive and it likes its braces. (Too many)

  • (2 Pages)
  • +
  • 1
  • 2