Archive

Author Archive

C# cloning objects and lists

March 26th, 2010 gerbrand No comments

Okay I had a situation where I needed to make a copy of my generic list (as a temporary backup). What I did was in my class I added a method ‘Clone’.

public object Clone()
{
var ms = new MemoryStream();
var bf = new BinaryFormatter();

bf.Serialize(ms, this);
ms.Position = 0;

var obj = bf.Deserialize(ms);
ms.Close();

return obj;
}

With this I could clone each object in my generic list by doing it in a foreach loop.

var oldData = new List<myObject>();

foreach(var data in myObjectList){

oldData.Add((myObject)data.Clone();

}

This is going “fast” with a small list of objects, but once my list had around 1000 items, it didn’t go fast enough. So after googling the web I found a better solutions. Why not cloning the whole list at once.
To do this I need to let my class inherit from ICloneable interface. Once this is done, you can do the following instead of using the foreach.

var oldData = new List<myObject>();

oldData = (List<myObject>) myObjectList.Clone();

This line of code had a elapsed time around 12seconds instead of 5-6minutes with the foreach loop. Which is away better performance.
Now my program has a smoother way of working. Hope that y’all can also benefit from this.

Greetzz and until next post …

Categories: General Tags:

New Telerik Q1 2010 (part 3)

March 26th, 2010 gerbrand No comments

I forgot to add a post about the webinar about the Telerik winform controls, presented by Robert Shoemate (twitter: @shoerob).

In this release the added a new layout for the visual style builder, a list of visual states and repository items. Now a nice feature that I like the most is that you can edit all controls at once. In the previous releases this wasn’t possible. You needed to edit your controls one by one. But now this isn’t the case any more and you can easily edit all controls.

So whats new in the controls, well they changed the radschedular. A new timeline view : horizontal display.
Other key features are:

  • Duration
  • timescale
  • user interaction
  • resource grouping

Further on he talked about the visual studio extensions and about Telerik Reporting.

I’m not going to write everything he said in the whole webinar. The best way is to go and listen for your self :-) .

Greetzz and until next post…

Categories: Development, Telerik Tags:

Code Bubbles

March 11th, 2010 gerbrand No comments

Code bubbles an amazing new way of how developers can work (only Java support for the moment). I saw the video and I was amazed and curious how this development will go further.
I signed myself up for the beta and waiting until it’s released.

The essential goal of this project is to make it easier for developers to see many fragments of code (or other information) at once without having to navigate back and forth. Each of these fragments is shown in a bubble.

Check it out!

Greetzz and until next post …

Categories: Development, Java Tags:

New Telerik Q1 2010 (part 2)

March 11th, 2010 gerbrand No comments

Yesterday the first release of Telerik controls 2010 was a fact. Today I’m going to download the release and have a look at the new controls and performances, …

Evan Hutnick presented yesterdays webinar about the RadControls for Silverlight and WPF. (He can be followed at Twitter: @evanhutnick) In this release for they have some cool new RadControls like the RadMap, RadTransition CTP and RadBook. They also improved the themes and animations in the RadChart (more professional looks).

If you want to view this webinar, go to the following link: tv.telerik.com -> “What’s new in RadControls for Silverlight and WPF in Q1 2010″.

Today the webinar is going about “What’s new in RadControls for Winforms and reporting in Q1 2010″ -> can’t wait that the webinar starts :-) .

Greetzz and until next post…

Categories: C#, Development, Telerik Tags:

New Telerik Q1 2010

March 9th, 2010 gerbrand No comments

Tomorrow the first release of Telerik controls 2010 will be a fact. Today I allready had a glimps of the new asp.net ajax & mvc at the webinar.

Todd Anglin presented this webinar. (He can be followed at Twitter: @toddanglin) In this release they focussed on performance an productivity features.

If you want to view this webinar, go to the following link: tv.telerik.com/home -> “What’s new in RadControls for ASP.NET AJAX & Telerik Extensions for MVC in Q1 2010″.

When you are really interested in predefined controls you need to check it out!!

Greetzz and until next post…

Categories: C#, Development, Telerik Tags:

On holiday

September 1st, 2009 gerbrand No comments

Finally some well deserved rest… Going to the Dominican Republic for 2 weeks… resting, diving, swimming, …

Just me and my wife…

We are staying at the region of Bayahibe. Not far of a national park.

I’ll upload some pictures later on this week…

Greetzz and untill next post

Categories: General Tags:

Dell Studio 15

July 23rd, 2009 gerbrand No comments

Yesterday my new Dell Studio 15 arrived.

A quick overview of the configuration:

- display: 15.6″ widescreen HD (1366X768) WLED with TrueLife
- Integrated camera 2.0 mega pixels
- Back cover: Jet black matte finish
- Intel core 2 duo T6500(2.1GHz, 800MHz, 2MB)
- Memory: 4096MB (2×2048) 800Mhz DDR2 Dual Channel
- Hard Drive: 320GB Sata (5400rpm)
- Optical drive: 8x DVD +/-RW Drive
- Power supply: inspiron 90W ac adapter
- Battery: primary 9-cell 85W/HR LI-ION
- Graphics: 512MB ATI Mobility Radeon 4570
- Wireless: intel wifi link 5100 (802.11 a/b/g/n 1×2) 1/2 minicard european
- Wireless: Europe Dell Bluetooth 370 card
- Wireless label(intel wireless cards) – core 2 duo
- Keyboard: internal belgian Azerty keyboard
- OS: Windows Vista SP1 ultimate(64bit)
- Dell video chat

Voila, this is my configuration of my Dell Studio 15.

Didn’t work on it very much, only installing all the programs I need. (visual studio, sqlserver2008, eclipse, wampserver, …)

Greetzz and till next post.

Categories: Computer Hardware, Dell Studio 15 Tags:

New Laptop

July 15th, 2009 gerbrand No comments

Finally my new laptop(dell studio 15) will be soon arriving…

I got confirmation that he is sended. So hopefully I get it on friday.

On arrival I will write a post about it. Specs etc.

Till then… greetzz

Edit: Just got the word that my laptop will be arriving next week 22/07/09

Categories: Computer Hardware, Dell Studio 15 Tags:

Troubles

July 10th, 2009 gerbrand No comments

Arghhh… Had some bad days last week. Motherboard of my master computer crashed -> ordered new one together with the harddrives -> now my order seems to be lost. They ordered it again so I have to wait again until next week.

Then 2 days later my laptop crashed (Acer, 5 years old), I ordered a Dell (studio 15) this time. There I had troubles with the payment. Finally today he is ordered and in production. Delivery date is set in 2 weeks.

So hopefully I can start working on the NAS next weekend and get back again on programming when my master computer is back online or my new laptop has arrived.

Greetzz and until next post…

Categories: Computer Hardware Tags:

Some NAS news (2)

July 1st, 2009 gerbrand No comments

Okay A bit later than expected but my hard drives are ordered. So I guess this weekend I will be able to make my own NAS and I’ll keep you all post it on how it went.

Greetz

Categories: Computer Hardware, NAS Tags: