Galip Aydin's notes

XMLBeans Kurulumu

Posted in Java, XML by galipaydin on November 10, 2010

XML Schema dokümanlarından Java kodu üretip programlarımızda gerek XML üretmek gerekse de varolan XML dosyalarından veri çekmek için XMLBeans kullanabiliriz.

XMLBeans zip dosyasını buradan indirin. Zip dosyasını C dizinine açtığımızı varsayalım, buna göre xmlbeans klasörünün tam yolu C:\xmlbeans-2.5.0 olacaktır.

Windows Ortam değişkenlerinin eklenmesi:  (more…)

The eight fallacies of Distributed Computing

Posted in Uncategorized by galipaydin on October 4, 2010
1. The network is reliable
2. Latency is zero
3. Bandwidth is infinite
4. The network is secure
5. Topology doesn’t change
6. There is one administrator
7. Transport cost is zero
8. The network is homogeneous

Link from James Goslings’ blog http://nighthacks.com/roller/jag/resource/Fallacies.html

Solaris root şifresini değiştirme

Posted in unix by galipaydin on August 8, 2010

Unix sunucularımızdan birisinin root şifresi çalışmayınca değiştirmek zorunda kaldım. Bunun için aşağıdaki adımları izledim:
1– Solaris işletim sistemi DVDsini takıp makineyi yeniden başlat. CD/DVD’den boot edebilmesi için sistemin boot sıralamasının ayarlanması gerekiyor (bunun için de sistem başlatılırken bios ayarlarına girmek için genelde F2 veya Del tuşlarından birine basmak gerekir).
2 –  DVD üzerinde boot ettikten sonra gelen seçeneklerden Single User Mode (Solaris 10 CD’sinde seçenek 6) seç.
3– Var olan Solaris kurulumu bulunup bize bunu /a olarak mount etmek isteyip istemediğimiz sorusu geliyor, bunu yes diye cevaplamamız gerekiyor.
4– root file system mount edildikten sonra artık eski root şifresini silebiliriz. Bunun için aşağıdaki gibi vi kullanarak encrypt edilmiş şifreyi siliyoruz:
# vi /a/etc/shadow
ilk satırda root şifresi “root:ABCHD::::“ şeklinde kaydedildiğinden “root:“ dan itibaren satırın kalan kısmını silip dosyayı :w! ile kaydediyoruz.
5– cd/ ile file sistemden çıkıp
umount /a ile de mount ettiğimiz root file sistemi unmount ediyoruz.
Makineyi restart ettikten sonra root için password set etmek için passwd root yazıyoruz ve yeni şifreyi giriyoruz.
Tags: solaris+root+password, solaris, unix

Highlighting features in OpenLayers

Posted in GeoServer, OpenLayers by galipaydin on August 5, 2010

Based on the example here I have added highlighting capability to my project. Here is how I did it:

-First create a map and add your WMS layers.

– Create a blank vector layer and add it to your map. This layer will contain the feature to be highlighted.

var highlight_style = { fillColor:'#99CCFF', strokeColor:'#3399FF', fillOpacity:0.7 };
hilites = new OpenLayers.Layer.Vector("Highlighted",
{isBaseLayer:false, features:[], visibility:true, style:highlight_style}
);
map.addLayer(hilites);

(more…)

Adding support for MrSid and other raster data formats in GeoServer

Posted in GeoServer by galipaydin on August 1, 2010

I recently obtained a MrSid encoded satellite image for part of Elazig region and wanted to add this as a layer on GeoServer. However the original GeoServer installation does not have the capability to process and show MrSid image format. So I did a bit of googling and found out that I had to install gdal libraries.

First grab a copy of the imageio-ext binary package from here imageio-ext and install it.

Create the GDAL_DATA environment variable; in my case the GDAL_DATA points to C:\Program Files\imageio-ext\gdaldata

then restart the geoserver and go to Stores-> Add New Store, and you should see the new Raster data formats added to the list.

 

 

Custom GeoServer GetFeatureInfo Template

Posted in Uncategorized by galipaydin on July 23, 2010

GeoServer comes with pre-build Freemarker templates for formatting responses to GetFeatureInfo requests. However in most cases these templates are not appropriate. Luckily we can easily change those templates to make GeoServer spit out the feature info in our format of choice such as JSON, GeoJSON or XML.

Here is a simple example to produce XML formatted GetFeatureInfo responses.

(more…)

Finding Bounding Box of a Polygon in PostGis

Posted in Uncategorized by galipaydin on July 20, 2010

SELECT ST_Extent(geom) as bbox FROM sinirlar where isim=’POLYGON_NAME’;

Postgreql uninstall and removing the service

Posted in Database, PostgreSQL by galipaydin on July 20, 2010

i) Remove the postgresql server installation directory. (rd /s /q “C:\Program Files\PostgresPlus\8.4SS”) Assuming default location. 

ii) Delete the user ‘postgres’ (net user postgres /delete) 

iii) Remove the Registry entries. 
(HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-8.4) and (HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services\postgresql-8.4) 

iv) Remove the postgresql-8.4 service. (sc delete postgresql-8.4) 

source : http://forums.enterprisedb.com/posts/list/2233.page

 

 

Veritabanında tekrar eden satırları bulma

Posted in Database, PostgreSQL by galipaydin on July 16, 2010

PostgreSQL’de bir tablodaki tekrar girilmiş (duplicate) satırları bulmak için şöyle bir komut kullanılabiliyor:

select * from liste GROUP BY ad, soyad, sokak, kapi, daire_no HAVING count(*) > 1 order by ad

 

 

NetBeans ile Web Projesi Geliştirme – 2 – JSP

Posted in Java, NetBeans by galipaydin on October 12, 2009

Önceki yazıda anlatılan projede oluşturulan JSP sayfası projemizin internetten erişilen penceresi mahiyetindedir. JSP sayfalarında standart HTML dışında Java kodları da yazılabilir ve sayfa yüklenince dinamik içerik üretimi sağlanabilir. Bu yazıda JSP ile ilgili birkaç önemli nokta üzerinde duralım.
(more…)

Follow

Get every new post delivered to your Inbox.