In this documentation we describe a complete workflow to perform segmentation of nuclei with deep learning.
The segmentation is perform by the winning approach (DPNUnet) of the 2018 Kaggle Data Science Bowl.
* **Description of DPNUnet**: https://www.kaggle.com/c/data-science-bowl-2018/discussion/54741
* **GitHub**: https://github.com/selimsef/dsb2018_topcoders/
A model for DPNUnet has been **trained on very divergent biomedical data**, and will perform on many data-sets even without retraing.
When peforming prediction, this pre-trained can be will be directly used (see secttion 'Model' for details). We also provide the
possiblity to re-train this model, and use it for prediction after successful termination of the training.
When starting the DPNUnet-Segmentation plugin, you will see a **central launch pad** allowing to select the task to be performed:
**Highlights of the workflow**
* Plugin for annotation of your own data and creating image mask suitable for training of DPNUnet
* Train on your own data starting with the pre-trained DPNUnet
* Perform nuclei segmentation on new data and inspect results in interative tool
We provide only a quick overview what deep learning is and establish the necessary
terminology to understand this segmentation workflow. For a more detailed introduction,
we refer to many available online ressources.
What is deep learning
Deep learning is a machine learning method that uses an input X to predict
an output Y. This prediction is performed with Deep Neural Networks.
The essential building block of such a neural network is a perceptron
which accomplishes simple signal processing. These perceptrons are then
connected into a large mesh network.
Importantly, such a network has to be trained before prediction can be performed.
Train a neural network
To train a neural network annotated data has to be provided, for instance a DAPI image
with outlined nuclei. These data are then used by the neural network to learn how
to detect nuclei in new images.
The training is performed iteratively and progress is monitored with so-called loss functions.
These functions measure how well the method performs by comparing the input images to the
generated images by the neural network. The annotated data is split into
two data-sets: one for the **actual training**, one for **validation**. The validation data is not
used for training but to monitor how the model generalizes to new data.
When monitoring training progress different distinct phases are usually observed:
initially the model can neither describe the training and validation data (**underfitting**).
Eventually the model will describe the training data too well and not generalize
anymore to new data (**overfitting**). Good training finds the sweet spot between these two
extreme cases.
Training a neural network is **computationally expensive** and is best performed on
**GPUs** (Graphics Processing Unit) or computational clusters. Applying a trained model is less
demanding and can be done on routinely on regular computers, and depending on the implementation
even on mobile devices.
Applying a neural network to **new data** frequently requires **re-training**. Here, a already trained
model is used as the starting point to perform training on the new data.
DPNUnet has been **trained on very divergent biomedical data**, and will perform well on many data-sets
even without re-training. The model has been trained on nuclei with an average size of around 20 pixels.
Best performance is hence achieved when images are resized prior to prediction such that the contained
nuclei are roughly of this size. To use the pretrained model, you have to
1. Download the model from **here**.
2. Load the model to the plugin engine where the DPNUnet plugin is running. See FAQ for more details on this upload.
Please note that once loaded, the model is availabel in the plugin, even after re-starting ImJoy and the DPNUnet plugin.
This model can then be directly used for **prediction** or be **re-trained** on new data. More details can be
found in the respective section.
Here we describe how the training images have to be provided: image format, naming scheme, and data organization.
Annotated training data with DAPI stained HeLa cells is available **here**.
## Data organization for training
Training data has to be organized with the following **folder structure**:
* Data for traning and validation is stored in a folder 'train', data for testing the prediction is stored in folder 'test'.
* Each sample (e.g. a field of view) is stored in a separate subfolder with a unique name.
Images have to be provided in the following **format**:
* **Filenames have to be identical** across these subfolders, e.g. `nuclei.png`
* Image have to be **2D**. 3D images have to be converted to 2D, e.g. with a maximum intensity projection.
* Images are stored as **RGB PNGs**.
We then provide plugins to annotate images (resulting in `annotation.json`) and create masks (resulting in `nuclei_border_mask.png`). More
details can be found in the dedicated sections. The network will then learn to predict these masks from
the input images, additional post-processing will then yield the actual nuclei (see section 'Prediction' for details).
This will result in the following folder structure
```
├─ data_for_training/
│ ├─ train/
│ │ ├─ img1
│ │ │ ├─ annotation.json
│ │ │ ├─ nuclei.png
│ │ │ ├─ nuclei_border_mask.png
│ │ ├─ img2
│ │ │ ├─ annotation.json
│ │ │ ├─ nuclei.png
│ │ │ ├─ nuclei_border_mask.png
│ │ ...
│ ├─ test/
│ │ ├─ img57
│ │ │ ├─ annotation.json
│ │ │ ├─ nuclei.png
│ │ │ ├─ nuclei_border_mask.png
│ │ ├─ img58
│ │ │ ├─ annotation.json
│ │ │ ├─ nuclei.png
│ │ │ ├─ nuclei_border_mask.png
│ │ ...
```
This plugin allows to annote the nuclei in the images. The plugin was designed to read the
above describe folder structure, i.e. opening the folder `data_for_training` will allow to
annotate all contained images.
## Annotator plugin
This plugin allows to annotate different structures of interests in mult-channel images.
You can load an entire data-set containing files in subfolders into the Annotator and annotate these files.
Annotations are stored in geojson format and can be either be loaded on a plugin engine for mask
generation and training, or retrieved for later use.
If you want to familiarize yourself with the Annotoation tool, you can simply start it by pressing `Annotations`.
It will open with a default image, and you can already familiarize yourself with some of the features
* Zooming and panning.
* Change contrast
* Show multiple channels as an overlay
* Annotate different structurs, and toggle display of certain annotations.
## Import your images into the Annotator plugin
1. Prepare training data as specified in the section 'Data'.
0. These data, i.e. the folder containing the subfolder 'train' and 'test', then have to copied
to plugin engine, where the segmentation plugin is running. See FAQ for more details for how to load data on an engine.
0. To read the data into the Annotator, follow these steps
1. Press on the `File` dropdown menu in the upper right corner of the ImJoy interface and select `Import Samples`.
0. This will open a file import dialog. In the upper left corner select `Select Plugin Files` and select
the folder with the training data.
0. This will populate the interface with all files in the folder. An icon
is shown for each present file, hoovering over this icon will display its name.
0. You then have to set a **filter on the file-name** to determine which image(s)
will be read into the Annotator. For this you set a name for the channel,
e.g. `nuclei`, and the identifier of this image, e.g. `nuclei.png`. Note that
pressing on an icon of file, will populate the filter fields with a suggestion, which can
be modified further. Press `Add Channel` to add this channel. You then see this
channel as an additional column in the interface, and for each channel if such a file was found.
0. Press `Import` to open the Annotator with the specified files.
## Annotate structure of interest
You can then specify your annotation:
1. From the `Annotation` dropdown menu, you can specify which annotations type you want to
outline.
2. By pressing `New Marker` you can specify an new annotation type. You can define
its name, the color in which it will show, and what outline type ('polygon' for nuclei).
## Export annotations
Once you are done, you can export the annotations from the `Exports` dropdown menu
and selecting `All annotations`. This will write the `annotation.json` to the respective folders.
## Generate masks
The DPNUnet learns to predict two mask from the input image: a filled mask, and a mask for areas where nuclei touch (so called 'border')
You can generate these masks from the annotated data by pressing `Generate Masks` and select the folder containing the annotated data.
The masks will be stored as `nuclei_border_mask.png` for each annotated image.
Annotation
Filled mask
Border mask
Before starting training, you have to provide a model and data. See the 'FAQ' for how to load these into
the plugin engine.
1. **trained model** (more details in section 'Model'). The neural network will be initiated
with this model, and then re-train it. If a model was already loaded and training was performed, training will resumed
from a stored checkpoint. To train the model from scratch, reload the original model.
2. **training data**. Has to be organized as described in section 'Data' and contain both input images and masks.
The actual training is performed with **these steps**:
1. Press button `Train with data from engine`.
0. This will show a configuration dialog, where you can specify the filename of the input images, e.g. `nuclei.png`, and the target masks, e.g. `nuclei_border_mask.png`.
Further you can specify for how many epochs the network will train, and under which name the model will be saved.
0. Specify the data folder containing subfolders 'train' and 'valid'.
0. Training progress can be inspected with the dashboard. During training, checkpoints are saved at regular intervals. This allows to resume
training in case it terminated prematurely.
0. Once training is terminated, and the obtained results are better than the original model, the model will be automatically used
for prediction. You can also export it, to then reuse it later.
## Model for prediction
Prediction will be performed with best available model. This is either a loaded pre-trained model, or in case
re-training yielded better resuls, the re-trained model. More details can be found in the section 'Model'.
**To be sure that you use a certain model**, e.g. the pre-trained model from the Kaggle challenge, **please load this model prior to prediction**.
Please note that this model has been trained on nuclei with an **average size of 20 pixel**. For best performance,
images should be rescaled such that the nuclei in the images are roughly this size.
## Perform prediction
1. Press button `Predict`.
0. Select a folder with test data (folder containing a subfolder 'test').
0. Specify the name of the input images, default name is `nuclei.png`.
0. Predicted data will then be shown in a dashboard, where you can use the slider to navigate the different samples.
0. The predicted masks will be saved as `nuclei_border_mask_output.png` in each sample folder.
0. To obtain the actual nuclei, a watershed segmentation is performed as follows: the predicted border is
mask is substracted from the predicted filled mask. The resulting image is used as a seed for a watershed
segmentation on the predicted filled mask. After identifying the individual nuclei, the results are stored as
* `nuclei_border_mask_output_labels.png`: image where each identified nuclei is a filled mask with a constant intensity value.
* `nuclei_border_mask_output_color_labels.png`: label image shown with a color-lookup table for inspection.
Here we provide answer to frequenty asked questions and encountered problems.
## How can I load data or a model into the plugin engine?
You can simply drag and drop a folder containing either training data or model:
1. In ImJoy, press `Files`, and `Open Engine File`.
2. If ImJoy is connected to multiple plugin engines, select the one where the segmentation plugin is running in the upper part of the interface.
3. Navigate to the folder where you want to store your data.
4. Drag & drop the folder from Finder (MacOS) or Explorer (WIN) into the ImJoy file dialog.


Either draw on the canvas above, or enter hex values in the text field. Left click = black, right click (or shift + click) = white;


