Displaying 20 results from an estimated 3000 matches similar to: "Delaying table attribute load using ActiveRecord"
2008 Feb 08
4
x-post : find_or_initialize_by ActiveRecord bug? Ignores :conditions
Hello, I posted this on the rails talk group but received no
response. Perhaps someone on this list could weigh in on whether this
is expected/desired behavior or a bug that I should file and develop
failing tests for
(I doubt I have the active record method_missing fu to actually patch
it).
Test Scenario:
I would like to find or initialize a new user and base the find on the
users email
2008 Feb 07
1
ActiveRecord 'find_or_initialize_by' dynamic finder bug? Ignoring conditions.
Hello all,
I just ran into something that I think is a bug, and I would like to
confirm with the core team whether this is expected/desired behavior
or if this is a bug that I should file and develop failing tests for
(I doubt I have the active record method_missing fu to actually patch
it).
Test Scenario:
I would like to find or initialize a new user and base the find on the
users email
2007 Aug 07
3
ISDN30 card for UK : sanity check
We will be connecting our Asterisk server to ISDN 30 and intend using
the Sangoma A101 card. The install location is in London (UK).
Sangoma card at Voipon
http://www.voipon.co.uk/sangoma-a101-pri-isdn-card-p-132.html?gclid=CI32vJz22I0CFQXklAodIgjHaA
I would be grateful to hear if this is the right choice of card. Usage
reports would be helpful.
Regards
Rory
--
Rory Campbell-Lange
2001 Oct 31
3
readonly - can't change
well i've tried everything trying to get r/w access to my linux box
(debian 2.2.3 running samba 2.0.7) from win2k. can only get readonly.
i'm hoping some kind sould might be able to take a look at my samba
config and let me know what i'm doing wrong...
# Samba config file created using SWAT
# from localhost (127.0.0.1)
# Date: 2001/11/01 00:39:30
# Global parameters
[global]
2008 Nov 24
4
Calculating sum of letter values
Hi all
If I have a string, say "ABCDA", and I want to convert this to the sum of the letter values, e.g.
A -> 1
B -> 2
etc, so "ABCDA" = 1+2+3+4+1 = 11
Is there an elegant way to do this? Trying something like
which(LETTERS %in% unlist(strsplit("ABCDA", "")))
is not quite correct, as it does not count repeated characters. I guess what I need is
2004 Apr 07
2
Help with character columns in a table
I have done a read.table on a data file with the aim of extracting
subsets of the data eg
table[table$desc = 'result1',]
How can I convert $desc to a character type? At present it is seen by
typeof() as an integer.
How can I do the equivalent of
table[table$desc = 'result1' && table$amt > 20, ]
Thanks,
Rory
--
Rory Campbell-Lange
<rory at
2008 Nov 25
3
Line color based on data values?
Hi all
Does anyone know if it is possible when plotting a line or scatter plot, to selectively color the data points based on the data value? i.e. if plotting say the percentage change in stock price movements, to color +ve points in green and -ve points in red? And extending this to a user-defined range of colors based on the quartile of the data points?
Thanks
Rory
Rory Winston
RBS Global
2006 Apr 10
5
ActiveRecord: Behavior not doumented
Hello everbody, doing a
#find(:first,an_id)
with Rails 1.1.0 I expected that find returns the record which id mathches the
given parameter an_id or nil if it couldn''t be found.
This behaviour is documented on api.rubyonrails.org.
But the find returns the first available object and not nil if an_id is not in
the db. Is the doc on rubyonrails.org out of sync?
Greetings,
--
Daniel
2008 Apr 04
4
Arbitrary Precision Numbers
Hi
(If you're wondering, this is a Project Euler question :))
If I wanted to calculate the sum of the digits in the decimal representation
of 2^1000, what would be a good way to go about that? I've tried the
following methods:
# Calculate the sum of digits in the decimal representation of 2^n
# Only works for smaller values of n
bsum <- function(n) {
s <- 0
e <-
2004 Dec 14
1
IMAP Subdirectories
Hi
Using Apple Mail I cannot make subdirectories within new directories I have
made on a Debian Dovecot-driven IMAP server (version 0.99.11-3).
Some users, having used Exchange, expect to be able to do this. However
I can't make it happen, even after doing some tests by chmod-ing the
top-level directories to 777 and enabling the
mail_full_filesystem_access = yes
option on a test
2005 Sep 19
1
Shared access to mail accounts.
We are intending to have some project mail accounts which many people
(up to 10) will share. Will this work?
Our configuration uses imap only, with maildir format mail storage.
Thanks
Rory
--
Rory Campbell-Lange
<rory at campbell-lange.net>
<www.campbell-lange.net>
2004 Jul 20
2
Newbie question: configuration for virtual users
Hi!
I'm looking forward to deploying dovecot as an IMAP server. I did some
research into the various options and it looks like dovecot is the right
daemon for me. I'll be using it with Exim.
I am running a few tens of users on my server, most of them small
numbers of people part of a small company, e.g. example.com.
At present I have exim delivering to mbox in each virtual user's
2007 Aug 04
1
Hardware advice for 100 extensions, routing via ISDN
I would be grateful for some comments on our proposed machine specs for
a new Asterisk installation at a client with an initial 70 extensions.
The system should be able to handle 100 extensions. The system will have
the following main features:
- PSTN connection via ISDN 30, dealing with all incoming calls.
Outgoing will be through ISDN initially
- 70-100 Snom 300 handsets
- 1-2
2008 Jun 08
2
Adding a Rotated Density Plot to an Existing Plot
Hi
Consider the following graph:
x <- rnorm(1000)
x <- x + exp(-x/2)
layout(matrix(rep(c(1,1,2), 2), 2, 3, byrow=TRUE))
boxplot(x)
rug(jitter(x), side=2)
plot(density(x))
What I would really like to do is to have the density plot rotated by 90
degrees so that I can see it line up with the rug plot on the side axis.
I cant seem to do this. I have seen references to the grid
2012 Jan 17
1
Error with winbind following Windows updates
Hi. We've just installed Windows updates on our Windows 2003 Domain
Controllers, and have the following issues on our storage server, which
is running Debian stable 2:3.5.6~dfsg-3squeeze5
Jan 17 10:27:51 xxx smbd[2426]: [2012/01/17 10:27:51.286853, 0] lib/util_sock.c:680(write_data)
Jan 17 10:27:51 xxx smbd[2426]: [2012/01/17 10:27:51.286915, 0]
2007 May 10
3
how to control the sampling to make each sample unique
I have a dataset of 10000 records which I want to use to compare two
prediction models.
I split the records into test dataset (size = ntest) and training dataset
(size = ntrain). Then I run the two models.
Now I want to shuffle the data and rerun the models. I want many shuffles.
I know that the following command
sample ((1:10000), ntrain)
can pick ntrain numbers from 1 to 10000. Then I just
2009 Jul 03
2
Correlation Network Diagram?
Hi all
On page 39 of this paper [1] by Andrew Lo there is a very interesting
correlation network diagram (sorry I dont have a more convenient link to
the type of diagram I'm talking about). does anyone know of any package in
R that can generate these types of diagrams?
Cheers
-- Rory
[1] http://web.mit.edu/alo/www/Papers/august07.pdf
[[alternative HTML version deleted]]
2008 Apr 12
3
Matrix Indexing
Hi
Does anyone know how I might pick out diagonal elements of a matrix using a
vector?
If I create a matrix a:
a <- matrix(c(1:16), 4, byrow=TRUE)
and I want to pick out the elements (1,1),(2,2),(3,3), or another arbitrary
diagonal (upper or lower), is there any way I can use a vector to do this?
So if I want a diagonal of size 3, I could create a vector like x <- c(0:2)
and then pick
2018 Sep 17
2
add keys and certificate to forwarded agent on remote host
On 17/09/18, Peter Stuge (peter at stuge.se) wrote:
> Rory Campbell-Lange wrote:
> > Can ssh-add work on the remote socket file?
>
> I expect that it will just work<tm>. The local socket is just a
> socket, and the protocol[1] message SSH_AGENT_ADD_KEY is the same.
Local:
$ ssh-agent > /tmp/agent.env
$ source /tmp/agent.env
$ ssh-add ~/.ssh/id_user
$ ssh
2018 Sep 17
7
add keys and certificate to forwarded agent on remote host
Apologies if this post is inappropriate to this list; please redirect me
if so.
Our team uses ssh extensively for server access and maintenance
(Debian). An issue is acting as root when operating, for example, over
ansible and keeping a record of who performed the actions, something ssh
certificates solves well.
The problem is then to automate certificate issuance since it would be
pretty