Linux 当日作成、変更されたファイルを
確認する
例:tmp下、当日変更されたファイル一覧
を表示する
find /tmp/ -type f -exec stat --print="%n M
odify %y %x \n" {} \; | grep "$(date '+%y-%
m-%d').*$(date '+%Y-%m-%d')"
do
{
foreach (DataGridViewRow row in m_dataGridView.Rows)
{
try
{
m_dataGridView.Rows.Remove(row); }
catch (Exception) { }
}
} while (m_dataGridView
.Rows.Count > 1);
vb.net 異常発生時に、発生した行番号を取得
New StackFrame(True).GetFileLineNumber
使い方例:
Private Sub m_dgvData_CellFormatting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles m_dgvData.CellFormatting
If e.ColumnIndex = 1 Then ' Index of your DataGridViewComboBoxColumn
CType(m_dgvData.Rows(e.RowIndex).Cells(1), DataGridViewComboBoxCell).Value = 1
End If
End Sub
Private Sub DataGridView1_CellPainting(ByVal sender As Object, _ ByVal e As DataGridViewCellPaintingEventArgs) _ Handles DataGridView1.CellPainting 'ヘッダー以外のとき If e.ColumnIndex >= 0 And e.RowIndex >= 0 Then 'フォーカス枠以外が描画されるようにする Dim paintParts As DataGridViewPaintParts = _ e.PaintParts And Not DataGridViewPaintParts.Focus 'セルを描画する e.Paint(e.ClipBounds, paintParts) '描画が完了したことを知らせる e.Handled = True End If End Sub参考URL
DataRowCollection.Clear
calls DataTable.Clear
DataTable.Clear
will clear unattached rows (created using DataTable.NewRow
) whereas DataRowCollection.Clear won't.RecordManager.Clear
(source below, from the .Net Reference Source for v3.5 SP 0); clearAll
is true only when called from DataTable.Clear
. internal void Clear(bool clearAll) {
if (clearAll) {
for(int record = 0; record < recordCapacity; ++record) {
rows[record] = null;
}
int count = table.columnCollection.Count;
for(int i = 0; i < count; ++i) {
//
DataColumn column = table.columnCollection[i];
for(int record = 0; record < recordCapacity; ++record) {
column.FreeRecord(record);
}
}
lastFreeRecord = 0;
freeRecordList.Clear();
}
else { // just clear attached rows
freeRecordList.Capacity = freeRecordList.Count + table.Rows.Count;
for(int record = 0; record < recordCapacity; ++record) {
if (rows[record]!= null && rows[record].rowID != -1) {
int tempRecord = record;
FreeRecord(ref tempRecord);
}
}
}
}
[mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/English bind-address = 65.55.55.2 # skip-networking .... .. ....2.mysql> CREATE DATABASE foo;
/sbin/iptables -A INPUT -i eth0 -p tcp --destination-port 3306 -j ACCEPT
$ echo X | telnet -e X 65.55.55.2 3306
$ nc -z -w1 65.55.55.2 3306
Connection to 65.55.55.2 3306 port [tcp/mysql] succeeded!
Dim edate = "10/12/2009"
Dim expenddt As Date = Date.ParseExact(edate, "dd/MM/yyyy",
System.Globalization.DateTimeFormatInfo.InvariantInfo)
Dim format() = {"dd/MM/yyyy", "d/M/yyyy", "dd-MM-yyyy"}
Dim expenddt As Date = Date.ParseExact(edate, format,
System.Globalization.DateTimeFormatInfo.InvariantInfo,
Globalization.DateTimeStyles.None)
Dim format() = {"dd/MM/yyyy", "d/M/yyyy", "dd-MM-yyyy"}
Dim expenddt As Date
Date.TryParseExact(edate, format,
System.Globalization.DateTimeFormatInfo.InvariantInfo,
Globalization.DateTimeStyles.None, expenddt)