Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Front-end



  Sass Style Guide: A Sass Tutorial on How to Write Better CSS Code

Writing consistent and readable CSS that will scale well is a challenging process. Especially when the style sheets are getting larger, more complex, and harder to maintain. One of the tools available to developers to write better CSS are preprocessors. A preprocessor is a program that takes one type of data and converts it to another type of data, and in our case CSS preprocessors are preprocessing languages which are compiled to CSS. There are many CSS preprocessors that front-end develop...

   CSS,SASS,TUTORIAL     2015-09-17 06:40:47

  How to play with cross domain request

What is cross domain request In simple, cross domain request is to request resource from other domain in one domain. Note, the "other domain" doesn't just mean domain name only, it includes much more. If the protocol, domain name, port is not the same, two domains will be considered different.  Below example describes what is considered as different domain. http://www.a.com/a.jshttp://www.a.com/b.js               # Same domainhttp://www.a.com/lab/a.js &nb...

   FRONT END,JSONP,CROSS DOMAIN,CROSS ORIGIN,CORS,DOCUMENT.DOMAIN,WINDOW.NAME     2016-11-06 00:48:54

  Best practices of front end optimization

1. Use DocumentFragment or innerHTML to replace complex elements insertion DOM operation on browser is expensive. Although browser performance is improved much, multiple DOM elements insertion is still expensive and will affect the page load speed. Assume we have an ul element on our page, we now want to retrieve a JSON list using AJAX and then update the ul using JavaScript. Usually we may write it as : var list = document.querySelector('ul'); ajaxResult.items.forEach(function(item) { // ...

   JavaScript,Front end,Optimization,Tips     2013-07-06 11:26:27

  Show Bootstrap tooltip in AngularJS ng-repeat elements

In contemporary web application development, many front-end frameworks have been used to accelerate the speed of development and circumvent browser compatibility issues. Among them, AngularJS and Bootstrap are two frequently used.  AngularJS is a MVC JavaScript framework developed by Google to provide easy synchronization between user view and data model. While Bootstrap is developed by Twitter and it eases the work of designing a simple and concise UI without much manual design work ...

   BOOTSTRAP,ANGULARJS,TOOLTIP,NG-REPEAT     2016-05-21 10:52:02

  Beauty of code : How to write graceful PHP code

Writing good code is an art. In order to achieve this, it is necessary to develop good programming habits at the beginning. Good programming habits not only contributes to the early project design (modular),but also allows you to the code easier to understand, so that the maintenance of the code is easier. Bad programming habits will result in more code bugs, and will make future maintenance work difficult. We introduce some good programming habits taking PHP as example. Hope this will help you....

   PHP,Good code     2012-08-26 12:23:03

  Handle NXDomain error when resolving IP address in Ruby DNS resolver

In another post, we covered how to resolve SystemStackError when resolving IP address in Ruby. In this post, we would cover another common issue where a NXDomain error is returned when resolving an IP address. The NXDomain error means that the queried domain name does not exist in the DNS. In Ruby, DNS resolver library will use /etc/resolv.conf by default get the name servers to resolve the domain name. There are multiple DNS name servers can be specified in /etc/resolv.conf with below format. ...

   RUBY,RUBY ON RAILS,NETWORK,DNS,NXDOMAIN     2017-07-16 01:39:23

  Gracefully exiting from console programs in Ruby

Imagine you write a CLI program or a Rake task which loops through some data performing some work on it. You run it and then you remembered something. You’d love to kill the process with ctrl-c, but that will raise an exception somewhere in the loop. What you want is for the iteration to complete and then you want the program to quit. You could handle the Interrupt exception or add some conditions. But how about a cleaner and reusable way? No problem - you can trap signals, which...

   Ruby,Exit,Command window,Console,Graceful     2012-03-14 13:42:16

  How-to: Remotely shut down your computer

Think of this scenario; You are lying in bed and just finished watching a movie that you were streaming from a computer downstairs. You want to sleep, but you need to head downstairs to turn the computer off. Save some time, and do it from the computer upstairs.There are a number of ways that you can restart or shutdown remote computers. You could use a remote desktop connection, but there are quicker ways and we will look at them today.This article will show you various methods you ca...

   Windows,Shutdown,Remote control,Cmd     2011-10-10 06:18:44

  Facebook share price is over $38 before the market opens on Wednesday

According to Sina Tech, Facebook share price is over $38 before the market opens on Wednesday. It's the first time that its share price is over $38 since its IPO last year. In May 2012, Facebook went to public on Nasdaq with a releasing share price of $38. The share price went below $38 after the first trading day. Then after its share price kept dropping until last September it reached to its lowest point with a share price of $17.58. But as Facebook's performance was better than expected last...

   Facebook ,Share price     2013-07-31 07:45:18

  Vim anti-patterns

The benefits of getting to grips with Vim are immense in terms of editing speed and maintaining your “flow” when you’re on a roll, whether writing code, poetry, or prose, but because the learning curve is so steep for a text editor, it’s very easy to retain habits from your time learning the editor that stick with you well into mastery. Because Vim makes you so fast and fluent, it’s especially hard to root these out because you might not even notice them...

   Vim,Anti-pattern,macro,syntax     2012-02-08 10:06:15