In confluence how can i add a link inside a block code ? or is there an other way? - hyperlink

I'm adding a tree of project in a block code to look like in a terminal, and i would like to link each node to their own file's details below.
Can i do that?
Any other advice/solution?

ok got it
--> insert more content
-> Markup
then i pasted my tree's project, in the insert pop up, preceded by ```

Related

How to avoid AppBuilder removing pieces of code

I'm working on a Progress-4GL programming environment, based on AppBuilder release 11.6.
Until now I've been changing already existing *.w and *.p files, but now I wanted to created my *.w file from scratch.
I've created a window and I've put a browse, a fill-in field and a button. Now I would like to add an event to that button. In order to do that, I add following lines to the *.w file:
ON CHOOSE OF btn-Start_Query IN FRAME DEFAULT-FRAME
DO:
MESSAGE "button is pushed" VIEW-AS ALERT-BOX.
END.
However, when I save the *.w file, re-open it in the AppBuilder and save the file there again, those lines of code get removed.
I've already understood that, in order to avoid this, I need to "wrap" those lines of code by Scoped-define or Analyze:suspend/resume lines, something like this:
&Scoped-define SELF-NAME btn-Start_Query
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn-Start_Query C-Win
ON CHOOSE OF btn-Start_Query IN FRAME DEFAULT-FRAME
DO:
MESSAGE "button is pushed" VIEW-AS ALERT-BOX.
END.
&ANALYZE-RESUME
However, this seems not to be working.
Can you explain me what exactly I have to do in order avoid my lines of code to be removed?
By the way: I know that I'm working with extremely outdated technology, but I only work here for two weeks, so I don't have the authority to force my boss to change his development environment, just for me.
The recommended approach is to use the Wizards of the AppBuilder to create the trigger block with the required AppBuilder markup for you.
Add the button to the Window
Select the button on the design canvas
Choose the "Edit code" button in the AppBuilder main window (the pencil)
This will create an empty default trigger block (in case of a button, that's the CHOOSE). To create a different event, use the "New..." button in the section editor window.

No permission to use getFileById in google spreadsheets

I have following problem.
I have two files:
Source file - https://docs.google.com/spreadsheets/d/15zIdIeYFlca-SQ0ryl89oX_tbGjO_6cipqHkkxog7ho/edit#gid=0
Target file - https://docs.google.com/spreadsheets/d/1gGExeO2x8pqNzTPRvel8p-wwe-BDkdF5c6BFA8j_Py0/edit#gid=0
In the source file there is a script (function is named onEdit triggered with onEdit event). When you change the value of R3 cell (Source File) to other "Advisor" whole row should be copied to target file, but sometimes it works, sometimes not. If you change the value of advisor field once and it works try couple of times more and for sure there will be a problem with permission in a while.
When it's not working I get msg that there is problem with permission of executing function called getFileById, which is used in following line:
var file = DriveApp.getFileById('1gGExeO2x8pqNzTPRvel8p-wwe-BDkdF5c6BFA8j_Py0');
Any ideas what to do to solve the problem and why sometimes it works fine ?
Scripts using a 'simple' trigger can modify the file they are bound to, but cannot access other files because that would require authorization.
See here to learn more about the restrictions on simple triggers.
You can make sure you have all the permissions following the next steps:
Open the script project. At the left, click Project Settings
Select the Show "appsscript.json" manifest file in editor checkbox.
At the left, click Editor <>.
At the left, click the appsscript.json file.
Locate the top-level field labeled oauthScopes. If it's not present, you can add it.
The oauthScopes field specifies an array of strings. To set the scopes your project
uses, replace the contents of this array with the scopes you want it to use. For
example:
{"oauthScopes": ["https://www.googleapis.com/auth/spreadsheets.readonly", "https://www.googleapis.com/auth/userinfo.email"], }
Retrieved from: https://developers.google.com/apps-script/concepts/scopes

Syntax completion based on snippets for rails project in vim

I wonder if exists some plugin which offers syntax completion based on rails snippets (from snipmate).
Example:
Being on specs, I provide shou, press hotkey and I got list of possible completions (like for Ctrl-p). Selecting anything from list, will insert a snippet.
Does something like this exists?
You can hit <C-r><Tab> in insert mode to pop up a list of available snippets, hit <Enter> to select the right one and hit <Tab> to expand the snippet. But the menu doesn't provide a description.
This is not specific to SnipMate, but you might also find Vim's line completion feature useful here. While in insert mode, Ctl-xCtl-l will offer possible completions for the whole line. So if you already have something like the following in your open buffers:
it { should belong_to(:user) }
it { should validate_presence_of(:title) }
and you start typing
it {Ctl-xCtl-l
... you will get a list of possible full line completions to match.

How to add a (large) code appendix in LaTeX / LyX?

I'd like to add a code appendix to my LyX document. There are a few options I already considered, but they all have their problems.
I know a bit about listings, but one problem with those is that, if I copy & paste my code into them, I lose all enters/newlines. Since the code is too large to correct by hand, I was wondering if there is an alternative.
In LyX there is the possibility of inserting child documents, but that seems to be only for .tex files. Would have been ideal if I could just insert my .java file as a child document.
I could print the code to PDF, but it will include margins that mess up the final document, since the PDF is placed on the left margin of the final document and then there is the margin of the PDF. Also, this PDF always contains the entire code and white areas where not the entire page has been filled.
Does anyone have good alternative?
The listings package found here
http://www.ctan.org/tex-archive/macros/latex/contrib/listings/
allows the include of external source code files (look into the reference for \lstinputlisting).
EDIT: here you find some samples how to use it:
http://en.wikibooks.org/wiki/LaTeX/Packages/Listings
If you need to copy-paste code to LyX listing box then use Edit -> Paste Special -> Seletion or Ctrl+Alt+V.
For what it's worth, at least the 2.0 versions of LyX have the ability to include listings as child documents. Insert, File, Child Document, and choose from the dropdown box "Program Listing". This uses the listings package and lets you keep your source in its own file.
If listings doesn't support your language, you can always use something like highlight or source-highlight to generate a latex snippet of syntax-highlighted code that you can add as a child document of type "Input"
Yes, if you copy&paste code into the LyX listings box, you lose all newlines, but you can preprocess your code (insert an extra newline below each line):
$ cat foo.java | sed -e 's/$/\n/' > bar.java
Then you can copy&paste the new file bar.java and everything will be ok.

Does Texniccenter or any other tex editor auto-complete references in Latex?

I want to use a latex editor that has auto completion feature for existing references in a latex file. Do you know any good ones? I am trying to find this feature in texniccenter, but I guess it doesn't exist or I could't find it yet.
Update:
Ok, I found how to enable auto completion in Texniccenter. I needed first create a project. Then open the file in this project (or copy its text). Now Ctrl-Space inside a \ref{} tag completes the reference automatically.
Texlipse does this, also with Ctrl+Space.
Inlage includes such a function, too. New commands and new environments will also appear in the auto completion list. If you use extern BibTex files the \cite{} command will open a list with your articles and books from you .bib file.
Ok, I found it. I needed first create a project. Then open the file in this project (or copy its text). Now Ctrl-Space inside a \ref{} tag completes the reference automatically.
Kile has reference completion. If you type Ctrl+Space inside of a \ref{}, you get a list of all the references (that existed last time you compiled, of course).
LEd presents a click list of them when in a \ref{}
The RefTeX mode for Emacs will do what you're asking for: the shortcut C-c ) activates the "insert a \ref" mode (of course, you can customize which type of reference: fancyref, hyperref, etc) and pressing TAB will allow you to start typing and autocomplete by tabbing again after typing some characters.
It also figures out (or asks if it can't) what sort of ref you're inserting and shows a list of all the defined \labels in your document, selectable with the arrow keys or C-n / C-p.
Now we just need a Vi user to come along and tell us how to do it there...
Now texmaker does, not need any special key.

Resources