iptv.bg on iPhone


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/mstoynov/public_html_mihail.stoynov.com/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

(Ръководство на Български за гледане на телевизия от iptv.bg на iPhone/iPad)

iptv.bg is a streaming service for mostly Bulgarian tv and radio stations. The good thing about it is that it’s integrated tightly with most ISPs (mine too) so the speed is impeccable. iptv.bg offers paid plans for even more stations.

I don’t own a tv set and don’t have a cable subscription, so usually don’t watch tv. Rarely though, I want to watch a formula 1 race or a football game. Then I use iptv.bg.

iptv.bg offers the following options:

The first two expect browser plugins that allow watching inside a browser window. Since I use Mac OS X with Chrome both these options are not suitable. The third is an ASX file that could be opened with a suitable player.

VLC opens such files directly, but I prefer Mplayer. I personally thing Mplayer is the best player there is, because:

  • it can open everything. Very rarely will there be a file that Mplayer can open and something else can
  • it’s the fastest and lightest player I’ve tried.
  • It has the best controls I’ve ever seen: arrows and pgup/pgdn can fast-forward/rewind with 10 sec., 1 min., 10 min. respectively.
  • It can open files that are still downloading and even index them (-i option) so that fast-forward and rewind are possible.
  • Can open URLs, user can specify buffer size.
  • Comes bundled with mencoder – an application that can encode/decode video.
  • Has multiple GUIs for different platforms – MPUI and native for Windows, Mplayer OSX for Mac.

The ASX files are meta files and look like this:

<ASX version = "3.0">
    <ENTRY>
        <TITLE>bTV - test live (368x294)</TITLE>
        <AUTHOR>bTV - test</AUTHOR>
        <COPYRIGHT>bTV - test</COPYRIGHT>
        <REF HREF = "http://medicom1.hdtvbg.com:8080/.../btv.asf" />
    </ENTRY>
</ASX>

(Medicom is my ISP)

The problem with Mplayer and iptv.bg is that Mplayer cannot open ASX files and in order to play it, the ASF url in the ASX must be manually extracted and opened in Mplayer which is very annoying.

iPhone and iptv.bg

Where does the iPhone come in the picture? Well, I tried to find whether Mplayer could run on iPhone and found an app (oplayer) that can open streaming asf files. Oplayer successfully opened asf urls from iptv.bg:

Some tips: even on iPhone4 the hi-res streaming is too processor-heavy to run smoothly. the lo-res streaming run very nice.

Oplayer too cannot open asx files directly so the url has to be manually extracted from the asx file which on an iPhone is even more cumbersome and annoying.

All streams that iptv.bg suppies are asf, so I guess any player that supports asf containers and can decode wmv streams can play iptv.bg.

So running iptv.bg on iPhone is possible, but can be made a lot more user-friendly.

Migrating Google Apps

In this first post I explained how Google Apps account were created to be incomplete (only docs, mail, calendar; no reader, groups, so on) and how I had to create a so called “Google Account” for my Google Apps account that would allow me to access all the google services. At this point this stopps working so I decide to migrate to a newer version of Google Apps that allows its accounts to access all google services. All this happens for my stoynov.com account.

So I start the migration and Google says that my new stoynov.com Google Apps accounts will be able access 62 new services and that I can stop some of them. I allowed them all.

Now it says that there’s a conflict between my Google Apps accoung for mihail@stoynov.com and my “Google Account” for the same address. Here’s what it says when I logged on gmail.com:

It seems that now my new Google Apps account takes precedence over my Google Account and the latter is now moved to a temporary address. It suggests I check these two links (Address No Longer Available and Not sure what to do?).

The stupid thing is that there’s no simple “merge” that could provide a wizard and be done with it.

There are three options – create new gmail account, create new non-google account, do it later. Until then the temp address of the old “Google Account” is mihail%stoynov.com@gtempaccount.com.

Since I don’t want a new gmail account and no other account, I chose later.

Then I checked my google groups while logged as mihail@stoynov.com. Google said:

It comes out that Google Groups are not available for the Standard Edition of Google Apps. There seems to be a bug that’s described here. For a second I thought that I’d lose access to all the groups and would not be able to receive messages. I quickly made a test. The mail came, so no access is lost.

So now I don’t have access to groups.google.com, but at least my subscriptions go to mihail%stoynov.com@gtempaccount.com that redirects to mihail@stoynov.com.

Google messed this up and I intend to mail support so that I could be able to fix this somehow.

P.S. But even when/if it’s fixed I would have to call all Groups admins to switch my subscription from mihail%stoynov.com@gtempaccount.com to mihail@stoynov.com.

Another ugly thing from that migration is the inablility to be logged to many mails simultaneously – before this migration I could be logged to mihail.stoynov@gmail.com, mihail@stoynov.com, mihail@work.com; today I can be logged to only one. And the nice “switch account” feature is not working. After going to google.com/accounts it worked:

At least that’s working out 🙂

The last thing is the difference between the two profiles – mihail.stoynov@gmail.com and mihail@stoynov.com:

Updates to follow.

Gmail Accounts, Google Apps Accounts and Google Accounts

When I chose Google Apps for my domain (stoynov.com) I created myself a Google Apps account at mihail@stoynov.com. I already had a Gmail account at mihail.stoynov@gmail.com that later became a “Google Account”. Google accounts have access to all google services like Reader, Docs, Groups, so on. I wanted to migrate my Gmail account to my Google Apps account and still be able to use all google services. Unfotunately Google Apps accounts have access only to a special “Google Apps” version of Docs, Calendar and Gmail, but no access to Reader and very weird access to Groups.

At some point Google decided that “Google Accounts” could be made with emails other that Gmail. And Google proposed that I create a “Google Account” for my Google Apps account, so I did. So at some point I have the following:
mihail.stoynov@gmail.com – my Gmail account.
mihail@stoynov.com – my Google Apps account for stoynov.com domain
mihail@stoynov.com – my “Google Account”.

At some point Google suggested that I create a Gmail account for mihail@stoynov.com and suggested the address mihail.stoynov.com@gmail.com so that my “Google Account” would be “complete”.

Now what does “complete” mean? Well, here comes the “issue” with google groups. I had been subscribed to many google groups and to some I had admin privileges and to some I didn’t. When I created mihail@stoynov.com I wanted to move my subscriptions from mihail.stoynov@gmail.com to the new account. Well, this happened to be harder that I thought. First, non “Google Accounts” don’t have access to the web interface of Google Groups (groups.google.com) and thus cannot be admins to such groups. So then I subscribe to these groups with my mihail@stoynov.com “Google Account”. And at some point there was a Google Group with the following subscriptions:
mihail@stoynov.com (referring to my Google Apps account)
mihail@stoynov.com (referring to my “Google Account”)

There’s one other stupid thing – I couldn’t have a picture to my “Google Account”, because I didn’t have a Google Profile. Google Profile looked like a personal page with a lot of personal info. So I chose not to have a picture. But I digress.

This was all working ok, even though it was really stupid, but at some point Google Apps’ version of Google Docs didn’t work ok with my iPhone and said that I have logged with the wrong account. And then I checked the admin panel of my Google Apps and it said something like “Google is changing, you can migrate your Google Apps to a newer version that would allow you to have access to all Google services. And I said, well finally. Google Apps should have been like this from the start.

Now follows part 2 that explains the migration.

Home servers – good at first, but have to go

For quite sometime I’ve been hosting some stuff at home. It’s quite simple – a second hand small-form-factor machine from Compaq, home internet and a router/switch.

Compaq machines are were small and very very quite, they just don’t break at all. The first machine that I used for hosting had 7 (seven!) fans some of which we very noisy. No keyboard and no monitor. A small ups and it’s good to go.

Hosting stuff at home is extremely cheap – internet that would have been bought anyway. The machines are also very cheap – my blog was running on a Pentium III, 800 Mhz and the machine was running Windows Server 2003 with the blog being .NET application. It’s a little load on the electricity bill but that’s hardly a show stopper.

A good wi-fi router would do the job of connecting all machines and provide internet for everything in the house. Most new routers have enough juice to support a linux – I’ve mentioned OpenWRT. If one wants to go crazy one would move a *nix machine in front of the router (two ethernet cards needed), because the router could easily go down.

At first it’s very interesting. There are different OSes to configure, building an internal dns, dhcp, port forwards, certificates, sharing. There are a lot of things to learn.

But at some point all this becomes cumbersome – different OSes to configure, building an internal dns, dhcp, port forwards, certificates, sharing. Every single thing takes so much time and so much effort. And the bad thing is that this is a hobby, I’m not a systems administrator.

When I wanted to learn something new there was always twice the effort – once for administration (installing, configuring…), twice for the thing itself. Having stuff hosted somewhere else one does not care about all that. Just click install, or ftp and copy and that’s it.

Sometime ago I decided to put a stop to all that. Hosting is so cheap now and the most valued thing (this blog) was the first to go to some distant server. It took me a couple of days but it worked. The old and frankly very stupid personal site I had got killed – after all simplifying is good right?

I’ve had so many computers, at some point I’ve owned 4 to 5 machines. I don’t think that’s necessary. I intend to get rid of all of them and have a nice 802.11 N router with an optical internet and ups.

So it was fun and I learned a lot but it has to end.

Android phones vs. iPhone

The Android chains are now broken. Android is supposed to be open source but most google apps are not, as are the drivers. I was using HTC Magic for a year and I was sick of it. The phone came with Android 1.5. I changed that with Android 1.6 wih SenseUI taken from xda developers’ forums.

HTC does not supply new versions of Android for its older phones. I was running on a customized OS done by some guy just to be able to enjoy new features. The most used app was ‘killall’ just so I can pick up when someone called.

I’m back!

After 7 months I’m finally back.

I’ve migrated dasBlog to wordpress. It’s not trivial but did happen in only 2 days. I’ve lost one blog post and 2 comments. There was a lot of manual work with fixing links. Ironically the slowest thing was to wait for Windows 7 virtual machine (windows wanted to update which was a couple of hours of work and couldn’t be avoided).

Windows 7 was required so that I could add some forwards from the old posts to the new ones (via powershell).

Update: The most important help I got was from http://www.aaronlerch.com/blog/2007/08/23/breaking-up-moving-blog-engines/ and from Mario. Thanks.

Review: Up in the Air

Long time no write. But no time for small talk.

Currently (unfortunately I’ll upload the article later) I’m watching “Up in the air”. It’s smart, funny, sad, moralistic. It’s so good, it’s deep, well made. So inspirational.

It’s a real-life movie. Go watch it.

When I read what I wrote it sounds stupid. But the experience made me say it.

Microsoft Excel max number of columns

The last column in Excel 2007 is XFD:

What number is that?

XFD =
X*26^2 + F*26^1 + D*26^0 =
24*26*26 + 6*26 + 4 =
16 224 + 156 + 4 =
16 384 = 2^14

So Excel uses 14 bits for columns which is odd, but I guess they use the other 2 bits for something else.

Also the base-26 numerical system (26 letters in English language) is pretty odd too, but I guess this is a legacy issue.

Wikipedia is there when you need it — now it needs you.

Wikipedia is the single most useful web site on the internet. I don’t spend a single day without using it (the only other that applies is Google).

Wikimedia (the non-profit organization that runs Wikipedia) lives on donations mostly. This year they would spend $9m and they may not be able to raise that much. Here’s the report for the last year:

wikimedia.finances

Source: http://upload.wikimedia.org/wikipedia/foundation/2/26/WMF_20072008_Annual_report._high_resolution.pdf

They want to keep Wikipedia ad-free so go help here: http://wikimediafoundation.org/wiki/Donate

Review: Dell BH200

Some years ago I wanted to buy Bluetooth headphones. Then my phone (Sony Ericsson K750i) did not support the A2DP profile, so I gave up. My next phone (Nokia E71) had such an aghast audio player that I did not have the mood to use it as an mp3 player.

Android’s audio player is pretty nice and as a whole the OS is a lot of fun to play with. I recently got a 8GB SD card, so I have the storage to put a lot of music onto.

Few days ago I was wandering, searching for a car charger for miniUSB (for my phone) and by the way asking for bluetooth headphones too.

In one of the shops they offered me these:

dell bh200

They were amazingly comfortable. I think I could jog with them. I tried them with the phone and they produced a pretty good sound. The charger was miniUSB just like my phone’s.

