I am trying my first project with gradle. My project has a dependency with log4j-1.2.17.jar After my project is built, a jar file is generated. I try to run this with the following: But if I build a fatjar with gradle, the fatjar works without specifying any classpath. The dependency statement in gradle is li…
Tag: linux
check if a memory page is loaded into memory
Given a virtual address, I want to know if the memory page mapped into this virtual address has been loaded into memory or in disck. Is there anyway to do check that in user level program? I am using CentOS 7. Answer You can use the mincore system call for this. mincore – determine whether pages are res…
Kernel update causes keyboard layout change and unable to decrypt luks encryption
I’m using Fedora 23, LUKS encrypted disk and multiple keyboard input sources for all the languages I’m daily using and switching between. When there is kernel update available and I forget to switch to enUS as primary keyboard layout then I can not decrypt LUKS partition since wrong keyboard layou…
Julia Gtk Windows do not display outside REPL
I am trying to use Julia with the Gtk package outside the REPL. Using this code: in the REPL works, but the same code put in a test.jl file and using: in the command line does not work. I have tried the method written here: https://github.com/JuliaLang/Gtk.jl The code runs but no window appears. If it’s…
Reading numbers from file and normalizing
Hello Everyone, I want to load the data I have in a file, which looks like: Now, I want to load this from the file and compute the normalization. I do: But, I am getting the error: Although, I do the process directly into python 2.7 console in linux like, This works fine. I don’t know what I am doing
Using mono assemblies from the .NET CoreCLR
I need to consume a library that doesn’t yet have CoreCLR support (RabbitMQ.Client, to be specific). Is it possible to utilize a mono-based port of that library on a Linux system from inside a CoreCLR executable? If so, how is that achieved? Answer It is impossible at binary level (unless using a proper…
Reading corrupt file, segmentation fault
I run my program by passing it a bunch of directories like this: Each directory is a separate set of files that I am parsing for data which I then create into a spreadsheet. Each directory is a different row of the spreadsheet. I want to only put reliable data in the spreadsheet and so if an entry is missing
Docker container apt-get install can’t find package
I’m trying to spin up a docker container that populates mongo via a node.js script that I have. With the script below, I get the error : with this dockerfile: Why does apt-get not find nodejs? Answer Seems i was missing RUN curl –silent –location https://deb.nodesource.com/setup_0.10 | bash …
Howto read result of command lspci each line as an element of array?
I’d like to have video card information from my target system, no matter what it is. There are two lines returned from my current target system, and I’d like to treat each line as an element of array. Using the code below, I got every word from lspci result rather than whole line which is what I n…
How to recompile an existing linux application
I am looking to edit and recompile the hcitool.c of bluez version 5.31. I installed the bluez 5.31 by following the procedure from the answer of this: Bluetooth Low Energy in C – using Bluez to create a GATT server In my trial, I duplicated the hcitool.c file and named it as myhcitool.c inside the tools…