JS and DOM for Gecko Hackers
Quick introduction and disclaimer
I assume webdev familiarity of JS and the DOM
Start by kicking off a build of mozilla-central
Shiny new ES6 classes
- First shipped in Firefox 45, so this is pretty new stuff
- If you've ever done OOP in other languages, this should feel familiar
- Typical approach for defining a class:
Extending, and static class methods
Expect to see more and more of this in the tree.
- For a while, we're going to have two different ways of creating classes in JavaScript in the tree. It's the circle of life.
- Probably best to use this newer style in new, green-field code.
- I've just scratched the surface here. Here's more documentation.
Old-school prototype-based inheritance...
- Usually abstracted away by libraries like Underscore.js or lodash
- Up until recently, this was how you did OOP and inheritance in JavaScript. Lots of Mozilla code still uses this.
- Typical approach for defining a "class":
Prototype-based inheritance...
let
IMO, let
performs like you'd expect, and sidesteps var
's footguns.
You might see var
's being used in new code being defined in the global scope.
Some scripts will have var
's exclusively. This is usually an age hint.
Object
and Array
destructuring
- Fancy shorthand for multi-variable assignment
- Useful if you have a function that returns an
Object
or an Array
that you only want a part of.
- Example:
Object
and Array
destructuring
Whew!
- Hopefully we're about 1 hour in, or thereabouts.
- Let's hear some questions, and do some exercises.
Asynchronicity and Concurrency
Asynchronous things in JavaScript
- JavaScript is single-threaded and event driven
- "Asynchronous" things queue a function to fire at a later time, but still on the main thread
- One can use
setTimeout
to break up heavy work into chunks, but there are better ways
Communicating with Workers
- Communication is done with message passing
- You can't send a function over unless you somehow
eval
it on the other side
- But if it can be serialized to JSON, then it can be sent
- Here's worker_example_1.js:
Communicating with Workers
ChromeWorkers
- Extends Workers with more powers, and ES6 stuff (like
let
)
- Non-standard, and not exposed to web content
- Has access to js-ctypes via a global
ctypes
.
Promises
- Asynchronous code can result in callback hell:
- You still see this pattern in older parts of our code, like old tests
Promises
- Promises reorient things by adding an intermediary "then-able" object
- Difference is subtle, but the results can be profound
- If
doFirstPart
, doSecondPart
and doLastPart
returned Promises, we could do:
- That might seem like a small win, but it gets better with
yield
and Tasks
Promises
- Let's write a function that returns a
Promise
- Questions about Promises? Because we're about to crank it up...
Tasks
- ES6 gives us the
yield
keyword
- Used for Generators, allows us to effectively halt and resume a function
- Coupled with Promises, this leads us to Tasks!
- Not sure how often they're used on the web, but used extensively in Firefox
- This was task.js, not Task.jsm, because this slideshow is in web content
Task.jsm
- Available as a JSM at resource://gre/modules/Task.jsm
- Control flow and error handling example:
Arrow functions
- Sometimes you're not in a position to use Tasks, so you need to pass a callback to a Promise's
then()
function.
- When you're doing this inside an Object method, it's often useful for the callback to bind
this
to the Object
- Before arrow functions, there were several ways to do this:
Whew!
- Hopefully we're about 2 hours in, or thereabouts (if not, we're in trouble, and I need to move faster).
- Let's hear some questions, and do some exercises.
Browser Tools and Extension-writing
The Browser Toolbox
- If you didn't already know, Firefox's UI ("chrome") uses the same rendering and JS engine as web content
- This means that our web developer tools are re-usable for the Firefox UI!
- The ability to inspect, manipulate and debug chrome code is disabled by default
A Tour of the Browser Toolbox
A brief introduction to WebExtensions
manifest.json
- This is where your WebExtension describes itself
- Here's some boilerplate for you:
{
"name": "My WebExtension",
"version": "1.0",
"manifest_version": 2,
"description": "Tooling around with WebExtensions",
"permissions": [],
"applications": {
"gecko": {
"id": "my-webextension@webextensions"
}
}
}
- Let's run it!
- It's installed, but it's boring. Let's do something neat...
Modifying pages with content scripts...
- Content scripts are injected into web content, and get an X-ray view of the DOM and JS environment of a page
- They have limited privileges, but can communicate things to the parent process where there are elevated privileges
- Open up manifest.json again...
Now our content script...
Packaging and signing
- Firefox add-ons are XPI files, which are really just ZIP files
- ZIP up the contents of that folder we just made, and you've got an (unsigned) add-on
xpinstall.signatures.required
- You can sign an add-on using the jpm tool, or by uploading to AMO.
We use a number of test frameworks
- My guess is that we discover that the existing framework is insufficient so we build a new one and never fully migrate
- There are other reasons - like we might want some tests to be cross-browser compatible
- Regardless, we have several different "types" of tests
Our testing frameworks:
- xpcshell: This test runs in a JavaScript "shell" with XPCOM access. No windows, and no DOM. Good for testing JS, or bits that don't require DOM.
- reftests: Tests that do some layout and / or rendering, which we then compare against a reference image. Good for testing graphics and layout.
- mochitest-plain: Tests web content with web content privleges. Good for testing for compliance with web specs.
- mochitest-chrome: Privileged tests running in a bare window. Good for testing XUL and layout.
- mochitest-browser: Privileged tests running in a browser. Good for exercising Firefox to do Firefox things.
- marionette: Our newest browser automation framework. Similar to Selenium. Can drive Firefox for Desktop, as well as B2G. This is probably the future.
- wpt: Similar to mochitest-plain, but actually being used between browsers (like Firefox and Servo).
- Here's a decision chart to help you determine which one you should use when.
How to run tests
./mach test [path-to-test]
./mach test browser/base/content/test/general/browser_audioTabIcon.js
# ^-- This will automatically choose the right framework,
# and is good if you just want to run the test simply.
# Note also that the test starts with browser_. This is a browser mochitest.
# xpcshell, mochitest-plain and mochitest-chrome start with test_.
./mach mochitest browser/base/content/test/general/browser_audioTabIcon.js
# Functionally equivalent to the first one
./mach mochitest browser/base/content/test/general/browser_audioTabIcon.js --disable-e10s
# --disable-e10s = Run without out-of-process tabs
# Check out --help for more options. I like --jsdebugger, --run-until-failure,
# --no-autorun, and --keep-open
Let's write a really simple mochitest-browser test!
- Firefox will open, and our test will start
- Our test will open a new tab
- Our test will make sure there are now 2 tabs
- Our test will close the tab it had opened
Get the test registered
- Find out where to put it. Let's put it under
browser/base/content/test/general
for now
- Give it a name. Let's call it
browser_simpletest.js
-
add_task(function*() {
ok(true, "My test didn't run.");
});
- Find the browser.ini
- Add browser_simpletest.js to browser.ini
- Make sure our test will run
./mach test browser/base/content/test/general/browser_simpletest.js
Let's write our actual test
Let's run it!
./mach test browser/base/content/test/general/browser_simpletest.js
Let's debug it if necessary
/


publisher: publishes all relevant haptic state information on a common interface independent of robot type. More...
Public Member Functions | |
| def | __init__ |
| Constructor for robot haptic state server. | |
| def | initRobot |
| Initialise all robot specific parameters (skin topics, robot interfaces, etc). | |
| def | initPR2 |
| Initialise parameters for the state publisher when used on the PR2. | |
| def | initCody |
| Initialise parameters for the state publisher when used on Cody. | |
| def | initSim |
| Initialise parameters for the state publisher when used in simulation with the 3DOF arm. | |
| def | initSimCody |
| def | initComms |
| def | getMessageHeader |
| def | updateEndEffectorJacobian |
| def | updateContactJacobians |
| Compute contact Jacobians based on the provided taxel array dictionary. | |
| def | updateTorsoPose |
| Returns a Pose object for the torso pose in the stated inertial frame. | |
| def | updateJointStates |
| def | updateEndEffectorPose |
| def | modifyPR2Taxels |
| Modify taxel data for PR2 specific situations TODO: Survy to implement selective taxel ignoring. | |
| def | modifyRobotSpecificTaxels |
| Modifies data from the taxel array based on robot specific configurations. | |
| def | publishRobotState |
| Build and publish the haptic state message. | |
| def | start |
| Start the state publisher. | |
Public Attributes | |
| opt | |
| node_name | |
| tf_listener | |
| state_pub | |
| rate | |
| msg_seq | |
| base_path | |
| skin_topic_list | |
| skin_client | |
| robot | |
| joint_names | |
| Store latest joint states from the specified robot class. | |
| joint_angles | |
| desired_joint_angles | |
| joint_velocities | |
| joint_stiffness | |
| joint_damping | |
| joint_data_lock | |
| end_effector_position | |
| end_effector_orient_cart | |
| end_effector_orient_quat | |
| Jc | |
| Je | |
| trim_threshold | |
| ma_to_m | |
| robot_path | |
| torso_frame | |
| inertial_frame | |
| joint_limits_max | |
| joint_limits_min | |
| gripper_pose_pub |
publisher: publishes all relevant haptic state information on a common interface independent of robot type.
Initialise parameters for the state publisher when used on Cody.
Initialise parameters for the state publisher when used on the PR2.
| def hrl_haptic_mpc.robot_haptic_state_node.RobotHapticStateServer.initRobot | ( | self, | |
robot_type = "pr2" |
|||
| ) |
Initialise all robot specific parameters (skin topics, robot interfaces, etc).
Calls the appropriate init function.
Initialise parameters for the state publisher when used in simulation with the 3DOF arm.
| def hrl_haptic_mpc.robot_haptic_state_node.RobotHapticStateServer.modifyPR2Taxels | ( | self, | |
| skin_data | |||
| ) |
Modify taxel data for PR2 specific situations TODO: Survy to implement selective taxel ignoring.
| skin_data | Dictionary containing taxel array messages indexed by topic name |
| def hrl_haptic_mpc.robot_haptic_state_node.RobotHapticStateServer.modifyRobotSpecificTaxels | ( | self, | |
| skin_data | |||
| ) |
Modifies data from the taxel array based on robot specific configurations.
An example of this is ignoring the PR2 wrist taxels when the wrist is near its joint limit as the wrist itself will trigger the taxel.
| skin_data | Dict containing taxel array messages indexed by topic name |
Build and publish the haptic state message.
| def hrl_haptic_mpc.robot_haptic_state_node.RobotHapticStateServer.updateContactJacobians | ( | self, | |
| skin_data | |||
| ) |
Compute contact Jacobians based on the provided taxel array dictionary.
| skin_data | Dictionary containing taxel array messages indexed by topic name |


