Questions tagged as 'time'

1
answer

Display an alert when 5 minutes are missing for the event

I'm developing a Java calendar, where I have the date and time saved in the database. However, what would be the best way to display an alert 5 minutes before the event? Do I have to run the query method all the time until the hours hit? Or is t...
asked by 16.07.2015 / 15:59
1
answer

How to subtract two dates using Ruby and the Time library?

This is the code: require 'time' t = Time.parse('2016-04-18') #data de ontém t2 = Time.now #data atual t3 = t2 - t # subtração das duas variáveis(datas) acima puts Time.at(t3) #resultado da subtração In this case the result should be a day...
asked by 19.04.2016 / 16:08
1
answer

Error fetching data from type Time from database

I am making a query but it is giving error when I try to get values of type Time. This is the error:    java.sql.SQLException: java.sql.SQLException: Bad format for Time   '13: 00: 00.000 'in column 5 The line that is firing the exception...
asked by 09.07.2015 / 20:40
4
answers

Set a range in the execution of each loop of a for

I want to set a gap in the execution of each loop in my for var li = document.getElementByTagName("li"); lengthLI = li.length; for(var x = 0; x < lengthLI; x++){ console.log(li[x].innerText); // setar intrvalo } How could I be ab...
asked by 04.03.2018 / 05:00
1
answer

Calculate the number of hours between two hours and transform into float

I needed to create a function that received two hours in the format (00:00:00), calculates the number of hours between them, and converts me to float. However the float would be of this genre: Resultado: 2 horas e 30 min -> 2,30 Resultad...
asked by 13.05.2016 / 19:16
2
answers

How to include "time" library in the compiler?

I'm compiling in C on my Mac through the terminal, this is all a wonder, the only problem is that when I need to call a new library I do not know which command to call it by the terminal. Ex: #include <stdio.h> is -std=c99...
asked by 26.09.2015 / 23:31
2
answers

How to set up a timer in Android Studio to run tasks at constant intervals?

I'm developing a simple app with Android Studio and I need to create a timer to run some methods every 1 second. I tried the following but it did not work: int delay = 1000; int interval = 1000; Timer timer = new Timer(); timer.scheduleAtF...
asked by 31.05.2018 / 04:34
1
answer

Make toast disappear when running root command

Live, I have the phone connected to the computer and when I run root commands by adb, there is always a toast in the crack, is there any way to make these toats disappear? I remind you that they are not being created by my code. I tried to...
asked by 13.04.2018 / 16:17
1
answer

String string in Javascript

I'm developing an application in VueJS and on a screen I have two input's of time and are being saved in MongoDB as String. However the input only accepts in the time format and when I click on the grid and the inputs are filled with the data of...
asked by 06.10.2017 / 14:58
1
answer

Freeze Windows clock [closed]

Would it be possible to freeze the Windows clock with Python? If yes, what library does this?     
asked by 14.03.2015 / 12:51