Tuesday, August 31, 2010

Hal hal



Begitu banyak hal-hal yang ada didunia ini.
Published with Blogger-droid v1.5.7

Sunday, August 29, 2010

Bintang dan Bulan terang


Hari itu tanggal 26 aug 2010, suasana malam di gedung KTB Pulomas sungguh hening. Kebanyakan para karyawan sudah balik dari kantor, dikarenakan masih dalam periode ramadhan(pulang lebih awal). Namun ada hal yang menarik perhatian saya yakni Bintang dan Bulan bersinar terang dan sangat jelas. Hal ini saya perhatikan dari awal saya balik kantor sampai setibanya saya dirumah. Sungguh hal yang indah dan menakjubkan. Tuhan telah memberikan keindahan kepada kita, dan sudah selayaknya lah kita menjaga apa yang Tuhan berikan pada kita. Tuhan jadikan kami menjadi manusia yang menghargai pemberianMu.
Published with Blogger-droid v1.4.8

Friday, August 27, 2010

Suasana BSI waktu sore

Ini adalah suasana di BSI waktu sore.

Published with Blogger-droid v1.4.8

Handle UltraWinGrid when Export for Datetime format

Today i had issue when i run application for inquiry report, when the grid (ultrawingrid) have column with date value. I want to export to excel file. when i opened that excel file i cann’t update my date value to dateformat.

Until i found this rootcause :D [gladly]
it because the column value on string type not on datetime format.

image

so i use this datatable to fill that grid (see column name – calendar date) :

Private Function SetDataTableColumn() As DataTable
        Dim dtDesign As New DataTable
        With dtDesign.Columns
            .Add("EmployeeNo")
            .Add("EmployeeName")
            ' Menambahkan kolom dengan format date ( agar excelnya bisa dimodif)
            Dim idColumn As DataColumn = New DataColumn()
            idColumn.DataType = System.Type.GetType("System.DateTime")
            idColumn.ColumnName = "CalendarDate"
            .Add(idColumn)
            .Add("WDCode")
            .Add("WDSplitCode")
            .Add("AbsentCode1")
            .Add("AbsentCode2")
            .Add("AbsentCode3")
            .Add("DatetimeIn")
            .Add("DatetimeOut")
            .Add("OTBefStart")
            .Add("OTBefEnd")
            .Add("OTAftStart")
            .Add("OTAftEnd")
            .Add("OTTypeA")
            .Add("OTTypeB")
            .Add("OTTypeC")
            .Add("OTTypeD")
            .Add("TotalOT")
            .Add("TransactionPeriod")
        End With
        Return dtDesign
    End Function




After that you can export that rows with this code:







