Sunday, February 5, 2017

Media query

(Shamelessly copying the content as-is)

https://msdn.microsoft.com/en-us/library/ms534161(v=vs.85).aspx

Property values

Type: String
all
Default. Applies to all devices.
print
Output is intended for printed material and for on-screen documents viewed in Print Preview mode.
screen
Output is intended for computer screens.
tv
Output is intended for television screens.
unknown
Intended output is unknown.
aural
Output is intended for speech synthesizers.
braille
Output is intended for braille tactile feedback devices.
embossed
Intended output is embossed.
handheld
Output is intended for handheld devices.
projection
Output is intended for projection devices.
tty
Output is intended for TTY devices

Bootstrap container vs container-fluid

I am Lazy :-)  Just copy & paste from Bootstrap official website.. he he he..


Containers

Bootstrap requires a containing element to wrap site contents and house our grid system. You may choose one of two containers to use in your projects. Note that, due to padding and more, neither container is nestable.
Use .container for a responsive fixed width container.
Copy
class="container"> ...
Use .container-fluid for a full width container, spanning the entire width of your viewport.
Copy
class="container-fluid"> ...

Bootstrap - col-[xs/sm/md/lg]


I always get confused if we need to specify col-xs, col-sm, col-md and col-lg classes for a column in bootstrap. If we specify col-xs it gets applied to xs, sm, md and lg unless we have different value for sm, md and lg. 

http://getbootstrap.com/css/ 

Introduction:
  • Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, e.g. applying any .col-md-* class to an element will not only affect its styling on medium devices but also on large devices if a .col-lg-* class is not present.




Monday, April 25, 2016

Visual Studio 2015

At last.. after several years of gap, I am into blogging again.  What was I doing all these years, doing same job, same work :-)


Started using visual studio 2015 and I am all smileys all day :-)

Certain minimum things we should be aware of :

1. BOWER
2. Nuget packages







Wednesday, June 26, 2013

sql server stuff

CREATE TABLE EMPLOYEE ( EMPID INT IDENTITY(1,1), EMPNAME VARCHAR(500) ) ALTER TABLE EMPLOYEE ADD CONSTRAINT PK_EMPLOYEE_EMPID PRIMARY KEY (EMPID) ALTER TABLE EMPLOYEE ALTER COLUMN EMPNAME VARCHAR(501) CREATE INDEX IX_EMPLOYEE_EMPNAME ON EMPLOYEE (EMPNAME)

Friday, January 20, 2012

Exception handling difference between .NET Framework 1.1 and 2.0

What happens if there is an application exception thrown and is not caught by application.

In .NET framework 1.1, it impacts the current application (web or windows)

In .NET Framework 2.0, it goes upto worker process (beyond our current application), and after a couple of uncaught exceptions, the Website will be stopped automatically (Dangerous !!).

Tuesday, March 15, 2011

Serialize a class to XML

public string GetXML()
{
XmlSerializer objXMLSerializer = null;
StringWriter objStrW = null; // String writer to serialize the object to xml
String strXML; // Stores the serialized XML string
try
{
//Initilize the serializer
objXMLSerializer = new XmlSerializer(this.GetType()); // The serializer object
// Serialize the object
objStrW = new StringWriter();
objXMLSerializer.Serialize(objStrW, this);
// Retrieve the XML
strXML = objStrW.ToString().Replace(CommonConstants.CONST_UTF16, CommonConstants.CONST_UTF8);
return strXML;
}
catch (Exception ex)
{
//throw the exception to the calling function
throw ex;
}
finally
{
//Release the objects
objStrW.Close();
objXMLSerializer = null;
}
}