Tutorials

Switch Statements in C#

Submitted by Yorkiebar on

Introduction:

This tutorial is on how to use Switch statements in C#.

Switch:

A switch statement allows a single variable or static piece of data to be checked for mulitple conditions, essentially like a long 'else if' statement but a lot more compact and with slightly more flexability.

Case:

To use a switch statement there are a few other keywords we need to learn first, one of which is 'case'. Case is a possible value of the variable or value being 'switched', this must be of the same data type as the value being switched and must be followed by a colon. Break

Drawing Strings via the Graphics Object in C#

Submitted by Yorkiebar on

Introduction:

This tutorial is on how to draw text in .NET (C#/Visual Basic).

Labels, Textboxes?

I'm sure if you've not looked in to the 'graphics' (etc) objects in the .NET framework, you're thinking, why don't we just use labels or textboxes with their read-only property enabled. Labels and textboxes both have a surrounding area around the text which are both of different colours (however we could change this to the form background colour to give the effect of the backgrounds being removed), but would we create extra controls (labels, and textboxes) when we don't need to?

How To Use a REST API in PHP

Submitted by Yorkiebar on
Introduction: This tutorial is on how to use an API in PHP. What Is An API? An API is an Application Programming Interface and is used as a middle stepping stone for external applications to use the functions of an internal application. An example of this would be the Skype API. The Skype API allows external applications on the users computer to access their Skype account via the Skype4ComLib API. REST API: There are a few different types of APIs, we'll be using an example REST in this tutorial.

HTTPWebRequest WebProxy Proxies in C#

Submitted by Yorkiebar on
Introduction: This tutorial is on how to create a HTTPWebRequest in C# using a proxy connection. Why Proxies? Proxies are sometimes required in certain web scraping applications due to the sheer amount of data that needs to scraped. Some sites temporarily - or even permanently - block IP addresses which are requesting/receiving large amounts of data in a short time to avoid the website's full bandwidth being used on that single IP, and therefore stopping the site from going offline for all other users as well.

Email Subscription List (2 - Sending Emails) in PHP/HTML

Submitted by Yorkiebar on
Introduction: This is a second part to my previous tutorial - 'Creating an Email Subscription List in PHP/MySQLi', found here; http://www.sourcecodester.com/tutorials/php/7813/email-subscription-list-phphtml.html Mail Function: Before we can begin with our actual email subscription email sending script, we need to know exactly how we are going to be sending our emails. Luckily enough, there is a built in function in to PHP called 'mail', guess what it does...

Email Subscription List in PHP/HTML

Submitted by Yorkiebar on
Introduction: This tutorial is on how to create a simple email subscription service - part 1 - allowing the user to enter their email address. HTML: Before we can process any information the user enters and then add it to our database of email subscription addresses, we need to take the information from the user - for this we need a simple HTML form.

File I/O in PHP

Submitted by Yorkiebar on
Introduction: This tutorial is on how to perform file I/O in PHP. I/O? I/O stands for Input/Output, and means writing/reading to/from files on the system. PHP Tags: First we need three things; The file you want to write the contents to - this can be pre-existing, or not. The contenst to write to the file. The default PHP tags, ready to write our PHP code. Here are the PHP tags, in which we will write our code...