LAZIOMATICA – Guida allo Sviluppo Software

La nuova forma del software su misura…

 

Mobile Dev Day

In occasione dell’uscita del FlashLite Player 3.1 è stato organizzato a Roma  il seguente evento

http://mobile.actionscript.it/index.php?q=node/151

Filed under : Eventi
By admin
On 19 febbraio 2009
At 09:01
Comments : 0
 
 

MySQL Console Database Backup/Dump and Restore via console

Backup a DB via console

The backup/dump is performed using mysqldump, which takes the contents of the specified database and creates a set of “CREATE TABLE” and “INSERT INTO” SQL commands that can be used to re-create the database again.

In short, the mysqldump tool is called like this:

mysqldump –user [user] –password=[pass] [db] > [file]

You can also use the short versions of the command-line arguments. When you do, however, you’ll need to omit the space and/or the equals sign (=) between the password option and the actual password, as shown below.

By way of example, the following command would create a dump file called “my_backup.sql” from database “mydb_db”, accessing the database with user “usersql” and password request:

mysqldump -u usersql -p mydb_db > my_backup.sql
(After the command insert the password for the usersql)

There’s lots of other options available (including SQL compatibility modes) but that’s well beyond the scope of this quick post – if you need further detail, perhaps you should head over to the MySQL reference manual entry on mysqldump

Restoring / Inserting a Dump into MySQL via console:

Instead of using mysqldump, we use the actual mysql. The command-line options and arguments are basically the same, but the redirection goes the other way:

mysql –user [user] –password=[pass] [db] < [file]

To restore the dump taken above, we’d use:

mysql -u usersql -p mydb_db < my_backup.sql
(After the command insert the password for the usersql)

Filed under : mysql
By admin
On 14 febbraio 2009
At 10:52
Comments : 0
 
 

Adobe AIR: un semplice player per lo streaming live di Flash Media Server

Avevo l’esigenza di testare dei canali streaming pubblicati da un FMS ed ho implementato questo semplice client con funzionalità di debug di cui allego il codice.

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:WindowedApplication xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” creationComplete=”{init()}” width=”560″ height=”474″ borderColor=”#1A41C0″ backgroundGradientAlphas=”[1.0, 1.0]” backgroundGradientColors=”[#123BB3, #03097F]“>
<mx:Script>
<![CDATA[
import mx.messaging.channels.AMFChannel;
import mx.utils.ObjectUtil;
private var meta:Object;
public var nc : NetConnection ;
public var ns : NetStream ;
public var video: Video = new Video;

private function init () : void {

nc = new NetConnection ()
nc.objectEncoding = ObjectEncoding.AMF3 ;
nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus ) ;
nc.addEventListener( AsyncErrorEvent.ASYNC_ERROR, onAsyncError ) ;
nc.addEventListener(IOErrorEvent.IO_ERROR, onIOError ) ;
nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecError ) ;

nc.connect( "rtmp://www.serverflash.xxx/live/"); // url del server FMS
}

private function onNetStatus ( e : NetStatusEvent ) : void {
var nsClient:Object = {};
nsClient.onMetaData = ns_onMetaData;
nsClient.onCuePoint = ns_onCuePoint;
trace ( e.info.code ) ;

//-- if is connected
if ( e.info.code.indexOf("Success") > -1  ){
ns = new NetStream (nc ) ;
ns.addEventListener(NetStatusEvent.NET_STATUS, onNsStatus )

ns.client = nsClient;
ns.play("myStream"); // nome dello Stream
video = new Video();
video.attachNetStream(ns);
//panelVideo.addChild(video);

uic.addChild(video);

}
}

private function onAsyncError ( e : AsyncErrorEvent ) : void {
trace (e.text ) ;
}

private function onIOError ( e : IOErrorEvent ) : void {
trace ( e.text ) ;
}

private function onSecError ( e : SecurityErrorEvent ) : void {
trace ( e.text ) ;
}

private function onNsStatus ( e : NetStatusEvent ) : void {

trace ( "netstatus------>" + e.info.code ) ;
}

private function ns_onMetaData(item:Object):void {
trace("meta");
meta = item;
video.width = item.width;
video.height = item.height;

//panel.title = "framerate: " + item.framerate;
panel.visible = true;
trace(ObjectUtil.toString(item));
}
private function ns_onCuePoint(item:Object):void {
trace("cue");
}
]]>
</mx:Script>

<mx:Panel id=”panel” visible=”true” horizontalAlign=”center” title=”Video Stream” left=”80″ right=”80″ bottom=”58″ top=”46″>
<mx:UIComponent id=”uic”  width=”345″ height=”246″/>
<mx:ControlBar>
<mx:Button label=”Play/Pause” click=”ns.togglePause();” />
<mx:Button label=”Rewind” click=”ns.seek(0); ns.pause();”  enabled=”false”/>
</mx:ControlBar>
</mx:Panel>
<mx:Label x=”435″ y=”10″ text=”InfoDesk” color=”#DEF3F7″ fontWeight=”bold” fontSize=”18″/>
</mx:WindowedApplication>

Filed under : Actionscript 3,AIR,Flash Media Server,Flex,RIA
By admin
On 13 febbraio 2009
At 13:04
Comments : 0
 
 

Max OS X – riquadri neri intorno alle icone e sui bottoni delle applicazioni

Se il computer pronuncia quello che appare sullo schermo o se un riquadro nero segue le azioni del mouse e della tastiera indica che è attiva la funzionalità VoiceOver. VoiceOver è un’interfaccia alternativa di Mac OS X per gli utenti con invalidità visiva e per coloro che necessitano di ascoltare cosa viene visualizzato sullo schermo.

Per Disattivate/Attivare la funzionalità con shortcut utilizzare Comando+F5

www.apple.com

Filed under : MAC OSX
By admin
On
At 09:56
Comments : 0
 
 

Azzerare la cache DNS su Windows e Mac OS X Leopard

Per chi lavora spesso con la gestione di URL e DNS potrebbe essere necessario cancellare la cache dei DNS salvata dal proprio sistema operativo per riflettere degli aggiornamenti recenti.

Vediamo le procedure per i due sistemi operativi menzionati.

Svuotare la cache DNS su Windows

Aprire una finestra di DOS/Prompt dei Comandi (start->esegui inserire il comando cmd.com) e digitate il seguente comand

ipconfig /flushdns

otterrete una risposta del tipo:

1. Windows IP Configuration

2. Successfully flushed the DNS Resolver Cache.

Svuotare la cache DNS su Mac OS X Leopard

Per cancellare la cache DNS su Leopard è necessario fare affidamento all’utility dscacheutil.

dscacheutil -flushcache

In questo caso non sono necessari privilegi di amministratore dunque non è essenziale eseguire la chiamata via sudo.

Filed under : MAC OSX,Windows
By admin
On 6 febbraio 2009
At 13:34
Comments : 0