MySQL Full Outer Join Example
17
July
Mysql does not support full outer joins. The following link shoes how it can be done.
Mysql does not support full outer joins. The following link shoes how it can be done.
This error is a bit annoying during the javac command:
Error occurred during initialization of VM
Could not reserve enough space for object heap
heap and stack sizes are often limited due to the virtualization
javac -J-Xms16m -J-Xmx48m MyClass.java
java -XX:PermSize=16M -Xms8m -Xmx48m
This can be set globally using an alias so that it doesn’t have to be specified it each time
To view the alias for java use $# which java
PHP function to make the first letter of each word capital and the following letters lower case. If the first character is not a letter it capitalizes the second character.
function isValidEmail($email)
{
$myReg="/^[A-Za-z0-9_-]+@[A-Za-z0-9_-]+\.([A-Za-z0-9_-][A-Za-z0-9_]+)$/";
if(preg_match($myReg, $email))
return true;
else
return false;
}
Here is a nice short function to execute an HTTP POST using cURL.
PHP HTTP POST Request With cURL
There are no comments, but it is self explanatory.
This snippet of code demonstrates how to execute an HTTP POST request without using curl.
This will not work in versions < PHP5 .
Public Function HTTPPost(ByVal myURL As String, ByVal myPost As String)
Dim temp As String
temp = “”
TryDim myURI As New Uri(myURL)
Dim request As Net.WebRequest = Net.WebRequest.Create(myURI)
Dim encoding As New System.Text.ASCIIEncoding()
Dim myByte As Byte() = encoding.GetBytes(myPost)
request.Method = “POST”
‘ Set the content type of the data being posted.
request.ContentType = “application/x-www-form-urlencoded”
‘ Set the content length of the string being posted.
request.ContentLength = myByte.Length
Dim newStream As IO.Stream = request.GetRequestStream()
newStream.Write(myByte, 0, myByte.Length)
newStream.Close()
Dim response As Net.HttpWebResponse = CType(request.GetResponse(), Net.HttpWebResponse)
Dim datastream As IO.Stream = response.GetResponseStream
Dim reader As New IO.StreamReader(datastream)
Dim responseFromServer As String = reader.ReadToEnd()
temp = responseFromServer
reader.Close()
datastream.Close()
response.Close()Catch
MsgBox(Err.Description)
End Try
Return temp
End Function
Public Function HTTPGet(ByVal myURL As String)
Dim temp As String
temp = “”
TryDim myURI As New Uri(myURL)
Dim wr As Net.WebRequest = Net.WebRequest.Create(myURI)
wr.Credentials = Net.CredentialCache.DefaultCredentials
Dim response As Net.HttpWebResponse = CType(wr.GetResponse(), Net.HttpWebResponse)
Dim datastream As IO.Stream = response.GetResponseStream
Dim reader As New IO.StreamReader(datastream)
Dim responseFromServer As String = reader.ReadToEnd()
temp = responseFromServer
reader.Close()
datastream.Close()
response.Close()Catch
MsgBox(Err.Description & vbCrLf & myURL)
End Try
Return temp
End Function
“Timesheet.php is a PHP application designed to keep track of the hours worked by multiple people on multiple projects. It allows users to log in through their web browser and manage the times that they are clocked on or clocked off.”
The application is easy to install if you have mild experience with PHP and MySQL.