"; */ ?>


19
Oct 07

Help Google to Generate Only Relevant Ads!

google money    I recently decided to participate in Google Adsense program where Google shows its ads on my blog, and I get paid when somebody clicks the ad. This tool from Google is far from being fresh and new, but I think it has a very cool idea behind it:
        – ad owner wins, because people go to her/his website,
        – Google wins, because ad owner pays Google for a click (through Google Adwords)
        – I win, because I keep writing stuff on my blog and get paid by Google for a click.

   One of the main challenges and the main thing about any kind of ads from any place is their relevance. Will you buy milk on a porno site? Or do you need a pack of Marlboro Lights, when searching for a Whitening Toothpaste? Probably not really…

    So you see the logic, the more relevant the ad is, the more chances people are going to pay their attention to it and, in the case of Adsense, "click it".

    Relevance is mostly achieved by the Google algorithm that analyzes your page (the page where ads are going to be displayed) by reading its content and "data mining" it. Then it makes a decision on what exactly "this" page is about, and what ads Google has on that topic. Once all is figured out, Google places the resulting ads on the page.

    But there are ways we can help Google not to "offer milk on the porno site" (although Google does not do porno sites – just a colorful example here :) ), but instead target its ads right to the point. One of such ways is "Section Targeting".

    how Google explains it:

    Section targeting allows you to suggest sections of your text and HTML content that you’d like us to emphasize or downplay when matching ads to your site’s content. By providing us with your suggestions, you can assist us in improving your ad targeting.

    You can read their short tutorial here. The idea is simple: your html page has a lot of text, including links, other advertisement, people comments, etc. but what you really want Google to focus on is your content ( in my case it is my blog post ). So you can use three HTML tags that will focus Google Adsense engine on your content. These tags are:

               Section start tag:               <!– google_ad_section_start –>

               Section end tag:                <!– google_ad_section_end –>

               Ignore section start tag:      <!– google_ad_section_start(weight=ignore) –>

    Sample from Google:

<html><head><title>Section targeting</title></head>
<body>
 
<!-- google_ad_section_start -->
 
This is the text of your webpage. Most of your content resides here.
 
<!-- google_ad_section_end -->
 
</body>
</html>

    From the sample above you can see how (start, end) tags can be used to focus Google only on the  main content. In order to ignore the content, wrap it with (ignore, end) tags as follows:

<html><head><title>Section targeting</title></head>
<body>
 
<!-- google_ad_section_start(weight=ignore) -->
 
This is the text of your webpage. Most of your content resides here.
 
<!-- google_ad_section_end -->
 
</body>
</html>

    But there is something interesting, that is not included in Google’s tutorial, that you can do with tags – you can nest them, as well as focus them on multiple sections! I have spoken to the Google Adsense representative, gave him a couple of examples I would liked to use the tags, and he confirmed that it works.

    So here is very cool and efficient things that you can do with adsense tags in addition to the usual stuff…

    nest those tags:

<!-- google_ad_section_start -->
 
     my content I want to focus on
     .....
 
     <!-- google_ad_section_start(weight=ignore) -->
 
          content I would like to ignore
 
     <!-- google_ad_section_end(weight=ignore) -->
 
     my content I want to focus on
     .....
 
<!-- google_ad_section_end -->

    so, in the above example we ignored a part of the section (content) we actually want Google to focus on – cool, right? :)

    That is not all, you can also focus on multiple sections, like this:

<!-- google_ad_section_start -->
 
     my content A I want to focus on
     .....
 
<!-- google_ad_section_end -->
 
     some other irrelevant content
     .....
 
<!-- google_ad_section_start -->
 
     my content B I want to focus on
     .....
 
<!-- google_ad_section_end -->

    This really opens the doors to finetune the relavence of your ads, which, who knows, maybe someday will make you a millionaire! ;)


16
Oct 07

Ubuntu Gutsy Gibbon Parties all over the World

Ubuntu LogoAccording to Ubuntu once Ubuntu 7.10 (Gutsy Gibbon) is out, there will be plenty to celebrate, whether you were directly involved in the release process or just rejoice because the next iteration of the best distribution is finally out.

    Thursday, 18th of October ‘2007 is the tentative date for Ubuntu 7.10. Many parties will be on this date, or you can pick your own date! Go ahead and put down your favorite pub, park or cafe and celebrate getting Gutsy Gibbon out of the door!

   Ubuntu Feisty Fawn

    get it while its hot :)

    Come and join Ubuntu parties all over the Globe! The schedule of already "Confirmed Parties" are here

picture’s source


