Archive for IT

faac 1.28 x64 build for Windows

After some searching I’ve come to a conclusion that no x64 (AKA 64 bit) builds exist for faac audio encoder which I prefer for my HDV video transcoding, among all other useful things it can do as well, so I decided to compile faac for x64 Windows myself. Visual Studio 2008 (thank you MSDNAA!) did the thing perfectly.

The source code for this build was taken from audiocoding.com, and the latest version for faac at the moment of writing is 1.28. I’ve made two modifications:

  1. added HAVE_INT64_T and HAVE_U_INT64_T declarations to input.h
  2. added build name and arch type to FAAC tagline

So here’s the x64 build of faac 1.28 for your convenience: FAAC 1.28 x64 build

I’d like to note, however, that this build works only on x64 architecture Windows as the code uses 64-bit integers therefore this build won’t work on x86 (aka 32-bit Windows).

Comments (1)

TRENDnet TEW-424UB driver for Windows 7 (and Vista)

I thought that maybe this information will be useful for other people using TRENDnet TEW-424UB wireless USB adapter or any other SiS 163u device.

Well, thing is that TRENDnet states that this device (versions below 3.x) is not compatible with anything above Windows XP. What about Vista or the new one – Windows 7? Buy a new WLAN adapter? No, that’s definitely not the case.

Thing is that this device uses SiS 163u chipset, and although TRENDnet says otherwise, SiS has a driver for Vista (both 32 and 64 bit) and it works well with Windows 7 as well. So, if you need it – go and get it here: http://www.sis.com/download/ then accept the agreement, in the next screen select Vista Basic/Premium (even for Windows 7) from the first selection box, then Network Driver from the second, and SiS163U WLAN controller from the third. The next screen after that is self-explanatory. Get the driver and you’re good to go.

I hope this helps :)

Comments (33)

60 Hz for DirectX applications in Windows Vista on CRT using ATI or nVidia card? Solution available

I have finally managed to convince myself to upgrade my Windows XP machine to Windows Vista.

Aero skin (it’s not a feature, as MS call it) is an eye candy but it’s use is only that, nothing else. An upgrade to that ugly blue-green default theme in Windows XP (I always switch to Classic as soon as I install a new system). But enough of that.

I tried to run my favourite Neverwinter Nights 2 an guess what – (a little surprise) eye-killing 60 Hz resolution on my HP P920 19-inch CRT. Driver upgrades obviously did not help. It reminded me of the same story when Windows 2000 and XP were released (the same 60 Hz problem for CRT’s) and I definitely wanted my 1280×1024@85Hz back.

After googling for a little while I stumbled upon Riva Tuner. An excellent utility for video card tuning. I have ATI Radeon X1650XT (after many years as a proud nVidia owner – geForce4 Titanium series rule) and I used Riva Tuner to force 85 Hz refresh rate for my CRT. As a result I have a nice 1280×1024@85Hz resolution on all my favourite Direct3D applications on Windows Vista. Many thanks to the people who made this piece of software available.

Links:

 

Comments (1)

Publishing PL/SQL procedures and functions using JDeveloper and Oracle Application Server 10g R3. Certain problems and workarounds

Oracle JDeveloper can be used to publish PL/SQL procedures and functions as web services and that is a very useful feature. Originally this functionality was available in Oracle JPublisher that was later incorporated into JDeveloper.

Everything seems to be nice when one uses this functionality to wrap stored procedures that return simple types (NUMBER, VARCHAR2, etc.) but as soon as more complex stored procedures are being tried to be published certain limitations occur.

One of such limitations that I find very annoying – inability to publish stored procedures that output REF CURSOR. That, according to Oracle, is a limitation of JDBC (binding problems???). A workaround to this problem could be rewriting that stored procedure as a function. Therefore, if you want a rowset as a result, you must use PL/SQL function that return a REF CURSOR.

Well, OK, if I really need a rowset, I could agree to this workaround IF everything else worked smoothly. For instance, you have a database with AL32UTF8 charset. Probably you’ll want UTF-8 encoding in your application as well. That wouldn’t be a problem if your REF CURSOR contains characters that are available in ISO 8859-1 AKA Latin-1 BUT you’ll have a problem if not.

You won’t notice that someting is not right until you deploy your web service and try to invoke it. Then you’ll probably see an error like this: “Internal Server Error (Caught exception while handling request: java.rmi.RemoteException: java.sql.SQLException: Invalid UTF8 encoding.)“.

If you have this problem it doesn’t matter whether you’re using a standalone or application server version of OC4J (at the moment of writing current version is 10.1.3.2). The problem lies in the default encoding that is ISO 8859-1 (historical legacy???). Notice this when deploying the generated Java classes from JDeveloper to your Oracle Application Server – file encoding always defaults to ISO 8859-1. Don’t forget to change that according to your situation.

Anyway, there is only one solution (known to me) to this problem. If you’re using a standalone OC4J instance for debugging in JDeveloper then go to your project properties, J2EE Application settings, and in the configuration for the Embedded OC4J Command Line options string, after ${oracle.jms.lock.flag} add this: -Dfile.encoding=utf-8 . This will solve your UTF-8 problem and web service will start working properly. Just don’t forget to terminate the currently running OC4J instance for the new setting to take effect.

As for Oracle Application server, the same Java flag should be applied to the Server section of the OC4J instance you intend to use for your web services. In your Application Server control, select the OC4J instance, click on Administration, select Server properties, add a new option line to Start-parameters: Java Options and insert -Dfile.encoding=utf-8 , click Apply and restart this OC4J instance. I hope you’re smart enough not to use the default home OC4J instance for your applications and have created a new OC4J instance for your custom development purposes – this will save lots of time for you, trust me.

 