The good thing is that they’re foldable and have a lot of controls (next, previous, volume up/down, start, pause). And the price was amazing  – €35, so I got them.dell bh200 folded

They last more than my phone can play music, so I’d say that the battery life is satisfactory. The good thing is that they have a mic and can be used as a handsfree too.

The most amazing thing is that they can play while charging, which is amazing and since my laptop has bluetooth, I can use them to listen music from the laptop too.

While not listening, the headphones hang on the neck without making me uncomfortable.

The only issue I have is that somehow the headphones cannot switch easily from media to audio mode, so I cannot talk while listening.

Highly recommended.

I so very much hate Windows Live Writer

I thought I had found the holy grail of blog-writing interface and that it’s name is WLW (Windows Live Writer).

WLW does a lot of things (check out the link) but it crashes a lot, it’s so very slow, and it requires a VM.

I’m looking for an alternative. Please tell me one if you know.

Virtual machines and the HDD issue

There’s this common issue with virtual machines – the HDD deficiency (I may have coined a new term). You see contemporary processors are so fast and allow virtualization that they can easily handle the load. The harddrives in contrast cannot handle load coming from different entities, that is, harddrives are bad in multitasking. It’s just to expensive to switch between tasks.

Most modern operating systems have a mechanism called commonly paging. It refers to the process of moving data from the limited main memory (ram) to a special (most often) file on the disk. The main memory is gazillion  times faster than a harddrive, but limited, ergo the need for more virtual memory. Weirdly enough most contemporary OSes start using the page file way before they reach the limit of the physical memory (actual ram).

Contemporary machines can handle a lot of memory (2 or 4 gb for example). So why use a page file?

Switching the page file can be done like this:


then do that:

howto.switch.off.paging.in.xp.part2

This is the memory print of my vm:

idle:vm.memory.print with 3 browsers, outlook, word:
vm.memory.print.with.load

 

I think the handling of my machine (host os)  is better now. Let’s see if the impression persists…

How is it that all laptops are with DDR2, only Apple goes to DDR3?

Most currently sold laptops are with DDR2 memory. Even the high-end ones, like Sony Vaio. It would seem that only Apple sells its current line of laptops (the aluminum body ones) with DDR3.

Why is that? Why isn’t there other high-end laptop with DDR3? It would only make sense to make it faster with DDR3. Or maybe it wouldn’t make it faster? I checked it out.

This is an excerpt from a post in the forum of macrumors.com

The polymac has 2gb of DDR2 @667mhz much like it’s predecessors. The aluminum mac has 2gb of DDR3 @1067mhz. At first glance you might say WOW! 1067 is a lot more megahertz than 667! I gotta have that.

This doesn’t figure in 3 things.

1. DDR3 increases speed at the penalty of higher latency. In real life terms, lets simplify it a lot and say that DDR2 and DDR3 are cars, and that the top speed of DDR2 in this case is 66 mph and the top speed of DDR3 is 106mph. But DDR2 has lower latency than DDR3, so lets say DDR2 only has to drive 5 miles and DDR3 has to drive 8 miles. So if the speed were the same it would take DDR3 longer cause it has a longer way to drive. DDR3 makes up for it by driving faster, and as you can see the faster you can get DDR3 the less difference the latency makes (i.e. that 3 miles makes less over all difference when you drive 160mph i.e. DDR3 1600mhz (no not available on macbook)) What this does mean though is that at lower speeds of DDR3, there isn’t much benefit as the extra latency makes the performance very similar.

2. According to others you can upgrade your ram to DDR2 800mhz
http://forums.macrumors.com/showthread.php?t=651330&highlight=ddr2+800
http://discussions.apple.com/thread.jspa?threadID=1877953&tstart=0

Now let’s go back to point 1. Now if DDR2 can go 80mph over 5 miles vs. DDR3 going 106mph over 8 miles, there’s probably even less of a difference.

3. The last and most important thing to remember is that computer performance is tied to all the hardware, and is bottlenecked by some things far more than others. In some benchmarking between DDR2 800mhz and DDR3 1067mhz on a PC with virtually identical hardware otherwise, the bandwidth increased from 6146 to 6613… or about 10%. Which sounds alot faster. But then they performed other benchmarks, such as super pi, which showed that
the DDR2 800mhz finished in 46.08 seconds and the DDR3 1067mhz finished in 45.11 seconds. The difference is 0.97 seconds or a whopping 2.1% performance boost.

The guy even supplied a lot of benchmarks:

To further illustrate this here are some benchmarks with the old polymacbook vs the new aluminum macbook

http://eshop.macsales.com/shop/Memory_Benchmark/Apple_MacBook/

To better demostrate apples to apples, (no pun intended we’ll look at the 2.4 ghz macbook aluminum vs the 2.4ghz polycarbonate) in photoshop CS3

Lower time is better
Macbook Aluminum 2GB ram 99.34
Polucarbonate macbook 2GB ram 107.63

which shows that the macbook aluminum is faster 1067 vs 667 here.

But what happens when you upgrade to a 320gb 7200 rpm drive?

Macbook aluminum 2gb ram stock 99.34
Macbook aluminum 2gb ram 320gb 92.28

how about when we upgrade the ram?

Macbook aluminum 4gb ram stock 79.06
Macbook aluminum 4gb ram 320gb 77.19
Polycarbonate macbook 4gb 78.41

Then the guy continues with comparing prices of the two macbooks.

Source: http://forums.macrumors.com/archive/index.php/t-654277.html

Since this is a forum post, one has to check the validity of the statements. So I went to wikipedia. This is what I found out:

CAS (column address strobe) latency (CL) is the delay time which elapses between the moment a memory controller tells the memory module to access a particular column of memory on a DRAM memory module, and the moment the data from given array location is available on the module’s output pins.

In asynchronous DRAM, the interval is specified in nanoseconds. In synchronous DRAM, the interval is specified in clock cycles, and must be multiplied by the cycle time (i.e. divided by the clock frequency in GHz) to convert to nanoseconds.

[…]

