Free Information Technology Magazines and eBooks

Saturday, May 02, 2009

How to Cartoonize yourself

Cartoonize meI stumbled with this cool site that let you convert any existing pictures of yours to cartoon portrait. It is called BeFunky and it has a photo application called cartoonizer. The service is easy to use, free and instant. After seconds, you can download your cartoonize picture to your computer or share it through your favorite social networking sites. To do all of this, there is no software to download, all processing are done online. Now let's turn your offline personalities within photos and videos into powerful online visual expressions. Just follow this step-by-step procedure to start the cartoon of you.


1. Go to BeFunky photo apps page.
2. Choose Cartoonizer from the list of tools.
3. Select where you want to get your file: upload it from your computer, upload from a website, upload from photosharing sites or use your web cam.

Upload picture to cartoonize

4. After uploading the picture, Befunky will allow you to edit your final photo before applying the cartoon effects.

Final Editing of your cartoon pictures

5. Then after Befunky processed your photo. You can save it to your computer or share it on your favorite photo sharing website.

Cartoon Photo of Me

There you have it! Have some fun with your own cartoonist on-demand!

For more information on cool softwares, subscribe now.


Friday, May 01, 2009

How to translate SQL 2005 database script to sql 2000

SQL 2005 Generate ScriptsMy brother who is a newly computer science graduate was developing his first application for his first customer as a freelancer. It was a billing system from scratch using VB.NET and SQL 2005. He already generated the SQL 2005 database scripts to be use in deployment on his client's server. Unfortunately his customer has only SQL 2000 license and not SQL 2005. So the dilemma was, how can he deploy his application on SQL 2000? Will his SQL 2005 scripts work on SQL 2000?


He tried running the SQL 2005 scripts on the SQL 2000 query analyzer and the result was a series of errors that look like this:

Msg+170,+Level+15,+State+1,+Line+7Line+7:
+Incorrect+syntax+near+'('.


Lucky for him, his big brother knows the answer. You can translate SQL 2005 database scripts to a form that is executable or readable on SQL 2000. To generate such kind of SQL script, here is a step-by-step procedure:

1. Open your SSMS (SQL Server Management Studio).
2. Right click your database then choose "Generate Scripts" from the context menu.



3. In Choose Scripts Option, Find the "Script for Server version" then select SQL Server 2000.

Script for Server version Option

4. Click next to finish.

Then it will generate the scripts compatible to SQL Server 2000.

For more SQL fix, subscribe now.




Thursday, April 30, 2009

How to Search text within files in Windows Vista

Search text within files in Windows VistaI received a call last night from a friend, he was asking where the Advanced Search on Windows Vista Explorer (similar to Windows XP) is located. I tried to look for it myself but it was not simple as I expected so I thought it is good topic for my today's blog. Unlike in Windows XP, when you click a folder to search, there is a separate textbox to put the "Word or Phrase to Search". You won't find such search window in Windows Vista but you still can enable searching text within files in five(5) steps.




1. From and Explorer windows, Tap Alt. This should show the hidden menu of the windows vista explorer.
windows vista explorer hidden menu

2. On the menu, click Tools > Folder Options.
3. On the folder options window, select Search tab.
4. There are three selectable option for searching: file names only or content or both.
Windows Explorer Search Option

5. Choose "Alway Search file names and contents" then click Apply.


Now just type the text you are looking for on the Search box located at top-right of your windows explorer.

If you want more information about Windows Vista Tricks subscribe now.

Windows 7 "XP Mode" system requirements revealed

Windows 7 XP Mode System RequirementFour days ago I blog about the Windows 7's XP mode feature that will be soon included on the upcoming release candidate version. This morning, the system requirements for the new Windows have been revealed. My first impression was its a quiet bit overkill considering your just adding one feature. And I'm frustrated because I won't be able to test it on my current system.


These additional requirements are on top of the existing specifications of the current candidate version of Windows 7.


2GB system RAM


Ohh. I guess, my hi-powered 2G RAM laptop running will be needing an upgrade


CPU that supports chip-level virtualization


The question is which AMD or Intel procecessor supports chip-level virtualization. You can check the following links:

Intel Processors
AMD Processors

For those won't be needing XP mode, you have nothing to worry. XP mode feature is just an add-on of the higher-end editions of Windows 7 (Professional, Ultimate and Enterprise). So its still up to you if you need the resource hug feature but be ready for your machines.


Wednesday, April 29, 2009

VB.NET: Add custom object type on ComboBox

One of the advantage of the .NET combobox is you can add any custom object type as a list item. This can be helpful if you want store items that has multiple properties on a combobox. In a conventional way, we only store primary values using the Item.Add(string) then we use the value to retrieve other information from the data source using database queries. However such coding can make your application slower, because the system have to run a data query every time you need the info of the other fields. Using object as an item, you just have to run a data query once (usually during Form_Load) and store all field values at once.

Let me show you an example.

1. Create an object structure that will use as item type on our ComboBox. The structure contains four (4) properties.



