Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
U

User 12973039

@User 12973039
About
Posts
2
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • split time then group by 15 min mongodb
    U User 12973039

    I have a Schema in mongodb like:-

    {
    _id: ObjectId("5e05c1089b3e4e333cee8c39"),
    name:"Alex",
    activity:[{
    {
    _id: ObjectId("5e05c1089b3e4e333cee8c39"),
    type: 'run',
    start_timestamp: ISODate("2020-01-11T11:34:59.804Z"),
    end_timestamp: ISODate("2020-01-11T11:40:00.804Z")
    },
    {
    _id: ObjectId("5e05c1089b3e4e333cee8c40"),
    type: 'stop',
    start_timestamp: ISODate("2020-01-11T11:40:00.804Z"),
    end_timestamp: ISODate("2020-01-11T11:42:00.804Z")
    },
    {
    _id: ObjectId("5e05c1089b3e4e333cee8c41"),
    type: 'wait',
    start_timestamp: ISODate("2020-01-11T11:42:00.804Z"),
    end_timestamp: ISODate("2020-01-11T11:52:00.804Z")
    },
    }]
    }

    This is a schema for a man activity, i need to find brake-up of every 15 minute (brake-up duration in minute) like

    {
    _id: "2020-01-11T11:34 to 2020-01-11T11:49" ,
    duration: 15,
    brake-up:{
    run:6,
    stop:2,
    wait:7
    }
    }

    here type: wait should be split into 2 duration "2020-01-11T11:34 to 2020-01-11T11:49" 7 min and "2020-01-11T11:49 to 2020-01-11T12:04" 3 min .

    {
    _id: "2020-01-11T11:34 to 2020-01-11T12:04" ,
    duration: 15,
    brake-up:{
    wait:3
    }
    },

    Thanks

    Database database mongodb xml

  • Angular JS code Not work
    U User 12973039

    Could you please suggest me how i can make this concept ,if time1

    Time1 :

    Time2 :

    Your Time is ans is {{(time1-time2)| correcttime | date: 'HH:mm': 'UTC'}}

    var app = angular.module('myApp', []); app.filter('correcttime', function() { if { time1>24; time1=+1; } else if { time1=time2; time1-time2==0; } else{ time1-time2; } return function(num) { return Math.abs(num); } });

    Web Development javascript
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups