Hi, I just came across a requirement to add a rich text editor in my web application made in rails. I used TinyMCE for this. I loved the small js based editor not because of the features but because of the customization options it provides. Here I show u a simple way to integrate TinyMCE […]
August 13, 2011
I recently found out a very nice JQuery plugin. http://dipi-graphics.com/labs/6/NavDock-jQuery-Plugin.html I havent tried it yet but will try it soon.. From the demo…its worth a shot !!
August 12, 2011
In this post I show(after some googling) how to use gradients(color transitions) in your html using simple CSS. I am putting the CSS code below. This code can be pasted in the css file of your project. you have to create a div with id as “gradient”. Alternatively, you can paste this code in style […]
August 10, 2011
The Core Extensions are ActiveSupport’s collection of extensions to Ruby’s core classes and modules. They are basic design patterns solving problems that are encountered often in Ruby. These methods are one level below the Rails API; they are the internal functions that Rails uses. Class:Array–> ————————————————————————————————————————————- Conversions core_ext/array/conversions.rb • Array#to_sentence joins the array’s elements and […]
August 9, 2011
The primary purpose of source code should not be expressing implementation to a computer; it should be expressing meaning to people. Programming languages are an incredibly expressive and terse medium for the concepts programmers talk about. Proposals to make programming languages more English-like inevitably fail not because of poor implementation but because there is an […]
August 9, 2011
This is the continuation part of the series I started. The topic for this post : String —————————————————————————————————————— String#%(args) interpolates the arguments into itself in the manner of sprintf. To provide more than one value for interpolation, you must supply an array. “%.5f” % Math::PI # => “3.14159” “%.5f, %.5f” % [Math::PI, Math::E] # => […]
August 9, 2011
This is the continuation part of the series I started. The topic for this post : Proc —————————————————————————————————————— • Proc#[] is shorthand for Proc.call. p = lambda{|x| x * 2} p[3] # => 6 ——————————————————————————————————————
August 9, 2011
This is the continuation part of the series I started. The topic for this post : Module —————————————————————————————————————— • Module#remove_method removes a method from the specified class. Module#undef_method, on the other hand, actively prevents that method from being invoked on the class; it inserts a special entry into the m_tbl that stops method lookup. ——————————————————————————————————————
August 9, 2011
This is the continuation of the series I started. The topic for this post : Kernel —————————————————————————————————————— • Kernel#Array tries to coerce its argument into an array: Array([1,2,3]) # => [1, 2, 3] Array(1..3) # => [1, 2, 3] Array(1) # => [1] ——————————————————————————————————————
August 9, 2011
This is the continuation of the series I started. The topic for this post : Hash —————————————————————————————————————— • Hash.new accepts a block, which provides a way to calculate a default value if the hash has none. This is useful for caching. The first time a cached method is called with a particular set of arguments, […]
August 13, 2011
0