giovedì, luglio 20, 2006

standardise IE setAttribute (Part 2)

I go back to this subject because I've done some improvements to
the custom comment script that should Standardise IE 5.x setAttribute,
I create no other Object that could collide, look:


document.createElement = function(cE,interface){
//this is for DOM node not dinamically created
onload=function(){
var list=document.all;
var max=list.length;

while(--max)
{
list[max].getAttribute=interface.getAttribute;
list[max].setAttribute=interface.setAttribute;

}
//HTML node
list[0].getAttribute=interface.getAttribute;
list[0].setAttribute=interface.setAttribute;
}


return function (tagName) {
var element = cE(tagName);
element.getAttribute=interface.getAttribute;
element.setAttribute=interface.setAttribute;

return element;
}
}(document.createElement,{

getAttribute:function (attribute) {

switch(attribute){
case "class": attribute = "className";break;
case "for": attribute = "htmlFor";break;
case "style": return this.style.cssText;break;
case "type":return(this.id)?((document.getElementById)?document.getElementById(this.id):document.all[this.id]).type:this.type;break;
case "accesskey":return this.accessKey;break;
case "maxlength":return this.maxLength;break;
}
return this[attribute];
}

,setAttribute:function (attribute, value) {

switch(attribute){
case "name":return document.createElement(this.outerHTML.replace(/name=[a-zA-Z]+/," ").replace(">"," name="+value+">"));
case "class": attribute = "className";break;
case "for": attribute = "htmlFor";break;
case "type":
var me=this.parentNode;

if(!/id=/.test(this.outerHTML))
this.id=this.uniqueID;
if(me){
this.outerHTML=this.outerHTML.replace(/type=[a-zA-Z]+/," ").replace(">"," type="+value+">");




var t=me.childNodes;
var max=t.length;
for(var i=0;i<max;i++)
if(t[i].id==this.id){
t[i].getAttribute=this.getAttribute;
t[i].setAttribute=this.setAttribute;
}
}else this.type=value;

return;break;
case "accesskey":this.accessKey=value;return;break;
case "style": this.style.cssText =value;return;break;
case "maxlength":this.maxLength=value;return;break;
}

if(attribute.indexOf("on")==0){


this[attribute] = function(){eval(value)};

}
else
this[attribute] = value;
}
});


to use it just insert this line of code:

<!--[if lt IE 7]><script language="javascript" type="text/javascript" src="IEDOM.js"></script><![endif]-->

where IEDOM.js is the name of the script ..
Enjoy!


P.s. Look at http://www.devpro.it/JSL/ for a Great Library (
I would make a post for who don't want to Prototypize Object but won't use this great library!!
)

Update:
there are two known issues with this library:
first, if you use innerHTML instead of createElement you don't have the standard setAttribute,
so the solution is getting the node you are adding and extending the methods to each node it has

the second issue is the setAttribute("name") not updating dom. You was forced to return the correct node with setAttribute, so

var t=document.getElementById("x");
var n=t.setAttribute("name","usrname");
if(n)t=n;

now t is correct ;)

martedì, luglio 11, 2006

Another Pearl in the Javascript World

He Done It!


After my IE setAttribute solution (get here the complete solution along with my framework)


Andrea Giammarchi wrote a solution for the replace method, now you can use replace with a function as parameter, and is Standard ECMA compatible!


Try it or Get It!


It works on IE 5.x+, FF, NN,Opera, Safari, Konqueror ,


currently I haven't the complete compatibility list because is in a test state.


Now Javascript world is more standard!!! ;)


Example:


ECMA define that the function get the follow parameters


a)the Match of Regex passed as 1st argument


b)the N submatch (also known as parenthetical matches) with 0<N<99


c)position of the match in the original string


d)the original string


so "a12b34".replace(/[0-9][0-9]/g,function(a,b,c){return (Number(a)+1);}) must return "a13b35" in all the browser ;)

giovedì, maggio 11, 2006

addEvent

//Cannot be detached

