Articles
- Posted by
Daniel on
11/2/2011 10:36:49 PM
Steve Jobs was an entrepreneur, inventor, co-founder, chairman, and executive officer of Apple. I know this is technically a website for sharing code, but Steve Jobs deserves a mention and praise. Steve Jobs is known as a co-inventor of over 310 patented products. Steve Jobs helped Bring the iPhone, iPad, iTouch, and many other apple products that you love and use probably every day. Steve Jobs on Aug 24, 2011 decided to retire from Apple, because of issues he was dealing with regarding cancer. Steve Jobs will be missed by Apple. The following is currently on Apple's website:

- Posted by
Daniel on
9/11/2011 8:25:58 PM
I have heard that auto scrolling was dead, but however I think that autoscrolling can be usefull for many purposes. Such as:
1. When clicking a link focusing on a paragraph.
- FAQs webpage
2. When loading a webpage taking users straight to a section of the webpage.
- Focusing on the comments that are below a blog post
3. Taking user's to the bottom of a webpage and to the top of a webpage without having to scroll a massive amount, which users tend not to scroll much.
Below are two examples of how to focus a browser on different sections of a webpage. One example is using nothing but HTML and the other example uses jQuery.
The first example uses the first href in the first li of the ul below. As you can see the link's href has "#example1" inside. Which is the id of one of the divs. Upon clicking the link the href="#example1" will go on the address bar at the very end of the URL and instantly your browser will focus on the div with id of "example1".
The second example uses jQuery which adds an onclick event to the href with id of "linkExample2". Upon the link being clicked the browser's scrollbar will scroll for 2 seconds until the div with id of "example2" is within view.
- Posted by
Daniel on
9/8/2011 11:01:11 PM
20 New Features in Visual Studio 2010:
1. Able to position windows everywhere!
2. Access controls in clientside easy with ClientStaticID
3. Default Parameters
4. RedirectPermanent - For letting search engines know file has been moved!
5. Able to have a bigger URL than 260 characters
6. jQuery is added once you create a project
7. Routing support
8. Ability to set meta tags such as Description and Keywords
9. Maintaining Selection In GridView
10. Control over rendered HTML in FormView and ListView controls
11. ListView enhancement - Layout template is no longer needed.
12. Chart control for charting data
13. New Project Templates
14. Clickability for sending an email / going to a new page
15. Improved searching
16. Multi-Targeting
17. Side-By-Side
18. JavaScript IntelliSense was improved
19. CSS 2.1 improved standard compliance
20. QueryExtender Control
There is more than 20 new features in Visual Studio 2010 of course, but for this article posting I only covered 20. I didn't think that there would be many new features, but there is a lot of new features. A was blown away by how many new features there are in VS 2010 once I started searching online. For brief code examples and explanations on the above features see my presentation on http://prezi.com/3om_nnibq6n2/new-features-in-visual-studio-2010/.
As always thank you for stopping by and don't forget to add comments or create an article.
- Posted by
Daniel on
8/28/2011 9:15:39 PM
This past weekend I was coding something in JavaScript and I kept getting the following error on the FireBug console:
I couldn't figure out how to solve the issue. Until I came accros an article that mention that it was that one of the attributes of a tag might not be being set properly. Well I looked at all of my script and link tags and they were all fine. I finally noticed that in the clobal I was rewriting the path when I shouldn't have been to a different URL which lead to script file that didn't exist.
Moral of the story check that all of your script tags and link tags do not get overwritten and that the tags have an src attribute that leads to a valid file. Also, it is possible that JavaScript can cause the above error too.
- Posted by
Daniel on
8/16/2011 6:45:45 AM
Magnifying an image with CSS and HTML isn't very complicated. The following sets styleing to the background of the body and appropriate links to create the illusion of an image being magnified. There is actually two images that are on the webpage which is actually a dissadvantage since both images have to be loaded onto the webpage. The advantage is that the magnifying is done with only CSS and HTML which is great because I have heard that it is bad to use a lot of JavaScript on websites that are visited a lot by people using Mobile Devices since Mobile Devices don't render JavaScript well.
There is a few fixes for IE since IE will display the magnified image a little off OnMouseover
if the following fixes are not in place:
- Posted by
Daniel on
7/10/2011 9:43:26 PM
Introduction
QR(Quick Response) codes are 2 dimentionsal barcodes which were used mainly in Japan. However, in recent years the U.S. has started using QR codes. For example, Best Buy uses QR codes on the label tags of their products to provide more information for the item. There is a also a company called Tesco in Korea which speciallizes in the food market industry. Which placed posters of the different type of food that they offered whith QR codes. Once the person scanned the QR code for the item it would place the item in a shopping cart. Then the person would purchase the food online. The food would get delivered to the person's home without having to pay a visit to the local super market.
Dissadvantages
1. A QR code can only have one data type:
•URL
•Text
•Phone number
•SMS
2. A QR code is limited in amount of information that it can have.
3. Not everyone has a cell phone.
4. Not everyone has a cell phone that can read QR codes.
Advantages/Uses
•Provide additional information
•Coupons
•URL
•Add items to shopping cart
•Making Flyers/Posters/Business Cards interactive
Hints
Make sure to not clutter the QR code. The more information a QR code has the harder it is for QR readers to read a QR code.
Finally, to create a QR code is simple. There is a .dll which allows for creating QR codes: http://twit88.com/platform/projects/list_files/mt-qrcode.
Example QR codes that were made with the .dll:


