Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Monday, 29 February 2016

How to Stop Embed YouTube From RedirectingIn Feburary 2016 29,

In Feburary 2016 29,
Visit the YouTube page that contains the video you wish to embed into your site.
Click 'Share' and select 'Embed.'
Launch Notepad and open the HTML file that contains the source code of the page into which you wish to embed the video. Copy the embed code from YouTube by right-clicking anywhere in the embed box and selecting 'Copy.' Paste the code into Notepad by right-clicking and selecting 'Paste.'
Locate the URL address of the YouTube video in the embed code you just pasted into Notepad. URL addresses of videos on YouTube look like the following: 'http://www.youtube.com/embed/videoID", where 'videoID' is an alphanumerical code that identifies the video.
Type or copy-and-paste '?modestbranding=1' after the videoID. The URL address should now look like the following example:
http://www.youtube.com/embed/VideoID?modestbranding=1
The 'modestbranding' parameter instructs YouTube to remove its logo from the embedded player and to disable redirecting.
Save your HTML file and upload it to the Web server by using your Web host's file manager or an FTP client.
In Feburary 2016 29,

Thursday, 25 February 2016

How to Update Drupal ModulesIn Feburary 2016 25,

In Feburary 2016 25,
Log in to your Drupal admin interface. You will need your username and password to get in.
Navigate to 'Administer, Reports and then Available updates' to view your modules that have updates available.
Backup your database. This can be done in a variety of ways using phpMyAdmin, phpMyAdminToolKit.Dump or the Drupal database administration module or backup module.
Download and save the code files for any modules you are updating using your FTP access software. Any FTP access software, such as FileZilla, Dreamweaver or Internet Explorer, will work. It is a good idea to back up all the module code files. They are located in 'Root folder, Drupal installation (if in a subfolder otherwise your root folder will be your Drupal installation) and then Modules.' Individual modules will have their own folders within the Modules folder.
Navigate to 'Administer, Site Configuration and then Site Maintenance' in your Drupal interface. Select 'Offline' and click 'Save Configuration' at the bottom to place your site in maintenance mode.
Navigate to 'Administer, Site Building and then Modules.' Uncheck the modules that you need to update to disable them. Click 'Save Configuration' at the bottom.
Navigate to 'Administer, Reports and then Available updates.' Click the download link for each module you need to update and follow the provided instructions for downloading the updated module.
Upload the module folder and files to your website using your FTP access software. Place them within the 'Modules' folder and overwrite your outdated files.
Navigate to 'Administer, Site Building and then Modules.' Click the 'Update PHP' link in the text at the top of the page. You can also go to http://YourSite.com/drupal/update.
Follow the prompts to finalize the PHP and database updates. It should automatically detect any necessary updates. If it shows 'No Updates Available' you do not need to update your database.
Check your site on the public side to ensure that all functionality and content is present and working.
In Feburary 2016 25,

Wednesday, 24 February 2016

How to Make Checkboxes in DreamweaverIn Feburary 2016 24,

In Feburary 2016 24,
Open your HTML document in Dreamweaver.
Click wherever on the page you want the check box to appear.
Click 'Insert,' 'Form' and 'Checkbox.'
Enter a name for your check box in the 'ID' field. This allows you to reference the check box with programming code, should you need it.
Enter a 'Label' for your check box, which is the text that appears next to the check box on your HTML page. Click 'Before form item' or 'After form item' from the Position section to place the label before or after the check box.
Click 'OK.'
Click the newly created check box and enter a value in the 'Checked Value' field of the Property window. If you cannot see the Property window, hold the 'Ctrl' button and press 'F3.' The value determines the entered value for a checked box. If no value is entered, a checked box defaults to 'Yes.'
Click 'Insert,' 'Form' and 'Button' to create a Submit button, which is commonly used to submit the form.
Click '
Hold the 'Ctrl' button and press 'S' to save your changes.
In Feburary 2016 24,

Tuesday, 23 February 2016

How to Open Up a New Tab in HTMLIn Feburary 2016 23,

