Extjs library

5 aastat tagasi sellise funktsionaalsuse loomiseks nullist läks ikka natukene aega (Sorteerimine, grupeerimine, menüüd jne.) Probleemiks oli ka siis see, et iga üks nokitses oma funktsionaalsuse.
Nüüd on tark kasutada avalike gruppide ka. ehk ka Sinu, poolt arendatavaid teeke. Siin on üks näide extjs library võimalustest. Kuna ma ei ole just väga quru javaskriptis siis natuke võttis aega, samas luban ennest sellel alal tublisti arendada 🙂

Hetkel on siis olemas n.n GUI või siis client side code.

gridPanel

Edasi tuleb siduda andud lahendus andmebaasiga kasutades Zend framework libraryt.

ImageMagick versus some GUI image editor

I am not every day image editor. Usually once a month I need resize some pictures and put them in my webpage. And every time I have the same problem pictures are too big.
Ok what to do? Lets compare “window user” and “Linux user” behaivor.

Windows user:
1. Start
2. many clicks and menus to find some image editor app.
3. Quickest solution to use Paint if it has that name 🙂 Worst case to use Photoshop or something.
4. File menu -> Open file -> browse file -> …
5. Hard work with mouse.
6. Save file.

this is minimum actions 90% there will be few restarts.

Linux users:
(Every linux user has open terminal app somewhere)
1. convert pic.png -resize 600×600 pic.jpg (600 is example)

Mac OS X Leopard default browser

Kuna asi käis vastavalt minu loogikale läbi ussimu**i siis panen siia endale tulevikuks kirja. Tegelikult oli asi väga lihtne. Avad mac OS X vaikimisi default browseri Safari. Preferences ja sealt valid default web browser mis iganes sulle meeldib.

Mac OS X 10.4 root parooli vahetus

Click Restart at the login window
While the computer is restarting, hold down “Command-S” until you see text scrolling through the window. This boots the computer into single user mode.
At the Localhost% prompt type:
/sbin/mount -uw /
/sbin/SystemStarter
You will then see various services starting up.

When the Localhost% prompt reappears, type:
passwd root
It will then ask you to type the new root password twice, so do so.

After entering the new password, type:
reboot

Plaan c++, postgre, pdf

Vastavalt sellele kuidas mul vaba ajaga on annan tead kuidas projekt areneb.

Eesmärk: Vastavalt sisendandmetele sooritatakse postgreSQL andmebaasis päring ning kasutades programmeerimiskeelt C++ tekitatakse PDF fail mis hiljem prinditakse.