Techno Tech
Home
(current)
About Us
Contact Us
Sign Up
Login In
Login In Via:
Facebook
Twitter
Logout
Techno Tech Lab is Coming Soon!
We appreciate your patience!
Click me


This package provides extensions to the leaflet package to customize leaflet legends without adding an outside css file to the output to style legends. The legend extensions allow the user to add images to legends, style the labels of the legend items, change orientation of the legend items, use different symbologies, and style axis ticks. Syntax and style is consistent with the leaflet package.
You can install the released version of leaflegend from CRAN with:
install.packages("leaflegend")
Install the development version with:
devtools::install_github("tomroh/leaflegend")
Use addLegend*()
to create easily customizable legends for leaflet.
library(leaflegend)
library(leaflet)
data(quakes)
quakes[['group']] <- sample(c('A', 'B', 'C'), nrow(quakes), replace = TRUE)
factorPal <- colorFactor('Dark2', quakes$group)
leaflet() %>%
addTiles() %>%
addCircleMarkers(
data = quakes,
lat = ~ lat,
lng = ~ long,
color = ~ factorPal(group),
opacity = 1,
fillOpacity = 1
) %>%
addLegendFactor(
pal = factorPal,
title = htmltools::tags$div('addLegendFactor', style = 'font-size: 24px; color: red;'),
labelStyle = 'font-size: 18px; font-weight: bold;',
orientation = 'horizontal',
values = quakes$group,
position = 'topright',
shape = 'triangle',
width = 30,
height = 30
)


Total Cases in
:
New Cases
Summary of last week:
Total Confirmed Cases Summary
New Cases History
's COVID Cases History:
Date
Confirmed
Deceased
Active
Recovered


Music Calagories
Even more websites all about website templates on Just Web Templates.
If you are looking for beautiful and profesionaly made tamplates you can find them at Template Beauty.
You can remove any link to our websites from this template you're free to use the template without linking back to us.


The Struts Bridge provides the following features for developing and running Struts Applications as Portlets:
Struts determines the Actions to perform on the request url. A Portlet on the other hand doesn't have or receive an url, only request parameters.
To be able to use Struts within a Portlet, a current Page context is maintained by the Struts Bridge which is used to provide Struts with a "virtual" request context just as if it were accessed from a Web Application.
The Struts Page URL is maintained as a Portlet RenderParameter
and included in all Portlet URLs
generated for the Portlet. When the StrutsPortlet
receives a request it uses the Struts Page URL
to create a new HttpServletRequest
with a redefined request url before invoking the Struts
PortletServlet
(extending the Struts ActionServlet
).
None of the Action Mappings for an existing Struts Application have to be changed (in this respect at least) to allow it to run in a Portlet context.
Processing ActionRequest
and RenderRequest
events from a Servlet application is a
problem with the current Portlet Specification. Although Servlets (and JSPs) can be invoked from a Portlet,
the Portlet Specification only supports this from the RenderRequest
.
As request parameters are only available during the ActionRequest
, not being able to use a Struts
for processing these is a serious limitation. Together with no clear inter-portlet application communication
support, this is probably one of the biggest omissions from the Portlet Specification.
But, because the Portlet Specification is build upon the Servlet Specification (2.3), the Portlet Container
implementation (like Pluto) and/or the Portal itself, usually
has direct access to, and also uses the ServletContext
, even during the
ActionRequest
event.
It is therefore usually quite easy to provide access to the ServletContext
, although it will
require some knowledge of the Portal and/or the Portlet Container implementation.
The Struts Bridge uses the ServletContextProvider
interface from the
portals-bridges-common library to get access to the required ServletContext
.
To be able to use the Struts Bridge, a StrutsPortlet
must therefore be provided with a concrete
implementation of the ServletContextProvider
interface (through its initialization parameters).
This implementation class can be supplied together with the Portlet or be provided natively by the Portal as
the Jetspeed-2 Portal does.
Although the ServletContextProvider
interface has been defined to be easily implemented for a
specific Portal, it might not be generic enough for all.
To support those kind of Portals, the StrutsPortlet
doesn't uses the interface directly, but only
through protected methods of its own which can be extended if needed.
During an ActionRequest
a Portlet (or invoked Servlet) is not allowed to write content to the
response. This is only allowed during the RenderRequest
event but then a Portlet doesn't have
access anymore to the (input) request parameters which makes the RenderRequest generally useless (and bad
practice anyway) for (Struts) Action processing.
Struts on the other hand only knows one request event and is largely build upon server-side forwarding to a JSP (or other View rendering technology) after an Action has been processed.
The Struts Bridge solves this problem by allowing Struts Action processing to occur during the ActionRequest.
But, as soon as Struts forwards (or includes) to another handler (JSP, Velocity script, or even another
Action: ActionChaining) it will intercept and freeze the processing.
The Struts Bridge will then save the current processing context (like the path to include or forward to) in a
separate object: the StrutsRenderContext
, and end the ActionRequest.
Once the RenderRequest is invoked, the Struts Bridge will use the StrutsRenderContext
to restore
the state Struts (and/or an included or forwarded JSP) will expect and continues the processing where it left
off.
Also saved in the StrutsRenderContext are the current ActionForm
(if it isn't already session
bounded), the ActionMessages
and/or ActionErrors
(if not already session bounded
which is possible since Struts 1.2.1).
Important: the StrutsRenderContext is restored only once!
The Portlet Specification expects Portlets to use a true MVC architecture: changing the state of a Portlet is expected to be done during ActionRequest only. The RenderRequest, which may occur many times, is expected to only render the current state of the Portlet.
For a proper usage of the Struts Bridge and to conform to the Portlet Specification requirements, the Struts
application too really should be configured to use separate Action processing and View rendering Actions.
The dependency on the StrutsRenderContext restoring the state during the (next) RenderRequest should be limited to one situation only: input error processing.
When Struts encounters input validation errors, it forwards (back) to the page specified as input for the Action. The Struts Bridge handles this situation likewise. When it detects ActionErrors are defined after the ActionRequest event, it will reset the Struts Page URL to the one from which the ActionRequest was initiated so subsequent (multiple) RenderRequest events will always render that original page.
Note: this will only result the same behavior as when the Struts Application is accessed as Web Application if the Action Mapping input attribute indeed points to the originating input page, which normally will be the case. The Struts Bridge will not (re)set the Struts Page URL to the Action input attribute value (Struts itself will forward to that url) but to the page from which the ActionRequest was initiated!
As said, for a proper usage of the Struts Bridge the Struts application should be configured to use separate Action processing and View processing Actions. The Struts Bridge intercepts the first include or forward initiated from a Struts Action during the ActionRequest. During only the first following RenderRequest it will invoke Struts with the same Struts Page URL as for the ActionRequest but intercept before the actual execution of the mapped Action and then include (never forward) the intercepted target url of the ActionRequest (normally a JSP).
A properly MVC configured Struts application though can (and should) make use of a (client-side) redirect after the Action processing Action by using an ActionForward with redirect="true". The behavior of such a Struts Application then truly complies to the requirements for a Portlet. In fact, the reference implementation of the Portlet Specification, Pluto, actually sends a redirect to the client (browser) after an ActionRequest.
The Struts Bridge supports this behavior as it will intercept a client-side redirect during an ActionRequest by changing the Portlet Page URL to be used by subsequent RenderRequests to the targeted redirect url.
A Struts Application not complying to the above "rules" might not behave as expected in a Portlet context:
without this configuration a second RenderRequest event will not get the previously saved StrutsRenderContext
restored and the invoked Struts Action will be executed again (this time without any parameters).
Migrating an existing Struts Application to a Struts Portlet with doesn't comply to these "rules" might seem problematic without major changes to the code, but it doesn't have to be.
Although a StrutsRenderContext can only be used once to communicate request parameters from the ActionRequest to the next RenderRequest (stored in the ActionForm), the Struts Bridge provides another, completely transparent, solution which can be used without any required changes to the Struts Application.
The Struts Bridge can be configured, using a simple xml definition, to always save specific named request attributes during an ActionRequest and restore these only during the next RenderRequest or optionally every RenderRequest until the next ActionRequest or a RenderRequest for a different Struts Page URL is invoked.
The request attribute values will be saved in the web session which requires them to implement the
Serializable
interface.
An example struts-portlet-config.xml (the name of this file is configurable) definition might look like:
<?xml version="1.0" encoding="UTF-8"?> <config> <render-context> <attribute name="errors"/> <attribute name="message" keep="true"/> <attribute prefix="com.foo.bar" keep="true"/> </render-context> </config>
With the above example configuration, all request attributes named errors and message are saved after the ActionRequest. The errors object is restored only once, the message object will be restored until the next ActionRequest or when the Struts Page URL is changed.
Furthermore, every request attribute which name start with com.foo.bar is also saved after the ActionRequest. With the "prefix" attribute type definition, a whole range of attributes can be configured at once.
Using the RenderContextAttributes configuration, a Struts Action can still forward (without redirecting) to a JSP in a Portlet while passing its required data through the request attributes. Request scoped ActionForms can also safely be used for this as the Struts Bridge will automatically remove them from the session again when they go out of scope!
Using the "single use only" configuration (meaning: without the keep="true" attribute) allows one to pass on rather large
objects to the RenderRequest because, even if they are stored in the Session, this will only be for a very
short period (milliseconds). Of course, with a subsequent RenderRequest these objects won't be available
anymore and the specific View Renderer must be able to handle that situation properly.
Error objects or error messages (other than ActionMessages and ActionErrors which are already automatically
saved in the StrutsRenderContext) are also reasonable candidates to use like this.
Another problem with using Struts for Portlet Development is rendering valid urls.
There are actually two different type of problems: urls for resources likes images, Javascript or CSS stylesheets which needs to be loaded by the client (browser), and urls for interacting with the Portlet itself.
The problem with resource urls is that the content of a Portlet is only included by the Portal, together with possible content of other Portlets shown on the same page. Although the Portlet runs within its own context (the same as the web application it is based on), the client (browser) sees only the context of the Portal page it is currently pointed at.
A Portlet therefore cannot make use of relative src locations for a resource url while this is perfectly valid (and usually preferred) in a Web Application. For a client to be able to retrieve a resource, its url really must include the full context path of the Web Application.
For interacting with the Portlet special PortletURLs must be used which can only be generated using the Portlet API or through the Portlet JSP Tags. The Struts JSP Tags only generate urls valid for a Web Application and also doesn't provide some kind of URLProvider interface like JSF.
Furthermore there are two different PortletURL types: ActionURLs and RenderURLs. It is very important to generate the correct type of url for a certain interaction. Forms must *always* use a POST to an ActionURL, but for generated links it will have to be determined which type of url actually is needed.
To solve these problems, the Struts Bridge provides enhanced versions of the Struts HTML JSP Tags (including EL variants), which take the Portlet environment into account. Furthermore, using a separate element in the struts-portlet-config.xml definition, specific url paths can be configured to be of a certain type (Resource, ActionURL, RenderURL) only.
For the enhanced Struts HTML JSP Tags (html:form, html:link, html:rewrite, html:image and html:img), four different TLDs are provided: an EL and non-EL variant, and for both a full replacement of the Struts supplied struts-html.tld as well as a separate struts-portlet.tld containing only the enhanced Tags definitions.
The full replacement TLDs makes it very easy for migrating a Struts Application to a Portlet context: simply map the new TLD in web.xml or redefine the taglib uri in the JSP using:
<%@ taglib uri="http://portals.apache.org/bridges/struts/tags-portlet-html" prefix="html" %>
<%@ taglib uri="http://portals.apache.org/bridges/struts/tags-portlet-html-el" prefix="html-el" %>
For the enhanced html:link and html:rewrite Tags, three additional boolean attributes are defined: actionURL, renderURL and resourceURL. Using these attributes one can specify which type of url must be generated (only value "true" is supported).
If none of these attributes is specified (with value "true") these Tags will by default generate a RenderURL.
But, the default can be changed (only between renderURL and actionURL) using a struts-portlet-config.xml definition. Furthermore, for specific url path (prefixes) you can specify which type of url must be generated (but with one of the three additional boolean url type attributes this can always be overriden).
An example struts-portlet-config.xml with portlet url type definitions might look like:
<?xml version="1.0" encoding="UTF-8"?> <config> <render-context> <attribute name="errors"/> <attribute name="message" keep="true"/> </render-context> <portlet-url-type> <action path="/shop/add"/> <action path="/shop/switch"/> <action path="/shop/remove"/> <action path="/shop/signoff"/> <action path="/shop/viewCategory"/> <action path="/shop/viewItem"/> <action path="/shop/viewProduct"/> <action path="/shop/viewCart"/> <action path="/shop/newOrder"/> <render path="/shop/newOrderForm"/> <action path="/shop/listOrders"/> <resource path="/images/"/> </portlet-url-type> </config>
In the above example the portlet-url-type element contains three different sub elements: action, render and resource. Their path attribute specifies the prefix to which specific urls are matched. This matching will be done using best match. Internally, the paths will be ordered on longest definition first.
Not shown in the above example is the optional default="render"|"action" attribute for the portlet-url-type element. With it, the default type of portlet-url can be changed from "render" to "action" as is used in the Struts Mailreader Demo Portlet (also provided by the Jetspeed-2 Portal):
<?xml version="1.0" encoding="UTF-8"?> <config> <portlet-url-type default="action"/> </config>
The enhanced html:img and html:image Tags, as well as the html:link and html:rewrite Tags, can be used to generate resource urls using relative (not prefixed with a '/') src references. The Tags will then automatically determine the correct url to generate using the current Struts Page URL as defined for this RenderRequest.
This allows one to replace hard coded resource urls like
<img src="../images/struts-bridge.gif"/>
<html:image src="../images/struts-bridge.gif"/>
The Struts Bridge requires a different RequestProcessor to be used for the Struts Application: a
PortletRequestProcessor
. If a Struts config doesn't define one, or defines one which isn't based on the
PortletRequestProcessor, it will be replaced automatically by the Struts Bridge.
The Struts Bridge also supports Tiles to be used with the PortletTilesRequestProcessor
. If the
TilesPlugin is defined (as required to be able to use Tiles in Struts) it will be recognized by the Struts
Bridge and then the PortletTilesRequestProcessor will be used instead (if not configured already).
Tiles can be used without problem within a Portlet context, even for Action Mapping or ActionForward paths, although the same considerations and restrictions must be taken into account as described above.
1.0.1: For proper handling of the Tiles Context, with version 1.0 the Tiles ComponentConstants.COMPONENT_CONTEXT had to be set as RenderContextAttribute like this:
<?xml version="1.0" encoding="UTF-8"?> <config> <render-context> <attribute name="org.apache.struts.taglib.tiles.CompContext"/> ... </render-context> ... </config>
Although the Struts Bridge is created to allow Struts Applications to run in a Portlet context, it also allows the same application to be run in a Servlet context too.
If the Struts Bridge PortletServlet (which extends ActionServlet) detects it is not accessed from a Portlet context is simply delegates back to the underlying Struts Framework.
Provided the Struts Application doesn't use any Portlet specific features and the Action Mapping configuration is also (still) valid for a Web Application, the same application war can be deployed as Web application and as Portlet Application. When deployed in a Portal, the application can even be accessed as Portlet or as Web Application at the same time!
The JPetstore Portlet example provided by Jetspeed-2 is one example of such a "dual" mode Struts Application.
Another benefit of such a "dual" mode Struts Application is that it can be tested as Web Application which is somewhat easier than testing it as a Portlet.
The Struts framework itself, as well as many Struts applications make have use of the (Servlet) Session for storing user state. When you want to use multiple StrutsPortlets from the same web application this can cause conflicts and session state corruption. With Struts Bridge release 1.0.1, this now has been solved by (optionally, and not by default) isolating the Session scope seen by the StrutsServlet to PortletSession.PORTLET_SCOPE.
If the optional StrutsPortlet init parameter PortletScopeStrutsSession
is set to true, the Session object provided to the
StrutsServlet will be a Proxy for the PortletSession and will provide only access to the PortletSession.PORTLET_SCOPE attributes.
One caveat though: If you also need to use direct Servlet access to the Struts application (meaning: the browser is invoking the
Servlet directly, not through the Portlet), this Servlet won't "see" the previously APPLICATION_SCOPE Session attributes anymore.
This can be an issue for features like binary file (pdf) rendering through a servlet which needs to use the Session to access its data.
To solve this, the utility
PortletWindowUtils class can
be used which provides methods to access a specific Portlet instance its PORTLET_SCOPE session attributes based on its PortletWindowId.
That PortletWindowId (which a Portlet can retrieve itself using the PortletWindowUtils) needs to be passed on to the Servlet first
(for example as query-string parameter on a link send to the browser) for it to be able to make use of it.


