Asus Eee PC 4G

March 17, 2008

asus400x400.jpg

Я таки сломался… Слабохарактерный я… В субботу пошёл и приобрёл Asus Eee PC 4G чёрного цвета… Опишу свои первые впечатления:

1) Новенький Асус обошёлся мне в 4990.- крон. Не то чтобы очень много, но и не мало. В общем, считаю, что цена для него подходящая.

2) Ось. Задумка интересная. В общем и целом оно представляет собой модифицированный Xandros, с двумя режимами - простой и (!) сложный. Простой - это измученный IceWM с табами, где распиханы всяческие иконки. Приятно и понятно, но уж очень просто (мне такая простота ни к чему, а вот для обычных пользователей, кому нужна только почта, чат и фф - очень даже удобно). Второй режим - это, собственно просто KDE. Вот и всё. В общем неплохо, но тоже не ахти (я предпочитаю гнома). Ну да ладно. Не наше это дело. Самое то главное - с этим счастьем свободного места - “аж” 1 Гб. Маловато, честно говоря. Посему начал я думать как бы всё это дело зачистить и оптимизировать. В общем, на следующий день я пришёл к выводу, что лучшим выходом будет грохнуть линь и поставить ХР. Что и было сделано. Всё очень просто. Берётся nLite и из дистра винды вырезается с корнем всё ненужное. Что имеем в итоге - дистр винды (образ, то биш) на ~150 Мб. Пишем на диск, подключаем внешний ДВД (у меня старенький, купленный в своё время за 100 крон) и начинаем ставить винь. Что интересно - перед процессом инсталла надо зайти в БИОС и переставить флажок OS Install из Finished в Start. Уж не знаю зачем. Так надо В) И итоге процесс установки занял около 30 минут (с моим стареньким полуработающим ДВД). Вуаля - винда есть, ставим драйвера и всё работает на ура! Только вот с ACPI пришлось повозится, ибо винда русская (другой не нашёл) и в реестр прописала ??????? ???? вместо Главное Меню. Пришлось ручками править и только тогда инсталл прошёл успешно. Свободного места теперь - 3 с хвостиком Гб. Эклипс уже поставлен и даже сносно работает.

3) Ходят слухи что есть у проца режимы работы - 630 и 900 и что по умолчанию стоит 630. Надо будет опробовать и посмотреть 900.

4) Экран расрешением 800х480. Нестандартная штука, посему могут возникнуть проблемы с играми, однако есть утилитки, позволяющие эмулировать 800х600 и 1024х768 (читай сплющивают картику). Хотя это и не суть как важно.

5) Ради интереса поставил Quake 3 Arena - работает, курилка. Без проблем работает. И разрешение 800х480 поддерживает и идёт безупречно. Загрузки быстрые. Я в шоке В)

6) Если кого-то смущает размер харда - 4 Гб, то не расстраивайтесь! У Еее есть SDHC/MMC кард-ридер, в который можно вставить карточку на несколько Гб. У нас в Эстонии можно купить на 16 Гб всего за 850 крон (я уже это сделал). Или на 8Гб за 300-400 крон. И будет вам счастье - вставили карточку и пусть она там стоит. Если же мало 16Гб, то можно внешний хард подключать - у меня есть на 100Гб. Тоже всё прекрасно пашет. Конечно, тогда теряется весь смысл “мобильности”, но это так, для тех кому 19Гб мало (16 на карточке + 3 на харде самого Еее). По мне так этого позарез должно хватить. И фильмы туда скинуть можно, и музыку и ещё много чего. К тому же такой метод хранения данных очень хорош тем, что очень просто вынуть карточку и использовать её в любых других целях (или просто записать на неё фильмов и вставить обратно в Еее).

7) Из нарицаний: а) туговатые мышкины кнопки, но, наверное, разносятся и б) экран маловат (хотя это объясняется ценой данного аппарата). 8) Насчёт цены. Для меня цена в итоге оказалась следующей: 4990 за сам прибор, 100+ за ЛАН провод домой, 130 за мышку (захотелось мне для него мышку купить) и 850 за 16Гб карточку памяти. Итого: чуть больше 6000 крон. И, могу сказать, что оно действительно стоит того. Покупкой очень доволен. Осталось только найти ему достойное применение В))


Visual Studio 2005 not showing data sources sometimes…

January 9, 2008

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)

January 8, 2008

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.

Chris Pederick - Author of Web Developer


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): web_developer-114-fxfl.jpg