Private Sub btnExportToExcel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExportToExcel.Click
        If Not grdATDReport.Rows.Count = 0 Then
            Dim fsave As New Windows.Forms.SaveFileDialog
            fsave.Filter = "Excel Files (*.xls)|*.xls|All files (*.*)|*.*)"
            fsave.ShowDialog()
            If Not (fsave.FileName = "") Then
                Exporter.Export(grdATDReport, fsave.FileName)
                MessageBox.Show("Data has been exported !", "Export OK", MessageBoxButtons.OK, MessageBoxIcon.Information)
            End If
        Else
            If grdATDReport.Rows.Count = 0 Then
                MessageBox.Show("No data to export !", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
            If grdATDReport.Rows.Count >= 65001 Then
                MessageBox.Show(String.Format("Cannot export more than 65000 attendance data (there are {0} data)", grdATDReport.Rows.Count), "Export Fail", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
        End If
    End Sub




Thank to God because He opened my knowledge for this.













Using DateTime.ToString Pattern

How to use DATETIME.TOSTRING()

All the patterns:

0
MM/dd/yyyy
08/22/2006

1
dddd, dd MMMM yyyy
Tuesday, 22 August 2006

2
dddd, dd MMMM yyyy
HH:mm Tuesday, 22 August 2006 06:30

3
dddd, dd MMMM yyyy
hh:mm tt Tuesday, 22 August 2006 06:30 AM

4
dddd, dd MMMM yyyy
H:mm Tuesday, 22 August 2006 6:30

5
dddd, dd MMMM yyyy
h:mm tt Tuesday, 22 August 2006 6:30 AM

6
dddd, dd MMMM yyyy HH:mm:ss
Tuesday, 22 August 2006 06:30:07

7
MM/dd/yyyy HH:mm
08/22/2006 06:30

8
MM/dd/yyyy hh:mm tt
08/22/2006 06:30 AM

9
MM/dd/yyyy H:mm
08/22/2006 6:30

10
MM/dd/yyyy h:mm tt
08/22/2006 6:30 AM

11
MM/dd/yyyy HH:mm:ss
08/22/2006 06:30:07

12
MMMM dd
August 22

13
MMMM dd
August 22

14
yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK
2006-08-22T06:30:07.7199222-04:00

15
yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK
2006-08-22T06:30:07.7199222-04:00

16
ddd, dd MMM yyyy HH':'mm':'ss 'GMT'
Tue, 22 Aug 2006 06:30:07 GMT

17
ddd, dd MMM yyyy HH':'mm':'ss 'GMT'
Tue, 22 Aug 2006 06:30:07 GMT

18
yyyy'-'MM'-'dd'T'HH':'mm':'ss
2006-08-22T06:30:07

19
HH:mm
06:30

20
hh:mm tt
06:30 AM

21
H:mm
6:30

22
h:mm tt
6:30 AM

23
HH:mm:ss
06:30:07

24
yyyy'-'MM'-'dd HH':'mm':'ss'Z'
2006-08-22 06:30:07Z

25
dddd, dd MMMM yyyy HH:mm:ss
Tuesday, 22 August 2006 06:30:07

26
yyyy MMMM
2006 August

27
yyyy MMMM
2006 August

The patterns for DateTime.ToString ( 'd' ) :

0
MM/dd/yyyy
08/22/2006

The patterns for DateTime.ToString ( 'D' ) :

0
dddd, dd MMMM yyyy
Tuesday, 22 August 2006

The patterns for DateTime.ToString ( 'f' ) :

0
dddd, dd MMMM yyyy HH:mm
Tuesday, 22 August 2006 06:30

1
dddd, dd MMMM yyyy hh:mm
tt Tuesday, 22 August 2006 06:30 AM

2
dddd, dd MMMM yyyy H:mm
Tuesday, 22 August 2006 6:30

3
dddd, dd MMMM yyyy h:mm
tt Tuesday, 22 August 2006 6:30 AM

The patterns for DateTime.ToString ( 'F' ) :

0
dddd, dd MMMM yyyy HH:mm:ss
Tuesday, 22 August 2006 06:30:07

The patterns for DateTime.ToString ( 'g' ) :

0
MM/dd/yyyy HH:mm
08/22/2006 06:30

1
MM/dd/yyyy hh:mm
tt 08/22/2006 06:30 AM

2
MM/dd/yyyy H:mm
08/22/2006 6:30

3
MM/dd/yyyy h:mm tt
08/22/2006 6:30 AM

The patterns for DateTime.ToString ( 'G' ) :

0
MM/dd/yyyy HH:mm:ss
08/22/2006 06:30:07

The patterns for DateTime.ToString ( 'm' ) :

0
MMMM dd
August 22

The patterns for DateTime.ToString ( 'r' ) :

0
ddd, dd MMM yyyy HH':'mm':'ss 'GMT'
Tue, 22 Aug 2006 06:30:07 GMT

The patterns for DateTime.ToString ( 's' ) :

0
yyyy'-'MM'-'dd'T'HH':'mm':'ss
2006-08-22T06:30:07

The patterns for DateTime.ToString ( 'u' ) :

0
yyyy'-'MM'-'dd HH':'mm':'ss'Z'
2006-08-22 06:30:07Z

The patterns for DateTime.ToString ( 'U' ) :

0
dddd, dd MMMM yyyy HH:mm:ss
Tuesday, 22 August 2006 06:30:07

The patterns for DateTime.ToString ( 'y' ) :

0
yyyy MMMM 2006 August

Building a custom DateTime.ToString Patterns

The following details the meaning of each pattern character. Note the K and z character.

d
Represents the day of the month as a number from 1 through 31. A single-digit day is formatted without a leading zero

dd
Represents the day of the month as a number from 01 through 31. A single-digit day is formatted with a leading zero

ddd
Represents the abbreviated name of the day of the week (Mon, Tues, Wed etc)

dddd
Represents the full name of the day of the week (Monday, Tuesday etc)

h
12-hour clock hour (e.g. 7)

hh
12-hour clock, with a leading 0 (e.g. 07)

H
24-hour clock hour (e.g. 19)

HH
24-hour clock hour, with a leading 0 (e.g. 19)

m
Minutes

mm
Minutes with a leading zero

M
Month number

MM
Month number with leading zero

MMM
Abbreviated Month Name (e.g. Dec)

MMMM
Full month name (e.g. December)

s
Seconds

ss
Seconds with leading zero

t
Abbreviated AM / PM (e.g. A or P)

tt
AM / PM (e.g. AM or PM

y
Year, no leading zero (e.g. 2001 would be 1)

yy
Year, leadin zero (e.g. 2001 would be 01)

yyy
Year, (e.g. 2001 would be 2001)

yyyy
Year, (e.g. 2001 would be 2001)

K
Represents the time zone information of a date and time value (e.g. +05:00)

z
With DateTime values, represents the signed offset of the local operating system's time zone from Coordinated Universal Time (UTC), measured in hours. (e.g. +6)

zz
As z but with leadin zero (e.g. +06)

zzz
With DateTime values, represents the signed offset of the local operating system's time zone from UTC, measured in hours and minutes. (e.g. +06:00)

f
Represents the most significant digit of the seconds fraction; that is, it represents the tenths of a second in a date and time value.

ff
Represents the two most significant digits of the seconds fraction; that is, it represents the hundredths of a second in a date and time value.

fff
Represents the three most significant digits of the seconds fraction; that is, it represents the milliseconds in a date and time value.

ffff
Represents the four most significant digits of the seconds fraction; that is, it represents the ten thousandths of a second in a date and time value. While it is possible to display the ten thousandths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.

fffff
Represents the five most significant digits of the seconds fraction; that is, it represents the hundred thousandths of a second in a date and time value. While it is possible to display the hundred thousandths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.

ffffff
Represents the six most significant digits of the seconds fraction; that is, it represents the millionths of a second in a date and time value. While it is possible to display the millionths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.

fffffff
Represents the seven most significant digits of the seconds fraction; that is, it represents the ten millionths of a second in a date and time value. While it is possible to display the ten millionths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.

F
Represents the most significant digit of the seconds fraction; that is, it represents the tenths of a second in a date and time value. Nothing is displayed if the digit is zero.

:
Represents the time separator defined in the current DateTimeFormatInfo..::.TimeSeparator property. This separator is used to differentiate hours, minutes, and seconds.

/
Represents the date separator defined in the current DateTimeFormatInfo..::.DateSeparator property. This separator is used to differentiate years, months, and days.

"
Represents a quoted string (quotation mark). Displays the literal value of any string between two quotation marks ("). Your application should precede each quotation mark with an escape character (\).

'
Represents a quoted string (apostrophe). Displays the literal value of any string between two apostrophe (') characters.

%c
Represents the result associated with a c custom format specifier, when the custom date and time format string consists solely of that custom format specifier. That is, to use the d, f, F, h, m, s, t, y, z, H, or M custom format specifier by itself, the application should specify %d, %f, %F, %h, %m, %s, %t, %y, %z, %H, or %M. For more information about using a single format specifier, see Using Single Custom Format Specifiers.

Many information that we get outside :D

Membuat datarow menggunakan VB.NET

Untuk membuat datarow menggunakan bahasa pemograman VB.NET dapat dilakukan dengan cara berikut ini :

image

Private Sub CreateNewDataRow()




    ' Use the MakeTable function below to create a new table.
    Dim table As DataTable
    table = MakeNamesTable()
    ' Once a table has been created, use the 
    ' NewRow to create a DataRow.
    Dim row As DataRow 
    row = table.NewRow()
    ' Then add the new row to the collection.
    row("fName") = "John"
    row("lName") = "Smith"
    table.Rows.Add(row)
    Dim column As DataColumn
    For Each column in table.Columns
       Console.WriteLine(column.ColumnName)
    Next
    DataGrid1.DataSource=table
 End Sub
 Private Function MakeNamesTable() As DataTable
    ' Create a new DataTable titled 'Names.'
    Dim namesTable As DataTable = new DataTable("Names") 
    ' Add three column objects to the table.
    Dim idColumn As DataColumn = new  DataColumn()
    idColumn.DataType = System.Type.GetType("System.Int32")
    idColumn.ColumnName = "id"
    idColumn.AutoIncrement = True
    namesTable.Columns.Add(idColumn)
    Dim fNameColumn As DataColumn = New DataColumn()
    fNameColumn.DataType = System.Type.GetType("System.String")
    fNameColumn.ColumnName = "Fname"
    fNameColumn.DefaultValue = "Fname"
    namesTable.Columns.Add(fNameColumn)
    Dim lCalColumn As DataColumn = new DataColumn()
    lCalColumn.DataType = System.Type.GetType("System.Datetime")
    lCalColumn.ColumnName = "CalCol"
    namesTable.Columns.Add(lCalColumn)
    ' Create an array for DataColumn objects.
    Dim keys(0) As DataColumn 
    keys(0) = idColumn
    namesTable.PrimaryKey = keys
    ' Return the new DataTable.
    MakeNamesTable = namesTable
 End Function







Have a nice day folks.






Thursday, August 19, 2010

Menerawang kedepan

Begitu banyak cerita didunia ini
Begitu banyak scenario yang dimainkan
Dari hal yang kecil sampai hal yang paling besar.

Sungguh menakjubkan kehidupan ini
Ku hendak menerawang kedepan...
Bersama dengan orang2 yang kukasihi.

Mataku menjadi terbuka dengan sangat
Menyaksikan hal-hal yang mengisi relung hatiku
Benih kehidupan telah ditanamkan
Tinggal bagaimana kita menjaga dan merawatnya

Sungguh kuingin menerawang kedepan
Bersama jalan Tuhan yang kusayangi
Dan biarlah waktu mengajarkan pada kita
Hal-2 apa saja yang kita butuhkan.

Tuk menjadi lebih besar dan kokoh.
Published with Blogger-droid v1.4.8

Friday, August 13, 2010

Our junior

Have a nice day all.
May God is always beside you and me.

Published with Blogger-droid v1.4.8

Angin malam

Malam itu suasana begitu dingin

Published with Blogger-droid v1.4.8

Thursday, August 12, 2010

HTC Wildfire Spec Information


Want to to know about this gadget …

The name "Wildfire" was decided in a poll on Facebook, which resulted in 50% of the votes for "Wildfire" and 24% for "Zeal" on the second place. So it become HTC Wildfire

The HTC Wildfire is a smartphone  developed by the HTC Corporation, that was announced on 17 May 2010 and released in Europe in June of the same year.  It is powered by a 528 MHz Qualcomm  processor and runs the Android operating system - version 2.1.  It includes an TFT LCD capacitive touchscreen and a 5-megapixel camera. It has been described as a "Mini HTC Desire".


HTC Wildfire spesification :

image



image

image


image


Nice gadget to try :D

Visual Source Safe Term

Under normal operation in a stable environment, Microsoft Visual SourceSafe provides excellent storage and security for your current source data and past revisions.

image

Sharing and Branching

Use the Sharing and Branching features of Visual SourceSafe with discretion. Avoid Sharing or Branching across top-level projects because it complicates the process of archiving a project and restoring it into another database. Moreover, when you branch files and then delete them, the space is not recovered until all copies of the branched file in the database are destroyed.

Server Rights

All users must have create, modify, change/edit, and delete permissions for files in the Data folder and its subfolders in the directory tree. These permissions must also be applied to the share permissions. If a user receives the message "Unable to create user login file," that user does not have the proper permissions to the VSS database location.

Working Folders

To maintain file integrity, make sure that all users have their own working folders for all projects. When multiple users share a working folder, a file checked out by one user can be modified by anyone with access to that folder. Maintaining separate working folders ensures that users modify only files they have checked out themselves.

File/folder Description
SrcSafe.ini Visual SourceSafe database global settings and configuration information for all users.
Users.txt List of all users of the Visual SourceSafe database.
Data\Aaaaaaaa.cnt Physical name of last file added to the database.
Data\Crcs.dat CRC information used to speed up the get and check-out processes (Visual SourceSafe 6.0 format databases only).
Data\Names.dat Long file name information.
Data\Rights.dat User and project security information.
Data\Status.dat Visual SourceSafe Explorer cache file (used to speed up the display of the Visual SourceSafe Explorer).
Data\Um.dat User management information (names and passwords) and the database identifier (GUID).
Data\Version.dat Visual SourceSafe database version.
Data\A…Z (folders) Folders containing log files and data files.
Data\Backup (folder) Contains analyze log file (analyze.log), list of bad files (analyze.bad), and backups of files changed by Analyze.
Data\Labels (folder) Label cache information used for label promotion (Visual SourceSafe 6.0 format databases only).
Data\Locks (folder) Used if Visual SourceSafe locking is enabled.
Data\Loggedin (folder) Contains user logon files and an Admin.lck file if the database is locked.
Users (folder) Contains Template.ini, which stores default values for the Ss.ini file for new users. The Users folder also contains a subfolder for each user. This subfolder contains an Ss.ini file defining user-specific settings. The Admin folder also contains Ssadmin.ini, which defines administrator settings.

And many more information about VSS

Reference 



Hukum Tabur Tuai

Ingatlah hukum dasar ini, dalam kehidupanmu  Barang siapa yang menanam, dia pula yang akan menuai