Because they have multiple internal banks, and data can be output from one during access latency for another, the output pins can be kept 100% busy regardless of the CAS latency; the maximum attainable bandwidth is determined solely by the clock speed. However, that only applies if the data to be read is known long enough in advance; if the data being accessed is not predictable, the latency matters. For a completely unknown memory access, the relevant latency is the time to close any open row, plus the time to open the desired row, followed by the CAS latency to read data from it. Due to spatial locality, however, it is common to access several words in the same row. In this case, the CAS latency alone determines the elapsed time.

[…] Note that memory rated for a certain maximum speed can always be operated at a lower clock rate. The CAS latency can be set lower in such a case. […]

[Then there’s a table showing how DDR3@1066Mhz has a CAS latency of 7 cycles and DD2@666Mhz – of 5 cycles]

Source: http://en.wikipedia.org/wiki/Memory_latency

So the guy in the forum seems to be correct.

One thing remains unfolded though – why is the latency higher with higher speed? This is not explained in either the wiki, or the forum post. And unfortunately I don’t have the time to investigate.

If someone knows, please share.

This brings me to the reason I investigated all that – I have a spare 2x 1GB DDR@1066 Mhz:

2009-11-17-21.04.30_176.0_4.0_41.0

(I guess no one will want them because only Macbook guys have machines with DDR3 and the minimum for them is 2GB)

I have high hopes for the 160GB-5400rpm-Hitachi harddrive though.

2009-11-17-21.04.21_175.0_3.0_40.0

If someone is interested, please let me know.

10 items or less

MV5BMTY2NjY2NzQ0MF5BMl5BanBnXkFtZTcwMTEwNjI0MQ@@._V1._SX265_SY400_

Watching a movie has always made me want to share something and there’s always something obstructing me from doing so.

This time it’s different. It’s called 10 items or less. It has amazing music, it has an amazing chick, it has Morgan Freeman.

It’s a movie about how even the most mundane things can make one happy. It’s about enjoying life. This time I think I got it – it’s about enjoying life. IMDB says it’s about “how a positive attitude can change anything”, so I’m close.

There are some amazing moments, for example when Morgan Freeman follows this supermarket manager (an old Hispanic man) walking in small step a bit bent over.

Again a quote from IMDB – will “make you clutch your sides with laughter. It’s a rare masterpiece”. Go watch it.

Hacking the site of the cyber-crime fighters…

Ain’t that ironic:

cybercrime.bg 2009-11-11 at 15.54.39

http://cybercrime.bg is the web address of a special division that fights cyber crimes (da!). It is a division of the part of police that fights with organized crime.

Screenshot taken 2009-11-11 at 15.54.39

This could only happen in Bulgaria.

The site should look like this:

cybercrime.bg real 2009-11-11 at 16.04.53

Look at this zoomed part of the last screenshot:

Screen shot 2009-11-11 at 16.22.46

No comment

Update: the chief of cyber crime division denies the site being hacked.

Xmarks

Xmarks is the name of an old plug-in for Firefox called Foxmarks. Foxmarks is used to synchronize bookmarks to/from different browsers. When the guys made plug-ins for different browsers I guess they changed the name. Now it supports IE, Firefox, Safari, and soon Chrome.

Anyway it’s super useful, it’s free and it’s relatively stable. When you somehow override the new bookmarks with an old version (I happens a lot) it’s easy to restore from the browser (Firefox backs up bookmarks regularly).

I’m using one account for me and it’s ultra logical to create one for the office – now everyone has all the new links.

Also if someone is too paranoid, the plug-in allows to use a custom (own) server, which, if I remember correctly, was just a Web-DAV (or FTP) directory with some privileges, but when I tried it (a couple of years ago) it didn’t work that well.

Oracle on linux: changing the hostname messes up with Oracle

There’s this Oracle 10g R2 database. It’s installed on SUSE. The version of the SUSE as far as I know is 11.1. We had to change the hostname of the linux machine (some corporate standards). Changing the hostname made Oracle unusable. It started on startup, but could open port 1521 and still thought it is on the old hostname. “/etc/init.d/oracle-xe status” said things are not working, even though the processes started without an error. port 1521 was not opened. It was strange that the startup script didn’t say something is wrong. It was strange that the db could be used locally by oracle’s command-line tools ( I guess via pipes since the port hadn’t been opened).I tried Google the issue, but fruitlessly. Then I tried to figure out where did Oracle keep the old hostname, but the directory structure of Oracle is not that easy to understand. Being desperate I tried searching the whole hard-drive for a specific string:

grep –r “old_hostname” /

After 24 hours I gave up.

Solution 1

Being desperate and developing on another temporary oracle server, we decided to give up corporate naming strategies and to return the old hostname – IT WORKED.

Solution 2

By chance I saw that the old hostname was used in tnsnames.ora and listener.ora. Being stubborn I changed the hostname to the one we wanted to use and edited both .ora files. It worked. I hate Oracle.

Install Snow Leopard (Mac OS X 10.6) from a USB

Mac OS X 10.6 image is 6.3 GB. Using a normal DVD does not work.

Since I’m lazy to go out and buy a dual-layer dvd (8.5 GB max), I decided to use a USB flash to install the new OS.

This is a good guide on how to do that: http://www.maciverse.com/install-os-x-snow-leopard-from-usb-flash-drive.html.

The only problem is that I didn’t actually use a USB stick, but this:

Kingston MicroSD HC 8GB. It comes with 2 different SD adapters, and what is very cool – a very tiny USB adapter. It’s the smallest USB I’ve ever seen.

I bought this for my phone, but came out to be very handy. By the way I highly recommend this Kingston memory.

So the problem with this memory is that it took roughly 2 hours for the Mac OS X 10.6 image to burn (I can’t say burn in this case, right?), while in the tutorial they say it took them only 20 minutes. The memory went pretty hot also – it was working hard for a couple of hours.

I wanted a clean install so I erased the hdd first.

Everything else went like a charm.

Install Snow Leopard (Mac OS X 10.6) from USB and restore only user files from Time Machine

Install Mac OS X 10.6 from a USB memory stick.

Here’s a tutorial on how to install Mac OS X from a USB stick.

Restore only user data from Time Machine

So now comes the restoring. I wanted a clean install – the last installation was pretty messed up.

Now is the time to say that I have a Time Machine for backing up stuff. I didn’t want to restore any system stuff, neither I wanted to restore users and their settings. I just wanted to restore ~/Desktop, ~/Documents, ~/Downloads, ~/MyFiles.