{{> navbarHeader }}
{{> navbarFooter }}
Drag and drop the transparent tiles between panels.
red
green
blue
{{> navbarFooter }}


Example: Pattern-based Registrations - Client / Caller
Open JavaScript console to watch output.
Call Procedures


Firm int'l action required against Iran: Saudi paper
by MENARIYADH, Nov 16 (MENA) - A strict international action should be taken against Iran's regime in order to put an end to its hostile practices, said Saudi newspaper Al Riyadh on Saturday.
The newspaper called for toughening up sanctions imposed against Iran.
Iran's attempts to destabilize the region are crystal clear, the newspaper said in its editorial, "Falling Apart from Inside", noting that the Iranian regime believes that an unsafe region ensures its remaining in power.


{{template "commonHeader.html" .}}
{{template "nav.html" .}}
Your browser does not support the video tag. I suggest you upgrade your browser.
Your browser does not support the video tag. I suggest you upgrade your browser.
ignite
V1
A dockernized service for
SS
{{ if not .uInfo }}
Activate the Account
Signup
Here
Login
{{ else }}
控制台
{{ end }}
Account Activation
Submit
User Login
Submit
{{ template "commonFooter.html" .}}


Our paleo treats can be shipped anywhere in the contiental United States
We source all of our ingredients from fair trade organic farmers around the world. Good for the environment, good for people, good for you.
The paleo diet is backed by science. Read about it here
No pesticides, No GMO- Not now, not ever
We believe in a living wage- all team members start at $15 an hour
Our partners across the world deserve fair compensation for the beatiful ingredients they produce
We want to provide the residents of SF, LA and NYC the best baked goods
Craft these beautiful baked goods!
Help our customers live their best life
Lead the team
We love diversity, we love the grind, we love your talent, we love YOU


nGage, the nCent Labs Worldwide Campus Founder's Program, is an organization of university-based blockchain clubs and initiatives to support nCent Nation. Read more about the program in our CEO's detailed Medium post here.
Email our founder<EMAIL_ADDRESS>to find out more.
* Connect: Connect your campus with nCent Labs. nCent will organize speaking events with our top-notch team of developers.
* Special Access: Get a first look at our new releases. Receive invitations to our conference and exclusive networking opportunities.
* Leadership: Earn a leadership role in organizing the buildCent grants for your university.
* Education: your club will promote understanding and adopting Blockchain technology.
* Practice: Organize hackathons, challenges, white paper reading groups and other events to exercise your knowledge about Blockchain.
* Diversity and Inclusivity: We want to help make the Blockchain community one that is diverse and inclusive.
Becoming a part of the nCent Campus Founders Program provides a leg up and guarantees your resume will be at the top of the pile for upcoming nCent undergraduate internship opportunities. Join our team at nCent Labs in creating a fairer, decentralized internet. We want to innovate with you.


