Archive for the ‘Technology’ Category

GWT web application started to give “Element not found” javascript error message on Internet Explorer 7 (IE7)? This application worked fine on Internet Explorer 6and Firefox 2. Now your best guess would be; GWT not working on IE 7 properly. Wasn’t it?

But the scenario became confusing and unbelievable because your applicationworked fine on IE7 in some machines while not on some others. Have you faced this issue? Then the below solution is for you.

This issue can be fixed by a making a change on windows registry.

Steps to follow are;
1. Open up the Registry editor – type regedit on command prompt.

2. Look for the key shown below


3. Click on the “Default” row and see the value there. If it’s value is “C:\WINDOWS\system32\shdocvw.dll”, then that is what causes the above mentioned issue. If you have installed Windows in a different drive; C:\ must be replaced with the that letter.

4. Replace that value with “C:\WINDOWS\system32\ieframe.dll”.

5. Now restart IE7, and load your GWT application.





This article provides steps for troubleshooting script errors encountered while using Yahoo! Messenger.


Having the most recent Java application will ensure proper communication between Internet Explorer and the Messenger application. Please follow these steps to uninstall and reinstall your Java runtime environment.

Uninstall and Reinstall Java
1.     On your keyboard, hold down the Windows key and press the R key. This opens the “Run” command.
2.     Type in appwiz.cpl and click OK. This opens “Add or remove Programs”.
3.     Select Java and then click the Uninstall button. There may be multiple installed versions, so be sure to remove all of them.
4.     Next, download and install the latest version of Java Runtime Environment
5.     To ensure the update is effective please Clear the Yahoo! Messenger Cache
6.     Restart Messenger to determine if the issue is resolved.
If the issue persists, try Resetting the Browser Configuration.


Here’s some code that will need tweaking to fit your needs. Here I assumed the table starts in cell A1, and has no blank rows. You can adjust the values of R1,G1,B1 and R2,G2,B2 to give you the pastel shades you want.

Sub TwoColorBands()
Dim rng As Range

Dim lastCol As Long, lastRw As Long, indx As Long, ct As Long
Dim R1 As Integer, G1 As Integer, B1 As Integer
Dim R2 As Integer, G2 As Integer, B2 As Integer

lastCol = Cells(1, Columns.Count).End(xlToLeft).Column
lastRw = Range("A" & Rows.Count).End(xlUp).Row
R1 = 200
G1 = 50
B1 = 100
R2 = 250
G2 = 75
B2 = 120
indx = 0
Set rng = Range("A1", Cells(lastRw, lastCol))
rng.Rows(1).Interior.Color = RGB(R1, G1, B1)
For Each rw In rng.Rows
    If rw.Cells(1).Value = rw.Cells(1).Offset(1, 0).Value Then
        rw.Offset(1, 0).Interior.Color = rw.Interior.Color
    ElseIf rw.Offset(1, 0).Row <= lastRw Then
        indx = indx + 1
        If indx Mod 2 <> 0 Then
            rw.Offset(1, 0).Interior.Color = RGB(R2, G2, B2)
           rw.Offset(1, 0).Interior.Color = RGB(R1, G1, B1)
        End If
    End If
Next rw
End Sub



Excel Data Validation — Introduction

Posted: Monday,November 8, 2010 in Technology
Tags: ,

What is Data Validation?

Data validation is a tool that helps you control the kind of information that is entered in your worksheet. With data validation, you can:

–provide users with a list of choices
–restrict entries to a specific type or size
–create custom settings

Note: Data validation is not foolproof. It can be circumvented by pasting data into the cell, or by choosing Edit|Clear|ClearAll 

Data Validation Dropdown
Data validation list
Provide a Drop-down List of Options

Use Data Validation to create a dropdown list of options in a cell. List items can be typed in a row or column on a worksheet, or typed directly into the Data Validation dialog box. 

1. Create a List of Items

If the list of options is more than a couple of items, it will be easier to maintain if you type the list on a worksheet. The list can be entered on the sheet that will contain the dropdown lists, or on a different sheet. In this example, the list will be stored on a sheet named Lists.

  1. In single row or column, type the entries you want to see in the drop-down list. (Note: The list must be in a single block of cells — e.g. you can use A2:A6, but not A2, A4, A6, A8.)

2. Name the List Range