In Feburary 2016 23,
Open Windows Notepad or another text or HTML editor on your computer. Open the HTML file in which you want to place links that open in a new tab or window.
Position the cursor at the point in the HTML code where you want to place the link. Enter the following HTML code:http://www.somesite.com/somepage.htm' target='_blank'>Link Text
Change the 'http://www.somesite.com/somepage.htm' value to the actual website and page to open with the link.
Change the 'Link Text' value to the text you want to display for the link. For instance, 'Click Here to go to Somesite.com' or any other descriptive text.
Click 'File,' then 'Save' on the editor toolbar.
Use an FTP program or log in to the control panel of your Web hosting account to upload the new HTML file to your site. When visitors click links formatted with the above syntax, Web pages will open in a new tab if the browser supports the option. If the browser does not support tabbed pages, the link will open and display the Web page in a new browser window.
In Feburary 2016 23,

Saturday, 20 February 2016

How to Create a Custom Button in PHPIn Feburary 2016 20,

In Feburary 2016 20,
Right-click the PHP file you want to edit and select 'Open With.' Click the PHP editor you prefer to use and click 'Open' to open the file code.
Create the PHP customized button. You must include the button HTML, button name and the value shown to the user. The following code creates a button named 'php_button' and assigns it to the '$button' variable:$button = '
';
Display the button on the page using the 'echo' command. The following code prints out the button to your Web page:echo $button;
Save the changes and run the new code in your PHP debugger. You must upload the page to your host provider for the changes to take effect on the website.
In Feburary 2016 20,

How to Add a Foreign Key to MySQLIn Feburary 2016 20,

In Feburary 2016 20,
Click the Windows 'Start' button and click 'All Programs.' Click 'MySQL' and then click 'MySQL Workbench' to open your main console.
Click 'Edit SQL Script' in the main console window. This opens a SQL editor where you create the foreign key.
Type the following code into your editor:alter table table_name add constraint key_name foreign keyreferences tbl_name primary_keyThe first line sets the foreign key. Replace 'table_name' with the name of your table. 'Key_name' is the name of the column in your table you want to set as the foreign key. The second line is the primary key information to link to the foreign key. Replace 'tbl_name' with the table that contains the primary key and 'primary_key' with the primary key column name.
Click 'Run' to run your SQL statement. The foreign key is created, and your tables are set up with the linked attributes.
In Feburary 2016 20,

Friday, 19 February 2016

How to Use VBA to Import Data From Excel Into AccessIn Feburary 2016 19,

In Feburary 2016 19,
Launch Microsoft Office Excel and type 'data1' in A2, and 'data2' in B2. Press 'Ctrl' and 'S' to open the 'Save As' dialog Window and save the workbook in 'C:\Temp\' as 'dataToImport.xlsx.' Click 'Save' and close Excel.
Launch Microsoft Office Access, click 'Blank Database' and click the 'Create' button. Click 'Database Tools,' and click 'Visual Basic' to open the VB Editor Window. Click the 'Insert' menu and then click 'Module' to insert a new code module. Click the 'Tools' menu, click 'References,' and check the box next to 'Microsoft Excel
Object Library.'
Start by typing the following VBA code to create new sub procedure:Private Sub importExcelData()
Type the following to create variables you will use to read Excel: Dim xlApp As Excel.ApplicationDim xlBk As Excel.WorkbookDim xlSht As Excel.Worksheet
Type the following to create variables you will use in Access:Dim dbRst As RecordsetDim dbs As DatabaseDim SQLStr As String
Type the following to define database objects and also define the Excel workbook to use:Set dbs = CurrentDbSet xlApp = Excel.ApplicationSet xlBk = xlApp.Workbooks.Open('C:\Temp\dataToImport.xlsx')Set xlSht = xlBk.Sheets(1)
Create a new table with two columns in Access to import data from Excel. Type the following VBA code to create the table using the 'DoCmd' object:SQLStr = 'CREATE TABLE excelData(columnOne TEXT, columnTwo TEXT)'DoCmd.SetWarnings FalseDoCmd.RunSQL (SQLStr)
Open the table you just created by using a the Recordset object. Type the following to open the table and add a new row:Set dbRst = dbs.OpenRecordset('excelData')dbRst.AddNew
Type the following to get values from the Excel workbook, save them to your table and update the record:xlSht.Range('A2').SelectdbRst.Fields(0).Value = xlSht.Range('A2').ValuexlSht.Range('B2').SelectdbRst.Fields(1).Value = xlSht.Range('B2').ValuedbRst.Update
End your procedure by typing the following VBA code:dbRst.Closedbs.ClosexlBk.CloseEnd Sub
Press 'F5' to run the procedure. The data in your Excel workbook has just been imported into your Access table.
In Feburary 2016 19,

