Visual Studio 2005 not showing data sources sometimes…
For quite a long time I have been bugged by this bug (;)). I have a solution with several projects in it and some of the projects have data sources. The problem is that sometimes when you switch to another project (e.g. by opening this project's file in the editor) the data sources are empty. Now, there is a simple trick which can help resolving this problem (restarting VS doesn't help). Open up the .xsd file from your project tree and rename anything there. Save it. Rename it back and save it again. Now your data sources should be once again visible in the data sources view.
Hope this helps someone.
WebDeveloper add-on for Firefox 3.* (all betas and stuff)
Update: Web Developer addon now officially supports Firefox 3. Check out history (version 1.1.5). Download the new version here.
Old post about my hack:
Just a note that there are a number of features that do not work correctly in Firefox 3. I am working on fixing these and putting together a new release. You are free to use this hacked version of course, but just a word of warning.
Today I tried out the brand new Firefox 3 Beta 2. Nice. I like the new address bar and the ability to resume downloads after closing Firefox. The only thing I needed was WebDeveloper add-on (extension), which, unfortunately, does not work in FF3 yet. So, since I had a bit of add-on development experience I decided to change the max version inside the add-on. No problems occurred. Grab the .xpi (change file extension from "jpg" to "xpi" and open it with FF): 
That is all
HOW-TO: Creating a simple UserControl for displaying a FlowDocument
Hello. This is my first post about WPF.
This how-to will show you how to create a UserControl in which you can show a FlowDocument by passing a string containing the FlowDocument. It also allows Data Binding.
Lets start.
1. Create a UserControl called FlowDocumentViewer in Expression Blend (you can also do this in Visual Studio if you want) and add a FlowDocumentScrollViewer to LayoutRoot. Name it flowDocument (you can name it like you want, but I will be using this name in this guide). Your structure should be as follows:

