You are currently browsing the archives for the Technology category.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Dec | ||||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
- AML (14)
- Foundation (4)
- Personal Finance (21)
- Technology (22)
- 7 Dec 2009: Move securities to Roth Account
- 28 Nov 2009: Leverage Checksum to determine identical files
- 4 Oct 2009: CAMS Certification Preparation
- 30 Aug 2009: Section 311 etc. (ACAMS Notes)
- 24 Aug 2009: FATF Membership Points (ACAMS Notes)
- 22 Aug 2009: Internet Casinos and Prepaid Cards/E-Cash (ACAMS Notes)
- 5 Aug 2009: Spousal IRA
- 15 May 2009: Buying Call Options.
- 7 Jan 2009: Watchlist filtering white paper
- 31 Oct 2008: Autonumber in Microsof Excel (works after inserting rows)
Archive for the Technology Category
Leverage Checksum to determine identical files
28 Nov 2009 by Chetan Shah.
An easy way to identify if two files are exactly the same or not is by determining the check sum of each file and comparing the check sum. If the check sum for both the files is exactly same then it can said that the two files are identical.
I have written a little java program which determines the check sum of file.
import java.io.FileInputStream;
import java.security.DigestInputStream;
import java.security.MessageDigest;
public class Checksum {
public static String computeCheckSum(String fileName) {
try {
FileInputStream stream = new FileInputStream(fileName);
MessageDigest md = MessageDigest.getInstance(”SHA-1″);
DigestInputStream dIS = new DigestInputStream(stream, md);
dIS.on(true);
byte [] b = new byte[1000];
while (dIS.read(b,0,1000) > -1);
byte []signature = md.digest();
//System.out.println(”The signature is :”);
for (int i = 0; i < signature.length; i++) {
System.out.print(signature[i]);
}
} catch (Exception e) {
e.printStackTrace();
}
return "";
}
public static void main(String [] a) {
Checksum.computeCheckSum(a[0]);
}
}
Posted in Technology | No Comments »
Autonumber in Microsof Excel (works after inserting rows)
31 Oct 2008 by Chetan Shah.
If you want the autonumber to work even after you insert a row in Excel, use the following formula.
=CELL(”contents”, INDIRECT(CONCATENATE(”B”, ROW()-1)))+1
I am assuming the list of values are in B column.
A simple formula =”aboverow”+1 does not work if you insert a new row which falls in the value range.
If you have a better way of doing this please let me know
Posted in Technology | No Comments »
Database Metadata Information Leverage
11 Aug 2008 by Chetan Shah.
Cannot stress the importance of an upto date database metadata information for an application or a suite of applications which exchange data amongst each other.
Metadata information can be leveraged in following ways :
- Impact Analysis
Application sourcing data from upstream application and/or sourcing data to downstream application can hugely benefit by having a metadata repository. It will enable the application owners to easily identify the producers and consumers and hence enable them to perform impact analysis.
- Data Reuse
As a byproduct of meta data harvesting exercise, the application owners will easily be able to identify redundant data (data which is sourced more than 1 once for a suite of applications)
- Documentation
Rather than dedicating time to create database documentation, any metadata tool will enable you to export html and publish it on your intranet possibly on sharepoint or wiki site which are easily searchable.
- Consolidation of Load Process
In an organization having a suite of applications, more often than not there are disparate data load batch processes executing to fetch data (from data warehouse let’s say). Metadata harvesting exercise will enable the application owner to identify and potentially consolidate the batch process on a single platform (etl tools like informatica)
Posted in Technology | No Comments »
Count Unique values in a list - Microsoft Excel
27 Jun 2008 by Chetan Shah.
To count unique values amongst a list of values, click here.
I am copy pasting the first suggestion here only to avoid future link failures.
Let’s say you want to find out how many unique values exist in a range that contains duplicate values. For example, if a column contains:
* The values 5, 6, 7, and 6, then the result is three unique values—5 , 6 and 7.
* The values “Buchanan”, “Dodsworth”, “Dodsworth”, “Dodsworth”, then the result is two unique values—”Buchanan” and “Dodsworth”
1. Ensure that the first row in the column has a column header.
2. On the Data menu, point to Filter, and then click Advanced Filter.
3. In the Advanced Filter dialog box, click Copy to another location.
4. If the range that you are counting is not already selected, delete any information in the List range box and then click the column (or select the range) that contains your data.
5. In the Copy to box, delete any information in the box or click in the box, and then click a blank column where you want to copy the unique values.
6. Select the Unique records only check box, and click OK.
The unique values from the selected range are copied to the new column.
7. In the blank cell below the last cell in the range, enter the ROWS function. Use the range of unique values that you just copied as the argument. For example, if the range of unique values is B1:B45, then enter:
=ROWS(B1:B45)
Posted in Technology | No Comments »
Improve HTML page loading time
21 Jun 2008 by Chetan Shah.
I cannot stress enough the importance of compression while loading html pages. One of the web applications (struts, weblogic implementation) I worked on was experiencing slowness while loading a search results page. The page used to take about 4 seconds to display (assume pure static content for the sake of this discussion) The page size was 638K! and there was no way I could reduce the amount of “visible” information.
Couple of things I observed and implemented which really helped cut 2 seconds of the page loading time. I am sure a lot is infrastructure dependent i.e : how stressed the network is etc. but there are things which are under developer’s control which we can leverage to improve page loading time.
Observation #1 :
The jsp had a for loop, which contained td style=”font-family: “Trebuchet MS”;font-size: 12px;color: #797b7a;font-weight: normal;” …. /td
I. e. : if the loop iterates for 500 times, that is the number of times “font-family: “Trebuchet MS”;font-size: 12px;color: #797b7a;font-weight: normal;” gets repeated.
Simple Solution : Point to note is : less number of characters used in the html (especially in a for loop) the better it is. Observation #2 : Simple Solution : The effort to compress at the server level and decompress at the browser level takes much less time as compared to transmit 350K over the wire. Many thanks to Jason Falkner for his excellent article on this. Completely agree with him to make the compression as part of a must-do for any web application
Posted in Technology | No Comments »
3 Jun 2008 by Chetan Shah.
There are times when we need to make the data element on an excel columns to all line up in a row. For example : Transfer the data element in B1 to A2, C1 to A3, D1 to A4, E1 to A5 etc… Following are the steps to transpose the elements in a particular row to a given column. 1. Select all rows (single column) where you want the elements to be transposed to. So for the above example it will A2, A3, A4, A5. 2. Enter =transpose(b1:e1) 3. Hit Shift + Ctrl + Enter 4. Done!
Posted in Technology | No Comments »
Put this in css, refer that css in your jsp and change the td to
. Huge reduction in generated html size. Instantly!
The page after it was built was not compressed. Even after the above change, the page was about 350K.
All browsers now support gzip compression. Add a filter at web.xml level and compress your html content before it hits the wire. A *huge* size savings here. The page size was reduced to 17K! while over the wire. Transpose Rows / Columns in Microsoft Excel
