Divis Blog

Just another geeks blog.

Twitter is a nice thing

clock October 12, 2008 00:25 by author Divi

I just was recovering the menu of my blog, because the links of my projects as well as the button for switching the language were not shown since the last update anymore. As I was just adding some stuff I realized that the BlogEngine has a widget for twitter.

What is twitter?

Twitter ist a page where you can leave short messages (almost like a SMS) to share with your friends what you're just doing. Others then can register themselves to stay up-to-date with your news. It's some kind of bulk-SMS with self-registration.

image

What I think about twitter?

I think twitter is a very nice idea, that could get big very fast. The only problem with twitter is that the people you want to share your thoughts with, need to be interested in you. That means - if noone watches your twitter-feed, noone will ever read it.

So if you got friends that are interested in reading what you're doing all day - twitter is a realy good tool to accomplish that - if not - you should know what twitter is, just to be able to discuss with someone, but you should save the time for writing the texts.

One nice thing about twitter is: You may set your messages to private-only. In this case everyone has to ask for your permission to subscribe to your feed.

Twitter-Widget

My intention was to write a short script to enable the BlogEngine to get my feeds. Twitter is very easy to handle, because it publishes a rss feed of every user which you can even limit by the specific parameter to save your and your servers traffic. But as I already told you earlier, BlogEngine already has a tool to do this for me, so I just had to insert my twitter-data (address and rss feed) so the tool could fetch them for me.

Twhirl

Because sometimes it's very annoying to login on twitter.com to post your last message, there're several tools which you can install on your PC that do the login, posting and even the retrieving of your friends feeds for you. One of these tools, that is unfortunately not listed in the downloads section of twitter.com is twhirl. Twhirl is a desktop client for twitter, based on Adobe Air. But even though this requires you to install Adobe Air, it's not a big deal, because the Air- as well as the twhirl-installation are almost self-running. As soon as you installed twhirl, you're getting the following list-view, which you can style by a well filled list of skins:

image

 

Summing up:

It's a quite nice idea for chatty people, but you have to have the nerves to always keep your messages up-to-date - and people that are willing to read what you're writing - otherwise twitter would be like an instant messenger without contacts ;-).

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Hide and seek with WPF

clock October 9, 2008 22:36 by author Divi

At the moment I'm using most of my time for learning WPF, because a while ago I got the crazy idea (I must have been drunk) that this could become my first MCTS certificate ;-). Since then I'm experiencing a continuos up and down everytime I open my Visual Studio. I mean - hey - wouldn't it be boring to always know what a method returns? I haven't casted as much as since I know WPF - and it's always a pleasure to think about what I could insert into a method, which expects only a completly unknown interface.

The first book I used for studying was, of course, the Microsoft "Training Kit". And exactly in that book I found a funny example that can demonstrate my feelings as good as nothing else.

The example explains how to write my own custom-button - I didn't keep the colors of the example I must confess - but all summed up I got something like this:

image

While I was enjoying the beautiful animation I was able to attach to the button (it got shrunk almost invisible and returned to its origin size), I recognized that there was something strange: The button got smaller and smaller ...

 image image

Obviously WPF replaces the origin size of the button, when it's clicked before the AutoReverse of the Animation finished. Ok - in some way this might be logical, because otherwise you wouldn't be able to handle an object that just is being animated. But I think this is one of the many small things that give WPF some kind of unfinished touch...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Blog version updated

clock September 21, 2008 22:41 by author Divi

After several days I couldnt get myself writing any interesting news, Ive now updated the version of the Blogengine from 1.3.x to 1.4.5. As you can see there re still some texts missing, but I ll get them fixed as soon as possible. The layout has changed, because it s one of the new versions defaults layouts. The old one worked though, but I wanted to try something new.

I hope to get myself here more often after that small update.

Have a nice evening.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


MS is not cool enough

clock August 25, 2008 15:54 by author Divi

Hi all,

How doesn't know it yet: "Photosynth" is a project of the "Microsoft Live Labs", where you can upload your pictures which Photosynth then tries to combine to a big one. If that works well enough, you're then able to click through the single parts of the big image to get a three-dimensional impression.

Some days ago I downloaded the required plugin, installed it and uploaded some pictures from a wedding party. Everything worked fine, but as I just wanted to show the result to my girlfriend, I got the following message:

"Unfortunately, we're not cool enough to run on your OS yet. We really wish we had a version of Photosynth that worked cross platform, but for now it only runs on Windows. Trust us, as soon as we have a Mac version ready, it will be up and available on our site."

image

Ok - beside the fact that I already installed and ran that plugin ... how the hell do they get the idea I could be a MAC user? Ok - if I'd be using Firefox or Opera - I could take this as a joke ... but I used a MS-IE7! I hope they'll fix it these days, because I really appreciated that cool 3D-view. 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Much to do!