If you type the items on a worksheet, and name the range, you can refer to the list from any worksheet in the same workbook.

  1. Select the cells in the list.
  2. Click in the Name box, to the left of the formula bar
  3. Type a one-word name for the list, e.g. FruitList.
  4. Press the Enter key.

Note: To create a named list that automatically expands to include new items, use a dynamic range









Name Range

3. Apply the Data Validation

  1. Select the cells in which you want to apply data validation
  2. From the Data menu, choose Validation.
  3. From the Allow drop-down list, choose List

Allow List


  1. In the Source box, type an equal sign and the list name, for example: =FruitList
  2. Click OK. 

List Source

Tip: To select a range name, instead of typing it:

  1. In the Data Validation dialog box, under Allow, select List
  2. Click in the Source box, and on the keyboard, press the F3 key
  3. From the Paste Name list, select a named range, and click OK.
  4. Click OK, to close the Data Validation dialog box.

To view the steps in a short data validation basics video, click here

Paste Name dialog box

4. Using a Delimited List

Instead of referring to a list of items on the worksheet, you can type the list in the Source box, separated by commas. For example:


Note: This method of Data Validation is case sensitive — if a user types YES, an error alert will be displayed. 


Delimited List

5. Allow Entries that are not in the List

To allow users to type items that are not in the list., turn off the Error Alert

Show Error


6. Protect the List

To protect the list from accidental damage, if you have entered it on a different worksheet, you can hide that sheet.

  1. Select the sheet that contains the list
  2. Choose Format | Sheet | Hide

Download the zipped sample workbook


Hide the Sheet



Western Digital, salah satu pemain di bidang media penyimpanan memperkenalkan hard drive portable My Passport Essential, My Passport Essential SE, dan My Book Essential. Ketiganya hadir dalam berbagai kapasitas dengan konektivitas USB 3.0.

Di samping menyediakan kapasitas sebesar 1 dan 2TB, harddisk eksternal tersebut kini hadir dalam kapasitas 3TB. Untuk backup terus menerus secara otomatis, Western Digital menambahkan software visual backup bernama SmartWare.

“Dengan adanya banyak perangkat seperti iPod touch, iPhone 4 dan smartphone lain yang menambahkan kamera dengan kemampuan video, digital video menjadi menjadi sangat meluas,” kata Dale Pistilli, Vice President of Marketing, Branded Products Group, Western Digital.

Pada keterangannya, 14 Oktober 2010, Pistilli menyebutkan, memiliki kapasitas ekstra untuk menyimpan file-file tersebut dan memindahkannya secara cepat merupakan masalah besar bagi konsumer di seluruh dunia.

“Untuk itu, Western Digital menghadirkan media simpan eksternal dengan kapasitas tinggi,” ucap Pistilli. “Dengan koneksi USB 3.0, kecepatan untuk memindahkan file juga menjadi tiga kali lebih cepat,” ucapnya.

Sebagai gambaran, lewat koneksi USB 3.0, pengguna dapat memindahkan data dengan kecepatan hingga 5 Gb/detik. Artinya, HD video berdurasi 2 jam dapat ditransfer dalam waktu tiga menit. Sebagai informasi, video yang sama baru selesai ditransfer setelah 13 menit jika menggunakan USB 2.0.

Meski telah menggunakan koneksi USB 3.0, ketiga drive yang dihadirkan tetap mampu bekerja dengan koneksi USB 2.0 yang umumnya tersedia pada perangkat saat ini.

Di Indonesia, harddisk portable My Passport Essential My Book Essential memiliki garansi terbatas selama 3 tahun. Produk ini dijual mulai dari kisaran harga US$99.99 USD hingga US$249.99 USD, tergantung kapasitas yang disediakan.

Global Koneksi

Posted: Monday,October 26, 2009 in C#, Technology
Tags: , , , ,

public static class GlobalFunction
public static string servername = “.”;
public static string databasename = “Database_General”;
public static string username = “”;
public static string password = “”;

public static int setKoneksi()
string sourceFile = “data.ini”;
if (!File.Exists(sourceFile))
return 0;
FileStream file = new FileStream(sourceFile, FileMode.OpenOrCreate, FileAccess.Read);
TextReader tr = new StreamReader(file);
int NumberOfLines = 1000;
string[] ListLines = new string[NumberOfLines];

