Displaying 7 results from an estimated 7 matches for "lstrip".
Did you mean:
strip
2006 Jun 04
5
Manipulating form inputs?
...in the radicals.rb model
using validates_xx_of but I would like to do some specific alterations.
For example, I want to remove whitespaces from the ''character'' field.
So I appended create() with:
def create
@radical = Radical.new(params[:radical])
@radical.character.lstrip!
@radical.character.rstrip!
if @radical.save
[snip]
end
But alas this does not work. Either the validates_length_of in the
model gets it or, when I comment that out, MySQL complains about "string
too long." (my second saftey net). Where can I intercept form data
before...
2006 Mar 21
2
How do I get substring of utf-8 string?
I''m trying to get substring from a utf-8 encoded string. (say, first
50 characters of the string) String#[0..49] would give me the first
50 bytes not 50 characters..
I know there is jcode library, but it only let you count number of
characters in utf-8 string.
unicode gem doesn''t seem to help much. unicode_hacks gem seem to
solve the problem, but it also seems to
2006 Mar 12
2
Find all the methods on a object in an irb session?
How can I find all the methods on an object from withing irb?
Thanks,
Joe
2007 Apr 08
3
How to make custom TokenFilter?
In the O''reilly Ferret short cuts, I found very useful example for me.
It explains how to make custom Tokenizer.
But that book doesn''t explain how to make custom Filter.
(especially, how to implement the #text=() method)
I''m a newbee and I don''t understand how do I create my own custom
Filter.
Are there some good source code examples??
--
Posted via
2013 Aug 06
7
Puppet first run timing out
...tent as ''{md5}83f23c33adbfa42b2a9d9fc2db3daeb4''
> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/has_interface_with.rb]/ensure: defined content as ''{md5}8d3ebca805dc6edb88b6b7a13d404787''
> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/lstrip.rb]/ensure: defined content as ''{md5}210b103f78622e099f91cc2956b6f741''
> Notice: /File[/var/lib/puppet/lib/puppet/parser/functions/is_array.rb]/ensure: defined content as ''{md5}875ca4356cb0d7a10606fb146b4a3d11''
> Notice: /File[/var/lib/puppet/lib/puppet/par...
2012 Apr 04
10
[PATCH 0 of 2] libxl: add libxl_domain_config_init
The following series implements libxl_domain_config_init as per the
libxl API requirement that each type has an init function.
The first function does this in an open coded manner and is proposed
for Xen 4.2.
The second function is RFC only since it moves the definition of this
type into the IDL and makes the required infrastructure updates to
enable this. I think this is more 4.3 material at
2012 Jul 04
53
[PATCH 00 of 10 v3] Automatic NUMA placement for xl
Hello,
Third version of the NUMA placement series Xen 4.2.
All the comments received during v2''s review have been addressed (more details
in single changelogs).
The most notable changes are the following:
- the libxl_cpumap --> libxl_bitmap renaming has been rebased on top of the
recent patches that allows us to allocate bitmaps of different sizes;
- the heuristics for deciding