tips & tricks


Calendario
maggio 2024
lmmgvsd
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

Cursor

Esempio di come usare un cursore:DECLARE @opttype TABLE (code varchar(100),name varchar(300),systemoid varchar(300),description varchar (500),virtual bit,isdigitalized bit,isexternal bit )insert into @opttype (Code,Name,SystemOid,Description,Virtual,IsDigitalized,IsExternal) values('18','internal','test','',0,0,0),('30','internal','test','',0,0,0),('80','internal','test','',0,0,0),('81','internal','test','',0,0,0),('82','internal','test','',0,0,0)DECLARE @code varchar(100),@name varchar(300),@sy 
Leggi tutto il post...
Categoria: SQLServer
giovedì, 11 giu 2020 Ore. 12.26

Serialize Object to string

Serialize Object to string public static string Serialize(object o, Type T) { //this avoids xml document declaration XmlWriterSettings settings = new XmlWriterSettings() { Indent = false, OmitXmlDeclaration = true }; var stream = new MemoryStream(); using (XmlWriter xw = XmlWriter.Create(stream, settings)) { //this avoids xml namespace declarati 
Leggi tutto il post...
Categoria: C#
martedì, 23 gen 2018 Ore. 12.07

Sql Function Return varchar

Sql Function Return varcharCREATE FUNCTION SchemaName.GetValuesCommaSeparated(   @Id int)RETURNS varchar(100) -- or whatever length you needASBEGIN   declare @values as varchar(100)declare @result as varchar(100) ='' DECLARE cursorValues CURSOR FOR       select T.ColumnName from SchemaName.TableName T  where T.ID = @Id --OPEN CURSOR. OPEN cursorValues  --FETCH THE RECORD INTO THE VARIABLES. FETCH NEXT FROM cursorValues INTO @values 
Leggi tutto il post...
Categoria: Transact SQL
mercoledì, 10 gen 2018 Ore. 10.33

BACKUP DATABASE

BACKUP AND RESTORE sintaxBACKUP DATABASE [dbname] TO  DISK = N'D:\Database\Backup\20180102_dbname.bak' WITH  COPY_ONLY, NOFORMAT, INIT,  NAME = N'dbname-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10GOdeclare @backupSetId as intselect @backupSetId = position from msdb..backupset where database_name=N'dbname' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'dbname' )if @backupSetId is null begin raiserror(N'Verify failed. Ba 
Leggi tutto il post...
Categoria: SQLServer
martedì, 09 gen 2018 Ore. 11.19

Install Util

Installare un servizio WindowsC:\Windows\Microsoft.NET\Framework64\v4.0.30319>installutil  /ServiceName="Service_Test" "C:\Program Files\Test\Services\Service.exe"installutil /u /ServiceName="Service_Test" "C:\Program Files\Test\Services\Service.exe" 
Leggi tutto il post...
Categoria: Command
martedì, 02 gen 2018 Ore. 14.45

Download file from Aspx page

   Download file from Aspx page    protected void Download(byte[] zipBytes)    {        System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;        string fileName = "tracciati.zip";        response.ContentType = "binary/octet-stream";        response.AddHeader("Content-Type", "binary/octet-stream");        response.AddHeader("Content-Dispositio 
Leggi tutto il post...
Categoria: ASP.NET
martedì, 02 gen 2018 Ore. 12.46

Html report generated by SqlServer query in Html div

View Html report generated by SqlServer query in Html divfunction callServerProfileView(IDProfile, idOpUnit) {                $.ajax({                    type: "POST",                    url: GetAppPath() + "/WebServices/Profile/ProfileServices.asmx/GetProfileFromID",                    data: "{idProfile:'" + 
Leggi tutto il post...
Categoria: Jscript
martedì, 02 gen 2018 Ore. 12.23

Integrating Helthcare Enterprise

Integrating Helthcare Enterprisethe IHE IT Infrastructure Technical Framework (ITI TF), defines specific implementations of established standards to achieve integration goals that promote appropriate sharing of medical information to support optimal patient care. 
Leggi tutto il post...
Categoria: IHE
lunedì, 07 set 2015 Ore. 14.38

PDF Preview

PDF PreviewPer vedere un pdf in pagina mi basta mettere un Iframe e salvare i byte del documento su filesystem dopodichè cambio il source dell'Iframe.<iframe runat="server" id="frameDisplayDocId"  width="500px" height="800px"></iframe>protected void Page_Load(object sender, EventArgs e)     {         string docName = Request.QueryString["docName"];         string docId = Request.Q 
Leggi tutto il post...
Categoria: ASP.NET
mercoledì, 06 nov 2013 Ore. 12.26

Web.config Authorization Authentication

Il Tag AUTHENTICATIONConfigura lo schema di autenticazione ASP.NET utilizzato per identificare gli utenti che visualizzano un'applicazione ASP.NET.<authentication mode="[Windows|Forms|Passport|None]"> <forms>...</forms> <passport/> </authentication>http://msdn.microsoft.com/it-it/library/532aee0e(v=vs.85).aspxIl Tag AUTHORIZATIONConfigura l'autorizzazione per un'applicazione Web, con il controllo dell'accesso client alle risorse URL. <aut 
Leggi tutto il post...
Categoria: ASP.NET
mercoledì, 06 nov 2013 Ore. 10.08

PKCS

PKCSThe PKCS#12 specifies a portable format for storing and transporting certificates, private keys, and miscellaneous secrets. It is the preferred format for many certificate handling operations and is supported by most browsers and recent releases of the Windows family of operating systems. It has the advantage of being able to store the certificate and corresponding key, root certificate, and any other certificates in the chain in a single file.http://sourceforge.net/projects/open 
Leggi tutto il post...
Categoria: Criptografia
giovedì, 27 giu 2013 Ore. 15.39

Verificare la firma in Java

import java.io.*;import java.security.*;import java.security.cert.*;import java.security.spec.*;import org.apache.commons.io.IOUtils;import sun.misc.BASE64Decoder;class VerSig {    public static void main(String[] args) {               try {                            String signedText = " 
Leggi tutto il post...
Categoria: Java
mercoledì, 05 giu 2013 Ore. 10.04

Proprietà Oggetto

Molto utile per vedere tutte le proprietà presenti in un oggetto            $.each(OGGETTO, function (key, element) {                alert('key: ' + key + '\n' + 'value: ' + element);            }); 
Leggi tutto il post...
Categoria: Jscript
lunedì, 20 mag 2013 Ore. 14.02

HL7

HL7 Normal 0 14 false false false IT X-NONE X-NONE  
Leggi tutto il post...
Categoria: ASP.NET
lunedì, 20 mag 2013 Ore. 11.06

Bloccare la pagina durante il caricamento

jquery.blockUI Normal 0 14 false false false IT X-NONE X-NONE  
Leggi tutto il post...
Categoria: Jscript
venerdì, 17 mag 2013 Ore. 12.34

JQuery Asp Control ID

Quando voglio trovare un controllo Asp.net lato client con Jquery posso usare la sintassi:var patientId = $('[id$=hdnFPatientId]').val(); 
Leggi tutto il post...
Categoria: Jscript
mercoledì, 15 mag 2013 Ore. 15.35

The Next Windows Phone: It’s Pretty Great

http://gizmodo.com/5813901/the-next-windows-phone-its-pretty-great 
Leggi tutto il post...
Categoria: Windows Phone
venerdì, 21 ott 2011 Ore. 16.48

Innaugurazione AtReVeRsE

Buongiorno a tutti!!!Ho deciso di cimentarmi in una nuova avventura e Sabato 22/10/2011 apro un negozio di abbigliamento a Cusano Milanino in Via Pedretti 1.Ci sarà un Buffet e tanta gente, chi vuole unirsi è il benvenuto!!!https://www.facebook.com/pages/AtReVeRsE/273440942674986?sk=wall 
Leggi tutto il post...
Categoria: Varie
martedì, 18 ott 2011 Ore. 11.27

Change User Password in AD

Recuperare gli utenti in AD e fare il change della pwd.                   DirectoryEntry de = new DirectoryEntry(DC_LDAP_PATH, utente, vecchia, AuthenticationTypes.Secure);                 // Recupero il nodo utente                 DirectorySea 
Leggi tutto il post...
Categoria: C#
giovedì, 22 set 2011 Ore. 14.55

Una sorta di group by ma più efficace

SELECT *,ROW_NUMBER() OVER (PARTITION BY idtestata ORDER BY ISNULL(Versione,0) DESC) AS MaxVersioneFROM table TWHERE datacreazione BETWEEN GETDATE()-1 and GETDATE() or CONVERT(DATE,datacreazione) = CONVERT(DATE,GETDATE() )ORDER BY idtestata,datacreazione desc 
Leggi tutto il post...
Categoria: SQLServer
venerdì, 24 giu 2011 Ore. 10.18
Archivio Posts
Anno 2020

Anno 2018

Anno 2015

Anno 2013

Anno 2011

Anno 2010

Anno 2009

Anno 2008
Statistiche
  • Views Home Page: 13.381
  • Views Posts: 56.190
  • Views Gallerie: 2.837
  • n° Posts: 117
  • n° Commenti: 1
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003