Compare text in columns
Hi all,
I tried posting this last night, but it doesn't seem to have worked.
I am trying to compare 2 lists of words using LabView. My example was something like this:
I have 1 column containing M words:
ball
jack
jill
barbecue
lamb
etc..
and one containing N passages of text.
jack and jill went up the hill...
mary had a little lamb...
see spot run...
etc...
I want to test a logical condition like: If 1st entry from colum1 is in
1st entry from column2 then return 1, if not return 0. If 2nd entry
from colum1 is in 1st entry from column2... etc
The result should be an M(cols)xN(rows) array of 1's and zeros. In the above example, it should look like this:
01100... (because of jack and jill)
00010... (becuse of the lamb)
00000...
...etc
Any help with this would be greatly appreciated.
Many thanks,
Chris
Yeah - here it is.
One more thing. Is it case insensitive? I need "jack" and "Jack" to be synonymous. My limited experience of labview has been numeric - using it for words is untrodden ground for me!
Thanks again!
Attachments:
test data col2.txt 1 KB
wrong type.vi 13 KB
test data col1.txt 1 KB
Similar Messages
-
How to wrap the text in column headers?
Hi Friends,
Can anyone please suggest how to wrap the text in column headers of a Java WebDynpro table?
I believe that caption is the only UI element that a column header can have and it does not allow wrapping of the text.
My original requirement is as follows,
In a table I need to dynamically set the width of the columns according to the width configured by the user in some other view. All the columns of the table are dynamically rendered.
Now what happens is when the user sets the width of the column to a rather low value, say 15 pixels, then the column is displayed like
Supplier Catalog Name
Sheila
Catalog
Name
Dropdown
As you can see it looks rather odd.
Supplier Catalog Name is the header of the column and I use IWDCaption for header.
Sheila Catalog Name Dropdown is the value of a particular row at the specified column. I am using a TextView as the TableCellEditor.
I think what is happening here is that the framework wraps the text in the TextView according to the width specified (15px) and then the column width is extended because it can not accommodate the text (Supplier Catalog Name ) of the column header.
We are using SAP NetWeaver Development Studio 7.0.12 as the IDE.
I searched some forums and many people have suggested using scrollable columns but I don't understand how it will help in wrapping the text in a column header.
Any help would be of great advantage.
Thanks
AmitHi Deepti,
Thanks a lot for the answer but the option that you have specified does not wrap the text. Instead it truncates the text being displayed and only the substring of the text which could be displayed in the given pixels is displayed.
I need to show the whole text wrapped (Meaning if the width of the column is not sufficient then the text goes into the next line).
Ayyapparaj,
Thanks to you too for an helpful answer. It seems that the Netweaver has finally come up with a way to wrap the text in the column headers but as Manoj pointed out, I do not see the property headerTextWrapping for a table column, Can you please specify which version of netweaver supports it?
We are using SAP NetWeaver Development Studio 7.0.12 as the IDE.
Thanks
Amit Kapoor -
Run-Time error 1004 when VBA run Text-To-Column
Expert,
I got error message 1004 said "Excel can convert only column at a time, The range can be many rows tall but no more than one column wide, try again by selecting cells in one column only. my VBA code is this. If I copy B5 only, the Text-To-Column
is working. can you help ?
Sheets("Sheet1").Range("B5:E300").Copy
Sheets("Sheet2").Select
Range("A2:E300").PasteSpecial xlPasteAll
Columns("B:M").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Application.CutCopyMode = False
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _
Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1)), _
TrailingMinusNumbers:=True
Thanks
James LiangRe: text to columns error
You have four columns selected when you call text to columns, so ...
Replace the word "Selection" with Range("A1:A300") so it looks like...
Range("A1:A300").TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
The above is my guess as to what you want to work with; I didn't experiment with the rest of the code.
Jim Cone
Portland, Oregon USA
free & commercial excel programs (n/a xl2013)
https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2 -
Is there a Numbers equivalent to Excel's "Text to Columns"?
I am new to Numbers 09. In Excel I often need to take large amounts of ASCII text data, with hundreds or even thousands of line, paste the data into Column A, then use the "Text to Columns" utility to parse the data into separate columns for further manipulation, calculation, or graphing. Is there a similar process available in Numbers?
I found a way to accomplish this, assuming you also have iWork “Pages” available.
Paste your delimited text into a blank"Pages" document. Do a Find / Replace on your delimiting character (comma or whatever) and replace it with a tab character.
To do this, use Edit > Find > Find... and choose “Advanced” (at the top of the pop-up). Your delimiter goes in the Find text box. Then use the “Insert” pull-down menu to set the Replace text to “Tab.” It puts a little arrow symbol into the text box.
Your original text probably has line breaks already. But if it has a separate delimiter instead, you can convert them into the required line breaks in the same way, using Find/Replace to "Paragraph Break.". Hopefully the same delimiter is not used for both row and column breaks in your data.
Now copy/paste that text from Pages into a single cell in Numbers and it should break it into columns and rows.
MS Office for Mac isn’t that expensive. After this ordeal I’ve ordered a copy. -
Why oracle text index column taking long time
why oracle text index column is taking long time to return result.I created text index on a column if I run the query on a single table result is very fast.If I join table with other table (10 records only )
it is taking long time but in explain plan it is searching by index only.
I created this index for searching a varchar2 column,the data is comma seperated values like ( UK,US,IT,BR) and the table having records 20 lakhs.Normally if I query with like operater
( like '%US%' ) it is taking full table scan because I am using '%' both sides. Please help me on this regard how to search the data with less time. Here is may sample code and explain plan.
SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jan 28 16:54:22 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> set timing on
SQL> set linesize 180
SQL> explain plan for SELECT T.esongid FROM (SELECT A.ESONGID FROM wcmedeco.EDECO_ESONGS_TERR_CTRY
A WHERE CONTAINS(A.TERR_CTRY_NAMES,'US')>0
2 GROUP BY A.ESONGID)K,T
3 WHERE K.ESONGID=T.ESONGID;
Explained.
Elapsed: 00:00:00.01
SQL> select *from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 1 | 26 | 4 |
| 1 | NESTED LOOPS | | 1 | 26 | 4 |
| 2 | VIEW | | 1 | 13 | 4 |
| 3 | SORT GROUP BY | | 1 | 89 | 4 |
| 4 | TABLE ACCESS BY INDEX ROWID| EDECO_ESONGS_TERR_CTRY | 1 | 89 | 2 |
| 5 | DOMAIN INDEX | IDX_TERR_CTRY_NAMES | | | 0 |
| 6 | INDEX RANGE SCAN | IDX_ESONGID_T | 1 | 13 | 1 |
PLAN_TABLE_OUTPUT
Note: cpu costing is off, 'PLAN_TABLE' is old version
14 rows selected.
Elapsed: 00:00:00.00
SQL> Regards,
RajasekharYou have not formatted your code properly so we cannot see the query you're executing. Please put some line breaks in.
Secondly, how fresh are the statistics on those tables? Are you really returning one record out of twenty million?
Cheers, APC
blog: http://radiofreetooting.blogspot.com -
How to get text from column labels in pivot using javascript?
Hi, is it possible to get text from column labels in pivot using javascript? How?
You don't get a response from a URLRequest, you get the response from a URLLoader:
View this sample page for URLRequest and URLLoader and I think it'll make more sense to you.
http://help.adobe.com/en_US/air/reference/html/flash/net/URLRequest.html#URLRequest() -
How do you convert Text to Columns?
When I try to convert text to columns the column tab in the text section of the inspector is grayed out, thus not letting me break the text string apart. How do I get Numbers to convert a text string to columns based on spaces, comma, or tabs seperating the words?
I found previous discussion with script to answer this question.
-
Can i search multiple sheets in a document for text in column a to return the entire row if column a matches in a
separate sheet?Thank you, Barry. That was helpful, and am hopeful that what I want to do is possible.
I am creating a spreadsheet that currently has 20 sheets, of which certain sheets have more than one table. I will be adding more sheets. I would like to return results for all occurences of the search string. Preferably into a seperate spreadsheet. It would be perfect if that seperate sheet updated whenever I update information in the first spreadsheet. To give an example:
Sheet: baskets
Tables: straw
wire
Sheet: barware
Tables: glasses
decanters
coasters
My tables all have the same titiels:
Vendor Description Cost Selling Price
Since I will have upwards of 100 sheets, with multiple tables, and most of my vendors will fit into multiple sheet categories, it would be helpful if I could also see what my order will be from each vendor, not just who I will be ordering each item from. How would I do that?
I hope I conveyed that properly.
Thank you in advance for your help,
Rana -
Comparing data in columns using SUBSTR
I have a column with a case number(VARCHAR2) and a column with a year(NUMBER) consisting of data similiar to:
CASENUMBER-----------------------------YEAR
199713029----------------------------------97
199713678----------------------------------97
199713691----------------------------------97
199713709----------------------------------97
199713844----------------------------------97
199714141----------------------------------97
2001002718--------------------------------01
2001002725--------------------------------01
2001002894--------------------------------01
95 U 9998-----------------------------------95
95 U 9999-----------------------------------95
96 A 0019-----------------------------------96
96 A 0058-----------------------------------96
96 A 0067-----------------------------------96
When i run this query:
SELECT SUBSTR(LOCCASENUM,1,4) as FIRST_FOUR,SUBSTR(YEAR,1,2)as "test"
FROM DATA_TABLE
where SUBSTR(LOCCASENUM,1,4) != SUBSTR(YEAR,1,2)I get this result:
FIRSTFOUR------ test_
1997----------------- 97
1997----------------- 97
1997----------------- 97
1997----------------- 97
1997----------------- 94
1997----------------- 97
2001------------------ 1
2001------------------ 1
2001------------------ 4
95 U----------------- 95
95 U----------------- 95
96 A----------------- 96
96 A----------------- 96
96 A----------------- 93
What i am wanting to do is compare these two columns and display the only ones that do not match. I am not sure if i need to do an LPAD on the year column or what. Can someone help? Thanks
DeannaI see Walter has beaten me to it, but i'll post this anyway in the off chance you're not running on Oracle 10 or better (since that's when regular expression support was introduced).
ME_XE?with data as
2 (
3 select '199713029' as casenumber, 97 as year from dual union all
4 select '199713678' as casenumber, 97 as year from dual union all
5 select '199713691' as casenumber, 97 as year from dual union all
6 select '199713709' as casenumber, 97 as year from dual union all
7 select '199713844' as casenumber, 97 as year from dual union all
8 select '199714141' as casenumber, 97 as year from dual union all
9 select '2001002718' as casenumber, 01 as year from dual union all
10 select '2001002725' as casenumber, 01 as year from dual union all
11 select '2001002894' as casenumber, 01 as year from dual union all
12 select '95 U 9998' as casenumber, 95 as year from dual union all
13 select '95 U 9999' as casenumber, 95 as year from dual union all
14 select '96 A 0019' as casenumber, 96 as year from dual union all
15 select '96 A 0058' as casenumber, 96 as year from dual union all
16 select '96 A 0067' as casenumber, 96 as year from dual
17 )
18 select *
19 from
20 (
21 select
22 casenumber,
23 year,
24 to_date(lpad(to_char(year), 2, '0') || '0101', 'RRMMDD') as year_year,
25 case
26 when instr(casenumber, ' ') = 0
27 then
28 to_date(substr(casenumber, 1,4) || '0101', 'RRRRMMDD')
29 else
30 to_date(substr(casenumber, 1,2) || '0101', 'RRMMDD')
31 end as case_year
32 from data
33 )
34 where year_year = case_year;
CASENUMBER YEAR YEAR_YEAR CASE_YEAR
199713029 97 01-JAN-1997 12 00:00 01-JAN-1997 12 00:00
199713678 97 01-JAN-1997 12 00:00 01-JAN-1997 12 00:00
199713691 97 01-JAN-1997 12 00:00 01-JAN-1997 12 00:00
199713709 97 01-JAN-1997 12 00:00 01-JAN-1997 12 00:00
199713844 97 01-JAN-1997 12 00:00 01-JAN-1997 12 00:00
199714141 97 01-JAN-1997 12 00:00 01-JAN-1997 12 00:00
2001002718 1 01-JAN-2001 12 00:00 01-JAN-2001 12 00:00
2001002725 1 01-JAN-2001 12 00:00 01-JAN-2001 12 00:00
2001002894 1 01-JAN-2001 12 00:00 01-JAN-2001 12 00:00
95 U 9998 95 01-JAN-1995 12 00:00 01-JAN-1995 12 00:00
95 U 9999 95 01-JAN-1995 12 00:00 01-JAN-1995 12 00:00
96 A 0019 96 01-JAN-1996 12 00:00 01-JAN-1996 12 00:00
96 A 0058 96 01-JAN-1996 12 00:00 01-JAN-1996 12 00:00
96 A 0067 96 01-JAN-1996 12 00:00 01-JAN-1996 12 00:00
14 rows selected.
Elapsed: 00:00:00.07 -
Comparing text of 2 pdf-files or doc-files
Dear Java-Professionals,
for my study project I need to develop, a application which compares text/words in 2 word/pdf documents.
Has anyone an idea how I can do this?? Which modules or templates are already existing in Java-Libraries?
How much code i have to write by my self??
Regards,
Dimanhuhu, hello and peace...
looks like everyone thinks now, he would do my homework, if he would answer....
here´s a version of mine, but it doesn´t work correctly....that´s why i did not upload it....
maybe somone can lend me a hand for my "homework"if he knows a good method for solution....?
greetings,
lecojon
PS: it´s not homework...in which school do you learn LV and get homework?i don´t know any...i´m about to learn LV
In other Languages i could solve this problem easily just by writing
"if (timeGPS==timeGIL) then
tralala
end if " .....and it worked.. maybe there´s a similar solution method with math script in LV?*don´t know* -
I imported a tab delineated file into numbers and it put it into 1 column. The manual shows a menu bar Item "Divide text into columns" that doesn't appear on my tool bar. What now?
Mac,
Got it. Thanks for the explicit reference, that really helps.
I think the User Guide is a bit misleading there. The Guide is referring to the text in a Text Box and how you can format the box to display text in multiple columns, as in a newspaper page.
This feature doesn't parse your data into table columns, sorry. If you want to describe your data, we may be able to help with that.
It may be simple. Let's try the simple approach. If you Select and Copy the tab delimited data, then switch to a Numbers Table, click ONCE in a table cell and Command-V. Your data should spread across columns. If you click twice in a cell all your data will go into one column when you paste.
Jerry -
Organising text into columns using CSS?
Hello again guys,
Another day another problem.
This community has been really friendly and helpful so far with what I'm sure must appear to many of you to be really simply problems, so I'm hoping that you can bear with me and help me out again!
Basically, I'm designing my page using CSS, and I've come to a part where I would like to have 3 columns of text, of a fixed width, with a fixed gap in between. Using my very limited knowledge and experience, I inputted the code that I thought would work, but whenever I go to enter more text, it doesn't jump to a new line when it reaches the maximum width of the column, it carries on on the same line and pushes the rest of the text across.
How do I sort this out?
I can't actually upload my site until Monday, but I've included some screen below which I hope will help.
Thanks again guys.
Text in columns:
http://i51.tinypic.com/2s9vyhg.png
When I type some more, it doesn't stay in the column width:
http://i55.tinypic.com/dlno7b.png
The code that I thought would work:
http://i54.tinypic.com/yjoed.png
http://i56.tinypic.com/2dax46c.pngHi Murray,
Apologies. I had made a mistake. I've got it working now. Thank you.
Another tiny thing, if you check out this screen:
http://i54.tinypic.com/elcep.png
you can see that the line starts right near the top, and goes all the way down to the bottom.
Is there some way to amend the code that you gave me to adjust the height of the line? I tried adjusting the size of the image but that didn't seem to have an effect?
Ideally, I would like to line at the top of the 'T' of 'This is a news story', and finish at the bottom of the 'M' of 'More'. That height.
Something else which has confused me. I have that 'More' link aligned to the right, and in my design view in DW it is so aligned, but then when I preview the page, it jumps to the left hand side of each column. The alignment seems to disappear when the page is 'live'?
Thanks again for all of your help. You really are a star! -
NamedQuery problem- single argument compared to multiple columns
Hello,
I'm not sure if this issue is a bug or if I'm misinterpreting the API. I'm trying to execute a text search query against multiple columns in the same table via EJB 3.0, e.g.
select object(o) from Location o where o.city LIKE :searchString OR o.county LIKE :searchString"So, a single text argument is compared to multiple fields- but I keep getting an exception that the number of supplied arguments (one) does not match the number of required arguments (one- even though it's ID is referenced twice). Is there a separate syntax for repeating arguments in EQL (EJB 3.0, JDeveloper 10.1.3)? Is it not supported?
I get around the issue by just specifying a Query at runtime, but I'd prefer --if possible-- to create a NamedQuery instead.
Any help would be appreciated. Take care.Should the EJBQL statement be
select object(o) from Location o where o.city LIKE :?1 OR o.county LIKE :?2 -
Is there an easy way to compare two null columns?
I need to compare a significant number of columns between records in two tables for a data conversion. I really need a comparison that will return true if: 1) both columns are null; or 2) both columns are not null and equal. I want it to return false if: 3) one column is null and the other is not; or 4) both columns are not null and are not equal. I am trying to find records which are not exact matches.
I found documentation at oracle-base.com about the SYS_OP_MAP_NONNULL function that would do what I want, but I don't want to use this since it's an undocumented feature and my code will be in production for a period of time.
I would rather not have to use a construct like this for each and every column I'm comparing:
a.col is null
and b.col is null
or (
a.col = b.col
)Also, I know about the NVL function, but I'm comparing columns which are entered by users, and I'm not comfortable substituting any values for null because those values might actually exist in the data.Performance wasn't the issue but they will be about the same anyway. The issue was avoiding the messy syntax needed to do the job.
Which of these looks easier to you if you had to understand and maintain the code or add new columns
>
I would rather not have to use a construct like this for each and every column I'm comparing:
a.col is null
and b.col is null
or (
a.col = b.col
>
or
1 = DECODE (a.col, b.col, 1)So if, like the OP, you had to 'compare a significant number of columns' which syntax would you use? -
How to wrap text for column level field
Hi,
In iSourcing module. I have requirement for RFQ response page. I have to wrapt text of table level column.
Screen have total 6 columns. First column heading is Line. This column displays item description. Length of Item description in VO is 240 characters.
Presently entire 240 characters are displayed in one line only. Because of this user has to scroll towards the right to see remaining columns.
Requirement is to wrap this first column contents so that all columns will get visible without scrolling.
How do I set this wrap functionality on this column through Controller?
I tried by following ways, but no luck,
1. In processRequest method
OAFlowLayoutBean ls_line = (OAFlowLayoutBean)oatablebean.findChildRecursive("Line");
if(ls_line != null)
ls_line.setWrapEnabled(true);
In personalize options of “Line” field there is no option for “No Wrap” property.
How can I achieve this column wrap functionality?
Kindly help,
Thanks in advance.
MandarHi Ajay,
This Flow Layout contains following items,
1. DocLineNumber(messageStyleText)
2. ItemDescription(messageStyleText)
Requirement is to wrap ItemDescription.
So i tried following code, but still no luck,
OATableBean oatablebean = (OATableBean)oawebbean.findChildRecursive("BidItemPricesTableVO");
OAMessageStyledTextBean ls_item_description = (OAMessageStyledTextBean)oatablebean.findChildRecursive("ItemDescription");
if(ls_item_description != null)
ls_item_description.setWrapEnabled(true);
XML file name: ponResponsePG.xml
File Location: $APPL_TOP/pon/12.0.0/mds/response/creation/webui/ponResponsePG.xml
I am not able to post ponResponsePG.xml file here(Your message exceeds the maximum length of 30000 characters.
), can i have your email id? i will email this file to.
Thanks and Regards,
Mandar
Maybe you are looking for
-
Not able to get correct BIP report output in case of more than 6000 records
Hi, When we are trying to generate the BIP report in siebel 8.1.1, for the list of records whose count exceeds 6000 records, we are gettin a error as "Error <?> invoking method "<?>" for Business Service "<?>"(SBL-OMS-00203) W have done all the optim
-
Questions/comments on "How to Use BC4J HTML Field Renderers"
BTW thanks for getting this HOWTO on custom renderers up. Good stuff. Probably one of the first things someone should read after getting past the first BC4J-JSP tutorial. But after having just read it, I have some questions and comments. What would b
-
Problem encountered in Cluster Communication for WLS 6.1 SP2
Hi, Currently, we have an admin server with 2 clusters of managed servers. We realise that the managed server in the cluster will communicate with the other servers in the other cluster using port 7001. Is ther
-
Mac Pro SMC Firmware Update 1.1 keeps repeating
Recently I had my MacPro motherboard replaced by an Authorized Repair Center, and for the most part, everything has been working great since. That said, as I've been performing my regular software updates, I've noticed that the "Mac Pro SMC Firmware
-
Can Anyone Clear me the things with DATAMARTS
Hi All, I Am trying to load data from ODS to MAsterdata Object. The Masterdata Object has already been assgined to PCFILES source system. SO I Am trying to assgin another source system which will be the MYSELF SYSTEM. When I am giving the name of th