Class representing an image. This class allows to manipulate easily images directly in the browser or in node.
This library is designed to deal with scientific images (8 or 16 bit depth) and will be able to open and process jpeg, png and uncompressed tiff images. It is designed to work in the browser as on the server side in node.
An image is characterized by:
In an image we have pixels and points:
([number]
(default 1
)
)
([number]
(default 1
)
)
([array])
Image data to load
(object)
In order to run the next examples you will have to install node and
create a new project
To install node you could use nvm that can be installed from
https://github.com/creationix/nvm
Once nvm is install:
nvm install stable
nvm alias default stable
You may then create a folder, go in this folder and install image-js
mkdir test-image-js
cd test-image-js
npm install image-js
In the test-image-js folder please also store please a test.jpg image like
wget https://raw.githubusercontent.com/image-js/core/c44bb2a0a45d95f43f3c1f8ecb58ee7afa752bb9/test/img/cat.jpg
// javascript code using node to get some info about the image
// we load the library that was install using 'npm install image-js'
var IJS=require('image-js');
// now IJS contains all the methods available to create an image
// loading an image is asynchronous and will return a promise.
// once the promise has been resolved the function in the 'then' method will
// be executed
IJS.load('cat.jpg').then(function(image) {
console.log('Width',image.width);
console.log('Height',image.height);
console.log('colorModel', image.colorModel);
console.log('components', image.components);
console.log('alpha', image.alpha);
console.log('channels', image.channels);
console.log('bitDepth', image.bitDepth);
});
// Convert an image to grey scale
var IJS=require('image-js');
IJS.load('cat.jpg').then(function(image) {
var grey=image.grey();
grey.save('cat-grey.jpg');
});
// Split a RGB image in it's components
var IJS=require('image-js');
IJS.load('cat.jpg').then(function(image) {
var components=image.split();
components[0].save('cat-red.jpg');
components[1].save('cat-green.jpg');
components[2].save('cat-blur.jpg');
});
// for this example you will need the picture of an ecstasy pill that is available on
// wget https://raw.githubusercontent.com/image-js/core/854e70f50d63cc73d2dde1d2020fe61ba1b5ec05/test/img/xtc.png // the goal is to isolate the picture and to get a RGB histogram of the pill.
// Practically this allows to classify pills based on the histogram similarity
// This work was published at: http://dx.doi.org/10.1016/j.forsciint.2012.10.004
var IJS=require('image-js');
IJS.load('xtc.png').then(function(image) {
var grey=image.grey({
algorithm:'lightness'
});
// we create a mask, which is basically a binary image
// a mask has as source a grey image and we will decide how to determine
// the threshold to define what is white and what is black
var mask=grey.mask({
algorithm: 'li'
});
// it is possible to create an array of Region Of Interest (Roi) using
// the RoiManager. A RoiManager will be applied on the original image
// in order to be able to extract from the original image the regions
// the result of this console.log result can diretly be pasted
// in the browser
// console.log(mask.toDataURL());
var manager = image.getRoiManager();
manager.fromMask(mask);
var rois=manager.getRois({
positive: true,
negative: false,
minSurface: 100
});
// console.log(rois);
// we can sort teh rois by surface
// for demonstration we use an arrow function
rois.sort((a, b) => b.surface-a.surface);
// the first Roi (the biggest is expected to be the pill)
var pillMask=rois[0].getMask({
scale: 0.7 // we will scale down the mask to take just the center of the pill and avoid border effects
});
// image-js remembers the parent of the image and the relative
// position of a derived image. This is the case for a crop as
// well as for Roi
var pill=image.extract(pillMask);
pill.save('pill.jpg');
var histogram=pill.getHistograms({maxSlots: 16});
console.log(histogram);
});
// Example of use of IJS in the browser
<sript>
var canvas = document.getElementById('myCanvasID');
var image = IJS.fromCanvas(canvas);
</script>
Load an image
Promise
:
Resolves with the Image
Image.load('http://xxxx').then(
function(image) {
console.log(image);
// we can display the histogram of the first channel
console.log(image.histograms[0]);
}
)
Returns an array of object with position.
(any)
region of the image that is analyzed. The rest is omitted.
(any)
1, 2 or 3. Define the region around each points that is analyzed. 1 corresponds to 4 cross points, 2 to
the 8 points around and 3 to the 12 points around the central pixel
(any)
Remove pts which have a distance between them smaller than this param.
(any)
chose between min or max local.
(Object
(default {}
)
)
| Name | Description |
|---|---|
$0.removeClosePoints any
(default 0 )
|
|
$0.region any
(default 3 )
|
|
$0.algorithm any
(default 'max' )
|
|
$0.mask any
|
|
$0.maxEquals any
(default 2 )
|
Array<number>
:
Array having has size the number of channels
Create a new image based on the current image. By default the method will copy the data
Image
:
The source image clone
var emptyImage = image.clone({copyData:false});
Change the image color depth. The color depth is the number of bits that is assigned to each point of a channel. For normal images it is 8 bits meaning the value is between 0 and 255. Currently only conversion from 8 to 16 bits and 16 to 8 bits is allowed.
([number]
(default 8
)
)
Image
:
The new image
var newImage = image.colorDepth({
newColorDepth:8
});
Create a new grey Image by combining the channels of the current image.
([function](default function (pixel) {return (pixel[0] + pixel[1] + pixel[2]) / 3;}))
(object)
| Name | Description |
|---|---|
options.alpha [string]
(default 'skip' )
|
possible values: 'skip', 'keep', 'join' |
(Object
(default {}
)
)
| Name | Description |
|---|---|
$1.mergeAlpha any
(default false )
|
|
$1.keepAlpha any
(default false )
|
([[number]])
([object])
options
| Name | Description |
|---|---|
$1.channels [array]
|
Array of channels to treat. Defaults to all channels |
$1.bitDepth [number]
(default this.bitDepth )
|
A new bit depth can be specified. This allows to use 32 bits to avoid clamping of floating-point numbers. |
$1.normalize [boolean]
(default false )
|
|
$1.divisor [number]
(default 1 )
|
|
$1.border [string]
(default 'copy' )
|
|
$1.algorithm [string]
(default 'direct' )
|
Either direct or 'fft'. fft is much faster for large kernel. |
Image
:
([[number]])
([object])
options
| Name | Description |
|---|---|
$1.channels [array]
|
Array of channels to treat. Defaults to all channels |
$1.bitDepth [number]
(default this.bitDepth )
|
A new bit depth can be specified. This allows to use 32 bits to avoid clamping of floating-point numbers. |
$1.normalize [boolean]
(default false )
|
|
$1.divisor [number]
(default 1 )
|
|
$1.border [string]
(default 'copy' )
|
(any
(default {}
)
)
Image
:
Make a copy of the current image
(any)
(any)
(any)
(any)
Crops the image
([object](default {}))
| Name | Description |
|---|---|
options.x [number]
(default 0 )
|
x coordinate to place the zero of the new image |
options.y [number]
(default 0 )
|
y coordinate to place the zero of the new image |
options.width [number]
(default this.width-x )
|
width of the new image |
options.height [number]
(default this.height-x )
|
height of the new image |
Image
:
The new cropped image
var cropped = image.crop({
x:0,
y:0
});
Extracts a part of an original image based on a mask. By default the mask may contain a relative position and this part of the original image will be extracted.
(Image)
Image containing a binary mask
(any
(default {}
)
)
| Name | Description |
|---|---|
options.position [array]
|
Array of 2 elements to force the x,y coordinates |
Image
:
A new image
Flip an image horizontally. The image
this
:
Flip an image vertically. The image
this
:
Apply a gaussian filter to the image
([object](default {}))
| Name | Description |
|---|---|
options.radius [number]
(default 1 )
|
: number of pixels around the current pixel |
options.sigma [number]
|
|
options.channels [(Array<number> | Array<string>)]
|
: to which channel to apply the filter. By default all but alpha. |
options.border [string]
(default 'copy' )
|
|
options.fft [boolean]
(default true )
|
: use the fastest convolution FFT algorithm |
Image
:
(any)
(any
(default 0
)
)
(any
(default {}
)
)
Returns an array (number of channels) of array (number of slots) containing the number of data of a specific intensity. Intensity may be grouped by the maxSlots parameter.
([object])
| Name | Description |
|---|---|
options.maxSlots [number]
|
Number of slots in the resulting array. The intensity will be evently distributed between 0 and the maxValue allowed for this image (255 for usual images). If maxSlots = 8, all the intensities between 0 and 31 will be placed in the slot 0, 32 to 63 in slot 1, ... |
Array<number>
:
Resolves with the Image
image.getHistograms({
maxSlots: 8,
useAlpha: false
});
Returns an array of arrays containing the pixel values in the form [[R1, G1, B1], [R2, G2, B2], ...]
(any)
Retrieve the data of the current image as RGBA 8 bits The source image may be:
Uint8ClampedArray
:
Array with the data
var imageData = image.getRGBAData();
(any)
(any
(default 0
)
)
TODO would be suprised if this stuff works
Converts the current image to grey scale The source image has to be RGB ! If there is an alpha channel we need to decide what to do:
([object](default {}))
| Name | Description |
|---|---|
options.algorithm [string]
(default 'luma709' )
|
Algorithm to get the grey image |
options.keepAlpha [boolean]
(default false )
|
If true the RGB values are treated separately from the alpha channel and the method returns a GREYA image. |
options.mergeAlpha [boolean]
(default true )
|
If true the alpha channel will be applied on each pixel. This means that if for an 8bits RGBA image we have an alpha channel value of 0, this grey scale value will always be 0 (black pixel) |
options.allowGrey [boolean]
(default false )
|
By default only RGB images are allowed. If true grey images are also allowed and will either return a copy or apply the alpha channel depending the options |
Image
:
Grey scale image (with or without alpha depending the options)
var grey = image.grey();
Invert an image. The image
([object](default {}))
| Name | Description |
|---|---|
options.channels [(undefined | number | string | [number] | [string])]
(default undefined )
|
Specify which channels should be processed
|
this
:
Level the image for by default have the minimal and maximal values.
([object](default {}))
| Name | Description |
|---|---|
options.channels [(undefined | number | string | [number] | [string])]
(default undefined )
|
Specify which channels should be processed
|
options.min [number]
(default this.min )
|
minimal value after levelling |
options.max [number]
(default this.max )
|
maximal value after levelling |
Image
:
Creation of binary mask is based on the determination of a threshold You may either choose among the provided algorithm or just specify a threshold value
([string]
(default 'threshold'
)
)
([number]
(default 0.5
)
)
If the algorithm is 'threshold' specify here the value (0 to 1).
([boolean]
(default true
)
)
Apply the alpha channel to determine the intensity of the pixel.
([boolean]
(default false
)
)
Invert the resulting image
(Object
(default {}
)
)
| Name | Description |
|---|---|
$0.algorithm any
(default 'threshold' )
|
|
$0.threshold any
(default 0.5 )
|
|
$0.useAlpha any
(default true )
|
|
$0.invert any
(default false )
|
Image
:
Binary image containing the mask
Each pixel of the image becomes the median of the neightbour pixels.
([object](default {}))
| Name | Description |
|---|---|
options.channels [(undefined | number | string | [number] | [string])]
(default undefined )
|
Specify which channels should be processed
|
options.radius [number]
(default 1 )
|
distance of the square to take the mean of. |
options.border [string]
(default 'copy' )
|
algorithm that will be applied after to deal with borders |
Image
:
(any)
(any)
(any)
Paint a mask or masks on the current image.
([object])
| Name | Description |
|---|---|
options.color [([number] | string)]
(default 'red' )
|
Array of 3 elements (R, G, B) or a valid css color. |
options.colors [array<array<number>>]
|
Array of Array of 3 elements (R, G, B) for each color of each mask |
options.randomColors [boolean]
(default false )
|
To paint each mask with a random color |
options.distinctColors [boolean]
(default false )
|
To paint each mask with a different color |
options.labels [array<string>]
|
Array of labels to display. Should the the same size as masks. |
options.labelColor [string]
(default 'blue' )
|
Define the color to paint the labels |
options.labelFont [string]
(default '12px Helvetica' )
|
Paint the labels in a different CSS style |
(any)
Image
:
The original painted image
Paint pixels on the current image.
([[pixels]])
Array of
[
x,y
]
points
Image
:
The original painted image
Allows to generate an array of points for a binary image (bit depth = 1)
This is a temporary code that should be placed in the more general resize method it only works for scaled down !
(any
(default 0.5
)
)
Make a copy of the current image and convert to RGBA 8 bits Those images are the one that are displayed in a canvas. RGB model in 8 bits per channel and containing as well an alpha channel. The source image may be:
Image
:
New image in RGB color model with alpha channel
var rgbaImage = image.rgba8();
Rescale an image
(any)
(any)
Creates a blob from the image and return a Promise.
([string]
(default 'image/png'
)
)
A String indicating the image format. The default type is image/png.
([string]
(default 0.8
)
)
A Number between 0 and 1 indicating image quality if the requested type is image/jpeg or image/webp. If this argument is anything else, the default value for image quality is used. Other arguments are ignored.
Promise
:
Class to manage Region Of Interests
Calculates the number of pixels that are involved in border Border are all the pixels that touch another "zone". It could be external or internal. If there is a hole in the zone it will be counted as a border. All the pixels that touch the box are part of the border and are calculated in the getBoxPixels procedure
Retrieve all the IDs (array of number) of the regions that are in contact with this specific region. It may be external or internal
Retrieve all the length (array of number) of the contacts with this specific region. It may be external or internal
Number of pixels of the Roi that touch the rectangle This is useful for the calculation of the border because we will ignore those special pixels of the rectangle border that don't have neighbours all around them.
Retrieve all the IDs or the Roi touching the box surrouding the region
It should really be an array to solve complex cases related to border effect
Like the image
0000 1111 0000 1111
The first row of 1 will be surrouned by 2 differents zones
Or even worse
010 111 010The cross will be surrouned by 4 differents zones
However in most of the cases it will be an array of one element
Returns a binary image (mask) containing only the border of the mask
Calculates the number of pixels that are in the external border of the Roi Contour are all the pixels that touch an external "zone". All the pixels that touch the box are part of the border and are calculated in the getBoxPixels procedure
Returns a binary image containing the mask
Calculates the maximum length between two pixels of the Roi.
A layer that is caracterised by a RoiMap (@see RoiMap) and that will generated automatically the corresponding ROI. ROI should be a continuous surface (it is not tested when it is not continous ...) From the roiMap, the RoiLayer will create the corresponding ROI (@see Roi).
A manager of Regions of Interest. A RoiManager is related to a specific Image and may contain multiple layers. Each layer is characterized by a label whose is name by default 'default'
Roi are created from a roiMap The roiMap contains mainty an array of identifiers that define for each data to which Roi it belongs
([Object](default {}))
| Name | Description |
|---|---|
options.fillMaxValue any
|
Limit of filling. By example, we can fill to a maximum value 32000 of a 16 bitDepth image. |
options.points any
|
Array of object [ {x:2, y:3, id:1}, ... ] . The id for each points is obligatory |
options.interval any
|
A parameter which specify the level of filling each iteration. Every pixels in the current interval will be filled. |
options.mask any
|
A binary image, the same size as the image. The algorithm will fill only if the current pixel in the binary mask is true. |
RoiMap
:
Allows to select ROI based on size, label and sign.
([object]
(default {}
)
)
| Name | Description |
|---|---|
options.label [string]
(default 'default' )
|
Label of the layer containing the ROI |
options.positive [boolean]
(default true )
|
Select the positive region of interest |
options.negative [boolean]
(default true )
|
Select he negative region of interest |
options.minSurface [number]
(default 0 )
|
|
options.maxSurface [number]
(default Number.POSITIVE_INFINITY )
|
|
options.minWidth [number]
(default 0 )
|
|
options.minHeight [number]
(default Number.POSITIVE_INFINITY )
|
|
options.maxWidth [number]
(default 0 )
|
|
options.maxHeight [number]
(default Number.POSITIVE_INFINITY )
|
Array<Roi>
:
Return a new roiMAP changed with the fusion of certain ROIs.
([object])
([string]
(default 'commonBorder'
)
)
; algorithm used to decide which ROIs are merged.
([number]
(default 5
)
)
is an integer, determine the strength of the merging.
this
:
Paint the ROI on a copy of the image adn return this image. For painting options @links Image.paintMasks For ROI selection options @links RoiManager.getMasks
Image
:
The painted RGBA 8 bits image
Reset the changes to the current painted iamge to the image that was used during the creation of the RoiManager except if a new image is specified as parameter; #param {object} [options]
(any
(default {}
)
)
| Name | Description |
|---|---|
options.image [Image]
|
A new iamge that you would like to sue for painting over |
The roiMap is an array of the size of the original image data that contains positive and negative numbers. When the number is common, it corresponds to one region of interest (ROI)
Class representing a shape
([object])
| Name | Description |
|---|---|
options.kind [string]
(default 'cross' )
|
Predefined matrix shape, 'cross' or 'smallCross' |
options.shape [string]
|
Value may be 'square', 'rectangle', 'circle', 'ellipse' or 'triangle' The size of the shape will be determined by the size, width and height. A Shape is by default filled. |
options.size [number]
|
|
options.width [number]
(default options.size )
|
width of the shape. Must be odd. |
options.height [number]
(default options.size )
|
width of the shape. Must be odd. |
options.filled [boolean]
(default true )
|
If false only the border ot the shape is taken into account. |
Class representing stack of images
Extends Array