Macaroon dessert tootsie roll chocolate bar dragée fruitcake tiramisu croissant pastry. Donut pie toffee brownie pudding dragée. Gingerbread liquorice pastry jelly tootsie roll jelly-o toffee pastry. Chocolate dessert jelly-o dragée jelly-o pastry bonbon icing. Cupcake gummi bears sugar plum sweet dragée jelly-o pudding. Gingerbread sesame snaps cheesecake. Topping pastry sesame snaps tootsie roll gummies. Gingerbread brownie soufflé lollipop jelly-o dessert dragée soufflé. Marzipan dessert croissant brownie dessert pie sugar plum jelly-o sweet roll. Cake cotton candy marzipan biscuit wafer toffee gingerbread oat cake icing. Brownie jelly wafer croissant. Tiramisu danish sugar plum dragée brownie bear claw bonbon sugar plum pastry. Apple pie dragée topping jelly beans.
Cotton candy chocolate bar brownie. Jelly oat cake tiramisu biscuit gummies cupcake chocolate cake caramels bear claw. Jelly croissant croissant cupcake oat cake dessert donut cupcake. Oat cake marzipan pie gingerbread cheesecake tootsie roll. Cheesecake pastry donut wafer pudding. Wafer macaroon carrot cake icing biscuit cheesecake candy canes bonbon. Tootsie roll pudding donut jelly-o. Cotton candy oat cake liquorice apple pie. Candy dragée muffin lollipop sweet sweet roll cookie lemon drops cake. Gummi bears donut candy jelly-o jelly beans muffin. Cookie marzipan marzipan pudding oat cake. Lemon drops lemon drops dragée oat cake oat cake. Cookie bonbon gummies chocolate bar.
Sweet roll icing marzipan toffee. Donut lollipop cheesecake cake. Wafer tiramisu candy toffee chocolate bar sweet croissant apple pie candy canes. Sesame snaps bonbon ice cream pudding cake marzipan donut tiramisu bear claw. Bear claw liquorice chocolate bar. Chocolate gingerbread macaroon tootsie roll oat cake sugar plum pie gingerbread. Lollipop croissant carrot cake lollipop sesame snaps pudding fruitcake. Sweet roll gummi bears jujubes liquorice. Tiramisu tiramisu sweet. Sweet pie jujubes cookie apple pie pudding oat cake tootsie roll soufflé. Oat cake tootsie roll jelly dragée carrot cake chupa chups biscuit caramels. Donut lemon drops muffin. Fruitcake apple pie cotton candy bonbon oat cake.
Marzipan gummi bears caramels gingerbread fruitcake bear claw lemon drops. Sesame snaps chocolate cake liquorice bear claw dragée. Bonbon cheesecake gummi bears powder topping. Tootsie roll caramels soufflé chocolate cake macaroon bonbon croissant ice cream. Marzipan gingerbread fruitcake donut toffee topping powder fruitcake biscuit. Jelly-o lemon drops gingerbread apple pie tart jelly carrot cake soufflé. Ice cream caramels pastry chocolate jelly. Marshmallow oat cake sweet roll. Jelly beans icing liquorice. Chupa chups lemon drops marshmallow biscuit liquorice chocolate sesame snaps. Sesame snaps jelly-o muffin biscuit pie. Tiramisu muffin jelly biscuit. Toffee tart brownie jelly muffin sugar plum.
Chupa chups jelly-o toffee donut chocolate bar pastry ice cream sweet croissant. Jelly beans carrot cake caramels. Wafer cotton candy gummies. Cake jelly-o wafer lemon drops oat cake cake. Dessert sweet roll wafer danish brownie marshmallow gummi bears. Lemon drops tart lollipop cupcake sugar plum jelly-o candy canes lemon drops. Icing carrot cake sweet croissant jelly croissant fruitcake carrot cake sugar plum. Pie sugar plum sweet cookie fruitcake sweet. Pudding topping pastry cake ice cream toffee carrot cake.  Cheesecake candy canes tiramisu carrot cake gingerbread. Jelly beans brownie carrot cake powder muffin brownie lemon drops. Bear claw pudding ice cream toffee jelly-o muffin cheesecake. Ice cream jelly beans candy caramels apple pie.
Cupcake jujubes wafer lemon drops. Pastry marshmallow carrot cake gummies lollipop. Chocolate cake oat cake dessert jelly-o chupa chups liquorice cupcake marshmallow cheesecake. Cake jelly gummi bears donut. Tart cake liquorice pastry halvah dessert sweet roll bear claw. Chupa chups chupa chups brownie sugar plum jelly beans jelly beans. Jelly-o sesame snaps tiramisu. Icing cupcake marzipan. Sweet chocolate cake fruitcake sweet roll pudding pudding liquorice. Cotton candy jujubes halvah gingerbread tart cotton candy muffin. Ice cream caramels croissant icing candy canes. Bear claw chocolate bar marshmallow sweet roll candy canes sugar plum cake danish. Jujubes tart dessert halvah ice cream.


The difference between involvement and commitment is like an eggs-and-ham breakfast:
the chicken was involved; the pig was committed.
Dicta, nostrum nemo soluta sapiente sit dolor quae voluptas quidem doloribus recusandae facere magni ullam suscipit sunt atque rerum eaque iusto facilis esse nam veniam incidunt officia perspiciatis at voluptatibus. Libero, aliquid illum possimus numquam fuga.


