EnlightenIris
@objc
open class EnlightenIris : NSObject
A class that encapsulates the behavior of the spotlight for a particular view.
-
The default popover maximum width.
Declaration
Swift
public static var popoverMaxWidth: CGFloat
-
A CommonMark Markdown filename.
Declaration
Swift
public typealias MarkdownFilename = String
-
A closure that draws the contents of
view
that should be masked for thefocused
profile spot.Because the closure is not called until needed, it is executed on the same thread on which the image itself is drawn, which can be any thread of your app. Therefore, the closure must be safe to call from any thread.
Declaration
Swift
public typealias ProfileSpotDrawingHandler = (_ drawingRect: NSRect, _ cgContext: CGContext) -> Void
Parameters
drawingRect
The destination rectangle in which to draw. The rectangle passed in is the
bounds
ofview
. The coordinates of this rectangle are specified in points.cgContext
The graphics context to use to draw.
-
A closure containing animations for a transaction group.
Declaration
Swift
public typealias AnimationHandler = (_ animationContext: NSAnimationContext) -> Void
Parameters
animationContext
The thread’s current
NSAnimationContext
to configure properties of the animation.
-
Whether the spotlight controller disables navigation until the focus animation finishes.
This property has a default value of
false
.Note
This property should only betrue
if the animation will take longer than the spotlight controller’sEnlightenSpotlightController.profileSpotFocusDuration
instance property.Declaration
Swift
public var doesWaitForFocusAnimationCompletion: Bool
-
The view of the iris.
Declaration
Swift
public unowned var view: NSView
-
The iris’ stages, individually rendered in the popover.
Declaration
Swift
public var stages: [EnlightenIrisStage]
-
The popover width.
A non-nil value overrides the default
EnlightenIris.popoverMaxWidth
.Declaration
Swift
public var popoverMaxWidth: CGFloat?
-
The edge of
view
the popover should prefer to be anchored to.When
nil
, a heuristic is used to determine the best anchor edge for the view based on its location in the window.Declaration
Swift
public var preferredPopoverEdge: NSRectEdge?
-
Whether the Markdown content should be center aligned.
This property has a default value of false.
Declaration
Swift
public var doesCenterAlignContent: Bool
-
A closure for drawing a custom profile spot mask.
By default, the
view
‘s layer is used to create the image mask; however, in certain situations where the view is transparent, this may not be wanted (e.g. radio buttons).See
ProfileSpotDrawingHandler
for more information.Declaration
Swift
public var profileSpotDrawingHandler: EnlightenIris.ProfileSpotDrawingHandler?
-
A closure containing a group of animations to execute upon focusing on
view
.The closure is called regardless of the controller’s configuration.
Declaration
Swift
public var focusAnimationGroup: EnlightenIris.AnimationHandler?
-
A closure containing a group of animations to execute upon unfocusing
view
.The closure is called regardless of the controller’s configuration.
Declaration
Swift
public var unfocusAnimationGroup: EnlightenIris.AnimationHandler?
-
Initializes a new iris from the provided stages.
Important
Errors thrown during the loading of the Markdown strings are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Note
If using this initializer directly, the iris must still be added to the controller.
Declaration
Swift
public init(view: NSView, stages: [EnlightenIrisStage], popoverMaxWidth: CGFloat? = nil)
Parameters
view
The view to spotlight for the stages of this iris.
stages
The stages of this iris.
popoverMaxWidth
The popover’s maximum width. A non-nil value overrides the default
EnlightenIris.popoverMaxWidth
. -
Initializes a new iris from the provided stage.
Important
Errors thrown during the loading of the Markdown strings are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Note
If using this initializer directly, the iris must still be added to the controller.
Declaration
Swift
public convenience init(view: NSView, stage: EnlightenIrisStage, popoverMaxWidth: CGFloat? = nil)
Parameters
view
The view to spotlight for the stages of this iris.
stage
The stage of this iris.
popoverMaxWidth
The popover’s maximum width. A non-nil value overrides the default
EnlightenIris.popoverMaxWidth
. -
Initializes a new iris from CommonMark Markdown strings.
Important
Errors thrown during the loading of the Markdown strings are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Note
If using this initializer directly, the iris must still be added to the controller.
Declaration
Swift
public convenience init(view: NSView, markdownStrings: [String], popoverMaxWidth: CGFloat? = nil)
Parameters
view
The view to spotlight for the stages of this iris.
markdownStrings
The CommonMark Markdown strings displayed as individual stages.
popoverMaxWidth
The popover’s maximum width. A non-nil value overrides the default
EnlightenIris.popoverMaxWidth
. -
Initializes a new iris from a CommonMark Markdown string.
Important
Errors thrown during the loading of the Markdown string are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Note
If using this initializer directly, the iris must still be added to the controller.
Declaration
Swift
public convenience init(view: NSView, markdownString: String, popoverMaxWidth: CGFloat? = nil)
Parameters
view
The view to spotlight for the stages of this iris.
markdownString
The CommonMark Markdown string displayed.
popoverMaxWidth
The popover’s maximum width. A non-nil value overrides the default
EnlightenIris.popoverMaxWidth
. -
Initializes a new iris from CommonMark Markdown files.
Important
Errors thrown during the loading of the Markdown strings are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Warning
Asserts the existence of the Markdown files in ‘Debug’ builds, while failing silently in ‘Release’ builds (by returning an empty string).
Note
If using this initializer directly, the iris must still be added to the controller.
Throws
Throws an error if the contents of a file in
markdownFilenames
cannot be read.Declaration
Swift
public convenience init(view: NSView, markdownFilenames: [MarkdownFilename], in bundle: Bundle, popoverMaxWidth: CGFloat? = nil) throws
Parameters
view
The view to spotlight for the stages of this iris.
markdownFilenames
The names of the CommonMark Markdown files in the provided bundle that will be displayed as individual stages.
bundle
The bundle that contains the Markdown files in
markdownFilenames
.popoverMaxWidth
The popover’s maximum width. A non-nil value overrides the default
EnlightenIris.popoverMaxWidth
. -
Initializes a new iris from a CommonMark Markdown file.
Important
Errors thrown during the loading of the Markdown string are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Warning
Asserts the existence of the Markdown file in ‘Debug’ builds, while failing silently in ‘Release’ builds (by returning an empty string).
Note
If using this initializer directly, the iris must still be added to the controller.
Throws
Throws an error if the contents of the file
markdownFilename
cannot be read.Declaration
Swift
public convenience init(view: NSView, markdownFilename: MarkdownFilename, in bundle: Bundle, popoverMaxWidth: CGFloat? = nil) throws
Parameters
view
The view to spotlight for the stages of this iris.
markdownFilename
The name of the CommonMark Markdown file in the provided bundle that will be displayed.
bundle
The bundle that contains the Markdown file named
markdownFilename
.popoverMaxWidth
The popover’s maximum width. A non-nil value overrides the default
EnlightenIris.popoverMaxWidth
.
-
Adds additional stages to the iris.
Important
Errors thrown during the loading of the Markdown strings are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Declaration
Swift
public func addAdditional(stages: [EnlightenIrisStage])
Parameters
stages
The stages to add.
-
Adds an additional stage to the iris.
Important
Errors thrown during the loading of the Markdown strings are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Declaration
Swift
public func addAdditional(stage: EnlightenIrisStage)
Parameters
stage
The stage to add.
-
Adds additional stages for CommonMark Markdown strings to the iris.
Important
Errors thrown during the loading of the Markdown strings are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Declaration
Swift
public func addAdditionalStages(using markdownStrings: [String])
Parameters
markdownStrings
The Markdown strings to render in the popover as additional individual stages.
-
Adds an additional stage for a CommonMark Markdown string to the iris.
Important
Errors thrown during the loading of the Markdown string are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Declaration
Swift
public func addAdditionalStage(using markdownString: String)
Parameters
markdownString
The Markdown string to render in the popover.
-
Adds additional stages from the contents of CommonMark Markdown files to the iris.
Important
Errors thrown during the loading of the Markdown strings are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Warning
Asserts the existence of the Markdown files in ‘Debug’ builds, while failing silently in ‘Release’ builds (by returning an empty string).
Throws
Throws an error if the contents of a file in
markdownFilenames
cannot be read.Declaration
Swift
public func addAdditionalStages(from markdownFilenames: [MarkdownFilename], in bundle: Bundle) throws
Parameters
markdownFilename
The names of the CommonMark Markdown files in the provided bundle to add as additional individual stages.
bundle
The bundle that contains the files in
markdownFilenames
. -
Adds an additional stage from the contents of a CommonMark Markdown file to the iris.
Important
Errors thrown during the loading of the Markdown string are passed to the spotlight controller’s delegate’s
EnlightenSpotlightControllerDelegate.spotlightControllerFailedToLoad(markdownString:for:with:)
method.Warning
Asserts the existence of the Markdown file in ‘Debug’ builds, while failing silently in ‘Release’ builds (by returning an empty string).
Throws
Throws an error if the contents of the file
markdownFilename
cannot be read.Declaration
Swift
public func addAdditionalStage(from markdownFilename: MarkdownFilename, in bundle: Bundle) throws
Parameters
markdownFilename
The name of the CommonMark Markdown file in the provided bundle to add.
bundle
The bundle that contains the file named
markdownFilename
.
-
Returns the stage for a one-based stage index.
Note
The stage indices are one-based (e.g. the first stage’s index is 1).
Declaration
Swift
func stage(index: Int) -> EnlightenIrisStage?
Parameters
index
The one-based stage index to retrieve.
Return Value
Returns the stage for
index
.