PostgreSQL 9.0.10 Documentation
Prev
Up
Chapter 43. Server Programming Interface
Next
43.1. Interface Functions
Table of Contents
SPI_connect
-- connect a procedure to the SPI manager
SPI_finish
-- disconnect a procedure from the SPI manager
SPI_push
-- push SPI stack to allow recursive SPI usage
SPI_pop
-- pop SPI stack to return from recursive SPI usage
SPI_execute
-- execute a command
SPI_exec
-- execute a read/write command
SPI_execute_with_args
-- execute a command with out-of-line parameters
SPI_prepare
-- prepare a plan for a command, without executing it yet
SPI_prepare_cursor
-- prepare a plan for a command, without executing it yet
SPI_prepare_params
-- prepare a plan for a command, without executing it yet
SPI_getargcount
-- return the number of arguments needed by a plan prepared by
SPI_prepare
SPI_getargtypeid
-- return the data type OID for an argument of a plan prepared by
SPI_prepare
SPI_is_cursor_plan
-- return
true
if a plan prepared by
SPI_prepare
can be used with
SPI_cursor_open
SPI_execute_plan
-- execute a plan prepared by
SPI_prepare
SPI_execute_plan_with_paramlist
-- execute a plan prepared by
SPI_prepare
SPI_execp
-- execute a plan in read/write mode
SPI_cursor_open
-- set up a cursor using a plan created with
SPI_prepare
SPI_cursor_open_with_args
-- set up a cursor using a query and parameters
SPI_cursor_open_with_paramlist
-- set up a cursor using parameters
SPI_cursor_find
-- find an existing cursor by name
SPI_cursor_fetch
-- fetch some rows from a cursor
SPI_cursor_move
-- move a cursor
SPI_scroll_cursor_fetch
-- fetch some rows from a cursor
SPI_scroll_cursor_move
-- move a cursor
SPI_cursor_close
-- close a cursor
SPI_saveplan
-- save a plan
Prev
Home
Next
Server Programming Interface
Up
SPI_connect


その
日
の
気分
に
合
わせ
て
服
の
色
を
→
You can change your clothes' color depending on your mood. Just say "Change"! I already have it.


The Apprentice's Lubna Farhan accuses Lottie Lion of 'not learning' from racism scandal as the pair come to blows on Twitter
The public Twitter row began to turn nasty
by Jess MorcomThey've not seen eye to eye since day one, but now The Apprentice stars Lubna Farhan and Lottie Lion have clashed again on Twitter, with Lubna accusing Lottie of 'not learning' from racism scandal.
Lottie, a librarian from Devon was investigated by the BBC a few weeks ago following complains after she told Lubna to 'shut up Ghandi' and threatened to 'f***ing knock her out' in a string of vile messages sent to a Whatsapp group chat between contestants.
A now, Lubna has hit back at Lottie once more after the pair got vicious online.
Fellow candidate Ryan-Mark Parsons posted a string of tweets joking about the rumour that he was dating Lottie.
Lubna, who was eliminated from the show three weeks ago tweeted her fellow candidates saying "Lolzz, you guys are jokers." while Lottie hit back and replied "Stop trying to stay relevant."
As a result, the conversation turned nasty, as Lubna then wrote: "You don't sound like someone who regrets making racist comments. Too bad you don't learn from your mistakes.
"Good Luck in your new publicity stunt."
In light of the alleged racist incident, the BBC told The Metro: "While this happened on a private messenger service once filming had concluded, the BBC nevertheless still expects the candidates to behave appropriately.
"The production company have looked into the issue and reported back, Lottie has been informed that her comments were wholly unacceptable and is in no doubt about our view on this."
Jemelin Artiga was later added to the list of fellow candidates that have spoken out against Lottie, calling her out on Twitter after she was ‘let off’ by bosses.
Lottie later defended herself claiming the comments were ‘misinterpreted’ and ‘taken out of context’.
The Apprentice continues Wednesdays at 9pm on BBC One.


Across: 1. Olympian's stew poisoned (8) 5. Born to take over from leader in spacecraft's isolated environment (6) 10. Critical of scene shot with frightening clarity initially being cut (9) 11. Depict sinister accent (5) 12. Lives and dies poor in backward half of Serbia (7) 13. see 3 down 14. Small public space near middle of Palermo which is often lit for celebrations (8) 17. Time matured meat (5) 19.  (5) 21. Device for play includes program for 13 (8) 24. Halt ice production, doing the right thing (7) 25. Losing one's vitamin E production, where conflict drove 29 price up as 22 to 1 across 5 (7) 27. Tag time in Mah Jong set piece? (5) 28. Gamble with stock hits slump, the dramatic plateau finally passed (9) 29. After investing a ton in shoe company, left with not a dime (6) 30. Donkey getting 67% of his spelling marks (8) Down: 1. New York: pure chaos, being broke (6) 2. Firefighting equipment - for fires! (5) 3,13ac. Badly in red, gains dirt, realising benefit of privileged information (7 7) 4. They come from the outback with no friends (5) 6. Criminal fraud involving head of 1 across - with time it may blow up (7) 7. British heard huge figure, but took a severe haircut (9) 8. Where you finally get stories about love and good tributes (8) 9. This year derailed in panic (8) 15. This copy ruined by panic, ultimately insane (9) 16. Feeling lazy? Don't make such a thorough inventory! (8) 18. Slaver to negotiate control of outback town (8) 20. Exude unknown drug (7) 22. Mrs Grundy bore the Spanish composition (7) 23. Recalls losing first three lighters (6) 25. Competes to secure West's outlooks (5) 26. Snare set on approaches (5)


You need to enable JavaScript to run this app.
Even Microsoft couldn't make it far with windows on phone then how could I?
Proceed anyway


💰000
💊000
🏆000
X
Name:
Guest
UID:
Social ID:
Times Used:
BUY
USE
empty
empty
empty
Private
Spectate
Logout


