Displaying 20 results from an estimated 3000 matches similar to: "Generate Models & Controllers from Ruby program"
2010 Mar 23
1
qemu disk cache mode
Hi all,
I can''t find any good talk about this subject and would like some insights
and advices on the cache side in xen.
I discovered that a domO power outage can lead to a severe filesystem
corruption of the domUs. The domO is a dual disk dell server with a PERC
controler in writethrough cache mode, the disk cache is disabled, the
scheduler in the domO/domU is NOOP, the domO is holding
2009 Sep 02
4
Trying to get started
I got Wine onto my computer. Now I have a bunch of .exe files and I can't get much of anything done. I saw a file named Start.exe, double-clicked it and got the following from Archive Manager:
End of Central directory signature not found
How do I get past this? I need to get Wine going so I can download a whiteboard application I need to tutor for Brainfuse.com.
2024 Sep 28
1
Is there a sexy way ...?
Hi Rolf,
this topic is probably already saturated, but here is a tidyverse solution:
```
library(purrr)
x <- list(
? `1` = c(7, 13, 1, 4, 10),
? `2` = c(2, 5,? 14, 8, 11),
? `3` = c(6, 9, 15, 12, 3)
)
x |>
? pmap(~ c(..1, ..2, ..3)) |>
? reduce(c)
#> [1]? 7? 2? 6 13? 5? 9? 1 14 15? 4? 8 12 10 11? 3
```
Here, we map over the elements of the list in parallel (hence pmap),
2006 Mar 23
3
Intercepts in linear models.
A colleague asked me if there is a way to specify with a
***variable*** (say ``cflag'') whether there is an intercept in a
linear model.
She had in mind something like
lm(y ~ x - cflag)
where cflag could be 0 or 1; if it's 0 an intercept should
be fitted, if it's 1 then no intercept.
This doesn't work ``of course''. The cflag just gets treated
as another predictor
2024 Sep 28
1
Is there a sexy way ...?
Sorry to append, but I just realised that of course
```
x |>
? pmap(c) |>
? reduce(c) |>
? unname()
```
also works and is a general solution in case your list has more than
three elements. Here, we map in parallel over all elements of the list,
always combining the current set of elements into a vector, and then
reduce the resulting list into a vector by combining the elements
2008 Feb 20
2
Data frame with 0 rows.
For reasons best known only to myself ( :-) ) I wish to create a data
frame with 0 rows and 9 columns.
The best I've been able to come up with is:
junk <- as.data.frame(matrix(0,nrow=0,ncol=9))
Is there a sexier way?
cheers,
Rolf
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
2012 Oct 05
1
Format of numbers in plotmath expressions.
I want to do something like:
TH <- sprintf("%1.1f",c(0.3,0.5,0.7,0.9,1))
plot(1:10)
legend("bottomright",pch=1:5,legend=parse(text=paste("theta ==",TH)))
Notice that the final "1" comes out in the legend as just plain "1" and NOT
as "1.0" although TH is
[1] "0.3" "0.5" "0.7" "0.9"
2007 Oct 03
3
Factor levels.
I have factors with levels ``Unit", "Achieved", and "Scholarship"; I
wish to replace these with
"U", "A", and "S".
So I do
fff <- factor(fff,labels=c("U","A","S"))
This works as long as all of the levels are actually present in the
factor. But if ``Scholarship'' is absent
(as if often is) then
2005 Oct 03
2
ethool for e1000
I recently noticed that after starting xend ethtool no longer work for
my e1000 card. In my 2.X box which is a P4, ethtool is working after
xend start. Same version of e1000 on both boxes.
The unstable box is a
Tyan 2462 SMP, FC4 dom0
The 2.X box is
Dell P330 UP, Centos 4.1 domO
Until xend start ethtool is fine, in both setups I am using the e1000 as
eth0.
Regards,
Ted
2006 Jun 07
5
File is nil
I don''t understand why my program does not get the file that I try to
upload.
It returns the following error when I try to upload a small file:
NoMethodError in LogfileController#create
You have a nil object when you didn''t expect it!
The error occured while evaluating nil.original_filename
#{RAILS_ROOT}/app/models/logfile.rb:9:in `file=''
2006 Jun 15
3
Can I call MySql statements directly??
Hi All.
I have a mysql statement that I would really really like to call from my
Ruby program which goes like this:
SELECT a, b, DAYOFWEEK(date_time) as DOW,
HOUR(date_time) at hr,
AVG(x/y)
FROM records;
This is possible by creating a 3-dimentional array of a, b, date_time
containing x/y, and then finding averages and putting it into a
4-dimensional array of a, b, dow,
2024 Sep 28
1
Is there a sexy way ...?
I see a book coming:
"666 ways to do the same thing in R ranked by sexiness."
Kidding aside, if you look under the covers of some of the functions we are using, we may find we are taking steps back as some of them use others and perhaps more functionality than we need.
But for a new reader , looking at many approaches may open up other ways and ideas and see the problem space as quite
2024 Sep 27
7
Is there a sexy way ...?
I have (toy example):
x <- list(`1` = c(7, 13, 1, 4, 10),
`2` = c(2, 5, 14, 8, 11),
`3` = c(6, 9, 15, 12, 3))
and
f <- factor(rep(1:3,5))
I want to create a vector v of length 15 such that the entries of v,
corresponding to level l of f are the entries of x[[l]]. I.e. I want
v to equal
c(7, 2, 6, 13, 5, 9, 1, 14, 15, 4, 8, 12, 10, 11, 3)
I can create v
2006 Jun 28
2
Connecting to a Remote MySQL Server
Hi All.
I have one newbie question-
How do I connect to a remote MySQL server using Ruby on Rails? Is it
something simple like changing a few lines in database.yml??
Thanks in advance.
Lisa
--
Posted via http://www.ruby-forum.com/.
2024 Sep 28
2
Is there a sexy way ...?
Avi
I fear this was all a huge social experiment.
Testing if a post titled "sexy way" would increase engagement...
On Sat, 28 Sep 2024, 07:21 , <avi.e.gross at gmail.com> wrote:
> I see a book coming:
> "666 ways to do the same thing in R ranked by sexiness."
>
> Kidding aside, if you look under the covers of some of the functions we
> are
2008 Jul 01
5
XEN - Routed and Bridget Mode together (mixed)
Hi,
is there any possibility to get a XEN DomO and DomU running with
bridget and routed mode together.
The reason behind this is, to get the requests via the official IPs to
the DomU''s (routed-mode) and the interworking
between the DomU''s with connected with help of the (bridged-mode).
I got it work, with setting everything up manually. But as I
understood the
2005 Jun 06
1
Missing values in argument of .Fortran.
I wish to pass a vector ``y'', some of whose entries are NAs to a
fortran subroutine which I am dynamically loading and calling by
means of .Fortran(). The subroutine runs through the vector entry by
entry; obviously I want to have it do one thing if y[i] is present
and a different thing if it is missing.
The way I am thinking of proceeding is along the xlines of:
ymiss <- is.na(y)
2024 Sep 29
1
Is there a sexy way ...?
Admit it, Rolf. Haven't you wondered if S, in a more private way, is sexier than R?
OK, kidding aside, we have talked this to death.
Just FYI, the conversation was stimulating for some of us and I have continued on my own and located functions I see as useful in the stringi and stringr packages to make my silly version ever less silly! LOL!
-----Original Message-----
From: Rolf Turner
2018 Apr 02
2
LLD-linked binary segfaults at runtime on alpine linux
Alpine linux is a distribution that uses musl libc instead glibc. Here are
my steps to reproduce:
On Alpine linux, download LLVM, Clang, LLD 6.0.0 from releases.llvm.org,
and build them from source.
$ clang -c hello_world.c
$ ld.lld --gc-sections -m elf_x86_64 -o hello_world
/usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../lib/Scrt1.o
2008 Apr 10
1
Set PCI device latency from domU?
If a PCI device has been passed to a domU is it possible to set its
latency from the domU or does it have to be done from the domO?
When I attempt to set a devices latency from the domU with setpci I do
not receive an error message back indicating a problem, however the
latency as viewed with lspci -v is not changed. The same setpci
command from the dom0 successfully changes the latency and the