Displaying 20 results from an estimated 20000 matches similar to: "missing values in an array"
2006 Apr 24
5
merging one array into another
Is there no better way to merge one array into another than iterating over the
array you wish to append with each() and push()ing the elements on to the
other array?
Here''s what I mean:
var arr1 = [1, 2, 3, 4, 5];
var arr2 = [''a'', ''b'', ''c''];
$A(arr2).each(function(el) { arr1.push(el) });
Is there no better way to do it than this?
2013 Jan 23
2
importing data
Dear All,
Sorry for asking a newbie question. I want to ask how to import 1000
datasets whose file names are labelled from data1.dat to data1000.dat into
R so that they are named M[1, , ] to M[1000, , ] accordingly. Thank you
very much.
Best Regards,
Ray
[[alternative HTML version deleted]]
2014 Aug 01
2
[LLVMdev] Create "appending" section that can be partially dead stripped
Hi,
Is there a way in llvm IR to emit multiple data elements within a
single compilation unit that
a) are guaranteed to appear sequentially in the final binary (in the
order they appear in the llvm IR), and
b) will be removed on an individual basis by the optimizers and/or
linker in case they are not referenced from anywhere
?
Defining them as "appending" puts them all into a
2013 Feb 07
1
Merging data in arrays
Dear All,
Here is a hypothetical sample (sorry for the clumsy code):
A1 <- matrix(1:5, nrow=5, ncol=1)
A2 <- matrix(6:10, nrow=5, ncol=1)
A3 <- matrix(11:15, nrow=5, ncol=1)
A4 <- matrix(16:20, nrow=5, ncol=1)
A5 <- matrix(21:25, nrow=5, ncol=1)
A6 <- matrix(26:30, nrow=5, ncol=1)
B1 <- matrix(c(A1, A2, A3), nrow=5, ncol=3)
B2 <- matrix(c(A2, A3, A4), nrow=5, ncol=3)
B3
2012 Jan 28
2
Need very fast application of 'diff' - ideas?
Hi everyone,
Speed is the key here.
I need to find the difference between a vector and its one-period lag (i.e. the difference between each value and the subsequent one in the vector). Let's say the vector contains 10 million random integers between 0 and 1,000. The solution vector will have 9,999,999 values, since their is no lag for the 1st observation.
In R we have:
#Set up input vector
2019 Jan 15
2
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
Hello Chandler,
> ```
> void f(int *arr1, int *arr2, int length) {
> intptr_t rel_offset = arr2 - arr1;
> int *arr1_end = arr1 + length;
> for (int *p = arr1; p < arr1_end; p += sizeof(int)) {
> do_something(p, p + rel_offset);
> }
> }
> ```
>
> For example, a common loop optimization technique is something like the
following in *pseudocode* (note
2019 Jan 14
4
Reducing the number of ptrtoint/inttoptrs that are generated by LLVM
Hello Chandler,
> First and foremost - how do you address correctness issues here? Because
the subtraction `A - B` can escape/capture more things. Specifically, if
one of `A` or `B` is escaped/captured, the
> subtraction can be used to escape or capture the other pointer. So *some*
of the conservative treatment is necessary. What is the plan to update all
the analyses to remain correct?
2014 Aug 02
2
[LLVMdev] Create "appending" section that can be partially dead stripped
On 01/08/14 19:37, Reid Kleckner wrote:
> What happens if you drop appending linkage? I think it will just work,
> since you are already using a custom section, which will ensure that all
> the data appears contiguously in memory.
Thanks for the suggestion, but it still puts everything in a single
.section statement.
> Although, I do worry about what LLVM's alias analysis will
2009 Jan 04
3
Table associated problem using belongs_to
I have two tables:
Table [packages]
id name user_name
-------------------
1 PK1 Ray
-------------------
Table [users]
id name full_name
-------------------
2 Ray Ray Sun
-------------------
My purpose is to find the full name when I find packages. So I modify
Model Package to:
class Package < ActiveRecord::Base
belongs_to :user,
:class_name => "User",
2006 Aug 04
4
cannot convert String into Integer
Hi, I''m trying to implement a live search that supports searching for
multiple words. So for example, if I type "ruby rails" in the search
field, I would return results that have either the word "ruby" in them
or the word "rails" in them. However, this is just a background as to
what the following code is trying to do and might not even be needed to
fix
2013 Apr 16
1
converting blank cells to NAs
You can use na.strings="" in read.table() or read.csv()
library(stringr)
vec1<-unlist(str_split(readLines(textConnection("3,7,11,,12,14,15,,17,18,19")),","))
?vec1[vec1==""]<- NA
?vec1
# [1] "3"? "7"? "11" NA?? "12" "14" "15" NA?? "17" "18" "19"
#or
2012 Sep 27
1
List of Variables in Original Order
I am trying to Sweave the output of calculating correlations between one
variable and several others. I wanted to print a table where the
odd-numbered rows contain the variable names and the even-numbered rows
contain the correlations. So if VarA is correlated with all the variables in
mydata.df, then it would look like
var1 var2 var3
corr1 corr2 corr3
var4 var5
2007 Mar 14
1
about bootstrapping
Dear All,
I've a 10 by 5 data frame like this
set.seed(1001)
a <- rnorm(10)
b <- rnorm(10)
c <- rnorm(10)
d <- rnorm(10)
e <- rnorm(10)
A <- cbind(a,b,c,d,e)
Each row is one datum. I want to resample within A[,5]. Fit the regression
lines lm(A[,5] ~ A[,1] + A[,2]) and lm(A[,5] ~ A[,3] + A[,4]) to each
bootstrap sample. I don't know how to write the statistics part. Can
2013 Jan 17
1
exporting simulated data
Dear All,
I wrote a function datagen to simulate a dataset. I would like to generate
1000 datasets and export them with file names from data0001.dat to
data1000.dat. Would anybody please provide some useful codes on this? Thank
you very much.
Best Regards,
Ray
[[alternative HTML version deleted]]
2023 Nov 22
1
mediaplayer for icecast streams?
you can pull it with jQuery via javascript for example evry 10 seconds,
and update the informations you want, at least its the way i do it.
Am 23.11.2023 um 00:13 schrieb Thomas Jensen:
> Thank you, Ben!
>
> I was afraid it would be very complicated to get the information
> extracted, but it was very simple. My only problem now is to find a way
> to update the text on the
2023 Nov 22
1
mediaplayer for icecast streams?
Thank you, Ben!
I was afraid it would be very complicated to get the information
extracted, but it was very simple. My only problem now is to find a way
to update the text on the webpage. I was hoping sleep(5) could do the
trick, but it does not work.
<?php
if (1) {
$jsonobj=file("http://radio.protestbandet.dk:8000/status-json.xsl");
//var_dump($jsonobj);
2013 Mar 22
1
Median across matrices
Hey all,
I have a list of matrices. I'd like to calculate the median across all those matrices for each element. What I'd like to end up with is a matrix containing the median of all [1,1] [1,2] etc. elements across all matrices.
Is there a concise way of doing that?
Thanks!
2013 Feb 02
3
vectorisation
Hi
I'm trying to set up a simulation problem without resorting to (m)any loops. I want to set entries in a data frame of zeros ('starts' in the code below) to 1 at certain points and the points have been randomly generated and stored in a separate data.frame ('sl'), which has the same number of columns.
An example of the procedure is as follows:
ml <-
2008 Nov 24
5
Problems installing mysql gem in Rails 2.2.2
Hi'' Rails riders. I having upgraded everything and upgraded to
Rails 2.2.2 I now wanted to install the MySQL gem as I am getting the
following error when trying to load up the app.
no such file to load -- mysql
Normally running gem install mysql works with no problems but, now I get
the following:
>gem install mysql
gem install mysql
Successfully installed mysql-2.7.3-x86-mswin32
1
2009 May 27
1
[LLVMdev] Ada bound checks
Dear Duncan,
Everything worked out with your help. Thanks. I'm now looking at bound
checks that an Ada program has, so I can remove all possible. It seams
that Ada already does some optimization to remove bound checks. Do you
know how are they done, and where?
I tested two codes (below) and the first code did not produce any bound
check and the second produced two bound checks.
--
-- Simple