Skip to main content

Posts

Showing posts from 2009

Other Technologies

Apparently, I've been blabbering about .net technologies in this blog. It took one comment to this blog for me to realize that this blog was about technology, and not just .net technologies. Well, I don't know much about other programming language like perl or python or ror, as what was suggested, but I do know some other like Delphi, php, asp, asp.net, java, and c/c++.

Connecting to MSSQL 2005 Server with VB.net

Connecting to MSSQL Server with VB.net is fairly easy. Just follow the steps below:

What many bloggers write

I have been blogging for two years now. But unlike other bloggers, I write mostly geeky stuff. I created this blog on the influence of my student. Yes, a student taught me how to blog hahaha. What fascinated me was that there was money in blogging. Apparently many of them have been earning from their blogs. I tried it and indeed I earned! Cool! However, I am quite lazy at writing. I don't put my thoughts into writing. But for those who are really hardworking, they earn. Well, most posts that pay don't really fall under my expertise. I don't even like to write my own autobiography. Mostly, earning blogs are topics ranging from personal stuff to online gambling . It is not only through blogging that people can earn. Many also create their own websites. They earn through adsense. They optimize their websites through building links from other websites including blogs. A forum can also be created to optimize the website so that more traffic will come. For aspiring bloggers, you

Google Chrome OS is not a browser, Will microsoft products like C# run on it?

Google Chrome Blog: Google Chrome OS - FAQ I really don't think it's a browser as what many have been speculating. It's written on their official blog that it's an Operating System that runs on top of a Linux kernel. It's way different from a browser or even a Web hosted Operating System like the http://g.ho.st. My question now is will Microsoft's products like C# and other .net technologies still run on Chrome OS? I hope so.

Using ProgressBar in C#

1. Create a Windows Application 2. Drag a ProgressBar Control and set its Dock property to bottom and its Step property to 1 4. Drag a Timer Control to the form and set its Enabled property to true. 5. The form should look like this: 6. Double click the timer and add the following code: if (progressBar1.Value >= 100) { timer1.Enabled = false; return; } progressBar1.PerformStep(); 7. Run the application. :D Download the code: Using ProgressBar in C#

Corporate Team Building

Creating a simple MDI Application using C# Express 2008

Open C# Express 2008 and create Create a new Windows Application. At the properties pane on the right side of the IDE, locate the IsMdiContainer property of the form and set it to true. Add a MenuStrip to the form and add an item (e.g. "New Window"). Add another form (this will serve as a child form) Add a textbox to the form with the following attributes: Multiline = true, Dock=fill; Go back to the main form and double click the first item on the MenuStrip to view the code. Type in the following code (use Form2 if that's the name of your second form): Form2 newForm2 = new Form2(); newForm2.MdiParent = this; newForm2.Show(); The code should look like this: public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void newWindowToolStripMenuItem_Click(object sender, EventArgs e) { Form2 newForm2 = new Form2(); newForm2.MdiParent = this; newForm2.Show();

What happened to Microsoft's website?

I have been trying to access Microsoft's website at http://www.microsoft.com since last night but was never successful. At first I thought there was something wrong with my wireless router again so I tried looking at the hardware. There was no problem at all. I tried pinging other website and they responded. That was the time I concluded that Microsoft's website was down. Are they doing maintenance? I wanted to download the .net framework 3.5 service pack 1.

New Version of the Free C# IDE

icsharpcode.net has released its beta version for the Free and Open Source C# IDE, SharpDevelop 3.1. It is available at http://www.icsharpcode.net/OpenSource/SD/Download/ . The following are updates to this release: IronPython Windows Forms Designer Profiler for Managed Applications Subversion 1.6 Update to Boo 0.9.1.3287 Update to WiX 3.0.5301

New Layout again

