I have a really simple question, yet I can't find an answer for it. I guess I am missing something in the usage of the boost timer.hpp. Here is my code, that unfortunately gives me an error message:
include <boost/timer.hpp>
int main() {
boost::timer t;
}
And the error messages are as follows:
/usr/include/boost/timer.hpp: In member function ‘double boost::timer::elapsed_max() const’:
/usr/include/boost/timer.hpp:59: error: ‘numeric_limits’ is not a member of ‘std’
/usr/include/boost/timer.hpp:59: error: ‘::max’ has not been declared
/usr/include/boost/timer.hpp:59: error: expected primary-expression before ‘double’
/usr/include/boost/timer.hpp:59: error: expected `)' before ‘double’
The used library is boost 1.36 (SUSE 11.1).
Thanks in advance!
Hi everyone,
I'm in search for a jQuery-based Date/Time Selector. I have found a few that are quite nice, but one of my requirements is that I can provide a json/xml/etc source of available days/times and the control should only allow selections of available days/times.
Is anyone aware of a plugin that does this, or at least a plugin that could be modified to do this?
Thanks!
Hi,
I am using the Apache commons logging library and log4j to generate my log files.
Now I want to create a new file every time I run my program. The current count should be appended to the log file's name.
For example:
program_1.log
program_2.log
program_3.log
Do you know how I could achieve this?
How does a digital clocking system deal with user error such as someone forgetting to clock out or someone erroneously entering their code causing them to clock someone else in/out (who might not even be on the schedule that day). Its obvious there could be issues of dishonesty, but what about human error?
using (var client = new WebClient())
{
html = client.DownloadString(some_string);
//do something
html = client.DownloadString(some_string1);
//do something
html = client.DownloadString(some_string2);
//do something
html = client.DownloadString(some_string3);
//do something
etc
}
webclient does not allow itself enough time to download the entire source of the webpage. how do i force it to wait until it finishes the donwload?
Hi I'm working with c# simple application to display system date time.
textbox.Text = DateTime.Now.ToString("MM/dd/yyyy");
but it is showing result as : 05-12-2010
What is the problem with this code? or do I need to change any where in the regional settings of my machine.
thank you
I'm trying to set up url routing on my server for the first time. I'm fairly sure that mod_rewrite is enabled. Are there any other configurations I need to change or things to set up? Should the routing.yml file just automatically get read?
Hi guys i have a table with shifts history along with emp ids
im using this code to retrieve a list of employees and their total shifts by specifying the range to count from:
SELECT ope_id, count(ope_id)
FROM operator_shift
WHERE ope_shift_date >=to_date( '01-MAR-10','dd-mon-yy') and ope_shift_date
<= to_date('31-MAR-10','dd-mon-yy')
GROUP BY OPE_ID
which gives
OPE_ID COUNT(OPE_ID)
1 14
2 7
3 6
4 6
5 2
6 5
7 2
8 1
9 2
10 4
10 rows selected.
NOW how do i choose the employee with the highest no of shifts under the specified range date, please this is really important
I use phpmyadmin to create mysql database. And I have set the auth type to cookie in the config.inc.php.
How do I change the time limit so that even if I logged in I stayed idle for hours it won't require me to log in again.
One of the more common complaints I have read about the AppEngine database (for Java) is that it is extremely slow when it come to "cold start time". What does this mean? And is it something I should be worried about?
I recently came across Pomodoro Technique as a way to increase productivity, get in the zone, and in general feel a sense of accomplishment at setting some short programming goals and achieving them.
So far I have enjoyed it and the sense of accomplishment I get after seeing a bunch of short goals add up at the end of the day to a lot of work done on a programming project.
I'm looking for other ideas similar or not to the pomodoro technique to add a little variety to achieving goals, personal productivity, get in the programming zone, etc.
Any ideas or techniques that are expressed formally such as in the pomodoro paper, that are not trite fluffy maxims?
i am creating windows application .In this i have to subtract two dates .i subtract it successfully ,i used TimeSpan to get subtracted value.But when i insert it in SQl Server 2005 db, it inserted with starting date i.e. 1/1/1900 and the calculated difference
which format should i use to insert Time only?
Thanks in advance
I'm using c#, and if I do
DateTime.ParseExact(“4/4/2010 4:20:00 PM”, “M'/'d'/'yyyy H':'mm':'ss' 'tt”, null)
The return value is always 4:20 AM -- what am I doing wrong with using tt?
Thanks!
Is there a way to kill a child thread after some specified time limit in Java?
Edit: Also this particular thread may be blocked in its worst case (Thread is used to wait for a file modification and blocks until this event occurs), so im not sure that interrupt() will be successful?
In my code, java treeset iteration is the dominant time factor. In looking at the system I believe that it is n*log(n) complexity. Can anyone verify this? I am thinking that by providing links backward from child node to parent node I could improve the performance.
I have to support IE6 and I calculate rendering time by creating a timestamp in javascript at the beginning of the page and doing the difference when document.ready is fired in jQuery.
If I do 3 pages load, the rendering times in milliseconds can look like this :
page 1 : 735, 2672, 734
page 2 : 3063, 1516, 3375
page 3 : 8281, 2531, 3703
Why is that? How can I have more consistency?
I have a login page that uses session variables. How can i set an expire time for a session?
eg: after 15 minutes of inactivity destroy the session.
how can i do it?
Is there some way to run 2 threads at the same time?
i want to have my app run its current function and then bring up another thread running another function, that can change variables in the first thread
Sometimes I have seen some code or part of the project which I could improve but is not related with my current team project.
Those times I have a conflict because despite wanting to help, many teams lack enough people and doing extra work seems like betrayal. Obviously any managers will appreciate much more if you focus your effort on their tasks
What do you do in in these cases?
I'm having a "first time" problem with IE, which reports a different value for $(document).height(); when the page first loads versus subsequent queries. The difference is 17 pixels regardless of the opening size of the window -- on document ready, the height reported is 17 pixels larger than is subsequently reported. I wonder if this is an artifact of some aspect of my page (some margins or paddings somewhere), but so far can't account for 17 pixels.