Sunday, March 15, 2009

Eczema Vs. Lupus Rash

How to access the system clipboard in Java Streaming

Per accedere alla clipboard è sufficiente invocare il metodo getSystemClipboard() della classe java.awt.Toolkit che restituisce l'istanza singleton della Clipboad del sistema:
 Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); 
Per recuperarne il contenuto si dovrà poi richiamare il metodo getContents di java.awt.datatransfer.Clipboard che restituisce un oggetto di tipo java.awt.datatransfer.Transferable .
Come argomento del metodo si può passare tranquillamente null in quanto si tratta di un argomento che attualmente non viene utilizzato.
 Transferable contents = clipboard.getContents(null); 
Una volta ottenuto questo riferimento basterà controllare che sia presente del contenuto testuale, tramite la chiamata contents.isDataFlavorSupported(DataFlavor.stringFlavor) , e quindi recuperarne il valore mediante il metodo getTransferData :
 if(contents != null && contents.isDataFlavorSupported(DataFlavor.stringFlavor)) 
  String str = (String) contents.getTransferData (DataFlavor.stringFlavor)
The method could, however, raise the following exceptions, which should be properly managed:
java.io.IOException
java.awt.datatransfer.UnsupportedFlavorException

This long around to retrieve the contents of the clipboard is due to the fact that the clipboard content can reside other than plain text. In addition, different operating systems may handle different types of content, it is necessary to take all necessary precautions!

code soon to recover the text from the clipboard, however, could be the following:
 String str; 
try {
  str = (String)Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null).getTransferData(DataFlavor.stringFlavor)
}catch(Exception e){
  str = "";
}
Attenzione perché nel breve codice riportato non stiamo difatti gestendo adeguatamente le eccezioni ma semplicemente settando la nostra variabile String str con una stringa vuota se qualcosa va male (incluso l'eventuale NullPointerException se il content della Clipboard è null): tutto ciò non è proprio il massimo in termini di gestione delle eccezioni ma è certamente un codice faster and more powerful than any version with similar if and controls.

The advice is - as always - take a look at the Java API and in particular:
http://java.sun.com/.../api/java/awt/Toolkit.html # getSystemClipboard ()
http://java.sun.com/.../api/java/awt/datatransfer/Clipboard.html # getContents (...)
http://java.sun.com/ ... / api / java / awt / datatransfer / Transferable.html # getTransferData (..)

The argument is also closely related to drag and drop for which there is a tutorial of the Sun in this Address:
http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html

Friday, February 20, 2009

Diagram Of How Digital Cameras Work

without limits? No problem!

No more queues or eMule download giga nteschi torrent : the future is streaming, and the streaming is already there! The fashion now is
AnimeDB (with clones if it was): you register on the forum, search for your favorite movie or show, click on the link and you're ready to watch the movie I had chosen, without any problems. .. or almost! Indeed
of problems in recent times, if they are accumulating and "posting" while many solutions, most often, tend to remain hidden or little in evidence. Someone - No less - trying to make them less accessible (hiding the thread discussions on non-public) for fear that later come to be "discovered" and made it ineffective! 'O_O'
As if all those who work for MegaVideo , or the like, are so stupid that they do not know the solutions are moving to the network or are not able, willing, to create their own account and a peek into all those notorious thread "hidden"! Mah!
Anyway, back to the issue the subject of the post: "The Outer Limits" .
MegaVideo introduced by a little 'a time limit tied to the IP address of who is viewing the movie: 72 minutes is the maximum time beyond which an annoying message tells us of having to wait almost an hour before continuing with playback. Of course, if you are in your home (or rather, you have access to the router where you are connected) just change IP addresses (log off and log into your ADSL line, unless you have a static IP and have no FastWeb) and you're done! None other than there are programs to do it automatically or, alternatively, you can use proxy servers that mask your IP going around - unless of possible "connection problem s " on YouTube - the problem.
Finally, avoiding comment on providing solutions to diventare "magicamente" utenti premium , rimane una soluzione altresì interessante e vantaggiosa: quella di ottenere l'URL del file video originale! C'è chi segue questa strada per scaricarsi interamente il filmato, ma è utilissima anche per riprodurlo in streamining e, oltre al superamento del limite dei 72 minuti, c'è l'ulteriore vantaggio di poter visionare il filmato al massimo della risoluzione possibile (ben oltre quella ridotta di MegaVideo!).
Il trucco sta nel fatto che ogni filmato visionabile in MegaVideo è linkato a un suo corrispondente originale in MegaUpload . Per ottenere questo link bisogna essere utenti premium oppure affidarsi a generatori di link per MegaUpload, a partire da URL per MegaVideo. E' possibile rintracciarne più di uno, di questi generatori, scrivendo "MegaVideo to MegaUpload link generator" nel motore di ricerca. Alcuni di questi sono:
  • http://daiphyer.com/megavideo.com/download/link/generator
    - richiede una registrazione, ma la mail non deve necessariamente essere valida!
    - attenzione al popup che cercherà di aprirsi e che vi chiederà di salvare il file "alert.exe" : è un troyan, ma basta ignorarlo e non crea nessun problema...
  • http://songvn.com/media/convert_megavideo.php
  • - you may see a banner ad that prevents you from copying the MegaUpload link before they click on one of the sponsors if you do not want to please him, try to be quicker than him, or carbonless "eye" to the URL can be seen below!
Once you have the MegaUpload link, open in a new tab, enter control characters, click "download file" and the page that follows, please copy the address of the video files (. avi) retrieving it from the button "download standard" ( right button -> copy address ), active only after 45 seconds Required per noi poveri utenti non-premium!
A questo punto potete - oltre a scaricarvi eventualmente l'intero file (!) - visualizzarlo in streaming in due modi:
  1. mediante l'utilizzo di servizi come quello offerto da DivX all'indirizzo http://labs.divx.com/WebPlayerCodeGenerator : basta inserire l'URL del file nella form, cliccare sul pulsante "generate" e successivamente su "preview" (è necessario comunque aver installato i codec DivX)
  2. aprendo l'URL con VLC Media Player o Real Player (o qualunque altro buon player che supporti lo streaming) e visualizzandolo, in tal modo, alla massima risoluzione possibile!
Adesso sì che non dormirete davvero per vedervi quelle 4/5 puntate a notte del vostro telefilm preferito!
Io torno a Prison Break, che ad Aprile riprende e sono ancora alla terza serie! :D

Tuesday, December 16, 2008

Silver Citiy Sinema Ottawa

How to change the DNS of the Vodafone Internet Key How to get around the blackout

Modificare gli indirizzi IP dei server DNS della Int ernet Keys di Vodafone è un'operazione semplicissima! Peccato che tra le centinaia di pagine che stanno ai primi posti tra i risultati di Google, non ne abbia trovato una, quando serviva, che rispondesse in modo completo e funzionale. Altro che pulsante "mi sento fortunato"... O_O
Il problema è che, pur modificando the DNS in the properties of the network connection VMCLite (TCP/IPv4), the settings are reset to the default (automatic) to the next use of the stylus! From this point on, I'm not even tell you what I've read on the forums ... and perhaps you will come across it you too, because in the end you get here!
To resolve this problem simply:
- launch "Vodafone Mobile Connect Lite"
- go menu and select Settings APN
- select Settings manuals
APN - enter in the APN field address web.omnitel.it
- leave fields blank password and user ID
- place respectively in the primary and secondary DNS entries DNS1 and DNS2

And that's it! Finally, you can start your favorite program or access the poker sites before AAMS inhibited because without a license!
When I get a little 'time to better explain what it is .. but for now happy with this! ;)