Technology Articles

The science of today is the technology of tomorrow. Browse Technology related articles.

Dot. NET Articles

Browse the Dot.NET technical articles.

Web Design & Development

Browse Web Design & Development Articles which includes Technologies of Drupal, Joomla, CodeIgnitor, JQUERY, CMS, etc.

Health Articles

Browse Health Tips & Articles

Thursday, December 16, 2010

Black Seed - Health Benefits and How to Use ?

I got this information from a very close friend of mine. After doing some background research I found some very useful and interesting information. So I am writing this blog post so that it will benefit everyone. If you find it interesting and helpful, please click like in the post and share it with your friends.

Monday, October 11, 2010

Apache log4cxx framework - Example using Pthreads - Part Two

This blog post is continued from Apache log4cxx framework - Part One

This post comprises of a simple Configuration file and how it can be incorporated to a c++ code file for using the log4cxx framework.

Add the following simple xml Configuration file and name it as "MyLog4CxxConfig.xml"

<?xml version="1.0" encoding="UTF-8" ?>
 <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> 

Sunday, October 10, 2010

Php Mysqli extension

The MySql Improved Extension, a.k.a mysqli is faster more improved version of existing mysql. It is available in PHP 5 or later versions. The source code of mysqli is available at ext/mysqli. For further information click here.
A simple example how to connect and insert temp data to database 'mydb' and table 'mytable'.
Lets add DbConnector.php first,

Apache log4cxx framework - Part One

I happened to work with Apache log4cxx, a logging framework for c++. This framework offers lot of capabilities from simply outputting a log message to console, writing to log files, socket streaming and database logging. Best thing that i love about this framework that it is Thread safe.

Apache log4cxx, You can download it here

Log4cxx comprises of three main parts,


1) Public Class Logger
- Top level entry point of Logger

Sunday, May 2, 2010

Green Tea and Its 25 Health Benefits

I got this information from Email. It was very useful and I want to remember this information forever and also wanted to help others also by letting them know about this, so decided to post it in my blog. If you are reading this blog post, hope you will find this useful. Please re-post or send it to your friends and relatives if you find this useful.

Friday, April 23, 2010

How to TripleDES encrypt decrypt data? - Part Two


This post has reference to part one of this Article.

Inside our "TripleDESCrypt" class, lets implement another method to read the MD5 HashKey generated from the Secret Key from the User. This method will load the TripleDESKey.xml file and returns the HashKey in String format.

How to TripleDES encrypt decrypt data? - Part One


In this post, a simple demonstration of how TripleDES Encryption algorithm can be implemented using System.Security.Cryptography namespace in .NET will be explained.

First of all, we need to create a XML file where we will be storing our Special Key. This Key will be used for both Encryption and Decryption not like RSA. DES is symmetric key encryption algorithm.

Monday, April 19, 2010

