I'm looking for a function (prefer POSIX, but Linux specific would do if it has to) to get the current timezone offset. For my location, eastern USA, that should be -14400 when daylight time is in effect, and -18000 otherwise.
It is known and well described in C++ standard ('C++ Standard - ANSI ISO IEC 14882 2003.pdf') that under certain circumstances types are promoted - for example, 'int' is promoted to 'double'.My design goal is to create wrappers around standard scalar types (like 'double', 'float', 'long', etc.) that would prevent such conversions/promotions, i.e. I want to create a really strictly typed C++ environment (like, say, OCaml).
However, the promotion is caught at runtime.Is there a way in C++ to catch/block such promotions/conversion at compile time ?
I have a program with a variable named current, but it is not declared. The syntax is current -> othervariable. Theoreticaly there should be no problem with this program. Just wondering what woudl cause this? Which linux include file is current supposed to be declared in?
I'm looking for a good IDE for C/C++, that runs well in slackware. I used CodeBlocks, but I can't compile in the current, and its getting a little old. I see a lot of threads talking about anjunta and kdedeveloper, but I don't like these.
I'm trying to compile tolua++ so that i can use lua in conky 1.7.2, however I am running into a problem. tolua++ defaults to looking for lua 5.0 libraries and I have lua 5.1 installed since that is what conky requires. According to the README tolua++ can use lua-5.1 but I not sure how to configure tulua++ to use those libraries since it uses scons. Here is a what the README says...
Compiling for lua 5.1
Starting from version 1.0.8pre1, tolua++ can be compiled with both lua 5.0 and 5.1. Both versions will output the same code, and the C API (tolua++.h) is the same.
The build system is not yet ready to detect/decide when to compile for 5.1, the easiest way right now is to add a file called 'custom.py' on the root of the package, with the following:
I just used sbopkg to download and compile Digikam 1.0.0 from slackbuilds.org. But compilation stops with an error regarding "png loader". I guess this has to do with the libpng issue mentioned in the changelog.
Nevertheless: Has anyone been able to compile Digikam on the latest Slackware64-current?
I'm using the slackware64 current slackbuild to build a new firefox for -current 32 (I like dynamically linked cairo for fonts). But I am getting a compile error...
My linux laptop isn't able to detect the current battery state. I am using slackware64 13.37 xfce with a Toshiba L645 laptop.
This is what I came up with so far.
Code: lsmod Module Size Used by snd_seq_dummy 1479 0 snd_seq_oss 30116 0
[Code].....
I use a program called conky that reports my cpu frequency and most of the time it's always at 0.93GHz instead of 2.53GHz. Sometimes it jumps to 1.20GHz and 2.53GHz but falls back down to 0.93GHz. Is this normal?
I tried to install VirtualBox 32 bit on my 64bit Fedora11 OS. I took the 32 bit version as I want to run a 32bit software. I collected all information I could get from other forums. That's what I did: I downloaded and installed [URL]
Now I got stucked with the error Qt WARNING: QGtkStyle was unable to detect the current GTK+ theme. I searched for qt or qgtkstyle on my system and found files containing both but don't know what to do here.
I want to recompile apache so I can select a different MPM compile time option. I have looked in the graphical application manager, but I don't see a development version of apache like you do for many of the packages. Am I not looking in the right place for the source code for the Apache 2.2.17 available with FC14?
Alternatively, I can download the source from apache.org for 2.2.17. However, the install options default to a host of different directories than the FC14 version does. Being somewhat OCD I hate to mess up my FC14 system by installing to a bunch of anomalous directories, and I don't want to break anything. I can change the default install directories, if I knew what the FC14 apache 2.2.17 was compiled with. There is an httpd-devel-2.2.17-1 package. But the description makes it sound like it is for developing additional modules. I want to recompile the main httpd-2.2.17-1 package. Does anyone know if this is a possibility?
I am using the Terminal. I would like to know how do I put the current date and time on my machine and the date from a certain URL that has .php extension into a file.
After much too often wondering "hey, when did I actually start this time-consuming command?", I'm considering adding a timestamp to my bash prompt.My first try was simple: PS1="(A) $PS1" which gives a display like:(16:58) exscape ~ #
However, the problem with that approach is that it displays the time when the line was written, not when the command on it was executed. So, if I run "ls" at 16:58, and get a new prompt "(16:58) ..." and then run the next command 2 hours later, it'll look like this:(16:58) exscape ~ # new-commandI of course want the line to display the time when the command was actually run, not when the prompt appeared.
I need to write a small application which needs to detect if the system time is changed by an another application/user and perform some action as soon as it is detected (maybe log the data that time has changed, along with info about which application/user changed it).
How can this be achieved?
I have good programming experiences in shell script, c and beginner level in python. I don't need to know when it was changed, just need to know who/what changed it. The system uses NTP to sync the time, but it is also possible for anyone/any application to change the time(for eg: using the simple "date" command as well).
Does anyone know if there exists a screen saver which simply displays the current time? That would allow me to quickly determine what time it is whether I'm sitting at my computer or sitting across the room
Sometimes it is possible to trick a Linux app by calling it like this:
HOME=/tmp/foo myapp
This would make myapp think /tmp/foo is the home directory, it won't try to get the user id, find its home directory via getpwent(). This is useful when myapp must be forced to dump some of its config files into a non-standard location different than ~.
A similar trick can be done like this: LANG=foo LC_ALL=bar myapp
This is useful when myapp needs to be called once with a different locale without having to make the change persistent by using the export bash built-in or even modify stuff in /etc/profile.
Is it possible to pull the same trick with time and date? The goal is to make an app use another time than the system ones. The final goal - to make timestamps that appear in logs/commit messages not being tied to the system time.
I am reading about jiffies in linux kernel. In one of the related example in the book Linux Device Driver, the author use head -8 /proc/currentime to print out some time information.
However this file is not present in my linux installation (kernel: 2.6.32-131.6.1.el6.x86_64). Why is it the case? Is it because the file path is no longer valid, or it is a distribution feature thing? It is not present in OSX too. What would be an equivalent in OSX?
I want to run a script that runs after every 15 minutes that i will do using crontab. But in script want to search a string from the last 15 minutes logs in log file containing data of whole day.
how i can search the string according to time difference that is logs from from current time and current time - 15 minutes.
Sample logs are as follows:
26-Aug-2010 16:38:46,055|9172310750|subscription_app|31ba267e%3A12aadd47bdc%3A50e9|ChargeAmount|ChargingIntercep tor - subscriber details processed sucessfully- {arg0.referenceCode=balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:3
How to change the hostname without affecting current status ie i dont need to change the already having time, just rename the hostname.. what is the command to refresh