Everyone should learn to program

Why should I learn to code?

All that you know at this moment is on the grounds that you learned it. On the off chance that you spent your whole existence without learning anything you would be a vegetable. What’s more, I imply that in all exacting sense outside of turning into a tomato. You would not have the capacity to walk, talk, or even eat. Those are things you learned.

Enlisting in a coding class is as great a path as any to invest some energy and cash on their future. It’s an incredible expansion to school applications. Yet, in the event that you’re going to make the venture, you ought to likewise think about to where you’re going and why.

Figuring out how to code is an attractive expertise certainly, however it’s simply that. It won’t improve your child a man. It’s not an alternate route to building an earthshaking application or a specific way to a fantasy work. It’s an incredible starting and a strong establishment to expand on.

Why learn history? To some degree the objective of each human is to be superior to the individuals who preceded. You have to learn history to have the capacity to see botches that have happened, how and why they happened, and what originated from it keeping in mind the end goal to keep a comparative mix-up from happening.

Regardless of what the subject is, realizing is profitable. On the off chance that you wish to talk about a point, you have to learn it first or anything you say will have no worth in the dialog.

Open .txt file in Visual Basic

In vb, you may want to load a file into your program. To do this simply use the My.Computer.FileSystem.ReadAllText

string = My.Computer.FileSystem.ReadAllText(“C:\text.txt”)

This will load the text file text.txt in my C drive into the variable string.

How to create save file in Visual Basic – Save as .txt

If you’ve worked in visual basic you’ve likely wanted to save a file in visual basic. Visual basic allows you save to nearly every ASCII based files including .txt, .xml, .csv and more. To save in the latest version of visual basic simply use My.Computer.FileSystem commands. Below is an example of me using it save the text variable string to my C drive.

My.Computer.FileSystem.WriteAllText("C:\", string, True)


Check if an email is real in VB.NET

Function ValidEmail(ByVal strCheck As String) As Boolean

Dim bCK As Boolean
Dim strDomainType As String
Dim strDomainName As String
Const sInvalidChars As String = “!#$%^&*()=+{}[]|\;:’/?>,< ” Dim i As Integer bCK = Not InStr(1, strCheck, Chr(34)) > 0 ‘Check to see if there is a double quote
If Not bCK Then GoTo ExitFunction

bCK = Not InStr(1, strCheck, “..”) > 0 ‘Check to see if there are consecutive dots
If Not bCK Then GoTo ExitFunction

‘ Check for invalid characters.
If Len(strCheck) > Len(sInvalidChars) Then
For i = 1 To Len(sInvalidChars)
If InStr(strCheck, Mid(sInvalidChars, i, 1)) > 0 Then
bCK = False
GoTo ExitFunction
End If
For i = 1 To Len(strCheck)
If InStr(sInvalidChars, Mid(strCheck, i, 1)) > 0 Then
bCK = False
GoTo ExitFunction
End If
End If

If InStr(1, strCheck, “@”) > 1 Then ‘Check for an @ symbol
bCK = Len(Left(strCheck, InStr(1, strCheck, “@”) – 1)) > 0
bCK = False
End If
If Not bCK Then GoTo ExitFunction

strCheck = Right(strCheck, Len(strCheck) – InStr(1, strCheck, “@”))
bCK = Not InStr(1, strCheck, “@”) > 0 ‘Check to see if there are too many @’s
If Not bCK Then GoTo ExitFunction

strDomainType = Right(strCheck, Len(strCheck) – InStr(1, strCheck, “.”))
bCK = Len(strDomainType) > 0 And InStr(1, strCheck, “.”) < Len(strCheck)
If Not bCK Then GoTo ExitFunction

strCheck = Left(strCheck, Len(strCheck) – Len(strDomainType) – 1)
Do Until InStr(1, strCheck, “.”) <= 1 If Len(strCheck) >= InStr(1, strCheck, “.”) Then
strCheck = Left(strCheck, Len(strCheck) – (InStr(1, strCheck, “.”) – 1))
bCK = False
GoTo ExitFunction
End If
If strCheck = “.” Or Len(strCheck) = 0 Then bCK = False

ValidEmail = bCK
End Function

Where is the error log for PHP? Webserver PHP error log in Apache2, cPanel and Linux

Working with PHP is a blast except for those errors. As you may know, PHP errors can be extremely frustrating and difficult to fix. Today, we will be going through how to access the PHP error log file on most web servers.

Depending which web server you are using you may find the error log in different locations. Below we go through where to find the error log in Apache2, web host cPanel and in most versions of Linux. Also, we will teach you how to save PHP error logs in a custom location.

Apache2 Location

Within Apache2 the errors are stored in /var/log/apache2

cPanel Location

Most cPanels store PHP logs in your root directory /log folder.


Generally, the PHP error log file can be found with this command. grep ^error_log /etc/php.ini/code> .

Couldn’t find it?

If you are unable to locate the logs, they may not be enabled within PHP. To enable logs simply find your php.ini file. This file is normally within your /etc/php.ini
That’s it. Now you should be able to sift through the error log and find that pesky bug.
Did this help you? Feel free to share this if you believe it deserves it.