Last updated: 2017-08-25
Code version: c6a9a06
User could use Logolas for protein sequence motif plot as well, as its logo library includes all the English alphabets and the 20 amino acids have a 1-letter representation using English alphabets.
Note that all one needs to do to build the logo plots is to specify the row names and column names as per the the logos and the stack labels and then fix the colors for the logos.
The default background probability is uniform and user could specify the background probability for each amino acid. One common used is from the BLOSUM62.
library(Logolas)
library(grid)
counts_mat <- rbind(c(0, 0, 100, 1, 2), c(4, 3, 30, 35, 2),
c(100, 0, 10, 2, 7),rep(0,5),
c(4, 2, 3, 7, 70), c(1, 8, 0, 60, 3),
rep(0, 5), c(4, 2, 100, 1, 1),
c(12, 8, 16, 7, 20), c(55, 0, 1, 0, 12),
rep(0,5), c(rep(0,3), 20, 0),
rep(0,5), c(0, 0, 30, 0, 22),
c(1, 0, 12, 3, 10), rep(0,5),
c(0, 1, 0, 34, 1), c(0, 1, 12, 35, 1),
c(0, 30, 1, 10, 2), c(0, 1, 4, 100, 2))
rownames(counts_mat) <- c("A", "R", "N", "D","C", "E", "Q", "G",
"H", "I", "L", "K", "M", "F", "P", "S",
"T", "W", "Y", "V")
colnames(counts_mat) <- c("Pos 1", "Pos 2", "Pos 3", "Pos 4", "Pos 5")
cols1 <- c(rev(RColorBrewer::brewer.pal(12, "Paired"))[c(3,4,7,8,11,12,5,6,9,10)],
RColorBrewer::brewer.pal(12, "Set3")[c(1,2,5,8,9)],
RColorBrewer::brewer.pal(9, "Set1")[c(9,7)],
RColorBrewer::brewer.pal(8, "Dark2")[c(3,4,8)])
color_profile <- list("type" = "per_row",
"col" = cols1)
grid.newpage()
layout.rows <- 1
layout.cols <- 2
top.vp <- viewport(layout=grid.layout(layout.rows,layout.cols, widths=unit(rep(2,layout.cols), rep("null",layout.cols)),heights=unit(rep(2,1), rep("null",1))))
plot_reg <- vpList()
l <- 1
for(i in 1:layout.rows){
for(j in 1:layout.cols){
plot_reg[[l]] <- viewport(layout.pos.col = j, layout.pos.row = i, name = paste0("plotlogo", l))
l <- l+1
}
}
plot_tree <- vpTree(top.vp, plot_reg)
pushViewport(plot_tree)
seekViewport(paste0("plotlogo", 1))
logomaker(counts_mat,
color_profile = color_profile,
newpage = FALSE,
frame_width = 1)
seekViewport(paste0("plotlogo", 2))
logomaker(counts_mat,
color_profile = color_profile,
bg=c(0.074,0.052,0.045,0.054,0.025,0.034,0.054,0.074,0.026,0.068,0.099,0.058,0.025,0.047,0.039,0.057,0.051,0.013,0.034,0.073),
newpage = FALSE,
pop_name = 'Logo plot with Varying background prob',
frame_width = 1)
Position-specific scoring matrix(PSSM) is constructed from a multiple alignment of a set of sequences. If a residue at a particular position is highly conserved(high relative frequency), it is given a high positive socre and the other residues are given high negative score. All residues are given scores near zero if the residues are all weakly conserved at that position.
The function logo_pssm
plots the sequence logo based on the PSSM.
pssm
1 2 3 4 5 6 7 8 9
A -2 -2 -3 -3 -1 0 -4 -3 -1
R 1 -4 0 -1 -2 -2 -1 1 4
N 2 1 -4 -5 3 3 -4 -5 -2
D -2 0 -4 -5 -2 6 -5 -5 -2
C -4 -4 -3 -3 -4 -5 -4 -3 -5
Q 3 0 1 -3 1 2 -4 -3 1
E 2 -3 -3 -2 3 3 -2 -4 2
G -4 6 -5 -5 -1 -3 -5 -5 -3
H 2 -4 -4 -4 2 1 -2 -4 -2
I -3 -2 1 -1 -3 -5 -2 -1 -5
L -2 -5 4 5 0 -5 0 5 -4
K 4 -3 1 -4 2 -1 -4 -3 6
M -1 -4 3 0 1 -4 -2 1 -3
F -4 -5 -2 -1 -4 -5 7 -2 -5
P -3 -4 -4 0 -3 -3 -5 -5 -3
S 0 -1 -2 -2 0 -1 -4 -2 -2
T -1 -3 1 -3 0 -1 -4 -3 -2
W -4 -5 -4 7 -5 -5 -1 5 -5
Y -1 -5 -3 1 -3 -4 5 -2 -4
V 0 -4 1 -2 -1 -4 -1 0 -4
logo_pssm(pssm,
color_profile = color_profile,
frame_width = 1
)
Logolas could plot strings as logos. The first example is the cancer mutation signature. Detection of cancer mutaiton signatures is important in the study of the causes and mechanism of cancers. Usually we consider 6 possible mutation patterns(C to A/G/T, T to A/C/G). Suppose for a set of cell lines, we are provided data on the number of mutations (nucleotide substitions) and nucleotides at the flanking bases of the nucleotide substitution.
Shiraishi et al.(2015) proposed a parsimonious approach to model the mutation signatures, by assuming independence across mutation patterns. We apply it here on a demo example.
we use the symbols \(X>Y\) to denote the \(X\rightarrow Y\) substitutions. The data contains proportion of logos in each position : âˆ’2 left flanking, âˆ’1 left flanking, mutation, 1 right flanking and 2 right flanking. Note that \(X>Y\) type symbols occur only in the middle stack (column) as that is the mutation stack, while the nucleotides A, C, T and G occur only in the left two and right two flanking bases stacks (columns).
User may want to have the C in \(C>T\) to be of the same color as the C at the flankings and Logolas coloring profile provides the user the flexibility to color each symbol instead of a string. We use the color type per_symbol
instead of the per_row
profile we have been using so far. We consider a list of all symbols total_chars
which is set as default to the list chosen above (so you can skip the total_chars
argument below). However, if the user adds a symbol to the library (the process of doing that we show in the end), then the library is expected to grow and the user then might want to update the total_chars list by adding new symbols.
Another coloring option is per_column
, in which we have a specific color for a specific column. This sort of coloring might be useful when the user wants to highlight the difference between columns. We provide an example of this next.
mFile <- system.file("Exfiles/pwm1", package="seqLogo")
m <- read.table(mFile)
p <- seqLogo::makePWM(m)
pwm_mat <- slot(p,name = "pwm")
mat1 <- cbind(pwm_mat[,c(3,4)], rep(0,4), pwm_mat[,c(5,6)]);
colnames(mat1) <- c("-2", "-1", "0", "1", "2")
mat2 <- cbind(rep(0,6), rep(0,6),
c(0.5, 0.2, 0.2, 0.05, 0.05, 0),
rep(0,6), rep(0,6))
rownames(mat2) <- c("C>T", "C>A", "C>G",
"T>A", "T>C", "T>G")
table <- rbind(mat1, mat2)
library(grid)
grid.newpage()
layout.rows <- 1
layout.cols <- 2
top.vp <- viewport(layout=grid.layout(layout.rows, layout.cols,
widths=unit(rep(6,layout.cols), rep("null", 2)),
heights=unit(c(20,50), rep("lines", 2))))
plot_reg <- vpList()
l <- 1
for(i in 1:layout.rows){
for(j in 1:layout.cols){
plot_reg[[l]] <- viewport(layout.pos.col = j, layout.pos.row = i, name = paste0("plotlogo", l))
l <- l+1
}
}
plot_tree <- vpTree(top.vp, plot_reg)
pushViewport(plot_tree)
seekViewport(paste0("plotlogo", 1))
color_profile <- list("type" = "per_row",
"col" = RColorBrewer::brewer.pal(dim(table)[1],name ="Spectral"))
logomaker(table,
color_profile = color_profile,
frame_width = 1,
newpage = FALSE,
xlab = "Position",
ylab = "Information content")
seekViewport(paste0("plotlogo", 2))
cols = RColorBrewer::brewer.pal.info[RColorBrewer::brewer.pal.info$category == 'qual',]
col_vector = unlist(mapply(RColorBrewer::brewer.pal, cols$maxcolors, rownames(cols)))
total_chars = c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O",
"P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "zero", "one", "two",
"three", "four", "five", "six", "seven", "eight", "nine", "dot", "comma",
"dash", "colon", "semicolon", "leftarrow", "rightarrow")
set.seed(20)
color_profile <- list("type" = "per_symbol",
"col" = sample(col_vector, length(total_chars), replace=FALSE))
logomaker(table,
color_profile = color_profile,
total_chars = total_chars,
frame_width = 1,
newpage = FALSE,
xlab = "Position",
ylab = "Information content")
Logolas provides a handy visualization of strings, apart from the simple alphabet. We present two examples below.
In studies related to histone marks, one might be interested to see if certain histone marks are prominent than others in some cell lines or tissues or in some genomic regions. In this case, we apply Logolas on an example data from Koch et al (2007). The authors recorded number of histone modification sites identified by their algorithm which overlap with an intergenic sequence, intron, exon, gene start and gene end for the lymphoblastoid cell line, GM06990, in the ChIP-CHIP data. Note here that the histone mark symbols are alphanumeric, for example H3K4ME1.
mat <- rbind(c(326, 296, 81, 245, 71),
c(258, 228, 55, 273, 90),
c(145, 121, 29, 253, 85),
c(60, 52, 23, 180, 53),
c(150, 191, 63, 178, 63))
rownames(mat) <- c("H3K4ME1", "H3K4ME2", "H3K4ME3", "H3AC", "H4AC")
colnames(mat) <- c("Intergenic","Intron","Exon \n 1000 KB window",
"Gene start \n 1000 KB window","Gene end \n 1000 KB window")
color_profile <- list("type" = "per_row",
"col" = RColorBrewer::brewer.pal(dim(mat)[1],name ="Spectral"))
logomaker(mat,color_profile = color_profile,frame_width = 1)
From the plot, it’s practical to see how the patterns of histone modification sites changes across genomic region types for that cell line.
Further, the logos could include the punctuation marks as well like the full stop.
Here we build a logo plot of the field categories of manuscipts submitted on aRxiv by 4 professors from Department of Statistics, University of Chicago. Note that the field categories here are a combination of numbers, alphabets, dots and dashes.
library(aRxiv)
rec1 <- aRxiv::arxiv_search('au:"Matthew Stephens"', limit=50)
rec2 <- aRxiv::arxiv_search('au:"John Lafferty"', limit=50)
rec3 <- aRxiv::arxiv_search('au:"Wei Biao Wu"', limit=50)
rec4 <- aRxiv::arxiv_search('au:"Peter Mccullagh"', limit=50)
primary_categories_1 <- toupper(rec1$primary_category)
primary_categories_2 <- toupper(rec2$primary_category)
primary_categories_3 <- toupper(rec3$primary_category)
primary_categories_4 <- toupper(rec4$primary_category)
factor_levels <- unique(c(unique(primary_categories_1),
unique(primary_categories_2),
unique(primary_categories_3),
unique(primary_categories_4)))
primary_categories_1 <- factor(primary_categories_1, levels=factor_levels)
primary_categories_2 <- factor(primary_categories_2, levels=factor_levels)
primary_categories_3 <- factor(primary_categories_3, levels=factor_levels)
primary_categories_4 <- factor(primary_categories_4, levels=factor_levels)
tab_data <- cbind(table(primary_categories_1),
table(primary_categories_2),
table(primary_categories_3),
table(primary_categories_4))
colnames(tab_data) <- c("Matthew Stephens",
"John Lafferty",
"Wei Biao Wu",
"Peter McCullagh")
tab_data <- as.matrix(tab_data)
color_profile <- list("type" = "per_row",
"col" = RColorBrewer::brewer.pal(dim(tab_data)[1],
name = "Spectral"))
logomaker(tab_data,
color_profile = color_profile,
frame_width = 1,
pop_name = "arXiv field categories of UChicago STAT professors",
xlab = "Professors",
ylab = "Information content")
User could combine logo plots from Logolas with plots from the other R graphs such as R base graphics and ggplot2 graph.
library(ggplot2)
library(grid)
library(gridBase)
m = matrix(rep(0,48),4,12)
m[1,] = c(0,0,2.5,7,0,0,0,0,0,0,1,2)
m[2,] = c(4,6,3,1,0,0,0,0,0,5,0,2)
m[3,] = c(0,0,0,0,0,1,8,0,0,1,1,2)
m[4,] = c(4,2,2.5,0,8,7,0,8,8,2,6,2)
rownames(m) = c("A", "C", "G", "T")
colnames(m) = 1:12
m=m/8
color_profile = list("type" = "per_row",
"col" = RColorBrewer::brewer.pal(4,name ="Spectral"))
mtcars$gear <- factor(mtcars$gear,levels=c(3,4,5),
labels=c("3gears","4gears","5gears"))
mtcars$am <- factor(mtcars$am,levels=c(0,1),
labels=c("Automatic","Manual"))
mtcars$cyl <- factor(mtcars$cyl,levels=c(4,6,8),
labels=c("4cyl","6cyl","8cyl"))
grid.newpage()
layout.rows <- 2
layout.cols <- 2
top.vp <- viewport(layout=grid.layout(layout.rows, layout.cols,
widths=unit(rep(2,layout.cols), rep("null", layout.cols)),
heights=unit(rep(2,1), rep("null",1))))
plot_reg <- vpList()
l <- 1
for(i in 1:layout.rows){
for(j in 1:layout.cols){
plot_reg[[l]] <- viewport(layout.pos.col = j, layout.pos.row = i, name = paste0("plotlogo", l))
l <- l+1
}
}
plot_tree <- vpTree(top.vp, plot_reg)
pushViewport(plot_tree)
seekViewport(paste0("plotlogo", 1))
logomaker(m,xlab = 'position',color_profile = color_profile,
bg = c(0.28, 0.22, 0.24, 0.26),
frame_width = 1,
newpage = FALSE,
control = list(viewport.margin.left = 5))
seekViewport(paste0("plotlogo", 2))
vp3 = viewport(width=0.8, height=0.8, x = 0.5, y = 0.5)
p <- qplot(mpg, data=mtcars, geom="density")
print(p, vp = vp3)
seekViewport(paste0("plotlogo", 3))
vp3 = viewport(height = 1, width = 1)
pushViewport(vp3)
par(fig=gridFIG())
par(gridPAR())
par(new=TRUE)
par(mar = c(3, 3, 1, 1))
plot(1:10, type="b")
sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 15063)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] gridBase_0.4-7 ggplot2_2.2.1 aRxiv_0.5.16 dash_0.99.0
[5] SQUAREM_2016.8-2 Logolas_1.1.2
loaded via a namespace (and not attached):
[1] Rcpp_0.12.12 compiler_3.4.0 RColorBrewer_1.1-2
[4] git2r_0.18.0 plyr_1.8.4 tools_3.4.0
[7] digest_0.6.12 evaluate_0.10 tibble_1.3.3
[10] gtable_0.2.0 rlang_0.1.1 curl_2.5
[13] yaml_2.1.14 seqLogo_1.42.0 httr_1.2.1
[16] stringr_1.2.0 knitr_1.15.1 stats4_3.4.0
[19] rprojroot_1.2 R6_2.2.0 XML_3.98-1.6
[22] rmarkdown_1.6 magrittr_1.5 backports_1.0.5
[25] scales_0.4.1 htmltools_0.3.5 colorspace_1.3-2
[28] labeling_0.3 stringi_1.1.5 lazyeval_0.2.0
[31] munsell_0.4.3
This R Markdown site was created with workflowr


