wxMaxima: how to get a new line using printf? - printf

The documentation for printf lists
~% new line
~& fresh line
however, I get the following in wxMaxima:
printf(false, "line one ~% line two");
> line one line two
printf(false, "line one ~& line two");
> line one line two
I've tried a few different experiments, but can't seem to find anything that actually returns something on a new line. Any ideas? Have I missed something obvious?

Related

Slider bar in altair interactive plot with wrong front and initial placement

I have this interactive plot with a slider bar over the 'Time' field. My problems are:
The font is different from the other texts in the plot (both with Chrome and Edge). I looked at the doc but I could not find a way to change it. Is it possible?
I cannot set the init attribute of the slider properly. Following the example doc I try to set init={'Time': 3} (I need it to be at the end), but I get the following error
selector = alt.selection_single(
File "C:\Users\sparisi\Anaconda3\lib\site-packages\altair\vegalite\v5\api.py", line 395, in selection_single
return selection(type="point", **kwargs)
File "C:\Users\sparisi\Anaconda3\lib\site-packages\altair\vegalite\v5\api.py", line 365, in selection
return parameter(select=select, **param_kwds)
File "C:\Users\sparisi\Anaconda3\lib\site-packages\altair\vegalite\v5\api.py", line 319, in parameter
parameter.param = core.SelectionParameter(
File "C:\Users\sparisi\Anaconda3\lib\site-packages\altair\vegalite\v5\schema\core.py", line 14283, in __init__
super(SelectionParameter, self).__init__(name=name, select=select, bind=bind, value=value,
File "C:\Users\sparisi\Anaconda3\lib\site-packages\altair\utils\schemapi.py", line 177, in __init__
self.to_dict(validate=True)
File "C:\Users\sparisi\Anaconda3\lib\site-packages\altair\utils\schemapi.py", line 340, in to_dict
raise SchemaValidationError(self, err)
altair.utils.schemapi.SchemaValidationError: Invalid specification
altair.vegalite.v5.schema.core.SelectionParameter->0, validating 'type'
3 is not of type 'array'
Since you are a bit ahead of the curve (since you are on vegalite V5 already), you can use the upcoming parameter for interactivity in Altair. See here for some examples https://christopherdavisuci.github.io/UCI-Math-10/param.html
Especially the transform-filter section is relevant for you.
Here you see the init is replaced with a value parameter.
Regarding the init error you observe. I cannot reproduce this using the example you refer to (see this colab notebook), so I suspect something else is wrong. If you prepare a minimum reproducible example I can have a look again.
Regarding the font of the sliders. There is no known syntax in altair for doing this, but if it is important for you, you can overrule the css. See this SO answer for an example https://stackoverflow.com/a/62104504/2459096

Invalid key in stanza in Splunk

I'm getting the following error while starting splunk
Invalid key in stanza [lmpool:auto_generated_pool_free] in /opt/splunk/etc/system/local/server.conf, line 25: defaultGroup (value: splunkssl).
I'm guessing someone has added defaultGroup = splunkssl to your server.conf file. That looks like it should actually be in the outputs.conf file. Check the Splunk docs for both those files and confirm, but I think you'll need to either remove that line or move it to outputs

While read loop and command with file output

I have run into an issue making a while loop (yes, I am new at this..).
I have a file $lines_to_find.txt, containing a list of names which I would like to find in another (large) file $file_to_search.fasta.
When the lines in lines_to_find.txt are found in file_to_search.fasta, the lines with search hits I would like to be printed to a new file: output_file.fasta.
So I have a command similar to grep, that takes the sequences (for that is whats in the large file), and prints them to a new file:
obigrep -D SEARCHWORD INPUTFILE.fasta > OUPUTFILE.fasta
Now I would like the searchword to be replaced with the file lines_to_find.txt, and each line should be read and matched to the file_to_search.fasta. Output should preferably be one file, containing the sequence-hits from all lines in file lines_to_find.txt.
I tried this:
while read line
do
obigrep -D '$line' file_to_search.fasta >> outputfile.fasta
done < lines_to_find.txt
But my outputfile just returns empty.
What am I doing wrong?
Am I just building the while read loop wrong?
Are there other ways to do it?
I'm open to all suggestions, and as I am new, please point out obvious begginer-flaws.

Run two Instances of OpenERP 8

I want to run two instances of OpenERP but once the first one is running I don't know why the second one access to the files of the first one, like ir_http.py from the first one. I noticed that it changes the directory, I did some debug on the files used with no luck because somehow the second instance manages to call the first one, trying to access their directory. This is my log:
File "/home/user/lib/python2.7/Werkzeug-0.9.4-py2.7.egg/werkzeug/wsgi.py", line 579, in __call__
return self.app(environ, start_response)
File "/home/user/openerp-8.0-acmlpsc/openerp-8.0/openerp/http.py", line 1234, in dispatch
result = ir_http._dispatch()
File "/home/user/openerp-8.0/openerp/addons_test/trunk-restaurant-addons/base/ir/ir_http.py", line 106, in _dispatch
werkzeug.exceptions.Forbidden))
File "/home/user/openerp-8.0/openerp/addons_test/trunk-restaurant-addons/base/ir/ir_http.py", line 101, in _dispatch
auth_method = self._authenticate(func.routing["auth"])
File "/home/user/openerp-8.0/openerp/addons_test/trunk-restaurant-addons/base/ir/ir_http.py", line 76, in _authenticate
request.session.check_security()
File "/home/user/openerp-8.0-acmlpsc/openerp-8.0/openerp/http.py", line 801, in check_security
security.check(self.db, self.uid, self.password)
I can understand that the security check fails, because is the second instance trying to access the first one but why is the second one trying to access the first one! I don't get it.
It appears that you have two users (openerp-8.0-acmlpsc & openerp-8.0), one for each instance of OpenERP. That is correct!
Make sure that each of those users are the owners of each of their own directories (server, addons, etc)
Also make sure that each of those servers are using different configuration files. A lot of setups will put one /etc/openerp-server.conf and another in /etc/openerp-server-test.conf
They should be using different ports and own their own databases.

Error from gawk about backslash line ending when running configure script

I am getting an error when compiling sqlcipher. I'm unable to run ./configure
Could someone help fix the error?
gawk: /mkopcodeh.awk:101: backslash not last character on line.
If anyone else runs into this: the awk error seems to be caused by different line endings. If you check out the sources on Windows, take care to not have the line endings changed to Windows CR/LF. Instead, stick to LF (Unix/Mac format) only. You can also change the encoding of the offending file with any decent editor later on (I just did with Notepad++ using the menu item Edit->EOL conversion).