Data is now available for your container .
You can view the data collections here:https://ispyb.diamond.ac.uk/dc/visit/?prop=
You can view the container here:https://ispyb.diamond.ac.uk/containers/cid/?prop=


My name is Sayanee Basu, and for the most part, I am making and sharing about home automation.
I live in Singapore with my husband and a little kid.
You can contact me here or you can checkout what I am doing now.
frequently used
seldom used


Welcome to Simple.css. A framework built to be simple! This project was made so that people who don't like linking tens to thousands of CSS frameworks to only link one lightweight but powerful framework.
Cascading Style Sheets are style documents for Websites. Usually websites have CSS Code written to them to make them look unique or have more funtionality, also some websites use a lot of CSS files. These CSS files can make slow or even unresponsive websites. Simple changes this by making one light stylesheet with incredable performance.
Simple is based on Bootstrap, W3, and Font Awesome. Meaning that you don't need to write down a ton of code, because the code you already know just works, it's that simple.
AT.css is a stylesheet that brings themes and effects like shading. This CSS also brings vibrant colors like Ex Green Lite Red and Areo Blue, while keeping more dark and foucused colors like Metro Red Metro Green and Dark Yellow. Increasing transparency while making things stand out.


SEEGATESITE
Dashboard
link1
link2
Shortcut
link1
link2
Overview
Events
About
Services
Contact
ADD NEW
{{course.name}}
End In
{{course.end}}