That is all :)


Dialog with technical support

December 26, 2007

So, recently I had a dialogue with technical support of one service. The problem was simple - I had to download about 1.6GB of files from them and the download speed was 2-5KB/sec. (yes, KILOBYTE per second). So I contacted the support telling them that this is unacceptable (ETA ~240 hours or something like that).

Me:

<I explain the problem in detail, everything I thing would be important>

Support:

Thank you for contacting us. In order to better understand your issue, please send us a little information about your network setup. We need to know exactly how you connect to the Internet. Do you use any routers, hubs, or switches? If so, what is the make and model? Who is your Internet provider and where are you physically located? Are you on a home, campus, business or military network? Please also let us know if you are using any firewall or Internet security applications such as Norton™, McAfee®, or ZoneAlarm®.

Me:

Hi, I am behind a Trendnet <my model> router (at home, so no restrictions are set up on the router).
I am located in , my ISP is .
Additionally, I tried attaching “-p 13…” to the command line, I am running the program as administrator.
I have set up port forwarding:
1. UDP xxxxxxx
2. TCP xxxxxxx
3. TCP xxxxxxx
4. TCP xxxxxxx

Support:

Thank you for providing the requested information.

At this time, we would like to know exactly how you connect to the Internet. Please also let us know if you are using any firewall or Internet security applications such as Norton™, McAfee®, or ZoneAlarm®.

Me:

What do you mean “how exactly do you connect”? I take my internet cable, plug it to my cable modem, which is connected to my router and then I connect my PC and my router with a crossover cable.
I use .

Support:

Thank you for contacting us.

Usually connection issues such as this are caused by the way your network is set up. If you use a router, hub, or switch to share a single Internet connection, try disconnecting the device and connecting your PC directly to your modem. To reestablish your Internet connection, you will need to reset the modem by unplugging the power from it for 30 seconds and in addition rebooting your computer. Confirm your Internet connection is working properly by visiting a few websites. If this setup resolves the connectivity issue with the , then the router may need to be configured properly or require a firmware update. Assistance for both of these tasks can be found at the device manufacturer’s support website. If you are still experiencing this issue while directly connected to your modem, make sure any firewalls are configured to allow the to connect. If you still have connectivity issues after trying these steps then please let us know.

Whoosh! Now, in my life I was a witness for a lot of pointless dialogues, but this… this is just … unexpressable. This is the exact way how support should not act. You tell them everything they ask you about and puff! NOTHING! You get the same old answer. Now, already at the second reply I started thinking that this “support” is actually not human-based, but purely computer-based. Grrr, I’m andgry. Know what? I’m downloading the 1.6GB @ 3KB/sec now. Nothing I can do.


Moving to a new hosting!

December 14, 2007

Hey, the “move” is cancelled! I’m staying here!


HOW-TO: Creating a simple UserControl for displaying a FlowDocument

September 12, 2007

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:

Structure

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

August 8, 2007

зашёл сегодня на сайт еДанки. и прямо офигел. мало того, что я не знал что всё накрылось медным тазом, так они ещё и “страшный” текст туда написали. Ужас какой. Кому лень туда идти, то вот:

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.

О ужас! Мой ИП залогили! Что мне делать?! Ааааааааааа! Ко мне же придут! Заберут в американский супер-суд. Прощайте, дамы и господа!


YouTube - 500 Internal Server Error. A nice joke from YouTube.

July 28, 2007

So today I hit an internal server error @YouTube. It said that it would be nice of me to report the thing. “Well”, - I though, - “I could report something once in a lifetime”. I decided to report. The error page had a nice link to the report form. Clicked it, filled it in. The error page asked me to include some kind of encoded abra-cadabra in my report (example of this arba-cadabra: “0rF3m6tOvt-q5Dlktd3-fpLj8oGDzySl21207UB … … … Rr7B1cjENm_TJhEY5_cagqyxHYMPi9HjU3o=”). Ok, no problemo! Copy-paste into the “Message” box. Nothing else to do - I press “Submit”. Well-well-well, what have we got here? An error! Here it is:

Please enter less than 350 characters (currently 2044 characters)

Wow! They ask me to submit some debug info and after that tell, that it is too long. Sheesh. That was stu-pid. Way to go, YouTube!


HOW-TO: Linksys WUSB54GC Wireless and Ubuntu Linux (7.04 Feisty / 7.10)

July 24, 2007

Drivers for WUSB54GC

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

May 25, 2007

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.