I’m having trouble changing my queries to use the my current MDT timezone. The server and MySQL are UTC When I try to run CONVERT_TZ() to US/Mountain, my time is way off. Returns 2016-08-08 18:00:00 Not sure what I’m doing wrong here. Answer Instead of curdate, you should use now like you did in y…
Am I setting this script up correctly to run specific commands based on user input?
I have a small script that I am working on. This is only the second script that I have made using bash script. Basically what I am wanting this script to do is take the users input and fire a command based on that choice. As you can see the user first enters the host address of the instance they
How to repeat a dash (hyphen) in shell
How can I repeat the character – n times in shell? I have read and tried this, but this does not work for -. It throws error invalid option. Below is the exact command that I used: Original posted line: printf ‘-%0.s’ {1..100} I also tried escaping – by putting a but in that case it r…
Cannot get mixed C and Ada program to link with pthread library
I am writing a program in C. I am getting the error: This specific error comes up when gcc is linking my file_name.o with my main ADA file. For the actual compilation of the C file, I have tried using both: as well as: Neither of these seem to work. Any thoughts? UPDATE: One thing I did not realize is
Run bash whiptail script after login with sudo
I’m creating a virtual machine configuration script using whiptail that I’d like to have automatically start after the user logs in. The thing is, that I don’t want the user to be root, however because the user will need to be able to change things like hostname, ip address, add directories,…
About the memory layout of programs in Linux
I have some questions about the memory layout of a program in Linux. I know from various sources (I’m reading “Programming from the Ground Up”) that each section is loaded into it’s own region of memory. The text section loads first at virtual address 0x8048000, the data section is loa…
Socket Server Memory usage goes up, becomes unresponsive
I have the following socket server code for Linux using Pthreads. If I start stress testing this with: The memory increases to about 270MB then the server becomes unresponsive: On ARMv7 architecture this takes a shorter time. If I stop the requests with the for loop, the memory does not get freed up, meaning …
Analyse .NET code with SonarQube on Linux platform
I need to perform static code analysis of .NET project using SonarQube. I have 2 machines: Linux with Sonar Server Windows with .net code and its tools (Fxcop, …) I need to perform analysis on Windows and push the results to Sonar Server on Linux machine. Can someone help me with this? Answer First you …
Embedded Qt Mouse Pointer Not Showing Up
I’ve got a bit of an interesting problem here. There are plenty of threads I’ve found where people are working to hide or get rid of a cursor on an embedded Qt GUI…but I’m trying to get a cursor to show up on an embedded Qt GUI. I inherited a project that was ‘finished’ som…
Error during insert with parameter(s) over 30 characters
Issue Performing an insert using prepared statements with PDO and an ODBC driver gives the following error when at least one of the parameters is over 30 characters: Inserts work for any bound string that is <= 30 characters in length. I have no issues with SELECT queries. Using INSERT with isql and sqlcmd…