Tampilkan postingan dengan label not. Tampilkan semua postingan
Tampilkan postingan dengan label not. Tampilkan semua postingan

apache2 Could not reliably determine the servers fully qualified domain name using 127 0 1 1 for ServerName

How to fix Apache – "Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName" Error on Ubuntu

The following error while restarting the Apache server on Ubuntu Oneiric.
$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2 apache2: Could not reliably determine the servers fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the servers fully qualified domain name, using 127.0.1.1 for ServerName
Solution: add ServerName directive to /etc/apache2/httpd.conf
$ sudo vi /etc/apache2/httpd.conf
By default httpd.conf file will be blank. Now, simply add the following line to the file.
ServerName localhost
Save the file and exit vi (or gedit).
Finally restart the server.
$ sudo service apache2 restart
Read More..

Object reference not set to an instance of an object

Object reference not set to an instance of an object (part 4)

Complete the catch function


It is time to supplement the use of the catch function to make the error message more attractive. Here is the code:
<summary>
crash test and how to improve your coding
</summary>
<remarks></remarks>
Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

    End Sub
    <summary>
    pressing button1 will crash he program
    this crash is the typical crashing type for all beginners
    </summary>
    <param name="sender"></param>
    <param name="e"></param>
    <remarks></remarks>
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Dim aString() As String declare and array only


        Try
            a crash will occur and the code wont be able to handle it
            MsgBox(aString(0)) you do something with the array and and array is nothing

        Catch ex As Exception
            MsgBox(ex.StackTrace, MsgBoxStyle.Exclamation, ex.Message) add basic error message here
        End Try

       
    End Sub
End Class



Adding arguments to the function Msgbox, we enrich the MsgBox window. Heres what happens when you run the function and the program crashes:

Now all the functions that you create will have the function Try and catch function. Throughout your catch function, I recommend you use the StackTrace property with the small exclamation icon. Yes, a picture is worth a thousand words, do not forget.

This technique protection code is very simple and only take 4 lines! Use it.

About

I invite you to visit my blog for more articles and leave a comment.
Check Technologies represents more than 10 years .... Computer and computer aided design.







Read More..

Digi birthday bonus free 50 air time of reload is not as good as u think

Digi birthday bonus max limit is rm250 only, so max u can reload rm500 to get the max bonus of rm250. So I have been reload rm500 every birthday for this 5 years. I never know how stupid I am until I read the FAQ of Digi birthday bonus on this page http://www.digi.com.my/digirewards/rewardsBonus.do#birthdayBonus Open this webpage and click FAQ to read it then u will realize :

Q9: Does the free talktime credit that I receive as my Birthday Bonus™ have a validity period?
A9: Yes, the free talktime credit that you receive as your Birthday Bonus™ will expire ninety (90) days after you have received it.


Normally I spent rm30 monthly on phone. So I can spend up to rm90 for 90 days. Mean after 90 days reach the expired date, I will lost all bonus rm160 (rm250 bonus - rm90 usage).

So I am think want to transfer the rm160 talk time to reload my friends phones. Too bad digi has TNC :
Q10: Can I perform a Talktime Transfer from the Birthday Bonus™ I have received?
A10: The Reload Bonus™ is for your own use and cannot be used for Talktime Transfer services.


So i cannot transfer to reload my friends phone too... how am i going to spend the rm250 in 90 days? Maybe I should ask my whole family members make calls by using my phone whenever they want to make calls? I am wondering can i use the bonus to surf internet by cellulite data mode? Or do u have any other better way to spend the rm250 bonus?

Next year birthday I will reload rm180 only to get rm90 bonus is enough, wont be stupid anymore.
Read More..