Hi All,
Has anyone tired getting this to work to monitor water tank levels?
I currently use a stand alone system. http://www.smartwatertech.co.nz/
It would be great to get the water level on teh power monitoring screen.
Grant
Archived Forum |
|
Water Tank LevelSubmitted by grantwatson on Fri, 30/01/2015 - 07:15Hi All, Has anyone tired getting this to work to monitor water tank levels? I currently use a stand alone system. http://www.smartwatertech.co.nz/ It would be great to get the water level on teh power monitoring screen. Grant
» |
Re: Water Tank Level
one way to do it is to mount a tab at the very buttom of the tank, connect a hose and run it up the side of the tank... let the hose go pass the top by say 10cm... at the very end you mount a air pressure sensor and seal it...
water will never get to it, but as the tank fill the air pressure goes up, everything must of course be air tight
Re: Water Tank Level
Or ultrasonics.
Re: Water Tank Level
Thanks for your replies,
I'm trying to avoid putting a hole in the bottom of my 50,000 litre tank.
I have investigated the ultrasonic option, but to date have not found a unit that will work up to 3 meters,I'm hoping i never get that low on water.
Re: Water Tank Level
If you follow Bo's suggestion, and when you stop to think, there's no need for the pipe to be outside the tank. It can just as easily stick down inside and you have a hole in the top with the instrumentation on the outside. Just make sure your sensor can handle positive and negative pressures and have a tap, or tap and take-off, so that you can zero it somehow, either by letting/pumping air in or out.
But if I remember correctly, breweries use ultrasonic level detectors, and their tanks can be 3000 barrels (about 4000 Hl), quite a bit bigger that yours.
Re: Water Tank Level
I've had a lot of joy with these:
http://www.anadexlabs.com.au/hydrostatic_level_sensors_and_probes.html
I'm using an AN420-5 which is good for 5m of head. My tank is only 0.8m high, and my AVR ADC is only 10-bits so at first blush you'd think I'd have no chance of getting any accurate readings. In my tank the probe output varies from 4mA (empty) to 6.6mA (full), but I can deal with the full dynamic range of 0-21 mA. Thanks to the "infinite" resolution of the probe (it's analog), and oversampling, my resolution is 1.3uA. That means filling a 10L bucket of water easily shows up on the dials:
Re: Water Tank Level
Awesome thanks for that what have you got it connected to?
Re: Water Tank Level
I've got it connected to my precision energy monitor, but the circuitry is pretty simple. Read up on 4-20mA devices if you've not come across them before. Basically you apply a voltage (12V to 36V in the case of that probe) and the probe limits the current based on how deeply submerged it is. 4mA will flow when the tank is at atmospheric level, 20mA will flow then probe is 5m underwater. The "cable" running down to the probe is actually an electrical cable inside a vented tube so that the probe knows the current atmospheric pressure, so you need to be careful not to kink it, but they're pretty robust.
You then need to convert that current into a voltage, and feed it to your ADC. I use a shunt resistor and an op-amp. A recent lightning strike took out my front end, so I've since added a TVS to both sides, and await the next storm to see if that's sufficient.
Re: Water Tank Level
Thanks for the information, I'll probably have some more questions once i have received the probe.
Re: Water Tank Level
Mmm I'll see if I can find one locally, I was quoted $341 Australian plus shipping.
Re: Water Tank Level
I've had a sniff around and an air pressure sensor, a SMT component that needs power supply etc, from RS-online is under £6 (GBP) (12 AUD?) for a pack of 2 (http://uk.rs-online.com/web/p/pressure-sensors/7884925/). I haven't looked at the data sheet, so I've no idea what else it needs. Alas, I can't see the same one in RS Australia. You really need it to handle both positive and negative pressure (or at least without it causing damage) because of the zeroing problem.
[Edit: I thought I was lying, but no. It's very similar to http://au.rs-online.com/web/p/pressure-sensors/7884921/, but Omron appear to do two versions. The UK one is 2SMPP-03 and the Australian one is 2SMPP-02. Yours is 0 to 37kPA (positive only) ours is -37 kPa to +37 kPa. It's going to need a power supply (from the Arduino?) and op-amp to interface to an Arduino.]
Re: Water Tank Level
I've been testing a pressure node based on a similar device to the one the Robert mentioned, the Honeywell HSC series. The HSC adds an I2C interface, which makes for a nice clean digital connection to an Arduino-type device. No op-amps necessary!
I made a wireless node to detect irrigation system pressure based on this , using the HSC sensor + Moteino (Arduino clone with RFM12B radio attached) which sends data to emonCMS every 20 secs or so.
https://github.com/peakmonitor/Moteino_to_emoncms
Battery life of the node looks to be at least 6 months on 4 AA batteries, based on 2 months data so far.
Disclaimer: I am not an experienced programmer, so the code above is a copy-and-paste project. However it does work and appears to give accurate, repeatable results!


