Computer Science Era

Advertisement

Friday, 28 February 2014

1st step: Open Server Explorer by Pressing Ctrl+Alt+S and Click on Add Connection

add-connection-in-server-explorer

2nd step: Click on Change Data Source in Add Connection Window

click-change-button

3rd step: change Microsoft SQL Server Database File to Microsoft SQL Server and Press OK

click-on-Microsoft-SQL-Server

4th step: Select the Server Name by clicking on icon of drop down menu

select-server-name

5th step: select the database name by clicking on icon of drop down menu

select-database-name

6th step: Click on Test Connection Button

test-connect

7th step: Test Connection Succeeded and Press OK

test-connection-succeeded

8th step: Press OK in Add Connection window

press-ok

Finally, Database Connection is visible now Server Explorer

data-connection-of-database-in-visual-studio




Thursday, 27 February 2014

1st step: Make new Database Diagram

new-database-diagram

2nd step: Add required tables in diagram

add-tables

3rd step: Click on the Primary key Icon

click-primary-key

4th step: The relationship Icon is visible now


5th step: Press the Left Key of Mouse/Touch pad on the relationship Icon and drag towards the other table drop at the field which you want to use as foreign key

drag-from-relationship-icon-drop-at-key-which-is-used-as-foreign-key

6th step: Tables and Columns Relationship window is visible, now click OK button

press-ok

7th step: Click on the Insert and Update Specification

insert-and-update

8th step: Change the Delete Rule to Cascade from No Action if and only if you want to delete foreign key record if primary key record is deleted

cascade-of-delete-rule

9th step: Change the Update Rule to Cascade from No Action if and only if you want to update foreign key row if primary key row is updated

cascade-of-update-rule

10th step: Press OK button

press-OK


11th step: A connection is visible between two tables and save the diagram to effects on the tables by pressing CTRL+S

save-relationship




Monday, 24 February 2014

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message:
(SyntaxError) : Unexpected token <"
Solution:
There are two reasons to occur this syntax error
  • Your .xml file is not in correct format.
  • You might have uploaded many .xml files therefore error may occur.

In first case you have to write correct xml syntax in your file or do correction in downloaded template file.
In second case, there is no proper solution; I just discover a trick to remove this error. But one thing you should keep in mind before doing anything to save your blog data. I strongly recommend you that you must have to save all your blog posts and pages (may be .doc or any other format) First.
If you save all your blog data then follow these steps given below:

First Step: Go to Template and Click on Backup/Restore and Download Full Template

click-on-download-full-template

Second Step: Go to Setting in Publishing Area Click on Edit

click-on-edit-blog-adress
Third Step: Change your blog address with adding any digits or alphabets and then click save

click-on-save-in-blog-adress

Fourth Step: Click on My Blogs

click-on-my-blogs

Fifth step: Click on New Blog

click-on-new-blog


Sixth Step: Give any title and Give the address of your previous / original blog and select any template as your wish and then Click on Create Blog

create-new-blog

Seventh step: Click on the Title of your newly created blog

click-on-title-of-newly-created-blog

Eighth Step: Go to Setting and click on Backup/Restore and Click on Choose File and select your downloaded template and then Finally Click on Upload

upload-downloaded-template

Your previous template in now available and now you can upload as many template files as your requirement. The syntax error will not be generated. 


To host videos on the web is very difficult due to many reasons most notably that video files are large and resource heavy. When someone watches a video on your website that in fact downloading a large video file from server, that’s not a problem when one person watches one video, imagined what happened when thousand of people watch the same video at the same time that means a server has to transfer this same file to one thousand different computers simultaneously and realize how this can rapidly become a difficult problem because videos are complicated and resource heavy. To solve this problem, specialized services out there that help you to host videos you have the free once and like Youtube





 And you have premium once like Vimeo


Here you can host some video for free and then you can pay for better options
And you have for pay once like VideoPress


or

ZenCoder