Recently, my PR dropped to only 1. It's because I've forsaken this blog. Well, not because I don't like posting, but I was just really busy. It takes time to post some codes for tutorials and It needs concentration so that people reading the tutorials won't have too much burden implementing them. As of now, I'm reviving this blog. I will be posting more tutorials and this time, I will focus on C# codes. Anything C# plus other programming or dbms. Crystal Reports, MysQL, MS SQL Server, Firebird and many more as long as it includes C#. Occasionally, I might include non-C# posts but it will still be IT related. It's not like I'll be needing a Minneapolis Garage Door or something. I'm only trying to make this blog site better to have high customer service and consistent excellent quality of work . Right now, I'll be doing a re-optimizing for this blog site. I hope I'll get it back as soon as possible. I know it's possible as I've been doing

Email function for a webhost that doesn't support the php mail() function

My webhost doesn't support the built-in php mail() function. I googled for it and found some useful codes: /*~ class.phpmailer.php .---------------------------------------------------------------------------. | Software: PHPMailer - PHP email class | | Version: 2.3 | | Contact: via sourceforge.net support pages (also www.codeworxtech.com) | | Info: http://phpmailer.sourceforge.net | | Support: http://sourceforge.net/projects/phpmailer/ | | ------------------------------------------------------------------------- | | Author: Andy Prevost (project admininistrator) | | Author: Brent R. Matzelle (original founder) | | Copyright (c) 2004-2007, Andy Prevost. All Rights Reserved. | | Copyright (c) 2001-2003, Brent R. Matzelle | | -----

Preparing for Business Attire

During college, it is really difficult for our bodies to accept formal wears . You will become a laugh of the town if you wear business attire when everybody else is wearing casual wear which are in with fashion . Well eventually after college, we would have to wear those clothes that we've avoided all along. How do we train our bodies to accept this? I've got one tip (for college students): 1. Mix formal wear with your casual wear. You can combine jeans with a polo (with trendy designs), and gradually shift those designs to lesser and more formal ones. The jeans gives an impression of a fashionable attire .

Webcam in php

Recently, I got a project for an online DTR system which required the user to have a snapshot of himself/herself first. I really had the trouble doing it since I am not very good in web programming. I searched in Google about using a webcam in php but I was not productive with it. I got really frustrated because as simple as it sounds when the client had me do it, I didn't know how. Well, to be able to pursue the project, I improvised. What I did was create a desktop application using C# that uses an online database in MySQL. The program can read a usb webcam and upload the picture via ftp to the web server. The reports reside on the website so it can be viewed anywhere without installing the application. The problem came when the hosting provider stopped allowing remote MySQL connections due to security reasons. Rather than finding another hosting (I've tried 4 already and they all have one disadvantage or two), I'm trying to find ways to code in php where I can make use o

1 Million Tweets

Here's something new (well as of this post): 1 Million Tweets in one tweeter account for $1. Basically, you are to post a tweet through their tweeter account which is 1milliontweets , from which you are to post whatever you want (preferably advertise your products or services or your website). This will cost you $1 per tweet. This is quite interesting. Will people patronize this? This will be a question to SEOs. Do you have to pay $1 to advertise through 1 tweeter account? Will this make a significant contribution to optimizing your website?

Ecommerce and Paypal

Just last year before my students did their proposal for their Systems Analysis and Design, I explored Paypal. We wanted to incorporate it into our website at Trimaran Solutions before but the solution was not that easy before. I remembered participating in a campaign to have it offered here in the Philippines. I just can't remember the link. Well back to Paypal, to those programmers who are hesitant on using it, try to explore. They have made it easier to integrate to our websites. You have a lot of options. You can have your own shopping cart, or you can use their shopping cart. Security is not a problem since Paypal had it planned already. They even have all the codes you need ready on their site. (See https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_overview https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_code). What I like the most is the hosted button. I have an example below: (You can donate here if

Number to Text in Excel in currency format that spells out the decimal portion