Description: Convert an array-like object into a true JavaScript array.
obj: PlainObject Any object to turn into a native Array.
Many methods, both in jQuery and in JavaScript in general, return objects that are array-like. For example, the jQuery factory function $()
returns a jQuery object that has many of the properties of an array (a length, the []
array access operator, etc.), but is not exactly the same as an array and lacks some of an array's built-in methods (such as .pop()
and .reverse()
).
Note that after the conversion, any special features the object had (such as the jQuery methods in our example) will no longer be present. The object is now a plain array.
<!DOCTYPE html>

First

Second

Third

Fourth

var obj = $('li');
var arr = $.makeArray(obj);
(typeof obj === 'object' && obj.jquery) === true;
jQuery.isArray(arr) === true;


Numerical Methods Projects
ME2016 @ Georgia Institute of Technology — Fall 2020
In my Numerical Methods course, we engaged in four different "Computing Projects" (CPs), each covering a different type of numerical method. Each project consisted of a real-world situation, a description of relevant mathematical models, and a set of tasks to complete. All the CPs involved writing MATLAB functions and scripts to solve said situations, and some CPs—namely CP1 and CP3—required a report analyzing and demonstrating the results. Below are brief descriptions of each CP along with links to the supporting files.
CP1: Curve Fitting Techniques
For this CP, I was tasked with analyzing the efficiency and vibration characteristics of an off-shore wind turbine. The object in question was a prototype Active Tuned Mass Damper (ATMD). The goal was to calculate pertinent values about the ATMD by implementing different curve-fitting techniques in MATLAB.
CP2: Root-finding & Numerical Integration
This CP focused on analyzing the efficiency of tidal energy generators. Given a few characteristics of the system, such as the blade diameter, mechanical efficiency, and experimental velocity data, I had to calculate the power coefficient. This was accomplished by implementing root-finding and numerical integration techniques in MATLAB.
CP3: Ordinary Differential Equations
Initial Value Problems
In this CP, I was once again tasked with analyzing the vibration characteristics of a wind turbine, but this time with a different approach and goal. The goal was to study the vibration of the turbine in response to external forces using a simple, single-degree of freedom system, modelled by a 2nd order ODE. Given some starting values, I had to implement various Runge-Kutta Methods as well as MATLAB's built-in functions to accurately predict the vibration of the system over time.
CP4: Ordinary Differential Equations
Boundary Value Problems
For the final CP, I was tasked with determining whether or not the material of the main shaft of a wind turbine could be modified for cost-effectiveness. Given specific characteristics of the system, I had to perform a torsion-vibration analysis utilizing the same concepts as CP3, but with a boundary value problem instead. Included in this CP was a handwritten section, which clearly outlines the steps taken to solve the given system.
These projects required me to think "out of the box," as they often had limitations on things like how many for-loops one could utilize, and they introduced real-world scenarios that were beyond my scope of prior knowledge. As a result, I managed to learn a significant amount and apply the skills I had learned both in previous courses as well as this one. As a final note, I received high marks on all of my CPs.


Both Ferrari drivers to blame for crash – Villeneuve
Both Ferrari drivers are to blame for their Interlagos crash
by A cura della RedazioneThat is the view of outspoken 1997 world champion Jacques Villeneuve, after team boss Mattia Binotto said of the incident: “It’s not for me to blame them”.
Villeneuve, however, told Sky Italia: “Vettel and Leclerc are allowed to fight among themselves, but they should not abuse this freedom.
“In my opinion, they are both to blame. Leclerc was too aggressive, and Vettel should not have immediately slammed the door when overtaking his teammate.
“They both made a mistake,” Villeneuve insisted.
“It was unnecessary, as they were fighting for third place at most. I think they just wanted to show everyone that they are the better one.”
Italy’s Corriere della Sera newspaper reports that Binotto will meet with Ferrari CEO Louis Camilleri at Maranello on Tuesday.
The report said they will discuss potential penalties for repeat incidents, including driver fines and other “disciplinary measures”.
Former Ferrari driver Rubens Barrichello, who was at Interlagos last Sunday, told Bild newspaper: “It was a misunderstanding between the two drivers and a sad day for Ferrari.”
As for 2020, both Sebastian Vettel and Charles Leclerc are staying put, but Sky Deutschland commentator Sascha Roos says Ferrari needs to plan ahead.
“I think they would be well advised to set a deadline,” he said. “For example, after the first four races of the season, a number 1 driver is made.”


Page maintained by Ke-Sen Huang.
If you have additions or changes, send an e-mail.
Note that when possible I link to the page containing the link to the actual PDF or PS of the preprint.
I prefer this as it gives some context to the paper and avoids possible copyright problems with direct linking.
Thus you may need to search on the page to find the actual document.
Changelog
RT 2008 paper slides can be downloaded from official page
Keynote Address
- Creating Coherence: Ray Tracing, Spatial Search, and Irregular Data Structures (PDF slides)
-
Michael McCool
- Ray Tracing: Strengths and Opportunities (PDF slides/PPTX slides)
-
Eric Haines
Session 1: Novel Acceleration Structures
- Ray-specialized Acceleration Structures for Ray Tracing
-
Warren Hunt,
William Mark
- Adaptive Acceleration Structures in Perspective Space
-
Warren Hunt,
William Mark
- Raytracing Prefiltered Occlusion for Aggregate Geometry
-
Dylan Lacewell,
Brent Burley,
Solomon Boulos,
Pete Shirley
- Row Tracing using Hierarchical Occlusion Maps (TR)
-
Ravi Kammaje,
Benjamin Mora
Session 2: Improving Traditional Acceleration Structures
- Improving kd-tree Quality at a Reasonable Construction Cost (PDF)
-
Alexei Soupikov, Maxim Shevtsov, Alexander Kapustin
- Tree Rotations for Improving Bounding Volume Hierarchies
-
Andrew Kensler
- Corrections to the Surface Area Metric with Respect to Mail-Boxing
-
Warren Hunt
- Fast Agglomerative Clustering for Rendering
-
Bruce Walter,
Kavita Bala,
Milind Kulkarni,
Keshav Pingali
Session 3: Bigger, Wider, Better
- Multi Bounding Volume Hierarchies
-
Manfred Ernst,
Gunther Greiner
- Large Ray Packets for Real-time Whitted Ray Tracing
-
Ryan Overbeck,
Ravi Ramamoorthi,
William R. Mark
- Getting Rid of Packets -- SIMD Single-Ray Traversal using Multi-Branching BVHs
-
Ingo Wald,
Carsten Benthin,
Solomon Boulos
- Coherent Ray Tracing via Stream Filtering
-
Christiaan P. Gribble,
Karthik Ramani
Session 4: Complex Effects
- Interactive Volumetric Shadows in Participating Media with Single-Scattering
-
Chris Wyman,
Shaun Ramsey
- Simulation of Fluorescent Concentrators
-
Marion Bendig,
Johannes Hanika,
Holger Dammertz,
Jan Christoph Goldschmidt,
Marius Peters, Michael Weber
- A Lighting Model for Fast Rendering of Forest Ecosystems
-
Robert Geist,
Jay Steele
- Towards Interactive Global Illumination Effects via Sequential Monte Carlo Adaptation
-
Vincent Pegoraro,
Carson Brownlee,
Pete Shirley,
Steven G. Parker
Session 5: New Traversal/Update Algorithms
- RTfact: Generic Concepts for Flexible and High Performance Ray Tracing
-
Iliyan Georgiev,
Philipp Slusallek
- Efficient Clustered BVH Update Algorithm for Highly-Dynamic Models
-
Kirill Garanzha
- Adaptive Ray Packet Reordering
-
Solomon Boulos,
Ingo Wald,
Carsten Benthin
- Interactive Particle Tracing in Dynamic Scenes consisting of NURBS Surfaces
-
Jakob Barz,
Oliver Abert,
Stefan Muller
Session 6: Modifications of Traditional Acceleration Structures
- SIMD Ray Tracing for Large Deformable Tetrahedral Meshes
-
Matthias Groß,
Hans Hagen,
Franz-Josef Pfreundt
- Edge Volume Heuristic - Robust Triangle Subdivision for Improved BVH Performance
-
Holger Dammertz,
Alexander Keller
- Ray Tracing with the BSP Tree
-
Thiago Ize,
Ingo Wald,
Steven G. Parker
- Accelerated Building and Ray Tracing of Restricted BSP Trees
-
Brian Budge,
Daniel Coming, Derek Norpchen,
Kenneth Joy
Posters
- Accelerating Ray Tracing using Constrained Tetrahedralizations
-
Ares Lagae,
Philip Dutré
- Run-Time Code Generation for Materials (PDF)
-
Stephan Reiter
- kd-Tree Traversal Techniques (PDF)
-
John A. Tsakok,
William Bishop,
Andrew Kennings
- Ray Tracing NPR-Style Feature Lines
-
A.N.M. Imroz Choudhury,
Steven G. Parker
kesen.huang@gmail.com


{% extends 'base.html' %} {% load humanize %} {% block title %}Forum{% endblock %} {% block content %}
| Title | Author | Activity |
|---|---|---|
| {{ thread.title }} | {{ thread.author }} | {{ thread.activity|naturaltime }} |
| No threads. |
| Title | Author | Activity |
|---|---|---|
| {{ thread.title }} | {{ thread.author }} | {{ thread.activity|naturaltime }} |
| No threads. |


Health Tech Sydney
March 2014
Hello!
- A little bit about me
- Who has heard of a maker space?
- What is a maker space?
Maker culture emphasises learning-through-doing (constructivism) in a social environment.
Maker culture emphasises informal, networked, peer-led, and shared learning motivated by fun and self-fulfilment.
- Wikipedia
About OzBerryPi
OzBerryPi Monthly Maker Space
Other Maker groups in Sydney
- Robots & Dinosaurs (Full workshop) - 10/27 Bank st, Meadowbank
- RobotDojo - Campbelltown
- Dorkbot Sydney - College of Fine Arts UNSW
- Mini Maker Faire Sydney - The Powerhouse Museum
Pro Maker - as a Service
- Rapid Internet of things prototypes
- Hardware MVPs
THE END
Thank you!
<EMAIL_ADDRESS>Twitter: @DrivenLogic


We are a group of young enthusiasts who is on a mission to provide Uzbekistan and the world with high-quality education at learners' comfort.
Join us and help others learn:
Email<EMAIL_ADDRESS>Telegram: @DostonbekToirov
Facebook
Telegram
Youtube
Linkedin