This came out to be VERY HARD.

When installing the OS, the installer asks for a Time Machine, but I said NO, cause I was afraid that it would restore more than I wanted it to.

After the installation was complete I launched Time Machine and tried to go back. I had the snapshots but couldn’t restore them because the owner of the files no longer existed.

With a lot of manual copying I managed to move the data back to my harddrive. Now I had to fix the permissions. Using Mac OS X for that could prove to be impossible.

The console

Going to the console helped a lot.

First to change the owner of a directory:

$ sudo chown -R mstoynov Desktop/
$ sudo chown -R mstoynov Documents/
$ sudo chown -R mstoynov Downloads/
$ sudo chown -R mstoynov MyFiles/

Some of the operations may fail with:

chown: Desktop/web/UC.class: Operation not permitted

The problem most probably resides in some flags being set up. Most probably uchg.

To see whether any files have uchg anywhere in a directory, I did:

$ ls -lOR Desktop/ | grep uchg
-rwxrwxr-x  1 502   staff  uchg   4228 29 Мар  2003 GrandeProjecto.jpx
-rwxrwxr-x  1 502   staff  uchg   1676 18 Авг  2003 GrandeProjecto.jpx.local
-rwxrwxr-x  1 502   staff  uchg    832 29 Мар  2003 GrandeProjecto.jpx.local~

To fix the uchg flag, I did:

sudo chflags -R nouchg Desktop/

Then again chown is required.

That’s it. Now my data is once more mine.

Chown the data on the time machine

The same problem with permissions exists in the time machine. There fixing them is not so easy – to many symlinks and too many directories owned by root. Also I don’t know whether I should remove uchg from anywhere. So fixing all that is not that simple. If I figure it out – I’ll share the knowledge.

Google Calendar App on Android

On Android the Google Calendar app synchronizes with all the calendars from the gmail account. However it has an extra calendar called “My Calendar”. This calendar is the default one and is not synchronized.

So if one creates an appointment with default settings, this appointment will not be synchronized. Lame.

This calendar can neither be switched off, nor can it be made not default.

Super lame – I need everything to be sync’ed.

-4.2

So there’s this business trip that’s very important for our current project. The night before we depart I get the feeling I’m going to get sick. So I buy the usual stuff I use in these situations to avoid getting sicker.

But this time it’s different: only in a couple of hours I turn into a vegetable. But the boss says that this thing is very important for our future, so I promise him that I’ll take another handful of drugs and be ready in the morning. The night is hell. The next morning I’m late. The boss is angry.

Just as we leave the city there’s this minor car accident with another car. It’s too small to report. But the boss is stubborn. We wait for a couple of hours for the traffic police, which are stranded a few kilometers away trying to remove a bus from the speed lane.

They arrive, my boss is not very cooperative, I’m still a vegetable. They say they have to drag him to police HQ to do some stuff.

Finally they let us go and after a long trip we go to where we’re headed. I sleep for 11 hours – still the night is hell. We do our business the next day and go back.

There’s this problem with the brakes of our vehicle so we stay another couple of hours somewhere in the middle of nowhere to fix it.

Finally we’re back. The boss wants me to do some presentation the next day – I say NO, I need to get better first !!!

For these two days all I ate was one fried egg and half a little of water.

The final result is:

-4.2kg

Google Android’s Contacts application deletes contacts while synchronizing with gmail – solution

So there’s this Android phone. It’s a HTC Magic.

It has a special app called Google Contacts. And I found a problem. That when I add a contact and then synchronize it with google servers it would make the contact disappear.

I found out why. When Google Contacts application first contacts a google account it make a new group called “Phone Contacts”. And there are all the contacts from the phone. There are other contacts in your gmail account mostly emails, so you don’t want them as contacts in Google Contacts, right? But they are there by default because the sync-ing downloads all the contacts from gmail.

There’s an option to choose which group to sync – all or just “Phone contacts”. I chose “Phone contacts”.

Now, why does sync-ing make the contact disappear? Well, because Google Contacts application creates it by default in “My Contacts” group. Then it uploads it to gmail and removes it from the phone’s Google Contacts application.

The solution is to move all phone contacts to “My Contacts” and sync only that group.

(I don’t think that it would work with “Phone Contacts” group, because when creating a contact with the phone’s application it does not ask in which group to put the contact).

Best of luck to all.

The worst work week ever

This post is from the series “Imagine a project” 🙂

So, imagine a project where there’s a deadline for acceptance tests. These tests would determine whether the project is successful (the client accepts it) or it is not. Now, imagine that this project is behind schedule. It’s been behind schedule for as long as you’ve been working on it.

So this deadline is a week away from this fictional current moment. There are a couple of things that have to be implemented. These things are doable, but what happens instead:

  • First, a power surge, nothing serious, just a couple of hours.
  • Then, the data center is down for a couple of hours, again nothing serious.
  • Then, there’s no internet for 5 hours – it comes out that the main route for the ISP to the office is down due to a power surge.
  • Then a very important server that is already in production blows up – and there’s no backup system to take it’s place. Yes, I know, mea culpa – it’s our fault that we didn’t (and still don’t) have a recovery plan.
  • Then out of a sudden the most important person in the project goes to a vacation for 2 (two) full days without any prior notice, and this is 2 (two) days before the acceptance tests.
  • Then the internet goes down again for half a day, and the ISP says it’s going to be down the day after it, AND it could be down on the day of the acceptance tests, so the maintenance team could not be able to monitor the servers.

What does the team do?

  • First it rewrites the software module on the blown server, so it could be hosted on one of the other servers. Only in a couple of days.
  • Then the whole team moves to another location with internet so that the work could go on.
  • Then it renegotiates with the ISP that the downtime be after the acceptance test.
  • Then it works it’s ass off so that the project could stand a chance.

What kind of a great team is that?

What kind of magicians can pull this off?

And then the boss says the team is unprofessional. Make him read this!

Tip: how to make Outlook reconnect faster to an Exchange server

I have a problem.

In our company we use MS Exchange as a mail server and we’re away from the company network we can connect to Exchange via a special VPN software. This software disconnects pretty often. When I reconnect it takes quite a while for Outlook to figure out there a working connection. It does eventually but I have to wait for that to happen since I want to make sure a mail is being sent correctly.

