I was really unfamiliar with office 2007 because some of menu look disappear. One of it is how to modify styles, finally I’ve found it by pressing Ctrl+Shift+S
Modify Styles in Office 2007 Sunday, Apr 19 2009
blogging office 2007, styles 2:58 am
Compare Date in Query method (AX 2009) Tuesday, Mar 17 2009
Uncategorized AX, Compare Date, query 6:58 am
Quite stuck in finding how to compare date in query method, but finally I found it. I need to convert it into strXpp so that the date convertion will convert correctly. Here is the example code:
……..
……..
queryRange = SysQuery::findOrCreateRange(qbsInventBatch, fieldnum(InventBatch,expDate));
queryRange.value(strfmt(‘(expDate > %1)’, Date2StrXpp(today())));
……
……
My Smart Speed Test Saturday, Feb 7 2009
blogging Smart, Smart EVDO 11:18 am
huuum, lama mau test speed dari Smart EVDO saya, di rumah saya (karang tengah), saya dapat 4 sinyal EVDO yang artinya full sinyal
dan Alhamdulillah speed yang saya dapet tinggi juga
Get Standard Information in AX Monday, Jan 19 2009
Ms Dynamics Axapta and Programming and blogging Axapta, Default information, getdate, getdatetime, getuserid 1:39 pm
What I mean by standard function is, how to get logon user Id, default date or default datetime. I found it little bit hard, so that I’ll post it to make me easier to search
/*get the default user Id*/
curuserid()
/*get the default date */
today()
/*get the default date time*/
utcdatetime utc4, utcNow;
;
utc4 = DateTimeUtil::utcNow();
utcNow = DateTimeUtil ::applyTimeZoneOffset
( utc4,
Timezone::GMTPLUS0700_BANGKOK_HANOI_JAKARTA
);
Select query by using connection class Monday, Jan 19 2009
Ms Dynamics Axapta and Programming and blogging Axapta 2009, Connection, query 1:33 pm
query in standard Axapta is really limited because I can’t define distinct. Here is the code to define it, but as a note, you need to define it as a server run object.
public client server static void GetBatchListed( itemId _ItemId)
{
Connection conn;
Statement stmt;
ResultSet R;
SqlStatementExecutePermission perm;
str sql;
TSWrkInventBatch TSWrkInventBatch;
;
conn = new connection();
stmt = conn.createStatement();
sql = “select * from InventBatch IB inner join (“;
sql += “select distinct c.InventBatchId from Inventsum a inner join InventDim b “;
sql += “on a.Inventdimid = b.inventdimid “;
sql += “inner join InventBatch c on b.InventBatchId = c.InventBatchId “;
sql += “where a.ItemId = %1 and “;
sql += “c.inventBatchId <> ”) as TBJoin on IB.InventBatchId = TBJoin.InventBatchId”;
perm = new SqlStatementExecutePermission(strfmt(sql,_ItemId));
perm.assert();
R = Stmt.executeQuery(sql);
while (R.next())
{
info( R.getString(fieldnum(InventBatch, InventBatchId)));
}
}
Hierarchy Clustering Algorithm Thursday, Jan 8 2009
lectures Algorithm, Hierarchy Clustering, Single Linkage Clustering 11:46 am
Huum, for a while I write a note to define Single Linkage Clustering Algorithm..
Well, I’m afraid I forget it or lose my note, so I’d like to write it here..
From data scratch, I need to redefine it into distance matrix..
//distance matrix
for i=1 to row
for j = i+1 to row
Mat[i,j] = Euclid(Data[i], Data[j])
end
end
//finish
then I need to find the minimum for each data point, and restore it into temporary variable
//run single linkage clustering
while 1
min = 0
for i = 1 to row
for j = i+1 to row
if min > Mat[i,j] and Mat[i,j] >= 0 then
min = Mat[i,j]
Dtx = i; Dty = j //store the row column that has minimum distance
end
end
end
MatH[Dtx, Dty] = min;
Mat[Dtx, Dty] = -1;
//it means, condition never meet the minimum value, because all value has already -1
if mean = 0 then
break
end
//finish
Hope it will run well

