Recent public codes are listed below. You can filter them by the following programming languages:
- view
- All
- Ada
- Assembler
- Assembler
- AWK (gawk)
- AWK (mawk)
- Bash
- bc
- Brainf**k
- C
- C#
- C++
- C++0x
- C99 strict
- CLIPS
- Clojure
- COBOL
- COBOL 85
- Common Lisp (clisp)
- D (dmd)
- Erlang
- F#
- Factor
- Falcon
- Forth
- Fortran
- Go
- Groovy
- Haskell
- Icon
- Intercal
- Java
- JavaScript (rhino)
- JavaScript (spidermonkey)
- Lua
- Nemerle
- Nice
- Nimrod
- Objective-C
- Ocaml
- Oz
- Pascal (fpc)
- Pascal (gpc)
- Perl
- Perl 6
- PHP
- Pike
- Prolog (gnu)
- Prolog (swi)
- Python
- Python 3
- R
- Ruby
- Scala
- Scheme (guile)
- Smalltalk
- SQL
- Tcl
- Text
- Unlambda
- VB.NET
- Whitespace
-
1 2 3 4 5 6 7 8 9
Imports System.Data.SqlClient Module Module1 Sub Main( ) Dim constr As String = " server = < computer name >; database = bank; uid = sa; pwd = thanks" Dim cmdstr As String = ______________________ Dim con As New SqlConnection ( constr ) Dim com As New SqlCommand ( cmdstr, con ) con.Open( ) Dim r As SqlDataReader = com.ExecuteReader
...
-
1 2 3 4
Sub ControlName_EventName ( ByVal sender As Object, ByVal e As System.EventArgs ) End Sub
-
1 2 3 4
Sub ControlName_EventName ( ByVal sender As Object, ByVal e As System.EventArgs ) Handles MyBase.EventName End Sub
-
1 2 3
Sub ControlName_EventName ( ByVal e As System.EventArgs ) Handles MyBase.EventName End Sub
-
1 2 3 4 5 6 7
Imports System.Drawing.Drawing2D Sub Form1_Paint ( s As Object, e As PaintEventArgs ) Handles MyBase.Paint Dim g As Graphics = e.Graphics Dim myimg As Image = Image.FromFile ( "C:\fun.jpg" ) g.DrawImage ( myimg, 50, 50 ) End Sub
-
1 2 3
Sub ControlName_EventName (ByVal sender As Object ) Handles MyBase.EventName End Sub
-
1 2 3 4 5 6
Imports System.Drawing.Drawing2D Sub Form1_Paint ( s As Object, e As PaintEventArgs ) Handles MyBase.Paint Dim g As Graphics = e.Graphics Dim myimg As Image = LoadImage ( "C:\fun.jpg" ) g.DrawImage ( myimg, 50, 50 ) End Sub
-
1 2 3 4 5 6
Imports System.Drawing.Drawing2D Sub Form1_Paint ( s As Object, e As PaintEventArgs ) Handles MyBase.Paint Dim g As Graphics = e.Graphics Dim myimg As Image = FromFile ( "C:\fun.jpg" ) g.DrawImage ( myimg, 50, 50 ) End Sub
-
1 2 3 4 5 6 7 8
Imports System.Drawing.Drawing2D Sub Form1_Paint ( s As Object, e As PaintEventArgs ) Handles MyBase.Paint Dim g As Graphics = e.Graphics Dim myfont As New Font ( "Times New Roman", 60 ) Dim mybrush As New SolidBrush ( Color.Green ) g.DrawString ( "Hello", myfont, mybrush, 50, 50 ) End Sub
-
1 2 3 4 5 6
Imports System.Drawing.Drawing2D Sub Form1_Paint ( s As Object, e As PaintEventArgs ) Handles MyBase.Paint Dim g As Graphics = e.Graphics Dim myimg As Image = FromFile.Image ( "C:\fun.jpg" ) g.DrawImage ( myimg, 50, 50 ) End Sub
-
1 2 3 4 5 6 7
Imports System.Drawing.Drawing2D Sub Form1_Paint ( s As Object, e As PaintEventArgs ) Handles MyBase.Paint Dim g As Graphics = e.Graphics 'Add code here g.DrawImage ( myimg, 50, 50 ) End Sub
-
1 2 3 4 5 6 7 8 9
Module Module1 Sub Main ( ) Dim index As Integer Dim a ( 5 ) As Integer Try a ( 6 ) = 20 Catch e As IndexOutOfRangeException Console.Write ( "Index out of bounds" & " " ) Catch e As FormatException
...
-
1 2 3 4 5 6 7 8 9
Module Module1 Sub Main( ) Dim x As Integer = 0 Try Dim y As Integer = 100 / x Catch e As ArithmeticException Console.WriteLine ( "ArithmeticException Handler: {0}", e.ToString( ) ) Catch e As Exception Console.WriteLine ( "Generic Exception Handler: {0}", e.ToString( ) )
...
-
1 2 3 4 5 6 7 8 9
Module Module1 Class point Dim x As Integer Dim y As Integer End Class Sub Main( ) Dim p1, p2 As point p1 = New point p2 = p1
...
-
1 2 3 4 5 6 7 8
Imports System.Drawing.Drawing2D Sub Form1_Paint ( s As Object, e As PaintEventArgs ) Handles MyBase.Paint Dim g As Graphics = e.Graphics Dim myfont As New Font ( "Times New Roman", 60 ) Dim mybrush As New SolidBrush ( Color.Green ) g.DrawString ( "Hello", myfont, mybrush, 50, 50 ) End Sub
-
1 2 3 4 5 6 7 8 9
Module Module1 Sub Main ( ) Dim index As Integer Dim a ( 5 ) As Integer Try a ( 6 ) = 20 Catch e As IndexOutOfRangeException Console.Write ( "Index out of bounds" & " " ) Catch e As FormatException
...
-
1 2 3 4 5 6 7
Imports Forms Module Module1 Sub Main( ) Dim f As New Form1 Run ( f ) End Sub End Module
-
1 2 3 4 5 6 7
Imports Forms Module Module1 Sub Main( ) Dim f As New Form1 Run ( f ) End Sub End Module
-
1 2 3
Module Module1 Application.Run ( form ) End Module
-
1 2 3 4 5 6 7 8 9
Class Class1 Public Value As Integer = 0 End Class Module Module1 Sub Main ( ) Dim val1 As Integer = 0 Dim val2 As Integer = val1 val2 = 150
...
-
1 2 3 4 5 6 7
Imports System.Windows.Forms Module Module1 Sub Main( ) Dim f As New Form1 Application.Run ( f ) End Sub End Module
-
1 2 3 4 5 6 7 8 9
Namespace n1 Namespace n2 Namespace n2 Class example Sub fun() Console.WriteLine ( "Hello" ) End Sub Sub fun( ByVal i As Integer )
...
-
1 2 3 4 5 6 7 8 9
Sub Main( ) Dim obj As Window obj = New Window obj.create( ) obj = New MyWindow obj.create( ) End Sub Class Window Public Sub create( )
...
-
1 2 3 4 5 6 7 8 9
Sub Main( ) Dim obj As Window obj = New Window obj.create( ) obj = New MyWindow obj.create( ) End Sub Class Window Public Overridable Sub create( )
...
-
1 2 3 4 5 6 7 8 9
Imports System.Collections Module Module1 Sub Main() Dim arr As New ArrayList arr.Add ( "Ram" ) arr.Add ( "Shyam" ) arr.Add ( "Monu" ) arr.Add ( "Sonu" ) Dim q As New Queue
...
-
1 2 3 4 5 6 7 8 9
Public Sub New ( ) MyBase.New ( ) InitializeComponent ( ) Dim ToolBar1 As New ToolBar Dim toolBarButton1 As New ToolBarButton Dim toolBarButton2 As New ToolBarButton ToolBar1.Add ( toolBarButton1 ) ToolBar1.Add ( toolBarButton2 ) End Sub
-
1 2 3 4 5 6 7 8
Sub Main( ) Dim obj As Window obj = New Window obj.create( ) obj = New MyWindow obj.create( ) End Sub
-
1 2 3 4 5 6 7
Public Sub New ( ) MyBase.New ( ) InitializeComponent ( ) MainMenu1.Add ( "Open" ) MainMenu1.Add ( "Save" ) MainMenu1.Add ( "Exit" ) End Sub
-
1 2 3 4 5 6 7 8 9
Public Sub New ( ) MyBase.New ( ) InitializeComponent ( ) Dim ToolBar1 As New ToolBar Dim toolBarButton1 As New ToolBarButton Dim toolBarButton2 As New ToolBarButton ToolBar1.Buttons ( toolBarButton1 ) ToolBar1.Buttons ( toolBarButton2 ) End Sub
-
1 2 3 4 5 6 7
Public Sub New ( ) MyBase.New ( ) InitializeComponent ( ) MainMenu1.MenuItems ( "Open" ) MainMenu1.MenuItems ( "Save" ) MainMenu1.MenuItems( "Exit" ) End Sub


