similar to: About sample code

Displaying 20 results from an estimated 400 matches similar to: "About sample code"

2004 Aug 06
1
openh323 conflict; can speex_encode take short?
openh323 speexcodec.cxx has: BOOL SpeexCodec::EncodeFrame(BYTE * buffer, unsigned & length) { // convert PCM to float float floatData[SAMPLES_PER_FRAME]; PINDEX i; for (i = 0; i < SAMPLES_PER_FRAME; i++) floatData[i] = sampleBuffer[i]; // encode PCM data in sampleBuffer to buffer speex_bits_reset(bits); speex_encode(coder_state, floatData, bits);
2006 Jul 31
0
Polymorphic has_many association through a belongs_to
Hi, Let''s say I''ve the following Models and their relative associations: Seat ---- belongs_to :booking Booking ------- has_many :seats has_many :debits, :as => :chargeable Debits ------ belongs_to :chargeable, :polymorphic => true Why >> seat.booking.debits nil while >> Booking.find(seat.booking_id).debits [] ? Thanks. Cheers, Marco
2006 Jul 14
0
EOF: object needs to be "field"?
Hi, All: I am using Chinese version of R, but I will translate the error message. I have been trying to find out the spatial pattern of some meteorology variable. I converted the data from "grib" format to binary, which is not a big deal. Then I read in the binary data, and it has 3 dimensions: x, y, and time. The following is my code
2015 Oct 20
2
Crear variable con condiciones
Buenas tardes a todos, Quisiera crear una variable de acuerdo a ciertas condiciones. Me gustaria llegar de "datain" a "dataout". ## entrada datain <- structure(list(REF = c("999", "999", "999", "1099", "731", "731", "731", "731", "1442", "1442", "1442",
2011 Jan 31
2
Storing loop output in matrix
Hello I am trying to store output from a loop into an empty matrix. The current code I am using is: > M<-mat.or.vec(11,89) > for (j in list(3,91)) + {M[,(j-2)]<-pic(datain[,j], mytree)} datain is a matrix (11,91). I only want to use the pic() function on the columns 3:91. When I use this code output is stored into the 1st column of M and the 89th column of M but no other columns. Any
2008 Nov 02
0
error in lapply (sorry error in last e-mail)
Dear all, I am getting a error while using lapply to generate plots. The variable ".name" is used to identify each plot in the "main" variable. The method worked once but afterwards seems to throw up an error when used in a different case. The input ... dataOut <- lapply(names(dataIn), FUN = function(.name){ anotherplotFun(dataIn[[.name]], numb = .name)} ) Throws up the
2009 Feb 05
2
Amazon Flexible Payment System - micropayments finally cracked?
First posted at: http://deancollinsblog.blogspot.com/2009/02/amazon-flexible-payment-syst em.html Amazon have just announced they are finally opening up their API's to their credit card processing platform https://payments-sandbox.amazon.com/sdui/sdui/business?sn=devfps/o So does this mean that micropayments have finally been cracked? It certainly helps out users because you can
2004 May 03
1
Speed up graphics output?
Hi all, I've written some code to generate 4 maps per screen and write the output to a jpeg. The output is fairly quick at the start (about 5 jpegs per minute) and then slows down greatly (1-2 jpegs per minute). Is there some way to speed it up? One of my thoughts is to keep the base map static on the screen and just update the points that are being plotted on the map (with the exception
2004 Mar 31
4
Removing leading and trailing spaces (string manipulation)
Hi all, I'm running the following code to generate 40 different jpegs based on the resulting data. I'd like the file names to be 'Cluster1.jpeg', however the code write filenames like 'Cluster 1 .jpeg'. How can I get rid of the unwanted spaces? I've looked at ?format and it doesn't seem to work - at least in this context. ################### ClusCount <- 40
2015 Oct 21
3
Crear variable con condiciones
Muchas gracias Javier por tu respuesta. Si. Para obtener "dataout" se utilizan filas anteriores de acuerdo con la disponibilidad de la variable TOENDREF para cada valor de la variable REF. Por ejemplo, las filas 3 y 4 de "datain" son #REF TIMEREF TOENDREF #3 999 360 150 #4 1099 30 480 En la fila 3, el valor de TOENDREF es 150. Esto indica que hay 150
2012 Apr 09
0
Most efficient way to do this...
I have time-series data looking like this: > dataIn[sample(c(1:nrow(dataIn)), 25),] accelerometer_y id data_block_epoch_time 782 0.8424 201300 1331797330000 1868 0.3432 202386 1331797384000 1828 0.3510 202346 1331797382000 1026 0.2184 201544 1331797342000 1569 0.3432 202087 1331797369000 1453
2007 Dec 06
2
Some question about speexcodex 1.2 beta2 on linux
Hi, I am an user of speex codec.Can I ask some question about the speexcodec 1.2beta2 on installed to linux(fedora 6) thanks! After I downloaded the latest version of codec then I type the commands to install : configure -prefix=/home/...../test -enable-shared -enable-static make make install then I try to compile my encode.c here is the encode.c of mine: =====================================
2006 Jun 28
1
Library split (poll)
Hi Jean Marc, On Wed, 28 Jun 2006, Alfred E. Heggestad wrote: > good idea to split the libraries > > If e.g. AEC/Jitterbuffer can be used with other codecs such as G711, > without linking to the speexcodec lib, I think people will reuse the > Speex jitterbuffer implentation and avoid writing their own. > > what about: > > libspeexpreproc Preprocessor >
2009 Dec 01
0
GLM Repeated measures test of assumptions: e.g. test for sphericity e.g. Bartletts and Levenes homogenous variances
Hello and thanks in advance I am running a glm in R the code is as follows with residual diagnostic code below model4<-glm(Biomass~(Treatment+Time+Site)^2, data=bobB, family=quasi(link="log", variance="mu")) par(mfrow=c(2,2)) plot(model2) to test the effect of grazing exclusion of feral horses for a Phd with following factors: Treatment - 3 levels which are grazed
2008 Mar 19
1
running balance down a dataframe referring back to previous row
Good morning, I've searched high and low and I've tried many different ways of doing this, but I can't seem to get it to work. I'm looking for a way of vectorising a "running balance"; i.e. the value in the first row of the dataframe is zero, and following rows add to this running balance. This is easy to write in a loop, but I can't seem to get it working in
2009 Dec 01
0
Amendment to previous post a minute ago, please amend before posting if possible
Sorry, I just posted the email below but realised I did not give a name or details, would it be possible to adjust before posting and send what is below, sorry again, first time user... From: Joanne Lenehan [mailto:jlenehan@une.edu.au] Sent: Tuesday, 1 December 2009 3:51 PM To: 'r-help@r-project.org' Subject: GLM Repeated measures test of assumptions: e.g. test for sphericity e.g.
2000 Nov 22
0
openssh 2.3.0p1: chan_read_failed for istate 8
Hallo all! I've found a repeatable problem concerning openssh 2.3.0p1 running on a Linux-box with kernel 2.2.17. I compiled ssh from sources with pam-support. Let me describe what I'm doing: rsync -e ssh --delete --exclude "/Daten/test*" --exclude /Daten/anonymous --exclude /Daten/comp_logs --exclude /Daten/ehemalige_rwgsysm/cache --exclude
2014 Nov 24
0
[PATCH v3 37/41] virtio_scsi: v1.0 support
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/linux/virtio_scsi.h | 32 +++++++++++++++------------- drivers/scsi/virtio_scsi.c | 51 ++++++++++++++++++++++++++++----------------- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git
2014 Nov 24
0
[PATCH v3 37/41] virtio_scsi: v1.0 support
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/linux/virtio_scsi.h | 32 +++++++++++++++------------- drivers/scsi/virtio_scsi.c | 51 ++++++++++++++++++++++++++++----------------- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git
2014 Nov 27
0
[PATCH v5 41/45] virtio_scsi: v1.0 support
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> Acked-by: Paolo Bonzini <pbonzini at redhat.com> --- include/linux/virtio_scsi.h | 32 +++++++++++++++------------- drivers/scsi/virtio_scsi.c | 51 ++++++++++++++++++++++++++++----------------- 2 files changed,