How to display all log in intelliJ console - intellij-idea

Does somebody know how to display all lines in IntelliJ build/test.
Like in my example below, I want to see the content of 6 more lines:
at org.apache.solr.core.MMapDirectoryFactory.init(MMapDirectoryFactory.java:51)
at org.apache.solr.core.SolrCore.initDirectoryFactory(SolrCore.java:528)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:724)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:688)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:838)
... 6 more

Related

Batch rename files: delete the characters after the dash and number them starting from 1

I'm on macOS and I am looking for a way to rename multiple photo files and their variations like the following:
Originals - "productcode"_"photonumber"
3102_1529.jpg
3102_1534.jpg
3102_1766.jpg
3103_1844.jpg
3103_1845.jpg
3103_1854.jpg
3103_1856.jpg
Renamed - "productcode"_"count"
3102_1.jpg
3102_2.jpg
3102_3.jpg
3103_1.jpg
3103_2.jpg
3103_3.jpg
3103_4.jpg
As you can see above, some files have 3 variations while some have 4 or 5, and I want to number the variations(after the dash) starting the count from 1.
Can you help me, please?

Why Rmarkdown shows different random numbers in pdf output than the ones in the Rmd file?

I set.seed in Rmd file to generate random numbers, but when I knit the document I get different random numbers. Here is a screen shot for the Rmd and pdf documents side by side.
In R 3.6.0 the internal algorithm used by sample() has changed. The default for a new session is
> set.seed(2345)
> sample(1:10, 5)
[1] 3 7 10 2 4
which is what you get in the PDF file. One can manually change to the old "Rounding" method, though:
> set.seed(2345, sample.kind="Rounding")
Warning message:
In set.seed(2345, sample.kind = "Rounding") :
non-uniform 'Rounding' sampler used
> sample(1:10, 5)
[1] 2 10 6 1 3
You have at some point made this change in your R session, as can be seen from the output of sessionInfo(). You can either change this back with RNGkind(sample.kind="Rejection") or by starting a new R session.
BTW, in general please include code samples as text, not as images.

Colored output in Runnig console in IDEA (PyCharm)

I try log colored messages to PyCharm running console.
Yes, I have read that running console and embedded terminal is different thing, but:
For my code emited log message printed white, but it look colored if I just print() message. So looks like running console support colors, but I don't understand how enable it.
class DefaultHandler(logging.Handler):
def emit(self, record):
log_entry = self.format(record)
m = re.match('^(\[.*?\])', log_entry)
if m:
time = click.style(m.groups()[0], fg='magenta')
msg = click.style(log_entry[m.end():], **get_log_format(record))
click.echo(time + msg) # <- log emit
print(time, msg) # <- just print
else:
click.secho(log_entry, **get_log_format(record))
As you can see log message is white, but printed message is colored.
I'm not positive what your question is, but PyCharm has support for different colors on the console.
Console: Background, Error, output, Standard output, System output, User input
Log Console: Error, Expired entry, Warning
ANSI Colors
You have the ability to look at the defaults and modify them through Settings | Editor | Color Scheme | Console Colors. Is this what you're looking for?

AMPL:How to print variable output using NEOS Server, when you can't include data and model command in the command file?

I'm doing some optimization using a model whose number of constraints and variables exceeds the cap for the student version of, say, AMPL, so I've found a webpage [http://www.neos-server.org/neos/solvers/milp:Gurobi/AMPL.html] which can solve my type of model.
I've found however that when using a solver where you can provide a commandfile (which I assume is the same as a .run file) the documentation of NEOS server tells that you should see the documentation of the input file. I'm using AMPL input which according to [http://www.neos-guide.org/content/FAQ#ampl_variables] should be able to print the decision variables using a command file with the appearance:
solve;
display _varname, _var;
The problem is that NEOS claim that you cannot add the:
data datafile;
model modelfile;
commands into the .run file, resulting in that the compiler cannot find the variables.
Does anyone know of a way to work around this?
Thanks in advance!
EDIT: If anyone else has this problem (which I believe many people have based on my Internet search). Try to remove any eventual reset; command from the .run file!
You don't need to specify model or data commands in the script file submitted to NEOS. It loads the model and data files automatically, solves the problem, and then executes the script (command file) you provide. For example submitting diet1.mod model diet1.dat data and this trivial command file
display _varname, _var;
produces the output which includes
: _varname _var :=
1 "Buy['Quarter Pounder w/ Cheese']" 0
2 "Buy['McLean Deluxe w/ Cheese']" 0
3 "Buy['Big Mac']" 0
4 "Buy['Filet-O-Fish']" 0
5 "Buy['McGrilled Chicken']" 0
6 "Buy['Fries, small']" 0
7 "Buy['Sausage McMuffin']" 0
8 "Buy['1% Lowfat Milk']" 0
9 "Buy['Orange Juice']" 0
;
As you can see this is the output from the display command.

Selenium IDE - storeval- how to copy and paste

3 security questions appearing on the screen like in random order like 1,3,2 or 2.1 and then 3:
Pets name? 2. City you were born? 3. School you attend?
Lets say that answer is a last word of each question. How to code it in Selenium ide. I guess to use GoToif, GotoLabel and StoreEval? Also, the answer should be stripped to one last word without space and "?"
You can store text or value in Selenium IDE.
The Command : storeText | storeValue (or storeAttribute if you want to stora an attribute of the element)
The Target must be a css or an xpath expression which can localize the appropriate element
The Value is the name of the new local variable in your Selenium IDE script
After using store command you can use your new variable like this: ${yourNewVariable}
For example:
storeAttribute xpath=//div[#id='name-day']#name nameday
echo ${nameday}
You can use while loop and goto function in selenium ide with this addon : https://addons.mozilla.org/en-us/firefox/addon/flow-control/
Some commands:
gotoif
while
gotolabel
Example:
store 1 answers
while storedVars.answers <= 3
echo ${answers}
...
store javascript{storedVars.answers++;}
endWhile