Thursday, 18 February 2016

How to Make a Hit Counter in DreamweaverIn Feburary 2016 18,

In Feburary 2016 18,
Navigate to your Web host's homepage and see if they offer free hit counters. If they don't, go to another Web host that does. Bravenet, for example, offers free hit counters and other Web tools even if you don't have a host account with them (see Resources).
Click the link to the hit counter tool. You may need to register with the Web host in order to download the code, but the registration should be free. If not, look elsewhere. Bravenet's hit counter is free.
Click the button to create a new hit counter. You will be prompted to enter a name for the counter and provide the URL of the page you want to add the counter to.
Choose settings and then the look for your counter.
Select (highlight) and copy the Javascript code the Web host puts on the screen for you.
Open Dreamweaver and open the Web page you want to add the hit counter to.
View the HTML code for your page by clicking the 'CODE' button at the top of the window, then click at the location where you want the counter to appear. Usually counters are placed at the bottom of the page above the closing 'BODY' tag.
Select 'Paste' from the Edit menu and the code for the hit counter will be inserted. Save changes, upload the page to your Web server and view it in your Web browser to test.
Use a Free PHP Script
Use your Web browser to download a free PHP hit counter script from the Internet, such as the one at phpjunkyard.com (see Resources).
Go into your site in Dreamweaver and create a new folder in your local files list called 'counter.'
Place the PHP script and any files that came with it in this folder and read the instructions that come with the script for any special customization steps you need to take. Sometimes this information is on the Web page before you download, or it's a 'readme' file included in the download.
Open the hit counter PHP file in Dreamweaver. Change to 'CODE' view if necessary. There should be very clear instructions from the programmer at the top of the file about what variables you need to customize.
Make any necessary changes to the PHP code following the programmer's instructions. Save and close the file.
Open the Web page you want to add the counter to and save it with the extension .php instead of htm or .html. To run PHP on your page, you need this file extension or the commands will be ignored. View the HTML code on this file.
Click at the location where you want the hit counter to appear (anywhere above the closing 'BODY' tag), and paste in a PHP call to the hit counter file according to the instructions that came with your script. The code would look something like:
</script'>http://www.YOUR_DOMAIN.com/counter/gcount.php'><!--//--></script>.
Add a link back to the programmer's website under the counter (it's the considerate thing to do if you're using someone else's script for free), save changes to the file, then upload the php Web page and the counter folder to your Web server.
View the files on your Web server in Dreamweaver by selecting 'Remote Site' from the top of the site files box on the right. If the instructions for your hit counter script say to change file permissions on any of the script files, right-click the file name and choose 'Set Permissions' from the pop-up menu.
Make the changes to the 'Set Permissions' screen and click 'OK.'
Return to 'Local View' in your site files list and double-check the Web page that will have the hit counter to make sure you have the PHP command correct, then save, upload the file to the server and use your Web browser to view the page and test the hit counter.
In Feburary 2016 18,

Wednesday, 17 February 2016

How to Link to an Email AddressIn Feburary 2016 17,

In Feburary 2016 17,
Find the spot where you want to place the email link on your web page within your HTML code.
Type (link) in the place where you want the link. For example, if your email is bsmith@gmail.com and your link is 'email me,' then your code would be: email me.
Type (link) in the place where you want the link if you want to control the subject link. For example, if your email is bsmith@gmail.com, your link is 'email me' and your subject line is 'help,' then your code would be: email me.
Save and publish your HTML code. This depends on your web publishing system.
In Feburary 2016 17,

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,

Saturday, 6 February 2016

How to Export a CSV File Using ToadIn Feburary 2016 06,

