|
MoveToCode
|
Class used to generate service scripts and profile instances. More...
Public Types | |
| enum class | CreateResult { None , Successful , Error } |
| Result of extension service file(s) create operation More... | |
| enum class | CreationStage { SelectNameAndPlatform , ChooseOutputFolders , CreatingExtensionService , CreatingProfileInstance , Finished } |
| The current stage of the creation process More... | |
Public Member Functions | |
| void | StoreState () |
| Save current creator state to session registry in Unity More... | |
| void | ResetState () |
| Reset current creator state to default and save More... | |
| async void | LoadStoredState () |
| Load creator state from unity SessionState More... | |
| bool | ValidateAssets (List< string > errors) |
| Validate template assets More... | |
| bool | ValidateName (List< string > errors) |
| Return true if configured Extension Service class name is valid. More... | |
| bool | CanBuildAsset (UnityEngine.Object folder, string fileName) |
| Returns true if the asset supplied, via Folder object representing path and file name string (assumming .cs files only), does not exist. More... | |
| bool | IsValidFolder (UnityEngine.Object folder) |
| Returns true if the folder path supplied by Folder object is a valid location in the Unity project, false otherwise More... | |
| bool | IsValidFolder (string folderPath) |
| Returns true if the folder path string supplied is a valid location in the Unity project, false otherwise More... | |
| bool | ValidatePlatforms (List< string > errors) |
| Validate that SupportedPlatforms is not zero. More... | |
| bool | ValidateNamespace (List< string > errors) |
| Validate namespace property with each class/interface file to be created for new extension service More... | |
| async Task | BeginAssetCreationProcess () |
| Start the creation process for all relevant extension service files based on current creator property settings More... | |
| bool | SetAllFolders (string path) |
Properties | |
| string | ServiceName [get, set] |
| The name of the new extension service to build More... | |
| bool | UsesProfile [get, set] |
| Should a ScriptableObject profile class be created for new extension service More... | |
| bool | UsesInspector [get, set] |
| Should a custom editor inspector class be created for new extension service More... | |
| SupportedPlatforms | Platforms [get, set] |
| Supported platform flags for new extension service. More... | |
| CreationStage | Stage [get, set] |
| Current stage in UI workflow for creation More... | |
| string | Namespace [get, set] |
| Namespace to utilize for all classes More... | |
| string | CreationLog [get] |
| Log of errors and updates thus far in the create operation of the new extension service classes More... | |
| CreateResult | Result = CreateResult.None [get] |
| Current result of extension service file(s) create operation More... | |
| string | InterfaceName [get] |
| Name of interface to create for new extension service. More... | |
| string | ProfileName [get] |
| Name of ScriptableObject profile class to create. More... | |
| string | InspectorName [get] |
| Name of Unity inspector class to create. More... | |
| string | ProfileAssetName [get] |
| Name of default ScriptableObject instance asset to create. More... | |
| UnityEngine.Object | ServiceFolderObject [get, set] |
| Unity object pointing to folder asset to place Service class file More... | |
| UnityEngine.Object | InspectorFolderObject [get, set] |
| Unity object pointing to folder asset to place Inspector class file, if applicable More... | |
| UnityEngine.Object | InterfaceFolderObject [get, set] |
| Unity object pointing to folder asset to place interface file, if applicable More... | |
| UnityEngine.Object | ProfileFolderObject [get, set] |
| Unity object pointing to folder asset to place ScriptableObject profile class file, if applicable More... | |
| UnityEngine.Object | ProfileAssetFolderObject [get, set] |
| Unity object pointing to folder asset to place ScriptableObject profile asset file, if applicable More... | |
| Type | ServiceType [get] |
| System.Type of Extension Service created More... | |
| BaseMixedRealityProfile | ProfileInstance [get] |
| Object instance of ScriptableObject profile class for extension service created More... | |
| string | SampleCode [get] |
| Sample code string demonstrating example usage for new Extension service created More... | |
Class used to generate service scripts and profile instances.
Primarily designed for in-editor use
| async Task Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.BeginAssetCreationProcess | ( | ) |
Start the creation process for all relevant extension service files based on current creator property settings
| bool Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.CanBuildAsset | ( | UnityEngine.Object | folder, |
| string | fileName | ||
| ) |
Returns true if the asset supplied, via Folder object representing path and file name string (assumming .cs files only), does not exist.
False otherwise
| bool Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.IsValidFolder | ( | string | folderPath | ) |
Returns true if the folder path string supplied is a valid location in the Unity project, false otherwise
| bool Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.IsValidFolder | ( | UnityEngine.Object | folder | ) |
Returns true if the folder path supplied by Folder object is a valid location in the Unity project, false otherwise
| async void Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.LoadStoredState | ( | ) |
Load creator state from unity SessionState
| void Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.ResetState | ( | ) |
Reset current creator state to default and save
| bool Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.SetAllFolders | ( | string | path | ) |
| void Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.StoreState | ( | ) |
Save current creator state to session registry in Unity
| bool Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.ValidateAssets | ( | List< string > | errors | ) |
Validate template assets
Adds items to errors log field if not valid
| bool Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.ValidateName | ( | List< string > | errors | ) |
Return true if configured Extension Service class name is valid.
False otherwise
Adds items to errors log field if not valid
| bool Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.ValidateNamespace | ( | List< string > | errors | ) |
Validate namespace property with each class/interface file to be created for new extension service
Adds items to errors log field if not valid
| bool Microsoft.MixedReality.Toolkit.Editor.ExtensionServiceCreator.ValidatePlatforms | ( | List< string > | errors | ) |
Validate that SupportedPlatforms is not zero.
Adds items to errors log field if not valid
|
get |
Log of errors and updates thus far in the create operation of the new extension service classes
|
getset |
Unity object pointing to folder asset to place Inspector class file, if applicable
|
get |
Name of Unity inspector class to create.
Value is ServiceName concatenated with "Inspector"
|
getset |
Unity object pointing to folder asset to place interface file, if applicable
|
get |
Name of interface to create for new extension service.
Value is ServiceName with leading "I"
|
getset |
Namespace to utilize for all classes
|
getset |
Supported platform flags for new extension service.
Added to attribute on service class
|
getset |
Unity object pointing to folder asset to place ScriptableObject profile asset file, if applicable
|
get |
Name of default ScriptableObject instance asset to create.
Value is "Default" concatenated with ProfileName
|
getset |
Unity object pointing to folder asset to place ScriptableObject profile class file, if applicable
|
get |
Object instance of ScriptableObject profile class for extension service created
|
get |
Name of ScriptableObject profile class to create.
Value is ServiceName concatenated with "Profile"
|
get |
Current result of extension service file(s) create operation
|
get |
Sample code string demonstrating example usage for new Extension service created
|
getset |
Unity object pointing to folder asset to place Service class file
|
getset |
The name of the new extension service to build
|
get |
System.Type of Extension Service created
|
getset |
Current stage in UI workflow for creation
|
getset |
Should a custom editor inspector class be created for new extension service
|
getset |
Should a ScriptableObject profile class be created for new extension service


Will cover many web sites in infancy
When an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged with the release of Letraset sheets
containing Lorem Ipsum passages, and more recently with desktop publishing software like PageMaker including versions.
- Lorem ipsum dolor avanas
- Publishing them softwares
- More recently with desktop
- Letraset sheets containing
- Lorem ipsum dolor avanas
- Publishing them softwares
- More recently with desktop
- Letraset sheets containing
Recently desktop publishing software
Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words.
More less normal distribution of letters
When an unknown printer took galley type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting remaining essentially unchange.
- Necessary making this the first true generator on the Internet
- Necessary making this the first true generator on the Internet
- Necessary making this the first true generator on the Internet
- Necessary making this the first true generator on the Internet
Word in classical literature discovere
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with
desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Recently desktop publishing software
Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected words.
Words which look even believable
When an unknown printer took galley type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting remaining essentially unchange.
- Necessary making this the first true generator on the Internet
- Necessary making this the first true generator on the Internet
- Necessary making this the first true generator on the Internet
- Necessary making this the first true generator on the Internet


This application allows users to manage Feature Toggles for their applications. Other applications can then query this service to get active features for customers. The main idea is that someone with the role product manager can control the rollout of features to customers while developers continually work on new features that might not be in a finished state.


We are committed to providing total service satisfacion with the highest levels of professionalism and integrity.
Along with our professional dry wall services, we also provide a full line of remodeling services.
With our knowlede, experience and skill, we are able to provide flawless results in a timely manner.
Odyssey Drywall is a Commercial & Residential Drywall & Remodel Contractor that strives to ensure our clients' ideas and projects come alive. Whether it’s a simple patch or a full basement remodel we’ve got you covered. We pride ourselves on completing projects on time with the highest level of quality and professionalism.
Need Quality Work Completed Fast?
We take pride in servicing Residential and Commercial based projects.
Our service areas include Parker, Boomfield, Boulder, Centennial, Aurora, Denver, Commerce City, Castle Rock and more!


Brand new from the Slimjim Stables, are the Hemp king size skins. Made from pure hemp paper coupled with organic hemp gum this premium offering is slow burning and perfect for back flips
32 King Size skins in each packet
Get 1 King Size Skin packet with this purchase
INR 9900
Qty:
7
of
11


--- title: Weights keywords: fastai sidebar: home_sidebar nb_path: "nbs/weights.ipynb" ---
class
UniformWeight
UniformWeight()
Weight all observations equally
ExponentialWeight
ExponentialWeight(epsilon, key)
epsilon
key
Weight observations with exponential decay
KeyWeight
KeyWeight(key)
Weight observations with an arbitrary key function


