How to convert a "text variable" to String with plugin
Hello,
I am currently developing a InDesign (CS5) plugin, where I need to manipulate text variable.
From the plugin I want to convert the "text variable" to string (in principle I should use the method "VariableToString (..)" of "ITextVariable")"
My problem is, how to find the text varial from its name (I think I should use the method "FindLocationsUsed(..)" of "ITextVariableSuite") and then convert it to String
I don't know how to use interfaces ITextVariable and ITextVariableSuite
Plugin implemented in C++ language
thank you
InputStreamReader in=new InputStreamReader(fis);
StringWriter out=new StringWriter();
char[] buffer=new char[8192];
int sizeRead;
while ( ( sizeRead=in.read(buffer, 0, 8192) ) != -1 )
out.write(buffer, 0, sizeRead);
String content=out.toString();
Similar Messages
-
How to convert an int variable into String type
hi everybody
i want to know how to convert an interger variable into string variable
i have to implement a code which goes like this
Chioce ch;
for(int i=0;i<32;i++)
// here i need a code to convert the int variable i into a string variable
ch.add(String variable);
how do i convert that int variable i into a String type variable??
can anyone help me?Different methods:
int a;
string s=a+"";or
String.valueOf(int) is the better option because Int.toString() generated an intermediate object to get the endresult
Ema -
Hi Experts...
Can you please explain me how to create a Text variable...
In my Cube i had 3 different date fields....
and as per my requirment i need to create a rolling report for which will display data for 6 months rolling.
As the date field which i need to use is not mapped to Time Char's (Cal Year,Cal Month...etc)
For that reason i created below customer exit variable and used offset variables to achieve the rolling 6 months report
Code used for Customer Exit VAriable:
WHEN 'ZC_Cmonth1'. " Current Cal Month Car Expiry
IF i_step = 2.
CLEAR l_s_range.
determine date
LV_SYDAT = SY-DATUM.
LV_YEAR_ACT = SY-DATUM+0(4).
LV_MONTH_ACT = SY-DATUM+4(2).
Set begin date of intervall
CONCATENATE LV_YEAR_ACT LV_MONTH_ACT '01' INTO LV_DATE_LOW.
Set end date of intervall
CONCATENATE LV_YEAR_ACT LV_MONTH_ACT '31' INTO LV_DATE_HIGH.
Fill ranges-tab with: include all values between beginning of year
and actual date
CLEAR E_T_RANGE.
CLEAR L_S_RANGE.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
L_S_RANGE-LOW = LV_DATE_LOW.
L_S_RANGE-HIGH = LV_DATE_HIGH.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
Now i need to create TEXT VARIABLE that will display the Month Name in the column name
Please update in detail step how to create a Text VariableIn your specific requirement select the which ever the keyfigure you want to analyse, go to edit mode of keyfigure propeties there select the newvariable type and create the Text variable by maintaining the proper offset start and length and also maintain the in whcih format u want see the month name in column headers. Maintain the Text format or key format. it totally depends on u r requirement.
Hope it will help ful for u.
Bye,
Chandu. -
How to convert ResultSet's value to String
Dear JDC's
plz tell me how to convert ResultSet's value to String.
kashifI want to read a whole array from a table into a String[]
and then send it to another servlet before I forward it all to anther servlet with request.setParameter.....
Any ideas how to solve it....that is how far I got so far:
rs=pgresult("select count (answer) from answers where qid="+idnum);
numberofquestions = rs.getInt("mynumber");
rs=pgresult("SELECT answer FROM answers WHERE qgroup="+qgroup);
allanswers = new String[numberofquestions];
allanswers = (String[])rs.getArray(1).getArray();
req.setParameter("allanswers",allanswers);
RequestDispatcher dispatcher = req.getRequestDispatcher("editanswers");
dispatcher.forward(req,res);
Tobi -
Can u tell me how to convert int value in to string
hi to all, can u tell me how to convert int value in to string.
hi to all, can u tell me how to convert int value in
to string.Even this way:
int number = 155;
String mystring = ""+155;
[\code] -
Hi,
how to know pro-grammatically variable type(string ,numeric ....) of TestStand variable using Labwindows CVI.
Thanks
Mukesh KumarMukesh,
You could use the TS_PropertyGetType() function in CVI to do this. Here is a reference page for the GetType function--you can see that it returns a PropertyValueType which will indicate which type the PropertyObject (variable) is. In CVI, you'll find this function in the NI TestStand API 2013 instrument methods, under PropertyObject > Static Properties.
Hope it helps, and let us know if you have any more questions about it!
Daniel E.
TestStand Product Support Engineer
National Instruments -
How to replace a character in a string with blank space.
Hi,
How to replace a character in a string with blank space.
Note:
I have to change string CL_DS_1===========CM01 to CL_DS_1 CM01.
i.e) I have to replace '=' with ' '.
I have already tried with <b>REPLACE ALL OCCURRENCES OF '=' IN temp_fill_string WITH ' '</b>
Its not working.Hi,
Try with this..
call method textedit- >replace_all
exporting
case_sensitive_mode = case_sensitive_mode
replace_string = replace_string
search_string = search_string
whole_word_mode = whole_word_mode
changing
counter = counter
exceptions
error_cntl_call_method = 1
invalid_parameter = 2.
<b>Parameters</b> <b> Description</b> <b> Possible values</b>
case_sensitive_mode Upper-/lowercase false Do not observe (default value)
true Observe
replace_string Text to replace the
occurrences of
SEARCH_STRING
search_string Text to be replaced
whole_word_mode Only replace whole words false Find whole words and
parts of words (default
value)
true Only find whole words
counter Return value specifying how
many times the search string
was replaced
Regards,
Jayaram... -
could someone please tell me how to convert a powerpoint to a movie, with a voice over? thankyou
Open the powerpoint presentation, on the click on the 'file' button located at the top left of the menu bar, click on 'save as' at the bottom of the window that opens you should see a dropdown format gliff that says powerpoin presentation .pptx; click on the gliff and choose 'movie.mov'
-
How to convert a text file in lower case to upper case?
I've a beginner in java world and I just come through the tutorial in http://java.sun.com/docs/books/tutorial/essential/io/filestreams.html showing how to copy a text file:
import java.io.*;
public class Copy {
public static void main(String[] args) throws IOException {
File inputFile = new File("farrago.txt");
File outputFile = new File("outagain.txt");
FileReader in = new FileReader(inputFile);
FileWriter out = new FileWriter(outputFile);
int c;
while ((c = in.read()) != -1)
out.write(c);
in.close();
out.close();
And I would like to ask how to covert all lower case letters in input file to upper case letter in output file at the same time of copying.
I guess it'll be using Character.toUpperCase(c), but I don't know how to do it actually.
Any help would be much appreciated.Hope this helps
import java.io.*;
public class Copy {
public static void main(String[] args) throws IOException {
File inputFile = new File("farrago.txt");
File outputFile = new File("outagain.txt");
FileReader in = new FileReader(inputFile);
FileWriter out = new FileWriter(outputFile);
BufferedReader buff = new BufferedReader(in);
String c;
while ((c = buff.readLine()) != null)
out.write(c.toUpperCase());
in.close();
out.close();
} -
How to display a text in a string as a link??
Hi All,
I am displaying a string in one of the column in my datagrid. I have to search for a specific text in the string and if it is there i have to display it as a link/linkbutton/button or anything which user can click.
E.g
String displayed in the datagrid column is "My Name is Pratik" and if text "Pratik" is found, i have to display "Pratik" as a link which user can click.
How can i achieve this??
ThanksIf you want your text to be read-only, you can use the RichText component instead of TextArea. Search for Text Layout Framework for more info on how to mark up your text.
-
How to populate a text variable
Hi All,
I need to populate a text variable based on the value of a characteristic in the query. Since the value of the characteristic and the text variable value is not the same I cannot use replacement path. So here I have to use customer exit.
My problem is how to get the value of the characteristic in the customer exit.
If the characteristic is used in a variable I know how to get the value of the characteristic (We can get it from i_t_var_range). But here I am not using the characteristic in any variable. So how will I get the characteristic value in the customer exit.
Any useful help will be appreciated.
Thanks
AnandHi Srini,
Based on my above scenario suppose that there are only two month values in the cube, say January and March. So in the column side there will be only two column for each key figure, if only month characteristic is there in the column side, one for January and the second for March. Here I want to populate "First" as value for text variable where January is there and "Third" as value of text variable where March is there.
Here you have mentioned "you can read all available values in cube and pass required value/text to text variables". Here how do I write a code to read the month values from the cube, that is my question.
If it is there in some variable I could have got it from "i_t_var_range". But as per user requirement I cannot use a variable restriction on the month and they want to use this text variable across the queries(which I am not creating, user themselves are creating the queries) based on their requirement.
Thanks,
Anand -
How to transform a text variable in PLD to all CAPS?
Dear Experts,
I have a text variable in my PLD and I will like to change this text to all upper case?
What is the function I can use to achieve this in PLD?
Warmest Regards,
ChinhoHi Chinho,
PLD is a basic tool without the function you asked for. If you click on Formula Editor, you will find only less than 10 string operations are supported. You may use UDF with FMS by Upper function from SQL to achieve your goal.
Thanks,
Gordon -
How to change the text variables for a standard report-writer report ?
I am trying to change the text variables for a report -writer report and transport the same so as to change the title page and the report output heading .I know the Report-Group 6Z02 and the library 6O1 to which it belongs.I tried using the change transaction GR32 after going to the area menu through FGRP . I try to change the text variables through but it throws an error "You chose a name in the reserved name range - try different name ".
I have also tried copying this report into another report and changing the new report . I was able to change and save the text variables . Now when I try to overwrite the original report 6Z02-001 with this new report , it does not allow that.
Let me know how I can change the text variables for the sameCan anyone please suggest me what to do here ?
-
How to convert the text field into currency field
Hi,
I have an requirement to converting the text field into currency.
If I convert directly it gives dump.
If I convert this to Numeric means it takes the decimals also as whole value.
Is there any FM to convert the text field into Currency field.
Please advice me.
Thanks in advance.Hi,
I am on an SRM sytem, which unfortunately does not have th FM: PSSV_TEXT_INTO_FIELD_CURRENCY.
But I also need to transfer a string value like '12,99' to a field with type curr.
Can i Do that manually, or is there another FM?
I have already checked code with write to or pack/unpack.
But without success yet.
Something like this:
DATA: g_str(11) type c.
DATA: g_p type p.
WRITE '12,99' TO g_str CURRENCY 'EUR'.
is no use for me. Finally I need to move g_str to my curr-field, which causes st22.
also: PACK g_str to <curr-field or g_p> dumps.
Help appreciated.
regards, matthias -
How to convert the TEXT file into an XML using plsql code
Hi all ,
I need to convert an TEXT file into an XML file how can i do it
Below is my sample TEXT file .
TDETL00000000020000000000000120131021115854ST2225SKU77598059 0023-000000010000
I want the above to be converted into the below format
<?xml version="1.0" encoding="UTF-8"?>
<txt2xml>
<!-- Processor splits text into lines -->
<processor type="RegexDelimited">
<regex>\n</regex>
<!--
This is used to specify that a message should be created per line in
the incoming file;
NOTE: this was designed to work with all the processors, however it
only works correctly with 'RegexDelimited' processors (check the
enclosing top processor type)
-->
<maxIterationsPerMsg>1</maxIterationsPerMsg>
<!-- For lines beginning with FHEAD (File Header) -->
<processor type="RegexMatch">
<element>FHEAD</element>
<regex>^FHEAD(.*)</regex>
<processor type="RegexMatch">
<element>OriginalLine</element>
<regex>(.*)</regex>
<consumeMatchedChars>false</consumeMatchedChars>
</processor>
<processor type="RegexMatch">
<element>LineSeq,Type,Date</element>
<regex>^(\d{10})(\w{4})(\d{14})$</regex>
</processor>
</processor>
<!-- For lines beginning with TDETL (Transaction Details) -->
<processor type="RegexMatch">
<element>TDETL</element>
<regex>^TDETL(.*)</regex>
<processor type="RegexMatch">
<element>OriginalLine</element>
<regex>(.*)</regex>
<consumeMatchedChars>false</consumeMatchedChars>
</processor>
<processor type="RegexMatch">
<element>LineSeq,TransControlNumber,TransDate,LocationType,Location,ItemType,Item,UPCSupplement,InventoryStatus,AdjustReason,AdjustSign,AdjustQty</element>
<regex>^(\d{10})(\d{14})(\d{14})(\w{2})(\d{4})(\w{3})([\w ]{13})([\w ]{5})(\d{2})(\d{2})([+-]{1})(\d{12})$</regex>
</processor>
</processor>
<!-- For lines beginning with FTAIL (File Tail) -->
<processor type="RegexMatch">
<element>FTAIL</element>
<regex>^FTAIL(.*)</regex>
<processor type="RegexMatch">
<element>OriginalLine</element>
<regex>(.*)</regex>
<consumeMatchedChars>false</consumeMatchedChars>
</processor>
<processor type="RegexMatch">
<element>LineSeq,TransCount</element>
<regex>^(\d{10})(\d{6})$</regex>
</processor>
</processor>
</processor>
</txt2xml>
ThanksSorry, that doesn't make much sense.
The XML you gave is a configuration file for txt2xml utility. It doesn't represent the output format.
Are you a user of this utility?
Maybe you are looking for
-
How can i share documents with different users on the same mac?
How can i share documents with different users on the same mac?
-
Alt Graph dead on swedish Solaris 10 x86, jdk 1.5.x
Hello! I posted this on the Solaris JRE forum first but there is not much activity there. Perhaps anyone that reads this forum can assist me. I'm having a peculiar problem and I'm at loss as of how to fix it. I have a fresh Solaris 10 x86 installed o
-
Cant print in Word 2010 or Adobe Reader pdf files
I run Windows 7 and have an HP Officejet Pro 6835 connected wirelessly via my router. I am able to print test pages and WordPad docs but not from Word 2010 or Adobe Reader. Please help! =)
-
Wish list in next version: Curves. It's Missing.
Hello, I purchased Aperture and like many attributes of the software. Great job! I would like to see Curves in the next version. I know I can go to adjust in Curves in Photoshop, but that will covert the RAW image into a .tif or .psd which takes up m
-
Synchronize Business Partner from SAP CRM - SAP ERP
Hi experts, I would like to synchronize our BPs from the CRM into our SAP ERP System. What Ive done until now: 1. start initial load "bupa_main" from "CRM" to "OTLP" 2. check if everything is correct with R3AM1 - after ~ 1 hour -> done (green) 3. I c