10
Sep 07

Avant Window Navigator – Dual Monitor Hack

avant window navigator  Ok, so you have successfully configured dual monitor for you (Gnome/KDE) desktop, and now you have decided to take it even further and install and configure Avant Window Navigator – way to go!

    Although most of your installation/configuration will succeed by following one of the tutorials, in case if you have dual monitors, and/or you use Option  "MergedFB"  in "xorg.conf" to merge two monitors into a one screen, standard tutorials will not work. This will require additional hacking to get AWN to work right, and here is where this article comes in :)

    PROBLEM:    One of the problems that AWN has with multiple screens/monitors is to identify the position of where it needs to put its task bar. In case of two monitors merged into one big screen, it does not adjust to this new slightly larger "coordinate system", and fails to place its task bar to the right place on a screen (usually at the bottom of the bottom screen). This can be solved, of course ;)

    SOLUTION:   AWN stores monitor resolution info in a file called "%gconf.xml" which is located here:

          user@host:~/.gconf/apps/avant-window-navigator$ ll
          total 32
          drwx------ 2 user user 4096 2007-07-18 11:41 app
          drwx------ 4 user user 4096 2007-06-26 23:47 applets
          drwx------ 2 user user 4096 2007-08-06 21:52 bar
          -rw------- 1 user user 776 2007-09-10 09:52 %gconf.xml
          -rw------- 1 user user 776 2007-06-27 22:57 %gconf.xml.dual
          -rw------- 1 user user 776 2007-06-27 10:41 %gconf.xml.single
          drwx------ 2 user user 4096 2007-06-27 17:59 title
          drwx------ 2 user user 4096 2007-06-30 14:16 window_manager
          user@host:~/.gconf/apps/avant-window-navigator$

    "%gconf.xml" is an XML file that has several elements called "entry". The ones we are interested in would be:

 
        <entry name="monitor_height" mtime="1179886419" type="int" value="1024">
        </entry>
        <entry name="monitor_width" mtime="1179886419" type="int" value="1280">
        </entry>

    These values would work fine if we had a single 1280×1024 monitor, but if we have our (e.g.) bottom monitor as 1280×800, in order for AWN to display its task bar in a correct spot (the bottom of the bottom monitor), values have to change to:

 
        <entry name="monitor_height" mtime="1179886419" type="int" value="1824">
        </entry>
        <entry name="monitor_width" mtime="1179886419" type="int" value="1280">
        </entry>

    So what we did, we summed up Y-Positions of both monitors together: 1024 + 800 = 1824. Now when AWN is calculating its task bar’s Y-Pos offset, it will take 1824, as the Y-Pos max range, and will do the right thing!


30
Jun 07

iPhone: 20 Things It Does Not Have

 

 

Thinking on jumping on a new and "cool" iPhone? Think twice, it might be better to hold the thought for a month or too. And here is why…

  

  • Bluetooth is ONLY good for connecting a headset. That’s it.
  • There is no file browser on the device at all. Data must be organized (if at all) in the appropriate application.

  • The camera is a simple application that has ONE button: the shutter. Pictures come out okay on the device, but nothing too fancy on a monitor, especially if it was an attempt at a macro shot.

  • SIM card is damn near impossible to open, if at all. I didn’t look into it extensively.

  • Web browser is slow, even over WLAN. Even the simple OneList web app that was created takes around 20 seconds to load over WLAN. You can not highlight, cut, copy, or paste and text from a website, and you can not save any images you find from a website either. The only nice thing about it is the tabbed browsing, which crashed on me when I went to Engadget and YouTube on two tabs. This is the only application that allows you to use the keyboard in landscape mode.

  • The keyboard sucks. It gets slightly better after the iPhone "learns" you, as the employees said, but even then, it’s not a device you can use with one hand comfortably, much less without looking.

  • You can only send one picture at a time in an email.

  • No custom ringtones (yet, as we were being told) and the alert tones can not be changed whatsoever.

  • The default ringtones are incredibly lame.

  • The only form of customization outside of a lame default ringtone is the wallpaper, which you’ll only see when you need to unlock the device or when you get a phone call.

  • "Picture pinching" or using two fingers to zoom on any content is certainly fun to play with, but not practical whatsoever. This operation depends solely on using the device with two hands.

  • No document editor or native viewer. You can not store documents on the device to be viewed, they can only be viewed as attachments when they’re sent to your in an email.

  • Visual voicemail is laggy and reacts about the same way as pushing the fast forward and rewind buttons on traditional voicemail systems. The only advantage is for those that get that many voicemail messages a day that they need to sort them according to priority.

  • NO games. None.

  • No voice dialing.

  • No speed dialing (which can be made up by the "quick list", but getting to that quick list isn’t as fast as holding a single key on a real keypad).

  • No video.

  • No MMS.

  • It’s still <4GB for $500 and <8GB for $600

  • It only takes around 2 hours to explore every menu without any options for expandability except to scrounge around for new web apps that will load slowly and nowhere near as smoothly as the native apps.

    This device looks like it was aimed at the general consumer who has the money to spend on such a flashy device, but it leaves so many basic features behind that it’s almost impossible to consider it a success as a mainstream device. It encourages the advanced user to move away from MMS and into email to send images, but leaves out any advanced features advanced users would be accustomed to, and still retains a huge price tag on top of it.

    It’s certainly pretty and Americans will buy it because of that simple UI, but anyone who’s familiar with other operating systems would be appalled. This phone needs to be unlocked and cracked WIDE open to make much better use of the multi-touch system. That, or it needs an immediate update in iTunes to rework every feature.

