Archive for gennaio, 2007
Sarà libero? Mah, io sono molto dubbioso al riguardo (visto che ahime siamo in italia)
Sul punto informatico c’e un articolo abbastanza interessante (http://punto-informatico.it/p.aspx?id=1842934&r=PI), approfitto x dare la mia nell’azione di Google Bombing XD
Per un Wi-Max più equo…
Piccola funzioncina x conversione dei byte che mi sono dovuto fare per 1 progetto.
Funziona solo fino ai giga, per i terra aggiungete un paio di linee
public string convertByteInOther(string stBytes)
{
string ris="";
double bytes = Convert.ToInt32(stBytes);
if (bytes < 1048576)
ris = Convert.ToString(Math.Round(bytes / 1024, 2)) + " Kb";
else if (bytes < 1073741824)
ris = Convert.ToString(Math.Round(bytes / 1024 / 1024, 2)) + " Mb";
else if (bytes < 1099511627776)
ris = Convert.ToString(Math.Round(bytes / 1024 / 1024 / 1024, 2)) + " Gb";
return ris;
}
public WebPageInterrogater(string url, string sFilters)
{
_url = url;
string[] filters = sFilters.Split(';');
string pattern = string.Empty;
for (int i = 0; i < filters.Length; i++ )
{
pattern = "\\" + filters[i].Replace("*",string.Empty) + "$" + "|";
_filters += pattern;
}
_filters = _filters.Substring(0, _filters.Length-1);
}
Conversione da System.byte[] in string
....
FbCommand cmd = new FbCommand("select * from articoli order by nome asc", db.GetConnection());
FbDataReader dr = cmd.ExecuteReader();
if (!dr.HasRows)
return;
while (dr.Read())
{
byte[] bytes = (byte[])dr["descrizione"];
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
string descrizione = enc.GetString(bytes);
....