Skip to content

Instantly share code, notes, and snippets.

View sguzunov's full-sized avatar

Stoyan Uzunov sguzunov

  • @interop.io
  • Sofia, Bulgaria
View GitHub Profile
import * as moment from 'moment';
import { RecurrenceType, Recurrence } from '../../models/report/recurrence.model';
export class RecurrencePatternCalculator {
public static calculateNextRecurrenceDate(recurrenceOptions: Recurrence): Date {
switch (recurrenceOptions.recurrenceType) {
case RecurrenceType.Daily:
return RecurrencePatternCalculator.getDailyNextReccurenceOccurenceDate(recurrenceOptions);
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Balls
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Paralelepiped
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BarcodeGenerator
{
class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// https://judge.softuni.bg/Contests/Practice/Index/179#4
namespace DrawButterfly
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StupidPasswords
{
public class Program
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MagicNumbers
{
public class Program
{
public class SenderAgent extends Agent {
protected void setup() {
System.out.println("Hello. My name is " + this.getLocalName());
sendMessage();
}
private void sendMessage() {
AID r = new AID("Peter", AID.ISLOCALNAME);
ACLMessage aclMessage = new ACLMessage(ACLMessage.REQUEST);
aclMessage.addReceiver(r);
function clearDirectorySync(dirAbsPath) {
const fs = require('fs'); // Node.js package for working with file system (required).
const rmDirContent = function rmDir(dirAbsPath) {
if (!fs.existsSync(dirAbsPath)) {
return;
}
const dirContent = fs.readdirSync(dirAbsPath);
if (!dirContent.length) return;
/* globals $ */
/*
Create a function that takes an id or DOM element and an array of contents
* if an id is provided, select the element - Done
* Add divs to the element
* Each div's content must be one of the items from the contents array - Done
* The function must remove all previous content from the DOM element provided - Done