Creating custom item renderers with the LayoutGroup
container
The LayoutGroup
container is a simple Feathers component that holds children and provides the ability to specify a layout. This makes an ideal base for any custom component, but it's especially useful for custom item renderers in the List
, DataGrid
, Tree
and GroupedList
components.
Feathers includes several subclasses of LayoutGroup
that are designed specifically to help you get started creating custom item renderers (or "cell" renderers in a DataGrid
).
LayoutGroupListItemRenderer
can be used as an item renderer in aList
.LayoutGroupDataGridCellRenderer
can be used as a cell renderer in aDataGrid
.LayoutGroupTreeItemRenderer
can be used as an item renderer in aTree
.LayoutGroupGroupedListItemRenderer
can be used as an item renderer in aGroupedList
.LayoutGroupGroupedListHeaderOrFooterRenderer
can be used as either a header renderer or a footer renderer in aGroupedList
.
All of these classes implement the required functions from their respective interfaces, to save you time on bootstrapping code, and they provide a couple of useful functions that you can override the update the layout and the parse the data without worrying about the lowest level parts of the Feathers component architecture.
Below, we will look at how to create a simple custom item renderer by extending one of these classes. At the very end, the complete source code for a simple custom item renderer will be provided to offer a starting point for other custom item renderers.
The Simplest Item Renderer
Let's implement a very simple item renderer. It will contain a Label
component to display some text and it will be possible to customize some padding around the edges.
When it's finished, we'll want to use it like this:
var list:List = new List();
list.itemRendererFactory = function():IListItemRenderer
{
var itemRenderer:CustomLayoutGroupItemRenderer = new CustomLayoutGroupItemRenderer();
itemRenderer.padding = 10;
return itemRenderer;
};
list.dataProvider = new ArrayCollection(
[
{ label: "One" },
{ label: "Two" },
{ label: "Three" },
{ label: "Four" },
{ label: "Five" },
]);
this.addChild(list);
Notice that we set a padding
property to adjust the layout. The item renderer will get the text for its Label
sub-component from the label
property of an item in the data provider.
We could go crazy and add background skins, icons, the ability to customize the which field from the item that the label text comes from, and many more things. We're going to keep it simple for now because this is just a basic example.
For this example, we're creating an item renderer for a List
component, but it will be virtually the exact same process to create an item renderer for a Tree
or GroupedList
component, or a header renderer or footer renderer for a GroupedList
component. You simply need to change the class that you extend.
Implementation Details
Let's start out with the basic framework for our custom item renderer. We want to subclass feathers.controls.renderers.LayoutGroupListItemRenderer
:
package
{
import feathers.controls.renderers.LayoutGroupListItemRenderer;
public class CustomLayoutGroupItemRenderer extends LayoutGroupListItemRenderer
{
public function CustomLayoutGroupItemRenderer()
{
}
}
}
This base class implements the IListItemRenderer
interface, so the data
, index
, and owner
properties that the List
component require on an item renderer are already there for us.
Adding Children
We want to display a Label
component, so let's add a member variable for it:
protected var _label:Label;
Next, we want to create a new instance and add it as a child. We need to override initialize()
function:
override protected function initialize():void
{
this._label = new Label();
this.addChild(this._label);
}
The initialize()
function is called once the very first time that the component is added to the stage. It's a good place to create sub-components and other children and possibly to do things like add event listeners that you don't intend to remove until the component is disposed. In general, it is better to use initialize()
for this sort of thing instead of the constructor.
Parsing the data
Next, we want to access the item renderer's data
property and display something in our Label
component. Override the convenient commitData()
function to do this:
override protected function commitData():void
{
if(this._data)
{
this._label.text = this._data.label;
}
else
{
this._label.text = null;
}
}
For this particular item renderer, we're requiring all items in the data provider to have a label
property that holds the text to display in the Label
component. If we were building a generic item renderer, ideally, we might like to make that field name customizable, like the labelField
property in DefaultListItemRenderer
. However, let's keep it simple for this example.
Don't forget to handle the case where the data property is null
. You don't want any runtime errors causing you trouble.
Adjusting the layout
Let's handle how the Label
sub-component will be positioned and sized within the item renderer. We generally want to use a fluid layout that can handle changes in the dimensions of the item renderer (which are ultimately controlled by the parent List
component). AnchorLayout
is ideal for this situation.
At the beginning of the initialize()
function, let's create our AnchorLayout
instance:
override protected function initialize():void
{
this.layout = new AnchorLayout();
Now, in order to have the AnchorLayout
control the Label
component's positioning and dimensions, we need to pass an AnchorLayoutData
instance to the Label
component. Let's do that next:
override protected function initialize():void
{
this.layout = new AnchorLayout();
var labelLayoutData:AnchorLayoutData = new AnchorLayoutData();
labelLayoutData.top = 0;
labelLayoutData.right = 0;
labelLayoutData.bottom = 0;
labelLayoutData.left = 0;
this._label = new Label();
this._label.layoutData = this._labelLayoutData;
We've constrained the Label
component to all four edges of the item renderer. If the item renderer's width grows or shrinks, the Label
component will be resized appropriately.
With that finished, we now have a fully working item renderer. However, we probably don't want the Label
component to fill the item renderer right up to the edges. We probably want a little space around the edge to allow the labels to breathe when they appear next to each other in the list. Let's add a padding
property to customize this spacing around the edges:
protected var _padding:Number = 0;
public function get padding():Number
{
return this._padding;
}
public function set padding(value:Number):void
{
if(this._padding == value)
{
return;
}
this._padding = value;
this.invalidate(INVALIDATION_FLAG_LAYOUT);
}
When we change a property that requires the component to change something about its appearance, we need to call the invalidate()
function. This will tell the component that it needs to update its appearance before the next time that Starling renders to the screen. We'll explain that constant, INVALIDATION_FLAG_LAYOUT
, in a moment.
The base class offers a preLayout()
function that you can override to update layout properties on children before the layout code is run. We're going to update the Label
component's AnchorLayoutData
in this function:
override protected function preLayout():void
{
var labelLayoutData:AnchorLayoutData = AnchorLayoutData(this._label.layoutData);
labelLayoutData.top = this._padding;
labelLayoutData.right = this._padding;
labelLayoutData.bottom = this._padding;
labelLayoutData.left = this._padding;
}
If we had additional children in the item renderer, we'd adjust their layoutData
properties in this function too. With AnchorLayoutData
, we're not limited to constraining children to the edges of their parent container. We can also position those children relative to the center of the container, both horizontally and vertical. We can even position children relative to each other too! For complete details, see How to use AnchorLayout
in Feathers containers.
The base class also offers a postLayout()
function that can be overridden to update anything after the layout code has run. We won't be using that one here, though.
Source Code
The complete source code for the CustomLayoutGroupItemRenderer
class is included below:
package
{
import feathers.controls.Label;
import feathers.controls.renderers.LayoutGroupListItemRenderer;
import feathers.layout.AnchorLayout;
import feathers.layout.AnchorLayoutData;
public class CustomLayoutGroupItemRenderer extends LayoutGroupListItemRenderer
{
public function CustomLayoutGroupItemRenderer()
{
}
protected var _label:Label;
protected var _padding:Number = 0;
public function get padding():Number
{
return this._padding;
}
public function set padding(value:Number):void
{
if(this._padding == value)
{
return;
}
this._padding = value;
this.invalidate(INVALIDATION_FLAG_LAYOUT);
}
override protected function initialize():void
{
this.layout = new AnchorLayout();
var labelLayoutData:AnchorLayoutData = new AnchorLayoutData();
labelLayoutData.top = 0;
labelLayoutData.right = 0;
labelLayoutData.bottom = 0;
labelLayoutData.left = 0;
this._label = new Label();
this._label.layoutData = labelLayoutData;
this.addChild(this._label);
}
override protected function commitData():void
{
if(this._data && this._owner)
{
this._label.text = this._data.label;
}
else
{
this._label.text = null;
}
}
override protected function preLayout():void
{
var labelLayoutData:AnchorLayoutData = AnchorLayoutData(this._label.layoutData);
labelLayoutData.top = this._padding;
labelLayoutData.right = this._padding;
labelLayoutData.bottom = this._padding;
labelLayoutData.left = this._padding;
}
}
}
Next Steps
Looking to do more with your custom item renderer? Check out the Feathers Cookbook for "recipes" that show you how to implement typical features in custom item renderers and in other Feathers UI components.
Related Links
feathers.controls.renderers.LayoutGroupListItemRenderer
API Documentationfeathers.controls.renderers.LayoutGroupDataGridCellRenderer
API Documentationfeathers.controls.renderers.LayoutGroupTreeItemRenderer
API Documentationfeathers.controls.renderers.LayoutGroupGroupedListItemRenderer
API Documentationfeathers.controls.renderers.LayoutGroupGroupedListHeaderOrFooterRenderer
API Documentation


"""
Embedding high cardinality categorical variables with distributed
representations
The first embedder relies on `Word2Vec` algorithm to learn vector
representations of words in a corpus
.. [1] "Distributed Representations of Words and Phrases and their
Compositionality", Mikolov et al, Advances in Neural Information Processing
Systems 26, pp 3111--3119, 2013.
The second one is based on `transfer learning
<https://en.wikipedia.org/wiki/Transfer_learning>`_ : we train a fully
connected neural network on a predictive task (only supports binary
classification for now) so that the upper layers learn higher level
representations of the categories.
After training, we can extract the categories vectors in the embedding space
"""
import pandas as pd
from gensim.models import Word2Vec, KeyedVectors
from sklearn.base import BaseEstimator
from keras.models import Sequential, clone_model
from keras.layers import Dense, Dropout
from ..text2vec import tools
[docs]class W2VVectorizer(object):
""" vectorizes categories with word2vec model
@deprecated
Parameters
----------
group_key : str
name of the column to group
category_col : str
name of the column containing the categorical variables
size : int, default=128
dimension of the embedding vector
min_count : int, default=1
minimum amount of instances to integrate it to the model
sg : int {0, 1}, default=1
0 for skip-gram word2vec model
1 for CBOW (best suited for small datasets)
window : int, default=3
size of the context
strategy : str {'tokens', 'strings'}, default='tokens'
if 'tokens', categories containing several words are split
else, each category is considered as a word
"""
def __init__(self, group_key, category_col,
size=128, min_count=1, sg=1,
window=3, strategy='tokens',
seed=0):
self.key = group_key,
self.cat_col = category_col
self.size = size
self.min_count = min_count
self.sg = sg
self.window = window
self.strategy = strategy
self.seed = seed
self.w2v_ = None
[docs] def fit(self, X, y=None):
""" fits the model by grouping categories by group_key in order to
embed categories as text
Parameters
----------
X : pd.DataFrame
y
Returns
-------
"""
df_grouped = X.groupby(self.key).agg({self.cat_col: ' '.join})
df_grouped[self.cat_col] = df_grouped[self.cat_col] \
.apply(lambda s: s.split(' '))
self.w2v_ = Word2Vec(df_grouped[self.cat_col],
size=self.size,
window=self.window,
min_count=self.min_count,
sg=self.sg,
seed=self.seed).wv
return self
[docs] def fit_pretrained(self, path, **kwargs):
"""
fits model using pretrained word embedding from
https://github.com/facebookresearch/fastText/blob/master/pretrained-vectors.md
Parameters
----------
path : str
path do wiki.lg.vec file
Returns
-------
"""
self.w2v_ = KeyedVectors.load_word2vec_format(path, **kwargs)
return self
[docs]class NeuralEmbedder(BaseEstimator):
""" Trains a MLP classifier to learn a distributed representation of
categories
Only available for binary targets
@TODO optimizer argument should be able to receive keras.Optimizer class
@TODO + batch_size + validation set ?
input_dim : tuple, (int, int)
input_dim[0] number of units in inpuot layer
input_dim[1] : dimension of the input layer (= number of features)
layers : tuple
The ith element represents the number of neurons in the ith hidden
layer. Similar to sklearn's MLP
activation : str, default='relu'
activation function in the intermediate layers
output : str, default='sigmoid'
output activation function, only supports sigmoid for binary
classification
optimizer : str, default='adam'
optimizing function for backpropagation
check https://keras.io/optimizers for available algorithms
loss : str, default='binary-crossentropy'
loss computed for optimization
check https://keras.io/losses
dropout : str, default=0.5
dropout rate
metrics : list, default=['acc', 'mae']
metrics used uring training and testing
epochs : int, default=20
number of epochs
"""
def __init__(self, input_dim, layers,
activation='relu', output='sigmoid',
optimizer='adam',
loss='binary-crossentropy',
dropout=0.5,
metrics=['acc', 'mae'],
epochs=20):
self.optimizer = optimizer
self.loss = loss
self.metrics = metrics
self.epochs = epochs
# indicator of training state
self.fit_ = None
self.model = Sequential()
# input layer
self.model.add(Dense(input_dim[0],
activation=activation,
input_dim=input_dim[1]))
self.model.add(Dropout(dropout))
# stacking following layers
for i, units in enumerate(layers):
self.model.add(Dense(units, activation=activation))
self.model.add(Dropout(dropout))
self.model.add(Dense(1, activation=output))
[docs] def fit(self, X, y):
""" trains the model using input data
Parameters
----------
X : iterable
feature matrix
y : iterable
target vector (possibly one-hot-encoded?)
Returns
-------
keras.History.history
record of training loss values and metrics values at successive
epochs, as well as validation loss values and validation metrics
values (if applicable)
"""
self.model.compile(optimizer=self.optimizer,
loss=self.loss,
metrics=self.metrics)
hist = self.model.fit(X, y, epochs=self.epochs)
self.fit_ = True
return hist


Terms & Conditions
In order to use our services you must agree that you have read and understood each of the following terms and that you will follow them at all times.
Section 1: Privacy
- To make full use of our application, all users must provide a small amount of personal information. This includes your name, university timetable and examination schedule. If you fail to provide this information you will not be able to use our services.
- All personal data given will be used solely for the function of our site and we will never make it available to third parties.
- Apart from your name, course and any data you choose to provide, none of your personal information will be available to other users.
Section 2: Your Content
- All notes and other content you upload to Note Boat is strictly your property and Note Boat takes no credit for this work and in no way owns it.
- By agreeing to make your notes public, you agree that anybody with access to the site can view, download and distribute your notes as they please.
- We expect users to accept they do not own other users' notes and give the user full credit when required.
- If you believe any user is taking undeserved credit for your work, please send a formal complaint to us.
- Sharing another user's private notes beyond those users they have not shared theirs with is a direct violation of our terms of service. Any such cases should be reported here.
- We will remove a user's notes if they decide to remove their account.
Section 3: Following University Guidelines
- We take university plagiarism and collusion guidelines very seriously. If any user uses Note Boat to distribute answers to homework, coursework or tests that they are not allowed to share, this user has violated our terms of service and will hence be banned from use of our services.
- To report a user for plagiarism or collusion, please send their name / userID and details of their offence to here.
- Any such violations will be forwarded to the university. For more information on university guidelines please visit this page listing the University of Manchester's guidlines on plagiarism and collusion.
Section 4: Security
- It is your responsibility to keep your password private. Please do not share this information with any others.
- If you believe another user is accessing your account without your knowledge please contact us here.
Section 5: Using our Services
- Our services are only for educational use. Please do not use Note Boat to share non-educational information.
- Any bullying or harrassment on our site will not be tolerated. Please report any such incidents to here.
Following Our Terms and Conditions
We expect all users to follow all above terms at all times. Failure to do so will be dealt with on a case by case basis. Some offences will see users banned from use of our services. Please direct any general comments, questions or complaints to here . If we make any changes or ammendments to the above terms we will notify each user, and expect that they either remove their account or respect the new rules or guidelines.


Hello everyone! Sorry to disappear on you for a few weeks.  I am establishing an office in Midlothian. I miss seeing you all!! Updates will be posted below, stay tuned!!
Updates
4/13/2018
We have chosen a name an it will be unveiled with the upcoming release of website 2.0!
Leasing paper work is being finalized! Business registration is complete! The new website is in the final stretch before general release!
Check back on this website frequently for updates, or follow me on Facebook


Engineering Disc Drives.
Employed in R&D at a Fortune 500 Disc Drive Manufacturer.
Test Process Lead Engineer
At this company, I served as a Test Process Lead Engineer developing a Python-based test framework for overseas factories for two years. This work challenged me to integrate myself into a massive code-base (millions of lines of code), become familiar enough with leadership goals to give direction to other engineers, and deploy tests to live manufacturing sites for production. Development required me to maintain good communication with remote engineers overseas, and I was responsible for tens of thousands of testbed drives used in the development of new technologies.
An example of one of the efforts I pioneered involved finding Disc Drives that tested at what was considered exceptional standards, called 'Gold Standard' drives in our workplace. Previously, engineers were manually comparing batches of test drives by reading logs; I automated the comparison process and built a robust Python-based system to compare many drives to 'Gold Standard' drives, highlighting variations and discrepancies. This saved the company many engineering man hours.


Does the civic issue finder actually work? Lets explore the data to find out.
We're getting a lot of traffic! Since Aug 2014, we've had 900 views a month, meaning 30 people per day. That means every day 2 people find a real problem in civic projects that they can solve. The finder is one small portal in how we can facilitate these contributions.
Use your coding skills to help solve civic problems at Code for America: http://t.co/ioGvoNbb2q
— Lifehacker (@lifehacker) July 30, 2015
A bunch of activity spikes can come from other organizations or people highlighting the fact that people can get into open civic tech projects easily. Empowerment of the ease and opportunity is huge.
Top clicked issues have certain titles and labels that were more conducive to being clicked on
Top clicked issues have been open for a long time (many since Aug 2014). Since these issues are still open, there may be something beyond the title/label preventing actual work being done.
Top clicked issues don't have a ton of recent comment activity (or any activity at all). There is something about the nature of the issue that prevents having a productive conversation about that issue.
We crunched the numbers around why people were more likely to click on civic tech issues after seeing them through the issue finder.
Labels that get people excited about contributing and clicking on issues help wantedenhancement
Titles geared toward action, like the actual examples below. Active verbs plus relevant context about what your issue is specifically dealing with is key. This allows people who are interested in completing specific actions to go to that issue and do that action.
Clicks since {{stat["created_at"]}}
Views since June 2015
Issue Comments
We also crunched the numbers around why people were less likely to click on civic tech issues after seeing them through the issue finder.
caveat: Just because they've been clicked less, doesn't mean they're not getting fixed. They just might be very new. Check out some examples below
Clicks since {{stat["created_at"]}}
Views since June 2015
Issue Comments
Maybe they're not getting viewed. Make sure to embed issues in an effective place. For example Code For San Francisco issues get the most attraction from the CFSF web site's widget embed!
Issues that have been open a long time and aren't getting clicked are not good. That means their titles and labels aren't interesting enough and/or they aren't getting enough screen time
Now, here's the goal of the finder, getting those issues fixed! Looking at properties of successfully closed issues yields specific findings.
Patience: On average, it takes {{data["average_to_close"]}} days for issues to get closed
Clarity: They used good titles and labels and their explanations on Github described the issue well
Responsiveness: When somone replies to an issue, the writer being on top of answering questions helps contributors finish the task.
Measuring all activity on a repository within 24 hours of a click related to that particular issue that was clicked on.
Not precise: it's hard to determine what exactly happened after someone clicks because for the most part, people don't commit to action right away


I felt like I was regularly reminding myself that I did not need to make the new site perfect. Sometimes I felt like I often and spent too much time styling the new site. However, I also felt that I spent a good amount of time wireframming and planning the site before actually gettting down to the styling. I was glad that I spent some time on making the site responsive and 'mobile first' before starting any of the styling work.
I knew a little bit about meditation before reading chapter two. I knew that focusning on brething was an important aspect of mediation
I learnt a few practical techniques to help when mediating. For example, keeping your eyes half closed can be useful because it keeps you calm but also alert. I also learnt that people who meditate tend to show more empathy towards other people.
 Maintaining a posture that allows you to breathe easily is very important. Also, it is important not to critise yourself if you do have distracting thoughts while you are meditating.
It was interesting to learn about how people with phantom limbs can feel pain in the body part that has been amputated. It was interesting that research suggests our brains can have a mental image of the 'self' that does not reflect reality.


Once lost, Chromebooks can be hard to find...
There are several places to look if you've lost your chromebook. There is no "Find my Chromebook" feature that can shortcut an old-fashioned search. Here is a list of places we think you should check, in order:
- Under your bed/ couch/ desk.
- In your old backpack (if you've just switched to a new one).
- In your classroom(s). Most of the time, if a student leaves their chromebook in a classroom, the teacher holds onto it for them.
- If a chromebook is lost in a common area of the High School, it may end up in the Tech Squad room. We keep a lost & Found bin.
In extreme cases, It may be possible to check the last login location of the


来自官网的例子：
import unittest
from selenium import webdriver
import page
class PythonOrgSearch(unittest.TestCase):
"""A sample test class to show how page object works"""
def setUp(self):
self.driver = webdriver.Firefox() # 创建 Firefox 的实例
self.driver.get("http://www.python.org")
def test_search_in_python_org(self):
"""
Tests python.org search feature. Searches for the word "pycon" then verified that some results show up.
Note that it does not look for any particular text in search results page. This test verifies that
the results were not empty.
"""
#Load the main page. In this case the home page of Python.org.
main_page = page.MainPage(self.driver) # 从 【主页】类创建一个实例，传入 driver参数
#Checks if the word "Python" is in title
assert main_page.is_title_matches(), "python.org title doesn't match."
#Sets the text of search textbox to "pycon"
main_page.search_text_element = "pycon"
main_page.click_go_button()
search_results_page = page.SearchResultsPage(self.driver)
#Verifies that the results page is not empty
assert search_results_page.is_results_found(), "No results found."
def tearDown(self):
self.driver.close()
if __name__ == "__main__":
unittest.main()
此文件用于封装各页面。比如主页，登录页，
# page.py
from element import BasePageElement
from locators import MainPageLocators
class SearchTextElement(BasePageElement):
"""This class gets the search text from the specified locator"""
# The locator for search box where search string is entered
locator = 'q'
class BasePage(object):
"""Base class to initialize the base page that will be called from all pages"""
def __init__(self, driver):
self.driver = driver
class MainPage(BasePage):
"""Home page action methods come here. I.e. Python.org"""
#Declares a variable that will contain the retrieved text
search_text_element = SearchTextElement()
def is_title_matches(self):
"""Verifies that the hardcoded text "Python" appears in page title"""
return "Python" in self.driver.title
def click_go_button(self):
"""Triggers the search"""
element = self.driver.find_element(*MainPageLocators.GO_BUTTON)
element.click()
class SearchResultsPage(BasePage):
"""Search results page action methods come here"""
def is_results_found(self):
# Probably should search for this text in the specific page
# element, but as for now it works fine
return "No results found." not in self.driver.page_source
element.py 定义了页面元素
# element.py
from selenium.webdriver.support.ui import WebDriverWait
class BasePageElement(object):
"""Base page class that is initialized on every page object class."""
def __set__(self, obj, value):
"""Sets the text to the value supplied"""
driver = obj.driver
WebDriverWait(driver, 100).until(
lambda driver: driver.find_element_by_name(self.locator))
driver.find_element_by_name(self.locator).clear()
driver.find_element_by_name(self.locator).send_keys(value)
def __get__(self, obj, owner):
"""Gets the text of the specified object"""
driver = obj.driver
WebDriverWait(driver, 100).until(
lambda driver: driver.find_element_by_name(self.locator))
element = driver.find_element_by_name(self.locator)
return element.get_attribute("value")
locators.py 文件用于定位元素，在这个例子中，同一个页面的定位器属于同一个类。
# locators.py
from selenium.webdriver.common.by import By
class MainPageLocators(object):
"""A class for main page locators. All main page locators should come here"""
GO_BUTTON = (By.ID, 'submit')
class SearchResultsPageLocators(object):
"""A class for search results locators. All search results locators should come here"""
pass


Title Level 1
Title Level 2
Title Level 3
Title Level 4
Title Level 5
Title Level 6
Intuit
Powering prosperity around the world!
- Item 1
- Item 2
- Item 3
| Make |
Model |
Year |
Color |
Price |
| Toyota |
Prius |
2012 |
blizzard pearl |
25000 |
| Alfa Romeo |
4C |
2015 |
red |
55000 |
|
Page 1 of 1
|


How does it work?
scrAPIr lets you fetch data through web APIs. You can:
-
Immediately query many already-integrated web APIs.
-
Publish and access shared queries and data sets.
-
Easily add new APIs you need by filling our a web form.
scrAPIr lets you fetch data through web APIs. You can:
Immediately query many already-integrated web APIs.
Publish and access shared queries and data sets.
Easily add new APIs you need by filling our a web form.


Blog:
10/12/14
Software Patents
A patent grants an inventor a guarantee the he has sole right to sell his invention for a period of time. The idea behind granting such rights is to reward the research and innovation. For an idea to be patentable it must be novel, non-obvious, and useful. In the days of the following the continental congress the secretary of state, the secretary of war, and the attorney general and to receive a patent was a rare reward for a notable achievement. In 1790 three were given out. In 2013 over 400000 were issued.
What are all these patents and how do they affect development?
Here are some of my favorites:
Amazon's one-click ordering patent
This one patents websites remembering your shipping address, credit card details etc so that you don't have to type it again. Amazon owns the patent for this. They sued Barnes and Noble for having this feature on their site.
Making links in email clickable
Even if the sender did not make them clickable. Apple owns this one and has sued HTC over it.
In app purchasing
This is patented. Lodsys sued Rovio (maker of Angry Birds) over this.
What makes all of these patents possible?
Well a patent must be novel, non-obvious and useful. The test for novelty is a literature search. Which puts it somewhat at odds with the second test. An obvious idea would likely not be published. In fact the most prestigious places to publish are likely to filter out the simple and ubiquitous ideas and these are the places first considered by the patent office.
The problem is once someone gets a patent for an obvious implementation this grants them power to block anyone else from the idea. When amazon patented one click buying, their implementation was not even reviewed because any version of one click purchasing was solely amazons, even if it is technically different or developed without any knowledge of amazon’s efforts.
To me there seems to be some steps that can be taken. Rather than the test of novelty and obviousness be one of literature search, perhaps the patents themselves should be peer reviewed. Currently the only recourse people have is to fight expensive court battles that all but the biggest companies cant afford. If patents were open for review and comment before being granted than any ridiculous patents would be notice before they could do any harm. Exposing patents before they are granted would also incentivize only applying for patents you are sure are robust as any trade secretes contained within would be exposed by review.


Touch
Introduction
NETMF devices have the ability to receive touch input from a touch screen.
Getting Started
The below code draws a blue circle wherever you touch on the display. Make sure that you have configured your display properly before running this example. It requires the Microsoft.SPOT.Graphics, Microsoft.SPOT.TinyCore, and Microsoft.SPOT.Touch assemblies.
using Microsoft.SPOT;
using Microsoft.SPOT.Input;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;
public class Program : Application
{
private Bitmap lcd;
public static void Main()
{
Program app = new Program();
app.Run();
}
public Program()
{
this.lcd = new Bitmap(SystemMetrics.ScreenWidth, SystemMetrics.ScreenHeight);
Touch.Initialize(this);
this.MainWindow = new Window();
this.MainWindow.TouchDown += MainWindow_TouchDown;
this.MainWindow.TouchUp += MainWindow_TouchUp;
this.MainWindow.TouchMove += MainWindow_TouchMove;
}
private void MainWindow_TouchMove(object sender, TouchEventArgs e)
{
Debug.Print("Touch move at (" + e.Touches[0].X.ToString() + ", " + e.Touches[0].Y.ToString() + ")");
this.lcd.DrawEllipse(Colors.Blue, e.Touches[0].X, e.Touches[0].Y, 5, 5);
this.lcd.Flush();
}
private void MainWindow_TouchUp(object sender, TouchEventArgs e)
{
Debug.Print("Touch up at (" + e.Touches[0].X.ToString() + ", " + e.Touches[0].Y.ToString() + ")");
}
private void MainWindow_TouchDown(object sender, TouchEventArgs e)
{
Debug.Print("Touch down at (" + e.Touches[0].X.ToString() + ", " + e.Touches[0].Y.ToString() + ")");
}
}
Touch In Gadgeteer
Since Gadgeteer already creates an application instance, you cannot use the above example in a Gadgeteer program. You must instead use the pre-created application instance available under Application.Current. The below example shows you how to use touch in a Gadgeteer program.
Tip
In the below example we still use a Bitmap object to draw to the display. Usually in Gadgeteer programs you will want to use the SimpleGraphics interface on a display module.
using Microsoft.SPOT;
using Microsoft.SPOT.Input;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;
public partial class Program
{
private Bitmap lcd;
void ProgramStarted()
{
this.lcd = new Bitmap(SystemMetrics.ScreenWidth, SystemMetrics.ScreenHeight);
Touch.Initialize(Application.Current);
this.display.WPFWindow.TouchDown += this.MainWindow_TouchDown;
this.display.WPFWindow.TouchUp += this.MainWindow_TouchUp;
this.display.WPFWindow.TouchMove += this.MainWindow_TouchMove;
}
private void MainWindow_TouchMove(object sender, TouchEventArgs e)
{
Debug.Print("Touch move at (" + e.Touches[0].X.ToString() + ", " + e.Touches[0].Y.ToString() + ")");
this.lcd.DrawEllipse(Colors.Blue, e.Touches[0].X, e.Touches[0].Y, 5, 5);
this.lcd.Flush();
}
private void MainWindow_TouchUp(object sender, TouchEventArgs e)
{
Debug.Print("Touch up at (" + e.Touches[0].X.ToString() + ", " + e.Touches[0].Y.ToString() + ")");
}
private void MainWindow_TouchDown(object sender, TouchEventArgs e)
{
Debug.Print("Touch down at (" + e.Touches[0].X.ToString() + ", " + e.Touches[0].Y.ToString() + ")");
}
}
Calibration
If your screen does not report touches close to where they actually were, your screen may need to be calibrated. NETMF provides functionality that can do this for you. It will give you a list of coordinates to touch at based on the configured screen size and then you give it the coordinates returned when you touch that spot on the display. It usually asks for five points: the four corners and the center.
The below example takes care of all of this calibration for you. It requires the Microsoft.SPOT.Native, Microsoft.SPOT.Graphics, Microsoft.SPOT.TinyCore, and Microsoft.SPOT.Touch assemblies. You begin calibration by touching the screen once. After that, touch where each of the five circles is displayed in turn. After you do that, it will show you the calibration data and show a circle wherever you touch.
using Microsoft.SPOT;
using Microsoft.SPOT.Input;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;
public class Program : Application
{
private Bitmap lcd;
private bool started;
private bool finished;
private int currentCalibrationPoint;
private int calibrationPoints;
private short[] screenX;
private short[] screenY;
private short[] uncalibratedX;
private short[] uncalibratedY;
public static void Main()
{
new Program().Run();
}
public Program()
{
this.lcd = new Bitmap(SystemMetrics.ScreenWidth, SystemMetrics.ScreenHeight);
Touch.Initialize(this);
this.MainWindow = new Window();
this.MainWindow.TouchUp += this.OnTouchUp;
this.currentCalibrationPoint = 0;
this.calibrationPoints = 0;
this.started = false;
this.finished = false;
Touch.ActiveTouchPanel.GetCalibrationPointCount(ref this.calibrationPoints);
this.screenX = new short[this.calibrationPoints];
this.screenY = new short[this.calibrationPoints];
this.uncalibratedX = new short[this.calibrationPoints];
this.uncalibratedY = new short[this.calibrationPoints];
for (int i = 0, x = 0, y = 0; i < this.calibrationPoints; i++)
{
Touch.ActiveTouchPanel.GetCalibrationPoint(i, ref x, ref y);
this.screenX[i] = (short)x;
this.screenY[i] = (short)y;
}
Touch.ActiveTouchPanel.StartCalibration();
}
private void OnTouchUp(object sender, TouchEventArgs e)
{
if (this.started && !this.finished)
{
this.uncalibratedX[this.currentCalibrationPoint] = (short)e.Touches[0].X;
this.uncalibratedY[this.currentCalibrationPoint] = (short)e.Touches[0].Y;
if (++this.currentCalibrationPoint == this.calibrationPoints)
{
Touch.ActiveTouchPanel.SetCalibration(this.calibrationPoints, this.screenX, this.screenY, this.uncalibratedX, this.uncalibratedY);
this.lcd.Clear();
var str = "Screen X: [";
for (int i = 0; i < this.calibrationPoints; i++)
str += this.screenX[i].ToString() + (i + 1 != this.calibrationPoints ? ", " : string.Empty);
str += "]";
this.lcd.DrawText(str, Resources.GetFont(Resources.FontResources.NinaB), Colors.White, 0, 0);
str = "Screen Y: [";
for (int i = 0; i < this.calibrationPoints; i++)
str += this.screenY[i].ToString() + (i + 1 != this.calibrationPoints ? ", " : string.Empty);
str += "]";
this.lcd.DrawText(str, Resources.GetFont(Resources.FontResources.NinaB), Colors.White, 0, 15);
str = "Uncalibrated X: [";
for (int i = 0; i < this.calibrationPoints; i++)
str += this.uncalibratedX[i].ToString() + (i + 1 != this.calibrationPoints ? ", " : string.Empty);
str += "]";
this.lcd.DrawText(str, Resources.GetFont(Resources.FontResources.NinaB), Colors.White, 0, 30);
str = "Uncalibrated Y: [";
for (int i = 0; i < this.calibrationPoints; i++)
str += this.uncalibratedY[i].ToString() + (i + 1 != this.calibrationPoints ? ", " : string.Empty);
str += "]";
this.lcd.DrawText(str, Resources.GetFont(Resources.FontResources.NinaB), Colors.White, 0, 45);
this.lcd.Flush();
this.finished = true;
}
else
{
this.DrawPoint(this.screenX[this.currentCalibrationPoint], this.screenY[this.currentCalibrationPoint]);
}
}
else if (!this.started)
{
this.started = true;
this.DrawPoint(this.screenX[0], this.screenY[0]);
}
else if (this.finished)
{
this.DrawPoint(e.Touches[0].X, e.Touches[0].Y);
}
}
private void DrawPoint(int x, int y)
{
this.lcd.Clear();
this.lcd.DrawEllipse(Colors.Red, x, y, 6, 6);
this.lcd.Flush();
}
}
After you calibrate your display, you can save the values in the four short arrays in the above program along with the number of calibration points. You can then pass these values at a later point, without running calibration again, to the below function.
Touch.ActiveTouchPanel.SetCalibration(calibrationPoints, screenX, screenY, uncalibratedX, uncalibratedY);


This project template is the basis of an PCB for the
Hammond Manufacturing RM2095S Enclosure
Board Dimensions: 240mm x 164.5mm
Case Dimensions: 250mm x 180mm x 50mm
Panel Dimensions: 243mm x 46mm
(c) 2019 Kai Raphahn
(c) 1997-2019 Hammond Mfg Co Inc


--- layout: post title: 查询Top sql date: 2008-07-23 09:16:56.000000000 +09:30 type: post published: true status: publish categories: - Oracle tags: - oracle - sql meta: posturl_add_url: 'yes' _edit_last: '1' views: '890' ---
From: network
Top 10 by Buffer Gets:
set linesize 100
set pagesize 100
col sql format a40
SELECT * FROM
(SELECT substr(sql_text,1,40) sql,
buffer_gets, executions, buffer_gets/executions "Gets/Exec",
hash_value,address
FROM V$SQLAREA
WHERE buffer_gets > 10000
ORDER BY buffer_gets DESC)
WHERE rownum <= 10 ;
Top 10 by Physical Reads:
set linesize 100
set pagesize 100
col sql format a40
SELECT * FROM (SELECT substr(sql_text,1,40) sql,
disk_reads, executions, disk_reads/executions "Reads/Exec",
hash_value,address
FROM V$SQLAREA
WHERE disk_reads > 1000
ORDER BY disk_reads DESC)
WHERE rownum <= 10 ;
Top 10 by Executions:
set linesize 100
set pagesize 100
col sql format a40
SELECT * FROM (SELECT substr(sql_text,1,40) sql,
executions, rows_processed, rows_processed/executions "Rows/Exec",
hash_value,address
FROM V$SQLAREA
WHERE executions > 100
ORDER BY executions DESC)
WHERE rownum <= 10 ;
Top 10 by Parse Calls:
set linesize 100
set pagesize 100
col sql format a40
SELECT * FROM (SELECT substr(sql_text,1,40) sql,
parse_calls, executions, hash_value,address
FROM V$SQLAREA
WHERE parse_calls > 1000
ORDER BY parse_calls DESC)
WHERE rownum <= 10 ;
Top 10 by Sharable Memory:
set linesize 100
set pagesize 100
col sql format a40
SELECT * FROM (SELECT substr(sql_text,1,40) sql,
sharable_mem, executions, hash_value,address
FROM V$SQLAREA
WHERE sharable_mem > 1048576
ORDER BY sharable_mem DESC)
WHERE rownum <= 10 ;
Top 10 by Version Count:
set linesize 100
set pagesize 100
col sql format a40
SELECT * FROM (SELECT substr(sql_text,1,40) sql,
version_count, executions, hash_value,address
FROM V$SQLAREA
WHERE version_count > 20
ORDER BY version_count DESC)
WHERE rownum <= 10 ;


SenDATA Tool for sharing files over Intranet.
Warning! Username already exists. Please try another one ...
Warning! Better check yourself, you're not looking too good.


Sweaters distributed to schoolchildren in Telangana’s Jodeghat
by Special CorrespondentFormer Advisor to Union Finance Ministry and well known columnist, Secunderabad-based Mohan Guruswamy, on Friday distributed sweaters to some 400 students of the Satellite Learning Centres of Babejhari and Jodeghat in Kerameri mandal of Kumram Bheem Asifabad district. This is the second year in succession when he gave away warm clothing to the students of primary schools. He came to the historic Jodeghat village along with his cousin and philanthropist Ranjit Vishwanath from the USA who also distributed school bags to students of the Tokyan Movvad primary school.


JCC class methods
You can use the 'jcc' class methods anytime you wish. However, we encourage using those methods only when implementing
new functionality for 'jcc'. In other cases we advise you to use other dedicated libraries (e.g. jQuery).
jcc.version()
Returns the current JCC version as string X.Y.Z (e.g. 1.2.3).
jcc.currentHistoryState()
Returns the current history state data in the form:
{
id: <integer> - the ID of the state. Larger ID means newer state.
page: <string> - the ID of the page loaded. Empty string if no page is loaded.
popups: <array> - array of strings representing the ID's of the currently loaded popups
}
jcc.historyStateCopy(historyState)
Returns the current history state data in the form:
{
id: <integer> - the ID of the state. Larger ID means newer state.
page: <string> - the ID of the page loaded. Empty string if no page is loaded.
popups: <array> - array of strings representing the ID's of the currently loaded popups
}
Arguments:
-
historyState
The history state to be copied.
jcc.historyStateToHash(state)
Returns the hash representation of a history state as a string.
Arguments:
-
state
The history state to be converted to a hash value.
jcc.now()
Returns a number representing the milliseconds elapsed since the UNIX epoch.
jcc.handleHistory()
Handles the hash value when the history state changes (a new hash is provided, history state is added or overwritten).
jcc.parseHash()
Returns an array of the | delimited strings of the current location.hash.
jcc.dispatchCustomEvent(el, type, params)
Dispatches a custom DOM event to a HTML-Element.
Arguments:
jcc.getViewportRect()
Returns the rect object of the viewport in the form:
{
left: 0
right: <integer> - the right-most coordinate.
top: 0
bottom: <integer> - the bottom-most coordinate.
width: <integer> - the viewport width in pixels.
height: <integer> - the viewport height in pixels.
}
jcc.isVisible(el)
Tests is a HTML-element is visible accordin to its CSS visibility and display styles.
Arguments:
-
el
The HTML-element whose visibility is to be retrieved.
Remarks:
Please note that the function might be "expensive" as it may traverse up the DOM-tree to check if
the element's parents are visible.
jcc.getElementRect(el)
Returns the rect (JS object with left, right, top, bottom, width and height properties measured in pixels)
of a HTML-element in viewport coordinates - including scroll offset.
Arguments:
-
el
The HTML-element whose rect is to be retrieved.
jcc.getElementLocalRect(el)
Returns the local rect object of a HTML-element in the form:
{
left: 0
right: <integer> - the right-most coordinate.
top: 0
bottom: <integer> - the bottom-most coordinate.
width: <integer> - the element width in pixels.
height: <integer> - the element height in pixels.
}
Arguments:
-
el
The HTML-element whose rect is to be retrieved.
jcc.isVisible(el)
Checks if a DOM-element and its parents up to the DOM-tree is not hidden
(styles visibility is not "hidden" or display is not "none").
Arguments:
-
el
The DOM-element to be checked.
jcc.resizeMonitor.addElement(el)
Adds a HTML-element to resize monitoring.
Arguments:
-
el
The HTML-element to be monitored.
jcc.resizeMonitor.removeElement(el)
Removes a HTML-element from the resize monitor.
Arguments:
-
el
The HTML-element to be removed from the resize monitor.
jcc.repositionMonitor.addElement(el)
Adds a HTML-element to reposition monitoring.
Arguments:
-
el
The HTML-element to be monitored.
jcc.repositionMonitor.removeElement(el)
Removes a HTML-element from the reposition monitor.
Arguments:
-
el
The HTML-element to be removed from the reposition monitor.
jcc.getComputedStyle(el, prop)
Returns the value of a speciffic CSS-property of a HTML element.
Arguments:
-
el
The HTML-element to be inspected.
-
prop
The CSS-property string.
jcc.copyCss(dst, src, style)
Copies the CSS-style(s) property from a source to a destination HTML-element.
Returns an associative array with the previous style(s) values of the destination element.
Arguments:
-
dst
The destination HTML-element of the CSS - style(s).
-
src
The source HTML-element originator of the CSS - style(s).
-
style
A single CSS-property string or an array of CSS-property strings.
jcc.setCss(el, css)
Sets new CSS-values to a HTML-element.
Returns an associative array with the previous CSS-values of the HTML-element.
Arguments:
-
el
The HTML-element whose CSS will be modified.
-
css
Asscociative array with CSS-properties as keys and CSS-strings as values.
jcc.getCss(el, style)
Returns an associative array with the CSS-values of a HTML-element.
Arguments:
-
el
The HTML-element whose CSS will be retrieved.
-
style
A single CSS-property string or an array of CSS-property strings.
jcc.preload(imgUrl)
Preloads an image.
Arguments:
-
imgUrl
The URL of the image to preload.
jcc.prevAll(el)
Returns an array of all DOM-nodes which are on the same level but lay before a reference HTML-element.
Arguments:
-
el
The reference DOM-node.
jcc.nextAll(el)
Returns an array of all DOM-nodes which are on the same level but lay after a reference HTML-element.
Arguments:
-
el
The reference DOM-node.
jcc.insertBefore(newElement, targetElement)
Inserts a new DOM-element before a given HTML-element.
Arguments:
-
newElement
The element to be inserted.
-
targetElement
The reference element.
jcc.insertAfter(newElement, targetElement)
Inserts a new DOM-element after a given HTML-element.
Arguments:
-
newElement
The element to be inserted.
-
targetElement
The reference element.
jcc.detach(el)
Removes a HTML-element from the DOM-tree.
Arguments:
-
el
The element to be removed from the DOM.
jcc.inputTypeSupported(type)
Checks is a particular HTML-input type is supported by the current browser.
Arguments:
-
type
The type to be checked as a string (e.g. "text", "color", "date").
jcc.whatTransitionEnd()
Returns the name of the 'transitionend' event supported by the current browser or 'null' if
no transition end event is supported.
jcc.whatAnimationEnd()
Returns the name of the 'animationend' event supported by the current browser or 'null' if
no animation end event is supported.
jcc.addTransitionEndListener(el, callback, capture)
Adds an event handler for the transition end event to an element and returns 'true' if
transition end event is supported by the current browser.
Arguments:
-
el
The HTML-element to which the event handler is added.
-
callback
The event handler function.
-
[optional] capture
Boolean indicating to use capture (true) or bubbling (false) event handling. Default is 'false'.
jcc.removeTransitionEndListener(el, callback)
Removes the event handler for the transition end event from an element and returns 'true' if
transition end event is supported by the current browser.
Arguments:
-
el
The HTML-element from which the event handler is removed.
-
callback
The event handler function to be removed.
jcc.addAnimationEndListener(el, callback, capture)
Adds an event handler for the animation end event to an element and returns 'true' if
animation end event is supported by the current browser.
Arguments:
-
el
The HTML-element to which the event handler is added.
-
callback
The event handler function.
-
[optional] capture
Boolean indicating to use capture (true) or bubbling (false) event handling. Default is 'false'.
jcc.removeAnimationEndListener(el, callback)
Removes the event handler for the animation end event from an element and returns 'true' if
animation end event is supported by the current browser.
Arguments:
-
el
The HTML-element from which the event handler is removed.
-
callback
The event handler function to be removed.
jcc.elementText(el, text)
Sets text of a HTML-element. The text will be accordingly escaped by this function, so it is the safe way
of setting text to a HTML-element.
Arguments:
-
el
The HTML-element which the text will be set to.
-
text
The unescaped text to be set.
jcc.xmlEncode(text)
Escapes text XML entities and returns the escaped string.
Arguments:
-
text
The unescaped text to be convertedto XML encoded text.
jcc.enhance(el)
Sets visual and behavioural properties and enhancements to a specific DOM-subtree.
Arguments:
-
el
The DOM-hierarchy to be enhanced. The top-most DOM-node which can be provided is 'document.body'.
jcc.unenhance(el)
Removes all visual and behavioural properties and enhancements from a specific DOM-subtree.
Arguments:
-
el
The DOM-hierarchy to be unenhanced. The top-most DOM-node which can be provided is 'document.body'.
jcc.init(el)
Initializes JCC core internals. This should be the first JCC method ever called. Without doing
so, the behaviour of JCC may be undetermined. Optionally, it enhances the element starting from the
argument el.
Arguments:
-
[optional] el
The DOM-hierarchy to be enhanced. The top-most DOM-node which can be provided is 'document.body'.
jcc.sortedPrimitiveArray(array, sortNow)
Utility class for management of a sorted array of primitive type elements (numbers and strings).
Arguments:
-
array
The JavaScript array to be enhanced.
-
sortNow
A flag if the input array should be sorted now.
jcc.sortedPrimitiveArray.findInsertPos(element)
Returns the insert index of a new value which is not in the array yet.
Arguments:
-
element
A number or string which is not in the array yet.
jcc.sortedPrimitiveArray.findIndex(element)
Returns the index of an existing value (its first occurence) in the array. Returns -1 if the value is not found.
Arguments:
-
element
A number or string in the array whose index is to be retrieved.
jcc.sortedPrimitiveArray.add(element)
Adds a new element to the array.
Arguments:
-
element
A number or string to be added.
jcc.sortedPrimitiveArray.remove(element)
Removes an element (its first occurence if there are duplicate values) from the array.
It returns the index where the new element has been inserted.
Arguments:
-
element
A number or string to be removed.
It returns the index removed or -1 if the value has not been found.
jcc.sortedArray(array, sortValueName, sortNow, descending)
Utility class for management of a sorted array of object type elements.
Arguments:
-
array
The JavaScript array to be enhanced.
-
sortValueName
The name of the array items' object member which will be used for sorting.
-
sortNow
A flag if the input array should be sorted now.
-
descending
A flag if the input array should be sorted in a reverse (descending) order.
jcc.sortedArray.findInsertPosition(item)
Returns the insert index of a new item which is not in the array yet.
Arguments:
-
item
A new item which is not in the array yet.
jcc.sortedArray.findIndexBySortValue(sortValue)
Returns the index of an existing item (its first occurence) in the array according to the value of
the object member used for sorting. Returns -1 if the item is not found.
Arguments:
-
sortValue
The value to be searched within the objects' member used for sorting.
jcc.sortedArray.findIndex(item)
Returns the index of an existing item (its first occurence) in the array. Returns -1 if the item is not found.
Arguments:
-
item
An item in the array whose index is to be retrieved.
jcc.sortedArray.findIndexCompare(item, cmpFunc)
Returns the index of an existing item (its first occurence) in the array using a compare function.
Returns -1 if the item is not found.
Arguments:
-
item
An item in the array whose index is to be retrieved.
-
cmpFunc
A compare function taking two arguments (the two items compared). It should return true if two items are "equal".
jcc.sortedArray.add(item)
Adds a new item to the array. It returns the index where the new item has been inserted.
Arguments:
-
item
An item to be added.
jcc.sortedArray.remove(item, cmpFunc)
Removes an item (its first occurence if there are duplicate values) from the array.
It returns the index removed or -1 if the item has not been found.
Arguments:
-
item
The item to be removed.
-
[optional] cmpFunc
A compare function taking two arguments (the two items compared). It should return true if two items are "equal".
jcc.sortedSubfieldArray(array, subfieldName, sortValueName, sortNow, descending)
Utility class for management of a sorted array of object type elements which contain a nested object used for the actual sorting.
Arguments:
-
array
The JavaScript array to be enhanced.
-
subfieldName
The name of the array items' object member which contains the object with the sorting member name.
-
sortValueName
The name of the array items' object's object member which will be used for sorting.
-
sortNow
A flag if the input array should be sorted now.
-
descending
A flag if the input array should be sorted in a reverse (descending) order.
jcc.sortedSubfieldArray.findInsertPosition(item)
Returns the insert index of a new item which is not in the array yet.
Arguments:
-
item
A new item which is not in the array yet.
jcc.sortedSubfieldArray.findIndexBySortValue(sortValue)
Returns the index of an existing item (its first occurence) in the array according to the value of
the object member used for sorting. Returns -1 if the item is not found.
Arguments:
-
sortValue
The value to be searched within the objects' member used for sorting.
jcc.sortedSubfieldArray.findIndex(item)
Returns the index of an existing item (its first occurence) in the array. Returns -1 if the item is not found.
Arguments:
-
item
An item in the array whose index is to be retrieved.
jcc.sortedSubfieldArray.findIndexCompare(item, cmpFunc)
Returns the index of an existing item (its first occurence) in the array using a compare function.
Returns -1 if the item is not found.
Arguments:
-
item
An item in the array whose index is to be retrieved.
-
cmpFunc
A compare function taking two arguments (the two items compared). It should return true if two items are "equal".
jcc.sortedSubfieldArray.add(item)
Adds a new item to the array. It returns the index where the new item has been inserted.
Arguments:
-
item
An item to be added.
jcc.sortedSubfieldArray.remove(item, cmpFunc)
Removes an item (its first occurence if there are duplicate values) from the array.
It returns the index removed or -1 if the item has not been found.
Arguments:
-
item
The item to be removed.
-
[optional] cmpFunc
A compare function taking two arguments (the two items compared). It should return true if two items are "equal".
jcc.alert(message, title, onenddialog, unescaped)
Displays a message on the screen using a JCC-styled dialog. See the section 'JCC properties and methods -> Properties'
on how to change the alert dialog theme and default texts.
Arguments:
-
message
The text to be displayed to the user.
-
[optional] title
The dialog title.
-
[optional] onenddialog
A callback function with a single integer argument (result = 0) to be called after the user dismisses the dialog in either way.
-
[optional] unescaped
Boolean value to allow HTML-code injection in 'message' and 'title' argument and so disable escaping and allow custom visualization.
jcc.confirm(message, title, onenddialog, unescaped)
Displays a confirmation message on the screen using a JCC-styled dialog. See the section 'JCC properties and methods -> Properties'
on how to change the confirmation dialog theme and default texts.
Arguments:
-
message
The text to be displayed to the user.
-
[optional] title
The dialog title.
-
[optional] onenddialog
A callback function with a single integer argument (result=0, if user dismisses the dialog or presses the No-button,
result=1 if user presses the Yes-button) to be called after dialog has ended.
-
[optional] unescaped
Boolean value to allow HTML-code injection in 'message' and 'title' argument and so disable escaping and allow custom visualization.
jcc.prompt(message, title, onenddialog, cancelValue, unescaped)
Displays a prompt message waiting for user input on the screen using a JCC-styled dialog. See the section 'JCC properties and methods -> Properties'
on how to change the prompt dialog theme and default texts.
Arguments:
-
message
The text to be displayed to the user.
-
[optional] title
The dialog title.
-
[optional] onenddialog
A callback function with a single integer argument (result="cancel", if cancelValue is omitted,
when user dismisses the dialog or presses the Cancel-button, result=value_entered if user presses the Ok-button)
to be called after dialog has ended.
-
[optional] cancelValue
The value passed to onenddialog when the user hits the Cancel-button.
-
[optional] unescaped
Boolean value to allow HTML-code injection in 'message' and 'title' argument and so disable escaping and allow custom visualization.
jcc.datetime(input, mode, onenddialog)
Displays a date and/or time picking dialog on the screen using a JCC-styled dialog. See the section 'JCC properties and methods -> Properties'
on how to change the date/time picker dialog theme and default texts.
Arguments:
-
input
The input field to hold the results of the dialog.
-
mode
jcc.options.datetime.DIALOG_MODE.DATE or jcc.options.datetime.DIALOG_MODE.TIME or
(jcc.options.datetime.DIALOG_MODE.DATE | jcc.options.datetime.DIALOG_MODE.TIME).
-
[optional] onenddialog
A callback function with a single integer argument (result=0, if user dismisses the dialog or presses the Cancel-button,
result=date_time_value if user presses the Ok-button) to be called after dialog has ended.
jcc.colorpicker(input, mode, onenddialog)
Displays a color picking dialog on the screen using a JCC-styled dialog. See the section 'JCC properties and methods -> Properties'
on how to change the color picker dialog theme and default texts.
Arguments:
-
input
The input field to hold the results of the dialog.
-
mode
jcc.options.colorpicker.COLOR_FORMAT.HEX or jcc.options.colorpicker.COLOR_FORMAT.RGB or
jcc.options.colorpicker.COLOR_FORMAT.RGBA
-
[optional] onenddialog
A callback function with a single integer argument (result=0, if user dismisses the dialog or presses the Cancel-button,
result=color_value if user presses the Ok-button) to be called after dialog has ended.
jcc.widget(el)
The base class for all widgets is 'jcc.widget'. Its constructor takes a HTML-element as a single argument -
the element to be enhanced or eventually unenhanced.
Arguments:
-
el
The HTML-element the widget relates to.
jcc.widget.theme()
Returns the current widget theme as a string.
jcc.widget.setOptions(opt)
Sets options for a widget and refreshes the widget. NOTE: Widgets may override this method
so no refresh will be called for specific options.
Arguments:
-
opt
An associative array of options. Keys of the array should be using the naming convention used in CSS:
'option' => 'option' as a key
'another-option' => 'anotherOption' as a key
jcc.widget.getOption(opt)
Get the value of a particular widget option.
Arguments:
-
opt
The option string to be retrieved. It must be in a CSS notation:
'option' => 'option'
'another-option' => 'anotherOption'
jcc.widget.element()
Returns the HTML-element of a widget.
jcc.widget.refresh()
Reloads the widget enhancements.
jcc.widget.destroy()
Removes all widget enhancements.


System Architect Picture "Property Natural Progression"
Parent Diagram:
Natural Progression
(UML Class)


Templates
Introduction
Go’s html/template
package provides a rich templating language for HTML templates.
It is mostly used in web applications to display data in a structured way in a client’s browser.
One great benefit of Go’s templating language is the automatic escaping of data.
There is no need to worry about about XSS attacks as Go parses the HTML template and escapes all inputs before displaying it to the browser.
First Template
Writing a template in Go is very simple. This example shows a TODO list, written as an unordered list (ul) in HTML.
When rendering templates, the data passed in can be any kind of Go’s data structures. It may be a simple string or a number,
it can even be nested data structure as in the example below. To access the data in a template the top most variable is access by {{.}}
.
The dot inside the curly braces is called the pipeline and the root element of the data.
data := TodoPageData{
PageTitle: "My TODO list",
Todos: []Todo{
{Title: "Task 1", Done: false},
{Title: "Task 2", Done: true},
{Title: "Task 3", Done: true},
},
}

{{.PageTitle}}

{{range .Todos}}
{{if .Done}}

{{.Title}}

{{else}}

{{.Title}}

{{end}}
{{end}}

Control Structures
The templating language contains a rich set of control structures to render your HTML. Here you will get an overview of the most commonly used ones. To get a detailed list of all possible structures visit: text/template
| Control Structure | Definition |
|---|---|
{{/* a comment */}} |
Defines a comment |
{{.}} |
Renders the root element |
{{.Title}} |
Renders the “Title”-field in a nested element |
{{if .Done}} {{else}} {{end}} |
Defines an if-Statement |
{{range .Todos}} {{.}} {{end}} |
Loops over all “Todos” and renders each using {{.}} |
{{block "content" .}} {{end}} |
Defines a block with the name “content” |
Parsing Templates from Files
Template can either be parsed from a string or a file on disk.
As it is usually the case, that templates are pares from disk, this example shows how to do so.
In this example there is a template file in the same directory as the Go program called layout.html
.
tmpl, err := template.ParseFiles("layout.html")
// or
tmpl := template.Must(template.ParseFiles("layout.html"))
Execute a Template in a Request Handler
Once the template is parsed from disk it’s ready to be used in the request handler.
The Execute
function accepts an io.Writer
for writing out the template and an interface{}
to pass data into the template.
When the function is called on an http.ResponseWriter
the Content-Type is header is automatically set in the HTTP response to Content-Type: text/html; charset=utf-8
.
func(w http.ResponseWriter, r *http.Request) {
tmpl.Execute(w, "data goes here")
}
The Code (for copy/paste)
This is the complete code that you can use to try out the things you’ve learned in this example.
package main
import (
"html/template"
"net/http"
)
type Todo struct {
Title string
Done bool
}
type TodoPageData struct {
PageTitle string
Todos []Todo
}
func main() {
tmpl := template.Must(template.ParseFiles("layout.html"))
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
data := TodoPageData{
PageTitle: "My TODO list",
Todos: []Todo{
{Title: "Task 1", Done: false},
{Title: "Task 2", Done: true},
{Title: "Task 3", Done: true},
},
}
tmpl.Execute(w, data)
})
http.ListenAndServe(":80", nil)
}

{{.PageTitle}}

{{range .Todos}}
{{if .Done}}

{{.Title}}

{{else}}

{{.Title}}

{{end}}
{{end}}


| Microsoft_Http |
| [ class tree: Microsoft_Http ] [ index: Microsoft_Http ] [ all elements ] |
|
Packages: Microsoft_WindowsAzure Microsoft Microsoft_Console Microsoft_Http Microsoft_Log Microsoft_SqlAzure Microsoft_SqlAzure_CommandLine Microsoft_Uri Microsoft_WindowsAzure_CommandLine Microsoft_WindowsAzure_Storage Files: subpackage Client subpackage Client_Adapter subpackage Client_Adapter_Exception subpackage Client_Exception subpackage Cookie subpackage CookieJar subpackage Exception subpackage Response Interfaces: Classes: |
[ Top ] $cookiejar = null[line 186] The client's cookie jarTags:
[ Top ] $enctype = null[line 148] Request body content type (for POST requests)Tags:
[ Top ] $files = array()[line 179] File upload arrays (used in POST requests)An associative array, where each element is of the format: 'name' => array('filename.txt', 'text/plain', 'This is the actual file contents') Tags:
[ Top ] $headers = array()[line 120] Associative array of request headersTags:
[ Top ] $last_request = null[line 193] The last HTTP request sent by the client, as stringTags:
[ Top ] $last_response = null[line 200] The last HTTP response received by the clientTags:
[ Top ] $method = self::GET[line 127] HTTP request methodTags:
[ Top ] $paramsGet = array()[line 134] Associative array of GET parametersTags:
[ Top ] $paramsPost = array()[line 141] Assiciative array of POST parametersTags:
[ Top ] $raw_post_data = null[line 155] The raw post data to send. Could be set by setRawData($data, $enctype).Tags:
[ Top ] $redirectCounter = 0[line 207] Redirection counterTags:
[ Top ] $uri = null[line 113] Request URITags:
[ Top ] Class Methodsstatic method encodeAuthHeader [line 1350]
Create a HTTP authentication "Authorization:" header according to the specified user, password and authentication method. Tags:
Parameters:
[ Top ]
static method encodeFormData [line 1320]
Encode data to a multipart/form-data part suitable for a POST request. Tags:
Parameters:
[ Top ]
static method _flattenParametersArray [line 1395]
Convert an array of parameters into a flat array of (key, value) pairs Will flatten a potentially multi-dimentional array of parameters (such as POST parameters) into a flat array of (key, value) paris. In case of multi-dimentional arrays, square brackets ([]) will be added to the key to indicate an array. Tags:
Parameters:
[ Top ]
constructor __construct [line 226]
Contructor method. Will create a new HTTP client. Accepts the target URL and optionally configuration array. Tags:
Parameters:
[ Top ]
method getAdapter [line 841]
Load the connection adapter Tags:
[ Top ]
method getCookieJar [line 589]
Return the current cookie jar or null if none. Tags:
[ Top ]
method getHeader [line 414]
Get the value of a specific header Note that if the header has more than one value, an array will be returned. Tags:
Parameters:
[ Top ]
method getLastRequest [line 786]method getLastResponse [line 799]
Get the last HTTP response received by this client If $config['storeresponse'] is set to false, or no response was stored yet, will return null Tags:
[ Top ]
method getRedirectionsCount [line 495]
Get the number of redirections done on the last request Tags:
[ Top ]
method getStream [line 862]method getUri [line 276]
Get the URI for the next request Tags:
Parameters:
[ Top ]
method request [line 898]
Send the HTTP request and return an HTTP response object Tags:
Parameters:
[ Top ]
method resetParameters [line 756]
Clear all GET and POST parameters Should be used to reset the request parameters if the client is used for several concurrent requests. clearAll parameter controls if we clean just parameters or also headers and last_* Tags:
Parameters:
[ Top ]
method setAdapter [line 814]
Load the connection adapter While this method is not called more than one for a client, it is seperated from ->request() to preserve logic and readability Tags:
Parameters:
[ Top ]
method setAuth [line 523]
Set HTTP authentication parameters $type should be one of the supported types - see the self::AUTH_* constants. To enable authentication: To disable authentication: Tags:
Parameters:
[ Top ]
method setConfig [line 292]
Set configuration parameters for this HTTP client Tags:
Parameters:
[ Top ]
method setCookie [line 603]
Add a cookie to the request. If the client has no Cookie Jar, the cookies will be added directly to the headers array as "Cookie" headers. Tags:
Parameters:
[ Top ]
method setCookieJar [line 563]
Set the HTTP client's cookie jar. A cookie jar is an object that holds and maintains cookies across HTTP requests and responses. Tags:
Parameters:
[ Top ]
method setEncType [line 709]
Set the encoding type for POST data Tags:
Parameters:
[ Top ]
method setFileUpload [line 676]
Set a file to upload (using a POST request) Can be used in two ways:
Tags:
Parameters:
[ Top ]
method setHeaders [line 362]
Set one or more request headers This function can be used in several ways to set the client's request headers:
Tags:
Parameters:
[ Top ]
method setMethod [line 326]
Set the next request's method Validated the passed method and sets it. If we have files set for POST requests, and the new method is not POST, the files are silently dropped. Tags:
Parameters:
[ Top ]
method setParameterGet [line 431]
Set a GET parameter for the request. Wrapper around _setParameter Tags:
Parameters:
[ Top ]
method setParameterPost [line 450]
Set a POST parameter for the request. Wrapper around _setParameter Tags:
Parameters:
[ Top ]
method setRawData [line 730]
Set the raw (already encoded) POST data. This function is here for two reasons:
Tags:
Parameters:
[ Top ]
method setStream [line 852]
Set streaming for received data Tags:
Parameters:
[ Top ]
method setUri [line 243]
Set the URI for the next request Tags:
Parameters:
[ Top ]
method _detectFileMimeType [line 1284]
Attempt to detect the MIME type of a file using available extensions This method will try to detect the MIME type of a file. If the fileinfo extension is available, it will be used. If not, the mime_magic extension which is deprected but is still available in many PHP setups will be tried. If neither extension is available, the default application/octet-stream MIME type will be returned Tags:
Parameters:
[ Top ]
method _getParametersRecursive [line 1234]
Helper method that gets a possibly multi-level parameters array (get or post) and flattens it. The method returns an array of (key, value) pairs (because keys are not necessarily unique. If one of the parameters in as array, it will also add a [] suffix to the key. This method is deprecated since Zend Framework 1.9 in favour of self::_flattenParametersArray() and will be dropped in 2.0 Tags:
Parameters:
[ Top ]
method _openTempStream [line 872]method _prepareBody [line 1127]
Prepare the request body (for POST and PUT requests) Tags:
[ Top ]
method _prepareHeaders [line 1046]method _setParameter [line 470]
Set a GET or POST parameter - used by SetParameterGet and SetParameterPost Tags:
Parameters:
[ Top ]
Class ConstantsAUTH_BASIC = 'basic'[line 62] Supported HTTP Authentication methods[ Top ] CONNECT = 'CONNECT'[line 56] [ Top ] CONTENT_LENGTH = 'Content-Length'[line 75] [ Top ] CONTENT_TYPE = 'Content-Type'[line 74] Content attributes[ Top ] DELETE = 'DELETE'[line 53] [ Top ] ENC_FORMDATA = 'multipart/form-data'[line 81] [ Top ] ENC_URLENCODED = 'application/x-www-form-urlencoded'[line 80] POST data encoding methods[ Top ] GET = 'GET'[line 49] HTTP request methods[ Top ] HEAD = 'HEAD'[line 52] [ Top ] HTTP_0 = '1.0'[line 69] [ Top ] HTTP_1 = '1.1'[line 68] HTTP protocol versions[ Top ] MERGE = 'MERGE'[line 57] [ Top ] OPTIONS = 'OPTIONS'[line 55] [ Top ] POST = 'POST'[line 50] [ Top ] PUT = 'PUT'[line 51] [ Top ] TRACE = 'TRACE'[line 54] [ Top ] Documentation generated on Sat, 03 Dec 2011 13:59:14 +0100 by phpDocumentor 1.4.3 |


Site Map
News and updates
| New releases and related tools will be announced through the mailing list |
Getting Help
| Questions about Cufflinks and Cuffdiff should be posted on our Google Group. Please use<EMAIL_ADDRESS>for private communications only. Please do not email technical questions to Cufflinks contributors directly. |
Releases
| version 2.2.0 | 5/25/2014 |
| Source code | |
| Linux x86_64 binary | |
| Mac OS X x86_64 binary |
Related Tools
- Monocle: Single-cell RNA-Seq analysis
- CummeRbund: Visualization of RNA-Seq differential analysis
- TopHat: Alignment of short RNA-Seq reads
- Bowtie: Ultrafast short read alignment
Publications
-
Trapnell C, Williams BA, Pertea G, Mortazavi AM, Kwan G, van Baren MJ, Salzberg SL, Wold B, Pachter L. Transcript assembly and quantification by RNA-Seq reveals unannotated transcripts and isoform switching during cell differentiation
Nature Biotechnology doi:10.1038/nbt.1621
-
Roberts A, Trapnell C, Donaghey J, Rinn JL, Pachter L. Improving RNA-Seq expression estimates by correcting for fragment bias
Genome Biology doi:10.1186/gb-2011-12-3-r22
-
Roberts A, Pimentel H, Trapnell C, Pachter L. Identification of novel transcripts in annotated genomes using RNA-Seq
Bioinformatics doi:10.1093/bioinformatics/btr355
-
Trapnell C, Hendrickson D,Sauvageau S, Goff L, Rinn JL, Pachter L Differential analysis of gene regulation at transcript resolution with RNA-seq
Nature Biotechnology doi:10.1038/nbt.2450
Contributors
- Cole Trapnell
- Adam Roberts
- Geo Pertea
- David Hendrickson
- Loyal Goff
- Martin Sauvageau
- Brian Williams
- Ali Mortazavi
- Gordon Kwan
- Jeltje van Baren
- John Rinn
- Steven Salzberg
- Barbara Wold
- Lior Pachter
Links
Getting started
Install quick-startInstalling a pre-compiled binary release In order to make it easy to install Cufflinks, we provide a few binary packages to save users from occasionally frustrating process of building Cufflinks, which requires that you install the Boost libraries. To use the binary packages, simply download the appropriate one for your machine, untar it, and make sure the cufflinks,cuffdiff and cuffcompare binaries are in a directory in your PATH environment variable. Building Cufflinks from source In order to build Cufflinks, you must have the Boost C++ libraries (version 1.47 or higher) installed on your system. See below for instructions on installing Boost. Installing Boost
If you are on a 32-bit Linux system, type (all on
one line): bjam --prefix=<YOUR_BOOST_INSTALL_DIRECTORY> --toolset=gcc architecture=x86 address_model=32 link=static runtime-link=static stage install If you are on a 64-bit Linux system, type (all on
one line): bjam --prefix=<YOUR_BOOST_INSTALL_DIRECTORY> --toolset=gcc architecture=x86 address_model=64 link=static runtime-link=static stage install Installing the SAM tools
Installing the Eigen libraries
Building Cufflinks
Testing the installation
Common uses of the Cufflinks packageCufflinks includes a number of tools for analyzing RNA-Seq experiments. Some of these tools can be run on their own, while others are pieces of a larger workflow. The complexity of your workflow depends on what you want to achieve with your analysis. For a complete discussion of how Cufflinks can help you with your analysis, please see our protocol paper. The paper includes a diagram (Figure 2) describing how the various parts of the Cufflinks package (and its companion tool TopHat) fit together. As of version 2.2.0, you can also run Cuffquant and Cuffnorm to make large scale analyses easier to handle. The figure below is an updated version of Figure 2 showing how the two utilities released after the protocol paper appeared fit into the workflow: You can use Cuffquant to pre-compute gene expression levels for each of your samples, which can save time if you have to re-run part of your analysis. Using Cuffquant also makes it easier to spread the load of computation for lots of samples across multiple computers. If you don't want to perform differential expression analysis, you can run Cuffnorm instead of Cuffdiff. Cuffnorm produces simple tables of expression values that you can look at in R (for example) to cluster samples and perform other follow up analysis. Discovering novel genes and transcriptsRNA-Seq is a powerful technology for gene and splice variant discovery. You can use Cufflinks to help annotate a new genome or find new genes and splice isoforms of known genes in even well-annotated genomes. Annotating genomes is a complex and difficult process, but we outline a basic workflow that should get you started here. The workflow also excludes examples of the commands you'd run to implement each step in the workflow. Suppose we have RNA-Seq reads from human liver, brain, and heart.
We recommend that you use TopHat to map your reads to the reference genome. For this example, we'll assume you have paired-end RNA-Seq data. You can map reads as follows:
tophat -r 50 -o tophat_brain /seqdata/indexes/hg19 brain_1.fq brain_2.fq tophat -r 50 -o tophat_liver /seqdata/indexes/hg19 liver_1.fq liver_2.fq tophat -r 50 -o tophat_heart /seqdata/indexes/hg19 heart_1.fq heart_2.fq The commands above are just examples of how to map reads with TopHat. Please see the TopHat manual for more details on RNA-Seq read mapping. The next step is to assemble each tissue sample independently using Cufflinks. Assemble each tissue like so: cufflinks -o cufflinks_brain tophat_brain/accepted_hits.bam cufflinks_brain/transcripts.gtfNow run the merge script: cuffmerge -s /seqdata/fastafiles/hg19/hg19.fa assemblies.txt The final, merged annotation will be in the file merged_asm/merged.gtf. At this point, you can use your favorite browser to explore the structure of your genes, or feed this file into downstream informatic analyses, such as a search for orthologs in other organisms. You can also explore your samples with Cuffdiff and identify genes that are significantly differentially expressed between the three conditions. See the workflows below for more details on how to do this. cuffcompare -s /seqdata/fastafiles/hg19/hg19.fa -r known_annotation.gtf merged_asm/merged.gtfCuffcompare will produce a number of output files that you can parse to select novel genes and isoforms. Identifying differentially expressed and regulated genesThere are two workflows you can choose from when looking for differentially expressed and regulated genes using the Cufflinks package. The first workflow is simpler and is a good choice when you aren't looking for novel genes and transcripts. This workflow requires that you not only have a reference genome, but also a reference gene annotation in GFF format (GFF3 or GTF2 formats are accepted, see details here). The second workflow, which includes steps to discover new genes and new splice variants of known genes, is more complex and requires more computing power. The second workflow can use and augment a reference gene annotation GFF if one is available. Differential analysis without gene and transcript discovery
We recommend that you use TopHat to map your reads to the reference genome. For this example, we'll assume you have paired-end RNA-Seq data. Suppose you have RNA-Seq from a knockdown experiment where you have two biological replicates of a mock condition as a control and two replicates of your knockdown. Note: Cuffdiff will work much better if you map your replicates independently, rather than pooling the replicates from one condition into a single set of reads.
Note: While an GTF of known transcripts is not strictly required at this stage, providing one will improve alignment sensitivity, and ultimately, the accuracy of Cuffdiff's analysis. You can map reads as follows: tophat -r 50 -G annotation.gtf -o tophat_mock_rep1 /seqdata/indexes/hg19 \ cuffdiff annotation.gtf mock_rep1.bam,mock_rep2.bam \ Differential analysis with gene and transcript discovery
Follow the protocol for gene and transcript discovery listed above. Be sure to provide TopHat and the assembly merging script with an reference annotation if one is available for your organism, to ensure the highest possible quality of differential expression analysis. cuffdiff merged_asm/merged.gtf liver1.bam,liver2.bam brain1.bam,brain2.bamAs shown above, replicate BAM files for each conditions must be given as a comma separated list. If you put spaces between replicate files instead of commas, cuffdiff will treat them as independent conditions. |


Well, after analyzing which is what matters to Internet users, take the desicion to implement an edit of Chinese characters, this being the first publisher to realize, if you do not know the meaning of these words, well, I not know, but in virtual conversations I think we used to play more fun feelings, which no one will know what they want to interpret, which we express something but are not able to openly say it, it's like talking in code.
Many of these letters are used in tattoos and I always wonder ... will you know its true meaning? Why are Chinese, if you're not Chinese? What would a Chinese if you go with that? Have a relative or something Chinese linking you with that country?
Both write about China, I start to get hungry to go to a restaurant to ... guess ... Chinese food ... of course, it's my favorite, mmm a coiled spring, a fried wantan a mongoliana meat .. . noooo gives me even more hungry ...
頁 - 設 - 是 - 煵 - 엌 - 嫠 - 쯦 - 案 - 煪 - ㍱ - 從 - つ - 浳 - 浤 - 搰 - ㍭ - 煤 - 洳 - 橱 - 橱 - 迎 - 事 - 網 - 計 - 簡 - 大 ㍵ - 畱 - 煵 - 田 - 煱 - 둻 - 睤 - ㌹ - 楤 - ぱ - 椹 - ぱ - 頹 - 衙
I invite you to use this fun app...
If you're observant, or maybe not, you will realize that this editor has 3 results of which only the second you can read and understand its contents easily because this although not Chinese letters are letters that have a Chinese style and the third will show result of Chinese letters in circles, each time I see them I remember waits dragon dragon Ball Z, the serial I used to watch about 20 years ago and that motivated me in my workouts at the gym. These lyrics are very similar to those japanese letters, but make no mistake it has different meaning.