function addEvent(obj,type,fn){
/*@cc_on obj.attachEvent('on'+type,function(){fn.apply(obj)});if(0){ @*/
obj.addEventListener( type, fn, false );
/*@cc_on } @*/
}

venerdì, maggio 05, 2006

getElementByClass

this code is now obsolete, take a look at this one to a better one, thanks.


document.getElementsByClassName = function(searchClass,node,tag)
{

if(node == null)node=document;
var ce = new Array();
if(tag==null || tag=='*')tag='*';
var els = new Array();
if (tag=='*' &&amp; document.evaluate){
var xpr=document.evaluate("//*",document, null, 0, null);
var t=true;
while (t=xpr.iterateNext()){
if(els.push)
els.push(t);
else
els[els.length]=t;
};
}
else
els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
var i;var j;
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) )
if (ce.push)
ce.push(els[i]);
else
ce[j++] = els[i];
}

return ce;

}

venerdì, aprile 21, 2006

standardizzare setAttribute on IE

setAttribute lavora in maniera strana su IE,
fà quello che deve fare, ovvero cambiare dei valori di alcune proprietà,
ma essendo che vengono modificate le proprietà di un oggetto JScript,
alcune parole come class, for hanno un nome diverso..

dopo aver letto l'articolo su delete.me.uk
ho deciso di utilizzare il metodo ben spiegato per risolvere
i problemi su class,for e style e l'associazione di eventi on...

ho usato un commento condizionale, includendo il codice sotto riportato si ottiene un setAttribute piu' standard.

/*@cc_on
Element = function () {};

Element.prototype.getAttribute = function (attribute) {
if (attribute == "class") attribute = "className";
if (attribute == "for") attribute = "htmlFor";
if (attribute == "style") return this.style.cssText;
else return this[attribute];
}

Element.prototype.setAttribute = function (attribute, value) {
if (attribute == "class") attribute = "className";
if (attribute == "for") attribute = "htmlFor";
if (attribute == "style") this.style.cssText =value;
else
if(value.indexOf("on")!=0)
this[attribute] = function(){eval(value)};
else
this[attribute] = value;
}
var __IEcreateElement = document.createElement;

document.createElement = function (tagName) {

var element = __IEcreateElement(tagName);

element.getAttribute=interface.getAttribute;
element.setAttribute=interface.setAttribute;

return element;
}
var interface = new Element;
onload=function(){
var list=document.all;
var max=list.length;

while(--max)
{
list[max].getAttribute=interface.getAttribute;
list[max].setAttribute=interface.setAttribute;

}
}
@*/
naturalmente per aggiungere un evento nell'onload dovrete poi usare una funzione del genere:

function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof oldonload != 'function') {
window.onload = func;
}
else {
window.onload = function() {
oldonload();
func();
}
}
}

venerdì, aprile 14, 2006

InnerDom

WHY INNERDOM

Some months ago I found that innerHTML is not a standard way to manipulate HTML. Actually it is a proprietary implementation followed by many browser, althought it's very close to a de-facto standard and a lot faster that DOM actions.
So I learnt what could replace innerHTML as the combinations of createElement, insertBefore or the better replaceChild, setAttribute; so I wrote the code this way...

However I felt the need to write HTML directly into a node in a single step.
So I thought and I wrote a function ResToDom that appends an object in eval-notation
down to a node. Recently I felt it wasn't enough.
What I really needed was a function that used that EVAL-Notation object and replace a node (as innerHTML does). I rewrite the whole resToDom into innerDom (i used two different names as the functions are different).

Innerdom takes an object in EVAL notation and tries to convert it into HTML.
this object has 2 special properties:

TAG "the name of the tag to create"
INNER "what tag contains"

If innerDom finds an array it concatenates the nodes into a single node, so if used to write:

document.getElementById("node").innerHTML="aaa <b>some bold text<b/>";

now you can write it as:

innerDom("node",[{TAG:'a',name:'aa'},' ',{TAG:'b',INNER:'some bold text'}]);

