Wednesday, July 27, 2016

CSS tricks

1. css short hand rule


font-weight: bold;
font-style: italic;
font-variant: small-caps;
font-size: 1em;
line-height: 1.5em;
font-family: verdana,sans-serif

font: bold italic small-caps 1em/1.5em verdana,sans-serif


2. Two classes together

...


3. CSS border default value

border: solid


4. CSS document for printing

variety of ways to associate media-specific stylesheets to a document


    all
    aural
    braille
    embossed
    handheld
    print
    projection
    screen
    tty
    tv


5.  External custom font

@font-face {
font-family: cool_font;
src: url('cool_font.ttf');
}


6. CSS positioning within a container


Assign the following CSS rule to the container:

#container
{
position: relative
}


7. repeat-x repeat-y

background-repeat: repeat|repeat-x|repeat-y|no-repeat|initial|inherit;


repeat-x  - background image will be repeated horizontally

repeat-y -  background image will be repeated vertically


8. Block vs. inline level elements

Block element starts on a new line.

div p h1 form ul  tags

Inline elements do not start on a new line

span img a tags


9. text-transform

capitalize | lowercase | none | uppercase

This property defines how the text will be transformed to.



Sunday, July 24, 2016

Fix 500 Internal Server Error in WordPress

500 Internal Server Error is not specific to wordpress. Usually beginners who are managing site gets panic while getting this error. There are many causes for this type of error. Most of the time you will see this error in your own browser itself. Common ways of displaying error message.
  • “500 Internal Server Error”
  • “HTTP 500 – Internal Server Error”
  • “Internal Server Error”
  • “HTTP 500 Internal Error”
It says ‘something went wrong’, but the server is not clear about the error. This is a server side issue which tells that some configuration settings has changed. So if you are a website administrator you need to check on the configuration files, .htaccess files. PHP settings, log files.

Solution

Check .htaccess file.

If you are using .htaccess file then double check that file. The 500 internal server error may occur if the .htaccess file is corrupted. When you install wordpress and if you wish to edit the .htaccess file, then rename the original  .htaccess file to some .htaccess_backup. Create a new copy of the file and do your changes. In case if your .htaccess file gets corrupted you can replace the old file and check if the error is still there.
In my case I found that W3TC Browser Cache has inserted few lines into my  .htaccess file. I removed it and it works fine as before.
Keep in mind that there might be cases where you have multiple .htaccess file. So if you replace/remove one in your sub folder then the other file in your parent folder will cause problems.

You will get a long list of HTTP status codes from here.

Mime type for ipa and plist - iOS


Mime type for ipa - application/octet-stream
Mime type for plist- application/plist

Issue

Cannot download manifest file (.plist) from server. But the file still exists.

Analysis

Configure to allow the .plist file to be accessed by URL.

Solution.

Add above MIME types in the MIME type section in Internet Information Services (IIS) Manager and try again.


 

Friday, June 13, 2014

These are html helpers, which renders html input tag in which the type attribute is set to text.

@Html.TextBox("example")
 
This is the basic format of html helper for textbox. The html
 
 

@Html.TextBoxFor("example")

@Html.EditorFor("example")

Saturday, June 7, 2014

Debugger not activated - Firebug

  • Open the Firebug window.
  • Click on the Firebug icon in the upper-right corner of the window and go to the menu item:
       Options > Reset All Firebug Options
  • Activate Firebug.

Friday, June 6, 2014

  • Version 706 is a database file from Sql Server 2012
  • Version 665 is a database file from Sql Server 2008R2



There may be cases where we want to ignore certain files before committing in mercurial distributed revision control system. We can ignore files using hgignore file.

  • hgignore file resides in the root folder.
  • Open the file
    • Right - click on file and open (CTRL + SHIFT + T). OR
    •  Take terminal from Repository tab and type 
      • thg hgignore
  •  If opened from the terminal

 
hgignore window


  •  Add file path or file extensions and add in the file.
  • It will take into effect after first commit.
  • After adding the restriction rules you can add hgignore file using
    • hg add .hgignore