follow the instructions on my previous post . replace the code with the following: Option Explicit '**************** ' Main Function * '**************** Function SpellNumber(ByVal MyNumber) Dim Temp, WholeNumberText, DecimalText Dim DecimalPlace, Count ReDim Place(9) As String Place(2) = " Thousand " Place(3) = " Million " Place(4) = " Billion " Place(5) = " Trillion " ' String representation of amount. MyNumber = Trim(Str(MyNumber)) ' Position of decimal place 0 if none. DecimalPlace = InStr(MyNumber, ".") ' Convert cents and set MyNumber to dollar amount. If DecimalPlace > 0 Then DecimalText = GetTens(Round(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2), 2)) MyNumber = Trim(Left(MyNumber, DecimalPlace - 1)) End If Count = 1 Do While MyNumber <> "" Temp = GetHundreds(Right(MyNumber, 3)) If Temp <> "" Then WholeNumberText = Temp & Place(Count) & WholeNumbe

Time range in SQL Server

Sometimes we encounter situations wherein we need to include in our query, a time range given that the only fields in the SQL server database is the start time and the duration: StartTime Duration 09:30:00 AM 60 07:30:00 AM 90 *The table name in this example is tbl_UserSchedule We sometimes want to show it in a form of a time range just like looking at a schedule: Schedule 09:30:00 AM - 10:30:00 AM 07:30:00 AM - 09:00:00 AM The following SQL statement does the job (although not quite optimized): SELECT CONVERT(char(9), StartTime, 108) + CASE WHEN StartTime > '11:59:59 PM' THEN 'PM' ELSE 'AM' END + ' - ' + CONVERT(char(9), DATEADD(minute, Duration, StartTime), 108) + CASE WHEN DateAdd(minute, Duration, StartTime) > '11:59:59 PM' THEN 'PM' ELSE 'AM' END FROM tbl_UserSchedule

Create a CNAME record at godaddy

These instructions are from blogger's site. However, you have to have both domain and hosting account with Godaddy. Total DNS will be empty otherwise. GoDaddy.com Log in to your account at www.godaddy.com . Open the Domains tab and select My Domain Names . You'll be directed to the Domain Manager page. Click the domain that you'd like to use with your blog. Click the Total DNS Control And MX Records link at the bottom of the section entitled Total DNS . Click Add New CNAME Record in the box labelled CNAMES (aliases) . If you've already created a CNAME record for your blog's address, click the pencil icon next to the existing CNAME record. For the Name , enter only the subdomain of the address you want to use for your blog. For example, if you picked www.mydomain.com as your address, enter www here. Enter ghs.google.com as the Host Name . Specify a TTL or use the default setting of 1 hour. Click OK , and then click OK again. Keep up with the la

Using events/delegates in C#

This example demonstrates the use of delegate in C#. The example consists of a class named Class1.cs and a form named Form1. The class has an attribute named Property1 and implements the use of delegate by having an event fired when the property changes. The Form contains a textbox and a button. When the user clicks the button, it initializes the class and sets its attribute (Property1) to "testProperty". The value set will automatically be displayed at the textbox once the event fires. //Class1.cs //*********************************************************************************** using System; using System.Collections.Generic; using System.Text; namespace WindowsApplication1 { public class Class1 { public delegate void ValueSet(); public event ValueSet OnValueSet; private string _property1; public string Property1 { get { return _property1; } set { _property1 = value; OnValueSet();

Next Trade Expo

I wonder when the next trade expo here in Davao will be. I wasn't able to attend last time as I was too preoccupied with everything else. The trade expo last year was a success. Many companies participated and there were exhibits. The expo was held at the Davao Convention Center last October 23-25, 2008. It catered the needs of and provided opportunities for the Small and Medium Enterprises. A few factors entice me to attending trade expos. The first would be the wide range of opportunities for business. I have been given a chance to become an entrepreneur for a few years and it wasn't easy. My partners and I had the enthusiasm but still didn't quite succeed the way we wanted to. Marketing is one way to have it. Through trade expos, a business can build linkages to other businesses and potential customers. It is a great way for businesses to "socialize". The second factor that attract my attention to these expos are the exhibits. We can get great ideas for our own