Category Archives: Utils

Transact SQL useful functions to mass database change

a list of useful functions to rename or massively create tables in a Microsoft SQL sever database (Transact-SQL)

–-Create scripts for All Procs
SELECT SM.definition
FROM sys.sql_modules SM
INNER JOIN sys.Objects SO
ON SM.Object_id = SO.Object_id
WHERE SO.type = ‘p’
 
-–Create scripts for All Views
SELECT SM.definition
FROM sys.sql_modules SM
INNER JOIN sys.Objects SO
ON SM.Object_id = SO.Object_id
WHERE SO.type = ‘v’
   
-–Create scripts for All Functions
SELECT SM.definition
FROM sys.sql_modules SM
INNER JOIN sys.Objects SO
ON SM.Object_id = SO.Object_id
WHERE SO.type = ‘FN’
Facebooktwittergoogle_plusredditpinterestlinkedinmail

Read More ...

Free DLL to generate image barcodes

Hi guys!

I have developed this simple dll for the barcode printing / representation, the use is very simple :

1

 

 

this is the code of the sample form:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BarcodeFree;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
           Code128 text = new Code128();
            this.textBox2.Text = text.Encode( textBox1.Text);
            ImageBarcode barcode, barcode2, barcode3, barcode4;
            //parameters to call ImageBarcode:
            //public ImageBarcode(int width, int height, string value, bool Landscape = false, Color? color = null,Color? colorFore=null )
        
            barcode = new ImageBarcode(pictureBox1.Width, pictureBox1.Height, textBox2.Text);
            barcode2 = new ImageBarcode(pictureBox2.Width, pictureBox2.Height, textBox2.Text, false, Color.Red, Color.Yellow );
            barcode3 = new ImageBarcode(pictureBox3.Width, pictureBox3.Height, textBox2.Text, true);
            barcode4 = new ImageBarcode(pictureBox4.Width, pictureBox4.Height, textBox2.Text, false, Color.Turquoise , Color.LightGray);
//            barcode = new ImageBarcode(250, 112, textBox2.Text);
            this.pictureBox1.Image = barcode.GenerateImage();
            this.pictureBox2.Image = barcode2.GenerateImage();
            this.pictureBox3.Image = barcode3.GenerateImage();
            this.pictureBox4.Image = barcode4.GenerateImage();
//            this.pictureBox1.Refresh();
        }
    }
}

And Finally the DLL( for demo test):

/images/BarcodeFree.dll

 

Some documentation about barcodes:

http://www.keyence.com/ss/products/auto_id/barcode_lecture/basic/code128/
http://www.jtbarton.com/Barcodes/BarcodeStringBuilderExample.aspx
http://www.jtbarton.com/Barcodes/BarcodeOverview.aspx
http://www.gs1.org/docs/barcodes/GS1_General_Specifications.pdf
 

 

especially thanks to:

http://grandzebu.net/informatique/codbar-en/code128.htm

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Read More ...

How to make an ajax call inside a WordPress site

After several days, finally I found how to make ajax call from my wordpress site, I hope that it will help those who have had this problem:

first, I was created a post inside a wordpress whit this html code:

<section id="main">
    <table id="tng" class="datagrid">
    	<thead><tr><th colspan="3"> 
            Sample ping App
            </th>
        </thead>
        <tbody>
    	</tr><tr>
    		<td width="50%" align="right"><b>Host or IP:</b></td>
    		<td><input  id="ip" size="20" value="" ></td>
                <td><button type="button" onclick="PING()">Ping</button></td>
    	</tr>
        </tbody>
    </table>
    <img id="image" src="spinner.gif" alt="wait..." style="display: none;">
    <br>
    
</section>	
<section id=food>
	<h3 id="notification"></h3>
</section>

As you can see the only important thing is the onclick event for the button that calls de functionPING()

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Read More ...

Robocopy copy only rights

A usefull command to copy only rights or permissions from one source to another is:
robocopy \\server\sharedfolder f:\folder /E /Copy:S /IS /IT

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Read More ...

IBAN calculator from CCC

For Europe Users:
This form if for calculate IBAN for a multiple accounts (20) digits
and check the digit control of the account too
only paste yours CCC and the  IBAN is placed in a milisecond

if this link is usefull for you, pelase share it.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Read More ...

Categories

Subscribe to my Newsletter

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close