| About Dailyrotten |
|
Feedback
If you like this page, hate it, or would like to suggest changes,
<EMAIL_ADDRESS>is listening. This page
is experimental and somewhat different from what we usually offer, so please
do send your feedback.
Adding Stories
If you are a rotten newshound and you would like to suggest a story,
visit our submit page to
send us the URL. Stories that are accepted will have your name credited.
Posting Comments
In order to post comments to stories, you will have to
create an account.
Accounts will generally be validated within 24 hours, and of
course will be disabled if there is abuse.
Viewership
On the first full day this page went live, 100,000 people visited this Rotten
News page. Of course that was the day after the WTC attacks, so that number is
somewhat distorted. Right now this page gets between 50,000 and 75,000 people
every day.
Linking
We encourage everyone to link to this page; if you like it, others probably
will as well.
Other Rotten
Rotten
Gaping Maw
Celebrity Morgue
Mugshots
Rotten Store
Rate My Poo
Rate My Kitten
Rate My Finger
Penny Postcards
Phallic
Boners
Home
Make Dailyrotten your start page
|
|
|
August 14, 2002
Frisbee inventor's remains to be made into frisbees
San Francisco Chronicle | Submitted by: Otis Criblecross
"Just before he died, the creator of the game of Frisbee golf said he
wanted his ashes to be mixed into new versions of the famous plastic
disc and his family hopes these limited-edition Frisbees could be sold
to help fund a museum in his honor."
|
|
Read article...
|
|
Adam Ant: The good, the bad and the plug-ugly
BBC | Submitted by: Ann Onymous
"Former pop idol Adam Ant has admitted threatening pub customers who made
fun of his "cowboy" clothes. The 1980s star appeared at the Old Bailey on
Tuesday under his real name Stuart Goddard, and pleaded guilty to affray.
Pub customers started humming the theme from the spaghetti western The Good,
The Bad and The Ugly, when he walked in wearing a combat jacket and
matching flat cap, the court heard at an earlier hearing."
|
|
Read article...
|
|
Fake Doctor practices 15 years
Globe and Mail | Submitted by: Casshew
"The letters, offering the support of 189 of the 1,000 patients he treated
without a valid medical degree, were presented yesterday to the judge charged
with deciding Mr. Chung's fate for defrauding Ontario taxpayers of $4.4
million. Knowing that Mr. Chung, 65, never graduated from a medical school
did not stop former patient Mary Ainswith from writing: "I would recommend
him to anyone."
|
|
Read article...
|
|
Adult Snow White books in children's section
Singapore Straits Times | Submitted by: Steve
"Bookstore shoppers in Taipei who picked up newly released versions of Snow
White and other children's classics hoping to read wholesome tales might have
been a bit shocked. The books were a Japanese author's kinky take on the
stories, and in the X-rated version, Snow White does more than clean and cook
for the seven dwarfs."
|
|
Read article...
|
|
A stigma that never fades
Economist | Submitted by: kade
America's prison system is fucked up and it's going to bite us in the ass,
once we realize the scope of the evil we're doing: "America's incarceration
rate was roughly constant from 1925 to 1973, with an average of 110 people
behind bars for every 100,000 residents. By 2000, however, the rate of
incarceration in state and federal prisons had more than quadrupled, to 478."
Thank you, drug war.
|
|
Read article...
|
|
Elvis is toast
Stuff NZ | Submitted by: Tod
The artist inexplicably chose to use toast, but perhaps a better medium
would have been Demerol(TM), Nebutal(TM), pentobarbital, and quaaludes:
"A Wellington supermarket owner has spent two months fashioning his own
unique toast to mark the 25th anniversary of Elvis Presley's death.
Maurice Bennett has constructed a portrait measuring 5.76 square metres
in area of the King of Rock 'n' Roll crafted out of more than 4000 small
slices of toast."
|
|
Read article...
|
|
Arab news translated by Israeli company
Guardian | Submitted by: Duchi
"'Independant' media company that translates Arab newspaper stories for
American media turns out to be working for Isreal, and is also subsidized
by US taxpayers: "The co-founder and president of Memri, and the registered
owner of its website, is an Israeli called Yigal Carmon. Mr - or rather,
Colonel - Carmon spent 22 years in Israeli military intelligence and later
served as counter-terrorism adviser to two Israeli prime ministers,
Yitzhak Shamir and Yitzhak Rabin."
|
|
Read article...
|
|
Man bites dog
KOAT-TV 7 Albuquerque | Submitted by: gremlin
When a dog bites a man, it's not news; but when a man bites a dog
it is indeed news, but pretty boring news and I really must wonder
why this one is making the cut (except perhaps due to cliche value):
"Justice, a K-9 officer, was treated for cuts around his eye and ear.
Police say he was bitten by a suspect he was chasing then beaten and
stabbed around the head with a pipe."
|
|
Read article...
|
|
Teen gives finger, dies
Mainichi Daily News | Submitted by: KennyK
"A teen-age motorcycle rider died Wednesday as he turned to give the
finger to police officers who had given up pursuing him and slammed into a
taxi, police said."
|
|
Read article...
|
|
Scientists to clone mammoth
Pravda | Submitted by: T. Rana Sorez
Steven Spielberg's Jurassic Park is coming true, according to umm,
Pravda. "The scientists need to find a DNA sample for cloning a mammoth,
and the sample will then be imposed into a cell of the closest relative
of the extinct animal. Frozen sperm would be the best for the extraction
of a DNA sample, but it will be very difficult to find. The scientistsí
goal is to find a mammoth body that was frozen right after it died
and stayed under the ground for thousands of years in the never-ending cold."
|
|
Read article...
|
|
Psychotic behavior OK if you're a Cop
Herald Tribune | Submitted by: Cobra Commander vs. Serpentor???
What do you get when you mix the Deep South, the Cold War, and misfiring
neurons? That question is answered by a servant of the public on the Gulf
Coast of Florida. After using racial slurs, threatening many people, and
just recently offending a family of Russian decent, this keeper of the peace
has just been cleared of any wrong-doing.
|
|
Read article...
|
|
Man charged with guerilla landscaping
New Haven Register | Submitted by: big lobsta
"Kenneth Costello, 49, of 372 Plains Road was charged on a warrant with
first degree criminal trespass concerning a June 22 incident in which the
owner of an Opal Street business complained that someone trimmed his trees
and cut his grass without permission."
|
|
Read article...
|
|
Legal victory for dog cologne
Law.com | Submitted by: Son of Benway
"Southern District of New York Chief Judge Michael B. Mukasey ruled that
the perfume, called Timmy Holedigger, could not under any circumstances be
confused with Tommy Hilfiger cologne, nor could it be seen as a competing
product trading on the designer's good will."
|
|
Read article...
|
|
Nah, that's not conspicuous mon
Jamaica Observer | Submitted by: Son of Benway
"Police arrested Pinnock on Monday at Barbados' Grantley Adams
International Airport after a search of his suitcases revealed 11 pounds
of marijuana hidden inside 24 bottles of barbeque sauce."
|
|
Read article...
|
|
Bulgarian kids have the best crack
vnunet | Submitted by: Son of Benway
This article is giving the Bulgarians way too much credit for this,
but it does highlight the pointlessness of copy protection:
"A month after rap artist Eminem released his latest album with 'uncrackable'
copyright protection technology, pirated copies are on sale across eastern
Europe... One market trader told vnunet: "I hope [the record company] did
not spend too much on this. In Bulgaria there is nothing that can't be
cracked." The piracy culture in Bulgaria is supported by a low-paid,
technologically literate youth culture with access to technology."
|
|
Read article...
|
|
Victim splatters spammer's office with paint
El Paso Times | Submitted by: vauxhallvillian
One man's solution to the postal spam problem:
"When the receptionist tried to summon a manager, Gesell pulled two half
gallon cans of white paint from his truck. Police said he poured paint from
one half gallon on the receptionist's desk and computer and then splashed
paint on the employee. He tossed the second can onto the walls."
|
|
Read article...
|
|
It's my party and I'll kill if I want to
Bakersfield Californian | Submitted by: Crampon
"A southwest Bakersfield woman described as a loving mother and a perfect
employee was beaten to death by her children, ages 17 and 12... Francisca
Comparan, 43, was struck on the head with a cast-iron skillet on Friday after
an argument with her children, police said. She reportedly had refused to let
her 12-year-old daughter go to a party with her 17-year-old half-brother."
|
|
Read article...
|
|
Delaware more evil than previously thought
New Republic | Submitted by: Dylar
"Delaware's image as small and inoffensive is not merely a misconception but
a purposeful guise. It presents itself as a plucky underdog peopled by a
benevolent, public-spirited, entrepreneurial citizenry. In truth, it is a
rapacious parasite state with a long history of disloyalty and avarice."
|
|
Read article...
|
|
Censorship in Afghanistan
Canadian Broadcasting | Submitted by: Patrick
An interesting column on how the U.S. Army keeps the media in line in
Afghanistan by revoking privileges: "Later, when a public affairs major came
to pick us up in a Humvee, he lectured us on the situation, just like Colonel
Flagg used to do in the TV series M*A*S*H: "I don't know what you gentlemen
heard or saw, or think you saw, but you didn't hear or see anything.
Is that understood?"
|
|
Read article...
|
|
Defending hypocrisy
Time | Submitted by: Meerkat
After a hard day of protecting democracy, American GIs stationed in Korea
like to unwind by supporting the local sex slave industry. "At the pizza
joint, the three sergeants don't have anything more to say, telling a
reporter: "We shouldn't be talking to you." Why not? "We're here to protect
democracy. We're not here to practice it."
|
|
Read article...
|
|
Video game company seeks name whores
Nando Times | Submitted by: Benjamin Lesbian
"Hoping to push back the frontiers of advertising, a British marketing firm
said Monday it would pay nearly $800 each to five people for the right to
transform them into human billboards for a fantasy superhero. Acclaim UK is
seeking applicants who will legally change their names for one year to promote
the latest installment of its video game series about Turok, a time-traveling
American Indian who slays bionically enhanced dinosaurs."
|
|
Read article...
|
|
|
|
|


Advance Web Page by Ethan
Prove you can use: Tables, Lists, Forms, CSS
| 2020 September |
| Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
| | 1 | 2 | 3 | 4 | 5 |
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | | | |
Fav. foods
- Pizza
- Chicken
Fav. Colours
- Blue
- Red
- Black
Fav. Brands
- Champion
- Vans
- Nike
- Adidas
Fav. Countries
- Canada
- Iceland
Fav. Fruit
- Apples
- Pears
- Bananas
- Grapes
- Oranges
The following are all form elements:


Register for
Full Stack Conference
Basic Info
Name
Email
Choose Your Job Role
Full Stack JS Developer
Front End Developer
Back End Developer
Designer
Student
Other
Job Role
Your Job Role
T-Shirt Info
Choose Size
S
M
L
XL
Size
Choose Theme
Theme - JS Puns
Theme - I ♥ JS
Desing
Choose Color
Please select a T-shirt theme
Cornfulaer Blue
Dark Slate Grey
Goel
Tomato
Steel Blue
Dim Grey
Color
Register for Activities
Main Conference - $200
JavaScript Frameworks Workshop - Tuesday 9am-12pm - $100
JavaScript Libraries Workshop - Tuesday 1pm-4pm - $100
Express Workshop - Tuesday 9am-12pm - $100
Node.js Workshop - Tuesday 1pm-4pm - $100
Build Tools Workshop - Wednesday 9am-12pm - $100
NPM Workshop - Wednesday 1pm-4pm - $100
Payment Info
Choose Payment Method
Credit Card
PayPal
Bitcoin
I'm going to pay with
Card Number
Zip Code
CVV
1 - January
2 - February
3 - March
4 - April
5 - May
6 - June
7 - July
8 - August
9 - September
10 - October
11 - November
12 - December
Expiration Month
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
Expiration Month
If you selected the PayPal option we'll take you to PayPal's site to set up your billing information, when you click "Register" below.
If you selected the Bitcoin option we'll take you to the Coinbase site to set up your billing information. One to the nature of exchanging Bitcoin, all Bitcoin transactions will be final.
Register


{% extends 'base.html' %} {% block title %}
The following content are the events for the month {{ month }} on year {{ year }}
{% else %}The following content are the events for the {{ year }} year
{% endif %} {% endblock %} {% block content %}Ekadasi is spiritual day in Hinduism and Jainism that occurs twice in each lunar month and is marked by fasting or partial fasting. The name is the Sanskrit word for the number 11. The lunar month is divided into two 14-day periods, one when the moon waxes (sukla paksha) and one when the moon wanes (krishna paksha). Ekadasi is the eleventh day of each of these lunar phases. Fasting varies by tradition with some choosing to avoid all food during Ekadasi, while others avoid all beans and grains and anything made from thos e ingredients.
{% for event in events %}{{ event.date }}
Begin: {{ event.starts }}
End: {{ event.ends }}
{{ event.body }}


This Bible contradiction is from the Skeptic's Annotated Bible.
Verses
Yes, we are all God's children.
Deuteronomy 14:1 View context
Ye [are] the children of the LORD your God: ye shall not cut yourselves, nor make any baldness between your eyes for the dead.
Psalm 82:6 View context
I have said, Ye [are] gods; and all of you [are] children of the most High.
Hosea 1:10 View context
Yet the number of the children of Israel shall be as the sand of the sea, which cannot be measured nor numbered; and it shall come to pass, [that] in the place where it was said unto them, Ye [are] not my people, [there] it shall be said unto them, [Ye are] the sons of the living God.
Matthew 5:48 View context
Be ye therefore perfect, even as your Father which is in heaven is perfect.
Matthew 6:9 View context
After this manner therefore pray ye: Our Father which art in heaven, Hallowed be thy name.
John 20:17 View context
Jesus saith unto her, Touch me not; for I am not yet ascended to my Father: but go to my brethren, and say unto them, I ascend unto my Father, and your Father; and [to] my God, and your God.
Acts 17:29 View context
Forasmuch then as we are the offspring of God, we ought not to think that the Godhead is like unto gold, or silver, or stone, graven by art and man's device.
No, only those that have faith in Christ Jesus are God's children.
Galatians 3:26 View context
For ye are all the children of God by faith in Christ Jesus.
No, only those that are predestinated to be adopted by Jesus Christ are children of God.
Ephesians 1:5 View context
Having predestinated us unto the adoption of children by Jesus Christ to himself, according to the good pleasure of his will,
No, only those that believe on Jesus' name are sons of God.
John 1:12 View context
But as many as received him, to them gave he power to become the sons of God, [even] to them that believe on his name:
No, only children of the promise are counted as the seed of God.
Romans 9:8 View context
That is, They which are the children of the flesh, these [are] not the children of God: but the children of the promise are counted for the seed.
No, only sinless born-again Christians are sons of God.
1 John 3:8-10 View context
He that committeth sin is of the devil; for the devil sinneth from the beginning. For this purpose the Son of God was manifested, that he might destroy the works of the devil.
Whosoever is born of God doth not commit sin; for his seed remaineth in him: and he cannot sin, because he is born of God.
In this the children of God are manifest, and the children of the devil: whosoever doeth not righteousness is not of God, neither he that loveth not his brother.
No, only those who are led by the spirit are sons of God.
Romans 8:14 View context
For as many as are led by the Spirit of God, they are the sons of God.
No, Jews that don't love Jesus are children of the devil.
John 8:41-44 View context
Ye do the deeds of your father. Then said they to him, We be not born of fornication; we have one Father, [even] God.
Jesus said unto them, If God were your Father, ye would love me: for I proceeded forth and came from God; neither came I of myself, but he sent me.
Why do ye not understand my speech? [even] because ye cannot hear my word.
Ye are of [your] father the devil, and the lusts of your father ye will do. He was a murderer from the beginning, and abode not in the truth, because there is no truth in him. When he speaketh a lie, he speaketh of his own: for he is a liar, and the father of it.
No, sorcerers are the children of the devil.
Acts 13:8-10 View context
But Elymas the sorcerer (for so is his name by interpretation) withstood them, seeking to turn away the deputy from the faith.
Then Saul, (who also [is called] Paul,) filled with the Holy Ghost, set his eyes on him,
And said, O full of all subtilty and all mischief, [thou] child of the devil, [thou] enemy of all righteousness, wilt thou not cease to pervert the right ways of the Lord?
No, those who fulfill the lusts of the flesh and of the mind are children of wrath.
Ephesians 2:3 View context
Among whom also we all had our conversation in times past in the lusts of our flesh, fulfilling the desires of the flesh and of the mind; and were by nature the children of wrath, even as others.