Private Structure ProductType
Dim ProductID As Integer
Dim ProductDesc As String
Dim Price As Double
Dim Units As String

Public Sub New(ByVal _ProductID As Integer, ByVal _ProductDesc As String, ByVal _Price As Double, ByVal _Units As String)
'store these values
ProductID = _ProductID
ProductDesc = _ProductDesc
Price = _Price
Units = _Units
End Sub

Public Overrides Function ToString() As String
Return Me.ProductDesc
End Function
End Structure


2. Create a function to retrieve set of records from your database. It will pass four (4) record fields as ProductType object. This function can be called on Form Load or shown event.


Private Sub LoadProducts()
Dim con As New SqlConnection
Dim cmd As New SqlCommand
Try
con.ConnectionString = Settings.ConnectionString
con.Open()
cmd.Connection = con
cmd.CommandText = "SELECT * FROM tblProducts ORDER BY ProductName"
Dim lrd As SqlDataReader = cmd.ExecuteReader()
cboProduct.Items.Clear()
While lrd.Read()
cboProduct.Items.Add(New ProductType(Convert.ToInt32(lrd("ProductID")), lrd("ProductName").ToString(), Convert.ToDouble(lrd("Price").ToString()), lrd("Units").ToString()))
End While

Catch ex As Exception
MessageBox.Show("Error while retrieving records on products table..." & ex.Message, "Load Products")
Finally
con.Close()
End Try
End Sub


3. Then you can retrieve the object information of the selected item by casting (CType function):


Private Sub cboProduct_SelectedValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboProduct.SelectedValueChanged
With CType(cboProduct.SelectedItem, ProductType)
txtDescription.Text = .ProductDesc
txtUnitPrice.Text = .Price
txtUnits.Text = .Units
End With
End Sub


To summarize, the example above provided us the following process.
- Create ProductType structure to hold database records
- Load records from tblProducts with the following fields ProductId, ProductDesc, Price and Units
- Store all these information to the combobox using the structure of ProductType.
- Retrieve object fields during SelectedValueChanged.

If you want to know more about VB.NET code, subscribe now.

Wolfram|Alpha, The Google Killer?

Wolfram Alpha, The Google Killer?The hype roaming around webosphere is that a google killer (yes not twitter) will be born on May 2009. The new search engine is called Wolfram|Alpha created by Stephen Wolfram. Wolfram|Alpha is built on top of 5 million lines of Mathematica code which currently run on top of about 10,000 CPUs. Mathematica is a computational software program used in scientific, engineering, and mathematical fields and other areas of technical computing. It was developed by a team of mathematicians and programmers which Stephen led. So is it really a Google Killer?


According to RWW article, although it looks like it can live up to the hype, it cannot be a "Google killer" because it different from traditional search engines. The goal of Alpha is to give everyone access to expert knowledge and the data that a specialist would be able to compute from this information. Based on preliminary demonstrations, When users typed a search query, Google gives you pointers to potential answers while Wolfram|Alpha will give you a computed answer. It sending us information based on what it can compute. Unlike Google which searches the web for information, Alpha searches repository of curated data from public and licensed sources. Wolfram|Alpha then organizes and computes this data with a sophisticated Natural Language Processing algorithms. Surely I will be waiting for May launching of Wolfram|Alpha. It may not directly kills Google in terms of web searches, but definitely it still be a competitor.

If you want to know more about the future of Wolfram|Alpha, subscribe now.


Tuesday, April 28, 2009

VB.NET: How to use AndAlso and OrElse

For those who don't know yet, there are new logical operators in VB.NET's town. They are AndAlso and OrElse. The new operators are basically shortcut versions of Multiple ANDs and ORs. On this post, I will try to explain the difference of the new operators from their traditional counterparts. To start lets have a look at the following VB.NET Code.



If lvInvoiceItems.SelectedItems.Count > 0 Then
If MessageBox.Show("This will delete " & lvInvoiceItems.SelectedItems(0).Text & "? Continue?","Confirm",MessageBoxButtons.YesNo ) = Windows.Forms.DialogResult.Yes Then
lvInvoiceItems.SelectedItems(0).Remove()
End If
End If


The code above is a typical IF condition that will check if there are selected items from lvInvoiceItems then ask for user confirmation before deleting the first selected item. Let's experiment and make the join the two IF condition. The following code can result to runtime error:


If lvInvoiceItems.SelectedItems.Count > 0 And MessageBox.Show("This will delete " & _ lvInvoiceItems.SelectedItems(0).Text & "?. Continue?","Confirm",MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
lvInvoiceItems.SelectedItems(0).Remove()
End If


When will it be runtime error? lvInvoiceItems.SelectedItems.Count = 0. Because both expression will be evaluated and since the selecteditem count is zero "lvInvoiceItems.SelectedItems(0).Text" will raise a runtime error. This is where AndAlso comes to the rescue. Take a look at the following revised code:


If lvInvoiceItems.SelectedItems.Count > 0 AndAlso MessageBox.Show("This will delete " & lvInvoiceItems.SelectedItems(0).Text & "?. Continue?","Confirm",MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
lvInvoiceItems.SelectedItems(0).Remove()
End If


If the first expression "lvInvoiceItems.SelectedItems.Count> 0" is false, the second IF expression will not be evaluated anymore (avoiding a runtime error).

The expression after AndAlso will only evaluated if the first expression is true.


Okay let's move to other new operator, OrElse is the shortcut of multiple OR condition. Lets enhance the code above and add some more validation:


If UserAccess = "ADMIN" OrElse UserAccess = "POWERUSER" Then
If lvInvoiceItems.SelectedItems.Count > 0 AndAlso MessageBox.Show("This will delete " & lvInvoiceItems.SelectedItems(0).Text & "?. Continue?","Confirm",MessageBoxButtons.YesNo) = Windows.Forms.DialogResult.Yes Then
lvInvoiceItems.SelectedItems(0).Remove()
End If
End If


On traditional OR condition, both expressions/conditions will be evaluated. In OrElse, If the first expression is true, the second expression is not evaluated.

This kind of code technique is called short-circuiting. If the result of the first expression evaluated determines the final result of the operation, there is no need to evaluate the other expression, because it cannot change the final result. Short-circuiting can improve performance if the bypassed expression is complex, or if it involves procedure calls.



GE 500 GB standard-size disc?

Holographic Versatile DiscGeneric Electric labs claims that they have successfully tested to fit in 500GB into a standard-size disc. Is it true or a theory?. The new technology is called holographic storage, an optical process that stores 3D images and digital data together, encoding it all and placing it on light-sensitive material such as a DVD. The theory, holographic storage can pack data far more densely than current optical technology that is used in conventional DVD and Blu-ray

Here are some technical aspects of the technology according to Wikipedia.

The ultra high-capacity disc already has a brand name.


The Holographic Versatile Disc (HVD) is an optical disc technology that, in the future, may hold up to 3.9 terabytes (TB) of information, although the current maximum is 500GB. It employs a technique known as collinear holography, whereby two lasers, one red and one green, are collimated in a single beam. The green laser reads data encoded as laser interference fringes from a holographic layer near the top of the disc while the red laser is used as the reference beam and to read servo information from a regular CD-style aluminum layer near the bottom



Even this technology come sooner, you still need to buy HVD reader. Another costly investment.. so I think I will stick with my flash media :)

Monday, April 27, 2009

How to show only specific number of posts in Labels search

Maximum Post for blogger labelsToday I found a bug on my blogger template, the adsense on my right navigation bar is not showing any ads when I click specific Label. I found out that most of my labels contains more than ten posts already. On my blog post section, my adsense between posts was set to display on every 5 posts. This was a problem if the Labels contains more than 10 posts because it will display 3 or more adsense, making my adsense at the right navigation bar empty.

To prevent this, we can set the specific number of posts to be displayed when the user click any label.


Here's the step-by-step instruction to implement maximum posts for labels:

1. Login to your blogger account.
2. Go to Layout>Edit HTML, Make sure to click Expand Widget Templates
3. Find this expression "expr:href='data:label.url" as show below:


<a expr:dir='data:blog.languageDirection' expr:href='data:label.url'>
<data:label.name/>
</a>


4. Now add the max-results parameter. The previous code should now look like this:


<a expr:dir='data:blog.languageDirection' expr:href='data:label.url + &quot;?max-results=10&quot;'>;
<data:label.name/>
</a>



Thank you for reading, if you want to know more about blogger tips and tricks, subscribe now.

Facebook for developers soon

Facebook to open up to developersSoon Facebook Inc. will open up user-contributed information to third-party developers according to a report Sunday in The Wall Street Journal. The plans, expected to be discussed at a developer event in Palo Alto on Monday. The new developer feature will allow developers (with users' permission) to build services that access the photos, videos, notes and comments users upload to Facebook.

Facebook won't be charging developers nor users hoping that developing new ways to access their database will build user loyalty and get people to engage more often with the site. But this move could backfire, If users prefer the other interfaces developers build, they may spend less time on Facebook.com, which is where the company makes money by selling ads.

Sunday, April 26, 2009

How to Reduce MS Access(.mdb) file size after deleting the content

Reduce MS Access(.mdb) file size after deleting the contentOne of our company user today called and ask me about his MS Access database problem. He was asking why his MS Access file which 20MB is still the same size after deleting all records on its database. After explaining the solution I thought I might post the workaround here to help others too. Microsoft Access doesn't reclaim free up space used by records after they were deleted but you can reclaim it manually.


Here's a step-by-step on how to do it (please backup your original copy first before continuing):

1. Open your MS Access file with MS Access Office. If your trying to compact shared database, remove the sharing first and be sure your the only one using it.
2. On the menu, select Tools>Database Utilities>Compact and Repair Database...

Reclaim MS Access File Free Space

3. MS Access will automatically close, compact and re-open your MS Access file

After these steps, your file should be smaller now. Also if you have Auto number fields, all of it will reset to 1.