Multiple Alternative Audio Tracks
Check the source of this page and the console for detailed information on this example


Gerrit Workflow
KUnit can refer both to the unit testing code within the Linux kernel and to the project as a whole, which includes some other supporting code. The meaning is usually clear when used in context.
With that said, KUnit, as a project, is made up of several repositories. As mentioned elsewhere, the actual KUnit unit testing code is in the upstream Linux kernel. All our other code is in Gerrit. For an introduction to Gerrit (with a high level overview of git), see https://gerrit-review.googlesource.com/Documentation/intro-user.html. For detailed introduction to git, see https://try.github.io.
Starting from Scratch
This section describes how to start a change from scratch.
Cloning a repo for the first time
If you have not done so yet, clone the repository you want to make changes to. For example:
git clone https://kunit.googlesource.com/prow-presubmit
Checkout the desired branch
Checkout the branch on which you want to make changes to. For example:
git checkout master
Make sure your branch is up to date
If you have not done so in a while, you will need to update your repo and
branches. Your remote references can be updated with the fetch
command. For
example:
git fetch origin
where origin
it the name of the KUnit remote, by default origin
is the
name of the repository that was cloned.
Now that you have updated your remote references, you need to update the local branch you will be working on. If this branch is only local to your repository, you may need to rebase it on the remote branch you are trying to get your changes into (in this case, you would already have changes underway. See Updating Existing Changes for more information.); here we assume that is not the case. Update your branch with the pull command. For example:
git pull origin -ff
-ff
forces git not to merge upstream changes into your branch. This is
important as we, the KUnit project, do not want merge commits in our git repos.
This command will fail if you have local changes.
Making a change
Once you have made a change, that you are happy with and would like to send up
for review you first need to commit
the change.
Your commit message should have a:
subject - line on top that provides a vague idea of what you are doing.
body - which describes in more detail what you are doing.
The bottome of your commit message should have:
Change-Id
- see https://gerrit-review.googlesource.com/Documentation/user-changeid.html for more information.Signed-off-by
- see https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
Sending changes for review
Now that you are happy with your commits, you need to send them for review.
This is done by pushing them to Gerrit with the push
command. For example,
let’s say you want your changes to be submitted on master
branch, and origin
is the prow-presubmit repo:
git push -u origin HEAD:refs/for/master
If pushing succeeds, Gerrit will respond by printing out the link where you can find the review.
Updating Existing Changes
This section describes how to update your or another user’s changes.
Checking out someone else’s changes
Gerrit allows users to take over changes made by other users. This can be done by checking out a change that is currently under review (and then pushing modified versions of those changes). Let’s say there is a change at https://kunit-review.googlesource.com/c/prow-presubmit/+/2569; you can checkout this change and its dependencies by clicking on the download button; it will provide you several options, the first option provides a git command that you can copy to your command line and run, such as:
git fetch "https://kunit.googlesource.com/prow-presubmit" refs/changes/69/2569/1 && git checkout FETCH_HEAD
Tip
You can also use this to checkout changes that you have misplaced or lost.
Updating changes
Once you have checked out the changes that you need to update, you may want to update them, as the branch you are looking to submit to may have progressed; this can be accomplished by rebasing against the branch you want to submit to. For example:
git rebase master
Now you need to modify the commits to address reviewer’s comments, or maybe you realized that you forgot something that should be in an earlier commit. Modifying commits may be accomplished with interactive rebase. Interactive rebase is a very powerful git command and is discussed in some detail here: https://dev.to/blakedeboer/beginners-guide-to-interactive-rebasing-1ob.
You might start an interactive rebase with:
git rebase -i master
Note
Only modify commits that are actually under review; changing commits that have already been checked in will cause Gerrit to yell at you.
Sending changes for review (again)
All you need to do to update your changes on Gerrit under review is to push your modified commits to the same branch that you would have as if you were pushing for the first time.
For example, let’s say you want to submit your changes to master
; you would
then
git push -u origin HEAD:refs/for/master
You may wonder how Gerrit knows to replace the old commits at this location
with the ones that you modified; the secret is the Change-Id
. A Change-Id
should almost never be changed when updating a commit; it tells Gerrit that
the commit is the same commit as before even though everything else may have
changed about the commit (including the commit hash).


Here's a
link
. And another link: http://crazzyfolds.io
Aaaand another one: http://google.com
And another...https://google.com?q=voila/name=nope
https://.


Home / Men / New Arrivals
Worldwide delivery on all. Authorit tively morph next-generation innov tion with extensive models.
Worldwide delivery on all. Authorit tively morph next-generation innov tion with extensive models.
Worldwide delivery on all. Authorit tively morph next-generation innov tion with extensive models.


"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Find Out More about meI'm a student of Softwaredevelopment and Businessmanagement at TU Graz.
I'm 22 years old and live in Graz.
I like coding especially for mobile devices.
For more detailed info have a look at my Github Account , CV or LinkedIn.
Get more information about me and my work in my CV.
Ready to start your next project with me? That's great! Give me a call or send me an email and I will get back to you as soon as possible!
+43<PHONE_NUMBER>


