Displaying 20 results from an estimated 11000 matches similar to: "Determine if a value is an instance of String , or Array , or..."
2007 Aug 19
4
describing a mock_model as being an instance
Is there a built-in way of describing a mock_model as being an instance, beyond
stubbing the eval("Object.methods - Object.new.methods") methods to throw
NoMethodErrors?
Edward
2007 Jun 27
1
SEM model fit
I wonder if someone could explain why, when I perform confirmatory
factor-analysis model using polychoric correlations why I do not get an
estimated confidence interval for the RMSEA. My experience with these type
models is that I would obtain a confidence interval estimate. I did not get
any warning messages with the output.
RESULTS:
Model Chisquare = 1374 Df = 185 Pr(>Chisq) = 0
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
2010 Sep 30
3
Excluding most and including some problems continue.
Here is my rsync command as it currently stands.
/usr/local/bin/rsync -vvv --stats -Pzrtpl --delete --password-file=/export/home/webuser/.appprod --log-file=/export/home/webuser/logs/rsync-log -F /export/home/ webuser at appprod::dprweb_extranet/ > rsync-test
Here is the current .rsync-filter file.
+ das
+ em
+ enf
+ internal
+ itb
+ medtox
+ pml
+ psb
+ reg
+ whs
+ htdocs
+ docs
- /*
-
2006 Mar 08
7
Function could determine the caller action ?
Is it possible to determine which action call the function ?
In example, func_test in ApplicationController could determine which
action from SiteController is calling her ?
in class ApplicationController I have
def func_test
if ( calling from index )
return "1" end
if ( calling from contact )
return "2" end
end
and in class SiteController
def
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
2009 Jan 21
3
Nested serialization with to_json and to_xml with array and hash element
Title: Nested serialization with to_json and to_xml with array and
hash element
class Person < ActiveRecord::Base
has_one :address
has_one :job
def office()
return "Executive_Suite"
end
end
class Address < ActiveRecord::Base
belongs_to :person
end
class Job < ActiveRecord::Base
belongs_to :person
has_one :paygrade
def Title
return "Engineer"
end
end
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested.
But, I added some code to that model that I do need to test. Basically,
I need to somehow fulfill the "uploaded_data" property so I can actually
run my tests(otherwise they fail because of validations). The
"uploaded_data" field is what would grab the multipart data from form.
Here
2006 Feb 01
1
Class of uploated file
Hi, i have small problem when you upload file by input type=file to
rails then in rails it is represented by one of following StringIO,
File, Tempfile
Is it all? Or can it be represented by also other class?
I need to know this because i have my own validation of file kind and
when is mime type invalid then i want to put msg to record.errors and i
also want to dont upload this file in next
2009 Feb 07
1
Performing a glm binomial model
Hello R-users,
My first consult is that I would like to tackle the relationship between a
dependent variable and four environmental factors using a glm binomial
model. The problem is that I want to test the interaction between factors
too and I would like to learn some way to do it automatically.
Now, my syntax is, for instance:
E1<-glm(formula = (ENF/TOT)~VAR1+VAR2+VAR3+VAR4, family =
2006 Oct 19
3
Selecting datetime values from SQL Server (year < 1970)
All,
Rails 1.1.6.
Any AR find() call that generates a SELECT * type query against a table
with a DATETIME column in SQL Server whose value occurs before 1970 will
fail, because of the coercion of SQL Server datetime types to Time
values in Ruby.
See sqlserver_adapter.rb line 490
(record[col] = record[col].to_time if record[col].is_a? DBI::Timestamp)
If I remove the coercion (just commenting
2018 Mar 07
2
Zona horaria
Buenas,
Quiero guardar una fecha con la fecha romeo, es decir, que sa?ada o quite las horas respeto a GMT, es decir, de la siguinte manera:
2018-03-07 13:11:20 -06
En R he encontrado esta manera:
as.POSIXlt.POSIXct(t, tz="Etc/GMT+6")
Pero queiro hacerlo que valga para la zona de Mexcio central, donde enf ucnion de la epoca del a?o es o bien +6 o bien +7.
?Alguien sabe como hacerlo
2006 Jul 31
2
is it possible to make to_xml use underscore instead of dash?
Hi all,
I am getting ActiveRecord to produce XML with
render :xml => @user.to_xml
However, on the client end it is a bit annoying for me to deal with
attributes like first-name. I would much rather have first_name.
Is there any way for me to turn off the behavior of converting _ to -?
This seems to be done by a call to dasherize inside the to_xml of
2013 Sep 29
1
My Clients Windows not update DNS in samba4 DC
Hi,
I done joining the Samba 4.0.9 Domain Controller to the existing 2003 domain
Transfer all roles to samba4
Down in Windows 2003 server
Add client windows to domain!
But client windows not update DNS in samba4.
Any ideas ?
Grato.
Jac? Ramos
--
*"O homem n?o foi criado para ser feliz nem para vencer, mas para viver
para Deus. Quando vive para Deus ? feliz e vence."
2013 Sep 26
1
Failed FSMO transfer - role naming - samba 4.0.9
Hi,
------------------------------------------------------------
root at samba4:~# samba-tool fsmo show
InfrastructureMasterRole owner: CN=NTDS
Settings,CN=SAMBA4,CN=Servers,CN=Primeiro-site-padrao,CN=Sites,CN=Configuration,DC=UDOPIAUI,DC=NET,DC=BR
RidAllocationMasterRole owner: CN=NTDS
Settings,CN=SAMBA4,CN=Servers,CN=Primeiro-site-padrao,CN=Sites,CN=Configuration,DC=UDOPIAUI,DC=NET,DC=BR
2006 Jun 02
4
Creating an array of params
I''ve got a bunch of text fields that I''d like to access as an array.
The code looks like this:
<%= text_field_tag "people[0][entry]" %>
<%= text_field_tag "people[1][entry]" %>
<%= text_field_tag "people[2][entry]" %>
So when I submit the form, I''d like to be able to use it like
params[:people].each {|p| p[:entry]}
2013 Oct 14
1
Clients Windows not update record DNS on zone BIND9_DLZ
Hi List,
My clients windows not update record DNS on zones!
Show my log:
------------------------------------------
samba_dlz: starting transaction on zone jacoramos.net.br
client 192.168.0.20#1080: update 'jacoramos.net.br/IN' denied
samba_dlz: cancelling transaction on zone jacoramos.net.br
------------------------------------------
Anyone have any ideas?
Thanks!
Jac? Ramos
--
2013 Oct 11
1
Samba4 join Windows 2003 Server with BIND9_DLZ
Hi,
root at samba4:~# samba-tool domain join jacoramos.net.br DC -Uadministrador
--realm=jacoramos.net.br --dns-backend=BIND9_DLZ
Finding a writeable DC for domain 'jacoramos.net.br'
Found DC win2003.jacoramos.net.br
Password for [WORKGROUP\administrador]:
workgroup is JACORAMOS
realm is jacoramos.net.br
checking sAMAccountName
Adding CN=SAMBA4,OU=Domain
2006 Feb 10
1
Question on big JPG plots in function warpping format
Hello:
I have problems generating big JPG plots in functions. the following code runs
fine in the script:
#### runs fine in script, generate 40k "test1.jpg" in the given directory
plotPlatesAlong <- c(1:5)
plotDirPath <- paste(dataPath, "OutputPlots\\", sep="")
filename <- paste(plotDirPath,"test1.jpg", sep="")
jpeg(file=filename)
2006 Mar 15
4
sub-selection with $
Hello,
I have 2 navigations ( mainnav and subnav ) with 2 lists
List have same names ( li0 li1 li2 )
What is the best way to select li1 of subnav with prototype 1.4 in this
case ? I just want to hide/show it
Thanks
<div id="mainnav">
<ul>
<li name="li0"><li name="li1"><li name="li2">
</ul>
</div>
<div