I found out that setting “Work offline” on and off quickly makes Outlook connect a lot faster:

outlook work offline mode

There’s this problem though – it’s tedious to go click on the menu and then on the menu item so many times per day. So a solution:

  1. Right click somewhere on the toolbar –> Customize:
    outlook 2007 customize toolbar
  2. Make a new toolbar:
    outlook 2007 new toolbar
  3. Then the most unnatural step – drag the menu item from the File menu to the new toolbar:
    outlook 2007 add a button to a toolbar
  4. Press Ctrl while dragging, this way the button will be copied, not moved.
  5. That’s pretty much it. Now pressing the button quickly is very easy:
    outlook 2007 the new toolbar on place

Курсът “Социални мрежи” във Факултет по математика и информатика на Софийски Университет

Участвам в избираем курс във ФМИ и днес мина първата ми лекция.

Курсът се казва “Социални мрежи” (официално “Теория на мрежите”) и основната му цел е да запознае студентите с Facebook, Twitter, LinkedIn и други от гледната точка на разработчиците на софтуер.

В него ще бъдат обяснени понятия като социални медии, семантични мрежи и други, но основната му цел е да покаже как се разработват приложения за основните социални мрежи.

Най-популярният програмен език в тази сфера е PHP, а база – MySQL.

Моята задача беше да запозная студентите с SQL като език и MySQL като сървър.

Сайтът на курса е http://socialnetworks.dev.bg/

Лекцията е тук: Databases 101 with MySQL.

How to make Eclipse validate XSL (and of course XML) files

Intro on Eclipse

Eclipse has two major bundles:

  • Eclipse IDE for Java Developers
  • Eclipse IDE for Java EE Developers.

Info here: http://www.eclipse.org/downloads/

The major difference is that Eclipse for JavaEE includes the Web Tools Platform (WTP). WTP has editors, designers, JavaEE perspective, new projects and so on.

I generally prefer to use the ‘Java’ perspective as opposed to the ‘JavaEE’ perspective, because the latter is too cluttered, but the one thing from WTP without which I cannot live is the XML editor. There are variations for XSL transformations and XML Schemas.

XML Schemas (XSD)

By default Eclipse can validate XML Schemas, because it has the schema for XSDs. Did you get this one? Let’s try again. XSD is a language written in xml that defines rules for xml files who want to conform to certain rules. This allows us to validate such files versus a schema. Finally XSD is also XML, so there is a special XSD Schema that defines how to write XSD Schemas. And the dog catches its tail.

XML Schema language is also defined in DTD. DTD is the predecessor of XSD.

Anyway, if you want to learn more, go to W3C Schools – the best place to learn XML, XSD, XSLT. This is also the official site of WWW Consortium (W3C) which handles the expert groups that define these standards.

Where is XSL.xsd?

XSL is written in xml, so there is an XSD Schema that defines how to write XSL files.

The schema for XSLT 2.0 (2007 revision) is here: http://www.w3.org/2007/schema-for-xslt20.xsd (the most up-to-date)
The DTD for XSLT 1.0 (1999 revision) is here: http://www.w3.org/TR/1999/REC-xslt-19991116.xml (I couldn’t find XSD for XSL 1.0, maybe because XSL 1.0 is too old)

So the only thing I need to do is put XSL.xsd in Eclipse?

Yes. Here’s how: go to Window –> Preferences and then to XML –> XML Catalogs:

(XML Catalogs are a very interesting topic. There’s an article on them in this blog here)

Eclipse 3.5 preferences

Then “Add”:

Add XML Catalog from http

There are 3 ways to add an XML Schema to Eclipse

  1. Via an URL (as in the picture)
  2. Via a workspace location
  3. Via a file on the file system

How do we validate?

Here’s how:

Validate button in Eclipse

Via the “Validate” button on the context menu on any XML/XSL file.

The exact same thing can be performed for any XML File that has to be validated against an XML Schema (or DTD, of course)

Рубриката No comment: “Българският софтуер по световните стъпки на пловдивския джаз II”

2009/10/1 plovdiv.fair@orakgroup.eu

Здравейте Михаил Стойнов от […],

Имаме удоволствието да Ви поканим на джаз сешън под надслов “Българският софтуер по световните стъпки на пловдивския джаз II”. Събитието е в чест на връчването на два златни медала за софтуерни продукти от иновативната бизнес платформа ОРАК R6 на провеждащото се в момента 65-то юбилейно издание на Международния технически панаир в Пловдив. Джаз сешънът ще се състои в нощта на музеите и галериите – 2.10.2009 /петък/ от 19.30 часа, в градината край басейна на хотел SPS,Пловдив /срещу магазин Метро/

За резервация и безплатен електронен ВИП куверт, моля направете онлайн регистрация на http://www.OrakGroup.com/GoldMedals или на национален телефон 0700 1 1234 /24 часа в денонощието/

Нека със световен джаз и чаша пловдивска бира отбележим поредния успех на българската софтуерна индустрия !

Поздрави от целия екип на ОРАК Инженеринг !
Очакваме Ви !

За ОРАК Инженеринг:
ОРАК Инженеринг е лидер на пазара за комплексни софтуерни бизнес продукти и решения за търговия, туризъм и производство, носител на златен медал от Пловдивския технически панаир за продукта ORAK R5 през 2004г., 2007г и на два златни медала за продукти от иновативната бизнес платформа ORAK R6 през 2009г . В България компанията е представена в градовете София, Варна, Бургас, Пловдив, Стара Загора, Слънчев бряг и Банско. Извън страната ОРАК Инженеринг има свои представителства в Македония, Сърбия, Румъния, Турция, Украйна, Русия, САЩ и Обединени арабски емирства. През последните 13 години екипите на ОРАК Инженеринг, в страната и чужбина, имат успешно внедрени над 5000 търговски обекти, ресторанти, заведения, магазини, складове на едро и дребно, разносна търговия, супермаркети, фитнес зали, бензиностанции, обменни бюра, фризьорски салони, хотелски комплекси, управление на собственост, СПА центрове, месо и млекопреработващи предприятия, управление на паркинги и др., които осигуриха многофункционална среда за работа и постигнаха висока ефективност и полезност.

