Use LaTeX Listings to correctly detect and syntax highlight embedded code of a different language in a script

I have scripts that have one-liners or sort scripts from other languages within them. How can I have LaTeX listings detect this and change the syntax formating language within the script? This...

How's the android directory structure?

How the directories are disposed? Where do I copy my musics and pictures in my virtual device to test my apps? update: trying with mTools.... update: mtools fails... cant download it to virtual...

Simple NASM "boot program" not accessing memory correctly?

**Note that when I say boot program, I don't mean a program that boots an OS. I mean, a simple program that runs when you start up the computer and does something. Alright, so I'm not extremely...

JQuery determine if a link has been clicked

I am working on a private messaging system for my website. In turn, when a user clicks a division it redirects them to a message. In addition, when a user hovers over the division I display a link...

Operator overloading for a class containing boost::numeric::ublas::matrix

I have a class template that has a boost matrix as a private member variable. The matrix data type is determined by the class type when constructed. This class has a member function that is...

Importing profile images to members personal portrait in Plone

I'm trying to bulk upload portrait images to member profiles. Using the getPersonalPortrait function of mtool, I find that the object (FSImage) doesn't have the "data" attribute as the portraits...

Mtools not found on Minix 3.2.1

I can't use the mtools command on Minix 3.2.1, i tried installing all the packages whit pkgin-all but didnt work, still saying mtools: not found when trying to use it How can I install it?

Connect to replica set using mgo

I'm using mtools to spin up a replica set with 3 nodes (mlaunch --replicaset) on ports 27017, 27018, and 27019. However I'm having difficulty actually connecting to the replica set using Dial from...

MongoDB Sharded, Replica'd Cluster, Query commands for all configuration / running statuses?

I find that I have gotten confused on all the different commands I can use as an admin to discover what might be wrong with my MongoDB cluster. For example, running the split command, I got an...

mlogfilter & mongoimport fails in running script in crontab

After logrotate i'm using mtools to filter slow queries and insert those in slowqueries collection by script. # rotate log mongo admin -eval "db.runCommand({logRotate:1})" # insert slow queries in...

how get Result from onActivityResult in Fragment?

I have used Navigation drawer in each item click i have called Fragments so in one item i have called one Fragment in this fragment i need to get picture from camera and set it to as canvas...

Error while using mloginfo m-tools

I want to analyze log file of mongodb. I am referred to use m-tools. But I'm getting following error. I've typed in terminal mlonginfo /..logfilelocation../ --queries Error: QUERIES...

Simple inserts and updates to MongoDB run very slowly under load

I'm using Mongo 2.6.9 with a cluster of 2 shards, each shard has 3 replicas, one of which is hidden. It's a 5 machines deployment running on RedHat where 4 machines contain a single replica of 1...

Getting application context in a non-activity class to pass a CSV file

I'm trying to figure out how to read a CSV file stored in the assets folder. What I tried doing is using an InputFileStream as I couldn't get the a FileReader to find the files. So I put the files...

libgit2 alpine linux docker error

Ok, This is above my understanding. I have really no idea what exactly is wrong here but something is. I am on the verge of breaking by banging my head on the wall and yet nothing came up. Can any...

How to install mtools by pip on Mac OS?

I followed this instruction to install mtools: https://github.com/rueckstiess/mtools/blob/develop/INSTALL.md. I tried both by pip and building from source but failed to launch it. I got below...

Python error ValueError: substring not found

I have no experience with python and I am installing a mongodb tools from https://github.com/rueckstiess/mtools. After installation and launch the application I got below exception errors. It...

how to run .bat or .cmd files in bash for windows 10

I am trying to run glcoud.cmd from the bash shell installed on windows 10. Glcoud is recognized on the cmd prompt, but is not recognized on "bash for windows 10". based on this thread I have...

Kill a forked process in a docker container make the container exit on Jenkins docker slave plugin

I am using docker to do build and testing. During testing, my test cases will launch a separate process(mongod process) and after the test cases finish it will kill that process. During the whole...

Can't install python, pip related apps through Ansible

I am using below ansible yml file to install python, pip, etc. roles/python/main.yml: --- - name: python apt: pkg: python - name: python-pip apt: pkg: python-pip - name: mongopy ...

Firebase database with progressbar

I have a problem. I can't attach progressbar to my activity when data loading from Firebase database. I tried to attach progressbar via Asynctask, put firebase listener into AsyncTask...

Populating listbox in excel vba

I´m trying to populate a listbox in excel with values from a range (column). I´m using basically exact code from a tutorial video on the subject but mine isn`t working. Code: Private Sub...

Write struct to file but wrong value when read back with C++

I write some code to read .wav file and do some algorithm then write to a new .wav file.I use a struct to stand for wav header,before writing the struct to the file,the values in it are all...

Linux Kernel DTSI File Cannot Compile from Yocto for BeagleBone

I am using the Texas Instruments official Yocto SDK to build a complete BSP for the Beaglebone X-15 ( TI AM5728 Processor ). The entire SDK builds great for the MACHINE=am57xx-evm type from the...

unrecognized arguments when executing script via crontab

I have my crontab set up as follows (this is inside a docker container). PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin SHELL=/bin/bash 5 * * * * bash...

Create alpine linux iso from docker - libburn permission denied

I have been trying to build an iso-image for alpine-linux inside a docker container following the standard instructions here however i seem to be unable to actually write the .iso back into the...

Yocto: Nothing provides python-re-native

I'm running into an issue including python pyparted as a native dependency in one of my image creation bbclasses. There is a python scrip that runs to create a partitioned image file, normally I...

ImportError after installing djangocms-blog: cannot import name 'python_2_unicode_compatible' from 'django.utils .encoding'

I currently installed django-cms and djangocms-blog. When I run migrate, it throws the following error. Some ressources suggest to install six, which however is already satisfied in my venv. I use...

Relevant tags