Displaying 20 results from an estimated 700 matches similar to: "Sql Server 2000 booleans not working"
2006 Apr 04
9
Does ActiveRecord have support for "Boolean" columns?
Hey all --
I''ve been using enumerable char(1)''s with ''y'' and ''n'' values for my
Boolean columns in Rails, but it strikes me there should be a better
way.
How do you setup columns that represent true/false-ness in your
schemas on Rails?
Wondering what kind of standard approaches there are other than me
writing something like
class MyEntity
2010 Jan 09
3
tinyint(1) and boolean
So i had a boolean attribute in my model which gets interpreted to
tinyint(1) in mysql by rails migrations. Now tinyint(1) accepts a
range in mysql and i want to change my boolean attribute to an
attribute which can accept 3 values(0,1,2).
I made the change to the view and when i post the form selecting the
selecting the value ''2'', it still gets saved as a ''0''.
2009 Mar 23
2
rails boolean and mysql tinyint(1) question?
this may seem silly but i just noticed that if in mysql the column
which is a tinyint(1) happens 2 or greater, by a chance of glitch or
corruption in the database(i did it manually ofcourse but i am
speaking hypothetically), rails would see it as false. but i find that
really wrong seeing how in mysql it sees any non-zeroes as true.
i really think if it does happen to be any number other than 1
2020 Aug 07
0
Reset booleans to default value ?
Hi,
Here's a list of all the booleans I tweaked on my server running CentOS 7:
$ sudo cat /etc/selinux/targeted/active/booleans.local
# This file is auto-generated by libsemanage
# Do not edit directly.
named_write_master_zones=0
httpd_can_sendmail=1
httpd_unified=1
ftpd_full_access=1
httpd_can_network_connect=1
spamd_enable_home_dirs=1
How can I "reset" (in a manner of speaking)
2006 Aug 20
1
sorting with booleans
Hi i have a column in my ferret model called sponsored. It is a boolean
and i want to order the results by sponsored and date registered. At the
moment it is not managing to sort the booleans.
I tried declaring this in my model but it seems to have had no effect.
def false.<=>(o) o ? -1 : 0 end
def true.<=>(o) !o ? 1 : 0 end
I''m using the acts_as_ferret plugin.
below
2009 Jan 05
2
How do booleans work?
I''m a little confused as to how booleans work in Rails. Which is
better in the database? boolean or int(1)? True == 1 and False == 0,
right? Using SQLite, I tried to set a value to true inside the
database but it gave me an error. MySql didn''t, so I had to switch to
int(1) for it to work. Is this just how it is?
--~--~---------~--~----~------------~-------~--~----~
You received
2006 Nov 24
1
Booleans, :conditions and Sqlite
Howdy,
Names changed to protect the innocent...
I have a column, lets say ''complete'' on a table, lets say ''todos''.
I originally had that column as boolean (as its true/false)
I added an association to User... has_many :outstanding_todos which had
a :conditions => "complete = false".
When I run this up it doesn''t work, and the reson it
2013 Feb 26
0
[LLVMdev] passing vector of booleans to functions
Hi Roland,
> define <4 x float> @masked_add_1(<4 x i1> %mask, <4 x float> %a, <4 x float>
%b) {
> entry:
> %add = fadd <4 x float> %a, %b
> %sel = select <4 x i1> %mask, <4 x float> %add, <4 x float> %a
> ret <4 x float> %sel
> }
>
> I will get:
>
> addps %xmm1, %xmm2
> pslld $31, %xmm0
>
2013 Feb 26
1
[LLVMdev] passing vector of booleans to functions
Hi Duncan,
thanks for the hint. I tried both variants:
define <4 x float> @masked_add_1(<4 x i1> signext %mask, <4 x float> %a, <4 x
float> %b)
define <4 x float> @masked_add_32(<4 x i32> %mask, <4 x float> %a, <4 x float> %b)
Unfortunately, this will raise an assertion:
Wrong types for attribute: zeroext signext noalias nocapture sret byval nest
2019 Jan 02
0
Re: [PATCH nbdkit] server: Use bool for types which are really booleans.
On 1/1/19 12:21 PM, Richard W.M. Jones wrote:
> For mainly historical reasons we tended to use int to store boolean
> values. However using bool is probably safer in some corner cases
> (eg. ‘v == true’ can fail badly if v is an int, but works for bool).
The problems only occur when v is an int and set to something other than
0 or 1. But yes, in general using the bool type is worth
2012 Mar 25
2
Hiera: Bug with false booleans
Hi,
I''ve just run into a small glitch with Hiera.
I have a YAML file that has a definition like this:
puppet_agent_splay: false
but the run fails because of
"err: Could not find data item puppet_agent_splay in any Hiera data
file and no default supplied at
/puppet/modules/puppet/manifests/agent/config.pp:6 on node
slave1.local"
Digging into this it turns out that lookup in
2013 Feb 26
2
[LLVMdev] passing vector of booleans to functions
Hi all,
I'm currently trying to figure out the best way to pass vector of
booleans to other functions. Take this small example:
define <4 x float> @vcmp_add(<4 x float> %a, <4 x float> %b) {
entry:
%cmp = fcmp olt <4 x float> %a, %b
%add = fadd <4 x float> %a, %b
%sel = select <4 x i1> %cmp, <4 x float> %add, <4 x float> %a
ret <4 x
2015 Jun 26
3
[LLVMdev] bitwise ops on booleans
Hi Language Lawyers!
In PR23827 ( https://llvm.org/bugs/show_bug.cgi?id=23827 ), a bitwise op on
booleans is considered equivalent to a logical op:
if ((x < 3) & (y > 10))
effectively becomes:
if ((x < 3) && (y > 10))
where x and y are of type 'int'. The second statement (&&) requires
short-circuit evaluation to bypass the y comparison when the x
2008 Aug 28
2
1 or true in TINYINT(1) column?
Hello, there is a table that has a column TINYINT(1) called status.
Through mysql console I see its value as 1 (when is true) but if I do
this in Rails console:
Mytable.status
=> true
give me "true" rather "1".
How could I change 1 to true using some method?
Or true to 1?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2006 Mar 01
4
another select_list question - bad bad booleans
I have a select list for a boolean column in postgresql
in the ''model'' ...
YES_NO = [
[ "Yes", "1" ],
[ "No", "0" ]
].freeze
in the ''view code'' ...
<%= options = [[''Accepted?'', '''']] + Placement::YES_NO
select("placement", "accepted",
2011 Oct 10
1
To query two SQL tables for user verification over LMTP, should I use (a) two separate lookups? or (b) just one lookup with a boolean query?
Hey all
I've been running a Dovecot 1X server for awhile. Most of the config
was pretty simple using flat files.
I'm switching to Dovecot 2X now, and want to switch to using SQL for
lookups so I can share info with the Postfix front end.
For starters I setup two SIMPLE SQL tables -- a 'users' table and a
'aliases' table, where each user can have many aliases.
I want to
2015 Jun 26
2
[LLVMdev] [cfe-dev] bitwise ops on booleans
On Fri, Jun 26, 2015 at 2:17 PM, Joerg Sonnenberger <joerg at britannica.bec.de
> wrote:
> On Fri, Jun 26, 2015 at 12:51:38PM -0600, Sanjay Patel wrote:
> > Assuming the transform is correct, what is the recommended way to write
> > this in C/C++ to achieve the desired effect: we want both comparisons to
> be
> > evaluated (do *not* want short-circuiting)?
>
>
2006 Aug 05
10
Converting mysql to postgres
Hi,
Anyone got any cool tricks for converting a Rails site (in this case,
a typo installation) from a mysql database to a postgresql database?
I''ve got it almost working -- I''m doing a SQL dump from mysql and
loading it into postgres. However, mysql does booleans as a tinyint
with 0 = false and 1 = true. When I try to import that into a
postgres database that expects booleans
2015 Jun 27
2
[LLVMdev] [cfe-dev] bitwise ops on booleans
----- Original Message -----
> From: "Chandler Carruth" <chandlerc at google.com>
> To: "Sanjay Patel" <spatel at rotateright.com>, "Clang" <cfe-dev at cs.uiuc.edu>, llvmdev at cs.uiuc.edu,
> joerg at britannica.bec.de
> Sent: Friday, June 26, 2015 8:55:22 PM
> Subject: Re: [LLVMdev] [cfe-dev] bitwise ops on booleans
>
>
>
2019 Jan 01
2
[PATCH nbdkit] server: Use bool for types which are really booleans.
For mainly historical reasons we tended to use int to store boolean
values. However using bool is probably safer in some corner cases
(eg. ?v == true? can fail badly if v is an int, but works for bool).
bool was added in C99 so let's use it.
---
server/internal.h | 16 +++++------
server/connections.c | 28 +++++++++---------
server/crypto.c | 4 +--
server/main.c | 67