Hello there i am working a project which need the gotoxy() function i have read gotoxy() implementation for Linux using printf i wonder why the need to change the x y order in printf, is that just to fit the coordinate system? in my way, i change it to printf(“%c[%d;%df”,0x1B,x,y) to meet my needs…
Easy way to fill in an Excel file with Python
Let us say I have an excel file called test.xlsx, which is a workbook with three sheets, where sheet1 is called hello1, sheet2 two is called hello2, and sheet3 is called bye. Now, I’d like to read the file, and then re-write the same file but ONLY change the values in (column B, row 11) of the sheet nam…
Python cron job file access
I have a tiny Python script that needs to read/write to a file. It works when I run it from the command line (since I am root, it will) , but when the cron job runs it cannot access the file. The file is in the same folder as the script and is (should) be created from the script. I’m
How do you run an application in bash and select which monitor it runs on?
I have a question that is hard to search for the answer (I always end up with answers for monitor manipulation). I am writing a bash shell script to help me with my code dev and I have two monitors. When I run my executable that I have compiled I want to tell it to run on a particular monitor
How to find files recursively by file type and copy them to a directory?
I would like to find all the pdf files in a folder. It contains pdf files inside and more directories that contain more as well. The folder is located on a remote server I have ssh access to. I am using the mac terminal but I believe the server I am connecting to is Centos. I need to find all
No such file or directory error in linux
Recently I have installed a program called “paradigm”. In the program path (/home/hora/Paradigm/) there is a directory “testdata” (/home/hora/Paradigm/testdata) which includes a shell script that runs an example test of the application.The first time I installed the program I was able …
linux how to allow user to read/write/delete files created from root in a specific folder
I use automysqlbackup to backup my mysql database. The problem is I can only run this program using sudo automysqlbackup. This program dumps the backup into my folder /home/user/backup but theses files are owned by root and when I connect via ftp to this folder I cannot delete or read them. Is it possible tha…
Flush/Clear System.in (stdin) before reading
At work, we have 5 RFID readers attached to a PC running Linux. The readers are all recognized as keyboards and send their input (what they read form the Chip) as an key-input-event sequence. To be able to tell which reader send what sequence, I’m doing a raw-read over /dev/input/XX and get their input …
Get UTF-8 input with X11 Display
I’ve been trying and reading lots of resources on the internet, trying to find a way to get an UTF-8 keyboard (composed) input from a X Display. But I could not make it work. I have tried the example code from this link (exaple 11-4), but no success. I also have written a simple example (below) to try t…
Glassfish: How to do asadmin commands without password?
every time I enter a CLI-command for glassfish like this asadmin start-instance i1 I am prompted to enter the admin-username and admin-password. How can I disable the need for entering these credentials? I plan to write scripts for running commands like this and I think it’s not possible to enter the cr…