In Feburary 2016 06,
Purchase, download and install the appropriate version of Toad for your database (see Resources section). Toad has different versions of the software available based on the specific format of database you are using.
Run the Toad application by double-clicking the program icon on your computer's desktop. Enter the license code for your installation of the program.
Select the 'Export Wizard' menu option within the Toad program.
Choose the 'Export Format' pull-down menu on the subsequent menu and select 'CSV' as the output format data type.
Enter or select the database, schema/output and object type followed by the 'Next' menu button.
Choose the destination location for the export file to be saved, followed by the 'Finish' menu button. Your data will be saved as a CSV file.
In Feburary 2016 06,

Friday, 5 February 2016

How to Make a Link to FTP With Username PasswordIn Feburary 2016 05,

In Feburary 2016 05,
Open the HTML document in a text editor, such as Notepad.
Locate the area of the document where you want to add the FTP link.
Type the code 'FTP Link' to add the link. Replace 'user_name' with the username for the FTP server and replace 'password' with the password for the account. Replace 'hostname' with the hostname of the FTP server. Replace 'FTP Link' with any text you prefer.
Save and close the HTML file.
In Feburary 2016 05,

How to Do a Sort in a Select Statement of ABAPIn Feburary 2016 05,

In Feburary 2016 05,
Click the 'Start' button in Windows and select 'SAP Management Console' from the 'All Programs' menu to open the SAP management console.
Type in the following code in the console window:DATA: BEGIN OF WA,CARRID TYPE SFLIGHT-CARRID,CONNID TYPE SFLIGHT-CONNID,MIN TYPE I,END OF WA.SELECT CARRID CONNID MIN( SEATSOCC ) AS MININTO CORRESPONDING FIELDS OF WAFROM SFLIGHTGROUP BY CARRID CONNIDORDER BY CARRID MIN DESCENDING.WRITE: / WA-CARRID, WA-CONNID, WA-MIN.ENDSELECT.
Click 'File,' 'Run' to run ABAP program using the SELECT statement for sorting database records.
In Feburary 2016 05,

Thursday, 4 February 2016

How to Insert an MPEG Video Into DreamWeaverIn Feburary 2016 04,