I am pursuing a degree in bsc in computer science from
thakur college of science and commerce kandivali(east)
I want to learn new skills and i am dedicated towards my work.
I want to join as intern to become precise in web development.
click below to download file
MY CERTIFICATES


{% extends "myhome_base.html" %} {% load i18n %} {% block main_panel %}
{% trans "This library is encrypted. Please input the password if you want to browse it online. And the password will be kept on the server for only 1 hour." %}
{% blocktrans %}You can change how to view encrypted libraries online here.{% endblocktrans %}


--- layout: post title: Apple Will Give You a Free PETAbyte To Develop On Its Newest Platform... thumbnail: /img/cloudkit.png published: true ---
Apple wants you to store your startup web-app's (yes web app) data with iCloud, and they're giving you a petabyte of free storage to do so. (For those scoring at home, a petabyte is 1 million gigabytes).
According to a calculator available on Apple's website, that petabyte should be enough for about 10 million free users.
Cloudkit.js also comes with a dashboard for watching and managing usage, including total users, active users, and database storage.
The interface is very reminiscent of Parse, a similar developer service bought a few years ago by Facebook to strengthen its own developer eco-system.
It's a really unprecedented move, but one that makes sense for Apple in this competitive landscape. Amazon, Google, Microsoft, and Facebook have been courting startups to their own ecosystems with large discounts, so that they can keep a close eye on hot startups, and buy them when the time is right. Companies like Netflix use Amazon's Amazon Web Services, and companies like Snapchat use Google's Cloud code.
This massive offering is sure to give Apple a chance at luring some of these startups to its own eco-system, and build relationships. These relationships give them the edge in partnerships and acquisitions, and also help to keep the best developers developing for iOS first.
Cloudkit.js is available to everyone, now. Check it out here.


Blog – As-Syariah Bordir – Jasa Bordir Tasikmalaya
Toggle navigation
As-Syariah Bordir
Back Home
Next you can update your site name.
Read More
Next you can update your site name.
Read More
Next you can update your site name.
Read More
Next you can update your site name.
Read More


Several shops closed in Oman due to violations
by Times News ServiceMuscat: An inspection by concerned teams of Muscat Municipality, of commercial shops and stores to ensure compliance with rules has resulted in the closure of several shops.
A statement published online by Muscat Municipality said, “Muscat Municipality has closed a number of shops and multi-purpose stores because of the practice of carrying on activities without municipal licenses, and some of them for expiry of the license to practice those activities.”
“The Municipality emphasises the importance of licenses as a protection for the legality of the activity and commitment to the requirements associated with the law," Muscat Municipality added


I have setup my arduino with shield connected to the raspberry pi via usb.
This works very well, and posting to emoncms.org also works
But the data doesn't show up locally
I've set the logging level to debug, but don't see any errors. I only see communication with emoncms.org but nothing locally.
What did I do wrong?
part of my emonhub.conf file
######################################################
####################### Reporters #######################
######################################################
[reporters][[emonCMSlocal]]
type = EmonHubEmoncmsReporter
[[[init_settings]]]
[[[runtime_settings]]]
url = http://<IP_ADDRESS>/emoncms
apikey = xxxxxxxxxapikeylocalxxxxxxxxxxxx# This reporter sends data to emonCMS
[[emonCMSremote]]
Type = EmonHubEmoncmsReporter
[[[init_settings]]]
[[[runtimesettings]]]
url = http://emoncms.org
apikey = xxxxxxxxxapikeyremotexxxxxxxxxx#######################################################
####################### Interfacers #######################
#######################################################
[interfacers]# This interfacer manages the RFM2Pi module
[[SerialDirect]]Type = EmonHubSerialInterfacer
[[[init_settings]]]
com_port = /dev/ttyACM0
com_baud = 9600
[[[runtimesettings]]]####################################################
####################### Nodes #######################
####################################################
[nodes]# List of nodes by node ID
# 'datacode' is default for node and 'datacodes' are per value data codes.
# if both are present 'datacode' is ignored in favour of 'datacodes'
[[99]]
datacode = h
datacodes = l, h, h, h,
Edit - shortened comment lines to fix line wrapping - BT
Re: posting to emoncms.org works but local fails
I'm not sure if
url = http://<IP_ADDRESS>/emoncms
will resolve correctly. the usual entry is
url = http://localhost/emoncms
and if that doesn't work we tend to use
url = http://IP.ADD.OF.HOST/emoncms
assuming you have assigned if a fixed IP at your router
That doesn't sound quite right, I would expect there to be something! there should be some logged attempts to send (regardless of whether they are successful or not) unless the reporter failed to create at startup (which should be logged too)
Ahhah!!! Remove the underscore from "runtime_settings"! if it can't find "runtimesettings" it will not create the reporter.
Paul
Re: posting to emoncms.org works but local fails
Thanks! Found another typo, now it works perfect.


In this Nanodegree we have 5 ultimate purposes. These are:
1) Procedural Thinking
2) Abstract Thinking
3) Systems Thinking
4) Technological Emphaty
5) Debugging
* Text content - what you see
* Markup - what it looks like
* References to other documents - e.g. images or videos
* Links to other pages
<TAG ATTR="value"> contents </TAG>
Such a great website! Thanks!
alt="text" property is required because both to acknowledge broken requests and to help visually impaired viewers
image tag doesn't have a closing tag because it doesn't have any content
this kind of tags are called "VOID" tags


Search
Preparing search index...
The search index is not available
kila
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"index"
Module "index"
Index
References
Ambient
Light
Area
Light
Basic
Material
Box
Geometry
Camera
Color
Data
Texture
Direction
Light
EPSILON
Euler
Euler
Notifier
Event
Object
Event
Object
Node
Game
Object
Geometry
Geometry
Data
Geometry
Material
Lazy
Texture
Light
Light
Manager
Light
Type
Material
Matrix3
Matrix4
Matrix4
Notifier
Mesh
Perspective
Camera
Plane
Plane
Geometry
Point
Light
Pool
Program
Quaternion
Render
Info
Render
List
Render
Options
Scene
Shader
Sphere
Spot
Light
Stats
Texture
Texture
Options
Ticker
Transform
Utils
Vector2
Vector3
Vector3
Notifier
Vector4
Vertex
Array
Object
WebGLRenderer
WebGLResource
Manager
WebGLState
browser
buffer
Util
gl
Constants
gl
Extensions
Constant
i
Bounds
i
Light
Info
i
Scene
Params
log
math
semantic
vertex
Type
References
Ambient
Light
Re-exports
AmbientLight
Area
Light
Re-exports
AreaLight
Basic
Material
Re-exports
BasicMaterial
Box
Geometry
Re-exports
BoxGeometry
Camera
Re-exports
Camera
Color
Re-exports
Color
Data
Texture
Re-exports
DataTexture
Direction
Light
Re-exports
DirectionLight
EPSILON
Re-exports
EPSILON
Euler
Re-exports
Euler
Euler
Notifier
Re-exports
EulerNotifier
Event
Object
Re-exports
EventObject
Event
Object
Node
Re-exports
EventObjectNode
Game
Object
Re-exports
GameObject
Geometry
Re-exports
Geometry
Geometry
Data
Re-exports
GeometryData
Geometry
Material
Re-exports
GeometryMaterial
Lazy
Texture
Re-exports
LazyTexture
Light
Re-exports
Light
Light
Manager
Re-exports
LightManager
Light
Type
Re-exports
LightType
Material
Re-exports
Material
Matrix3
Re-exports
Matrix3
Matrix4
Re-exports
Matrix4
Matrix4
Notifier
Re-exports
Matrix4Notifier
Mesh
Re-exports
Mesh
Perspective
Camera
Re-exports
PerspectiveCamera
Plane
Re-exports
Plane
Plane
Geometry
Re-exports
PlaneGeometry
Point
Light
Re-exports
PointLight
Pool
Re-exports
Pool
Program
Re-exports
Program
Quaternion
Re-exports
Quaternion
Render
Info
Re-exports
RenderInfo
Render
List
Re-exports
RenderList
Render
Options
Re-exports
RenderOptions
Scene
Re-exports
Scene
Shader
Re-exports
Shader
Sphere
Re-exports
Sphere
Spot
Light
Re-exports
SpotLight
Stats
Re-exports
Stats
Texture
Re-exports
Texture
Texture
Options
Re-exports
TextureOptions
Ticker
Re-exports
Ticker
Transform
Re-exports
Transform
Utils
Re-exports
Utils
Vector2
Re-exports
Vector2
Vector3
Re-exports
Vector3
Vector3
Notifier
Re-exports
Vector3Notifier
Vector4
Re-exports
Vector4
Vertex
Array
Object
Re-exports
VertexArrayObject
WebGLRenderer
Re-exports
WebGLRenderer
WebGLResource
Manager
Re-exports
WebGLResourceManager
WebGLState
Re-exports
WebGLState
browser
Re-exports
browser
buffer
Util
Re-exports
bufferUtil
gl
Constants
Re-exports
glConstants
gl
Extensions
Constant
Re-exports
glExtensionsConstant
i
Bounds
Re-exports
iBounds
i
Light
Info
Re-exports
iLightInfo
i
Scene
Params
Re-exports
iSceneParams
log
Re-exports
log
math
Re-exports
math
semantic
Re-exports
semantic
vertex
Type
Re-exports
vertexType
Globals
"index"
Ambient
Light
Area
Light
Basic
Material
Box
Geometry
Camera
Color
Data
Texture
Direction
Light
EPSILON
Euler
Euler
Notifier
Event
Object
Event
Object
Node
Game
Object
Geometry
Geometry
Data
Geometry
Material
Lazy
Texture
Light
Light
Manager
Light
Type
Material
Matrix3
Matrix4
Matrix4
Notifier
Mesh
Perspective
Camera
Plane
Plane
Geometry
Point
Light
Pool
Program
Quaternion
Render
Info
Render
List
Render
Options
Scene
Shader
Sphere
Spot
Light
Stats
Texture
Texture
Options
Ticker
Transform
Utils
Vector2
Vector3
Vector3
Notifier
Vector4
Vertex
Array
Object
WebGLRenderer
WebGLResource
Manager
WebGLState
browser
buffer
Util
gl
Constants
gl
Extensions
Constant
i
Bounds
i
Light
Info
i
Scene
Params
log
math
semantic
vertex
Type
Generated using
TypeDoc


