This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toUnixTime = (date) => date.getTime() / 1000; | |
const usageInterval = (start, end) => ({ | |
start: toUnixTime(start), | |
end: toUnixTime(end) | |
}); | |
const getSundayOfTheWeek = (currentDate) => { | |
const date = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace JOIEnergy.Domain | |
{ | |
public class ElectricityReadingInterval | |
{ | |
public DateTime Start { get; private set; } | |
public DateTime End { get; private set; } | |
public ElectricityReadingInterval(DateTime start, DateTime end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async function automatizarChatice() { | |
const horarios = [ | |
'', '', | |
'', '', | |
'09:30', '19:00', | |
'09:30', '19:30', | |
]; | |
const caixinhasTexto = document.querySelectorAll(".txt40"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of pipeline process write in kotlin | |
fun multiplyIt(x:Int): Int { | |
println(x * 2) | |
return x * 2 | |
} | |
fun plusTwo(x: Int): Int { | |
println(x + 2) | |
return x + 2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function flattenArray(array) { | |
return array.reduce((acc, cur) => { | |
return acc.concat(Array.isArray(cur) ? flatten(cur) : cur); | |
}, []); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data; | |
using ClosedXML.Excel; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
private static readonly Random Random = new Random(); | |
public static string Lorem = |