In Feburary 2016 04,
Upload the video to your Web page's server. Do this with whatever FTP program you usually use to upload images, objects and HTML files. You can also use Dreamweaver for this. Select the video that you want to upload In the 'Files' palette and click the blue 'Up' button.
Click the 'Code' button at the top of the Dreamweaver interface. This will put you into Code View, allowing you to view and edit the actual HTML code for your Web page.
Find the place in the code where you want to embed the video. This can be tricky if you've never worked with HTML, but you'll have plenty of chances to experiment. Look for text that tips you off to where you are in the page or look for images (represented in HTML by tags, where 'xxx' is the image filename) that do the same.
Insert the following code:
where 'movie.mpeg' is the filename (and path, if it's not the same as the HTML file) of your movie, and the two values under 'width' and 'height' are whatever you want to use. (If you leave these attributes out, the movie will appear in its actual size.) Control the attributes of the embedded movie by adding any number of arguments, separated by spaces, just like the 'width' and 'height' arguments. Here's a partial list:autostart='true' to make the video begin playing automaticallyloop='true' to make the video continue playing forever unless stopped by the userstarttime='00:00' to make the video begin at a particular location (minutes:seconds)align='left'/'right'/'top'/'bottom' to place the video relative to the text around it
Click the 'Design' button to return to the standard Dreamweaver view, then test your video.
In Feburary 2016 04,

How to Find Where a Domain Is Hosted?In Feburary 2016 04,

In Feburary 2016 04,
Find the location of a domain using 2Privacy's free utility). Enter the domain's name or IP address into the utility's 'IP or Domain Name' field.
Type the captcha code into the 'Code' box -- the captcha code is located to the right of the Code box.
Click on the utility's 'Check Location' box to get the location registered to the domain. The Web page will refresh and then display the domain's physical address.
Seo Mastering
Locate a domain's location using Seo Mastering's 'IP Address - Domain name Location' utility. Enter the domain into the utility's 'Enter IP address or domain name' field.
Enter the code in the utility's captcha into the utility's 'Image Verification' field.
Click 'Continue' to look up the location of the domain. The utility will plot the location of the queried domain onto an embedded Google map.
IP Address Location
Use IP Address Location's 'IP Who Is Domain name or Whois IP Address' utility to find the location of a domain. Clear out the text in the utility's 'Domain Whois IP Lookup Address' field.
Type the domain you would like to query into the 'Domain Whois IP Lookup Address' field.
Click on the utility's 'Check IP WhoIS Address' button to find the location registered to the domain's server.
In Feburary 2016 04,

Tuesday, 2 February 2016

How to Connect VB.Net With MySQLIn Feburary 2016 02,

In Feburary 2016 02,
Click the Windows 'Start' button on your VB.NET developer computer. Click 'All Programs,' then click 'Microsoft .NET Framework.' Click 'Visual Studio' to open the software. Double-click your VB.NET project to load the code.
Type the MySQL library import statement at the top of the page. The library contains the connection functions and properties needed to connect. Type the following code in your VB.NET file:Imports MySql.Data.MySqlClient
Create the connection string. A connection string contains the database, server name and user name and password needed to connect to MySQL. Below is an example of a connection string:Dim ConnectionString As StringConnectionString = 'database=database_name';server=server_name;user id=user;password=pass'Replace each value with your own MySQL information.
Connect to the database. Type the following code to use the connection string to connect to the MySQL server:Dim conn As New MySqlConnectionconn.ConnectionString = ConnectionStringconn.Open()
In Feburary 2016 02,

Monday, 1 February 2016

OpenSSH Vs. PuTTYIn Feburary 2016 01,

In Feburary 2016 01,
Secure Shell protocol was invented by the SSH Communications Security company to address the security problems inherent in remote connections between computers. SSH uses public-key encryption to encrypt messages against hacker interception. This hides data when it is in-transit between computers, meaning that files and user commands sent through the SSH channel are encrypted and protected until they reach their destination.
OpenSSH
SSH was originally free, but eventually the licensing for the code was closed as the SSH technology was moved into a corporate setting through more restrictive licensing. However, developers 'forked,' or split, the free code remaining in SSH -- the 1.2.12 release -- and created the openSSH project. The project was then made part of the OpenBSD operating system, itself a free fork of the Unix operating system that had also undergone more restrictive license.
PuTTY
Some licensing schemes limited the use of openSSH to non-Windows operating systems. PuTTY acts as a terminal emulator for networked connections between computers. Typically, Windows computers do not have the capability to connect to SSH servers from the terminal. PuTTY mimics the Unix command terminal, and through a Wizard Interface allows users to create network sessions to other computers through various connection protocols.
Usage
OpenSSH is implemented across multiple platforms, including Linux and Mac operating systems. These implementations allow users to create SSH servers to receive and create connections to other SSH servers. PuTTY presents only a graphical client for Windows and Linux users to create quick connections over multiple protocols, such as SSH and Telnet. OpenSSH also runs from the command line natively, while PuTTY provides a Graphical User Interface, or GUI, with options to store sessions and modify connection settings.
In Feburary 2016 01,

How to Make Graphs in HTMLIn Feburary 2016 01,

In Feburary 2016 01,
Launch your HTML editor. Use a text editor if you don't have an HTML editor -- TextEdit and Notepad both come pre-installed on Apple and Windows operating systems, respectively.
Select 'File' and 'Open' from the program's navigation menu. Navigate to find the HTML file you wish to add the graph.
Decide where the graph will be featured on your Web page. Place the following code into the HTML:
Add additional tables to create more bar graph rows. You can adjust the three attributes associated with 'bgcolor,' 'height' and 'width': change '#FF3300' and '#99CCFF' to the color codes of your choice; adjust the height -- '15' -- and width -- '200' and '150' -- of each graph bar. For your graph to appear vertical instead of horizontal, set the 'height' attribute number larger than the 'width' one.
Select 'File' and 'Save' from the program's navigation menu.
Launch your FTP software. Upload the updated HTML document to your Web server. Preview the Web page to ensure your graph is displaying properly.
In Feburary 2016 01,