similar to: default values

Displaying 20 results from an estimated 200 matches similar to: "default values"

2006 Jun 06
1
Default value plugin
I''m releasing a very small plugin that allows you to specify default values for fields in models. Ordinarily, you might do this in your schema, I guess, but then it''s awkward if you need that on a serialized field or need your default values calculated somehow. So you can do something like this: (repeated from an earlier post and the README) class Mixture <
2005 Dec 19
3
Is there a list of html_options for the FormOptionsHelper?
I''m looking for a way to select a default value from a select box, like this: select("user", "role_id", Role.find_all.collect {|r| [ r.name, r.id ] }, { :default_value => ''5'' } (of course, there is no ":default_value") If the form is being used on a ''create'' page, it should display a default in the select box. If
2009 Nov 25
1
Fwd: Vista laptop in Samba 3.3.4 domain suddenly trying to use roaming profiles?
Paul, Thank you very much for your information. I, too, had noticed that the ProfilePath and CentralPath values could be altered to point to the proper local path, and that technique at least fixed the immediate problem. Unfortunately, further review of my setup has revealed a very frustrating migration issue that I had not yet realized. The issue is very subtle and very frustrating, but I believe
2005 Mar 03
12
bug in postgresql ''now'' time handling??
line 212 of postgresql_adapter.rb is return Time.now.to_s if value =~ /^\(''now''::text\)::(date|timestamp)/ i don''t think this will work. in postgresql the field ''now'' is pinned to the SAME TIME for the duration of a transaction. eg. if you do begin transaction; insert into t values(42, ''now''); # sleep one minute
2004 Apr 30
2
[LLVMdev] LLVM benchmarks against GCC
> The nightly tester is used for two purposes: making sure that nothing > breaks (the unit tests) and keeping tabs on how well performance is doing > (the spec and most multisource tests). It's not a reliable way to do > serious benchmarking, but can give good insights into where things can be > improved. hm, one day, the great benchmarking will be a reason to use LLVM, so, i
2013 Dec 02
1
Class parameter flexibility with ENC, hiera or both
Dear puppetteers, I am having a philosophical question about parametrized classes. When building modules, one wants to be as flexible as possible, to try to target as many puppet flavors as possible. This is our target: - Foreman users, using foreman as an ENC with smart variables (or potentially any other ENC, but I would say this is the most widespread one). - Pure Puppet''s site.pp
2006 Aug 01
5
how do set default value for ActiveRecord fields?
Everytime a new record object is created i.e. Record.new, i want certain fields to be the same. Any idea how to do this? Thanks Chris -- Posted via http://www.ruby-forum.com/.
2011 Mar 09
3
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Hi, I am processing tick data and my code has stopped working as I have increased the size of data being processed. Now I am receiving error for basic tasks in RConsole: > a = c(1:1000) Error: evaluation nested too deeply: infinite recursion / options(expressions=)? My R code worked fine with 50 stocks and 500,000 rows per stock, but when I increased this to 50 stocks and 5,000,000 rows per
2012 Jun 29
2
turning R expressions into functions?
[ please copy me on answers, since I am not subscribed to the list ] Dear all, I am trying to write an R function which uses system.time to determine which of a given list of R expressions executes fastest. To work around the limited resolution of system.time, I want to convert the given expressions into functions which execute the given expressions a fixed number of times. My current attempt
2005 Apr 23
2
[Tip] Introspection to determine if a column may be null
I still want to get this into Rails for all connection adaptors, but for now I''ve hacked my own addition on for just PostgreSQL. The following code extends every Column object returned by MyModel.columns to support a new #required? method, which indicates if the column may or may not be null. The following is a huge hack - suggestions on a cleaner way to add this functionality
2017 May 05
3
A few suggestions and perspectives from a PhD student
Dear Sir or Madam, I am in 2nd year of my PhD in bioinformatics, after taking my Master?s in computer science, and have been using R heavily during my PhD. As such, I have put together a list of certain features in R that, in my opinion, would be beneficial to add, or could be improved. The first two are already implemented in packages, but given that it is implemented as user-defined operators,
2006 Apr 04
6
Console for Testing Routes?
Hi, when the "Agile Web Development" book talks about routes, there are what looks like console transcripts like the following: URL> store @params = {:controller => ''store'', :action = ''index''} Is there something like a console for testing routes (where you could put in a url and see how rails would route it)?? Ingo -- Posted via
2006 Apr 23
3
ANN: Polygons library + sweet demo
Hello! I''m releasing an extraction from an application I''m currently working on. It''s a small library for dealing with points and polygons, called Polygons. It really just implements some textbook algorithms w/ Prototype-style JavaScript classes. Check it out here: http://polygons.mdaines.com/ The demo on that page (Firefox/Safari only right now) uses the
2009 Jun 25
0
[LLVMdev] Replacing instruction in LLVM IR by an intrinsics
On Thu, Jun 25, 2009 at 12:32 AM, ihusar<ihusar at fit.vutbr.cz> wrote: >                //now i need to create an instruction that represents a call to a intrinsic >                Function* FIntr = Intrinsic::getDeclaration(&M, Intrinsic::regread_i32); > >                // here it fails: void llvm::CallInst::init(llvm::Value*): >                //Assertion
2018 Feb 12
3
FreeBSD Core dump: PAM authentication with Kerberos credentials (GSSAPI_MIT)
Hi everyone, I have a repeatable core dump when running dovecot on FreeBSD in the specific scenario described below. Dovecot is linked against MIT kerberos in /usr/local/lib/, whilst PAM is linked against Heimdal in /usr/lib/. My expectation was that dovecot authentication using GSSAPI would use MIT kerberos in /usr/local/lib, whereas PAM authentication is independent from dovecot and would
2006 Jun 02
6
Set instance variable for all actions in the Controller
Can I set an application wide instance variable that is available for all actions...and their views? eg. class ApplicationController < ActionController::Base @current_user = User.find(session[:user_id]) end and everywhere I can call @current_user.id and I can get that object? Even down in the views? I could not get this to work... Thanks in advance, Jeff -------------- next part
2010 Jan 19
0
best way to set default for an optional local in a partial?
What''s the best way to set the default value of an optional local variable in a partial template? In the past I''ve used <% foo = default_value unless (defined? foo) %> But http://api.rubyonrails.org/classes/ActionView/Base.html says *not* to use (defined? foo) and instead use (local_assigns.has_key? :foo) thus <% foo = default_value unless (local_assigns.has_key?
2009 Jun 24
3
[LLVMdev] Replacing instruction in LLVM IR by an intrinsics
Hi everyone, I am trying to write a pass, that finds some instructions and replaces them with my intrinsics, but I am having problem understanding, how this should be done. Let's say I have this instruction: %tmp14 = load i32* getelementptr ([32 x i32]* @gpregs, i32 0, i64 28) and i need to read the load's operands and replace it by let's say: %tmp14 = call i32
2006 May 22
3
rails naming convention for model: community
Hello, How does Rails deal with the pluralization of community. I have "community" as my model name. Will Rails automatically look for a table name "communities" or do I have to name the table "communitys"? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2012 Dec 03
14
hiera default values for a variable
Hi everyone, I currently have a giant file with default variables I use in a lot of my modules and I override those at the node level if I need to. I thought I would give porting that data into a hiera setup. I worked out how to specify my data sources and started to make a go at moving some of my variables in the default data file. I thought heira would be smart and set a variable to undef if