When will nodejs support es6 style module(import/export)? - module

I did a quick search, but failed to find the answer. Does anyone knows?

You can use the following terminal command in unix-based OSs:
node <file-name.extension> --v8-options | grep harmony
,or you can do the same on Windows platform like the following:
node <file-name.extension> --v8-options | findstr harmony

Related

qdbus is Segmentation faulting

I'm using KTimeTracker to monitor my time on different projects. I have a PHP script that periodically runs to give me an idea on how long I've worked in the day.
The PHP script used to connect to KtimeTracker using qdbus to save to file and then use qdbus to
export the CSV file.
For those that wonder why I'm bothering with this setup, I work from home and need to monitor my time to ensure I'm working the right number of hours.
The script worked perfectly well for quite a while but has recently started failing when using qdbus. The simplest call to qdbus is :
qdbus org.kde.ktimetracker /KTimeTracker saveAll
The result of this is
Segmentation fault (core dumped)
qdbus org.kde.ktimetracker /KTimeTracker
Segmentation fault (core dumped)
qdbus org.kde.ktimetracker
/KTimeTracker
/MainApplication
/ktimetracker
/ktimetracker/MainWindow_1
/ktimetracker/MainWindow_1/actions
/ktimetracker/MainWindow_1/actions/file_open
/ktimetracker/MainWindow_1/actions/file_save
/ktimetracker/MainWindow_1/actions/options_configure
/ktimetracker/MainWindow_1/actions/start_new_session
/ktimetracker/MainWindow_1/actions/edit_history
/ktimetracker/MainWindow_1/actions/reset_all_times
/ktimetracker/MainWindow_1/actions/start
/ktimetracker/MainWindow_1/actions/stop
/ktimetracker/MainWindow_1/actions/focusSearchBar
/ktimetracker/MainWindow_1/actions/stopAll
/ktimetracker/MainWindow_1/actions/focustracking
/ktimetracker/MainWindow_1/actions/new_task
/ktimetracker/MainWindow_1/actions/new_sub_task
/ktimetracker/MainWindow_1/actions/delete_task
/ktimetracker/MainWindow_1/actions/edit_task
/ktimetracker/MainWindow_1/actions/edit_task_time
/ktimetracker/MainWindow_1/actions/mark_as_complete
/ktimetracker/MainWindow_1/actions/mark_as_incomplete
/ktimetracker/MainWindow_1/actions/export_dialog
/ktimetracker/MainWindow_1/actions/import_planner
/ktimetracker/MainWindow_1/actions/searchbar
/ktimetracker/MainWindow_1/actions/file_quit
/ktimetracker/MainWindow_1/actions/options_configure_keybinding
/ktimetracker/MainWindow_1/actions/options_show_statusbar
/ktimetracker/MainWindow_1/actions/options_configure_toolbars
/org
/org/kde
/org/kde/ktimetracker
I'm sure that I'm missing something simple but just can't see it. I've spent a few hours already Googling but have come up with nothing.
I don't know if these are of any value
sudo zypper search --provides qdbus
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
---+------------------------+--------------------------------------------------+--------
i+ | libqt5-qdbus | Command line client for communication over D-Bus | package
| libqt5-qdbus-debuginfo | Debug information for package libqt5-qdbus | package
i+ | libqt5-qttools | Qt 5 QtTools Module | package
cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20201114"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
...
develop#bambam:~> bash --version
GNU bash, version 5.0.18(1)-release (x86_64-suse-linux-gnu)
...
Any help will be appreciated.
Cheers
replace qdbus command with qdbus-qt5

Send "| grep pattern" in Paramiko in a non-unix enviroment

Im trying to send a command to a non-unix enviroment like this show configuration | grep interfaces with Paramiko (Python3.5), but I get a show configuration output. It seems paramiko does not send the | grep interfaces. Somebody knows how to solve this?
thanks
I have replaced Paramiko with Netmiko and the issue is solved.

distro 'rhel7.2' does not exist in our dictionary