source
   


25
Jun 07

Custom Keyboard Layout in Ubuntu (or just Linux :)

keyboard layout in Ubuntu LinuxSystem -> Preferences -> Keyboard -> Layouts -> Add… Right? It is all good and clean only in case if layouts, that come with Ubuntu (or other Linux), are exactly what you need. But what if you’d like to create your own layout? Or, most of the time, what if layout is ok, but you would like to change a couple of keys around, because you are used to it “that certain way”? Here is how to approach these “what if”s.

The “guy” to talk to is XKB (X KeyBoard), which is responsible for everything that is going on with keyboard(s) under X (GUI Environment).

First, let us find the layout to change/modify/customize. For that we will go to “/usr/share/X11/xkb/symbols”:

user@host:/usr/share/X11/xkb/symbols$ ls
ad      by             epo            hr      kh               mk         pl          th
af      ca             es             hu      kr               mm         pt          tj
al      capslock       eurosign       ie      kz               mn         ro          tr
altwin  cd             fi             il      la               mt         ru          ua
am      ch             fo             in      latam            mv         ru_backup   us
ara     compose        fr             inet    latin            nbsp       se          uz
az      cs             fujitsu_vndr/  iq      level3           nec_vndr/  sgi_vndr/   vn
ba      ctrl           gb             ir      level5           ng         si          xfree68_vndr/
bd      cz             ge             is      lk               nl         sk          za
be      de             gh             it      lt               no         sony_vndr/
bg      digital_vndr/  gr             jp      lv               np         srvr_ctrl
br      dk             group          keypad  macintosh_vndr/  pc         sun_vndr/
bt      ee             hp_vndr/       kg      mao              pk         sy

This is home for all layouts that XKB reads in and follows. That means that if a layout needs to be changed all the changes are written here.

Now let’s change a Russian Phonetic (for example) layout to change a couple of keys around. For that, first, make a backup of the existing Russian layout (that has all Russian Layouts):

sudo cp ru ru_backup

then let’s get to breaking through and customizing it (use your favorite text editor, “vi” here is used as an example):

sudo vi ru
 
// $XKeyboardConfig: xkbdesc/symbols/ru,v 1.11 2006/09/04 20:25:10 svu Exp $
 
// based on
// russian standard keyboard
// AEN aen@logic.ru
// 2001/12/23 by Leon Kanter leon@blackcatlinux.com
// 2005/12/09 Valery Inozemtsev shrek@altlinux.ru
//
// $XFree86: xc/programs/xkbcomp/symbols/ru,v 1.3 2003/02/15 22:27:05 dawes Exp $
 