Централна Кооперативна Банка

ЦКБ е банката, която работи.

Електронното банкиране на ЦКБ е едно от по-грозните – прилича на стария интерфейс на epay.bg. Но е стабилно и работи. И е достатъчно конформистко спрямо уеб стандарти, за да тръгне без никакви грижи на мобилния ми телефон. За целта от УЕП трябваше да мина на софтуерен сертификат на банката. Никакви грижи.

Едно от страхотните неща е, че мога да прехвърля сметки на друг титуляр на моето ел. банкиране и така да ги управлявам централизирано. Което ми се струваше невероятно.

Голям минус за ел. банкирането е, че няма email нотификация, но пък има SMS такава.

Обслужването в повечето случаи е добро, а понякога дори страхотно. При по-трудни казуси съм получавал адекватни отговори.

Таксите са ниски спрямо другите банки, които съм ползвал. Имам 6% лихва на разплащателна сметка с дебитна карта.

Та ЦКБ е работното муле при банките – не е най-лъскавата, но работи.

OpenWrt

Most wireless routers these days have web interfaces can share USB hard drives, have firewalls and so on.

OpenWrt is an open-source firmware that can be installed on such routers. It started thanks to Linksys using GPL software on it’s WRT54G router and had to release the source. This was the base for the project.

OpenWrt is a minimized linux based on the Busybox distribution that can run on the limited hardware of the devices. Thus the devices become a lot more flexible – ssh, telnet, portforwarding, iptables, firewall and so on.

The current version of OpenWrt is 8.09.01, code-named Kamikaze. They use cocktail names for code-names, the last one was called White Russian.

Another project, x-wrt, uses OpenWrt as a base and creates an elaborate web interface, called webif2, that allows the configuration of router via a web interface for users not familiar with linux. x-wrt uses the same version numbers when they bundle their web interface with OpenWrt.

I’ve used x-wrt 7.09 with webif (version 1) which had it’s glitches. Now I’m using OpenWrt 8.09 that provides its own web interface (quite good really). I haven’t tried webif2. But if I do, I’ll try to write something about it.

What about routers?

The starting point is the table of harware section in OpenWrt’s wiki. For every major manifacturer they have a wiki page with info whether they support the router and how good they support it. My router for example is supported fully with OpenWrt based on linux kernel 2.4. They don’t support the wireless (some binary driver issue) with kernel 2.6. So I’m using the latest version of OpenWrt, but with an older kernel.

Some routers have USB ports which can be used for harddrives, flash memories, usb cameras. For my router they have a manual for live streaming from a web camera. USB harddrives can be shared via ftp, samba…. (it’s a linux box after all).

The pro’s of these machines is that they’re cheap, very powerful, and very quiet.

The con’s come from limited memory (can be extended with a flash), lack of all linux commands and options (busybox).

How traceroute saved the day

After a couple of days of struggling to understand why my laptop was the only one that couldn’t open a connection to a network resource. I finally found out that it was a mac address mix-up.

Sometime ago while testing I used my laptop to pretend that it was that resource. To do that the laptop had its physical address changed. Since then I have forgotten to change the mac address back.

Today I tried traceroute and got surprised. The resource is a couple of hops away, but traceroute said it’s right next to me. I should have noticed that since the machine was responding to a ping 10 times faster than before.

Thanks, traceroute.

Smart port forwarding

This is one of those it-just-works piece of software. It’s a port forwarder for windows. No installation. Easy to use. And it works.

Great.

UPDATE: first, the link to the software: http://www.brooksyounce.com/soft/spf.htm

UPDATE2: The site of this guy, Brooks, is interesting. Especially after reading about the software and then to see this guy’s pictures. The site: http://www.brooksyounce.com/

2nd birthday

The blog became 2 a month ago. Happy birthday.

It’s been a lot of fun writing here. I have no idea if expressing myself in English has gotten any better, but the whole thing is very exciting.

The best thing is that I haven’t stopped yet. There were periods when I haven’t written a lot but still – here I am.

I’ve been planning to write some tutorials for such a long time, so I wish to myself that I’ll do write them this year.

The laptop therapy

I’ve been told so many times by people who know me that I spend a lot of time on my laptop doing unnecessary things. I remember my mom trying to get me out of the house when I was ten, but I didn’t want to since I was playing Lethal Weapon, Dune, UFO, Wolfenstein 3D, Doom or watching manga.

I realized that that is true and I could be doing so many offline things. So I invented the laptop therapy.

My last desktop I sold to friend a couple of years ago. The last laptop I got (dell, mentioned so many times in this blog) went to my sister. Now I have a couple of machines with no monitor and a macbook.

So the laptop therapy states: “leave the laptop at work”. So when I’m home I have to do offline things. I’ve been doing the therapy for a couple of weeks now and it really works. The only minor problem is that my roommate has an idle desktop that is always on and always free so I get tempted to use it from time to time. Fortunately it’s so slow that I get annoyed after half an hour.

Мирзакарим Норбеков и вярата в шарлатани

Пиша този пост на български, защото ще цитирам разговори на български.

Та майка ми е луднала по Мирзакарим Норбеков.

Днес реших да се разтърся и ето какво й написах:

Това е страничката за Норбеков в уикипедия:
http://en.wikipedia.org/wiki/Mirzakarim_Norbekov

Накратко там пише, че е Узбекистанец и твърди, че може да лекува болести на очите и белези.
На няколко места пише, че заблуждава читателите си с титлата Академик и с други титли, с изследванията си върху еритроцитите (червените кръвни телца) и некви други неща.

Пише, че върху неговите практики няма много изследвания, но пък има изледвания като цяло върху разни източни практики от алтернативната медицина и че Норбеков копира дословно от тях. СЗО (Световната здравна организация) казва, че тези практики като цяло са полезни за здравето.

Та Норбеков е малко шарлатанин и послъгва за научните си успехи, но като цяло практиките му са по-скоро полезни за здравето (СЗО).

Хубаво е да се чете от различни източници.

Тя прие това като заяждане и ми отговори доста гневно:

