Displaying 20 results from an estimated 9000 matches similar to: "Boolean values"
2005 Mar 04
5
Rails and SCM Best Practices
Hi all--
I''m starting a new Rails project and I''m preparing to import it into my
local Subversion repository. In the past, I''ve just imported the entire
set of files generated by ''rails'', but I''m starting to wonder if that is
the best way to approach things.
For instance, it makes sense to add the log/ directory, but probably not
the
2005 Mar 08
3
Extracting images from a DB
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I would like to extract an image BLOB from my database and display it
alongside some other information on my ''edit'' page. I read the
information here
http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles
and that was really helpful.
However, it still isn''t clear to me how I would get access to the image
in my views if
2006 Jul 17
6
DRY? Converting Boolean to Yes/No
I have a database column given as:
t.column :change_address, :boolean
The user interacts with this using a checkbox, but wants confirmations to
read:
Change address: Yes
In an isolated case something like:
@obj.change_address ? ''Yes'' : ''No''
Would work fine but this is peppered throughout scads of forms and boolean
fields. The first step I took at DRYing
2010 Sep 02
1
ActiveRecord::ConnectionAdapters::Column value_to_boolean(value) does not return a boolean value.
value_to_boolean(value), does not always return a boolean value, only
when true.
150: def value_to_boolean(value)
151: if value.is_a?(String) && value.blank?
152: nil
153: else
154: TRUE_VALUES.include?(value)
155: end
156: end
If value is contained in TRUE_VALUES then it returns true(TrueClass).
But if value is
2006 Jan 06
6
AWS and array of Model
Hi!
I try to use a layered webservice and I want to get back an array of users;
In the API I use:
api_method :listUsers,:returns=>[[User]]
in the service:
def listUsers
User.find(:all)
end
Result in soap mode:
Don''t know how to cast TrueClass to Object
Result in XML-RPC mode:
You have a nil object when you didn''t expect it!
You might have expected
2006 Feb 27
8
Change Bit Value To Text When Viewed
Hey All, very simple question for you folks ;)
I have a @commutes object that for each record there is a bit value set
(0/1) to denote if an accident occurred. What I want to do is have it
display "Yes" or "No" when I view the listing of commutes. I can get it to
display the bit value just fine with <%= commute.accident %> but how can I
get it so that when a record with
2006 Sep 15
8
file: target generates error
file { "/var/log/syslog":
target => "/var/log/messages"
}
generates the following error:
err: //henson/stanford/syslog/file=/var/log/syslog: Failed to retrieve
current state: undefined method `should'' for false:FalseClass
2006 Jul 29
1
Problem starting push server in Jugganaut
Hi All,
Im playing around with Jugganaut but stuck at the first step.
Seems the jugganaut push server requires json (which I have installed)
but it cant find it.
Following the docs, I have installed json and then try to run the push
server.
jonathan $ ruby script/push_server
script/push_server:37:in `require'': no such file to load -- json
(LoadError)
from
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
2007 Jul 04
1
Long-tail model in R ... anyone?
Dear all,
first I would like to tell you that I've been using R for two days... (so,
you can predict my knowledge of the language!).
Yet, I managed to implement some stuff related with the Long-Tail model [1].
I did some tests with the data in table 1 (from [1]), and plotted figure 2
(from [1]). (See R code and CSV file at the end of the email)
Now, I'm stuck in the nonlinear regression
2011 Sep 25
2
Noob Rails patcher - problems running the sqlite3 tests...
Hi,
I am following the guide here:
http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html
I have an ubuntu 11.04 VM setup, installed rvm, and ruby (ruby 1.8.7
(2011-06-30 patchlevel 352) [x86_64-linux]).
Pulled down the rails from github and created a 3.0 branch:
$ git branch --track 3-0-stable origin/3-0-stable
$ git checkout 3-0-stable
I can run the non-db tests ok, all pass
2011 Aug 23
2
How can I do these simulations with R code
1) The Pareto P(alfa) distribution is defined by its density f(x|alfa) =alfa*X^(-alfa-1) over (1 to infinity). Show that it can be generated as the -1/alfa power of a uniforme variate. Plot the histogram and the density.
2) The Poisson distribution P(lambda) is connected to the exponential distribution through the Poisson process in that it can be simulated by generating exponential random
2007 Sep 10
1
MLE Function
I am just trying to teach myself how to use the mle function in R because it is much better than what is provided in MATLAB. I am following tutorial material from the internet, however, it gives the following errors, does anybody know what is happening to cause such errors, or does anybody know any better tutorial material on this particular subject.
>
2009 Apr 10
4
rails2.3/ruby1.9: invalid byte sequence in utf-8 with blank?
hi all,
anyone seen this controller argument error:
invalid byte sequence in utf-8
ror/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb:
50:in `=~''
ror/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb:
50:in `!~''
ror/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb:
50:in `blank?''
2007 Mar 19
3
certificate trouble
Hi Puppet-Team,
first thanks for this great configuration management tool !
My name is Matt and i am on creating a puppet plugin for openQRM.
The basic framework is already existing and working well so far.
Now, after having it working ok once i now ran into a problem that
my puppet-clients do not get their configuration any more from the
puppetmasterd. What i saw on the puppetmasterd logs is :
2009 Sep 11
1
call Fortran from R
Dear R users,
I have to call fortran program from within R (R 2.8.1 on ubuntu 8.10
machine).
Suppose I have a fortran code like this (this is only a toy model, my
working model is far more complex, but input/output is similar)
DOUBLE PRECISION FUNCTION model(times, alfa, beta)
DOUBLE PRECISION alfa, beta, times
model=beta*sin(times)+alfa*cos(times)
END FUNCTION
which
2006 May 18
1
RE: Rails-spinoffs Digest, Vol 12, Issue 29
Issue 1: <%= @pic %> instead of <% @pic %>
-----Original Message-----
From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of
rails-spinoffs-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Sent: Wednesday, May 17, 2006 11:13 PM
To:
2005 Sep 06
2
(no subject)
my problem actually arised with fitting the data to the weibulldistribution,
where it is hard to see, if the proposed parameterestimates make sense.
data1:2743;4678;21427;6194;10286;1505;12811;2161;6853;2625;14542;694;11491;
?? ?? ?? ?? ?? 14924;28640;17097;2136;5308;3477;91301;11488;3860;64114;14334
how am I supposed to know what starting values i have to take?
i get different
2006 May 12
11
Stupid? question about if else logic
this seems so stupid, I keep thinking I''ve dealt with this before but I
have this code
<h1>Portraits</h1>
<% if @image.portrait == 1 %>
<%= image_tag(url_for_file_column ''image'', ''file'', ''thumb'') %>
<% else %>
<h1>Landscapes</h1>
<%= image_tag(url_for_file_column
2013 Oct 25
2
[PATCH] support SO_REUSEPORT on new listeners (:reuseport)
This allows users to start an independent instance of unicorn on
a the same port as a running unicorn (as long as both instances
use :reuseport).
ref: https://lwn.net/Articles/542629/
---
lib/unicorn/configurator.rb | 19 +++++++++++++++++++
lib/unicorn/socket_helper.rb | 30 ++++++++++++++++++++++--------
test/unit/test_socket_helper.rb | 8 ++++++++
3 files changed, 49 insertions(+), 8