ss_blog_claim=a37b70f67cd872812717e1fce7e83301
Latest Posts »
Latest Comments »
Popular Posts »

How to Write HTML Codes on Blog Posts

Written by techieDan on March 17, 2008 – 10:13 pm

Sometimes we wonder, how the heck one can write html codes on blogs, especially wordpress just for displaying purposes but without it affecting any codes on the blog page

This is where usage of <pre> tag comes in. Yes, by enclosing the html codes in <pre> tags, one can write html freely without displaying any changes in code.

Sample of pre TAG

<pre><font color=”#ff0000″>TEST</font></pre>

Of course the best possible way is for typing out < is by using ascii codes like &lt; which means less than. So that’s how I display some tags out in html. Need anymore clarification, drop me a line.

ps : > is symbol for &gt;


Tags:
Posted in HTML | No Comments »

Writing SQL statement with Loop Objects

Written by techieDan on March 15, 2008 – 12:19 am

Coding have never been the same!!! Some bad habits when writing codes which are redundant

String[] special = {"a1","a2","a3","a4"};  

Connection con = null;  

PreparedStatement stmt = null;  

PreparedStatement stmt2 = null;  

ResultSet rs = null;  

ResultSet rs2 = null;  

Class.forName ("com.mysql.jdbc.Driver")  

conn = DriverManager.getConnection (url, userName, password);  

String SQL_QUERY = " SELECT count(*) FROM tblABC WHERE " +
" name_tennis LIKE = ? ";  

String SQL_QUERY2 = " SELECT count(*) FROM tblABC WHERE " +
" name_swimwear LIKE = ? ";  

stmt = con.prepareStatement(SQL_QUERY);  

stmt2 = con.prepareStatement(SQL_QUERY2);  

for (int i=0;i<special[i].length;i++) {  

      stmt.setString(1,special[i]);  

      rs = stmt.executeQuery();  

      if (rs.next()) {  

         /* More work here */  

      }  

}  

for (int i=0;ii<special[i].length;i++) {  

stmt2.setString(1,special[i]);  

      rs2 = stmt2.executeQuery();  

      if (rs2.next()) {  

         /* More work here */  

      }  

}

The above is a very bad example of coding. It might work, and run smoothly but it’s really bad coding. What one should do is to not to let the code be redundant. For example, put both statements into one the loop.

for (int i=0;i<special[i].length;i++) {  

      stmt.setString(1,special[i]);  

      rs = stmt.executeQuery();  

      if (rs.next()) {  

         /* More work here */  

      }      stmt2.setString(1,special[i]);  

      rs2 = stmt2.executeQuery();  

      if (rs2.next()) {  

         /* More work here */  

      }  

}

What’s the use of this? Well, iif you have an object or rather a Bean to set into, you don’t have to loop and reloop. All can be done in the same loop. Well, hope this brings about some bad habits of coding java.


Tags: , ,
Posted in SQL, java | No Comments »

Different Speakers

Written by techieDan on March 8, 2008 – 1:59 am

They have the same functionality but in terms of quality, they are different. One from Labtec, another from Creative Sound Blaster. Basically though they are both the same as in very old old speakers.

Different Speakers

Well, which do you prefer? I bet most of you have Altec Lansing speakers with SubWoofer. Mine is already considered Computer Dinosaur Age. Well, it works fine for me still.

Click to find out about !


Tags:
Posted in Photohunt | 8 Comments »

Google PR Reconsideration

Written by techieDan on March 6, 2008 – 11:49 pm

I’ve heard of the numerous rumors. Yes, people who has been doing paid postings and excessively doing it has been slapped with the google PR. They have been slapped wth a PR0 thus reducing their chances to do paid postings. Well, how does one get back their Page Rank after that?

Some bloggers even go to the extend that they wanted to abandon their website all due to this. So now they wanted to get back their Page Rank. How do they do it? TechieDan will now show you the steps and information.

If you’re seriously considering to get back you Page Rank, do the following.

  • If you’re doing paid posting, clean up your links once again and add the rel=”nofollow” tag.
  • Avoid selling links on your site, or if you have to, make it minimal
  • Login to Google.com and request for consideration once again.

While requesting for consideration, write a reason as to why you’re requesting consideration and what steps you did. Hope this helps. If there are any other tips, don’t mind posting it here!


Tags: ,
Posted in SEO | 1 Comment »