similar to: Re: How to insert styles with Insertion (David Kaufman)

Displaying 20 results from an estimated 500 matches similar to: "Re: How to insert styles with Insertion (David Kaufman)"

2006 May 04
5
How to insert styles with Insertion
Hi, I''m having difficulty using Prototype''s Insertion method to insert styles into a document node. Code like this seems to fail: new Insertion.Top(widgets[i], ''<style type="text/css"></style>''); When I inspect the DOM, the style is nowhere to be found. Any ideas on how to get this to work? Thank you, Jeff Rankin Human Factors 544-4333
2006 May 30
4
Limiting getElementsByClassName to specific nodes and entities
I''m currently using "The Ultimate getElementsByClassName" (http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/) instead of the Prototype version. This version seems to be faster since it lets you specify the starting node and the type of entity. For example: var widgets = getElementsByClassName(document, "ol", "tree"); Is
2013 Apr 30
1
Volume heal daemon 3.4alpha3
gluster> volume heal dyn_coldfusion Self-heal daemon is not running. Check self-heal daemon log file. gluster> Is there a specific log? When i check /var/log/glusterfs/glustershd.log glustershd.log:[2013-04-30 15:51:40.463259] E [afr-self-heald.c:409:_crawl_proceed] 0-dyn_coldfusion-replicate-0: Stopping crawl for dyn_coldfusion-client-1 , subvol went down Is there a specific log? When
2011 Feb 15
1
summary for factors is not very informative
summary() for a factor prints: ColName SNDK : 72 VXX : 36 MWW : 30 ACI : 28 FRO : 28 (Other):1801 it would have been much more useful if it additionally printed frequency stats as if by summary(aggregate(frame$ColName,by=list(frame$ColName),FUN=length)$x) -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.3 (Final) http://jihadwatch.org
2012 Jul 13
1
LiblineaR: read/write model files?
How do I read/write liblinear models to files? E.g., if I train a model using the command line interface, I might want to load it into R to look the histogram of the weights. Or I might want to train a model in R and then apply it using a command line interface. -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000 http://www.childpsy.net/
2013 Jan 04
4
non-consing count
Hi, to count vector elements with some property, the standard idiom seems to be length(which): --8<---------------cut here---------------start------------->8--- x <- c(1,1,0,0,0) count.0 <- length(which(x == 0)) --8<---------------cut here---------------end--------------->8--- however, this approach allocates and discards 2 vectors: a logical vector of length=length(x) and an
2012 Dec 04
3
list to matrix?
How do I convert a list to a matrix? --8<---------------cut here---------------start------------->8--- list(c(50000, 101), c(1e+05, 46), c(150000, 31), c(2e+05, 17), c(250000, 19), c(3e+05, 11), c(350000, 12), c(4e+05, 25), c(450000, 19), c(5e+05, 16)) as.matrix(a) [,1] [1,] Numeric,2 [2,] Numeric,2 [3,] Numeric,2 [4,] Numeric,2 [5,] Numeric,2 [6,] Numeric,2 [7,]
2013 Apr 21
1
cedta decided 'igraph' wasn't data.table aware
Hi, what does this mean? --8<---------------cut here---------------start------------->8--- > graph <- graph.data.frame(merged[!v,], vertices=ve, directed=FALSE) cedta decided 'igraph' wasn't data.table aware cedta decided 'igraph' wasn't data.table aware cedta decided 'igraph' wasn't data.table aware cedta decided 'igraph' wasn't
2004 Jan 18
2
Ogg Vorbis in Creative products petition
Hi all dudes. We're organizing a petition to ask Creative to include Ogg Vorbis support in one of their next firmware releases of their digital players. This is very important for two reasons: 1) Creative is a big company. If they include Ogg support in their digital players, other manufacturers will follow the example. 2) This should improve use experience of this class of products for
2012 Oct 16
2
cannot coerce class '"rle"' into a data.frame
why? > rle Run Length Encoding lengths: int [1:1650061] 2 2 8 2 4 5 6 3 26 46 ... values : chr [1:1650061] "4bbf9e94cbceb70c BG bg" "4fbbf2c67e0fb867 SK sk" ... > as.data.frame(rle) Error in as.data.frame.default(vertices.rle) : cannot coerce class '"rle"' into a data.frame it seems that rle.df <-
2014 Jul 28
0
lattice, latticeExtra: Adding moving averages to double y plot
Hi lattice users, I would like to add 5-year moving averages to my double y-plot. I have three factors needs to be plotted with moving averages in the same plot. One of these reads off y-axis 1 and two from y-axis 2. I have tried to use the rollmean function from the zoo-packages, but I fail in insering this into lattice (I am not an experienced lattice user). I want to keep the data points in
2012 Feb 24
1
count.fields inconsistent with read.table?
Hi, batch is a vector of lines returned by readLines from a NL-line-terminated file, here is the relevant section: ========================================================= AA BB CC DD EE FF GG H H JJ KK LL MM ========================================================= as you can see, a line is corrupt; two CRLF's are inserted. This is okay, I drop the bad lines, at least I hope I do:
2012 Aug 28
5
variable scope
At the end of a for loop its variables are still present: for (i in 1:10) { x <- vector(length=100000000) } ls() will print "i" and "x". this means that at the end of the for loop body I have to write rm(x) gc() is there a more elegant way to handle this? Thanks. -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
2012 Sep 14
3
aggregate() runs out of memory
I have a large data.frame Z (2,424,185,944 bytes, 10,256,441 rows, 17 columns). I want to get the result of table(aggregate(Z$V1, FUN = length, by = list(id=Z$V2))$x) alas, aggregate has been running for ~30 minute, RSS is 14G, VIRT is 24.3G, and no end in sight. both V1 and V2 are characters (not factors). Is there anything I could do to speed this up? Thanks. -- Sam Steingold
2012 Dec 27
4
vectorization & modifying globals in functions
I have the following code: --8<---------------cut here---------------start------------->8--- d <- rep(10,10) for (i in 1:100) { a <- sample.int(length(d), size = 2) if (d[a[1]] >= 1) { d[a[1]] <- d[a[1]] - 1 d[a[2]] <- d[a[2]] + 1 } } --8<---------------cut here---------------end--------------->8--- it does what I want, i.e., modified vector d 100 times.
2012 Oct 15
0
what to use for sna/graphs?
What do people use for SNA/graph analysis in R? So far I have been using igraph (it implements the Louvain community detection algorithm as multilevel.community, which is the killer feature for me). However, igraph is severely lacking in visualization, which I also need. graphviz & gephi are alleged to be good at visualization, but, apparently, not so for analysis (specifically, community
2009 Apr 09
1
Looking for good IAX ATA
I've been told by someone at Digium that they discontinued the IAXy ATA. I was buying the X100P IAX ATA for some time until even they discontinued that. I am looking for a new ATA that does IAX2 and supports the following codecs: GSM, Speex, G711 Can anyone point me in the right direction? I'd prefer to stick with IAX protocol because it is easier to use working with NAT and SIP/NAT is
2012 Aug 10
1
summarize a vector
I have a long numeric vector v (length N) and I want create a shorter vector of length N/k consisting of sums of k-subsequences of v: v <- c(1,2,3,4,5,6,7,8,9,10) N=10, k=3 ===> [6,15,24,10] I can, of course, iterate: > w <- vector(mode="numeric",length=ceiling(N/k)) > for (i in 1:length(w)) w[i] <- sum(v(i*k:(i+1)*k)) (modulo boundary conditions) but I wonder if
2012 Nov 07
1
LiblineaR: accept sparse matrices
Thibault, It would be nice if LiblineaR() accepted data in the form of a sparse matrix (it does not accept whatever e1071::read.matrix.csr returns). It would also be nice if there were functions to read/write files in the native liblinear file format; I am sure the original liblinear library provides at least the input code. Thanks! -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04
2011 Jul 05
1
hash table access, vector access &c
Hi, I am confused by the way the indexing works. I read a table from a csv file like this: ysmd <- read.csv("ysmd.csv",header=TRUE); ysmd.table <- hash(); for (i in 1:length(ysmd$X.stock)) ysmd.table[ysmd$X.stock[i]] <- ysmd[i,]; the first column ("X.stock") is a string (factor): > ysmd$X.stock[[100]] [1] FLO 7757 Levels: A AA AA- AAAAA AAC AACC AACOU AACOW AADR