Attribute Guide¶
This guide explains how to set the simple_return
product attribute. This attribute
must be set and enabled for each product of an order, as required for RMA eligibility.
Note
Simple Returns is an order-based RMA extension, meaning an RMA request is not specific to any single item, but the order as a whole. If you need itemized and/or partial returns capabilities, please check out our premium RMA extension, Simple Returns Pro. It provides all of the features of Simple Returns with several added features like itemized and partial returns, RMA archives, and lockable RMAs to prevent customers from editing, just to name a few.
Table of Contents¶
Prerequisites¶
Before starting, please make sure you have completed the following steps:
Attribute¶
Step One: Add Attribute¶
To start, navigate to Catalog > Products and click on a product you would like to make returnable.
Attention
For configurable products, you will need to complete this step for both the configurable product, as well as the associated simple product.
From the product edit page, click Add Attribute in the top right corner of the page.
From the attributes grid, select the checkbox for simple_return
and click Add Selected.
Click Save to update the product.
Step Two: Reindex Products¶
The next step is to reindex the products and their attributes. From the Magento root directory, run the following command:
bin/magento cache:clean && bin/magento indexer:reindex
Step Three: Update Attribute¶
Once the indexer is finished, navigate back to the product edit page and look for the Attributes section near the bottom of the page. Toggle open the Attributes section and click the Returnable attribute button to enable returns for the product.
Click Save to update the product. You should be able to see the attribute value set to enabled after the product is finished saving.
Warning
If the attribute value is not updated after saving the product, the likely causes are:
You did not complete Step Two: Reindex Products
The product was not successfully reindexed with the new attribute
Once you’ve verified the attribute value is saving properly, you can either manually update each product you would like to make returnable, or you can perform a bulk import to save time, particularly if you’re working with a large catalog. As of right now, we do not have a formalized guide on bulk importing.
Step Four: Test an order [Optional]¶
This step is optional, but we recommend completing it to get an understanding of how Simple Returns works on the frontend.
To start this step, create a new order of all returnable products. There are plenty of guides on creating test orders in Magento, so we will leave that part up to you.
Attention
Please don’t use an existing order, as the order items of an existing order will not have the required attribute saved on it.
Once you have your test order submitted, navigate to the Orders and Returns page on the frontend.
On the Orders and Returns page, fill out the relevant order information. The Order ID field should be the nine digit order increment ID value, which was generated when the order was created.
Click Continue to submit the form. This will take you to the frontend order view page.
Once the order view page has loaded, you should see a new link next to the Reorder link. It will display something to the effect of Return or replace items. Click the link, which will take you to the frontend RMA create page.
On the Create new RMA page, fill out the relevant information about the RMA request and click Submit.
Once the RMA view page had loaded, review the information. You will not be able to generate a shipping label until the RMA request is approved.
Keeping the RMA view page open, create a new tab in your browser. In the new tab, navigate to the Magento backend and approve the RMA request. This will allow you to generate the package and subsequent shipping label from the frontend like a customer.
Returning to the frontend RMA view page, reload the page and click the Create Package button. This will take you to the Package create page and require you to confirm the package information. Keep the option to Generate Shipping Label set to Yes and click Confirm.
Once the Package view page has loaded, you should see all of the package details along with the newly generated shipping label.
Warning
If you encounter issues when confirming the package information, it is almost always an issue communicating with the shipping carrier APIs. Please make sure you have properly configured the desired shipping carrier, your access credentials are working, and the desired shipping carrier is selected within the Simple Returns configuration settings.


@(active: String, title: String, blogCategories: collection.immutable.ListMap[String,String])(content: Html)


Press "f" to lock mouse
Use W-A-S-D to move
Look around by dragging with your mouse cursor, or arrow keys