| Package | com.whirled.contrib.card |
| Class | public class Sorter |
| Property | Defined by | ||
|---|---|---|---|
| _rankOrder : int | Sorter | ||
| _suitOrder : Array | Sorter |
| Method | Defined by | ||
|---|---|---|---|
|
Sorter(rankOrder:int, suitOrder:Array)
| Sorter | ||
|
Insert some new cards into a previously sorted array.
| Sorter | ||
|
Sort an array of cards.
| Sorter |
| _rankOrder | property |
protected var _rankOrder:int
| _suitOrder | property |
protected var _suitOrder:Array
| Sorter | () | constructor |
public function Sorter(rankOrder:int, suitOrder:Array)
Parameters
rankOrder:int |
|
suitOrder:Array |
| insert | () | method |
public function insert(newCards:CardArray, cards:CardArray):void
Insert some new cards into a previously sorted array.
ParametersnewCards:CardArray — the incoming cards
|
|
cards:CardArray — the previously sorted array
|
| sort | () | method |


My Profile
Promotion
Change Password
Change Level -2 Password
Wallet Address Binding
Social Number Ninding
Note
Home
News
Trading
Transaction
My Profile
Logout


{% extends "layout.html" %} {% block content %}
Below you will find descriptions of some small programs that I have recently written. All of the source code is available on my GitHub page. Feel free to view, download, or modify any of these programs. Let me know if you make any improvements!
| Program | Description |
|---|---|
| This webpage | I am currently in the process of finishing up a version of this webpage that is powered by the Flask microdevelopment framework for Python. The contact form is the obvious change on the surface. Check it out and let me know if you have any suggestions. Thanks to Jenil Gogari and Thomas Park for the awesome bootswatch! |
| UDHR language ID | This program is inspired by chapter 3, exercise 43 of the NLTK book. The program checks an input text file (UTF-8 encoding) against the UDHR corpus for English, French, German, Italian, Portuguese, and Spanish. The program ranks the liklihood that the input text is a match for one of these languages and returns the most likely language match. |
| Reference checker | This is a reference checker that I created to help ensure that all of the in-text citations in my dissertation also appear on the references page and vice-versa.It uses regular expressions to search for the relevant information. In order to use the reference checker, you will need two plain text files. The first file is the actual paper, article, dissertation, etc. and the second file is the references page. |
| Flashcards | This flash card program takes the basic idea of practicing vocabulary (or anything, really) with flashcards, and adds a dynamic component. There are five interactive boxes and all of your words begin in the first box. As you practice words and get them correct, they automatically move from the current box to the next box. All words that you have successfully learned (i.e., gotten correct five consecutive times) are collected in the sixth box, where they can't be practiced anymore. If you ever make a mistake with a given word, it is sent back to the first box and it must be practiced again. |
| Tic-tac-toe | This is a simple tic-tac-toe game I created over while taking a break from dissertation writing. The function that checks for winners works, but it's ugly and needs to be refined. The AI could also be beefed up. |


The cowboy_websocket_handler
behaviour defines the interface used by Websocket handlers.
The init/3
and websocket_init/3
callbacks will always be called, followed by zero or more calls to websocket_handle/3
and websocket_info/3
. The websocket_terminate/3
will always be called last.
None.
Types:
Upgrade the protocol to cowboy_websocket
.
Types:
Initialize the state for this session.
This function is called before the upgrade to Websocket occurs. It can be used to negotiate Websocket protocol extensions with the client. It will typically be used to register this process to an event manager or a message queue in order to receive the messages the handler wants to process.
The connection will stay up for a duration of up to Timeout
milliseconds after it last received data from the socket, at which point it will stop and close the connection. By default this value is set to infinity
. It is recommended to either set this value or ensure by any other mechanism that the handler will be closed after a certain period of inactivity.
The hibernate
option will hibernate the process until it starts receiving either data from the Websocket connection or Erlang messages.
The shutdown
return value can be used to close the connection before upgrading to Websocket.
Types:
Handle the data received from the Websocket connection.
This function will be called every time data is received from the Websocket connection.
The shutdown
return value can be used to close the connection. A close reply will also result in the connection being closed.
The hibernate
option will hibernate the process until it receives new data from the Websocket connection or an Erlang message.
Types:
Handle the Erlang message received.
This function will be called every time an Erlang message has been received. The message can be any Erlang term.
The shutdown
return value can be used to close the connection. A close reply will also result in the connection being closed.
The hibernate
option will hibernate the process until it receives another message or new data from the Websocket connection.
Types:
Perform any necessary cleanup of the state.
The connection will be closed and the process stopped right after this call.


For five years, I taught in the Children’s Studies program at Eastern Washington University, an interdisciplinary academic field which treats children and their experiences holistically and strives to incorporate their rights and perspectives into the research about their lives. I’m also involved in the worlds of Playwork and adventure playgrounds, DIY/Maker culture with kids, and Reggio Emilia-inspired early childhood education. To date, I’ve accidentally been called “Mom” by kids of all ages more times than I can count (a compliment I consider of the highest order).
Currently, I’m taking a break from the academic world as I work on several writing projects and screenplays. I’m always open to new opportunities, though, so if you have something in mind,
A bit of everything. I like to say that I’m a Professional Big Kid — I’m at my best when I’m working/playing with kids (usually in an ethnographic capacity), helping to translate and share their perspectives and experiences with “the grown-ups.” That might sound kinda silly, but over time I’ve realized there’s


Toggle navigation
HyGo
Home
Blogs
Posts
About
Login
Servirall
Videos
Google Info
PIL
PicScrapper
Rest API
Wow!!!
Go
Frequently asked questions
Git
Go comipler
Sublime text 3
Atom for MAC
Databases
MySQL
MySQL installation
Web frameworks
Iris
Echo
Beego
Martini
3351 clicks
after 20 June 2017
Hi
Dear!!!
Wecome to HyGo
{{ obj.description }}
Posted on »
{{ obj.created_at }}
Write a new post
Post a video
Go is great.
It has Nice error handling concept, variable declaration syntaxes, concurrency and many more
References
gobyexample.com
tutorialspoint.com
dotnetperls.com
Take a tour on Golang
Best practices on golang(slides)
Nice Links for Go
How to write Go code
Github notes
Python Resources
50 best websites to learn Python
Python 2
Pytohn 3
Codecademy (learn & practice)
CSS
Getting to know CSS
w3Schools
Multiple media queries
w3.css (Modern framework)


Comparison constraints are able to test whether one value is greater or less than another. Comparison constraints work on numeric values, as well as other objects that implement IComparable.
| Syntax Helper | Constructor | Operation |
|---|---|---|
| Is.GreaterThan( IComparable ) | GreaterThanConstraint( IComparable ) | tests that one value is greater than another |
| Is.GreaterThanOrEqualTo( IComparable ) | GreaterThanOrEqualConstraint( IComparable ) | tests that one value is greater than or equal to another |
| Is.AtLeast( IComparable ) | GreaterThanOrEqualConstraint( IComparable ) | tests that one value is greater than or equal to another |
| Is.LessThan( IComparable ) | LessThanConstraint( IComparable ) | tests that one value is less than another |
| Is.LessThanOrEqualTo( IComparable ) | LessThanOrEqualConstraint( IComparable ) | tests that one value is less than or equal to another |
| Is.AtMost( IComparable ) | LessThanOrEqualConstraint( IComparable ) | tests that one value is less than or equal to another |
Assert.That(7, Is.GreaterThan(3)); Assert.That(7, Is.GreaterThanOrEqualTo(3)); Assert.That(7, Is.AtLeast(3)); Assert.That(7, Is.GreaterThanOrEqualTo(7)); Assert.That(7, Is.AtLeast(7)); Assert.That(3, Is.LessThan(7)); Assert.That(3, Is.LessThanOrEqualTo(7)); Assert.That(3, Is.AtMost(7)); Assert.That(3, Is.LessThanOrEqualTo(3)); Assert.That(3, Is.AtMost(3)); // Using Inheritance Expect( 7, GreaterThan(3)); Expect( 3, AtMost(7));


--- layout: post title: MemoryFinder.lookup date: 2011-10-07 21:58:01.000000000 -07:00 type: post published: true status: publish categories: tags: [] meta: _edit_last: '1' author: login: admin email<EMAIL_ADDRESS>display_name: admin first_name: Carina C. last_name: Zon ---
Ingenious. Simple. If you program in Ruby, check out the handy-dandy MethodFinder utility. It's a prompt for your memory when you only almost remember which method name you want. Or when you have no idea altogether. You just give it a receiver and desired return value; it gives you a list of methods which, when sent to the receiver, return the specified value.
$ gem install methodfinder
(The method_finder gem is unrelated)
If you require it in .irbrc
, then irb sessions will have MethodFinder available automatically.
# .irbrc
begin; require 'methodfinder'; rescue LoadError => err; warn "#{err}"; end
Now let's fire up irb
$ irb
irb > MethodFinder.find('a', 0)
=> [:oct, :to_c, :to_f, :to_i, :to_r]
irb > MethodFinder.find('a', 1)
=> [:bytesize, :length, :size]
irb > MethodFinder.find('a', :a)
=> [:intern, :to_sym]
irb > MethodFinder.find('a', String)
=> [:class]
irb > MethodFinder.find(10, 100)
=> [:abs2]
irb > MethodFinder.find(10,11)
=> [:next, :succ]
irb > MethodFinder.find('abc', 'Abc')
=> [:capitalize, :capitalize!]
irb > MethodFinder.find('abc', 'cba')
=> [:reverse, :reverse!]
irb > MethodFinder.find('abc', 'a')
=> [:chr]
irb > MethodFinder.find('abc', 'ab')
=> [:chop, :chop!]
irb > MethodFinder.find('abc', :abc)
=> [:intern, :to_sym]
irb > MethodFinder.find('abc', 'ABC')
=> [:swapcase, :swapcase!, :upcase, :upcase!]
irb > MethodFinder.find(0, true)
=> [:even?, :frozen?, :integer?, :real?, :zero?]
irb > MethodFinder.find(0, false)
=> [:!, :nil?, :odd?, :tainted?, :untrusted?]
MethodFinder is looking for return value, so keep in mind that some methods don't have the return value that one might expect them to. For instance, IO#puts
, IO#print
, and IO#printf
send to standard out (
The documentation demonstrates that more complex and/or granular searches are possible too. You can inquire what method to use within a supplied block, for instance.