Apicurio Registry Operator Documentation
Welcome to the user and developer documentation for the Apicurio Registry Operator:
Apicurio Registry
Apicurio Registry stores and retrieves API designs and event schemas, and gives you control of their evolution.
For more information about the Apicurio Registry, see the documentation at https://www.apicur.io/registry/.
Apicurio Registry Operator
Apicurio Registry Operator provides a quick and easy way to deploy and manage Apicurio Registry on Kubernetes or OpenShift.
The Operator supports basic installation and configuration of Apicurio Registry, so you can access the Apicurio Registry API and web console in a few minutes.
Apicurio Registry Operator platforms
The Apicurio Registry Operator supports the following platform versions:
| Platform | Required version |
|---|---|
Kubernetes |
1.19+ |
OpenShift |
4.6+ |
| Apicurio Registry Operator does not yet deploy and manage Apicurio Registry storage. You must ensure that storage options such as Kafka or PostgreSQL are installed and configured. |
Getting help with Apicurio Registry Operator
See the Apicurio Registry and Apicurio Registry Operator projects on GitHub. Any contributions, suggestions, and issue reports are welcome.
Create an issue on GitHub if you find any problems.


Connect Four
Player 1's turn
Use arrow keys on your keyboard to move the circle on top of the board.
Restart


IN THE HIGH COURT OF JHARKHAND AT RANCHI A.B. A. No. 6841 of 2019 Mahendra Prasad ... Petitioner Versus The State of Jharkhand ... Opposite Party Coram: HON'BLE MR. JUSTICE ANIL KUMAR CHOUDHARY For the Petitioner : Mr. A.K. Sinha, Adv. For the State : Addl. P.P. 04 / 12.10.19
Heard the parties.
Apprehending his arrest, the petitioner has moved this Court for grant of privilege of anticipatory bail in connection with Chhattarpur P.S. Case No. 187 of 2018 registered under Sections 175/379/420 of the Indian Penal Code, section 25/26 (2) of Water Act, section 21 of the AIR Act, section 6 (i) of Factories Act, section 33 (B) and section 33 (c ) of Forest Act, section 4/54 (1) of JMMC Rule, 2004 and section 4/21 of MMDR Act, 1957. .
The learned counsel appearing for the petitioners submits that the allegations against the petitioners is that the petitioners have illegally stored stones chips, boulders which were seized and the petitioners could not produce any valid papers regarding crusher, chips, and boulders. It is then submitted that the allegations against the petitioners are all false and the petitioners have no concern with the seized articles. It is further submitted by learned counsel for the petitioners that the petitioner has been implicated in this case as he refused to put signature on a blank paper in some case instituted by the officers of the Government. It is next submitted that the petitioner is ready to co-operate with the investigation of the case and also ready and willing to furnish sufficient security including cash security and he undertakes not to be involved with any crusher machine nor will run any crusher machine during pendency of the case, hence, the petitioners be given the privilege of anticipatory bail.
The learned Addl. PP opposes the prayer for anticipatory bail of the petitioner.
Considering aforesaid facts and circumstances of the case, I am inclined to grant the privilege of anticipatory bail to the petitioner. Hence, in the event of arrest by the police or surrender within a period of four weeks from the date of this order, the petitioner shall be released on bail on depositing Rs. 20,000/- as cash security and furnishing bail bond of Rs. 25,000/- (Rupees Twenty Five Thousand) with two sureties of the like amount each to the satisfaction of learned CJM, Palamau in connection with Chhattarpur P.S. Case No. 187 of 2018 subject to the condition that the petitioner will not get involved with any crusher machine nor will run any crusher during pendency of the case co-operate with the Investigation of the case and will appear before the Investigating Officer as and when noticed by him and will submit mobile number and photocopy of Aadhar card at the time of surrender in the court below with an undertaking not to change mobile number during the pendency of the case along with the other conditions laid down under section 438 (2) Cr. P.C.
(ANIL KUMAR CHOUDHARY, J.) Smita/-


