similar to: Goldbach partitions code

Displaying 20 results from an estimated 1100 matches similar to: "Goldbach partitions code"

2009 Oct 13
3
Function to find prime numbers
I need to create a function to find all the prime numbers in an array. Can anyone point me in the right direction? Thank you. AJ -- View this message in context: http://www.nabble.com/Function-to-find-prime-numbers-tp25868633p25868633.html Sent from the R help mailing list archive at Nabble.com.
2006 Mar 09
5
Comet support?
Just out of curiosity, is there a plan to support Comet (name coined by the dojo guys) w/ prototype? Comet represents persisting an http connection for low latency data operations. It also represents a nice alternative to polling. Jim _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
2009 Jun 18
3
Replace zeroes in vector with nearest non-zero value
Folks, If I have a vector such as the following: x <- c(0, -1, -1, -1, 0, 0, 1, -1, 1, 0) and I want to replace the zeroes by the nearest non-zero number to the left, is there a more elegant way to do this than the following loop? y <- x for (i in 2 : length(x)) { if (y[i] == 0) { y[i] <- y[i - 1] } } > y [1] 0 -1 -1 -1 -1 -1 1 -1 1 1 You can see the
2006 Apr 14
7
Support for Comet?
So someone finally named server-push through HTTP-keepalive "Comet" It''s also been implemented in a very nice Java/Javascript library called DWR. http://ajaxian.com/archives/dwr-20-reverse-ajax Has there been any discussion by "the core" about adding this to Rails 1.2? :) -- seth at subimage interactive http://www.subimage.com/sublog/ -------------- next part
2006 Aug 10
4
mongrel and comet "implementation"
Hey folks, I was playing around with adding Comet (a javascript technology used to receive events without AJAX polling) support to Mongrel. More info about Comet here: http://en.wikipedia.org/wiki/Comet_%28programming%29) I sort of got it working. My code is available at: http;//cyll.org/comet.tar.gz Run comet.rb from inside the directory and point your browser at: http://localhost:5555/ The
2006 Aug 14
14
ClockingIT Beta - It''s about time...
My wife and I have been working on our own task-listing, time-tracking web application, and we''re really interested in some feedback as we ourselves feel we''ve come a long way. If you have some minutes to kill (or just want to see how the Comet functionality provided by the Juggernaut plugin can work) have a look at http://www.clockingit.com and
2007 Nov 19
6
Dedicated MGS?
This may be in the documentation. If so, I missed it. If a site has multiple Lustre file systems, the documentation implies that there only needs to be a single MGS for an entire site (regardless of the number of file systems). However, I also know it is fairly common to have a combined MGS/MDT. So here are the questions. 1. If we are going to have several Lustre file systems,
2008 Nov 05
2
matrix indexing and update
Folks, I have a matrix: set.seed(123) a <- matrix(rnorm(100), 10) And a vector: b <- rnorm(10) Now, I want to switch the signs of those rows of a corresponding to indices in b whose values exceed the 75 %-ile of b which(b > quantile(b)[4]) [1] 2 6 10 so I want, in effect: a[2, ] <- -a[2, ] a[6, ] <- -a[6, ] a[10, ] <- -a[10, ] I thought I could do a[which(b >
2006 Jun 06
4
Comet/Continuations/Armeggedon
Hello all- Forgive me if this has been discussed before- I searched the archives and didn''t see anything. Anyway, here it goes- There is a lot of talk lately about Comet-based applications- that is, web apps that hold connections to the server open for a very long time, to effectively achieve realtime data push from the server to the browser. Currently, there are a few web
2006 Jun 11
3
Armageddon
I''m just wondering what happened to Armageddon and whether people had any more information/news about it. I''ve thought about comet but I think that a flash socket would be easier to implement. Does Armageddon have the same drawbacks as other flash sockets, namely not working over port 80 (so the companies firewall blocks it)? -- Posted via http://www.ruby-forum.com/.
2010 Feb 10
4
AJAX responses
Does anyone know if it''s possible to do multiple AJAX responses to a single request in Rails? I did some googling but didn''t find anything extremely helpful. Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2007 Sep 03
2
Derivative of a Function Expression
Hi I am currently (for pedagogical purposes) writing a simple numerical analysis library in R. I have come unstuck when writing a simple Newton-Raphson implementation, that looks like this: f <- function(x) { 2*cos(x)^2 + 3*sin(x) + 0.5 } root <- newton(f, tol=0.0001, N=20, a=1) My issue is calculating the symbolic derivative of f() inside the newton() function. I cant seem to get R to
2007 Nov 23
5
Comet style requests with mongrel
Hi, I''ve been doing some experiments with php and if can use something like <?php for ($i = 0; $i < 100; $i++) { echo "hello world"; flush(); sleep(10); } ?> to keep a http link open for an arbitrary amount of time and routinely display "hello world" in the browser window. Is is possible to write a mongrel handler to do something similar? Thanks
2006 Mar 31
2
MGE UPS Comet EX RT 7 not setting LB
Hi, I just got at work an MGE UPS Comet EX RT 7 and I can communicate fine with it through mge-shut, it detects correctly when on battery. I am using Nut 2.0.3 on Linux (RHEL 3). I am trying to simulate a low battery condition to test my shutdown procedure by setting lowbatt to 98%: driver.parameter.lowbatt: 98 but the ups reaches this value, goes to 97% and still no LB. I tried to change,
2009 Mar 27
2
adding matrices with common column names
folks, if i have three matrices, a, b, cc with some colnames in common, and i want to create a matrix which consists of the common columns added up, and the other columns tacked on, what's a good way to do it? i've got the following roundabout code for two matrices, but if the number of matrices increases, then i'm a bit stymied. > a <- matrix(1:20,ncol=4); colnames(a) <-
2008 Mar 14
0
Help needed in Building lustre using pre-packaged releases
Hi, Can anyone guide me in building the lustre using pre-packaged lustre release.I''m using Ubuntu 7.10 I want to build lustre using RHEL2.6 rpms available on my system.I''m referring how_to in wiki. but in that no detailed step by step procedure is given for building lustre using pre-packed release. I''m in need of this. Thanks and Regards, Ashok Bharat -----Original
2010 Aug 17
3
Wilcoxon test and grouping factor with multiple levels
Dear R users, I have a dataset with two variables: $esan - a grouping factor with 8 levels and $reus. I'd like to do wilcox.test on this dataset as sugested Weiwei here: https://stat.ethz.ch/pipermail/r-help/2007-July/136627.html. I tried to adapt his recommendation but no succes. Can anyone help me? Regards, Iurie Malai, Senior Lecturer Department of Psychology Faculty of Psychology and
2007 Feb 15
3
Re: Incremental Updates
As an alternative to polling the client, as Ryan describes, you could consider piggy-backing the status updates on the back of other ajax responses. Which way you go depends entirely on the nature of your app, in particular: 1. how frequently it generates ajax traffic anyway 2. how long the server-side process is going to take If the server-side process takes, say, 20 seconds, polling is a
2006 Dec 05
7
mongrel and long lived connections
Hi, I found this article http://cyll.org/blog/tech/2006-08-09-themongrelcomet.html on mongrel and COMET very interesting. I ran the code, and it worked just as Christopher explained. The one thing I don''t understand is why mongrel can only handle 1 connection at a time. I thought that mongrel used a thread per connection. It appears that each registered handler can only handle 1
2011 Jun 30
4
Trying to learn Wine and command lines
Hi, I'm new to Wine and command lines in general and I'm trying to learn how to use it. To start I installed the demo for Armageddon Empires (a seriously awesome game, check it out) and now I'm trying to run it. When I'm in my Wine program files I can see a folder called Cryptic Comet (makers of Armageddon Empires) but when I try to cd or any other command to get to the Cryptic