Conclusion
To create a QR code without having to write much code simply copy and paste what is below:
After the text portion feel free to change it to whatever you like as long as QR code supports your input and change the scale from 1-10 to make the QR code smaller or bigger. Note: The size can also be changed by adding a width and height to your image.
- Posted by
Daniel on
6/25/2011 7:31:35 PM
Using the following code a connection to the database can be made by retrieving the connection string information from the web.config.
However, if in the web.config if the connection string doesn't include "Integrated Security=True" the password will not be retrievable. Make sure to include the "Integrated Security=True" on your connection string to SQL Server. The following is a connection string with "Integrated Security=True".
- Posted by
Daniel on
6/11/2011 8:57:48 AM
A while back I had to do a small project. The project involved showing data from the database in a pdf. I searched online and found PDFSharp, iText, and iTextSharp. However, I went with PDFSharp, since it is possible to use PDFSharp for commercial use. However with iText you can post, add javascript, and fill in fields. With PDFSharp it is possible to fill in fields, but there is a small clitch that when you go to type something on the field, the original text hovers over the text you are typing; sort of like a watermark that never goes away. However, for my purposes I didn’t need to populate any fields with any values,
which is why I went with PDFSharp.
Creating a PDF using PDFSharp is similar to creating a control (textbox, label, dropdown, etc) in csharp.
To get started you would first have to create a PDF Document with a section(at least one section is required) by doing the following:
Then you would simple add to the PDF :
How to add a paragraph:
A paragraph object must be instantiated with line breaks and text.
How to add a table:
First a table object needs to be instantiated then the columns need to be
created. After the columns are created new rows can be added with cells.
- Posted by
Daniel on
3/21/2011 7:40:23 PM
A class is composed of Attributes, Constructors, Behaviors, and Properties.
Attributes is a variable that is used within the class.
A constructor is what is used to set the values of the attributes. The attributes values can also be set without the use of a constructor.
Behaviors are methods that are within a class.
Properties are what are used to set the values of the attributes.
A normal class looks like the following:
One thing I always remember is that a class is an instance of an object. Meaning that a class represent, for example, a car. A car
is composed of color, speed, make, model, year, etc. All are considered attributes and properties can be set. A behavior could be "Move" which would move the car when called upon.
To use the class you would simple do:
There are many ways to set up a class, however I preffer the way that was shown on this example because for me it is easy to understand. As you get better you will understand that as you get better you will do one thing a certain way then whatever you made a few hours later you might say, "I could have done this, this way which could clean up the code a bit more and could have saved me a few seconds in typing a few extra lines of code.".