clock July 20, 2008 22:21 by author Divi

Since a while I had no time anymore to write some texts for my blog, but because there was just a little break, I thought I could add a short summary of my projects:

That thing that swallowed most of my time during the last weeks was the Microsoft exam 70-536: "Microsoft .NET Framework - Application Development Foundation". After I investigated all my free time in it and couldn't get it at the first try, I had to take my second shot. But the passing of the exam didn't release that much of my time, because all that projects that had been bottled-up had to be done now.

Here're some of them:

Pixelkaempferin - alias Jessika Wollstein

image

A good friend of mine, which wanted to demonstrate her abilities of graphic design. I really enjoyed working on that page, because I could try out some gimmicks. One of them was a the fact that she is now able to configure almost every page by XML and the icons are loaded automatically (matching to the config). Another thing was a diagonal menu, wherefore I just had the idea of an imagemap and some attached mouseover effects.

Spielefinder.Net

image

On a party one evening I talked to my girlfriends brother and asked him about some tools the web is still missing. I wanted to write a new project as a little training, but it needed to be a project which didn't already exist. During our conversation about verious ideas, he got me on the point of a game database. There're many of them, but none allows to filter the games by hardware. So about a week ago I got a page online which was able to filter its database for a specific hardware setup. Over that the client is able to specify a tolerance via some sliders (from the ASP.Net ajax toolkit) for the case they want to upgrade their PCs.

Codeplex - DownloadCounter

And last but not least: I added a new project to Codeplex named "DownloadCounter". At the moment it's just a very simple assembly and a demo project. I started that project, because the boyfriend of my sister asked me if I could put some files online for download and I decided to give him the ability to track how many times these music tracks where downloaded (he's a little hip-hopper) so that he can measure his success (or not :-D). And because I already wrote several download counters, I thought I could write one in .Net which was reusable and put it on Codeplex so that it can be improved over time - so I'm now hoping that some guys will download it and give me some good hints for improving it.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Token not yet valid

clock May 15, 2008 20:50 by author Divi

Some days ago I got the security token project back to the surface (from the deepest part of my repository) to use in in another current project. Unfortunately I got an error message as I started the project for the first time. I didn't know where it came from, so I went through the code step-by-step. Fascinated I recognized that it didn't appear again. I reloaded the page several times, but everything seemed to work fine. Because of this I thought it would have been a cache problem and forgot it.

Some hours later I had deleted my cookies and tried to issue myself a new token - but there the error was again - and again it disappeared during the step-by-step debugging.

Because I couldn't find a specific reason for this I spread several breakpoints all over the code and just hopped from one to the next to narrow the place of the exception. As I finally found the place in the code, I got the following error message:

"The SamlToken is not time valid. The current time "5/14/2008 11:29:21 AM" is outside the Effective "5/14/2008 11:29:59 AM" and Expiration "14.06.2008 11:29:59" time of the token.

image

What happened? First I guessed that there could be a bug in the calculation of the date, until I recognized: The token was valid some seconds AFTER the issuing. But why? Could that be a build in method?

After some research in the internet I found someone who had the same problem. He already had answered the question for himself: "I think I should correct the time of the server" ... right ... there was a time difference of 30 seconds between my PC and the dev-server I used - that has been the reason why the token was not YET valid as I it was issued to me - and this was the reason why I couldn't find it as I went through the code step-by-step, because I needed a longer time to step through than the differnce between both machines.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Capture process output

clock May 3, 2008 22:39 by author Divi

As I recently worked on a private project, where I had to compare several files with each other, I also came across the integrated "Diff" method of SVN. To compare two files, you can call the SVN with the following command:

svn diff -r OLD_REVISION:NEW_REVISION FILE

and you get instantly your output in the diff-format.

 

To call SVN I wanted to start the process from an ASP.Net class in the background and capture the output. Unfortunately I got a problem. The output seemed to be empty all the time.

As I tried the same thing some days later, I suddenly got the desired output. When I came home, I replaced my old code with the new one, but again the output remained silent. Because of this I started to compare both applications (my test app and the app for the file comparison). At first I thought Vista would suppress the output, because the PC on my workplace has XP installed on it, while my private PC has Vista, but this seemed to be the wrong reason, because it also didn't work as I executed the testapp from my "work"-PC on my private one... But that was the moment I recognized it. The difference was the application type: While my project itself was a web application, the test project was a Consolen application.

This is the code I used: 

 

ProcessStartInfo ps = new ProcessStartInfo("svn", "diff -r 4:6 file:///MY_LOCAL_FILE");
ps.UseShellExecute = false;
ps.RedirectStandardOutput = true;

Process p = new Process();
p.StartInfo = ps;
p.Start();
p.WaitForExit();

string output = p.StandardOutput.ReadToEnd();

 

The string "output" was always empty (not null), while the console application showed the right output:

 