How to RSA Encrypt Decrypt Data (C#) ?


This post has reference to part one of this Article.

Inside our "Crypt" class, lets include two more methods.



How to Generate RSA Encryption keys (C#) ?


In this post, Simple Demonstration of RSA Encryption Algorithm will be explained.

Here, we are going to make use of the System.Security.Cryptography namespace.

Friday, March 26, 2010

How to convert Image format programmatically (.NET) ?


To convert an Image from one format to another, use the following Method.
Here, the known formats include, Bmp, Emf, Exif, Gif, Icon, Jpeg, Png, Tiff, Wmf etc.


Tuesday, March 16, 2010

WCF and HTTP Error 404.3


Once you create a WCF Service from Visual Studio 2008 and after publishing to IIS, when you browse your Service, you will receive HTTP 404.3 Error. But you will not find any discrepancies in IIS Configuration of the Service.


Natural Remedy for Heart Block Vein Opening

I got this information from Email. It was very useful and I want to remember this information forever and also wanted to help others also by letting them know about this, so i am posting it in my blog. If you are reading this blog, hope you will find this useful. Please re-post or send it to your friends and relatives if you find this useful.

Monday, March 15, 2010

Most Insane Coincidences You Won't Believe Actually Happened

I read an interesting Blog about Six insane coincidences and I have selected two most striking and amazing out of the six. I would like to share in my blog as well because its just awesome. Just read and see...

Friday, March 12, 2010

Using LINQ to SQL Template - Part Two


This post has reference to part one of this Article.

Create a new Class with the name "MyLinq". We are going to use the DataContextFactory Class which we created in Part One. Also assume in our database we have Table with name "User" and with the following Definition.

Thursday, March 11, 2010

How to convert Dictionary List to XElement


XElement represents an XML element. This post will describe about how to convert Dictionary to XML Format.

Assume you want the XML to be in the following format,
<paramlist><param><key>1</key><value>100</value></param><param><key>2</key><value>150</value></param></paramlist>
The Dictionary is having <String, String> Format with Two Entries inside as shown below.
<key, 1>
<value, 100>

Wednesday, March 10, 2010

how dinosaurs become extinct??? explanations and final answer

For the past couple of decades, There have been many explanations for the extinction of the dinosaurs 65 million years ago. I have summarized some of the key arguements and contradictions below,

Using LINQ to SQL Template - Part One


LINQ to SQL is a component of the .NET Framework version 3.5. Click to learn more about LINQ to SQL

First of all, in your Project or Website, add a new item from the "LINQ to SQL" template. This will create a file with extention ".dbml" and code behind files. Now from Server Explorer, drag and drop the required Tables from the DB. At this point, we will be able to save the Server Connection String to connect to the Database automatically. If its a Web application, it will be saved in web.config and for Windows Project, it will be saved in Settings.settings file.

Tuesday, March 9, 2010

Clean your kidneys with parsley

Years pass by and our Kidneys are filtering the blood by removing salt, poison and any unwanted entering our body. With time, the salt accumulates and this needs to undergo cleaning treatments and how are we going to overcome this???

Monday, March 8, 2010

How to use QueryString


Assume we need to pass certain Variable content between html or aspx pages, often the Request object of QueryString is used. QueryStrings are combination of {key=value} pairs joined by '&' and added to the html or aspx page Url. This blog will explain in simple terms how to use QueryString.

Sunday, March 7, 2010

How to send Email using Gmail SMTP Mail Server


Assume our requirement is to send email from sender@gmail.com to receiver@gmail.com. Here we are going to use the configuration settings of Gmail SMTP mail server. Click here to get the Details of Gmail SMTP Mail Server Configuration.


How to load XML File and convert to Dictionary


Assume you have a XML file with the following format.

<paramlist><param><key>1</key><value>100</value></param>
<param><key>2</key><value>150</value></param></paramlist>



Thursday, March 4, 2010

Mobile Web Development Tips (xhtml)

Web Developing for mobile is not the same as developing a website for PCs. I have summarized some tips which might help any beginner which i have found during Mobile Web Development.


px to em conversion
In mobile web, a pixel difference is also crucial as the website is viewed in Mobile which will have a small screen width of 176px/240px/320px etc. In the CSS the best practice is to use .em as it is directly proportional to font size. The below given link is very useful to convert px to em.

dotMobi
The .mobi top-level domain is the ICANN approved top-level domain specifically for mobile devices. A sample Mobile Web, http://www.domain.mobi


How to Convert Datatable to XML programmatically


Lets assume our requirement is to create a Data Table and convert it to XML format. Use the following block code for your purpose.

DataSet myDS = new DataSet();
DataTable dtMyTable = new DataTable("preview");

DataColumn myCol0 = new DataColumn("facility");
myCol0.DataType = System.Type.GetType("System.String");
myCol0.MaxLength = 256;
myCol0.AllowDBNull = true;

DataColumn myCol1 = new DataColumn("doctype");
myCol1.DataType = System.Type.GetType("System.String");
myCol1.MaxLength = 256;
myCol1.AllowDBNull = true;

dtMyTable.Columns.Add(myCol0);
dtMyTable.Columns.Add(myCol1);
dtMyTable.AcceptChanges();

DataRow myNewRow = dtMyTable.NewRow();
myNewRow["facility"] = "MyFacility Works Great!";
myNewRow["doctype"] = "MyDocType Field Does Too!";
dtMyTable.Rows.Add(myNewRow);
dtMyTable.AcceptChanges();

myDS.Tables.Add(dtMyTable);

myDS.WriteXml(Server.MapPath("~") + "\\sample.xml");


How to change Formula Field Variables in Crystal Report Programmatically


Open the crystal report you have just created in your project, and from the Field Explorer -> Formula Fields, right click and create Two new Formula Field Variables, lets name it as "parameter1" and "parameter2" respectively. Then drag and drop inside the Crystal Report and place it anywhere according to your need.

Then, use the below code (assume if we need to pass "Hello" & "How are you?" during runtime)

ReportDocument ReportDoc = new ReportDocument();
ReportDoc.Load(Server.MapPath("~") + "\\CrystalReport1.rpt");

List paramList = List();
paramList.Add("Hello");
paramList.Add("How are you?");

for (int i = 1; i < 2; i++)
           if (ReportDoc.DataDefinition.FormulaFields[i-1].FormulaName 
                                                                           == "{" + "@parameter" + i + "}")
                      ReportDoc.DataDefinition.FormulaFields[i-1].Text 

                                                                                    = "\"" + paramList[i-1] + "\"";




Guide to Excel Reporting with MS SQL data using Crystal Report


First of all you need to create a New Data Set object from the Add new Item. Inside the Data set you need to create a new Table Adapter which will Fill data to a Data Table.

Then you need to create a new Crystal Report File from Add new Item. In the Crystal report, from the Field Explorer -> Database Fields, now you will able to see the created Data Table with all the Column Elements selected.

Select the Column Elements needed, and add them to your Crystal Report and arrange them to your specific need. Using Crystal Reports->Design->Printer Setup, you can adjust the size of the Crystal Report according to your need. Also to make it a template for Excel, you need to Suppress the Page Footer from the Section Expert.
Then the below given Block of code is used for Excel Reporting.

try {
TempDataSetTableAdapters.TempTableAdapter temp = new MyProject.TempDataSetTableAdapters.TempTableAdapter();
TempDataSet.TempDataTable tempTable = new TempDataSet.TempDataTable();

DataTable DT = tempTable;
temp.Fill(tempTable);

ReportDocument rpt = new ReportDocument();
rpt.Load(Server.MapPath("~") + "\\TempReport.rpt");
rpt.SetDataSource(DT);

Response.Buffer = false;
Response.ClearContent();
Response.ClearHeaders();

rpt.ExportToHttpResponse(ExportFormatType.Excel, Response, true, "Report");
}
catch (Exception ex){
}



Recommended PDF Readers - Blackberry 8900

Interestingly, PDF files sent as an Attachment to an email can be opened and viewed from the BlackBerry Attachments Service.

But there are no PDF Reader that comes with Blackberry for Free for us to view any PDF files stored in Device or Media Card. i.e: we need an additional PDF Reader Application for the Blackberry to read PDF files.

One Solution would be to Upgrade the DocsToGo (from Dataviz) which comes with Blackberry, to the Premium Version. The Premium version additionally has a Free PDF Reader known as PdfToGo.

But the cost of Documents To Go Premium Edition - $49.99 (Blackberry Curve 8900)
- visit Documents To Go Premium Edition

The other recommended PDF Readers for Blackberry are,
BeamReader : $17.99 - Buy BeamReader
Repligo : $14.95 Buy Repligo

Wednesday, March 3, 2010

Open a doc file saved in SD Card programmatically - Blackberry 8900

A doc file saved in SD Card can be opened by WordToGo Application in Blackberry 8900. But to open it Programmatically, you need to use the following Lines of Code.

BrowserSession brSession = Browser.getDefaultSession();
brSession.displayPage("file:///SDCard/documents/hello.doc");