Which video web hosting service is appropriate it depends on your specific purpose if you broadcasting free videos and you want as many people as possible to watch them and show them youtube is best for you if you have more creative or professional videos and you want to show off your talent viemo might be best for you just remember that on vimeo you have to face many restricted rules about what kind of content can be placed in their system and if you break those rules your video would be taken off and you might lose your account so if you are going to use vimeo read first that what you allowed to publish before start publishing your content if you want complete control and you want to restrict where your videos are displayed, actually if you want people can only access them from your website, you must have a professional video hosting service like videopress it is automatic for those who create wordpress.
Zencoder it is also another service that provides very advance and professional video services and  viddler which is one of the best that also provides advance and professional video services. it probably the right option
Please keep in mind one thing that do not host your videos on your own server I strongly discouraged you from doing this to host videos on your own server like I said videos are resource heavy and hard to work with them because it can create problems for you. 



Saturday, 22 February 2014

PHP to HTML
Check boxes, Option buttons, Drop down List, 
Text box and Text area can be generated inside foreach/for/while loop. In case of every element except drop down list, there should be a counter which should be incremented every time so that every element assigned unique key. For example: $tempNo is a variable/counter which is
incremented till data is coming from database tables / defined condition remains true.

To generate checkbox dynamically 2-dimensional array should be used in name of the checkbox

$tempNo = 1;
foreach(Array/object coming from database as $i)
{
echo("<input type='checkbox' name='checkAnswers[$tempNo][]' value='$object-value-1' />object-value/array-value-1");
echo("<input type='checkbox' name='checkAnswers[$tempNo][]' value='$object-value-2' />object-value/array-value-2");
echo("<input type='checkbox' name='checkAnswers[$tempNo][]' value='$object-value-3' />object-value/array-value-3");
            $tempNo = $tempNo + 1;
}
and so on..

To generate Option/Radio Buttons dynamically 1-dimensional array should be used in name of the option/radio buttons

$tempNo = 1;
foreach(Array/object coming from database as $i)
{
echo("<input type='radio' name='radioAnswer[$tempNo]' value='$object-value-1' /> object-value/array-value-1");
echo("<input type='radio' name='radioAnswer[$tempNo]' value='$object-value-2' /> object-value/array-value-2");
echo("<input type='radio' name='radioAnswer[$tempNo]' value='$object-value-3' /> object-value/array-value-3");
$tempNo = $tempNo + 1;
}
and so on…

To generate Text Fields/Text Area dynamically 1-dimensional array should be used in name of the Text Fields/Text Area

$tempNo = 1;
foreach(Array/object coming from database as $i)
{
echo("<textarea id='textarea' name='textanswerlarge[$tempNo]'></textarea>");
or
echo("<input type='text' name='textAnswerSmall[$tempNo]' value='$object-value-1'>");
}
and so on..

To generate Drop Down List / <select><option> dynamically. <select> tag should be used outside the foreach or any other loop.

$output .= "\n<select name='category' id='category'>";
foreach(Array/object coming from database as $i)
{
            $output .= "\n<option value='$i'>$i</option>";
}
$output .= "\n</select>"; 

To generate Drop Down List/<select><option> dynamically with pre-selected value. 

$output .= "\n<select name='category' id='category'>";
$output .= "\n<option value='0' selected='selected'>----------Category-----------</option>";
foreach(Array/object coming from database as $i)
{
if($i === Parameters coming in functions)
//use === in condition in case of different data types
//use == in condition in case of same data types
{
            $output .= "\n<option value='$i' selected='selected'>$i</option>";
}
else
{
            $output .= "\n<option value='$i'>$i</option>";
}
}
$output .= "\n</select>"; 


Additional information
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

The system cannot find the file specified.

Erro 40: Cannot Connect to SQL Server


1st Step: Go to SQL Server Configuration Manager

sql-server-configuration-manager

2nd Step: Click on SQL Server Services

SQL Server Services

3rd Step: Right Click on SQL Server (MSSQLSERVER)

SQL Server (MSSQLSERVER)

4th Step: Click on Properties

Properties

5th step: Goto Service and Change Start Mode from Manual/Disabled to Automatic

Start Mode from Manual/Disabled to Automatic

6th step: Goto to Log On and Click on Start Button and do the same for all

Goto to Log On and Click on Start Button

7th Step: Click Apply and OK

8th Step: Got SQL Server Management Studio and Click on Connect

SQL Server Management Studio

9th Step: SQL Server Management Studio is now working correctly

SQL Server Management Studio Connected