Displaying 20 results from an estimated 92 matches for "bq".
2006 Jul 09
3
acts_as_ferret.. what does it actually do?
...#39;ferret''
class VoObject < ActiveRecord::Base
acts_as_ferret :fields=>
[''short_description'',''section'',''sale_category'',''sale_type'',''outcode'']
def VoObject.refine_search(search_input)
bq = BooleanQuery.new
bq.add_query(TermQuery.new(Term.new("section", search_input),
BooleanClause::Occur::Should))
filter = QueryFilter.new(bq)
@vobjects = Item.find_by_contents(search_text,:filter => filter,
:sort => ["section", "sale_category"])
red...
2005 Sep 07
2
[NU-BQ+CentOS] Special Chars not showing up in browsers
Greetings,
I am in the process of moving several large sites to a Tyan+BQ+CentOS box
(built from the Nuonce ISO) and I see that special characters are not
showing up in the browser properly but do show up in the source "view
source" properly. -- very strange.
Example:
on the web page --> Heizungsbau M?ller
in the source --> Heizungsbau M?ller
When I...
2002 May 15
1
ploting a linear model
Hi
I have the result of a linear model "lm98" and I want to plot it to
analyse the regression but I'm getting the folowing error message
> lm98<-lm(log(U+1)~Bq+Gi+Lv+Tb+Bq:Gi+Bq:Lv+Bq:Tb+Gi:Lv+Gi:Tb+Lv:Bq)
> plot(lm98)
Error in plot.window(xlim, ylim, log, asp, ...) :
need finite ylim values
In addition: Warning message:
NaNs produced in: sqrt(1 - hii)
The response variable is tranformed by a log function but I'm adding 1
so that the 0...
2007 Jun 14
1
BQ/CentOs port forwarding
Just bought a new BQ/CentOS box with full NuOnce load (Linux 2.6.9-55.ELsmp,
gcc 3.4.6, Red Hat 3.4.6-8, Apache 2.0.52, BQ 5102r), to replace my old Qube
3 pro, I have NAT setup (eth0 = inside, eth1 = outside) but need to get port
forwarding going. What is the best way?
Thanks in advance
Richard
--...
2006 May 31
5
Help with sorting arrays with objects in it
I have to build an array through both activerecord and also through a ferret
index.
I was hoping to find a way of sorting the array as i combine the two so
def advanced_search(search_text, store, format, sortby)
# find items in ferret index
items = Item.find_by_contents(search_text)
# and now find all the items from a certain store or category
items_from_sql = Item.find_by_sql("SELECT *
2006 Sep 20
1
help with function
...2247,17274513,17034419,1
2448318,4551585,4226451,7183688,7407924,7538366,7336039,8869193,7902341,
6369089,6211886))
stdr<-runif(100,0,0.5)
stdc<-runif(100,0,0.5)
BC<-runif(1000,0,100)
#model calibration
calib<-function(x){
v<-sample(stdr,1)
cr<-sample(stdc,1)
N<-rnorm(1)
Bq<-sample(BC,1)
Rerr<-exp(N*v-(v^2/2))
Cerr<-exp(N*cr-(cr^2/2))
Bt<-vector();Bt[1]=B0;Bt[2]=B0
Rt<-vector()
Ct<-vector()
for (i in 1:length(x$years)){
Ct[i]<-1/Bq*Bt[i]*Cerr
Rt[i]<-Bt[i]/(a+b*Bt[i])
Bt[i+2]<-(1-m)*Bt[i+1]+Rt[i]*Rerr-Ct[i+1]
}
out<-new.env(...
2006 Sep 19
1
-Need help with function
...2247,17274513,17034419,1
2448318,4551585,4226451,7183688,7407924,7538366,7336039,8869193,7902341,
6369089,6211886))
stdr<-runif(100,0,0.5)
stdc<-runif(100,0,0.5)
BC<-runif(1000,0,100)
#model calibration
calib<-function(x){
v<-sample(stdr,1)
cr<-sample(stdc,1)
N<-rnorm(1)
Bq<-sample(BC,1)
Rerr<-exp(N*v-(v^2/2))
Cerr<-exp(N*cr-(cr^2/2))
Bt<-vector();Bt[1]=B0;Bt[2]=B0
Rt<-vector()
Ct<-vector()
for (i in 1:length(x$years)){
Ct[i]<-1/Bq*Bt[i]*Cerr
Rt[i]<-Bt[i]/(a+b*Bt[i])
Bt[i+2]<-(1-m)*Bt[i+1]+Rt[i]*Rerr-Ct[i+1]
}
out<-new.env(...
2006 Jul 14
3
Whitespace Issues
I am trying to build up a filtered search using the logic below.
bq = Ferret::Search::BooleanQuery.new
bq.add_query(Ferret::Search::TermQuery.new(Ferret::Index::Term.new("section",section.downcase!)),
Ferret::Search::BooleanClause::Occur::MUST)
filter = Ferret::Search::QueryFilter.new(bq)
@vobjects = VoObject.find_by_contents(search_input,:...
2005 Jun 14
4
CentOS / BQ / PHP 4.3.9 with the mail() function
Hey everyone!
Got a little problem...with CentOS / BQ / PHP 4.3.9 with the mail()
function
I'm able to send mail using postfix directly from the command line,
however when I try using the mail function of php no mail is being sent.
This simple script works on all my older Cobalt Boxs.
<? if($action=="send") {
$to = 'me a...
2008 May 09
1
Searcher Explain
...gmentation Faults and it kills the process I have running my Rails site.
Has anyone else had this problem? Here is some code I am trying to use it
in...
search = Search.create(:query => query)
@quotations = []
searcher = Ferret::Search::Searcher.new("index") # FerretConfig::INDEX
bq = self.build_query(query) # Builds a Boolean Query
searcher.search_each(bq) {|doc, score|
@quotations << SearchResult.new(searcher[doc][:id],
searcher[doc][:quotation], searcher[doc][:author], score)
}
p searcher.explain(bq, @quotations[0].id).to_s
searcher.close
Thanks in advance f...
2009 Nov 09
1
Using something like the "by" command, but on rows instead of columns
Hello R Forum users,
I was hoping someone could help me with the following problem. Consider the following "toy" dataset:
Accession SNP_CRY2 SNP_FLC Phenotype
1 NA A 0.783143079
2 BQ A 0.881714811
3 BQ A 0.886619488
4 AQ B 0.416893034
5 AQ B 0.621392903
6 AS B 0.031719125
7 AS NA 0.652375037
"Accession" = individual plants, arbitrarily identified by unique numbers
"SNP_" = individual genes.
"SNP_CRY2&...
2010 Jan 16
1
order() fails on a chr object of class "AsIs" with "\265" in it
Here's an example (session info at the end).
> tmpv <- c('\265g/L','Bq/L')
> order(tmpv)
[1] 2 1
> tmpv <- I(tmpv)
> order(tmpv)
Error in if (xi > xj) 1L else -1L : missing value where TRUE/FALSE needed
> foov <- gsub('\265','',tmpv)
> order(foov)
[1] 2 1
> str(tmpv)
Class 'AsIs' chr [1:2] "\265g/L&quo...
2006 Apr 07
4
saving estimates from a for loop for later use
...lots of LaTeX tables.
Well, now I want to be able to combine the results of many different
estimations from within the loops into one larger table outside the
loops.
How can I save the estimation results from each iteration of the
estimation within a loop for later use outside the loop?
Thanks,
BQ
2011 Aug 18
1
Comparison of means in survey package
Dear list colleagues,
I'm trying to come up with a test question for undergraduates to illustrate comparison of means from a complex survey design. The data for the example looks roughly like this:
mytest<-data.frame(harper=rnorm(500, mean=60, sd=1), party=sample(c("BQ", "NDP", "Conservative", "Liberal", "None", NA), size=500, replace=TRUE), natwgt=sample(c(0.88, 0.99, 1.43, 1.22, 1.1), size=500, replace=TRUE), gender=sample(c("Male", "Female"), size=500, replace=TRUE))
Using svyby I can get the me...
2006 Apr 08
1
add lines to a plot with a loop without erase the last one
...eproduct(X,X))))/(length(s)-2)
#u<-(alpha/(s+beta))
#varbeta<-var/(1+ (2*var/(alpha^2))*(squareproduct(u,u))/(alpha^2))
#varalpha<-(var/m) + (mean(u)^2)*(varbeta)
}
#print(data)
#print(alphachap)
#print(betachap)
#print(varchap)
#print(varbeta)
#print(varalpha)
biaisbeta[k]<-bq(betachap,beta)
biaisalpha[k]<-bq(alphachap,alpha)
biaisvar[k]<-bq(varchap,var)
par(mfrow=c(3,1))
plot(seq(5,15,0.01),dnorm(seq(5,15,0.01),10,sqrt(variancebeta)),col=2,type="
l")
lines(density(betachap))
plot(seq(2.5,7.5,0.01),dnorm(seq(2.5,7.5,0.01),5,sqrt(variancealpha)),col=2,...
2012 Apr 20
1
odbcConnectExcel() fails to fetch all columns
Folks,
Is there a parameter somewhere in RODBC that enables more columns to be
retrieved from an Excel worksheet?
# This next bit uses an undocumented call in RODBC
z <- odbcConnectExcel("./BBaselinePtQaires_apr2011.xls")
BQ <- sqlFetch(z, "BBaselinePtQaires")
Gives me:
z RODBC[1]
And
BQ 134 obs. of 59 variables
I have all the rows in the worksheet but only the first 59 out of a
total of 70 columns. I?m in RStudio 0.95.263 using RODBC 1.3-3 and R
version 2.12.2 (2011-02-25).
I'm puzzled - the w...
2005 Sep 08
3
Error when starting apache
Hi,
On my NU-BQ+CentOS (cobalt replacement) server today, I noticed I get an
error when re-starting apache. The box has 2 sites on it, both of them are
vsites on the same IP as is assigned to the server.
The error is (ip masked on purpose):
/etc/init.d/httpd restart
Stopping httpd:...
2006 Dec 15
2
dovecot and yahoo
Hi gang,
We just yum updated BQ server and now use dovecot instead of imapd/pop3
with a slight config all is well accept for one of our users that has
a fancy yahoo account that allows them to pop other accounts into it.
Used to work great until we switched to dovecot.
any ideas ?
jason
intuitiveisp
2006 Jan 05
2
ActiveRecord callbacks not happening
Hi,
I have a model class like so:
class Candidate < ActiveRecord::Base
validates_presence_of :name
@@index = FerretConfig::INDEX
def self.after_destroy
puts "Ferret: after_destroy called"
@@index.query_delete("+id:#{self.id} +ferret_class:#{self.class.name}")
optimize_index
end
end
But when I delete a record, the after_destroy is never called.
2006 Aug 28
1
How should this be done with ferret 0.10.1
...e new version of ferret, has solved a few of my problems but
i''m unsure of how to implement the following code in the new version of
ferret?
if section
if !section.empty?
qp = Ferret::QueryParser.new("section")
query = qp.parse("\"#{section}\"")
bq.add_query(query, Ferret::Search::BooleanClause::Occur::MUST)
filter_on =true
end
end
Thank you for any help offered...
regards
Caspar
--
Posted via http://www.ruby-forum.com/.