Skip to main content

Posts

Postgresql 9.6 and Pgadmin3 trouble

Yesterday, I updated my PostgreSQL to the latest version 9.6 from version 9.5.

The upgrade process went successfully, unfortunately pgadmin choked a little bit dealing with PostgreSQL 9.6, everytime we want to define primary key an error is thrown:
ERROR: column "amgettuple" does not exist LINE 1: ...am WHERE EXISTS (SELECT 1 FROM pg_proc WHERE oid=amgettuple...
we can ignore this error and the primary key creation will succeed, however it is annoying.

My pgadmin was the latest version: pgadmin3 v 1.22.2

Visiting https://pgadmin.org/download/source.php reveals that this version is the final version and won't be supported anymore. We are encouraged to use pgadmin4 instead.

I then downloaded and installed pgadmin4, installation was a pain in ass but I succeeded got it installed. However, pgadmin4 was terribly very slow. It also got a problem with the function debugger. After function parameters entry, the debugger is showed, unfortunately it only shows a blank page. However…
Recent posts

Install Sketchup 2017 64 bits on Linux Ubuntu 16.04 64 bits

Install Sketchup 2017 64 bits on Linux Ubuntu 16.04 64 bits:

1.Enable 32 bit architecture:
$sudo dpkg --add-architecture i386 
2. Set wine PPA
$sudo add-apt-repository ppa:wine/wine-builds
Update repository
$sudo apt-get update
3. Install wine newest staging branch version
$sudo apt-get install --install-recommends winehq-staging
4. Ensure we get a 64bits wine, edit file ~/.profile and locate for text:
export WINEARCH= If the value is win64 you are good, if the value is win32 change it to win64. Save the file.

Ensure the environment variable also set to win64 by typing command:
$export WINEARCH=win64
5. Download winetricks:

$wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks    Don't forget to set the attribute so it is executable
$chmod +x winetricks
6. Run winetricks
$./winetricks
Inside winetricks:
Choose Select the default wineprefix, click OK
Choose Install a Windows DLL or component, click OK
Choose vcrun2015, click OK
...after vcrun2015 installation comp…

POSTGRESQL: Dealing with 'current transaction is aborted, commands ignored until end of transaction block' in Lazarus/Delphi

Scenario:  Programming Environment: Lazarus/Delphi Database: PostgreSQL DB Component: Zeos
Problem:
You have a form displaying a table content in a grid. It is a typical data form where user can insert, update or delete record.
When user inserting record which fails going through Table integriry constraints (foreign key, unique constraint, check constraints etc), postgresql will throw exception: current transaction is aborted, commands ignored until end of transaction block. After this, all operation is not possible except closing the form and losing all modification you might have done.
Solution: Define events of the query component, FDBConnection is db the connection component.

BeforePost and BeforeDelete events: Self.FDBConnection.ExecuteDirect( 'SAVEPOINT mysavepoint');
AfterPost and AfterDelete events: Self.FDBConnection.ExecuteDirect( 'RELEASE SAVEPOINT mysavepoint');
OnPostError and OnDeleteError events: Self.FDBConnection.ExecuteDirect( 'ROLLBACK TO SAVEPOINT mysa…

NOTEPAD++ SOURCECOOKIFIER SETTING FOR CLIPPER LANGUAGE

Notepad++ is a very excellent programmer editor for Windows. It has plugin system which enhances it's functionality. Sourcecookifier is a plugin I like very much, it is a simple plugin which shows the outline of your source code.
The screenshot below shows a pascal (delphi) source code. We can easily see the structure of the source code, and we can go to a particular method/function just by one click.

Sourcecookifier recognizes several programming languages, but it does not support Clipper language. Fortunately, it is very easy to add Clipper configure. Follow this step:
Click setting icon (the yellow gear icon) on the sourcecookiefier window.

Click Language Settings On the setting form, type Clipper on the language box and click add.


Set the file extension setting, add .prg to the extenson box


On Tag Type choose any letter you like. Here I add “f” for “function” (any letter will be fine)


On Appearance box, you can write the description, choose Icon etc. It is not too impor…

Install PCI Parallel card murah meriah di Linux.

Baru-baru ini, parallel port onboard di salah satu komputer klienku rusak. Lalu dibelikan Parallel card PCI made in China yang murah meriah. Card ini tidak ada merknya cuma ada tulisannya PCI60806A dan cuma terdiri dari 1 IC :)
Tapi setelah dipasang ternyata parallel card ini tidak dikenali di ubuntu, sehingga kemarin terpaksa komputernya di bawa ke rumahku untuk opname. Anehnya, output dari perintah lspci -v mengatakan bahwa card ini adalah serial port:
03:00.0 Serial controller: Device 4651:7073 (rev 10) (prog-if 02 [16550]) Subsystem: Device 4651:7073 Flags: medium devsel, IRQ 20 I/O ports at df00 [size=8] I/O ports at de00 [size=8] Kernel driver in use: serial
Dari hasil googling ternyata ini memang kasus umum pada pci parallel card murah meriah, card-card ini sebenarnya mempunyai 2 fungsi interface, serial interface dan parallel interface. I/O port pertama (df00) adalah port untuk Serial Port sedangkan port kedua (de00) adalah untuk Parallel port.
Sekarang kita coba gunakan…

Install Windows Printer Fuji Xerox DocuPrint P205 b di Ubuntu

Kemarin ada yang baik hati memberikan aku printer laser Fuji Xerox type DocPrint P205b. Masalahnya, printing system di Ubuntu (CUPS) tidak ada driver untuk printer ini. Situs Fuji Xerox pun (http://www.fujixeroxprinters.com.au/en/Downloads.aspx?product=9933) tidak menyediakan printer driver untuk linux, karena ternyata printer ini adalah GDI printer.
GDI printer biasanya merupakan printer murah meriah, karena dia tidak mempunyai 'otak' untuk memproses image (rasterize). Pemrosesan image diserahkan ke operating system. Oleh karena itu printer-printer semacam ini biasanya hanya bisa dipakai di Windows saja.
Namun, dunia linux benar-benar menakjubkan – hampir tidak ada yang mustahil di linux. Setelah searching di internet, akhirnya aku menemukan sebuah situs yang menyediakan driver untuk printer ini, namun untuk menginstallnya tidak sekedar mengcopy file drivernya (.ppd) saja. Silahkan cek http://foo2hbpl.rkkda.com/ .
Di bawah ini adalah langkah-langkah untuk menginstallnya di …

Creating custom build wine deb package

In one of my projects, I need to install custom build of wine to several computers running ubuntu.
Hence, I had to get the sources, apply the patch files and then compile the source.  Doing this for 1 computer is okay, however repeating this to several computers is a huge waste of time.

The solution is compiling once and then build a debian package (*.deb), so for the other computers we just install the debian package file. Fortunately, making a debian package is very-very easy. Here is what I did: