Split a multiline string from TextEdit into multiple strings
Hi all,
I have a small question. I have a string that comes from a multiline TextEdit used for comments. This string has to be split into multiple strings with max 72 chars. The wrapping is set to "hard".
Can anybody help me on this?
Thanks
Francisco
Hi Francisco,
this is the complete code I tested, a bit ugly concerning the println etc... (****, not formatting here?):
package com.btexx;
import java.util.StringTokenizer;
import com.sapportals.htmlb.Button;
import com.sapportals.htmlb.Form;
import com.sapportals.htmlb.TextEdit;
import com.sapportals.htmlb.enum.TextWrapping;
import com.sapportals.htmlb.event.Event;
import com.sapportals.htmlb.rendering.IPageContext;
import com.sapportals.htmlb.rendering.PageContextFactory;
import com.sapportals.portal.prt.component.AbstractPortalComponent;
import com.sapportals.portal.prt.component.IPortalComponentRequest;
import com.sapportals.portal.prt.component.IPortalComponentResponse;
public class TextEditExample extends AbstractPortalComponent
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
IPageContext pageCtx = PageContextFactory.createPageContext(request, response);
Event lastEvent = pageCtx.getCurrentEvent();
if (lastEvent == null) {
Form form = pageCtx.createFormDocument("myFormDocument");
TextEdit te = new TextEdit("Edit_Text");
te.setId("TextEditID");
te.setText("Text to change - or just add text");
te.setWrapping(TextWrapping.HARD);
te.setTooltip("Edit and/or add text");
te.setRows(10);
te.setCols(72);
form.addComponent(te);
Button btn = new Button("MyButton");
btn.setOnClick("react");
form.addComponent(btn);
pageCtx.render();
} else {
TextEdit te = (TextEdit) pageCtx.getComponentForId("TextEditID");
String text = te.getText();
// for (int j = 0; j < text.length(); j++) {
// System.out.println(text.getBytes()[j] + " - " + text.substring(j, j+1));
StringTokenizer st = new StringTokenizer(text, "nr");
String[] texts = new String[st.countTokens()];
while (st.hasMoreTokens()) {
System.out.println("Line : " + st.nextToken());
I swear, I did not press Return within the TextEdit box, and after that, 13/10 appeared within the text. If just this code does not work the same on your machine, then it seems to be a bug in (your) htmlb (because my P/HF are the most actual, at least they have been yesterday).
Hope it helps
Detlev
Message was edited by: Mark Finnern
added the [code ] [/code ] (without the blanks)
Similar Messages
-
Output strings from loop into one string
im trying my best to explain my problem so ber in mind:)
hey having a bit of trouble with outputing strings from loop
example
i typed ab into the textbox
the output should be 12
but since it is in a loop it would only output the last string and in this case is 2
im trying to get both strings from the loop and output strings from loop into one string.
here is some of my code to understand my problem
// characters a to f
char[] charword = {'a','b','c','d','e','f'};
String charchange ;
// get text from password textbox
stringpassword = passwordTextbox.getText();
try {
// loop to show password length
for ( int i = 0; i < stringpassword.length(); i++ ){
// loop to go through alfabet
for (int it = 0; it < charword.length; it++){
// if char equals stringwords
if (stringpassword.charAt(i) == charword[it]){
System.out.print("it worked");
// change characters start with a
if (charword[it] == 'a'){
charchange = "1";
// change to 2
if (charword[it] == 'b'){
charchange = "2";
}Not sure how you are displaying the result but you could display each value as soon as you find it.
if (charword[it] == 'a'){
System.out.print("1");
}If it is in a text field then use append. Or if you really need a String with the entire result then use concatenation.
if (charword[it] == 'a'){
charchange += "1";
} -
HT201066 How can I split a long recording audio file into multiple audio files?
Hi,
How can I split a long recording audio file into multiple audio files?
With Windows I was using Nero software, which is not available for Mac. Is there any similar app for free for Mac?
Thanks!Hello ingiorgio
You can import the track into GarageBand and then split the tracks there. Once that it is done you can highlight the ruler section and then share the song to iTunes to get them separated out.
GarageBand - Split regions in the Tracks area
http://help.apple.com/garageband/mac/10.0/#gbnd76fcce04
GarageBand - Share songs to iTunes
http://help.apple.com/garageband/mac/10.0/#gbndfb96a96f
Regards,
-Norm G. -
Split one column value and insert into multiple columns
hi
am new to plsql .
i want to split a characters from one column and insert into multiple columns
i tried used substr function the symbol ',' vary his place dynamically ,so i can't apply substr function.
for eg: before split
col1 :
col2 :
col3 :
col4 :
colu5: adsdf,fgrty,erfth,oiunth,okujt
after split
col1 :adsd
col2 :fgrty
col3 :erfth
col4 :oiunth
col5 : adsdf,fgrty,erfth,oiunth,okujt
can anyone help me
thanks
Edited by: 800324 on Dec 23, 2010 8:28 AM
Edited by: 800324 on Dec 23, 2010 8:36 AMHow about:
SQL> create table t
2 (col1 varchar2(30)
3 ,col2 varchar2(30)
4 ,col3 varchar2(30)
5 ,col4 varchar2(30)
6 ,col5 varchar2(30)
7 );
Table created.
SQL> insert into t (col5) values ('adsdf,fgrty,erfth,oiunth,okujt');
1 row created.
SQL> insert into t (col5) values ('x,y');
1 row created.
SQL> insert into t (col5) values ('a,b,c,d');
1 row created.
SQL> select * from t;
COL1 COL2 COL3 COL4 COL5
adsdf,fgrty,erfth,oiunth,okujt
x,y
a,b,c,d
3 rows selected.
SQL>
SQL> merge into t a
2 using ( with t1 as ( select col5||',' col5
3 from t
4 )
5 select substr(col5, 1, instr(col5, ',', 1, 1)-1) col1
6 , substr(col5, instr(col5, ',', 1, 1)+1, instr(col5, ',', 1, 2)- instr(col5, ',', 1, 1)-1) col2
7 , substr(col5, instr(col5, ',', 1, 2)+1, instr(col5, ',', 1, 3)- instr(col5, ',', 1, 2)-1) col3
8 , substr(col5, instr(col5, ',', 1, 3)+1, instr(col5, ',', 1, 4)- instr(col5, ',', 1, 3)-1) col4
9 , rtrim(col5, ',') col5
10 from t1
11 ) b
12 on ( a.col5 = b.col5 )
13 when matched then update set a.col1 = b.col1
14 , a.col2 = b.col2
15 , a.col3 = b.col3
16 , a.col4 = b.col4
17 when not matched then insert (a.col1) values (null);
3 rows merged.
SQL> select * from t;
COL1 COL2 COL3 COL4 COL5
adsdf fgrty erfth oiunth adsdf,fgrty,erfth,oiunth,okujt
x y x,y
a b c d a,b,c,d
3 rows selected.
SQL> Assuming you're on 9i... -
Reading any value from table into a string (Especially date etc..)
How would I read any value from a table into a string?
Currently doing the following...
data ret_val type string.
select single (wa_map-qes_field) from z_qekko into ret_val
where
angnr = _angnr.
When the source field is a date it bombs though.
The result goes into a BDCDATA-fval.
regards
Dylan.Tried...
1 DATA: lp_data TYPE REF TO DATA.
2 FIELD-SYMBOLS: <value> TYPE ANY.
3 CREATE DATA lp_data LIKE (wa_map-qes_field).
4 ASSIGN lp_data->* TO <value>.
5 SELECT SINGLE (wa_map-qes_field) FROM zquadrem_qekko INTO <value> WHERE angnr = _angnr.
Complains that (wa_map-qes_field) is not defined in line 3.
Think that the bracket thing is only available via SQL.
What about CREATE DATA lp_data type ref to object. ?
Would the above declaration work?
regards -
Extract program to extract data from SAP into multiple worksheets of excel
Hi , I am currently facing an issue.
Extracting the data during data extraction, conversion into an excel and also into multiple worksheets withing a excel file.
What is the function which can help me. Also how do you give refernce to multiple worksheets to be created withing a excel file (which is the destination)
Any sample program extracting data from SAP tables into a excel with multiple worksheet will be of immense help
Please respond. Appreciate it.
Rgds
MadhuHi Madhu,
Here is the program for creating the excel file and creating the multiple worksheets.
*& Report ZEXCEL_UPLOAD2
REPORT ZEXCEL_UPLOAD2.
INCLUDE ole2incl.
DATA: application TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
cells TYPE ole2_object.
CONSTANTS: row_max TYPE i VALUE 256.
DATA index TYPE i.
DATA: BEGIN OF itab1 OCCURS 0, first_name(10), END OF itab1.
DATA: BEGIN OF itab2 OCCURS 0, last_name(10), END OF itab2.
DATA: BEGIN OF itab3 OCCURS 0, formula(50), END OF itab3.
*START-OF-SELECTION
START-OF-SELECTION.
APPEND: 'Peter' TO itab1, 'Ivanov' TO itab2,
'=Sheet1!A1 & " " & Sheet2!A1' TO itab3,
'John' TO itab1, 'Smith' TO itab2,
'=Sheet1!A2 & " " & Sheet2!A2' TO itab3.
CREATE OBJECT application 'excel.application'.
SET PROPERTY OF application 'visible' = 0.
CALL METHOD OF application 'Workbooks' = workbook.
CALL METHOD OF workbook 'Add'.
Create first Excel Sheet
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 1.
CALL METHOD OF sheet 'Activate'.
SET PROPERTY OF sheet 'Name' = 'Sheet1'.
LOOP AT itab1.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Value' = itab1-first_name.
ENDLOOP.
Create second Excel sheet
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 2.
SET PROPERTY OF sheet 'Name' = 'Sheet2'.
CALL METHOD OF sheet 'Activate'.
LOOP AT itab2.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Value' = itab2-last_name.
ENDLOOP.
Create third Excel sheet
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 3.
SET PROPERTY OF sheet 'Name' = 'Sheet3'.
CALL METHOD OF sheet 'Activate'.
LOOP AT itab3.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Formula' = itab3-formula.
SET PROPERTY OF cells 'Value' = itab3-formula.
ENDLOOP.
Save excel speadsheet to particular filename
CALL METHOD OF sheet 'SaveAs'
EXPORTING #1 = 'c:\temp\exceldoc1.xls' "filename
#2 = 1. "fileFormat
Closes excel window, data is lost if not saved
SET PROPERTY OF application 'visible' = 0.
**Quick guide to some of the OLE statements for OLE processing in this program as well as a few other ones.
Save Excel speadsheet to particular filename
CALL METHOD OF sheet 'SaveAs'
EXPORTING #1 = 'C:\Users\dprasad\Desktop\excel_sheet.xls' "filename
#2 = 1. "fileFormat
Save Excel document
CALL METHOD OF sheet 'SAVE'.
Quits out of Excel document
CALL METHOD OF sheet 'QUIT'.
Closes visible Excel window, data is lost if not saved
SET PROPERTY OF application 'visible' = 0. -
How do you store input from keyboard into a string array
I am trying to learn java and one of the programs I am trying to write needs to be able to accept a machine hostname at the keyboard and stuff it into a string array element. I am sure I will be using something along the lines of:
BufferedReader in = new BufferedReader(new InputStreamReader(
System.in));
String str = "";
System.out.print("Enter a FQDN to look up: ");
str = in.readLine();
but how do I get the input stuffed into hostname[ ].
Any hints or assistance will be appreciated.
MichaelWell part of. I need to be able to take a random number of hostnames (ie. mblack.mkblack.com, fred.mblack.com, joe.mblack.com, ...) and after the user presses the enter key between each entry, the inputted information is stored in an array element. for example with the three shown above the array would look like this after the user finished.
hostname {"mblack.mblack.com","fred.mblack.com","joe.mblack.com"};
the algorithm would be
Prompt for hostname
get user input and press enter
store hostname into array element
prompt for next hostname or enter with no input to complete entry and execute lookup.class methods.
I have the program written and working fine if I use a static array where I put the hostnames in the list, but cannot figure out how to get the information from the keyboard to the array element.
Thanks for the help though, the response is very much appreciated.
Michael -
SSRS Report Returning Double Quote string from a Single Quote String
Hi, I'm getting weird thing in resultset from SSRS report when executed. When I pass parameter to a report, which passes String that has single quote value to a split function , it returns rows with double quote.
For example following string:
'N gage, Wash 'n Curl,Murray's, Don't-B-Bald
Returns:
''N gage, Wash ''n Curl,Murray''s, Don''t-B-Bald
through SSRS report.
Here is the split function Im using in a report.
CREATE Function [dbo].[fnSplit] (
@List varchar(8000),
@Delimiter char(1)
Returns @Temp1 Table (
ItemId int Identity(1, 1) NOT NULL PRIMARY KEY ,
Item varchar(8000) NULL
As
Begin
Declare @item varchar(4000),
@iPos int
Set @Delimiter = ISNULL(@Delimiter, ';' )
Set @List = RTrim(LTrim(@List))
-- check for final delimiter
If Right( @List, 1 ) <> @Delimiter -- append final delimiter
Select @List = @List + @Delimiter -- get position of first element
Select @iPos = Charindex( @Delimiter, @List, 1 )
While @iPos > 0
Begin
-- get item
Select @item = LTrim( RTrim( Substring( @List, 1, @iPos -1 ) ) )
If @@ERROR <> 0 Break -- remove item form list
Select @List = Substring( @List, @iPos + 1, Len(@List) - @iPos + 1 )
If @@ERROR <> 0 Break -- insert item
Insert @Temp1 Values( @item ) If @@ERROR <> 0 Break
-- get position pf next item
Select @iPos = Charindex( @Delimiter, @List, 1 )
If @@ERROR <> 0 Break
End
Return
End
FYI: I'm getting @List value from a table and passing it as a string to split function.
Any help would be appreciated!
ZKAnother user from TSQL forum posted this code which is returning the same resultset but when I execute both codes in SQL server it works and return single quote as expected.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8d5c96f5-c498-4f43-b2fb-284b0e83b205/passing-string-which-has-single-quote-rowvalue-to-a-function-returns-double-quoate?forum=transactsql
CREATE FUNCTION dbo.splitter(@string VARCHAR(MAX), @delim CHAR(1))
RETURNS @result TABLE (id INT IDENTITY, value VARCHAR(MAX))
AS
BEGIN
WHILE CHARINDEX(@delim,@string) > 0
BEGIN
INSERT INTO @result (value) VALUES (LEFT(@string,CHARINDEX(@delim,@string)-1))
SET @string = RIGHT(@string,LEN(@string)-CHARINDEX(@delim,@string))
END
INSERT INTO @result (value) VALUES (@string)
RETURN
END
GO
ZK -
Combining string array elements into one string
Right, I have an string array called str which stores 1 character in each of its 16 elements. It gets this character from another array, strArray. Now, what I want to be able to do is to take all 16 elements and combine them into one string called keyString. Using the code below keyString only prints out the last character. The code is shown below:
for (x=0; x<16; x++) {
str = new String[16];
str[x] = "";
str[x] += (strArray[(index+x)%16].charAt(strChar[x]));
keyString = str[x];
System.out.print(keyString);
}Any help would be very much appreciated.
Edited by: Paragon96 on May 20, 2008 7:32 AMyour logic is wrong ; if you want to concatenate the content of the array, you have to loop (what you did), and concatenate keyString for each index, meaning:
keyString += str[x];you can also use a StringBuilder for such kind of operations -
Preventing select-string from adding additional undesired strings in the output file
Hi friends
in PS 4.0 i am trying to write a function which
step1: export the list of all eventlogs ----> wevtutil el > "$home\documents\\loglist1.txt"
step2: deleted the following two lines from loglist1.txt
DebugChannel
Microsoft-RMS-MSIPC
( the reeson of deleting these two lines is wevtutil cl command, can't clear these two evenlogs among approximately 1000 logs)
in fact via select-string with -pattern -notmatch parameters, we select anything except these two line
step3: pastes the select-string contents into the same file ("$home\documents\loglist1.txt") or into new text file (for example
"$home\documents\loglist2.txt")
here is my code:
function MycleareventsAll {
cls
Wevtutil el > "$home\documents\loglist1.txt"
$mycontents = select-string "$home\documents\loglist1.txt" -pattern DebugChannel, Microsoft-RMS-MSIPC -NotMatch
cd "$home\documents\"
$mycontents | out-file loglist2.txt"
# also i tried ---> $mycontents | set-content "loglist2.txt"# also i tried ---> $mycontents | set-content "loglist1.txt"
but the problem is, in addition of deletion, unfortunatelly additional strings (filepath, filename, line number) are added into the final text file so wevtutil will fail clearing logs listed in text file.
here is contents of the final text file
C:\Users\Administrator\documents\loglist.txt:1:Analytic
C:\Users\Administrator\documents\loglist.txt:2:Application
C:\Users\Administrator\documents\loglist.txt:4:DirectShowFilterGraph
but i need the contents be the same as original file without that two specific line:
Analytic
Application
DirectShowFilterGraph
i searched but i didn't find a way to prevent select-string cmdlet from adding these edditional strings
(filepath, filename, line number) into output file while keeping the original contents.
note: -quiet parameter is not what i want. it removes all contents & simply inserts a true or false.
any help?don't forget that Guys here know the basics of security such as clearing event logs & ...
how odd if you don't know this.
clearing all events is useful in test environment for example when i ma teaching my students & need to see all newly created events & work on them
Then you are teching your students how not to use an event log. We use filters and queries to access event logs. We also use event log CmdLets in PowerShell. WEVTUTIL is ok but it does not marry wellwith PowerShell as you have seen.
I have found very few people who are not certified in WIndows administration that know much about eventlogs when it should be a ver important part of administration. PowerShell has mmade EL management much easier but few take the time to learn how
to use the EL support in PowerShell.
I see no point inclearing event logs. It accomplishes nothing.
¯\_(ツ)_/¯
oh your are introducing me filters & queries in event viewer !! please stop Laughing me this way.
your problem is you judge about people's knowledge & you persist on your absurd judgments.
look at your sentence:
"Then you are teaching your students how not to use an event log"
where from you tell this? have you been present in my classes to see what i teach to my students?
have you seen that i told to my students not to use event viewer?
my goal of clearing events is related to myself. it's non of your businesses.
people are not interested to here concurrent irrelevant advises from you like a grandmother. they are searching for a solution. their intent of doing tasks is not up to you. -
Splitting string into multiple string output
Hello,
I have this string input from serial port which looks like this:
Voltage20Current10Temperature32
They are all tab delimited.
And I need them to split into three outputs (possibly converted to numerals) -->
Output1 --> 20
Output2 --> 10
Output3 --> 32
Your help will be appreciated. Thanks.
Solved!
Go to Solution.Hi Manu,
Try the attached example.
Regards,
Nitz
(Give Kudos to good Answers, Mark it as a Solution if your problem is Solved)
Attachments:
Untitled 3.vi 6 KB -
From RSS into multiple sql statements
Hi all, I'm trying to import RSS into my database for this I
created an XSLT
stylesheet that transforms the XML into a series of SQL
statements like
below
INSERT INTO rss_feed(feed_title,feed_link,feed_description)
VALUES('','
http://...','');
SELECT @feed_id := MAX(feed_id) FROM rss_feed;
INSERT INTO
rss_channel(feed_id,channel_title,channel_link,channel_description,channel_language,chann el_copyright,channel_managingeditor,channel_webmaster,channel_pubdate,channel_lastbuilddat e,channel_generator,channel_docs,channel_cloud,channel_ttl,channel_image,channel_rating,ch annel_skiphours,channel_skipdays)
VALUES(@feed_id,'...','...','','','','','','','','','','','','','','','');
SELECT @channel_id := MAX(channel_id) FROM rss_channel;
INSERT INTO
rss_item(channel_id,item_title,item_link,item_description,item_author,item_comments,item_ guid,item_pubdate)
VALUES(@channel_id,'...','','...','Joris van Lier','','','');
SELECT @item_id := MAX(item_id) FROM rss_item;
INSERT INTO
rss_enclosure(item_id,enclosure_url,enclosure_type,enclosure_length)
VALUES(@item_id,'
http://...','...','...');
My problem is: I can pipe this into a command-line sql
session but when
executing it from PHP it gives me a sql syntax error, running
the statements
separately does not preserve the needed context with the
foreign key
variables.
Second problem: how do I select the last inserted id in
MySQL; is there an
equivalent to @@IDENTITY?
mysql Ver 14.7 Distrib 4.1.13, for unknown-linux-gnu (x86_64)
using
readline 4.3
Joris van Lier"David Powers" <[email protected]> wrote in message
news:fhrnou$j4g$[email protected]..
> Joris van Lier wrote:
>> I'm stuck with the standard MySQL extension in php,
>> however I noticed that phpMyAdmin reports the
following
>> MySQL client version: 4.1.13
>> Used PHP extensions: mysql <- notice there's NO
mysqli here,
>
> Have you checked phpinfo()? phpMyAdmin decides which
extension to use
> based on the settings in config.inc.php. If mysqli isn't
enabled, it
> sounds as though your server is still running PHP 4. If
so, that's crazy.
> Support for PHP 4 ends on December 31. It's time to
demand that your
> hosting company upgrades to PHP 5.2.
>
>> but it can execute my query
>> How do they do that?
>
> I have no idea how phpMyAdmin does it. I presume that it
uses explode() to
> separate the queries into an array, using the semicolon
as the separator.
> You can then loop through the array to execute each
query independently.
There's no mysqli support on this server, phpMyAdmin has an
internal parser
that splits the queries and tries to handle delimiters in
strings, and then
uses mysql_unbuffered_query or mysql_query, so it seems that
using one of
these functions with multiple consecutive queries preserves
the context of
the previous query.
Using explode will split strings that contain a semicolon,
I'm now trying
to escape the semicolons in strings to avoid writing my own
parser, so far
I've been thinking about HEXing them, but hexing complete
input will
seriously hurt my ability to read the queries, the
alternative CONCAT('foo',
0x3b, 'bar') still isn't pretty.
Do you know if it's possible to embed hexed characters into
strings (without
introducing a semicolon)?
Joris -
Convert one string into multiple strings
i have a column 'name' in which records are like 'shailesh singh negi','vipin kumar singh'...my requirement is to split this column into three columns like 'firstname','middlename','lastname' and string should insert respectively like 'shailesh' in 'firstname','singh' into 'middlename',and 'negi' into 'lastname' column. i have used a query for splitting into two column bt not able to do the same wid three columns...
query for two columns is like this...
select substr(name,1,instr(name,' ')-1) firstname,
substr(name,instr(name,' ')+1) lastname
from table;CREATE TABLE nm AS
SELECT 'shailesh singh negi' NAME
FROM DUAL
UNION
SELECT 'vipin kumar singh' NAME
FROM DUAL
SELECT MAX (first_name) firstname, MAX (mid_name) middlename,
MAX (last_name) lastname
FROM (SELECT txt, token, l, CASE
WHEN l = 1
THEN token
END first_name, CASE
WHEN l = 2
THEN token
END mid_name, CASE
WHEN l = 3
THEN token
END last_name
FROM (SELECT txt,
SUBSTR (txt,
INSTR (txt, ' ', 1, LEVEL) + 1,
INSTR (txt, ' ', 1, LEVEL + 1)
- INSTR (txt, ' ', 1, LEVEL)
- 1
) AS token,
LEVEL l
FROM (SELECT ' ' || NAME || ' ' txt
FROM nm)
CONNECT BY LEVEL <=
LENGTH (txt)
- LENGTH (REPLACE (txt, ' ', ''))
+ 1))
GROUP BY txtRegards,
Mahesh Kaila -
How can I seperate one string into multiple strings using PowerShell?
New to PowerShell...how can I read/separate parts of a file name? For instance if I have a file name like "part1_part2_part3_part4.xls", how to separate this file name to four different parts? So I basically want to go from that file name,
to four different strings like part1, part2, part3, and part4...as four separate strings. How can I get this done in PowerShell?
ThanksYou can try something like this
PS> (Get-ChildItem part1_part2_part3_part4.xls).BaseName.Split('_') -
Help needed Importing a string from labview into matlab for file opening
Hello,
I am using labview to allow the user to pick the file to open via the
open labview measurement file block. Then I take the filename and
convert it from a path to a string and try to import it into my matlab
script which I use dlmread() to open my data file. However the
datafile does not open. I was wondering if anyone would help me with
this method?
Thank you,Hi Nicole,
Are you using the Matlab Script Node or the MathScript Node? I know that dlmread is not currently implement with MathScript (although R&D is looking at implementing further features for future versions of LabVIEW). Also, I'm not sure which VI you are using to get the file path because there isn't an "Open LabVIEW Measurement File" VI. There are Read & Write LVM and a simple Open\Create\Replace File VI--are you using one of these? If you are using the Open File VI, Matlab may be unable to read from the file because it is already locked for editing by LabVIEW.
I hope this helps!
Megan B.
National Instruments
Maybe you are looking for
-
I set up my new iPad under my daughters ID because her's is attached to my email. Tried to rent a movie from iTunes. Said I had to answer security questions since it was my first purchase. She didn't remember the answers. So it locked. She reset her
-
Adobe document services communication problem
Hello SDN a challenge: we have some problems with the Adobe Document Services. we have installed acording to the installationguide and checked this several times. However when we try to run the program FP_PDF_TEST_00 (which is a SAP-provided test pro
-
Is it possible to use 2 external monitors?
Hi, My name is Joe Chaplow, and I am new to the forum. Hello all. I want to set my Macbook Pro 15inch Mid 2009 model (2.8ghz with 512 dedicated vid ram and 256 for power saver mode) up so that I use two external monitors. I want to mirror the desktop
-
Workflow help needed, transitioning from iPhoto/iPhoto Library Manager
HI all, I am using latest Aperture, iPhoto, and 10.6.3 on lan connected macs and need some help setting up a workflow/libraries that represent some sanity amid the tens of thousands of photos that I have. Before getting Aperture3, i was using iPhoto
-
Spotlight search in menu bar. Name only
Is is possible to search in the Spotlight menu bar by name only? I tried kind:name but this didn't work. Is there anything like this I could add to the beginning of a search?