Мишел, не пращай човека дръзнал да помисли за зрението си, за зелен хайвер.
Вместо да чете разни популярни издания, нека да получи информация директно от източника (курсовете, книгите, учениците).
Научи се да получаваш информация от източника, когато това е възможно. Освен всичко друго той е завеждащ катедра по палингенезия в Международната академия по форматизация към ООН. Откога и в САЩ започнаха да дават високи постове на шарлатани. И там ли имало корупция? И защо му правят този подарък?
Ако искаш да си в час посети някой от мероприятията в София или прочети книга, ако ли не, не вземай отношения по неща за които не си компетентен.

Моят втори отговор и надявам се край на кореспонденцията:

Странно защо като напиша в гугъл “международна академия по форматизация в ООН” ми излизат само страници за Норбеков. Тая академия сайт няма ли си? Нищо ли не пише в интернет за нея? Дори и на английски го търсих – “International Academy of Formatization of UN” и пак само страници за Норбеков излизат.

И какво, по дяволите, означава форматизация. Търсих само думата форматизация и пак само страници за Норбеков. Според гугъл подобна дума не съществува (гугъл има специално търсене за термини и се търси така: “define:formatization” или “define:formatisation”).

Норбеков не е първият човек, който е помислил за зрението си. Стига глупости.

Просто не идеализирай нещата. Започни от фактите. И под факти разбирам не само нещата написани в книгите му.

В тая връзка ще ви разкажа една история. Преди време един приятел ми препоръча курс за бързо четене. А момчето умно и си казвам защо пък не. И отиваме при един измамник, който за 150 лева ни проведе 2 седмичен курс като гледахме разни малоумни картинки, за да сме си разтягали зрението и т.н.
Упражнения правихме за очите, които бих казал, че бяха полезни, но не за бързото четене.
Та накрая никой от нас не можеше да чете бързо. Сигурно с Норбеков поне получаваш нещо ценно.

Едно е да вярваш в Господ. Съвсем друго е да отричаш Еволюцията и да твърдиш, че земята е плоска.

iReport 3.0.0 on Mac OS. How to make it work?

iReport is a gui for designing jrxml (the actual reports) files for JasperReports. It is supposed to work on any platform.

We’re using 3.0 instead of 3.5 because 3.5 is based on Netbeans.

I’m trying to work with it on Mac OS (it was extremely slow in the virtual machine, something to do with java I guess).

First:

chmod u+x iReport.sh

…because it’s not executable.

But then it gave me a weird error:

comp:iReport-3.0.0 user$ ./iReport.sh
-bash: ./iReport.sh: /bin/bash^M: bad interpreter: No such file or directory

Google said it’s because of the problem with newline in different platforms. In linux it’s LF (\n)(line feed). In windows it’s CRLF (\r\n) (carriage return, line feed).

So this ^M character appearing in the error is actually the left-out CR.

How to fix it? Wikipedia says:

tr -d ‘\r’ < inputfile > outputfile

This works. But then the next error. iReport.sh calls bin/startup.sh.

The same thing for it.

That’s it. Why was the shell script in a dos format only god can tell.

Note that iReport on a Mac should be in a place whose path does not involve spaces. Here’s a solution for that too.

Staten Island

Back to the US story.

While staying at the Fitzgerald’s (thank you, Kaf) on a rainy day we decided to get the famous free 11062009294ferry to Staten Island (just like Harlem the Staten Island’s name come from the Dutch).

11062009308 The ferry itself passes close to Elis Island on which the Statue of Liberty stands. This is the closest I’ve been to it. The queues are impossible.

The white race is not represented well on Staten Island. The place itself is not as bad as I expected and the parks are very beautiful.

 

 

When I watch the pictures now, I don’t think Staten Island is at all interesting. The most 11062009331interesting part about it is the ferry and the view towards Manhattan. Manhattan is awesome.

It was so foggy that day, but that makes the view so much more surreal.

Pictures:
http://picasaweb.google.com/mihail.stoynov

Macbook, the mac way of doing things.

After having a Dell Inspiron for a year (search ‘dell’ in the blog) and having issues with stability (battery died in less than a year, the power charger blew up, it started falling apart, heating up) I decided it’s time for a change. I wanted something very sturdy and then saw the new aluminum body Macbook. So I thought this was it.

I now have it for 6 months and I’m pretty happy with it. Battery takes up to 4 hours, usually 2.5h. The body is exceptionally strong. It’ doesn’t heat as much although when Firefox goes berserk (100% processor time) it does heat up.

Switching to Mac OS took some time, but still a lot less than expected. There’s always a windows on a virtual machine, but I rarely use it. Mac OS is really nice to play with. And a lot faster than the vista I had on the dell (search vista in the blog).

I’m not an Apple fan for so many reasons, but they made a pretty stable and usable laptop. That’s my initial experience.

While in the states I saw the new one, with the only major difference being a battery they claim could support the laptop for 7 hours. I don’t believe it, but even 5 would be very nice. Especially for 9-hour over-Atlantic-ocean flights.

A new and more exiting way of going around (Honda CBR600 F3)

Last year I got category A which allows me to ride a motorcycle. A few months ago I finally bought 02042009014 one – Honda CBR600F3. It’s 600 cc, 100 hp, manual 6-speed transmission.

The motorcycle is a bit old, but it was in a pretty good condition. I managed to scratch it a bit, but as far as I know this is part of the deal.

Riding a motorcycle in Sofia is pretty dangerous – the traffic here is pretty bad and drivers are not at all disciplined. But it’s so much fun: it’s fast and very exciting.

Having a bike is pretty cumbersome. I had to rent a garage at work and one close to home. There are the clothes, the limited space for baggage (only a backpack in my case) and the outside conditions (rain, cold weather, …). There’s also the cleaning, the chain oiling and so on. Servicing it is as expensive as an used car if not a bit more.  So having a bike is very unpractical, even having in mind that the traffic jams are no longer an issue.

But it makes life so much more colorful.

How’s it going with the US

210620091371 So, how’s the trip going?

Its 2 o’clock. I’m trying to arrange all the photos from the 18062009988camera and to find time to write something. I just (3 hours ago) got out of the pool and the water slide in the hotel (somewhere in Montana) and now I have Two and a half men on the background while drinking Yellow Trail (merlo).

Here are a few teasers.

I’ll write when I have more time to do so. Gotta go to sleep because I’m doing rafting tomorrow.