Console:

image

Web application:

image

 

That problem I had to solve, because I didn't want to use a desktop application. So I tried several things. At first I thought there would be problems with the TrustLevel of the application and that the web application was more restrictive, but no matter which changes I made at the security settings, there was no change, until I found a code snippet, which I copied 1:1. It worked in the web application, but when I reduced the copied code to the needed parts by removing the "senseless" stuff, it didn't work again... So I took the code from the internet and removed line-by-line to find out which of the lines made the clue - in this way I found the reason:

The magic property was "RedirectStandardError". As soon as I changed its value to "true", everything worked fine:

image

 

HINT:  

As I started to write this blog entry, I first wanted to use another application than SVN, so I chose "PING" (because it's available everywhere). Interestingly it worked without any problems:

image

So obviously it depends also on the type of the called application, if you have to change the property or if it works also without.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Various 20080406

clock April 6, 2008 15:28 by author Divi

In the last time I haven't had much time to work on my blog or some of my private sites, because at my job we've (fortunately) very much work to do which is sometimes (unfortunately) a little bit short of time.

To not open a larger theme in here, which I'd like to explain much more detailed, but wouldn't have the time to, I decided to just post some things that I found during the daily work of the last weeks:

 

VSO DivxToDVD

Some days ago I was asked to get a very debatable video from the internet on DVD, because a friend of mine has no computer to use the internet himself or at least watch the downloaded video. After some flops of software I tried, I was guided by Google to the page of Softonic, where I found the VSO DivxToDVD Converter 0.5.2.99. It's a pretty cool tool, simple to use and free:

image

As I went to the producers page to check out for some updates, I found out (to my regret) that the nice (and, much more important, free ;-D) Tool became fee required. I think it's a good thing that VSO decided to bring it to the market, because I really like that tool, but I don't want to pay for it as long as I just need it from that rarely. The new name of the tool is ConvertXToDVD and costs about 40€.

(Hint: Softonic still offers the link to the old, free version).

 

SDP Multimedia

As I was searching for the solution of a problem during the last week, I found a webcast which I'd like to watch, but which had no download link. It seemed as if there'd be some very interesting infos inside of it, but because it was to long, I tried to download it on various ways (which didn't actually work) - until I found the stream ripper SDP Multimedia.

image

It's a little bit slow while downloading (or perhaps it has just been the streaming-server :-D), but in any case: It's also free!

You only need to add a stream via the MMS protocoll and instantly the SDP starts downloading it to your harddisc.

 

FileSystemWatcher

At work we're using VisualCron since several months to do our filesystem-based cronjobs. Some days ago I found out that that the .Net framework allready offers a helper class, which can be used to do exactly this thing: System.IO.FileSystemWatcher.

This object allows you to watch filesystem and react on various events (e.g. changes, updates,...). Therefore you only have to instantiate the object, choose the directory to watch, (optionally define a file mask (e.g. to just react on .cs-files)) and to tell the object to start watching:

 

System.IO.FileSystemWatcher fsWatcher = new System.IO.FileSystemWatcher();

fsWatcher.Path = @"C:\fsWatcherTest";
fsWatcher.Created += new System.IO.FileSystemEventHandler(FileCreated);
fsWatcher.WaitForChanged(System.IO.WatcherChangeTypes.Created);

 

With this code, you get the FileSystemWatcher to wait for the creation of exactly one file and call the method FileCreated afterwards. To react on the renaming of this file - and this not once, but several times, I extended the program in the following way:

 

class Program
{
    static void Main(string[] args)
    {
        System.IO.FileSystemWatcher fsWatcher = new System.IO.FileSystemWatcher();

        fsWatcher.Path = @"C:\fsWatcherTest";
        fsWatcher.Created += new System.IO.FileSystemEventHandler(FileCreated);
        fsWatcher.Renamed += new System.IO.RenamedEventHandler(FileRenamed);

        while (true)
        {
            fsWatcher.WaitForChanged(System.IO.WatcherChangeTypes.Created);
            fsWatcher.WaitForChanged(System.IO.WatcherChangeTypes.Renamed);
        }
    }

    static void FileCreated(object sender, System.IO.FileSystemEventArgs e)
    {
        Console.WriteLine(String.Format("File Created: {0}", e.FullPath));
    }

    static void FileRenamed(object sender, System.IO.RenamedEventArgs e)
    {
        Console.WriteLine("---");
        Console.WriteLine("File Renamed:");
        Console.WriteLine(String.Format("Old path: {0}", e.OldFullPath));
        Console.WriteLine(String.Format("Old name: {0}", e.OldName));
        Console.WriteLine(String.Format("New path: {0}", e.FullPath));
        Console.WriteLine(String.Format("New name: {0}", e.Name));
        Console.WriteLine("---");
    }
}

 

After I entered the code I did the following steps

1.) Started the program.

2.) Created a text file in the specified directory.