//Read the number of lines and put them in the array
for (int i = 1; i < NumberOfLines; i++)
ListLines[i] = tr.ReadLine();
if (ListLines[i] == null)
servername = GlobalFunction.Mid(ListLines[1], ListLines[1].IndexOf(‘=’) + 1).Trim();
databasename = GlobalFunction.Mid(ListLines[2], ListLines[2].IndexOf(‘=’) + 1).Trim();
username = GlobalFunction.Mid(ListLines[3], ListLines[3].IndexOf(‘=’) + 1).Trim();
password = GlobalFunction.Mid(ListLines[4], ListLines[4].IndexOf(‘=’) + 1).Trim();

// Close StreamReader

// Close file

return 1;


public NilaiAccess()
public PerubahanNilai GetDataNilai(string thnajaran, string kdsem, string nim, string kelas, string kdmtk, string kdjenisnilai)
PerubahanNilai nilai = new PerubahanNilai();

SqlCommand cmd = new SqlCommand();
cmd.Connection = GlobalFunction.con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = “spr_prak_get_nilaiawal”;
cmd.Parameters.Add(“@thnajaran”, SqlDbType.VarChar).Value = thnajaran;
cmd.Parameters.Add(“@kdsem”, SqlDbType.VarChar).Value = kdsem;
cmd.Parameters.Add(“@nim”, SqlDbType.VarChar).Value = nim;
cmd.Parameters.Add(“@kelas”, SqlDbType.VarChar).Value = kelas;
cmd.Parameters.Add(“@kdmtk”, SqlDbType.VarChar).Value = GlobalFunction.StringIndexOfChar(kdmtk, ‘-‘).Trim();
cmd.Parameters.Add(“@kdjenisnilai”, SqlDbType.VarChar).Value = Convert.ToInt32(kdjenisnilai);

using (SqlDataReader sdr = cmd.ExecuteReader())
while (sdr.Read())
nilai.Nilaiawal = sdr[“nilai”].ToString();

return nilai;

public bool SimpanPerubahanNilai(PerubahanNilai ubahnilai)

SqlCommand cmd = new SqlCommand();
cmd.Connection = GlobalFunction.con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = “spr_save_tr_perubahan_nilai”;
cmd.Parameters.Add(“@username”, SqlDbType.VarChar).Value = ActiveUser.User;
cmd.Parameters.Add(“@kdlab”, SqlDbType.VarChar).Value = ActiveUser.Kdlab;
cmd.Parameters.Add(“@thnajaran”, SqlDbType.VarChar).Value = ubahnilai.Thnajaran;
cmd.Parameters.Add(“@kdsem”, SqlDbType.VarChar).Value = ubahnilai.Kdsem;
cmd.Parameters.Add(“@nim”, SqlDbType.VarChar).Value = ubahnilai.Nim;
cmd.Parameters.Add(“@kelas”, SqlDbType.VarChar).Value = ubahnilai.Kelas;
cmd.Parameters.Add(“@kdmtk”, SqlDbType.VarChar).Value = GlobalFunction.StringIndexOfChar(ubahnilai.Kdmtk, ‘-‘).Trim();
cmd.Parameters.Add(“@kdjenisnilai”, SqlDbType.Int).Value = Convert.ToInt32(ubahnilai.Kdjenisnilai);
cmd.Parameters.Add(“@nilaiawal”, SqlDbType.VarChar).Value = Convert.ToInt32(ubahnilai.Nilaiawal);
cmd.Parameters.Add(“@nilaiubah”, SqlDbType.VarChar).Value = Convert.ToInt32(ubahnilai.Nilaiubah);

cmd.Parameters.Add(new SqlParameter(“@return”, SqlDbType.Int, 32));
cmd.Parameters[“@return”].Direction = ParameterDirection.Output;


int affectedRow = Convert.ToInt32(cmd.Parameters[“@return”].Value);

if (affectedRow == 0)
return false;
else return true;


Data Dictionary Using Query SQL

Posted: Tuesday,May 12, 2009 in SQL 2005

select distinct,,, a.max_length,c.precision, c.scale
from sys.columns a left join sys.objects b
on a.object_id = b.object_id
left join sys.types c
on c.system_type_id = a.system_type_id
and c.user_type_id = a.user_type_id

Having A Nice Try… ^^

Good Luck