similar to: Ruby fun with MegaMillions

Displaying 20 results from an estimated 300 matches similar to: "Ruby fun with MegaMillions"

2006 Oct 25
2
Isn''t it possible to stub / expect on :id ?
Hi all ! Running this: @payout = stub_everything(:id => 141) Payout.stubs(:find).with(@payout.id).returns(@payout) Generates this warning: ./test/functional/payouts_controller_test.rb:22: warning: Object#id will be deprecated; use Object#object_id What am I missing ? :id is a fairly frequent method to override in Rails-based applications. I''m using Mocha from
2007 Nov 06
1
SOLVED: Re: Installing Google's Picasa for Linux on CentOS 5
On 06 November 2007, Arnaud Gomes-do-Vale Arnaud.Gomes at ircam.fr wrote: Tue Nov 6 21:44:19 UTC 2007 <snip> >After ruling out the obvious (is /opt full?), check your logs (most >probably dmesg and/or /var/log/messages). >Now a wild guess: what file system are you using for /opt? Does it >support symlinks? JACKPOT! Your "wild guess" was *dead* on! Google is installing
2009 Nov 12
1
please suggest reading on Linux memory management
Hey folks, This is sort of a follow up to my email yesterday about memory leaks. I'd found some really good reading material in my hour or so of googling prior to sending that email. Wondering if anyone can recommend good reading on the topic - including raw facts like this jackpot I seem to have hit upon ( http://www.kernel.org/doc/gorman/html/understand/ ), as well as articles on
2011 Apr 16
2
superimpose graphs
Hi there, I have a data frame DF of over 600 people's short term trade data in time order. Below is the simplified structure of the data. id invest payout [1] 1 10 -1 [2] 1 33 33 [3] 1 20 -5 [4] 2 200 33 [5] 2 33 -20 [6] 3 5 -5 [7] 3 5
2011 Apr 16
1
600 people's time series
Hi there, I have a data frame DF of over 600 people's short term trade data in time order. Below is the super simplified structure of the data. id invest payout [1] 1 10 -1 [2] 1 33 33 [3] 1 20 -5 [4] 2 200 33 [5] 2 33 -20 [6] 3 5 -5 [7] 3
2007 Apr 26
3
A coding question involving variable assignments in ifelse()
Dear List, Below is a simple, standard loss model that takes into account the terms of an insurance policy: deductible <- 15 coverage.limit <- 75 insurance.threshold <- deductible + coverage.limit tmpf <- function() { loss <- rlnorm(rpois(1, 3), 2, 5) sum(ifelse(loss > insurance.threshold, loss - coverage.limit, pmin(loss, deductible))) } net <- replicate(1000000, tmpf())
2002 Mar 26
2
PXE-capable NIC listing?
Trey, The Compaq NC7770 PCI-X Gigabit Server Adapter supports PXE: http://www.compaq.com/products/servers/networking/NC7770/ This NIC will be available next month. Also, our strategy is to support PXE on all ProLiant server embedded NICs (10/100/1000) beginning with G2 (generation2) models. Also, most existing DL and all BL servers currently support PXE on their embedded (10/100) NICs. Let
2012 Jan 13
1
Portfolio Optimization
Hi, I'm an R newbie and I've been struggling with a optimization problem for the past couple of days now. Here's the problem - I have a matrix of expected payouts from different stock option strategies. Each column in my matrix represents a different stock and each row represents the return to the strategy given a certain market move. So the rows are not a time series of percentage
2011 May 31
1
while loop problems
Hi , i am trying to get this loop in my r program to work but it is not giving me the results that I desire. I am trying to model an insurance contract where there are n securities that have a fixed likelihood of default vector(data[i,2]) and a payout vector(data[i,1]). i need to price the value of stop losses at the security level and at the portfolio level. to do this i created two while loops
2007 Apr 18
0
Solar energy investment
Good news from QCPC give you the real alternative to hit the jackpot. QCPC is a company with far-sighted aims. QCPC strategy is to diversify within the power supply marketplace and build strong, niche oriented operations around the globe. QCPC take a long-term view of business, focusing on growth and overall evolution of our subsidiaries over a number of years. Company has chosen one of
2007 Apr 18
0
Solar energy investment
Good news from QCPC give you the real alternative to hit the jackpot. QCPC is a company with far-sighted aims. QCPC strategy is to diversify within the power supply marketplace and build strong, niche oriented operations around the globe. QCPC take a long-term view of business, focusing on growth and overall evolution of our subsidiaries over a number of years. Company has chosen one of
2009 Apr 27
1
Extract one element from yahooKeystats data
I am trying to extract one particular piece of data(Float) from all the data returned by yahooKeystats, but thus far I'm having no luck. This is what I've got so far: > library(fImport) Loading required package: timeSeries Loading required package: timeDate > data<-yahooKeystats("IBM") trying URL 'http://finance.yahoo.com/q/ks?s=IBM' Content type 'text/html;
2003 Sep 10
1
ADSI & Vista/Aastra 350
I have ADSI working on my Aastra (Vista/Nortel) 350 phone and everything is working fine. However, I want the asterisk.adsi to load into the 'self-load' slot but can't figure out what the correct FDN for doing this is. Does anyone know the right FDN for the SL slot on these phones? Also, does anyone have any cool/interesting ADSI scripts they wouldn't mind sharing? I'm
2000 Aug 28
1
btrieve applications
Hello fellow samba users, I have installed quite a couple of samba fileservers so far. There are exactly two installations which give me real hard time, and both have to do with Win9x clients running applications based on ... *sigh* btrieve. What I do server-sided is switch on opportunistic locking (level2 oplocks = yes). Without this, the applications don't run at all, at least not on more
2014 Nov 09
1
Bug#767295: Bug#767295: Bug#767295: xl: apparent memory leak
On 11/09/2014 07:18 AM, Gedalya wrote: > That memory block is just a bit larger than the size of the initrd in > the VM, could there be a connection? Nope. I changed the initrd to 2.6mb and that memory block is still exactly at 23852 / 14464 / 14464. Actually the process size is around 12 mb when pygrub is counting down to boot, then jumps up to 14+ mb
2019 Feb 24
2
SAMBA DNS interfaces set to br0
On a machine with virtual networking is enabled and two ether net controllers eth0/192.168.1.2 and eth1/192.168.1.3 and having SAMBA smb.conf set to: dns interfaces = lo br0 is there a chance for: 1) The system not to boot with DNS working 2) The DNS server bounce between eth0 and eth1 3) The DNS server portion work on boot sometimes on eth0, but when software restarted only work on eth1 or
2005 Aug 07
1
request for clarification on Asterisk T.38 bounty
The bounty stands at $5,500. I'm seriously considering taking a shot at it if I can find a decent T.38 provider to test with (I'm still hoping for reliable PAYG T.38). It looks like a lot of very smart people have done a lot of very hard work (t38modem, spandsp) that would go towards getting this working. At this point it appears to be mostly a matter of integration
2006 Nov 21
2
Sluething
My Samba Server had a wild time this weekend thanks to alleged power fluctuations. I'm using Samba 3.x on Fedora 4. My server sits on an APC UPS that remains in good health. When I arrived this Monday I found that my MicroTik Router was still up. My Win XP pro AV server was off and my Fedora/SAMBA box was also off. (all boxes have their own 15min UPS) The Win XP pro was brought up w/out
2013 Feb 06
2
[XCP] recompiling xapi rpm changes version and licensing details.
Hi there. I needed to recompile xapi to fix a bug that was resolved regarding vdi-create not setting the sharable flag. I used the sources provided in the source-1.iso from xen.org. Everything is good in this regard, and creating a vdi that has "sharable=true" is possible, but I had a problem that forced me to revert to the older copy of the xapi binary because my XCP box was now being
2012 Aug 04
3
Head or Tails game
Hi, Reading about a "Heads and Tails" game in http://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/amsbook.mac.pdf Introduction to Probability (Example 1.4, pp. 5-8). You toss a coin 40 times. If heads, Peter wins $1, tails, he loses $1. I think I can do that ok with: winnings <- sum(sample(c(-1,1), 40, replace=TRUE)) But I have to do it 10,000 times