// The Contract code had to be split in two, because the Etherum Virtual Machine (EVM) would not allow deployment of a Contract // that has more than 24576 bytes. So, the decision was made to SPLIT the code into the FranklinDecentralizedMarketplace // and FranklinDecentralizedMarketplaceMediation Contracts. // // So, this FranklinDecentralizedMarketplace Contract handles most of the functionality pertaining to the Franklin Decentralized Marketplace Smart Contract functionality, while MOST of the // functionality dealing with Mediated Sales Transactions is done by the FranklinDecentralizedMarketplaceMediation Smart Contract. // Each Item being sold in this Decentralized Marketplace is identified by it's IPFS (InterPlanetary File System) Hash. Information about each item being sold is in a JSON-formatted // string stored in the IPFS (InterPlanetary File System) that may be accessed via the Infura IPFS Gateway URL. So, for example, let's say that an Item being sold by a Seller has an // IPFS Hash of QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnHH. Then, the information about this Item may be seen in one of the following URLs: // 1) https://ipfs.infura.io/ipfs/QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnHH // 2) https://gateway.ipfs.io/ipfs/QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnH // Each Seller in this Decentralized Marketplace is identified by it's Ethereum Address, but should also have information about himself/herself that is in the // IPFS (InterPlanetary File System) Hash. Information about each Seller is in a JSON-formatted // string stored in the IPFS (InterPlanetary File System) that may be accessed via the Infura IPFS Gateway URL. So, for example, let's say that Seller has an // IPFS Hash of QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnHH describing himself/herself. Then, the information about this Seller may be seen in one of the following URLs: // 1) https://ipfs.infura.io/ipfs/QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnHH // 2) https://gateway.ipfs.io/ipfs/QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnHH // Each Mediator in this Decentralized Marketplace is identified by it's Ethereum Address, but should also have information about himself/herself that is accessed // in the IPFS Stoarge Systemn via it's IPFS (InterPlanetary File System) Hash string key. // Each Mediator in this Decentralized Marketplace is also identified by it's IPFS (InterPlanetary File System) Hash. Information about each Mediator is in a JSON-formatted // string stored in the IPFS (InterPlanetary File System) that may be accessed via the Infura IPFS Gateway URL. So, for example, let's say that the Mediator has an // IPFS Hash of QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnHH. Then, the information about this Mediator may be seen in one of the following URLs: // 1) https://ipfs.infura.io/ipfs/QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnHH // 2) https://gateway.ipfs.io/ipfs/QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnH // Each Mediated Sales Transaction in this Decentralized Marketplace is identified by it's IPFS (InterPlanetary File System) Hash. Information about each Mediated Sales Transaction // is in a JSON-formatted string stored in the IPFS (InterPlanetary File System) that may be accessed via the Infura IPFS Gateway URL. So, for example, let's say that the // Mediated Sales Transaction has an IPFS Hash of QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnHH. Then, the information about this Mediated Sales Transaction may be seen in one of // the following URLs: // 1) https://ipfs.infura.io/ipfs/QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnHH // 2) https://gateway.ipfs.io/ipfs/QmZ4DZ1spT2eQhUC5mfQGugM4AhLjq8ZvuZvHdQvnvKnH // WARNING! Befor a Seller places infomation about himself/herself in this Smart Contract, the Seller must first have at least one Item placed For Sale. // WARNING!! It is the responsibility of the Users of this Smart Contract to enter valid IPFS Hash String values for each of the Items Sold and of the Seller's Description! // Constants used for the Double-Linked list and other uses. bool constant private PREV = false; bool constant private NEXT = true; string constant private EMPTY_STRING = ""; string constant private UNDER_SCORE_STRING = "_"; // This is the price of all specific Items being sold by Sellers identified by their Ethereum Address in Wei. // The price is on a per-Item basis for one Item. // // Mapping is as follows: // 1) Key: Concatenation of Ethereum Address of Seller followed by IPFS Hash of Item being sold with an UNDER_SCORE_STRING in between. // 2) Value: Price of item being sold in Wei. // // Only the Seller may change or set the price of an Item. // The Seller is identified by an Ethereum Address. mapping(string => uint) private pricesOfItems; // This is the quantity of each Item that is being sold by a Seller. Thus, for each Item that is being sold their is a certain number of such items available for sale. // // Mapping is as follows: // 1) Key: Concatenation of Ethereum Address of Seller followed by IPFS Hash of Item being sold with an UNDER_SCORE_STRING in between. // 2) Value: Quanity available to be sold for the Item. // // Only the Seller may change or set the quantity of the item that is available for sale.. // The Seller is identified by an Ethereum Address. mapping(string => uint) private quantityAvailableForSaleOfEachItem; // This is all the Items being sold on a per-seller basis where each seller is identified by it's Ethereum Address. The "mapping(string => mapping(bool => string))" is a // double-linked list used to maintain such a list of Items for a seller. The reason for using a double-linked list over an array is that it's difficult to delete items of an array // and still map back the Item to the Seller; use of arrays to maintain a dynamic list leads to having the array grow forever. Use of below technique solves this problem via use of "delete" // on a "mapping" where such a resource does get deleted. Use of Double-Linked list technique explained and code borrowed from the // https://ethereum.stackexchange.com/questions/15337/can-we-get-all-elements-stored-in-a-mapping-in-the-contract web page. // // For an explanation as to how the "mapping(string => mapping(bool => string))" double linked-list works and the code pertaining to it from which was borrowed, please go to the // https://ethereum.stackexchange.com/questions/15337/can-we-get-all-elements-stored-in-a-mapping-in-the-contract web page. // // Mapping is as follows: // 1) First Key: Ethereum Address of the Seller // 2) First Value: The "mapping(string => mapping(bool => string))" double-linked list consisting of the IPFS Hashes of the various Items the Seller is selling. Each "string" in this mapping is // either an empty string or the IPFS Hash of an Item being sold by the Seller. The "bool" is either the PREV or NEXT boolean value above. mapping(address => mapping(string => mapping(bool => string)) ) private itemsBeingSoldBySpecificSeller; // Used strictly to determine if an Item being sold by a Seller is in it's "itemsBeingSoldBySpecificSeller" double-linked list. // // Mapping is as follows: // 1) Key: Concatenation of Ethereum Address of Seller followed by IPFS Hash of Item being sold with an UNDER_SCORE_STRING in between. // 2) Value: Boolean value indicating if the Item is in the "itemsBeingSoldBySpecificSeller" double-linked list of the Seller. mapping(string => bool) private itemsKeysMap; // Used to determine the number of Items being sold by a Seller. This is NOT the quantity being sold for each Item, but the number of different types of Items. // It contains the number of Items in the seller's "mapping(string => mapping(bool => string))" double-linked list of the "itemsBeingSoldBySpecificSeller" mapping. // // Mapping is as follows: // 1) Key: Ethereum Address of the Seller. // 2) Value: Number of different types of Items being sold that is in the Seller's "mapping(string => mapping(bool => string))" double-linked list of the // "itemsBeingSoldBySpecificSeller" mapping. mapping(address => uint) private numberOfDifferentItemsBeingSoldBySellerMap; // A double-linked list that lists all the Sellers by their Ethereum Address in string format. // // For an explanation as to how the "mapping(string => mapping(bool => string))" double linked-list works and the code pertaining to it from which was borrowed, please go to the // https://ethereum.stackexchange.com/questions/15337/can-we-get-all-elements-stored-in-a-mapping-in-the-contract web page. // // Each "string" below refers to the Ethereum Address of the Seller in string format. mapping(string => mapping(bool => string)) private listOfSellers; // Map that keeps track of whether a Seller exists. The "address" key is the Ethereum Address of the Seller. mapping(address => bool) public sellerExists; // Keeps a count on the Number of Sellers selling on this platform. uint private numberOfSellers; // This Mapping contains the Description Information about the Sellers. The Seller is responsible for adding this information. // A Seller must first have in it's "itemsBeingSoldBySpecificSeller" double-linked list at least one Item to sell BEFORE being able to add Information about // about himself/herself. The IPFS Hash string should refer to a JSON-formatted string describing the seller in the IPFS Storage System. // // Mapping is as follows: // 1) Key: Ethereum Address of the Seller // 2) Value: IPFS Hash string of the information pertaining to the Seller. This information is stored in the IPFS Storage Network. mapping(address => string) private descriptionInfoAboutSellers; // This Mapping is used to determine if a Seller is willing to sell his/her Items via the use of a Mediator. The Mediator is used to determine that BOTH parties are BOTH satisfied with the // Sale of the Item. One iten of contention is that the Buyer actualy got the Item he/she purchased. // In these types of Sales involving a Mediator, two out of the three parties - Buyer, Seller, and/or Mediator - must approve the sale transaction BEFORE the ETH is sent to the Seller. // In such cases involving a Mediator, the Buyer's ETH is not sent to the Seller, but sent to this Smart Contract. Once two out of the three parties gives the OK for the Sale, then 95% of the // Sales Price of the Item goes to the Seller and 5% goes to the Mediator. // // The "key" is the Ethereum Seller Address and the value is a boolean. If the Seller is willing to sell via a Mediator, then this value if boolean true. // If the Seller is NOT willing to sell via a Mediator, then this value if boolean false. mapping(address => bool) private sellerWillingToSellItemsViaMediator; // Refers to the instance of the FranklinDecentralizedMarketplaceMediation Contract that was set by the Contract Owner via the "setFranklinDecentralizedMarketplaceMediationContract" method. // // The Contract code had to be split in two, because the Etherum Virtual Machine (EVM) would not allow deployment of a Contract // that has more than 24576 bytes. So, the decision was made to SPLIT the code into the FranklinDecentralizedMarketplace // and FranklinDecentralizedMarketplaceMediation Contracts where the FranklinDecentralizedMarketplace would deploy the // FranklinDecentralizedMarketplaceMediation Contract via it's Constructor. // // So, this FranklinDecentralizedMarketplace Contract handles most of the functionality pertaining to the Franklin Decentralized Marketplace Smart Contract functionality, while MOST of the // functionality dealing with Mediated Sales Transactions is done by the FranklinDecentralizedMarketplaceMediation Smart Contract. FranklinDecentralizedMarketplaceMediation public mediationMarketplace; bool public mediationMarketplaceHasBeenSet; address public contractOwner; // event SetSellerWillingToSellItemsViaMediatorEvent(address _msgSender, bool _flag); // event AddOrUpdateSellerDescriptionEvent(address _msgSender, string _ipfsHashKeyDescription); // event RemoveSellerAndItsItems(address _msgSender); // event SetPriceOfItemEvent(address _msgSender, string _keyItemIpfsHash, uint _priceInWei); // event SetQuantityAvailableForSaleOfAnItem(address _msgSender, string _keyItemIpfsHash, uint _quantity); event PurchaseItemWithoutMediatorEvent(address _msgSender, address payable _sellerAddress, string _keyItemIpfsHash, uint _quantity); event AddItemForSaleAndPossiblySellerEvent(address _msgSender, string _keyItemIpfsHash); event RemoveItemForSaleAndPossibleSellerEvent(address _msgSender, string _keyItemIpfsHash); constructor() public { contractOwner = msg.sender; } function setFranklinDecentralizedMarketplaceMediationContract(address franklinDecentralizedMarketplaceMediationAddress) public { require(msg.sender == contractOwner, "This method may only be executed by the Contract Owner!"); require(!mediationMarketplaceHasBeenSet, "The mediationMarkeplace contract reference has already been set!"); FranklinDecentralizedMarketplaceMediation temp = FranklinDecentralizedMarketplaceMediation(franklinDecentralizedMarketplaceMediationAddress); require(contractOwner == temp.contractOwner(), "Must be same Contract Owner in both the FranklinDecentralizedMarketplace and FranklinDecentralizedMarketplaceMediation contracts!"); mediationMarketplace = temp; mediationMarketplaceHasBeenSet = true; } // Determines if a Seller with the given "_sellerAddress" is willing to make sales of it's Items via a Mediator. // A return of boolean false indicates that the Seller is NOT willing to sell his/her items via a Mediator. // A return of boolean true indicates that the Seller IS willing to sell his/her items via a Mediator. function sellerIsWillingToSellItemsViaMediator(address _sellerAddress) external view returns (bool) { return sellerWillingToSellItemsViaMediator[_sellerAddress]; } // This function allows a Seller to set into this Smart Contract whether he/she is willing to sell his/her Items via the use of a Mediator. // The Seller in this function is the "msg.sender". // // A "_flag" value of boolean true, indicates that the Seller IS willing to make sales via a Mediator. // A "_flag" value of boolean false, indicates that the Seller is NOT willing to make sales via a Mediator. function setSellerWillingToSellItemsViaMediator(bool _flag) external { if (!sellerExists[msg.sender]) { return; } sellerWillingToSellItemsViaMediator[msg.sender] = _flag; // emit SetSellerWillingToSellItemsViaMediatorEvent(msg.sender, _flag); } // This method allows a Seller to add/update a Description about himself/herself feeding in the "_ipfsHashKeyDescription" that should point to a JSON-formatted string in the IPFS Storage System. // The "msg.sender" is the Seller. function addOrUpdateSellerDescription(string memory _ipfsHashKeyDescription) public { require(numberOfDifferentItemsBeingSoldBySellerMap[msg.sender] > 0, "You must first add at least ONE Item For Sale before adding a description of yourself!"); require(!GeneralUtilities._compareStringsEqual(_ipfsHashKeyDescription, EMPTY_STRING), "Cannot have an empty String for the IPFS Hash Key Description of a Seller!"); descriptionInfoAboutSellers[msg.sender] = _ipfsHashKeyDescription; // emit AddOrUpdateSellerDescriptionEvent(msg.sender, _ipfsHashKeyDescription); } // Gets the Description of a Seller identified by the given "_sellerAddress". The Description will be the IPFS Hash where the JSON-formatted Description of the Seller exists. // If no such IPFS Hash Key Description exists, then an EMPTY_STRING will be returned. function getSellerIpfsHashDescription(address _sellerAddress) external view returns (string memory) { return descriptionInfoAboutSellers[_sellerAddress]; } // Adds a Seller - identified by it's Ethereum Address - to the "listOfSellers" double-linked list. // // Source --> https://ethereum.stackexchange.com/questions/15337/can-we-get-all-elements-stored-in-a-mapping-in-the-contract function _addSeller(address _sellerAddress) private { string memory sellerAddressStringKey = GeneralUtilities._addressToString(_sellerAddress); // Will not bother to check for valid "address", because Ethereum Virtual Machine does that for us automatically and will just throw an Error that caller of this // method will have to catch. if (sellerExists[_sellerAddress]) { return; } // Link the new node listOfSellers[sellerAddressStringKey][PREV] = EMPTY_STRING; listOfSellers[sellerAddressStringKey][NEXT] = listOfSellers[EMPTY_STRING][NEXT]; // Insert the new node listOfSellers[listOfSellers[EMPTY_STRING][NEXT]][PREV] = sellerAddressStringKey; listOfSellers[EMPTY_STRING][NEXT] = sellerAddressStringKey; numberOfSellers = GeneralUtilities._safeMathAdd(numberOfSellers, 1); sellerExists[_sellerAddress] = true; } // Removes a Seller - identified by it's Ethereum Address - from the "listOfSellers" double-linked list. // // No need to check for empty string on returned Ethereum Address string, because if the "_sellerAddress" is an invalid Ethereum Address, then Ethereum Virtual Machine will // throw an Error. Caller of this method will have to check if an Error was thrown. // // Source --> https://ethereum.stackexchange.com/questions/15337/can-we-get-all-elements-stored-in-a-mapping-in-the-contract function _removeSeller(address _sellerAddress) private { string memory sellerAddressStringKey = GeneralUtilities._addressToString(_sellerAddress); Iif (!sellerExists[_sellerAddress]) { return; } // Stitch the neighbours together listOfSellers[ listOfSellers[sellerAddressStringKey][PREV] ][NEXT] = listOfSellers[sellerAddressStringKey][NEXT]; listOfSellers[ listOfSellers[sellerAddressStringKey][NEXT] ][PREV] = listOfSellers[sellerAddressStringKey][PREV]; // Delete state storage delete listOfSellers[sellerAddressStringKey][PREV]; delete listOfSellers[sellerAddressStringKey][NEXT]; numberOfSellers = GeneralUtilities._safeMathSubtract(numberOfSellers, 1); delete sellerExists[_sellerAddress]; delete sellerWillingToSellItemsViaMediator[_sellerAddress]; // Decided to NOT delete this information, because a Seller may be involved in a Mediator type of Sale, and we still wish to keep information // about the Seller. // delete descriptionInfoAboutSellers[_sellerAddress]; } // Allows a Seller to remove himself/herself from the "listOfSellers". The Seller to be removed is the "msg.sender" Ethereum Address that calls this method. // Not only will the Seller be removed but also ALL of the Items assovciated with this "msg.sender" Seller. function removeSeller() external { uint numberOfDifferentItemsBeingSoldBySeller = numberOfDifferentItemsBeingSoldBySellerMap[msg.sender]; // We have to first get ALL of the IPFS Key Hashes of the Items for Sale, because the Indexes will change as we delete the Items. string[] memory itemsForSale = new string[](numberOfDifferentItemsBeingSoldBySeller); for (uint itemIndex = 0; itemIndex < numberOfDifferentItemsBeingSoldBySeller; itemIndex++) { string memory itemForSale = getItemForSale(msg.sender, itemIndex); itemsForSale[itemIndex] = itemForSale; } // Then we delete step-by-step. for (uint i = 0; i < numberOfDifferentItemsBeingSoldBySeller; i++) { removeItemForSale(itemsForSale[i]); } // The Seller "msg.sender" will be automatically removed from the "listOfSellers" when the last Item it has For Sale is removed. // emit RemoveSellerAndItsItems(msg.sender); } // Gets the Seller Ethereum Address at the given "_index" from the "listOfSellers" double-linked list. // // Input Parameter: // _itemIndex : Index number into the "listOfSellers" double-linked list of Items Seller is selling. // Index starts at 0. // // Returns: // 1) If the "_index" is less than the "numberOfSellers", then the Etheruem Address of the Seller at the given "_index" into the "listOfSellers" double-linked list // is returned. // 2) If the "_index" is greater than or equal to the "numberOfSellers", then an Exception is thrown via the "require" below. function getSellerAddress(uint _index) external view returns (address) { require(_index < numberOfSellers, "Index value given is greater than or equal to the Number of Sellers! It should be less than the Number of Sellers!"); // The "key" below is the Ethereum Address in string format that is in the "listOfSellers" double-linked list. uint keyCount = 0; string memory key = EMPTY_STRING; while (true) { key = listOfSellers[key][NEXT]; if (keyCount == _index) { break; } keyCount++; } return GeneralUtilities._parseEthereumAddressStringToAddress(key); } // Returns back the Number of Sellers in this Decentralized Marketplace. function getNumberOfSellers() external view returns (uint) { return numberOfSellers; } // Allows a Seller to set the Price of an Item the Seller is selling in Wei. The Seller would be the "msg.sender" Ethereum Address that calls this method. // // Input Parameters: // 1) _keyItemIpfsHash : This is the IPFS Hash of the item being sold that points to a JSON-formatted string in the IPFS Storage System. // 2) _priceInWei : Price of the Item to be set in Wei // 3) msg.sender : Ethereum Address of the Seller // // If the Seller sets the Price of the Item to Zero (i.e., 0) Wei, then that means that the Item is set to a State where it cannot be purchased. // // If the Item in questions does not exist as an Item for Sale under the "msg.sender" Seller of if the "msg.sender" is not a Seller, then no setting of a price // gets done. function setPriceOfItem(string memory _keyItemIpfsHash, uint _priceInWei) public { require(!GeneralUtilities._compareStringsEqual(_keyItemIpfsHash, EMPTY_STRING), "Cannot have an empty String for the IPFS Hash Key of an Item to Sell!"); // I was thinking of not allowing the Seller to set the Price of an Itemn to Zero wei, but then I changed my mind. The Seller may have a situation where he/she has // the Item in stock, but does not wish to sell the Item yet. // require(_priceInWei > 0, "Cannot set the Price of an Item to Zero Wei!"); string memory combinedKeyAddressPlusItemIpfsHash = GeneralUtilities._getConcatenationOfEthereumAddressAndIpfsHash(msg.sender, _keyItemIpfsHash); require(itemsKeysMap[combinedKeyAddressPlusItemIpfsHash], "Given IPFS Hash of Item is not listed as an Item For Sale by the Seller!"); pricesOfItems[combinedKeyAddressPlusItemIpfsHash] = _priceInWei; // emit SetPriceOfItemEvent(msg.sender, _keyItemIpfsHash, _priceInWei); } // Gets the Price (in Wei) of an Item - identified by the given "_keyItemIpfsHash" input parameter - being sold by a // Seller - identified by the given "_sellerAddress" Etherum Address. // // A return value of Zero (i.e., 0) Wei indicates that the Seller has not yet set a Price for this Item, and thus the Item cannot be purchased function getPriceOfItem(address _sellerAddress, string memory _keyItemIpfsHash) public view returns (uint) { string memory combinedKeyAddressPlusItemIpfsHash = GeneralUtilities._getConcatenationOfEthereumAddressAndIpfsHash(_sellerAddress, _keyItemIpfsHash); require(itemsKeysMap[combinedKeyAddressPlusItemIpfsHash], "Given IPFS Hash of Item is not listed as an Item For Sale from the Seller!"); return pricesOfItems[combinedKeyAddressPlusItemIpfsHash]; } // Allows a Seller to set the Quantity available for Sale of an Item that a Seller is selling. The Seller would be the "msg.sender" Ethereum Address that calls this method. // // Input Parameters: // 1) _keyItemIpfsHash : This is the IPFS Hash of the item being sold that points to a JSON-formatted string in the IPFS Storage System. // 2) _quantity : The quantity available For Sale of the Item that the Seller is selling. // 3) msg.sender : Ethereum Address of the Seller function setQuantityAvailableForSaleOfAnItem(string memory _keyItemIpfsHash, uint _quantity) public { require(!GeneralUtilities._compareStringsEqual(_keyItemIpfsHash, EMPTY_STRING), "Cannot have an empty String for the IPFS Hash Key of an Item to Sell!"); string memory combinedKeyAddressPlusItemIpfsHash = GeneralUtilities._getConcatenationOfEthereumAddressAndIpfsHash(msg.sender, _keyItemIpfsHash); require(itemsKeysMap[combinedKeyAddressPlusItemIpfsHash], "Given IPFS Hash of Item is not listed as an Item For Sale by the Seller!"); quantityAvailableForSaleOfEachItem[combinedKeyAddressPlusItemIpfsHash] = _quantity; // emit SetQuantityAvailableForSaleOfAnItem(msg.sender, _keyItemIpfsHash, _quantity); } // Does same functionality as above method, but may ONLY be executed by the "mediationMarketplace" Contract. function setQuantityAvailableForSaleOfAnItem_v2(address _sellerAddress, string memory _keyItemIpfsHash, uint _quantity) public { require(mediationMarketplaceHasBeenSet, "The mediationMarketplace instance has not been set by the Contract Owner!"); require(!GeneralUtilities._compareStringsEqual(_keyItemIpfsHash, EMPTY_STRING), "Cannot have an empty String for the IPFS Hash Key of an Item to Sell!"); string memory combinedKeyAddressPlusItemIpfsHash = GeneralUtilities._getConcatenationOfEthereumAddressAndIpfsHash(_sellerAddress, _keyItemIpfsHash); require(itemsKeysMap[combinedKeyAddressPlusItemIpfsHash], "Given IPFS Hash of Item is not listed as an Item For Sale by the Seller!"); require(msg.sender == address(mediationMarketplace), "This method may only be executed by the FranklinDecentralizedMarketplaceMediation contract!"); quantityAvailableForSaleOfEachItem[combinedKeyAddressPlusItemIpfsHash] = _quantity; // emit SetQuantityAvailableForSaleOfAnItem(msg.sender, _keyItemIpfsHash, _quantity); } // Gets the Quantity of the given "_keyItemIpfsHash" Item available For sale by the given "_sellerAddress" Seller. // // Input Parameters: // 1) _sellerAddress : Ethreum Address of the Seller // 2) _keyItemIpfsHash : This is the IPFS Hash of the item being sold that points to a JSON-formatted string in the IPFS Storage System. function getQuantityAvailableForSaleOfAnItemBySeller(address _sellerAddress, string memory _keyItemIpfsHash) public view returns (uint) { string memory combinedKeyAddressPlusItemIpfsHash = GeneralUtilities._getConcatenationOfEthereumAddressAndIpfsHash(_sellerAddress, _keyItemIpfsHash); require(itemsKeysMap[combinedKeyAddressPlusItemIpfsHash], "Given IPFS Hash of Item is not listed as an Item For Sale from the Seller!"); return quantityAvailableForSaleOfEachItem[combinedKeyAddressPlusItemIpfsHash]; } // Allows a Buyer - identified by the "msg.sender" Ethereum Address that calls this method - to purchase a "_quantity" of a specific Item - identified // by it's "_keyItemIpfsHash" - from a given Seller - identified by it's "_sellerAddress" Ethereum Address. // // The Buyer is assuming the risk here in that the Buyer is expecting the Seller to be honest enough to send to the Buyer the quantity of Items // in the purchase to the Buyer after the Seller receives the payment. // // Input Parameters: // 1) _sellerAddress : Ethereum Address of the Seller // 2) _keyItemIpfsHash : This is the IPFS Hash of the item being sold that points to a JSON-formatted string in the IPFS Storage System // 3) _quantity : Quantity of the Item that the "msg.sender" Buyer wishes to purchase. // 4) msg.sender : Address of the Buyer function purchaseItemWithoutMediator(address payable _sellerAddress, string memory _keyItemIpfsHash, uint _quantity) payable public { require(_quantity > 0, "Must purchase at least 1 quantity of the Item for Sale to happen!"); require(!GeneralUtilities._compareStringsEqual(_keyItemIpfsHash, EMPTY_STRING), "Cannot have an empty String for the IPFS Hash Key of an Item you are purchasing!"); require(msg.sender != _sellerAddress, "The Buyer Address cannot be the same as the Seller Address!"); require(sellerExists[_sellerAddress], "Given Seller Address does not exist as a Seller!"); string memory combinedKeyAddressPlusItemIpfsHash = GeneralUtilities._getConcatenationOfEthereumAddressAndIpfsHash(_sellerAddress, _keyItemIpfsHash); require(itemsKeysMap[combinedKeyAddressPlusItemIpfsHash], "Given IPFS Hash of Item is not listed as an Item For Sale from the Seller!"); require(quantityAvailableForSaleOfEachItem[combinedKeyAddressPlusItemIpfsHash] > 0, "Seller has Zero quantity available for Sale for the Item requested to purchase!"); Erequire(quantityAvailableForSaleOfEachItem[combinedKeyAddressPlusItemIpfsHash] >= _quantity, "Quantity available For Sale of the Item from the Seller is less than the quantity requested to purchase! Not enough of the Itenm available For Sale"); require(pricesOfItems[combinedKeyAddressPlusItemIpfsHash] > 0, "The Seller has not yet set a Price for Sale for the requested Item! Cannot purchase the Item!"); uint totalAmountOfWeiNeededToPurchase = GeneralUtilities._safeMathMultiply(pricesOfItems[combinedKeyAddressPlusItemIpfsHash], _quantity); require(msg.value >= totalAmountOfWeiNeededToPurchase, "Not enough ETH was sent to purchase the quantity requested of the Item!"); // Subtract the appropriate "_quantity" of that Item for Sale to keep track of the new available quauntity of that Item that may be sold. quantityAvailableForSaleOfEachItem[combinedKeyAddressPlusItemIpfsHash] = GeneralUtilities._safeMathSubtract(quantityAvailableForSaleOfEachItem[combinedKeyAddressPlusItemIpfsHash], _quantity); // We want to make sure to return back any excess ETH that exceeds the amount necessary to purchase the given "_quantity" of the Item. msg.sender.transfer(msg.value - totalAmountOfWeiNeededToPurchase); // Transfer the "totalAmountOfWeiNeededToPurchase" to the Seller. _sellerAddress.transfer(totalAmountOfWeiNeededToPurchase); emit PurchaseItemWithoutMediatorEvent(msg.sender, _sellerAddress, _keyItemIpfsHash, _quantity); } // Adds an Item - identified by the given "_keyItemIpfsHash" input - to be Sold by a Seller to it's "itemsBeingSoldBySpecificSeller" double-linked list. // The Seller in this function call is the "msg.sender" Ethereum Address that calls this function. Also, this causes the "msg.sender" Seller to be added in the "listOfSellers". // // Source --> https://ethereum.stackexchange.com/questions/15337/can-we-get-all-elements-stored-in-a-mapping-in-the-contract function addItemForSale(string memory _keyItemIpfsHash) public { require(!GeneralUtilities._compareStringsEqual(_keyItemIpfsHash, EMPTY_STRING), "Cannot have an empty String for the IPFS Hash Key of an Item to Sell!"); // If the specific type of Item is already in the list of Items that the Seller is selling, then no need to add the Item, because it's already there. string memory combinedKeyAddressPlusItemIpfsHash = GeneralUtilities._getConcatenationOfEthereumAddressAndIpfsHash(msg.sender, _keyItemIpfsHash); if (itemsKeysMap[combinedKeyAddressPlusItemIpfsHash]) { return; } // This below is the double-linked list of different types of Items being sold by a Seller. mapping(string => mapping(bool => string)) storage itemsBeingSoldBySenderAddress = itemsBeingSoldBySpecificSeller[msg.sender]; // Link the new node itemsBeingSoldBySenderAddress[_keyItemIpfsHash][PREV] = EMPTY_STRING; itemsBeingSoldBySenderAddress[_keyItemIpfsHash][NEXT] = itemsBeingSoldBySenderAddress[EMPTY_STRING][NEXT]; // Insert the new node itemsBeingSoldBySenderAddress[itemsBeingSoldBySenderAddress[EMPTY_STRING][NEXT]][PREV] = _keyItemIpfsHash; itemsBeingSoldBySenderAddress[EMPTY_STRING][NEXT] = _keyItemIpfsHash; numberOfDifferentItemsBeingSoldBySellerMap[msg.sender] = GeneralUtilities._safeMathAdd(numberOfDifferentItemsBeingSoldBySellerMap[msg.sender], 1); itemsKeysMap[combinedKeyAddressPlusItemIpfsHash] = true; _addSeller(msg.sender); // No seller added if Seller already exists. emit AddItemForSaleAndPossiblySellerEvent(msg.sender, _keyItemIpfsHash); } // Removes an Item - identified by the given "_keyItemIpfsHash" input - being Sold by a Seller in it's "itemsBeingSoldBySpecificSeller" double-linked list. // The Seller in this function call is the "msg.sender" // Ethereum Address that calls this function. // // WARNING! If this method causes removing the last Item for Sale, the Seller (i.e., the "msg.sender") will be removed from the "listOfSellers". // // Source --> https://ethereum.stackexchange.com/questions/15337/can-we-get-all-elements-stored-in-a-mapping-in-the-contract function removeItemForSale(string memory _keyItemIpfsHash) public { string memory combinedKeyAddressPlusItemIpfsHash = GeneralUtilities._getConcatenationOfEthereumAddressAndIpfsHash(msg.sender, _keyItemIpfsHash); if (!itemsKeysMap[combinedKeyAddressPlusItemIpfsHash]) { return; } // This below is the double-linked list of different types of Items being sold by a Seller. mapping(string => mapping(bool => string)) storage itemsBeingSoldBySenderAddress = itemsBeingSoldBySpecificSeller[msg.sender]; // Stitch the neighbours together itemsBeingSoldBySenderAddress[ itemsBeingSoldBySenderAddress[_keyItemIpfsHash][PREV] ][NEXT] = itemsBeingSoldBySenderAddress[_keyItemIpfsHash][NEXT]; itemsBeingSoldBySenderAddress[ itemsBeingSoldBySenderAddress[_keyItemIpfsHash][NEXT] ][PREV] = itemsBeingSoldBySenderAddress[_keyItemIpfsHash][PREV]; // Delete state storage delete itemsBeingSoldBySenderAddress[_keyItemIpfsHash][PREV]; delete itemsBeingSoldBySenderAddress[_keyItemIpfsHash][NEXT]; numberOfDifferentItemsBeingSoldBySellerMap[msg.sender] = GeneralUtilities._safeMathSubtract(numberOfDifferentItemsBeingSoldBySellerMap[msg.sender], 1); delete itemsKeysMap[combinedKeyAddressPlusItemIpfsHash]; delete pricesOfItems[combinedKeyAddressPlusItemIpfsHash]; delete quantityAvailableForSaleOfEachItem[combinedKeyAddressPlusItemIpfsHash]; if (numberOfDifferentItemsBeingSoldBySellerMap[msg.sender] == 0) { _removeSeller(msg.sender); } emit RemoveItemForSaleAndPossibleSellerEvent(msg.sender, _keyItemIpfsHash); } // Gets the number of different types of Items being sold by a Seller. Each Seller shall have a unique Ethereum Address that will be used to identify // the Seller. function getNumberOfDifferentItemsBeingSoldBySeller(address _sellerAddress) external view returns (uint) { return numberOfDifferentItemsBeingSoldBySellerMap[_sellerAddress]; } // Returns back a boolean value indicating if a certain Item is available for sale from a given Seller. // // Input Parameters: // 1) _sellerAddress : The Ethereum Address of the Seller // 2) _keyItemIpfsHash : The IPFS Hash ID string identifying an Item For Sale // // Returns: // 1) Boolean true : If the given "_sellerAddress" is selling the given Item identified by it's "_keyItemIpfsHash" // 2) Boolean false : If the given "_sellerAddress" is NOT selling the given Item identified by it's "_keyItemIpfsHash" function itemForSaleFromSellerExists(address _sellerAddress, string memory _keyItemIpfsHash) public view returns (bool) { string memory combinedKeyAddressPlusItemIpfsHash = GeneralUtilities._getConcatenationOfEthereumAddressAndIpfsHash(_sellerAddress, _keyItemIpfsHash); return itemsKeysMap[combinedKeyAddressPlusItemIpfsHash]; } // Gets the IPFS Hash string of an Item being sold by a Seller. Index values start at 0. // // This IPFS Hash string refers to a JSON-formatted string that is stored in the IPFS Storage System. // // Input Parameters: // 1) _sellerAddress : The Ethereum Address of the Seller // 2) _itemIndex : Index number into the "itemsBeingSoldBySpecificSeller" double-linked list of Items Seller is selling. // Index starts at 0. // // Returns: // 1) If the "_itemIndex" refers to an Item that the "_sellerAddress" is selling, then the IPFS Hash string of the Item being sold is returned. // 2) If the "_itemIndex" does NOT refer to an Item that the "_sellerAddress" is selling, then an EMPTY_STRING is returned. function getItemForSale(address _sellerAddress, uint _itemIndex) public view returns (string memory) { if (_itemIndex >= numberOfDifferentItemsBeingSoldBySellerMap[_sellerAddress]) { return EMPTY_STRING; } // This below is the double-linked list of different types of Items being sold by the "_sellerAddress". mapping(string => mapping(bool => string)) storage itemsBeingSoldBySenderAddress = itemsBeingSoldBySpecificSeller[_sellerAddress]; uint keyCount = 0; string memory ipfsHashKeyOfItem = EMPTY_STRING; while (true) { ipfsHashKeyOfItem = itemsBeingSoldBySenderAddress[ipfsHashKeyOfItem][NEXT]; if (keyCount == _itemIndex) { break; } keyCount++; } return ipfsHashKeyOfItem; } } |