Isn't that sw33t?

why EvaL-Notation?

because JSON it nowadays very frequently used joint with AJAx.


Here the Code

lunedì, aprile 03, 2006

Kentaromiura CrazyCorner 0.1 alpha(Gatsu)

I've recentelly find Krazy Corner (www.mswebpeople.com/krazy.html)
and i like some things but there was other things that i don't like,
example if i' ve already a site i don't want to rewrite it all from scratch adding a lot of
extra HTML tag, so i write myself a function that write that code for me ;)

i used span instead of b tag because that seems me better,
the source is HERE :
http://freeforumzone.leonardo.it/viewmessaggi.aspx?f=19716&idd=174

there isn't a live test page avaible yet nor a zip file,sorry but just
put test.html , crazycorner.css and crazycorner.js
in the same directory and enjoy ;)


I don't use innerHTML in this library ,so i should have high compatibility..
I test successful in
Netscape 7.2,
Ie 6.0sp2,
FF1.5, (it should work on 1.0 too because NN have the same gecko)
opera 8.51

..
I'm waiting for a lot of comments!

EDIT:
as Alessandro Fulciniti told me the original idea of Krazy Corners is of Stu Nicholls.(http://www.cssplay.co.uk/boxes/krazy.html)
as soon as possible i release a live-test page

venerdì, dicembre 02, 2005

10 funzioni base Javascript ^_^;;

sono rimasto attratto da Questo post a tal punto che ho deciso di segnalarlo,
ma non ero pienamente soddisfatto del codice segnalato, cosi' ho deciso di ottimizzarlo un attimino ;)

/* Reference Article:
Dustin Diaz:
http://www.dustindiaz.com/top-ten-javascript/



Optimizations made by kentaromiura, you could implement duff faster device for more optimization if you would.
http://mykenta.blogspot.com
*/


/* addEvent: simplified event attachment */
function addEvent( obj, type, fn ) {
if (obj.addEventListener) {
obj.addEventListener( type, fn, false );
EventCache.add(obj, type, fn);
}
else if (obj.attachEvent) {
obj["e"+type+fn] = fn;
obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
obj.attachEvent( "on"+type, obj[type+fn] );
EventCache.add(obj, type, fn);
}
else {
obj["on"+type] = obj["e"+type+fn];
}
}

var EventCache = function(){
var listEvents = [];
return {
listEvents : listEvents,
add : function(node, sEventName, fHandler){
listEvents.push(arguments);
},
flush : function(){
var item;
var i= listEvents.length - 1;
//for(i = listEvents.length - 1; i >= 0; i = i - 1)
if(i!=-1)
do{
item = listEvents[i];
if(item[0].removeEventListener){
item[0].removeEventListener(item[1], item[2], item[3]);
};
if(item[1].substring(0, 2) != "on"){
item[1] = "on" + item[1];
};
if(item[0].detachEvent){
item[0].detachEvent(item[1], item[2]);
};
item[0][item[1]] = null;
}while(--i>-1);
}
};
}();
addEvent(window,'unload',EventCache.flush);

////////////// window 'load' attachment

/*
function addLoadEvent(func) {
var oldonload = window.onload;

if (typeof window.onload != 'function') {
window.onload = func;
}
else {
window.onload = function() {
oldonload();
func();
}
}
}
*/
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof oldonload != 'function') {
window.onload = func;
}
else {
window.onload = function() {
oldonload();
func();
}
}
}

/* grab Elements from the DOM by className */
function getElementsByClass(searchClass,node,tag) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");

//AAARGH ORROR i && j are defined global!!
//THIS SLOW DOWN the code and would cause weird behaviour !!(think in a Multithreading program!!)