partial default alphanumeric_keys
xkb_symbols "basic" {
 
    name[Group1]= "Russia";
 
    key    AE01 {    [        1,        exclam     ]    };
    key    AE02 {    [        2,        quotedbl    ]    };
    key    AE03 {    [        3,      numbersign    ]    };
    key    AE04 {    [        4,        asterisk    ]    };
    key    AE05 {    [        5,         colon    ]    };
    key    AE06 {    [        6,         comma    ]    };
    key    AE07 {    [        7,        period    ]    };
    key    AE08 {    [        8,     semicolon    ]    };
    key    AE09 {    [        9,     parenleft    ]    };
    key    AE10 {    [        0,    parenright    ]    };
    key    AE11 {    [        minus,    underscore    ]    };
    key    AE12 {    [        equal,          plus    ]    };
    key    BKSL {    [    backslash,             bar    ]    };
    key    AB10 {    [        slash,      question    ]    };
    key LSGT {        [           slash,             bar      ]       };
 
    key    TLDE {    [     Cyrillic_io,     Cyrillic_IO    ]    };
    key    AD01 {    [ Cyrillic_shorti, Cyrillic_SHORTI    ]    };
    key    AD02 {    [    Cyrillic_tse,    Cyrillic_TSE    ]    };
    key    AD03 {    [      Cyrillic_u,    Cyrillic_U    ]    };
    key    AD04 {    [     Cyrillic_ka,     Cyrillic_KA    ]    };
    key    AD05 {    [     Cyrillic_ie,     Cyrillic_IE    ]    };
    key    AD06 {    [     Cyrillic_en,     Cyrillic_EN    ]    };
    key    AD07 {    [    Cyrillic_ghe,    Cyrillic_GHE    ]    };
    key    AD08 {    [    Cyrillic_sha,    Cyrillic_SHA    ]    };
    key    AD09 {    [  Cyrillic_shcha,  Cyrillic_SHCHA    ]    };
    key    AD10 {    [     Cyrillic_ze,     Cyrillic_ZE    ]    };
    key    AD11 {    [     Cyrillic_ha,     Cyrillic_HA    ]    };
    key    AD12 {    [Cyrillic_hardsign,Cyrillic_HARDSIGN    ]    };
    key    AC01 {    [     Cyrillic_ef,     Cyrillic_EF    ]    };
    key    AC02 {    [   Cyrillic_yeru,   Cyrillic_YERU    ]    };
    key    AC03 {    [     Cyrillic_ve,     Cyrillic_VE    ]    };
    key    AC04 {    [      Cyrillic_a,    Cyrillic_A    ]    };
    key    AC05 {    [     Cyrillic_pe,     Cyrillic_PE    ]    };
    key    AC06 {    [     Cyrillic_er,     Cyrillic_ER    ]    };
    key    AC07 {    [      Cyrillic_o,    Cyrillic_O    ]    };
    key    AC08 {    [     Cyrillic_el,     Cyrillic_EL    ]    };
    key    AC09 {    [     Cyrillic_de,     Cyrillic_DE    ]    };
    key    AC10 {    [    Cyrillic_zhe,    Cyrillic_ZHE    ]    };
    key    AC11 {    [      Cyrillic_e,    Cyrillic_E    ]    };
    key    AB01 {    [     Cyrillic_ya,     Cyrillic_YA    ]    };
    key    AB02 {    [    Cyrillic_che,    Cyrillic_CHE    ]    };
    key    AB03 {    [     Cyrillic_es,     Cyrillic_ES    ]    };
    key    AB04 {    [     Cyrillic_em,     Cyrillic_EM    ]    };
    key    AB05 {    [      Cyrillic_i,    Cyrillic_I    ]    };
    key    AB06 {    [     Cyrillic_te,     Cyrillic_TE    ]    };
    key    AB07 {    [Cyrillic_softsign,Cyrillic_SOFTSIGN    ]    };
    key    AB08 {    [     Cyrillic_be,     Cyrillic_BE    ]    };
    key    AB09 {    [     Cyrillic_yu,     Cyrillic_YU    ]    };
 
    key.type[group1]="TWO_LEVEL";
 
    include "keypad(comma)"
};
 
partial alphanumeric_keys
xkb_symbols "winkeys" {
    include "ru(basic)"
    name[Group1]= "Russia - Winkeys";
    key AE03 {        [               3,      numerosign      ]       };
    key AE04 {        [               4,       semicolon      ]       };
    key AE05 {        [               5,         percent      ]       };
    key AE06 {        [               6,           colon      ]       };
    key AE07 {        [               7,        question      ]       };
    key AE08 {        [               8,        asterisk      ]       };
    key AB10 {        [          period,           comma      ]       };
    key BKSL {        [       backslash,           slash      ]       };
};
 
partial alphanumeric_keys
xkb_symbols "typewriter" {
    include "ru(basic)"
    name[Group1]= "Russia - Typewriter";
    key    TLDE {    [      apostrophe,      quotedbl    ]     };
    key    AE01 {    [       exclam,         1     ]    };
    key    AE02 {    [      numerosign,         2    ]    };
    key    AE03 {    [        slash,         3    ]    };
    key    AE04 {    [    semicolon,         4    ]    };
    key    AE05 {    [        colon,         5    ]    };
    key    AE06 {    [        comma,         6    ]    };
    key    AE07 {    [       period,         7    ]    };
    key    AE08 {    [      underscore,         8    ]    };
    key    AE09 {    [     question,         9    ]    };
    key    AE10 {    [      percent,
        0    ]    };
    key    BKSL {    [    parenleft,    parenright    ]    };
 
    key    AD12 {    [Cyrillic_hardsign,Cyrillic_HARDSIGN    ]    };
    key    AB10 {    [     Cyrillic_io,     Cyrillic_IO    ]    };
};
 
