Click here to Skip to main content
15,891,567 members
Home / Discussions / Java
   

Java

 
Questionis it possible to divide one iframe into different rows and columns in html 5 Pin
Member 1028492117-Aug-14 21:10
Member 1028492117-Aug-14 21:10 
AnswerRe: is it possible to divide one iframe into different rows and columns in html 5 Pin
Richard MacCutchan17-Aug-14 21:35
mveRichard MacCutchan17-Aug-14 21:35 
GeneralRe: is it possible to divide one iframe into different rows and columns in html 5 Pin
Member 1028492117-Aug-14 22:44
Member 1028492117-Aug-14 22:44 
GeneralRe: is it possible to divide one iframe into different rows and columns in html 5 Pin
Richard MacCutchan18-Aug-14 3:02
mveRichard MacCutchan18-Aug-14 3:02 
QuestionPackage structure best practices? Pin
Neo101018-Aug-14 3:11
Neo101018-Aug-14 3:11 
AnswerRe: Package structure best practices? Pin
jschell10-Aug-14 7:31
jschell10-Aug-14 7:31 
AnswerRe: Package structure best practices? Pin
TorstenH.13-Aug-14 20:14
TorstenH.13-Aug-14 20:14 
QuestionAnt customized folder Pin
Member 105135978-Aug-14 2:55
Member 105135978-Aug-14 2:55 
Hello!

I'm not sure i'm in the right topic for this question. Feel free to redirect me to the appropriate one, if necessary.

I have an ANT related problem. I want to read some values from a file (new.txt), substring the parts i need from each line and then, concatenate all these values with "_" between them. This big concatenated string will be the name of a folder i'll create. Here is the code i wrote:

XML
<target name="create">

   <loadfile srcfile="new.txt" property="fisier" />
   <scriptdef name="substring" language="javascript">
     <attribute name="text" />
     <attribute name="start" />
     <attribute name="end" />
     <attribute name="property" />
     <![CDATA[
       var text = attributes.get("text");
       var end = text.length();
       var start = attributes.get("start")||text.lastIndexOf("=")+2;
       project.setProperty(attributes.get("property"), text.substring(start, end));
     ]]>
  </scriptdef>


      <var name="concat.var" value="" />

       <for param="line" list="${fisier}" delimiter="${line.separator}">
         <sequential>
            <substring text="@{line}" property="subtext" />
            <echo>${subtext}</echo>
            <var name="concat.var" value="${concat.var}_${subtext}"/>
         </sequential>
       </for>
       <property name="concat" value="${concat.var}"/>

       <echo>${concat}</echo>


   </target>


Now, the issue. I coded the javascript part to help me with the substring, but i can only use it once. When i build the name of the folder, the loop puts an "_" in front of it, and i want to get rid of that.

I want something like: 1344_dvfgf_sfgg_wfggh
but i have: _1344_dvfgf_sfgg_wfggh

I can't seem to reuse the javascript code i wrote before to solve that problem too. What am i doing wrong?
AnswerRe: Ant customized folder Pin
jschell10-Aug-14 7:36
jschell10-Aug-14 7:36 
QuestionJAVA Pin
Shyam Chowdary29-Jul-14 21:35
Shyam Chowdary29-Jul-14 21:35 
AnswerRe: JAVA Pin
Richard MacCutchan29-Jul-14 22:21
mveRichard MacCutchan29-Jul-14 22:21 
AnswerRe: JAVA Pin
TorstenH.1-Aug-14 2:20
TorstenH.1-Aug-14 2:20 
Questionjar File for the HP Quick Test Professional 11.0 Pin
Jijesh Ganapathy26-Jul-14 7:27
Jijesh Ganapathy26-Jul-14 7:27 
QuestionRe: jar File for the HP Quick Test Professional 11.0 Pin
Richard MacCutchan29-Jul-14 6:38
mveRichard MacCutchan29-Jul-14 6:38 
QuestionUse an Interface when there are no Implement Classes Pin
Jijesh Ganapathy26-Jul-14 7:16
Jijesh Ganapathy26-Jul-14 7:16 
AnswerRe: Use an Interface when there are no Implement Classes Pin
Richard MacCutchan29-Jul-14 6:37
mveRichard MacCutchan29-Jul-14 6:37 
QuestionNeed a detail describtion of the channel Pin
zcldzh25-Jul-14 21:42
zcldzh25-Jul-14 21:42 
QuestionRe: Need a detail describtion of the channel Pin
Richard MacCutchan29-Jul-14 6:34
mveRichard MacCutchan29-Jul-14 6:34 
AnswerRe: Need a detail describtion of the channel Pin
zcldzh2-Aug-14 4:28
zcldzh2-Aug-14 4:28 
GeneralRe: Need a detail describtion of the channel Pin
Richard MacCutchan2-Aug-14 5:23
mveRichard MacCutchan2-Aug-14 5:23 
QuestionJava project packaging Pin
sebuliba_f22-Jul-14 4:47
sebuliba_f22-Jul-14 4:47 
AnswerRe: Java project packaging Pin
Richard MacCutchan22-Jul-14 5:08
mveRichard MacCutchan22-Jul-14 5:08 
AnswerRe: Java project packaging Pin
TorstenH.24-Jul-14 2:12
TorstenH.24-Jul-14 2:12 
AnswerRe: Java project packaging Pin
Tushar Guru8-Sep-14 21:30
Tushar Guru8-Sep-14 21:30 
QuestionLocal Object Reference escaping Pin
Neo1010118-Jul-14 1:33
Neo1010118-Jul-14 1:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.