I always turn to stack overflow in order to clarify programming issues. I found a question which deals with creating PDF files in x code that I am trying to implement. The post can be found here Create PDF iOS7 My problem begins at the very las instruction for the completed answer (The one with the green check) that reads "Now import the PDf.h in the class and use something like this to create and draw your pdf:" I do not understand what the instructions mean when they say "Import the PDF.h class" Where would I import this?
I am providing the link to that questions so it is easier for anyone to find it.
thanks in advance!!
Link to question: Create PDF iOS7
Create the two files that were written in the answer you linked (PDFHelper.h and PDFHelper.m). Then in the class that needs to create a PDF add: #import "PDFHelper.h"
After doing this, you can access the PDFHelper class and its functions.
Related
This question already has answers here:
Adding a cross-reference to a subheading or anchor in another page
(6 answers)
Closed 3 months ago.
Hi whoever will read this!
I am writing a documentation webpage with Sphinx, and though I have been able to create nice cross-referencing in the same page following what is found on this guide, I now want to add in page A the reference to a subsection in page B.
I know that I can do so with an explicit external link, like:
`Link name <https://my.documentation.domain/path/to/page-B#subsection>`_
but can I do so with a cross-reference as well? It would be neater in my opinion. I tried :
:doc:`page_B:subsection`
and
:doc:`page_B#subsection`
but it is not recognized. Sorry if this is a dummy question but I did not find the answer on the internet. Thank you :)
Thank you #bad_coder and #Steve Piercy! So this question's answer is what I was looking for, but was not formulated in a way I could find it. For anyone who would end up here, what worked for me is :
Define a target in page-B, by adding before the section title:
.. _target name:
Refer to this target in page-A, simply with:
:ref:`two phase simulations`
Note that you do not need to add page-A name, the reference will be automatically found.
It also works to use a relative html link, but this is far less robust (it would break if section names are changing, for instance):
`Link name <page_B.html#subsection>`_
I am trying to create a new GUI element within DrRacket's text window, like picts or syntax objects. As far as I can tell, the most standard way of doing this is with a snip%.1
Unfortunately, the documentation for creating new snips, while comprehensive, is a bit impenetrable and leaves some questions to be answered.
For starters, what is the difference between a snip% and a snip-class%? Why do these need to be separated out into two classes, rather than simply being combined into one class? Is it because multiple snips will use one snip class?
Second off, what is snip-reader<%>? Not only why does it need to be a separate class, but why is the module providing it supposed to be installed?2 If it does need to be a new class, why can't it just be referred to directly. Why go through this whole process of constructing and then parsing a string of the form: "(lib ...)\n(lib ...)"?
I mean, there might now be any reason for this design, and it might just be a remnant of an old API. If so, has anyone thought of making a new more consistent API? Or if there is a reason for this design, can you please tell me what it is, as the docs don't seem to make that clear.
I mean, as of right now, I can copy/paste the sample given in the docs on creating a new snip. But I'm having a hard time understanding the design going on here, so I can use them properly.
1I know there are other ways to do it, but I also want to have interactive buttons and whatnot.
2I know it doesn't need to be installed as a library per se, but the documentation seems to strongly push you in that direction.
Okay, I think I finally found the answer. Broadly speaking:
The snip% class includes the methods for drawing the snip, telling the editor how much space to reserve for the picture, and handling events such as mouse clicks.
Next, the snip-class% class is used for encoding and decoding snips. This must be a separate class because when saved to a file, the editor needs to encode what type of snip it is, and for obvious reasons it can't just put the literal snip% class in there. The value it stores in the file is the snip-class%'s 'class name'. This can be anything, and as long as the editor has the classname associated to a snip-class%, it can be loaded. Additionally, if it is of the form "(lib ...)" or "(lib ...) (lib ...)" Racket will just automatically load it into the list for you.
Nothing 'needs' to be installed per se, its just the easiest way to go about it. Otherwise you manually need to tell the editor how to handle the snip before actually loading the file.
I have done GUI construction but not in Python. From other stack exchange questions and my own investigation. It looks like I want to use enaml and traits for the bulk of this work. Are there any links or references to help me get started.
This is a scientific application integrating matplotlib plots and text boxes and buttons (Very simple I think). I have gone through this example but don't understand it too well http://code.enthought.com/projects/traits/docs/html/tutorials/traits_ui_scientific_app.html
I have also gone through the Enthough Chaco examples and don't get very far. Has somebody built a program that I could run and look at their code? Or is their a repository of examples I am not aware of? I found the enaml examples but the example with matplotlib is basic and does not show me how to connect my algorithms to the plots. Thanks in advance!
Not a full answer, but for additional context:
1) Use https://github.com/nucleic/enaml, along with https://github.com/enthought/traits-enaml
2) Example:
https://github.com/nucleic/enaml/blob/master/examples/widgets/mpl_canvas.enaml
I'm a very beginner of TeeChart.
When I add a member variable called m_chart for the chart,it looks okay.
Then I add "m_chart.Series(0).FillSampleValues(50);" in CMy312Dlg::OnInitDialog()......
and overflow ocurred.
What's wrong?
So sad to find that I don't describe my question well.(Well I'm a freshman on StackOverflow,and cannot add image for my poor reputation.)
But if you need more details,I will try to describe for you.:)
Before adding data to a series you must create this series and add it to the chart to access it the way you do. You'll find examples at the Visual C++ sections in the tutorials and examples folders. If the problem persists please send us an example project we can run "as-is" to reproduce the problem here.
I posted this one a couple of months ago on the Mathematica newsgroup, but got no usable response. I thought I'd give SO a try.
The question was: I don't seem to be able to find the method to generate the table of contents of a
Mathematica document I'm working on. Anyone knows this feauture's
hideout?
David Annetts pointed me in the direction of the AuthorTools, an old v5.1
utility package that's still hidden in Mathematica. However, it
doesn't work on my document (v7). Any clue?
Edit
The TOC should contain correct section numbers (if present in the stylesheet) and list page numbers (this requires taking page size settings into account).
Perhaps looking at the code of Yuri Kandrashkin's package, Sidebar, will be useful?