IntelliJ console output with multiple (source.java:line) links on a line - intellij-idea

When my logging system outputs the source and line number in the proper format (name.java:linenumber), it appears in the output console like a link you can click on, taking you to the corresponding line number of that source code, which works great. Except my logging system prints like a stack trace, a series of source location on a single line, like this:
date/time - a logging statement - (Source1.java:123) (Source2.java:321) (Source5.java:11)
The thing is that IntelliJ only makes the first one a link. The remaining ones don't become clickable links.
Is there a way to configure IntelliJ to scan all source location for each line in the console output, and not just the first one for each line?

This feature is not available at the moment and the progress can be tracked at:
Highlight links with multiple (source.java:line) per line in the output console

Related

Is it possible to run just a single or few lines in GAMS?

I have a code of more than 400 lines, and it takes a long time to run it. I'm at the stage of debugging and was wondering whther its possible to just run only a display command in a particular line? I mean like the option we have in PyCharm that we jsut press shift+enter at the desired line and it'll execute only that line.
Thanks
Short answer: No, you can not run just a single line (unless it is the first one).
Little longer, some way that could still be useful to save some time while debugging:
You could add $exit to run just the lines before that and skip the rest of your model.
If you have "static code" that takes some time at the start before you have other code that is work in progress and you want to save the time for the first part, you can use the "Save and Restart" facility of GAMS (see https://www.gams.com/41/docs/UG_SaveRestart.html). For this, you split the model in parts, lets say, the first part will be saved in longPrep.gms, the second part is wip.gms.
Then, you run gams longPrep.gms s=prep, which will generate a save file prep which will be your starting point for your second part by running gams wip.gms r=prep.

Access Token Curl

On this website:
https://developers.google.com/nest/device-access/authorize
Under Get Access Token
It says "Open a terminal and run the following curl command, replacing oauth2-client-id and oauth2-client-secret with the OAuth2 Client ID and Client Secret from your GCP Credentials, and authorization-code with the code you receive in the previous step:"
I have repeatedly input my oauth2-client-id, oauth2-client-secret and authorization-code. I copy and paste into the Terminal in Raspbian. It always says "Curl(3) URL using bad/illegal format or missing URL". Because I am copying and pasting all my information into the syntax, then copying and pasting the syntax into Terminal, I am at a complete loss for how to proceed.
Is something wrong with the Syntax that this Google document provided?
Google's recommended syntax is shown in the image and on the website I gave a link to.
enter image description here
.... made some progress here.
Rather than utilising the copy-code from Google, directly from the page, I copied and pasted onto "TextMate" and joined the 5 rows command into a single row.
I basically went at the beginning of each row (in TextMate) and backspace'd to the previous row, until the command was a single line one.
I then copied the single line command and pasted it into Terminal.
This is removing the previous error, at least the command is going through, I get most of the responses from the server.
I am still getting an error, which I am trying to figure out: "error" : "unsupported_grant_type".
The command includes "... grant_type=authorization_code..." within the command.

Moving the "cursor" back a line for stdout

I have a little command line tool (written in Objective C, runs under MacOS) that tracks changes to folders and applies rules to files. This tool also informs the user about the progress. It says like:
"Found 3 files of type Z and applied rule"
"Found 6 files of typ x and applied rules"
Currently, the tool outputs the feedback as an endless list but this does not look very handy. What I'm after is a solution to only type the line per file type once and then update the number in the terminal if the tool finds another file of that type. Very similar to how "top" under Unix gives the feedback.
However, to do so, I'll need to move the cursor in the terminal backwards to the beginning of the line and also one or multiple lines backwards.
Is this possible and does anybody know, how to do so?
Thanks
Norbert

Creating image retention test im builder view

I just downloaded psychopy this morning and have spent the day trying to figure out how to work with builder view. I watched the youtube video "Build your first PsychoPy experiment (Stroop task)" by Jon Pierce. In his video he was explaining how to make a conditions file with excel that would be used in his experiment. I wanted to make a very similar test where images would appear and subjects would be required to give a yes or no answer to them (the correct answer is already predefined). In his conditions file he had the columns 'word' 'colour' and 'corrANS'. I was wondering if instead of a 'word' column, I can have an 'image' column. In this column I would like to upload all my images to them in the same way I would words, and have them correlated to a correct answer of either 'yes' or 'no'. We tried doing this and uploaded images to the conditions file, but we haven't had any success in running the test successfully and were hoping somebody could help us.
Thank you in advance.
P.S. we are not familiar with python, or code in general, so we were hoping to get this running using the builder view.
EDIT: Here is the error message we are receiving when running the program
#### Running: C:\Users\mr00004\Desktop\New folder\1_lastrun.py
4.8397 ERROR Couldn't find image file 'C:/Users/mr00004/Desktop/New folder/PPT Retention 1/ Slide102.JPG'; check path?
Traceback (most recent call last):
File "C:\Users\mr00004\Desktop\New folder\1_lastrun.py", line 174, in
image.setImage(images)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.80.03-py2.7.egg\psychopy\visual\image.py", line 271, in setImage
maskParams=self.maskParams, forcePOW2=False)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.80.03-py2.7.egg\psychopy\visual\basevisual.py", line 652, in createTexture
% (tex, os.path.abspath(tex))#ensure we quit
OSError: Couldn't find image file 'C:/Users/mr00004/Desktop/New folder/PPT Retention 1/ Slide102.JPG'; check path? (tried: C:\Users\mr00004\Desktop\New folder\PPT Retention 1\ Slide102.JPG)
Yes, certainly, that is exactly how PsychoPy is designed to work. Simply place the image names in a column in your conditions file. You can then use the name of that column in the Builder Image component's "Image" field. The appropriate image file for a given trial will be selected.
It is difficult to help you further, though, as you haven't specified what went wrong. "we haven't had any success" doesn't give us much to go on.
Common problems:
(1) Make sure you use full filenames, including extensions (.jpg, .png, etc). These aren't always visible in Windows at least I think, but they are needed by Python.
(2) Have the images in the right place. If you just use a bare filename (e.g. image01.jpg), then PsychoPy will expect that the file is in the same directory as your Builder .psyexp file. If you want to tidy the images away, you could put them in a subfolder. If so, you need to specify a relative path along with the filename (e.g. images/image01.jpg).
(3) Avoid full paths (starting at the root level of your disk): they are prone to errors, and stop the experiment being portable to different locations or computers.
(4) Regardless of platform, use forward slashes (/) not backslashes (\) in your paths.
make a new folder in H drive and fill in the column of image in psychopy as e.g. 'H:\psych\cat.jpg' it works for me