While installing a kvm via virt-install I have used following attribute os_variant=rhel7.2. While installing I am getting following error :
distro 'rhel7.2' does not exist in our dictionary
When I do uname -r I am getting output as
3.10.0-327.el7.x86_64
It is a RHEL KVM host.
Running osinfo-query os|grep 'Red Hat Enterprise Linux 7.2' returns following:
rhel7.1 | Red Hat Enterprise Linux 7.2 | 7.2 | http://redhat.com/rhel/7.2
What can be solution to this problem?
You could create a custom config file to define a RHEL-7.2 distro, but it is honestly not that important from virt-install's POV. The distro is used to lookup the optimized drivers to use for disk & network primarily. Just using the 'rhel7.1' distro type when installing 'rhel-7.2' will work just fine from this POV.
virt-install get's it's os information out of osinfo-db
If your os does not ship a recent version of osinfo-db you can manually download it from https://releases.pagure.org/libosinfo/ and import it.
e.g.
wget https://releases.pagure.org/libosinfo/osinfo-db-20200325.tar.xz
osinfo-db-import -v osinfo-db-20200325.tar.xz
-v will display all imported os'es, I believe your choice has to match one of the xml files in this list.

gstreamer: no element "vp8enc"

I am trying to follow this simple example to stream WebM VP8 video over RTP.
I am runinng Arch linux 64 bits, and I have compiled and installed the gstreamer version they talk about (i.e. the git version) and I followed these instructions.
From what I understand, building from the git repo bilds gstreamer-1.0 so this is what I have.
I have GST_PLUGIN_PATH and GST_PLUGIN_SYSTEM_PATH point to /home/nschoe/usr/lib/gstreamer-1.0 (I have installed this gstreamer-1.0 completely in my home directory).
When I tried the command gst-launch-1.0 -v videotestsrc ! vp8enc ! rtpvp8pay ! udpsink host=127.0.0.1 port=9001 I get the error :
GST_PIPELINE ./grammar.y:687:priv_gst_parse_yyparse: no element "vp8enc"
After some researches, I found that vp8enc should be in gst-plugins-good, which I have installed.
But when I run gst-inspect-1.0 -a | grep -i gst-plugins-good | grep -i vp8 I got :
rtpvp8depay: Source module gst-plugins-good
rtpvp8pay: Source module gst-plugins-good
So I don't understand why I don't have vp8enc and vp8dec. Besides, when I run locate vpx.so I have the following results (truncated to relevant results) :
/home/nschoe/usr/lib/gstreamer-1.0/libgstvpx.so
/usr/lib/libvpx.so
The former most lijkely comes from the gst-plugins-good that I have cloned from git and installed in my home directory, the latter I have installed from the Arch linux pacman, because I thought it would solve my problem.
Can you tell me why I can't use that vp8enc plugin ?
Thank you in advance for your time.
gstreamer 1.0 can also handle webm correctly, it was likely some issue with your setup. It is actually advised to stop using 0.10 as it is obsolete and unmaintained by the community.
Did gst-inspect-1.0 /path/to/your/gst/libgstvpx.so
actually list the elements for vpx?
Well, I still don't know what happened, but actually it turned out vp8 seems to be handled by gstreamer-0.10 : I removed everything and installed gstreamer-0.10 from archlinux's package manager as well as good, bad and base plugins and I could play .webm file.
Somebody might want to know that gstreamer-0.10 can handle webm correctly.

xwd/java.awt.Robot captures black windows (everything except unity2d shell is black)

Today, I ran into weird issue: java.awt.Robot captures black areas, instead of image content. I'm using Ubuntu 12.04 and OpenJDK6/7.
java.awt.Robot on Unix is supported by the sun.awt.X11.XRobotPeer,
which, following the corresponding OpenJDK sources, uses image grabbing functions similar to those, used by xwd utililty (lines 92-162).
So, I ran the following command:
xwd -root -out test.screen.root.xwd
and then opened this file with gimp. Here's what I get:
Then I tried:
xwd -root | xwdtopnm | pnmtopng > Screenshot.root.png
And I got the following result:
Console output:
xwdtopnm: writing PPM file
libpng warning: Invalid sBIT depth specified
And the image itself:
What can cause this? How can I fix it?
Seems like the only way to fix this is to use your own native implementation of screen shotting.
Here's the detailed description of the problem at the launchpad from unity devs: launchpad conversation.
The problem is in the way unity-2d draws itself and in the use of XShaping.
I had the same error message. Apparently, it is linked to xwdtopnm not handling well the color depth of your screen - causing the resulting png file to be corrupted.
An alternative solution is to use the import command from the imagemagick package to take the screenshot.
So you can just replace:
xwd -root | xwdtopnm | pnmtopng > Screenshot.root.png
with:
import -window root Screenshot.root.png
NB: if it is not installed, you can get imagemagick on Ubuntu with the following command:
sudo apt install imagemagick