Using the overflow CSS property this can be achieved !
The overflowproperty specifies what happens if content overflows an element’s box.
If the content of the div is too tall, there will be a vertical scrollbar. If the content is too wide there will be a horizontal scrollbar.
India, officially the Republic of India is a country in South Asia. It is the seventh-largest country by geographical area, the second-most populous country with over 1.2 billion people, and the most populous democracy in the world. Bounded by the Indian Ocean on the south, the Arabian Sea on the south-west, and the Bay of Bengal on the south-east, it shares land borders with Pakistan to the west; China, Nepal, and Bhutan to the north-east; and Burma and Bangladesh to the east. In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; in addition, India's Andaman and Nicobar Islands share a maritime border with Thailand and Indonesia.
Demo / Output
India, officially the Republic of India is a country in South Asia. It is the seventh-largest country by geographical area, the second-most populous country with over 1.2 billion people, and the most populous democracy in the world. Bounded by the Indian Ocean on the south, the Arabian Sea on the south-west, and the Bay of Bengal on the south-east, it shares land borders with Pakistan to the west; China, Nepal, and Bhutan to the north-east; and Burma and Bangladesh to the east. In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; in addition, India’s Andaman and Nicobar Islands share a maritime border with Thailand and Indonesia. In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; in addition, India’s Andaman and Nicobar Islands share a maritime border with Thailand and Indonesia.In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; in addition, India’s Andaman and Nicobar Islands share a maritime border with Thailand and Indonesia. In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; in addition, India’s Andaman and Nicobar Islands share a maritime border with Thailand and Indonesia.In the Indian Ocean, India is in the vicinity of Sri Lanka and the Maldives; in addition, India’s Andaman and Nicobar Islands share a maritime border with Thailand and Indonesia.
I don’t remember how I got this “Babylon search” thing installed on my Firefox.
Now everytime I open my Firefox, I am being greeted by a babylon search homepage instead of my default Google’s Homepage and also the google’s search bar (next to the address bar) got replaced with babylon search bar.
Now how did I remove it ?????
So, here is a small step by step guide on how to remove babylon search from firefox…..
Step 1 : Use Add/Remove Programs, using the search filter ‘babylon’ uninstall these two.
Step 2 : Goto Options and change the home page url from whatever it was to say “google.com” and click ok.
Step 3 : Restart your Firefox, now you will not see the babylon search page, instead it will show you the page which you have set as Homepage, which is google.com in my case.
But still the search the web option, see the circle on the image below, still shows babylon and on search redirects to babylon.com, read on and you will know how to remove that too…
Step 4 : To revert to Google as your preferred search engine, please do the following.
In the location bar, type about:config and hit Enter. In the filter at the top, type: keyword.URL
Double click it and remove whatever’s in there and replace it with http://www.google.com/search?q=
It’s possible that Babylon will add itself to more than one place in about:config. Therefore, after completing the above steps, type “babylon” in the filter at the top. For every instance where you see a setting with that name in it, right click it and choose Modify and then Reset. Then close Firefox and restart it.
Thats it … and you are done… see the screenshot below with the google search :)
ASP.NET MVC 3 Web Application Template not found in Visual Studio 2010 ?
With Visual Studio 2010 installed, I wanted to create an MVC 3 Web Application, but after heading to the ‘Add New Project’ dialog box, I was surprised to not find a MVC 3 Web Application template.
How go I get MVC 3 templates ?
OK, first you need to head to this link and install ASP.NET MVC 3 framework (approx 21 MB). After you are done with the installation, restart you visual studio 2010.
Now when you create a new project, make sure you have selected .NET Framework 4 in the drop down for framework. You should be able to see both ASP.NET MVC 2 Web Application and ASP.NET MVC 3 Web Application.
Entity Framework is Microsoft’s recommended data access technology for new applications.
The Microsoft ADO.NET Entity Framework is an Object/Relational Mapping (ORM) framework that enables .NET developers to work with relational data using domain-specific objects. It eliminates the need for most of the data-access code that developers usually need to write.
Using the Entity Framework, developers issue queries using LINQ, then retrieve and manipulate data as strongly typed objects.
The Entity Framework’s ORM implementation provides services like change tracking, identity resolution, lazy loading, and query translation so that developers can focus on their application-specific business logic rather than the data access fundamentals.
EF maps to the database tables using a model. This model is responsible for mapping the application’s entities and their relationships to the data held in the physical database. It’s a combination of three layers, and is stored as an Entity Data Model (.edmx) file. .edmxis an XML based file that consists of these 3 layers.
Storage Layer: this is defined with Store Schema Definition Language (SSDL). Table structures and their relationships are defined here.
Conceptual Layer: this is defined with Conceptual Schema Definition Language (CSDL). Business entities and their relationships are described in the conceptual schema.
Mapping Layer :This is defined with Mapping Specification Language (MSL). It maps the conceptual schema to the storage schema. The mapping schema describes how the business entities map to the database schema, and how database tables map to the entities in the model.
What are the different versions of Entity Framework?
The first version of Entity Framework (EFv1) was included with .NET Framework 3.5 Service Pack 1 and Visual Studio 2008 Service Pack 1, released on 11 August 2008. This version has been widely criticized, even attracting a ‘vote of no confidence’ signed by approximately one thousand developers.
The second version of Entity Framework, named Entity Framework 4.0 (EFv4), was released as part of .NET 4.0 on 12 April 2010 and has addressed many of the criticisms made of version 1.
A third version of Entity Framework, version 4.1, was released on April 12, 2011, with Code First support.
A refresh of version 4.1 named Entity Framework 4.1 Update 1, was released on July 25, 2011. It includes bug fixes and new supported types.
The latest version is 4.3.1, which was released on February 29, 2012. There are a few updates, like support for migration.
Features of Entity Framework
Provides integrated Visual Studio tools to visually create entity models and to auto-generate models from an existing database. New databases can be deployed from a model, which can also be hand-edited for full control.
Provides a Code First experience to create entity models using code. Code First can map to an existing database or generate a database from the model.
Integrates well into all the .NET application programming models including ASP.NET, Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), and WCF Data Services (formerly ADO.NET Data Services)
Works with a variety of database servers (including Microsoft SQL Server, Oracle, and DB2)
Benefits / Advantages of using Entity Framework
Reduced development time: the framework provides the core data access capabilities so developers can concentrate on application logic.
Developers can work in terms of a more application-centric object model, including types with inheritance, complex members, and relationships. In .NET Framework 4, the Entity Framework also supports Persistence Ignorance through Plain Old CLR Objects (POCO) entities.
Applications are freed from hard-coded dependencies on a particular data engine or storage schema by supporting a conceptual model that is independent of the physical/storage model.
Mappings between the object model and the storage-specific schema can change without changing the application code.
Language-Integrated Query support (called LINQ to Entities) provides IntelliSense and compile-time syntax validation for writing queries against a conceptual model.
Entity Framework has three developer workflows to help you access data in your application:
Code First – As the name suggests this approach is all about code. You write the classes that make up your domain model. A set of conventions map these classes to a database schema but you can provide additional mapping using code. Code First can map to an existing database or generate a database schema for you based on your model and mapping. If you are targeting an existing database the EF Power Tools can help you get started by generating basic classes and mapping for you.
Model First – You build your model using ‘boxes and lines’ in the Entity Model Designer. Once you model is created the designer will generate a database schema for your model. The classes that make up your domain model are generated for you.
Database First – If you have an existing database this approach allows you to reverse engineer a ‘boxes and lines’ model in the designer. You can then tweak the shape of the model and how it maps to your existing database schema. The classes that make up your domain model are generated for you.
What are Poco Entities ?
POCO stands for Plain Old CLR Object and refers to an object that does not have any persistence concerns and is not aware of persistence framework. Modern development approaches such as DDD (Domain-Driven Design) and TDD (Test-Driven Development) prefer clear separation of concerns which implies persistence ignorance.
The POCO Template can be used to generate persistence ignorant entity types from an Entity Data Model.
What do you mean by Ninject ?
Ninject is a lightweight dependency injection framework for .NET applications. It helps you split your application into a collection of loosely-coupled, highly-cohesive pieces, and then glue them back together in a flexible manner. By using Ninject to support your software’s architecture, your code will become easier to write, reuse, test, and modify.
There may be times where you would like to change your Cpanel username or password. But how do you do it ? This tutorial will be discussing this…
Can I change my Cpanel Username ?
Here you will get mixed answers, most hosting providers will not allow you to change username, because cPanel accounts are tied to the username, your home directory, configurations, email, etc. However few hosting providers do provide this feature but for that too you need to submit a ticket or something.
Can I change my Cpanel Password ?
Yes, you can do that :) let me show you how…
Step 1 : First login to your Cpanel account using your existing username and password.
Step 2 : On your homescreen, on the top right hand side, under the ‘Preference’ Tab select the ‘Change Password‘ option. Step 3 : Provide your old Password and punch in a strong new password and submit.
Step 4 : Once done, you should get a window with the following message.
That’s it you have successfully changed your cPanel password !
If you want to check if a specific file exists on a local machine at a particular path using C# programming language, you can do so by using the File.Exists() method.
To use this first you need to import the System.IO namespace.
Next, below is a sample code that checks if a file exists, first in the same directory and then in some different directory, in case of any doubts/suggestion feel free to use the comments section. Cheers !
static void Main()
// See if this file exists in the SAME DIRECTORY.
Console.WriteLine("The file exists.");
// See if this file exists in the C:\YS\ directory.
Console.WriteLine("The file exists.");
Below is a simple demonstration on how to use checkbox inside a webgrid column in MVC 3.
I had a field called ‘HasPassport‘ in my model which was of type **boolean **for which I required a checkbox column, to show a checked checkbox for every true value and an unchecked checkbox otherwise.
Using the WebGrid.Column’s format parameter below is how I have used…