Make complex, interactive heatmaps. 'iheatmapr' includes a modular system for iteratively building up complex heatmaps, as well as the iheatmap() function for making relatively standard heatmaps.
| Version: | 0.4.3 |
| Depends: | R (≥ 3.2.0) |
| Imports: | methods, plyr, utils, magrittr, S4Vectors, stats, ggdendro, fastcluster, RColorBrewer, htmlwidgets, jsonlite, scales, knitr, tools |
| Suggests: | htmltools, datasets, shiny, testthat, rmarkdown, reshape2, roxygen2, covr, webshot |
| Published: | 2017-12-08 |
| Author: | Alicia Schep [aut, cre], Sarah Kummerfeld [aut], Genentech [cph], Andee Kaplan [rev] (Reviewer for rOpensci review process https://github.com/ropensci/onboarding/issues/107), Carl Ganz [rev] (Reviewer for rOpensci review process https://github.com/ropensci/onboarding/issues/107), Alex Johnson [ctb] (plotly.js library), Étienne Tétreault-Pinard [ctb] (plotly.js library), Mikola Lysenko [ctb] (plotly.js library), Ricky Reusser [ctb] (plotly.js library), Robert Monfera [ctb] (plotly.js library), Nicolas Riesco [ctb] (plotly.js library), Miklós Tusz [ctb] (plotly.js library), Chelsea Douglas [ctb] (plotly.js library), Ben Postlethwaite [ctb] (plotly.js library), Chris Parmer [ctb] (plotly.js library), Alex Vados [ctb] (plotly.js library), Plotly [cph] (plotly.js library) |
| Maintainer: | Alicia Schep <aschep at gmail.com> |
| BugReports: | https://github.com/ropensci/iheatmapr/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/ropensci/iheatmapr |
| NeedsCompilation: | no |
| Citation: | iheatmapr citation info |
| Materials: | NEWS |
| CRAN checks: | iheatmapr results |
| Reference manual: | iheatmapr.pdf |
| Vignettes: |
Minimal iheatmpar vignette |
| Package source: | iheatmapr_0.4.3.tar.gz |
| Windows binaries: | r-devel: iheatmapr_0.4.3.zip, r-release: iheatmapr_0.4.3.zip, r-oldrel: iheatmapr_0.4.3.zip |
| OS X binaries: | r-release: iheatmapr_0.4.3.tgz, r-oldrel: iheatmapr_0.4.3.tgz |
| Old sources: | iheatmapr archive |
Please use the canonical form https://CRAN.R-project.org/package=iheatmapr to link to this page.


--- layout: post permalink: bestinsolescom.html Tags: Array NameOfCoupon: BestInsoles.com Cash Back Summary: See our BestInsoles.com Coupon Code, BestInsoles.com Rebate, BestInsoles.com Promo Code, BestInsoles.com Discount, BestInsoles.com Coupon Cash Back Rebate here. MetaKeywords: BestInsoles.com Coupon Code, BestInsoles.com Rebate, BestInsoles.com Promo Code, BestInsoles.com Cash Back Rebate, BestInsoles.com Discount, BestInsoles.com Coupon Image: images/24417.jpg LinkURL: http://www.shareasale.com/r.cfm?b=196347&u=412002&m=24417 affiliate_url_link: http://www.icouponblog.com/jane.php?id=280 thesis_readmore: See the BestInsoles.com Coupon thesis_thumb: http://www.icouponblog.com/tn.php?merchantURL=bestinsoles.com Title: Save 2.5% - BestInsoles.com Coupon Code for bestinsoles.com. BestInsoles.com Rebate & Discount thesis_description: Our BestInsoles.com Discount Coupon Code for bestinsoles.com. We have the best BestInsoles.com Rebate anywhere. thesis_keywords: BestInsoles.com, BestInsoles.com Coupon Code, BestInsoles.com Discount, BestInsoles.com Rebate product_name: BestInsoles.com hop_url: http://www.icouponblog.com/hop.php?id=280 ---
Do you drop before you shop, from foot pain?  Whatever the cause of your foot and whatever problems it is creating for you, there is a solution. Don’t be afraid to walk, run and play anymore. Check out BestInsoles.com to alleviate your foot pain. BestInsoles.com will identify your pain spot and suggest the best footwear or insole for your foot which will help you overcome the pain.  Use our discount coupon to cut the best deal.
BestInsoles.com has insoles for all kinds of conditions and pains. If you suffer from Plantar Fasciitis, or have a flat foot BestInsoles.com has the perfect insole for you. It will give your feet much desired and needed comfort. Your pain will evaporate and you will feel fantastic. There is a product for every kind of foot ache from arch support to heel support just visit BestInsoles.com and pick one that suits you best. Use our cash back rebate coupon to save money on BestInsoles.com products. Your feet will say thank you and so will your wallet!
Visit BestInsoles.com for arch supports, cushioned insoles, sport insoles, industrial insoles and many foot products. If you spend long hours on your feet and your shoes don’t help, go to BestInsoles.com and find an insole just right for you.  Relieve foot pain, give your feet a rest from the pain, buy an insole at BestInsoles.com. Save money and your feet…Check BestInsoles.com today. You will find products from all brands at great prices. Use our discount coupon on BestInsoles.com now.


All you need to start using require.js in the browser.
A zip file containing a sample project that uses jQuery and RequireJS.
The r.js file allows you to run the optimizer as well as run modules in Node or Rhino.
If you are running in Node, and want to use npm to install this file via npm, see the Use with Node page for more information.
For information on its use, as well as how to get the JAR files to run it under Rhino, see the r.js README.
These are useful loader plugins that have the same license terms as require.js itself. Download the plugin file and place it as a sibling to your "data-main" main.js script.
Load text files and treat them as dependencies. Great for loading templates. The text strings can be inlined in an optimized build when the optimizer is used.
Wait for the DOM is ready. Useful for pausing execution of top level application logic until the DOM is ready for querying/modification.
Load files written in CoffeeScript. With this plugin, it is easy to code in CoffeeScript in the browser, it can participate in the optimizer optimizations, and it works in Node and Rhino via the RequireJS adapter. This is the best way to do cross-environment, modular CoffeeScript. The project home has more information on how to install and use it.
Load string bundles used in internationalization (i18n) that are made up of separate country/language/locale-specific bundles.
Quick release for a bug that slipped in the 2.1.3 release in the r.js optimizer. So even though require.js now has a 2.1.4 version, it is the same as 2.1.3, and the optimizer is the same as 2.1.3 except for this one fix:
Without this fix, in some cases 2.1.3 would insert "undefined" in some optimized CSS files, making them unusable.
Maintenance release. A change that may be noticeable:
require.toUrl() now correctly generates URLs for string values passed to it without an extension. Previous versions of toUrl() would append a ".js" extension automatically. If you relied on that behavior, when you update to 2.1.3, then you may need to do a code change to append the .js extension yourself:
require.toUrl('some/value') + '.js'
The text plugin has been updated to also work with this change, so if you want to generate non-extension paths for text resources, be sure to upgrade to to the 2.0.4 version of text.js.
Normal use of toUrl with a value that has an extension continues to work the same.
Full list of changes:
The big changes for this release are in the optimizer:
Full list of changes:
See the Upgrading to 2.1 page.
The main focus of this release was cleaning up some rough edges after switching to esprima for all module parsing. Most notably, findNestedDependencies should work correctly again. The bundled UglifyJS was updated to 1.3.3 too.
Complete list of fixes:
Probably the most notable changes:
Complete list of fixes:
Same as 2.0.3, but rolled back a change in r.js that caused a logging error.
Small bug fixes to:
Small bug fixes to:
Main purpose of the release is to fix a regression in 1.0.5 where the optimizer's "dir" config option was not applied correctly when passed on the command line.
The other notable change: the optimizer now supports onBuildRead and onBuildWrite functions that are called when JS modules are read or written for an optimized build layer. This allows doing some regexp work to modify their contents.
Small bug fixes to:
Small bug fixes to:
Small bug fixes to:
Small bug fixes to:
Small bug fixes to:
Just small bug fixes related to:
Detailed list of changes for require.js and the r.js optimizer:


Sets the current conflict resolution strategy.
(set-strategy <strategy>) <strategy> ::= depth | breadth | simplicity | complexity | lex | mea | random


Grammy: What Stefflon Don Said About Burna Boy’s Nomination
by Oyindamola Olubajo
Stefflon Don, a British cum Jamaican rapper and girlfriend of Nigerian afro-fusion star Burna Boy has reacted to his new feat of bagging Grammy 2020 award nomination.
Concise News reports that Burna Boy was nominated in the World Music category for his album ‘African Giant‘ which was released on Friday, July 26, featuring acts like YG, Darmian Marley, Jorja Smith, Manifest, Angelique Kidjo among others.
The announcement was made by the Recording Academy, popularly known as the Grammy Awards.
The World Music category has African music legend like Angelique Kidjo who is also a Grammy winner as a nominee.
Since the news broke on the internet, celebrities have taken turns to congratulate Burna Boy and Stefflon has also joined the league.
In a Twitter post Stefflon wrote “Issa Grammy for the boy!!!!!!!!! 🦍🙏🏽🏆😁 We claim it!!!!! ❤ #AfricanGiant”
Meanwhile, earlier this year, there were speculations that Burna Boy and Stefflon parted ways and the Nigerian star was dating actress, Princess Shyngle.
According to a report, Burna Boy and Shyngle were seen at an outlet in Lagos.
But later debunking the claims, the duo was spotted sharing a passionate kiss at a popular club in Lagos.
The video which became available to the public was shared on social media by the “Hurtin’ Me” crooner.


Github provides an RSS feed for your home page - scroll to the bottom and you'll find the link - but doesn't provide one for your actual notification. This app fills that gap by serving your notification feed as an ATOM feed.
To get your own feed, you need to first make a Personal Access Token with the notifications
scope. Then, your feed will be at
https://gh-notifeed.herokuapp.com/username/token/.atom
(replace username with your github username and token with the Personal Access Token you just generated)


When you work with us you are part of a team of committed collaboraters. All aspects of our software development process are integrated, interactive
and agile.
Our approach unifies design, development and product management to create exceptional products.
We start each project by understanding your business goals, the user's needs and the product requirments
Then we help translate them into effective and elegant solutions
Before e sign a contract or write a line of code our team will spaend the neccessary time needed to understand your product vision
The outcome of this scoping session a proposal or high-level statement of work.
based on your requirments, we can provide acomplete offering or just the you need.
Our design practice offers a full range of services including brand strategy, interaction and visual design and user experience testing.
Throughout your project, our designers create and implement visual design and workflows, solicit user feedback and work with you to make sure what gets built is what is needed.
DESIGN
All engineers are fluent in the latest enterprise, mobile and web development technologies.
They collaborate with your team to write, and improve code on a daily basis, using proven practices such as test-driven development and pair programming.
DEVELOPMENT
All engineers are fluent in the latest enterprise, mobile and web development technologies.
They collaborate with your team to write, and improve code on a daily basis, using proven practices such as test-driven development and pair programming.
PRODUCT MANAGEMENT


import random
from math import sqrt, floor, ceil
from copy import deepcopy
from .expression import Expression
[docs]class Solution:
"""
Solution Class
Parameters
----------
name : str
name of solution
variables : list of VarElement family
variables which has no duplicate
Examples
----------
Create a Solution which has Integer, Continuous and Binary Variables
>>> a = Variable(name='a', lowBound=0, upBound=1, cat='Integer')
>>> b = Variable(name='b', lowBound=1, upBound=2, cat='Continuous')
>>> c = Variable(name='c', cat='Binary')
>>> sol = Solution(name='abc', [a, b, c])
Four arithmetic operations are supported
between Solutions or between a Solution and a constant.
>>> sol1 = Solution(name='sol1', [a, b])
>>> sol2 = Solution(name='sol2', [a, c])
>>> sol_plus = sol1 + sol2 # (Solution + Solution or Solution + list)
>>> sol_minus = sol1 - sol2 # (Solution - Solution or Solution - list)
>>> sol_product = sol1 * 2 # (Solution * constant)
>>> sol_divide = sol1 / 2 # (Solution / constant)
"""
def __init__(self, name=None, variables=[]):
self.name = name
self.type = 'Solution'
self._variables = sorted(variables, key=lambda var: var.name)
[docs] def value(self):
"""
Returns
-------
list
values of the variables in the Solution
"""
values = [variable.value() for variable in self._variables]
return values
[docs] def getVariables(self):
"""
Returns
-------
list
Variable instances which belong to the Solution
"""
return self._variables
[docs] def clone(self):
"""
Returns
-------
Solution
Copy of the Solution (call by value)
"""
return +self
[docs] def copy(self, other):
"""
Copy the values of a Solution to itself (call by value)
"""
for vb, ovb in zip(self._variables, other._variables):
vb.setValue(ovb.value())
[docs] def setRandom(self):
"""
Set the solution values uniformly random
"""
for vb in self._variables:
vb.setRandom()
[docs] def feasible(self):
"""
Returns
-------
bool
Whether the solution is feasible or not
"""
return all(vb.feasible() for vb in self._variables)
[docs] def clip(self):
"""
Guarantee feasibility of the solution
"""
for vb in self._variables:
vb.clip()
[docs] def squaredNorm(self):
"""
Returns
-------
float
Squared 2-norm of the solution as a vector in Euclid space
"""
return sum(vb.value()*vb.value() for vb in self._variables)
[docs] def norm(self):
"""
Returns
-------
float
2-norm of the solution as a vector in Euclid space
"""
return sqrt(self.squaredNorm())
[docs] def dot(self, other):
"""
Returns
-------
float
Inner product between the Solution and another Solution
"""
inner = 0
for vb1, vb2 in zip(self._variables, other._variables):
inner += vb1.value()*vb2.value()
return inner
[docs] def floor(self):
"""
Returns
-------
Solution
Solution which has values applied floor function respectively
"""
vbs = deepcopy(self._variables)
for vb in vbs:
vb.setValue(floor(vb.value()))
return Solution(f'floor({self.name})', vbs)
[docs] def ceil(self):
"""
Returns
-------
Solution
Solution which has values applied ceiling function respectively
"""
vbs = deepcopy(self._variables)
for vb in vbs:
vb.setValue(ceil(vb.value()))
return Solution(f'ceil({self.name})', vbs)
def __pos__(self):
vbs = deepcopy(self._variables)
return Solution(f'+({self.name})', vbs)
def __neg__(self):
vbs = deepcopy(self._variables)
for vb in vbs:
vb.setValue(-vb.value())
return Solution(f'-({self.name})', vbs)
def __add__(self, other):
"""
Solution + Solution
Solution + list
Solutino + scalar
"""
vbs1 = deepcopy(self._variables)
if isinstance(other, Solution):
for vb1, vb2 in zip(vbs1, other._variables):
vb1.setValue(vb1.value() + vb2.value())
return Solution('+Solution', vbs1)
elif isinstance(other, list):
for vb, v in zip(vbs1, other):
vb.setValue(vb.value() + v)
return Solution('+list', vbs1)
elif isinstance(other, (int, float)):
for vb1 in vbs1:
vb1.setValue(vb1.value() + other)
return Solution('+scalar', vbs1)
else:
return NotImplemented
def __radd__(self, other):
return self + other
def __sub__(self, other):
"""
Solution - Solution = (Solution + (-Solution))
Solution - list = (Solution + (-list))
Solutino - scalar = (Solution + (-scalar))
"""
if isinstance(other, Solution):
return self + (-other)
elif isinstance(other, list):
minus_other = [-v for v in other]
return self + minus_other
elif isinstance(other, (int, float)):
return self + (-other)
else:
return NotImplemented
def __rsub__(self, other):
return - self + other
def __mul__(self, other):
"""
Solution * Solution (hadamard product)
Solution * list
Solution * scalar
"""
vbs1 = deepcopy(self._variables)
if isinstance(other, Solution):
for vb1, vb2 in zip(vbs1, other._variables):
vb1.setValue(vb1.value() * vb2.value())
return Solution('*Solution', vbs1)
elif isinstance(other, list):
for vb, v in zip(vbs1, other):
vb.setValue(vb.value() * v)
return Solution('*list', vbs1)
elif isinstance(other, (int, float)):
for vb1 in vbs1:
vb1.setValue(vb1.value() * other)
return Solution('*scalar', vbs1)
else:
return NotImplemented
def __rmul__(self, other):
return self * other
def __truediv__(self, other):
"""
Solution / list = Solution * (1/list)
Solution / scalar = Solution * (1/scalar)
"""
if isinstance(other, list):
reverse_list = [1/v for v in other]
return self * reverse_list
elif isinstance(other, (int, float)):
return self * (1 / other)
else:
return NotImplemented
def __abs__(self):
vbs = deepcopy(self._variables)
for vb in vbs:
vb.setValue(abs(vb.value()))
return Solution('abs', vbs)
def __hash__(self):
return hash((self.name, tuple(self._variables)))
def __len__(self):
return len(self._variables)
def __iter__(self):
return iter(self._variables)
def __getitem__(self, k):
return self._variables[k]
def __str__(self):
s = f'Name: {self.name}\n'
s += f' Type : {self.type}\n'
for vb in self:
s += f' {vb.__str__()}\n'
return s
def __repr__(self):
return f'Solution({self.name}, [{", ".join([vb.name for vb in self._variables])}])'


2. Use clojure/graphql/datomic query server
Date: 2017-11-21
Status
Accepted
Characteristics addressed
- Its user-access agnostic (it's not just a web app)
- It's cheap and fast to experiment with
- It expects to change
Context
The first thing we want to do is store and read whatever our domain needs. This domain will be changing frequently, so we want to minimise boilerplate that's connected to the domain structure, but we also want to avoid too much magic that will make partially or fully stepping away from this experiement difficult. Can we create something that allows us to specify our domain in clojure.spec and automatically convert that into Datomic and GraphQL schemas?
References
https://github.com/walmartlabs/lacinia https://github.com/metosin/spec-tools https://github.com/lab-79/dspec
Decision
Why, yes we can!
It was simple to create functions that turned spec into lacinia/datomic schema. It removes the chore of defining individual attibutes in three places. It remains to be seen whether it saves time overall or the productivity gain is limited to only simple cases.
We're happy introducing clojure.spec as a system of record as we can transpile to another format easily (as here with lacinia and datomic).
GraphQL is a welcome addition with a growing platform-agnostic (but primarily javascript focused) community that doesn't limit how we access the app.
Consequences
- Clojure, datomic and graphql have been adopted for this component
- Our domain is now currently specified in clojure.spec - it will need to remain there or be created from another format
- We're using the boot build tool because we can write functions to define build tasks
- boot-alt-test gave vastly improved test performance
Included but unassessed
- http-kit
- compojure/ring


A homeowners association (HOA) is an organization in a subdivision, that makes and enforces rules for the properties and their residents. As the name implies, the HOA is comprised of, and run by, the community's residents.
The Architectural Control Committee (ACC) was established to ensure our neighborhood restrictions are being followed to maximize our property values.


For being able to edit or view your data on the field, you need to first download the data and forms. To do so, please use the "Import" bouton presentend bellow and follow instructions then come back here.


We've updated the whole site to correctly size items and adjust for rarity and other unique attributes.
You can now easily identify Souvenir items and StatTrak items, great for viewing your inventory!
Your backpack is now automatically sorted by it's Value and then Rarity, showing it's Value in the top left and price is fetched on hover!
All you have to do is hover over an item to get it's current lowest price on the Steam Community Market! Just log into Steam on your browser with your details saved and cookies enabled.
A community moderated match comment section with input from experts and professional players.
We have a bounce out menu for you small screen users! Great if you're using a second monitor or laptop!


| Overview | Package | Struct | Tree | Index |
Structs Summary |
||
container of <type>
|
Abstract ordered container template. It declares an API, similar to API of regular list, which is implemented by specific containers. It inherits from base_struct, this means that it's not generatable, and can't have temporal struct members. |
|
deque of <type>
|
Implements deque by circular array based on regular list. The point of this container is that head modification operations like add0/push0/pop0 in O(1), while for regular list they are O(N) operations. The price is that most regular operations are a little more expensive, though asymptotically the same. |
|
deque_iterator of <type>
|
Iterator implementation for deque | |
iterator of <type>
|
Abstract iterator for containers. It declares iterator API implemented by iterators of specific containers. |
|
keyed_multi_set of <type>
|
Implements keyed_multi_set, based on regular list and keyed list of indices per key. Similar to regular "list (key:it) of will be implemented as keyed_multi_map.) The main difference is that in case that there are multiple equal key, behaviour is well defined: key operations return the last known index, and if the last is removed, previous known is found, and so on, in stack fasion. There is some significan memory overhead related to that, which can be minimized by enhancing the mechanism and plugging in a pool of klist_node. Some CPU overhead also exists, but asymptotically it's just as good as keyed list. |
|
keyed_multi_set_iterator of <type>
|
Iterator implementation for keyed_multi_set | |
keyed_set of <type>
|
Implements keyed_set, based on regular "list (key:it) of "list (key: that modify the contents, have checks to guarantee the consistency, first of all against inserting several equal keys. |
|
keyed_set_iterator of <type>
|
Iterator implementation for keyed_set | |
linked_list of <type>
|
Implement linked_list as a generic data structure. Good for O(1) changes of head, and using iterator - at any point. | |
linked_list_iterator of <type>
|
Iterator implementation for linked_list | |
vector of <type>
|
Effectively is a wrapper for regular list. Can be extended by user for build-in functionality. | |
vector_iterator of <type>
|
Iterator implementation for vector |
| Overview | Package | Struct | Tree | Index |


8 June 2005
On 8 June 2005, 8 new polio cases were confirmed in Indonesia, bringing the total number of cases to 28. All 8 new cases are from neighbouring districts as the index case (Lebak and Serang districts, in Banten province).


Register an item
Use the Register an Item dialog to register and whitelist items.
Registered items will be inspected for matches as part of your organizations policy. Whitelist items and text are not used for matching purposes and are a means of dealing with false negatives, and would typically include document templates and boilerplate text.
Whitelist items are specific to a particular collection and therefore only apply to items that are part of that collection. If you want to whitelist items across all collections, and have sufficient privileges, you can use Common Whitelisting. If you want to use this, note the Common Whitelisting best practice.
You can add single files, or multiple files as part of a zip from the Register an Item dialog. Items need to be added to a Collection. You can add a new collection as part of the registration process but unless you have a Compliance Officer role, you are only allowed to add to collections that you own.
If the Classification feature is enabled, you must supply a classification for registered items. If enabled, a drop down list of available classifications will be displayed.
Custom PropertiesThese are name and value pairs supplied at registration time that provide extra contextual information for each registered item. In addition, your organization's policy might make use of these properties in order to define different actions depending on the properties of the matching items. Custom properties have no special meaning to the IG Server; it simply stores them for each item and returns them in query results for matching items. For example, the properties might indicate a particular functional department, for example, Finance. You enter name and value pairs as free format text. |
Tell me about...
-
The maximum size of file or item I can register
Your IG Server allows very large files to be registered and in most cases you should not encounter problems. Files with word counts up to 2.5 million with an average word length of five characters can be supported. This equates to a file size of 15 million bytes.
How do I...
-
Register an item?
-
From the Home page, click Registry.
-
Click on the Item Manager tool bar.
The Register an item dialog is displayed.
- Select Registered item from the Item type drop down menu.
-
Click Choose File.
The File Explorer window is displayed.
- Select the file you want to register.
- Select the collection you want to add the file to from the Collection drop down menu. You can create a new collection to add the file to from this dialog.
- Optional. If your IG Server has been configured to force item classifications, select the item classification from the Classification drop down menu.
- Optional. Add item properties.
- Click Register.
-
-
Whitelist content?
-
Click Registry.
-
Click on the Item Manager tool bar.
The Register an item dialog is displayed.
-
Select Whitelisted item from the Item type drop down menu.
Optional, for users with sufficient privileges, select Common whitelisted item.
- Depending on what you want to whitelist, select either the Whitelist a file or Whitelist text button.
-
Depending on your selection in the previous step:
Whitelist a file:
Click Choose File and select the file you want to whitelist.
Whitelist text:
Enter text to be whitelisted the text box.
- Select the collection you want to add the file to from the Collection drop down menu. You can create a new collection to add the file to from this dialog.
- Click Register.
-


About this map
This sample demonstrates how to use data from DC Open Data together with Esri ArcGIS JavaScript API ClusterLayer.
Instructions
Zoom in and/or click clustering point to check ATM banking info.
Built with ...
dojo, ArcGIS JavaScript API
Download ATM Banking Data in GeoJSON
http://opendata.dc.gov/datasets/5555b90602a94d9c85d63ee62a860c6e_31.geojson
View ATM Banking Data on DC Open Data
http://opendata.dc.gov/datasets/5555b90602a94d9c85d63ee62a860c6e_31
DCGIS Master Address Repository Geocoder
http://maps2.dcgis.dc.gov/dcgis/rest/services/DCGIS_APPS/DCGIS_MAR/GeocodeServer
DC Open Data
http://opendata.dc.gov
Github Repository
https://github.in.dc.gov/OCTO/DCOpenDataSamples


@(
util: lib.Util,
user: Option[io.apibuilder.api.v0.models.User]
)
@doc.main(routes.DocController.playRoutesFile.url, user, Some("Why Choose API Builder?")) {
There are a few very different foundational reasons for which
teams choose API Builder as their tool of choice for API
Management. We know there are a number of different tools
available in the market; teams often use API Builder either as
their only API tool or as a complementary tool to their existing
solutions.
Here we've collected a list of the common reasons why teams adopt
API Builder.
- Very, very high quality generated clients: Teams that
use API Builder end up relying 100% on the generated clients -
ie. the developers STOP writing and managing their own client SDKs
freeing up time to focus on product improvements. In practice this
is only possible because developers love to use the clients from
API Builder. The reason this is possible is because API Builder
focuses end to end on only supporting features that ensure the
client SDKs themselves are high quality.
- Resource centric: API Builder is resource first -
instead of defining an operation explicitly, you define resources
and then expose operations on that resource. This is hugely
important for today's technology landscape given the rise of other
resource oriented tooling (e.g. graphQL) where having high quality
metadata on available resources is a huge help.
- Simple service specification: API Builder at its core
separates the notion of the input format (e.g. api.json, swagger,
avro) from the service description (service.json). This is a huge
advantage as regardless of input format, the service specification
can be fully expanded and complete. This separation enables API
Builder to easily accept new input formats AND makes it very easy
to fully parse a service (just download the service spec and use
directly). The service spec is verbose and complete - perfect for
machines. (If you are familiar with CQRS you will recognize that
pattern here.)
- Simple input format: The default api.json
format is simple for humans to write. It is JSON, but more than
that it is approachable by a novice and designed to be both simple
and easy. There is no need to understand $ref
or oneOf or other constructs which which new developers
often struggle. Instead, developers can look at existing examples
and very easily copy/modify for their new application.
- Great validation: When you upload a new version of an
API, extensive validation checks are run to ensure the internal
consistency of your API. These checks are among the most
comprehensive you can find anywhere - ensuring that all types,
names, etc are internally valid. The development of this
validation is one of the key steps to ensuring that ultimately the
generated clients themselves are very robust and simple - and it
starts by catching inconsistencies when the API specification is
defined.
- Integrated tooling: API Builder itself offers a
comprehensive REST API (the entire @util.fullUrl("/") website
runs on the API Builder API) which means it is simple to automate
any tasks as needed into your developer workflows. Teams have even
written linters that enforce naming standards and conventions in
the API itself, running as part of their suites of continuous
integration tests. Note also the
simple to use CLI -
many teams never actually even use the user interface of API
Builder on a daily basis given the completeness of the API and CLI
tooling.
- Easy to add code generators: Code generators in API Builder
are themselves REST services which accept a service description
(in JSON) and essentially return a string. Teams often write their
own code generators - even small disposable ones - to
systematically solve problems in an automated fashion.
- Testability of clients: With generated mock clients built
from the same interface definition, teams can rely on mocks when
building automated tests - and further use the provided mock
clients to override only the specific features needed for a given
test.
- Multiple input formats Teams are free to author their
specifications in multiple IDLs (swagger, avro, etc.), and it is
straightforward to introduce new input formats into API
Builder.
- First class support for union types: Union types - a
type that itself is constrained to be one of a known set of types
- are first class and simple to use in API Builder. This is a
powerful feature that enables developers to maintain simpler APIs
by empowering them, for example, to create new types
vs. continually adding optional fields to existing types.
- Discovery: Free hosting of all services at
@util.fullUrl("/"), including both private and public projects
makes service discovery easy within a company.
- Versioning: API Builder records every single change to
every API - presenting a list of safe and potentially breaking
changes. Teams often use these lists to include in their own
release notes. For example, here is the history of changes to
the API
Builder API itself.
}


--- layout: post title: win7,windows was unable to connect to this network问题 date: 2013-03-30 18:14:01.000000000 +00:00 type: post published: true status: publish categories: - "默认分类" tags: - win7 meta: views: '218' author: login: ig2net email<EMAIL_ADDRESS>display_name: "农夫一号" first_name: '' last_name: '' ---
换了个联通的无线网络环境，ipod和android都可以连上去，win7找得到网络，但是点击连接后，密码都没让输就报错:windows was unable to connect to this network.
这种问题可通过手动创建连接来解决:
打开网络与共享中心/添加一连接或网络/手动连接到无线网络，然后输入连接信息，成功。


{% extends "global/Base.html" %} {% load staticfiles otree_tags %} {% block title %} Results/ Earnings {% endblock %} {% block styles %} {% endblock %} {% block content %} {% if player.id_in_group == 1 %}
| Role A (You) | Role B | |
| Endowment | {{group.treatment_endowment }} | {{group.treatment_endowment}} |
| Income | {{player.task_reward}} | {{partner.task_reward}} |
| Money Transferred | +{{group.total_taken}} | -{{group.total_taken}} |
| Message Price | None | {{group.b_message_price}} |
| Total Earnings | {{player.final_reward}} | {{partner.final_reward}} |
| Role A | Role B (You) | |
| Endowment | {{group.treatment_endowment }} | {{group.treatment_endowment }} |
| Income | {{partner.task_reward}} | {{player.task_reward}} |
| Money Transferred | +{{group.total_taken}} | -{{group.total_taken}} |
| Message Price | None | {{group.b_message_price}} |
| Total Earnings | {{partner.final_reward}} | {{player.final_reward}} |
You are neither player A nor B.


Account
TODO
- Instructions
- AI
- Board
- Palacades
- Warriors
- Distribute Warriors(variations on number of players)
- Turns
- Number of players
- Factions
- Special Powers
- Reenforcements
- Peeking or not
- Gold setup
- Gold distribution
- Scoring at end of game
- Passing
- Dividing gold
- What is a territory
- Display/UI
- Resolving ties
- Chat
- Game history
- Resume saved game
- Disconnect
- AI take over
- Log game actions
- List games
- Private Games
- Invite url
- Auth Token
- Refactor Auth
Done
- Create Account
- Sign In
- Validate Email
- Password reset


--- layout: header title: Thank You for considering to support us :-) ---
We are a team of super dedicated volunteers who wish to collect a substantial amount to help migrant workers and other people suffering due to Corona. For every single write up/ post we get, the artist donates a small token amount which we collect and donate towards philanthropic initiatives for these people. Also, you are free to donate without.


Visualizing Models, Data, and Training with TensorBoard¶
In the 60 Minute Blitz,
we show you how to load in data,
feed it through a model we define as a subclass of nn.Module
,
train this model on training data, and test it on test data.
To see what’s happening, we print out some statistics as the model
is training to get a sense for whether training is progressing.
However, we can do much better than that: PyTorch integrates with
TensorBoard, a tool designed for visualizing the results of neural
network training runs. This tutorial illustrates some of its
functionality, using the
Fashion-MNIST dataset
which can be read into PyTorch using torchvision.datasets.
In this tutorial, we’ll learn how to:
Read in data and with appropriate transforms (nearly identical to the prior tutorial).
Set up TensorBoard.
Write to TensorBoard.
Inspect a model architecture using TensorBoard.
Use TensorBoard to create interactive versions of the visualizations we created in last tutorial, with less code
Specifically, on point #5, we’ll see:
A couple of ways to inspect our training data
How to track our model’s performance as it trains
How to assess our model’s performance once it is trained.
We’ll begin with similar boilerplate code as in the CIFAR-10 tutorial:
# imports
import matplotlib.pyplot as plt
import numpy as np
import torch
import torchvision
import torchvision.transforms as transforms
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
# transforms
transform = transforms.Compose(
[transforms.ToTensor(),
transforms.Normalize((0.5,), (0.5,))])
# datasets
trainset = torchvision.datasets.FashionMNIST('./data',
download=True,
train=True,
transform=transform)
testset = torchvision.datasets.FashionMNIST('./data',
download=True,
train=False,
transform=transform)
# dataloaders
trainloader = torch.utils.data.DataLoader(trainset, batch_size=4,
shuffle=True, num_workers=2)
testloader = torch.utils.data.DataLoader(testset, batch_size=4,
shuffle=False, num_workers=2)
# constant for classes
classes = ('T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle Boot')
# helper function to show an image
# (used in the `plot_classes_preds` function below)
def matplotlib_imshow(img, one_channel=False):
if one_channel:
img = img.mean(dim=0)
img = img / 2 + 0.5 # unnormalize
npimg = img.numpy()
if one_channel:
plt.imshow(npimg, cmap="Greys")
else:
plt.imshow(np.transpose(npimg, (1, 2, 0)))
We’ll define a similar model architecture from that tutorial, making only minor modifications to account for the fact that the images are now one channel instead of three and 28x28 instead of 32x32:
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(1, 6, 5)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv2d(6, 16, 5)
self.fc1 = nn.Linear(16 * 4 * 4, 120)
self.fc2 = nn.Linear(120, 84)
self.fc3 = nn.Linear(84, 10)
def forward(self, x):
x = self.pool(F.relu(self.conv1(x)))
x = self.pool(F.relu(self.conv2(x)))
x = x.view(-1, 16 * 4 * 4)
x = F.relu(self.fc1(x))
x = F.relu(self.fc2(x))
x = self.fc3(x)
return x
net = Net()
We’ll define the same optimizer
and criterion
from before:
criterion = nn.CrossEntropyLoss()
optimizer = optim.SGD(net.parameters(), lr=0.001, momentum=0.9)
1. TensorBoard setup¶
Now we’ll set up TensorBoard, importing tensorboard
from torch.utils
and defining a
SummaryWriter
, our key object for writing information to TensorBoard.
from torch.utils.tensorboard import SummaryWriter
# default `log_dir` is "runs" - we'll be more specific here
writer = SummaryWriter('runs/fashion_mnist_experiment_1')
Note that this line alone creates a runs/fashion_mnist_experiment_1
folder.
2. Writing to TensorBoard¶
Now let’s write an image to our TensorBoard - specifically, a grid - using make_grid.
# get some random training images
dataiter = iter(trainloader)
images, labels = dataiter.next()
# create grid of images
img_grid = torchvision.utils.make_grid(images)
# show images
matplotlib_imshow(img_grid, one_channel=True)
# write to tensorboard
writer.add_image('four_fashion_mnist_images', img_grid)
Now running
tensorboard --logdir=runs
from the command line and then navigating to https://localhost:6006 should show the following.
Now you know how to use TensorBoard! This example, however, could be done in a Jupyter Notebook - where TensorBoard really excels is in creating interactive visualizations. We’ll cover one of those next, and several more by the end of the tutorial.
3. Inspect the model using TensorBoard¶
One of TensorBoard’s strengths is its ability to visualize complex model structures. Let’s visualize the model we built.
writer.add_graph(net, images)
writer.close()
Now upon refreshing TensorBoard you should see a “Graphs” tab that looks like this:
Go ahead and double click on “Net” to see it expand, seeing a detailed view of the individual operations that make up the model.
TensorBoard has a very handy feature for visualizing high dimensional data such as image data in a lower dimensional space; we’ll cover this next.
4. Adding a “Projector” to TensorBoard¶
We can visualize the lower dimensional representation of higher dimensional data via the add_embedding method
# helper function
def select_n_random(data, labels, n=100):
'''
Selects n random datapoints and their corresponding labels from a dataset
'''
assert len(data) == len(labels)
perm = torch.randperm(len(data))
return data[perm][:n], labels[perm][:n]
# select random images and their target indices
images, labels = select_n_random(trainset.data, trainset.targets)
# get the class labels for each image
class_labels = [classes[lab] for lab in labels]
# log embeddings
features = images.view(-1, 28 * 28)
writer.add_embedding(features,
metadata=class_labels,
label_img=images.unsqueeze(1))
writer.close()
Now in the “Projector” tab of TensorBoard, you can see these 100 images - each of which is 784 dimensional - projected down into three dimensional space. Furthermore, this is interactive: you can click and drag to rotate the three dimensional projection. Finally, a couple of tips to make the visualization easier to see: select “color: label” on the top left, as well as enabling “night mode”, which will make the images easier to see since their background is white:
Now we’ve thoroughly inspected our data, let’s show how TensorBoard can make tracking model training and evaluation clearer, starting with training.
5. Tracking model training with TensorBoard¶
In the previous example, we simply printed the model’s running loss
every 2000 iterations. Now, we’ll instead log the running loss to
TensorBoard, along with a view into the predictions the model is
making via the plot_classes_preds
function.
# helper functions
def images_to_probs(net, images):
'''
Generates predictions and corresponding probabilities from a trained
network and a list of images
'''
output = net(images)
# convert output probabilities to predicted class
_, preds_tensor = torch.max(output, 1)
preds = np.squeeze(preds_tensor.numpy())
return preds, [F.softmax(el, dim=0)[i].item() for i, el in zip(preds, output)]
def plot_classes_preds(net, images, labels):
'''
Generates matplotlib Figure using a trained network, along with images
and labels from a batch, that shows the network's top prediction along
with its probability, alongside the actual label, coloring this
information based on whether the prediction was correct or not.
Uses the "images_to_probs" function.
'''
preds, probs = images_to_probs(net, images)
# plot the images in the batch, along with predicted and true labels
fig = plt.figure(figsize=(12, 48))
for idx in np.arange(4):
ax = fig.add_subplot(1, 4, idx+1, xticks=[], yticks=[])
matplotlib_imshow(images[idx], one_channel=True)
ax.set_title("{0}, {1:.1f}%\n(label: {2})".format(
classes[preds[idx]],
probs[idx] * 100.0,
classes[labels[idx]]),
color=("green" if preds[idx]==labels[idx].item() else "red"))
return fig
Finally, let’s train the model using the same model training code from the prior tutorial, but writing results to TensorBoard every 1000 batches instead of printing to console; this is done using the add_scalar function.
In addition, as we train, we’ll generate an image showing the model’s predictions vs. the actual results on the four images included in that batch.
running_loss = 0.0
for epoch in range(1): # loop over the dataset multiple times
for i, data in enumerate(trainloader, 0):
# get the inputs; data is a list of [inputs, labels]
inputs, labels = data
# zero the parameter gradients
optimizer.zero_grad()
# forward + backward + optimize
outputs = net(inputs)
loss = criterion(outputs, labels)
loss.backward()
optimizer.step()
running_loss += loss.item()
if i % 1000 == 999: # every 1000 mini-batches...
# ...log the running loss
writer.add_scalar('training loss',
running_loss / 1000,
epoch * len(trainloader) + i)
# ...log a Matplotlib Figure showing the model's predictions on a
# random mini-batch
writer.add_figure('predictions vs. actuals',
plot_classes_preds(net, inputs, labels),
global_step=epoch * len(trainloader) + i)
running_loss = 0.0
print('Finished Training')
You can now look at the scalars tab to see the running loss plotted over the 15,000 iterations of training:
In addition, we can look at the predictions the model made on arbitrary batches throughout learning. See the “Images” tab and scroll down under the “predictions vs. actuals” visualization to see this; this shows us that, for example, after just 3000 training iterations, the model was already able to distinguish between visually distinct classes such as shirts, sneakers, and coats, though it isn’t as confident as it becomes later on in training:
In the prior tutorial, we looked at per-class accuracy once the model had been trained; here, we’ll use TensorBoard to plot precision-recall curves (good explanation here) for each class.
6. Assessing trained models with TensorBoard¶
# 1. gets the probability predictions in a test_size x num_classes Tensor
# 2. gets the preds in a test_size Tensor
# takes ~10 seconds to run
class_probs = []
class_preds = []
with torch.no_grad():
for data in testloader:
images, labels = data
output = net(images)
class_probs_batch = [F.softmax(el, dim=0) for el in output]
_, class_preds_batch = torch.max(output, 1)
class_probs.append(class_probs_batch)
class_preds.append(class_preds_batch)
test_probs = torch.cat([torch.stack(batch) for batch in class_probs])
test_preds = torch.cat(class_preds)
# helper function
def add_pr_curve_tensorboard(class_index, test_probs, test_preds, global_step=0):
'''
Takes in a "class_index" from 0 to 9 and plots the corresponding
precision-recall curve
'''
tensorboard_preds = test_preds == class_index
tensorboard_probs = test_probs[:, class_index]
writer.add_pr_curve(classes[class_index],
tensorboard_preds,
tensorboard_probs,
global_step=global_step)
writer.close()
# plot all the pr curves
for i in range(len(classes)):
add_pr_curve_tensorboard(i, test_probs, test_preds)
You will now see a “PR Curves” tab that contains the precision-recall curves for each class. Go ahead and poke around; you’ll see that on some classes the model has nearly 100% “area under the curve”, whereas on others this area is lower:
And that’s an intro to TensorBoard and PyTorch’s integration with it. Of course, you could do everything TensorBoard does in your Jupyter Notebook, but with TensorBoard, you gets visuals that are interactive by default.


CF conventions¶
The CF (Climate and Forecast) metadata conventions (http://cfconventions.org) provide a description of the physical meaning of data and of their spatial and temporal properties and are designed to promote the creation, processing, and sharing of climate and forecasting data using netCDF files and libraries (https://www.unidata.ucar.edu/software/netcdf).
CF data model¶
The CF data model [1] identifies the fundamental elements (“constructs”) of CF and shows how they relate to each other, independently of the netCDF encoding.
The field construct defined by the CF data model, which corresponds to a CF-netCDF data variable with all of its metadata, is the central construct that includes all of the other constructs. It consists of
- descriptive properties that apply to field construct as a whole (e.g. the standard name),
- a data array, and
- “metadata constructs” that describe
- the locations of each cell of the data array (i.e. the “domain”), and
- the physical nature of each cell’s datum.
The domain is defined by
- domain axis constructs (corresponding to CF-netCDF dimensions or scalar coordinate variables),
- dimension coordinate constructs (corresponding to CF-netCDF coordinate variables or numeric scalar coordinate variables),
- auxiliary coordinate constructs (corresponding to CF-netCDF auxiliary coordinate variables and non-numeric scalar coordinate variables),
- coordinate reference constructs (corresponding to CF-netCDF grid mapping variables or the formula_terms attribute of a coordinate variable),
- domain ancillary constructs (corresponding to CF-netCDF variables named by the formula_terms attribute of a coordinate variable), and
- cell measure constructs (corresponding to CF-netCDF cell measure variables).
The physical nature of individual data values are described by
- field ancillary constructs (corresponding to CF-netCDF ancillary variables), and
- cell method constructs (corresponding to a CF-netCDF cell_methods attribute of data variable).
A complete description of the CF data model, including UML diagrams, is available to download at https://doi.org/10.5194/gmd-10-4619-2017 [1].
| [1] | (1, 2) Hassell, D., Gregory, J., Blower, J., Lawrence, B. N., and Taylor, K. E.: A data model of the Climate and Forecast metadata conventions (CF-1.6) with a software implementation (cf-python v2.1), Geosci. Model Dev., 10, 4619-4646, https://doi.org/10.5194/gmd-10-4619-2017, 2017. |


Ryan Louie, Robotics and Software Engineer studying at Olin College in Boston, USA.
Boston, USA http://youralien.github.io


GRA 112 sound.c _TW.GRA = 0x100; GRA 134 sound.c _TW.GRA = val; GRA 324 sound.c if (_TW.GRA >= 0x100) GRA 326 sound.c tcnt = (_TW.GRC < _TW.GRA) ? _TW.GRC: _TW.GRA;


Notice
- 1. This is a VIT themed series for you with questions and puzzles.
- 2. You need to login to your portal and complete the tasks.
- 3. At the end of all tasks, there's a special farewell present
for each of you.
- 4. In question based tasks, in case you aren't able to
solve any answer, we will help you out.
- 5. You will be asked simple questions which'll remind you how
we met, our journey and how we became close.
Puzzle for Deepak
Are you ready?
Puzzle for Sanchi
Are you ready?
Puzzle for Hardik
Are you ready?


--- layout: post title: NYX Mosaic Powder tags: - NYX status: publish type: post published: true meta: _edit_last: '2' wp_plus_one_redirect: '' _graphene_slider_img: global _graphene_slider_imgurl: '' _graphene_show_addthis: global _graphene_post_date_display: global wp_plus_one_disabled: '1' _aioseop_keywords: NYX Mosaic Powder review, NYX Mosaic Powder rosey review _aioseop_title: NYX Mosaic Powder _yoast_wpseo_linkdex: '0' _thumbnail_id: '3051' _yoast_wpseo_focuskw: '' _yoast_wpseo_title: '' _yoast_wpseo_metadesc: '' _yoast_wpseo_metakeywords: '' _yoast_wpseo_meta-robots-noindex: '0' _yoast_wpseo_meta-robots-nofollow: '0' _yoast_wpseo_meta-robots-adv: none _yoast_wpseo_sitemap-include: ! '-' _yoast_wpseo_sitemap-prio: ! '-' _yoast_wpseo_canonical: '' _yoast_wpseo_redirect: '' --- NYX Mosaic powder Rosey is one beautiful piece, that I just cant stop admiring. I received it in a giveaway from our very sweet Anamika :) Price: Rs.800 around in India, else 8$
Its a concoction of five Rose shades,
They give a nice real natural flush to me, and I am kinda hooked to it,
Nicely pigmented, and stay on an average for 3-4 hours.
All the colors are really soft, and absolutely no fallout,
The center shade has a golden shimmer, but nothing bold,
These are everyday pink & Rosey shades,
Would love to collect more shades from this,
Indian price is quite steep as compared to international website :(
Would totally recommend this, its nice to have 5 shades, good staying power and almost no fallout.
Have you tried NYX Mosaic Powder yet ?


{{directReport.mail}} - {{directReport.officeLocation}}
| File/Folder | Created By | Modified By |
|
{{child.name}}
{{child.folder.childCount}} items
Sharing Link: {{child.sharingLink.webUrl}} ({{child.sharingLink.type}})
|
|
|
{{person.mail}} - {{person.officeLocation}}


Mischief. Mayhem. Soap.
For passion. For honor. For destiny. For victory. For love.
Smart and sexy.
Seven deadly sins.


copy# This should be included #and this as well snippets { # this snip is a snap snip = "snap" }
# This should be included #and this as well snippets { # this snip is a snap snip = "snap" }
copy# this snip is a snap snip = "snap"
# this snip is a snap snip = "snap"


First of All Welcome to the Wild Animals Website! Wild animals are a fascinating and joy-inspiring part of our world. We can learn so much by studying them and learning more about the habitats, food webs, and social communities to which they belong. Did you know that many different kinds of scientists study animals -- to learn more about the human world? It's true!          Ecologists learn about human kind's place in the fragile web of life by studying the needs and health of the animals (and plants) that share our planet. Meanwhile, psychologists and anthropologists learn about human evolution, social bonding, reproductive drives and much more by studying the habits and anatomy of non-human, animal relatives (both distant and near). Even medical doctors learn from animals by studying their venoms, bacteria, self-healing abilities and so on in an effort to unlock new ways to heal the human body.
         But as the great naturalist John Muir taught us, animals -- and in fact all of our natural world -- offer another kind of benefit as well. And that is that quiet time spent out in nature, observing wildlife, has the power to uplift the human spirit. The beauty, courage, and tenderness of animals touches us.
         And outdoors, surrounded by the wonder of nature, a sense of quite joy, of wonder, wells up inside us. For a moment, we simply ARE. Perhaps we even notice that our human mind, with all it's busy thoughts, is not the only important force in the world. Life itself, flowing from a power greater than ourselves, is at work all around us.
         Visit a wildlife preserve. Play with your pet. Observe the animals that live in the zoo. Observe with your heart as well as your mind. See what you find out. |


| mass_search.index | |
| queryByMass | |
| verify_cas_number | verify that the given cas registry number is correct or not |
| parseLipidName | |
| annotationStream | Construct a basic metabolite annotation data collection |
| annotationStream.compounds | Construct a basic metabolite annotation data collection |
| precursorIon | parse the precursor type calculator |
| ms1_handler | a generic function for handle ms1 search |
| ms1_search | get duplictaed raw annotation results. |
| searchMz | Found the best matched mz value with the target |
| getMetadata | get metabolite annotation metadata by a set of given unique reference id |
| excludeFeatures | removes all of the annotation result which is not |
| has.metal_ion | Check the formula string has metal ion inside? |
| uniqueFeatures | unique of the peak annotation features |
| cbind.metainfo | |
| load_asQueryHits |


libName = 'OriDomi'
Copyright 2014, MIT License
libName = 'OriDomi'
This variable is set to true and negated later if the browser does not support OriDomi.
isSupported = true
Used for informing the developer which required feature the browser lacks.
supportWarning = (prop) ->
console?.warn "#{ libName }: Missing support for `#{ prop }`."
isSupported = false
Checks for the presence of CSS properties on a test element.
testProp = (prop) ->
Loop through the vendor prefix list and return a match is found.
for prefix in prefixList
return full if (full = prefix + capitalize prop) of testEl.style
If the unprefixed property is present, return it.
return prop if prop of testEl.style
If no matches are found, return false to denote that the browser is missing this property.
false
Generates CSS text based on a selector string and a map of styling rules.
addStyle = (selector, rules) ->
style = ".#{ selector }{"
for prop, val of rules
If the CSS property is among special properties defined later, prefix it.
if prop of css
prop = css[prop]
prop = '-' + prop if prop.match /^(webkit|moz|ms)/i
Convert camel case to hyphenated.
style += "#{ prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase() }:#{ val };"
styleBuffer += style + '}'
Defines gradient directions based on a given anchor.
getGradient = (anchor) ->
"#{ css.gradientProp }(#{ anchor }, rgba(0, 0, 0, .5) 0%, rgba(255, 255, 255, .35) 100%)"
Used mainly when creating camel cased strings.
capitalize = (s) ->
s[0].toUpperCase() + s[1...]
Create an element and look up the canonical class name.
createEl = (className) ->
el = document.createElement 'div'
el.className = elClasses[className]
el
Clone an element, add an additional class, and return it.
cloneEl = (parent, deep, className) ->
el = parent.cloneNode deep
el.classList.add elClasses[className]
el
GPU efficient ways of hiding and showing elements:
hideEl = (el) ->
el.style[css.transform] = 'translate3d(-99999px, 0, 0)'
showEl = (el) ->
el.style[css.transform] = 'translate3d(0, 0, 0)'
This decorator is used on public effect methods to invoke preliminary tasks before the effect is applied.
prep = (fn) ->
->
If the method has been initiated by a touch handler, skip this process.
if @_touchStarted
fn.apply @, arguments
else
[a0, a1, a2] = arguments
opt = {}
angle = anchor = null
This switch is used to derive the intended order of arguments. This keeps argument requirements flexible, allowing most to be left out. By putting this logic in a decorator, it doesn’t have to exist in any of the individual methods.
Methods are inferred by their arity.
switch fn.length
when 1
opt.callback = a0
when 2
if typeof a0 is 'function'
opt.callback = a0
else
anchor = a0
opt.callback = a1
when 3
angle = a0
if arguments.length is 2
if typeof a1 is 'object'
opt = a1
else if typeof a1 is 'function'
opt.callback = a1
else
anchor = a1
else if arguments.length is 3
anchor = a1
if typeof a2 is 'object'
opt = a2
else if typeof a2 is 'function'
opt.callback = a2
angle ?= @_lastOp.angle or 0
anchor or= @_lastOp.anchor
Here we add the called function and its normalized arguments to the instance’s queue.
@_queue.push [fn, @_normalizeAngle(angle), @_getLonghandAnchor(anchor), opt]
_step()
manages the queue and decides whether the action will occur now
or be deferred.
@_step()
This decorator also returns the instance so effect methods are chainable.
@
It’s necessary to defer many DOM manipulations to a subsequent event loop tick.
defer = (fn) ->
setTimeout fn, 0
Empty function to be used as placeholder for callback defaults (instead of creating separate empty functions).
noOp = ->
Set a reference to jQuery (or another $
-aliased DOM library).
If it doesn’t exist, set to null so OriDomi knows we are working without jQuery.
OriDomi doesn’t require it to work, but offers a useful plugin bridge if present.
$ = if window?.$?.data then window.$ else null
List of anchors and their corresponding axis pairs.
anchorList = ['left', 'right', 'top', 'bottom']
anchorListV = anchorList[..1]
anchorListH = anchorList[2..]
Create a div for testing CSS3 properties.
testEl = document.createElement 'div'
The style buffer is later populated with CSS rules and appended to the document.
styleBuffer = ''
List of browser prefixes for testing CSS3 properties.
prefixList = ['Webkit', 'Moz', 'ms']
baseName = libName.toLowerCase()
CSS classes used by style rules.
elClasses =
active: 'active'
clone: 'clone'
holder: 'holder'
stage: 'stage'
stageLeft: 'stage-left'
stageRight: 'stage-right'
stageTop: 'stage-top'
stageBottom: 'stage-bottom'
content: 'content'
mask: 'mask'
maskH: 'mask-h'
maskV: 'mask-v'
panel: 'panel'
panelH: 'panel-h'
panelV: 'panel-v'
shader: 'shader'
shaderLeft: 'shader-left'
shaderRight: 'shader-right'
shaderTop: 'shader-top'
shaderBottom: 'shader-bottom'
Each class is namespaced to prevent styling collisions.
elClasses[k] = "#{ baseName }-#{ v }" for k, v of elClasses
Map of the CSS3 properties needed to support OriDomi, with shorthand names as keys. The keys and values are initialized as identical pairs to start with and prefixed subsequently when necessary.
css = new ->
@[key] = key for key in [
'transform'
'transformOrigin'
'transformStyle'
'transitionProperty'
'transitionDuration'
'transitionDelay'
'transitionTimingFunction'
'perspective'
'perspectiveOrigin'
'backfaceVisibility'
'boxSizing'
'mask'
]
@
This section is wrapped in a function call so that it can exit early when discovering a lack of browser support to prevent unnecessary work.
do ->
Loop through the CSS map and replace each value with the result of testProp()
.
for key, value of css
css[key] = testProp value
If the returned value is false, warn the user that the browser doesn’t support
OriDomi, set isSupported
to false, and break out of the loop.
return supportWarning value unless css[key]
Test for preserve-3d
as a transform style. This is particularly important
since it’s necessary for nested 3D transforms and recent versions of IE that
support 3D transforms lack it.
p3d = 'preserve-3d'
testEl.style[css.transformStyle] = p3d
Failure is indicated when querying the style lacks the correct string.
unless testEl.style[css.transformStyle] is p3d
return supportWarning p3d
CSS3 linear gradients are used for shading. Testing for them is different because they are prefixed values, not properties. This invokes an anonymous function to loop through vendor-prefixed linear gradients.
css.gradientProp = do ->
for prefix in prefixList
hyphenated = "-#{ prefix.toLowerCase() }-linear-gradient"
testEl.style.backgroundImage = "#{ hyphenated }(left, #000, #fff)"
After setting a gradient background on the test div, attempt to retrieve it.
return hyphenated unless testEl.style.backgroundImage.indexOf('gradient') is -1
If none of the hyphenated values worked, return the unprefixed version.
'linear-gradient'
The default cursor style is set to grab
to prompt the user to interact with the element.
grab
as a value isn’t supported in all browsers so it has to be detected.
[css.grab, css.grabbing] = do ->
for prefix in prefixList
plainGrab = 'grab'
testEl.style.cursor = (grabValue = "-#{ prefix.toLowerCase() }-#{ plainGrab }")
If the cursor was set correctly, return the prefixed pair.
return [grabValue, "-#{ prefix.toLowerCase() }-grabbing"] if testEl.style.cursor is grabValue
Otherwise try the unprefixed version.
testEl.style.cursor = plainGrab
if testEl.style.cursor is plainGrab
[plainGrab, 'grabbing']
else
Fallback to move
.
['move', 'move']
Like gradients, transform (as a transition value) needs to be detected and prefixed.
css.transformProp =
Use a regular expression to pluck the prefix testProp
found.
if prefix = css.transform.match /(\w+)Transform/i
"-#{ prefix[1].toLowerCase() }-transform"
else
'transform'
Set a transitionEnd
property based on the browser’s prefix for transitionProperty
.
css.transitionEnd =
switch css.transitionProperty.toLowerCase()
when 'transitionproperty' then 'transitionEnd'
when 'webkittransitionproperty' then 'webkitTransitionEnd'
when 'moztransitionproperty' then 'transitionend'
when 'mstransitionproperty' then 'msTransitionEnd'
These calls generate OriDomi’s stylesheet.
do (i = (s) -> s + ' !important') ->
addStyle elClasses.active,
backgroundColor: i 'transparent'
backgroundImage: i 'none'
boxSizing: i 'border-box'
border: i 'none'
outline: i 'none'
padding: i '0'
transformStyle: i p3d
mask: i 'none'
position: 'relative'
addStyle elClasses.clone,
margin: i '0'
boxSizing: i 'border-box'
overflow: i 'hidden'
display: i 'block'
addStyle elClasses.holder,
width: '100%'
position: 'absolute'
top: '0'
bottom: '0'
transformStyle: p3d
addStyle elClasses.stage,
width: '100%'
height: '100%'
position: 'absolute'
transform: 'translate3d(-9999px, 0, 0)'
margin: '0'
padding: '0'
transformStyle: p3d
Each anchor needs a particular perspective origin.
for k, v of {Left: '0% 50%', Right: '100% 50%', Top: '50% 0%', Bottom: '50% 100%'}
addStyle elClasses['stage' + k], perspectiveOrigin: v
addStyle elClasses.shader,
width: '100%'
height: '100%'
position: 'absolute'
opacity: '0'
top: '0'
left: '0'
pointerEvents: 'none'
transitionProperty: 'opacity'
Linear gradient directions depend on their anchor.
for anchor in anchorList
addStyle elClasses['shader' + capitalize anchor], background: getGradient anchor
addStyle elClasses.content,
margin: i '0'
position: i 'relative'
float: i 'none'
boxSizing: i 'border-box'
overflow: i 'hidden'
addStyle elClasses.mask,
width: '100%'
height: '100%'
position: 'absolute'
overflow: 'hidden'
transform: 'translate3d(0, 0, 0)'
outline: '1px solid transparent'
addStyle elClasses.panel,
width: '100%'
height: '100%'
padding: '0'
position: 'absolute'
transitionProperty: css.transformProp
transformOrigin: 'left'
transformStyle: p3d
addStyle elClasses.panelH, transformOrigin: 'top'
addStyle "#{ elClasses.stageRight } .#{ elClasses.panel }", transformOrigin: 'right'
addStyle "#{ elClasses.stageBottom } .#{ elClasses.panel }", transformOrigin: 'bottom'
styleEl = document.createElement 'style'
styleEl.type = 'text/css'
Once the style buffer is ready, it’s appended to the document as a stylesheet.
if styleEl.styleSheet
styleEl.styleSheet.cssText = styleBuffer
else
styleEl.appendChild document.createTextNode styleBuffer
document.head.appendChild styleEl
These defaults are used by all OriDomi instances unless overridden.
defaults =
The number of vertical panels (for folding left or right).
You can use either an integer, or an array of percentages if you want custom
panel widths, e.g. [20, 10, 10, 20, 10, 20, 10]
.
The numbers must add up to 100 (or near it, so you can use values like
[33, 33, 33]
).
vPanels: 3
The number of horizontal panels (for folding top or bottom) or an array of percentages.
hPanels: 3
The determines the distance in pixels (z axis) of the camera/viewer to the paper. The smaller the value, the more distorted and exaggerated the effects will appear.
perspective: 1000
The default shading style is hard, which shows distinct creases in the paper.
Other options include 'soft'
— for a smoother, more rounded look — or false
to disable shading altogether for a flat look.
shading: 'hard'
Determines the duration of all animations in milliseconds.
speed: 700
Configurable maximum angle for effects. With most effects, exceeding 90/-90 usually makes the element wrap around and pass through itself leading to some glitchy visuals.
maxAngle: 90
Ripple mode causes effects to fold in a staggered, cascading manner.
1
indicates a forward cascade, 2
is backwards. It is disabled by default.
ripple: 0
This CSS class is applied to OriDomi elements so they can be easily targeted later.
oriDomiClass: libName.toLowerCase()
This is a multiplier that determines the darkness of shading. If you need subtler shading, set this to a value below 1.
shadingIntensity: 1
This option allows you to supply the name of a CSS easing method or a cubic bezier formula for customized animation easing.
easingMethod: ''
Number of pixels to offset each panel to prevent small gaps from appearing between them. This is configurable if you have a need for precision.
gapNudge: 1.5
Allows the user to fold the element via touch or mouse.
touchEnabled: true
Coefficient of touch/drag action’s distance delta. Higher numbers cause more movement.
touchSensitivity: .25
Custom callbacks for touch/drag events. Each one is invoked with a relevant value so they can be used to manipulate objects outside of the OriDomi instance (e.g. sliding panels). x values are returned when folding left and right, y values for top and bottom. The second argument passed is the original touch or mouse event. These are empty functions by default. Invoked with starting coordinate as first argument.
touchStartCallback: noOp
Invoked with the folded angle.
touchMoveCallback: noOp
Invoked with ending point.
touchEndCallback: noOp
class OriDomi
constructor: (@el, options = {}) ->
return unless isSupported
Fix constructor calls made without new
.
return new OriDomi @el, options unless @ instanceof OriDomi
Support selector strings as well as elements.
@el = document.querySelector @el if typeof @el is 'string'
Make sure element is valid.
unless @el and @el.nodeType is 1
console?.warn "#{ libName }: First argument must be a DOM element"
return
Fill in passed options with defaults.
@_config = new ->
for k, v of defaults
if k of options
@[k] = options[k]
else
@[k] = v
@
The ripple setting is converted to a number to allow boolean settings.
@_config.ripple = Number @_config.ripple
The queue holds animation sequences.
@_queue = []
@_panels = {}
@_stages = {}
Set the starting anchor to left.
@_lastOp = anchor: anchorList[0]
@_shading = @_config.shading
Alias shading: true
as hard shading.
@_shading = 'hard' if @_shading is true
The shader elements are constructed in a conditional so the process can be skipped if shading is disabled.
if @_shading
@_shaders = {}
shaderProtos = {}
shaderProto = createEl 'shader'
shaderProto.style[css.transitionDuration] = @_config.speed + 'ms'
shaderProto.style[css.transitionTimingFunction] = @_config.easingMethod
stageProto = createEl 'stage'
stageProto.style[css.perspective] = @_config.perspective + 'px'
for anchor in anchorList
Each anchor has a unique set of panels.
@_panels[anchor] = []
@_stages[anchor] = cloneEl stageProto, false, 'stage' + capitalize anchor
if @_shading
@_shaders[anchor] = {}
if anchor in anchorListV
@_shaders[anchor][side] = [] for side in anchorListV
else
@_shaders[anchor][side] = [] for side in anchorListH
shaderProtos[anchor] = cloneEl shaderProto, false, 'shader' + capitalize anchor
contentHolder = cloneEl @el, true, 'content'
maskProto = createEl 'mask'
maskProto.appendChild contentHolder
panelProto = createEl 'panel'
panelProto.style[css.transitionDuration] = @_config.speed + 'ms'
panelProto.style[css.transitionTimingFunction] = @_config.easingMethod
These arrays store panel offsets so they don’t have to be computed twice for each axis.
offsets = left: [], top: []
This loop builds all of the panels.
for axis in ['x', 'y']
if axis is 'x'
anchorSet = anchorListV
metric = 'width'
classSuffix = 'V'
else
anchorSet = anchorListH
metric = 'height'
classSuffix = 'H'
panelConfig = @_config[panelKey = classSuffix.toLowerCase() + 'Panels']
If the panel set configuration is an integer (as it is by default), an array is filled with equal percentages.
if typeof panelConfig is 'number'
count = Math.abs parseInt panelConfig, 10
percent = 100 / count
panelConfig = @_config[panelKey] = (percent for [0...count])
else
count = panelConfig.length
unless 99 <= panelConfig.reduce((p, c) -> p + c) <= 100.1
throw new Error "#{ libName }: Panel percentages do not sum to 100"
Clone a new mask element and append it to a panel element prototype.
mask = cloneEl maskProto, true, 'mask' + classSuffix
if @_shading
mask.appendChild shaderProtos[anchor] for anchor in anchorSet
proto = cloneEl panelProto, false, 'panel' + classSuffix
proto.appendChild mask
for anchor, rightOrBottom in anchorSet
for panelN in [0...count]
panel = proto.cloneNode true
content = panel.children[0].children[0]
content.style.width = content.style.height = '100%'
if rightOrBottom
panel.style[css.origin] = anchor
Panels on the right and bottom axes are placed backwards.
index = panelConfig.length - panelN - 1
prev = index + 1
else
index = panelN
prev = index - 1
The inner content of each panel is offset relative to the panel index to display a contiguous composition.
if panelN is 0
offsets[anchor].push 0
else
offsets[anchor].push (offsets[anchor][prev] - 100) * (panelConfig[prev] / panelConfig[index])
if panelN is 0
panel.style[anchor] = '0'
Only the first panel has its size set to the nominal target percentage.
panel.style[metric] = panelConfig[index] + '%'
else
Each subsequent panel is offset by its predecessor/parent’s size.
panel.style[anchor] = '100%'
Subsequent panels have their percentages set relative to their parent panel’s percentage to counteract it in an absolute sense.
panel.style[metric] = panelConfig[index] / panelConfig[prev] * 100 + '%'
if @_shading
for a, i in anchorSet
@_shaders[anchor][a][panelN] = panel.children[0].children[i + 1]
The inner content retains the original dimensions of the element while being inside a small slice. By manipulating the number based on the total number of panels and the absolute percentage, the size reduction of the parent is undone and sizing flexibility is achieved.
content.style[metric] =
content.style['max' + capitalize metric] =
(count / panelConfig[index] * 10000 / count) + '%'
content.style[anchorSet[0]] = offsets[anchorSet[0]][index] + '%'
@_transformPanel panel, 0, anchor
@_panels[anchor][panelN] = panel
Panels are nested inside each other.
@_panels[anchor][panelN - 1].appendChild panel unless panelN is 0
Append the first panel to each stage.
@_stages[anchor].appendChild @_panels[anchor][0]
@_stageHolder = createEl 'holder'
@_stageHolder.setAttribute 'aria-hidden', 'true'
@_stageHolder.appendChild @_stages[anchor] for anchor in anchorList
Override default styling if original positioning is absolute.
if window.getComputedStyle(@el).position is 'absolute'
@el.style.position = 'absolute'
@el.classList.add elClasses.active
showEl @_stages.left
The original element is cloned and hidden via transforms so the dimensions of the OriDomi content are maintained by it.
@_cloneEl = cloneEl @el, true, 'clone'
@_cloneEl.classList.remove elClasses.active
hideEl @_cloneEl
Once the clone is stored the original element is emptied and appended with the clone and the OriDomi content.
@el.innerHTML = ''
@el.appendChild @_cloneEl
@el.appendChild @_stageHolder
This ensures mouse events work correctly when panels are transformed away from the viewer.
@el.parentNode.style[css.transformStyle] = 'preserve-3d'
An effect method is called since touch events rely on using the last method called.
@accordion 0
@setRipple @_config.ripple if @_config.ripple
@enableTouch() if @_config.touchEnabled
This method is called for the action shifted off the queue.
_step: =>
Return if the composition is currently in transition or the queue is empty.
return if @_inTrans or<EMAIL_ADDRESS>@_inTrans = true
Destructure action arguments from the front of the queue.
[fn, angle, anchor, options] = @_queue.shift()
@unfreeze() if @isFrozen
A local function for the next action is created should the call need to be deferred (if the stage is folded up or on the wrong anchor).
next = =>
@_setCallback {angle, anchor, options, fn}
args = [angle, anchor, options]
args.shift() if fn.length < 3
fn.apply @, args
if @isFoldedUp
if fn.length is 2
next()
else
@_unfold next
else if anchor isnt @_lastOp.anchor
@_stageReset anchor, next
else
next()
This method tests if the called action is identical to the previous one. If two identical operations were called in a row, the transition callback wouldn’t be called due to no animation taking place. This method reasons if movement has taken place, avoiding this pitfall of transition listeners.
_isIdenticalOperation: (op) ->
return true unless @_lastOp.fn
return false if @_lastOp.reset
(return false if @_lastOp[key] isnt op[key]) for key in ['angle', 'anchor', 'fn']
(return false if v isnt @_lastOp.options[k] and k isnt 'callback') for k, v of op.options
true
This method normalizes callback handling for all public methods.
_setCallback: (operation) ->
If there was no transformation, invoke the callback immediately.
if<EMAIL_ADDRESS>or @_isIdenticalOperation operation
@_conclude operation.options.callback
Otherwise, attach an event listener to be called on the transition’s end.
else
<EMAIL_ADDRESS>css.transitionEnd, @_onTransitionEnd, false
(@_lastOp = operation).reset = false
Handler called when a CSS transition ends.
_onTransitionEnd: (e) =>
Remove the event listener immediately to prevent bubbling.
e.currentTarget.removeEventListener css.transitionEnd, @_onTransitionEnd, false
Initialize the transition teardown process.
@_conclude @_lastOp.options.callback, e
Used to handle the end process of transitions and to initialize queued operations.
_conclude: (cb, event) =>
defer =>
@_inTrans = false
@_step()
cb? event, @
Transforms a given element based on angle, anchor, and fracture boolean.
_transformPanel: (el, angle, anchor, fracture) ->
x = y = z = 0
switch anchor
when 'left'
y = angle
transPrefix = 'X(-'
when 'right'
y = -angle
transPrefix = 'X('
when 'top'
x = -angle
transPrefix = 'Y(-'
when 'bottom'
x = angle
transPrefix = 'Y('
Rotate on every axis in fracture mode.
x = y = z = angle if fracture
el.style[css.transform] = "
rotateX(#{ x }deg)
rotateY(#{ y }deg)
rotateZ(#{ z }deg)
translate#{ transPrefix }#{ @_config.gapNudge }px)
"
This validates a given angle by making sure it’s a float and by keeping it within the maximum range specified in the instance settings.
_normalizeAngle: (angle) ->
angle = parseFloat angle, 10
max = @_config.maxAngle
if isNaN angle
0
else if angle > max
max
else if angle < -max
-max
else
angle
Allows other methods to change the transition duration/delay or disable it altogether.
_setTrans: (duration, delay, anchor = @_lastOp.anchor) ->
@_iterate anchor, (panel, i, len) => @_setPanelTrans anchor, arguments..., duration, delay
This method changes the transition duration and delay of panels and shaders.
_setPanelTrans: (anchor, panel, i, len, duration, delay) ->
delayMs =
Delay is a ripple
value. The milliseconds are derived based on the
speed setting and the number of panels.
switch delay
when 0 then 0
when 1 then @_config.speed / len * i
when 2 then @_config.speed / len * (len - i - 1)
panel.style[css.transitionDuration] = duration + 'ms'
panel.style[css.transitionDelay] = delayMs + 'ms'
if @_shading
for side in (if anchor in anchorListV then anchorListV else anchorListH)
shader = @_shaders[anchor][side][i]
shader.style[css.transitionDuration] = duration + 'ms'
shader.style[css.transitionDelay] = delayMs + 'ms'
delayMs
Determines a shader’s opacity based upon panel position, anchor, and angle.
_setShader: (n, anchor, angle) ->
Store the angle’s absolute value and generate an opacity based on shadingIntensity
.
abs = Math.abs angle
opacity = abs / 90 * @_config.shadingIntensity
With hard shading, opacity is reduced and angle
is based on the global
lastAngle
so all panels’ shaders share the same direction. Soft shaders
have alternating directions.
if @_shading is 'hard'
opacity *= .15
if @_lastOp.angle < 0
angle = abs
else
angle = -abs
else
opacity *= .4
This block makes sure left and top shaders appear for negative angles and right and bottom shaders appear for positive ones.
if anchor in anchorListV
if angle < 0
a = opacity
b = 0
else
a = 0
b = opacity
@_shaders[anchor].left[n].style.opacity = a
@_shaders[anchor].right[n].style.opacity = b
else
if angle < 0
a = 0
b = opacity
else
a = opacity
b = 0
@_shaders[anchor].top[n].style.opacity = a
@_shaders[anchor].bottom[n].style.opacity = b
This method shows the requested stage element and sets a reference to it as the current stage.
_showStage: (anchor) ->
if anchor isnt @_lastOp.anchor
hideEl<EMAIL_ADDRESS>@_lastOp.anchor = anchor
@_lastOp.reset = true
@_stages[anchor].style[css.transform] = 'translate3d(' +
switch anchor
when 'left'
'0, 0, 0)'
when 'right'
"-#{ @_config.vPanels.length }px, 0, 0)"
when 'top'
'0, 0, 0)'
when 'bottom'
"0, -#{ @_config.hPanels.length }px, 0)"
If the composition needs to switch stages or fold up, it must first unfold all panels to 0 degrees.
_stageReset: (anchor, cb) =>
fn = (e) =>
e.currentTarget.removeEventListener css.transitionEnd, fn, false if e
@_showStage anchor
defer cb
If already unfolded to 0, immediately invoke the change function.
return fn() if @_lastOp.angle is 0
<EMAIL_ADDRESS>css.transitionEnd, fn, false
@_iterate @_lastOp.anchor, (panel, i) =>
@_transformPanel panel, 0, @_lastOp.anchor
@_setShader i, @_lastOp.anchor, 0 if @_shading
Converts a shorthand anchor name to a full one. Numerical shorthands are based on CSS shorthand ordering.
_getLonghandAnchor: (shorthand) ->
switch shorthand.toString()
when 'left', 'l', '4'
'left'
when 'right', 'r', '2'
'right'
when 'top', 't', '1'
'top'
when 'bottom', 'b', '3'
'bottom'
else
Left is always default.
'left'
Gives the element a resize cursor to prompt the user to drag the mouse.
_setCursor: (bool = @_touchEnabled) ->
if bool
@el.style.cursor = css.grab
else
@el.style.cursor = 'default'
Adds or removes handlers from the element based on the boolean argument given.
_setTouch: (toggle) ->
if toggle
return @ if @_touchEnabled
listenFn = 'addEventListener'
else
return @ unless @_touchEnabled
listenFn = 'removeEventListener'
@_touchEnabled = toggle
@_setCursor()
Array of event type pairs.
eventPairs = [['TouchStart', 'MouseDown'], ['TouchEnd', 'MouseUp'],
['TouchMove', 'MouseMove'], ['TouchLeave', 'MouseLeave']]
Detect native mouseleave
support.
mouseLeaveSupport = 'onmouseleave' of window
Attach touch/drag event listeners in related pairs.
for eventPair in eventPairs
for eString in eventPair
unless eString is 'TouchLeave' and !mouseLeaveSupport
@el[listenFn] eString.toLowerCase(), @['_on' + eventPair[0]], false
else
@el[listenFn] 'mouseout', @_onMouseOut, false
break
@
This method is called when a finger or mouse button is pressed on the element.
_onTouchStart: (e) =>
return if !@_touchEnabled or @isFoldedUp
e.preventDefault()
Clear queued animations.
@emptyQueue()
Set a property to track touch starts.
@_touchStarted = true
Change the cursor to the active grabbing
state.
@el.style.cursor = css.grabbing
Disable tweening to enable instant 1 to 1 movement.
@_setTrans 0, 0
Derive the axis to fold on.
@_touchAxis = if @_lastOp.anchor in anchorListV then 'x' else 'y'
Set a reference to the last folded angle to accurately derive deltas.
@["_#{ @_touchAxis }Last"] = @_lastOp.angle
axis1 = "_#{ @_touchAxis }1"
Determine the starting tap’s coordinate for touch and mouse events.
if e.type is 'mousedown'
@[axis1] = e["page#{ @_touchAxis.toUpperCase() }"]
else
@[axis1] = e.targetTouches[0]["page#{ @_touchAxis.toUpperCase() }"]
Return that value to an external listener.
@_config.touchStartCallback @[axis1], e
Called on touch/mouse movement.
_onTouchMove: (e) =>
return unless @_touchEnabled and @_touchStarted
e.preventDefault()
Set a reference to the current x or y position.
if e.type is 'mousemove'
current = e["page#{ @_touchAxis.toUpperCase() }"]
else
current = e.targetTouches[0]["page#{ @_touchAxis.toUpperCase() }"]
Calculate distance and multiply by touchSensitivity
.
distance = (current - @["_#{ @_touchAxis }1"]) * @_config.touchSensitivity
Calculate final delta based on starting angle, anchor, and what side of zero the last operation was on.
if @_lastOp.angle < 0
if @_lastOp.anchor is 'right' or @_lastOp.anchor is 'bottom'
delta = @["_#{ @_touchAxis }Last"] - distance
else
delta = @["_#{ @_touchAxis }Last"] + distance
delta = 0 if delta > 0
else
if @_lastOp.anchor is 'right' or @_lastOp.anchor is 'bottom'
delta = @["_#{ @_touchAxis }Last"] + distance
else
delta = @["_#{ @_touchAxis }Last"] - distance
delta = 0 if delta < 0
@_lastOp.angle = delta = @_normalizeAngle delta
@_lastOp.fn.call @, delta, @_lastOp.anchor, @_lastOp.options
@_config.touchMoveCallback delta, e
Teardown process when touch/drag event ends.
_onTouchEnd: (e) =>
return unless @_touchEnabled
Restore the initial touch status and cursor.
@_touchStarted = @_inTrans = false
@el.style.cursor = css.grab
Enable transitions again.
@_setTrans @_config.speed, @_config.ripple
Pass callback final coordinate.
@_config.touchEndCallback @["_#{ @_touchAxis }Last"], e
End folding when the mouse or finger leaves the composition.
_onTouchLeave: (e) =>
return unless @_touchEnabled and @_touchStarted
@_onTouchEnd e
A fallback for browsers that don’t support mouseleave
.
_onMouseOut: (e) =>
return unless @_touchEnabled and @_touchStarted
@_onTouchEnd e if e.toElement and<EMAIL_ADDRESS>e.toElement
This method unfolds the composition after it’s been folded up. It’s private and doesn’t use the decorator because it’s used internally by other methods and skips the queue. Its public counterpart is a queued alias.
_unfold: (callback) ->
@_inTrans = true
{anchor} = @_lastOp
@_iterate anchor, (panel, i, len) =>
delay = @_setPanelTrans anchor, arguments..., @_config.speed, 1
do (panel, i, delay) =>
defer =>
@_transformPanel panel, 0, anchor
@_setShader i, anchor, 0 if @_shading
setTimeout =>
showEl panel.children[0]
if i is len - 1
@_inTrans = @isFoldedUp = false
callback?()
@_lastOp.fn = @accordion
@_lastOp.angle = 0
defer => panel.style[css.transitionDuration] = @_config.speed
, delay + @_config.speed * .25
This method is used by many others to iterate among panels within a given anchor.
_iterate: (anchor, fn) ->
fn.call @, panel, i, panels.length for panel, i in panels = @_panels[anchor]
Enables touch events.
enableTouch: ->
@_setTouch true
Disables touch events.
disableTouch: ->
@_setTouch false
Public setter for transition durations.
setSpeed: (speed) ->
for anchor in anchorList
@_setTrans (@_config.speed = speed), @_config.ripple, anchor
@
Disables OriDomi slicing by showing the original, untouched target element. This is useful for certain user interactions on the inner content.
freeze: (callback) ->
Return if already frozen.
if @isFrozen
callback?()
else
Make sure to reset folding first.
@_stageReset @_lastOp.anchor, =>
@isFrozen = true
Swap the visibility of the elements.
hideEl @_stageHolder
showEl @_cloneEl
@_setCursor false
callback?()
@
Restores the OriDomi version of the element for folding purposes.
unfreeze: ->
Only unfreeze if already frozen.
if @isFrozen
@isFrozen = false
Swap the visibility of the elements.
hideEl @_cloneEl
showEl @_stageHolder
@_setCursor()
Set lastAngle
to 0 so an immediately subsequent call to freeze
triggers the callback.
@_lastOp.angle = 0
@
Removes the OriDomi element and restores the original element.
destroy: (callback) ->
First restore the original element.
@freeze =>
Remove event listeners.
@_setTouch false
Remove the data reference if using jQuery.
$.data @el, baseName, null if $
Remove the OriDomi element from the DOM.
@el.innerHTML = @_cloneEl.innerHTML
Reset original styling.
@el.classList.remove elClasses.active
callback?()
null
Empties the queue should you want to cancel scheduled animations.
emptyQueue: ->
@_queue = []
defer => @_inTrans = false
@
Enable or disable ripple. 1 is forwards, 2 is backwards, 0 is disabled.
setRipple: (dir = 1) ->
@_config.ripple = Number dir
@setSpeed @_config.speed
@
Setter method for maxAngle
.
constrainAngle: (angle) ->
@_config.maxAngle = parseFloat(angle, 10) or defaults.maxAngle
@
Pause in the midst of an animation sequence, in milliseconds. E.g.: el.reveal(20).wait(5000).accordion(-33)
wait: (ms) ->
fn = => setTimeout @_conclude, ms
if @_inTrans
@_queue.push [fn, @_lastOp.angle, @_lastOp.anchor, @_lastOp.options]
else
fn()
@
This method is used to externally manipulate the styling or contents of the
composition. Manipulation instructions can be supplied via a function (invoked
with each panel element), or a map of selectors with instructions.
Instruction values can be text to implicitly update innerHTML
content or
objects with style
and/or content
keys. Style keys should contain object
literals with camel-cased CSS properties as keys.
modifyContent: (fn) ->
if typeof fn isnt 'function'
selectors = fn
set = (el, content, style) ->
el.innerHTML = content if content
if style
el.style[key] = value for key, value of style
null
fn = (el) ->
for selector, value of selectors
content = style = null
if typeof value is 'string'
content = value
else
{content, style} = value
if selector is ''
set el, content, style
continue
set match, content, style for match in el.querySelectorAll selector
null
for anchor in anchorList
for panel, i in @_panels[anchor]
fn panel.children[0].children[0], i, anchor
@
Base effect with alternating peaks and valleys.
reveal
relies on it by calling it with sticky: true
to keep the first
panel flat.
accordion: prep (angle, anchor, options) ->
@_iterate anchor, (panel, i) =>
With an odd-numbered panel, reverse the angle.
if i % 2 isnt 0 and !options.twist
deg = -angle
else
deg = angle
If sticky, keep the first panel flat.
if options.sticky
if i is 0
deg = 0
else if i > 1 or options.stairs
deg *= 2
else
Double the angle to counteract the angle of the parent panel.
deg *= 2 unless i is 0
In stairs mode, keep all the angles on the same side of 0.
deg *= -1 if options.stairs
Set the CSS transformation.
@_transformPanel panel, deg, anchor, options.fracture
if @_shading
if options.twist or options.fracture or (i is 0 and options.sticky)
@_setShader i, anchor, 0
else if Math.abs(deg) isnt 180
@_setShader i, anchor, deg
This effect appears to bend rather than fold the paper. Its curves can appear smoother with higher panel counts.
curl: prep (angle, anchor, options) ->
Reduce the angle based on the number of panels in this axis.
angle /= if anchor in anchorListV then @_config.vPanels.length else @_config.hPanels.length
@_iterate anchor, (panel, i) =>
@_transformPanel panel, angle, anchor
@_setShader i, anchor, 0 if @_shading
Lifts up all panels after the first one.
ramp: prep (angle, anchor, options) ->
Rotate the second panel for the lift up.
@_transformPanel @_panels[anchor][1], angle, anchor
For all but the second panel, set the angle to 0.
@_iterate anchor, (panel, i) =>
@_transformPanel panel, 0, anchor if i isnt 1
@_setShader i, anchor, 0 if @_shading
Hides the element by folding each panel in a cascade of animations.
foldUp: prep (anchor, callback) ->
return callback?() if @isFoldedUp
@_stageReset anchor, =>
@_inTrans = @isFoldedUp = true
@_iterate anchor, (panel, i, len) =>
duration = @_config.speed
duration /= 2 if i is 0
delay = @_setPanelTrans anchor, arguments..., duration, 2
do (panel, i, delay) =>
defer =>
@_transformPanel panel, (if i is 0 then 90 else 170), anchor
setTimeout =>
if i is 0
@_inTrans = false
callback?()
else
hideEl panel.children[0]
, delay + @_config.speed * .25
This is the queued version of _unfold
.
unfold: prep @::_unfold
For custom folding behavior, you can pass a function to map()
that will
determine the folding angle applied to each panel. The passed function
is supplied with the input angle, the panel index, and the number of
panels in the active anchor. Calling map returns a new function bound to
the instance and the lambda, e.g. oridomi.map(randomFn)(30).reveal(20)
.
map: (fn) ->
prep (angle, anchor, options) =>
@_iterate anchor, (panel, i, len) =>
@_transformPanel panel, fn(angle, i, len), anchor, options.fracture
.bind @
Resets all panels back to zero degrees.
reset: (callback) ->
@accordion 0, {callback}
Simply proxy for calling accordion
with sticky
enabled.
Keeps first panel flat on page.
reveal: (angle, anchor, options = {}) ->
options.sticky = true
@accordion angle, anchor, options
Proxy to enable stairs mode on accordion
.
stairs: (angle, anchor, options = {}) ->
options.stairs = options.sticky = true
@accordion angle, anchor, options
The composition is split apart by its panels rather than folded.
fracture: (angle, anchor, options = {}) ->
options.fracture = true
@accordion angle, anchor, options
Similar to fracture
, but the panels are twisted as well.
twist: (angle, anchor, options = {}) ->
options.fracture = options.twist = true
@accordion angle / 10, anchor, options
Convenience proxy to accordion-fold instance to maximum angle.
collapse: (anchor, options = {}) ->
options.sticky = false
@accordion<EMAIL_ADDRESS>anchor, options
Same as collapse
, but uses positive angle for slightly different effect.
collapseAlt: (anchor, options = {}) ->
options.sticky = false
@accordion @_config.maxAngle, anchor, options
Set a version flag for easy external retrieval.
@VERSION = '1.1.5'
Externally reveal if OriDomi is supported by the browser.
@isSupported = isSupported
Expose the OriDomi constructor via CommonJS, AMD, or the window object.
if module?.exports
module.exports = OriDomi
else if define?.amd
define -> OriDomi
else
window.OriDomi = OriDomi
Only create bridge if jQuery (or an imitation supporting data()
) exists.
return unless $
Attach an OriDomi
method to $
‘s prototype.
$::oriDomi = (options) ->
Return selection if OriDomi is unsupported by the browser.
return @ unless isSupported
return $.data @[0], baseName if options is true
If options
is a string, assume it’s a method call.
if typeof options is 'string'
methodName = options
Check if method exists and warn if it doesn’t.
unless typeof (method = OriDomi::[methodName]) is 'function'
console?.warn "#{ libName }: No such method `#{ methodName }`"
return @
for el in @
unless instance = $.data el, baseName
instance = $.data el, baseName, new OriDomi el, options
Call the requested method with arguments.
method.apply instance, Array::slice.call(arguments)[1...]
If not calling a method, initialize OriDomi on the selection.
else
for el in @
If the element in the selection already has an instance of OriDomi attached to it, return the instance.
if instance = $.data el, baseName
continue
else
Create an instance of OriDomi and attach it to the element.
$.data el, baseName, new OriDomi el, options
Return the selection.
@


Returns the horizontal distance of the left border of the user's browser from the left side of the screen.
lLoc = window.screenX
lLoc
is the number of pixels from the left side the screen.DOM Level 0. Not part of any standard.
© 2013 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/window.screenX