This page demonstrates a goog.History object used in an iframe. Loading JS code in an iframe is useful for large apps because the JS code can be sent in bite-sized script blocks that browsers can evaluate incrementally, as they are received over the wire.
For an introduction to the goog.History object, see history1.html and history2.html. This demo uses visible history, like the first demo.
Try following the hash links below, or updating the location with your own tokens. Replacing the token will update the page address without appending a new history entry.
Set #fragment
first
second
third
Set Token
The current history state: |
The state should be correctly restored after you leave the page and hit the back button.


Journal of the Faculty of Education, Kagoshima University
- Journal of the Faculty of Education, Kagoshima University, vol. 58 (2007)
- Journal of the Faculty of Education, Kagoshima University, vol. 56 (2005)
- Journal of the Faculty of Education, Kagoshima University, vol. 53 (2002)
- Journal of the Faculty of Education, Kagoshima University, vol. 51 (2000)
- Journal of the Faculty of Education, Kagoshima University, vol. 50 (1999)
- Journal of the Faculty of Education, Kagoshima University, vol. 49 (1998)
- Journal of the Faculty of Education, Kagoshima University, vol. 48 (1997)
- Journal of the Faculty of Education, Kagoshima University, vol. 47 (1996)
- Journal of the Faculty of Education, Kagoshima University, vol. 46 (1995)
- Journal of the Faculty of Education, Kagoshima University, vol. 43 (1992)
- Journal of the Faculty of Education, Kagoshima University, vol. 42 (1991)
- Journal of the Faculty of Education, Kagoshima University, vol. 38 (1987)
- Journal of the Faculty of Education, Kagoshima University, vol. 25 (1974)
- Journal of the Faculty of Education, Kagoshima University, vol. 24 (1973)
- Journal of the Faculty of Education, Kagoshima University, vol. 22 (1971)


