Version: 1.3.3
This plugin adds export capabilities to all amCharts products - charts and maps.
It allows annotating and exporting chart or related data to various bitmap, vector, document or data formats, such as PNG, JPG, PDF, SVG, JSON, XLSX and many more.
Please note that due to security measures implemented in modern browsers, some or all export options might not work if the web page is loaded locally (via file:///) or contain images loaded from different host than the web page itself.
bundled CSS file. I.e.:
<script src="amcharts/plugins/export/export.min.js"></script>
<link type="text/css" href="amcharts/plugins/export/export.css" rel="stylesheet">
Or if you'd rather use amCharts CDN:
<script src="//cdn.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link type="text/css" href="//cdn.amcharts.com/lib/3/plugins/export/export.css" rel="stylesheet">
(this needs to go after all the other amCharts includes)
export
with default options:AmCharts.makeChart( "chartdiv", {
...,
"export": {
"enabled": true
}
} );
AmCharts.makeChart( "chartdiv", {
...,
"export": {
"enabled": true,
"menu": [ {
"class": "export-main",
"menu": [ {
"label": "Download",
"menu": [ "PNG", "JPG", "CSV" ]
}, {
"label": "Annotate",
"action": "draw",
"menu": [ {
"class": "export-drawing",
"menu": [ "PNG", "JPG" ]
} ]
} ]
} ]
}
} );
The plugin relies on a number of different libraries, to export images, draw annotations or generate download files.
Those libraries need to be loaded for the plugin to work properly.
There are two ways to load them. Choose the one that is right:
All libraries required for plugin operation are included withing plugins /libs subdirectory.
The plugin will automatically try to look in chart's path
property. If your plugin files are located within plugins folder under amcharts
(as is the case with the default distributions), you don't need to do anything -
the libraries will load on-demand.
If you are using relative url, note that it is relative to the web page you are displaying your chart on, not the export.js library.
In case you've moved the libs folder you need to tell the plugin where it is
"libs": { "path": "../libs/" }
You can also load all those JavaScript libraries by <script>
tags. Since
loading of libraries is on by default you will need to turn it off by setting
"libs": { "autoLoad": false }
Here is a full list of the files that need to be loaded for each operation:
| File | Located in | Required for |
|---|---|---|
| fabric.min.js | libs/fabric.js/ | Any export operation |
| FileSaver.js | libs/FileSaver.js/ | Used to offer download files |
| pdfmake.min.js | libs/pdfmake/ | Export to PDF format |
| vfs_fonts.js | libs/pdfmake/ | Export to PDF format |
| jszip.js | libs/jszip/ | Export to XLSX format |
| xlsx.js | libs/xlsx/ | Export to XLSX format |
| Property | Default | Description |
|---|---|---|
| backgroundColor | #FFFFFF | RGB code of the color for the background of the exported image |
| enabled | true | Enables or disables export functionality |
| divId | ID or a reference to div object in case you want the menu in a separate container. | |
| fabric | {} | Overwrites the default drawing settings (fabricJS library) |
| fallback | {} | Holds the messages to guide the user to copy the generated output; false will disable the fallback feature |
| fileName | amCharts | A file name to use for generated export files (an extension will be appended to it based on the export format) |
| legend | {} | Places the legend in case it is within an external container (skip to chapter) |
| libs | 3rd party required library settings (see the above section) | |
| menu | [] | A list of menu or submenu items (see the next chapter for details) |
| pdfMake | {} | Overwrites the default settings for PDF export (pdfMake library) |
| position | top-right | A position of export icon. Possible values: "top-left", "top-right" (default), "bottom-left", "bottom-right" |
| removeImages | true | If true export checks for and removes "tainted" images that area lodead from different domains |
| delay | General setting to delay the capturing of the chart (skip to chapter) | |
| exportTitles | false | Exchanges the data field names with it's dedicated title ( data export only ) |
| exportSelection | false | Exports the current data selection only ( data export only ) |
| dataDateFormat | Format to convert date strings to date objects, uses by default charts dataDateFormat ( data export only ) | |
| dateFormat | YYYY-MM-DD | Formats the category field in given date format ( data export only ) |
| keyListener | false | If true it observes the pressed keys to undo/redo the annotations |
| fileListener | false | If true it observes the drag and drop feature and loads the dropped image file into the annotation |
| drawing | {} | Object which holds all possible settings for the annotation mode (skip to chaper) |
Plugin includes a way to completely control what is displayed on export menu. You can set up menus, sub-menus, down to any level. You can even add custom items there that execute your arbitrary code on click. It's so configurable it makes us sick with power ;)
The top-level menu is configured via menu
property under export
. It should
always be an array, even if you have a single item in it.
The array items could be either objects or format codes. Objects will allow you to specify labels, action, icon, child items and even custom code to be executed on click.
Simple format codes will assume you need an export to that format.
Here's a sample of the simple menu setup that allows export to PNG, JPG and CSV:
"export": {
"enabled": true,
"menu": [ {
"class": "export-main",
"menu": [ "PNG", "JPG", "CSV" ]
} ]
}
The above will display a menu out of three options when you hover on export icon:
When clicked the plugin will trigger export to a respective format.

Please note that we have wrapped out menu into another menu item, so that only the icon is displayed until we roll over the icon. This means that technically we have a two-level hierarchical menu.
If we opmitted that first step, the chart would simply display a format list right there on the chart.
However, you can do so much more with the menu.
Let's add more formats and organize image and data formats into separate submenus.
To add a submenu to a menu item, simply add a menu
array as its own property:
"export": {
"enabled": true,
"menu": [ {
"class": "export-main",
"menu": [ {
"label": "Download as image",
"menu": [ "PNG", "JPG", "SVG" ]
}, {
"label": "Download data",
"menu": [ "CSV", "XLSX" ]
} ]
} ]
}
Now we have a hierarchical menu with the following topology:
We can mix "string" and "object" formats the way we see fit, i.e.:
"export": {
"menu": [
"PNG",
{ "label": "JPEG",
"format": "JPG" },
"SVG"
]
}
The magic does not end here, though.
Just like we set label
and format
properties for menu item, we can set
click
as well.
This needs to be a function reference. I.e.:
"export": {
"menu": [
"PNG",
{ "label": "JPEG",
"click": function () {
alert( "Clicked JPEG. Wow cool!" );
} },
"SVG"
]
}
In case you have an external legend you need to define the position where it should get placed in your export. By default it obtains the dimensions from the container but you can optionally overwrite those settings as shown below.
"export": {
"legend": {
"position": "top", // or "right", "bottom" and "left" are possible
"width": 200, // optional
"height": 200 // optional
}
}
By passing the menuReviver
callback function you can modify the resulting menu
item or relative container, before it gets appended to the list (ul
). The
function takes two arguments and it needs to return a valid DOM element.
"export": {
"menuReviver": function(item,li) {
li.setAttribute("class","something special");
return li;
}
}
Some formats, such as CSV, have specific parameters that are used when exporting to this format. For example, default column separator for CSV is a comma. But what if you would like to be that a tab? You could use menuReviver
for that like this:
"export": {
"enabled": true,
"menuReviver": function(cfg,li) {
if ( cfg.format == "CSV" ) {
cfg.delimiter = "\t";
}
return li;
}
}
Below you will find a list of parameters that you can override for each format:
JPG
| Property | Default | Available values | Description |
|---|---|---|---|
| quality | 1 | 0-1 | A quality of the resulting JPG image |
| multiplier | 1 | number | Set this to non-1 number to resize the resulting image by |
PNG
| Property | Default | Available values | Description |
|---|---|---|---|
| quality | 1 | 0-1 | A quality of the resulting JPG image |
| multiplier | 1 | number | Set this to non-1 number to resize the resulting image by |
| Property | Default | Available values | Description |
|---|---|---|---|
| multiplier | 2 | number | Set this to non-1 number to resize the resulting image by |
| Property | Default | Available values | Description |
|---|---|---|---|
| delay | 1 | number | Delay by number of seconds before triggering print |
| lossless | false | true/false | Enable or disable image optimization when printing |
CSV
| Property | Default | Available values | Description |
|---|---|---|---|
| delimiter | "," | string | A string to use as a column delimiter |
| quotes | true | true/false | Set whether to enclose strings in doublequotes |
| escape | true | true/false | Set whether to escape strings |
XLSX
| Property | Default | Available values | Description | |
|---|---|---|---|---|
| dateFormat | "dateObject" | "dateObject"\ | "string" | Whether to export dates as dates recognisable by Excel or formatted as strings |
| withHeader | true | true/false | Add header row with column names | |
| stringify | false | true/false | Convert all cell content to strings |
In case you don't like our structure, go ahead and write your own recursive
function to create the menu by the given list configured through menu
.
"export": {
"menuWalker": function(list,container) {
// some magic to generate the nested lists using the given list
}
}
Adding menu item to print the chart or map is as easy as adding export ones. You
just use "PRINT" as format
. I.e.:
"export": {
"menu": [
"PNG",
"SVG",
"PRINT"
]
}
Or if you want to change the label:
"export": {
"menu": [
"PNG",
"SVG",
{
"format": "PRINT",
"label": "Print Chart"
}
]
}
OK, this one is so cool, you'll need a class 700 insulation jacket.
By default each menu item triggers some kind of export. You can trigger an
"annotation" mode instead by including "action": "draw"
instead.
"export": {
"menu": [ {
"class": "export-main",
"menu": [ {
"label": "Download",
"menu": [ "PNG", "JPG", "CSV", "XLSX" ]
}, {
"label": "Annotate",
"action": "draw"
} ]
} ]
}
Now, when you click on the "Annotate" item in the menu, the chart will turn into an image editor which you can actual draw on and the menu gets replaced by the default annotation menu.
If you don't like the detault annotation menu, you can define your own:
"export": {
"menu": [ {
"class": "export-main",
"menu": [ {
"label": "Download",
"menu": [ "PNG", "JPG", "CSV", "XLSX" ]
}, {
"label": "Annotate",
"action": "draw",
"menu": [ {
"class": "export-drawing",
"menu": [ "JPG", "PNG", "SVG", "PDF" ]
} ]
} ]
} ]
}
Now, when you turn on the annotation mode, your own submenu will display, allowing to export the image into either PNG, JPG, SVG or PDF.
And that's not even the end of it. You can add menu items to cancel, undo, redo
and still be able to reuse the choices by using the actions draw.modes
,
draw.widths
, draw.colors
or draw.shapes
.
"export": {
"menu": [ {
"class": "export-main",
"menu": [ {
"label": "Download",
"menu": [ "PNG", "JPG", "CSV", "XLSX" ]
}, {
"label": "Annotate",
"action": "draw",
"menu": [ {
"class": "export-drawing",
"menu": [ {
label: "Size ...",
action: "draw.widths",
widths: [ 5, 20, 30 ] // replaces the default choice
}, {
"label": "Edit",
"menu": [ "UNDO", "REDO", "CANCEL" ]
}, {
"label": "Save",
"format": "PNG"
} ]
} ]
} ]
} ]
}
Since 1.2.1 it's also possible to set some of the annotation options without the need to re-define the whole menu structure. You can easily adjust the choice of modes, colors, widths or shapes, and set the defaults when entering the annotation mode.
Following setup shows you all available settings. If you don't have the
drawing
property at all, it will falls back to the defaults.
"export": {
"drawing": {
"enabled": true, // Flag for `action: "draw"` menu items to toggle it's visibility
"shapes": [ "test.svg" ], // Choice of shapes offered in the menu (shapes are being loaded from the shapes folder)
"width": 2, // Width of the pencil and line when entering the annotation mode
"widths": [ 2, 10, 20 ], // Choice of widths offered in the menu
"color": "#000000", // Color of the pencil, line, text and shapes when entering the annotation mode
"colors": [ "#000000", "#FF0000" ] // Choice of colors offered in the menu
"opacity": 1, // Opacity of the pencil, line, text and shapes when entering the annotation mode
"opacities": [ 1, 0.8, 0.6, 0.4, 0.2 ] // Choice of opacity offered in the menu
"menu": [ ... ], // Shown menu when entering the annotation mode
"mode": "pencil", // Drawing mode when entering the annotation mode "pencil", "line" and "arrow" are available
"modes": [ "pencil" , "line", "arrow" ], // Choice of modes offered in the menu
"arrow": "end", // position of the arrow on drawn lines; "start","middle" and "end" are available
"autoClose": true // Flag to automatically close the annotation mode after download
}
}
If you need to filter the drawn elements, you can pass the reviver
method in
your global configuration, or pass it to the capture
method if you export
manually. For example, to hide all free labels you can simply do something like
the following:
"export": {
"menu": ["PNG"],
"reviver": function(obj) {
if ( obj.className == "amcharts-label" ) {
obj.opacity = 0;
}
}
}
In some cases you may want to delay the capturing of the current chart snapshot to highlight the current value. For this you can simply define the 'delay' property in your menu item:
"export": {
"delay": 3,
// or specifically on individual menu items
"menu": [{
"label": "PNG",
"format": "PNG",
"delay": 3
}]
}
Since version 1.1.7 the plugin introduces some events you can use. For example
the afterCapture
event allows you to add some texts or images which can't be
seen on the regular chart but only the generated export. Use it to watermark
your exported images.
"export": {
"afterCapture": function(menuConfig) {
var text = new fabric.Text("This is shown on exported image only", {
top: 50,
left: 100,
family: this.setup.chart.fontFamily,
size: this.setup.chart.fontSize * 2
});
this.setup.fabric.add(text);
},
// or specifically on individual menu items
"menu": [{
"label": "PNG",
"format": "PNG",
"afterCapture": function(menuConfig) {
var text = new fabric.Text("This is shown on exported image only", {
top: 50,
left: 100,
family: this.setup.chart.fontFamily,
size: this.setup.chart.fontSize * 2
});
this.setup.fabric.add(text);
}
}]
}
| Name | Arguments | Description |
|---|---|---|
| beforeCapture | menu item setup | Called before the SVG element gets converted |
| afterCapture | menu item setup | Called right before the passed callback of the capture method |
| Property | Description |
|---|---|
| action | Set to "draw" if you want the item to trigger annotation mode |
| class | Class name applied to the tag |
| click | Function handler invoked upon click on menu item |
| format | A format to export chart/map to upon click (see below for a list of available formats) |
| icon | Icon file (will use chart's path if the URL is not full) |
| label | Text label to be displayed |
| menu | An array of submenu items |
| title | A title attribute of the link |
| backgroundColor | The background color of the canvas |
| fileName | A file name to use for generated export files (an extension will be appended to it based on the export format) |
| extension | File extension for the generated export file (uses format default if not defined) |
| mimeType | Internet media type to generate the export file (usses format default if not defined) |
| pageSize | A string or { width: number, height: number } (details) |
| pageOrientation | By default we use portrait, you can change it to landscape if you wish (details) |
| pageMargins | [left, top, right, bottom] or [horizontal, vertical] or just a number for equal margins (details) |
| content | Array of elements which represents the content (details) |
| multiplier | Scale factor for the generated image |
| lossless | Flag to print the actual vector graphic instead of buffered bitmap (print option only, experimental) |
| delay | A numeric value to delay the capturing in seconds (details) |
| exportTitles | Exchanges the data field names with it's dedicated title ( data export only ) |
| exportSelection | Exports the current data selection only ( data export only ) |
| dataDateFormat | Format to convert date strings to date objects, uses by default charts dataDateFormat ( data export only ) |
| dateFormat | Formats the category field in given date format ( data export only ) |
Available format
values:
When exporting to PDF, you can set and modify the content of the resulting document. I.e. add additional text and/or modify image size, etc.
To do that, you can use menu item's content
property.
Each item in content
represents either a text line (string) or an exported
image.
To add a text line, simply use a string. It can even be a JavaScript variable or a function that returns a string.
To include exported image, use image: "reference"
.
Additionally, you can add fit
property which is an array of pixel dimensions,
you want the image to be scaled to fit into.
Here's an example of such export menu item:
{
"format": "PDF",
"content": [ "Saved from:", window.location.href, {
"image": "reference",
"fit": [ 523.28, 769.89 ] // fit image to A4
} ]
}
| Property | Description |
|---|---|
| pageSize | a string or { width: number, height: number } |
| pageOrientation | by default we use portrait, you can change it to landscape if you wish |
| pageMargins | [left, top, right, bottom] or [horizontal, vertical] or just a number for equal margins |
| content | array of elements which represents the content (full description) |
| Pagesize | Dimensions in pixel |
|---|---|
| 4A0 | [4767.87, 6740.79] |
| 2A0 | [3370.39, 4767.87] |
| A0 | [2383.94, 3370.39] |
| A1 | [1683.78, 2383.94] |
| A2 | [1190.55, 1683.78] |
| A3 | [841.89, 1190.55] |
| A4 | [595.28, 841.89] |
| A5 | [419.53, 595.28] |
| A6 | [297.64, 419.53] |
| A7 | [209.76, 297.64] |
| A8 | [147.40, 209.76] |
| A9 | [104.88, 147.40] |
| A10 | [73.70, 104.88] |
| B0 | [2834.65, 4008.19] |
| B1 | [2004.09, 2834.65] |
| B2 | [1417.32, 2004.09] |
| B3 | [1000.63, 1417.32] |
| B4 | [708.66, 1000.63] |
| B5 | [498.90, 708.66] |
| B6 | [354.33, 498.90] |
| B7 | [249.45, 354.33] |
| B8 | [175.75, 249.45] |
| B9 | [124.72, 175.75] |
| B10 | [87.87, 124.72] |
| C0 | [2599.37, 3676.54] |
| C1 | [1836.85, 2599.37] |
| C2 | [1298.27, 1836.85] |
| C3 | [918.43, 1298.27] |
| C4 | [649.13, 918.43] |
| C5 | [459.21, 649.13] |
| C6 | [323.15, 459.21] |
| C7 | [229.61, 323.15] |
| C8 | [161.57, 229.61] |
| C9 | [113.39, 161.57] |
| C10 | [79.37, 113.39] |
| RA0 | [2437.80, 3458.27] |
| RA1 | [1729.13, 2437.80] |
| RA2 | [1218.90, 1729.13] |
| RA3 | [864.57, 1218.90] |
| RA4 | [609.45, 864.57] |
| SRA0 | [2551.18, 3628.35] |
| SRA1 | [1814.17, 2551.18] |
| SRA2 | [1275.59, 1814.17] |
| SRA3 | [907.09, 1275.59] |
| SRA4 | [637.80, 907.09] |
| EXECUTIVE | [521.86, 756.00] |
| FOLIO | [612.00, 936.00] |
| LEGAL | [612.00, 1008.00] |
| LETTER | [612.00, 792.00] |
| TABLOID | [792.00, 1224.00] |
The plugin comes with a default CSS file export.css
. You just need to include
it on your page.
Feel free to override any styles defined in it, create your own version and modify as you see fit.
If you choose to modify it, we suggest creating a copy so it does not get overwritten when you update amCharts or plugin.
We explained how you can define custom functions to be executed on click on export menu items.
Those functions can tap into plugin's methods to augment it with some custom functionality.
Here's an example:
"export": {
menu: [ {
label: "JPG",
click: function() {
this.capture({},function() {
this.toJPG( {}, function( data ) {
this.download( data, "image/jpg", "amCharts.jpg" );
});
});
}
} ]
}
The above will use plugin's internal capture
method to capture it's current
state and toJPG()
method to export the chart to JPEG format.
Yes, you're right, it's the exact equivalent of just including "JPG" string. The code is here for the explanatory purposes.
Here's a full list of API functions available for your consumption:
| Function | Parameters | Description |
|---|---|---|
| toJPG | (object) options, (function) callback | Prepares a JPEG representation of the chart and passes the binary data to the callback function |
| toPNG | (object) options, (function) callback | Prepares a PNG representation of the chart and passes the binary data to the callback function |
| toSVG | (object) options, (function) callback | Prepares a SVG representation of the chart and passes the binary data to the callback function |
| toPDF | (object) options, (function) callback | Prepares a PDF representation of the chart and passes the binary data to the callback function |
| toJSON | (object) options, (function) callback | Prepares a JSON and passes the plain data to the callback function |
| toCSV | (object) options, (function) callback | Prepares a CSV and passes the plain data to the callback function |
| toXLSX | (object) options, (function) callback | Prepares a XLSX representation of the chart and passes the binary data to the callback function |
| toBlob | (object) options, (function) callback | Prepares a BLOB and passes the instance to the callback function |
| toCanvas | (object) options, (function) callback | Prepares a Canvas and passes the element to the callback function |
| toArray | (object) options, (function) callback | Prepares an Array and passes the data to the callback function |
| toImage | (object) options, (function) callback | Generates an image element which holds the output in an embedded base64 data url |
Unfortunately, Internet Explorer 9 has restrictions in place that prevent the download of locally-generated files. In this case the plugin will place the generated image along download instructions directly over the chart area.
To avoid having a bigger payload by including senseless polyfills to your site,
you may need to add following metatag in your <head>
of your HTML document.
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
This feature will kick in by default. If you want to disable it simply pass
false
to the fallback
parameter.
"export": {
fallback: false
}
In case you want to change our default messages you can modify it like following.
"export": {
fallback: {
text: "CTRL + C to copy the data into the clipboard.",
image: "Rightclick -> Save picture as... to save the image."
}
}
This plugin requires at least 3.13 version of JavaScript Charts, JavaScript Stock Chart or JavaScript Maps.
The export will also need relatively recent browsers.
IE10 and up are supported.
Partial support for IE9; Fallback mechanism.
IE8 and older are not supported I'm afraid. Hey, it's time to upgrade!
They're all in subdirectory /examples.
You're encouraged to modify, extend and make derivative plugins out of this plugin.
You can modify files, included in this archive or, better yet, fork this project on GitHub:
https://github.com/amcharts/export
We're curious types. Please let us know<EMAIL_ADDRESS>if you do create something new out of this plugin.
This plugin is licensed under Apache License 2.0.
This basically means you're free to use or modify this plugin, even make your own versions or completely different products out of it.
Please see attached file "license.txt" for the complete license or online here:
http://www.apache.org/licenses/LICENSE-2.0
export.css
which showed the canvasgatherClassName
checking element typegetChartData
which ignored given data array ( affected API usage only )reviver
method to toSVG
; converts by default RGBA to HEX colors codes and places it's dedicated opacity propertyexportSelection
exports the current data selectiondataDateFormat
converts the date-strings to date objects with given formatdateFormat
converts the date in given formatprocessData
to format date fields and translate fieldsgatherChartData
collects data, fields and titles only and uses processData
to formatdrawing.menu
individual menu items get prioritisedfileListener: true
keyListener: true
toArray
exportTitles
available in general or individual setup which exchanges the data field names with it's dedicated titletext/plain
and image/*
mime types (CSS has been modified)toImage
method; returns img
element with embedded base64 imagerygetBase64
option in toSVG
toImage
usage in toPRINT
to be able to choose the image type + settings.lossless
option in toPRINT
(experimental)


tfjs-vis is a small library for in browser visualization intended for use with TensorFlow.js.
Its main features are:
Model architecture is just a fancy way of saying "which functions will the model run when it is executing", or alternatively "what algorithm will our model use to compute its answers". ML models are algorithms that take an input and produce an output. When using neural networks, the algorithm is a set of layers of neurons with ‘weights' (numbers) governing their output. The training process learns the ideal values for those weights.
Shuffling is important because typically during training the dataset is broken up into smaller subsets, called batches, that the model is trained on. Shuffling helps each batch have a variety of data from across the data distribution
You should always shuffle your data before handing it to the training algorithms in TensorFlow.jsWe normalize the data. Here we normalize the data into the numerical range 0-1 using min-max scaling. Normalization is important because the internals of many machine learning models you will build with tensorflow.js are designed to work with numbers that are not too big. Common ranges to normalize data to include 0 to 1 or -1 to 1. You will have more success training your models if you get into the habit of normalizing your data to some reasonable range.
You should always consider normalizing your data before training. Some datasets can be learned without normalization, but normalizing your data will often eliminate a whole class of problems that would prevent effective learning. You can normalize your data before turning it into tensors. We do it afterwards because we can take advantage of vectorization in TensorFlow.js to do the min-max scaling operations without writing any explicit for loops.Formulate your task:


Why App.net (unfortunately) won't work
I’ll start out by saying that while this post will probably come across as cynical, I do genuinely want App.net to work. Competition is always healthy and what I’ve seen of the Alpha platform so far is encouraging. Anyone who can raise $750,000 on Kickstarter is clearly onto something and should be taken seriously. There are, however, fundamental issues with the project’s approach that are at odds with successful user-based services on the web.
Let’s get this one out of the way first. While App.net doesn’t claim to be a competitor to Twitter, people will always compare the two. Describing App.net to a layperson in these early stages always results in the response: “Oh, a micro-blogging service? Like Twitter?”. Now I’m not suggesting that Twitter’s dominance of this medium should go unchallenged. The problem is this: Twitter is fine. It has its flaws, sure; the API is a little hokey and not amazingly well documented, it goes down from time to time, etc. But it’s not doing anything badly enough to make users cry out for an alternative. As a developer (and historically amongst the main audience for the project) I really don’t have any major problems with Twitter.
Dalton Caldwell is building for Dalton Caldwell
Watching the introductory video for App.net, presented by their founder and CEO, one thing jumped out at me. He says the words ‘me’, ‘I’ and ‘we’ a hell of a lot. This project hasn’t arisen from some great outcry amongst web users, it’s arisen as a personal solution for Caldwell’s own sense of feeling ‘let down’ by free web 2.0 services. There’s nothing wrong with building for yourself, as long as you don’t expect anyone else to care. I don’t doubt that there are people out there that share his sentiment, and clearly there must be given the project’s overwhelmingly popular response on Kickstarter; but when building a social network, solipsism isn’t a great starting point.
Kickstarter investment isn’t real value
While App.net did raise a hugely impressive three-quarters of a million on Kickstarter, this figure isn’t really as significant as it sounds. Because it is made up of thousands of small donations, as opposed to several large ones, the money doesn’t carry as much weight as that raised through VC or angel investment. The donators aren’t looking for good ROI and therefore aren’t evaluating it as a business venture, just as something they’d like to see. Lots of things raise money on Kickstarter, and they aren’t always profitable.
It isn’t open source
Despite the obvious attempt to appeal to developers, bizarrely App.net have overlooked what would surely be the best way to get people on board: open sourcing it. All the developers I know are cynical when it comes to branding and spiel, but give them an opportunity to tear something apart and figure out how it works and they’ll be more likely to get on board. What’s more is that a developer account for access to the API currently stands at $100 p/a – surely a huge barrier to casual developers and hackers looking to play around.
It will never go mainstream
One of the big selling points of App.net is that they are ‘selling their product, not their users’. By using a subscription payment model, there is no catering to advertisers or selling off data to third parties. This is certainly a healthy ideology, and there’s no denying that there are serious issues facing data privacy on social networks. The problem is that most people simply don’t care about data privacy. Facebook’s questionable approach to data protection has been blown open in the past few months, but has it affected user figures?
As for as advertising is concerned, advertisements invade our privacy every day, across every imaginable form of media. They are often well-targeted and invasive but we learn to filter them out. Premium models do work: mobile apps offering an ad-supported but free version or a no-ad premium version are becoming the norm; but the majority will always go for the free version. In this instance, the free version is Twitter.
In fact, I’d go so far as to say that even if App.net were free, it would still not attract a paradigm-shiftingly large user base. Take Google+ as an example – it’s a better product than Facebook in almost every way, but it hasn’t attracted a large user-base because Facebook is so well established. For the average user it would be a hassle to migrate over to a new platform, and would mean bringing a substantial quotient of contacts with them (I tried this last year with Google+ and believe me, it doesn’t work).
None of this is a problem if App.net is only interested in cultivating a niche, developer-centric community, but do developers really just want to build things for other developers? Given the choice between building an app for a potential platform of 100,000 or 100m, I know which one I’d choose – especially if it has commercial intent.
I’d love to look back on this post in a couple of years time in the way we know scoff at news videos from the 80s saying nothing will ever come of the Internet. Sadly though, that’s not going to happen until App.net start talking to more users and fewer Silicon Valley gentry.


This is a workshop designed for total beginners, and if you have any experience in these, you may be re-learning basics.


Write a chord in the input (try C13b9 or maybe Fsus4maj#11) above and hit enter. You can click and drag your way around the wave function.


Script that automatically refreshes images with maps every 1 second. Useful for testing generator presets.


|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
| Interface Summary | |
|---|---|
| JDOAggregateIF | INTERNAL: Represents an aggregate function in a JDO query. |
| JDOExpressionIF | INTERNAL: Represents an expression in a JDO query. |
| JDOValueIF | INTERNAL: Represents a value in a JDO query. |
| JDOVisitorIF | INTERNAL: Visitor interface |
| Class Summary | |
|---|---|
| JDOAggregate | INTERNAL: JDOQL aggregate function. |
| JDOAnd | INTERNAL: JDOQL logical expression: and (&&). |
| JDOBoolean | INTERNAL: JDOQL boolean expression value: true or false. |
| JDOCollection | INTERNAL: JDOQL value: collection. |
| JDOContains | INTERNAL: JDOQL method: Collection.contains(Object). |
| JDOEndsWith | INTERNAL: JDOQL method: String.endsWith(String). |
| JDOEquals | INTERNAL: JDOQL method: Object.equals(Object) (==). |
| JDOEvaluator | INTERNAL: Methods for reducing JDOExpressionIF, so that expressions that require no input data can be removed from the query. |
| JDOField | INTERNAL: JDOQL value: instance field. |
| JDOFunction | INTERNAL: JDOQL method: Object.<operator>(Object,...). |
| JDOIsEmpty | INTERNAL: JDOQL method: Collection.isEmpty(). |
| JDOLike | INTERNAL: JDOQL method: String.like(String). |
| JDONativeValue | INTERNAL: JDOQL value: native value expression. |
| JDONot | INTERNAL: JDOQL logical expression: not (!). |
| JDONotEquals | INTERNAL: JDOQL method: !Object.equals(Object) (!=). |
| JDONull | INTERNAL: JDOQL value: null. |
| JDOObject | INTERNAL: JDOQL value: object. |
| JDOOr | INTERNAL: JDOQL logical expression: or (||). |
| JDOOrderBy | INTERNAL: JDOQL order by statement. |
| JDOParameter | INTERNAL: JDOQL value: parameter. |
| JDOPrimitive | INTERNAL: JDOQL value: primitive. |
| JDOQuery | INTERNAL: JDOQL complete query. |
| JDOSetOperation | INTERNAL: JDOQL set operation. |
| JDOStartsWith | INTERNAL: JDOQL method: String.startsWith(String). |
| JDOString | INTERNAL: JDOQL value: string. |
| JDOValueExpression | INTERNAL: JDOQL boolean expression value: true or false. |
| JDOVariable | INTERNAL: JDOQL value: variable. |
Object model for representing JDOQL queries
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


|
| | Movement (const double &aColDist=0.55, const double &aLinVel=0.5, const double &angVel=1) |
| | This is the constructor for the Movement Class. More...
|
| |
| virtual | ~Movement () |
| | This is the destructor for the Movement Class.  Sets the clearAhead variable accordingly. More...
|
| |
| std::pair< double, double > | computeVelocities () |
| | Checks the clearAhead boolean and updates the velocities accordingly. (Straight if clear ahead. Turning if obstacle in front.) More...
|
| |
| bool | getClearAhead () |
| | Returns whether or not the robot can move forward. This function was added so unit testing could take place on the updateMinDist function. More...
|
| |
|
|
double | linearVelocity |
| |
|
double | angularVelocity |
| |
|
bool | clearAhead |
| |
|
float | collisionDist |
| |
|
double | maxLinVel |
| |
|
double | maxAngVel |
| |
◆ Movement()
| Movement::Movement |
( |
const double & |
aColDist = 0.55 , |
|
|
const double & |
aLinVel = 0.5 , |
|
|
const double & |
angVel = 1 |
|
) |
| |
This is the constructor for the Movement Class.
- Parameters
-
| aColDist | Minimum collision distance |
| aLinVel | Maximum linear velocity |
| angVel | Maximum angular velocity |
- Returns
- None
◆ ~Movement()
This is the destructor for the Movement Class.
- Parameters
-
- Returns
- None
◆ computeVelocities()
| std::pair< double, double > Movement::computeVelocities |
( |
| ) |
|
Checks the clearAhead boolean and updates the velocities accordingly. (Straight if clear ahead. Turning if obstacle in front.)
- Parameters
-
- Returns
- pair of doubles for linear and angular velocities
◆ getClearAhead()
| bool Movement::getClearAhead |
( |
| ) |
|
Returns whether or not the robot can move forward. This function was added so unit testing could take place on the updateMinDist function.
- Parameters
-
- Returns
- boolean of clearAhead status
◆ updateMinDist()
| void Movement::updateMinDist |
( |
float |
aDist | ) |
|
Uses the turtlebot sensor data to determine whether something is in front of the robot. Sets the clearAhead variable accordingly.
- Parameters
-
| aDist | float of minimum distance observed from laser scan |
- Returns
- None
The documentation for this class was generated from the following files:
- C:/Users/ethan/Desktop/Doxygen Environment/pacman-phase3c/include/Movement.hpp
- C:/Users/ethan/Desktop/Doxygen Environment/pacman-phase3c/src/Movement.cpp


Click over the "Click me!" text and then change text and click OK.
Try this example with different options.


|
LMS API Documentation
v18.06.1
|
Modules | |
| Advanced control functions | |
Data Structures | |
| struct | lms_range_t |
Typedefs | |
| typedef char | lms_name_t[16] |
Enumerations | |
| enum | lms_testsig_t { LMS_TESTSIG_NONE =0, LMS_TESTSIG_NCODIV8, LMS_TESTSIG_NCODIV4, LMS_TESTSIG_NCODIV8F, LMS_TESTSIG_NCODIV4F, LMS_TESTSIG_DC } |
| enum | { LMS_PATH_NONE = 0, LMS_PATH_LNAH = 1, LMS_PATH_LNAL = 2, LMS_PATH_LNAW = 3, LMS_PATH_TX1 = 1, LMS_PATH_TX2 = 2 } |
| Enumeration of RF ports. More... | |
Functions | |
| API_EXPORT int CALL_CONV | LMS_Init (lms_device_t *device) |
| API_EXPORT int CALL_CONV | LMS_GetNumChannels (lms_device_t *device, bool dir_tx) |
| API_EXPORT int CALL_CONV | LMS_EnableChannel (lms_device_t *device, bool dir_tx, size_t chan, bool enabled) |
| API_EXPORT int CALL_CONV | LMS_SetSampleRate (lms_device_t *device, float_type rate, size_t oversample) |
| API_EXPORT int CALL_CONV | LMS_GetSampleRate (lms_device_t *device, bool dir_tx, size_t chan, float_type *host_Hz, float_type *rf_Hz) |
| API_EXPORT int CALL_CONV | LMS_GetSampleRateRange (lms_device_t *device, bool dir_tx, lms_range_t *range) |
| API_EXPORT int CALL_CONV | LMS_SetLOFrequency (lms_device_t *device, bool dir_tx, size_t chan, float_type frequency) |
| API_EXPORT int CALL_CONV | LMS_GetLOFrequency (lms_device_t *device, bool dir_tx, size_t chan, float_type *frequency) |
| API_EXPORT int CALL_CONV | LMS_GetLOFrequencyRange (lms_device_t *device, bool dir_tx, lms_range_t *range) |
| API_EXPORT int CALL_CONV | LMS_GetAntennaList (lms_device_t *dev, bool dir_tx, size_t chan, lms_name_t *list) |
| API_EXPORT int CALL_CONV | LMS_SetAntenna (lms_device_t *dev, bool dir_tx, size_t chan, size_t index) |
| API_EXPORT int CALL_CONV | LMS_GetAntenna (lms_device_t *dev, bool dir_tx, size_t chan) |
| API_EXPORT int CALL_CONV | LMS_GetAntennaBW (lms_device_t *dev, bool dir_tx, size_t chan, size_t index, lms_range_t *range) |
| API_EXPORT int CALL_CONV | LMS_SetNormalizedGain (lms_device_t *device, bool dir_tx, size_t chan, float_type gain) |
| API_EXPORT int CALL_CONV | LMS_SetGaindB (lms_device_t *device, bool dir_tx, size_t chan, unsigned gain) |
| API_EXPORT int CALL_CONV | LMS_GetNormalizedGain (lms_device_t *device, bool dir_tx, size_t chan, float_type *gain) |
| API_EXPORT int CALL_CONV | LMS_GetGaindB (lms_device_t *device, bool dir_tx, size_t chan, unsigned *gain) |
| API_EXPORT int CALL_CONV | LMS_SetLPFBW (lms_device_t *device, bool dir_tx, size_t chan, float_type bandwidth) |
| API_EXPORT int CALL_CONV | LMS_GetLPFBW (lms_device_t *device, bool dir_tx, size_t chan, float_type *bandwidth) |
| API_EXPORT int CALL_CONV | LMS_GetLPFBWRange (lms_device_t *device, bool dir_tx, lms_range_t *range) |
| API_EXPORT int CALL_CONV | LMS_SetLPF (lms_device_t *device, bool dir_tx, size_t chan, bool enable) |
| API_EXPORT int CALL_CONV | LMS_SetGFIRLPF (lms_device_t *device, bool dir_tx, size_t chan, bool enabled, float_type bandwidth) |
| API_EXPORT int CALL_CONV | LMS_Calibrate (lms_device_t *device, bool dir_tx, size_t chan, double bw, unsigned flags) |
| API_EXPORT int CALL_CONV | LMS_LoadConfig (lms_device_t *device, const char *filename) |
| API_EXPORT int CALL_CONV | LMS_SaveConfig (lms_device_t *device, const char *filename) |
| API_EXPORT int CALL_CONV | LMS_SetTestSignal (lms_device_t *device, bool dir_tx, size_t chan, lms_testsig_t sig, int16_t dc_i, int16_t dc_q) |
| API_EXPORT int CALL_CONV | LMS_GetTestSignal (lms_device_t *device, bool dir_tx, size_t chan, lms_testsig_t *sig) |
| API_EXPORT int CALL_CONV | LMS_GetChipTemperature (lms_device_t *dev, size_t ind, float_type *temp) |
Variables | |
| static const bool | LMS_CH_TX = true |
| Convenience constants for TX selection. | |
| static const bool | LMS_CH_RX = false |
| Convenience constants for RX selection. | |
The functions in this section provide the ability to easily configure the device for operation. They modify multiple internal device settings.
| typedef char lms_name_t[16] |
Convenience type for fixed length name string
Definition at line 159 of file LimeSuite.h.
| anonymous enum |
Enumeration of RF ports.
| Enumerator | |
|---|---|
| LMS_PATH_NONE |
No active path (RX or TX) |
| LMS_PATH_LNAH |
RX LNA_H port. |
| LMS_PATH_LNAL |
RX LNA_L port. |
| LMS_PATH_LNAW |
RX LNA_W port. |
| LMS_PATH_TX1 |
TX port 1. |
| LMS_PATH_TX2 |
TX port 2. |
Definition at line 306 of file LimeSuite.h.
| enum lms_testsig_t |
Enumeration of LMS7 TEST signal types
Definition at line 170 of file LimeSuite.h.
| API_EXPORT int CALL_CONV LMS_Calibrate | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| double | bw, | ||
| unsigned | flags | ||
| ) |
Perform the automatic calibration of specified RX/TX channel. The automatic calibration must be run after device configuration is finished because calibration values are dependant on various configuration settings.
| device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| chan | channel index |
| bw | bandwidth |
| flags | additional calibration flags (normally should be 0) |
| API_EXPORT int CALL_CONV LMS_EnableChannel | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| bool | enabled | ||
| ) |
Enable or disable specified RX channel.
| [in] | device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX | |
| chan | Channel index | |
| enabled | true(1) to enable, false(0) to disable. |
| API_EXPORT int CALL_CONV LMS_GetAntenna | ( | lms_device_t * | dev, |
| bool | dir_tx, | ||
| size_t | chan | ||
| ) |
Obtain currently selected antenna of the the specified RX or TX channel.
| dev | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| chan | channel index |
| API_EXPORT int CALL_CONV LMS_GetAntennaBW | ( | lms_device_t * | dev, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| size_t | index, | ||
| lms_range_t * | range | ||
| ) |
Obtains recommended bandwidth (lower and upper frequency) for the specified antenna port. The ports can be used outside this range.
| dev | Device handle previously obtained by LMS_Open(). | |
| dir_tx | Select RX or TX | |
| chan | channel index | |
| index | Antenna index | |
| [out] | range | Antenna bandwidth |
| API_EXPORT int CALL_CONV LMS_GetAntennaList | ( | lms_device_t * | dev, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| lms_name_t * | list | ||
| ) |
Obtain antenna list with names. First item in the list is the name of antenna index 0.
| dev | Device handle previously obtained by LMS_Open(). | |
| dir_tx | Select RX or TX | |
| chan | channel index | |
| [out] | list | List of antenna names (can be NULL) |
| API_EXPORT int CALL_CONV LMS_GetChipTemperature | ( | lms_device_t * | dev, |
| size_t | ind, | ||
| float_type * | temp | ||
| ) |
Read LMS7 chip internal temperature sensor
| dev | Device handle previously obtained by LMS_Open(). |
| ind | chip index |
| temp | temperature value |
| API_EXPORT int CALL_CONV LMS_GetGaindB | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| unsigned * | gain | ||
| ) |
Obtain the current combined gain value in dB
| device | Device handle previously obtained by LMS_Open(). | |
| dir_tx | Select RX or TX | |
| chan | Channel index | |
| [out] | gain | Current gain |
| API_EXPORT int CALL_CONV LMS_GetLOFrequency | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| float_type * | frequency | ||
| ) |
Obtain the current RF center frequency in Hz.
| device | Device handle previously obtained by LMS_Open(). | |
| dir_tx | Select RX or TX | |
| chan | Channel index | |
| [out] | frequency | Current RF center frequency in Hz |
| API_EXPORT int CALL_CONV LMS_GetLOFrequencyRange | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| lms_range_t * | range | ||
| ) |
Obtain the supported RF center frequency range in Hz.
| device | Device handle previously obtained by LMS_Open(). | |
| dir_tx | Select RX or TX | |
| [out] | range | Supported RF center frequency in Hz |
| API_EXPORT int CALL_CONV LMS_GetLPFBW | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| float_type * | bandwidth | ||
| ) |
Get the currently configured analog LPF RF bandwidth.
| device | Device handle previously obtained by LMS_Open(). | |
| dir_tx | Select RX or TX | |
| chan | Channel index | |
| [out] | bandwidth | Current LPF bandwidth in Hz |
| API_EXPORT int CALL_CONV LMS_GetLPFBWRange | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| lms_range_t * | range | ||
| ) |
Get the RF bandwidth setting range supported by the analog LPF of LMS chip.
| device | Device handle previously obtained by LMS_Open(). | |
| dir_tx | Select RX or TX | |
| [out] | range | Supported RF bandwidth range in Hz |
| API_EXPORT int CALL_CONV LMS_GetNormalizedGain | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| float_type * | gain | ||
| ) |
Obtain the current combined gain value
| device | Device handle previously obtained by LMS_Open(). | |
| dir_tx | Select RX or TX | |
| chan | Channel index | |
| [out] | gain | Current gain, range [0, 1.0], where 1.0 represents the maximum gain |
| API_EXPORT int CALL_CONV LMS_GetNumChannels | ( | lms_device_t * | device, |
| bool | dir_tx | ||
| ) |
Obtain number of RX or TX channels. Use this to determine the maximum channel index (specifying channel index is required by most API functions). The maximum channel index is N-1, where N is number returned by this function
| device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| API_EXPORT int CALL_CONV LMS_GetSampleRate | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| float_type * | host_Hz, | ||
| float_type * | rf_Hz | ||
| ) |
Get the sampling rate of the specified RX or TX channel. The function obtains the sample rate used in data interface with the host and the RF sample rate used by DAC/ADC.
| [in] | device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX | |
| chan | Channel index | |
| [out] | host_Hz | sampling rate used for data exchange with the host |
| [out] | rf_Hz | RF sampling rate in Hz |
| API_EXPORT int CALL_CONV LMS_GetSampleRateRange | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| lms_range_t * | range | ||
| ) |
Get the range of supported sampling rates.
| device | Device handle previously obtained by LMS_Open(). | |
| dir_tx | Select RX or TX | |
| [out] | range | Allowed sample rate range in Hz. |
| API_EXPORT int CALL_CONV LMS_GetTestSignal | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| lms_testsig_t * | sig | ||
| ) |
Get the currently active test signal
| device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| chan | Channel index |
| sig | Currently active test signal |
| API_EXPORT int CALL_CONV LMS_Init | ( | lms_device_t * | device | ) |
Configure LMS chip with settings that make it ready for operation.
| [in] | device | Device handle previously obtained by LMS_Open(). |
| API_EXPORT int CALL_CONV LMS_LoadConfig | ( | lms_device_t * | device, |
| const char * | filename | ||
| ) |
Load LMS chip configuration from a file
| device | Device handle |
| filename | path to file |
| API_EXPORT int CALL_CONV LMS_SaveConfig | ( | lms_device_t * | device, |
| const char * | filename | ||
| ) |
Save LMS chip configuration to a file
| device | Device handle |
| filename | path to file with LMS chip configuration |
| API_EXPORT int CALL_CONV LMS_SetAntenna | ( | lms_device_t * | dev, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| size_t | index | ||
| ) |
Select the antenna for the specified RX or TX channel.
| dev | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| chan | channel index |
| index | Index of antenna to select |
| API_EXPORT int CALL_CONV LMS_SetGaindB | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| unsigned | gain | ||
| ) |
Set the combined gain value in dB This function computes and sets the optimal gain values of various amplifiers that are present in the device based on desired gain value in dB.
| device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| chan | Channel index |
| gain | Desired gain, range [0, 73] |
| API_EXPORT int CALL_CONV LMS_SetGFIRLPF | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| bool | enabled, | ||
| float_type | bandwidth | ||
| ) |
Set up digital LPF using LMS chip GFIRS. This is a convenience function to quickly configure GFIRS as LPF with desired RF bandwidth.
| device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| chan | channel index |
| enabled | Disable (false) or enable (true) GFIRS. |
| bandwidth | LPF bandwidth in Hz. Has no effect if enabled is false. |
| API_EXPORT int CALL_CONV LMS_SetLOFrequency | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| float_type | frequency | ||
| ) |
Set RF center frequency in Hz.
| device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| chan | Channel index |
| frequency | Desired RF center frequency in Hz |
| API_EXPORT int CALL_CONV LMS_SetLPF | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| bool | enable | ||
| ) |
Disables or enables the analog LPF of LMS chip without reconfiguring it.
| device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| chan | Channel index |
| enable | true(1) to enable, false(0) to disable |
| API_EXPORT int CALL_CONV LMS_SetLPFBW | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| float_type | bandwidth | ||
| ) |
Configure analog LPF of the LMS chip for the desired RF bandwidth. This function automatically enables LPF.
| device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| chan | Channel index |
| bandwidth | LPF bandwidth in Hz |
| API_EXPORT int CALL_CONV LMS_SetNormalizedGain | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| float_type | gain | ||
| ) |
Set the combined gain value This function computes and sets the optimal gain values of various amplifiers that are present in the device based on desired normalized gain value.
| device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX |
| chan | Channel index |
| gain | Desired gain, range [0, 1.0], where 1.0 represents the maximum gain |
| API_EXPORT int CALL_CONV LMS_SetSampleRate | ( | lms_device_t * | device, |
| float_type | rate, | ||
| size_t | oversample | ||
| ) |
Set sampling rate for all RX/TX channels. Sample rate is in complex samples (1 sample = I + Q). The function sets sampling rate that is used for data exchange with the host. It also allows to specify higher sampling rate to be used in RF by setting oversampling ratio. Valid oversampling values are 1, 2, 4, 8, 16, 32 or 0 (use device default oversampling value).
| [in] | device | Device handle previously obtained by LMS_Open(). |
| rate | sampling rate in Hz to set | |
| oversample | RF oversampling ratio. |
| API_EXPORT int CALL_CONV LMS_SetTestSignal | ( | lms_device_t * | device, |
| bool | dir_tx, | ||
| size_t | chan, | ||
| lms_testsig_t | sig, | ||
| int16_t | dc_i, | ||
| int16_t | dc_q | ||
| ) |
Apply the specified test signal
| device | Device handle previously obtained by LMS_Open(). |
| dir_tx | Select RX or TX. |
| chan | Channel index. |
| sig | Test signal. LMS_TESTSIG_NONE disables test signal. |
| dc_i | DC I value for LMS_TESTSIG_DC mode. Ignored in other modes. |
| dc_q | DC Q value for LMS_TESTSIG_DC mode. Ignored in other modes. |


@* * Copyright 2018 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import views.html.templates.formatters.dates._ @import java.time.LocalDate @(obligationDueDate: Option[LocalDate], isOverdue: Boolean, isError: Boolean)(implicit messages: Messages, appConfig: config.AppConfig)
@if(isError){ @messages("vatDetails.error") }else{ @obligationDueDate.map{date => @displayDate(date)}.getOrElse(messages("returnObligation.noReturn")) @if(isOverdue){ @messages("common.overdue") } }


---
layout: concept
---
This is kind of like a finite well, but instead we have the potential increasing in a quadratic function instead of a sudden jump. That is,
$$\begin{align*}
V(x)=\frac{1}{2}kx^2.
\end{align*}$$
Classically, a particle would sit at the very bottom. Quantum mechanically, due to the uncertainty principle, the particle can't just sit at the bottom, having zero energy.
Significance
Coming soon
Derivation
Once again we want to solve the eigenvalue equation $H\psi=E\psi$, where $H$ is the Hamiltonian. The total energy of the system is the potential energy plus the kinetic energy. The kinetic energy, written in the position basis, is
$$\begin{align*}
-\frac{\hbar^2}{2m}\frac{d^2\psi(x)}{dx^2},
\end{align*}$$ while the potential energy is
$$\begin{align*}
V(x)=\frac{1}{2}kx^2\psi(x).
\end{align*}$$
This is a pain to solve. We use ladder operators. $\hat{H}$ can be written in terms of ladder operators, where
$$\begin{align*}
\hat{H}=\hbar\omega\hat{a}^{\dagger}\hat{a}+\frac{1}{2}\hbar\omega,
\end{align*}$$ and $\hat{a}$ raises the energy level and $\hat{a}^{\dagger}$ lowers the energy. Thar means there's a state $\ket{E_0}$ for which the energy $E_0$ is the minimum possible energy for the system, and $\hat{a}|E_0\rangle=0$.
Related Experiments
Coming soon
Associated Concepts
Coming soon
Related


ot.utils¶
Various useful functions
Functions¶
-
ot.utils.
check_random_state
(seed)[source]¶ Turn seed into a np.random.RandomState instance
- Parameters
seed (None | int | instance of RandomState) – If seed is None, return the RandomState singleton used by np.random. If seed is an int, return a new RandomState instance seeded with seed. If seed is already a RandomState instance, return it. Otherwise raise ValueError.
-
ot.utils.
cost_normalization
(C, norm=None)[source]¶ Apply normalization to the loss matrix
- Parameters
C (ndarray, shape (n1, n2)) – The cost matrix to normalize.
norm (str) – Type of normalization from ‘median’, ‘max’, ‘log’, ‘loglog’. Any other value do not normalize.
- Returns
C – The input cost matrix normalized according to given norm.
- Return type
ndarray, shape (n1, n2)
-
ot.utils.
dist
(x1, x2=None, metric='sqeuclidean')[source]¶ Compute distance between samples in x1 and x2 using function scipy.spatial.distance.cdist
- Parameters
x1 (ndarray, shape (n1,d)) – matrix with n1 samples of size d
x2 (array, shape (n2,d), optional) – matrix with n2 samples of size d (if None then x2=x1)
metric (str | callable, optional) – Name of the metric to be computed (full list in the doc of scipy), If a string, the distance function can be ‘braycurtis’, ‘canberra’, ‘chebyshev’, ‘cityblock’, ‘correlation’, ‘cosine’, ‘dice’, ‘euclidean’, ‘hamming’, ‘jaccard’, ‘kulsinski’, ‘mahalanobis’, ‘matching’, ‘minkowski’, ‘rogerstanimoto’, ‘russellrao’, ‘seuclidean’, ‘sokalmichener’, ‘sokalsneath’, ‘sqeuclidean’, ‘wminkowski’, ‘yule’.
- Returns
M – distance matrix computed with given metric
- Return type
np.array (n1,n2)
-
ot.utils.
dist0
(n, method='lin_square')[source]¶ Compute standard cost matrices of size (n, n) for OT problems
Examples using ot.utils.dist0
¶
-
ot.utils.
euclidean_distances
(X, Y, squared=False)[source]¶ Considering the rows of X (and Y=X) as vectors, compute the distance matrix between each pair of vectors. :param X: :type X: {array-like}, shape (n_samples_1, n_features) :param Y: :type Y: {array-like}, shape (n_samples_2, n_features) :param squared: Return squared Euclidean distances. :type squared: boolean, optional
- Returns
distances
- Return type
{array}, shape (n_samples_1, n_samples_2)
-
ot.utils.
label_normalization
(y, start=0)[source]¶ Transform labels to start at a given value
- Parameters
y (array-like, shape (n, )) – The vector of labels to be normalized.
start (int) – Desired value for the smallest label in y (default=0)
- Returns
y – The input vector of labels normalized according to given start value.
- Return type
array-like, shape (n1, )
Classes¶
-
class
ot.utils.
BaseEstimator
[source]¶ Base class for most objects in POT
Code adapted from sklearn BaseEstimator class
Notes
All estimators should specify all the parameters that can be set at the class level in their
__init__
as explicit keyword arguments (no*args
or**kwargs
).-
get_params
(deep=True)[source]¶ Get parameters for this estimator.
- Parameters
deep (bool, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators.
- Returns
params – Parameter names mapped to their values.
- Return type
mapping of string to any
-
set_params
(**params)[source]¶ Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each component of a nested object.- Returns
- Return type
self
-
Examples using ot.utils.BaseEstimator
¶
-
class
ot.utils.
deprecated
(extra='')[source]¶ Decorator to mark a function or class as deprecated.
deprecated class from scikit-learn package https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/deprecation.py Issue a warning when the function is called/the class is instantiated and adds a warning to the docstring. The optional extra argument will be appended to the deprecation message and the docstring. Note: to use this with the default value for extra, put in an empty of parentheses: >>> from ot.deprecation import deprecated # doctest: +SKIP >>> @deprecated() # doctest: +SKIP … def some_function(): pass # doctest: +SKIP
- Parameters
extra (str) – To be added to the deprecation messages.
Exceptions¶
|
Aim at raising an Exception when a undefined parameter is called |


How do you take your coffee? (black, cream and sugar, cream or sugar)
What's your favorite color? (purple, black, red)
What's your favorite dish? (escargot, lettuce, pizza)
Which city would you most like to live in? (Madagascar, Paris, NYC)
What's your favorite genre of music? (metal, French-pop, rock)
Submit


Johnson's Black Adam Movie Will Introduce the Justice Society of America
by Noah DominguezThe Rock says... the Justice Society of America are coming to the Black Adam movie!
Dwayne "The Rock" Johnson -- who is set to star as Black Adam in the DC Comics villain/anti-hero's upcoming solo film -- has confirmed that while the movie will not feature an appearance by Zachary Levi's Shazam, it will introduce DC's original superhero team to the DC Extended Universe: the JSA.
In an interview with Screen Rant, Johnson was asked if Black Adam would see a confrontation between the titular character and Levi's Shazam. "Without giving too much away, it’s not in the plans right now," he replied. "I think the approach that we’re talking I feel really good about, and all of the filmmakers do too as well. It’s an origin story and that’s where we start it and we root it, and then we build out from there. Now, not to say Shazam isn’t on my radar. Of course Shazam is, but so is all of DC."
Click the button below to start this article in quick view.
It was at this point the Justice Society of America came up. "JSA," Johnson said. "We will introduce you to that, the world to JSA."
Notably, the character of Black Adam has played a role in DC's JSA titles over the years. What's more, Shazam (formerly known as Captain Marvel) is fairly synonymous with the Justice Society a well, with the two arch-enemies even being members of the team at the same time at one point.
That being said, it remains unclear how exactly the JSA will factor into Black Adam's cinematic origin story, as well as which members of the seminal superhero squad will actually be featured on-screen. As such, JSA fans will simply have to wait and see what Black Adam has in store for them when the film arrives in two years' time.
Directed by Jaume Collet-Serra, Black Adam stars Dwayne Johnson. The film is scheduled to arrive in theaters Dec. 22, 2021. Production is expected to kick off this July.
https://schema.orgBreadcrumbListListItem1Homehttps://www.cbr.com/ListItem2Movieshttps://www.cbr.com/category/movies/ListItem3Movie Newshttps://www.cbr.com/category/movies/news-movies/ListItem4Johnson's Black Adam Movie Will Introduce the Justice Society of Americahttps://www.cbr.com/black-adam-movie-justice-society-america-dwayne-johnson/


Ajit's move gives Sharad Pawar same experience of how he behaved with Vasantdada in 1978: Shalini Patil
Shalini Patil called Pawar's 1978 move to grab power an 'act of betrayal and stabbing in the back'.
PUNE: The widow of Vasantdada Patil, who was bested 41 years ago in a cloak-and-dagger power struggle for the post of chef minister by a young Sharad Pawar, on Sunday claimed Ajit Pawar's volte face was poetic justice.
Ajit Pawar, in a dramatic turn of events early Saturday morning, walked into Raj Bhavan with a handful of NCP MLAs and was sworn in as deputy to chief minister Devendra Fadnavis, leaving Pawar senior defending his flock by sequestering them in a suburban hotel.
Speaking on the political developments precipitated by Ajit Pawar, Shalini Patil, widow of Vasantdada, said, "The way Sharad Pawar behaved with Vasantrao, he must have got a similar experience from his family when Ajit Pawar aligned with the BJP."
Ajit Pawar is nephew of the NCP supremo and there has been often talk of the party being in the midst of a familial power struggle also involving Baramati Lok Sabha MP and Pawar senior's daughter Supriya Sule.
Shalini Patil called Pawar's 1978 move to grab power an "act of betrayal and stabbing in the back".
Pawar could have told Vasantdada directly instead of breaking away clandestinely, she said.
Patil was expelled from the NCP in 2006 for her "anti-party stand" on the issue of social justice.
In the state Assembly polls held in February 1978, the Congress (S) won 69 seats as against 65 of Congress (I).
The Janta Party had won 99 seats.
No party got a full majority.
The two Congress factions got together to form the government headed by Vasantdada Patil from Congress (S) with Nashikrao Tirpude from Congress (I) as the Deputy Chief Minister.
As the government floundered amid daily bickering, Pawar walked out with 38 Congress MLAs to form a new government called Samantar Congress (Parallel Congress), becoming the youngest chief minister of the state at the age of 38.
The government lasted for less than two years.


There is no rule that says the clan leader has to use his sword personally. If your clan members defeat Hisilrome, simply bring back proof of the victory.


Digit Classifier
Draw a number and watch a Neural Network classify your hand-drawn digits.
Neural Net:
CNN
Predict
Clear
Draw here
{% if chart %} {% endif %}


--- title: About ---
Lets be honest - This website is more for me than anything else. Making food is one of the main sources of joy for me right now and I want a place to keep all of the recipes I find that I really enjoy...
If you see anything about my recipes you think would improve them feel free to get in touch.


Control models usually have some kind of value property, which reflects the very current
content of the controls associated with this model. For instance, for an
::com::sun::star::form::component::TextField, this would be the
::com::sun::star::awt::UnoControlEditModel::Text property of the base
service. Similarily, a ::com::sun::star::form::component::CheckBox has
a property ::com::sun::star::awt::UnoControlCheckBoxModel::State, which
reflects the current check state.
Usual ::com::sun::star::form::DataAwareControlModels can be bound to
a column of a ::com::sun::star::form::component::DataForm, and exchange
their content with such a column.
In particular, when the ::com::sun::star::form::component::DataForm
is moved to a different record, then the bound control model is updated with the value of
it's column in this particular row.
On the other hand, when any change in the control model (e.g. resulting from a user entering
data in a control associated with the control model) is committed
(::com::sun::star::form::XBoundComponent::commit), then the actual
data of the control model is written into the associated
::com::sun::star::form::component::DataForm column.
BindableDataAwareControlModel's additionally support an alternative value
binding, which forces them to exchange their value with another foreign instance.
In some sense, they are an abstraction of the data aware control models, which only
support a specialized, hard-coded value binding (namely the binding to a
::com::sun::star::form::component::DataForm column).
For this, they provide the XBindableValue interface which allows to
set an external component to exchange the value with.
The following rules apply when a data aware control model is bound to an external value binding:
- Priority
External value bindings overrule any active SQL-column binding. If an external
component is bound to a control model which currently has an active SQL binding,
this SQL binding is suspended, until the external binding is revoked.
- Activation
An external value binding becomes effective as soon as it is set. This is a
difference to SQL bindings, which only are effective when the parent form
of the control model is loaded (::com::sun::star::form::XLoadable).
- Immediacy
When a BindableDataAwareControlModel is bound to an external value,
then every change in the control model's value is immediately reflected
in the external binding. This is a difference to SQL bindings of most
::com::sun::star::form::DataAwareControlModel's, where changes
in the control model's value are only propagated to the bound column upon explicit
request via ::com::sun::star::form::XBoundComponent::commit.
Note that this restriction is inherited from the BindableControlModel.
- Cloning
::com::sun::star::form::FormControlModels support cloning themself
via the ::com::sun::star::util::XCloneable interface which they
inherit from the ::com::sun::star::awt::UnoControlModel service.
When a BindableDataAwareControlModel is cloned while it has an active
external value binding, then the clone is also bound to the same binding instance.
Note that this restriction is inherited from the BindableControlModel.
When a BindableDataAwareControlModel is being bound to an external value,
using XBindableValue::setValueBinding,
then the control model (it's value property, respectively) and the external value are
initially synchronized by setting the external value (XValueBinding::getValue)
at the control model.


High-Resolution
Vector provides access to high-resolution metrics, up to 1 second.
An on-host performance monitoring framework which exposes hand picked high resolution metrics to every engineer’s browser
Vector is an open source on-host performance monitoring framework which exposes hand picked high resolution system and application metrics to every engineer’s browser. Having the right metrics available on-demand and at a high resolution is key to understand how a system behaves and correctly troubleshoot performance issues.
Vector provides access to high-resolution metrics, up to 1 second.
Metrics come directly from the monitored host, in near real-time.
The monitoring overhead is close to zero and the agent is completely idle while not being used.
Only the necessary metrics are collected for monitoring, keeping the framework very light.
Completely configurable dashboards provide simple cross-metric correlation and analysis.
Vector is open source and can be easily extended to include more metrics and widgets.
Vector depends on Performance Co-Pilot (PCP) to collect metrics on each host you plan to monitor.
See Installing Performance Co-Pilot for instructions on how to do it.
Once PCP is installed, you should be able to run Vector and connect to the monitored host.
We provide an official Docker image for Vector. You can pull it from Docker Hub and start the container with the following command.
$ docker run \
-d \
--name vector \
-p 80:80 \
netflixoss/vector:latest
Since Vector is just a static application, you should be able to easily deploy it to any web server. For example, using Ubuntu with Apache 2.
$ cd /var/www/html
$ sudo wget {{ site.bintray_binary }}
$ sudo tar xvzf vector.tar.gz
Vector is a NodeJS application, and can be built from source if you want to customise it.
See the compilation instructions.
That's it! Just open your browser and point to your Docker container on port 80 or the web server. Apache also runs by default on port 80.
Once the Vector UI is loaded, just enter the hostname or IP from the host you installed PCP on, and start collecting metrics!
Happy Monitoring!
Vector has a team on Slack, where most of the development and usage discussions happen.
If you have a question or would like to discuss anything releated to Vector, join the team! If you don't have an invite yet, enter your email here and we will send you one!
Join Vector on Slack for support and discussion.
You can also post questions to to either Google Groups or Stack Overflow.
Vector tracks bugs and future development on GitHub.
If you have a bug or issue to report, GitHub issues is the place to go.
Copyright 2016 Netflix, Inc.
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Art House (2000) Rating: 4.0 stars out of 5.0 stars
Cast: Dan O'Donahue, Chris Hardwick, Amy Weber, Adam Carolla, Michael A. Goorjian, Luigi Amodeo, Cheryl Pollak Written by: Leigh Slawner and Dan O'Donahue Directed by: Leigh Slawner Running Time: 88 minutes
True independent films rarely seem to work because they're always completely disjointed and so darn serious about whatever their subject is. Art House comes along as a very pleasant surprise when I was just expecting another sloppy mess of depressing ideas.
Dan O'Donahue stars (he also co-wrote the script) as Ray McMichael, a writer-director whose previous effort called Beach House (he wanted to make the best film in the worst genre) was unable to find a distributor. He's written a new script called Art House, which he gives to his hipster friend Weston (Chris Hardwick) to do a rewrite. During all this, Ray tries to find love, is forced to room with a porno actor (Luigi Amodeo), and hangs out with an new acting superstar (Michael A. Goorjian from SLC Punk!)... the usual life of someone in an independent film of course.
Art House is smartly written and the performances are engaging. While the film contains all the randomness and familiar situations of most indie films (characters hang out in a cyber cafe, talk about the Hollywood system being evil, have pointless conversations about The Cartoon Network, etc.), it's tied together cohesively enough to be not only entertaining but also very funny. At one point, in response to the popularity of swing music, Ray tells his ex-girlfriend that it'll only be six months until a new bandwagon is jumped on and the film "Breakin' 3:Cosmic Jubilee" is made. It's a great line, and it even has a pay off joke later in the movie. Even the obligitory indie film cameo from porn star Ron Jeremy is well done.
Dan O'Donahue's character is refreshingly original... he's a ordinary guy with a good head on his shoulders. Several times in the film his character is faced with a choice, and while the majority of movies would have him making the wrong one, Art House does it right. Donahue and Michael A. Goorjain (who gives a good performance as an big shot actor who knows he's actually talentless) should be faces to watch for in the future. Even Chris Hardwick and Adam Carolla (both from MTV, among other things) do fine jobs.
To make this film even more intriguing, I discovered during my research that Leigh Slawner and Dan O'Donahue actually MADE the movie Beach House back in 1995. So if what I read was correct and not just a clever internet marketing ploy, the film receiving constant mention in Art House actually exists... it's a genuine full-length movie and was indeed unable to find a distributor. That's got to be a first. Very clever guys... I applaud you. And now I really want to see Beach House, which must be the Citizen Kane of beach party movies.
Art House is available on VHS as a part of Hollywood Video's "First Rites" program. Hollywood Video is now distributing low budget indie films exclusively to its rental stores. The video includes an entertaining introduction from the director as he wanders the aisles of a local Hollywood Video trying to get people to rent his film.
So the next time you're at Hollywood Video and you're convinced you've seen everything on the new release wall but aren't sure if you'll like that independent film you've passed by six times now... take my word for it. If you like low-key, smart, and entertaining comedies then pick up that copy of Art House. [R]
Reviewed by Chuck Dowling -<EMAIL_ADDRESS>The Jacksonville Film Journal - http://www.jaxfilmjournal.com/
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Class: Length
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Float
|
|
|
Instance Chain:
self,
Float
|
|
| Inherits: |
Float
|
Overview
Prior to SketchUp 2015, Length
used to be derived from Float
. This is no longer the case.
Because length units are used so often in SketchUp, a special class has been added to make it easier to work with length values. You can use a Length
object any place that you would use a Float.
Internally, all lengths in SketchUp are stored in inches. The Length class stores values in inches as well. A number of methods have been added to the Ruby Numeric class to do units conversions.
The setting for the Length
Format and Length
Unit can be retrieved from the Sketchup::Model#options by querying the “UnitsOptions” ::Sketchup::OptionsProvider
for “LengthFormat” and “LengthUnit” respectively.
Constants:
- Length Format
-
Length::Decimal
-
Length::Architectural
-
Length::Engineering
-
Length::Fractional
-
- Length Unit
-
Length::Inches
-
Length::Feet
-
Length::Millimeter
-
Length::Centimeter
-
Length::Meter
(Added in SketchUp 2020.0)
-
Length::Yard
-
- Area Unit
-
(Added in SketchUp 2019.2)
-
Length::SquareInches
-
Length::SquareFeet
-
Length::SquareMillimeter
-
Length::SquareCentimeter
-
Length::SquareMeter
(Added in SketchUp 2020.0)
-
Length::SquareYard
-
- Volume Unit
-
(Added in SketchUp 2019.2)
-
Length::CubicInches
-
Length::CubicFeet
-
Length::CubicMillimeter
-
Length::CubicCentimeter
-
Length::CubicMeter
(Added in SketchUp 2020.0)
-
Length::CubicYard
-
Length::Liter
-
Length::USGallon
-
Constant Summary
-
Architectural =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 64
Constants
nil
-
Centimeter =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 66
Stub value.
nil
-
CubicCentimeter =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 68
Stub value.
nil
-
CubicFeet =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 69
Stub value.
nil
-
CubicInches =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 70
Stub value.
nil
-
CubicMeter =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 71
Stub value.
nil
-
CubicMillimeter =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 72
Stub value.
nil
-
CubicYard =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 73
Stub value.
nil
-
Decimal =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 75
Stub value.
nil
-
Engineering =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 77
Stub value.
nil
-
Feet =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 81
Stub value.
nil
-
Fractional =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 79
Stub value.
nil
-
Inches =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 83
Stub value.
nil
-
Liter =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 85
Stub value.
nil
-
Meter =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 89
Stub value.
nil
-
Millimeter =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 87
Stub value.
nil
-
SquareCentimeter =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 91
Stub value.
nil
-
SquareFeet =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 92
Stub value.
nil
-
SquareInches =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 93
Stub value.
nil
-
SquareMeter =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 94
Stub value.
nil
-
SquareMillimeter =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 95
Stub value.
nil
-
SquareYard =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 96
Stub value.
nil
-
USGallon =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 98
Stub value.
nil
-
Yard =
# File 'lib/sketchup-api-stubs/stubs/Length.rb', line 100
Stub value.
nil
Instance Method Summary
-
#<(length2) ⇒ Boolean
The < method is used to see if one length is less than another length.
-
#<=(length2) ⇒ Boolean
The <= method is used to see if one length is less than or equal to another length.
-
#<=>(length2) ⇒ Integer
The <=> method is used to see if one length is less than equal or greater than another length.
-
#==(length2) ⇒ Boolean
The == method is used to see if one length is equal to another length.
-
#>(length2) ⇒ Boolean
The > method is used to see if one length is greater than another length.
-
#>=(length2) ⇒ Boolean
The >= method is used to see if one length is greater than or equal to another length.
-
#inspect ⇒ String
The inspect method is used to retrieve an unformatted string for the length, which is the length in inches, regardless of the user’s model unit settings.
-
#to_f ⇒ Float
The to_f method is used to convert a length to a normal float.
-
#to_s ⇒ String
Format a length as a
::String
using the current units formatting settings for the model.
Instance Method Details
#<(length2) ⇒ Boolean
The < method is used to see if one length is less than another length.
For example, if l1 = 1.0.inch and l2 = 1.000001.inch then l1 == l2 so l1 < l2 should return false.
#<=(length2) ⇒ Boolean
The <= method is used to see if one length is less than or equal to another length.
#<=>(length2) ⇒ Integer
The <=> method is used to see if one length is less than equal or greater than another length. Because we change == for Length
to do a test based on a tolerance, we also need to change <=> to also take tolerance into account.
#==(length2) ⇒ Boolean
The == method is used to see if one length is equal to another length.
The equality comparison on Length
values uses the default tolerance that SketchUp uses for comparing lengths.
#>(length2) ⇒ Boolean
The > method is used to see if one length is greater than another length.
For example, if l1 = 1.0.inch and l2 = 1.000001.inch then l1 == l2 so l1 > l2 should return false.
#>=(length2) ⇒ Boolean
The >= method is used to see if one length is greater than or equal to another length.
For example, if l1 = 1.0.inch and l2 = 1.000001.inch then l1 == l2 so l1 >= l2 should return true. Also L1 <= l2 would return true.
#inspect ⇒ String
The inspect method is used to retrieve an unformatted string for the length, which is the length in inches, regardless of the user’s model unit settings. See Length.to_s for a way automatically format your Length
to the user’s model units.
#to_f ⇒ Float
The to_f method is used to convert a length to a normal float.
#to_s ⇒ String
Format a length as a ::String
using the current units formatting settings for the model. (So if the user’s model is set to feet, this method will return a nicely formatted length in feet.)


The API used in this data visualisation is provided by OpenWeatherMap which offers access to the most updated weather forecast. In order to proceed with the tutorial is, however, necessary to create a free account on their website with the purpose of obtaining a free API Key which is fundamental for the functionality of the API itself. This tutorial assumes that the reader knows the fundamentals of HTML and Javascript and knows how to read the documentation provided by the linked sources. Once the account is created and the key is activated, the next step involves the selection of the type of API to use. This tutorial focuses the attention on the One Call API. This specific API provides a 7 days forecast with results updated daily, hourly or minutely, which then returns an array of data in JSON format. In order to retrieve data from the weather, it is necessary to use an asynchronous function which fetches data from the API and then stores its content into a variable/array. The example below uses a class named GetWeather() which describes this approach.
class GetWeather{
async getCurrent(lat, lng){
const myKey = "Type your API key here"; // The API key should be obtained from OpenWeatherMap
const response = await fetch(
`https://api.openweathermap.org/data/2.5/onecall?lat=${lat}&lon=${lng}&appid=${myKey}`
);
const data = await response.json();
console.log(data); // prints data to console.
return data;
}
}
The above code allows the api request to be handled through an object of the class GetWeather. The location will be retrieved from coordinates specified by the user. In this case, those will be accessed through Google Map.
Once the coordinates have been obtained and the "data" retrieved from the API, the next step involves storing such data into a local variable (as explained above). Thanks to Google Map, a drag marker event listener will retrieve the coordinates from the map itself and will perform a weather request with the selected coordinates. The data will then be stored into an array, named "temps", and then managed accordingly based on what is needed to be parsed into any HTML element. See below for an example and refer to the One Call API documentation provided by OpenWeatherMap for a description of the JSON file structure.
function initMap() {
// The map, centered at Glasgow
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 7,
center: { lat: 55.860916, lng: -4.251433 },
});
// The marker, positioned at Glasgow
const marker = new google.maps.Marker({
position: { lat: 55.860916, lng: -4.251433 },
draggable: true,
map: map,
});
google.maps.event.addListener(marker, 'dragend', async function (evt) {
const latitude = evt.latLng.lat();
const longitude = evt.latLng.lng();
var temps = await weather.getCurrent(latitude, longitude);
console.log(temps);
As explained before, the above code allows the coder to load and display a Google map on a HTML document using an element with an ID of "map", a marker is then placed on the map on the specified coordinates (the default location is Glasgow). After loading the map and the marker, an event listener allows the system to "capture" user inputs performed by a drag and drop of the marker itself and when the marker is released the last location's coordinates will be used to retrieve the forecast on the specified location.
The reamining step involves the "parsing" of the values from the variables into a HTML element. Assuming the presence of a HTML element where to pass the value, like the example below

The max temperature for the current day will be displayed here

it is then required to pass the desired value from the temps array by following the array structure explained in the One Call API documentation. For the current day max temperature, for example, the data will be parsed as follows:
document.getElementbyID('day1').innerHTML = `The max temperature for the current day is: ${temps.daily[0].temp.max}`;
The data is stored as an array of elements, therefore it is necessary to print the specified value by navigating the array, the documentation provided by OpenWeatherMap gives a detail description of the array structure.


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.drools.repository.RuleSet
public class RuleSet
A ruleSet object aggregates a set of rules. This is advantageous for systems using the JBoss Rules engine where the application might make use of many related rules.
A rule set refers to rule nodes within the RulesRepository. It can either have the reference to a specific rule follow the head version of that rule, or have this reference continue to refer to a specific version of that rule even when a new version of the rule is checked into the repository
| Constructor Summary | |
|---|---|
RuleSet(java.lang.String name)
Constructs an object of type RuleSet with the specified name |
| Method Summary | |
|---|---|
void |
addRule(javax.jcr.Node ruleNode)
Adds a ruleNode to the ruleSet. |
void |
addRule(javax.jcr.Node ruleNode,
boolean followRuleHead)
Adds a ruleNode to the ruleSet. |
java.lang.String |
getName()
Gets the name of this RuleSet |
java.lang.String |
getPath()
Gets the path to the node corresponding to this ruleset within the RulesRepository. |
java.util.List |
getRules()
Gets the list of ruleNodes in this ruleSet |
void |
setName(java.lang.String name)
Sets the name of this RuleSet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RuleSet(java.lang.String name)
name
- the name for the RuleSet object| Method Detail |
|---|
public java.lang.String getPath()
public void addRule(javax.jcr.Node ruleNode) throws RulesRepositoryException
ruleNode
- the ruleNode to add to this RuleSet
RulesRepositoryException
public void addRule(javax.jcr.Node ruleNode, boolean followRuleHead) throws RulesRepositoryException
ruleNode
- the ruleNode to add to this RuleSetfollowRuleHead
- if true, the reference to 'ruleNode' will follow the head version of the
node, even if new versions are added. If false, will refer specifically
to the current version.
RulesRepositoryException
public java.util.List getRules()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to use for this RuleSet object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


--- layout: base --- {% include breadcrumbs-band.html page_type="Use Cases" page_type_slug="usecase" %}


Phone : {{companyinfo.contact1}}, {{companyinfo.contact2}}
{{companyinfo.address}}
{{InvoiceData.name}}
{{InvoiceData.email}}
{{InvoiceData.contact}}
{{InvoiceData.address}}
Invoice Number : {{InvoiceData.invoiceno}}
Invoice date : {{InvoiceData.invoicedate}}
Tin Number : {{InvoiceData.tinno}}
{{InvoiceData.notes}}
Sub Total
Tax%
Total
Paid Amount
{{companyinfo.termsNConditions}}


Using Facebook Messenger¶
Authors: Jack Urbanek, Kurt Shuster
In ParlAI, you can allow people on Facebook to participate in a ParlAI world as an agent.
Facebookers can be viewed as another type of agent in ParlAI, and hence person-to-person, person-to-bot, or multiple people and bots in group chat can all talk to each other within the same framework.
Facebook agents communicate in observation/action dict format, the same as all other agents in ParlAI. During the conversation, messages are delivered to a person’s inbox from the page that you have set up for ParlAI.
Each messenger task has at least one messenger agent that connects to ParlAI using the Facebook messenger Send/Receive API, encapsulated as a MessengerAgent
object.
Each messenger task also consists of a World
where all agents live and interact within.
Messenger tasks can be grouped together within an Overworld
which can spawn the subtasks and allow people to pick between multiple conversations.
The task definition resides in a config file, config.yml
, in which you specify all the available worlds, and any additional command line arguments.
Finally, to run a task, simple run the following command from the parlai/messenger/core
directory:
python run.py --config-path /path/to/config
Example Tasks¶
We provide three examples of using Facebook Messenger with ParlAI:
Generic Chatbot: Allow messenger conversations with any ParlAI models, for instance the PersonaChat model.
QA Data Collection: collect questions and answers from people, given a random Wikipedia paragraph from SQuAD.
Overworld Demo: let people select between three different subtasks, namely an echo bot, a demo of onboarding data collection, and a random chat.
Task 1: Testing a Model¶
Oftentimes it’s important to host a created model against humans to evaluate how well it is performing on a number of metrics. This generic ChatBot world allows you to attach a model to a page, and then users who interact with that page will be paired into a conversation with that bot.
As it is currently implemented, the collected conversations can be observed and rated manually by the ParlAI user. It’s possible to imagine requesting that the human participant rate their conversational partner at the end of the conversation as another way to evaluate the model.
To run a bot with this world, you’ll need to provide in the config.yml
file the same model opts you would use elsewhere in a ParlAI environment.
For instance, one can try testing a model trained on the ConvAI2 dataset with the following config.yml
:
tasks:
default:
onboard_world: MessengerBotChatOnboardWorld
task_world: MessengerBotChatTaskWorld
timeout: 1800
agents_required: 1
task_name: chatbot
world_module: parlai.messenger.tasks.chatbot.worlds
overworld: MessengerOverworld
page_id: 1 # Configure Your Own Page
max_workers: 30
opt: # Additional model opts go here
debug: True
model: legacy:seq2seq:0
model_file: models:convai2/seq2seq/convai2_self_seq2seq_model
override:
model: legacy:seq2seq:0
Then, you would simply run the world via the following command (while in parlai/messenger/core
):
python run.py --config-path ../tasks/chatbot/config.yml
This code will allow users to talk with a bot in conversations like the one displayed above.
Task 2: Collecting Training Data¶
One of the biggest use cases of Messenger in ParlAI is to connect people and collect natural language data.
As an example, the QA Data Collection task does the following:
Pick a random Wikipedia paragraph from SQuAD dataset.
Ask a person to provide a question given the paragraph.
Ask the person to provide an answer to their question.
In QADataCollectionWorld
, there are two agents: one is the person (MessengerAgent
), the other is the task agent (DefaultTeacher
from SQuAD) that provides the Wikipedia paragraph.
The QADataCollectionWorld
uses turn_index
to denote what stage the conversation is at. One turn means that world.parley()
has been called once.
After two turns, the task is finished, and the person’s work can be saved during the World.shutdown()
call.
Task 3: Exposing People to Multiple Tasks¶
ParlAI messenger can also be used to create a multi-function world that users can choose multiple tasks or variations for. This can be used to expose multiple versions of a chatbot you want to test, to allow users to choose what kinds of tasks they do, amongst other things.
As an example, the Overworld Demo displays three separate tasks connected together by an overworld.
The
echo
task is a simple example of an echo bot, and shows the functionality and flow of a simple single-person world.The
onboard data
task is an example that shows how an onboarding world can collect information that is later exposed in the active task world.The
chat
task is an example of a task that requires multiple users, and shows how many people can be connected together in an instance of a world and then returned to the overworld upon completion of a task.
Creating Your Own Task¶
To create your own task, start with reading the tutorials on the provided examples, and then copy and modify the example worlds.py
and config.yml
files to create your task.
A few things to keep in mind:
A conversation ends when a call between
parley
calls toepisode_done
returns True.Your world can utilize the complete set of Facebook Messenger Templates by putting the formatted data in the ‘payload’ field of the observed action.
Quick replies can be attached to any action, the
MessengerOverworld
of the Overworld Demo displays this functionality.Tasks with an overworld should return the name of the world that they want to queue a user into from the
parley
call in which the user makes that selection to enter a world.Tasks with no overworld will immediately attempt to put a user into the queue for the default task onboarding world or actual task world (if no onboarding world exists), and will do so again following the completion of a world (via
episode_done
).To collect the conversation, data should be collected during every
parley
and saved during theworld.shutdown
call. You must inform the user of the fact that the data is being collected as well as your intended use.Finally, if you wish to use and command line arguments as you would in ParlAI, specify those in the
opt
section of the config file.
Running a Task¶
ParlAI’s Messenger functionality requires a free heroku account which can be obtained here. Running any ParlAI Messenger operation will walk you through linking the two.
Running and testing a bot on the Facebook Messenger Platform for yourself will require following the guide to set up a Facebook App for messenger. Skip the set up your webhook step, as ParlAI will do it for you.
When the guide asks you to configure your webhook URL, you’re ready to run the task. This can be done by running the
run.py
file in with python.After the heroku server is setup, the script will print out your webhook URL to the console, this should be used to continue the tutorial. The default verify token is
Messenger4ParlAI
.On the first run, the page will ask you for a “Page Access Token,” which is also referred to on the messenger setup page. Paste this in to finish the setup. You should now be able to communicate with your ParlAI world by messaging your page.
To open up your bot for the world to use, you’ll need to submit your bot for approval from the Developer Dashboard.
Note: When running a new task from a different directory, the webhook url will change. You will need to update this in the developer console from the webhook settings using “edit subscription.” Your Page Access token should not need to be changed unless you want to use a different page.
Additional flags can be used (you can also specify these in the config.yml
file):
--password <value>
requires that a user sends the message contained in value to the bot in order to access the rest of the communications.--force-page-token
forces the script to request a new page token from you, allowing you to switch what page you’re running your bot on.--verbose
and--debug
should be used before reporting problems that arise that appear unrelated to your world, as they expose more of the internal state of the messenger manager.


Henry Golding thought Matthew McConaughey hated him at first
- Advertisement -
Star of Crazy Rich Asians Malaysian actor Henry Golding was frazzled after meeting Hollywood star Matthew McConaughey for the first time.
Golding revealed a funny story about how he was very excited to work with the Interstellar actor in the upcoming action thriller The Gentlemen, in an interview on The Tonight Show Starring Jimmy Fallon.
For Golding he thought that he was going to be best friends with McConaughey, going for Sunday walks in the park, dinners and that their wives will be good friends, and that they will enjoy yogurt on Saturdays, he shared with Jimmy Fallon.
Unfortunately, things became cold when McConaughey finally met Golding face-to-face.
- Advertisement -
“He just looks at me with this killer stare and he’s like, ‘I’m McConaughey.’
According to Golding he didn’t know that McConaughey stays in character and since their characters hate each other, he thought that the Hollywood star hated him and his ‘world just imploded.’
Known to do extra for realism in his work, McConaughey spent six months alone in his Texas home losing 47 pounds to act like a man with AIDS in Dallas Buyers Club.
Golding revealed that McConaughey is the “most loving and giving person’ when they don’t have to shoot scenes together, even though their first encounter was far from that.
Currently in post-production, Golding plays a novice gangster going after the riches of McConaughey’s character in The Gentlemen.
Golding’s latest movie Last Christmas that features Emilia Clarke and Michelle Yeoh is due to hit cinemas on 14 November.
The Malaysian actor is of English and Iban ancestry and he was born in Sarawak, East Malaysia.
After working as a hairdresser in London for a few years, he moved to Kuala Lumpur to pursue a career as a TV host before making his big break in acting.
- Advertisement -