Oracle tip #8 [Enable apex not only for localhost]

After installing Oracle 10g on an Ubuntu 9.04 system, i found that the Apex application was enabled only for the localhost.

Some time is necessary open or close the access of apex from remote. To do this is only need to access to your oracle system by a dba user and run this sql command:

to allow remote access:

  1.  
  2.    EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
  3.  

to close remote access :

  1.  
  2.    EXEC DBMS_XDB.SETLISTENERLOCALACCESS(TRUE);
  3.  

that’s all
regards
ivan

Extend swap file on Ubuntu

Sometimes happen that you need to extend the swap space on your system, so it happens to me when i tried to install Oracle10ex on my ubuntu system.
So i found the solution on this ubuntu forum : http://ubuntuforums.org/showthread.php?t=89782

To extend the swap file to 1gb :

First, create a large empty file:

Code:
sudo dd if=/dev/zero of=/swap_file bs=1M count=1000

Replace 1000 with the size of the swap file desired, in MB. You can also put the swap_file in a different location if desired.

Next, we’ll secure the swapspace, so ordinary users cannot read the contents (potential security breach):

Code:
sudo chown root:root /swap_file
sudo chmod 600 /swap_file

Then, turn it into swap space:

Code:
sudo mkswap /swap_file

Next, turn it on:

Code:
sudo swapon /swap_file

To make it turn on at every bootup, open up /etc/fstab:

Code:
sudo gedit /etc/fstab

Add this line to the end of the file:

Code:
/swap_file       none            swap    sw              0       0

I know that this article is only a copy of a forum but only for more simple search and report.

bye

ivan

AsyncWebServiceHandler

L’immagine mostra le differenze tra una pagina Asp.Net Sincrona e Asincrona;
Syncronous Page vs Asyncronous Page
Per modificare il comportamento di un Webservice .Net in modo simile ad una pagina Asp.Net asincrona (quelle con <%@ Page Async=”true” … %> ) è sufficente modificare l’HttpHandler dell’applicazione web come segue:
Aprire il  Web.config e nel tag <httpHandlers> di <system.web> commentare l’attuale Handler come segue:
<!-- <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> -->
A questo punto aggiungere il nuovo handler la cui dll dovrà  essere presente nella vostra /bin
<add verb="*" path="*.asmx" type="AsyncWebServiceHandler.AsyncWebServiceHandler, AsyncWebServiceHandler" />
Operazione conclusa.
Sorgenti della DLL (AsyncWebServiceHandler.cs)
namespace AsyncWebServiceHandler
{yncWebServiceHandler.AsyncWebServiceHandler, AsyncWebServiceHandler" />

	using System;
	using System.Web;
	using System.Web.SessionState;
	using System.Web.Services.Protocols; 

	public class AsyncWebServiceHandler :
	    System.Web.UI.Page, IHttpAsyncHandler, IRequiresSessionState
	{
	    protected override void OnInit(EventArgs e)
	    {
		AsyncMode=true;
	        IHttpHandler handler =
	            new WebServiceHandlerFactory ().GetHandler(
	                this.Context,
	                this.Context.Request.HttpMethod,
	                this.Context.Request.FilePath,
	                this.Context.Request.PhysicalPath);
	        handler.ProcessRequest(this.Context);
	        this.Context.ApplicationInstance.CompleteRequest();
	    } 

	    public IAsyncResult BeginProcessRequest(
	        HttpContext context, AsyncCallback cb, object extraData)
	    {
	        return this.AsyncPageBeginProcessRequest(
	            context, cb, extraData);
	    } 

	    public void EndProcessRequest(IAsyncResult result)
	    {
	        this.AsyncPageEndProcessRequest(result);
	    } 

	}
}

ZK Component extractor

Hello,

today we share a little tool for extracting components name and id from a standard zul file.

schermata-component-extractor-google-chrome-1

The idea behind this tool borns after reading this small talk by Ashish Dasnurkar and after a comment on his works. I think in ZK there are many ways to access components from controller class (i.e. getFellow(), Composer, CDI…) but none of them save us from writing component variable declaration. This is why i need this tool.

There is a working demo at this link. Here are the source of the standalone zul page. I used a regular expression (<(\w*) [^>]*id=["|'](\w*)["|'][^>]*) to parse the zul file, it sounds a simply and reasonable approach to me. Another approach could be to create the components via the Execution.createComponents() and iterating over component tree, but it will be a little more complex and involve security risk, so i choose the easy way.

Hoping some guys from zkoss will accept the feature request to integrate this feature directly in zk studio.

Comments appreciated,

Thank you and see you next time

Delphi for iPhone

iphone

directly from Embarcadero a Steve Jobs comment about Delphi for iPhone at this link :
http://blogs.embarcadero.com/pawelglowacki/2010/04/01/39048/

stay tuned
ivan

MySQL Windows 32bit e 3GB

Una domanda che salta fuori spesso è “Quanta memoria puo’ usare mysql sul mio sistema ?”

Come saprete mysqld-nt.exe viene eseguito in un singolo processo con vari thread; dunque il limite d’uso della memoria è fissato dai limiti imposti dallo stesso sistema operativo per il singolo processo.

Sistemi operativi differenti, hanno limiti differenti; dipendenti anche dall’architettura della CPU;
noi per il momento ci soffermiamo sui Windows della famiglia NT1 ed in particolare ai limiti posti da un architettura a 32bit.

La risposta breve alla domanda iniziale è: MySQL puo’ utilizzare fino a ~1.8Gb di RAM.

Continue reading MySQL Windows 32bit e 3GB