Kasutatavad ressursid:
Programmeerimiskeel – C/C++
PostgreSQL db layer for C++ – libqxx (http://pqxx.org/development/libpqxx/)

Alustan vaikselt C postgreSQL connect testi.
Vajalikud headerid:
libpgeacy.h – port install libpgeacy
libpq-fe.h – see tundub poevat postgre dev paketis – fink install postgresql82-dev

Hetkel on asi sellises seisus ja kell on 00:30 aitab. Magama:
make all
Building target: tousuleht
Invoking: MacOS X C Linker
gcc -o “tousuleht” ./pgconnect.o
Undefined symbols:
“_connectdb”, referenced from:
_main in pgconnect.o
“_fetch”, referenced from:
_main in pgconnect.o
“_doquery”, referenced from:
_main in pgconnect.o
“_disconnectdb”, referenced from:
_main in pgconnect.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [tousuleht] Error 1

Selgus et MAC OS X ei oma sellist tooli nagu ldd aga omab hoopis otool -L

linux.ee pealt aidati ka:

[17:17] <Kang> Margusja_: postgres’i teek tundub puudu olevat.
[17:17] <Kang> -lpsql
[17:19] <kaups_AU> Margusja_: -lpgsql ?
[17:19] <Kang> failinimi on kuju libXYZ.so või libXYZ.a
[17:19] <kaups_AU> või mis iganes selle postgresi libra nimi võiks olla
[17:20] <Kang> sellele vastavalt gcc võti on -lXYZ
[17:21] <jussuf> -lpq peaks postgresi lib olema

Peale väikest otsimist paigaldasin fink abil libpqxx2 ja libpqxx2-shlibs

Jälle üks fakt, et igasugused poolautomaatsed builderid on saatanast.
kasutasin käsureal gcc asemel g++ compilaatorit ja hetkel tundub et mul on vajalikud libraryd olemas
libpqxx on see mida ma siis vajan.

Ja mida me veel õppisime. gcc on c compiler ja g++ on c++ compiler.

Kellelgi on sama probleem: http://archives.postgresql.org/pgsql-interfaces/2003-01/msg00115.php

Uhh nii!
Sain ka Mac OS X 10.5.2 peal postgre connection algfaasi kokku.
kasutasin C library (libpq) (C koodis #include libpq-fe.h)
Kuna gcc ei leidnud kohe libpq libraryt siis tuli minu süsteemis talle see ette anda -L/gw/lib -lpq – Selgitame:
-l lingib mingi library koodi külge. syntax: -lXXXX kus XXXX on mingi library, antud juhul oli tegu libpq kus lib jäetakse siis ära. Süsteemis asus library /sw/lib/libpq.a

Hetkel on kenasti asi seal maal, et postgresi baasiga on korralik ühendus olemas kasutades libpq ja C programmeerimiskeelt. Samuti saan andmebaasis andmeid kenasti lugeda ja kuvada.

Tänase õhtu nokitsemine lõppes sellega, et saan vastava CODE sisestamisega vastu vastava CODE andmed.

Asi on siis niikaugel et postgreSQL-ist saan seda mida tahan ja C array-sse suudan ka kogu selle kola kenasti panna.

Natuke nokitsemist ja Mac OS X 10.5 pdflib pakk peal ja kompilaator ka rahul.

Probleeme oli korra mõningate funktioonide leidmisega:

“_HUnlock”, referenced from:
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_CurResFile”, referenced from:
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_pdf_t1open_fontfile in libpdf.a(p_type1.lo)
“_FSpOpenDF”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FMGetFontFormat”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FSpOpenResFile”, referenced from:
_pdf_t1open_fontfile in libpdf.a(p_type1.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FMGetFontContainer”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfontfile in libpdf.a(ft_hostfont.lo)
“_HLock”, referenced from:
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_GetResource”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_CopyCStringToPascal”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfontfile in libpdf.a(ft_hostfont.lo)
“_GetEOF”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FMGetFontFromFontFamilyInstance”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_CloseResFile”, referenced from:
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_pdf_t1open_fontfile in libpdf.a(p_type1.lo)
_pdf_t1open_fontfile in libpdf.a(p_type1.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FSpGetFInfo”, referenced from:
_pdc_init_output in libpdf.a(pc_output.lo)
“_FSGetCatalogInfo”, referenced from:
_FSPathMakeFSSpec in libpdf.a(pc_file.lo)
“_FSpSetFInfo”, referenced from:
_pdc_init_output in libpdf.a(pc_output.lo)
“_UseResFile”, referenced from:
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_pdf_t1open_fontfile in libpdf.a(p_type1.lo)
_pdf_t1open_fontfile in libpdf.a(p_type1.lo)
_pdf_t1open_fontfile in libpdf.a(p_type1.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FSClose”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FSpMakeFSRef”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FMGetFontFamilyFromName”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_ReleaseResource”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FSRefMakePath”, referenced from:
_FSMakePath in libpdf.a(pc_file.lo)
“_FSPathMakeRef”, referenced from:
_FSPathMakeFSSpec in libpdf.a(pc_file.lo)
“_PBMakeFSRefSync”, referenced from:
_FSMakePath in libpdf.a(pc_file.lo)
“_Get1IndResource”, referenced from:
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
“_Get1NamedResource”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FSOpenResourceFile”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_GetHandleSize”, referenced from:
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_ResError”, referenced from:
_pdf_t1open_fontfile in libpdf.a(p_type1.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_Count1Resources”, referenced from:
_pdf_get_metrics_type1 in libpdf.a(p_type1.lo)
_pdf_t1open_fontfile in libpdf.a(p_type1.lo)
“_FSRead”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
ld: symbol(s) not found

Need lahenesid vastavalt siis kompilaatorile -framework võtmetega antavate parameetritega:

gcc -L/sw/lib/ -lpq -I /sw/include/postgresql/ -I/sw/include/ -lpdf -framework CoreServices pgconnect.c -o pgconnect

Peale seda kompilaator kaebas:Undefined symbols:
“_FMGetFontFormat”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FMGetFontContainer”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfontfile in libpdf.a(ft_hostfont.lo)
“_FMGetFontFromFontFamilyInstance”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
“_FMGetFontFamilyFromName”, referenced from:
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
_fnt_get_hostfont in libpdf.a(ft_hostfont.lo)
ld: symbol(s) not found
collect2: ld returned 1 exit status

Puudu oli Fonts.h mis asus Mac OS X ApplicationServises framework kaustas.
Lisasime veel ühe framework-i ja kompilaator rahul
gcc -L/sw/lib/ -lpq -I /sw/include/postgresql/ -I/sw/include/ -lpdf -framework CoreServices -framework ApplicationServices pgconnect.c -o pgconnect

PDF fail luuakse kenasti – hetkel on küll loodava faili taustal PDFLIB reklaamurl.

Office::mac errorid ja lahendus

An unexepted error occured while trying to load the Microsoft Framework library – Exeli, Wordi ja Poverpoindi käivitamisel.
This identify cannot be opened with this version of Endurage – Endurage käivitamisel.
Lahendus – Documents – Microsoft User Data renameda ja uuesti proovida.