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,
Showing posts with label source. Show all posts
Showing posts with label source. Show all posts
Monday, 29 February 2016
Saturday, 13 February 2016
How to Play ROMs on iPhoneIn Feburary 2016 13,
In Feburary 2016 13,
Launch Cydia and add the following 'Repository': 'http://thebigboss.org". To add a repository, launch 'Cydia' and click on 'Manage' then 'Sources.' On that screen, click 'Edit' (top right screen) and then 'Add' (top left). Let the application reload after it adds the source.
Click on 'Sections' in Cydia and look for 'Emulators.' Tap on that and you will see emulators for the original Nintendo, Super Nintendo, Gameboy, Gameboy Color, Gameboy Advance and Sega Genesis. The iPhone will not handle any other ROMs because of graphical issues. Install the emulator of your choice and let it download and install.
Connect the iPhone to the computer and close out of iTunes if it is set to pop up. Download the free program iPhone Browser (see Resources below). This will allow you to see all the hidden files on your iPhone. Launch this application after it installs and use it to navigate to /private/var/root/Media/ROMs/. Copy any ROMs you have downloaded (there is a site to download ROMs in the Resources section) to this location under whatever folder the ROM is for. If it is a Gameboy Advance ROM, you will copy it to the folder 'Gameboy Advance Roms.'
Disconnect your iPhone and launch your emulator application. If you put the ROMs in the correct folder, it will detect them and you can play them. Some of the emulators will even allow you to play the game with the iPhone in landscape (sideways) mode.
In Feburary 2016 13,
Launch Cydia and add the following 'Repository': 'http://thebigboss.org". To add a repository, launch 'Cydia' and click on 'Manage' then 'Sources.' On that screen, click 'Edit' (top right screen) and then 'Add' (top left). Let the application reload after it adds the source.
Click on 'Sections' in Cydia and look for 'Emulators.' Tap on that and you will see emulators for the original Nintendo, Super Nintendo, Gameboy, Gameboy Color, Gameboy Advance and Sega Genesis. The iPhone will not handle any other ROMs because of graphical issues. Install the emulator of your choice and let it download and install.
Connect the iPhone to the computer and close out of iTunes if it is set to pop up. Download the free program iPhone Browser (see Resources below). This will allow you to see all the hidden files on your iPhone. Launch this application after it installs and use it to navigate to /private/var/root/Media/ROMs/. Copy any ROMs you have downloaded (there is a site to download ROMs in the Resources section) to this location under whatever folder the ROM is for. If it is a Gameboy Advance ROM, you will copy it to the folder 'Gameboy Advance Roms.'
Disconnect your iPhone and launch your emulator application. If you put the ROMs in the correct folder, it will detect them and you can play them. Some of the emulators will even allow you to play the game with the iPhone in landscape (sideways) mode.
In Feburary 2016 13,
Saturday, 6 February 2016
How to Check MySQL Null on PHPIn Feburary 2016 06,
In Feburary 2016 06,
Open your PHP source file in a text editor, such as Windows Notepad.
Use the 'mysql_query(query)' function to send a MySQL query to the active database. For example, '$result=mysql_query('Select my_var from my_table');'.
Use the 'mysql_fetch_assoc(result)' function inside a 'while' loop to fetch rows from the MySQL result. For example, 'while ($my_values=mysql_fetch_assoc($result)) {'.
Use the 'is_null(variable)' function inside the 'while' loop to determine if a field from a returned row has a NULL value. For example, if (is_null($my_values['my_var'])) { echo 'is NULL'; } }' will print 'is NULL' for any values of 'my_var' that are NULL.
Save the PHP file.
In Feburary 2016 06,
Open your PHP source file in a text editor, such as Windows Notepad.
Use the 'mysql_query(query)' function to send a MySQL query to the active database. For example, '$result=mysql_query('Select my_var from my_table');'.
Use the 'mysql_fetch_assoc(result)' function inside a 'while' loop to fetch rows from the MySQL result. For example, 'while ($my_values=mysql_fetch_assoc($result)) {'.
Use the 'is_null(variable)' function inside the 'while' loop to determine if a field from a returned row has a NULL value. For example, if (is_null($my_values['my_var'])) { echo 'is NULL'; } }' will print 'is NULL' for any values of 'my_var' that are NULL.
Save the PHP file.
In Feburary 2016 06,
Friday, 5 February 2016
How to Add Columns to GridViewIn Feburary 2016 05,
In Feburary 2016 05,
Open Visual Studio. Click 'File' and select 'New Website.'
Click 'Visual C#,' and then double-click 'ASP.NET Website' to create a new website. The markup code for the default Web page appears in the center of the Visual Studio window.
Click the 'Design' button at the bottom of the window to view the form designer.
Click 'File' and select 'Toolbox.' Visual Studio will display the toolbox.
Scroll down and locate the 'GridView' control. Double-click that control to place it on the form.
Press 'F7.' The source code window will open and display this code:protected void Page_Load(object sender, EventArgs e){}This is the page load method. It runs when the Web page loads in a browser. Note the two bracket symbols below the first line of code.
Add this code between the two bracket symbols:// Lines 1-5System.Data.DataTable dataSourceTable = new System.Data.DataTable();dataSourceTable.Columns.Add(new System.Data.DataColumn('Model', typeof(string)));dataSourceTable.Columns.Add(new System.Data.DataColumn('Make', typeof(string)));dataSourceTable.Columns.Add(new System.Data.DataColumn('Color', typeof(string)));dataSourceTable.Rows.Add(originalColumnValues);// Line 6GridView1.AutoGenerateColumns = false;// Line 7GridView1.DataSource = dataSourceTable;The first five lines create a data source containing three fields: Model, Make and Color. Line six sets the GridView's 'AutoGenerateColumns' property to false. This prevents the GridView from generating columns automatically when you bind it to a data source. Line seven binds the GridView to the data source. At this point, the GridView displays no columns.
Add the following code below the code described in the previous step:/ Lines 8-12BoundField boundField = new BoundField();boundField.DataField = 'Make';boundField.HeaderText = 'Ford';DataControlField dataControlField = boundField;GridView1.Columns.Add(dataControlField);// Lines 13 = 17boundField = new BoundField();boundField.DataField = 'Model';boundField.HeaderText = 'Mustang';dataControlField = boundField;GridView1.Columns.Add(dataControlField);// Line 18GridView1.DataBind();Lines eight through 12 create a bound field. This field references the data source's 'Make' field. Line 10 assigns a value of 'Ford' to the bound field. You can make this value anything you like. This is the value that appears in the new column. Line 12 adds the bound field to the GridView. Lines13 through 17 create another bound field. This bound field references the data source's 'Model' field and sets its text value to 'Mustang.' Line 18 binds the GridView to the data source.
Press 'F5' to run the application. Your Web browser will open and display the GridView and the columns you added.
In Feburary 2016 05,
Open Visual Studio. Click 'File' and select 'New Website.'
Click 'Visual C#,' and then double-click 'ASP.NET Website' to create a new website. The markup code for the default Web page appears in the center of the Visual Studio window.
Click the 'Design' button at the bottom of the window to view the form designer.
Click 'File' and select 'Toolbox.' Visual Studio will display the toolbox.
Scroll down and locate the 'GridView' control. Double-click that control to place it on the form.
Press 'F7.' The source code window will open and display this code:protected void Page_Load(object sender, EventArgs e){}This is the page load method. It runs when the Web page loads in a browser. Note the two bracket symbols below the first line of code.
Add this code between the two bracket symbols:// Lines 1-5System.Data.DataTable dataSourceTable = new System.Data.DataTable();dataSourceTable.Columns.Add(new System.Data.DataColumn('Model', typeof(string)));dataSourceTable.Columns.Add(new System.Data.DataColumn('Make', typeof(string)));dataSourceTable.Columns.Add(new System.Data.DataColumn('Color', typeof(string)));dataSourceTable.Rows.Add(originalColumnValues);// Line 6GridView1.AutoGenerateColumns = false;// Line 7GridView1.DataSource = dataSourceTable;The first five lines create a data source containing three fields: Model, Make and Color. Line six sets the GridView's 'AutoGenerateColumns' property to false. This prevents the GridView from generating columns automatically when you bind it to a data source. Line seven binds the GridView to the data source. At this point, the GridView displays no columns.
Add the following code below the code described in the previous step:/ Lines 8-12BoundField boundField = new BoundField();boundField.DataField = 'Make';boundField.HeaderText = 'Ford';DataControlField dataControlField = boundField;GridView1.Columns.Add(dataControlField);// Lines 13 = 17boundField = new BoundField();boundField.DataField = 'Model';boundField.HeaderText = 'Mustang';dataControlField = boundField;GridView1.Columns.Add(dataControlField);// Line 18GridView1.DataBind();Lines eight through 12 create a bound field. This field references the data source's 'Make' field. Line 10 assigns a value of 'Ford' to the bound field. You can make this value anything you like. This is the value that appears in the new column. Line 12 adds the bound field to the GridView. Lines13 through 17 create another bound field. This bound field references the data source's 'Model' field and sets its text value to 'Mustang.' Line 18 binds the GridView to the data source.
Press 'F5' to run the application. Your Web browser will open and display the GridView and the columns you added.
In Feburary 2016 05,
Subscribe to:
Posts (Atom)