Jump to content

ajoo

Members
  • Content Count

    863
  • Joined

  • Last visited

  • Days Won

    1

ajoo last won the day on October 1

ajoo had the most liked content!

Community Reputation

4 Neutral

About ajoo

  • Rank
    Prolific Member

Recent Profile Visitors

8,156 profile views
  1. There are 2 gap difference that both these solutions have overlooked. A look at row 10 and 11 reveals that there a gap of 8 days between dateout on 10th row and datein on 11th row. which is unaccounted for. So on 11th row the diff should be 22 and not 14. Further on the last row there is a gap which could be calculated between dateout on 14th row and datein on 15th row i.e. DATEDIFF( '2020-08-27', '2020-05-22'). +-----+---------------+------------------------+ | Row | dateout | datein |diff | +-----+---------------+------------------------+ | 1 | '2019-03-30' | '
  2. Thank you Guru Barand. May I request you to clear some doubts that I expressed above in my earlier message. Thank you.🙏
  3. Sir that's not my intention at all. It's just that sometimes there are so may aspects to a problem that I try and request help for the core of it while trying to attempt the changes around it myself. It's only if I get stuck subsequently, like because of what i added, then I ask again. But I will keep it in mind and try and avoid that as far as possible. Thank you.
  4. Hi Guru Barand, Thank you very much. I couldn't have figured it out this way since I have never really worked much with @variable in mysql. I am not sure I understand their working very well. However, this below is what I tried and it almost works except for the first and last bit of absents and resembles somewhat what requinix suggested. SELECT RecNo, DATEDIFF(( SELECT t.TimeOfLogin FROM india_sessdata t WHERE t.RecNo > t1.RecNo ORDER BY t.RecNo LIMIT 1), MIN(TimeOfLogin) ) diff FROM india_sessdata t1 WHERE t1.StudentLogin = 'mina1111' GROUP BY RecNo;
  5. Thanks Guru Barand and Requinix for the replies. @Guru Barand : Please find the data attached as data. I have tried your method but I am stuck at the comparison part where I need to reference the next date. @ Requinix : HI, I get the idea but I am not sure how to go about it. Thank you.
  6. Hi, I have the following login and logout data of a student :- Would it be possible to calculate the absents by subtracting consecutive times of logins or logouts using just Mysql ? From the example above the absents between 2019-04-01 and 2019-03-30 should be SELECT DATEDIFF("2019-04-01", "2019-03-30") = 2. So actual absents is 2 -1 = 1 and so on for all the consecutive dates and then their sum. I have no clue how to go about this. Gurus please help. Thanks !
  7. So eventually after a loads of tries on my existing image, I finally removed all the containers, images from my host and rebuilt the container again. To my utter delight, the status on the container showed UP !!!!!!!!!!! 😇 This time it ran straight away !! I think the image was corrupted somewhere and the container always was in the exited state immediately after going UP. Thank you very much requinix for that insight into the -p switch and to finally get this working. Thanks loads !🙏
  8. I might have said ir wrong though above, port 80 in the container maps to port 8080 on the host which means I would need to access localhost using :8080 provided the container is not exited. I have tried it in the interactive mode to no avail. I get the same page. Please help resolve. Thanks.
  9. Internally it exposes the 8080 on the container which is mapped to port 80 on the host. So simply a localhost should be working provided the container does not exit as soon as it starts. However the container status is exited unless in the interactive mode. If the container would be UP and not exited, I would think it maybe a network / port issue but since it's exited I feel the issue may lie else where. So what do you say. Thanks.
  10. Hi, I know it allows the container to communicate with the host by mapping the container port 8080 to host port 80. But how does that link up to this ? I thought it to do with the settings of environment variables related to lynx as that's what google look-ups suggest. A better hint from you maybe might do the trick. 🙂 Thanks.
  11. Hi, Sorry for the delay. So I ran it using : docker run -p 8080:80 -d mysite and the browser at localhost and got the following page So I ran it interactive and it is still the same. apachectl start, restart or apache2ctl -D FOREGROUND gives the following error: apachectl status gives So the problem seems to be somewhere here. I am googling for the solution. In case you have help, would be great ! Thanks !
  12. I'll do another run and revert soon.
  13. Also I used test.local because the command "apachectl start" gave the warning something like not fully defined server hostname or sth.
  14. the www gets appended by self even when i type test.local in the browser. I tried using localhost before I came this route. That gave the same results.
  15. Hi requinix ! 😀 Thanks for the response. This is how I invoked the container run : docker run -i -t -h test.local -p 8080:80 mysite /bin/bash which set the host to test.local and provided a bash for inspecting. Thanks !
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.