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

SEARCH KEYWORD -- Change



  Resolve stylesheet_link_tag fails to work in Ruby on Rails

When developing Ruby On Rails application, developers sometimes will see an unexpected behavior where the application cannot be loaded due to "TypeError: Object doesn't support this property or method" when invoking stylesheet_link_tag. The symptom looks like  And the Rails log will show something similar to below The error occurs because there is some problem finding the correct assets which are located in app/assets. To resolve the issue, you can following below steps. Add gem 'coffee-...

   RUBY ON RAILS,STYLESHEET_LINK_TAG,JAVASCRIPT_INCLUDE_TAG,TYPEERROR     2016-10-14 03:59:11

  this in JavaScript

this is a keyword in JavaScript. It refers to an internal object created automatically when a function executes, it can only be used in a function. For example:        function test(){     this.x = 1;   }The this keyword will change when a function is called in different situations. However, the general rule is : this refers to the object which calls the function.Next we discuss the use of this in 4 different situatio...

   this,keyword,use,JavaScript     2012-05-05 12:47:37

  Chrome to provide native image lazyload support

Previously we have introduced how Medium achieved loading images lazily, basically what they did was using lots of HTML tags and CSSs to change the images at different stage. It needs lots of code to do this. With the high demand of this feature for resource consumption and performance consideration, Chrome is now working on a feature to provide native support for loading images/iframes lazily. This feature is named lazyload. lazyload will allow three values: auto: the default behavior of ...

   CHROME,LAZYLOAD,IMAGE,IFRAME     2018-09-22 23:04:35

  Installing LAMP On Ubuntu

In this guide I will show you how to install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very little knowlegde of using Linux. Install ApacheTo start off we will install Apache.1. Open up the Terminal (Applications > Accessories > Terminal).2. Copy/Paste the following line of code into Terminal and then press enter:sudo apt-get install apache23. The Terminal will then ask you for you're password, type it an...

   LAMP,Ubuntu,Linux,Apache,MySQL,,PHP     2011-04-28 05:20:02

  Guide on recovering data in MySQL

In our daily work, there might be mistakes made which got some data or even databases deleted in MySQL. If this happens on production, it would be a nightmare. In case this happens, normally DBA would jump in to save the world. And they would try to recover the data from the backup if there is any. But if there is no backup, then the show stops. Hence database backup is necessary on production environments to avoid such awkward situation. Also normally in MySQL, binlog should be enabled as well ...

   MYSQL,DATABASE,BACKUP,BINLOG,EXAMPLE     2020-08-26 07:50:30

  Firefox 18 will adopt IonMonkey as its JS compiler

Tendency would be converse after 30 years. The previous famous Firefox is now forced to change its version number frequently becuase of the rise of Chrome. Last month Mozilla released Firefox 15 and  also released news about Firefox 17, And now Firefox 18 is also ready to come out. According to PCWorld, to keep the promise of bring quicker and smoother experience, Mozzila will adopts new JavaScript technology in Firefox 18. The new Firefox with new JavaScript technology will be 26% qu...

   Firefox 18,IonMonkey,JavaScript     2012-09-17 11:50:02

  Execute PHP from a .html File

How can I execute PHP code on my existing myfile.html page?:When a web page is accessed, the server checks the extension to know how to handle the page. Generally speaking if it sees a .htm or .html file, it sends it right to the browser because it doesn't have anything to process on the server. If it sees a .php extension (or .shtml, or .asp, etc), it knows that it needs to execute the appropriate code before passing it along to the browser. Here is the problem: You find the perfect ...

   PHP,HTML,PHP in HTML,AddType     2011-12-26 14:01:20

  The seven rules of Unobtrusive JavaScript

I've found the following rules over the years developing, teaching and implementing JavaScript in an unobtrusive manner. They have specifically been the outline of a workshop on unobtrusive JavaScript for the Paris Web conference 2007 in Paris, France. I hope that they help you understand a bit why it is a good idea to plan and execute your JavaScript in this way. It has helped me deliver products faster, with much higher quality and a lot easier maintenance. 1. Do no...

   JavaScript,Feature,Tips     2012-01-18 08:21:39

  "Simplicity" is not a simple concept

I've come to avoid using the word "Simplicity" or its variants ("Simple," &c.) It means too many different things to different people.For example, my original land-line phone was simple:It's simple by eliminating extraneous use cases. It only handles one user scenario, the one that was the most common when it was invented. If we think of the number of affordances and the number of uses, this kind of simplicity lowers the number of affordances by lowering the number of uses. I call this kind ...

   Simplicity,Software,Usability,iPhone,Phone     2011-11-24 09:21:09

  Early homepages of some famous websites

Are you curious about what are their early homepages like for some famous IT companies? Let's take a look at them now. 1. Google This page was relative concise at that time. The current Google homepage is more concise. 2. Facebook It went online on 4th Feb, 2004. This was its homepage in 2004 3. YouTube It went online on 15th Feb, 2005. Until 22nd April, the first video clip was uploaded. 4. Wikipedia It emphasizes on free content and collaborative editing. It also supports many languages. 5...

   Homepage,website,History,Google,Facebook     2015-07-23 11:34:18