f



Messing with listings vs. hyperref

In an application I'd like to create several verbatim like environments.
Say I have two different envrionements. I'd like each to use its own 
counter and each to use its own name.

In addition, they should be auto numbered even if the user does not use 
the caption option.

All of this is doable fairly easy.

But if hyperref is then added, I keep getting those pesky

  pdfTeX warning (ext4): destination with the same identifier

warnings. Presumably because somewhere internally in listings the 
'listings' or 'lstnumber' name have been given directly to some hyperref 
command.

Does anyone have ideas as to how one can fix this small snag?

MWE listed below (use pdflatex to get the pdftex warnings)

\documentclass[a4paper]{article}
\usepackage{listings,caption,etoolbox}

\newcounter{foo}
\renewcommand\thefoo{\thesection.\arabic{foo}}
\newcommand\fooname{Foo}
\newcounter{bar}
\renewcommand\thebar{\thesection.\arabic{bar}}
\newcommand\barname{Bar}

\makeatletter

\newtoggle{capactive}
% this is a direct copy of listings caption key. We just add a toggle
% such we can know when it is being used
\lst@Key{caption}\relax{%
   \lstKV@OptArg[{#1}]{#1}%
     {\def\lst@caption{##2}\def\lst@@caption{##1}}%
     \toggletrue{capactive}%
      \let\lst@title\@empty}

% replica of the original caption key without the toggle. We will use this
% internally to be able to auto number our constuctions when there is
% no direct caption.
\lst@Key{nocaption}\relax{\lstKV@OptArg[{#1}]{#1}%
     {\def\lst@caption{##2}\def\lst@@caption{##1}}%
      \let\lst@title\@empty}

% This next bit is caption configuration. Special thanks for the auto
% caption idea to Ulrike Fischer
\DeclareCaptionTextFormat{gobble}{}

\newcommand\SnRCaptionSetupIfEmpty{
 
\iftoggle{capactive}{}{\captionsetup[lstlisting]{labelsep=none,textformat=gobble}}}


\providecommand\letcountercounter[2]{
    \csletcs{c@#1}{c@#2}
    \csletcs{the#1}{the#2}
}
\makeatother

\lstnewenvironment{Foo}[1][]{
   \letcountercounter{lstlisting}{foo}
   \let\lstlistingname\fooname
   \lstset{nocaption=x}
   \lstset{frame=single,#1}
   \SnRCaptionSetupIfEmpty
}{}

\lstnewenvironment{Bar}[1][]{
   \letcountercounter{lstlisting}{bar}
   \let\lstlistingname\barname
   \lstset{nocaption=x}
   \lstset{frame=single,#1}
   \SnRCaptionSetupIfEmpty
}{}


\usepackage{hyperref}

\begin{document}

\section{Test}
\label{sec:test}

\begin{Foo}
   dsfsdf
\end{Foo}

\begin{Bar}
   sdfsdf
\end{Bar}

\begin{Foo}
   sdsdfsdfsdfsdf
\end{Foo}

\end{document}





-- 

/daleif (remove RTFSIGNATURE from email address)

Memoir and mh bundle maintainer
LaTeX FAQ:      http://www.tex.ac.uk/faq
LaTeX book:     http://www.imf.au.dk/system/latex/bog/  (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html
0
daleif1329 (544)
8/25/2011 1:57:17 PM
comp.text.tex 39027 articles. 3 followers. Post Follow

6 Replies
1187 Views

Similar Articles

[PageSpeed] 12

Lars Madsen <daleif@RTFMSIGNATUREimf.au.dk> wrote:

> But if hyperref is then added, I keep getting those pesky
> 
>   pdfTeX warning (ext4): destination with the same identifier
> 
> warnings. Presumably because somewhere internally in listings the 
> 'listings' or 'lstnumber' name have been given directly to some hyperref 
> command.

hyperref needs unique counter names and supports \theH<counter>
for a unique definition.

> \newcounter{foo}
> \renewcommand\thefoo{\thesection.\arabic{foo}}
> \newcommand\fooname{Foo}
> \newcounter{bar}
> \renewcommand\thebar{\thesection.\arabic{bar}}
> \newcommand\barname{Bar}

> \providecommand\letcountercounter[2]{
>     \csletcs{c@#1}{c@#2}
>     \csletcs{the#1}{the#2}
> }

\newcommand*{\foobarnumber}[1]{%
  \begingroup
    \global\let\gtmp@theHlstnumber\theHlstnumber
    \toks@\expandafter{\theHlstnumber}%
    \xdef\gtmp@theHlstnumber{#1-\the\toks@}%
  \endgroup
  \let\theHlstnumber\gtmp@theHlstnumber
  \def\theHlstlisting{%
    lst.#1-\csname the\@ifundefined{theH#1}{}{H}#1\endcsname
  }%
}

> \makeatother
> 
> \lstnewenvironment{Foo}[1][]{
>    \letcountercounter{lstlisting}{foo}

  \foobarnumber{foo}%

>    \let\lstlistingname\fooname
>    \lstset{nocaption=x}
>    \lstset{frame=single,#1}
>    \SnRCaptionSetupIfEmpty
> }{}
> 
> \lstnewenvironment{Bar}[1][]{
>    \letcountercounter{lstlisting}{bar}

  \foobarnumber{bar}%

>    \let\lstlistingname\barname
>    \lstset{nocaption=x}
>    \lstset{frame=single,#1}
>    \SnRCaptionSetupIfEmpty
> }{}

-- 
Heiko Oberdiek
0
8/26/2011 4:09:37 AM
Heiko Oberdiek wrote, On 2011-08-26 06:09:
> Lars Madsen <daleif@RTFMSIGNATUREimf.au.dk> wrote:
> 
>> But if hyperref is then added, I keep getting those pesky
>>
>>   pdfTeX warning (ext4): destination with the same identifier
>>
>> warnings. Presumably because somewhere internally in listings the 
>> 'listings' or 'lstnumber' name have been given directly to some hyperref 
>> command.
> 
> hyperref needs unique counter names and supports \theH<counter>
> for a unique definition.
> 
>> \newcounter{foo}
>> \renewcommand\thefoo{\thesection.\arabic{foo}}
>> \newcommand\fooname{Foo}
>> \newcounter{bar}
>> \renewcommand\thebar{\thesection.\arabic{bar}}
>> \newcommand\barname{Bar}
> 
>> \providecommand\letcountercounter[2]{
>>     \csletcs{c@#1}{c@#2}
>>     \csletcs{the#1}{the#2}
>> }
> 
> \newcommand*{\foobarnumber}[1]{%
>   \begingroup
>     \global\let\gtmp@theHlstnumber\theHlstnumber
>     \toks@\expandafter{\theHlstnumber}%
>     \xdef\gtmp@theHlstnumber{#1-\the\toks@}%
>   \endgroup
>   \let\theHlstnumber\gtmp@theHlstnumber
>   \def\theHlstlisting{%
>     lst.#1-\csname the\@ifundefined{theH#1}{}{H}#1\endcsname
>   }%
> }
> 
>> \makeatother
>>
>> \lstnewenvironment{Foo}[1][]{
>>    \letcountercounter{lstlisting}{foo}
> 
>   \foobarnumber{foo}%
> 
>>    \let\lstlistingname\fooname
>>    \lstset{nocaption=x}
>>    \lstset{frame=single,#1}
>>    \SnRCaptionSetupIfEmpty
>> }{}
>>
>> \lstnewenvironment{Bar}[1][]{
>>    \letcountercounter{lstlisting}{bar}
> 
>   \foobarnumber{bar}%
> 
>>    \let\lstlistingname\barname
>>    \lstset{nocaption=x}
>>    \lstset{frame=single,#1}
>>    \SnRCaptionSetupIfEmpty
>> }{}
> 

that worked beautifully, thanks.

-- 

/daleif (remove RTFSIGNATURE from email address)

Memoir and mh bundle maintainer
LaTeX FAQ:      http://www.tex.ac.uk/faq
LaTeX book:     http://www.imf.au.dk/system/latex/bog/  (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html
0
daleif1329 (544)
8/26/2011 8:24:10 AM
In my experience, \refstepcounter does give this type of error in pdf mode. I had a similar problem recently with the following.

\newcounter{notecnt}[section]
\newenvironment{note}{%
  \refstepcounter{notecnt}%
  \smallbreak
  \textbf{Note~\thesection.\thenotecnt}\enskip
}{%
  \nobreak\@nobreaktrue
}

I had to get along quickly, and so I tried the following and it has so far worked, but I am not comfortable with it. \@currentlabel and others revert back to their previous states after the environment. Maybe I can find some help here.

\newenvironment{note}{%
  \stepcounter{notecnt}%
  \protected@edef\@currentlabel{\thesection.\thenotecnt}%
  \def\@currentlabelname{note}%
  \def\@currentHref{note.\@currentlabel}%
  \smallbreak
  \textbf{Note~\thesection.\thenotecnt}\enskip
}{%
  \nobreak\@nobreaktrue
}

I don't know why we have global in 

  \global\let\gtmp@theHlstnumber\theHlstnumber
  
and again another global in

  \xdef\gtmp@theHlstnumber{#1-\the\toks@}
0
amusa22 (300)
8/26/2011 6:19:40 PM
Ahmed Musa wrote, On 2011-08-26 20:19:
> In my experience, \refstepcounter does give this type of error in pdf mode. I had a similar problem recently with the following.
> 
> \newcounter{notecnt}[section]
> \newenvironment{note}{%
>   \refstepcounter{notecnt}%
>   \smallbreak
>   \textbf{Note~\thesection.\thenotecnt}\enskip
> }{%
>   \nobreak\@nobreaktrue
> }
> 
> I had to get along quickly, and so I tried the following and it has so far worked, but I am not comfortable with it. \@currentlabel and others revert back to their previous states after the environment. Maybe I can find some help here.
> 
> \newenvironment{note}{%
>   \stepcounter{notecnt}%
>   \protected@edef\@currentlabel{\thesection.\thenotecnt}%
>   \def\@currentlabelname{note}%
>   \def\@currentHref{note.\@currentlabel}%
>   \smallbreak
>   \textbf{Note~\thesection.\thenotecnt}\enskip
> }{%
>   \nobreak\@nobreaktrue
> }
> 
> I don't know why we have global in 
> 
>   \global\let\gtmp@theHlstnumber\theHlstnumber
>   
> and again another global in
> 
>   \xdef\gtmp@theHlstnumber{#1-\the\toks@}

use \phantomsection just before \refstepcounter to give it something to 
anchor to when hyperref is active, that usually works for me

-- 

/daleif (remove RTFSIGNATURE from email address)

Memoir and mh bundle maintainer
LaTeX FAQ:      http://www.tex.ac.uk/faq
LaTeX book:     http://www.imf.au.dk/system/latex/bog/  (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html
0
daleif1329 (544)
8/29/2011 7:49:08 AM
Lars Madsen <daleif@RTFMSIGNATUREimf.au.dk> wrote:

> use \phantomsection just before \refstepcounter to give it something to 
> anchor to when hyperref is active, that usually works for me

Usually \refstepcounter is already creating an anchor.

-- 
Heiko Oberdiek
0
8/29/2011 9:10:35 AM
Heiko Oberdiek wrote, On 2011-08-29 11:10:
> Lars Madsen <daleif@RTFMSIGNATUREimf.au.dk> wrote:
> 
>> use \phantomsection just before \refstepcounter to give it something to 
>> anchor to when hyperref is active, that usually works for me
> 
> Usually \refstepcounter is already creating an anchor.
> 

my bad, it is in relation to internal auto generated labels I always use 
\phantomsection in my own constructions

-- 

/daleif (remove RTFSIGNATURE from email address)

Memoir and mh bundle maintainer
LaTeX FAQ:      http://www.tex.ac.uk/faq
LaTeX book:     http://www.imf.au.dk/system/latex/bog/  (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html
0
daleif1329 (544)
8/29/2011 9:27:06 AM
Reply:

Similar Artilces:

List of lists of lists of lists...
I would like to have a list of lists N times deep, and my solution is (in pseudocode): def deep(x): a=[x] return a mylist=[] for N: mylist=deep(mylist) Is there a more elegant way to do it? The maine idea is: from a list having the numbre of steps along N dimensions, generate a list with an item at each possible point. Example 1: N=2 list=[2,3] result=[[1,2],[1,2],[1,2]] Example 2: N=3 list=[3,1,2] result=[[[1,2,3]],[[1,2,3]]] -- Ángel Gutiérrez Rodríguez - agr@fq.uniovi.es Instituto de Ciencia de los Materiales de Madrid - CSIC SpLine - European Syncrothorn Radiat...

Comparisons of TeX vs Groff vs SGML vs DocBook vs TeXinfo
Well, I've had fun with Tex and LaTeX for a while now, but I'd like to know how well the alternatives work, and weather or not I should use these alternatives that are listed usually with TeX. What are your opinions on them, and surely, some must do a job better than the rest (Something must do pictures and tables better) and I probably will use the best one for the specific jobs that may come up in the future. Basically, I'm just asking for a list of strengths and weaknesses that each of these typesetters or document language things have. Thanks Percival Percival Tiglao wrote:...

Google Keep vs. Evernote vs.text files vs. ???
I haven't used Keep or Evernote or any other similar software. I've always just kept notes in plain text files or in outlines (I like the Emacs "Org mode" plain text outliner for that.) Plain text has the big advantages of not requiring special software (any text editor can edit it), and being easily searchable with grep. However I've been wondering if the special purpose note keeping software would keep me better organized. Does anyone find these programs to be a real advance over plain text note files? How so? Have you evaluated different programs ...

Memory issues when storing as List of Strings vs List of List
Hi all, I have a big file 1.5GB in size, with about 6 million lines of tab-delimited data. I have to perform some filtration on the data and keep the good data. After filtration, I have about 5.5 million data left remaining. As you might already guessed, I have to read them in batches and I did so using .readlines(100000000). After reading each batch, I will split the line (in string format) to a list using .split("\t") and then check several conditions, after which if all conditions are satisfied, I will store the list into a matrix. The code is as follows: ----...

Lists vs Vectors; specifically in a text editor
I'm new to C++, and took on writing a VI-like editor as my "break the seal" project. After 6k lines of code, I have an editor that stumbles along, and handles most things; it's not pretty, and I'll be rewriting it again to incorporate all the stuff I've learned since March. Early on in the design, I made the choice to use lists rather than vectors to hold the working set of lines. That is, in a ten line file, there are ten list elements, each effectively holding a std::string. I based this decision on the run-time characteristics of the VI command &quo...

List to Text back to List
Hi, I am looking for a way to convert a List of floating point numbers to and from text. I am embedding it in an XML document and am looking for a neat way to serialise and de-serialise a list from a text node. I can easily write something to do it manually but I wondered whether List had native support to go to and from text. If not List, are there any other collections/arrays that do this? TIA Simon On Thu, Nov 6, 2008 at 12:04 PM, SimonPalmer <simon.palmer@gmail.com> wrote: > Hi, I am looking for a way to convert a List of floating point numbers > to and from text. I am emb...

list of lists of lists ....
Hi, I have a list of data (type A) my list can includes element of type A or a lists, these list can includes element of type A or a lists, and so on ... is there a simple way to obtain a single list of all the elemets of type A ? thanks yomgui I forgot the most important, I am looking for a non recursive method. thanks yomgui yomgui wrote: > > Hi, > > I have a list of data (type A) > my list can includes element of type A or a lists, > these list can includes element of type A or a lists, and so on ... > > is there a simple way to obtain a single list of all the elemets > of type A ? > > thanks > > yomgui recursion. def get_As(L): res = [] for elem in L: if isinstance(elem, A): res.append(elem) elif isinstance(elem, list): res += get_As(elem) return res i also have a Tree class in my rc: http://home.comcast.net/~faulkner612/programming/python/pythonrc.py yomgui wrote: > Hi, > > I have a list of data (type A) > my list can includes element of type A or a lists, > these list can includes element of type A or a lists, and so on ... > > is there a simple way to obtain a single list of all the elemets > of type A ? > > thanks > > yomgui doh. ok, so, recursion is just functional programming sugar for a loop. def get_As(L): checking = [elem for elem in L if isinstance(elem, list)] # the equivalent of elem in recursion all_As =...

Sort a List, in a List of Lists of Lists
Dear Mathgroup, I have a lsit of Lists of Lists: {{{1,2},{2,1},{1,1}},{{1,1},{1,1},{1,2}},{{2,1},{2,2},{1,2}},{{2,2},{1,2},{2,2}},{{1,1},{2,1},{1,2}},{{1,2},{2,2},{2,2}}} I would like to sort the elements in the lowest level of brackets to give {{{1, 2}, {1, 2}, {1, 1}}, {{1, 1}, {1, 1}, {1, 2}}, {{1, 2}, {2, 2}, {1, 2}}, {{2, 2}, {1, 2}, {2, 2}}, {{1, 1}, {1, 2}, {1, 2}}, {{1, 2}, {2, 2}, {2, 2}}} i.e retaining the same structure with the paired elements in the original order. I can't seem to get the syntax right to do this apart from the obvious {{Sort[{1,...

values vs. list vs. CPS
Hello, to get a little practice in Scheme, I programmed the ``Towers of Hanoi'' avoiding assignments. (Is ``Towers of Hanoi'' the correct English name? I just translated it word by word from German. I mean the task where a tower is build by several layers and has to be shifted layer by layer onto another place respecting some special rules.) If I avoid assignments, I have to recalculate the complete ``scene'' of the game everytime something has been changed (i.e. a layer has been moved). I did program the ``Towers of Hanoi'' three times depending on how a scene is represented: - First[1] I used the procedure ``values'' to express a scene, - then[2] I let represent a scene by a list, and - finally[3] I used Continuation Passing Style. If I look at the resulting programs, especially on the central procedure ``move-tower'', I'm surprised, because I did not expect the result: - I like the list variant better than the values variant. I find the list variant less verbose. Why does the procedure ``values'' exist? Is it just a matter of taste? Are there any reasons despite taste to prefer the values to list? - I like the CPS version even more, although it was a little bit hard to program CPS for the first time. The problem how to pass multiple values does not arise, they just are passed to the continuation as arguments, and it's a very natural thing that a funcion has several arguments. But CPS doesn&#...

How to create a list of lists from a text file
How can one get a list of lists from tree data in a text file? data file: a a1 a2 b b1 b2 b3 c c1 c2 desired list: ((a a1 a2) (b b1 b2) (c c1 c2)) hans <schatzer.johann@gmail.com> writes: > How can one get a list of lists from tree data in a text file? > > data file: > a > a1 > a2 > b > b1 > b2 > b3 > c > c1 > c2 > > desired list: > ((a a1 a2) > (b b1 b2) > (c c1 c2)) This is not a problem statement. Where did b3 go? Shouldn't we skip a2 instead? Does the file always contain ten lines? Are the items on each lines al...

Performance of lists vs. list comprehensions
Yesterday I stumbled across some old code in a project I was working on. It does something like this: mystring = '\n'.join( [ line for line in lines if <some conditions depending on line> ] ) where "lines" is a simple list of strings. I realized that the code had been written before you could put a list comprehension as an argument to join(). I figured that I could drop the '[' and ']' and leave the rest as a list comprehension since that works with current Python (and the project's base is 2.5). So I rewrote the original statement l...

vector vs list vs deque
In case it's relevant to Tcl's implementation/speeding up etc. http://blog.davidecoppola.com/2014/05/20/cpp-benchmarks-vector-vs-list-vs-deque/ --3ace51dd2f4c67a96d58ee32c75c6752 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Well, insertion time is constant for <list>. What's really measured by this benchmark is the time taken to walk through the list to a random position, which is linear. This is a big flaw of this benchmark, imho. It's really measuring two distinct features of containers, namely i) get an iterato...

Database vs Text for text search
At what level a database will be better for a read only text search? I have some records, each has 6 fields. Each record has a pararent record. Each parent has less than 100 childs. Total records is about 1000-1500. I want to put everthing in one single file, or put each parent and their children in a file so I can have 20-30 files. I am afraid to go to the database route, because the limitation of concurent connections and the overhead of database search. Is there a cut-off number of records, below that line, text is better, above it, database is better? "http://links.i6networks...

Tr[list] vs Plus@@list
Can somebody explain me the difference in timing performances between the settings Tr[list] and Plus@@list? Thanks a lot! In[1]:= lst[i_] := Table[Random[], {i}] In[2]:= {Timing[Tr[lst[10^4]]; ], Timing[Tr[lst[10^5]]; ], Timing[Tr[lst[10^6]]; ], Timing[Tr[lst[10^7]]; ]} Out[2]= {{0.*Second, Null}, {0.030999999999999972*Second, Null}, {0.15600000000000003*Second, Null}, {2.0469999999999997*Second, Null}} In[3]:= {Timing[Plus @@ lst[10^4]; ], Timing[Plus @@ lst[10^5]; ], Timing[Plus @@ lst[10^6]; ], Timing[Plus @@ lst[10^7]; ]} Out[3]= {{0.*Second, Null}, {0.0470000000...

Microsoft's OEM Watch List and "Dumbo Plan" (Comes vs. Microsoft
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Plaintiff's Exhibit 4275 Comes vs Microsoft September 1992 Status Report Far East OEM Sales Jeff Lum, Director Highlights FE OEMs suffering export decline as prices in the US drop dramatically. Taiwan is feeling the heat as OEMs struggle to stay in business. Korean OEMs complain that the prices they are seeing in the US are below their cost for similar configurations. Japanese OEMs are not in any better shape, and in their own market... Japanese subsidiaries of US OEMs cutting prices dramatically. Apple announced an average 20% c...

varargin (no name list) vs. if (has name list)
Hi if one uses varargin, like function varlist2(X,Y,varargin) one doesn't know what name the varargin really is. I try: function varlist2(X,Y) fprintf('%d \n',X); if(isequal(X,2)) fprintf('%d \n',Y); end end then >> varlist2(1) 1 >> varlist2(2) 2 ??? Input argument "Y" is undefined. Error in ==> varlist2 at 4 fprintf('%d \n',Y); >> varlist2(2,5) 2 5 It works and also has varargin: Y and also have a good name. Isn't this better? Mike Your question isn't entirely clear. Do you want to print Y when you have two input arguments or only when X has value 2? For the former this might work: function varlist2(X,varargin) narginchk(1,2) switch nargin case 1 fprintf('%d \n',X); case 2 Y = varargin{1}; fprintf('%d \n',X); fprintf('%d \n',Y); end end For the latter you should be carefull not to try to print Y if only one input argument is given, so something like: function varlist2(X,varargin) narginchk(1,2) fprintf('%d \n',X); if X==2 & nargin == 2 Y = varargin{1}; fprintf('%d \n',Y); end end On 8/1/2013 8:59 PM, Mike wrote: > Hi > > if one uses varargin, like > function varlist2(X,Y,varargin) > one doesn't know what name the varargin really is. > .... Yes one does--it's "varargin" and is a cel...

wxga vs wsxga vs wuxga for text?
Considering a new notebook and like the idea of being able to view a couple of documents at once (my desktop unit has 2 monitors, 17"lcd and 19" crt both at 1280x1024, so I am kind of spoiled). I've noticed a few 15.4" wuxga notebooks advertised and am wondering if they are just too small. Or is something like a 17" wsxga more realistic for actually reading documents. I also noticed on google that some people don't like the dell wuxga's for text so I was also wondering who currently has the better displays or which ones to avoid if going the high definition r...

Sorting text-file data into list lists
Dear Group: I have a large file with lots of numeric data, in matrix form. The rows and the columns both have non-numeric text headers. The comma is the delimiter. The character at the end of lines shows up as a "paragraph" mark in MS Word; I'm assuming it's a carriage return. I want to import the data into a nested list, like a matrix is usually represented in Mathematica. But my attempts using ReadList[] have so far failed. In[1]:= !!practice.txt col1 , col2, row1 , 1.00 ,, 2.00, row2 , 3.00 , -4....

Text Search vs MYSQL vs Lucene
What would be performance of pgSQL text search vs MySQL vs Lucene (flat file) for a 2 terabyte db? thanks for any comments. ..V -- Please post on Rich Internet Applications User Interface (RiA/SoA) <http://www.portalvu.com> ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly It be at least dual opteron 64 w 4 gigs of ram runing fedora with a huge raid...

Using a text list to populate a LIST() in IDL
Hi, I am writing a function/routine that makes use of a user provided list of s= trings. Right now, the user needs to edit the LIST(a,b,c,d) parameter. I wa= s wondering if there is a way for me to have the routine reference a .txt f= ile and use the contents to populate the list, rather than have the user ed= it the function. Does anyone know how I would accomplish this? Thanks! I created a test file, "test_string.txt", that contains the following (minus the "%<" lines): -----%<----- this is string one and now string two this little piggy cried wee wee wee... the end -----%<----- Then the procedure: -----%<----- pro read_into_list, user_list user_list = list() openr, fid, "test_string.txt", /get_lun cbuffer = "" while (~ eof(fid)) do begin readf, fid, cbuffer user_list.add, cbuffer endwhile free_lun, fid end -----%<----- Running the above in IDL: IDL> .run read_into_list % Compiled module: READ_INTO_LIST. IDL> read_into_list, x IDL> help, x X LIST <ID=1 NELEMENTS=4> IDL> for i=0, n_elements(x)-1 do help, x[i] <Expression> STRING = 'this is string one' <Expression> STRING = 'and now string two' <Expression> STRING = 'this little piggy cried wee wee wee...' <Expression> STRING = 'the end' When I edit the file and run again I get...

Re: Sort a List, in a List of Lists of Lists
On 11/13/10 at 12:59 AM, leigh.pascoe@inserm.fr wrote: >I have a lsit of Lists of Lists: >{{{1,2},{2,1},{1,1}},{{1,1},{1,1},{1,2}},{{2,1},{2,2},{1,2}},{{2,2}, >{1,2},{2,2}},{{1,1},{2,1},{1,2}},{{1,2},{2, 2},{2,2}}} >I would like to sort the elements in the lowest level of brackets to >give >{{{1, 2}, {1, 2}, {1, 1}}, {{1, 1}, {1, 1}, {1, 2}}, {{1, 2}, {2, >2}, {1, 2}}, {{2, 2}, {1, 2}, {2, 2}}, {{1, 1}, {1, 2}, {1, 2}}, >{{1, 2}, {2, 2}, {2, 2}}} >i.e retaining the same structure with the paired elements in the >original order. I can't seem...

How to search list of particular text values into free text
Hi All, Please if anyone has idea about how to search particular list of text values from one small table to free text variable in large dataset and when finds the value, update the large dataset. I have small lookup table (around 120 records) for example: Category Types; Type_1 Mangos, Type_1 Pineapples, Type_2 Onions, Type_2 Tomatoes, … Type_n typeN. Now I need to search each particular text values (variable-Types) from the above small table into my large dataset which has free text variable called “Order_details”. For example: Order_details: The last order was for the Mangos on Nov 11...

Benefits of P-Lists vs Structs vs Classes?
I'm working on a citation management system for academic publications and I'm wondering about the trade-offs representing citations as plists, structs, or classes. Currently the system uses plists to represent citations. They look something like: '(:author "Mark Twain" :selection "Some Thoughts on the Science of Onanism" :title "Selected Short Works of Mark Twain" :publisher "Right Hand Publishing" :year 2009 :pages (27 31)) These plist citations are raw data, they are written out in whatever format the us...

CLHS: make-list vs. make-fresh-list
Hello, I am just wondering if there is some intention behind make-list which was forgotten to explicitly state in the CLHS. It says "Returns a list of length given by size, each of the elements of which is initial-element." but I'd guess it wanted to say "Returns a /fresh/ list of length given by size, each of the elements of which is initial-element." In other words, it seems to me that the CLHS would allow an implementation such as (defparameter *big-list* ()) ; not big yet, but growing. (defparameter *big-list-size* 0) ; dto. (defun make...

Web resources about - Messing with listings vs. hyperref - comp.text.tex

Listing - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Investors should beware backdoor tech listings
Retail investors are being enticed to put their money into untested tech companies. And that's making people nervous.

Heritage listing push for Sydney's iconic Sirius building
The NSW Environment Minister says he will consider a recommendation from the state's Heritage Council to protect the iconic Sirius building on ...

'Cape Breton if Trumps Wins' draws thousands to real estate listings
The web site 'Cape Breton if Donald Trump Wins' continues to gain momentum, attracting international attention and drawing tens of thousands ...

Australian Grains Champion's secret plot for CBH listing
Country Western Australia isn't the easiest place to secretly plot a potential $3 billion deal to list the nation's biggest grains exporter, ...

How I discovered the strange, new way Seattle startups are finding funding: Back-door listings in Australia ...
... mining boom – as I reported in this week’s cover story– has presented a unique funding opportunity for Seattle startups: A back-door listing. ...

Reseller Listing From Dubai Provides Best Shots of LG G5 Yet
A listing on a reseller site out of Dubai has provided a few unique, close and personal photos of the LG G5 . Until today, we have seen the device ...

NYU says Craigslist sucks at spotting fake rental listings
Researchers at New York University claim that Craigslist has a serious problem identifying fraudulent listings. After digging through two million ...

Airbnb Deleted Listings Before Posting Data In New York City
The listings "did not reflect Airbnb's vision for our community," Airbnb says. Airbnb admitted on Wednesday that it had deleted about 1,500 ...

Inside $92 Million Del Dios Ranch, San Diego's Most Expensive Listing Ever
Inside $92 Million Del Dios Ranch, San Diego's Most Expensive Listing Ever

Resources last updated: 3/10/2016 5:55:10 PM