Thursday, May 07, 2009

How To Permanently Delete Your Facebook Account

This is the article i've found from Facebook when going to delete my Facebook account.

Ever tried to leave Facebook and found out they only allow you to "deactivate" your account? All your personal data, including photos, interests, friends etc will still be saved indefinitely! You don’t have to be a conspiracist to find this quite fishy (or simply annoying)!

Look further down for instructions on how to get your account permanently deleted.

Maybe you see no reason to leave Facebook yet?
In any case, information about how to close an account should be easily available to all members. Join this group to keep the information handy the day you appreciate your privacy more than invitations to vampire applications and updating long lost “friends” of your life.


- - - - - - - - - - - - - - HOW TO ACHIEVE PERMANENT DELETION - - - - - - - - - - - - - -

Go to this page:
http://www.facebook.com/help/contact.php?show_form=delete_account

Click "Submit" and follow the instructions.

Your account will be deactivated for two weeks, and if you don't log in during that period, your account is permanently deleted.

This method is official and should be complete, i.e. no need to delete individual photos, comments, messages or items from your profile or anywhere else on Facebook!

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Please note that I'm not a part of the Facebook team, and consequently cannot fix anything that's broken. If you are experiencing problems with the link above (or anything else concerning your account) your best bet is to contact facebook directly using this form: http://www.facebook.com/help/contact_generic.php

If someone has stolen your identity or if you are subject to any other form of "account abuse", try this form: http://www.facebook.com/help/contact.php?show_form=fake_profile

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Outdated instructions were put in
"Archive: Obsolete ways of account deletion" in the discussion board.)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Friday, May 02, 2008

Strange Behaviour on D-Link DSL-302T ADSL Modem

In my home (actually my parent in law home) i have two computers connected on LAN using switch. I have an ADSL modem (D-Link DSL-302T) and want to make my two computers connected on the internet. So, i plug a modem RJ 45 to the switch and also each computers.

I configure the IP address like this :

192.168.1.1 (ADSL Modem)
192.168.1.2 (Computer 1)
192.168.1.3 (Computer 2)

and pointing the gateway on each computer to the ADSL modem IP (192.168.1.1)

Logically, this setting have to work. But, in fact i can't browsing to the internet on each computers. I saw the log on the modem that my modem already connected and got WAN IP address.



So, what's wrong here? Ok, i try to solve this problem by changing the TCP/IP address to obtain an IP address automatically.



Check the connection using ping command and restore the TCP/IP address to the default IP address which is 192.168.1.2 and 192.168.1.3.



And, magically now all computers connected to the internet.

How To Change Boot Sequence on Windows XP

I have to face a situation that needed to have two operating systems installed on my single computer. In my case, i already have installed Windows XP Pro Service Pack 2 English version for a long time ago. And now, the condition force me to have Windows XP Korean version installed.

The new operating system installed successfully. When booting the computer, there are two option of which operating system will be used. The default operating system is a newer operating system installed. But, i need my English version of Windows XP as a default entry for operating system. How to do this?

You can do this by right click My Computer and choose Properties as the image below:



Then go to Advanced tab and on the Startup and Recovery section click Settings button



In here you will face the section called System startup and the list of available Default operating system.



Choose your preferred operating system and then click OK. The previous XP and newer XP operating system will have a same name. This thing can make us confuse. To edit the operating system boot name, click on the Edit button and you will be prompted with the notepad contain the boot information like this



Just change the operating system name with the name preferred, for example like the image below



Save your changes and try to reboot your computer and see the result.

Friday, April 25, 2008

JavaScript Suicide

Getting busy with a day by day working hours makes me for a long time not involved on writing this blog anymore. I do apologize for this.