partial alphanumeric_keys
xkb_symbols "phonetic" {
 
    name[Group1]= "Russia - Phonetic";
 
    key    AE01 {    [        1,        exclam     ]    };
    key    AE02 {    [        2,            at    ]    };
    key    AE03 {    [        3,     Cyrillic_io     ]    };
    key    AE04 {    [        4,     Cyrillic_IO    ]    };
    key    AE05 {    [        5, Cyrillic_hardsign       ]    };
    key    AE06 {    [        6, Cyrillic_HARDSIGN    ]    };
    key    AE07 {    [        7,     ampersand    ]    };
    key    AE08 {    [        8,        asterisk    ]    };
    key    AE09 {    [        9,     parenleft    ]    };
    key    AE10 {    [        0,    parenright    ]    };
 
    key    AB09 {    [       period,       greater    ]    };
    key    AB10 {    [        slash,      question    ]    };
    key    AB08 {    [        comma,          less    ]    };
    key    AC10 {    [    semicolon,         colon    ]    };
    key    AC11 {    [      apostrophe,      quotedbl    ]    };
    key    LSGT {    [          bar,     brokenbar    ]    };
 
    key    TLDE {    [     Cyrillic_yu,     Cyrillic_YU    ]    };
    key    LatQ {    [     Cyrillic_ya,     Cyrillic_YA    ]    };
    key    LatZ {    [     Cyrillic_ze,     Cyrillic_ZE    ]    };
    key    LatS {    [     Cyrillic_es,     Cyrillic_ES    ]    };
    key    LatA {    [      Cyrillic_a,    Cyrillic_A    ]    };
    key    LatW {    [     Cyrillic_ve,     Cyrillic_VE    ]    };
    key    LatC {    [    Cyrillic_tse,    Cyrillic_TSE    ]    };
    key    LatX {    [Cyrillic_softsign,Cyrillic_SOFTSIGN    ]    };
    key    LatD {    [     Cyrillic_de,     Cyrillic_DE    ]    };
    key    LatE {    [     Cyrillic_ie,     Cyrillic_IE    ]    };
    key    LatV {    [    Cyrillic_zhe,    Cyrillic_ZHE    ]    };
    key    LatF {    [     Cyrillic_ef,     Cyrillic_EF    ]    };
    key    LatT {    [     Cyrillic_te,     Cyrillic_TE    ]    };
    key    LatR {    [     Cyrillic_er,     Cyrillic_ER    ]    };
    key    LatN {    [     Cyrillic_en,     Cyrillic_EN    ]    };
    key    LatB {    [     Cyrillic_be,     Cyrillic_BE    ]    };
    key    LatH {    [     Cyrillic_ha,     Cyrillic_HA    ]    };
 
    ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
 
};

inside the file we’ll find the layout we are after, which is specified by the following line:

xkb_symbols "phonetic"

after this line all the mapping is done.

Now let’s look at the letters we would like to change keys for:

    key    LatX {    [Cyrillic_softsign,Cyrillic_SOFTSIGN    ]    };
    key    LatH {    [     Cyrillic_ha,     Cyrillic_HA    ]    };
    key    AE12 {    [    Cyrillic_che,    Cyrillic_CHE    ]    };

A single line above means that the “key <such and such> will map to [ small, and capital ] Russian letter”. So to change this all that needs to be done is to re-map them. For example, if we want <LatX> (just a latin X, or ‘X’ key) to map to “Cyrillic_ha, Cyrillic_HA” instead of “Cyrillic_softsign,Cyrillic_SOFTSIGN”, we just need to change it:

    key    LatX {    [     Cyrillic_ha,     Cyrillic_HA    ]    };

Here is how these three letters were changed, so they are more convinient to use as a part of the Russian Phonetic layout from the past:

    key    AE12 {    [Cyrillic_softsign,Cyrillic_SOFTSIGN    ]    };
    key    LatX {    [     Cyrillic_ha,     Cyrillic_HA    ]    };
    key    LatH {    [    Cyrillic_che,    Cyrillic_CHE    ]    };

Now just save the file and exit out from it (in vi it is “:wq”), and restart X (press “Ctrl + Alt + backspace”).

You’ve got yourself a new customized layout now that you can use – enjoy!