1: /* 2: * Copyright 2001-2005 Stephen Colebourne 3: * 4: * Licensed under the Apache License, Version 2.0 (the "License"); 5: * you may not use this file except in compliance with the License. 6: * You may obtain a copy of the License at 7: * 8: * http://www.apache.org/licenses/LICENSE-2.0 9: * 10: * Unless required by applicable law or agreed to in writing, software 11: * distributed under the License is distributed on an "AS IS" BASIS, 12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13: * See the License for the specific language governing permissions and 14: * limitations under the License. 15: */ 16: package org.joda.time.field; 17: 18: import org.joda.time.DateTimeField; 19: import org.joda.time.DateTimeFieldType; 20: import org.joda.time.IllegalFieldValueException; 21: 22: /** 23: * General utilities that don't fit elsewhere. 24: * <p> 25: * FieldUtils is thread-safe and immutable. 26: * 27: * @author Stephen Colebourne 28: * @since 1.0 29: */ 30: public class FieldUtils { 31: 32: /** 33: * Restricted constructor. 34: */ 35: private FieldUtils() { 36: super(); 37: } 38: 39: //------------------------------------------------------------------------ 40: /** 41: * Negates the input throwing an exception if it can't negate it. 42: * 43: * @param value the value to negate 44: * @return the negated value 45: * @throws ArithmeticException if the value is Integer.MIN_VALUE 46: * @since 1.1 47: */ 48: public static int safeNegate(int value) { 49: if (value == Integer.MIN_VALUE) { 50: throw new ArithmeticException("Integer.MIN_VALUE cannot be negated"); 51: } 52: return -value; 53: } 54: 55: /** 56: * Add two values throwing an exception if overflow occurs. 57: * 58: * @param val1 the first value 59: * @param val2 the second value 60: * @return the new total 61: * @throws ArithmeticException if the value is too big or too small 62: */ 63: public static int safeAdd(int val1, int val2) { 64: int sum = val1 + val2; 65: // If there is a sign change, but the two values have the same sign... 66: if ((val1 ^ sum) < 0 && (val1 ^ val2) >= 0) { 67: throw new ArithmeticException 68: ("The calculation caused an overflow: " + val1 + " + " + val2); 69: } 70: return sum; 71: } 72: 73: /** 74: * Add two values throwing an exception if overflow occurs. 75: * 76: * @param val1 the first value 77: * @param val2 the second value 78: * @return the new total 79: * @throws ArithmeticException if the value is too big or too small 80: */ 81: public static long safeAdd(long val1, long val2) { 82: long sum = val1 + val2; 83: // If there is a sign change, but the two values have the same sign... 84: if ((val1 ^ sum) < 0 && (val1 ^ val2) >= 0) { 85: throw new ArithmeticException 86: ("The calculation caused an overflow: " + val1 + " + " + val2); 87: } 88: return sum; 89: } 90: 91: /** 92: * Subtracts two values throwing an exception if overflow occurs. 93: * 94: * @param val1 the first value, to be taken away from 95: * @param val2 the second value, the amount to take away 96: * @return the new total 97: * @throws ArithmeticException if the value is too big or too small 98: */ 99: public static long safeSubtract(long val1, long val2) { 100: long diff = val1 - val2; 101: // If there is a sign change, but the two values have different signs... 102: if ((val1 ^ diff) < 0 && (val1 ^ val2) < 0) { 103: throw new ArithmeticException 104: ("The calculation caused an overflow: " + val1 + " - " + val2); 105: } 106: return diff; 107: } 108: 109: /** 110: * Multiply two values throwing an exception if overflow occurs. 111: * 112: * @param val1 the first value 113: * @param val2 the second value 114: * @return the new total 115: * @throws ArithmeticException if the value is too big or too small 116: * @since 1.2 117: */ 118: public static int safeMultiply(int val1, int val2) { 119: long total = (long) val1 * (long) val2; 120: if (total < Integer.MIN_VALUE || total > Integer.MAX_VALUE) { 121: throw new ArithmeticException 122: ("The calculation caused an overflow: " + val1 + " * " + val2); 123: } 124: return (int) total; 125: } 126: 127: /** 128: * Multiply two values throwing an exception if overflow occurs. 129: * 130: * @param val1 the first value 131: * @param scalar the second value 132: * @return the new total 133: * @throws ArithmeticException if the value is too big or too small 134: * @since 1.2 135: */ 136: public static long safeMultiply(long val1, int scalar) { 137: switch (scalar) { 138: case -1: 139: return -val1; 140: case 0: 141: return 0L; 142: case 1: 143: return val1; 144: } 145: long total = val1 * scalar; 146: if (total / scalar != val1) { 147: throw new ArithmeticException 148: ("The calculation caused an overflow: " + val1 + " * " + scalar); 149: } 150: return total; 151: } 152: 153: /** 154: * Multiply two values throwing an exception if overflow occurs. 155: * 156: * @param val1 the first value 157: * @param val2 the second value 158: * @return the new total 159: * @throws ArithmeticException if the value is too big or too small 160: */ 161: public static long safeMultiply(long val1, long val2) { 162: if (val2 == 1) { 163: return val1; 164: } 165: if (val2 == 0) { 166: return 0; 167: } 168: long total = val1 * val2; 169: if (total / val2 != val1) { 170: throw new ArithmeticException 171: ("The calculation caused an overflow: " + val1 + " * " + val2); 172: } 173: return total; 174: } 175: 176: /** 177: * Casts to an int throwing an exception if overflow occurs. 178: * 179: * @param value the value 180: * @return the value as an int 181: * @throws ArithmeticException if the value is too big or too small 182: */ 183: public static int safeToInt(long value) { 184: if (Integer.MIN_VALUE <= value && value <= Integer.MAX_VALUE) { 185: return (int) value; 186: } 187: throw new ArithmeticException("Value cannot fit in an int: " + value); 188: } 189: 190: /** 191: * Multiply two values to return an int throwing an exception if overflow occurs. 192: * 193: * @param val1 the first value 194: * @param val2 the second value 195: * @return the new total 196: * @throws ArithmeticException if the value is too big or too small 197: */ 198: public static int safeMultiplyToInt(long val1, long val2) { 199: long val = FieldUtils.safeMultiply(val1, val2); 200: return FieldUtils.safeToInt(val); 201: } 202: 203: //----------------------------------------------------------------------- 204: /** 205: * Verify that input values are within specified bounds. 206: * 207: * @param value the value to check 208: * @param lowerBound the lower bound allowed for value 209: * @param upperBound the upper bound allowed for value 210: * @throws IllegalFieldValueException if value is not in the specified bounds 211: */ 212: public static void verifyValueBounds(DateTimeField field, 213: int value, int lowerBound, int upperBound) { 214: if ((value < lowerBound) || (value > upperBound)) { 215: throw new IllegalFieldValueException 216: (field.getType(), Integer.valueOf(value), 217: Integer.valueOf(lowerBound), Integer.valueOf(upperBound)); 218: } 219: } 220: 221: /** 222: * Verify that input values are within specified bounds. 223: * 224: * @param value the value to check 225: * @param lowerBound the lower bound allowed for value 226: * @param upperBound the upper bound allowed for value 227: * @throws IllegalFieldValueException if value is not in the specified bounds 228: * @since 1.1 229: */ 230: public static void verifyValueBounds(DateTimeFieldType fieldType, 231: int value, int lowerBound, int upperBound) { 232: if ((value < lowerBound) || (value > upperBound)) { 233: throw new IllegalFieldValueException 234: (fieldType, Integer.valueOf(value), 235: Integer.valueOf(lowerBound), Integer.valueOf(upperBound)); 236: } 237: } 238: 239: /** 240: * Verify that input values are within specified bounds. 241: * 242: * @param value the value to check 243: * @param lowerBound the lower bound allowed for value 244: * @param upperBound the upper bound allowed for value 245: * @throws IllegalFieldValueException if value is not in the specified bounds 246: */ 247: public static void verifyValueBounds(String fieldName, 248: int value, int lowerBound, int upperBound) { 249: if ((value < lowerBound) || (value > upperBound)) { 250: throw new IllegalFieldValueException 251: (fieldName, Integer.valueOf(value), 252: Integer.valueOf(lowerBound), Integer.valueOf(upperBound)); 253: } 254: } 255: 256: /** 257: * Utility method used by addWrapField implementations to ensure the new 258: * value lies within the field's legal value range. 259: * 260: * @param currentValue the current value of the data, which may lie outside 261: * the wrapped value range 262: * @param wrapValue the value to add to current value before 263: * wrapping. This may be negative. 264: * @param minValue the wrap range minimum value. 265: * @param maxValue the wrap range maximum value. This must be 266: * greater than minValue (checked by the method). 267: * @return the wrapped value 268: * @throws IllegalArgumentException if minValue is greater 269: * than or equal to maxValue 270: */ 271: public static int getWrappedValue(int currentValue, int wrapValue, 272: int minValue, int maxValue) { 273: return getWrappedValue(currentValue + wrapValue, minValue, maxValue); 274: } 275: 276: /** 277: * Utility method that ensures the given value lies within the field's 278: * legal value range. 279: * 280: * @param value the value to fit into the wrapped value range 281: * @param minValue the wrap range minimum value. 282: * @param maxValue the wrap range maximum value. This must be 283: * greater than minValue (checked by the method). 284: * @return the wrapped value 285: * @throws IllegalArgumentException if minValue is greater 286: * than or equal to maxValue 287: */ 288: public static int getWrappedValue(int value, int minValue, int maxValue) { 289: if (minValue >= maxValue) { 290: throw new IllegalArgumentException("MIN > MAX"); 291: } 292: 293: int wrapRange = maxValue - minValue + 1; 294: value -= minValue; 295: 296: if (value >= 0) { 297: return (value % wrapRange) + minValue; 298: } 299: 300: int remByRange = (-value) % wrapRange; 301: 302: if (remByRange == 0) { 303: return 0 + minValue; 304: } 305: return (wrapRange - remByRange) + minValue; 306: } 307: 308: //----------------------------------------------------------------------- 309: /** 310: * Compares two objects as equals handling null. 311: * 312: * @param object1 the first object 313: * @param object2 the second object 314: * @return true if equal 315: * @since 1.4 316: */ 317: public static boolean equals(Object object1, Object object2) { 318: if (object1 == object2) { 319: return true; 320: } 321: if (object1 == null || object2 == null) { 322: return false; 323: } 324: return object1.equals(object2); 325: } 326: 327: }
| ID | Line | Type | Detected |
|---|---|---|---|
| 6645 | 49 | Replace a constant (Replace -2147483648 with 0(INT)) | |
| 6647 | 49 | Replace a constant (Replace -2147483648 with -2147483647(INT)) | |
| 6646 | 49 | Replace a constant (Replace -2147483648 with<PHONE_NUMBER>(INT)) | |
| 6648 | 49 | Negate jump condition (Replace IF_ICMPNE with IF_ICMPEQ) | |
| 6649 | 52 | Replace arithmetic operator (Replace INEG with remove right opereand) | |
| 6650 | 64 | Replace arithmetic operator (Replace IADD with ISUB) | |
| 6652 | 66 | Negate jump condition (Replace IFGE with IFLT) | |
| 6654 | 66(1) | Negate jump condition (Replace IFLT with IFGE) | |
| 6651 | 66 | Replace arithmetic operator (Replace IXOR with IOR) | |
| 6653 | 66(1) | Replace arithmetic operator (Replace IXOR with IOR) | |
| 6655 | 67 | Remove method call | |
| 6656 | 67(1) | Remove method call | |
| 6657 | 67(2) | Remove method call | |
| 6658 | 67(3) | Remove method call | |
| 6659 | 67(4) | Remove method call | |
| 6660 | 82 | Replace arithmetic operator (Replace LADD with LSUB) | |
| 6663 | 84 | Replace a constant (Replace 0 with -1(LONG)) | |
| 6662 | 84 | Replace a constant (Replace 0 with 1(LONG)) | |
| 6667 | 84(1) | Replace a constant (Replace 0 with -1(LONG)) | |
| 6666 | 84(1) | Replace a constant (Replace 0 with 1(LONG)) | |
| 6664 | 84 | Negate jump condition (Replace IFGE with IFLT) | |
| 6668 | 84(1) | Negate jump condition (Replace IFLT with IFGE) | |
| 6661 | 84 | Replace arithmetic operator (Replace LXOR with LOR) | |
| 6665 | 84(1) | Replace arithmetic operator (Replace LXOR with LOR) | |
| 6669 | 85 | Remove method call | |
| 6670 | 85(1) | Remove method call | |
| 6671 | 85(2) | Remove method call | |
| 6672 | 85(3) | Remove method call | |
| 6673 | 85(4) | Remove method call | |
| 6674 | 100 | Replace arithmetic operator (Replace LSUB with LADD) | |
| 6676 | 102 | Replace a constant (Replace 0 with 1(LONG)) | |
| 6677 | 102 | Replace a constant (Replace 0 with -1(LONG)) | |
| 6681 | 102(1) | Replace a constant (Replace 0 with -1(LONG)) | |
| 6680 | 102(1) | Replace a constant (Replace 0 with 1(LONG)) | |
| 6678 | 102 | Negate jump condition (Replace IFGE with IFLT) | |
| 6682 | 102(1) | Negate jump condition (Replace IFGE with IFLT) | |
| 6675 | 102 | Replace arithmetic operator (Replace LXOR with LOR) | |
| 6679 | 102(1) | Replace arithmetic operator (Replace LXOR with LOR) | |
| 6683 | 103 | Remove method call | |
| 6684 | 103(1) | Remove method call | |
| 6685 | 103(2) | Remove method call | |
| 6686 | 103(3) | Remove method call | |
| 6687 | 103(4) | Remove method call | |
| 6688 | 119 | Replace arithmetic operator (Replace LMUL with LADD) | |
| 6691 | 120 | Replace a constant (Replace -2147483648 with -2147483649(LONG)) | |
| 6689 | 120 | Replace a constant (Replace -2147483648 with 0(LONG)) | |
| 6690 | 120 | Replace a constant (Replace -2147483648 with -2147483647(LONG)) | |
| 6695 | 120(1) | Replace a constant (Replace<PHONE_NUMBER> with<PHONE_NUMBER>(LONG)) | |
| 6693 | 120(1) | Replace a constant (Replace<PHONE_NUMBER> with<PHONE_NUMBER>(LONG)) | |
| 6694 | 120(1) | Replace a constant (Replace<PHONE_NUMBER> with 0(LONG)) | |
| 6692 | 120 | Negate jump condition (Replace IFLT with IFGE) | |
| 6696 | 120(1) | Negate jump condition (Replace IFLE with IFGT) | |
| 6697 | 121 | Remove method call | |
| 6698 | 121(1) | Remove method call | |
| 6699 | 121(2) | Remove method call | |
| 6700 | 121(3) | Remove method call | |
| 6701 | 121(4) | Remove method call | |
| 6702 | 139 | Replace arithmetic operator (Replace LNEG with remove right opereand) | |
| 6703 | 141 | Replace a constant (Replace 0 with 1(LONG)) | |
| 6704 | 141 | Replace a constant (Replace 0 with -1(LONG)) | |
| 6705 | 145 | Replace arithmetic operator (Replace LMUL with LADD) | |
| 6707 | 146 | Negate jump condition (Replace IFEQ with IFNE) | |
| 6706 | 146 | Replace arithmetic operator (Replace LDIV with LMUL) | |
| 6708 | 147 | Remove method call | |
| 6709 | 147(1) | Remove method call | |
| 6710 | 147(2) | Remove method call | |
| 6711 | 147(3) | Remove method call | |
| 6712 | 147(4) | Remove method call | |
| 6713 | 162 | Replace a constant (Replace 1 with 2(LONG)) | |
| 6714 | 162 | Replace a constant (Replace 1 with 0(LONG)) | |
| 6715 | 162 | Negate jump condition (Replace IFNE with IFEQ) | |
| 6717 | 165 | Replace a constant (Replace 0 with -1(LONG)) | |
| 6716 | 165 | Replace a constant (Replace 0 with 1(LONG)) | |
| 6718 | 165 | Negate jump condition (Replace IFNE with IFEQ) | |
| 6720 | 166 | Replace a constant (Replace 0 with -1(LONG)) | |
| 6719 | 166 | Replace a constant (Replace 0 with 1(LONG)) | |
| 6721 | 168 | Replace arithmetic operator (Replace LMUL with LADD) | |
| 6723 | 169 | Negate jump condition (Replace IFEQ with IFNE) | |
| 6722 | 169 | Replace arithmetic operator (Replace LDIV with LMUL) | |
| 6724 | 170 | Remove method call | |
| 6725 | 170(1) | Remove method call | |
| 6726 | 170(2) | Remove method call | |
| 6727 | 170(3) | Remove method call | |
| 6728 | 170(4) | Remove method call | |
| 6730 | 184 | Replace a constant (Replace -2147483648 with -2147483647(LONG)) | |
| 6731 | 184 | Replace a constant (Replace -2147483648 with -2147483649(LONG)) | |
| 6729 | 184 | Replace a constant (Replace -2147483648 with 0(LONG)) | |
| 6733 | 184(1) | Replace a constant (Replace<PHONE_NUMBER> with<PHONE_NUMBER>(LONG)) | |
| 6735 | 184(1) | Replace a constant (Replace<PHONE_NUMBER> with<PHONE_NUMBER>(LONG)) | |
| 6734 | 184(1) | Replace a constant (Replace<PHONE_NUMBER> with 0(LONG)) | |
| 6732 | 184 | Negate jump condition (Replace IFGT with IFLE) | |
| 6736 | 184(1) | Negate jump condition (Replace IFGT with IFLE) | |
| 6737 | 187 | Remove method call | |
| 6738 | 187(1) | Remove method call | |
| 6739 | 187(2) | Remove method call | |
| 6740 | 199 | Remove method call | |
| 6741 | 200 | Remove method call | |
| 6742 | 214 | Negate jump condition (Replace IF_ICMPLT with IF_ICMPGE) | |
| 6743 | 214(1) | Negate jump condition (Replace IF_ICMPLE with IF_ICMPGT) | |
| 6744 | 215 | Remove method call | |
| 6745 | 215(1) | Remove method call | |
| 6746 | 215(2) | Remove method call | |
| 6747 | 215(3) | Remove method call | |
| 6748 | 232 | Negate jump condition (Replace IF_ICMPLT with IF_ICMPGE) | |
| 6749 | 232(1) | Negate jump condition (Replace IF_ICMPLE with IF_ICMPGT) | |
| 6750 | 233 | Remove method call | |
| 6751 | 233(1) | Remove method call | |
| 6752 | 233(2) | Remove method call | |
| 6753 | 249 | Negate jump condition (Replace IF_ICMPLT with IF_ICMPGE) | |
| 6754 | 249(1) | Negate jump condition (Replace IF_ICMPLE with IF_ICMPGT) | |
| 6755 | 250 | Remove method call | |
| 6756 | 250(1) | Remove method call | |
| 6757 | 250(2) | Remove method call | |
| 6758 | 273 | Replace arithmetic operator (Replace IADD with ISUB) | |
| 6759 | 273 | Remove method call | |
| 6760 | 289 | Negate jump condition (Replace IF_ICMPLT with IF_ICMPGE) | |
| 6763 | 293 | Replace a constant (Replace 1 with 0(INT)) | |
| 6762 | 293 | Replace a constant (Replace 1 with 2(INT)) | |
| 6761 | 293 | Replace arithmetic operator (Replace ISUB with IADD) | |
| 6764 | 293(1) | Replace arithmetic operator (Replace IADD with ISUB) | |
| 6765 | 294 | Replace arithmetic operator (Replace ISUB with IADD) | |
| 6766 | 296 | Negate jump condition (Replace IFLT with IFGE) | |
| 6767 | 297 | Replace arithmetic operator (Replace IREM with IDIV) | |
| 6768 | 297(1) | Replace arithmetic operator (Replace IADD with ISUB) | |
| 6769 | 300 | Replace arithmetic operator (Replace INEG with remove right opereand) | |
| 6770 | 300(1) | Replace arithmetic operator (Replace IREM with IDIV) | |
| 6771 | 302 | Negate jump condition (Replace IFNE with IFEQ) | |
| 6773 | 303 | Replace a constant (Replace 0 with -1(INT)) | |
| 6772 | 303 | Replace a constant (Replace 0 with 1(INT)) | |
| 6774 | 303 | Replace arithmetic operator (Replace IADD with ISUB) | |
| 6775 | 305 | Replace arithmetic operator (Replace ISUB with IADD) | |
| 6776 | 305(1) | Replace arithmetic operator (Replace IADD with ISUB) | |
| 6777 | 318 | Negate jump condition (Replace IF_ACMPNE with IF_ACMPEQ) | |
| 6778 | 319 | Replace a constant (Replace 1 with 2(INT)) | |
| 6779 | 319 | Replace a constant (Replace 1 with 0(INT)) | |
| 6780 | 321 | Negate jump condition (Replace IFNULL with IFNONNULL) | |
| 6781 | 321(1) | Negate jump condition (Replace IFNONNULL with IFNULL) | |
| 6782 | 322 | Replace a constant (Replace 0 with 1(INT)) | |
| 6783 | 322 | Replace a constant (Replace 0 with -1(INT)) | |
| 6784 | 324 | Remove method call |


Sign in
Sign up
×
Email address
Please provide a valid email address.
Password
Show password
Remember me
Forgot password?
Sign in
Full name
Please fill in your name.
Email address
Please provide a valid email address.
Password
Show password
Confirm password
Show password
Sign up
Sports Hooded Sweatshirt
×
74 Reviews
$18.
99
$25.
00
Sale
Color:
Red/Dark blue/White
Product available
Size:
Select size
XS
S
M
L
XL
1
2
3
4
5
Add to Cart
Product info
Style
Hooded top
Composition
Elastic rib: Cotton 95%, Elastane 5%
Lining: Cotton 100%
Cotton 80%, Polyester 20%
Art. No.
183260098
Useful links
(852) 9312 5951
Order tracking
Support
(852) 9312 5951
Free shipping for order over $200
We return money within 30 days
Friendly 24/7 customer support
Order tracking
Eng / $
$ HKD
€ TWD
$ USD
繁體中文
繁體中文
Expand menu
Wishlist
Hello, Sign in
My Account
4
My Cart
$265.00
×
Women Colorblock Sneakers
$150.
00
x 1
×
TH Jeans City Backpack
$79.
50
x 1
×
3-Color Sun Stash Hat
$22.
50
x 1
×
Cotton Polo Regular Fit
$9.
00
x 1
Subtotal:
$265.
00
Expand cart
Checkout
Category
Toys
Action Figures & Collectibles
Arts & Crafts for Kids
Electronic Toys
Sports & Outdoor Play
Other
Games
Gaming Accessories
Video Game Consoles
Video Games
Board Games & Cards
Other
Men's Fashion
Men's Bags & Wallets
Men's Footwear
Men's Cloths
Men's Accessories
Other
Women's Fashion
Women's Bags & Wallets
Women's Footwear
Women's Cloths
Women's Accessories
Other
Hand Mades
Handmade Goods & Accessories
Craft Supplies & Tools
Artwork
Design & Craft - Others
Other
Livings
Books & Stationery
Babies & Kids
Home & Furniture
Kitchen & Appliances
Other
Home
Fashion Store v.1
Classic shop layout
Electronics Store
Slider + Promo banners
Marketplace
Multi-vendor, digital goods
Grocery Store
Full width + Side menu
Food Delivery Service
Food & Beverages delivery
Fashion Store v.2
Slider + Featured categories
Single Product Store
Single product / mono brand
Shop
Shop layouts
Shop Grid - Left Sidebar
Shop Grid - Right Sidebar
Shop Grid - Filters on Top
Shop List - Left Sidebar
Shop List - Right Sidebar
Shop List - Filters on Top
Marketplace
Category Page
Single Item Page
Vendor Page
Cart
Checkout
Shop pages
Shop Categories
Product Page v.1
Product Page v.2
Cart
Checkout - Details
Checkout - Shipping
Checkout - Payment
Checkout - Review
Checkout - Complete
Order Tracking
Product Comparison
Grocery store
Product Catalog
Single Product Page
Checkout
Food Delivery
Category Page
Single Item (Restaurant)
Cart (Your Order)
Checkout (Address & Payment)
Account
Shop User Account
Orders History
Profile Settings
Account Addresses
Payment Methods
Wishlist
My Tickets
Single Ticket
Vendor Dashboard
Settings
Purchases
Favorites
Sales
Products
Add New Product
Payouts
Sign In / Sign Up
Password Recovery
Pages
Navbar Variants
1 Level Light
1 Level Dark
2 Level Light
2 Level Dark
3 Level Light
3 Level Dark
Electronics Store
Marketplace
Side Menu (Grocery)
Transparent
About Us
Contacts
Help Center
Help Topics
Single Topic
Submit a Request
404 Not Found
404 - Simple Text
404 - Illustration
Blog
Blog List Layouts
List with Sidebar
List no Sidebar
Blog Grid Layouts
Grid with Sidebar
Grid no Sidebar
Single Post Layouts
Article with Sidebar
Article no Sidebar
Docs / Components
Documentation
Kick-start customization
Components
40+
Faster page building
Changelog
v1.4
Regular updates
Support
<EMAIL_ADDRESS>Home
Shop
Toys
Toys
Video
74 Reviews
$18.
99
$25.
00
Sale
Color:
Red/Dark blue/White
Product available
Size:
Size guide
Select size
XS
S
M
L
XL
1
2
3
4
5
Add to Cart
Product info
Composition
Elastic rib: Cotton 95%, Elastane 5%
Lining: Cotton 100%
Cotton 80%, Polyester 20%
Art. No.
183260098
Shipping options
Courier
2 - 4 days
$26.50
Local shipping
up to one week
$10.00
Flat rate
5 - 7 days
$33.85
UPS ground shipping
4 - 6 days
$18.00
Local pickup from store
—
$0.00
Find in local store
Select your country
Argentina
Belgium
France
Germany
Spain
United Kingdom
USA
Share:
Twitter
Instagram
Facebook
You may also like
Men’s Hoodie
Block-colored Hooded Top
$24.
99
Men’s Hoodie
Block-colored Hooded Top
$26.
99
Men’s Hoodie
Block-colored Hooded Top
$24.
99
Men’s Hoodie
Block-colored Hooded Top
$24.
99
Men’s Hoodie
Block-colored Hooded Top
$25.
00
Added to cart!
×
This item has been added to your cart.
Filters
Wishlist
Menu
4
$265.00
Top


--- layout: data_model title: YAFRecordType this_version: 1.0 ---
YAF (Yet Another Flowmeter) is bidirectional network flow meter. It processes packet data from pcap(3) dumpfiles as generated by tcpdump(1) or via live capture from an interface using pcap(3) into bidirectional flows, then exports those flows to IPFIX. (REF: http://www.usenix.org/event/lisa10/tech/full_papers/Inacio.pdf)
| Field Name | Type | Description |
|---|---|---|
| Flow0..1 | YAFFlowType |
The elements in a YAF record have been separated based on flow direction. These elements are defined for the general forward flow. |
| Reverse_Flow0..1 | YAFReverseFlowType |
Some elements in a YAF record correspond to the reverse flow. These elements are given here. |


Avenue
Fashion
Mens
Womans
The Brand
Local Stores
Lookbook
Mens
Womans
The brand
local stores
lookbook
Shop Men's Collection
Popular
New Arrivals
Best Sellers
Special Offers
Coming Soon
£89.99
£47.50
£69.95
£107 £89.99
£29.95
£34.79


{% extends 'layout.html' %} {% block body %}
Meeting new people isn't always to easy, especially when you're on a college campus of thousands of people! Chatschoolette is here to make this just a little bit easier for you! Chatschoolette will randomly assign you to a text or video chat partner exclusively from your College Campus. If the conversation goes well, you are also able to friend the other user and then message them later. Registration with an academic email is required so you know you won't be paired with those weirdos(ya know, like "The other guys" ;) ).  Happy chatting!


Before you start an application
At the moment you can only use this service if both of these apply:
- your pension is your only income
- you live on your own
If you can't apply online yet
You need to apply using a paper form called an HC1.
You can download an HC1 or get one from Jobcentres, GP practices, pharmacies and Citizens Advice centres.


→ Use my own custom scripts on a daily basis.
→ A firm grasp on pipes, output control,
file management, and (sedawkgreptrcat#etc.)
→ Useful web-scraping and automation projects.
→ Wrappers as far as the eye can see!
Perl. - (intermediate understanding)
→ Web scraping with vanilla and WWW::Mechanize.
→ Perl + cron automation.
→ Wrapping common utilities as far as the eye can see!
HTML. - (intermediate understanding)
→ This resume was created with with hand typed html in vim.
No part of this resume was created with automated creation tools
or templates, and thus is the perfect example of my skill with html.
If you received the unprint version, simply view the source.
→ A fairly good understanding of the new features in html,
not limited to the depreciation of flash and the added security that comes with it.
CSS. - (intermediate understanding)
→ This resume was hand styled in vim with CSS.
→ understands a majority of newer CSS3 features, including variables.
→ experience with bootstrap and LESS.
REPAIR ALL THE THINGS
What I have done. ↓
Patching the linux kernel. → The most fun and educational experience.
→ It taught me how to use git properly.
→ utilizized perl and shell scripts to enhance workflow.
→ learned how to maintain A specific project style.
PC Repair/Building custom pc's → I have a years formal experience performing a spectrum of PC/server maintainence duties. This experience includes building all sorts of custom pc's, building 1U rack servers, configuring RAID, configuring windows applications, and the other common "Computer shop" tasks.
→ I have two years formal experience providing tech support (for and to) small buisinesses. This involved a small amount of administration, but mostly consisted of restarting servers and helping them find the start button.


JavaScript is disabled on your browser.
Skip navigation links
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
B
C
E
G
I
M
S
T
W
B
br.unb.biologiaanimal.edf
- package br.unb.biologiaanimal.edf
C
convert(double, double, double, double, double)
- Static method in class br.unb.biologiaanimal.edf.
EDFUtil
performs the convertion of x from scale dmax-dmin to scale pmax-pmin
E
EDF
- Class in
br.unb.biologiaanimal.edf
The class to hold the EDF file information.
EDF(String)
- Constructor for class br.unb.biologiaanimal.edf.
EDF
Generates new EDF object based on the filepath.
EDFUtil
- Class in
br.unb.biologiaanimal.edf
EDFUtil()
- Constructor for class br.unb.biologiaanimal.edf.
EDFUtil
G
getConvertionFactor(String)
- Method in class br.unb.biologiaanimal.edf.
EDF
Gets the convertion factor related to the given label
getData()
- Method in class br.unb.biologiaanimal.edf.
EDF
Generic method to get some data.
getFile()
- Method in class br.unb.biologiaanimal.edf.
EDF
Gets the file path.
getHeader()
- Method in class br.unb.biologiaanimal.edf.
EDF
Gets raw EDF header
getLabels()
- Method in class br.unb.biologiaanimal.edf.
EDF
Get the labels contained in this EDF file
getRecords()
- Method in class br.unb.biologiaanimal.edf.
EDF
Gets raw EDF records
I
insert(byte[], byte)
- Static method in class br.unb.biologiaanimal.edf.
EDFUtil
Inserts a byte in a byte array
insert(byte[], byte[])
- Static method in class br.unb.biologiaanimal.edf.
EDFUtil
Appends a byte array in another byte array
M
main(String[])
- Static method in class br.unb.biologiaanimal.edf.
EDF
map(double, double, double, double, double)
- Static method in class br.unb.biologiaanimal.edf.
EDFUtil
performs the mapping of x from scale dmax-dmin to scale pmax-pmin
S
separateString(String, int)
- Static method in class br.unb.biologiaanimal.edf.
EDFUtil
Separates a String in an equal number of parts
T
toAscii(String)
- Method in class br.unb.biologiaanimal.edf.
EDF
Formats the read records into the ASCII format and saves it into memory.
toSingleChannelAscii(String, String)
- Method in class br.unb.biologiaanimal.edf.
EDF
translate(byte[])
- Static method in class br.unb.biologiaanimal.edf.
EDFUtil
Converts a byte array into a short array
W
write()
- Method in class br.unb.biologiaanimal.edf.
EDF
write(String)
- Method in class br.unb.biologiaanimal.edf.
EDF
B
C
E
G
I
M
S
T
W
Skip navigation links
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes


Bright is the moon over my home village
月是故乡明
The mid-autumn festival in China!
09/27/2015
Supermoon & Lunar eclipse
Shanghai
Where to see the moon?
Shanghai
Street view


Portfolio
About
Hi there. My name is Dries De Peuter and I live in Aarschot, Belgium. I love all things about technology (especially webbased). I try to get/make the best out of the web. Keeping a close eye on performance, ux, accessibility, ... I like to meet new people and solve new problems.
I'm interested in all web-related things. I like playing around with stuff like Symfony, CSS, HTML5. I'm currently setting up a little webfarm in debian/ubuntu. Here I found some more interesting stuff like Loadbalancing, Varnish, CDN, ...


RT @erichogberg: @avdi IPA’s are rapidly becoming the “build a blog webapp in 10 minutes using framework <x>” of zymurgy. Craft brewers, b…
6/23/2013, 9:45:47 AM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @erichogberg: @avdi IPA’s are rapidly becoming the “build a blog webapp in 10 minutes using framework <x>” of zymurgy. Craft brewers, b…
6/23/2013, 9:45:47 AM
Favs: 0
Retweets: 0
link


Martin Bashir survives X Factor: Celebrity axe despite forgetting lyrics
Martin Bashir has survived the axe from X Factor: Celebrity, despite forgetting the words to his song.
Instead soap stars Victoria Ekanoye and Jonny Labey got the boot after losing out in the public vote.
Bashir stumbled while performing the Commodores song Easy during the live show and said: “I’ve forgotten my words, I do apologise.”
Afterwards, he said: “I’m not trying to make excuses but my song had to be changed very late so I learned this song this morning.
“I had been working on something else and rights issues meant we couldn’t do that.”
Simon Cowell told him: “I knew the story so I knew things were likely to go wrong.
“I hope the audience gives you a second chance.”
After learning he had survived to sing another week, Bashir said: “There is some kind of psychotic breakdown happening in this country.”
While Ekanoye said she expected to be given the chop, Labey said he felt he had much more to give as he was dumped from the show.
Earlier in the episode, Try Star paid tribute to the England rugby team after their defeat in the World Cup final at the hands of South Africa, with a performance of Swing Low, Sweet Chariot.
The performance prompted Nicole Scherzinger to give the group, mentored by Cowell, her safe seat.
Meanwhile Cowell gave his safe seat to Love Island group No Love Lost.
The X Factor: Celebrity continues next Saturday on ITV at 8.10pm.


Methods summary
public static
MvcCore\Router
|
#
GetInstance( array $routes = [], boolean $autoInitialize = TRUE )
Get singleton instance of \MvcCore\Router stored always here.
Optionally set routes as first argument.
Create proper router instance type at first time by
configured class name in \MvcCore\Application singleton.
Get singleton instance of \MvcCore\Router stored always here.
Optionally set routes as first argument.
Create proper router instance type at first time by
configured class name in \MvcCore\Application singleton.
Routes could be defined in various forms:
Example:
\MvcCore\Router::GetInstance([ "Products:List" => "/products-list/<name>/<color>",
]);
or:
\MvcCore\Router::GetInstance([ 'products_list' => [ "pattern" => "/products-list/<name>/<color>", "controllerAction" => "Products:List", "defaults" => ["name" => "default-name", "color" => "red"], "constraints" => ["name" => "[^/]*", "color" => "[a-z]*"] ]
]);
or:
\MvcCore\Router::GetInstance([ new Route( "/products-list/<name>/<color>", "Products:List", ["name" => "default-name", "color" => "red"], ["name" => "[^/]*", "color" => "[a-z]*"] )
]);
or:
\MvcCore\Router::GetInstance([ new Route( "name" => "products_list", "pattern" => "#^/products\-list/(?<name>[^/]*)/(?<color>[a-z]*)(?=/$|$)#", "reverse" => "/products-list/<name>/<color>", "controller" => "Products", "action" => "List", "defaults" => ["name" => "default-name", "color" => "red"], )
]);
Parameters
- $routes
Keyed array with routes, keys are route names or route
Controller::Action definitions.
- $autoInitialize
If TRUE , locale routes array is cleaned and then all
routes (or configuration arrays) are sent into method
$router->AddRoutes(); , where are routes auto initialized
for missing route names or route controller or route action
record, completed always from array keys. You can you
FALSE to set routes without any change or
auto-initialization, it could be useful to restore cached
routes etc.
Returns
|
public
MvcCore\Router
|
#
SetRoutes( MvcCore\Route[] |array $routes = [], string|null $autoInitialize = TRUE, boolean $autoInitialize,… )
Clear all possible previously configured routes
and set new given request routes again.
If there is no name configured in route array configuration,
set route name by given $routes array key, if key is not numeric.
Clear all possible previously configured routes
and set new given request routes again.
If there is no name configured in route array configuration,
set route name by given $routes array key, if key is not numeric.
Routes could be defined in various forms:
Example:
\MvcCore\Router::GetInstance()->SetRoutes([ "Products:List" => "/products-list/<name>/<color>",
]);
or:
\MvcCore\Router::GetInstance()->SetRoutes([ 'products_list' => [ "pattern" => "/products-list/<name>/<color>", "controllerAction" => "Products:List", "defaults" => ["name" => "default-name", "color" => "red"], "constraints" => ["name" => "[^/]*", "color" => "[a-z]*"] ]
]);
or:
\MvcCore\Router::GetInstance()->SetRoutes([ new Route( "/products-list/<name>/<color>", "Products:List", ["name" => "default-name", "color" => "red"], ["name" => "[^/]*", "color" => "[a-z]*"] )
]);
or:
\MvcCore\Router::GetInstance()->SetRoutes([ new Route( "name" => "products_list", "pattern" => "#^/products\-list/(?<name>[^/]*)/(?<color>[a-z]*)(?=/$|$)#", "reverse" => "/products-list/<name>/<color>", "controller" => "Products", "action" => "List", "defaults" => ["name" => "default-name", "color" => "red"], )
]);
Parameters
- $routes
Keyed array with routes, keys are route names or route
Controller::Action definitions.
- $autoInitialize
$groupName
Group name is first matched/parsed word in requested path to
group routes by to try to match only routes you really need,
not all of them. If NULL by default, routes are inserted
into default group.
- $autoInitialize,…
If TRUE , locale routes array is cleaned and then all
routes (or configuration arrays) are sent into method
$router->AddRoutes(); , where are routes auto initialized
for missing route names or route controller or route action
record, completed always from array keys. You can you FALSE
to set routes without any change or auto-initialization, it
could be useful to restore cached routes etc.
Returns
|
public
MvcCore\Router
|
#
AddRoutes( array $routes = [], string|null $prepend = FALSE, boolean $throwExceptionForDuplication = TRUE, boolean $throwExceptionForDuplication,… )
Append or prepend new request routes.
If there is no name configured in route array configuration,
set route name by given $routes array key, if key is not numeric.
Append or prepend new request routes.
If there is no name configured in route array configuration,
set route name by given $routes array key, if key is not numeric.
Routes could be defined in various forms:
Example:
\MvcCore\Router::GetInstance()->AddRoutes([ "Products:List" => "/products-list/<name>/<color>",
]);
or:
\MvcCore\Router::GetInstance()->AddRoutes([ 'products_list' => [ "pattern" => "/products-list/<name>/<color>", "controllerAction" => "Products:List", "defaults" => ["name" => "default-name", "color" => "red"], "constraints" => ["name" => "[^/]*", "color" => "[a-z]*"] ]
]);
or:
\MvcCore\Router::GetInstance()->AddRoutes([ new Route( "/products-list/<name>/<color>", "Products:List", ["name" => "default-name", "color" => "red"], ["name" => "[^/]*", "color" => "[a-z]*"] )
]);
or:
\MvcCore\Router::GetInstance()->AddRoutes([ new Route( "name" => "products_list", "pattern" => "#^/products\-list/(?<name>[^/]*)/(?<color>[a-z]*)(?=/$|$)#", "reverse" => "/products-list/<name>/<color>", "controller" => "Products", "action" => "List", "defaults" => ["name" => "default-name", "color" => "red"], )
]);
Parameters
- $routes
Keyed array with routes, keys are route names or route
Controller::Action definitions.
- $prepend
$groupName
Group name is first matched/parsed word in requested path to
group routes by to try to match only routes you really need,
not all of them. If NULL by default, routes are inserted
into default group.
- $throwExceptionForDuplication
$prepend
Optional, if TRUE , all given routes will be prepended from
the last to the first in given list, not appended.
- $throwExceptionForDuplication,…
TRUE by default. Throw an exception, if route name or
route Controller:Action has been defined already. If
FALSE old route is over-written by new one.
Returns
|
public
MvcCore\Router
|
#
AddRoute( MvcCore\Route |array $routeCfgOrRoute, string|null $groupName = NULL, boolean $prepend = FALSE, boolean $throwExceptionForDuplication = TRUE )
Append or prepend new request route.
Set up route by route name into \MvcCore\Router::$routes array
to route incoming request and also set up route by route name and
by Controller:Action combination into \MvcCore\Router::$urlRoutes
array to build URL addresses.
Append or prepend new request route.
Set up route by route name into \MvcCore\Router::$routes array
to route incoming request and also set up route by route name and
by Controller:Action combination into \MvcCore\Router::$urlRoutes
array to build URL addresses.
Route could be defined in various forms:
Example:
\MvcCore\Router::GetInstance()->AddRoute([ "name" => "Products:List", "pattern" => "/products-list/<name>/<color>",
]);
or:
\MvcCore\Router::GetInstance()->AddRoute([ "name" => "products_list", "pattern" => "/products-list/<name>/<color>", "controllerAction" => "Products:List", "defaults" => ["name" => "default-name", "color" => "red"], "constraints" => ["name" => "[^/]*", "color" => "[a-z]*"]
]);
or:
\MvcCore\Router::GetInstance()->AddRoute(new Route( "/products-list/<name>/<color>", "Products:List", ["name" => "default-name", "color" => "red"], ["name" => "[^/]*", "color" => "[a-z]*"]
));
or:
\MvcCore\Router::GetInstance()->AddRoute(new Route( "name" => "products_list", "pattern" => "#^/products\-list/(?<name>[^/]*)/(?<color>[a-z]*)(?=/$|$)#", "reverse" => "/products-list/<name>/<color>", "controller" => "Products", "action" => "List", "defaults" => ["name" => "default-name", "color" => "red"],
));
Parameters
- $routeCfgOrRoute
- Route instance or route config array.
- $groupName
Group name is first matched/parsed word in requested path to
group routes by to try to match only routes you really need,
not all of them. If NULL by default, routes are inserted
into default group.
- $prepend
Optional, if TRUE , given route will be prepended,
not appended.
- $throwExceptionForDuplication
TRUE by default. Throw an exception, if route name or
route Controller:Action has been defined already. If
FALSE old route is over-written by new one.
Returns
|
public
boolean
|
#
HasRoute( string|MvcCore\Route $routeOrRouteName )
Get TRUE if router has any route by given route name or FALSE if not.
Get TRUE if router has any route by given route name or FALSE if not.
Parameters
Returns
boolean
|
public
MvcCore\Route |null
|
#
RemoveRoute( string $routeName )
Remove route from router by given name and return removed route instance.
If router has no route by given name, NULL is returned.
Remove route from router by given name and return removed route instance.
If router has no route by given name, NULL is returned.
Parameters
Returns
|
public
MvcCore\Route |null
|
#
GetRoute( $routeName )
Get configured \MvcCore\Route route instances by route name,
NULL if no route presented.
Get configured \MvcCore\Route route instances by route name,
NULL if no route presented.
Returns
|
public
MvcCore\Route[]
|
#
GetRoutes( string|null $groupName,… )
Get all configured route(s) as \MvcCore\Route instances.
Keys in returned array are route names, values are route objects.
Get all configured route(s) as \MvcCore\Route instances.
Keys in returned array are route names, values are route objects.
Parameters
- $groupName,…
Group name is first matched/parsed word in requested path to
group routes by to try to match only routes you really need,
not all of them. If NULL by default, there are returned
all routes from all groups.
Returns
|
public
MvcCore\Request
|
#
GetRequest( )
Get \MvcCore\Request object as reference, used internally for:
- Routing process in \MvcCore\Router::Route(); and it's protected
sub-methods.
- URL addresses completing in \MvcCore\Router::Url() and it's protected
sub-methods.
Get \MvcCore\Request object as reference, used internally for:
- Routing process in \MvcCore\Router::Route(); and it's protected sub-methods.
- URL addresses completing in \MvcCore\Router::Url() and it's protected sub-methods.
Returns
|
public
MvcCore\Router
|
#
SetRequest( MvcCore\IRequest $request )
Sets up \MvcCore\Request object as reference to use it internally for:
- Routing process in \MvcCore\Router::Route(); and it's protected
sub-methods.
- URL addresses completing in \MvcCore\Router::Url() and it's protected
sub-methods.
This is INTERNAL, not TEMPLATE method, internally called in
\MvcCore\Application::Run(); => \MvcCore\Application::routeRequest(); .
Sets up \MvcCore\Request object as reference to use it internally for:
- Routing process in \MvcCore\Router::Route(); and it's protected sub-methods.
- URL addresses completing in \MvcCore\Router::Url() and it's protected sub-methods.
This is INTERNAL, not TEMPLATE method, internally called in
\MvcCore\Application::Run(); => \MvcCore\Application::routeRequest(); .
Parameters
Returns
|
public
MvcCore\Router
|
#
SetRouteByQueryString( boolean|null $routeByQueryString = TRUE )
Set hardly routing strategy. If this method is configures with TRUE
value, it disables whole routing by rewrite routes and only query string
values with controller and action are used. If this method is configures
with FALSE value, there are used only rewrite routes routing and no
query string data. this method is highly advanced.
Set hardly routing strategy. If this method is configures with TRUE
value, it disables whole routing by rewrite routes and only query string
values with controller and action are used. If this method is configures
with FALSE value, there are used only rewrite routes routing and no
query string data. this method is highly advanced.
Parameters
Returns
|
public
boolean|null
|
#
GetRouteByQueryString( )
Get routing strategy. TRUE means that there was automatically or
manually chosen routing by query string values and FALSE means that
there was chosen routing by rewrite routes.
Get routing strategy. TRUE means that there was automatically or
manually chosen routing by query string values and FALSE means that
there was chosen routing by rewrite routes.
Returns
boolean|null
|
public
MvcCore\Router
|
#
SetCurrentRoute( MvcCore\IRoute $currentRoute )
Set matched route instance for given request object
into \MvcCore\Route::Route(); method. Currently matched
route is always assigned internally in that method.
Set matched route instance for given request object
into \MvcCore\Route::Route(); method. Currently matched
route is always assigned internally in that method.
Parameters
Returns
|
public
MvcCore\Route
|
#
GetCurrentRoute( )
Get matched route instance reference for given request object
into \MvcCore\Route::Route($request); method. Currently
matched route is always assigned internally in that method.
Get matched route instance reference for given request object
into \MvcCore\Route::Route($request); method. Currently
matched route is always assigned internally in that method.
Returns
|
public
boolean
|
#
GetRouteToDefaultIfNotMatch( )
Get TRUE if request has to be automatically dispatched as default
Index:Index route, if there was no route matching current request
and if request was not / (homepage) but /something-more .
Default protected property value: FALSE .
Get TRUE if request has to be automatically dispatched as default
Index:Index route, if there was no route matching current request
and if request was not / (homepage) but /something-more .
Default protected property value: FALSE .
Returns
boolean
|
public
MvcCore\Router
|
#
SetRouteToDefaultIfNotMatch( boolean $enable = TRUE )
Set TRUE if request has to be automatically dispatched as default
Index:Index route, if there was no route matching current request
and if request was not / (homepage) but /something-more .
Default protected property value: FALSE .
Set TRUE if request has to be automatically dispatched as default
Index:Index route, if there was no route matching current request
and if request was not / (homepage) but /something-more .
Default protected property value: FALSE .
Parameters
Returns
|
public
array
&
|
#
GetDefaultParams( )
Get default request params - default params to build URL with possibility
to define custom records for filter functions.
Be careful, it could contain XSS chars. Use always htmlspecialchars() .
Get default request params - default params to build URL with possibility
to define custom records for filter functions.
Be careful, it could contain XSS chars. Use always htmlspecialchars() .
Returns
array
|
public
array
&
|
#
GetRequestedParams( )
Get all request params - params parsed by route and query string params.
Be careful, it could contain XSS chars. Use always htmlspecialchars() .
Get all request params - params parsed by route and query string params.
Be careful, it could contain XSS chars. Use always htmlspecialchars() .
Returns
array
|
public
integer
|
#
GetTrailingSlashBehaviour( )
Get trailing slash behaviour - integer state about what to do with
trailing slash in all requested URL except homepage. Possible states are:
- -1 (\MvcCore\IRouter::TRAILING_SLASH_REMOVE )
Always remove trailing slash from requested URL if there
is any and redirect to it, except homepage.
- 0 (\MvcCore\IRouter::TRAILING_SLASH_BENEVOLENT )
Be absolutely benevolent for trailing slash in requested url.
- 1 (\MvcCore\IRouter::TRAILING_SLASH_ALWAYS )
Always keep trailing slash in requested URL or always add trailing
slash into URL and redirect to it.
Default value is -1 - \MvcCore\IRouter::TRAILING_SLASH_REMOVE
Get trailing slash behaviour - integer state about what to do with
trailing slash in all requested URL except homepage. Possible states are:
- -1 (\MvcCore\IRouter::TRAILING_SLASH_REMOVE ) Always remove trailing slash from requested URL if there is any and redirect to it, except homepage.
- 0 (\MvcCore\IRouter::TRAILING_SLASH_BENEVOLENT ) Be absolutely benevolent for trailing slash in requested url.
- 1 (\MvcCore\IRouter::TRAILING_SLASH_ALWAYS ) Always keep trailing slash in requested URL or always add trailing slash into URL and redirect to it.
Default value is -1 - \MvcCore\IRouter::TRAILING_SLASH_REMOVE
Returns
integer
|
public
MvcCore\Router
|
#
SetTrailingSlashBehaviour( integer $trailingSlashBehaviour = -1 )
Set trailing slash behaviour - integer state about what to do with
trailing slash in all requested URL except homepage. Possible states are:
- -1 (\MvcCore\IRouter::TRAILING_SLASH_REMOVE )
Always remove trailing slash from requested URL if there
is any and redirect to it, except homepage.
- 0 (\MvcCore\IRouter::TRAILING_SLASH_BENEVOLENT )
Be absolutely benevolent for trailing slash in requested url.
- 1 (\MvcCore\IRouter::TRAILING_SLASH_ALWAYS )
Always keep trailing slash in requested URL or always add trailing
slash into URL and redirect to it.
Default value is -1 - \MvcCore\IRouter::TRAILING_SLASH_REMOVE
Set trailing slash behaviour - integer state about what to do with
trailing slash in all requested URL except homepage. Possible states are:
- -1 (\MvcCore\IRouter::TRAILING_SLASH_REMOVE ) Always remove trailing slash from requested URL if there is any and redirect to it, except homepage.
- 0 (\MvcCore\IRouter::TRAILING_SLASH_BENEVOLENT ) Be absolutely benevolent for trailing slash in requested url.
- 1 (\MvcCore\IRouter::TRAILING_SLASH_ALWAYS ) Always keep trailing slash in requested URL or always add trailing slash into URL and redirect to it.
Default value is -1 - \MvcCore\IRouter::TRAILING_SLASH_REMOVE
Parameters
Returns
|
public
boolean
|
#
GetAutoCanonizeRequests( )
Get boolean info about if router does automatic check for canonical URL
request and if it process automatic redirect to canonical URL version if
detected or if it doesn't.
Get boolean info about if router does automatic check for canonical URL
request and if it process automatic redirect to canonical URL version if
detected or if it doesn't.
Returns
boolean
|
public
MvcCore\Router
|
#
SetAutoCanonizeRequests( boolean $autoCanonizeRequests = TRUE )
Set TRUE to process automatic check for canonical URL request to
process possible redirection if described request found after routing
is processed. Default value is TRUE to do it. You can use FALSE
otherwise for example for development purposes when you develop for
example url filtering in and out.
Set TRUE to process automatic check for canonical URL request to
process possible redirection if described request found after routing
is processed. Default value is TRUE to do it. You can use FALSE
otherwise for example for development purposes when you develop for
example url filtering in and out.
Parameters
Returns
|
public
MvcCore\Router
|
#
SetPreRouteMatchingHandler( callable $preRouteMatchingHandler = NULL )
Set up pre-route matching handler. This handler will be executed every
time after rewrite routes strategy is chosen, after first word from
requested path is parsed and before rewrite routes will be processed.
The handler could be used to fill in routes you need by the first parsed
word from request path and by completed request object. Given handler
callable has to accept first argument to be router instance, second
argument to be request object instance and third argument to be a string
with possibly parsed first word from requested path or an empty string.
Handler could return value to be void or anything else, doesn't matter.
Example:
$router->SetPreRouteMatchingHandler(
function (\MvcCore\Router $router, \MvcCore\Request $request, $firstPathWord) {
// load any routes from database here
$routes = $db->loadRoutingRoutesGroup($firstPathWord);
// add loaded routes into router
$router->AddRoutes($routes, $firstPathWord);
}
);
Set up pre-route matching handler. This handler will be executed every
time after rewrite routes strategy is chosen, after first word from
requested path is parsed and before rewrite routes will be processed.
The handler could be used to fill in routes you need by the first parsed
word from request path and by completed request object. Given handler
callable has to accept first argument to be router instance, second
argument to be request object instance and third argument to be a string
with possibly parsed first word from requested path or an empty string.
Handler could return value to be void or anything else, doesn't matter.
Example:
$router->SetPreRouteMatchingHandler( function (\MvcCore\Router $router, \MvcCore\Request $request, $firstPathWord) { // load any routes from database here $routes = $db->loadRoutingRoutesGroup($firstPathWord); // add loaded routes into router $router->AddRoutes($routes, $firstPathWord); }
);
Parameters
Returns
|
public
callable|null
|
#
GetPreRouteMatchingHandler( )
Get pre-route matching handler. This handler is always executed every
time after rewrite routes strategy is chosen, after first word from
requested path is parsed and before rewrite routes will be processed.
The handler is always used to fill in routes you need by the first parsed
word from request path and by completed request object. The handler
callable accepts first argument to be router instance, second
argument to be request object instance and third argument to be a string
with possibly parsed first word from requested path or an empty string.
Handler returns value to be void or anything else, doesn't matter.
Get pre-route matching handler. This handler is always executed every
time after rewrite routes strategy is chosen, after first word from
requested path is parsed and before rewrite routes will be processed.
The handler is always used to fill in routes you need by the first parsed
word from request path and by completed request object. The handler
callable accepts first argument to be router instance, second
argument to be request object instance and third argument to be a string
with possibly parsed first word from requested path or an empty string.
Handler returns value to be void or anything else, doesn't matter.
Returns
callable|null
|
public
MvcCore\Router
|
#
SetPreRouteUrlBuildingHandler( callable $preRouteUrlBuildingHandler = NULL )
Set up handler executed before building URL by rewrite routes. This
handler will be executed every time there is necessary to build an URL
when there are configured any rewrite routes and when there is no route
found to do it. Then the handler is executed to load any group of routes
from database into router instance if desired route is not already there.
If there is no route found in database, route name to build url is
marked to not request the database again automatically. Given handler
callable has to accept first argument to be router instance, second
argument to be a string with first Url() method argument - it could be
controller and action combination or route name and third argument to be
and array with params - the second argument from Url() method with
arguments for final URL address. Handler has to return an array, empty
or array with keys to be route names for each route to merge those new
routes with already defined routes in router instance in protected
property $router->urlRoutes .
Example:
$router->SetPreRouteUrlBuildingHandler(
function (\MvcCore\Router $router, $controllerActionOrRouteName, array $params = []) {
// load any routes from database here
$routes = $db->loadUrlRoutesGroup($controllerActionOrRouteName);
// return routes in array with keys to be route name for each route
return $routes;
}
);
Set up handler executed before building URL by rewrite routes. This
handler will be executed every time there is necessary to build an URL
when there are configured any rewrite routes and when there is no route
found to do it. Then the handler is executed to load any group of routes
from database into router instance if desired route is not already there.
If there is no route found in database, route name to build url is
marked to not request the database again automatically. Given handler
callable has to accept first argument to be router instance, second
argument to be a string with first Url() method argument - it could be
controller and action combination or route name and third argument to be
and array with params - the second argument from Url() method with
arguments for final URL address. Handler has to return an array, empty
or array with keys to be route names for each route to merge those new
routes with already defined routes in router instance in protected
property $router->urlRoutes .
Example:
$router->SetPreRouteUrlBuildingHandler( function (\MvcCore\Router $router, $controllerActionOrRouteName, array $params = []) { // load any routes from database here $routes = $db->loadUrlRoutesGroup($controllerActionOrRouteName); // return routes in array with keys to be route name for each route return $routes; }
);
Parameters
- $preRouteUrlBuildingHandler
- $preRouteMatchingHandler
Returns
|
public
callable|null
|
#
GetPreRouteUrlBuildingHandler( )
Get handler executed before building URL by rewrite routes. This
handler will be executed every time there is necessary to build an URL
when there are configured any rewrite routes and when there is no route
found to do it. Then the handler is executed to load any group of routes
from database into router instance if desired route is not already there.
If there is no route found in database, route name to build url is
marked to not request the database again automatically. Given handler
callable has to accept first argument to be router instance, second
argument to be a string with first Url() method argument - it could be
controller and action combination or route name and third argument to be
and array with params - the second argument from Url() method with
arguments for final URL address. Handler has to return an array, empty
or array with keys to be route names for each route to merge those new
routes with already defined routes in router instance in protected
property $router->urlRoutes .
Get handler executed before building URL by rewrite routes. This
handler will be executed every time there is necessary to build an URL
when there are configured any rewrite routes and when there is no route
found to do it. Then the handler is executed to load any group of routes
from database into router instance if desired route is not already there.
If there is no route found in database, route name to build url is
marked to not request the database again automatically. Given handler
callable has to accept first argument to be router instance, second
argument to be a string with first Url() method argument - it could be
controller and action combination or route name and third argument to be
and array with params - the second argument from Url() method with
arguments for final URL address. Handler has to return an array, empty
or array with keys to be route names for each route to merge those new
routes with already defined routes in router instance in protected
property $router->urlRoutes .
Returns
callable|null
|
public
boolean
|
#
Route( )
Route current app request by configured routes lists or by query string.
1. Check if request is targeting any internal action in internal ctrl.
2. If request is not internal, redirect to possible better URL form by
configured trailing slash strategy and return FALSE for redirection.
3. Choose route strategy by request path and existing query string
controller and/or action values - strategy by query string or by
rewrite routes.
4. Try to complete current route object by chosen strategy.
5. If any current route found and if route contains redirection, do it.
6. If there is no current route and request is targeting homepage, create
new empty route by default values if ctrl configuration allows it.
7. If there is any current route completed, complete self route name by
it to generate self routes and canonical URL later.
8. If there is necessary, try to complete canonical URL and if canonical
URL is shorter than requested URL, redirect user to shorter version.
If there was necessary to redirect user in routing process, return
immediately FALSE and return from this method. Else continue to next
step and return TRUE . This method is always called from core routing by:
\MvcCore\Application::Run(); => \MvcCore\Application::routeRequest(); .
Route current app request by configured routes lists or by query string.
1. Check if request is targeting any internal action in internal ctrl.
2. If request is not internal, redirect to possible better URL form by configured trailing slash strategy and return FALSE for redirection.
3. Choose route strategy by request path and existing query string controller and/or action values - strategy by query string or by rewrite routes.
4. Try to complete current route object by chosen strategy.
5. If any current route found and if route contains redirection, do it.
6. If there is no current route and request is targeting homepage, create new empty route by default values if ctrl configuration allows it.
7. If there is any current route completed, complete self route name by it to generate self routes and canonical URL later.
8. If there is necessary, try to complete canonical URL and if canonical URL is shorter than requested URL, redirect user to shorter version.
If there was necessary to redirect user in routing process, return
immediately FALSE and return from this method. Else continue to next
step and return TRUE . This method is always called from core routing by:
\MvcCore\Application::Run(); => \MvcCore\Application::routeRequest(); .
Returns
boolean
Throws
LogicException Route configuration property is missing.
InvalidArgumentException Wrong route pattern format.
|
public
boolean
|
#
RedefineRoutedTarget( string $controllerNamePc = NULL, string $actionNamePc = NULL, boolean $changeSelfRoute = FALSE )
You can redefine target controller and action and it doesn't matter,
what has been routed before. This method is only possible to use and it
make sense to use it only in any application post route handler, after
Route() method has been called and before controller is created by
application and dispatched. This method is highly advanced. There is
no missing template or controller or action checking.
You can redefine target controller and action and it doesn't matter,
what has been routed before. This method is only possible to use and it
make sense to use it only in any application post route handler, after
Route() method has been called and before controller is created by
application and dispatched. This method is highly advanced. There is
no missing template or controller or action checking.
Parameters
- $controllerNamePc
- Pascal case classic controller name definition.
- $actionNamePc
- Pascal case action name without
Action suffix.
- $changeSelfRoute
FALSE by default to change self route to generate self URLs.
Returns
boolean
|
public
string
|
#
Url( string $controllerActionOrRouteName = 'Index:Index', array $params = [] )
Generates url:
- By "Controller:Action" name and params array
(for routes configuration when routes array has keys with
"Controller:Action" strings and routes has not controller name and
action name defined inside).
- By route name and params array
(route name is key in routes configuration array, should be any string,
routes must have information about controller name and action name
inside).
Result address (url string) should have two forms:
- Nice rewritten URL by routes configuration (for apps with URL rewrite
support [Apache .htaccess or IIS URL rewrite module] and when first
param is key in routes configuration array).
- For all other cases is URL form like:
"index.php?controller=ctrlName&action=actionName"
(when first param is not founded in routes configuration array).
Method tries to find any route between routes by first argument and if
there is no route but if there is any pre route URL building handler
defined, the handler is called to assign desired routes from database
or any other place and then there is processed route search between
routes again. If there is still no routes, result url is completed
in query string form.
Generates url:
- By "Controller:Action" name and params array (for routes configuration when routes array has keys with "Controller:Action" strings and routes has not controller name and action name defined inside).
- By route name and params array (route name is key in routes configuration array, should be any string, routes must have information about controller name and action name inside).
Result address (url string) should have two forms:
- Nice rewritten URL by routes configuration (for apps with URL rewrite support [Apache .htaccess or IIS URL rewrite module] and when first param is key in routes configuration array).
- For all other cases is URL form like: "index.php?controller=ctrlName&action=actionName" (when first param is not founded in routes configuration array).
Method tries to find any route between routes by first argument and if
there is no route but if there is any pre route URL building handler
defined, the handler is called to assign desired routes from database
or any other place and then there is processed route search between
routes again. If there is still no routes, result url is completed
in query string form.
Parameters
- $controllerActionOrRouteName
Should be "Controller:Action" combination or just any
route name as custom specific string.
- $params
Optional, array with params, key is param name, value is
param value.
Returns
string
Throws
InvalidArgumentException
|
public
string
|
#
UrlByQueryString( string $controllerActionOrRouteName = 'Index:Index', array & $params = [], string $givenRouteName = NULL )
Complete optionally absolute, non-localized URL with all params in query string.
Example: "/application/base-bath/index.php?controller=ctrlName&action=actionName&name=cool-product-name&color=blue"
Complete optionally absolute, non-localized URL with all params in query string.
Example: "/application/base-bath/index.php?controller=ctrlName&action=actionName&name=cool-product-name&color=blue"
Parameters
- $controllerActionOrRouteName
- $params
- $givenRouteName
Returns
string
|
public
string
|
#
UrlByRoute( MvcCore\IRoute $route, array & $params = [], string $urlParamRouteName = NULL )
Complete optionally absolute, non-localized URL by route instance reverse
pattern and given $params array. If any param required by reverse
pattern is missing in params, there is used router default params
completed in routing process.
Example:
Input (\MvcCore\Route::$reverse ):
"/products-list/<name>/<color>"
Input ($params):
[
"name" => "cool-product-name",
"color" => "red",
"variant" => ["L", "XL"],
];
Output:
/application/base-bath/products-list/cool-product-name/blue?variant[]=L&variant[]=XL"
Complete optionally absolute, non-localized URL by route instance reverse
pattern and given $params array. If any param required by reverse
pattern is missing in params, there is used router default params
completed in routing process.
Example:
Input (\MvcCore\Route::$reverse ): "/products-list/<name>/<color>"
Input ($params): [ "name" => "cool-product-name", "color" => "red", "variant" => ["L", "XL"], ];
Output: /application/base-bath/products-list/cool-product-name/blue?variant[]=L&variant[]=XL"
Parameters
- $route
- $params
- $urlParamRouteName
Returns
string
|
public
MvcCore\Route
|
#
SetOrCreateDefaultRouteAsCurrent( string $routeName, string $controllerPc, string $actionPc, boolean $fallbackCall = FALSE )
THIS METHOD IS MOSTLY USED INTERNALLY.
THIS METHOD IS MOSTLY USED INTERNALLY.
Try to find any existing route by $routeName argument
or try to find any existing route by $controllerPc:$actionPc arguments
combination and set this founded route instance as current route object.
Also re-target, re-set request object controller and action values
(or also path) to this newly configured current route object.
If there is no route by name or controller and action combination found,
create new empty route by configured route class from application core
and set up this new route by given $routeName , $controllerPc , $actionPc
with route match pattern to match any request #/(?<path>.*)# and with
reverse pattern /<path> to create URL by single path param only. And
add this newly created route into routes (into default routes group) and
set this new route as current route object.
This method is always called internally for following cases:
- When router has no routes configured and request is necessary to route by query string arguments only (controller and action).
- When no route matched and when is necessary to create default route object for homepage, handled by Index:Index by default.
- When no route matched and when router is configured to route requests to default route if no route matched by $router->SetRouteToDefaultIfNotMatch(); .
- When is necessary to create not found route or error route when there was not possible to route the request or when there was any uncaught exception in controller or template caught later by application.
Parameters
- $routeName
Always as default , error or not_found , by constants:
\MvcCore\IRouter::DEFAULT_ROUTE_NAME
\MvcCore\IRouter::DEFAULT_ROUTE_NAME_ERROR
\MvcCore\IRouter::DEFAULT_ROUTE_NAME_NOT_FOUND
- $controllerPc
- Controller name in pascal case.
- $actionPc
- Action name with pascal case without ending
Action substring.
- $fallbackCall
FALSE by default. If TRUE , this function is called from error rendering fallback, self route name is not changed.
Returns
|


Copyright (c) April 1st 2011 Henning Diedrich.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For the included headers in include/ and original source bits from Lua and LuaJIT in src/darc.c, with verbatim permission:
Copyright (c) 1994–2010 Lua.org, PUC-Rio.
LuaJIT is Copyright (c) 2005-2011 Mike Pall.


XML file format was chosen for the convenience of grouping multiple data representation for each object. The downside of it, is the slowness to load that data at start. Therefore, we enable the user to convert the list of vertices and faces from the XML file to binary file that is faster to read. In addition, instead of computing the normals per vertex each time the data is loaded, we compute them once and later require only the directory for the exra file path to access these files.
As the Astrocyte and Neurites input files are separated (objects vertices and faces for each file is independent), the exra files (including vertices and faces and normals as binary file) are computed separately for each.
Finally, the user can specify the number of objects to load using "Objects Limit".


Welcome Player, Only our fiercest enemies or our best friends would want to visit us. Now read the RoE carefully
Welcome to PMG. PMG aims at giving the power back to the people. But, with great power, comes greater responsibility. Before you can proceed to register, we expect you to be very well versed with PMG’s Rules Of Engagement (RoE). Please keep in mind, you will face a short quiz based on the RoE, and you need to pass the quiz in order to qualify to register at PMG.
If you really are serious about your adsense or similar business, we hope you won’t mind going through these thoroughly and are already aware of some or all of the rules mentioned here. On the other hand, if you are averse to reading and remembering these, we suggest you close the website right now.
Never fear quarrels, but seek hazardous adventures.
Alexandre Dumas
If you don't know where you are going, any road will get you there.
Lewis Carroll
Procrastination is the art of keeping up with yesterday.
Don Marquis
I'm an idealist. I don't know where I'm going, but I'm on my way.
Carl Sandburg
I refuse to join any club that would have me as a member.
Groucho Marx
I refuse to join any club that would have me as a member.
Groucho Marx
If you don't know where you are going, any road will get you there.
Lewis Carroll
Welcome Player, Only our fiercest enemies or our best friends would want to visit us. Now read the RoE carefully
Welcome to PMG. PMG aims at giving the power back to the people. But, with great power, comes greater responsibility. Before you can proceed to register, we expect you to be very well versed with PMG’s Rules Of Engagement (RoE). Please keep in mind, you will face a short quiz based on the RoE, and you need to pass the quiz in order to qualify to register at PMG.
If you really are serious about your adsense or similar business, we hope you won’t mind going through these thoroughly and are already aware of some or all of the rules mentioned here. On the other hand, if you are averse to reading and remembering these, we suggest you close the website right now.


Emojipress
Make your own squared, blue-gray emoji here!
Text:
Font size:
192
px
Image size:
Preview
text
Build it
Result
Right-click or long press that thing and download it!


Please Enable MetaMask and connect Rinkeby Test Network.
On digital robotz you can swap your ERC-20 token with Swap peer-to-peer protocol. We use AirSwap - Swap protocol for trading.
| Token Name | Token Symbol | Token Balance | Address |
|---|---|---|---|
| Token you want to buy | No. of tokens | Token you want to sell | No. of tokens |
|---|
Token you can to buy.
Token you can to sell.
Token you want to buy.
Token you want to sell.
* Some functions are work in progress. Click below "Sign Order" button for signature preview. Swap function is under work in progress.


DESCRIPTION
Holotype specimen of Pterodactylus
antiquus
LOCATION FOUND
Bavaria, Germany
TEMPORAL RANGE
Early Tithonian, 150.6–148.5 Ma
COLLECTION LOCATION
Paleontology wing
PHOTOGRAPHER
Steven U. Vidovic, David M. Martill
NOTES
Top central portion of
non-fossil-bearing
slab digitally altered to remove portion of ruler