Translate

วันเสาร์ที่ 25 กุมภาพันธ์ พ.ศ. 2560

Create random single value in VB of visual studio.net 2012

Create random single value in VB of visual studio.net 2012

1. Open window application form
2.Design a form  with text-box and button objects

* change the label name and button near your design for understand.

3. Write the code in the button

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        'Create an variable of random function
        Dim random1 As New Random()
        Dim randomvalue As Integer

       ' Define your range require integer only
        randomvalue = random1.Next(1000)

        TextBox1.Text = randomvalue
    End Sub

4. Click start and click Random button for random number.




Enjoy !.

วันพุธที่ 25 มกราคม พ.ศ. 2560

Command netstat for Linux CentOS

Command netstat for Linux CentOS 

Check only Port from command (ftp type = 21) 
- netstat -nat | grep 80 or netstat -nat | grep 21

Check TCP 
- netstat -n 

Check routing
- netstat -rn

 Check all port 
-  netstat -an | less 

Check all TCP Port 
 - netstat -lt 

 Check all UDP Port 
- netstat -lu 

Check connection TCP Port 
- netstat -at 

Check connection UDP Port 
- netstat -au 

Count the conncection 
- netstat -nat | grep 80 | wc -l