Well, Günter Hagedorn - a friend of mine - just showed me a cool trick in Photoshop: Cross-Processing pictures. "Cross-processing is developing color print or slide film in the wrong chemicals". Have a look at the following two pictures as an example. The left picture is the raw output from my camera. The right one is the one Günter cross-processed.
Pretty neat, eh?
Daniel
Alright, here is the next quiz. Imagine the following code:
Module Module1 Dim intVal As Integer = 10 Dim dblVal As Double = 20 Sub Main() ModifyValue(intVal) ModifyValue(dblVal) PrintValues() End Sub Private Sub PrintValues() Console.WriteLine("{0} - {1}", intVal, dblVal) End Sub Private Sub ModifyValue(ByRef Value As Integer) Value = 30 PrintValues() End SubEnd Module
This code will print out the following:
30 - 2030 - 2030 - 30
So why's that? Give it your best shot!
Dim x = -2147483648Dim y = Integer.MinValue
Well, the question is as easy as that - what Types are x and y and what's the reason?
Cheers
P.S. Needless to say that you shouldn’t use the VB.NET compiler but the one in your head ;-)
Da die Objektorientierte Entwicklung für viele Entwickler immer noch ein Buch mit sieben Siegeln ist spreche ich am Dienstag, den 4. Dezember 2007, 18:00 – 22:00 Uhr bei der .NET Usergroup Frankfurt über Objektorientierte Programmierung mit VB.NET.
Abstract: Seit der ersten Version des .NET Framework ist VB.NET eine durch und durch objektorientierte Sprache. Anders als in VB 6.0 ist der Umgang mit Objekten hier keine Kür, sondern Pflicht und mit dem Wandel einher gehen objektorientierte Konzepte wie Klassen und Objekte, Kapselung, Vererbung, Polymorphismus, Schnittstellen, usw. Welche Konsequenzen dieser Wandel für Entwickler hat, was die Vorteile der Objektorientierten Programmierung (OOP) sind und wie sich diese in konkreten Codebeispielen äußern zeigt Daniel Walzenbach, Developer Evangelist der Microsoft Deutschland GmbH. Im Anschluss einer Einführung in die OOP beleuchtet Daniel außerdem komplexere Themen wie Ereignisse, Boxing, Polymorphie, Delegates, usw. Dieser Vortrag bietet zum einen Visual Basic-Programmieren mit fundamentalen bzw. fortgeschrittenen Kenntnissen einen guten Einstieg bzw. eine Vertiefung der OOP, sondern zum anderen auch praktizierenden VB.NET Programmierern die Möglichkeit ihr Wissen zu vervollständigen und vielleicht existierende Wissenslücken zu schließen.
Bis bald in FFM!
P.S.: Wie immer bin ich an jeder Art von Feedback interessiert! Konkret würde mich in diesem Fall allerdings interessieren in wiefern o.g. Thema von Belang ist? Allgemeiner ließe sich die Frage auch so formulieren ob grundsätzlich Interesse an "älteren" Technologien besteht oder ob es immer das "Neuste vom Neuen" sein muss?
Well, Christmas must be early this year ;-) We released Visual Studio 2008 and the .NET Framework 3.5 yesterday and are announcing the SQL Server 2008 CTP, November 2007 (aka CTP5) today.
Download and enjoy ;-)
P.S. Yes, this is a reason to get excited :-))
YEAAAAHHH! Check out the details on Soma's and Brian Harry's blog :-)
For those who simply can't wait that long, the entire family of Visual Studio products (from the Express Editions to the Professional version to Visual Studio Team Suite) and .NET Framework 3.5 are available for immediate download here.
What a brilliant day!
Vorbei sind die Zeiten grauer, langweiliger Webanwendungen die hauptsächlich aus einer Ansammlung von Texten und Links bestanden. Der aktuelle Trend geht zu interaktiven, reichhaltigen Anwendungen welche die Features und Funktionalitäten traditioneller Desktopanwendungen in einer Webanwendung im Browser zur Verfügung stellen. Ermöglicht wurde dieser Trend u.a. durch ein Programmiermodell welches heute unter dem Namen Ajax (Asynchronous JavaScript and XML) in aller Munde ist und die inzwischen zahlreichen Ajax Frameworks, welche die Entwicklung komplexer Anwendungen deutlich erleichtern.
Dieser TechTalk gibt einen Überblick über das ASP.NET Ajax Framework von Microsoft. Daniel Walzenbach, Developer Evangelist der Microsoft Deutschland GmbH, vermittelt die Technologien welche Ajax erst ermöglichen, verdeutlicht an vielen Beispielen die Entwicklung von Ajax Anwendungen mit dem ASP.NET Ajax Framework und geht im Anschluss auf Problemstellungen ein, die in „real-world“ Anwendungen auftreten. Gegenstand dieses TechTalks sind weiterhin Themen wie Performance von Ajax Anwendungen und Toolunterstützung.
Veranstaltungsorte:
Ort
Datum
Veranstaltungsort
Zur Anmeldung
Hamburg
09.01.2008
Mercure Hamburg City
Amsinckstr. 53,
20097 Hamburg
TechTalk: ASP.NET Ajax
Berlin
10.01.2008
Hotel Spreebogen Berlin
Alt-Moabit 99,
10559 Berlin
Bonn
15.01.2008
CommaSoft AG
Pützchens Chaussee 202-204a,
53229 Bonn
(Zugang über Holtorfer Straße)
Karlsruhe
21.01.2008
Dorint Novotel Karlsruhe Kongress
Festplatz 2,
76137 Karlsruhe
München
24.01.2008
Hilton Munich Park
Am Tucherpark 7,
80538 München
Bis bald!
The November CTP of SQL Server 2008 is a huge step forward as we continue delivering on our Data Platform Vision for “Your Data, Any Place, Any Time.” SQL Server 2008 will bring that vision to life, and there is something in this feature-rich CTP to meet the needs of companies of all sizes. I really believe it is going to be an eye opener for a lot of people, not just in terms of the new features that will be included, but how close we are to delivering a final product with very high quality. Here a just some of the great new/improved features.
Data Collection and Performance Warehouse for Relational EnginePerformance tuning and troubleshooting are time-consuming tasks for the administrator. To provide actionable performance insights to administrators, SQL Server 2008 delivers more extensive performance data collection, a new centralized data repository for storing performance data and new tools for reporting and monitoring.
Service Broker Enhancements Getting the data to the right place at the right time is important. Service Broker Conversation Priority in SQL Server 2008 gives you greater control over the system by making it easy to configure priority rules so that the most important data is sent first and processed first.
Registered Servers EnhancementsEnhancements to the Registered Servers tool window in Management Studio include running T-SQL queries and policies against groups of servers and the ability to share a common, centrally stored, server topology (Database Engine only).
Synchronous net-changes change tracking for SQL ServerSQL Change Tracking feature provides the functionality to synchronously track changes to data in user table without the need to create triggers or modify schema of the table. Applications will be able to reliably determine what data has changed since a watermark/baseline and will be able to obtain the latest data. The feature is geared towards providing the functionality with least DML overhead.
T-SQL IntelliSenseTransact-SQL IntelliSense provides intelligent aids for Transact SQL scripting that make language references easily accessible for database developers. When coding, you do not need to leave the Database Query Editor to perform searches on T-SQL language elements or your database metadata. You can keep your context, find the information you need, insert T-SQL language elements directly into your code, and even have IntelliSense complete your typing for you. This can speed up software development by reducing the amount of keyboard input required and minimize references to external documentation.
Declarative Management Framework (DMF) EnhancementsEnhancements to DMF include more expressive conditions (including support for common functions, T-SQL, and WMI queries), more robust target set filtering, custom messages for policies, and the inclusion of best practice policies.
Geo-spatial SupportSQL Server 2008 delivers comprehensive geo-spatial support. The new GEOGRAPHY and GEOMETRY data types provide spatial data support for location-aware applications. These types can be used to store locations, as well as paths and regions in space, and provide a rich set of functionality for comparing and manipulating these objects. Use the GEOGRAPHY type when working with latitude and longitude coordinates in a true round-earth model; use GEOMETRY when working in projected planar surfaces, as well as naturally planar systems such as interior spaces. These types are supported by new spatial indexes, which provide for fast execution of queries involving spatial data. The query optimizer has been enhanced to build-in knowledge of spatial indexes and types, so that appropriate cost-based plan decisions can be made.
Analysis Services Query and Writeback Performance (FITS)New MOLAP-enabled write-back capabilities in SQL Server 2008 Analysis Services remove the need to query ROLAP partitions. This provides users with enhanced writeback scenarios from within analytical applications without sacrificing the traditional OLAP performance.
Robust Report Server PlatformReports can easily be delivered throughout the organization with simplified deployment and configuration. This enables users to easily create and share reports of any size and complexity.
Integration Services - Lookup EnhancementsThe need to perform lookups is one of the most common extraction, transformation, and loading (ETL) operations. This is especially prevalent in data warehousing where fact records must use lookups to transform business keys to their corresponding surrogates. SSIS increases the performance of lookups to support the largest tables.
Analysis Services MDX Query Optimizer - Block ComputationBlock computations provide a significant improvement in processing performance, enabling users to increase the depth of their hierarchies and complexity of the computations.
Analysis Services Aggregation DesignSQL Server 2008 drives broader analysis with enhanced analytical capabilities and with more complex computations and aggregations. The AS Aggregation Design improvement exposes Aggregation Design objects in SQL Server BI Dev Studio and SQL Server Management Studio and provides tools for users to better work with these aggregation designs. In addition, an advanced view in the new Aggregation Design tab of the cube editor provides the ability for an advanced user to view and manually edit individual aggregations within an aggregation design.
Analysis Services Cube DesignNew cube design tools help users streamline the development of the analysis infrastructure, enabling them to build solutions for optimized performance. The AS Cube Design improvement introduces a new Cube Wizard which helps users create better cubes in fewer steps. The new wizard focuses on having the user answer a few questions to create leaner cubes that better targets their needs. It also unblocks the previously difficult scenarios of creating a cube a cube based on a single, de-normalized table and creating a cube containing only linked dimensions.
Reporting Services Scale Engine and Robust Server Fit and FinishA reengineered memory management and scalability infrastructure lays a solid foundation of scalability capability to enterprise customers.
Es ist unglaublich! Nicht zu fassen sozusagen! Ich habe soeben SP1 für Windows Vista auf meinem Rechner installiert und die Kiste rennt :-) Kein rotierender Donut mehr beim Kopieren von Dateien. Selbst das Löschen derselben geht inzwischen in Sekundenbruchteilen :-) Ich bin restlos begeistert! Der Tag ist gerettet! So kann man auch mit kleinen Sachen Kindern eine Freunde mache ;-)
In diesem Sinne… Alles wird gut ;-)
Pretty cool :-)
Well, as we all know <table /> based layouts for websites should be avoided. But how to create a cool looking css layout? How to create a 3 column page layout, how to float columns or what needs to be done to have them static?
Fortunately help is available in terms of Layout generators and tutorials :-)
CSS Layout Generators
CSS Tutorials
P.S. You also might check out the HTML and DHTML Reference which comes in handy from time to time.
Paul Andrew announced the availability of the .NET Framework 3.5 update to the Commonly Used Types and Namespaces poster. Get it while it's still hot and be sure to have a printout stuck behind you on your wall. The link also contains a XPS format file which prints over 16 letter or A4 pages for easy printing ;-)
So… gestern war's soweit. Ich war das erste Mal in meinem Leben auf einem Fußballspiel, genauer bei dem Spiel TSV 1860 vs. Borussia M'gladbach in der Allianz Arena. Nachdem mich ein Freund darauf hingewiesen hatte mich warm anzuziehen (es hat ein wenig gedauert bis ich realisiert hatte, dass das Stadion offen ist ;-) und in München ist inzwischen der Winter angebrochen) war ich perfekt vorbereitet. Als ich in die U-Bahn stieg trug ich meine Snowboardhose sowie einen warmen Pulli, meine dickste Jacke, eine Mütze über die ich im Notfall noch die Kapuze meiner Jacke ziehen konnte und halbhohe Stiefel über die ich meine Hose ziehen konnte. Schön mollig, echt gemütlich :-) Am Stadion angekommen war meine Körpertemperatur auf mehrere hundert Grad angestiegen und ich freute mich endlich in den Kälte zu kommen. Immerhin war ich auf eine Nordpolexpedition vorbereitet.Sch… war das kalt! Die Temperatur im Stadium war nahe dem absoluten Nullpunkt (in der zweiten Halbzeit fing es außerdem an zu schneien) und hätten wir uns in der Halbzeitpause nicht bewegt wäre ich wahrscheinlich in der Kälte umgekommen. Unglücklicherweise war das Spiel auch so lausig dass es weder die Notwendigkeit gab aufzuspringen und Tore zu bejubeln (das Endergebnis war ein bombiges 0:0) noch eine der Mannschaften anzufeuern. Wäre es nicht soooo kalt gewesen und meine Finger schon tiefgefroren hätte ich an meinem Buch weitergelesen welches ich in weiser Voraussicht eingepackt hatte (Das Ding auf der Schwelle). Tatsächlich war mir zwischenzeitlich so langweilig dass ich es interessanter fand, die Schneeverwirbelungen am Dach der Arena zu beobachten als das Spiel ;-). In diesem Moment wurde mir wieder einmal bewusst dass man nie auslernt. Hätte ich mich doch NOCH dicker angezogen…
Ähnlich geht es mir übrigens mit der Softwareentwicklung deshalb anbei ein kleiner Trick. Eine Frage, die öfter aufkommt ist wie Objektstrukturen geklont werden können. Wer sich in der .NET Klassenbibliothek etwas auskennt dem fällt in diesem Zusammenhang wahrscheinlich die Methode MemberwiseClone ein. Wer jedoch genauer in die Dokumentation schaut wird feststellen, dass MemberwiseClone eine "flache" und keine "tiefe" Kopie eines Objekts erstellt und damit für unser Vorhaben ausfällt.
Als Beispiel soll ein Objekt X dienen, das auf die Objekte A und B verweist. Objekt B wiederum verweist auf ein Objekt C. Eine flache Kopie von X erstellt das neue Objekt X2, das ebenfalls auf die Objekte A und B verweist. Eine tiefe Kopie von X erstellt ein neues Objekt X2, das auf die neuen Objekte A2 und B2 verweist, die Kopien von A und B sind. B2 wiederum verweist auf das neue Objekt C2, das eine Kopie von C ist. Verwenden Sie eine Klasse, die die ICloneable-Schnittstelle implementiert, um eine tiefe oder flache Kopie eines Objekts zu erstellen.
Mit folgendem Trick ist es dennoch einfach eine tiefe Objektstruktur zu klonen. Mit Hilfe eines BinaryFormatter serialisieren Sie eine Objektstruktur in einen MemoryStream und deserialisieren Sie diesen danach in ein neues Objekt. Fertig ist der Klon :-)
Imports System.IO
Imports System.Runtime.Serialization.Formatters.Binary
Public Class DeepCopy
Public Shared Sub main()
Dim Person1 = New Person With {.Vorname = "Daniel", .Alter = 31}
Dim Tiere = New List(Of Tier)
Tiere.Add(New Tier With {.Name = "Fausto", .Tierart = Tierart.Hund})
Tiere.Add(New Tier With {.Name = "Lilly", .Tierart = Tierart.Katze})
Person1.Haustiere = Tiere
Dim Person2 = DeepCloneCopy(Person1)
End Sub
''' <summary>
''' Erzeugt eine "deep copy" eines Objekts also eine Kopie des Objekts
''' inclusive aller untergeordneten Objekte.
''' </summary>
''' <param name="ObjektToClone">Das zu clonende Objekt.</param>
''' <returns>Eine "deep Copy" des zu clonenden Objekts.</returns>
''' <remarks>Dieser Code funktioniert auch bei rekursiven Objektbeziehungen</remarks>
Public Shared Function DeepCloneCopy(ByVal ObjektToClone As Object) As Object
Using _memoryStream As New MemoryStream
Dim _result As Object
Dim _binaryFormatter As New BinaryFormatter
' das Objekt serialisieren
_binaryFormatter.Serialize(_memoryStream, ObjektToClone)
' An den Anfang des Streams springen
_memoryStream.Position = 0
' und das Objekt deserialisieren
_result = _binaryFormatter.Deserialize(_memoryStream)
Return _result
End Using
End Function
End Class
<Serializable()> _
Public Class Person
Public Vorname As String
Public Alter As Integer
Public Haustiere As List(Of Tier)
Public Class Tier
Public Name As String
Public Tierart As Tierart
Public Enum Tierart
Hund
Katze
End Enum
In diesem Sinne viel Spaß beim Klonen von Objekten und nicht vergessen: Beim Fußball im Winter immer schön warm anziehen ;-)
Für alle Freunde der strukturierten Programmierung gibt es seit gestern von meinem Kollegen Dariusz Parys 11 neue CodeClips auf www.msdn-solve.de die sich rund um das Thema Patterns drehen. Im Einzelnen sind das:
Viel Spaß beim Anschauen :-)
Tools > Options
Selbstverständlich kann diese Einstellung – über die entsprechenden Einträge in der Auswahlliste – auch individuell für verschiedene Programmiersprachen gesetzt werden.
Schöne Grüße
Well, as some of you might know my second hobby besides cooking/baking is photography and there is a gem on the net I want to share with you. The gem I am talking about is Radiant Vista Daily Critiques. The Radiant Vista Daily Critiques walks through user submitted images showing what changes could be made to an image and how to make it better. This includes composition, color correction, composites, etc.