class Mandrill::Urls
- Mandrill::Urls
- Reference
- Object
Defined in:
mandrill/api.crConstructors
Instance Method Summary
-
#add_tracking_domain(domain)
Add a tracking domain to your account @param [String] domain a domain name @return [Hash] information about the domain - [String] domain the tracking domain name - [String] created_at the date and time that the tracking domain was added as a UTC string in YYYY-MM-DD HH:MM:SS format - [String] last_tested_at when the domain's DNS settings were last tested as a UTC string in YYYY-MM-DD HH:MM:SS format - [Hash] cname details about the domain's CNAME record - [Boolean] valid whether the domain's CNAME record is valid for use with Mandrill - [String] valid_after when the domain's CNAME record will be considered valid for use with Mandrill as a UTC string in YYYY-MM-DD HH:MM:SS format.
-
#check_tracking_domain(domain)
Checks the CNAME settings for a tracking domain.
-
#list
Get the 100 most clicked URLs @return [Array] the 100 most clicked URLs and their stats - [Hash] return[] the individual URL stats - [String] url the URL to be tracked - [Integer] sent the number of emails that contained the URL - [Integer] clicks the number of times the URL has been clicked from a tracked email - [Integer] unique_clicks the number of unique emails that have generated clicks for this URL
-
#search(q)
Return the 100 most clicked URLs that match the search query given @param [String] q a search query @return [Array] the 100 most clicked URLs matching the search query - [Hash] return[] the URL matching the query - [String] url the URL to be tracked - [Integer] sent the number of emails that contained the URL - [Integer] clicks the number of times the URL has been clicked from a tracked email - [Integer] unique_clicks the number of unique emails that have generated clicks for this URL
-
#time_series(url)
Return the recent history (hourly stats for the last 30 days) for a url @param [String] url an existing URL @return [Array] the array of history information - [Hash] return[] the information for a single hour - [String] time the hour as a UTC date string in YYYY-MM-DD HH:MM:SS format - [Integer] sent the number of emails that were sent with the URL during the hour - [Integer] clicks the number of times the URL was clicked during the hour - [Integer] unique_clicks the number of unique clicks generated for emails sent with this URL during the hour
-
#tracking_domains
Get the list of tracking domains set up for this account @return [Array] the tracking domains and their status - [Hash] return[] the individual tracking domain - [String] domain the tracking domain name - [String] created_at the date and time that the tracking domain was added as a UTC string in YYYY-MM-DD HH:MM:SS format - [String] last_tested_at when the domain's DNS settings were last tested as a UTC string in YYYY-MM-DD HH:MM:SS format - [Hash] cname details about the domain's CNAME record - [Boolean] valid whether the domain's CNAME record is valid for use with Mandrill - [String] valid_after when the domain's CNAME record will be considered valid for use with Mandrill as a UTC string in YYYY-MM-DD HH:MM:SS format.
Constructor Detail
Instance Method Detail
Add a tracking domain to your account @param [String] domain a domain name @return [Hash] information about the domain
- [String] domain the tracking domain name
- [String] created_at the date and time that the tracking domain was added as a UTC string in YYYY-MM-DD HH:MM:SS format
- [String] last_tested_at when the domain
Checks the CNAME settings for a tracking domain. The domain must have been added already with the add-tracking-domain call @param [String] domain an existing tracking domain name @return [Hash] information about the tracking domain
- [String] domain the tracking domain name
- [String] created_at the date and time that the tracking domain was added as a UTC string in YYYY-MM-DD HH:MM:SS format
- [String] last_tested_at when the domain
Get the 100 most clicked URLs @return [Array] the 100 most clicked URLs and their stats
- [Hash] return[] the individual URL stats
- [String] url the URL to be tracked
- [Integer] sent the number of emails that contained the URL
- [Integer] clicks the number of times the URL has been clicked from a tracked email
- [Integer] unique_clicks the number of unique emails that have generated clicks for this URL
Return the 100 most clicked URLs that match the search query given @param [String] q a search query @return [Array] the 100 most clicked URLs matching the search query
- [Hash] return[] the URL matching the query
- [String] url the URL to be tracked
- [Integer] sent the number of emails that contained the URL
- [Integer] clicks the number of times the URL has been clicked from a tracked email
- [Integer] unique_clicks the number of unique emails that have generated clicks for this URL
Return the recent history (hourly stats for the last 30 days) for a url @param [String] url an existing URL @return [Array] the array of history information
- [Hash] return[] the information for a single hour
- [String] time the hour as a UTC date string in YYYY-MM-DD HH:MM:SS format
- [Integer] sent the number of emails that were sent with the URL during the hour
- [Integer] clicks the number of times the URL was clicked during the hour
- [Integer] unique_clicks the number of unique clicks generated for emails sent with this URL during the hour
Get the list of tracking domains set up for this account @return [Array] the tracking domains and their status
- [Hash] return[] the individual tracking domain
- [String] domain the tracking domain name
- [String] created_at the date and time that the tracking domain was added as a UTC string in YYYY-MM-DD HH:MM:SS format
- [String] last_tested_at when the domain