3.) Renamed the newly created text file.

This caused the following output:

image

 

Interesting: If I create a new file on Vista via right clicking, I get a new file where the file name (without the extension) is marked, to ease the renaming. As I just said - the file is firste created an renamed later on (as can be seen at the image above). So take care that a file you handle might not have its final name after the creation.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Various javascript libraries

clock March 10, 2008 22:04 by author Divi

In the last few days I got the time to read some magazines I neglected for the last 1-2 weeks. While I read them, I found some very interesting JS libraries:

 

Bevel-JS

Link: http://www.netzgesta.de/bevel/

A cool script, which enables you to modify images via javascript.

image

In the foreground, you can see the image which can be found in the example directory of the library, while in the background there're the modified images with applied image filters. Both included JS files only have an altogether size of 48kb.

 

Flot-JS

Link: http://code.google.com/p/flot/

The following code is from the example directory:

$(function () {

var d1 = [];

for (var i = 0; i < 14; i += 0.5)

d1.push([i, Math.sin(i)]);

var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];

// a null signifies separate line segments

var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];

$.plot($("#placeholder"), [ d1, d2, d3 ]);

});

What looks a little bit mathematical is just the description of several graphs, which look as following:

image 

This is just a simple version of what the flot-library offers. Another slightly more complex version, which consists of several different graph types can also be found in the example dir:

image

To say it with the words of a colleague of mine: "I won't need that more than once a year - but then it could be realy useful."

One nice thing about these diagrams is: The library offers methods to retrieve the values at the current cursor position and also a way to zoom the displayed diagram.

 

Ext-JS

Link: http://extjs.com

The ExtJS seems to offer some very nice controls. A screenshot of the API-Documentation of the frameworks demonstrates some of the controls, which are also used on their own page:

image

As you can see in the tree on the left-hand side, there're some very useful controls, which can be found in almost all applications. E.g.: Grid, Menu, Tree.

For the lazy guys: There're also some video tutorials available on the page ;-)

 

zXml

Link: http://nczonline.net/downloads/

If you click on the link above, you'll be redirected to a page, where you can find many nice JS-libraries. E.g. one extension extends the JS-arrays with the method "clone".

But the class I've been interested in most, offers an browser independent interface to handle XML. The JS file is only 14kb in size and offers to write code like the following:

//create a DOM document

var oXml = zXmlDom.createDocument();

//fill it with some XML

oXml.loadXML("<root><child index=\"1\"/><child index=\"2\"/> <child index=\"1\"/><child index=\"3\"/></root>");

//look around

alert("Root is: " + oXml.documentElement.tagName);

alert("First child is: " + oXml.documentElement.firstChild.tagName);

As you can see, you're able to use the usual terms like firstChild or tagName to work with the various elements and their values.

 

Dojo-Offline-Toolkit

Link: http://dojotoolkit.org/offline

The "entwickler"-magazine (edition: march/april) wrote an article about the usage of the dojo-offline-toolkit in cooperation with Google-Gears. Google-Gears offers a SQLite database and a proxy server to store dynamic content on the client to display it controlled when it's needed.

The dojo-offline toolkit doesn't add new functionality to Google-Gears, but offers some methods to ease the work with Gears. Some of the methods are the "Dojo-Storage" which can persist objects, methods to execute sql and some to download resources from the given page (called 'slurp').

 

Only for the completeness of this page are here some further links to frameworks I know:

- Prototype

- Script.Aculo.Us

- Moo-Ajax und Moo-FX

- JQuery

- ASP.Net Ajax

All of these are great frameworks which don't only focus on ajax but also add perfect effects for your page. However I assume that these frameworks are much more common and don't need any explanation here.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Free pdf-printer from Bullzip

clock February 22, 2008 19:25 by author Divi

During the last days I've been asked several times for the possibility to convert, as easy as possible, any Word-files into pdfs. Usually one of the following things crossed my mind instantly:

- OpenOffice offers the option to save files as pdfs.

- The Office 2007 plugin "Save as PDF" (naturally requires Office 2007)

- The Acrobat Distiller (Part of the commercial Acrobat from Adobe)

 

From time to time I made myself some trouble searching for an up-to-date version of some tools, that might could help me, but most of the time I recommended, to the guys that haven't had Office 2007 installed, to download and install OpenOffice.

 

Since today I would recommend, to the guys without Office 2007, because I like its plugin, to download the "PDF Printer" from Bullzip. The PDF-Printer ist free and requires only the installation of "Ghostscript". Both downloads can be found on the download-page of Bullzip:

 

Bullzip

After the installation, there's a new printer placed in your system control panel. If you select that device and print your document, a dialog appears, which asks you for the target file location. After you selected the destination, everything will happen automatically.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5