Ansys multiphysics: blank output file

I have a model of a heating process on Ansys Multiphysics, V11.
After running the simulation, I have a script to plot a temperature profile:
!---------------- POST PROCESSING -----------------------
/post1 ! tdatabase postprocessor
!---define profile temperature
path,s_temp1,2,,100 ! define a path
ppath,1,,dop/2,0,0 ! create a path point
ppath,2,,dop/2,1.5,0 ! create a path point
PDEF,surf_t1,TEMP, ,noav ! print a path
plpath,surf_t1 ! plot a path
What I now need, is to save the resulting path in a text file. I have already looked online for a solution, and found the following code to do it, which I appended after the lines above:
/OUTPUT,filename,extension
PRPATH,surf_t1
/OUTPUT
Ansys generates the file filename.extension but it is empty. I tried to place the OUTPUT command in a few locations in the script, but without any success.
I suspect I need to define something else, but I have no idea where to look, as Ansys documentation online is terribly chaotic, and all internet pages I've opened before writing this question are not better.
A final note: Ansys V11 is an old version of the software, but I don't want to upgrade it and fit the old model to the new software.
For the output of the simulation (which includes all calculation steps, and sub-steps description and node-by-node results) the output must be declared in the beginning of the code, and not in the postprocessing phase.
Declaring
/OUTPUT,filename,extension
in the preamble of the main script makes such that the output is stored in the right location, with the desired extension. At the end of the scripts, you must then declare
/OUTPUT
to reset the output file location for ANSYS.
The output to the PATH call made in the postprocessing script is however not printed in the file.
It is convenient to use
*CFOPEN,file,ext
*VWRITE,Vector(1,1).Vector(1,2)
(2F12.6)
*CFCLOSE
where Vector(1,1) is a two column array created by *DIM, and stores your data to output to file
As this is a special command, run it from file i.e. macro_output.mac