Showing posts with label paste. Show all posts
Showing posts with label paste. Show all posts

Sunday, 28 February 2016

How to Create an Anchor Tag for a Phone NumberIn Feburary 2016 28,

In Feburary 2016 28,
Open your HTML editor. If you don't have one, launch the Notepad text editor, which you can find in the 'Accessories' folder of your Windows Start menu.
Open the Web page into which you want to insert the anchor tag by clicking on 'File' and selecting 'Open.'
Copy and paste, or type, the following code before the phone number you want to turn into a hyperlink:Replace '5551234567' with the phone number you want your visitors to dial when clicking on the link.
Type or copy and paste the following code after the phone number you want to turn into a hyperlink:As an example, the complete code for the fictional '5551234567' phone number would be:(555) 1234-567
Save the HTML file. Upload it to your Web server by using your Web host's file manager tool or an FTP client.
In Feburary 2016 28,

Wednesday, 24 February 2016

How to Connect to MySQL Database Using Web ExpressionIn Feburary 2016 24,

In Feburary 2016 24,
Open Microsoft Expression Web. Click on 'File,' 'Open' and choose the target website from the website files. Click 'Split' below the design pane. The three tabs below the design pane are Design, Split and Code; Split shrinks the size of the design pane and opens up the Code section above it, where HTML code is entered.
Copy the following code:
Now click in the Code section of the target website in Expression Web, above where the code reads:
Right-click above
and choose 'Paste' to paste the copied code. It should now look like this:
Copy the following code:
Sub Page_Load(Source as object, e as EventArgs)Dim sConString As String = 'DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=Your_Mysql_DB; UID=mysql_username; PASSWORD=mysql_password; OPTION=3'Dim oConnection as ODBCConnection = new ODBCConnection(sConString)Dim sSQL as String = 'SELECT * FROM Table1'Dim oDataAdapter as ODBCDataAdapter = New ODBCDataAdapter(sSQL, oConnection)Dim oDataSet as DataSet = new DataSet()oDataAdapter.Fill(oDataSet)oDataGrid.DataSource = oDataSetoDataGrid.DataBind()End Sub
Click again in the Code section of the target website in Expression Web. Paste the code after the
tag in the code for the website. Be certain that the
tag closes the code section.Copy this line: Paste it between the
and
tags, also in the Code section of the target site in Expression Web.Example:
Note the line in the MySQL database code that reads: 'DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=Your_Mysql_DB; UID=mysql_username; PASSWORD=mysql_password; OPTION=3'These values will need to be changed to represent the desired MySQL database, ID and password. If the database is to be accessed remotely, the 'server' will be an IP address. Simply delete the 'answer' following the equal sign (=) for each item and type in the correct information.
In Feburary 2016 24,

Thursday, 18 February 2016

How to Do Bubble Sorting in VB.netIn Feburary 2016 18,

In Feburary 2016 18,
Open Visual Basic and click 'File' and 'New project' to create a new project. Select 'ConsoleApplication.' When it comes time to enter your code in a real project with a Graphical User Interface (GUI), you can simply copy this function there without modification.
Paste the following code above the 'Main' function:
Sub BubbleSort(ByRef arr() As Integer)Dim tempDim switch = TrueWhile switchswitch = FalseFor x = 0 To arr.Length - 2If arr(x) > arr(x+1) Thentemp = arr(x)arr(x) = arr(x+1)arr(x+1) = tempswitch = TrueEnd IfNextEnd WhileEnd Sub
An important thing to recognize is that the arr is passed into the subroutine 'ByRef.' This allows the function to modify the contents of the array.
Paste the following into the 'Main' function to test the BubbleSort method:
Sub Main()Dim arr = {3, 4, 5232, 1, 232, 12, 34, 14, 21, 213, 213, 21, 321}Console.WriteLine('Unsorted')For Each x In arrConsole.Write(x & ' ')NextConsole.WriteLine()BubbleSort(arr)Console.WriteLine('Sorted')For Each x In arrConsole.Write(x & ' ')NextConsole.ReadKey()End Sub
End ModuleThis generates a simple, unsorted array of integers and tells BubbleSort to sort them, then prints the results.
In Feburary 2016 18,

Thursday, 11 February 2016

How to Download an Older Version of FirefoxIn Feburary 2016 11,

In Feburary 2016 11,
Type or copy and paste 'ftp://ftp.mozilla.org/pub/firefox/releases/' into your Web browser's address bar and press 'Enter.'
Click the version of Firefox you want to download on the Mozilla FTP download page that appears.
Click 'win32' on the page that appears to select the Windows release of that version.
Click 'en-US' on the page that appears to select the U.S. English release of that version.
Click the installer file with the EXE file extension on the page that appears to download the installer for that version.
In Feburary 2016 11,

Sunday, 7 February 2016

How to Add Fields to a Table in Access with Visual BasicIn Feburary 2016 07,

In Feburary 2016 07,
Open Microsoft Visual Basic Express, and click 'New Project...' in the left pane of your screen. Double-click 'Console Application.' Press 'Ctrl' and 'A' and then press 'Delete' to remove the current code.
Copy and paste the following code to your 'Module1.vb' module to execute a query and add two fields to the 'Products' table in the Northwind database.Imports System.Data.OleDbModule Module1
Sub Main()Dim northwindConn As OleDbConnectionDim sqlComm As OleDbCommandDim strSQL As StringnorthwindConn = New OleDbConnection('Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\ Northwind 2007.accdb;')northwindConn.Open()strSQL = 'ALTER TABLE Products ' & _'ADD COLUMN Product_I Text (30), Product_II Text (30);'sqlComm = New OleDbCommand(strSQL, northwindConn)sqlComm.ExecuteNonQuery()MsgBox('Added two fields successfully to the Products table.')northwindConn.Close()End Sub
End Module
Edit the following line of code and type the path to your database:OleDbConnection('Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\ Northwind 2007.accdb;')Press 'F5' to run your program.
In Feburary 2016 07,