مشاهده دست آورد نظرسنجی: این تایپک از نظر شما مفیده یا نه ؟

رای دهنده
326. شما نمی توانید در این رای گیری رای بدهید
  • بله

    315 96.63%
  • خیر

    11 3.37%
نمایش نتایج 1 تا 40 از 275

نام تاپیک: سورس کدهای مفید و کاربردی VB.Net

Hybrid View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #1
    کاربر جدید آواتار Poria.Net
    تاریخ عضویت
    اردیبهشت 1391
    محل زندگی
    البرز - هشتگرد
    پست
    25

    نقل قول: سورس کدهای مفید و کاربردی VB.Net

    کنترل فرم با استفاده از خاصیت های "Me.Right" و "Me.bottom" بر عکس خاصیت های "Me.Left" و "Me.top"


    Sub MeRight(ByVal Number As Integer)
    Dim A = Screen.PrimaryScreen.Bounds.Width
    Me.Left = A - Me.Width - Number
    End Sub

    Sub MeBottom(ByVal Number As Integer)
    Dim A = Screen.PrimaryScreen.Bounds.Height
    Me.Top = A - Me.Height - Number
    End Sub

  2. #2
    کاربر تازه وارد آواتار en-keramat
    تاریخ عضویت
    اسفند 1390
    محل زندگی
    کرج
    پست
    80

    نقل قول: سورس کدهای مفید و کاربردی VB.Net

    تابعي براي تفريق كردن دو ماتريس

    #Region "Subtract Matrices"
    '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''
    ' Subtracts two matrices from each other, their
    ' dimensions should be compatible!
    ' Function returns the solution or errors due to
    ' dimensions incompatibility

    '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''
    Public Shared Function Subtract(ByVal Mat1(,) As Double, ByVal Mat2(,) As Double) As Double(,)
    Dim i, j As Integer
    Dim sol(,) As Double
    Dim Rows1, Cols1 As Integer
    Dim Rows2, Cols2 As Integer

    On Error GoTo Error_Handler

    Find_R_C(Mat1, Rows1, Cols1)
    Find_R_C(Mat2, Rows2, Cols2)

    If Rows1 <> Rows2 Or Cols1 <> Cols2 Then
    GoTo Error_Dimension
    End If

    ReDim sol(Rows1, Cols1)

    For i = 0 To Rows1
    For j = 0 To Cols1
    sol(i, j) = Mat1(i, j) - Mat2(i, j)
    Next j
    Next i

    Return sol

    Error_Dimension:
    Err.Raise("5007", , "Dimensions of the two matrices do not match !")

    Error_Handler:
    If Err.Number = 5007 Then
    Err.Raise("5007", , "Dimensions of the two matrices do not match !")
    Else
    Err.Raise("5022", , "One or both of the matrices are null, this operation cannot be done !!")
    End If

    End Function

    #End Region

  3. #3
    کاربر تازه وارد آواتار en-keramat
    تاریخ عضویت
    اسفند 1390
    محل زندگی
    کرج
    پست
    80

    نقل قول: سورس کدهای مفید و کاربردی VB.Net

    و اينم برا ضرب اش

    #Region "Multiply Matrices"
    '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''
    ' Multiply two matrices, their dimensions should be compatible!
    ' Function returns the solution or errors due to
    ' dimensions incompatibility

    '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''
    Public Shared Function Multiply(ByVal Mat1(,) As Double, ByVal Mat2(,) As Double) As Double(,)
    Dim l, i, j As Integer
    Dim OptiString As String
    Dim sol(,) As Double, MulAdd As Double
    Dim Rows1, Cols1 As Integer
    Dim Rows2, Cols2 As Integer

    On Error GoTo Error_Handler

    MulAdd = 0

    Find_R_C(Mat1, Rows1, Cols1)
    Find_R_C(Mat2, Rows2, Cols2)

    If Cols1 <> Rows2 Then
    GoTo Error_Dimension
    End If

    ReDim sol(Rows1, Cols2)

    For i = 0 To Rows1
    For j = 0 To Cols2
    For l = 0 To Cols1
    MulAdd = MulAdd + Mat1(i, l) * Mat2(l, j)
    Next l
    sol(i, j) = MulAdd
    MulAdd = 0
    Next j
    Next i

    Return sol

    Error_Dimension:
    Err.Raise("5009", , "Dimensions of the two matrices not suitable for multiplication !")

    Error_Handler:
    If Err.Number = 5009 Then
    Err.Raise("5009", , "Dimensions of the two matrices not suitable for multiplication !")
    Else
    Err.Raise("5022", , "One or both of the matrices are null, this operation cannot be done !!")
    End If

    End Function

    #End Region

برچسب های این تاپیک

قوانین ایجاد تاپیک در تالار

  • شما نمی توانید تاپیک جدید ایجاد کنید
  • شما نمی توانید به تاپیک ها پاسخ دهید
  • شما نمی توانید ضمیمه ارسال کنید
  • شما نمی توانید پاسخ هایتان را ویرایش کنید
  •