Displaying 20 results from an estimated 500 matches similar to: "column name changes based on substrings"
2010 Sep 08
4
Populate combo box from database without repeatness
Hi,
I have a column of data with repeated as mentioned below.
*column_name*
Acer
Lenova
HP
Lenova
Acer
Acer
Lenova
I need to populate this column in a combo box without repeated data as
mentioned below
*combo box*
Acer
Lenova
HP
I tried as
<%= collection_select(:column_name, TableName.all)%>
"table_names" is a table and "column_name" is a column needed to
2008 May 29
2
how to use substring match as condition?
Hi,
How can I use a substring match as a condition in a subset command?
Sth like this:
subset(input, field1=="blah1" & field2=="blah2") # but now with substring
match in field2
subset(input, field1=="blah1" & field3 *substringmatch* "blah3")
I've tried with gsub, but it won't work:
subset(input, field1=="blah1" &
2009 Aug 29
3
what is the best way to delete so many queue files?
Hello, all.
I found that so many unnessary queue files are saved at /var/spool/clientmqueue/ directory.
I tested two way to delete these files.
1.
# rm -rf /var/spool/clientmqueue/*
2.
# cd /var/spool/clientmqueue/ ; find . | xargs rm -fv
But this makes a few load of the system and took too much time to delete.
What is the best way to delete fast without too much load?
2004 Aug 05
0
[Bug 1582] New: rsync dry run cannot find missing folders, contradicts actual run.
https://bugzilla.samba.org/show_bug.cgi?id=1582
Summary: rsync dry run cannot find missing folders, contradicts
actual run.
Product: rsync
Version: 2.6.2
Platform: All
OS/Version: IRIX
Status: NEW
Severity: normal
Priority: P3
Component: core
AssignedTo: wayned@samba.org
2009 Feb 06
1
Tables in legend
I need to create a legend for a simple scatter plot in the following
format.
This is Blah1 number1 number2
This is Blah2 number3 number4
.
.
.
This is Blah6 number11 number12
I looked up these help pages and found the following solution.
lStr<-c(Blah1, Blah2,....Blah6, number 1, number2, ...number12)
legend(x="topright",lStr,ncol=3)
So this creates the tabular format I am
2009 Jun 17
1
Coerce rectangular matrix to symmetrical square matrix
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have a rectangular matrix of size 920 by 85. I'd like to coerce it into a
square matrix such that all row/col names are present in the new matrix and the
additional values are zero.
As an example:
A B C D
A 1 2 3 4
E 5 6 7 8
F 9 10 11 12
Would be coerced to:
A B C D E F
A 1 2 3 4 5 9
B 2 0 0 0 6 10
C 3 0 0
2009 Mar 27
2
adding matrices with common column names
folks,
if i have three matrices, a, b, cc with some colnames in common, and i
want to create a matrix which consists of the common columns added up,
and the other columns tacked on, what's a good way to do it? i've got
the following roundabout code for two matrices, but if the number of
matrices increases, then i'm a bit stymied.
> a <- matrix(1:20,ncol=4); colnames(a) <-
2007 Apr 25
17
Multiple swap partitions
I have a machine with two swap partitions (sda2 and sda8). Both will
have none as mount point. When I try to use puppet (using mount type)
for managing fstab I get problems because "name" in both instances
(i.e. mount path) will be "none". How should I fix this within puppet?
Regards
Halvard Moe
2008 Mar 05
0
[ANNOUNCE] util-macros 1.1.6
Adam Jackson (1):
bump to 1.1.6
Jeremy Huddleston (1):
Support version strings like 1.2.3-blah4
Keith Packard (1):
Cannot use AC_CHECK_FILE when cross compiling; assume no LINUXDOC.
git tag: util-macros-1.1.6
http://xorg.freedesktop.org/archive/individual/util/util-macros-1.1.6.tar.bz2
MD5: 5b82bf7c25112f2ce7e2a3638a91a83c util-macros-1.1.6.tar.bz2
SHA1:
2003 Jan 21
2
key in margin area
Hi
Is there any way to position a key (legend) outside the plot area? i.e. in
the margin between plot area and page margin. I realise I could achieve the
same effect by creating a larger plot but not printing the axes and then
draw the smaller axes independantly leaving room for the key. However, that
wont work very well in my particular case.
Thanks in advance
Jeremy
2003 Mar 15
1
quote supression
To creat a series of plots I've constructed the following, however this
doesn't work because the colnames being feed into n are embraced by quotes
which is stuffing up the plotting function. Is there a way to suppress to
quotes? coercion in to a different format??
for (n in colnames(tt[7:36]))
{
par(ask=T)
attach(tt)
plot(july~n)
...
}
2003 Mar 04
2
log axis assignment
Hi again,
another problem:
This (below) isn't working and as far as I can see it damn well should. What
I'm trying to acomplish is to run several data sets through the same
graphing procedure, but for the pH data use a log y axis. using this code
all graphs are drawn with a linear axis. Surely I should be able to set the
ylog option to T using another object (logaxis).
for (n in
2019 Feb 20
0
Bug: time complexity of substring is quadratic as string size and number of substrings increases
Update: I have observed that stringi::stri_sub is linear time complexity,
and it computes the same thing as base::substring. figure
https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.png
source:
https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.R
To me this is a clear indication of a bug in substring, but again it would
be nice to have
2011 Apr 11
1
Getting many substrings but only loading the original string one time.
Hi All,
I'm looking for a way to get many substrings from a longer string and
then stitch them together. But, since the longer string is really, really
long (like 250 MB long), I don't want to do this in a loop and load and
re-load the longer string many times. Does anybody have an idea?
Maybe I could pass in two vectors (the first would have the starting
coordinates, and the second
2010 Jul 07
3
use sliding window to count substrings found in large string
Hello together,
I'm looking for advice on how to do some tests on strings.
What I want to do is the following:
(just an example, real strings/sequence are about 200-400 characters long)
given set of Strings:
String1 abcdefgh
String2 bcdefgop
use a sliding window of size x to create an vector of all subsequences
of size x
found in the set (order matters! ).
Now create, for every string
2019 Feb 22
1
Bug: time complexity of substring is quadratic as string size and number of substrings increases
On 2/20/19 7:55 PM, Toby Hocking wrote:
> Update: I have observed that stringi::stri_sub is linear time complexity,
> and it computes the same thing as base::substring. figure
> https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.png
> source:
> https://github.com/tdhock/namedCapture-article/blob/master/figure-substring-bug.R
>
> To me this is a
2019 Feb 20
2
Bug: time complexity of substring is quadratic as string size and number of substrings increases
Hi all, (and especially hi to Tomas Kalibera who accepted my patch sent
yesterday)
I believe that I have found another bug, this time in the substring
function. The use case that I am concerned with is when there is a single
(character scalar) text/subject, and many substrings to extract. For example
substring("AAAA", 1:4, 1:4)
or more generally,
N=1000
2003 Mar 04
3
for loop problem
Hi,
I'm just coming to grips with "for" looping etc. and have a bit of a
problem:
I want to generate a sequence which goes
1 2 3 4 5 6 7 8 14 15 16 17 18 19 20 21 26 27 ...
i.e. 8 consecutive numbers then 5 missed then the next 8 numbers etc.
I was going to do this using the seq() function but couldn't figure out how
so I thought I'd try a loop:
for (x in seq(1,650,13))
{
2001 Aug 24
3
matching character substrings
Hello,
Is there a function for searching a string for a given character? For
example, I have
transcriptions like
tsibi
tSibi
tibi
kibi
I want to search the character object for the presence of 's' or 'S' or
'k'.
I thought perhaps pmatch(c("k", "S", "s"), x) would work for me, but it
wants to compare from the start of the string and returns
2009 Sep 25
7
Spliting columns, strings or reg exp returning substrings
Currently as the first column in a data frame I have string values in the format xx_yy - I want to create a new column with just the substring xx (for each row in turn). Three possible ways to do this might be (1) split the string by '_' using strsplit and paste the first of the resulting variables into a new column, but I have been unable to do this for each row of my data frame in turn