NAMEI
Section: User Commands (1)Updated: Local
Index Return to Main Contents
NAME
namei - follow a pathname until a terminal point is foundSYNOPSIS
namei [options] pathname...DESCRIPTION
Namei uses its arguments as pathnames to any type of Unix file (symlinks, files, directories, and so forth). Namei then follows each pathname until a terminal point is found (a file, directory, char device, etc). If it finds a symbolic link, we show the link, and start following it, indenting the output to show the context.This program is useful for finding a "too many levels of symbolic links" problems.
For each line output, namei outputs a the following characters to identify the file types found:
f: = the pathname we are currently trying to resolve d = directory l = symbolic link (both the link and it's contents are output) s = socket b = block device c = character device p = FIFO (named pipe) - = regular file ? = an error of some kind
Namei prints an informative message when the maximum number of symbolic links this system can have has been exceeded.
OPTIONS
- -l, --long
- Use a long listing format (same as -m -o -v).
- -m, --modes
- Show the mode bits of each file type in the style of ls(1), for example 'rwxr-xr-x'.
- -o, --owners
- Show owner and group name of each file.
- -n, --nosymlinks
- Don't follow symlinks.
- -v, --vertical
- Vertical align of modes and owners.
- -x, --mountpoints
- Show mount point directories with a 'D', rather than a 'd'.
AUTHOR
The original namei program was written by Roger Southwick<EMAIL_ADDRESS>program was re-written by Karel Zak<EMAIL_ADDRESS>BUGS
To be discovered.SEE ALSO
ls(1), stat(1)AVAILABILITY
The namei command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
Index
This document was created by man2html, using the manual pages.
Time: 05:29:06 GMT, December 24, 2015


NOTE:
Viewing file:
Viewing information for Tile: 0
Memory:
Layer:
Location:
Validation finished
Errors:


Given a=b; when variable is passed by value change one variable doesn't affect the other
Given a=b; when variable is passed by reference change one variable does affect the other
Primitive data types are passed by value, while objects are passed by reference


This webapp shows data from ODA databases. From the drop down list, select which database you would like to visit.


The main type of document on the web is HTML.
The web consits out of computers that communicate with each other. When a person goes to a web
page, the computer sends
a HTTP Request to a server. The
server finds the appropriate HTML document and sends
it back to the user's computer where a web browser
interprets the page and displays it on the user's screen.
HTML
HTML stands for Hypertext Markup Language. HTML documents form the majority of the content on the web. HTML documents contain text content which describes "what you see" and markup which describes "how it looks".
The HTML markup consist of an opening tag and a closing tag while the whole thing is called an element. In general there is:
-- "b" in order to bold something
-- "em" in order to italicize something
Generally an HTML tag is always contained within angled brackets. Most tags have an opening tag and a closing tag. Some tags (called "void" tags) do not require a closing tag.
Element: An HTML element refers to everything within a set of opening and closing tags.
Attribute: This is a property of an HTML element.
HTML documents are made of HTML elements. When
writing HTML, we tell browsers the type of each element by using HTML tags. In general tags can have multipe attributes.
Anchors are for making links. The tags use the href attribute which includes the actual link.
There is also an image tag which uses the "src" attribute. Important here is that the image tag is a so called "void tag". It doesn't have any content and therefore doesn't have a closing tag. An image is included by: "img src="url" alt="text". The text gets discplyed when the images is not there.
HTML elements are either inline or block. Block
elements form an "invisible box" around the content inside of
them.
Text is displayed on multiple lines.
In order to break text one need to use the "br" tag which is an inline-element. Alternatively one can use the "p" tag which stands for paragraph and which is a block-element.


Mason Market
Toggle navigation
Advanced Search
Menu
About
GMU
Help
Log In
Sign Up
Search
Condition:
Excellent
Good
Acceptable
Worn
Max Price:
price
Search
A more specific way to search for the books you need.


Hi, I'm a Full Stack Drupal Developer experienced in Site building, Theming and Custom Module Development.
This is my portfolio of front-end projects that I did for my Front-end certification at FreeCodeCamp.


See: Description
| Class | Description |
|---|---|
| EntityManagerInstancesCreator |
EntityManagerInstancesCreater is a class, that is used to create
EntityManager
objects used by Data Access Objects. |
| JPAAbstractEntity |
From
JPAAbstractEntity class are all JPA entity classes
inherited, that are used for database access. |
| JPAAgentInfo |
Class
JPAAgentInfo represents a record about an agent available in pikater. |
| JPAAttributeCategoricalMetaData |
Class
JPAAttributeCategoricalMetaData represents a record about
metadata of dataset's one categorical attribute. |
| JPAAttributeMetaData |
Class
JPAAttributeMetaData represents a record about dataset's attribute, containing
data about common attribute properties (e.g. whether the attribute is target or not). |
| JPAAttributeNumericalMetaData |
Class
JPAAttributeNumericalMetaData represents a recourd about dataset's
one numerical attribute. |
| JPABatch |
Class
JPABatch represents record about a computation batch. |
| JPADataSetLO |
Class
JPADataSetLO represents record about the datasets available in the database. |
| JPAExperiment |
Class
JPAExperiment represents record about the experiment, that
is part of a batch. |
| JPAExternalAgent |
Class
JPAExternalAgent represents a record about external agents. |
| JPAFilemapping |
Class
JPAFilemapping represents record about mappings of external filenames
to internal filenames. |
| JPAGlobalMetaData |
Class
JPAGlobalMetaData represents record about global metadata of a dataset. |
| JPAModel |
Class
JPAModel represents record about a trained agent - model. |
| JPAResult |
Class
JPAResult represents record about experiment's result. |
| JPARole |
Class
JPARole represents record about roles in pikater. |
| JPATaskType |
Class
JPATaskType represents record about the task types, that can
be performed on the datasets. |
| JPAUser |
Class
JPAUser represents record about user of system. |
| JPAUserPriviledge |
Class
JPAUserPriviledge represents record about the user priviledge. |
| Enum | Description |
|---|---|
| PikaterPriviledge | |
| PikaterRole |
This particular package contains JPA entity classes with JPA- prefix in their class names.
Functionality for retrieving and creating these entities are within subpackage org.pikater.shared.database.jpa.daos
.
org.pikater.shared.database.jpa.daos


Xalan-Java DTM
Introduction
The Document Table Model (DTM) is an interface to a Document Model designed specifically for the needs of our XPath and XSLT implementations. The motivation behind this model is to optimize performance and minimize storage.
Specifically, DTM avoids the overhead of instantiating the objects the standard DOM requires to represent a tree of nodes. DTM uses unique integer "handles" to identify nodes, integer ID values to represent URLs, local names, and expanded names, and integer index and length references to a string buffer to represent the text value of each node.
In general, the "read" APIs to DTM resemble those of the W3C Document Object Model (DOM) interface. However, in place of the DOM object tree of nodes, DTM uses integer arrays and string pools to represent the structure and content of the XML document to be transformed. DTM also structures the document's contents slightly differently, to better match the XPath data model; some details and constraints present in a standard DOM are suppressed, and a few XPath-specific features are added.
DTM is intended to be a read-only model, and so does not attempt to replicate the DOM's write or create-node operations.
The details of constructing a DTM vary depending on which implementation of this API you are using. Two reference implementations are currently available:
- SAX2DTM (built via a SAX stream)
- DOM2DTM (which provides DTM access to an existing DOM)
Both DTMs can be built incrementally (see incremental transforms). When operating incrementally, the DTM allows the Xalan-Java processor to begin reading the DTM and performing the transformation while the DTM is still being assembled (for example, while the parser is still parsing the XML source), and attempts to do only as much work as is needed to support the read requests actually made by the XPath or XSLT processor.
For the convenience of user-written extensions, a proxy mechanism presents the contents of the DTM as a read-only subset of the DOM.
DTM performance settings
Xalan-Java implements two DTM performance features that you can control with the TransformerFactory setAttribute(String name, Object value) method.
| Attribute name (URL) | Default setting | Description |
|---|---|---|
| "http://xml.apache.org/xalan/features/incremental" | false | incremental transforms |
| "http://xml.apache.org/xalan/features/optimize" | true | optimized transforms |
Both of these DTM settings are described below.
'http://xml.apache.org/xalan/features/incremental'
Set this feature to true to enable incremental transformations. If set to false (the default), the transform and the parse are performed on the same thread.
| When set to true: If the parser is Xerces, we perform an incremental transform on a single thread using the Xerces "parse on demand" feature. If the parser is not Xerces, we run the transform in one thread and the parse in another. Exception: if the parser is not Xerces and the XML source is a DOMSource, setting this feature to true has no effect. |
| The incremental feature is not currently supported by the XSLT Compiling processor, XSLTC. |
Example: setting incremental transforms to true (for the XSLT Interpretive processor):
javax.xml.transform.TransformerFactory tFactory = javax.xml.transform.TransformerFactory.newInstance(); // setAttribute() takes a String and an Object. tFactory.setAttribute ("http://xml.apache.org/xalan/features/incremental", java.lang.Boolean.TRUE); ...
'http://xml.apache.org/xalan/features/optimize'
When set to true (the default), this feature enables optimizations that may involve structural rewrites of the stylesheet. Any tool that requires direct access to the stylesheet structure should set this feature to false.
DTM node location tracking setting
The DTM also provides a setting that you can use to track location information for each node in the source document. See "http://apache.org/xalan/features/source_location"


{% extends 'users/base.html' %} {% block body %}
Please check your inbox and verify your email address


If you are new to jPlayer, check out the Quick Start Guide.
The media formats that are essential to jPlayer are those that are supported by both the HTML5 and Flash solutions.
It is important that one of these formats is supplied to jPlayer so that popular browsers will be able to play your media.
After an essential format has been supplied, additional counterpart formats may be supplied to increase cross-browser support of the HTML5 solution.
See the jPlayer({"supplied": "formats"})
option for more details.
One of the following audio formats must be supplied:
Note that, there is little to no benefit in providing both, due to the way support pans out with HTML5 browsers supporting either both or neither.
The following video format must be supplied:
jPlayer uses the width and height css definitions from the div element it is instanced on.
This allows you to define the window size through standard CSS rules.
Note that the background-color may be set using the constructor option jPlayer ({"backgroundColor":"#RRGGBB"})
Note that a feature change affects the next release. This system will have to change to enable viewing features, since there is an issue with jQuery returning the CSS definitions in pixels even when defined as percent. jPlayer development patch 2.0.3 notes and details.
The security rules for jPlayer's SWF file have been relaxed using System.security.allowDomain('*')
and may be called from any domain.
Generally, you will upload the SWF file with the JavaScript file to a directory called "js" on your domain. Use the constructor option jPlayer({"swfPath":path})
to change the path.
Technically, the plugin files may be linked to remotely at jplayer.org.
However, we request that you don't link to the files on jplayer.com, since we do not have sufficient resources to become a CDN just now.
Additionally, the Flash fallback on the remote server would require the use of absolute URLs for all jPlayer("setMedia", media)
URLs.
Attempting to run jPlayer locally on your computer will generate Flash security violations and you would need to enable the local file access using the Flash Settings Manager. See the Flash Player Help for more information.
To develop locally, install a server on your system, such as Apache, to enable a localhost on your computer.
The media supplied must conform with the codecs supported by HTML5 browsers. The essential jPlayer formats (MP3 or M4A for audio and M4V for video) must also conform with the codecs supported by the Adobe Flash plugin.
Since some browsers use the Flash element of jPlayer, the MP3 files used must be encoded according to the browser's Adobe Flash Plugin limitations:
The MP4 file is a container that supports both audio and video. The M4A format is an audio MP4, and the M4V format is a video MP4. The recommended encoding options for standard and mobile browsers are:
The OGG file is a container that supports both audio and video. The OGA format is an audio OGG, and the OGV format is a video OGG. The Vorbis and Theora codecs appear to have full support.
The WebM file is a container that supports both audio and video. The WEBMA format is an audio WebM, and the WEBMV format is a video WebM. The Vorbis and VP8 codecs appear to have full support.
The WAV format is supported by many HTML5 browsers. We recommend that you avoid it though as a counterpart format. The recommended encoding options are:
Your domain's server must give the correct MIME type (content type) for all media URLs.
Failure to give the correct MIME type will stop the media from working on some HTML5 browsers. This is a common cause of problems that only affect Firefox and Opera. Other browsers are less strict, but the MIME type should always be checked that it is correct if you having problems getting media to play on any browser.
If you use a common extension for both audio and video media, for example audio.mp4 and video.mp4, then simply use the video version of the MIME type for both of them. ie., video/mp4
On Apache servers, you can use the .htaccess file to set the MIME type based on the file extension:
# AddType TYPE/SUBTYPE EXTENSION AddType audio/mpeg mp3 AddType audio/mp4 m4a AddType audio/ogg ogg AddType audio/ogg oga AddType audio/webm webma AddType audio/wav wav AddType video/mp4 mp4 AddType video/mp4 m4v AddType video/ogg ogv AddType video/webm webm AddType video/webm webmv
Disable GZIP encoding of all the media files. Media files are already compressed and the GZIP will just waste CPU on your server.
The Adobe Flash Plugin will experience issues if you GZIP the media.
Do not GZIP the Jplayer.swf file either. Feel free to GZIP the JavaScript.
Your server must enable Range
requests.
This is easy to check for by seeing if your server's resonse includes the Accept-Ranges
in its header.
Most HTML5 browsers enable seeking to new file positions during a download, so the server must allow the new Range
to be requested.
Failure to accept byte Range
requests will cause problems on some HTML5 browsers.
Often the duration cannot be read from the file as some formats require that the start and end of the file is read to know its duration.
Chrome tends to be the browser that has most problems if the Range
request is not enabled on the server,
but all browsers will have some issue even if it is only that you have to wait for all the media to load before jumping close to the end.
This problem is known to affect Jetty 6 servers with their default configuration.
Be careful when trying to restrict access to your media files. The media URL must be accessible over the internet by the user and its response must be in the format expected.
Using the server response to disable the local cache of media can cause problems with some HTML5 browsers. This can cause the duration of the media to be unknown, which will show as a NaN in the duration of jPlayer.
If you do some magic on the backend to make it more secure, them make sure you are accepting the byte Range
requests described above.
Since jPlayer uses Flash on some browsers, the jPlayer
 must not be hidden. Mobile browsers do not appear to like their HTML5 media being hidden either.
You can change the size of the jPlayer
 to zero if you want to make it invisible. You should also be careful that any jQuery animations, such as fadeIn() or fadeOut(), are not acting on the jPlayer
 or any of its parents.
For example, do not do the following:

jPlayer requires that two files are uploaded to your server.
jquery.jplayer.min.js
Jplayer.swf
When updating jPlayer, ensure that both files are uploaded from the plugin ZIP, since both files are subject to change.
32.5KB (Gzip: 8.1KB)
The plugin's JavaScript file, compiled using closure-compiler.appspot.com with "Simple" optimization.
The jquery.jplayer.min.js file should be added to the
of the HTML file after the jQuery JavaScript file.
Below is how to include the JavaScript file using an absolute path, relative to the server root.

7.5KB
The plugin's Flash 10 file, compiled using Adobe Flash CS4 Professional.
This file is used in browsers that do not support HTML5 <video>
and <audio>
.
The Jplayer.swf file must be uploaded to your server. The default location is relative to your current page in a folder named "js".
To modify the location of the Flash file, use the swfPath
constructor option.
Below is how to set the swfPath
to an absolute path, relative to the server root.
See jPlayer Constructor for more information.
$("#jpId").jPlayer( { swfPath: "/jPlayer/js" });
jPlayer's JavaScript source file. This file may be switched with the jquery.jplayer.min.js file. The operation is identical, but the file size is larger.
This file is readable by humans, assuming they understand JavaScript and jQuery.
jPlayer's Adobe Flash CS4 Professional editor file. This file is compiled using Adobe Flash CS4 Professional into the Jplayer.swf file used in the jPlayer plugin. The Jplayer.fla file is not required for jPlayer, and does nothing unless compiled.
This file is empty, except for setting its class to Jplayer.as.
jPlayer's ActionScript 3 source file. The Jplayer.as file is not required for jPlayer, and does nothing unless compiled.
This file is readable by humans, assuming they understand Flash's ActionScript 3.
Contains jPlayer's ActionScript 3 source files for classes used in Jplayer.as. These files are not required for jPlayer, and do nothing unless compiled.
These files are readable by humans, assuming they understand Flash's ActionScript 3.
The jPlayer constructor is applied to the given cssSelector (normally an id selector) and uses the options, if provided. The
 used by jPlayer should be empty and not used for anything else.
In some cases, the jPlayer div can be placed at the top level of the  to help avoid effects on the page corrupting jPlayer's operation. This applies to an audio player that does not use the poster feature of jPlayer.
Note that the most important option is the ready
event handler, which is a function defining the actions to perform once jPlayer is ready for use.
Attempting to issue commands to jPlayer before the ready
event occurs will result in jPlayer raising error events if the Flash fallback is used and commands will be ignored.
The next most important option is the swfPath
element, which defines the path of jPlayer's SWF file. Remember to upload the SWF file to your server!
Object defining any changes to the default configuration of jPlayer.
Function : (Default: undefined) : Defines an event handler function that is bound to the $.jPlayer.event.ready event.
To reference the current instance, use $(this)
.
Generally, it is recommended to use a function here to at least $(this).jPlayer("setMedia",media)
the instance to a valid url ready for use.
The ready event handler is defined at creation to eliminate a race condition between the JavaScript code and Flash code.
Thus ensuring the Flash function definitions exist when the JavaScript code is executed.
The handler is bound with the .jPlayer
namespace.
Note that a bug has been found in jPlayer 2.0.0 with the ready event when used with the Flash fallback, where the ready event may trigger twice. jPlayer development patch 2.0.2 notes.
String : (Default: "js") : Defines the path of jPlayer's Jplayer.swf file. This allows the developer to place the SWF file wherever they choose by using an alternative relative path, absolute path or server root relative path.
You can test that your swfPath is correct on an HTML5 browser that supports flash, by using the constructor option jPlayer({solution:"flash, html")
.
An incorrect swfPath will generate $.jPlayer.event.error
events with error type $.jPlayer.error.FLASH
when you issue commands like jPlayer("setMedia", media)
Independent of trailing slash, ie., "myPath/" is the same as "myPath".
The URL given must conform to standard URL Encoding Rules.
String : (Default: "html, flash") : Defines the priority of the html and flash solutions. The default is to use HTML first, with a Flash fallback. Swapping the order to "flash, html"
causes the Flash to be used first, with an HTML fallback.
Depending on the supplied
formats, jPlayer may even use both solutions. For example, using jPlayer as a media player with {supplied:"mp3,oga,m4v"}
would on browsers like Firefox require the Flash solution to play the video media format, while the audio media can be played in the HTML solution.
While you could specify only one solution, we do not recommend that you do it!
The solution picked by jPlayer depends on your brower and the formats in the supplied option.
String : (Default: "mp3") : Defines the formats supplied to jPlayer. The order defines the priority, with the left most format being highest. Formats to the right are lower priority.
Valid formats: mp3, m4a, m4v, oga, ogv, wav, webma, webmv.
Manditory Audio format: mp3 or m4a.
Manditory Video format: m4v.
Counterpart formats: oga, ogv, wav, webma, webmv.
All formats in the supplied option must be given in every jPlayer("setMedia",media)
command.
However, you can supply both video and audio formats if you want and then only use the video or audio media when using jPlayer("setMedia",media)
command.
(You must give all the audio formats or all the video formats in the supplied option.)
The solution
priority dominates the priority of the supplied
formats. jPlayer works by finding the first working format in a given solution. So in Chrome with {solution:"html,flash"}
and {supplied:"mp3,oga"}
the mp3 file would play in native HTML, even though Chrome could play either.
The format picked by jPlayer depends on your brower and the solution option.
Manditory formats are those supported by Flash and (luckily) by browsers that do not allow Flash. ie., iPad/iPhone
Counterpart formats are supplied to improve x-browser HTML5 media support.
Rumors based on jPlayer 1.2.0 suggest that for Android to work, the mp3 format should be higher priority than oga.
String : (Default: "metadata") : Valid values are "none", "metadata" and "auto", which matches the HTML5 draft standard. Use "auto" to preload the file.
Preload is a hint to the user agent, not a command. Some browsers ignore this option.
Number : (Default: 0.8) : Defines the initial volume as a value from 0 to 1.
Note that a feature change affects the next release. The volume is an option and will be maintained as an option correctly, rather than copying to the status and maintaining it there. jPlayer development patch 2.0.5 notes.
Boolean : (Default: false) : Defines the initial muted state.
Note that a feature change affects the next release. The volume is an option and will be maintained as an option correctly, rather than copying to the status and maintaining it there. jPlayer development patch 2.0.5 notes.
String : (Default: "#000000") : Defines the background color of the jPlayer
 and the Flash. The string is an RGB hash of the form "#RRGGBB".
String : (Default: "#jp_interface_1") : Defines the cssSelector of an ancestor of all cssSelectors. Usually an id.
Note that a feature change affects the next release. The default value will be changing to (Default: "#jp_container_1"). jPlayer development patch 2.0.3 notes and details.
Object : (Default: {cssSelectors}) : This object defines all the selectors used to associate jPlayer's controls and feedback with the HTML in the page. By default, jPlayer uses a predefined set of cssSelectors.
String : (Default: "jp") : Defines the Id prefix for jPlayer's internally generated HTML code.
Useful if you have a naming conflict, but it is unlikely that the developer will need to change this setting.
Boolean : (Default: false) : Enables error reporting through alerts.
Note that a bug has been found in jPlayer 2.0.0 with the errorAlerts option, where any alerts will interfere with the Flash fallback's ready event. jPlayer development patch 2.0.1 notes.
Boolean : (Default: false) : Enables warning reporting through alerts.
Enable this option to help debug your jPlayer application.
Note that a bug has been found in jPlayer 2.0.0 with the warningAlerts option, where the errorAlerts option was actually being used to enable the warnings. jPlayer development patch 2.0.1 notes.
Function : (Default: undefined) : Just like the jPlayer ready event, you can bind a handler to any of the jPlayer Events Types. The events include of the HTML5 media events.
You can bind handlers to events like timeupdate
to perform an action when it occurs. See Using jPlayer Events for more information and examples.
Note that eventType itself is not a constructor option. Eg., The ready
constructor option is an eventType.
Warning: The flash fallback does not emulate all events.
Warning: HTML5 media events vary x-browser.
HTML entry, with an example id for jPlayer:

Code Example #1:
$(document).ready(function() { $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", { mp3: "../mp3/elvis.mp3" // Defines the mp3 url }); } }); });
Code Example #2:
$(document).ready(function() { $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", { m4a: "mp3/elvis.m4a", // Defines the m4a (AAC) url oga: "ogg/elvis.ogg" // Defines the counterpart oga url }); }, supplied: "m4a, oga", swfPath: "/jPlayer/js" }); });
Code Example #3:
$(function() { // executed when $(document).ready() $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", { m4v: "http://www.myDomain.com/myVideo.m4v" // Defines the m4v url }).jPlayer("play"); // Attempts to Auto-Play the media }, supplied: "m4v", swfPath: "jPlayer/js" }); });
Code Example #4:
$(function() { // executed when $(document).ready() $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", { m4v: "/media/myVideo.m4v", // Defines the m4v url ogv: "/media/myVideo.ogv" // Defines the counterpart ogv url }).jPlayer("play"); // Attempts to Auto-Play the media }, solution: "flash, html", // Flash with an HTML5 fallback. supplied: "m4v, ogv", swfPath: "/scripts" }); });
Code Example #5: Bad Code!
$(document).ready(function() { $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", { mp3: "elvis.mp3" }); } }); $("#jpId").jPlayer("play"); // BAD: The plugin is not ready yet });
jPlayer is controlled by sending the method name through the $(id).jPlayer()
plugin method.
This method is used to define the media to play. The media parameter is an object that has properties defining the different encoding formats and a poster image.
The jPlayer("setMedia", media)
method must be used to define the media before jPlayer will be able perform other methods like jPlayer("play")
.
All formats defined in the constructor option jPlayer({supplied: "f1, f2, fN")
must be given a valid url to the media encoded in that format.
The exception is when using both video and audio media types in a single jPlayer.
Then either all the supplied
audio formats or all the supplied
video formats must be defined.
The constructor option jPlayer({solution: "s1, s2")
can be used to define the priority of the HTML and Flash solutions used by jPlayer.
jPlayer distinguishes between the media types, and using both together in a single setMedia
command makes it difficult to determine what actually plays. The decision is based on the priority of solution
and supplied
and the browser being used.
ie., The 1st one that can work in the supplied
priority, will work, be that video or audio.
jPlayer does not begin downloading the new media defined by the setMedia
method, unless the constructor option jPlayer({preload: "auto")
is used.
Even then, the media may not download as it depends on the browser you are using.
Mobile browser such as Mobile Safari on iOS 4.2 require a gesture before any media is downloaded or played. ie., The user must press a button to initiate the load or play operations the 1st time.
Any media playing when the command is issued will be paused and the download cancelled.
However, if you are switching between media types, for example video to audio, and jPlayer is using the HTML solution, then the previous media type is paused and if it was video, hidden. Otherwise the iPhone's built in video player hangs when the src is cleared to cancel the download.
Do not use relative URLs for the media. The media URLs must be absolute or relative to the server root. For example, "http:www.jplayer.org/media/video.m4v" or "/media/video.m4v".
Relative URLs will have problems with the Flash fallback with M4A and M4V formats. If your Jplayer.swf file is on another domain, (for some reason that makes sense to you,) then absolute URLs must be used.
Object : Defines the media format URLs and poster
The URLs given must conform to standard URL Encoding Rules.
Note that only the properties listed are used by jPlayer, so you could store all kinds of other info in the same object if your project works better that way. For example, the title and album names of an audio track. However, we do plan to expand the media object properties in the future Properties may one day include: stream, chapters, subtitles.
Code Examples:
$("#jpId").jPlayer( { ready: function() { $(this).jPlayer( "setMedia", { m4a: "m4a/elvis.m4a", oga: "oga/elvis.oga", webma: "webm/elvis.webm" }); }, supplied: "webma, m4a, oga" );
This method is used to clear the media and stop playback. If a media file is downloading at the time, the download will be cancelled.
After this command is issued, playback commands such as jPlayer("play")
will be ignored and raise error events until after new media has been specified using the jPlayer("setMedia",media)
method.
There are very few circumstances when it is appropriate to use this method. In general when you are changing media, this action is automatically performed.
Using this clearMedia by itself on the iOS iPhone or iPod Touch will corrupt the built n video pllayer if it is open at the time the command executes.
IE9 Beta is buggy and the attempt to cancel the download is not performed inside jPlayer when IE9 is detected.
This method has no parameters.
Code Examples:
$("#jpId").jPlayer( "clearMedia" );
This method is used to preload the media before the play command is given.
There is no point using load
if you are going to jPlayer("play", [time])
immediately afterwards, just play
it.
Likewise, with jPlayer("pause", [time])
, if a time greater than zero is given.
This method allows you to selectively preload the files you choose after changing the file using setMedia. If you want all files to preload by default, use the jPlayer constructor option {preload:"auto"}
.
This command is affected by browser and some ignore the command, or require a gesture to initiate it the 1st time.
This method has no parameters.
Code Examples:
$("#jpId").jPlayer("load");
This method is used to play the media specified using jPlayer("setMedia", media)
.
If necessary, the file will begin downloading.
Without the time
parameter, new media will play from the start.
Open media will play from where the play-head was when previously paused using jPlayer("pause", [time])
.
The optional time
paramater will move the play-head position to the time given in seconds.
jPlayer("play", 0)
is useful for forcing play from the start of the track, but is redundant for new media, which always starts from the beginning.
This can be used to jump immediately to a play time afer changing media.
jPlayer will seek to the time given and play when able to.
If issued immediately after a setMedia
command, with the time
parameter, and when the browser is using the HTML5 solution, this command will initially fail and an internal timeout is setup to retry the command every 100ms until it succeeds.
[Optional] Number : Defines the new play-head position in seconds.
If used while downloading, play will begin once the media is seekable to that point.
To make media playback loop, add jPlayer("play")
to the ended event. jPlayer deals with reseting the media to the start in the ended event, so the time
equals zero is not required.
Code Examples:
$("#jpId").jPlayer( { ready: function() { // The $.jPlayer.event.ready event $(this).jPlayer("setMedia", { // Set the media m4v: "m4v/presentation.m4v" }).jPlayer("play"); // Attempt to auto play the media }, ended: function() { // The $.jPlayer.event.ended event $(this).jPlayer("play"); // Repeat the media }, supplied: "m4v" ); $("#jumpToTime").click( function() { $("#jpId").jPlayer("play", 42); // Begins playing 42 seconds into the media. });
This method is used to pause the media.
The jPlayer("pause", time)
can be used to jump immediately to a play-head time afer changing media.
The media will begin downloading, and cue the media ready when able to.
Without the time
parameter, new media that has not been loaded or played will ignore this command.
This avoids downloading the new media when the redundant command is given.
Open media will pause if it was playing, otherwise there will be no effect.
The optional time
paramater will move the play-head position to the time given in seconds and if necessary, the file will begin downloading.
jPlayer("pause", 0)
is the same as jPlayer("stop")
.
New media will ignore the jPlayer("pause", 0)
commmand until after the media has started loading.
This avoids downloading the new media when the redundant command is given.
If issued immediately after a setMedia
command, with the time
parameter, and when the browser is using the HTML5 solution, this command will initially fail and an internal timeout is setup to retry the command every 100ms until it succeeds.
[Optional] Number : Defines the new play-head position in seconds.
If used while downloading, the play-head will cue once the media is seekable to that point.
Using a jPlayer("pause", 0)
in the ended
event is redundant and should not be used.
This avoids a fatal bug on Chrome (Win/OSX), where the browser crashes if you were to follow the jPlayer("pause", 0)
with a jPlayer("setMedia")
in the ended
event.
Code Examples:
$("#jpId").jPlayer("pause", 10); // Pauses and moves the play-head 10 seconds into the song.
This method pauses all instances except the instance that invoked the command. This is useful in events such as the play event to pause all the other players on the page when an instance starts playng.
The play event handler can be defined in the constructor options.
This method has no parameters.
Code Examples:
$(id).bind($.jPlayer.event.play, function() { // Bind an event handler to the instance's play event. $(this).jPlayer("pauseOthers"); // pause all players except this one. });
This method is used to stop the media and reset the play-head to the start of the media.
This command is the same as jPlayer("pause", 0)
.
The method is available so that a stop button can be used in your interface, if you want one.
If issued immediately after a setMedia
command, this command is ignored.
This method has no parameters.
Using a jPlayer("stop")
in the ended
event is redundant and should not be used.
This avoids a fatal bug on Chrome (Win/OSX), where the browser crashes if you were to follow the jPlayer("stop")
with a jPlayer("setMedia")
in the ended
event.
Code Examples:
$("#jpId").jPlayer("stop");
This method moves the play-head to a new position. The primary use is internal to the plugin to handle clicks on the seekBar and move the play-head to the new position.
Note that this only moves the play-head. Whether the media plays from that point depends on its current state. ie., If it was playing, play continues from the new play-head. If it was paused, the media is cued to the new play-head position.
If issued immediately after a setMedia
command, the effect is the same as jPlayer("pause", 0)
, which is ignored.
Number (0 to 100) defining the percentage played when compared to the current percentage seekable.
Only when completely seekable does the percentage relate to the total length of the media.
Most HTML5 browsers have seeking enabled, so the seekable value jumps to 100% when the media starts downloading.
Code Examples:
$("#jpId").jPlayer("playHead", 0); // Move play-head to start. $("#jpId").jPlayer("playHead", 10); // Move play-head to 10% of the seekable length.
This method is used to control the volume of the media being played. Note that the initial volume is set through the constructor option: jPlayer({volume:0.4})
While muted you can change this value, but the media will remain muted.
Setting the volume to zero is not the same as using mute
. The two systems are independent.
Number (0 to 1) defining the ratio of maximum volume.
Silence: 0
Half: 0.5
Maximum: 1
Code Examples:
$("#jpId").jPlayer("volume", 0.75);
This method mutes the media's sounds. Note that the initial muted state is set through the constructor option: jPlayer({muted:true})
This method has no parameters.
Code Examples:
$("#jpId").jPlayer("mute");
This method unmutes the media's sounds. Note that the initial muted state is set through the constructor option: jPlayer({muted:false})
This method has no parameters.
Code Examples:
$("#jpId").jPlayer("unmute");
This method is used to access configuration information inside jPlayer.
The jPlayer object itself may also be accessed through $(id).data("jPlayer")
.
However, since this gives full read/write access to all data and access to all the methods, even the internal methods, this is only recommended for advanced developers.
The options are defined in the constructor. Full get access is enabled, where a copy of the option is returned. However you may currently only set a limited number of options after instancing jPlayer. See the jPlayer Options.
This section will be updated early 2011.
String defining the option property name. Supports dot notation.
The returned value can is either a Boolean, Number, String, or an Object, depending on the data requested.
Event handlers defined in the constructor are not included, since they can be removed using the ".jPlayer" namepspace.
The new value of the option.
 (Can set multiple selectors in the object.) $("#jpId").jPlayer("option", "cssSelectorAncestor", "#my-new-interface"); // Set the cssSelectorAncestor and refresh all associations.
This method removes jPlayer. All event and interface bindings created by jPlayer are removed. After destroying the instance, a new jPlayer can be instanced on the node.
All event handlers with the .jPlayer
namespace are removed by this method.
Note that a bug has been found in jPlayer 2.0.0 with the destroy method, where any empty or unfound cssSelector properties throw a JavaScript exception. jPlayer development patch 2.0.11 notes.
This method has no parameters.
Code Examples:
$("#jpId").jPlayer("destroy");
jPlayer allows you to change the following options after instancing. All other options must be defined at creation through the constructor options.
This option allows developers to change the cssSelector associations after jPlayer has been instanced on the page.
The cssSelector
method is used with the jPlayer constructor option cssSelectorAncestor
to create associations between jPlayer methods and CSS entities on the webpage.
For example, this enables a play button graphic on the webpage to be associated with the method that executes the play command.
By default, jPlayer uses a predefined set of cssSelectors, where all the css selectors are class selectors.
The strings are added to the end of the cssSelectorAncestor
string, with a space in between. The default cssSelectorAncestor
is an id selector.
By using a single id and a common class structure, multiple instances of jPlayer are easy to add to the page.
The idea is that jPlayer is associated with a unique interface, hence the id, and then the rest of the structure is common, hence the classes.
The method
may only have one selector
associated with it through jPlayer. An existing association will be removed if a new association is given. An empty string clears exisiting associations.
jPlayer uses the ".jPlayer"
event namespace for binding and unbinding methods to CSS entities.
String containing the name of the method to associate with the selector
.
See the predefined cssSelectors for the list of valid method names.
String containing the CSS Selector to associate with the method
.
Usually a class selector. Eg., ".jp-play"
Code Examples:
$(document).ready(function() { $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", {mp3: "mp3/elvis.mp3"}); }, cssSelectorAncestor: "", // Remove the ancestor css selector clause cssSelector: { play:"#myOldPlayButton" // Set a custom css selector for the play button // The other defaults remain unchanged } }) // ... Some time later, otherwise you'd just set it in the constructor ... $("#jpId").jPlayer( "option", "cssSelector", "play", "#myNewPlayButton" ); });
This option allows the developers to change the associations after jPlayer has been instanced on the page.
Setting this option causes all the cssSelector associations to be refreshed with the new ancestor. Allowing you to switch between interfaces easily. I am not sure why you would want to do that, but it's here if you need it.
String containing the CSS Selector to associate with the cssSelector
Usually an id selector. Eg., "#jp_interface_1"
Code Examples:
$(document).ready(function() { $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", {mp3: "mp3/elvis.mp3"}); }, cssSelectorAncestor: "#interface-on-the-left" // Define the ancestor css selector }) // ... Some time later, otherwise you'd just set it in the constructor ... $("#jpId").jPlayer( "option", "cssSelectorAncestor", "#interface-on-the-right" ); });
jPlayer communicates with your code via events.
All jPlayer events can have a handler defined using the constructor option of the same name:
jPlayer({eventName:function(e){...}})
Event handlers created by constructor options have the ".jPlayer"
namespace.
* A robust jPlayer event supported by Flash and HTML5 browsers
We plan to expand the emulation of HTML5 Media events in the Flash.
This list will be updated early 2011.
setMedia
. Equivilent to the HTML5 Media error event.
jPlayer constructor option jPlayer({errorAlerts:true})
will create alerts when an error event occurs.
jPlayer constructor option jPlayer({warningAlerts:true})
will create alerts when a warning event occurs.
Just like any other event in jQuery, jPlayer events are bound to handler functions using jQuery.bind()
.
To remove an event use jQuery.unbind()
.
Use the $.jPlayer.event object to access event type strings. All events have a jPlayer Event Object with easy access to information at the time the event occured.
All jPlayer events can have a handler defined using the constructor option of the same name.
jPlayer({eventType:handler})
Note that, the event type used in the constructor is the property name of the event, not the event string code.
For example, the event type $.jPlayer.event.ready
has the constructor option jPlayer({ready:handler})
:
Event handlers created by constructor options have the ".jPlayer"
namespace.
Code Examples:
$("#repeat-on").click( function() { $("#jpId").bind($.jPlayer.event.ended + ".jp-repeat", function(event) { // Using ".jp-repeat" namespace so we can easily remove this event $(this).jPlayer("play"); // Add a repeat behaviour so media replays when it ends. (Loops) }); return false; }); $("#repeat-off").click( function() { $("#jpId").unbind($.jPlayer.event.ended + ".jp-repeat"); // Remove the ended events with the ".jp-repeat" namespace return false; }); $("#jpId").bind($.jPlayer.event.play, function(event) { // Add a listener to report the time play began $("#playBeganAtTime").text("Play began at time = " + event.jPlayer.status.currentTime); }); $("#jpId").unbind($.jPlayer.event.play); // Remove all play event listeners $("#jpId").bind($.jPlayer.event.error + ".myProject", function(event) { // Using ".myProject" namespace alert("Error Event: type = " + event.jPlayer.error.type); // The actual error code string. Eg., "e_url" for $.jPlayer.error.URL error. switch(event.jPlayer.error.type) { case $.jPlayer.error.URL: reportBrokenMedia(event.jPlayer.error); // A function you might create to report the broken link to a server log. getNextMedia(); // A function you might create to move on to the next media item when an error occurs. break; case $.jPlayer.error.NO_SOLUTION: // Do something break; } }); $("#jpId").unbind(".myProject"); { // Remove ".myProject" namespace event listeners using standard jQuery method
Pauses all instances of jPlayer on the current page. If using frames, then only the the frame the command is issued in is affected.
This method has no parameters.
Code Examples:
$.jPlayer.pause(); // Pause all instances of jPlayer on the page
This function is used to convert a time, in seconds, to a string formatted in hours, minutes and seconds. The format of the conversion is defined using the object $.jPlayer.timeFormat.
This function is used to format the text jPlayer writes to the css selectors for currentTime and duration.
String : The formatted time.
Code Examples:
$("#myTime").text($.jPlayer.convertTime(60)); // One minute
This object is used to format the time returned by the function:
$.jPlayer.convertTime( Number: seconds )
Code Example:
$.jPlayer.timeFormat.showHour = true; $.jPlayer.timeFormat.sepHour = " hours "; $.jPlayer.timeFormat.sepMin = " minutes "; $.jPlayer.timeFormat.sepSec = " seconds";
jPlayer has a predefined set of CSS selectors built in. Below are the default associations between the jPlayer method and the CSS selector.
To define custom CSS selectors use the constructor options:
jPlayer({cssSelectorAncestor: "#my-unique-id", cssSelector: {...}})
To change CSS selectors after instancing, use jPlayer("option", key, value)
:
jPlayer("option", "cssSelector", method, selector)
jPlayer("option", "cssSelectorAncestor", selector)
method : selector
selector = cssSelectorAncestor + " " + cssSelector[method];
For example, the play method's default actual selector is: "#jp_interface_1 .jp-play"
In English, this means select the entity with class jp-play
who has an ancestor with the id jp_interface_1
.
Remember that ids are unique, while classes are common. An id is only ever used once.
This section will be updated early 2011.
In an attempt to promote a standard approach to skin development, we are proposing the following standard HTML structure and CSS class naming conventions. The Ids used match the predefined cssSelectors used by jPlayer, and should not be used for CSS definitions. The skin's CSS should be defined using the standard class names shown below.
A skin should be written to work with both HTML structures, the single and playlist variants, so that a single CSS file is required for a skin. Likewise, all artwork should be included in a single image file. Links to an example skin is given further down.
The skin structure has been designed for accessibility and conforms with the HTML 4.01 Spec. The tabindex attribute is used to control the tabbing order and may be modified to suit the user's needs.
Note that, the pause control artwork can be hidden in the CSS. jPlayer takes the default display type for the pause button from the play button's CSS styling. This avoids the pause button showing briefly at page load.
As used by this demo.
View the demo source... Will update this doc early 2011.
As used by this demo.
View the demo source... Will update this doc early 2011.
As used by this demo.
View the demo source... Will update this doc early 2011.
jplayer_playlist_current
There is an anim GIF and a PNG file too in the skin folder for the latest Blue Monday skin.
While the skin conforms with the HTML 4.01 Spec, unfortunately some browsers do not adhere to the spec.
For example, Safari does not include
elements in the tab order.
If you wish to correct this, the
can be replaced with <input>
or <button>
elements.
Using these form elements requires an empty transparent GIF file to be specified for each element, which complicates use when used in dynamic web apps such as WordPress.
The <input>
and <button>
elements also behave differently cross-browser, in particular where Internet Explorer moves the artwork down and to the right when it is clicked on.
For these reason, our standard skin uses the
element.
The accesskey
attribute may be added to each
element to provide access key support.
The use of access keys depends on your target users.
Most users do not even know how to initiate an access key and it varies from browser to browser.
The key itself also needs to be conveyed to the user in some manner.
Since access keys can interfere with the operation of some browsers we have not used the attribute in the default skin.
After invesigation, a clearly labled link is prefered by the majority of screen reader users.
ie., Our play button has the word "play" in the link, even though the text is not visible when using a standard browser.
Compatibility verified with:
Compatibility verified with:
jPlayer("clearMedia")
method resets the instance, but does not cancel the download due to a bug in media.load() throwing an exception on broken links...
And then some time later raising an error event.
The reset uses src="", which is a broken link, but IE9 seems to treat the impossible src="" as a possible url and tries to load the corrent into the media element, rather than rasing an error event immediately like every other browser does.
The late error event would corrupt jPlayer, hence the media.load() is disabled when this browser is detected.
Tested using the latest browser release as of 17th December 2010.
jPlayer does not work on the following browsers:
The following Mobile browsers require user gestures to trigger commands that effect media playback.
jPlayer("play")
in the ready event handler.
The browser will ignore the command. jPlayer will simply wait until the user presses the play button.
jPlayer("load")
and jPlayer("pause", time)
The Firebug add-on for Firefox can occasionally cause problems with jPlayer. This only happens if the Firebug window is open when the page loads/reloads and when jPlayer is using the Flash component. ie., When only using MP3 files. Even then, the problem is intermittent and usually jPlayer works fine. The problem appears to be that Firebug interferes with the registration of the Flash's external interface functions.
This problem is listed here since developers commonly use Firebug while developing their projects.
This problem does not appear to affect jPlayer 2.0.0. We believe that the Firebug add-on has been fixed as this no longer affects Firefox 4 with the up to date Firebug add-on.
Here are details on the supported formats by HTML5 browsers. All browser versions are their latest official release.
Format names relate to the supplied and setMedia format property names used by jPlayer. For example: WEBMA is an audio WebM, OGV is a video OGG, and M4A is an audio MP4. For more details on the formats, see Media Encoding.
An audio WebM file uses the same Vorbis codec as an OGG file.
HTML5 browsers and their supported audio file formats:
The video WebM (VP8) codec is superior to the video OGG (Theora) codec.
HTML5 browsers and their supported video file formats:
HTML5 browsers and their support for audio streams. (Note that, jPlayer's Flash fall-back for non-HTML5 browsers works with MP3 streams.)
Audio streams work on:
Audio streams fail on:
Some links to resources about HTML5 video and audio support:


In the 90’s it was hard to find the information you wanted online. Many companies tried to do it to a certain extent but couldn't succeed. In the late 90’s the page was full of plain text and images. It was hard to find useful information.
Then came Yahoo. The founders of Yahoo were searching online ways to find a Basketball fantasy game. They found a way to aggregate data from other websites and extract information. The venture capitalist Sequoia Capital funded Yahoo. Yahoo founders were worried about advertising in search engines and how it is going to impact the users. But they went ahead with it and it helped them to make money besides the banner ads. More and more advertisers started using Yahoo for advertisements. That is how others realized that they can make money on the web.
A company called Excite came up with a better way to search using keywords compared to Yahoo. The search engine competition increased, engaging more and more people. But too much focus on money and advertisement backfired. Even the search results were not accurate and useful.
Few years later Google came up with an algorithm for link counting, to improve the accuracy of search results and its quality. Google became popular and a venture capitalist introduced them to Excite. But Excite didn't buy Google.Google later got investments from venture capitalists. The venture capitalists were skeptical about Google's future. Google became popular and it didn't have any advertisement on the page to make money.
Instead of using banner advertisements, Google took the search keywords typed by users and transformed it into useful information that could be used for the market. Companies were willing to pay good money to get the information about what customers want.Google got this idea from a company called Overture.
Google refined this idea and incorporated it in their search engine. They came up with advertisements, paid links to websites that will fit nicely to the search results page. Google helped to improve the internet economy. Google's went public in 2004. Few years later Google became one of the most popular and profitable companies. They invested their money in things other than search engines. They bought so many other companies and expanded their business. But eventually people become worried about the data collected by google and the related privacy issues.


A C Programmer's First Thoughts On J
This doesn't look like a
program. Where did the program go?
You have gotten used to the pace and structure of C. You can recognize a loop, you figure out what the loop is doing, you see what variables it sets. The assignments and the loops are signposts that direct your analysis of code.
In J, every operator has a loop built in, so they don't jump out at you in the same way. And because the syntax of J is so terse, and arrays use the same syntax as single variables, there is much less need for temporary variables.
Here's an example. Figure out what the following code does:
int i, j, maxcol = 0;
float maxval = x[0][0];
for(i = 0;i<=xsize0;++i) {
for(j = 0;j<=xsize1;++j) {
if(x[i][j] > maxval) {
maxval = x[i][j];
maxcol = j;
}
}
}
Not too hard. When the code finishes, maxval is the largest element in the array x, and maxcol is the column number it was in. As it happens, all I wanted was the column number, but there was no way for you to know that.
The same code in J:
maxcol =. (i. >./) >./ x
With some practice, you will learn to read this code just as easily as you read the C. You will recognize the / as an indicator of a loop that accumulates a result, and the i. as an indicator of a search. The =. and =: tokens indicate assignment.
What happened to the if statement?
It's built into the >.
primitive. Just as most loops are hidden
inside primitives, so are most conditionals.
The functions you write can also contain built-in conditionals.
What's the statement delimiter?
There isn't one. Statements are exactly one line long.
I've looked at some J code. Every other character is a period or a
colon. I've got spots before my
eyes. How can anybody read this stuff?
You'll get used to it. J has a great many primitives, and it's important to keep the names short so that you can fit a lot of computation on one line; so the names are either single characters, like >, or a character with a period or colon appended (>. and >:). The period/colon is just part of the name. Single letters with period/colon, like i., are also used for primitives. If you want to assign your own names to the primitives, you are allowed to, but pretty soon you'll want to go back to the shorter names to save space and typing.
Where are the declarations? Doesn't J use arrays? How do I know what the type of a variable is?
Oh yeah, J uses arrays. Any variable can be an array. As for what the type and dimensioning is: you assigned the variable, didn't you? It contains whatever you put into it, a number, a string, an array, a structure... J will remember. If your program logic requires you to find out the current attributes of a variable, J can tell you.
Every J program, both primitives and programs that you write, can automatically be applied to arrays. The carefully-thought-out way this is done is one of the prime strengths of J. The statement
x + y
means 'add x and y'; it will do that if x and y are single numbers, or if they are multidimensional arrays. The looping needed to operate on the individual numbers is built into the language, not into your program.
I've looked at a line of J code and it's
just a mess with no discernible syntax.
Something like
lifodd =. ]`[@.(2&|@[)
perhaps, a program that returns the left operand if it is odd, otherwise the right operand?
Patience. Every character has a meaning, even the ` " [ ] { } characters which act individually, not as pairs. Learn what they mean and all will become clear.
I ran across this line: 1 2 + 3. What's with the extra
number floating in space?
1 2 is a
one-dimensional array of 2 numbers with the values 1 and 2. Arrays come up so much in J that we use this
shorthand to define one without requiring any more syntax than just the values
of the elements of the array.
I've looked at a line of J code and I'm
absolutely sure there are no variables in it at all. How can that mean anything?
Oh, you've stumbled onto a tacit program, which describes its computation without referring to any variables, not even symbolic parameters. The classic teaching example is
mean =. +/ % #
which finds the mean of an array of numbers. Tacit programs are considered an advanced topic in this book, and are covered in a section at the end. They are the ultimate in concise expression; many J programmers favor them for that reason, but you can wait to learn about them until you've learned simple J.
In the examples all I see are lines that
contain =: and =.,which you said are
assignment statements. How do I write a
program?
Some of the assignment statements are
programs. In J, a name becomes a
function name when you assign it a value that is a function.
Once I've written a program, how do I
run it? I don't see anything that looks
like a function call.
In J, there is no special syntax for a function call. Just as you perform the 'minus' function with
- y or the
'subtract' function with x - y, you
invoke a user-defined function by typing its name before or between its
operands: x DifferenceSquared y or FindPrimeGreaterThan 1000.
How do I compile my program?
You don't. J is interpreted. As soon as you type your program in (or read it in from a file), it's ready to use. Here's a starter program:
h =. verb : '''Hello world.'''
Type that (note the triple quotes), then run it with
h ''
The triple quotes are ugly.
Quit bellyaching. Read the book and you'll learn how to avoid them. Remember those 10 lines of C that were replaced by a quarter-line of J, and learn how to do that yourself.


{% extends 'base.html' %} {% block title %} Phonebook | Home {% endblock %} {% block content %}
Easy and intuitive contact management, built for everyone.


Ezy Chart
Demo
Installation
Documentation
An Angular chart library based on Chart.js and ECharts
Loading demo...


Monitors activity to identify project readblocks
Scans our talent network to create the optimal team for you project
Regularity evaluates our talent to ensure queality
Uses data from past projects to provide better delivery estimates


Gradle Runner vs Android Build ⚓
We’d like to shed light on the major differences between our two Android build steps: Gradle Runner
and Android Build
Steps. They are both build steps but they are slightly different in their functions. Let’s jump right in!
Our Gradle Runner
Step is the headquarter for all your gradle tasks
. It runs a single or multiple Gradle task(s) you specify and then copies the generated APK(s) into the Bitrise Deploy Directory ($BITRISE_DEPLOY_DIR
). This step runs ANY Gradle task (not just building task) that is available in your project’s task list. You can run multiple tasks at the same time if you insert the tasks separated with spaces in the Gradle task to run
input field of the Step.
For example: assembleDebug
assembleDebugAndroidTest
where Gradle Runner step will output as many APK paths as many assemble tasks you have set.
Our Android Build
Step is different from Gradle Runner
in the sense that it provides a simplified user experience of Android Studio’s developing functions: it reflects how you would configure your project in Android Studio. This step is geared towards ONLY building your project, therefore, it cannot perform any othergradle task
(as opposed to Gradle Runner
). As a result, you can use assemble
- related task with this Step.
About Gradle tasks ⚓
Gradle tasks are an integral part of Gradle build script. You can use any task that is defined in gradle build files where tasks are either specified by you or available by default based on your project. You can run these available tasks with the gradlew TASK-TO-RUN
command in your Command Line / Terminal.
Here is a list of the most common default tasks of an Android Gradle project:
androidDependencies
- displays the Android dependencies of the project.assemble
- assembles all variants of all applications and secondary packages.assembleAndroidTest
- assembles all the Test applications.clean
- deletes the build directory.
Getting the list of available Gradlew tasks in your project ⚓
To get the basic task list, call gradlew tasks
in your Android app’s directory. When running gradlew tasks
, you’ll get a list of available and most frequently used gradle tasks
in this format:
$ ./gradlew tasks
:tasks
------------------------------------------------------------
All tasks runnable from root project
------------------------------------------------------------
Android tasks
-------------
androidDependencies - Displays the Android dependencies of the project.
signingReport - Displays the signing info for each variant.
sourceSets - Prints out all the source sets defined in this project.
Build tasks
-----------
assemble - Assembles all variants of all applications and secondary packages.
assembleAndroidTest - Assembles all the Test applications.
assembleDebug - Assembles all Debug builds.
assembleRelease - Assembles all Release builds.
...
To see all the available tasks listed in your task list, call ./gradlew tasks --all
.
Running Gradle task with our Steps ⚓
You can run gradle tasks
on Bitrise using Do anything with our Script
Step, Gradle Runner
and Android Build
Steps.
Do anything with Script step ⚓
- Insert the Step anywhere in your workflow.
- Run any task by calling
./gradlew task-name-to-run
in the Script input field (for example:./gradlew assemble
). - Make sure the right executor type is selected to run your script in the
Execution with / runner binary
input field of theConfig
section.
Gradle Runner Step ⚓
As a minimum input, make sure you fill out the following two input fields:
- Specify the task that is available in your task list as the value of the
Gradle task to run
step input. - If you use our scanner to upload your project to bitrise.io, the
gradlew file path
input field gets automatically filled out with the respective path in the Step. Otherwise make sure you fill it out manually and make sure to add a relative path to the repository root, for example:./gradlew
or./sub/dir/gradlew
(if it is a subdirectory).
Android Build Step ⚓
This Step can only perform building-related gradle tasks
. If you wish to run other type of gradle tasks
, please use our Gradle Runner
Step.
- Add the Step after the testing steps but before the code signing Step in your deploy workflow.
- Set the required
Project Location
input field to reflect the root directory of your project.
How to install an additional Android SDK package ⚓
You can update your Android SDK package or install missing dependencies either using our Install missing Android SDK components
Step or Do anything with Script step
where installing the respective package requires a little manual coding.
Automatic installation of Android SDKs and dependencies ⚓
We suggest using our Install missing Android SDK components
Step to install dependencies and missing Android SDK components for your Android project:
-
Provide the required NDK version in the
NDK Revision
input field. Leave this input empty if you are not using NDK in your project.
The Step runs the gradlew dependencies
command and prints out a list of dependencies and SDK components that are relevant to your project. Then the Step takes care of installing them.
Manual installation of Android SDKs ⚓
As an alternative to the Install missing Android SDK components
Step you can manually install the missing Android SDKs as well.
Before you start:
- Make sure you have the Android
sdkmanager
installed to your local computer. For more information onsdkmanager
, check out this guide.
- Add
Do anything with Script step
(can be the very first step) to your workflow. -
Add the required platform and build-tools version to the
Script content
. In this example, we’re installing the Android SDK v18 and the relatedbuild-tools
with v18.0.1.#!/bin/bash #fail if any commands fails set -e #debug log_ set -x #write your script here sdkmanager "platforms;android-18" sdkmanager "build-tools;18.0.1"
You can check the full list of available packages (including obsolete packages) that you have already installed by running an sdk
task:
- Run
sdkmanager --list --include_obsolete --verbose
command. You can run this command on your own machine if you have$ANDROID_HOME/tools/bin
in your$PATH
. If not, then you can run it with/PATH/TO/ANDROID-SDK-HOME/tools/bin/sdkmanager ...
.
Enabling Gradle debug options ⚓
If your Gradle build fails, we recommend you to first check your build’s log in the APPS & ARTIFACTS
tab.
If you’re still lost, you can call --stacktrace --debug
flags (for example, gradle ... --stacktrace --debug
) to get more detailed logs.
In most cases --stacktrace
should be enough, and the Gradle Runner
Step includes this flag by default.
Running a bitrise Android build on your Mac/PC with Docker ⚓
You can run your build on your Mac/PC inside the same docker
container you use on bitrise.io to fully test your build in an identical environment! You can find the detailed guide here: How to run your build locally in Docker
Memory (RAM) limit ⚓
You can specify the amount allowed RAM for the Java Virtual Machine (JVM) by adding two environment variables to your workflow.
For example:
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
JAVA_OPTIONS: "-Xms512m -Xmx1024m"
You can limit the allowed RAM the Gradle JVM process uses. This is useful if there’s not enough RAM available in the system.
Emulators ⚓
You can use our Android emulator Steps such as AVD Manager
and Wait for Emulator
to create and boot Android emulators. Let’s see how!
- Add
AVD manager
Step to your workflow. It can be one of the first steps in your workflow. -
Set the following required input fields in the step:
Device Profile
,Android API level
, andOS Tag
.The Emulator needs some time to boot up. The earlier you place the Step in your workflow, the more tasks (cloning or caching) you can complete in your workflow before the emulator starts working.
-
Add the
Wait for Emulator
Step to your workflow. This step acts a shield preventing theAVD Manager
to kick in. Make sure you add it BEFORE the step with which you want to use theAVD Manager
. In our example, we are usingWait for Android emulator
Step to only start the Android Virtual Device FROM theGradle Runner - UI test
Step onwards.
Installing / Using Java version X ⚓
If you need a Java or JDK version which is not preinstalled on the Android stacks, you can follow this guide to install it. This example will install Java/JDK 8 with a Do anything with Script step
, feel free to adapt it to the version you need.
-
Add the
Do anything with Script step
to your workflow with the content below:#!/bin/bash set -ex add-apt-repository -y ppa:openjdk-r/ppa apt-get update -qq apt-get install -y openjdk-8-jdk update-java-alternatives -s /usr/lib/jvm/java-1.8.0-openjdk-amd64 echo "done"
-
Start a new build. This
Script
Step can be the very first step in the Workflow, as it does not depend on anything else.


Common Rich Text Editing Tasks
There are a number of tasks that are often performed by developers when editing and processing text documents using Qt. These include the use of display widgets such as QTextBrowser and QTextEdit, creation of documents with QTextDocument, editing using a QTextCursor, and exporting the document structure. This document outlines some of the more common ways of using the rich text classes to perform these tasks, showing convenient patterns that can be reused in your own applications.
Using QTextEdit
A text editor widget can be constructed and used to display HTML in the following way:
QTextEdit *editor = new QTextEdit(parent); editor->setHtml(aStringContainingHTMLtext); editor->show();
By default, the text editor contains a document with a root frame, inside which is an empty text block. This document can be obtained so that it can be modified directly by the application:
QTextDocument *document = editor->document();
The text editor's cursor may also be used to edit a document:
QTextCursor cursor = editor->textCursor();
Although a document can be edited using many cursors at once, a QTextEdit only displays a single cursor at a time. Therefore, if we want to update the editor to display a particular cursor or its selection, we need to set the editor's cursor after we have modified the document:
editor->setTextCursor(cursor);
Selecting Text
Text is selected by moving the cursor using operations that are similar to those performed by a user in a text editor. To select text between two points in the document, we need to position the cursor at the first point then move it using a special mode (QTextCursor::MoveMode) with a move operation (QTextCursor::MoveOperation). When we select the text, we leave the selection anchor at the old cursor position just as the user might do by holding down the Shift key when selecting text:
cursor.movePosition(QTextCursor::StartOfWord); cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
In the above code, a whole word is selected using this method. QTextCursor provides a number of common move operations for selecting individual characters, words, lines, and whole blocks.
Finding Text
QTextDocument provides a cursor-based interface for searching, making it easy to find and modify text in the style of a text editor. The following code finds all the instances of a particular word in a document, and changes the color of each:
QTextCursor newCursor(document); while (!newCursor.isNull() && !newCursor.atEnd()) { newCursor = document->find(searchString, newCursor); if (!newCursor.isNull()) { newCursor.movePosition(QTextCursor::WordRight, QTextCursor::KeepAnchor); newCursor.mergeCharFormat(colorFormat); } }
Note that the cursor does not have to be moved after each search and replace operation; it is always positioned at the end of the word that was just replaced.
Printing Documents
QTextEdit is designed for the display of large rich text documents that are read on screen, rendering them in the same way as a web browser. As a result, it does not automatically break the contents of the document into page-sized pieces that are suitable for printing.
QTextDocument provides a print() function to allow documents to be printed using the QPrinter class. The following code shows how to prepare a document in a QTextEdit for printing with a QPrinter:
QTextDocument *document = editor->document(); QPrinter printer; QPrintDialog *dlg = new QPrintDialog(&printer, this); if (dlg->exec() != QDialog::Accepted) return; document->print(&printer);
The document is obtained from the text editor, and a QPrinter is constructed then configured using a QPrintDialog. If the user accepts the printer's configuration then the document is formatted and printed using the print() function.


{% for action in actions %} {% if action != 'services' and action != 'gateway' and action != 'mirrors' and action != 'route' %} {% if action.0 != "("%}


An example api which handles various rpc requests.
This api follows the json-rpc 2.0 specification. More information available at http://www.jsonrpc.org/specification.
Creates a new session.
Authenticates the user using the provided credentials and creates a new session.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.name | string | Name of the user to create a session for. |
| params.password | string | Password of the user to create a session for. |
| Name | Type | Description |
|---|---|---|
| result | object | |
| result.session_token | string | Bearer token of the created session. |
| result?.validity | number | Validity of the session token in seconds. |
| Code | Message | Description |
|---|---|---|
| 1 | InvalidCredentials | The provided credentials are invalid. |
Destroys an existing session.
Logs the user out and destroys his active session.
| Name | Type | Description |
|---|---|---|
| result | number | Always 0. |
| Code | Message | Description |
|---|---|---|
| 2 | NotFound | Session could not be found. |
Refreshs an existing session.
Refreshs an existing session so that it keeps alive and doesn't time out. This method does nothing but refreshing the timeout.
| Name | Type | Description |
|---|---|---|
| result | number | Always 0. |
| Code | Message | Description |
|---|---|---|
| 2 | NotFound | Session could not be found. |
Adds a new user.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.name | string | Name of the user to add. |
| params.email | string | Email of the user to add. |
| params?.address | array | Address of the user to add. |
| params?.address[0] | number | Address number. |
| params?.address[1] | string | Name of the street. |
| params?.address[2] | string | Type of the street. |
| params?.address[3] | string | City quadrant of the address |
| params.password | string | Password of the user to add. |
| Name | Type | Description |
|---|---|---|
| result | number | Always 0. |
| Code | Message | Description |
|---|---|---|
| 3 | Already exists | A user with that name already exists. |
Deletes an existing user.
| Name | Type | Description |
|---|---|---|
| params | object | |
| params.name | string | Name of the user to add. |
| Name | Type | Description |
|---|---|---|
| result | number | Always 0. |
| Code | Message | Description |
|---|---|---|
| 2 | Not found | A user with that name could not be found. |
Returns all users.
This method returns an array with information about all existing users.
| Name | Type | Description |
|---|---|---|
| result | array | List of all existing users. |
| result[] | object | Information about a user. |
| result[].name | string | Name of the user. |
| result[].email | string | Email of the user. |
| result[].address | array | Address of the user to add. |
| result[].address[0:number] | number | Address number. |
| result[].address[1:street_name] | string | Name of the street. |
| result[].address[2:street_type] | string | Type of the street. |
| result[].address[3:direction] | string | City quadrant of the address |


We sprung out of Talk2, a simple Firebase + Angular project for our awesome NYC bootcamp, App Factory.
Our hope is to let you hang out with the people around you, whether you're shy, bored, lonely or just addicted to your phone.
There are a lot of chat apps out there, but we think we're a little different. We're all about location - open up a chatroom right at your cafe - and hanging out with total strangers, rather than just your friends network. We're all about anyone, anytime, anywhere - just type in a chat to store it in your dash forever, and search for chats anywhere in the world.
Every chat here is 100% anonymous.
We will never sell your data.
We will never charge you anything.
Help us by forking us on github (lishiyo/chaffy) and sharing your ideas!


---
layout: post
title: Must Read
date: '2008-10-01T12:03:00.002+01:00'
author: Andre Weissflog
tags:
- Nebula3
modified_time: '2008-10-01T12:07:13.200+01:00'
blogger_id: tag:blogger.com,1999:blog-2948438400037317662.post-4256119323533878983
blogger_orig_url: http://flohofwoe.blogspot.com/2008/10/must-read.html
---
2 important and related blog posts:
Shader Workflow - Why Shader Generators are Bad
Graphical shader systems are bad
Good arguments why shaders should be treated as code under programmer control, not as graphics assets under artist control.


Menu
Home
About
Recipes
Store
Involvement
Events
Home
About
Recipes
Store
Involvement
Events
Submit Time
<
>
Would you like to:
Add Another Shift
Remove This Shift
Are you sure?
Yes
No


{% extends 'base.html' %} {% load static %} {% block main_content %}
|
Response ID |
Name |
Category |
||
|
SIR-001 |
Suspicious email attachment or link |
Email security |
||
|
Description |
||||
|
A user reports receiving of a suspicious email attachment or embedded link |
||||
|
Response Version |
Last updated |
Author |
||
|
ID |
Task |
Description |
Incident handler |
Tool |
|
1. |
User reported suspicious email with an attachment |
User reported receiving a suspicious email with an attachment or embedded link. |
Service desk |
Phone Service Now |
|
2. |
Log relevant information from suspect system |
Log relevant information from suspect system Employee Name Hostname Operating System with Service Pack Location of Employee |
Service desk |
Service Now |
|
3. |
Acquire a copy of the email message in .msg format |
Ask user to attach the original email in a new mail message and send to service desk. Log email details in the ticket, including: Company email or personal email; date & time the email was received; sender; subject. |
Service desk |
Service Now |
|
4. |
Assign incident to SOC |
Set priority, fill other necessary details and assign the incident to SOC team. |
Service desk |
Service Now |
|
5. |
Analyze email header |
Check email header IP's against open source reputation services to identify any addresses that are on blacklists. Examples of such IP reputation services include: http://Ipvoid.com http://virustotal.com http://robtex.com http://malc0de.com
If the sender or source IP is blacklisted, go to step 6 else go to step 7. |
SOC |
Outlook Text processor Web browser |
|
6. |
Block the sender |
Notify messaging/content filter team to block the source IP or sender. Note details in incident journal. |
SOC |
Service Now |
|
7. |
Scan attachment |
If possible, scan the suspicious attachment on an isolated system using authorised virus scanner. If the attachment is found to be suspicious, go to step X. |
SOC |
McAfee anti-virus |
|
8. |
Send attachment to OEM |
If no conclusion was found, send the attachment to anti-virus company for further scan. Follow instructions in the following link: https://www.mcafee.com/ca/threat-center/resources/how-to-submit-sample.aspx If the attachment is found to be suspicious, go to step X, else go to step Y. |
SOC |
|
|
9. |
Inform user of result |
Inform the user that the attachment was a malware. Ask the user to delete the file without opening. |
SOC |
|
|
10. |
Update anti-virus server |
Anti-virus OEM might provide temporary fix to detect the malware, install the same in anti-virus server and deploy on all clients. |
SOC |
|
|
11. |
Remove malware |
Perform AV scan. If unsuccessful, request system reimage. |
|
|
|
12. |
Place additional blocks |
Place blocks for any malicious sites or transmission methods used by the malware. |
|
|
|
13. |
Confirm the host is functioning properly |
Confirm that the affected system is operating normally. Flag the hosts and user for future alerts if the infection was deemed targeted. |
|
|
|
14. |
Inform messaging and content security team |
Inform messaging and content security team about the malware. Ask them to find other recipients to whom the email was sent from the sender or where the email contained same attachment. Inform these teams to block further emails from the sender. |
SOC |
ServiceNow |
|
15. |
Inform other recipients |
Send a note to other recipients to not open that email and get their systems scanned after updating the anti-virus client.
|
SOC Service Desk |
|
|
16. |
Close the incident |
Log all actions and close the incident. |
SOC |
ServiceNow |


Cardinals Banking
My Dashboard
Logout
System Manager Dashboard
View External User Accounts
My Profile
New External User Requests
Authorize Access
View Access Requests
Pending Transfers
Pending Transactions
Authorization Sent
Employee Email
External Email


Dear {{ user.first_name }} {{ user.last_name }}
Thanks for signing up for {{ site_name }}.
Please click here to activate your account.
If the link doesn't work, please copy - paste the following link to your browser - http://{{ site }}/email-verification/{{ verification_token }}
If you didn't sign up for the service, please ignore this email.
Have a good time!
Team {{ site_name }}


Hello {{customerDescription}},
Your invoice has been updated.
Invoice: {{id}}
| Qty | Description | Interval | Notes | Amount |
|---|---|---|---|---|
| {{#if quantity}} {{quantity}} {{/if}} | {{#if plan}} {{plan.name}} {{/if}} | {{#if plan}} {{plan.interval}}ly {{/if}} | {{#if description}} {{description}} {{/if}} | ${{amount}} |
Total: ${{total}}
Amount Due: ${{amount_due}}
This invoice will be charged automatically. Don't hesitate to contact us if you have any questions.
Sincerely,
{{config.sincerely}}


New syntactic constructs can be added to Slogan. This makes it easy to implement DSLs or to experiment with language design ideas. Slogan offer two methods to add new syntax to the language. Both are discussed in this chapter.
The simplest way to add new syntax is by using the declare syntax
statement. It has the general form shown below:
declare syntax <keyword> <layout> => <expansion>
Keyword
is a name that uniquely identifies the new syntactic form. Layout
defines the structure of the extension as it will appear in code. This can contain operators, identifiers and literals. All identifiers starting with the dollar sign ($) is treated specially by the compiler. It will be replaced by a valid Slogan expression. The expansion
part will contain Slogan code that should be generated by the compiler upon successfully parsing the new syntax.
To better understand declare syntax
, let us implement a new syntactic extension. We will add the do-while
construct from the C programming language to Slogan. Do-while
is an imperative loop which executes its body at-least once, even if the condition in while
is false
. We will define the syntax of the do-while
loop as do <expression_to_execute> while(<condition_to_check>)
. This syntax will expand to produce a code block that will execute expression_to_execute
once and then go into a named let
to conditionally execute it in a loop. The implementation of this construct follows:
declare syntax
do $body while($condition)
=> { $body
let loop ()
when ($condition)
{ $body
loop() }}
// Usage:
let i = 0
do { showln(i); i = i + 1 } while (i < 5)
//-> 0
1
2
3
4
do { showln(i); i = i + 1 } while (i < 5)
//-> 5
i = 0;
do { showln(i); i = i + 1 } while (i < 5)
//-> 0
1
2
3
4
The code generated by declare syntax
is hygienic. Free variables in the expansion code will refer to bindings visible when the syntax was specified. This is demonstrated in the following program:
let x = 100
declare syntax
prnx => showln(x)
// Usage:
prnx
//-> 100
let (x = 200) prnx
//-> 100
Another facility for extending the compiler is the macro system. It gives full access to the lower-level compiler APIs for generating code. These extensions are created using the declare macro
statement which has the general form:
declare macro <keyword> <layout> => <expander>
The keyword
and layout
parts are similar to that of declare syntax
. Expander
is Slogan code that will be executed by the compiler to generate the actual expansion of the macro. The module core.compiler
define functions that can generate low-level Slogan code. The expander
will consist mostly of calls to these functions.
The following example shows one kind of extension that can be defined only using macros - one that introduces new variable bindings.
declare macro
bind_names ($names, $values) $body
=> let (bindings = core.map(^(n, v) [n, v], $names, $values))
core.compiler.let_(bindings, $body)
// Usage:
bind_names([a, b, c], [1, 2, 3]) a + b + c
//=> 6
It is possible to add custom code parsers and invoke them from macros. The parsers are functions called by the compiler. So they must be defined using a declare function
statement. Let us look at an example of this. The macro we are going to define is called str
. It expects an asterisk symbol followed by an identifier. The macro converts the identifier to a string. In short, the str
macro defines a DSL for converting symbols to strings. Not very useful, but enough to illustrate compile-time functions!
declare function compile_ident(tokenizer)
let (token = tokenizer.next)
{ when (core.special_token_to_string(token) <> "*")
core.error("expected asterisk")
let (sym = tokenizer.next)
{ when (core.not(core.is_valid_identifier(sym)))
core.error("invalid identifier")
sym }}
declare macro
str $name
=> core.symbol_to_string($name),
[$name:compile_ident]
// Usage:
(str * hello) == "hello"
//=> true
Macros are un-hygienic in that free variables in the expander takes their definition from the context of macro expansion, not from where the macro was defined.
let x = 100
declare macro
prnx_impure => core.compiler.call('showln, ['x])
// Usage:
prnx_impure
//=> 100
let (x = 200) prnx_impure
//=> 200
The following section documents all functions in the core.compiler
module.
function: function_(params, body)
returns: code to create a function object.
args - a list of identifiers that become the parameters to the function.
body - an expression that become the body of the function.
// Example:
let f = eval(core.compiler.function_(['a, 'b], core.compiler.call('`+`, ['a, 'b])))
f(10, 20)
//=> 30
function: call(fn_name, args)
returns: code to call the function named fn_name with the argument list args.
function: let_(bindings, body)
function: letseq_(bindings, body)
function: letrec_(bindings, body)
function: named_let(name, bindings, body)
returns: code to evaluate `body` in the context established by `bindings`.
// Examples:
eval(core.compiler.let_([['a, 1], ['b, 2]], core.compiler.call('list, ['a, 'b])))
//=> [1, 2]
eval(core.compiler.letseq_([['a, 1], ['b, 'a]], core.compiler.call('list, ['a, 'b])))
//=> [1, 1]
// generate the following code:
// let iter (i = 0)
// when (i < 5)
// { showln(i)
// iter(inc(i)) }
eval(core.compiler.named_let('iter, [['i, 0]],
core.compiler.when_(core.compiler.call('`<`, ['i, 5]),
core.compiler.block([core.compiler.call('showln, ['i]),
core.compiler.call('iter, [core.compiler.call('inc, ['i])])]))))
//-> 0
1
2
3
4
function: if_(condition, consequent, alternative)
function: if_multi(conditions_consequences)
function: when_(condition, consequent)
function: case_(conditions_consequences)
returns: code for conditional execution.
// Examples:
eval(core.compiler.if_(core.compiler.call('`<`, [1, 2]), 100, 200))
//=> 100
eval(core.compiler.if_multi([[core.compiler.call('`>`, [1, 2]), 100], [core.compiler.call('`>`, [2, 1]), 200], ['else, 300]]))
//=> 200
eval(core.compiler.case_(200, [[[100], "a"], [[200], "b"], ['else, "c"]]));
//=> b
function: let_statement(name, value)
returns: code to introduce a new global binding.
// Example:
eval(core.compiler.let_statement('xyz, 123))
xyz
//=> 123
function: assignment(name, value)
returns: code to assign a new value to a global binding.
// Example:
eval(core.compiler.assignment('xyz, core.compiler.call('inc, ['xyz])))
xyz
//=> 124
function: let_bindings_parser()
returns: a parser for let bindings.
// Example:
declare macro
doit $body where $bindings
=> core.compiler.let_($bindings, $body),
[$bindings:core.compiler.let_bindings_parser]
doit a + b where (a = 100, b = 200)
//=> 300
function: make_bindings_parser(letkw)
returns: a parser for bindings, for the given let keyword.
In the current implementation, macros and syntax cannot be exported from closures, modules and namespaces.


The performer revealed to his followers on social media the pet passed away on Friday, saying the house was now ‘silent’.
And now we’re crying.
Followers of the comedian – who also has dog Milo – voiced their sadness for Matt’s loss, as the star shared an image of golden Labrador Hob being a 10/10 good boy in some leaves.
‘On Friday my dog Hob died,’ he wrote on Sunday.
‘Hob could bark for England. Now the house is silent.
‘Hob was one of the greatest friends I’ve ever had. Thank you Hobby. I love you xxx.’
It didn’t take long for his 80,000 followers to chime in, as one said their sorrow for his loss among his celebrity friends who also commented.
Advertisement Advertisement
Actress Pearl Mackie wrote: ‘Oh no!! So sorry to hear that Matt! Ahhh sending much love to you mate and love to hob in doggie heaven.’
Celebrity Big Brother’s Courtney Act also replied, as she wrote: ‘So sorry to hear that! Sending much love.’
Fellow comedian Sarah Millican sent her love: ‘Oh so sorry to hear this, Matt. Lots of love to you. X.’
The loss of Hob comes after Matt recently paid tribute to his ex-husband, 10 years after he died by suicide.

Matt and Kevin wed in 2006 in a civil ceremony attended by cluding Barbara Windsor, Neil Tennant, Elton John, and Courtney Love but they had it dissolved in 2008.
A year later Kevin died, and Matt shared that he ‘loved him more than anyone I’ve ever met’.
‘This is Kevin John McGee, who died ten years ago today,’ he wrote.
‘I loved him more than anyone I’ve ever met, and still do. He was so funny and silly and clever and kind and handsome and his smile made my heart soar. We were together for nearly six years and he made me the happiest man on the planet.’
Got a showbiz story?
If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


Home
About Me
Gallery
Photos
Videos
Alumni
Research Opportunities
Research Opportunities
About Me
I am Yash Patil, AI Enthusiast.
©2021 by Yash Patil


Toggle navigation
V
iticulture
Home
Services
Portfolio
Short Codes
Icons
Typography
Mail Us
Feedback
Mail Us
Get in
Touch