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

A Simple Image Cache

Icon 1 Comments
A Simple Image Cache

Suppose your application downloads images and those images don't change that often.
It would be better to keep a cache of those images, and then only download the images you need.



Images

...
- - - - -

Are there any 2-D Lexers / Parsers?

Icon 8 Comments
More of an Ask. Is there any 2-D Lexers / Parsers?

All parsers I know read the input text as if it was a stream of characters.

Left To Right, Top to Bottom

Example source text.
 a ::= [ 1 2 3 ]        4 5 6        1 2 3b ::= [ 4 5 6 ]         7 8 9 


I can sort of define the grammar like so
...
- - - - -

FizzBuzz in Single Line Of Code

Icon 16 Comments
FizzBuzz in Single Line Of Code

...
* * * * *

6000+ Kudos

Icon 6 Comments
6000+ Kudos

Recently I broke through the 6000 Kudos barrier.
So I wrote small program to screen-scrap the contributions page so I could do a breakdown of all my contributions by language section.

Still not quite got the full A-Z in both snippets and tutorials.
...
- - - - -

Pseudo-Constants

Icon 4 Comments
Pseudo-Constants

Sometime you need a Constant that is calculated at run-time.

So how would you do it?

Spoiler
- - - - -

Iterators used unconventionally.

Icon Leave Comment
Iterators used unconventionally.


I was thinking could the LINQ approach, be applied to getting inputs from the user?

In VB11 (vs2012) iterators where added to the VB.Net, so lets utilize them.

...
- - - - -

Concept: Recursive Yield on to a Common Channel.

Icon 3 Comments
Concept: Recursive Yield on to a Common Channel.

Public Class Node(Of T) Public ReadOnly Value As T Public Property Left As Node(Of T) Public Property Righ As Node(Of T)



Let's implement a simple iterator the return all of the values of all the nodes.

...
- - - - -

Visual Studio Item Template: Custom Exception.

Icon 1 Comments
Visual Studio Item Template: Custom Exception

I've created a Visual Studio Item Template to make the writing of custom exceptions, simpler. Just a simple as a add new Item.

Add New Item Dialog


Result
...
- - - - -

Fibonacci Sequence using LINQ

Icon 2 Comments
Just a quick blog post demonstrate a way generating the Fibonacci Sequence with LINQ.
...
* * * - -

In-line Assignment Operator

Icon Leave Comment
In-line Assignment Operator

I admit that I'm not a fan of in-line assignment, as the symbol for the operator closely resembles the comparison operator for equality.
Which to me is easily confusing.

Since vb.net does allow assignment mid expression, due to symbol =...

  • (13 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »

Search My Blog

Recent Entries

Recent Comments