Displaying 20 results from an estimated 5000 matches similar to: "Newbie: where to put input validation and model aggregations"
2006 Jul 26
15
Rails without a primary key
I''ve been trying to use Rails on a database where the biggest
datawarehouse-style table doesn''t have a primary key. It really
doesn''t make sense and just adds extra unnecessary space. I do have,
however, a column that I normally use to search on (IP) that returns
many rows. The table also references several other tables through
rails-friendly foreign keys.
Simple AR
2013 Jul 03
2
[Bug 9995] New: Rsync 3.1 dev :
https://bugzilla.samba.org/show_bug.cgi?id=9995
Summary: Rsync 3.1 dev :
Product: rsync
Version: 3.1.0
Platform: x64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: dochitoai.vu at ladhyx.polytechnique.fr
2012 Oct 23
7
Not updating the updated_at field
This is for Rails 3.1.1
I have a field called last_seen in a model. This field will be updated
when the something about the record is seen in the real world (don''t
worry about this part)
So I go x.update_attribute(:last_seen, Time.now) and the following happens is
UPDATE "blah" SET "last_seen" = ''2012-10-23 08:57:46.179288'',
"updated_at"
2006 Aug 21
0
[LLVMdev] Recalculating live intervals
> So what addIntervalsToSpills returns are new intervals to allocate with
> infinite weights, right?
> And I need not to allocate the old interval. Should hasStackSlot return true
> on its register then?
>
I am not very sure about addIntervalsToSpill, but, for all the registers
created to replace a spilled registers, they must have a stack slot
assigned to them. I am sending you my
2013 Mar 14
1
error: object of type 'closure' is not subsettable
Hi all,
when i run this script:
>read.table("Angelika.txt",header=T,sep="\t")
>mytable=read.table("Angelika.txt",header=T,sep="\t")
>for ( dye in c("A","B","C","F","G","K","L","M"))
+ {
+ for (cond in 1:8)
+ {
+ measurement =
2001 Apr 06
0
Subscript out of bounds- (my) problem with expansion of expression?
Hi,
I have this problem (R 1.2.2 on Pentium, OS WinNT4 SP6) :
mytable
is a 3D (n*p*2) table of non-negative "integers".
There is a need to do n times
chisq.test (rbind(mytable[i,,1], mytable[i,,2])) #on p*2 tables
Columns with zero value in the first row should be omitted, for example
chisq.test (rbind(mytable[i,-c(3,4,6),1], mytable[i,-c(3,4,6),2])) #for
i-th table with zero
2015 Oct 22
0
C_LogLin (stats/loglin)
Kai,
Apologies for the double message, it didn't go to the list last time.
On Thu, Oct 22, 2015 at 9:59 AM, Kai Nitschke <
kai.nitschke at uniklinik-freiburg.de> wrote:
>
> ?.Call? calls the C/C++ function ?C_LogLin?. But when I am running it line
> by line I get
> the following error on line 23/24:
> Error: object 'C_LogLin' not found
>
> Hence, my
2015 Oct 22
2
C_LogLin (stats/loglin)
Hi everyone,
I have a question regarding a C function of the "stats" package in R.
I tried to understand the ?loglin? basic function of the ?stats?
package implemented in
R. The implemented function itself runs without any problem (perhaps
see sample). When I
ran it line by line it stopped at the lines 23-24 of the
loglin-function; (the following line):
z <- .Call(C_LogLin,
2006 Aug 08
2
Resources and pretty URLS
Using the brand-spanking new map.resources for REST goodness, is there a
way to pass in additional parameters, or do I have to go back to
standard routes. For example, is there a way to use the map.resources
to response to urls like:
/blog/2005/02/03/ => :controller => :blog, :action => :show, :year =>
2005, :month => ''02'', :day => ''03''
2009 Jun 04
0
ROracle: cannot insert several columns
Hi all,
I've been playing with ROracle (0.5-9) for a few days
and I can't wrap my mind around this one.
Here's a sample of my R (2.4.0) session.
my.df<-data.frame(prd_id=c(123,456),vol_factor=c(.123,.456))
> my.df
prd_id vol_factor
1 123 0.123
2 456 0.456
> library(ROracle)
Loading required package: DBI
>
2006 Nov 08
0
Fw: data frames re-ordering and naming columns
Thank you for help with the first part. The second part I do not understand. All I get is "3" "3". Presumably this is the factor that you refer to. Is there no simple way of extracting the text alone
----- Forwarded Message ----
From: Peter Alspach <PAlspach@hortresearch.co.nz>
To: Jabez Wilson <jabezwuk@yahoo.co.uk>
Sent: Tuesday, 7 November, 2006 7:46:02 PM
2009 Oct 16
1
Frequencies, proportions & cumulative proportions
Dear R-Helpers,
I've looked high and low for a function that provides frequencies,
proportions and cumulative proportions side-by-side. Below is the table
I need. Is there a function that already does it?
Thanks,
Bob
> # Generate some test scores
> myValues <- c(70:95)
> Score <- ( sample( myValues, size=1000, replace=TRUE) )
> head(Score)
[1] 77 71 81 88 83 93
>
>
2008 Dec 01
0
more friendly "dtrace --actions" , "dtrace --aggregations", "dtrace --varib
To remember all dtrace actions, aggregations and variables is a headache, even worse, they are not include in dtrace(1M) now.
So here is a chance to have a CLI RFE -
to have something like "dtrace --actions", which will list all actions, like this page:
http://developers.sun.com/solaris/articles/dtrace_quickref/dtrace_functions.html
"dtrace --aggregations", lists all
2006 Aug 21
3
[LLVMdev] Recalculating live intervals
I'm not sure about one thing: you assign stack slot to each new register you
replace the spilled one with. And then you need to allocate physical
registers to them. Is it possible to assign physical register to the virtual
one which has a stack slot already?
On 8/21/06, Fernando Magno Quintao Pereira <fernando at cs.ucla.edu> wrote:
>
>
> > So what addIntervalsToSpills
2012 Feb 26
6
loop for a large database
Yes, I am a newbie.
I have a data.frame (MyTable) of 1445846 rows and 15 columns with
character data.
And a character vector (MyVector) of 473491 elements.
I want simply to get a data.frame with the count of how many times each
element of MyVector appears in MyTable.
I've tried a loop with : for (i in 1 : length (myvector)) sum (MyTable== i)
but it crashes my computer.
I've also
2012 Mar 06
1
frequency count by row
I feel this is a very easy thing but I've never done it before and it is
getting frustrating.
I have a big data.frame (1445846 rows, 15 col)
that looks like this:
V1 V2 V3 V4 V5
1 home sister brother chair 0
2 cat dog animal 0 0
3 girl boy 0
2008 Oct 24
0
RODBC performance seems slow
I've noticed that RODBC seems to be an order of magnitude slower in
retrieving rows from a table than ODBC (or JDBC) access in other tools.
I'm wondering why that is, and whether there are things I can do to
improve performance beyond what I've tried. I've checked the
documentation, and have tried the rows_at_time= and buffsize= options,
which helped a little, but it is still
2008 Nov 25
2
calculating an N50
Given a set of integers of different values how do I calculate the
minimum number of the largest of integers that are required, when
summed, to equal 50% of the total sum of the the set?
For example,
> length(myTable$lgth)
[1] 303403
> sum(myTable$lgth)
[1] 4735396
I know through brute force that the N50 of the following set is 42 but
I don't know how to solve this without iteration
2006 Mar 06
4
Contingency table and zeros
Hello,
Let's assume I have a vector of integers :
> myvector <- c(1, 2, 3, 2, 1, 3, 5)
My purpose is to obtain the cumulative distribution of these numerical
data, i.e. something like :
value nb_occur.
<=1 2
<=2 4
<=3 6
<=4 6
<=5 7
For this, I create a table with ;
> mytable <- table(myvector)
1 2 3 5
2 2 2 1
However, table() returns an array
2009 Nov 22
3
Define return values of a function
I have created a function to do something:
i <- factor(sample(c("A", "B", "C", NA), 793, rep=T, prob=c(8, 7, 5,
1)))
k <- factor(sample(c("X", "Y", "Z", NA), 793, rep=T, prob=c(12, 7, 9,
1)))
mytable <- function(x){
xtb <- x
btx <- x
# do more with x, not relevant here
cat("The table has been created,