Over two days, more than 600 attendees will meet world famous lecturers, engaged all year round in such events as JavaOne, The ServerSide Java Symposium, Jazoon showcasing their latest knowledge in creating more reliable, scalable and secure solutions using Java technologies.
The fees for the conference are as follows: VIP Pass – 175 EUR
VIP Pass Includes:
• Access to all sessions
• Eco bag with advertising materials
• VIP promoting gifts
• Coffee breaks
• Front row seating
• DVD with all conference materials, video, photos and etc.
• Q & A session with the lecturers
Standard Pass – 110 EUR
Standard Pass Includes:
• Access to all sessions
• Eco bag with advertising materials
• Coffee breaks
• Q & A session with the lecturers
You can add to your pass:
Lunch – 10 EUR per day
The buffet lunch is in a separate hall with plenty of salads, different kinds of meats, vegetarian dishes and desserts.
Code highlighters are very useful tools to present code snippets on your blog or website with a professional look and improve the readability of code you provide for your readers. In this post I want to introduce you the best highlighter which I found.
The past two days I search in Google about code highlighters and I saw so much that I’ve got a headache.
There are so much highlighters but no one can’t highlight the source code in way what I want.
A good part of my posts contain source code snippets to illustrate and/or compliment the content. I’m a .NET developer and I write code in Visual Studio. In my posts when I show source code I want it to be formatted as in Visual Studio, with same colors and styles. After two days research I found one. I think it’s the best one.
If you have some troubles with installation on vspaste.msi file look this articles here and here.
I used Windows 7 beta and when I tried to install .msi file I had the error. But with “less msiérables” I could get the plug-in dll and then move it to “...\Program Files\Windows Live\Writer\Plugins”.
How does Paste from Visual Studio work ? Just copy the code from Visual Studio and insert it directly to Windows Live Writer.
The plug-in generates html and in browsers it is look exactly like code in Visual Studio.
public interface IChangeBoxedPoint { void ChangeProperties(int x, int y); }
struct MyPoint : IChangeBoxedPoint { public int X { get; set; } public int Y { get; set; }
public void ChangeProperties(int x, int y) { this.X = x; this.Y = y; }
public override string ToString() { string message = string.Format("X - {0}, Y - {1}", X, Y); return message; } }
The last that you can do is to delete author’s website link– It never shows up on the page, but it is on the bottom in the generated html.
This was a little disappointed to me, but the plug –in does it great job and the only one disadvantage is the hidden author’s link – which you can delete :)
This will be my first topic. I hope it will be useful.
Changing Fields in a Boxed Value Type
In manycases, we must get a reference to an instance of a value type. Someone will say “But we already have generics”.
Yes we have generics, but still has cases (if you start working on project, which has been written on Visual Studio 2003 ) in which you should use a mechanism called boxing .
I created a structure (it is of value type).
struct MyPoint { publicint X { get; set; } publicint Y { get; set; }
What happens when an instance of a value type is boxed?
MyPoint p = new MyPoint(); p.X = 1; p.Y = 1; object obj = p;
1.Memory is allocated from the managed heap
2.The value type's fields are copied to allocated heap memory
3.The address of the object is returned
Is it possible to change fields of already boxed value type ?
Let’s see :)
MyPoint p = new MyPoint(); p.X = 1; p.Y = 1; Console.WriteLine(p); // Displays X - 1, Y - 1
p.ChangeProperties(2, 2); Console.WriteLine(p); // Displays X - 2, Y - 2
object obj = p; Console.WriteLine(obj); // Displays X - 2, Y - 2
((MyPoint)obj).ChangeProperties(3, 3); Console.WriteLine(obj); // ! Displays X - 2, Y - 2
When I casting obj toa MyPoint (made operation unboxing)and call ToString() method I expect the following result [ X - 3, Y – 3]. Why this result is obtained ?
Because casting obj to a MyPoint unboxes objand copies the fields in the boxed MyPoint to a temporary MyPoint on the thread's stack! The X and Y fields of this temporary point are changed to 3and 3.
How to change fields of unboxed object?
With interface and this interface defining a ChangeProperties method
publicinterface IChangeBoxedPoint { void ChangeProperties(int x, int y); }
struct MyPoint: IChangeBoxedPoint { publicint X { get; set; } publicint Y { get; set; }
MyPoint p = new MyPoint(); p.X = 1; p.Y = 1; Console.WriteLine(p); // Displays X - 1, Y - 1
p.ChangeProperties(2, 2); Console.WriteLine(p); // Displays X - 2, Y - 2
object obj = p; Console.WriteLine(obj); // Displays X - 2, Y - 2
((MyPoint)obj).ChangeProperties(3, 3); Console.WriteLine(obj); // ! Displays X - 2, Y - 2
((IChangeBoxedPoint)obj).ChangeProperties(3, 3); Console.WriteLine(obj); // Displays X - 3, Y - 3
MyPoint myPoint = ((MyPoint)obj); Console.WriteLine(myPoint); // Displays X - 3, Y - 3
The codeis almost identical to the previous version, but the ChangeProperties
method is defined by the IChangeBoxedPoint interfaceand the MyPoint type now implements
this interface. Icast the object to an IChangeBoxedPoint. Now this ischange the boxed MyPoint'sX and Yfields.The interface method ChangePropertieshas allowed me to