similar to: How do booleans work?

Displaying 20 results from an estimated 30000 matches similar to: "How do booleans work?"

2005 Oct 03
3
Boolean quoting, postgresql
http://dev.rubyonrails.org/ticket/1117 I''ve attached a patch to ticket 1117 which fixes it so that booleans are escaped as booleans, not integers. Specifically, this situation will now work find_all(["send_date=? and sent=?", Date.today, false]) Which matches peoples expectations, but it causes some problems with the postgresql unit tests. Specifically, the use of
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
2005 Mar 04
3
Boolean values
Hi, I''m using SQL Server. I have a BIT field. I have a fix and a question. This is a patch for a bug in the SQL Server adapter that causes any insert or update to fail: lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -239,2 +239,2 @@ - when TrueClass then (column && column.type == :boolean ? "''t''" : "1")
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
2006 Mar 07
2
Sql Server 2000 booleans not working
I am migrating to sql server 2000 from postgres and I have tried char(1), int, tinyint and bit datatypes to replace booleans, but without luck. the 1''s and 0''s are stored properly in the db, but checkboxes and dropdowns are not being auto-populated in rails. Anyone experience this before? thanx -- View this message in context:
2017 Sep 29
1
[Fwd: Re: [HEADS UP] Default value of SELinux boolean httpd_graceful_shutdown will changed.]
---------------------------- Original Message ---------------------------- Subject: Re: [HEADS UP] Default value of SELinux boolean httpd_graceful_shutdown will changed. From: "Lukas Vrabec" <lvrabec at redhat.com> Date: Fri, September 29, 2017 10:26 To: devel at lists.fedoraproject.org "Selinux List at Fedora Project" <selinux at
2006 Feb 15
7
Ackbar - ActiveRecord Adapter for KirbyBase
= About Ackbar Ackbar is an adapter for ActiveRecord (the Rails ORM layer) to the KirbyBase pure-ruby plain-text DBMS. Because KirbyBase does not support SQL, joins or transactions, this is not a 100% fit. There are some changes to the ActiveRecord interface (see below), but it may still be useful in some cases. = URIs Ackbar: http://ackbar.rubyforge.org KirbyBase:
2008 Nov 18
0
[LLVMdev] 32 bit boolean results
On Nov 18, 2008, at 11:24 AM, Villmow, Micah wrote: > Is there a way to tell LLVM to treat Boolean results as 32bit values > instead of 1 bit values? LLVM IR doesn't have a concept of C level booleans. What problem are you trying to solve? -Chris > > Thanks, > > Micah Villmow > Systems Engineer > Advanced Technology & Performance > Advanced Micro Devices
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
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",
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
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
2004 Nov 25
3
Searching for a string in RSQLite
I'd like to search for a particular string in an SQLite database using RSQLite, but I'm running into problems constructing the query properly, because of embedded quotes and parens in the string. Is there a function that escapes these for me, or some other fixup that would let me do the queries below? In the real situation I don't have control over what strings get searched for.
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''.
2006 Mar 10
6
boolean select problem
I want to use select form elements to choose between boolean options. How can I have it default to true and still display the persisted value (either true or false) when editing an existing object? I guess booleans default to false by default so its not obvious how to recognize when it''s a real ''false'' that the user set or default false because the value was null.
2005 Oct 27
2
RSQLite problems
Hi, I'm experimenting with using (R)SQLite to do data management. Here are two little problems that I've encountered: 1. The presence of ',' in string values causes trouble since ',' is also the delimiter used in the SQL statement. 2. A newline '\n' line attached to the last string value of each row. Some examples: > library (RSQLite) Loading required
2008 Nov 18
3
[LLVMdev] 32 bit boolean results
Is there a way to tell LLVM to treat Boolean results as 32bit values instead of 1 bit values? Thanks, Micah Villmow Systems Engineer Advanced Technology & Performance Advanced Micro Devices Inc. 4555 Great America Pkwy, Santa Clara, CA. 95054 P: 408-572-6219 F: 408-572-6596 -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Sep 07
11
autoincrement for non-id column
There is a table: execute (<<-SQL) CREATE TABLE "tasks" ( "id" serial primary key, "number" serial, "version" integer DEFAULT 0 NOT NULL, "latest_version" boolean DEFAULT ''t'' NOT NULL, "hidden" boolean DEFAULT ''f'' NOT NULL, "type" character varying (1) NOT
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 > > >
2008 Nov 18
2
[LLVMdev] 32 bit boolean results
Sorry, accidently hit send hotkeys before finishing email. I am still trying to figure out why my comparison instructions are being modified and overall producing incorrect results. The IR produces correct results, but my backend does not and the only thing I can think of is that the IR is treating the Booleans as i1 and therefore either and'ing or xor'ing the results of my