Archivi

  • WiMax Italiano

    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…

    11 gen 2007, | Filed under Varie
  • Convertire i bytes in kb,mb,gb

    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 < [...]

    5 gen 2007, | Filed under C#
    Tags: ,
  • Analogo di explode in c#

    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); }

    5 gen 2007, | Filed under C#
  • Leggere dati da blob tramite select in firebird.

    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); ….

    4 gen 2007, | Filed under C#
Archivio per gennaio, 2007