How to insert text to string in c3
hi
we have file name with extension ,now we want add some name to the file name
EX: Testdocument.doc
now we want Testdocument123.doc
How to add 123 before extension(.)
i am using this code
string Val="123";
string FileName = filename.Insert(0, Val);
Out Put is:123Testdocument.doc
Hi PS_L,
You can get the last index of ".", and use that with filename.Insert as a point in the string to insert the new text.
string Val="123";
string FileName = filename.Insert(filename.LastIndexOf("."), Val);
Regards, Matthew
MCPD | MCITP
My Blog
View
Matthew Yarlett's profile
See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
Upload and Crop User Profile Photos
Similar Messages
-
How to insert text in existing file.?????
how to insert text in existing file.?????
my file contains simple text with numbers of lines having more then 10 MB size and it might be increase up to 100MB.
i required to seek to spec. position and insert chunk of characters to file without overwriting existing one.
I tried out with RandomAccessFile class Also.
Pl. Suggest me way to insert String in existing file.
Thanks ,
Timirhow to insert text in existing file.?????You can't "insert" text into an existing file. You can
overwrite portions of an existing file or extend one by
writing past the current end of file.
If you want to insert text into a file you have to write
out a new file. -
How to insert text in the middle of an existing textfile using java
Hi,
How to insert text in the middle of an existing textfile using java i/o streams??Mickie wrote:
I shudn't delete the file...Then you will have the old file and the new file - do you want that?
and I have to insert text not only at a single place ....got to do at many places in the text file!!then extrapolate on the procedure outlined in reply #1 . -
How to insert text data into temp tables....
Dear All,
I have one notepad with three columns, first column is segment1, second column is segment2 & third column is price list....
and there is no delimiter and exact spaces..(i.e, zizak fomat)
Ex:-
xx yy 00009999
kk mmmm 00009333
Data is available like above example...So, I need to insert this data into one table.(2LAKSHS OF RECORDS AVAILABLE IN THAT NOTEPAD)
So, Any can one help me, how to insert this kind of text data into temparory table...
Regards
Krishna
Edited by: user12070109 on May 29, 2010 9:48 PM
Edited by: user12070109 on May 29, 2010 9:49 PMHello,
What manu suggested this can be done through oracle forms.
If as i read your last post you are using that in database it will not work in db. Try to use the same process in oracle forms will work by making some changes.
And if you don't want to use forms then there is one way using SQL LOADER. It required control file to execute for uploading data.
See the below link.
http://www.orafaq.com/wiki/SQL*Loader_FAQ
In this example its showing filename.csv you can use your file name like yourfilename.txt.
So your control file will look like this...
load data
infile 'file_path\file_name.txt'
into table table_name -- use actual table name where you want to upload data
fields terminated by " " -- Here using spaces as you mentioned
(column1, column2, column3) -- Here use the three column names of tableAnd after creating control file with the above code. You can call it in command prompt like this
sqlldr username/password control=control_file_path\control_file_name.ctl log=log_file_path\log_file_name.log
or
sqlldr username/password@dbconnection control=control_file_path\control_file_name.ctl log=log_file_path\log_file_name.log
Before doing this practice make sure SQLLDR.exe availabe in the machine where you have to execute. Otherwise you will have to install db client for using sqlldr.exe
-Ammad -
Freeform to Text: How to insert Text into freeform
How to edit text into freeform
Hi FZRR,
Could you share more information with us? Or you can upload the screenshot to OneDrive and share the picture link here.
If you want to insert text into freeform shape, there are two methods:
1. Insert a textbox on the freeform shape, edit text in the textbox.
2. Select the freeform shape, and right-click > Add text.
If there is anything I can do for you regarding this issue, feel free to post back.
Best regards,
Greta Ge
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
How to insert text in the text-id using BDC
Hi Friends,
I m using the BAPI to upload the data for a transaction .
In that transaction there are some text id's are created to insert text like 'Container number'.
I want to insert the text in that text id . But it not a field. Text ids are having object no and table and number .
Is there any function like 'READ_TEXT' which we use to retrieve the text form text ids to write text in text ids ?
So that I can use that function to insert the text in the text ids.
Thanxs.Hi Umesh,
READ_TEXT is used to Read the text , but SAVE_TEXT is used to save the text. but for reading or saving you need correct iD's and text objects.
Regards
vijay -
How to insert text in smartform boxes
Hi Friends,
This is regarding about smartform box.
I have created one template. pls find below for complete template for your ref.
Total template has 5 lines names like C1, C2, C3, C4, C5, C6 and C7.
To fulfill client req, again I have devided First line "C1" and Second line "C2" into 5 boxes.
Third line -- no boxes.
Fourth line -- 3 boxes
Fifth line -- 3 boxes
Sixth line -- no boxes
Seventh line -- no boxes
Now I want to assign text for each boxes in the C1 and C2 lines.
In C1 line
first box-- po date
second box - text
like that I have to pass the text in the corresponding boxes.
I don't find any option in the right click.
I am new to the smartforms.
Could you pls help me is there any way to insert text in the boxes.
This is very urgent.
Thanks in advance.Hi,
Create the text editors as many as you want , these should be assigned to each box in template,
When u double click on text on the right side uder the template window
1-Output option tab-->at the bottom , you can see output structure, there you need to specify the line number and column number.
Ex:
template have 2 rows and 2 columns each row
text1 --- row =1 column =1
text2---- row =1 column =2
text3--- row =2 column =1
text4---- row =2 column =2
Reward if useful,
Thanks,
Aditya -
How to insert text in current Pdf?
I try to insert text into current pdf i am getting unexepected error
PDEContent pdeContent;
AVDoc avDoc = AVAppGetActiveDoc();
PDDoc pdDoc = AVDocGetPDDoc (avDoc);
PDPage pdPage = PDDocAcquirePage(pdDoc,AVPageViewGetPageNum(AVDocGetPageView(AVAppGetActiveDoc())));
pdeContent = PDPageAcquirePDEContent(pdPage, NULL);
//Create a PDEText object
PDEText pdeText = PDETextCreate();
// Create a DEGraphicState object and set its attributes
ASFixedMatrix textMatrix;
//Create an ASFixedMatrix object
memset(&textMatrix, 0, sizeof(textMatrix)); /* Set the buffer size */
textMatrix.a = Int16ToFixed(24); /* Set font width and height */
textMatrix.d = Int16ToFixed(24); /* to 24 point size */
textMatrix.h = Int16ToFixed(1*72); /* x,y coordinate on page */
textMatrix.v = Int16ToFixed(2*72); /* in this case, 1" x 2" */
PDEGraphicState gState;
PDEColorSpace pdeColorSpace = PDEColorSpaceCreateFromName(ASAtomFromString(colour_space.c_str()));
memset(&gState, 0, sizeof(PDEGraphicState));
gState.strokeColorSpec.space = gState.fillColorSpec.space = pdeColorSpace;
gState.miterLimit = fixedTen;
gState.flatness = fixedOne;
gState.lineWidth = fixedOne;
PDSysFont sysFont;
PDEFont pdeFont;
PDEFontAttrs pdeFontAttrs;
//Set the size of the PDSysFont and set its attributes
memset(&pdeFontAttrs, 0, sizeof(pdeFontAttrs));
pdeFontAttrs.name = ASAtomFromString("CourierStd");
pdeFontAttrs.type = ASAtomFromString("Type1");
//Get system font
sysFont = PDFindSysFont(&pdeFontAttrs, sizeof(PDEFontAttrs), 0);
//Create a font that is used to draw text on a page
pdeFont = PDEFontCreateFromSysFont(sysFont, kPDEFontDoNotEmbed);
char *chrNewFilePath = "Doc.pdf";
ASText asFilePath = ASTextFromUnicode(reinterpret_cast <ASUTF16Val *> (chrNewFilePath), kUTF8);
//Create a character pointer
char *HelloWorldStr = "Hello There";
//Create new text run
PDETextAdd(pdeText, //Text container to add to
kPDETextRun, // kPDETextRun
0, // in
(unsigned char*)HelloWorldStr, // Text to add
strlen(HelloWorldStr),// Length of text
pdeFont, // Font to apply to text
&gState, //Address of PDEGraphicState object
sizeof(gState), //Size of graphic state to apply to text
NULL,
0,
&textMatrix, //Transformation matrix for text
NULL); //Stroke matrix
::free(chrNewFilePath);
ASFileSys asFileSys = ASGetDefaultFileSysForPath(ASAtomFromString( "ASTextPath" ), asFilePath);
ASPathName asNewPath = ASFileSysCreatePathName(asFileSys, ASAtomFromString( "ASTextPath" ), asFilePath, 0);
PDDocSave(pdDoc, PDSaveFull , asNewPath , asFileSys, NULL, NULL);I changed that code to below mention code, when i was run the plugin and after close the acrobat it asking for save, but it doesn't show any text text
ASFixedRect cropBox;
char errorMsg[256];
ASInt32 errorCode = 0;
PDPageGetCropBox (pdPage, &cropBox);
// Initialize the font descriptor then create the font reference.
// Because we're using one of the base 14 Type 1 fonts, we only
// need to pass a small amount of information to PDEFontCreate().
PDEFont pdeFont = NULL;
PDEFontAttrs pdeFontAttrs;
memset(&pdeFontAttrs, 0, sizeof (pdeFontAttrs));
pdeFontAttrs.name = ASAtomFromString( "Courier" );
pdeFontAttrs.type = ASAtomFromString( "Type1" );
DURING
// Create the font reference.
pdeFont = PDEFontCreate(&pdeFontAttrs, sizeof (pdeFontAttrs), 0, 255, 0, 0, ASAtomNull, 0, 0, 0, 0);
HANDLER
ASGetErrorString (ASGetExceptionErrorCode(), errorMsg, 256);
AVAlertNote (errorMsg);
return NULL;
END_HANDLER
PDEColorSpace pdeColorSpace = PDEColorSpaceCreateFromName(ASAtomFromString( "DeviceGray" ));
PDEGraphicState gState;
ASFixedMatrix textMatrix;
// The graphics state controls the various style properties of the text
// including color, weight, and so forth.
memset (&gState, 0, sizeof (PDEGraphicState));
gState.strokeColorSpec.space = gState.fillColorSpec.space = pdeColorSpace;
gState.miterLimit = fixedTen;
gState.flatness = fixedOne;
gState.lineWidth = fixedOne;
// Fill out the text matrix, which determines the point
// size of the text and where it will is drawn on the page.
memset (&textMatrix, 0, sizeof (textMatrix));
textMatrix.a = ASInt16ToFixed(12);
textMatrix.d = ASInt16ToFixed(12);
textMatrix.h = cropBox.left + (cropBox.right - cropBox.left)/2 - fixedSeventyTwo;
textMatrix.v = cropBox.top - (cropBox.top - cropBox.bottom)/2 - fixedThirtyTwo;
PDEText volatile pdeText = NULL;
DURING
// Create a new PDEText element and add a kPDETextRun object to it.
pdeText = PDETextCreate();
PDETextAdd (pdeText, kPDETextRun, 0, (Uns8 *) "This page intentionally blank" , 30,
pdeFont, &gState, sizeof (gState), NULL, 0, &textMatrix, NULL);
// Insert text element into page content.
PDEContentAddElem (pdeContent, kPDEAfterLast, (PDEElement)pdeText);
// Commit the changes to the PDEContent.
PDPageSetPDEContent(pdPage, gExtensionID);
// Advertise that we changed the contents so the viewer redraws the
// page and other clients can re-acquire the page contents if needed.
PDPageNotifyContentsDidChange (pdPage);
HANDLER
// Store the error code.
errorCode = ASGetExceptionErrorCode();
END_HANDLER
// Release any objects we may have created or acquired.
// Note : PDERelease correctly handles NULL, so we don't
// need to test for valid objects.
PDERelease ((PDEObject) pdeColorSpace);
PDERelease ((PDEObject) pdeFont); -
i'm using indesign for make books. always i need insert quotes from some holy books. so i need to insert text using verse number
i'm not asking about
b
u
l
l
e
t and
n
u
m
b
e
r
i
n
g
sorry for my bad english
my target is simply insert pre typed sorted texts using the verse number. for example. i have Holy Quran full text . it have about 6000 verse. suppose i need chapter 3, verse 5 in to my paragraph. manually i goto that text file and copy the text paste it here. but i need it automatically using page number/ verse number/ unique id. script / addins .
approximately like "data merge " in design. -
How to Remove Text From Strings ?
Hi,
The question I have is, in the String that I have Pasted below, how can I remove the first line (>gi|23821530|dbj||SEG_D10989S Bos taurus gene for endothelin receptor) and then use the remainder of the text to Post to a web server?
I have tried doing this with a Regex (Pattern P = Pattern.compile("(^>.*)");), I'm able to capture the first line of text, but am not sure how to remove it and then use the rest of the text to Post to the web server.
Any Help with this would be much appreciated
gi|23821530|dbj||SEG_D10989S Bos taurus gene for endothelin receptorGGGATCCCGAGCAAACTGCGGAGGCCACACTGTCAGGCATTCCCTCGGCGTTTCGTCAGAGCCAGACCCT
CCCGCTGCTGAAGGGAGGCGCGCTCTGCTCCCGGGCTGCCGGGAACCCAGCCGCGCGCCGGGGAAGGAGG
TCCCTGCCTGGTGCGTCCGGACCAAGAGGTAACCGTTCTGCTTGGTGTTTAATTCAAATCTGTGATTGAA
CCTTATCCTGGGGCTTCAGTTTGGATTACTTCTTAGGTTTGTTTTTGTTTGTTTGTTTGTTTTTTAACCT
GTAGCTACAGCAGATTAAAATGGGATTGGAGTGAAGGAGAGGGCTTGAGTGTCTGAAGTCACTCGAAGGG
GATAGAAACTTCCGAGTTAATCCAGATAGAGACTCTTCCAAATAGACCAAGTGGAGATGTCCGGGAGATT
TTCCGAGTCAGCCGGCTCAGTCCTGGGGTGTGTGTATGGGGGGTGGGGGCGGTGCCGAAGAGCGGAAGGA
AGGGGTCTGAAAGTCCAGACATGCGGCATCCGGGGTTGCTGTGGAGTCGAAAGCAGAGACTGGCGATGCC
CTTGATCTCTAACCTGCCTTGATTTGCCCCGTCCCCGCGCGCCCTTGGCCAGAACGAATACTGCTCCCTC
TGCGCACACCAGGAGCTCAAAGCTTTGCTTTGGACACCCGTCCTCTCCTCCCCGTCACACCCCTTCCAGGString foo = "gi|23821530|dbj||SEG_D10989S Bos taurus
gene for endothelin receptor";
String totalString = "gi|23821530|dbj||SEG_D10989S Bos
taurus gene for endothelin receptor
GGGATCCCGAGCAAACTGCGGAGGCCACACTGTCAGGCATTCCCTCGGCGTTTCG
CAGAGCCAGACCCT
CCCGCTGCTGAAGGGAGGCGCGCTCTGCTCCCGGGCTGCCGGGAACCCAGCCGCG
GCCGGGGAAGGAGG
TCCCTGCCTGGTGCGTCCGGACCAAGAGGTAACCGTTCTGCTTGGTGTTTAATTC
AATCTGTGATTGAA
CCTTATCCTGGGGCTTCAGTTTGGATTACTTCTTAGGTTTGTTTTTGTTTGTTTG
TTGTTTTTTAACCT
GTAGCTACAGCAGATTAAAATGGGATTGGAGTGAAGGAGAGGGCTTGAGTGTCTG
AGTCACTCGAAGGG
GATAGAAACTTCCGAGTTAATCCAGATAGAGACTCTTCCAAATAGACCAAGTGGA
ATGTCCGGGAGATT
TTCCGAGTCAGCCGGCTCAGTCCTGGGGTGTGTGTATGGGGGGTGGGGGCGGTGC
GAAGAGCGGAAGGA
AGGGGTCTGAAAGTCCAGACATGCGGCATCCGGGGTTGCTGTGGAGTCGAAAGCA
AGACTGGCGATGCC
CTTGATCTCTAACCTGCCTTGATTTGCCCCGTCCCCGCGCGCCCTTGGCCAGAAC
AATACTGCTCCCTC
TGCGCACACCAGGAGCTCAAAGCTTTGCTTTGGACACCCGTCCTCTCCTCCCCGT
ACACCCCTTCCAGG";
int position = -1;
int lenght = -1;
position = totalString.indexOf(foo) + foo.length();
String processedString =
totalString.substring(position);
Thanks for the post,
Did the job perfectly!
cheers again -
How to insert text file in a table (unix environment)
Hi All,
i am having a requirement that i need to insert a text file in table.
how can i do it. i am in unix environment.
NOTE:- for this i have to write a SQL*LOADER script (not a pl/sql unit)
Regards
HarshYou can use SQLDeveloper to help load data from a file into a table. With SQLDeveloper you can load data into an existing table by right clicking on the table on the connections tree and choosing import and selecting the file to import. If the table does not exist you can right click on the table folder and click import and the import process will allso create the table. You have the choice of a number of methods for importing the data, including SQL Loader, insert script, excuted sql, staging external table or permanent external table.
Joyce Scapicchio
SQLDeveloper Team -
How to insert text from another software?
In Photoshop, I need some text with a particular font, which Photoshop doesn't have. I can, however, make it in Word, which has that font. The question is: how do I transfer (or export) that text from Word to Photoshop?
If you have both Word & Photoshop on the same machine, there could be an issue with the font or the font you are looking for is at the bottom of the font list because of an incorrect header. Did you scroll all the way to the bottom of the font list to see if it was placed in a different catagory?
-
How to insert Text physically to xml in xml Element
hello friends,
I am newb of jDom. i am trying to change xml "Element's"--->"Text". My xml is as follows .....
<?xml version ="1.0">
<Elements>
<code>
<data>EE550</data>
</code>
</Elements> I am trying to replace that "<data>" by <data>AA550</data>
my code is as below
SAXBuilder sb = new SAXBuilder();
Document doc = sb.build(new File("src/xml/M90EE.xml"));
Element element = doc.getRootElement();
List children = element.getChildren();
String key = (element.getChild("text").getChild("mkey").setText("AA550").getTextTrim()); System.out.println("mkey :"+key);
output:
mkey :AA550 but is it possible to change in the xml file phisically.
thanQ
Ajayhello Reegz,
ThanQ so much for perfect solution....
when i do like that it is actually adding text to the existing Element Text.. so i wrote as follows....
SAXBuilder sb = new SAXBuilder();
Document doc = sb.build(new File("src/xml/M90EE.xml"));
*String skey = (element.getChild("text").getChild("mkey").removeContent().toString());* //--------->step 1
*String skey1 = (element.getChild("text").getChild("mkey").addContent("ISO9001").toString());* //-------->step 2
String rdmkey = (element.getChild("text").getChild("mkey").getTextTrim());
XMLOutputter serializer = new XMLOutputter();
String str = serializer.outputString(doc);
FileWriter fr = new FileWriter("src/xml/M90EE.xml");
fr.write(str);
fr.flush();
fr.close();Is there any other way to replace text in step1 and step2 other than above or will it be enough for multiuser programming. Because this application will be accessed by so many number of user's what do u sujjest.
thanQ ...
Han. -
How to insert text in Master-Detail tables
I have created a table for storing web pages as follows,
TABLE Pages -- Master
(Page_ID NUMBER PRIMARY KEY,
NAME VARCHAR2(15),
BODY CHAR(1));
TABLE Pages_Detail -- Detail
(Id NUMBER,
lno NUMBER,
Text VARCHAR2(50));
I created a DETAIL_DATASTORE preference and set the id column as a foreign key to Page_Id. I tried to create an index on Body but it had copilation errors taht i cannot get to. Is it an interMedia config problem or am i doing something wrong? Please help
Thanks!
nullHi,
Please list the errors that u are getting. Also check that your listener and tnsnames.ora file is configured for external procedures
Listener should have the following entries:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/8.1.6)
(PROGRAM = extproc)
Entry in tnsnames.ora will be:
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
HTH,
Siddharth -
How to insert text into sqlite database from AutoCompleteTextField
Dear Friends,
I want to know that whether it is possible to store values into the database from AutoCompleteText field?????????if it is posssible please explain that how we can do that............Please Reply.......I am waiting for the reply......
With Love,
NithinYou can use SSIS package for that
Start a new Integration Services project in Business Intelligence Development Studio/ SSDT. Add a new SSIS package with a data flow task. Add a OLEDB source to connect to Oracle server and add a OLEDB Destination to connect to your local database.
Select tables for source and destination. On executing package source data will get transferred to your local database.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Maybe you are looking for
-
Firefox 4.0 and QuickTime 7.6.9 don't get along
I had Firefox 3.5.5 and QuickTime 7.5.5 installed, mostly to just watch the trailers at the Apple site. I updated both to Firefox 4.0 and QuickTime 7.6.9 and the videos would no longer load. The site itself responded well, the trailers played in IE 8
-
Hello, i have enabled iCloud Photo Library in all my devices as well as in OSX photos app. after a few days, all my devices, including Photos, reads "updated at xx:xx", what supposedly means every device finished uploading photos to icloud. all my iO
-
This is a newbie question. Can you tell me the difference between jax-ws and apache axis. Is it possible to build web services just using jax-ws and not apache axis. What would be advantages and disadvantages. Thanks.
-
Part of screen unresponsive?
I am having an intermitant issue with the rkght hand side of the screen not responding to touch any ideas?
-
Fireworks CS3 OS X constant crashes with complex files
I recently purchased CS3 and started using Fireworks CS3 instead of Photoshop for web development. Absolutely love it. I started having crashes, mainly on opening complex files created in Fireworks CS3. A couple weeks ago I formatted my entire system