Adding Links Through JQuery

I prefer JQuery way of append() than plain JavaScript inner HTML method of adding elements to a page. This way it is easier to identify errors and produce nice DOM trees without dealing with markup.

In I added a page for each element in the dictionary. These pages should be reachable from the main page, so I decided to add links from word results to the word pages.

I just added

    .attr("href", link)

to the appropriate place in the tree and it put the link.

zsh’de parametre açılımı

zsh parametre açılımı (expansion) için bash ve diğerlerinde olmayan çeşitli kolaylıklar sunuyor.

% filename=$HOME/mydir/myfile.txt
% print ${filename:h}
% print ${filename:t}
% print ${filename:e}
% print ${filename:h:t}
% print ${filename:t:r}

PostgreSQL with Django

In debian, install the following packages: libpq-dev, postresql-9.3, postgresql-contrib-9.3

Change to postgres user using sudo su - postgres

Create a database using createdb mydb

Create a new user by createuser -P myuser

Open postgresql by psql and grant all on mydb to myuser

Change the database options of the django project by

  'default': {
  'ENGINE': 'django.db.backends.postgresql_psycopg2',
  'NAME': 'mydb',
  'USER': 'myuser',
  'PASSWORD': 'thepassword',
  'HOST': 'localhost',
  'PORT': ''

Now you can run syncdb in your django configuration to generate the models in Postgres.

Linux’ta Date Komutu

Linux terminalde date komutuna birden fazla parametre geçmek gerektiğinde,

date +"%F %R"

şeklinde, " (çift tırnak) işaretini kullanmak gerekiyor. updated

Finally, we have completed adding another 17.000 words from Belviranli’s Ottoman spelling dictionary and now has about 27500 Ottoman words.

We will continue to include more words, especially proper names as much as possible.’u Genişletiyoruz

Osmanlı Türkçesi için hazırladığımız imla lügatine 17.850 civarında yeni kelime eklendi. Kelimelerin yazımını tamamladık. Tashihi bittikten sonra dervaze halihazırdaki 10.500 kelimeyle beraber en geniş Osmanlıca imla lügati olacak.


Abjad calculations are now in dervaze

dervaze screenshot

Abjad numerals is a number system where each letter represents a number in Arabic alphabet. For example ا (alef) is used for 1, م (meem) is used for 40. The words are additive, hence the word ما (ma) is 41.

The full table for the numerals are as follows.

====== ======== ====== ====== ======== ====== ====== ======== ======
 Value  Letter   Name   Value  Letter   Name   Value  Letter   Name
====== ======== ====== ====== ======== ====== ====== ======== ======
  1        ا      alif      10     ى      yāʼ     100    ق      qāf
  2        ب      bāʼ       20     ك      kāf     200    ر      rāʼ
  3        ج      jīm       30     ل      lām     300    ش      shīn
  4        د      dāl       40     م      mīm     400    ت      tāʼ
  5        ه      hāʼ       50     ن      nūn     500    ث      thāʼ
  6        و      wāw       60     س      sīn     600    خ      khā
  7        ز      zāy       70     ع      ʻayn    700    ذ      dhāl
  8        ح      ḥāʼ       80     ف      fāʼ     800    ض      ḍād
  9        ط      ṭāʼ       90     ص      ṣād     900    ظ      ẓāʼ
  1000     غ      ghayn

The additional letters in Farsi and Ottoman are assigned values by their most similar counterpart in Arabic. For example چ (tcheem) gets its value from ج (jeem), 3.

The web application in dervaze should have two aspects. The first of these is converting a word into its numeric value. Each word, for example, صادق can have a numeric counterpart. When a user sees the word صادق, they can also see its numeral as 90 + 1 + 4 + 100 = 195.

The other application is more interesting. When a user enters the numeral 195, the application can list all words that correspond to this numeric value.

The first application can be done on the fly, but it’s better to put these values into the database to not to calculate in every query anyway.

In dervaze’s database, we opened a new field called abjad. This field is populated by the word’s numeric counterpart. When a user enters a word query, abjad value is also reported.

When a user enters a numeric query like 195 instead of a word, the application builds another query. This time, it looks for the words which have this numeric value in their abjad fields.