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
from functools import total_ordering | |
@total_ordering | |
class TreeNode: | |
""" | |
General purpose multi-children Tree Node class. | |
""" | |
def __init__(self, data): |
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
class JobRunnable implements Runnable | |
{ | |
private final Job job; | |
public JobRunnable(Job job) | |
{ | |
this.job = job; | |
} | |
@Override | |
void run() |
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
@Override | |
void run() | |
{ | |
while(true) | |
{ | |
newJob = getNewJobFromCrontabFile() // blocking call | |
JobThread newJobThread = new JobThread(newJob); | |
newJobThread.start(); | |
} | |
} |
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
@Override | |
void run() | |
{ | |
while(true) | |
{ | |
newJob = getNewJobFromCrontabFile() // blocking call | |
jobQueue.push(newJob) | |
} | |
} |
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
@Override | |
void run() | |
{ | |
while(true) | |
{ | |
newJob = getNewJobFromCrontabFile() // blocking call | |
jobQueue.push(newJob) | |
if(newJob == jobQueue.peek()) | |
{ | |
// The new job is the one that will be scheduled next. |
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
void goToSleep(job, jobQueue){ | |
jobQueue.push(job); | |
sleep(job.nextExecutionTime() - getCurrentTime()); | |
} | |
void executeJob(job, jobQueue){ | |
threadpool.submit(job); // async call | |
job = job.copy(); | |
job.setNextExecutionTime(getCurrentTime() + job.getExecutionInterval()); | |
jobQueue.add(job); |
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
@Override | |
void run() | |
{ | |
while(true) | |
{ | |
Thread.sleep(job.getNextExecutionTime() - currentTime()); | |
job.execute(); | |
job.setNextExecutionTime(currentTime() + job.getExecutionInterval()); | |
} | |
} |
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
A room is available in a 3 BHK apartment in 'Pramuk Aqua Heights Apartments', Electronic City Phase 1. | |
It is available on both, private as well as on a sharing basis. | |
**About the room** : | |
- Attached wardrobe. | |
- Dressing table with mirror. | |
- Attached bathroom with Geyser and all other fittings. | |
- Lake facing (balcony side). | |
- Dimensions = 156 x 116 in. |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor] "Autorun"="%USERPROFILE%/Documents/cmd_autorun.cmd" |
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
@echo off | |
cls | |
doskey /macrofile=%USERPROFILE%\Documents\cmd_aliases.txt |
NewerOlder