Search Results

Search found 7 results on 1 pages for 'subtenante'.

Page 1/1 | 1 

  • Ant : find the last folder in a folder

    - by subtenante
    I have a folder name stored in the property, say : nightly.basepath. I want to get the folder of the lastly generated build in the nightly.basepath folder, and store the path to this last folder in the nightly.last property. Assume the alphabetical order reflects chronological order. What is the easiest way to do that in Ant ?

    Read the article

  • Batch : list all the subfiles with their absolute path

    - by subtenante
    I want to generate a classpath automatically with al the *.jar files contained under my lib folder. I can't find a way to list all these files with their absolute path, so that I can build my classpath variable. It seems the dir command do not allow to get the absolute path, even when you go recursively with a /s. Basically what I had in mind was something like : set classpath = ./conf for %%i in (`dir /s /withaboslutepath *.jar`) do set classpath = %classpath%;"%%x" Is there a way to achieve this ?

    Read the article

  • XSLT 1.0 : Iterate over characters in a string

    - by subtenante
    I need to iterate over the characters in a string to build an XML structure. Currently, I am doing this : <xsl:template name="verticalize"> <xsl:param name="text">Some text</xsl:param> <xsl:for-each select="tokenize(replace(replace($text,'(.)','$1\\n'),'\\n$',''),'\\n')"> <xsl:element name="para"> <xsl:value-of select="."/> </xsl:element> </xsl:for-each> </xsl:template> This produces something like : <para>S</para> <para>o</para> <para>m</para> <para>e</para> <para> </para> <para>t</para> <para>e</para> <para>x</para> <para>t</para> This works fine with Xpath 2.0. But I need to apply the same treatment in a XPath 1.0 environment, where the replace() method is not available. Do you know a way to achieve this ?

    Read the article

  • Ruby : UTF-8 IO

    - by subtenante
    I use ruby 1.8.7. I try to parse some text files containing greek sentences, encoded in UTF-8. (I can't much paste here sample files, because they are subject to copyright. Really just some greek text encoded in UTF-8.) I want, for each file, to parse the file, extract all the words, and make a list of each new word found in this file. All that saved to one big index file. Here is my code : #!/usr/bin/ruby -KU def prepare_line(l) l.gsub(/^\s*[ST]\d+\s*:\s*|\s+$|\(\d+\)\s*/u, "") end def tokenize(l) l.split /['·.;!:\s]+/u end $dict = {} $cpt = 0 $out = File.new 'out.txt', 'w' def lesson(file) $cpt = $cpt + 1 file.readlines.each do |l| $out.puts l l = prepare_line l tokenize(l).each do |t| unless $dict[t] $dict[t] = $cpt $out.puts " #{t}\n" end end end end Dir.new('etc/').each do |filename| f = File.new("etc/#{filename}") unless File.directory? f lesson f end end Here is part of my output : ?@???†?†?????????? ?...[snip very long hangul/hanzi mishmash]... ????????†? ???N2 : ?e?te?? (2) µ???µa (Note that the puts l part seems to work fine, at the end of the given output line.) Any idea what is wrong with my code ? (General comments about ruby idioms I could use are very welcome, I'm really a beginner.)

    Read the article

  • XPath : finding an attribute node (and only one)

    - by subtenante
    What is the XPath to find only ONE node (whichever) having a certain attribute (actually I'm interested in the attribute, not the node). For example, in my XML, I have several tags having a lang attribute. I know all of them must have the same value. I just want to get any of them. Right now, I do this : //*[1][@lang]/@lang, but it seems not to work properly, for an unknown reason. My tries have led me to things ranging from concatenation of all the @lang values ('en en en en...') to nothing, with sometimes inbetween what I want but not on all XML. EDIT : Actually //@lang[1] can not work, because the function position() is called before the test on a lang attribute presence. So it always takes the very first element found in the XML. It worked best at the time because many many times, the lang attribute was on root element.

    Read the article

  • jQuery : how to determine that a div is scrolled down

    - by subtenante
    I have a div with defined height, and overflow:scroll;. Its content is too long so scrollbars appear. Now for the ichy part. Some of its inner HTML strangely appears all the time (to be precise, the footer of a table generated by the tableFilter plugin). I'd like to make this footer disappear when it is not needed (it actually appears out of the containing <div>'s border). I resolved to make it disappear but setting its z-index to -1000. But I want to make it appear when the containing <div> is totally scrolled down. How can I know the user has scrolled at the bottom ? Using the help from answers below, I used scrollTop attribute but the difference between scrollTop and innerHeight is the size of the scrollbar plus some unidentified delta. A scrollbar is 16 pixels high in most browsers under Windows, but I get a difference of 17 in Firefox and something like 20 in IE, where my <div> content's borders seems to be rendered bigger. A way (actually two ways...) to compute the scrollbar size has been given there.

    Read the article

1