Displaying 20 results from an estimated 55 matches for "lft".
Did you mean:
ldt
2003 Jan 23
2
send_files failed to open filename ...
...s these messages harmful or not ?
Here below my rsync command and some of the error messages :
rsync --delete -zrv --bwlimit=$bwlimit --timeout=1200
--exclude-from='/etc/rsync/exclude' $user\@" . $server .
"::htdocs/$dir/ /var/www/htdocs/$dir/
send_files failed to open
www.lft.mg/matieres/svt/Evaluations/CLASSE.GIF: No such file or directory
send_files failed to open
www.lft.mg/matieres/svt/Evaluations/COUPES.GIF: No such file or directory
send_files failed to open
www.lft.mg/matieres/svt/Evaluations/DBasalte.gif: No such file or directory
send_files failed to open
ww...
2006 Jun 02
2
Sticky Options to Find?
Is there a way to provide "sticky" options to ActiveRecord::Base::Find ?
I''m thinking something with a use model like:
class Function < ActiveRecord::Base
sticky :conditions => "lft > 0", :order => "lft ASC"
end
Where all subsuquent find operations have those options applied. In this
case:
Function.find(:all)
Would actually be equivalent to:
Function.find(:all, :conditions => "lft > 0", :order => "lft ASC")
And
Function....
2005 Mar 08
1
To convert an adjacency list model into a nested set model
.../ \
/ \
Bert (2,3) Chuck (4,11)
/ | \
/ | \
/ | \
/ | \
Donna (5,6) Eddie (7,8) Fred (9,10)
The data is than stored in the following form:
> lft=c(1,2,4,5,7,9)
> rgt=c(12,3,11,6,8,10)
> print(Per<-data.frame(emp, lft, rgt))
emp lft rgt
1 Albert 1 12
2 Bert 2 3
3 Chuck 4 11
4 Donna 5 6
5 Eddie 7 8
6 Fred 9 10
To find now the supervisor of an employee all you have to do is to look
where the employees lf...
2005 Oct 12
2
Help with act_as_nested_set
...iction.all_children) #Romance[135], Science
Fiction[136]
display_children(non_fiction.full_set) #Romance[135], Science
Fiction[136], Non Fiction[128], Science[129]
Look just plain wrong. I looked at the table, and it''s set up correctly:
id | name | parent_id | lft | rgt
-----+-----------------+-----------+-----+-----
100 | Mystery | 93 | 3 | 4
101 | Romance | 93 | 5 | 6
92 | Books | | 1 | 22
95 | Science | 94 | 11 | 12
96 | History | 94 | 13 | 14
98 | Sof...
2010 Aug 01
0
Picking Part of Large R Object
...ve imported an HTML document to R (called tables) and wish to select
certain pieces of it for processing. The first few lines of the object
appear as follows:
> tables
[[1]]
<table id="fs-table" class="gf-table rgt">
<thead>
<tr><th class="lm lft nwp">
In Millions of USD (except for per share items)
</th>
<th class="rgt">
3 months ending 2010-06-30
</th>
<th class="rgt">
3 months ending 2010-03-31
</th>
<th class="rgt">
3 months ending 2009-12-31
</th>
<th cl...
2006 Jul 18
1
Bad values for acts_as_nested_set?
...to add this method to acts_as_tree here:
http://www.chuckvose.com/articles/2006/05/24/recursive-children
But I''d prefer to use the more efficient way of acts_as_nested_set (and
not to have to revert to my old code).
Anyway, here''s my issue: if I already have a root1 element with lft:1
and rgt:4 (has one child) and add a new root2 (has one child also), it
is assigned lft:1 and rgt:4 also!
So if I ask for root2.all_children I also retrieve the child of root1!
My migration schema:
create_table "elements", :force => true do |t|
t.column "name", :s...
2006 Mar 15
5
acts_as_threaded - help ???
...osts/show.rhtml, and models/post.rb as shown in the screencast.
When I submit the post I get an SQL error:
PGError: ERROR: null value in column "root_id" violates not-null constraint:
INSERT INTO posts ("name", "updated_at", "body", "depth", "lft",
"subject", "root_id", "parent_id", "rgt", "created_at")
VALUES(''Richard Nixon'', ''2006-03-14 19:45:58'',
''Erase tape number 2347!'', 0, 0, ''Memo'', NULL, NULL, 0,
''2...
2007 Jan 31
2
has_many :conditions
Is it possible to put conditions relative to the current instance in
has_many''s :conditions?
For example, in a forum app:
class Post < ActiveRecord::Base
belongs_to :topic
has_many :self_and_descendants, :class_name => "Post", :order =>
"lft",
:conditions => "topic_id = #{topic_id} AND (lft BETWEEN #{lft} AND
#{rgt})"
end
With the above code, I get the following exception:
undefined local variable or method `topic_id'' for Post:Class
I''m not interested in whether acts_as_nested_set is a good...
2009 Aug 19
10
acts_as_list / acts_as_tree / acts_as_nested_set - which one
I am creating forum application which needs usage of acts_as_list or
acts_as_tree or acts_as_nested_set.
I am unable to decide among these. please could some one recommend from
their experience?
--
Posted via http://www.ruby-forum.com/.
2008 Aug 22
1
Problem using rsync for backing up on to a NAS
Hi,
I have a problem that was already discused in the german archlinux forum
and couldn't be solved. Because of this I was asked to use the rsync
mailing list. So here I am ;b
I'm using the following script to backup my data to a Network Attached
Storage that has an ext3 formated hdd that is mounted via NFS
script: http://pastebin.com/f6b7115c9
This script works fine for /home but
2006 May 10
1
acts_as_nested_set does not work (in my case).
Hello,
I am using acts_as_nested_set. My problem is that the columns "lft" and
"rgt" get the value 0 if I create a new entity. If I delete an entity I
get negative values (-1, -2, -3) - but for all entities. Is there
anything missing? Is there any example for "acts_as_nested_set" in the
web?
--
Posted via http://www.ruby-forum.com/.
2003 Nov 10
1
Request for subsystem 'sftp' failed on channel 0
...ec
/usr/ucb
$HOME/bin /usr/bin/X11 /sbin . )
setenv MAIL "/var/spool/mail/$LOGNAME"
setenv MAILMSG "[YOU HAVE NEW MAIL]"
#if ( -f "$MAIL" && ! -z "$MAIL") then
# echo "$MAILMSG"
#endif
csh.login:
# If LC_MESSAGES is set to "C at lft" and TERM is not set to "lft",
# unset LC_MESSAGES.
if ($?LC_MESSAGES) then
if ("$LC_MESSAGES" == "C at lft" && "$TERM" != "lft") then
unsetenv LC_MESSAGES
endif
endif
Norm Fredrick
Computac Inc.
Networ...
2006 May 12
2
Has many through join table issues
I''m trying to wrap my caffeine soaked brain around has_many :through
following along at:
http://rails.techno-weenie.net/tip/2005/12/23/teaching_your_blog_model_new_tricks_with_has_many_through
I think my models are a little more complex than what fits this
narrative.
I have a directory of members, each member can belong to multiple
categories.
The category table references itself
2006 Jan 01
7
[ ANN ] Hieraki2
Happy new year! Hieraki 2.0.0 is released.
You can download Hieraki2 from rubyforge.org as tgz or zip
(http://rubyforge.org/projects/hieraki).
Hieraki2 has a new wiki engine that ships with more than a dozen new
features:
* everything-is-a-wiki-page (TM)
* all pages are under version control
* access control list
* stay in full control of the tree structure by cut and pasting
2006 May 31
1
Help enhancing acts_as_nested_set
...At the far bottom of this messgae I''ll
include the entire nested_set.rb file I created. Sorry if this is not the
best way to post to this forum.
def acts_as_nested_set(options = {})
configuration = { :parent_column => "parent_id", :left_column =>
"lft", :right_column => "rgt"}
configuration.update(options) if options.is_a?(Hash)
class_eval <<-EOV
include ActiveRecord::Acts::NestedSet::InstanceMethods
def self.left_col_name() "#{configuration[:left_column]}" end...
2006 Apr 29
2
counter_caching clobbered when preloading association ?
...following
the parent_id through all the folders until I reach root. (Looking into
the db I see the correct values so this seems to work).
But I hit a problem when trying to read the file_count value from the
database:
the code:
@folders = Folder.find(:all, :order => ''root_id desc, lft'')
will return the file_count value as set in the database
the code:
@folders = Folder.find(:all, :include => :files, :order => ''root_id
desc, lft'')
will return a file_count value of zero for all parents
So it seems that when I include the association to query fo...
2002 Aug 28
0
user defined function in rpart
...xph(y~-1))^2)
list(label= sum(y[,2]), deviance=dev)
}
tst.split<-function(y, wt, x, parms, continuous){
xun<-sort(unique(x))
n <- nrow(y)
ndev<-sum(residuals(coxph(y~-1))^2)
gd<-rep(0,n-1)
dir<-rep(1,n-1)
if (continuous) {
for(i in xun[xun<max(xun)]){
lft<-try(sum(residuals(coxph(y[x>i]~-1))^2))
rt<-try(sum(residuals(coxph(y[x<=i]~-1))^2))
gd[x==i]<-ndev-(lft+rt)
#dir[x==i]<-1
}
list(goodness=gd , direction=)
}
else{
list(goodness= , direction = )
}
}
tst.init<-function(y, offset, par...
2005 Aug 05
0
Finding by inclusion in nested set
...a
specific category (given as primary key) or any of its sub-categories.
SELECT tasks.*, tasks_category.name
FROM
categories AS nested_set_categories, tasks
LEFT OUTER JOIN
categories AS tasks_category
ON
tasks_category.id = tasks.category_id
WHERE
(parent.id = ?)
AND
(tasks_category.lft BETWEEN nested_set_categories.lft AND
nested_set_categories.rgt)
(The aliases in this snippets require a patch for ActiveRecord; see
<http://dev.rubyonrails.org/ticket/1907>.)
Unless I''m mistaken, this kind of query is not currently supported by
AR#find. Of course, I could write...
2009 Feb 17
8
Converting Acts_As_Tree to Acts_As_Nested_Set
Hello,
I have a tree structure that needs to be converted into a nested set.
A great deal of work has already been done on the tree items, so
maintaining the integrity of the id''s is mandatory. However I need
the ability to access entire branches of the tree, which is what
Nested set does. Does anyone have any suggestions on how to
efficiently transfer the tree to the nested set and
2006 Nov 16
1
Strange indexing issues with CachedModel, STI, and AAF
...m my base STI class I get a result count but no results. If I run the same search from one of the children STI models I get the appropriate results (if the information was indexed).
Here''s my setup:
class Record < CachedModel
acts_as_nested_set
acts_as_ferret( :fields => {
:lft { :index => :untokenized_omit_norms },
:name => {},
:desc => {},
:body => {:strore => :yes},
:role => {},
})
def self.inheritance_column
''role''
end
# methods below .....
end
class FirstRecord < Record
end
class SecondRecord <...