In some situation, we might want to run a script (asp, php, c#, jsp, cfm) using browser and then after execute the script the browser closed automatically.

You can simply do this using the JavaScript code below. Put this code at the beginning of your script :

<script>
function doSuicide()
{
opener = self;
top.window.close();
}
</script>

And then put this code at the end of your script :

<script>doSuicide();</script>

How this JavaScript code works?

First, the browser will load all the script till the end of the script. After the browser parsing the code and found the JavaScript function that call doSuicide() function then this will make the browser forced to closed by himself.

This JavaScript code known works on Internet Explorer and Firefox 2+

Monday, December 10, 2007

The field is too small to accept the amount of data you attempted to add

Like the other developers, the error code print out would make easier to find out the way where we must to debug and fix the problem.

Like the error code below
System.Data.OleDb.OleDbException: The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at Register.ExecuteCommand(String MyCmd) in d:\Project\fake\UserManagement\Register.aspx.cs:line 60
The error code above represent that our Table Field Size didn't have sufficient Field Size to handle the data longer than the available Field Size.

On Ms. Access database the default length for Text Data Type is 50. The maximum length of a Text Data Type is 255. So, please provide the sufficient Field Size for the data you want to be saved on an Access database.



If the data is longer than 255 it might you need consider to use a Memo field, then you can get a whole lot more characters, but this may be overkill.

Operation must use an updateable query

It might be sometime you will got this error when working with ASP.NET and Ms. Access database.
System.Data.OleDb.OleDbException: Operation must use an updateable query. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at Register.ExecuteCommand(String MyCmd) in d:\Project\fake\UserManagement\Register.aspx.cs:line 60
The error would be different depending on your ASP.NET code. But the main error will looks similar.
This is very well known problem and may occur under the following circumstances
  • An ASP.NET worker process (Aspnet_wp.exe) runs under the default ASPNET account.
  • You do not enable impersonation on that application.
  • You try to connect to or write to an Access database.
To solve the problem you need to give the permission to ASPNET account. The exact permissions are Modify. Although on Windows Server 2003, it is probably the NETWORK SERVICE account.
  1. Right click on the folder containing the Access database, then choose Properties | Security.
  2. Click "Add".
  3. Click "Advanced" and make sure the "From this location..." entry matches the current box.
  4. Click "Find Now" and you will be presented with a list of user accounts.
  5. Double click the NETWORK SERVICE entry, then click OK.
  6. Select the "Modify" option, then click "Apply".
The image shown below illustrated the process.




Hope this helps.

Reference :
(1) http://support.microsoft.com/default.aspx?scid=kb;en-us;316675

Tuesday, November 27, 2007

Don't Give Space When Calling MySQL Function

Dear people ... this might be a simple problem but you can take a whole day to trace where the problem exist if you didn't care about this. I face this problem and get confuse when working with MySQL.

I have the following code and execute well using phpMyAdmin but it's failed (no result set given) when i try to execute directly from my php script.

$strSql = "
SELECT user_password, user_name
FROM user_t
WHERE 1
AND user_id = '" . $_POST['txt_id'] . "'
AND user_password = SHA1 ('" . $_POST['txt_pwd'] . "')" ;

if ( $objRS = mysql_query ($strSql, $objConn) )
{
// Do something here ...
}

As you can see in the bold style of the code above we can see that there is a space between MySQL SHA1 function and the parameter for that function.

After i remove that space then the problem is solved. So, my code now looks like below :

$strSql = "
SELECT user_password, user_name
FROM user_t
WHERE 1
AND user_id = '" . $_POST['txt_id'] . "'
AND user_password = SHA1('" . $_POST['txt_pwd'] . "')" ;

if ( $objRS = mysql_query ($strSql, $objConn) )
{
// Do something here ...
}

So, keep your MySQL function closed with ( without space after function name. Hope this helps.

Wednesday, November 21, 2007

MySQL Stored Procedure : can't return a result set in the given context

This problem came when i'm deploying the program and databases to the production server while it's running smooth on my local computer. This is terrible and i have a suspicious if there's something wrong with the MyODBC Connector in the production server. I need to know what version of MyODBC Connector installed on my local computer and on my production server so i can compare it. But how do i know the version of this MyODBC Connector?



Below is my step to find out the version of MyODBC Connector :
  1. Go to Control Panel -> Administrative Tools and choose Data Sources (ODBC).
  1. Click the Add button and scroll to the end of the data source list and you will find out the version of your MyODBC Connector like shown in the image below.


The version of MyODBC Connector on my computer is 3.51.12.00 while the version on production server is 3.51.11.00. The MyODBC Connector version on production server come with the installation of Plesk 8.1.

This why i got the error PROCEDURE db_name.procedure_name can't return a result set in the given context when running MySQL stored procedures on the production server. And after i upgraded the MyODBC Connector to the latest version then the problem is solved.

In the general case, the server did not know if a procedure will return just one result set, or more. So, it has to assume the "worst" case, that several results sets might be returned.

Make sure we are using the latest ODBC version. And don't forget to restarting the server to takes an effect.

The support for the CLIENT_MULTI_RESULTS flag was added in 3.51.12.

How To Check If Processor Type Is 32-bit Or 64-bit

Sometime when we need to download or install a software, we need to know for what and which processor type that software. In some case we can use the same software for 32 and 64-bit version. But in most cases we need to install a different software for a specific processor type.

For a Windows user you can check the processor type using the following way :
  1. Right click My Computer and choose Properties.
  2. Click the Advanced tab.
  3. Click Environment Variables.
  4. In the System variables find a variable with the name PROCESSOR_ARCHITECTURE. If your PC has a 32-bit processor, this variable will have a value of x86. If it has a 64-bit processor this variable will have a value of x64.


This way is not a real world test for checking the processor type because
those variables can be changed by anyone but at least you can use this way.

To check the processor type for another machine or another operating system you can use this link http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=31892 as a reference.

MySQL Stored Procedure Is Gone !

Hello people ... i face this problem when working with MySQL Server 5.0.45

I've creating a new database on this MySQL Server and create many routines (stored procedure and function). And when i renaming the database name then all my routines related to the database i renamed is gone. All is gone.

I try to find out manually on the MySQL information schema because all the routines of all database is stored there but i find nothing except the other routines for other database. This is terrible and do not let you face the same problem.

So, be careful to backup your MySQL routines (stored procedure and function) before renaming the database name. Hope this helps !

Wednesday, September 12, 2007

GUI Editor for MySQL 5

Most of PHP/MySQL programmers will use phpMyAdmin as an administration tools when managing MySQL database. I'm one of them but i get a difficulties when working with MySQL 5 routines (stored procedure and stored function). So, i'm looking an alternate GUI for managing MySQL database.

If you have a difficulties when create/edit/drop stored procedure when working with MySQL 5 then you can try to use GUI Tools from MySQL. You can try to use MySQL GUI Tools from http://dev.mysql.com/downloads/gui-tools/5.0.html

The MySQL GUI Tools Bundle for 5.0 includes the following products :
  1. MySQL Administrator 1.2
  2. MySQL Query Browser 1.2
  3. MySQL Migration Toolkit 1.1
This tools is easier to use. Below is the screen shot of MySQL Administrator when working with stored procedure

How to Get Result Set from MySQL 5 Stored Procedure using Classic ASP

For developer or programmer that worked on classic ASP, if you want to communicate with MySQL 5 then you need to install MySQL Connector/ODBC from MySQL official site. The MySQL Connector/ODBC is the name for the family of MySQL ODBC drivers (previously called MyODBC drivers) that provide access to a MySQL database using the industry standard Open Database Connectivity (ODBC) API.

You need to specify the correct DRIVER on your database connection string. The source code below is an example of how classic ASP work with MySQL 5 stored procedure.

For a note :

Default PORT for MySQL is 3306. I'm here using 3307 because i'm installed 2 versions of MySQL on my computer that MySQL 4.0.26 on port 3306 and MySQL 5.0.45 on port 3307.


<%@ Language=VBScript%>

<%
Option Explicit

Dim strConn, objConn
Dim strDBHost, strDBPort, strDBUser, strDBPassword, strDBName, blnConnStatus
Dim strSql, objRS
Dim strCustNumber, strInvNumber, strSPCode
Dim strMessage, sServer, sPort, sUser, sPassword

strDBHost = "localhost"
strDBPort = "3307"
strDBUser = "my_db_user"
strDBPassword = "my_db_password"
strDBName = "jmnsms"

strConn = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=" & strDBHost & ";PORT=" & strDBPort & ";UID=" & strDBUser & ";PWD=" & strDBPassword & ";DATABASE=" & strDBName
blnConnStatus = False

Call OpenDBConn()

Response.Write "<h3>" & strMessage & "</h3>"

If blnConnStatus = False Then

Response.End()

End If

strSql = "CALL jmnsms.MB_SelectInvoice();"

Set objRS = Server.CreateObject("ADODB.Recordset")

objRS.Open strSql, objConn

If objRS.EOF Then

Response.Write "Data Not Found!"

Else

Do While NOT objRS.EOF

strCustNumber = objRS.Fields("cust_number")
strInvNumber = objRS.Fields("inv_number")
strSPCode = objRS.Fields("sp_code")

Response.Write strCustNumber & " -- " & strInvNumber & " -- " & strSPCode & "<br />"

objRS.MoveNext

Loop

End If

objRS.Close
Set objRS = Nothing

Call CloseDBConn()

'
' Procedure to Open Database Connection
'
Sub OpenDBConn()

Err.Clear()
On Error Resume Next

Set objConn = Server.CreateObject("ADODB.Connection")

If Len(Err.Description) <> 0 Then

strMessage = " " & Err.Description & " MySQL connection can't be established!"

Else

objConn.ConnectionTimeout = 120
objConn.Open strConn

If Len(Err.Description) <> 0 Then

strMessage = " " & Err.Description & " MySQL connection can't be established!"

Else

strMessage = " MySQL connection succesfull established!"
blnConnStatus = True

End If

End If

End Sub

'
' Procedure to Close Database Connection
'
Sub CloseDBConn()

objConn.Close
Set objConn = Nothing

End Sub

%>


The stored procedure called MB_SelectInvoice() is look like here

CREATE DEFINER=`root`@`localhost` PROCEDURE `MB_SelectInvoice`()
BEGIN
SELECT * FROM jmnsms.t_invoice;
END