Wow, it is finish. What a relief because I’ve been trying to this pdf extractor and text filter for most than two months. It involve a lot of thinking and searching for the most best way or trick to do this. For the extracting part it is easy but when it comes to text filtering, hell set loose. I just found out that .Net support unicode not ascii code. Some of the character did overlap and won’t fire any problem. Problem do come when the code exceed a certain limit. I’ve experiance this when I tried to remove a postrophy (‘).
input = “home’s”;
input = input.Replace(“\’”, “”);
The program failed to identified it and this mean that I failed to tell the computer what it should do. At first I was blaming the computer and .Net for unable to recognize the character. After some times (and cursing a lot), I tried to break down the code see line by line what happen inside the process. I was (really3x) supprise that the postrophy value is 8217. This is the reason why the program failed to detect it. So what I do is I make a variable for that postrophy:
char postrophy = (char)8217;
string postrophyS = postrophy.ToString();
And with this, I reset my replace statement and able to detect the evil postrophy. Tq
As usual, every month I got a news letter from microsoft (Yes, I’m fan based microsoft) that explain the latest news, article and etc that related to their development. Most of the time I just deleted it (Sorry BG) but today I got the time to read it a little bit. One of the article is reffering to the gadgets or power tools that other os (mac, linux etc) have and microsoft should have. Good article because it point out third party tools that can nearly do the same thing. Most of it is free but there are fews that you need to bought. I did browse through a few suggestion but at the end I decide to stay with the basic. Much faster in term performance (I run multiple Microsoft Visual Programming at the same time) and save a little bit of space (40 gb only).
There is one link to a share view apps. Quite nice because you can share your selected view (not all like my ym) with your friends. I have tried it with sazly. I like this tools because it could ease my communication in term of code writing n designing. My friend dont need to send their code to me (email), just share the view. In fact a lot faster because if you give the permission, that person can edit on the fly. A little drawback is it could be slowing down your machine. Make sure that you have enough power to run this tools.
Click here if you like to try it out. Share your view with me if you need any help
This is how I made my alternate table colored
<?
echo “<table border = ‘1′ cellpadding=’5′>”;
echo “<tr bgcolor=’#9999CC’>”;
echo “<td>No.</td>”;
echo “<td>Grant Title</td>”;
echo “<td>Grant Leader</td>”;
echo “<td>Grant Type</td>”;
echo “<td>Status</td>”;
echo “</tr>”;
while ($row = mysql_fetch_array($sql,MYSQL_ASSOC))
{
$color = ( $i % 2 ? ‘#FCFCFC’ : ‘#9999CC’ );
echo “<tr bgcolor=’”.$color.”‘>”;
echo “<td> ”.$i.”</td>”;
echo “<td>”.$row['title'].”</td>”;
echo “<td>”.$row['leader'].”</td>”;
echo “<td>”.$row['grant'].”</td>”;
echo “<td>”.$row['status'].”</td>”;
echo “</tr>”;
$i++;
}
echo “</table>”;
?>
I got this error while opening my xml file. Most of the website stated that the xml file is missing a root. Going back and check my xml file, I notice there is a root element. Root is not the problem here. I played around with the code a few times and notice that I was trying to open the same file twice. After I remove the first open instruction, everything was fine. So I conclude that we can’t open the xml file twice or an xmlException will be fired. Tq