We have to learn Chinese

its been a long time I have started to see japanese or chinese language in internet. they have really good technical guys but most of them writes in their language. today I was checking my email. and I saw a news its really cool.

210 million Internet users in China; 11.93 million domain names

it means a big big big market there and if we want to do something we have to start learning Chinese. it will be easier then teaching them English I guess 🙂

references:
http://english.people.com.cn/90001/90781/90877/6341926.html

Howto Change Your Server One To Another

this post is about ftp in bash/console.It has been a long time I was a godaddy customer. their service is really nice if you are starting something but at some point in my “Deluxe Hosting – Linux” account mysql databases started to suck. I have tried to change mysql databases create new ones from hosting control center. but it did not work out and I get a new dedicated server. now I have about 10 domain which works under linux with power of php. so how am I gonna move all those to another linux.

here comes our mutual friend MC. midnight commander 🙂 this new dedicated is debian and apt totally rocks it took me to install mc in 5 secs. and lets see how we can connect to other ftp at “right” menu there is “ftp link”. you need to put proper ftp url there and in right panel you will see another server which is in godaddy data center 🙂 isnt it rock.

example proper ftp url for midnight commander ftp client:
“username:password@yourdomain.com”

and all these will be under console. linux rocks

JSP http post arguments/parameters

yesterday I was looking for a way to print some values from http POST. then I could not find easy example. this was about getting values from some swf. first I wrote this:

for(Enumeration i = request.getParameterNames();i.hasMoreElements();){
String parName=(String)i.nextElement();
out.write(“parameter:”+parName+” value:”+request.getParameter(parName));
System.out.println(“parameter:”+parName+” value:”+request.getParameter(parName));
}

this was working very well I tried it from browser address bar. but then there was a strange exception about security and stuff. like this:
[2008-01-31 19:18:17,140] resin-tcp-connection-*:80-11 WARN org.springframework.web.servlet.PageNotFound – No mapping for [/crossdomain.xml] in DispatcherServlet with name ‘pageFlow’

as you see sound like spring exception. then I convert the *.xml line to rss.xml in web.xml. because there was only one rss.xml request which has to be handled by spring. after that I have to find a crossdomain.xml for swf. example:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*.macromedia.com" secure="false" />
<allow-access-from domain="*.adobe.com" secure="false" />
<allow-access-from domain="*.mydomain.com" secure="true" />
</cross-domain-policy>

the important part we have to say our domain is secure=true otherwise same exception stays. now my http post printer is working.

Hibernate and null fields

I was writing some simple slide generator. and in that process I write hbm.xml file and put this line in there.

<property name="photoSlideId" column="photo_slide_id" type="long" not-null="false" length="8" />

then I put needed variable into the class like this:
private long photoSlideId;

then I start to get photos list as null. it was impossible because it has to generate a exception or something in that situation. then I realized that this code was trying to assign null into the “long” type variable. it was impossible because in java we cannot assign null into the primitive types. then I changed class like this

private Long photoSlideId;

and its working like a charm.

Garanti En Sonunda Akıl Etti

senelerdir kredi kartının ekstresinin gelmesinden huylanırım zaten ve ne zaman fırsat bulsam ben bu ekstreleri istemiyorum göndermeyin derim. sonuçta internet bankacılığı diye bişey var ve her işime yetiyor. bugün mail gelmiş bonus tanda ödüllü kampanyayla hem doğayı koruyorlar hemde kara geçiyorlar 🙂 hele şükür en sonunda kafaları çalıştı.

ps: her ne kadar senelik olarak bizi sağsada güzel bir hizmet veriyorlar. merak ediyorum senelik aldıkları ücretlerden dolayı kaç müşteri kaybettiler ben bir tane tanıyorum adam bütün kartlarını hesabını iptal ettirip işbankasınamı ne geçmişti. benimkide üşengeçlik bide gelen gideni aratır korkusu 🙂

psql ilk deneme

14 bin satır bir schema dump ı var elimde pgadmin ile windowsda aldım başka bir windows makinede postgresql e bunu koyup bi şekilde yeni table oluşturmam lazım. tabii pgadmini açtım o makinede ama klasik çalışmadı pg_restore falan denedim yemedi. efenim örnek:
"c:Program FilesPostgreSQL8.2binpsql.exe" -Upostgres azbuz < "c:Documents and SettingsopakdilDesktopdump.backup"

sevimli oluo bu open source db ler.