jQuery Clock Time Picker v2.6.4
NPM package "jquery-clock-timepicker"
A free jQuery Plug-in to select the time with a clock inspired by the Android time picker. This plugin works on Desktop and Mobile phones.
Install with NPM or download it directly from GitHub:
https://github.com/loebi-ch/jquery-clock-timepicker
The manual can be found on GitHub.
Examples
(with the most important settings. Of course, you can combine these different settings...)
Standard time picker
(no settings specified)
Required time picker
{ required: true }
Time picker with different separator
{ seperator: '.' }
Time picker with precision
|
{ precision: 5 } |
{ precision: 10 } |
{ precision: 15 } |
{ precision: 30 } |
{ precision: 60 } |
Time picker - show clock picker only on mobile phones
{ onlyShowClockOnMobile: true }
Duration picker
{ duration: true, maximum: '80:00' }
Duration picker that allows to select negative durations
{ duration: true, durationNegative: true }
Duration picker with minimum and maximum
{ duration: true, minimum: '1:00', maximum: '5:30' }
Negative duration picker with minimum and maximum
{ duration: true, durationNegative: true, minimum: '-5:00', maximum: '5:00', precision: 5 }
Find more settings in the README on GitHub.
If you miss settings, please feel free to submit a GitHub issue request.


{{>head}}
The Mars Rover Media API (MRMA) is an open-source REST API built on top of node.js and the Express framework. It uses NeDB for filesystem database storage and Socket.io for exposing. MRMA gathers data from a variety of sources and compiles them together to provide a rich data API for the images currently being gathered by the rovers.
MRMA is available at mars-rover-media-fe.nodejitsu.com. You can explore the API in the section below as well as see a few examples of it in action throughout this site.
http://mars-rover-media-api.nodejitsu.com/v1/sols?site=031&drive=1256
http://mars-rover-media-api.nodejitsu.com/v1/sols?site=031&width=100&filesize=1000
http://mars-rover-media-api.nodejitsu.com/v1/sols?gte=0600<e=0615&pressure=1000&max_temp_fahrenheit=-18
The Mars Rover Media API (MRMA) and FE are released under the terms of the MIT license
The MIT License is simple and easy to understand and it places almost no restrictions on what you can do with the API or FE.
You are free to use the Mars Rover Media API (MRMA) or FE in any other project (even commercial projects) as long as the copyright header is left intact.
MRMA includes both the REST API and a daemon that updates the database with new rover data.
Requirements: node.js, npm
Dependencies: NeDB, Express, Socket.io and other misc npm packages
Once setup run node server.js
You are currently viewing Mars Rover Media FE. It includes the API Explorer and other functions for displaying MRMA content.
Requirements: node.js, npm, grunt
Dependencies: AngularJS, Express, Handlebars and other misc npm/grunt packages
Once setup run node server.js
. During development run grunt
.


Founded by a group of students from diverse backgrounds, HKU Machine Learning Society aims to promote machine learning and its applications at HKU by providing an accessible platform to discover, learn and explore the field of machine learning. By offering series of events including workshops, talks and projects, we hope to encourage collaboration and innovation within HKU and the wider community.
Apply what you’ve learnt to design Deep Learning solutions for academic research and business problems. Work with an entrepreneurial team of like-minded individuals and fully explore an area of your interest. We welcome all members to submit their ideas and proposals, as we gradually roll out new exciting opportunities for you to be a part of.
Sign up to our workshops that will introduce you to the field of machine learning by covering key theoretical concepts and real life applications. Using neural networks, you could learn how to identify cats from images! Our workshops DO NOT require any previous programming experience and we encourage individuals from all academic backgrounds to join us. Curiosity in this emerging field is the only thing we ask for.
Join us at our speaker series where we invite industry leaders and leading academics to share their insight on the latest developments in Machine Learning. We hope to use this as a platform for individuals to engage with relevant discussions and connect with one another. We see this as a crucial way of strengthening and growing this unique community.
President
Machine Learning Director
Marketing Manager
Media Production Manager
Department of Electrical Engineering
Department of Linguistics


In this exercise, the
MIT faculty
challenged us to find the people with top 5 salaries, and also identify any person with salary above 200k.
You can find the source of data at the bottom. Over 20k records.


Paulo was born in Rio de Janeiro, Brazil, in August 1947, the son of Pedro Queima Coehlo de Souza, an engineer, and his wife, Lygia, a homemaker. Early on, Paulo dreamed of an artistic career, something frowned upon in his middle-class household. In the austere surroundings of a strict Jesuit school, Paulo discovered his true vocation: to be a writer. Paulo’s parents however, had different plans for him. When their attempts to suppress his devotion to literature failed, they took it as a sign of mental illness. When Paulo was seventeen, his father had him committed to a mental institution, twice, where he endured sessions of electroconvulsive therapy. His parents brought him back there once more after he became involved with a theater group and started to work as a journalist.
Paulo was always a nonconformist and a seeker of the new. When, in the excitement of 1968, the guerrilla and hippie movements took hold in a Brazil ruled by a repressive military regime, Paulo embraced progressive politics and joined the peace and love generation. He sought spiritual experience, traveling all over Latin America in the footsteps of Carlos Castaneda. He worked in the theater and dabbled in journalism, launching an alternative magazine called 2001. He began to collaborate with music producer Raul Seixas as a lyricist, transforming the Brazilian rock scene. In 1973, Paulo and Raul joined the Alternative Society, an organization that defended the individual’s right to free expression, and began publishing a series of comic strips, calling for more freedom. Members of the organization were detained and imprisoned. Two days later, Paulo was kidnapped and tortured by a group of paramilitaries.
This experience affected him profoundly. At the age of twenty-six, Paulo decided that he had had enough of living on the edge and wanted to be “normal”. He worked as an executive in the music industry. He tried his hand at writing but didn’t start seriously until after he had an encounter with a stranger. The man first came to him in a vision, and two month later Paulo met him at a café in Amsterdam. The stranger suggested that Paulo should return to Catholicism and study the benign side of magic. He also encouraged Paulo to walk the Road of Santiago de Compostela, the medieval pilgrim’s route.
In 1987, a year after completing that pilgrimage, Paulo wrote The Pilgrimage: Diary of Magus. The book describes his experiences and his discovery that the extraordinary occurs in the lives of ordinary people. A year later, Paulo wrote a very different book, The Alchemist. The first edition sold only nine hundred copies and the publishing house decided not to reprint.
Paulo would not surrender his dream. He found another publishing house, a bigger one. He wrote Brida a work still unpublished in English that received a lot of attention in the press and both The Alchemist and the pilgrimage appeared on bestseller lists. The Alchemist went on to sell more copies than any other book in Brazilian literary history.
Paulo’s story doesn’t end there. He has gone on to write many other bestselling books that have touched the hearts of people everywhere: By the River Piedra I Sat Down and Wept, the Fifth Mountain, Veronica Decides to Die, the Devil and Miss Prym, Warrior of the Light: A Manual, The Zahir, and Eleven Minutes.
Back to top


| Opcode*/Instruction | Op/En | 64/32 bit Mode Support | CPUID Feature Flag | Description |
| 0F C6 /r ib SHUFPS xmm1, xmm2/m128, imm8 | RMI | V/V | SSE | Shuffle packed single-precision floating-point values selected by imm8 from xmm1 and xmm1/m128 to xmm1. |
| VEX.NDS.128.0F.WIG C6 /r ib VSHUFPS xmm1, xmm2, xmm3/m128, imm8 | RVMI | V/V | AVX | Shuffle Packed single-precision floating-point values selected by imm8 from xmm2 and xmm3/mem. |
| VEX.NDS.256.0F.WIG C6 /r ib VSHUFPS ymm1, ymm2, ymm3/m256, imm8 | RVMI | V/V | AVX | Shuffle Packed single-precision floating-point values selected by imm8 from ymm2 and ymm3/mem. |
| Op/En | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
| RMI | ModRM:reg (r, w) | ModRM:r/m (r) | imm8 | NA |
| RVMI | ModRM:reg (w) | VEX.vvvv (r) | ModRM:r/m (r) | imm8 |
Moves two of the four packed single-precision floating-point values from the destination operand (first operand) into the low quadword of the destination operand; moves two of the four packed single-precision floating-point values from the source operand (second operand) into to the high quadword of the destination operand (see Figure 4-22). The select operand (third operand) determines which values are moved to the destination operand.
In 64-bit mode, using a REX prefix in the form of REX.R permits this instruction to access additional registers (XMM8-XMM15). 128-bit Legacy SSE version: The source can be an XMM register or an 128-bit memory location. The destination is not distinct from the first source XMM register and the upper bits (VLMAX-1:128) of the corresponding YMM register destination are unmodified. VEX.128 encoded version: the first source operand is an XMM register or 128-bit memory location. The destination operand is an XMM register. The upper bits (VLMAX-1:128) of the corresponding YMM register destination are zeroed. determines which values are moved to the destination operand.
VEX.256 encoded version: The first source operand is a YMM register. The second source operand can be a YMM register or a 256-bit memory location. The destination operand is a YMM register.
| DEST | X3 | X2 | X1 | X0 |
| SRC | Y3 | Y2 | Y1 | Y0 |
| DEST | Y3 ... Y0 Figure 4-22. | Y3 ... Y0 SHUFPS Shuffle Operation | X3 ... X0 | X3 ... X0 |
The source operand can be an XMM register or a 128-bit memory location. The destination operand is an XMM register. The select operand is an 8-bit immediate: bits 0 and 1 select the value to be moved from the destination operand to the low doubleword of the result, bits 2 and 3 select the value to be moved from the destination operand to the second doubleword of the result, bits 4 and 5 select the value to be moved from the source operand to the third doubleword of the result, and bits 6 and 7 select the value to be moved from the source operand to the high doubleword of the result.
CASE (SELECT[1:0]) OF 0: 1: 2: 3: ESAC; CASE (SELECT[3:2]) OF 0: 1: 2: 3: ESAC; CASE (SELECT[5:4]) OF 0: 1: 2: 3: ESAC; CASE (SELECT[7:6]) OF 0: 1: 2: 3: ESAC; SHUFPS (128-bit Legacy SSE version) DEST[31:0] ← Select4(SRC1[127:0], imm8[1:0]); DEST[63:32] ← Select4(SRC1[127:0], imm8[3:2]); DEST[95:64] ← Select4(SRC2[127:0], imm8[5:4]); DEST[127:96] ← Select4(SRC2[127:0], imm8[7:6]); DEST[VLMAX-1:128] (Unmodified) VSHUFPS (VEX.128 encoded version) DEST[31:0] ← Select4(SRC1[127:0], imm8[1:0]); DEST[63:32] ← Select4(SRC1[127:0], imm8[3:2]); DEST[95:64] ← Select4(SRC2[127:0], imm8[5:4]); DEST[127:96] ← Select4(SRC2[127:0], imm8[7:6]); DEST[VLMAX-1:128] ← 0 VSHUFPS (VEX.256 encoded version) DEST[31:0] ← Select4(SRC1[127:0], imm8[1:0]); DEST[63:32] ← Select4(SRC1[127:0], imm8[3:2]); DEST[95:64] ← Select4(SRC2[127:0], imm8[5:4]); DEST[127:96] ← Select4(SRC2[127:0], imm8[7:6]); DEST[159:128] ← Select4(SRC1[255:128], imm8[1:0]); DEST[191:160] ← Select4(SRC1[255:128], imm8[3:2]); DEST[223:192] ← Select4(SRC2[255:128], imm8[5:4]); DEST[255:224] ← Select4(SRC2[255:128], imm8[7:6]);
| SHUFPS: | __m128 _mm_shuffle_ps(__m128 a, __m128 b, unsigned int imm8) |
| VSHUFPS: | __m256 _mm256_shuffle_ps (__m256 a, __m256 b, const int select); |
None.
See Exceptions Type 4.