2. Now, open the project in Visual Studio and add the following code to your FlowDocumentViewer.xaml.cs:
public static readonly DependencyProperty ContentFlowDocumentStringProperty = DependencyProperty.Register(
"ContentFlowDocumentString",
typeof(string),
typeof(FlowDocumentViewer),
new FrameworkPropertyMetadata(null,
FrameworkPropertyMetadataOptions.AffectsRender,
new PropertyChangedCallback(DescriptionFlowDocumentUI.OnContentChanged)
)
);
private static void OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
FlowDocumentViewer control = (FlowDocumentViewer)d;
control.flowDocument.Document =
(System.Windows.Documents.FlowDocument)System.Windows.Markup.XamlReader.Load(
new MemoryStream(System.Text.UTF8Encoding.Default.GetBytes((string)e.NewValue))
);
}
public string ContentFlowDocumentString
{
get { return (string)GetValue(ContentFlowDocumentStringProperty); }
set { SetValue(ContentFlowDocumentStringProperty, value); }
}
Lets see what this code does.
a) We added a DependencyProperty called ContentFlowDocumentStringProperty to our class. This DependencyProperty "points" at ContentFlowDocumentString property, as well as it tells, that this property of type string and we registered a callback function (OnContentChanged), which will be triggered when ContentFlowDocumentString is changed. Note that FrameworkPropertyMetadataOptions.AffectsRender piece of code. This tells WPF, that when this property is changed it affects the UI looks, so that WPF knows he has to render something.
b) The OnContentChanged function is called whenever our DependencyProperty is changed. Here we do the actual work of changing the FlowDocument in our control. We get the instance as an argument (DependencyObject d, which we cast to FlowDocumentViewer explicilty) and we create a new FlowDocument from the newly assigned string ((string)e.newValue).
c) Finally we added the actual property - ContentFlowDocumentString. See those GetValue and SetValue? Don't be surprized, it is how DependencyProperties work. You don't have a special (private) field in your class for them. WPF does all the work for you.
Well, that is pretty much it.
The usage is simple:
FlowDocumentViewer fdv = new FlowDocumentViewer(); fdv.ContentFlowDocumentString = stringContainingFlowDocumentXAML;
Or if you want to use data binding, it is absolutely similar to casual binding in WPF:
Binding b = new Binding();
b.Source = myBindingSource;
b.Path = new PropertyPath("PathToProperty");
FlowDocumentViewer fdv = new FlowDocumentViewer();
fdv.SetBinding(FlowDocumentViewer.ContentFlowDocumentStringProperty, b);
If you have questions / remarks / etc. feel free to post them. I will try to answer.
eDonkey
зашёл сегодня на сайт еДанки. и прямо офигел. мало того, что я не знал что всё накрылось медным тазом, так они ещё и "страшный" текст туда написали. Ужас какой. Кому лень туда идти, то вот:
If you steal music or movies, you are breaking the law.
Courts around the world -- including the United States Supreme Court --
have ruled that businesses and individuals can be prosecuted for illegal
downloading.You are not anonymous when you illegally download copyrighted material.
Your IP address is xxx.xxx.xxx.xxx and has been logged.
Respect the music, download legally.
О ужас! Мой ИП залогили! Что мне делать?! Ааааааааааа! Ко мне же придут! Заберут в американский супер-суд. Прощайте, дамы и господа!
HOW-TO: Linksys WUSB54GC Wireless and Ubuntu Linux (7.04 Feisty / 7.10)
Hi, this is a guide I decided to write after buying and installing a Linksys WUSB54GC wireless USB adapter. The guide is very simple.
What you need to get this device going is to install ndiswrapper and the driver. You can use the driver attached to this post (or you can go to Linksys official web-site, download the driver (not the Vista one), unpack it (I know that it is an EXE file, but you can still unpack it) and find the drivers in the Drivers folder - that's exactly how I got the drivers I attached to this post).
Ok, now the installation procedure. Lets assume you unpacked the drivers into your home directory (~) - the should be three files:
- rt73.cat
- rt73.inf
- rt73.sys
1. Install ndiswrapper:
apt-get install ndiswrapper
2. Change the dir to where your driver files are located:
cd ~
3. Install the drivers:
ndiswrapper -i rt73.inf
ndiswrapper -m
ndiswrapper -mi
ndiswrapper -ma
4. Reboot. Now the device should start working - you can verify that by clicking on the nmapplet or by going to Administration->Network - it should be there and it should show you wireless networks. I got it working that way and it correctly shows the signal strength, connects nicely - works nicely.
Now, why I used ndiswrapper - before I installed and configured ndiswrapper the device was also present and it even showed me the wireless networks, but it did not connect to any network.
Linux Application Developement
God! I really love Linux (especially Ubuntu), I really do. But! Please, someone tell me how the hell is anyone supposed to develop GUI apps here? I know, I know. There are tons of development tools. Glade, MonoDevelop, Anjuta etc. But! I tried them. The only friendly tool was MonoDevelop. But really, I created a Gtk# program (project to be exact) and just screamed! Why you ask? Because I tried to crate a button. It created. No problem. Then I thought that it would be nicer if the button had a pretty background image. Know what? IT IS NOT POSSIBLE TO SET A BACKGROUND!!! That sucks big time. I do not need this ugly button with no-good design. Oh, oh. And one more thing. I certainly tried to compile the thing and it DIDN'T work. Because the assembly was not found. Now what the hell is that?.. EVERY dev tool in Linux I saw in NOTHING compared to MSVS (which I use all the time). Nothing I tell you. And don't try telling me stories about real programmers who can make everything possible. I don't need the freaking routine! I need a good IDE where I can forget about details. I need normal control out-of-the-box. With options. With yummy features and stuff. Look at .NET! You call Mono a .NET analogue? B-u-l-l-s-h-i-t. Mono is a zillion kilometers away from .NET. Not even a bit close. Well, I know, it's not version 1.0 at all. But what the point PR-ing it so much? Almost full System.Windows.Forms? Where? Oh, oh, MonoDevelop has a VS2005 project import. Yeah. Sure. It imports. With a detail that nothing works. Edit my GUI code in source view? Do I look like crazy? No way I'm going to do that.
Now, the point is, linux REALLY needs something like MSVS. MonoDevelop is, in my opinion, the closest analog, but it is still far-far away from it. No..... MonoDevelop is even ok, compared to framework.
Oh. One more thing. If you are thinking about writing an angry post about not respecting someone's work - that's not right. I think that devs are doing a great job. I really do. I complain about the whole situation. I will never switch to Linux development I guess. I always try to support people doing real things in this world, but in this case I just have to admit - Microsoft is doing a far better job than the Linux world.
Zend Studio 5.5 – Antialiasing the font (tested on Ubuntu 7.04
Hi! Today I am very happy to announce that I am now running Ubuntu 7.04!
Now, no long preludes, since this post is about "How the <fluffy bunny> do I get those antialiased fonts to word in Zend Studio?!". That was the question for me about 5 minutes ago. Well, I really thought that Zend was perfect - usually, if they have this checkbox - it works without tweaking. Now here's the disappointment part - that Tools -> Preferences -> Desktop -> Use Antialised Fonts didn't really work. I asked my best friend (his name's Google) -oh, whyyyy?... Google was silent... he didn't know. Fortunately, Google remembered that Zend has a forum! Yay! Searched the forum and found the answer.
Here goes:
"... in <installdir>/bin, edit ZDE.lax adding the following line at the end
lax.nl.java.option.additional=-Dswing.aatext=true
restart ZDE and you should have antialiased fonts... " (c) pkoebbe
That worked like magic. No problems at all! So, I hope that this helps someone and that my friend Google will soon cache this post.
PS The original post on Zend forums is here.
MySQL Connector/Net 1.0.8 & 5.0.3
Ok, so here I am working with MySQL Connector/NET. I have the latest version of it (1.0.8). Everything worked properly in 1.0.7, so I thought that the updated version should work properly too. Well, no, actually. I don't know what are the devs thinking, but I am outraged.
The problem is that I download a mysql dump file and after that using MySQL Connector update the local database. You think it is easy, right? Well, that's what I thought in the first place, but turns out that it just doesn't work.If you know C# & .NET then you know that dumps should be inserted with ExecuteNonQuery() function. Ok, sounds easy, right? Worng, all the time this crappy driver threw an exception saying "Query was empty". Wtf? I even created a breakpoint and inserted an MessageBox.Show(command.CommandText). The query was there. I spent hours on searching the internet about this bug (or feature?). I found one bug report saying, that carriage returns were causing this and that it was fixed in 1.0.7. Screw that, this bug IS PRESENT in 1.0.8 AND 5.0.3. How do I know? Well, because I replaced all returns with spaces and it worked out perfectly! Now why the fuck I should wark around bugs, that were already fixed?? Oh, oh, and by the way - I can not post a bug report either, because on the mysql bug reporting page it says, that "cannot connect to MySQL". That is freaking awesome - mysql's bug reporting tool is not working because their mysql is down! In-fucking-credible!!
So, for all you guys in the same situation - you MUST remove all carriage returns in your queried before doing an ExecuteNonQuery()! Otherwise you WILL get an exception.
And for MySQL Connector/NET devs - do something about it ASAP. And by the way - this bug is also present in MySQL Connector/NET 5.0.3 (not only in 1.0.8).
The best linux FTP client: FileZilla
Hello, today I want to tell you about my search for a nice FTP client. First things first - I've been using gFTP for a long time and I find it to be nice, but to say the truth it lacks some features and is quite buggy. There is no recursive chmod, it crashes every time when internet stops working (this is important, since I use WiFi all the time), it waits 30 seconds if he got disconnected from server (and I haven't found a way to stop this except restarting gFTP). That is not all, but I think that you get the point
And this is the best FTP client I knew for my Ubuntu Edgy until now. Today I found out that the FileZilla FTP client is being made cross-platform. I use that one all the time in Windows and let me put it short - "IT ROCKS!!!". No, really, it has a very nice site manager, it does not crash (not once since I installed it on Windows and I'll need some time to see how it goes under linux), has a great user interface, transfer queue and so on. Also it allows you to install themes (icons for buttons) ^_^
Overall, I find FileZilla to be the best choise for Linux. It is still in beta, but it is A LOT more stable that gFTP. So, if you have Ubuntu Edgy installed and you're wiling to try it out - "apt-get install filezilla"! Don't know about others, but Edgy repositories have it.
And in the end I'll post an overview and features from FileZilla official site:
Overview
FileZilla is a fast and reliable FTP client for windows with lots of useful features and an intuitive interface.
Features
Among others, the features of FileZilla include the following:
- Easy to use
- Multilingual (English, German, French, Japanese, just to name a few)
- Strong encryption support using SFTP over SSH and FTP over SSL/TLS
- Supports transfer resuming and files larger than 4 GiB
- Site Manager
- Queue support
- Proxy support
- Speed limits
- MODE Z transfer compressing
- ... and more!
В довесок об Apple QuickTime
Вот не отстану я от этого плеера
Сегодня я наткнулся на него в Tucows. Там написано:
- Sports a small and attractive interface - ну да, писал я об этом в прошлом посте. Хотя в принципе да, не могу сказать, что дизайн гуя плох (этим яблочники всегда отличались).
- The range of formats this viewer can open is amazing- о да! точно! а то что он виснет на avi и не считает wmv за видео - это, конечно же не в счёт.
- Includes in the installation browser plug-ins to heighten your QuickTime experience on the web - да, это единственная стоящая фича. Хотя, у mplayer'а плагин на много более функциональный. Кстати, надо его попробовать под вынем поставить - может удастся заменить яблоко.
В общем, Tucows резко упал в моих глазах. Quicktime'у поставили 5/5. Да, для ясности могу сказать - то что у меня сейчас стоит это последняя версия плеера (скачал позавчера, по-моему).
И ещё, уже у самих яблочников написано:
- Massive Cross-platform Platform - это типа, мак и вин? И это по вашему Massive?
В общем, поражают меня такие наглые заявления. Страх и ужас, честное слово.
