Code & Technology Cocktail
Cedric Vandewoude
This user hasn't shared any biographical information
Posts by Cedric Vandewoude
3
Apr
Sometimes you want to discuss the sitecore tree with colleagues or the customer. The only way to achieve this is taking a screenshots but that does not give you the flexibility to change the structure or text in f.e. an e-mail conversation.
To solve this I wrote a small aspx page (code inspired by a blog post from Sean Kearney) to be able to copy paste the sitecore tree as rich text. (<ul> and <li> is used to achieve this)
How to us it?
Download 2text.zip Copy 2text.aspx in \Website\sitecore\admin\ Browse to http://yoursitecoresite/sitecore/admin/2text.aspx
Feel free to adapt it to your own wishes
22
Sep
Jonathan, Luigi and Sarah are visiting LBi London! Let’s follow their adventure.
Jonathan – London
7:30 am – Time for Luigi and I to leave our accommodation in the Docklands to go pick Sarah up at St. Pancras! I’ve been working at LBi London for 2 weeks, while Luigi joined the team yesterday and Sarah will come just for the FatWire training.
9:00 am – We finally arrive at LBi where a unicorn (!) is there to greet us. It seems there’s a lot of shooting activity going on at the office these days! Yesterday we saw people in white spandex, a guy dressed as a panda, and we barely missed taking part in a balloon release (red ones of course) on the 2nd floor terrace. Keep an eye on http://twitter.com/#!/LBiLondon for more details! (hint: new show reel coming out soon)
9:15 am – Day 1 of this FatWire tailor made training kicks off. The whole team is attending even though the topics are rather tech savvy. We have a technical architect, a test lead, 4 testers, a configuration manager, an IT lead and 6 developers including our guest Sarah.
The dev team is quite blended: one is LBi London, 2 are from the client side (a big financial kingpin, “thou who shalt not be named”) and then Luigi and I from Brussels
The FatWire consultant goes over a list of topics requested by the team, which include:
- RealTime publishing: current publishing method used by client is “mirror to server”, meaning the assets being published are queued, mirrored to the destination and then unpacked. RealTime publishing is a dynamic process copying assets and their dependencies from one system to another. Each of the 5 stages of the process can be monitored through a user interface. The publishing can be scheduled to run at a specific time.
- Content Server developer tools (aka CSDT): Eclipse plugin allowing to manage FatWire resources and exchange them within a team. This has been improved in FatWire 7.6 and makes developer life much easier!
Tomorrow’s session will mainly be about CAS (SSO for all FatWire products), CIP (Content Integration Platform, which is used to connect to third party systems such as Documentum in order to export/archive FatWire data) and Engage (recommendation framework allowing personalization).
25
May
I just finished a technical demo for a customer when I got a very pleasant phone call to inform me that I would be on the Eurostar to London the next day for EPiServer training. The next day Nele, François and I arrived at The Office where we were introduced to our teacher Bevan Souster. We took some coffee and chatted a bit with the other participants from all over the world: our trainer used to live in New Zeeland, there were students from Scotland and Poland and there was also a colleague from LBi London. It seemed like this training would also be the perfect opportunity to work on our English accents. I really liked the international touch. I had just visited LBi New York during my holidays and now I met a colleague from our office in London. It’s always nice to exchange ideas in this global environment. After all students introduced themselves we kicked off with the EPiServer basics. Before this training I actually didn’t know that much about EPiServer so it was interesting to see what end users and editors could achieve with it. The last version of EPiServer also includes wysiwyg editing on the site, a great feature that editors see as a must have in modern CMS. Later we dived deeper into the core of the system. The team behind EPiServer made it easy to get started and gives developers a lot of tools, templates and a high level API to quickly build a basic dynamic website (with news items, google maps, …). The nice thing is that you get a lot of controls out of the box which take care of binding and other repetitive tasks. If you want to create more complex stuff the API will help you out. It’s also good to know that there has been already developed a lot by the community at epicode
From next week on I will be working on a real project at LBi London (can you feel the exitement!), so stay tuned for more EPiServer talk next weeks.
9
May
It’s about 1 year ago that Microsoft organized the Windows Phone 7 Developer Hub at Living Tomorrow. The perfect timing to have a look at who is developing #wp7be apps in Belgium.
At the moment (06/05/2011) there are 56 apps by 14 developers, for more details you should certainly check out the Windows Phone 7 Stories Blog.
And guess what I’m one of those 14 developers #BeTrains even made it to the App of The Week selection
Keep an eye on this blog, there certainly will be more posts on Windows Phone 7 development in the future.
9
May
For a small proof of concept I have been doing a bit of research on motion detection with a webcam in Silverlight 4. The goal is to allow the users to “click” a button by waving at it. There will be 4 buttons, one in each corner of the screen. If the user wants to “click” on a button he waves his/her hand at the location of the button.
Before I started coding I did some research on image processing to find the best solution for this “problem”.
There are a couple of good image processing libraries in C#.
- AForge.NET Library for Computer Vision and Artificial Intelligence – image processing, neural networks, genetic algorithms, machine learning, robotics, etc
- EmguCV Library of programming functions for real time computer vision.
Those libraries are actually quite powerful because you can do face/hand/object detection with Haar-like features. Alfréd Haar also proposed the Haar functions later used in Haar wavelets, very powerful math that is being used for image compression and multiresolution curves and surfaces. That’s all very exiting but unfortunately you cannot use them in Silverlight 4 because you can’t execute unmanaged code in a 3rd party app.
No panic, there are also some Silverlight libraries and tutorials on motion detection and object recognition.
- SLARToolkit A flexible Augmented Reality library for Silverlight with the aim to make real time augmented reality applications.
- Touchless SDK A fun webcam multi-”touch” object tracking SDK project.
- FaceLight – Simple Silverlight Face Detection A simple facial recognition method that can be used with Silverlight ‘s webcam.
- Silverlight Motion Detection Motion detection using Silverlight 4 camera support and a simple motion detection algorithm.
I had a look at all the libraries and articles and found that the last one was the most interesting for my proof of concept.
The motion detection is actually quite simple:
- Convert the current webcam video frame to a gray scale image
- Compare the current gray scale image with the previous gray scale image pixel per pixel. If the grayness of a pixel changes in the consecutive video frames then we know that something moved. The algorithm uses gray scale images because each pixel has less possible values: black, white and something in-between. Comparing RGB colors would be much more complicated.
- Create a “motion array” in which each element represents the amount of movement on a certain location (read pixel).
- Calculate how much the motion overlaps with one of our “buttons” in each corner of the screen.
So the algorithm detects areas where there is a lot of movement. Detecting a real hand would be very complicated without an unmanaged code library like EmguCV. A decent hand tracking algorithm in Silverlight would also be too CPU intensive.
9
May
Colorbox is a light-weight, customizable lightbox plugin for jQuery 1.3, 1.4, and 1.5. And I found out that the last part of that sentence is quite important the hard way.
I had a strange error on a page that used colorbox in internet explorer: “a script on this page is causing Internet Explorer to run slowly”. We didn’t change the source at all so it had to be linked to an external script … et voila we found the guilty line:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
There are good reasons why you should let google host jquery for you but be careful how you use this feature! If you just specify 1/jquery.min.js it will automatically take the latest version. So jQuery changed from 1.5.x to 1.6.x and it broke colorbox which is only supported up to 1.5. To bypass this problem we still let google do the hosting for us but we use a specific version of jQuery which is not automatically updated.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
So be careful if you automatically fetch the latest version of jQuery because it might break your site even if you did not change a line of code.
28
Apr
Creating a facebook share button is not that difficult but you can loose some time figuring out why an incorrect title, description or image is displayed facebook. There are a couple of tags that can describe your page. All those tags are listed on the Open Graph protocol page.
When you share an url, facebook will “download” that page and look for those tags.
There are a couple of ways to find out how facebook interpretes those tags (and how the share information will look on facebook).
- Paste the link in your status, you don’t even need to post it, the facebook linter will parse your link immediately.
- You can also send the link in a facebook message.
- Facebook Linter: http://developers.facebook.com/tools/lint/ (this tool will also clear the cache)
The Facebook Linter is very useful to see if facebook reads your meta tags correctly. If you get an unexpected result there can be a couple of reasons:
- You share a page that cannot be reached by facebook because it is protected (users can reach the page because they had to login first). Facebook will probably be redirected to an error page on your site or the login page. Solution: Do not share pages for which users should be authenticated.
- There is a typo in your meta tags. Solution: Correct the mistakes and use http://developers.facebook.com/docs/opengraph/ as a reference.
- You recently changed something but facebook still uses the cached version. Solution: Use the Facebook Lint tool http://developers.facebook.com/tools/lint/ this will clear the facebook cache for your page.
20
Feb
Unbelievable almost 2 months of 2011 have flown by. Time always goes faster when there is a lot of interesting stuff happening around you. It all started with Microsoft Webcamp, a series of free Microsoft events around the world to keep developers up to date with the latest tools and technologies. The first Webcamp in Belgium immediately kicked in with Scott Hanselman! He is one of the most talented and at the same time funniest technical speakers I have ever seen. I had the luck to see him in Belgium last year during Tech days. Few people manage to keep their audience entertained while giving them so much useful info. At Webcamp Scott presented NuGet, MVC, Webmatrix, oData and off course the small tips and trickz that make you smile while coding. (more…)
16
Feb
I had this very weird issue: there was a lot of whitespace around a flash movie for no reason.
The blue is generated by firebug when inspecting the object element.
After checking all the styles and the swfobject code, we found the issue: the browser zoom level was not at 100%.
So if you ever have the feeling that there is a whitespace bug in your flash movies, first check the browser zoom level.
2
Feb
Sweet you have all kind of cool jQuery on your page (overlayers, tooltips, hovers, …). Then you decide to add an asp:UpdatePanel but after the Update event all your scripts are broken.
We can fix this by executing all code within jQuery(document).ready() everytime the Update event is triggered:
<asp:UpdatePanel runat="server" ID="myUpdatePanel">
<ContentTemplate>
<!-- other code -->
</ContentTemplate>
</asp:UpdatePanel>
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {
documentReady(); //a function which contains all the code within jQuery(document).ready()
});
</script>
By Mike