'use strict';
var async = require('async');
var constants = require('../constants.json');
var slots = require('../helpers/slots.js');
var self, library, modules;
var __private = {
'use strict';
var async = require('async');
var constants = require('../constants.json');
var slots = require('../helpers/slots.js');
var self, library, modules;
var __private = {
Estimation of clock drift from network in seconds
clockdrift: 0,
Indexed by height
blockchain: {},
Indexed by height all blocks considered as orphaned
orphanedBlocks: {},
List of blocks received higher than lastBlock.height that can’t be processed Indicator of being forked from network To use carefully as it can be a vector of attack Indexed by height
forkedChainBlocks: {},
Last block processed in the blockchain
lastBlock: {height: 0}
};
Constructor
function Blockchain (cb, scope) {
library = scope;
self = this;
cb(null, self);
}
EVENT onBind
Blockchain.prototype.onBind = function (scope) {
modules = scope;
};
EVENT onStartBlockchain
Blockchain.prototype.onStartBlockchain = function(){
setImmediate(function listenBlockchainState(){
var state = __private.timestampState();
if(state.rebuild){
var timedout=false;
library.logger.warn("Blockchain rebuild triggered", state);
library.bus.message("rebuildBlockchain", 3, state, function(err,block){
rebuild done
if(block){
__private.timestampState(new Date());
library.logger.warn("Blockchain rebuild done", __private.timestampState());
if(!timedout){
timedout=true;
return setTimeout(listenBlockchainState, 1000);
}
}
rebuild not done because in sync with network (ie network stale)
else if(!err){
library.logger.warn("Rebuild aborted: In sync with observed network", __private.timestampState());
library.logger.warn("# Network looks stopped");
if(!timedout){
timedout=true;
return setTimeout(listenBlockchainState, 10000);
}
}
rebuild not done because of internal error
else{
library.logger.error("Error rebuilding blockchain. You need to restart the node to get in sync", __private.timestampState());
if(!timedout){
timedout=true;
return setTimeout(listenBlockchainState, 10000);
}
}
});
}
else if(state.stale){
library.logger.debug("Blockchain state", state);
library.bus.message("downloadBlocks", function(err, lastblock){
});
ok let’s try in one more blocktime if still stale
return setTimeout(listenBlockchainState, 8000);
}
else{
return setTimeout(listenBlockchainState, 1000);
}
});
setImmediate(function cleanBlockchain(){
var height = __private.lastBlock.height;
var blockremoved = __private.blockchain[height-200];
library.logger.debug("Removing from memory blockchain blocks with height under", height-200);
while(blockremoved){
delete __private.blockchain[blockremoved.height];
blockremoved = __private.blockchain[""+(blockremoved.height-1)];
}
return setTimeout(cleanBlockchain, 10000);
});
}
API upsertBlock
Blockchain.prototype.upsertBlock = function(block, cb){
var error = null;
if(!__private.blockchain[block.height]){
__private.blockchain[block.height]=block;
} else if(__private.blockchain[block.height].id!=block.id){
__private.orphanedBlocks[block.id]=block;
error = "upsertBlock - Orphaned Block has been added in the blockchain";
} else {
__private.blockchain[block.height]=block;
}
return cb && cb(error, __private.blockchain[block.height]);
}
API isOrphaned
Check if the block is orphaned, ie if the blockchain has already received another (different id) block at same height It also check for double forgery (different id, same timestamp, same height and same generatorPublicKey)
Blockchain.prototype.isOrphaned = function(block){
if(__private.blockchain[block.height] && __private.blockchain[block.height].id != block.id){
if(__private.blockchain[block.height] && __private.blockchain[block.height].generatorPublicKey == block.generatorPublicKey && __private.blockchain[block.height].timestamp == block.timestamp){
modules.accounts.getAccount({publicKey:block.generatorPublicKey}, function(err, delegate){
library.logger.warn("Double forgery", {id: block.id, generator:block.generatorPublicKey, username: delegate.username, height:block.height});
});
}
return true;
}
else {
return false;
}
}
API isForked
Get a block but can’t find the previousBlock in the blockchain
Blockchain.prototype.isForked = function(block){
var previousBlock = __private.blockchain[""+(block.height-1)];
return previousBlock && previousBlock.id != block.previousBlock;
}
API isPresent
Check if block is already in blockchain (ie same id) or already found as orphaned
Blockchain.prototype.isPresent = function(block){
return (__private.blockchain[block.height] && __private.blockchain[block.height].id == block.id) || __private.orphanedBlocks[block.id];
}
API isReady
Check if the blockchain is ready to receive the block (ie received the block at height - 1)
Blockchain.prototype.isReady = function(block){
var ready = __private.lastBlock.height == block.height - 1;
if(ready){
return true;
}
else{
__private.forkedChainBlocks[block.height]=block;
return false;
}
}
API addBlock
Setter the block to the blockchain model, raise error if there is already another one at same height Does not check if this is coherent with blockchain (ie previousBlock)
Blockchain.prototype.addBlock = function(block, cb){
var error = null;
if(!__private.blockchain[block.height]){
__private.blockchain[block.height]=block;
}
else if(__private.blockchain[block.height].id != block.id){
__private.orphanedBlocks[block.id]=block;
error = "addBlock - Orphaned Block has been added in the blockchain";
}
if same block id don’t update
return cb && cb(error, __private.blockchain[block.height]);
};
return the previousBlock even if orphaned. return null if no previous Block found. Likely a fork.
API getPreviousBlock
get the previous block from the input block, as stored in memory. if not found does not check for database, returns undefined.
Blockchain.prototype.getPreviousBlock = function(block){
var previousBlock = __private.blockchain[""+(block.height - 1)];
useful when there is orphaned block if(!previousBlock || previousBlock.id !== block.previousBlock){ previousBlock = __private.orphanedBlocks[block.previousBlock]; }
return previousBlock;
}
API removeBlock
remove block from blockchain in-memory model raise error if not present, or trying to remove a different block at same height
Blockchain.prototype.removeBlock = function(block, cb){
var error = null;
if(!__private.blockchain[block.height]){
error = "removeBlock - Block already removed from blockchain"
} else if(__private.blockchain[block.height].id!=block.id){
error = "removeBlock - Block has been replaced in the blockchain";
} else {
if(__private.lastBlock.id == __private.blockchain[block.height].id){
__private.lastBlock = __private.blockchain[""+(block.height-1)];
}
delete __private.blockchain[block.height];
TODO: reuse orphaned blocks sending a message to stop rebuild if one of the orphaned block is at the origin (ie block.previousBlock == orphanedBlock.previousBlock)
delete __private.orphanedBlocks[block.id];
}
return cb && cb(error, block);
};
API getBlockAtHeight
Getter from in-memory model, can return undefined
Blockchain.prototype.getBlockAtHeight = function(height){
return __private.blockchain[height];
};
API getLastBlock
return last block on top of the blockchain. Fast access The block returned is the last one that has been completely processed
Blockchain.prototype.getLastBlock = function(){
return __private.lastBlock;
};
return true if there is no new block from lastBlock for over a blocktime
Blockchain.prototype.isMissingNewBlock = function(){
if(!__private.lastBlock){
return true;
}
else {
return slots.getTime() - __private.lastBlock.timestamp > constants.blocktime;
}
};
API getLastVerifiedBlock
return last verified block (it may still be rejected during the process) expensive computation checking the whole in memory blockchain for the highest height and verified
Blockchain.prototype.getLastVerifiedBlock = function(){
var lastBlock=null;
for(var height in __private.blockchain){
if(!lastBlock){
lastBlock = __private.blockchain[height];
}
else if(parseInt(height)>lastBlock.height && __private.blockchain[height].verified){
lastBlock = __private.blockchain[height];
}
}
return lastBlock;
};
API getLastIncludedBlock
expensive computation checking the whole in memory blockchain for the highest height no check is done if it has been verified of processed
Blockchain.prototype.getLastIncludedBlock = function(){
var lastBlock=null;
for(var height in __private.blockchain){
if(!lastBlock){
lastBlock = __private.blockchain[height];
}
else if(parseInt(height)>lastBlock.height){
lastBlock = __private.blockchain[height];
}
}
return lastBlock;
};
EVENT onDatabaseLoaded
Blockchain.prototype.onDatabaseLoaded = function(lastBlock) {
lastBlock.processed = true;
lastBlock.verified = true;
self.upsertBlock(lastBlock);
__private.timestampState(new Date());
__private.lastBlock = lastBlock;
};
EVENT onBlockRemoved
Blockchain.prototype.onBlockRemoved = function(block) {
return self.removeBlock(block);
}
EVENT onBlockReceived
Check against in-memory blockchain if the block is ok to be included If so, mark the block with block.ready=true
Blockchain.prototype.onBlockReceived = function(block, peer) {
if(self.isPresent(block)){
library.logger.debug("Block already received", {id: block.id, height:block.height, peer:peer.string});
return;
}
if(self.isOrphaned(block)){
__private.orphanedBlocks[block.id]=block;
block.orphaned=true;
library.logger.info("Orphaned block received", {id: block.id, height:block.height, peer:peer.string});
return;
}
if(self.isForked(block)){
__private.orphanedBlocks[block.id]=block;
var previousBlock = self.getPreviousBlock(block);
library.logger.info("Forked block received", {id: block.id, height:block.height, previousBlock: block.previousBlock, previousBlockchainBlock: previousBlock.id, peer:peer.string});
return;
}
if(!self.isReady(block)){
var lastBlock = self.getLastBlock();
library.logger.info("Blockchain not ready to receive block", {id: block.id, height:block.height, lastBlockHeight: lastBlock.height, peer:peer.string});
return;
}
block.ready = true;
return self.addBlock(block);
};
EVENT onBlockForged
Check if the forge block is coherent with current in-memory blockchain status If so, marks block.ready = true and block.forged = true
Blockchain.prototype.onBlockForged = function(block) {
if(self.isPresent(block)){
modules.accounts.getAccount({publicKey:block.generatorPublicKey}, function(err, delegate){
library.logger.error("Double forgery - Same block - please disable delegate on one node", {id: block.id, generator:block.generatorPublicKey, username: delegate.username, height:block.height});
});
return;
}
if(self.isOrphaned(block)){
modules.accounts.getAccount({publicKey:block.generatorPublicKey}, function(err, delegate){
library.logger.error("Double forgery - Orphaned block - please disable delegate on one node", {id: block.id, generator:block.generatorPublicKey, username: delegate.username, height:block.height});
});
return;
}
if(self.isForked(block)){
var previousBlock = self.getPreviousBlock(block);
modules.accounts.getAccount({publicKey:block.generatorPublicKey}, function(err, delegate){
library.logger.error("Double forgery - Forked block - please disable delegate on one node", {id: block.id, generator:block.generatorPublicKey, username: delegate.username, height:block.height, previousBlock: block.previousBlock, previousBlockchainBlock: previousBlock.id});
});
return;
}
block.ready = true;
block.verified = true;
block.forged = true;
block.processed = false;
block.broadcast = true;
library.logger.info("Adding forged to blockchain", block.id);
self.addBlock(block);
}
EVENT onBlockVerified
to update in-memory blockchain when block has been verified
Blockchain.prototype.onBlockVerified = function(block, cb) {
var error = null;
if(!__private.blockchain[block.height]){
error = "Verified block not in blockchain. This is a bug, please do report";
}
else{
__private.blockchain[block.height].verified = true;
}
}
EVENT onBlockProcessed
to update in-memory blockchain when block has been processed and update lastBlock accordingly
Blockchain.prototype.onBlockProcessed = function(block, cb) {
var error = null;
if(!__private.blockchain[block.height]){
error = "Processed block not in blockchain. This is a bug, please do report";
}
else{
__private.blockchain[block.height].processed = true;
__private.timestampState(new Date());
if(__private.lastBlock && __private.lastBlock.id == block.previousBlock){
__private.lastBlock = block;
}
else{
error = "Processed block not consistent with last block on blockchain. This is a bug, please do report";
}
}
}
EVENT onFork
Log the event in logs TODO: no particular action taken yet
Blockchain.prototype.onFork = function (block, cause) {
library.logger.info('Fork', {
delegate: block.generatorPublicKey,
block: {
id: block.id,
timestamp: block.timestamp,
height: block.height,
previousBlock: block.previousBlock
},
cause: cause
});
};
manage the internal state logic
__private.timestampState = function (lastReceipt) {
if (!__private.lastReceipt) {
__private.lastReceipt = {
date: new Date()
};
}
if(lastReceipt){
__private.lastReceipt.date = lastReceipt;
}
var timeNow = new Date().getTime();
__private.lastReceipt.secondsAgo = Math.floor((timeNow - __private.lastReceipt.date.getTime()) / 1000);
if(modules.delegates.isActiveDelegate()){
__private.lastReceipt.stale = __private.lastReceipt.secondsAgo > 10;
__private.lastReceipt.rebuild = __private.lastReceipt.secondsAgo > 60;
}
else if(modules.delegates.isForging()){
__private.lastReceipt.stale = __private.lastReceipt.secondsAgo > 30;
__private.lastReceipt.rebuild = __private.lastReceipt.secondsAgo > 100;
}
else {
__private.lastReceipt.stale = __private.lastReceipt.secondsAgo > 60;
__private.lastReceipt.rebuild = __private.lastReceipt.secondsAgo > 200;
}
if(__private.lastBlock.height < 52){
__private.lastReceipt.rebuild = false;
}
__private.lastReceipt.height = __private.lastBlock.height;
return __private.lastReceipt;
};
module.exports = Blockchain;


My name is Jaickey, and I enjoy meeting new people and travelling to new places to explore the rich cultures and tradition .I’m currently looking for a internship.
Part of Blood donation team as a volunteer, which is part of NSS. Co-ordinating blood donation camps in campus and actively taking part in all the blood donation camps held in my college till now. Also, motivating others to give blood and save lives. Worked as a part of the team to assist the blood donors by signing them in and out of the blood drive and also assisting the donors with anything they needed after they donated. I also maintained a professional tone of voice and words at all times, including during busy hours.
 I like to spend quality time with my friends. I like to go out and enjoy nature's beauty.
During my free time , I like watching comedy movies.


public class Location
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
direction |
Map |
map |
static int |
VIEW_RANGE |
int |
xCord |
int |
yCord |
| Constructor and Description |
|---|
Location(Map map,
int xCord,
int yCord)
Construct a new Location in this Map
|
Location(Map map,
int xCord,
int yCord,
int direction)
Construct a new Location in this Map
|
| Modifier and Type | Method and Description |
|---|---|
Location |
atOffset(int x,
int y) |
boolean |
equals(java.lang.Object obj) |
int |
getDirection() |
Map |
getMap() |
int |
getxCord() |
int |
getyCord() |
Location |
inDirection(int direction) |
boolean |
inView(Location location) |
Location |
switchDirection(int direction) |
java.lang.String |
toString() |
public static final int VIEW_RANGE
public final int xCord
public final int yCord
public final Map map
public final int direction
public Location(Map map, int xCord, int yCord)
map
- xCord
- yCord
- public Location(Map map, int xCord, int yCord, int direction)
map
- xCord
- yCord
- direction
- public Map getMap()
public int getxCord()
public int getDirection()
public int getyCord()
public Location atOffset(int x, int y)
x
- offsety
- offsetpublic Location inDirection(int direction)
direction
- public Location switchDirection(int direction)
direction
- public boolean inView(Location location)
location
- public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object


Chapter 3 Session 3
In this session we will learn:
- lists, another data structure
- Classes
- the DGEList object from the package limma
3.1 Lists
Recall that we have previously learnt about the data structures: vectors, matrices and dataframes. Another important data structure is the list. Like a vector, it is 1 dimensional i.e. one row of data. Unlike vectors, you can put several data types in a list. Here, our list includes data of the integer, a character and a double types:
list(1, "a", 1.5)
## [[1]]
## [1] 1
##
## [[2]]
## [1] "a"
##
## [[3]]
## [1] 1.5
Not only can you put different data types into a list, you can also put a WHOLE data structure into one element of a list. In the list below, the first element is a vector that contains 3 numbers, the second element is a character and the third element is a dataframe that has two columns.
list(c(1,2,3),
c("words", "letters"),
data.frame(column1 = c(1,2,3), column2 = c("a","b","c"))
)
## [[1]]
## [1] 1 2 3
##
## [[2]]
## [1] "words" "letters"
##
## [[3]]
## column1 column2
## 1 1 a
## 2 2 b
## 3 3 c
The output can often help you understand how the list is structured. The double brackets (e.g. [[1]]
) signifies an element of the list and which index it is at. Here there are three elements in our list so the numbers in the double square brackets go from 1 to 3. Underneath the [[1]]
and [[2]]
, there is a [1]
- this indicates that the first and second elements both contain a vector. Underneath [[3]]
you see the standard output for a dataframe, which we have seen before.
You even include a list within a list (within a list, within a list….I call this ‘list - ception’). This is where it starts to get confusing.
list(1, list(1,"a"))
## [[1]]
## [1] 1
##
## [[2]]
## [[2]][[1]]
## [1] 1
##
## [[2]][[2]]
## [1] "a"
- The first element, indicated by
[[1]]
, is a vector, indicated by the[1]
underneath. - The second element, indicated by the first
[[2]]
contains a list:[[2]][[1]]
- tells you that the second element is a list, of which the first element of the inner list is the number 1.[[2]][[2]]
- tells you that the second element is a list, of which the second element of the inner list is “a”.
Many bioconductor packages, including limma, use lists so it is an important data structure to understand.
Challenge 3.1
Below is the output from a list.
How many element of the list are there?
Look carefully at each element and answer the following questions about EVERY element of the list:
- How many elements does the element of the list contain?
- If there are several elements within this element, what does each element contain?
## [[1]]
## [[1]][[1]]
## [1] 1 2
##
## [[1]][[2]]
## [1] "b"
##
##
## [[2]]
## [1] "a" "b"
##
## [[3]]
## [[3]][[1]]
## [[3]][[1]][[1]]
## [1] "a"
##
## [[3]][[1]][[2]]
## [1] 1
##
##
## [[3]][[2]]
## [1] "b"
##
##
## [[4]]
## [1] "end"
We can access elements of a list using square brackets. You may have noticed that there are often double square brackets [[ ]]
. There is a subtle but important difference between single square brackets and double square brackets when subsetting lists.
Let’s make a list:
my_list <- list(
c("a","b"),
c(1,2,3),
c(4,5,6)
)
Take a look at the output of obtaining the first element with single square brackets and double square brackets:
my_list[1]
## [[1]]
## [1] "a" "b"
my_list[[1]]
## [1] "a" "b"
The difference is minor; with my_list[1]
there is an extra [[1]]
at the top, with my_list[[1]]
there is no [[1]]
at the top.
The str()
function gives us some more information:
str(my_list[1])
## List of 1
## $ : chr [1:2] "a" "b"
str(my_list[[1]])
## chr [1:2] "a" "b"
This tells us that when you use single brackets, the output is a list containing one element, which is a vector. When you use double brackets, the output is just a vector, NOT contained within a list.
Let’s use an analogy to gain a better understanding of this concept. Below is a picture of a cargo train, which contains a box in each segment. This represents a list containing 3 elements, with each element being the box.
Using a single bracket returns you the train segment with the box inside.
Using double brackets returns you just the box inside.
Back to our list:
my_list
## [[1]]
## [1] "a" "b"
##
## [[2]]
## [1] 1 2 3
##
## [[3]]
## [1] 4 5 6
To obtain the first element of the vector contained within the first element of the list (the "a"
) you can use:
my_list[[1]][1]
## [1] "a"
The [[1]]
gives you just the vector contained within the first element of the list:
my_list[[1]]
## [1] "a" "b"
The second square bracket [1]
then gives you the first element of the vector:
my_list[[1]][1]
## [1] "a"
Challenge 3.2
First create a new list:
my_list2 <- list(
c("a","b"),
c(1,2,3),
data.frame(Name = c("Sally", "Andy"), Age = c(40,32))
)
my_list2
## [[1]]
## [1] "a" "b"
##
## [[2]]
## [1] 1 2 3
##
## [[3]]
## Name Age
## 1 Sally 40
## 2 Andy 32
Subset this list to obtain a data structure that gives the following outputs:
## [1] "a" "b"
## [1] "b"
## [[1]]
## [1] 1 2 3
## [1] 40
## Name Age
## 1 Sally 40
## [[1]]
## Name Age
## 1 Sally 40
## 2 Andy 32
3.1.1 Named list
You can also have names for each element of your list:
named_list <- list(
name = c("Andy", "Sally"),
age = c(32,40)
)
named_list
## $name
## [1] "Andy" "Sally"
##
## $age
## [1] 32 40
If your list is named, you can use $
to access each element of your list:
named_list$name
## [1] "Andy" "Sally"
Note that the output is just the vector, NOT a vector within a list. Thus named_list[[1]]
does the same thing as named_list$name
.
Recall that we access columns in dataframes with the $
symbol as well. This means that if you have a dataframe within a list, you can obtain a column within the dataframe that is within the list using two $
’s:
Let’s start with a list that contains a dataframe as its first element
named_list2 <- list(
details = data.frame(name = c("Andy", "Sally"),
age = c(32,40))
)
named_list2
## $details
## name age
## 1 Andy 32
## 2 Sally 40
We can get the age column using:
named_list2$details$age
## [1] 32 40
Extra:The reason you can also access columns in a dataframe with $
is because ‘under the hood’ a dataframe is actually a list. It is a list with the constraint that each element is a vector of the same length. Each element in the list is thus a column in the ‘dataframe’.
Challenge 3.3
Take a look at the named list below:
named_list3 <- list(
cats = data.frame(name = c("Garfield", "Hello Kitty"),
age = c(3,10), stringsAsFactors = FALSE),
dogs = data.frame(name = c("Spot", "Snoopy"),
age = c(5,14), stringsAsFactors = FALSE)
)
named_list3
## $cats
## name age
## 1 Garfield 3
## 2 Hello Kitty 10
##
## $dogs
## name age
## 1 Spot 5
## 2 Snoopy 14
Using just $
, obtain:
- the vector of cat names
- the dog dataframe
- the vector of dog ages
3.2 Classes
Everything in R is an ‘object’ - every function that we have used and every data structure we have created in R. Each object falls under a ‘class’. A class defines a type of object and what properties it has. For example, every list created with list()
is an object that falls under the class ‘list’. The ‘list’ class describes how ‘list’ objects behave.
To find out what class an object falls under, use the function class()
:
class(list(1, 2, "a"))
## [1] "list"
class(list("a", "b", 4))
## [1] "list"
Bioconductor packages often use special classes. For example, the limma package uses the DGEList
class. This is a class that is specifically designed for storing read count data from RNA sequencing. It is a special ‘list’ that must contain two components:
counts
- which must be a numeric matrix, that stores counts. Each row must be a gene and each column must be a sample.samples
- which must be a dataframe, that contains information about each sample. Each row must be a sample and must contain information about the group (e.g. treatment group) the sample belongs to, the library size of that sample and the normalisation factor for that sample.
There are also a number of optional components of the DGEList
class, such as a dataframe containing gene annotation information.
3.3 Packages
Last session we installed the packages limma and edgeR. This downloads the files for each package and saves them to your computer. You generally only need to do this once.
To use a package you must ‘load’ them EACH time you start a new R session. You do this with the library()
function. Let’s load both limma and edgeR:
library(edgeR)
## Loading required package: limma
library(limma)
3.4 DGEList
The RNA sequencing analysis you will be guided through is a simplified version of that performed in the article from Law et al. (Law et al. 2016). The RNA sequencing data we will use is from Sheridan et al. (Sheridan et al. 2015). It consists of 9 samples from 3 cell populations; basal, luminal progenitor (LP) and mature luminal (ML), which has been sorted from the mammary glands of female virgin mice. The reads have been aligned to the mouse reference genome (mm10) and reads summarised at the gene-level (using mm10 RefSeq-based annotation) to obtain gene counts. Gene level summarisation involves counting the number of reads mapped to each gene, for each sample. The resulting ‘count of reads’ is often referred to simply as ‘counts’.
We are going to start our RNA-seq analysis with gene counts. The data files for this session should have been emailed to you (though you can also obtain them from Github). Please uncompress (extract) the files and put them in your working directory.
Each data file corresponds to one sample and thus there is one data file for each sample. Each data file details the number of reads mapped to every gene for the sample corresponding to that data file. Within each data file, there are 3 columns - ‘EntrezID’, ‘GeneLength’ and ‘Count.’ ‘EntrezID’ and ‘GeneLength’ gives the EntrezID and gene length of one gene and ‘Count’ gives the number of reads mapped to that gene. The first four lines of one file (and thus one sample) is shown below:
EntrezID GeneLength Count
497097 3634 2
100503874 3259 0
100038431 1634 0
19888 9747 1
We will be looking at 9 samples (and using 9 data files) in total. Their details are shown below:
| File name | Sample name | Phenotype group |
|---|---|---|
| GSM1545535_10_6_5_11.txt | 10_6_5_11 | LP |
| GSM1545536_9_6_5_11.txt | 9_6_5_11 | ML |
| GSM1545538_purep53.txt | purep53 | Basal |
| GSM1545539_JMS8-2.txt | JMS8-2 | Basal |
| GSM1545540_JMS8-3.txt | JMS8-3 | ML |
| GSM1545541_JMS8-4.txt | JMS8-4 | LP |
| GSM1545542_JMS8-5.txt | JMS8-5 | Basal |
| GSM1545544_JMS9-P7c.txt | JMS9-P7c | ML |
| GSM1545545_JMS9-P8c.txt | JMS9-P8c | LP |
To create a DGEList
class object (or simply ‘DGEList
object’), we will use the readDGE()
function. There are three important arguments to this function:
files
- a vector of data file namespath
- the path to the directory that contains your data files. If the data files are in your working directory, don’t worry about this argument. If the data files are somewhere else, like a folder called ‘data’, in your working directory you must give the path to that foldercolums
- the columns of the input files which have the gene names and counts respectively (as the column indices)
First, we will create a vector of the file names. You can simply copy and paste this code into your R script.
files <- c("GSM1545535_10_6_5_11.txt", "GSM1545536_9_6_5_11.txt",
"GSM1545538_purep53.txt", "GSM1545539_JMS8-2.txt",
"GSM1545540_JMS8-3.txt", "GSM1545541_JMS8-4.txt",
"GSM1545542_JMS8-5.txt", "GSM1545544_JMS9-P7c.txt",
"GSM1545545_JMS9-P8c.txt")
Next, we will create our DGEList
object. I have put my data files in a folder called “data” (within my working directory). Thus, I must specify path = "data"
. Depending on where you have put your data files, you may need a different input to path
or not have to include the path
argument (if your data files are NOT within a folder in your working directory).
x <- readDGE(files, path = "data", columns = c(1,3))
The readDGE()
function uses the read counts from our 9 data files (and thus 9 samples) to create a DGEList
object containg count information for all 9 samples and every gene included in our data files.
It has 2 elements, one named samples
and one named counts
. You can take a look at each using View()
:
View(x$counts)
The output should look like this:
Notice that you can use the vertical and horizontal scroll bars to view all of the data. Each row is a gene, denoted by it’s EntrezID and each column is a sample. Each value in this matrix gives the count value for one gene and one sample. Recall also that DGEList
specifies that the counts
element of the list must be a numeric matrix.
Notice also, that the column names are the file names. The DGEList
object was created using the information in the “.txt” files. The function readDGE()
has used the file name as the name of each sample because we have not told readDGE()
what the sample names are. It has therefore simply used the filenames. This makes logical sense as each file contained the count data for one sample.
The samples
dataframe can also be viewed:
View(x$samples)
The output should look something like this:
This is a dataframe where each row is 1 sample, and details of each sample is given in the 4 columns.
files
gives the file names.group
details the phenotype group the sample belongs to. As we have not specified this yet, the default1
is given for each sample.lib.size
gives the library size. This is the total sum of all counts for that sample.norm.factors
this gives the normalisation factor for each sample. As we have not calculated any normalisation factors, this is 1 for each sample.
This dataframe also has row names, which are currently the file names of each sample. Again, because we have not told readDGE()
what the sample names are, it has used the file names.
Let’s change the row names to be the sample names, instead of the full file name (see Table 3.1).
We can do this by first creating a vector of sample names. You can simply copy and paste the code below into your R script.
samplenames <- c("10_6_5_11", "9_6_5_11", "purep53", "JMS8-2", "JMS8-3",
"JMS8-4", "JMS8-5", "JMS9-P7c", "JMS9-P8c")
We can change the row names in the samples
dataframe using the rownames()
function. This function will give you the row names of a data structure (a dataframe in this instance):
rownames(x$samples)
## [1] "GSM1545535_10_6_5_11" "GSM1545536_9_6_5_11" "GSM1545538_purep53"
## [4] "GSM1545539_JMS8-2" "GSM1545540_JMS8-3" "GSM1545541_JMS8-4"
## [7] "GSM1545542_JMS8-5" "GSM1545544_JMS9-P7c" "GSM1545545_JMS9-P8c"
We can see that the row names are the file names as we saw above. To replace these file names with the sample names we can run:
rownames(x$samples) <- samplenames
We have seen this type of notation before in session 1 (section 1.11). This code assigns the samplenames
vector as the row names of the samples
dataframe.
Challenge 3.4
- Use the
colnames()
function to replace the column names of the count matrix from being file names to sample names. We need to do this because the sample names in thecounts
matrix and thesamples
dataframe should be the same. - The code below creates a factor vector (called
group
) that specifies the phenotype group each sample belongs to. It is ordered such that the first element in the vector corresponds to the first row of thesamples
dataframe.
group <- as.factor(c("LP", "ML", "Basal", "Basal", "ML", "LP", "Basal", "ML", "LP"))
Replace the group
column of the samples
dataframe with the group
factor vector.
Hint: you will need to use the list subsetting notation we learnt at the start of this session.
- Additional gene annotation information about the genes from our RNA-seq data can be found in the file “Ses3_geneAnnot.tsv”. Read this file in (specifying
stringsAsFactors = FALSE
) and add it as another element namedgenes
inx
(ourDGEList
object).
Hint: the command for adding an element to a list is similar to the command for adding a column to a dataframe. Take a look at Section 1.11 to review how to do the latter.
3.5 Homework
- Subset the first column of the
count
matrix fromx
(ourDGEList
object) and ‘save’ (assign) it to a variable calledsample1
.
- Find out how many genes had a count of ‘0’.
- Find the total sum of all counts for that sample. Compare this number with the corresponding (first) number in the
lib.size
column from thesamples
dataframe. Is it the same?
Calculate the total sum of the library sizes, using the
lib.size
column from thesamples
dataframe fromx
(ourDGEList
object).Using the
genes
dataframe fromx
(ourDGEList
object), find out how many genes are from chromosome 5.
Hint: you will need to remove rows where the TXCHROM
column is NA
. Revisit section 2.2 to review missing values.
3.6 Answers
Challenge 3.1
- There are 4 elements of this list.
- For each element -
- Within the first element, there are 2 elements. The first is a vector containing 2 numbers and the second is a vector containing one character type (note there are no ‘scalars’ in R, thus
"a"
is a vector with 1 element). - The second element contains 1 element. It is a vector containing two character types.
- The third element contains 2 elements. Within the first element is another list. Within this list there are 2 elements, both being character types. The second element of this nested list is a vector containing one character type.
- The fourth element is a vector containing one character type.
Challenge 3.2
my_list2[[1]]
## [1] "a" "b"
my_list2[[1]][2]
## [1] "b"
my_list2[2]
## [[1]]
## [1] 1 2 3
my_list2[[3]][1,2]
## [1] 40
my_list2[[3]][1,]
## Name Age
## 1 Sally 40
my_list2[3]
## [[1]]
## Name Age
## 1 Sally 40
## 2 Andy 32
Challenge 3.3
# 1. the vector of cat names
named_list3$cats$name
## [1] "Garfield" "Hello Kitty"
# 2. the dog dataframe
named_list3$dogs
## name age
## 1 Spot 5
## 2 Snoopy 14
# 3. the vector of dog ages
named_list3$dogs$age
## [1] 5 14
Challenge 3.4
# 1
colnames(x$counts) <- samplenames
# 2
x$samples$group <- group
# 3
geneAnnot <- read.delim("data/Ses3_geneAnnot.tsv", stringsAsFactors = FALSE)
x$genes <- geneAnnot
References
Law, Charity W, Monther Alhamdoosh, Shian Su, Gordon K Smyth, and Matthew E Ritchie. 2016. “RNA-Seq Analysis Is Easy as 1-2-3 with Limma, Glimma and edgeR.” F1000Research 5. Faculty of 1000 Ltd.
Sheridan, Julie M, Matthew E Ritchie, Sarah A Best, Kun Jiang, Tamara J Beck, François Vaillant, Kevin Liu, et al. 2015. “A Pooled shRNA Screen for Regulators of Primary Mammary Stem and Progenitor Cells Identifies Roles for Asap1 and Prox1.” BMC Cancer 15 (1). BioMed Central: 221.


@* Displays mobile redirect to item scan page. Most QR code readers load the page twice. This redirect keeps actions from being registered twice *@ @(message: String)


public class Checkers extends Game implements java.util.Observer
| Modifier and Type | Field and Description |
|---|---|
private static int |
boardColorSpeed |
private static int |
boardWait |
(package private) int[][] |
checkersStatus |
private static int |
controlAnimSpeed |
(package private) static boolean |
DEBUG |
private java.lang.String |
emptyColor |
private int |
emptyIntensity |
private static boolean |
forceQuitting |
(package private) boolean |
hasCaptured |
private java.lang.String |
player1Color |
private java.lang.String |
player1KingColor |
private int |
player1Remaining |
private java.lang.String |
player2Color |
private java.lang.String |
player2KingColor |
private int |
player2Remaining |
private static int |
playerColorSpeed |
private int |
playerIntensity |
private boolean |
quittingGame |
private int |
quitX |
private int |
quitY |
private boolean |
resettingGame |
private int |
resetX |
private int |
resetY |
(package private) boolean |
waitingForInput |
(package private) int |
waitingForPlayer |
difficulty, gameID, gameName, gamesPlayed, running, runningGameName, sizeX, sizeY
| Constructor and Description |
|---|
Checkers()
Constructor
|
Checkers(boolean b)
Used for setting the link to the Observable
|
| Modifier and Type | Method and Description |
|---|---|
private void |
begin()
Starts the game.
|
private boolean |
canCapture(int fromX,
int fromY,
int player)
Used to determine whether a player is able to capture something.
|
private void |
capture(int x,
int y,
int capturedplayer)
Captures the piece at the position determined by the input parameters
|
private boolean |
checkPlayer(int lastX,
int lastY,
int player)
Used to check whether the selected pad contains the designated player's
piece
|
private void |
colorBoard()
Colors the board and sets the initial values on the internal 2D array
|
private void |
continueCapture1(int lastX,
int lastY)
Method called when player 1 can capture multiple another piece
immediately after playing
|
private void |
continueCapture2(int lastX,
int lastY)
Method called when player 2 can capture multiple another piece
immediately after playing
|
private static void |
delay(int value)
Returns after a given delay value in ms
|
void |
disablelightControls()
Disables all blinking control lights
|
private void |
displayRemaining()
Displays the remaining amount of pieces available to every player
|
void |
displayStatusOnConsole()
Used for debugging: Displays the current checkerboard's status on the
console.
|
private void |
fillPlayer1()
Colors player 1's pieces and set the initial values on the internal 2D
array
|
private void |
fillPlayer2()
Colors player 2's pieces and set the initial values on the internal 2D
array
|
static void |
forceQuit()
Forcefully quits the game
|
private void |
inPlayer1()
Asks player 1 to play.
|
private void |
inPlayer2()
Asks player 2 to play
|
private boolean |
isCommand(int x,
int y)
Returns true if the pad located by the given parameters is a Command pad,
meaning not part of the game area
|
private boolean |
isEnemy(int x,
int y,
int player)
Returns true if the pad at X and Y locations given is enemy to the player
given
|
private boolean |
isKing(int x,
int y)
Returns true if the piece located by the given parameters is a King piece
|
private boolean |
isLegalKingMove(int movetoX,
int movetoY,
int lastX,
int lastY,
int player)
Checks if the player is allowed to move to the designated location from
his initial location.
|
private boolean |
isLegalMove(int x,
int y,
int player)
Checks if the location [x][y] is an empty slot and returns true if it is
|
private boolean |
isLegalMove(int movetoX,
int movetoY,
int lastX,
int lastY,
int player)
Checks if the player is allowed to move to the designated location from
his initial location.
|
private void |
lightControls()
Turns on the extra 'settings' lights.
|
private void |
movePlayerTo(int movetoX,
int movetoY,
int movefromX,
int movefromY,
int capturedX,
int capturedY,
int player,
boolean isKing,
boolean hasCaptured)
Move selected player's piece to designated location based on input
parameters
|
private boolean |
outOfBounds(int x,
int y)
Returns true if the pad located by the given parameters is not in the
game area
|
private void |
playerwon(int winner)
If a player has won, blink a specific pad and clear all the slots that
don't contain the winning player's pieces.
|
static void |
quitGame()
Quits the game.
|
void |
quitGameQuery()
Asks players to confirm if they want to quit the game or not.
|
private void |
recolorBoard()
Colors the board again in case a color failed to properly display on the
launchpad
|
void |
resetGame()
Initializes Launchpad settings and sets initial variables for the game
|
void |
resetGameQuery()
Asks players to confirm if they want to reset the game or not Blinks the
Reset pad (arrow down) while waiting for an answer.
|
void |
restartGameQuery()
Asks players if they want to play another game Blinks the Reset pad
(arrow down) while waiting for an answer.
|
void |
retreiveFromDatabase()
TODO
|
void |
saveToDatabase()
Saves names and score to database Or will save game status to database so
we can resume later on
|
private void |
setChecker(int x,
int y,
int value)
Turns on the pad at X and Y given and sets the internal 2D array to the
value (representing the piece and player) given
|
private void |
showLegalMoves(int x,
int y,
int player,
boolean showoroff)
Shows all legal moves from the X and Y location given for the player
given.
|
void |
startGame()
Initiator for the Checkers game.
|
void |
update(java.util.Observable arg0,
java.lang.Object arg1)
Not used in this game, but this is called immediately upon receiving an
input.
|
displayNumberOfGamesPlayed, getNumberOfGamesPlayed, incrementGamesPlayed, isRunning, prepareGame, setRunning, setRunningGame
private static int boardColorSpeed
private static int boardWait
int[][] checkersStatus
private static int controlAnimSpeed
static boolean DEBUG
private java.lang.String emptyColor
private int emptyIntensity
private static boolean forceQuitting
boolean hasCaptured
private java.lang.String player1Color
private java.lang.String player1KingColor
private int player1Remaining
private java.lang.String player2Color
private java.lang.String player2KingColor
private int player2Remaining
private static int playerColorSpeed
private int playerIntensity
private boolean quittingGame
private int quitX
private int quitY
private boolean resettingGame
private int resetX
private int resetY
boolean waitingForInput
int waitingForPlayer
public Checkers()
public Checkers(boolean b)
b
- Unusedprivate void begin()
private boolean canCapture(int fromX, int fromY, int player)
fromX
- Piece position XfromY
- Piece position Yplayer
- player 1 or 2 playingprivate void capture(int x, int y, int capturedplayer)
x
- X position of the piecey
- Y position of the piececapturedplayer
- player who's piece has been capturedprivate boolean checkPlayer(int lastX, int lastY, int player)
lastX
- Last X pressedlastY
- Last Y pressedplayer
- Current playerprivate void colorBoard()
private void continueCapture1(int lastX, int lastY)
lastX
- X location of the player 1's piecelastY
- Y location of the player 1s pieceprivate void continueCapture2(int lastX, int lastY)
lastX
- X location of the player 2's piecelastY
- Y location of the player 2's pieceprivate static void delay(int value)
value
- delay durationpublic void disablelightControls()
private void displayRemaining()
public void displayStatusOnConsole()
private void fillPlayer1()
private void fillPlayer2()
public static void forceQuit()
private void inPlayer1()
private void inPlayer2()
private boolean isCommand(int x, int y)
x
- X locationy
- Y locationprivate boolean isEnemy(int x, int y, int player)
x
- X locationy
- Y locationplayer
- Player we're checking forprivate boolean isKing(int x, int y)
x
- X locationy
- Y locationprivate boolean isLegalKingMove(int movetoX, int movetoY, int lastX, int lastY, int player)
movetoX
- X location coming frommovetoY
- Y location coming fromlastX
- X location going tolastY
- Y location going toplayer
- Player movingprivate boolean isLegalMove(int x, int y, int player)
x
- X locationy
- Y locationplayer
- Player we're checking forprivate boolean isLegalMove(int movetoX, int movetoY, int lastX, int lastY, int player)
movetoX
- X location going tomovetoY
- Y location going tolastX
- X location coming fromlastY
- Y location coming fromplayer
- Player attempting the moveprivate void lightControls()
private void movePlayerTo(int movetoX, int movetoY, int movefromX, int movefromY, int capturedX, int capturedY, int player, boolean isKing, boolean hasCaptured)
movetoX
- X location going tomovetoY
- Y location going tomovefromX
- X location coming frommovefromY
- Y location coming fromcapturedX
- X location of captured piece if anycapturedY
- Y location of captured piece if anyplayer
- The player making the moveisKing
- True if the piece moved is a KinghasCaptured
- True if the player has captured a pieceprivate boolean outOfBounds(int x, int y)
x
- X locationy
- Y locationprivate void playerwon(int winner)
winner
- Winning player (1 or 2)public static void quitGame()
public void quitGameQuery()
private void recolorBoard()
public void resetGame()
public void resetGameQuery()
public void restartGameQuery()
public void retreiveFromDatabase()
retreiveFromDatabase
in class Game
public void saveToDatabase()
saveToDatabase
in class Game
private void setChecker(int x, int y, int value)
x
- X locationy
- Y locationvalue
- piece number. 1 and 3 for Player 1 pieces, 2 and 4 for Player
2private void showLegalMoves(int x, int y, int player, boolean showoroff)
x
- X location of the selected piecey
- Y location of the selected pieceplayer
- Player selectingshoworoff
- True if the Legal moves are to be shown, False otherwisepublic void startGame()
public void update(java.util.Observable arg0, java.lang.Object arg1)


The MagnaLex module defines a set of classes to represent bible translations with its books, chapters and verses.
Additionally it provides an interface to register bible sources for loading bible translations.
There are different variations of verse numbering throughout the bible translations. Therefore, MagnaLex always couples a book-chapter-verse reference with a translation to be precise about the verse numbering.
Methods
(inner) library(rootPathopt) → {Library}
Create a new library with bible translations.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
rootPath |
string |
<optional> |
The root directory for XML Bible node packages. |
Returns:
- Type
- Library
(inner) xmlBibleSource(id, sourceDir)
Creates a BibleSource
capable of loading XML bible translations in node packages from the given root directory.
Every translation resides in a folder called xmlbible-<Translation ID>
.
Its package.json
has an attribute xmlbible
with the following structure:
{
"name": "<Full name of the bible translation>",
"shortName": "<ID of the bible translation>",
"language": "<IETF language tag of the translation>",
"rootPath": "<Relative path to the folder with XML files>"
}
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | An ID for the bible source |
sourceDir |
string | The root dir to search for bible translations |


public abstract class Recommender extends AbstractAlg
MemoryBasedRecomender
and ModelBasedRecommender
which in turn are abstract classes for memory-based recommendation algorithm and model-based recommendation algorithm.
All completed recommendation algorithms must inherit directly this Recommender
or derived indirectly from MemoryBasedRecomender class and ModelBasedRecommender class.
These completed recommendation algorithms must implement two main abstract methods estimate(RecommendParam, Set)
and recommend(RecommendParam, int)
and two other abstract methods such as setup(Dataset, Object...)
and getDataset()
.
As a convention, this class and all classes extending it are called recommender
.| Modifier and Type | Field and Description |
|---|---|
protected FilterList |
filterList
The filter list contains of filters.
|
config, logger
| Constructor and Description |
|---|
Recommender()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract RatingVector |
estimate(RecommendParam param,
java.util.Set<java.lang.Integer> queryIds)
This method is very important, which is used to estimate rating values of given items (users).
|
protected void |
finalize() |
abstract Dataset |
getDataset()
Any recommender has always a reference to a dataset represented by
Dataset class because recommender is executed on the dataset. |
FilterList |
getFilterList()
Getting a list of filters.
|
PropList |
getParameters()
Getting the parameters of this class as properties list specified by
PropList . |
protected RecommendParam |
preprocess(RecommendParam param)
Pre-processing the specified recommendation parameter.
|
abstract RatingVector |
recommend(RecommendParam param,
int maxRecommend)
This method is the most important one in recommendation task.
|
abstract void |
setup(Dataset dataset,
java.lang.Object... params)
Setting up this recommender based on specified dataset and additional parameters
|
void |
unsetup()
Unset this parameter.
|
createDefaultConfig, getConfig, resetConfig, toString
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, newInstance
protected FilterList filterList
estimate(RecommendParam, Set)
and recommend(RecommendParam, int)
require filtering tasks specified by filters of this list.
Suppose every item has types 1, 2, 3, an example of filtering task is to select only type-1 items for recommendation task, which means that the list of recommended items produced by the method recommend(RecommendParam, int)
later contains only type-1 items.public abstract void setup(Dataset dataset, java.lang.Object... params) throws java.lang.Exception
dataset
- dataset is the main parameter to setup this recommender.params
- Additional parameters to set up this recommender. This parameter is really an array of sub-parameters.java.lang.Exception
- if any error occurs.public void unsetup()
setup(Dataset, Object...)
is called again.public FilterList getFilterList()
estimate(RecommendParam, Set)
and recommend(RecommendParam, int)
will call this method before estimation task and recommendation task.
Suppose every item have types 1, 2, 3, an example of filtering task is to select only type-1 items for recommendation task, which means that the list of recommended items produced by the method recommend(RecommendParam, int)
later contains only type-1 items.public abstract Dataset getDataset()
Dataset
class because recommender is executed on the dataset.
Some recommender (s) store internal dataset but others only have references to dataset.
Anyway, such reference always exists.public abstract RatingVector estimate(RecommendParam param, java.util.Set<java.lang.Integer> queryIds)
RatingVector
for more details.
The input parameters are a recommendation parameter and a set of item (user) identifiers.
The output result is a set of predictive or estimated rating values of items (users) specified by the second input parameter.param
- recommendation parameter. Please see RecommendParam
for more details of this parameter.queryIds
- set of identifications (IDs) of items that need to be estimated their rating values.public abstract RatingVector recommend(RecommendParam param, int maxRecommend)
RatingVector
for more details.
The input parameters are a recommendation parameter and the maximum recommended items (users) in the returned rating vector.
The output result is a list of recommended items (users) which is provided to the user (item).param
- recommendation parameter. Please see RecommendParam
for more details of this parameter.maxRecommend
- the maximum recommended items (users) in the returned rating vector.RatingVector
class. The number of items (users) of such list is specified by the the maximum number.protected RecommendParam preprocess(RecommendParam param)
param
- recommendation parameter. Please see RecommendParam
for more details of this parameter.public PropList getParameters()
PropList
.
Such parameters are extracted from the configuration and such configuration in turn is returned by the AbstractAlg.getConfig()
method.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable


Self-taught, loves to learn and develop, independent, has a high work ethic. Curious and inquisitive.
I worked in the Ministry of Education for almost 20 years and in every job I did I was one of the best and leading.
As someone who loves change and movement in life, I made sure to move as much as possible and serve in diverse roles.
I also took care of diversity in my studies - education, business administration, programming.
It's time to change careers.
I was looking for a profession that suited my personality and skills - I found that the QA role suits me in many ways: I have the ability to pay attention to details, see the object in "3D" and examine it in several aspects.I am a leader by birth and believe that very soon you will find that I am suitable for you to lead teams.


{% extends 'productbase.html' %} {% load static %} {% block content %}
Since our origin, we are instrumental in offering premium quality Collar Type Pouch Packing Machine.
• Sturdy design.
• Optimum performance,
• Long service life


Confirm element Demo
Open a confirm box
Open a confirm box customized
Do you really want to delete this element?
¿Are you sure?


Before Change
np.ndarray
array of shape (size, histo dimension).
return sample_histodd((self.bins, self.edges), size, self.state)
def update(self, points):
Update bins of sampler"s histogram by throwing in additional points.
After Change
array of shape (size, histo dimension).
// Choose bins to use according to non-zero probabilities
bin_nums = np.random.choice(self.nonzero_probs_idx, p=self.nonzero_probs, size=size)
// uniformly generate samples from selected boxes
low, high = self.l_all[bin_nums], self.h_all[bin_nums]
return self.state_sampler(low=low, high=high)
def update(self, points):
Update bins of sampler"s histogram by throwing in additional points.


presents
Graph Karaoke
Powered by Neo4j
Graph Karaoke
Powered by Neo4j
{{ artist }}
{{ song_title }}
{{ song_lyrics }}
Artist
Song Title
Submit
Reset


News story
Information for schools about the database, the reasons for establishing it, and the requirement to keep it up to date.
Everyone involved in the governance of an academy, multi-academy trust ( MAT ) or maintained school holds an important public office. The recent white paper Educational Excellence Everywhere sets out our plans to implement a national database of all those involved in governance by extending the information collected via Edubase . This is part of our drive to increase transparency on who governs our schools. It will enable DfE to more quickly and accurately identify individuals who have a role in governance. It will also help boards as well as DfE to identify more easily where individuals govern in more than one context.
From September 2016 the Academies Financial Handbook will require academy trusts to provide information about their members and trustees as well as (in the case of MATs ) those sitting on any local governing bodies that may be in place. Generally, academy trusts are required under their funding agreements to provide to the Secretary of State information she requests about the academy trust or the academy, which she regards as necessary to fulfil her role and responsibilities. We have pre-populated Edubase where possible with information you have provided via the Education Funding Agency’s Information Exchange . From 1 July 2016 the system will be live for academy trusts and multi-academy trusts to check their entries, make any updates, and populate any fields that are empty. Edubase will be developed by September 2016 to enable multi-academy trusts to record details of any committees that operate between the trust board and local governing bodies at school level (eg overseeing a cluster of academies within the MAT ). Trusts will be required to update Edubase as those involved in governance change.
Under section 538 of the Education Act 1996 , maintained school governing bodies will be under a duty to provide the information required on Edubase from September 2016, and keep it up to date as those involved in governance change. We do not hold information on maintained school governors and so cannot pre-populate these fields. The fields are already live for governing bodies that wish to populate them in advance of the duty coming into force in September. We will update the Governance handbook on the constitution of maintained schools governing bodies to reflect this new requirement.
For all maintained school governors, and academy trustees, members and local governors, the data we will collect in Edubase and make publicly available is:
In addition, for all these individuals we will collect within Edubase, but not publish, a range of information to help us to identify specific individuals:
This governance data that is not publically available will be encrypted within the system and access will be restricted to a small number of users who need it to fulfil their official responsibilities. The email address of the chair of the board will be made available to regional schools commissioner offices on request where they need direct contact with the chair. Subject to successful pilots, we will also use the email address to send to chairs information about the issues that national performance data suggests the board needs to address with its senior leadership team.
When collecting information from your governors and trustees please make them aware that you will be sharing this information with DfE , and also explain the reasons why the information is being collected and the purpose to which it will be used.
EduBase is accessed via your Secure Access account.


We are going to be controlling a Lego based Logo Turtle. This was built as a project to show children how to program without having to teach them how to program.
pendown
forward 10
right 90
forward 10
right 90
forward 10
right 90
forward 10
penup
Now, give it a try!


I was born and raised in NYC, but my real roots reach to South America. I owe my travel bug to being a first generation American with family all over the world - we were always on the go!
My passion: I LOVE music - it's one of the most powerful and diverse methods for expression & communication. In the meantime, I get my fix by going to lots & lots of concerts. I'm at 160 and counting!
A fun fact: As a true New Yorker, I'm slightly embarrassed to say that I only learned how to ride a plain ol'stationary bike 1 year ago, and have yet to learn to drive. But, the real takeaway is that I'm learning!


ViMapping Class Reference
| Inherits from | NSObject |
| Declared in | ViMap.h |
Overview
A mapping of a key sequence to an editor action, macro or Nu expression.
New mappings are created in a ViMap.
Constants
Map flags
ViMapSetsDot
: This command sets the dot commandViMapNeedMotion
: This command needs a following motion command (ie, it’s an operator)ViMapIsMotion
: This is a motion commandViMapLineMode
: This command operates on whole linesViMapNeedArgument
: This command needs a following character argument
Tasks
Getting mapping attributes
-
scopeSelector
The scope this mapping applies to.
property -
keyString
A string describing the key sequence.
property -
keySequence
An array of NSNumbers that make up the key sequence.
property -
action
The editor action.
property -
recursive
YES if this macro should be evaluated recursively.
property -
macro
A key string describing the keys that make up the macro.
property -
expression
A Nu expression macro.
property -
parameter
Any parameter that should be passed to the command.
property -
– isAction
YES if the mapping is an editor action.
-
– isMacro
YES if the mapping is a macro.
-
– isExpression
YES if the mapping is a Nu expression.
-
– isOperator
YES if the mapping is an operator action that requires a motion component.
-
– isMotion
YES if the mapping is a motion action.
-
– isLineMode
YES if the mapping is an editor action that works on whole lines.
-
– needsArgument
YES if the mapping is an editor action that needs a character argument, like the vi
f
command.
Properties
expression
A Nu expression macro.
@property (nonatomic, readonly) NuBlock *expression
Declared In
ViMap.h
keySequence
An array of NSNumbers that make up the key sequence.
@property (nonatomic, readonly) NSArray *keySequence
Declared In
ViMap.h
keyString
A string describing the key sequence.
@property (nonatomic, readonly) NSString *keyString
Declared In
ViMap.h
macro
A key string describing the keys that make up the macro.
@property (nonatomic, readonly) NSString *macro
Declared In
ViMap.h
parameter
Any parameter that should be passed to the command.
@property (nonatomic, readonly) id parameter
Declared In
ViMap.h
recursive
YES if this macro should be evaluated recursively.
@property (nonatomic, readonly) BOOL recursive
Declared In
ViMap.h
Instance Methods
isLineMode
YES if the mapping is an editor action that works on whole lines.
- (BOOL)isLineMode
Declared In
ViMap.h
isOperator
YES if the mapping is an operator action that requires a motion component.
- (BOOL)isOperator
Declared In
ViMap.h
needsArgument
YES if the mapping is an editor action that needs a character argument, like the vi f
command.
- (BOOL)needsArgument
Declared In
ViMap.h


I would like to see where we could put both a suppressor and a foregrip on at the same time so we can see what the spread and recoil is on guns we are using in game so we dont have to do one at a time then do the math to figure out what it is
BrainFooLong
Administrator
Yes, its already requested.
I will be as in-game slots to be able to attach both attachments at the same time.
Greetz


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
IN THE HIGH COURT OF KERALA AT ERNAKULAM WA No. 2283 of 2007() 1. VARKEY OUSEPH,S/O. VARKEY VARKERY, ... Petitioner 2. SKANA OUSEPH,VALAKATTU 3. SANTHOSH P.K.,PADINYAREKUDIYIL, Vs 1. THE STATE OF KERALA, REPRESENTED BY THE ... Respondent 2. TRIBUNAL FOR THE LOCAL SELF GOVERNMENT 3. VALAKOM GRAMA PANCHAYAT,REP. BY 4. THE KERALA STATE POLUTION COONTROL BOARD 5. M.PRABASH, CHAKKALAYI,KUNNACKAL P.O, 6. JOY M.M., MAPPILAKUNNEL HOUSE, For Petitioner :SRI.K.RAMAKUMAR For Respondent :SMT.K.K.THULASY BHAI,SC,POLLUTION C.BOA The Hon'ble the Chief Justice MR.H.L.DATTU The Hon'ble MR. Justice K.M.JOSEPH Dated :12/11/2007 O R D E R H.L.DATTU, C.J. & K.M.JOSEPH, J. ------------------------------------------ W.A.No.2283 of 2007 ------------------------------------------ Dated, this the 12th day of November, 2007 JUDGMENT
H.L.Dattu, C.J.
This appeal arises out of an order passed by the learned Single Judge in W.P.(C) No.18107 of 2006 dated 26th March, 2007. By the impugned order, the learned Single Judge has confirmed the orders passed by the Tribunal and has further directed the third respondent Grama Panchayat to issue appropriate licence to the 5th respondent to run his crushing unit within the limits of the Valakom Grama Panchayat.
(2) This litigation has a chequered career. Initially, the Panchayat had granted permission to the 5th respondent to start his crushing unit within the limits of the Valakom Grama Panchayat. After change of the composition of the Panchayat, they have cancelled the permission granted earlier. The 5th respondent was made to run from pillar to the post. Every time whenever the Panchayat passed orders refusing to grant permission to the 5th respondent to run his crushing unit, he had to approach the various authorities.
(3) Since the third respondent Grama Panchayat refused to grant renewal of the licence to the 5th respondent to commence his crushing unit, he had to file an appeal before the Tribunal for Local Self Government Instututions. The Tribunal is not only a fact finding authority, but also can decide the question of law. During the pendency of the appeal before the Tribunal, the Tribunal had appointed an advocate as Court Commissioner who in turn has submitted a report before the Tribunal.
(4) The Tribunal taking into consideration the report of the Court W.A.No.2283/2007 2 Commissioner and also taking into consideration the assertions and allegations made by the petitioners and its denial by the 5th respondent, has thought it fit to direct the Grama Panchayat to grant permission to the 5th respondent to run his crushing unit in Valakom Grama Panchayat. Aggrieved by the said order passed by the Tribunal, the petitioners were before this Court in W.P.(C) No.18107 of 2006.
(5) The learned Single Judge of this Court after tracing the history of the case and also the various orders passed by the Grama Panchayat and the Tribunal, has thought it fit to direct the Grama Panchayat to issue appropriate licence to the 5th respondent to run his crushing unit. The Court also has directed the Kerala State Pollution Control Board to have effected inspections of the crushing unit of the 5th respondent in regard to the air, noise and water pollution.
(6) Aggrieved by the orders passed by the learned Single Judge, the petitioners in the writ petition have presented this writ appeal before us.
(7) Sri.K.Ramakumar, learned counsel appearing for the appellants would submit that for enhancing the crushing capacity of the crushing unit, necessary permission requires to be obtained by the 5th respondent from the Grama Panchayat as well as the Pollution Control Board, and since that has not been obtained, the learned Single Judge was not justified in directing the Grama Panchayat to issue necessary licence.
(8) Per contra, learned counsel appearing for the 5th respondent would submit that the 5th respondent has no intention whatsoever to increase the crushing capacity of the crushing unit and therefore, the question of obtaining fresh permission from the Grama Panchayat and the Pollution Control Board W.A.No.2283/2007 3 would not arise.
(9) The learned Single Judge in his order at paragraph 8 has specifically observed that the 5th respondent has not increased the crushing capacity of the crusher unit.
(10) The 5th respondent had commenced the crushing unit some time in the year 1992. In between, he had abandoned the crushing unit. After some time, in the year 2004, he sought for renewal of the licence to run the crushing unit. The Grama Panchayat initially had granted permission to the 5th respondent to run his crushing unit. The change of composition of the Grama Panchayat has resulted in withdrawing the permission granted earlier. That is how then 5th respondent had to approach the Tribunal. As we have already noticed, the Tribunal taking into consideration the report of the Court Commissioner and further being of the opinion that if a direction is issued to the Grama Panchayat to permit the 5th respondent to run his crushing unit in Valakom Grama Panchayat it would not cause any prejudice to the petitioners, has accordingly passed an order. The order so passed by the Tribunal is confirmed by the learned Single Judge.
(11) Since the 5th respondent is not seeking for enhancement of the crushing capacity of the crushing unit, the question of obtaining a fresh licence either from the Grama Panchayat or from the Pollution Control Board would not arise. In that view of the matter, we do not see any error in the orders passed by the learned Single Judge which would call for our interference. Therefore, while affirming the reasons and the conclusions reached by the learned Single Judge, we reject the writ appeal. We make it clear that the Pollution Control Board will take effective steps to monitor the crushing unit of the 5th respondent. W.A.No.2283/2007 4 If, for any reason, the crushing unit of the 5th respondent causes any air, noise or water pollution, the Pollution Control Board would take effective steps as provided under the provisions of the Air (Prevention and Control of Pollution) Act, 1981 and the Water (Prevention and Control of Pollution) Act, 1974.
Ordered accordingly.
(H.L.DATTU) CHIEF JUSTICE (K.M.JOSEPH) JUDGE vns


Hot-keys on this page
n s m x c change column sorting
| Module | statements | missing | excluded | coverage |
|---|---|---|---|---|
| Total | 247 | 2 | 0 | 99% |
| cards\__init__.py | 0 | 0 | 0 | 100% |
| cards\admin.py | 3 | 0 | 0 | 100% |
| cards\apps.py | 3 | 0 | 0 | 100% |
| cards\forms.py | 7 | 0 | 0 | 100% |
| cards\migrations\0001_initial.py | 5 | 0 | 0 | 100% |
| cards\migrations\0002_auto_20200401_1338.py | 4 | 0 | 0 | 100% |
| cards\migrations\0003_auto_20200401_1340.py | 4 | 0 | 0 | 100% |
| cards\migrations\0004_auto_20200411_1504.py | 4 | 0 | 0 | 100% |
| cards\migrations\__init__.py | 0 | 0 | 0 | 100% |
| cards\models.py | 22 | 0 | 0 | 100% |
| cards\tests\__init__.py | 0 | 0 | 0 | 100% |
| cards\tests\test_forms.py | 11 | 0 | 0 | 100% |
| cards\tests\test_models.py | 8 | 0 | 0 | 100% |
| cards\tests\test_urls.py | 16 | 0 | 0 | 100% |
| cards\tests\test_views.py | 42 | 0 | 0 | 100% |
| cards\urls.py | 4 | 0 | 0 | 100% |
| cards\views.py | 26 | 0 | 0 | 100% |
| functional_tests\__init__.py | 0 | 0 | 0 | 100% |
| functional_tests\base_test_class.py | 7 | 0 | 0 | 100% |
| functional_tests\test_form_page.py | 22 | 0 | 0 | 100% |
| functional_tests\test_home_page.py | 21 | 0 | 0 | 100% |
| manage.py | 12 | 2 | 0 | 83% |
| whichcard\__init__.py | 0 | 0 | 0 | 100% |
| whichcard\settings.py | 23 | 0 | 0 | 100% |
| whichcard\urls.py | 3 | 0 | 0 | 100% |
No items found using the specified filter.


Welcome to EchoBot
We love the jobs we have! the opportunity to provide for others food for the soul
through the energizing
influence of music! When we seek out new ideas or impliment new tech, its in earnest effort
to bring beat to the soul
and sound to adventure! come and see our new projects! We are always looking for people who
have earnest interest in bringing
music to the traveling masses.
Alpha Testing Group!
If you are interested in becoming a member of our Alpha Testing group then
welcome to the right place!
When you sign up for this service you will recieve our up and coming pairs of EchoBot
headphones that are not quite ready
for full shipping, but that sport new ideas and advancements that we have gotten from
you and many others of our trusted supporters!
To get started with the sign up process all you need to do is go over to our Contact Us
page and scroll down to our comments and
questions section. There you will find a section dedicated to those who would like to be
part of this special program! Just put down
name and email address with a request to be part of the Alpha team, and our customer
support will get back to you with more inforamtion
about the products you will be reciving, and where to go to keep us up to date with your
use of these pre-beta headsets! This and
any other information will be provided by our support team, have fun adventuring!
EchoBot News!
In the last several days our team has been working towards beta version
functionality for the water proof
elements as well as design of our new and fully reemagined blue series headsets!
Thanks to much needed and much recieved
thought and insights from our community, who have been so active online, we have
developed a number of amazing tests that are
underway as of today! Thanks to all your incredible support we have been breaking
down barriers and setting new limits!
For those of you who are new to the website and who are just getting their feet wet,
please head over to our contact us page and leave
a comment or question about your visit to EchoBot.com! We are always looking for new
ideas and ways of improving what we already have!
Look around and see what you think! If anything stands out be sure to enroll with
the alpha testing group! For more info click over
to our Contact Us section!