/*for (i = 0, j = 0; i < i =" 0;" j =" 0;" return="" classelements="" toggle="" an="" element="" s="" display="" function="" obj="" var="" el="" would="" use="" switch="" for="" more="" optimization="" but="" i="" think="" is="" ininfluent="" due="" to="" the="" shorten="" dom="" trick="" already="" used="">
if ( el.display != 'none' ) {
//alert('ok');
el.display = 'none';
}
else {
el.display = '';
}
}
}

/* insert an element after a particular node */
/*function insertAfter(parent, node, referenceNode) {
parent.insertBefore(node, referenceNode.nextSibling);
}*/
function insertAfter(parent, node, referenceNode){

if(referenceNode.nextSibling)
{
parent.insertBefore(node, referenceNode.nextSibling);
}
else
{
parent.appendChild(node);
}
}
/*
I prefer the following form ;) however this function throw an error when node.parentNode don't exist (eg.when you don't pass a DOM-Node ;)

function insertAfter2(node, referenceNode){

if(referenceNode.nextSibling)
{
referenceNode.parentNode.insertBefore(node, referenceNode.nextSibling);
}
else
{
referenceNode.parentNode.appendChild(node);
}
}
*/
/* Array prototype, matches value in array: returns bool */
Array.prototype.inArray = function (value) {

var i=this.length-1;
if(i>-1)
do
{
//alert('i'+i+')'+this[i])
if (this[i] === value) {
return true;
}
}
while(--i>-1);

return false;
};

/* get, set, and delete cookies */
function getCookie( name ) {
var cook=document.cookie
var start = cook.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) && ( name != cook.substring( 0, name.length ) ) ) {
return null;
}
if ( start == -1 ) return null;
var end = cook.indexOf( ";", len );
if ( end == -1 ) end = cook.length;
return unescape( cook.substring( len, end ) );
}

