ALL


  Magic CSS shape

There is a question on StackOverflow which states that someone finds a CSS sample on http://css-tricks.com/examples/ShapesOfCSS/  , the sample shows a triangle created with pure CSS. The source code is :#triangle-up {width: 0;height: 0;border-left: 50px solid transparent;border-right: 50px solid transparent;border-bottom: 100px solid red;}The question is how these few lines can create a triangle? Next we give the answer and the detail illustration to this question We need to consider the Box Model of HTML, here we see content and padding as content and we ignore margin, then the box model...

6,475 1       CSS TRIANGLE BOX MODEL BORDER


  Interview Programming Problems Done Right

IntroductionWhy 37signals Doesn't Hire Programmers Based on Brainteasers and my comment on HN generated a lot of responses, so much so that I'm writing this post to properly explain the essence of a good (IMHO) interview programming problem.Pascal's TrianglePascal's Triangle is a shortcut for getting coefficients most often used binomial probability. The root element is 1. Every other element is the sum of the one or two above it (diagonally left and diagonally right).There are several variations of the problem:Print out the triangle to a specific row;Return a given row of the triangle;Return ...

2,666 0       INTERVIEW PROGRAMMING PROBLEM PASCAL TRIANGLE