E_INFO is printing a bunch of logs. I don't know how I can turn that off. I searched E_INFO from all source files in pocket/base sphinx but I was not able to find where it set up the flag.
Configuration option
-logfn /dev/null
Windows
-logfn nul
turns off logging.
If you are using API you can also use
err_set_logfile(char *filename)
If you are using the API, this is what I did:
// turn off pocketsphinx output
err_set_logfp(NULL);
err_set_debug_level(0);
The API given by the accepted answer didn't work for me.
i use the API,and add
err_set_logfp(NULL);
before using
ps_init(config);
and it will work without any "INFO"log
In Python:
config = Decoder.default_config()
config.set_string('-logfn','nul')
Related
I have NLog setup and I'm using maxArchiveDays="30" and archiveNumbering="DateAndSequence". My questions is will that work, per https://github.com/NLog/NLog/wiki/File-target maxArchiveDays is not supported with archiveNumbering="Sequence", since they didn't say "DateAndSequence" will it work?
YES the documentation is correct. MaxArchiveDays will work for archiveNumbering="DateAndSequence" and archiveNumbering="Date".
AND it will also work for archiveNumbering="Sequence" when not having specified a custom archiveFileName="..." path (NLog v5.0 will remove this restriction).
This is a really straight forward question, but does anyone know how to make the command AZCOPY_LOG_LOCATION actually work?
I'm doing:
Set AZCOPY_LOG_LOCATION=C:\backup\azcopylog\
and it doesn't get picked up. I've tried the below as well and nothing:
Set AZCOPY_LOG_LOCATION="C:\backup\azcopylog\"
Update: in .ISE:
Original answer:
Please use $env:AZCOPY_LOG_LOCATION="C:\backup\azcopylog".
I'm using the latest version of azcopy 10.3.4, and the log location is changed by using command above:
I am required to make a custom FireFox profile on a RHEL based system.
most of the configuration are changed inside the FireFox inside the about:config menu.
When I try and lock parameter values using the "mozilla.cfg" file and the "lockPref("", )" function the browser doesn't seem to read those files, I place the file both in: "~/.mozilla/firefox/" and "/usr/lib64/firefox/". I used the http://kb.mozillazine.org/Lock_Prefs guide and some more and still I have no one answer about where those function should be written and how do I check that those functions were loaded.
I would like some clear instructions or a definitive guide that I just couldn't manage to find.
Thanks!
This came up fairly high in a Google search when I was asking the same question, but did not have an answer at the time.
I found the following reference:
https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment
On RHEL7, the files needed to be added to the following locations:
/usr/lib64/firefox/defaults/preferences/autoconfig.js (root:root, 644)
/usr/lib64/firefox/mozilla.cfg (root:root, 644)
I am currently creating a music player in python 3.3 and I have a way of opening the mp3/wav files, namely through using through 'os.startfile()', but, this way of running the files means that if I run more than one, the second cancels the first, and the third cancels the second, and so on and so forth, so I only end up running the last file. So, basically, I would like a way of reading the mp3 file length so that I can use 'time.sleep(SongLength)' between the start of each file.
Thanks in advance.
EDIT:
I forgot to mention, but I would prefer to do this using only pre-installed libraries, as i am hoping to publish this online as a part of a (much) larger program
i've managed to do this Using an external module, as after ages of trying to do it without any, i gave up and used tinytag, as it is easy to install and use.
Nothing you can do without external libraries, as far as I know. Try using pymad.
Use it like this:
import mad
SongFile = mad.MadFile("something.mp3")
SongLength = SongFile.total_time()
I'm trying to write some code against libnotify, but the documentation for perl with libnotify is seriously lacking. So is there something that, as of 2011-08-26, is "better" than libnotify? All I need is to send a notification to the currently logged in user on a Linux machine (Ubuntu specifically).
Gtk2::Notify does seem to lack good documentation, but you can browse through some examples at http://cpansearch.perl.org/src/FLORA/Gtk2-Notify-0.05/examples/ including the basic one:
#!/usr/bin/perl
use strict;
use warnings;
use Gtk2::Notify -init, 'Basic';
my $n = Gtk2::Notify->new('Summary', 'This is some sample content');
$n->show;
In fact this seems pretty cool, I may use it for something soon! Thanks for bringing it to my attention.
Otherwise:
On Linux you can use zenity to send a popup message, and to send it to another user's screen you have to play with some environment variables but it can be done. From Perl I would set the appropriate %ENV values and then just execute system or backtick (``) calls to zenity.
Perhaps start here http://www.cyberciti.biz/tips/spice-up-your-unix-linux-shell-scripts.html
Also from within that link, perhaps libnotify-bin/notify-send would also work, depending on the message you are sending.
perl -E '$ENV{DISPLAY} = ":0.0";`notify-send "Hello World"`;'
From what I searched, when porting an application from Windows to Linux, there's no :(
I'll glad to here if there's.
Update: Indeed I was talking about libinotify and not about libnotify.
As far as I can tell freedesktop specification contains a notification service which can be accessed via dbus.
Here is a link to a perl module for that feature.