search for: arr1

Displaying 17 results from an estimated 17 matches for "arr1".

Did you mean: arr
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? Thanks! -Jeremy _______________________________________________ Rails-spinoffs mailing list Rails-spino...
2014 Aug 01
2
[LLVMdev] Create "appending" section that can be partially dead stripped
...Example: *** target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32- i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64- f80:128:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" define i32 @main() { %1 = getelementptr [2 x i8]* @arr1, i64 0, i32 0 %2 = load i8* %1 %3 = zext i8 %2 to i32 ret i32 %3 } @arr1 = appending global [2 x i8] [ i8 1, i8 2 ], section "mytest" @arr2 = appending global [2 x i8] [ i8 3, i8 4 ], section "mytest" *** Since @arr2 is not referenced, I would like it...
2013 Apr 16
1
converting blank cells to NAs
...A ?vec1 # [1] "3"? "7"? "11" NA?? "12" "14" "15" NA?? "17" "18" "19" #or scan(text="3,7,11,,12,14,15,,17,18,19",sep=",") #Read 11 items ?#[1]? 3? 7 11 NA 12 14 15 NA 17 18 19 set.seed(25) ?arr1<- array(sample(letters,40,replace=TRUE),dim=c(5,4,2)) arr1[5,3,2]<-"" arr1[arr1==""]<- NA arr1[,,2] #???? [,1] [,2] [,3] [,4] #[1,] "b"? "h"? "v"? "k" #[2,] "l"? "b"? "j"? "y" #[3,] "...
2012 Jan 28
2
Need very fast application of 'diff' - ideas?
...9;t have much experience integrating other languages, so I'm hoping the community has some ideas about how to approach this particular problem... Many thanks, Kevin In iPython: In [3]: import numpy as np In [4]: arr = np.random.randint(0, 1000, (10000000,1)).astype("int16") In [5]: arr1 = arr[1:].view() In [6]: timeit arr2 = arr1 - arr[:-1] 10 loops, best of 3: 20.1 ms per loop In Clojure: (defn subtract-lag [n] (let [v (take n (repeatedly rand))] (time (dorun (map - v (cons 0 v)))))) [[alternative HTML version deleted]]
2023 Nov 22
1
mediaplayer for icecast streams?
...ly 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); > $arr1[]=json_decode($jsonobj[0], true); > echo '<strong>'.$arr1[0]['icestats']['source']['title'].'</strong>'; > sleep(5); > } > ?> > > Can anyone help? > > > Thanks > >
2013 Mar 15
2
missing values in an array
Dear All, I've an array with some missing values (NA) in between. I want to remove that particular matrix if a missing value is detected. How can I do so? Thank you very much. Best regards, Ray [[alternative HTML version deleted]]
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...
2023 Nov 22
1
mediaplayer for icecast streams?
...n 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); $arr1[]=json_decode($jsonobj[0], true); echo '<strong>'.$arr1[0]['icestats']['source']['title'].'</strong>'; sleep(5); } ?> Can anyone help? Thanks -- Thomas Jensen, Denmark ons, 22 11 2023 kl. 15:23 +0000, skrev Weddle, Ben (Library): &...
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?
2023 Nov 23
1
mediaplayer for icecast streams?
...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); > $arr1[]=json_decode($jsonobj[0], true); > echo '<strong>'.$arr1[0]['icestats']['source']['title'].'</strong>'; > sleep(5); > } > ?> > > Can anyone help? > > > Thanks > > _________________________________________...
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!
2009 May 27
1
[LLVMdev] Ada bound checks
...9;em out in reverse order. Put("["); for I in reverse A'Range loop Put(A(I)); if I > A'First then Put(' '); end if; end loop; Put_Line("]"); end Arr2; -- -- Simple array example 2 -- with Gnat.Io; use Gnat.Io; procedure Arr1 is A: array(1..5) of Integer; -- Array subscripts 1 to 5. I: Integer; begin Get(I); Put(A(I)); Put(A(I+1)); end Arr1; -- Andre Tavares Master Student in Computer Science - UFMG - Brasil http://dcc.ufmg.br/~andrelct
2023 Nov 22
1
mediaplayer for icecast streams?
Icecast provides an endpoint (/status-json.xsl) which returns JSON with various data, including "Now Playing". Here is a link to the documentation: https://www.icecast.org/docs/icecast-trunk/server_stats/ In your case it looks like it would be http://radio.protestbandet.dk:8000/status-json.xsl Ben Weddle -----Original Message----- From: Icecast <icecast-bounces at xiph.org> On
2012 May 04
7
Breaking up a Row in R (transpose)
I have the following: Time A1 A1 B1 B1 C1 C2 x y x y x y 0 5 6 6 7 7 9 1 3 4 4 3 9 9 2 5 2 6 4 7 4 I want to change it to the following: 0 1 2 x y x y x y A1 5 6 3 4 5 2 B1
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
2014 Aug 05
2
[LLVMdev] Create "appending" section that can be partially dead stripped
...dd i32 %val, %sum2 store i32 %sum3, i32* %sumvar %looparrnext = getelementptr i32* %looparr, i64 1 br label %LoopStart ; return the sum LoopEnd: %retval = load i32* %sumvar ret i32 %retval } ; this declaration inserts a 0 byte @arrstart = global [0 x i32] [ ], section "mytest" @arr1 = linkonce_odr global [2 x i32] [ i32 1, i32 2 ], section "mytest" @arr2 = linkonce_odr global [2 x i32] [ i32 3, i32 4 ], section "mytest" @arr3 = linkonce_odr global [2 x i32] [ i32 5, i32 6 ], section "mytest" ; this declaration inserts a 0 byte...
2018 Mar 23
5
RFC: Speculative Load Hardening (a Spectre variant #1 mitigation)
...rrect executions, making checks against malicious inputs ineffective and allowing attackers to use malicious data inputs to leak secret data. Here is an example, extracted and simplified from the Project Zero paper: ``` struct array { unsigned long length; unsigned char data[]; }; struct array *arr1 = ...; // small array struct array *arr2 = ...; // array of size 0x400 unsigned long untrusted_offset_from_caller = ...; if (untrusted_offset_from_caller < arr1->length) { unsigned char value = arr1->data[untrusted_offset_from_caller]; unsigned long index2 = ((value&1)*0x100)+0x200...