Fix for vcruntime140.dll and msvcp140.dll missing

Many people are having problems when trying to start some application they’ve just installed.

They get errors like vcruntime140.dll and msvcp140.dll missing.

Fix for vcruntime140.dll and msvcp140.dll missing

There’s an easy fix for that. You simply have to download and install the Microsoft Visual C++ Redistributable files.

There’s no need to restart your computer. Just install the exe file from Microsoft and then try to start the application you had problems with again.

The files can be downloaded right here.

They’re safe to use, you download them from the official Microsoft website.

How to find broken links on your website

Websites change stuff all the time and if you’re having a lot of outgoing links to different sites it might be hard to have control over all of them.

Find those broken links and fix them!

There’s several free services that can search through your website and find those broken links.

One that I like is https://www.brokenlinkcheck.com, it does exactly what it should do and there’s no requirement for a membership. Only a captcha that you need to enter to crawl your website for broken links.

How to randomize an array in VB.net

Do you want to randomize the items in an array with VB.net? Add these 2 functions below to your code to get it working. The reason there’s 2 functions you must add is because the first function is using the second function to make it all work.

To use it, you just type: Shuffle(YourArray, 5)

The number is just how many times it’s going to shuffle the array, you can use whatever you want here.

Here is the code for the 2 functions:

Public Function Shuffle(ByRef arrayToBeShuffled As Array, ByVal numberOfTimesToShuffle As Integer)
        Dim rndPosition As New Random(DateTime.Now.Millisecond)
        For i As Integer = 1 To numberOfTimesToShuffle
            For i2 As Integer = 1 To arrayToBeShuffled.Length
                Swap(arrayToBeShuffled(rndPosition.Next(0, arrayToBeShuffled.Length)), arrayToBeShuffled(rndPosition.Next(0, arrayToBeShuffled.Length)))
            Next i2
        Next i
        Return ("")
End Function

Public Function Swap(ByRef arg1 As Object, ByRef arg2 As Object)
        Dim strTemp As String
        strTemp = arg1
        arg1 = arg2
        arg2 = strTemp
        Return ("")
End Function

Remove duplicates from array in VB.net

Remove duplicates from array in VB.net

Here’s a function that will remove duplicate items in a array. The code is for VB.net.

The code:

    Function RemoveDuplicates(ByVal initialArray As String())
        Dim i As Integer
        Dim j As Integer
        Dim newArray(0) As String

        For i = 0 To UBound(initialArray)
            For j = 0 To UBound(initialArray)
                If Not initialArray(i) = "" Then
                    If Not j = i Then
                        If initialArray(i) = initialArray(j) Then
                            initialArray(j) = ""
                        End If
                    End If
                End If
            Next
        Next

        j = 0
        For i = 0 To UBound(initialArray)
            If Not initialArray(i) = "" Then
                ReDim Preserve newArray(j)
                newArray(j) = initialArray(i)
                j += 1
            End If
        Next

        Return newArray

    End Function