Displaying 20 results from an estimated 1000 matches similar to: "foreach loops, iteration, in functions?"
2007 Apr 04
6
Best practice, dev/test/staging/production environments
I like the Stanford Best Practices guide for puppet. One thing I didn''t
see it address was handling of separate environments, for example Dev,
Test, Staging, Production.
My thoughts on this so far, are:
brainstorm #1) Handle environment differences with metadata:
node devProductName01 {
$env = "dev"
include ProductName-webserver
}
node testProductName01 {
2014 Oct 05
1
CentOS 7 - Have 2 disks, each with a biosboot partition, can only boot off one of them
Hi all,
I used a kickstart script to setup a new machine of mine with RAID 1
(I couldn't get anaconda to create matching partition schemes). So I've
now got /dev/sdg1 and /dev/sdh1 as 'bios_grub' (/dev/sd{a-f} are a
separate array).
0 root at an-nas02:~# parted /dev/sdg print free
Model: ATA ST3000NC000 (scsi)
Disk /dev/sdg: 3001GB
Sector size (logical/physical):
2013 Apr 24
8
[LLVMdev] Another missed optimization opportunity?
I was suprised to find that some bitcode I'm generating isn't getting
optimized. Here, I'm doing the equivalent of "myarray[5]++" (on an
"extern int *myarray"), repeated three times:
@myarray = external global i32*
define void @update_array() #0 {
%1 = load i32** @myarray, align 8
%2 = getelementptr inbounds i32* %1, i64 5
%3 = load
2006 Jan 16
3
new comer's question
I am new to R. I try to search the web but could not find the answer so I
post it here asking for help.
I have a csv file looks like this: (between two ==== lines)
===========================
Machine Name,"Resource, Type","Resource, Sub-type","Resource,
Instance",Date,,Data ->,,,,,,
,0.041666667,,,,,,,,,,,
Time (HH:MM)
2007 Mar 09
4
How to create a list that grows automatically
Dear R users
I would like to know if there is a way to create a list or an array (or
anything) which grows automatically as more elements are put into it. What I
want to find is something equivalent to an ArrayList object of Java
language. In Java, I can do the following thing:
// Java code
ArrayList myArray = new ArrayList();
myArray.add("object1");
myArray.add("object2");
2007 Mar 09
4
How to create a list that grows automatically
Dear R users
I would like to know if there is a way to create a list or an array (or
anything) which grows automatically as more elements are put into it. What I
want to find is something equivalent to an ArrayList object of Java
language. In Java, I can do the following thing:
// Java code
ArrayList myArray = new ArrayList();
myArray.add("object1");
myArray.add("object2");
2013 Apr 24
0
[LLVMdev] Another missed optimization opportunity?
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Scott Pakin
> Subject: [LLVMdev] Another missed optimization opportunity?
> I'm doing the equivalent of "myarray[5]++" (on an
> "extern int *myarray"), repeated three times:
> I had expected the three increments by 1 to
> be collapsed into a single increment
2003 Jun 09
2
Appending elements to an array
Hi all,
I am having a bit of trouble with the array structure of R. What I want
to do is dynamically add/remove elements to an array. For example:
Let's say I have created an array:
> myArray <- array(c(3,8), dim=c(1,2))
> myArray
[,1] [,2]
[1,] 3 8
And I now want to, for example, push an element (5,6) on to this array
so it will read:
[,1] [,2]
[1,] 3 8
2013 Apr 24
2
[LLVMdev] Another missed optimization opportunity?
On 04/24/2013 01:29 PM, Caldarale, Charles R wrote:
> Is this a potential aliasing effect? Since myarray is defined as a pointer, not an array, it's theoretically possible that the address therein refers to the same memory location as the pointer itself.
I was thinking along those lines, but I haven't been able to come up
with a specific instance of what could possibly be aliased.
2011 Oct 16
2
Custom Sort Character and Numeric
I"m trying to do a custom sort in this order:
1) Numeric digit furthest right;
2) Alphabetical second furthest to the right;
3) Alphabetical the rest of the string beginning with the first character;
The example code I'm using is an array that follows:
/myArray <-
2009 Jun 19
1
Shell Script: Simple array usage = bad substitution?
Hey Guys n Gals;
I have some arrays that I can't seem to expand correctly (if that's
the correct word?), imagine the following example:
#!/bin/bash
myArray=("First" "Second" "Third")
First=("Monday" "Tuesdays" "Wednesday")
Second=("One" "Two" "Three")
Third=("A" "B"
2008 Feb 13
2
[Linux/Python 2.4.2] Forking Python doesn't work
Hello
When a call comes in, I'd like to fork a Python script that
broadcasts a message so that users see the CID name + number pop up on
their computer screen, and simultaneously ring their phones.
The following script doesn't work as planned: It waits until the
script ends before moving on to the next step, which is Dial():
===========
exten =>
2010 Oct 27
2
keep adding elements to the matrix
Hello everyone,
I would like to create a "dynamic" array to keep storing number in it
for (i in c(2:length(final))){
myarray <-final[i]-final[i-1]
myarray2<-2*final[i]
}
At the end I would like to use myarray as the x values of an array
and the myarray2 as the yvalues of the same array.
I tried cbind but it didnot work.
Could you please help me with that?
Best
2008 Jun 26
6
ActiveRecord search Query Question
I''m not using ferret because the search I need is not that complicated.
I created a basic active record search. I''m using some code from the
pragmaticprogrammer book. This is the issue:
I can get the single keyword to work fine when entered into the search
box, but when you put to keywords separated by a space the search
returns no results. It makes sense since the function
2013 Apr 24
0
[LLVMdev] Another missed optimization opportunity?
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Scott Pakin
> Subject: Re: [LLVMdev] Another missed optimization opportunity?
> > Is this a potential aliasing effect? Since myarray is defined as a
> > pointer, not an array, it's theoretically possible that the address
> > therein refers to the same memory location as
2011 Jul 25
3
[LLVMdev] function failing to run in Jit
Is there any reason this generated code won't run in the Jit?
I've pretty much got everything else working for my front end
which all runs fin in the Jit but I can't get global arrays to work.
; ModuleID = 'test'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple
2020 Feb 15
2
Have the debugger show an away with a dynamic size?
Thanks for the suggestions but it doesn't appear to be working correctly
for me. I tried building the below after seeing the results with "clang -g
-std=c99 test.c" and got the same result
LLDB thinks MyArray is 81 elements long even though 81 and 80 doesn't show
up anywhere in the llvm-ir (I tried again using an llvm ir file made by
clang -g -std=c99 test.c -S -emit-llvm and
2013 Apr 24
0
[LLVMdev] Another missed optimization opportunity?
Hi Scott,
On 24/04/13 19:40, Scott Pakin wrote:
> I was suprised to find that some bitcode I'm generating isn't getting
> optimized. Here, I'm doing the equivalent of "myarray[5]++" (on an
> "extern int *myarray"), repeated three times:
does your bitcode contain data layout information?
Ciao, Duncan.
>
> @myarray = external global i32*
>
2012 May 30
3
Separate Array Variable Content
Hi,
I am new in R,
i have a matrix like this
MyMatrix <-
*ABC PQR XYZ*
10 20 30
40 50 60
70 80 90
And, i have an array containing some conditions like this,
MyArray <- c("*ABC*>50","*PQR*<50","*ABC*<30 &* XYZ*<40")
"ABC>50"
"PQR<50"
"ABC<30 & XYZ<40"
2008 Aug 07
2
Creating an array of lists
Hi,
I want to store some number of outputs from running a bunch of
analyses such as lm() into an array. I know how to do this with a
one-dimensional array (vector) by creating
myArray <- vector(mode='list', length=10)
and storing each lm() result into a component of myArray.
My question is, how can do this for a multiple dimensional array? It
seems array() does not have such a