function setCookie( name, value, expires, path, domain, secure ) {
var today = new Date();
today.setTime( today.getTime() );
if ( expires ) {
//expires = expires * 1000 * 60 * 60 * 24;
expires*=86400000;
}
var expires_date = new Date( today.getTime() + (expires) );
document.cookie = name+"="+escape( value ) +
( ( expires ) ? ";expires="+expires_date.toGMTString() : "" ) + //expires.toGMTString()
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

function deleteCookie( name, path, domain ) {
if ( getCookie( name ) ) document.cookie = name + "=" +
( ( path ) ? ";path=" + path : "") +
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

/* quick getElement reference
look for the comment for the code ^_^; */

mercoledì, novembre 30, 2005

modifiche alla classe che gestisce la trasformazione XSL

mi sono accorto della possibilita di effettuare delle modifiche
alla classe che avevo proposto QUI
cambiando un paio di funzioni:

:
public string newFromXslUri(string xml,string xsluri)
{
System.Xml.Xsl.XslTransform xt = new XslTransform();
xt.Load(xsluri);
XPathDocument xd = new XPathDocument(new System.IO.StringReader(xml));
System.Text.StringBuilder sb = new System.Text.StringBuilder();
xt.Transform(xd.CreateNavigator(),new System.Xml.Xsl.XsltArgumentList(),new System.IO.StringWriter(sb));
return sb.ToString();
}

public string newFromstr(string xml,string xsl)
{
System.Xml.Xsl.XslTransform xt = new XslTransform();
XPathDocument xs = new XPathDocument(new System.IO.StringReader(xsl));
xt.Load(xs.CreateNavigator());
XPathDocument xd = new XPathDocument(new System.IO.StringReader(xml));
System.Text.StringBuilder sb = new System.Text.StringBuilder();
xt.Transform(xd.CreateNavigator(),new System.Xml.Xsl.XsltArgumentList(),new System.IO.StringWriter(sb));
return sb.ToString();
}

lunedì, ottobre 31, 2005

SteamBoy di Otomo

ieri sera ho visto SteamBoy, e devo dire che sono rimasto
molto deluso, il prodotto non e' male di per se
ma secondo il mio modestissimo parere e' stato sopravvalutato.
la storia non sviluppa necessariamente le sottotrame
e a volte risulta confusionaria, senza parlare di alcuni spunti
(come la scena degli specchi) che poi non sono piu' stati ripresi
sucessivamente,
il montaggio poi sembra un opera di un chirurgo pazzo,
si perde il senso globale dell' opera e si rimane piu'
che spiazzati,
nulla da dire sui disegni che risultano molto curati


in finale sento di dare solamente un 6 a questo film poiche'
per come ne parlava la critica doveva essere qualcosa di eccezionale.

martedì, ottobre 18, 2005

Playstation 3, XBox 360, Revolution Prospettive per il futuro

Dopo aver provato la Psp posso ipotizzare cosa succederà
in questi anni a venire;
fino ad adesso infatti Nintendo ha stradominato il mercato
delle console Portatili con il suo Game Boy,
mentre Sony con la sua PlayStation domina incontrastata nel settore
Home. dopo aver letto questo articolo su PI
mi sono fermato un momento a pensare..

il fatto che la Psp sia stata craccata
rende questa console aperta (un po come il Gp32 ^_^;;) basta guardare in questo menu sulla sinistra
per rendersi conto di quante applicazioni siano già state sviluppate
(e sono attualmente in fase di sviluppo)
cio', secondo me, porterà la Psp ad essere la console piu' venduta
e porterà Sony al dominio del settore Portatile..

girando la medaglia Sony potrebbe perdere moltissimo campo nel settore Home,
perdendo punti sul rivale Xbox 360 ..
..
..

aspettando Revolution

infatti la grande N potrebbe(ed ha tutte le carte in regola,soprattutto l'esperienza) per diventare il colosso in questo campo, voci infatti sostengono che N5 sarà una "piattaforma libera" .. staremo a vedere

martedì, ottobre 11, 2005

PSP L' inizio della mia fine!

Ho comperato ieri la PSP
ho speso 249 euro con il film in UMD Van Helsing incluso,
ho avuto modo di provarla per un po e ho potuto stilare un po di punti
PRO / CONTRO quest'aggeggino infernale.

>PROs

ha una definizione splendida, si rimane stupiti veramente dalle immagini
ha un bel OS
supporta Mp3 e Mp4

il video dei kasabian dei topi
la versione 2.0 del firmware ha un browser
CONTRO:
prezzo troppo alto
nessun gioco allegato(nemmeno demo)
non c'e' una funzione ScreenShot per salvare foto dello schermo
i video debbono essere importati tramite un programmino che li rinomina..

..i 3 dead pixel :sob:

martedì, settembre 20, 2005

nuovo AJAX Sgrassa Suocero

grazie alla libreria di Antr3a LoadVars
ho implementato una piccola pagina in AJAX:
ecco la pagina 1.aspx(o la parte essenziale da mettere nell'head dopo aver incluso il LoadVars)

<script type="text/javascript">
// istanzio l' oggetto javascript
var mioLV = new LoadVars();

// dichiaro cosa fare a caricamento avvenuto
// tramite la funzione onLoad
mioLV.onLoad = function(s) // s e' una booleana di conferma caricamento dati
{
if(s) // se il caricamento e' avvenuto con successo
{
document.getElementById("div1").innerHTML=this.res;
delete this.res;

}
else // problemi durante il caricamento dati
{
alert('Problemi durante il caricamento dati');
}
}

// funzione da richiamare a pagina caricata
function startExample() {
// carico il file di testo

mioLV.base=2;

mioLV.sendAndLoad('page.aspx',mioLV,"GET");

}
function doajax(){
mioLV.base=document.getElementById("valueZ").value;
alert(mioLV.base);
mioLV.sendAndLoad('webform3.aspx',mioLV,"GET");
}

</script>

e bisogna aggiungere nella pagina le seguenti input :

<INPUT id="valueZ" type="text"><INPUT type="button" value="Button"
onclick="javascript:doajax();">


la page.aspx sarà una pagina completamente vuota, nel suo codeBehind scriviamo:

private void Page_Load(object sender, System.EventArgs e)
{ string tc="";

if(Request.Params["base"]!=null)
tc= Request.Params["base"].ToString();

Response.Clear();
Response.ContentType="text";

//Response.Write("res="+tc+" HEHEHEHE");
string op="<div style=\"border:1px solid silver\">paramentro passato= "+tc+" </div>";
Response.Write("res="+Server.UrlEncode(op)+"QS="+Request.QueryString.ToString());

}

venerdì, luglio 01, 2005

[c#]classe per trasformazioni xml/xsl


ecco una classe che restituisce un documento xml formattato secondo un foglio di stile XML

/// <summary>
/// La classe TrasformXML fornisce 4 metodi che permettono di effettuare una trasformazione XSLT
/// i metodi ritornano una stringa XML valida oppure una stringa di errore
/// i 4 metodi servono per effettuare trasformazioni da stringhe xml oppure da file
/// ritorna molto utile nel caso l'XML venga generato runtime (per esempio pescando i dati da un DB)
/// oppure quando si hanno i fogli di stile salvati in un DB , cosi' non occorre salvare un file temporaneo
/// </summary>
sealed public class TrasformXML
{
//La classe non ha costruttore poiche' non serve Istanziarla per usarla
//in maniera simile ai metodi della classe Math
public string fromXmlUri(string xmluri,string xsl)
{

try
{

XslTransform xt = new XslTransform();

System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.LoadXml(xsl);

xt.Load(doc.CreateNavigator());

XPathDocument xp = new XPathDocument(xmluri);

StringBuilder message =new StringBuilder();
xt.Transform(xp,null,new StringWriter(message),null);

return message.ToString();
}
catch(Exception er)
{
return er.ToString();
}

}

public string fromXslUri(string xml,string xsluri)
{
System.Xml.Xsl.XslTransform xt = new XslTransform();

ASCIIEncoding asc = new ASCIIEncoding();
byte[] firstString = asc.GetBytes(xml);

MemoryStream st = new MemoryStream(firstString.Length);
st.Write(firstString,0,firstString.Length);
st.Seek(0, SeekOrigin.Begin);

System.Xml.XPath.XPathDocument xp = new XPathDocument(st);
try
{

xt.Load(xsluri);
StringBuilder message =new StringBuilder();
xt.Transform(xp,null,new StringWriter(message),null);

return message.ToString();

}
catch(Exception er)
{
return er.ToString();

}
finally
{
//Libero le risorse
xp=null;
st=null;
firstString=null;
asc=null;
xt=null;
}


}
public string fromUrl(string xmluri,string xsluri)
{
try
{
XslTransform xt = new XslTransform();
xt.Load(xsluri);
XPathDocument xp = new XPathDocument(xmluri);
StringBuilder message =new StringBuilder();
xt.Transform(xp,null,new StringWriter(message),null);
return message.ToString();
}
catch(Exception er)
{
return er.ToString();

}

}

public string fromStr(string xml, string xsl)
{

System.Xml.Xsl.XslTransform xt = new XslTransform();
ASCIIEncoding asc = new ASCIIEncoding();
byte[] firstString = asc.GetBytes(xml);
MemoryStream st = new MemoryStream(firstString.Length);
st.Write(firstString,0,firstString.Length);
st.Seek(0, SeekOrigin.Begin);
System.Xml.XPath.XPathDocument xp = new XPathDocument(st);

try
{
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

doc.LoadXml(xsl);
xt.Load(doc.CreateNavigator());
StringBuilder message =new StringBuilder();
xt.Transform(xp,null,new StringWriter(message),null);
return message.ToString();
}
catch(Exception er)
{
return er.ToString();

}
finally
{
//Libero le risorse
st=null;
xp=null;
firstString=null;
asc=null;
xt=null;

}

}
}

martedì, giugno 28, 2005

[.Net]Finestre a Scomparsa

Ispirato da una giuovine fanziulla ho provato a scrivere una splash-screen
con VS2005b2 , ho visto che non c'era differenza con la versione 1.1 e che
funziona senza problemi.

Bisogna utilizzare la proprietà Opacity del Form una proprietà che va da 0.0(trasparente)a 1.0 (visibile)

settiamo a 0% la proprietà nel form

mettiamo 2 timer ,attivando il primo,e in quest' ultimo scriviamo:

[c#]

if(this.Opacity<1.0)
this.Opacity+=0.1;
else{
timer1.Enable=false;
timer2.Enable=true;
}

[vb]

if Me.Opacity<1
then
Me.Opacity+=0,1
else
timer1.Enable=false
timer2.Enable=true
end if


nel secondo scriviamo
[c#]

if(this.Opacity>0.0)
this.Opacity-=0.1;
else{
this.Close();
}

[vb]

if Me.Opacity>0,0
then
Me.Opacity-=0,1
else
Me.Close()
end if


avviamo e vedremo il nostro Form apparire Magicamente e sparire nella stessa Maniera
:ciauz:

lunedì, giugno 27, 2005

26 giugno 2005 concerto dei Gem Boy

il mio primo loro concerto dal Vivo!!
era da quando avevo 16 anni che ne volevo vedere uno e non ho mai potuto per
vari motivi!!
sono eccezionali, sia dal punto di vista tecnico, sia
dal punto di vista artistico/intrattenitoriale [la crusca attinge da me per i nuovi lemmi]

da attore quale sono posso solamente che apprezzare la semplicità
con cui si esibiscono sul palco, e
a come riescono a dirigere uno spettacolo nonostante
interventi puramente aleatori che accadono durante lo spettacolo,
un orgia di divertimento allo stato puro,
mi sono divertito come non mai e consiglio a chiunque la visione
immediata di un loro Live (io ero sotto le transenne e li ho visti da vicinissimo)
MITICI!

venerdì, giugno 24, 2005

CREARE UN DATASET CON INDICE AUTOINCREMENTANTE in C#
ed ecco il primo post Tecnico!!
una semplice funzione che aggiunge una colonna con un indice ad un dataset che ne e' privo ^_^;;


//Devo Passare un Dataset dove aggiungero' la colonna e il nome della Tabella del ds
//dove aggiungere la riga

private DataSet returnIndexDS(DataSet ds1,string nomeTabella){

// creo il dataset
DataSet ds = new DataSet();

// aggiungo la colonna
DataColumn countColumn = new DataColumn("N.",System.Type.GetType("System.Int32"));

//Creo la colonna Indice Autoincrementante
countColumn.AutoIncrement = true;
countColumn.AutoIncrementSeed = 1;
countColumn.AutoIncrementStep = 1;
countColumn.ReadOnly = true;

//aggiungo tabella e riga
ds.Tables.Add(nomeTabella);
ds.Tables[nomeTabella].Columns.Add(countColumn);

//faccio il merge con i dati originali
ds.Merge(ds1,false,MissingSchemaAction.Add);

//ritorno il nuovo dataset
return ds;

}
Kentaromiura e' arrivato!!
il primo Blog Ufficiale di Kentaromiura e' quiiii..

no, non e' un blog che parla del famoso Mangaka ma di un pseudoProgrammatore Italiano
che ha l'abitudine di postare in siti come html.it ^_^;;



e questa e' solo l'introduzione a questo contenitore di pensieri analogici/digitali
magari posterò roba tecnica, altre volte puttanate, altre volte parlero del teatro
o magari non parlero' proprio..[ho sentito gente fare un aola a codeste mie parole]

a prossimamente..

go go blog!

Ecco alcune pillole che ho pubblicato in giro per il uèb ...
[per ora sono solo su HTML.it]

Programmazione Multithreading - Concetto di semafori (flag)
C/C++ - Formattazione del testo in ambienti UNIX
C/C++ - Lavorare con i file (I/O alto e basso livello)
C - Header e funzioni della Libreria Standard ANSI
D - Panoramica sul Linguaggio
Template in PHP
Prado ovvero Php.Net
Worst Practices - Abitudini da Evitare