Comments

PHP5 with Oracle client on FreeBSD tutorial

Updated 2007-01-28. I have updated this tutorial to simplify the process and make it more clear. 

This post is intented to help those trying to install PHP with Oracle support on FreeBSD. I’ll just note that this setup was tested and implemented in FreeBSD 6.2-STABLE. I also assume that your ports location is /usr/ports.

1. Install necessary FreeBSD ports

  1. Oracle instant client: /usr/ports/databases/linux-oracle-instantclient-basic/
    You’ll need to download a Linux version of instant client from http://www.oracle.com/technology/tech/oci/instantclient/index.html and put it in /usr/ports/distfiles/oracle. The exact version will depend on the freshness of your port revision. At the moment of writing it is “instantclient-basic-linux32-10.2.0.2-20060331.zip”.
  2. Oracle instant client SDK: /usr/ports/databases/linux-oracle-instantclient-sdk/
    Another file for download from Oracle (location and destination are the same like in step 1). File name at the moment of writing is “instantclient-sdk-linux32-10.2.0.2-20060331.zip”.
  3. Oracle8-client: /usr/ports/databases/oracle8-client/
    Unofficial port of Linux version Oracle client. After doing “make install” go to /usr/local/oracle8-client/freebsd. Execute redefine-syms.sh, then – make, make patch and make install. If make fails with redefinition of gethostbyname_r function error, open oci8stub.c for editing and delete the declaration of this function in this file. Now it should compile correctly. After doing make install, symlink /lib/liboci8stub.a to /usr/local/oracle8-client/lib.

2. Environment setup

  1. (optional) Set linker options. If you’re using bash, type: export LDFLAGS=”-lcompat -lpthread”
  2. Set ORACLE_HOME location. If you’re using bash, type: export ORACLE_HOME=”/usr/local/oracle8-client”

3. Install PHP5

  1. Install PHP5 base from /usr/ports/lang/php5 (make && make install)
  2. Install PHP5 extensions from /opt/ports/lang/php5-extensions (make – for typical ncurses menu – simple but very convenient) NOTE: you won’t find OCI8 or other database extensions here – they are located in the other location
  3. Install PHP5-OCI8 extension from /usr/ports/databases/php5-oci8 (you’ll find all other available PHP5 database extensions in /usr/ports/databases)

4. Tips

  1. It is mandatory that ORACLE_HOME environment variable is set to /usr/local/oracle8-client during startup of Apache (or any other web server of your choice).
  2. If you want to use tnsnames.ora then put it into /usr/local/oracle8-client/network/admin. Adjust necessary settings in sqlnet.ora as well.
  3. In some cases setting TNS_ADMIN environment variable to /usr/local/oracle8-client/network/admin is necessary.

Feel free to comment if you encounter any problems with this tutorial.

Comments (48)

IE 7 beta 2 įspūdžiai

Šiandien aptikau, kad Microsoft išleido viešam įvertinimui savo Internet Explorerio 7 versiją.

IE gerus metus iš esmės nenaudojau, kadangi perėjau ant Firefox (FF), todėl pasidarė smalsu kas gi naujo. Surizikavau ir įsidiegiau.

Atsisiunčiau instaliacinį failą (11.8 MB), o tolimesnė procedūra paprasta ir neskausminga (restart vis dėlto reikėjo). Vertėtų pastebėti, kad piratinių Windows turėtojams IE7 įsidiegti greičiausiai nepavyks, kadangi instaliacijos metu savanoriškai-privalomai patikrinamas Jūsų turimų Windows legalumas.

Po restarto viskas pasileido be problemų. Kas iš karto nustebino – tai greitis. Puslapiai atvaizduojami tikrai labai greitai (greičiau nei IE6 ar FF). Taip pat malonu matyti tabs’us ir RSS feed reader’į. Dar labai malonus akiai šriftų suliejimas (anti-aliasing). Pasijutau kaip su KDE Konqueror’u :D

Šiandien bandysiu išgyventi be FF, o toliau – bus matyt :)

Comments (3)

MySQL 5 pamokėlė Nr.1: VIEW’ai

Penktoje MySQL versijoje atsirado labai naudingas ir seniai lauktas dalykas kaip VIEW’ai. Tikslaus žodžio VIEW vertimo DB kontekste čia nepateiksiu, nes man jie idiotiškai skamba :) Man jie yra kažkas panašaus į virtualias lenteles, veikiančias SELECT sakinio pagrindu.
Šioje pamokėlėje parodysiu kas tie VIEW’ai ir kaip juos sukurti.

Read the rest of this entry »

Comments (2)

Apache 2.2.0, PHP 5.1.2 ir MySQL 5.0.18

Praėjusį savaitgalį atsirado laiko atnaujinti prižiūrimo web serverio esminį softą – httpd, php ir mysql. Tiek Apache, tiek MySQL sudėjau iš port’ų (FreeBSD 4.11-STABLE), o štai PHP, kaip ir esu pratęs, perkompiliavau rankomis.
Sudėta – Apache 2.2 + mod_ssl, MySQL 5.0.18, PHP 5.1.2 + Zend Optimizer 2.6 (tik ji veikia su PHP 5.1). Rezultatas malonus vartotojui ir serveriui. Puslapiai vartosi labai greitai, serverio apkrovimai sumažėję.

Neaišku kas būtų, jeigu naudojamo CMS’o duomenų logikos valdymą permesčiau į stored procedūras.

Comments (1)