(Deprecated API)
(Deprecated API)
Includes enterprise licensing and support
Note: Before proceeding with this tutorial, make sure you've installed the Maps API for Flash SDK and obtained a Maps API key as indicated in Setting Up Your Development Environment.
This tutorial discusses how to obtain and set up the Adobe Flex SDK, how to set up your development environment, and how to program in ActionScript to build your first Google Maps API for Flash map.
Note: if you wish to use the FlexBuilder IDE, consult the FlexBuilder Tutorial instead.
Incorporating Google Maps into a Flex application requires understanding not only ActionScript code but Flex MXML files. The examples in this documentation use the freely available Adobe Flex 3 SDK available at the following URL address:
http://www.adobe.com/products/flex/overview/#section-3
Note: The Flex SDK requires Java 1.4 or 1.5 (depending on the development platform). Full requirements for development with the Flex SDK are available at:
http://www.adobe.com/products/flex/systemreqs/
Once you've downloaded the SDK, unzip it into a working directory and ensure
that you can execute the MXML Compiler (mxmlc
) from the command
line. The mxmlc
compiler is located in the Flex SDK's bin
directory. Executing the compiler with the -help
option should
result in the following output.
hostname$ cd flex_sdk/bin hostname$ ./mxmlc -help Adobe Flex Compiler (mxmlc) Version 3.0.0 build 477 Copyright (c) 2004-2007 Adobe Systems, Inc. All rights reserved. ...
You may also want to add the flex_sdk/bin
directory to your $PATH
so that you can execute the compiler from any directory.
Before you begin development, you should first install a Debug version of the Adobe Flash Player. Debug versions of the player are available at the following URL:
http://www.adobe.com/support/flashplayer/downloads.html
You may need to uninstall any non-debug versions of the Flash player and/or shut down your browser to successfully install the debug version.
New! The Google Maps API for Flash now offers
native support for the com.google.maps.Map
object within Flex. You no
longer need to extend the Map
class to define your Map application class,
and you can use a Map component directly within Flex.
Flex applications are defined within MXML
declarations. Generally, you
should provide these MXML
files in the root of your
source code directory.
# Google recommends that you create a "source" directory in the root of your # Application development directory # "Source" MXML application definitions will go here: hostname$ cd myflashapp hostname$ mkdir src
Components that extend any existing Google Maps API for Flash components should generally be provided as ActionScript libraries within a unique namespace. Google recommends that you use a namespace which you own to prevent collisions with other libraries; this is especially important if you will have many developers working on multiple flash components at the same time. Using namespaces also allows you to bundle your library code into packages, which allow easier sharing of common code.
Packages and namespaces should be defined using your
top level domain, your
organization domain, and sub-domain. For example, the Google Maps namespace is defined
as com.google.maps
and an examples
package within that
namespace would be defined as com.google.maps.examples
. You can then
use this namespace to implicitly define the directory structure of your application
(e.g. com/google/maps/examples/
).
# Google recommends that you create a directory structure based on a unique # namespace for development of application extensions # Source ActionScript file will go here: hostname$ cd myflashapp hostname$ mkdir your_unique_domain (e.g. com/google/maps/examples)
You use this namespace to define a package within your ActionScript code,
and to define your application within the MXML
declaration. Generally,
ActionScript code (*.as
files) reside within the bottommost directory
of whatever namespace is defined, while the MXML declarations (*.mxml
files)
reside at the "root" of the directory structure.
The easiest way to start learning about the Google Maps API for Flash is to see a simple example. In this tutorial, we'll create a simple MXML file containing a map using ActionScript code, compile that file into a SWF file using the Flex SDK, include that SWF file in an HTML page, and display it.
The MXML declaration defines UI elements within a Flex application, while embedded
ActionScript code within the <mx:Script>
tag defines actions on those UI
elements. In the simplest case, you simply declare a com.google.maps.Map
object within MXML and initialize the map with ActionScript code:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%" key="your_api_key" sensor="true_or_false"/> <mx:Script> <![CDATA[ import com.google.maps.LatLng; import com.google.maps.Map; import com.google.maps.MapEvent; import com.google.maps.MapType; private function onMapReady(event:Event):void { this.map.setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE); } ]]> </mx:Script> </mx:Application>
This example is located at gmaps-samples-flash.googlecode.com/svn/trunk/examples/HelloWorld.html. (MXML source is located here.) Note that you'd need to build your own SWF file, with your own API key, for this example to appear on your website.
Even in this simple example, there are several things to note:
<mx:Application>
to hold all of our code,
as is required for Flex applications. Within this <mx:Application>
object,
we declare an xm
namespace to reference the standard Flex components.Map
object as a child of the <mx:Application>
and define a maps
namespace to reference code from com.google.maps.*
. We also
define parameters including an id
, a mapevent_mapready
handler,
an API key
, and a sensor
state. These parameters will be explained later.<mx:Script>
object.mapevent_mapready
event.These steps are explained in more detail below.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
Google Maps Flash applications require not only ActionScript code but also a
user interface framework to display the map and any associated UI elements on a web page. Within
the Flex framework, these UI components are specified within an MXML
declaration. An
MXML declaration consists of a configuration file with the .mxml
suffix. This
MXML
file commonly resides in the root of your ActionScript development
directory.
To display your Flash map on a webpage, you will need at least one MXML declaration.
All MXML declarations require a root <mx:Application>
component.
Additionally, the <mx:Application> also registers the mx
prefix
to reference standard Flex components.
Note that MXML declarations can be quite complex, and the layout of UI components within an MXML declaration is beyond the scope of this documentation. For more information, see the provided examples and consult the Flex SDK documentation.
<maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%" key="your_api_key" sensor="true_or_false"/>
The Google Maps API for Flash now includes native support for the Map
object defined within the com.google.maps.*
package. We add a Map
here as a child of the <mx:Application>
, define its namespace as
maps
(linking it to the com.google.maps.*
code), set an id
which we can reference the map from within the ActionScript code, and define a
mapevent_mapready
handler. (See Setting Up Event Listeners below.)
The <maps:Map>
declaration also specifies width
and height
parameters to define how the Map will appear within the application. More importantly, the MXML
declaration acts as a convenient location to place your unique API key
.
<mx:Script> <![CDATA[ // ActionScript Code ]]> </mx:Script>
Maps within the Google Maps API for Flash are manipulated using ActionScript 3.0 code. This tutorial will not attempt to teach the nuances of ActionScript. Online tutorials on ActionScript are available at the following locations:
The <mx:Script>
object is a Flex component that holds a reference to the
ActionScript code. Because MXML is a variant of XML, we also need to inform the MXML parser
to ignore the ActionScript code within this file through use of the <![CDATA[][
and ]]>
delimiters.
Note: you may instead wish to provide your ActionScript
within separate ActionScript (*.as
) files. If you do so, you can reference the
ActionScript file by including a source
parameter in the <mx:Script>
tag:
<mx:Script source="HelloWorld.as"></mx:Script>
Placing code within separate files often makes sense if you have large or complex applications. However, within this document base, we will show all code inline within MXML declarations for simplicity.
import com.google.maps.LatLng; import com.google.maps.Map; import com.google.maps.MapEvent; import com.google.maps.MapType;
ActionScript libraries are imported with the import
declaration. In the sample
code above, we import several Google Maps Flash libraries.
You should ensure that you import libraries for types that you need within your sample code.
We recommend that you import only those classes you need. In most of the examples within
this documentation, we structure our code so that the <mx:Application>
does not use Flex UI components. Doing so provides a basic lightweight map. Note that
including any Flex libraries may substantially increase the size of your SWF files,
even if you only need one particular Flex component (such as a button).
ActionScript, like JavaScript, is an event-driven programming language. User Interactions within Flash objects are handled by registering event listeners on objects for specific events.
In the code snippet in the previous section, the Map
declaration added
an event listener to the Map
object for the MapEvent.MAP_READY
event
through the use of the special parameter mapevent_mapready
. This event handler
acts as the "hook" for initialization of the Google Maps API for Flash application.
When the map receives that event, it calls the onMapReady
function,
which is shown below.
function onMapReady(event:MapEvent):void { setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE); }
This onMapReady()
function passes an event
parameter of type
MapEvent
(which is ignored in this case) and then calls setCenter()
using the given parameters (which define a location, a zoom level, and the type of map to show).
In general, it is good to "initialize" your map in such a manner by intercepting and handling the
MapEvent.MAP_READY
event. Events are discussed in more detail within the
Map Events section of the Google Maps Flash documentation.
Note: You may also initialize your map by intercepting and
handling the MapEvent.MAP_PREINITIALIZE
event instead. For information on this
event, see the discussion of MapOptions
.
Events are discussed in more detail within the Map Events section of the Google Maps Flash documentation.
We now have a HelloWorld.mxml
within our source's root directory and
ActionScript code within that file's <mx:Script>
object. We are ready to
compile our code into a SWF (Shockwave Flash) file. We do so using the Flex SDK's
mxmlc
compiler.
The mxmlc
compiler requires a target *.mxml
file. As well, to use the
Google Maps API for Flash, we use the compiler's -library-path
parameter to add the location
of the Google Maps API for Flash Library (maps_flex_1_7.swc
) provided to you. A sample
invocation appears below:
# Execute this command from the ROOT of your development directory, not from within # the leaf of the namespace (e.g. not in com/google/maps/examples) # hostname$:~/src/helloworld$ path_to_flex_sdk/bin/mxmlc HelloWorld.mxml -library-path+=maps_flex_1_7.swc Loading configuration file /home/src/flex_sdk/frameworks/flex-config.xml /home/src/helloworld/HelloWorld.swf (22223 bytes)
If you have trouble compiling:
mxmlc
compiler (you may want to change your path to
add the Flex SDK's bin
directory.library-path
parameter using the "plus equals" operator (+=
).Once you have a HelloWorld.swf
file, you can then place that file within a web page.
Google Maps Flash SWF files, if they are compiled with the API key included, can simply be
displayed as standalone files. This is useful for testing, but may not be practical for proper page
layout. As a result, you will likely want to set up an HTML page to contain the SWF file. To ensure
your SWF file executes within both Internet Explorer and other browsers, you should add the SWF
within both object
and embed
tags.
A simple HTML page that contains our HelloWorld.swf
file appears below. For the
map to display on a web page, we must reserve a spot for it. We do so in this example by creating
a named div
element and adding the object
element to it.
<div id="map_canvas" name="map_canvas"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800px" height="600px"> <param name="movie" value="helloworld.swf"> <param name="quality" value="high"> <param name="flashVars" value="key=your_api_key&sensor=true_or_false"> <embed width="800px" height="600px" src="helloworld.swf" quality="high" flashVars="key=your_api_key&sensor=true_or_false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"> </embed> </object> </div>
Note that we add the API key
and sensor
parameters within a
flashVars
parameter, separated by an &
character. This
registration method is an alternative to compiling your key and sensor into the SWF file
within the MXML declaration. If values are specified here, they override values contained
within the SWF file or MXML declaration. Also note that the API key must match the domain
where the SWF file is hosted, not the domain where the HTML file may be hosted.
The resulting HTML page is shown below.
Congratulations! You've written your first Google Maps Flash application!


Guidance
Information for institutions who are required to make a EFA final funding claim return for academic year 2015 to 2016.
All Education Funding Agency (EFA) final funding claim returns should be run from your final Individualised Learner Record (ILR) R14 submission for 2015 to 2016.
The ILR R14 data return period will close on Thursday 20 October. This is the final data return for this funding year.
The EFA final funding claim return for 2015 to 2016 includes the required declaration on the final page of the Funding Implementation Service (FIS) EFA funding claim report. Institutions that make ILR returns should use the document exchange to return a PDF copy of the completed signed report.
The requirement to return a signed final claim report to the EFA is set out in EFA Funding guidance for young people 2015 to 2016: ILR Funding returns . Annex A explains the purpose of the signed declaration by the head of the institution.
The EFA final claim report can be run from either the institutions ILR data using FIS or is available as a report from the Hub. The report must be run from your final ILR submission and must submit the same data to the data collections facility in the Hub.
Please submit your ILR R14 data return by 20 October 2016 so as to allow enough time to fully cleanse your data using the validation reports generated by the system.
The report must be produced from FIS or Hub as a PDF type report and not as an Excel report.
Once the FIS or Hub EFA final claim report for 2015 to 2016 has been produced the document should be presented to the head of the institution to sign the required declaration on the final page of the report.
The report should be scanned electronically and returned to EFA. We only require the scanned electronic copy. The original hard copy of the report with the original signature must be kept by the institution as a financial record for the year and retained in accordance with the advice in ILR Funding returns paragraph 16 and in Funding regulations paragraph 141. The original document must not be posted to EFA.
The scanned PDF version of the signed report should be sent to the EFA through the Information Exchange in October.
Please note when you load the file on Information Exchange, the system will automatically change the file name to a compliant EFA system file name.
The report should be saved in the Information Exchange folder headed “Revenue Funding”, sub folder “AY 2015-16”. When uploading your signed report please select ‘Funding Claim (RF)’ as the document purpose.
No other FIS reports or any other documentation should be returned with the final claim report. It is particularly important to fully comply with the Data Protection Act requirements over personal data and not include any reports that include individual student details. The required summary EFA funding claim report does not include any such details.
If you have any problems using the EFA Information Exchange, please see the guidance on GOV.UK .
All requests for clarification over the final claim return itself should be made to the institutions usual territory contact.
The EFA will issue allocation information for 2015 to 2016 and ILR R13 funding out-turn information to all known college financial audit firms in a workbook form for all their known clients. This will be followed up with final figures based on ILR R14 returns in early November to assist the firms in signing off college accounts. The individual institution statements cannot be produced until all final returns are received and processed.
As set out in ILR funding returns document in paragraph 10 the EFA will issue final reconciliation statements to all ILR funded institutions through their Information Exchange account.
Contract institutions subject to reconciliation final statements will be issued in November and Grant-in-aid institutions will be issued in December 2016. The statements will be found in due course in the following folder location: Revenue Funding > AY 2015-16. Support and further information about the EFA information Exchange is available on GOV.UK
Published: 12 August 2016
From: Education Funding Agency
Part of: Further education and training


Hello World after line breaks and with custom color.
This is an example of a multiline p with various tags, it supports italic, bold, combinations, anchors.
For styles, for the moment only text-alignment(left, center and right) and color for the font(HEX: #00FF00).


Reference Number:
7003977
Contract Date:
2009-26-03
Description of Work:
TEMPORARY HELP SERVICES
Contract Period:
2008-18-06 to 2009-21-08
Delivery Date:
2009-21-08
Original Contract Value:
$0.00
Current Contract Value:
$53,859.96
Comments:
Amendment (s) $17,952.48


The AI & Big Data Team provides guidance and technical support to advance your research.
Artificial Intelligence and Big Data Group Leader, Pittsburgh Supercomputing Center
Coordinator of AI & Big Data Development, Pittsburgh Supercomputing Center
Interim Director, Pittsburgh Supercomputing Center
Interns in the AI & Big Data group collaborate with group members and experts in data and computational science on projects which apply AI to real-world challenges.
Pankaj Bhojwani has an interest in machine learning and is double majoring in Physics and Computer Science at Carnegie Mellon, expecting to graduate in May 2020. His project focuses on using machine learning to analyze medical waveform signals.
Matthew Bialecki will complete a dual BS/MS program in Computer Science at the University of Pittsburgh in May 2020, and is interested in data and AI. His work with the AI&DB group includes creating a dashboard using ElasticSearch, Kibana, and ZomboDB to help visualize job and grant data for users, Bridges metrics, and log reporting; creating web pages for database data using Ruby on Rails; and creating an interactive page to distinguish grants in traditional HPC fields from those in areas that have not traditionally used HPC.
Tina Chang is a student in the Masters in Information Science Management program, Business and Data Analytics path, at Carnegie Mellon, with an interest in predictive modeling and exploratory data analysis. She expects to graduate in December 2018. Her project involves RNA small molecule binding.
Alice Lee is a student in the Masters in Information Science Management program at Carnegie Mellon. She expects to graduate in December 2018. Her interests include data analytics and visualization. She is working on a dashboard displaying real-time visualization of Bridges data for the AI&BD group.
Anand Sakhare is a student in the Masters in Information Science Management program, Business and Data Analytics path, at Carnegie Mellon. He expects to graduate in December 2018. His interests lie in deep learning, machine learning, and AI.


--- layout: post title: Second WordPress Meetup date: 2014-03-30 10:54:46.000000000 +07:00 categories: - Meetup - WordPress ---
On the 24th was the second WordPress meetup I organized in Bangkok. We had the two founders of a successful WordPress company talk about the way they "productized" their WordPress development services.
Shinichi, a fellow WordPress developer helping with organizing the meetups, wrote an excellent summary of the meetup: Pronto Marketing at Bangkok WordPress Meetup


If you plan your leisure in advance and do not want to get into a
situation
when the planned dinner is canceled due to the lack of free seats, reserve
a table in advance. You can reserve a table by filling out the form below.


{% if ps.plot_hist_cum_duration or ps.plot_hist_counts or ps.plot_boxplot_duration or ps.plot_ridge_line or ps.plot_heatmap_transitions %}
{% else %}A experiment is running. Here would be visualizations for the respective person, but you have to collect statistics first. Do this by clicking on the button below and on the new site click on the "collect statistics" button.
{% endif %}


Young's interference experiment - Wikipedia, the free encyclopedia
Young's interference experiment, also called Young's double-slit interferometer, was the . A white light fringe pattern can be considered to be made up of a set of individual fringe . 111, http://gallica.bnf.fr/ark:/12148/bpt6k3592w/f300.image.
http://en.wikipedia.org/wiki/Young's_interference_experiment
Treatment for Herniated or Bulging Discs
light
USE OF TEXT AND IMAGES . Newton revolutionized optics: he split apart white light with prisms and showed . Thomas Young's double-slit experiment . slits should create a pattern of alternate dark and light bands, where the light from the .
http://www.daviddarling.info/encyclopedia/L/light.html
Week VI: INTERFERENCE EXPERIMENTS
Oct 26, 2012 . interference pattern provided that the difference in optical path length ? for the two . B Young's Double Slit Experiment with White Light (Report errors in measured quantities . sharp geometrical images of the double slit.
http://www.physics.utah.edu/~gernot/Modern%20Optics/Manual%20Week%206.pdf
white light young's experiment pattern images Herniated or Bulging Discs
TheScienceClassroom - Double slit experiment
Light waves consist of many different types and kinds, the difference being the . Waves are visible only in color, and when combined we get white light. . The overlapping region showed a striped pattern alternating light and darkness. . external image doubleslit_animation.gif .
https://thescienceclassroom.wikispaces.com/Double+slit+experiment
Double Slit Experiments - ICT-Wiki
Nov 3, 2012 . 2.3.1 Young's Double Slit Experiment on Light . If light consists of particles, the image should consist of only two lines proportional to the . This series of alternate dark and white bands of light is called as interference pattern.
http://<IP_ADDRESS>/wiki/index.php/Double_Slit_Experiments
Official Impairment Listing for Spinal Disorders
Young's Double Slit Experiment - Physics - About.com
Learn about Young's Double Slit experiment, where interference patterns seem to prove the wave theory of light. . There are two possible results of this experiment (click on the image to see another image showing both interpretations): .
http://physics.about.com/od/lightoptics/a/doubleslit.htm
- when did william frawley die (narrowing of the spine)
Young's experiment - Physclips - Light
Then we compare with Young's experiment using laser light. . This is called constructive interference and it creates an antinode in the wave pattern. . Top middle pictures show it illuminated from in front with white light and from behind with .
http://www.animations.physics.unsw.edu.au/jw/light/youngs-experiment.htmCh 27 interference & wave nature of light online
Feb 11, 2011 . Calculate, for a two-slit interference pattern, the angles or the positions on . Conceptual Example 2 White Light and Young's Experiment The figure shows . and the images in the picture take on a more normal appearance.
http://www.slideshare.net/cscottthomas/ch-27-interference-wave-nature-of-light-online-6896801
Young's Double Slide Experiment - YouTube
May 4, 2010 . Check us out at http://www.tutorvista.com//videos Thomas Young's double . If this pattern is in fact the result of the experiment, light is proven to . Remove; Report profile image; Flag for spam; Block User; Unblock User . Application Of Droppler Effectby TutorVista23,832 views · Dispersion Of White Light .
http://www.youtube.com/watch?v=9UkkKM1IkKg
Medical-Vocational Allowance for Herniated Disc
Lesson 58: Young's Double Slit Experiment
The results of Young's Double Slit Experiment should be very different if light is a . Since they are little particles they will make a pattern of two exact lines on the . If a white light is used in the double slit experiment, the different colours will be .
http://www.studyphysics.ca/newnotes/20/unit04_light/chp1719_light/lesson58.htm
Double Slit Experiment With White Light
Double Slit Experiment With White Light Introductory Physics discussion. . is asking me what the fringe pattern would look like if white light was .
http://www.physicsforums.com/showthread.php?t=218869
Appealing a Denial of Benefits
light.doc - University of Minnesota
Opticks: Proposed white light consisted of many colors that could . with light waves involves the light waves moving slower in a denser medium (see picture 2 ). . The resulting pattern of the double slit experiment and that of Newton's . Thomas Young's double slit experiment proved that only the wave theory of light could .
http://www1.umn.edu/ships/modules/phys/light.doc


gdal_merge.py
Mosaics a set of images.
Synopsis
gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]*
[-ps pixelsize_x pixelsize_y] [-tap] [-separate] [-q] [-v] [-pct]
[-ul_lr ulx uly lrx lry] [-init "value [value...]"]
[-n nodata_value] [-a_nodata output_nodata_value]
[-ot datatype] [-createonly] input_files
Description
This utility will automatically mosaic a set of images. All the images must be in the same coordinate system and have a matching number of bands, but they may be overlapping, and at different resolutions. In areas of overlap, the last image will be copied over earlier ones. Nodata/transparency values are considered on a band by band level, i.e. a nodata/transparent pixel on one source band will not set a nodata/transparent value on all bands for the target pixel in the resulting raster nor will it overwrite a valid pixel value.
- -o <out_filename>
The name of the output file, which will be created if it does not already exist (defaults to "out.tif").
- -of <format>
Select the output format. Starting with GDAL 2.3, if not specified, the format is guessed from the extension (previously was GTiff). Use the short format name.
- -co <NAME=VALUE>
Many formats have one or more optional creation options that can be used to control particulars about the file created. For instance, the GeoTIFF driver supports creation options to control compression, and whether the file should be tiled.
The creation options available vary by format driver, and some simple formats have no creation options at all. A list of options supported for a format can be listed with the --formats command line option but the documentation for the format is the definitive source of information on driver creation options. See Raster drivers format specific documentation for legal creation options for each format.
- -ot <type>
Force the output image bands to have a specific data type supported by the driver, which may be one of the following:
Byte
,Int8
,UInt16
,Int16
,UInt32
,Int32
,UInt64
,Int64
,Float32
,Float64
,CInt16
,CInt32
,CFloat32
orCFloat64
.
- -ps <pixelsize_x> <pixelsize_y>
Pixel size to be used for the output file. If not specified the resolution of the first input file will be used.
- -tap
(target aligned pixels) align the coordinates of the extent of the output file to the values of the -tr, such that the aligned extent includes the minimum extent. Alignment means that xmin / resx, ymin / resy, xmax / resx and ymax / resy are integer values.
- -ul_lr <ulx> <uly> <lrx> <lry>
The extents of the output file. If not specified the aggregate extents of all input files will be used.
- -v
Generate verbose output of mosaicing operations as they are done.
- -separate
Place each input file into a separate band.
- -pct
Grab a pseudo-color table from the first input image, and use it for the output. Merging pseudo-colored images this way assumes that all input files use the same color table.
- -n <nodata_value>
Ignore pixels from files being merged in with this pixel value.
- -a_nodata <output_nodata_value>
Assign a specified nodata value to output bands.
- -init <"value(s)">
Pre-initialize the output image bands with these values. However, it is not marked as the nodata value in the output file. If only one value is given, the same value is used in all the bands.
- -createonly
The output file is created (and potentially pre-initialized) but no input image data is copied into it.
Note
gdal_merge.py is a Python script, and will only work if GDAL was built with Python support.
Examples
Creating an image with the pixels in all bands initialized to 255
gdal_merge.py -init 255 -o out.tif in1.tif in2.tif
Creating an RGB image that shows blue in pixels with no data
The first two bands will be initialized to 0 and the third band will be initialized to 255.
gdal_merge.py -init "0 0 255" -o out.tif in1.tif in2.tif
Passing a large list of files to gdal_merge
A large list of files can be passed to gdal_merge by listing them in a text file using:
ls -1 *.tif > tiff_list.txt
on Linux, or
dir /b /s *.tif > tiff_list.txt
on Windows. The text file can then be passed to gdal_merge using --optfile:
gdal_merge.py -o mosaic.tif --optfile tiff_list.txt
Creating an RGB image by merging 3 different greyscale bands
Conduct "merging by stacking" with the -separate
flag. Given three
greyscale files that cover the same area, you can run:
gdal_merge.py -separate 1.tif 2.tif 3.tif -o rgb.tif
This maps 1.tif
to red, 2.tif
to green and 3.tif
to blue.
Specifying overlap precedence
The last image in the input line comes out on top of the finished image stack.
You might also need to use -n
to note which value should not be
copied into the destination image if it is not already defined as nodata.
gdal_merge.py -o merge.tif -n 0 image1.tif image2.tif image3.tif image4.tif


#include <stDFTree.h>
Classes | |
| struct | tDFHeader |
Public Types | |
| enum | tChooseMethod { cmBIASED, cmRANDOM, cmMINDIST, cmMINOCCUPANCY, cmMINGDIST } |
| enum | tCorrectMethod { crmOFF, crmFATFACTOR } |
| enum | tSplitMethod { smRANDOM, smMINMAX, smSPANNINGTREE } |
| typedef struct stDFTree::tDFHeader | stDFHeader |
| typedef stResult< ObjectType > | tResult |
| typedef stDFGlobalRep< ObjectType, EvaluatorType > | tGR |
| typedef stGenericPriorityQueue< ObjectType > | tGenericPriorityQueue |
| typedef stGenericEntry< ObjectType > | tGenericEntry |
| typedef stDFGlobalRep< ObjectType, EvaluatorType > | tGR |
| typedef stDFMemLeafNode< ObjectType > | tMemLeafNode |
| Public Types inherited from stMetricTree< ObjectType, EvaluatorType > | |
| typedef ObjectType | tObject |
| typedef EvaluatorType | tMetricEvaluator |
| typedef stResult< ObjectType > | tResult |
| Public Types inherited from stMetricAccessMethod< ObjectType, EvaluatorType > | |
| enum | stCommonQueryHintType { QHT_NONE = 0 } |
| typedef ObjectType | tObject |
| typedef EvaluatorType | tMetricEvaluator |
| typedef stResult< ObjectType > | tResult |
Public Member Functions | |
| stDFTree (stPageManager *pageman, stCount nFocus, stDistance pThreshold) | |
| virtual | ~stDFTree () |
| virtual bool | Add (ObjectType *newObj) |
| virtual stCount | GetHeight () |
| virtual long | GetNumberOfObjects () |
| virtual stCount | GetMaxOccupation () |
| void | SetMaxOccupation (stCount newValue) |
| virtual double | GetMinOccupation () |
| virtual void | SetMinOccupation (double min) |
| virtual long | GetNodeCount () |
| void | SetSplitMethod (enum tSplitMethod method) |
| int | GetSplitMethod () |
| void | SetChooseMethod (enum tChooseMethod method) |
| int | GetChooseMethod () |
| stSize | GetUserDataSize () |
| bool | WriteUserData (const stByte *userData, stSize size) |
| bool | ReadUserData (stByte *userData, stSize size) |
| tResult * | RangeQuery (ObjectType *sample, stDistance range) |
| tResult * | NearestQuery (ObjectType *sample, stCount k, bool tie=false) |
| tResult * | PointQuery (ObjectType *sample) |
| double | GetFatFactor () |
| virtual stTreeInfoResult * | GetTreeInfo () |
| void | ForceUpdateAllFieldDistance () |
| Public Member Functions inherited from stMetricTree< ObjectType, EvaluatorType > | |
| stMetricTree (stPageManager *pageman) | |
| stMetricTree (stPageManager *pageman, EvaluatorType *metricEval) | |
| virtual | ~stMetricTree () |
| stPageManager * | GetPageManager () |
| virtual stDistance | GetDistanceLimit () |
| Public Member Functions inherited from stMetricAccessMethod< ObjectType, EvaluatorType > | |
| virtual | ~stMetricAccessMethod () |
| virtual tResult * | KAndRangeQuery (tObject *sample, stDistance range, stCount k, bool tie=false) |
| virtual tResult * | KOrRangeQuery (tObject *sample, stDistance range, stCount k, bool tie=false) |
| virtual tResult * | RingQuery (tObject *sample, stDistance inRange, stDistance outRange) |
| virtual tResult * | KRingQuery (tObject *sample, stDistance inRange, stDistance outRange, stCount k, bool tie=false) |
| virtual bool | Delete (tObject *obj) |
| virtual void | Optimize () |
| EvaluatorType * | GetMetricEvaluator () |
| virtual stQueryHint * | CreateQueryHint (int type) |
Public Attributes | |
| tGR * | GR |
Additional Inherited Members | |
| Protected Member Functions inherited from stMetricAccessMethod< ObjectType, EvaluatorType > | |
| stMetricAccessMethod (EvaluatorType *eval) | |
| Protected Attributes inherited from stMetricTree< ObjectType, EvaluatorType > | |
| stPageManager * | myPageManager |
| Protected Attributes inherited from stMetricAccessMethod< ObjectType, EvaluatorType > | |
| tMetricEvaluator * | myMetricEvaluator |
This class defines all behavior of the DFTree. Probably most of the atributes will be stored in the header page of the used stPageManager (stDiskPageManager or stMemoryPageManager).
First implementation is based on original code by Agma Traina, Bernard Seeger and Caetano Traina
Main modifications from original code are intent to turn it an object oriented compliant code.
More documentation.
Finish the implementation.
Definition at line 773 of file stDFTree.h.
| typedef struct stDFTree::tDFHeader stDFTree< ObjectType, EvaluatorType >::stDFHeader |
This structure defines the DFTree header structure. This type was left public to allow the creation of debug tools.
| typedef stGenericEntry< ObjectType > stDFTree< ObjectType, EvaluatorType >::tGenericEntry |
This type is used by the priority key.
Definition at line 1162 of file stDFTree.h.
| typedef stGenericPriorityQueue< ObjectType > stDFTree< ObjectType, EvaluatorType >::tGenericPriorityQueue |
This type is used by the priority key.
Definition at line 1157 of file stDFTree.h.
| typedef stDFGlobalRep<ObjectType, EvaluatorType> stDFTree< ObjectType, EvaluatorType >::tGR |
This type implements the GR.
Definition at line 924 of file stDFTree.h.
| typedef stDFGlobalRep<ObjectType, EvaluatorType> stDFTree< ObjectType, EvaluatorType >::tGR |
This type implements the GR.
Definition at line 1167 of file stDFTree.h.
| typedef stDFMemLeafNode< ObjectType > stDFTree< ObjectType, EvaluatorType >::tMemLeafNode |
Memory leaf node used by DF-Down.
Definition at line 1177 of file stDFTree.h.
| typedef stResult<ObjectType> stDFTree< ObjectType, EvaluatorType >::tResult |
This is the class that abstracs an result set.
Definition at line 919 of file stDFTree.h.
| enum stDFTree::tChooseMethod |
These constants are used to define the choose sub tree method.
| Enumerator | |
|---|---|
| cmBIASED |
Choose the first of the qualifying nodes. |
| cmRANDOM |
Randomly choose one of the qualifying nodes. |
| cmMINDIST |
Choose the node that has the minimum distance from the new object and the representative (center) of the node. |
| cmMINOCCUPANCY |
Choose the node that has the minimum occupancy among the qualifying ones. This is the default method due to its better performance. |
| cmMINGDIST |
Unknown.
|
Definition at line 843 of file stDFTree.h.
| enum stDFTree::tCorrectMethod |
These constants are used to define the correction method.
| Enumerator | |
|---|---|
| crmOFF |
No correction. |
| crmFATFACTOR |
Use Fat Factor. |
Definition at line 874 of file stDFTree.h.
| enum stDFTree::tSplitMethod |
These constants are used to define the split method.
Definition at line 889 of file stDFTree.h.
| stDFTree< ObjectType, EvaluatorType >::stDFTree | ( | stPageManager * | pageman, |
| stCount | nFocus, | ||
| stDistance | pThreshold | ||
| ) |
Creates a new metric tree using a given page manager. This instance will not claim the ownership of the given page manager. It means that the application must dispose the page manager when it is no loger necessary.
| pageman | The page manager to be used by this metric tree. |
|
inlinevirtual |
Dispose all used resources, ie, it is the destructor method.
Definition at line 941 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::GR.
|
virtual |
This method adds an object to the metric tree.
| obj | The object to be added. |
Reimplemented from stMetricAccessMethod< ObjectType, EvaluatorType >.
| void stDFTree< ObjectType, EvaluatorType >::ForceUpdateAllFieldDistance | ( | ) |
Force Update the GR Distances to all objects
|
inline |
Returns the Choose Method name.
Definition at line 1039 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::ChooseMethod.
| double stDFTree< ObjectType, EvaluatorType >::GetFatFactor | ( | ) |
Calculates the FatFactor of this tree.
|
inlinevirtual |
Returns the height of the tree.
Reimplemented from stMetricTree< ObjectType, EvaluatorType >.
Definition at line 958 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::Height.
|
inlinevirtual |
Returns the MaxOccupation of the nodes.
Reimplemented from stMetricTree< ObjectType, EvaluatorType >.
Definition at line 972 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::MaxOccupation.
|
inlinevirtual |
Returns the MinOccupation of the nodes.
Reimplemented from stMetricTree< ObjectType, EvaluatorType >.
Definition at line 988 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::MinOccupation.
|
inlinevirtual |
Returns the number of nodes of this tree.
Reimplemented from stMetricTree< ObjectType, EvaluatorType >.
Definition at line 1002 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::NodeCount.
|
inlinevirtual |
Returns the number of objetcs of this tree.
Reimplemented from stMetricTree< ObjectType, EvaluatorType >.
Definition at line 965 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::ObjectCount.
|
inline |
Returns the current split method.
Definition at line 1021 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::SplitMethod.
|
virtual |
This method returns information about the tree like FatFactor, mean object size and others.
Reimplemented from stMetricTree< ObjectType, EvaluatorType >.
|
inline |
Gets the maximum user data size available in this tree.
Definition at line 1062 of file stDFTree.h.
|
virtual |
This method will perform a K-Nearest Neighbor query using a global priority queue based on chained list to "enhance" its performance. We believe that the use of a priority queue during the search in the leaf nodes will force the radius to converge faster than the normal nearest query.
This implementation may replace the original implementation if it proves to be better.
| sample | The sample object. |
| k | The number of neighbors. |
| tie | The tie list. Default false. |
Reimplemented from stMetricAccessMethod< ObjectType, EvaluatorType >.
|
virtual |
This method will return the object in the tree that has the distance 0 to the query object. In other words, the query object itself.
If there are more elements that has distance 0 to the query object, this method will return the first found.
The object pointed by sample will not be destroyed by this method.
| sample | The sample object. |
Reimplemented from stMetricAccessMethod< ObjectType, EvaluatorType >.
|
virtual |
This method will perform a range query. The result will be a set of pairs object/distance.
| sample | The sample object. |
| range | The range of the results. |
Reimplemented from stMetricAccessMethod< ObjectType, EvaluatorType >.
|
inline |
Reads an additional user data.
This feature allows users to write additional information in to the free area of the header page. The available space will deppends on the size of the header page (see the page manager documentation for more details).
| userData | A pointer to the user data. |
| size | The size of the user data. |
Definition at line 1102 of file stDFTree.h.
|
inline |
Sets the Choose Method name.
| method | Choose method name. |
Definition at line 1031 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::ChooseMethod.
|
inline |
Returns the MaxOccupation of the nodes.
Definition at line 979 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::MaxOccupation.
|
inlinevirtual |
Set the MinOccupation of the nodes.
Definition at line 995 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::MinOccupation.
|
inline |
Sets the tree split method.
| method | Method name. |
Definition at line 1013 of file stDFTree.h.
References stDFTree< ObjectType, EvaluatorType >::tDFHeader::SplitMethod.
|
inline |
Writes an additional user data.
This feature allows users to write additional information in to the free area of the header page. The available space will deppends on the size of the header page (see the page manager documentation for more details).
| userData | A pointer to the user data. |
| size | The size of the user data. |
Definition at line 1082 of file stDFTree.h.
Implements the GR part
Definition at line 1172 of file stDFTree.h.
Referenced by stDFTree< ObjectType, EvaluatorType >::~stDFTree().


Upon Further Review: Hunter, Vikings lull Detroit to sleep
by Tom DierbergerYawn.
It was a snoozer of a game, but the Minnesota Vikings exited U.S. Bank Stadium with a 20-7 victory over the Detroit Lions on Sunday afternoon.
Minnesota’s defense forced a three-and-out on Detroit’s opening drive, and it looked like that took all the wind out of a 3-8-1 team starting undrafted rookie David Blough at quarterback.
Led by Danielle Hunter’s milestone game, the Vikings defense looked like itself again and held an opponent to 10 points or less for the third time.
Kirk Cousins and the offense crawled to a 17-0 lead at the break. The Vikings only put three points on the board in the second half, but it was more than enough to secure the win.
Running back Dalvin Cook was bothered by a shoulder injury, but he was still picking up carries into the fourth quarter and finished the game with 75 yards and a score on 20 touches.
Minnesota has now won five straight games over Detroit and has swept the two-game season series 12 times since the turn of the century.
Here’s a recap of Sunday’s game (Story | Photos):
PLAYER OF THE GAME
Hunter was the best player on the field. He posted his second career game with 3+ sacks, taking down Blough three times — all in the first half.
Hunter’s first sack of the day forced that tone-setting three-and-out. But it was bigger than that: It gave Hunter his 50th career sack, making him the youngest player in NFL history to reach the milestone at 25 years and 41 days old.
Hunter’s third sack was also a big one. Detroit faced a third-and-2 from Minnesota’s 15-yard line with one minute to play in the first half. Blough rolled to his left, and Hunter chased him backwards for a huge loss of 12 yards. So, instead of attempting a field goal from 32 yards out, Lions kicker Matt Prater was forced to kick one from 45 yards away. He missed.
To go along with the three sacks, Hunter also tallied seven tackles, three quarterback hurries and three tackles for loss.
DON’T FORGET ABOUT ME
Really, the only explosive play of the afternoon for Minnesota’s offense was a 44-yard connection from Cousins to Stefon Diggs. Diggs hauled in the pass down the right sideline with one hand and one finger, setting up a first-and-goal for Minnesota from the 3-yard line with under one minute to play in the first half.
The Vikings would score two plays later to take a 17-0 lead, all thanks to Diggs’ sticky hands.
On the day, Diggs caught six passes for 92 yards. He led the Vikings in targets with nine (Irv Smith Jr. was second on the team with four).
THAT MOMENT
It’s been an oddly quiet year for Harrison Smith, who’s made a career out of terrorizing quarterbacks on aggressive blitzes and taking interceptions to the end zone. But Smith had arguably his best game of the season against Detroit. He helped put the game out of reach with an interception in the third quarter, Smith’s second of the season.
The Vikings would drive down and capitalize on the turover with a 50-yard field goal from Dan Bailey to take a 20—lead.
THIS NUMBER
23 — Detroit’s net passing yards in the first half. Heading into the intermission, Blough had thrown for 59 yards on 7-of-14 passing but had been sacked four times for a loss of 36 yards.
THEY SAID IT
“Good team win today. You know, I thought it was an efficient win. Defensively we played a little bit more like I expect us to play. It was unfortunate we let them score that touchdown there at the end. And then offensively I thought we were efficient.” — head coach Mike Zimmer
“Great home win. Great to get back in front of our fans I thought they brought a lot of energy today and had a big impact on how dominant our defense was. Can’t say enough good things about our defense, the way they really dominated so much of the game. And that really created the tenor for the game for us.” — quarterback Kirk Cousins
“We got after the quarterback a little bit. We had some pass break-ups. Everybody was playing together. The guys made some big plays and made windows tight.  All the little things came into play today.” — safety Anthony Harris
WHAT’S NEXT
The Vikings hit the road for the final time in the regular season next week for a matchup with the Los Angeles Chargers, who looked all but dead until … this weekend. Behind three touchdown passes from Philip Rivers, the Chargers beat down Jacksonville 45-10 to snap a three-game skid.


A dependency-free library to create interactive walkthroughs in web-apps
v1.0.2
Sometimes you need to take your new users by the hand and guide them thru the main aspects of your site. This library creates an interactive guide that solves that in a very basic way: displaying cards with meaningful content and pointing it to a certain element of your site.
Gentle Guide is available to install using npm.
$ npm i @devmanextensions/gentle-guide
Gentle Guide is available to install using Yarn.
$ yarn add @devmanextensions/gentle-guide
Gentle Guide is available to install using html <link>.
<!DOCTYPE html>

<link rel="stylesheet" src="gg.min.css" />
<link rel="stylesheet" src="gg-default-theme.min.css" />

This is pretty simple: define your cards and pass it to the GGuide object.
const cards = [
{
selector: '#header_title',
position: 'bottom',
content: 'Welcome to Gentle Guide!
A dependency-free library to create interactive walkthroughs in web-apps. Let\'s start!',
options: {},
},
// more cards
];
const gguide = new GGuide(cards, {
onFinish: function() {
console.log("Hi, I'm finish now.");
}
}).begin();


- A
- B
- G
- M
- P
- R
- T
Source: show
# File app/helpers/tree_helper.rb, line 63 def allowed_tree_edit? if @project.protected_branch? @ref can?(current_user, :push_code_to_protected_branches, @project) else can?(current_user, :push_code, @project) end end
Source: show
# File app/helpers/tree_helper.rb, line 50 def gitlab_markdown?(filename) filename.end_with?(*%w(.mdown .md .markdown)) end
Public: Determines if a given filename is compatible with GitHub::Markup.
filename - Filename string to check
Returns boolean
Source: show
# File app/helpers/tree_helper.rb, line 45 def markup?(filename) filename.end_with?(*%w(.textile .rdoc .org .creole .mediawiki .rst .asciidoc .pod)) end
Source: show
# File app/helpers/tree_helper.rb, line 54 def plain_text_readme? filename filename == 'README' end
Sorts a repository’s tree so that folders are before files and renders their corresponding partials
contents - A Grit::Tree object for the current tree
Source: show
# File app/helpers/tree_helper.rb, line 6 def render_tree(contents) # Render Folders before Files/Submodules folders, files = contents.partition { |v| v.kind_of?(Grit::Tree) } tree = "" # Render folders if we have any tree += render partial: 'tree/tree_item', collection: folders, locals: {type: 'folder'} if folders.present? files.each do |f| if f.respond_to?(:url) # Object is a Submodule tree += render partial: 'tree/submodule_item', object: f else # Object is a Blob tree += render partial: 'tree/tree_item', object: f, locals: {type: 'file'} end end tree.html_safe end
Source: show
# File app/helpers/tree_helper.rb, line 36 def tree_hex_class(content) "file_#{hexdigest(content.name)}" end
Return an image icon depending on the file type
type - String type of the tree item; either ‘folder’ or ‘file’
Source: show
# File app/helpers/tree_helper.rb, line 31 def tree_icon(type) image = type == 'folder' ? 'file_dir.png' : 'file_txt.png' image_tag(image, size: '16x16') end


Chapter 3 Newton Raphson algorithm
The main purpose of Newton Raphson algorithm is to calculate the root of a function (e.g., \(x^2-3=0\)). We know that in order to maximize the MLE, we need to calculate the first derivatice of the function and then set it to zero \(\ell^{'}(x)=0\). Thus, we can use the same Newton Raphson method to help calculate the MLE maximization as well.
There are different ways to understand Newton Raphson method, but I found the method fo geometric the most easy way to explain.
Specifically, suppose that you want to calculate the root of a function \(f(x)=0\). We assume the root is \(r\). However, we do not know that, and we randomly guess a point of \(a\). Thus, we can get a tangent line with slope of \(f^{'}(a)\) and a point of \((a,f(a))\). Since we know the slope and one of its points, we can write the function for this tangent line.
\[y-f(a)=f^{'}(a)(x-a)\] To calculate the \(x-intercept\), namely \(b\) in the figure, we can set \(y=0\), and get the following:
\[-f(a)=f^{'}(a)(x-a) \Rightarrow x (or, b)= a-\frac{f(a)}{f^{'}(a)}\] If there is significant difference of \(|a-b|\), we know that our orginal guess of \(a\) is not good. We better use \(b\) as the next guess, and calculate its tangent line again. To generalize, we can write it as follows. \[x_{t+1}=x_{t}-\frac{f(x_t)}{f^{'}(x_t)}\]
Okay, this method above is to calculate the root. For MLE, we can also use this method to calculate the root for the \(\ell ^{'}=0\). We can write it as follows.
\[x_{t+1}=x_{t}-\frac{\ell^{'}(x_t)}{\ell^{''}(x_t)}\] Often, \(x\) is not just a single unknow parameter, but a vector. For this case, we can write it as follows.
\[\beta_{t+1}=\beta_{t}-\frac{\ell^{'}(\beta_t)}{\ell^{''}(\beta_t)}\]
3.0.1 Calculate the root
\(x^3-5=0\)
Note that, this is obviously not a maximization problem. In contrast, it involves a function with zero. As we can see, we can think it as the first order of Taylor approximation. That is, \(f^{'}(x)=x^3-5=0\). As we can see the following plot, it converts very quickly.
f_firstorder=function(x){x^3-5}
f_secondorder=function(x){3*x}
x_old=1;tolerance=1e-3
max_its=2000;iteration=1;difference=2
c_iteration<-c() ## to collect numbers generated in the iteration process
while(difference>tolerance & iteration<max_its){
x_updated=x_old-(f_firstorder(x_old)/f_secondorder(x_old))
difference=abs(x_updated-x_old);
iteration=iteration+1;
x_old=x_updated
c_iteration<-c(c_iteration,x_updated)}
plot(c_iteration,type="b")
3.0.2 Logistic regression
Suppose we have \(n\) observation, and \(m\) variables.
\[\begin{bmatrix} x_{11} & x_{12} & x_{13} & ... & x_{1m}\\ x_{21} & x_{22} & x_{23} & ... & x_{2m} \\ ...\\ x_{n1} & x_{n2} & x_{n3} & ... & x_{nm} \end{bmatrix}\]
Typically, we add a vector of \(1\) being used to estimate the constant.
\[\begin{bmatrix} 1 & x_{11} & x_{12} & x_{13} & ... & x_{1m}\\ 1 & x_{21} & x_{22} & x_{23} & ... & x_{2m} \\ ...\\ 1 & x_{n1} & x_{n2} & x_{n3} & ... & x_{nm} \end{bmatrix}\]
And, we have observe a vector of \(n\) \(y_i\) as well, which is a binary variable:
\[Y = \begin{bmatrix}1 \\ 0 \\ 1 \\ 0 \\ 0 \\ 0 \\ ...\\ 1 \\ \end{bmatrix}\]
Using the content from the MLE chapter, we can get:
\[\mathbf{L}=\prod_{i=1}^{n} p_i^{ y_i}(1-p_i)^{(1-y_i)}\]
Further, we can get a log-transformed format.
\[log (\mathbf{L})=\sum_{i=1}^{n}[y_i log (p_i) + (1-y_i) log(1-p_i)]\] Given that \(p_i=\frac{e^{\beta_0+\beta_1x_1+...+\beta_nx_n}}{1+e^{\beta_0+\beta_1x_1+...+\beta_nx_n}}=\frac{e^{\beta^Tx}}{1+e^{\beta^Tx}}\), we can rewrite it as follows:
\[log (\mathbf{L})=\ell=\sum_{i=1}^{n}[y_i log (\frac{e^{\beta^Tx_i}}{1+e^{\beta^Tx_i}}) + (1-y_i) log(1-\frac{e^{\beta^Tx_i}}{1+e^{\beta^Tx_i}})]\] Before doing the derivative, we set. \[\frac{e^{\beta^Tx_i}}{1+e^{\beta^Tx_i}} = p(\beta ^T x_i)\]
\[log (\mathbf{L})=\ell=\sum_{i=1}^{n}[y_i log (p(\beta ^T x_i)) + (1-y_i) log(1-p(\beta ^T x_i))]\]
Note that, \(\frac{\partial p(\beta ^T x_i)}{\partial (\beta ^T x_i)} = p(\beta ^T x_i)(1-p(\beta ^T x_i))\). We will use it later.
\[\begin{aligned} \nabla \ell &= \sum_{i=1}^{n} [y_i \frac{1}{p(\beta ^T x_i)} \frac{\partial p(\beta ^T x_i)}{\partial (\beta ^T x_i)}\frac{\partial (\beta ^T x_i)}{\partial \beta}+(1-y_i) \frac{1}{1-p(\beta ^T x_i)}(-1)\frac{\partial p(\beta ^T x_i)}{\partial (\beta ^T x_i)}\frac{\partial (\beta ^T x_i)}{\partial \beta}] \\ &= \sum_{i=1}^{n} x_i^T[y_i \frac{1}{p(\beta ^T x_i)} p(\beta ^T x_i)(1-p(\beta ^T x_i))+(1-y_i) \frac{1}{1-p(\beta ^T x_i)}(-1)p(\beta ^T x_i)(1-p(\beta ^T x_i))] \\ &= \sum_{i=1}^{n} x_i^T[y_i \frac{1}{p(\beta ^T x_i)} p(\beta ^T x_i)(1-p(\beta ^T x_i))-(1-y_i) \frac{1}{1-p(\beta ^T x_i)}p(\beta ^T x_i)(1-p(\beta ^T x_i))] \\ &= \sum_{i=1}^{n} x_i^T[y_i (1-p(\beta ^T x_i))-(1-y_i) p(\beta ^T x_i)] \\ &=\sum_{i=1}^{n} x_i^T[y_i-y_ip(\beta ^T x_i)-p(\beta ^T x_i)+y_i p(\beta ^T x_i)] \\ &=\sum_{i=1}^{n} x_i^T[y_i-p(\beta ^T x_i)] \\ &= \sum_{i=1}^{n} x_i^T[y_i-\frac{e^{\beta^Tx_i}}{1+e^{\beta^Tx_i}}] \end{aligned}\]
As noted, the Newton Raphson algorithm needs the second order.
\[\begin{aligned} \nabla^2 \ell &=\frac{\partial \sum_{i=1}^{n} x_i^T[y_i-p(\beta ^T x_i)]}{\partial \beta} \\ &=-\sum_{i=1}^{n} x_i^T\frac{\partial p(\beta ^T x_i) }{\partial \beta}\\ &=-\sum_{i=1}^{n} x_i^T\frac{\partial p(\beta ^T x_i) }{\partial (\beta^Tx_i)} \frac{\partial (\beta^Tx_i)}{\partial \beta}\\ &=-\sum_{i=1}^{n} x_i^T p(\beta ^T x_i)(1-p(\beta ^T x_i))x_i \end{aligned}\]
The following are the data simulation (3 IVs and 1 DV) and Newton Raphson analysis.
# Data generation
set.seed(123)
n=500
x1_norm<-rnorm(n)
x2_norm<-rnorm(n,3,4)
x3_norm<-rnorm(n,4,6)
x_combined<-cbind(1,x1_norm,x2_norm,x3_norm) # dimension: n*4
coefficients_new<-c(1,2,3,4) #true regression coefficient
inv_logit<-function(x,b){exp(x%*%b)/(1+exp(x%*%b))}
prob_generated<-inv_logit(x_combined,coefficients_new)
y<-c()
for (i in 1:n) {y[i]<-rbinom(1,1,prob_generated[i])}
# Newton Raphson
#We need to set random starting values.
beta_old<-c(1,1,1,1)
tolerance=1e-3
max_its=2000;iteration=1;difference=2
W<-matrix(0,n,n)
while(difference>tolerance & iteration<max_its)
{
# The first order
f_firstorder<-t(x_combined)%*%(y-inv_logit(x_combined,beta_old))
# The second order
diag(W) = inv_logit(x_combined,beta_old)*(1-inv_logit(x_combined,beta_old))
f_secondorder<--t(x_combined)%*%W%*%x_combined
# Calculate the beta_updated
beta_updated=beta_old-(solve(f_secondorder)%*%f_firstorder)
difference=max(abs(beta_updated-beta_old));
iteration=iteration+1;
beta_old=beta_updated}
beta_old
## [,1]
## 0.9590207
## x1_norm 1.7974165
## x2_norm 3.0072303
## x3_norm 3.9578107


-
Adobo₱80Main CourseMeat, seafood, or vegetables marinated in vinegar soy.
-
Afritada₱85Main CourseChicken, beef or pork braised in tomato sauce with
-
Bulalo₱110Main CourseA light colored soup that's made rich by cooking beef
-
Kinilaw₱95Appetizerraw cubed fish mixed with local vinegar along with a
-
Sisig₱70Main Course/SnackParts of pig head and chicken liver usually
-
Tinola₱90Main CourseCooked with chicken wedges of green papaya


---
layout: default
---
Resources
Simulate the entanglement distribution process and investigate what parameters would affect entanglement rate.
It focuses on novel quantum memories and processors that will enable future quantum information networks and computing.


Police Rescue Kidnapped Children, Arrest Suspected Criminals
by Seyi AdebowaleThe Police in Anambra state has rescued three kids from two women suspected to be child traffickers in Nkpor, Idemili North local government area of Anambra state.
According to the Police Spokesperson, Haruna Mohammed, the suspects Chisom Ani, 28 and Afamefuna Udodili, 32, were arrested by Police detectives following intelligence report.
He said further that preliminary investigation by Police detectives attached to Otoucha Division revealed that the two children were allegedly stolen from Enuguwu Aguleri in Anambra East LGA by one Ani Chisom aged 28 years of Amuri in Nkanu-East LGA of Enugu State and Afamefuna Udodili aged 32 years of Orodo in Mbaitolu LGA of Imo State respectively.
He said the parents of the two kids came to identify their children after a public announcement by the Command on the 22/11/2019 and also revealed their names as Confidence Ejike aged 5 years and Blessing Ejike aged 7 months old respectively.
Mohammed said the children have since reunited with their parents, while that the suspects would be charged after investigations were concluded.
The Commissioner of Police John Abang then urged parents and guardians to monitor their children and caution them against following strangers.


DIV
This is to be used in the BODY Tag.
Indicates a Logical Division within a Document.
Use the SPAN Tag to apply styles at a Small
Level.
This is a Container Tag and thus needs be CLosed.
Syntax

...Text/Image...

Example
This is a Text in some format.

This is a Text in other format defined in div.

Effect
This is a Text in some format.
This is a Text in other format defined in div.
Home
About


If you're new to Mesos
See the getting started page for more information about downloading, building, and deploying Mesos.
If you'd like to get involved or you're looking for support
See our community page for more details.
Roles
In Mesos, roles can be used to specify that certain resources are reserved for the use of one or more frameworks. Roles can be used to enable a variety of restrictions on how resources are offered to frameworks. Some use-cases for roles include:
- arranging for all the resources on a particular agent to only be offered to a particular framework.
- dividing a cluster between two organizations: resources reserved for use by organization A will only be offered to frameworks that have registered using organization A’s role (see the reservation documentation).
- ensuring that persistent volumes created by one framework are not offered to frameworks registered with a different role.
- expressing that one group of frameworks should be considered “higher priority” (and offered more resources) than another group of frameworks.
- setting a guaranteed resource allocation for one or more frameworks belonging to a role (see the quota documentation).
Roles and access control
There are two ways to control which roles a framework is allowed to register as. First, ACLs can be used to specify which framework principals can register as which roles. For more information, see the authorization documentation.
Second, a role whitelist can be configured by passing the --roles
flag to
the Mesos master at startup. This flag specifies a comma-separated list of role
names. If the whitelist is specified, only roles that appear in the whitelist
can be used. To change the whitelist, the Mesos master must be restarted. Note
that in a high-availability deployment of Mesos, you should take care to ensure
that all Mesos masters are configured with the same whitelist.
In Mesos 0.26 and earlier, you should typically configure both ACLs and the whitelist, because in these versions of Mesos, any role that does not appear in the whitelist cannot be used.
In Mesos 0.27, this behavior has changed: if --roles
is not specified, the
whitelist permits any role name to be used. Hence, in Mesos 0.27, the
recommended practice is to only use ACLs to define which roles can be used; the
--roles
command-line flag is deprecated.
Associating frameworks with roles
A framework can optionally specify the role it would like to use when it registers with the master.
As a developer, you can specify the role your framework will use via the role
field of the FrameworkInfo
message.
As a user, you can typically specify which role a framework will use when you
start the framework. How to do this depends on the user interface of the
framework you’re using; for example, Marathon takes a --mesos_role
command-line flag.
Multiple frameworks in the same role
Multiple frameworks can use the same role. This can be useful: for example, one framework can create a persistent volume and write data to it. Once the task that writes data to the persistent volume has finished, the volume will be offered to other frameworks in the same role; this might give a second (“consumer”) framework the opportunity to launch a task that reads the data produced by the first (“producer”) framework.
However, configuring multiple frameworks to use the same role should be done with caution, because all the frameworks will have access to any resources that have been reserved for that role. For example, if a framework stores sensitive information on a persistent volume, that volume might be offered to a different framework in the same role. Similarly, if one framework creates a persistent volume, another framework in the same role might “steal” the volume and use it to launch a task of its own. In general, multiple frameworks sharing the same role should be prepared to collaborate with one another to ensure that role-specific resources are used appropriately.
Associating resources with roles
A resource is assigned to a role using a reservation. Resources can either be reserved statically (when the agent that hosts the resource is started) or dynamically: frameworks and operators can specify that a certain resource should subsequently be reserved for use by a given role. For more information, see the reservation documentation.
The default role
The role named *
is special. Resources that are assigned to the *
role are
considered “unreserved”; similarly, when a framework registers without providing
a role, it is assigned to the *
role. By default, all the resources at an
agent node are initially assigned to the *
role (this can be changed via the
--default_role
command-line flag when starting the agent).
The *
role behaves differently from non-default roles. For example, dynamic
reservations can be used to reassign resources from the *
role to a specific
role, but not from one specific role to another specific role (without first
unreserving the resource, e.g., using the /unreserve
operator HTTP endpoint). Similarly, persistent volumes cannot be created on
unreserved resources.
Invalid role
A role name must be a valid directory name, so it cannot:
- Be an empty string
- Be
.
or..
- Start with
-
- Contain any slash, backspace, or whitespace character
Roles and resource allocation
By default, the Mesos master uses Dominant Resource Fairness (DRF) to allocate resources. In particular, this implementation of DRF first identifies which role is furthest below its fair share of the role’s dominant resource. Each of the frameworks in that role are then offered additional resources in turn.
The resource allocation process can be customized by assigning
weights to roles: a role with a weight of 2 will be allocated
twice the fair share of a role with a weight of 1. By default, every role has a
weight of 1. Weights can be configured using the
/weights operator endpoint, or else using the
deprecated --weights
command-line flag when starting the Mesos master.
Role vs. Principal
A principal identifies an entity that interacts with Mesos; principals are similar to user names. For example, frameworks supply a principal when they register with the Mesos master, and operators provide a principal when using the operator HTTP endpoints. An entity may be required to authenticate with its principal in order to prove its identity, and the principal may be used to authorize actions performed by an entity, such as resource reservation and persistent volume creation/destruction.
Roles, on the other hand, are used exclusively to associate resources with frameworks in various ways, as covered above.


« CSS « CSS Reference
The :first-child
pseudo-class represents any element that is the first child element of its parent.
element:first-child { style properties }
span:first-child { background-color: lime; }
...where...

 This span is limed! This span is not. :(

... should look like ...
This span is limed! This span is not. :(
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | 4.0 | 3.0 (1.9) | 7 | 9.5 | 4 |
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | 1.0 | 1.0 (1.9.1) | 7 | 10.0 | 3.1 |


Class: DataAssociation
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- DataAssociation
- Defined in:
- app/models/data_association.rb
Class Method Summary collapse
-
.associations_for(parent_class:, parent_id:, key: nil) ⇒ ActiveRecord<DataAssociation>
Returns associations for the object identified by parent class and id.
-
.create_from(parent_id:, parent_class:, key:, value:, upload: nil) ⇒ Object
Creates new association for the object identified by parent class and id.
-
.descending_by_recent_update ⇒ Object
Scope method to order data associations by key and then duplicates by descending order on update and ID.
- .find_parent(parent_class, parent_id) ⇒ Object
-
.select_most_recent(associations) ⇒ Object
Filters data associations to keep most recent update for a key.
Instance Method Summary collapse
Class Method Details
.associations_for(parent_class:, parent_id:, key: nil) ⇒ ActiveRecord<DataAssociation>
Returns associations for the object identified by parent class and id. If key is non-nil, returns the current value for the key, otherwise returns all values ordered by key and last update.
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'app/models/data_association.rb', line 64 def self.associations_for(parent_class:, parent_id:, key: nil) if key DataAssociation .includes(:upload) .where(parent_id: parent_id, parent_class: parent_class, key: key.to_s) .descending_by_recent_update else DataAssociation .includes(:upload) .where(parent_id: parent_id, parent_class: parent_class) .descending_by_recent_update end end |
.create_from(parent_id:, parent_class:, key:, value:, upload: nil) ⇒ Object
Creates new association for the object identified by parent class and id
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'app/models/data_association.rb', line 43 def self.create_from(parent_id:, parent_class:, key:, value:, upload: nil) upload_id = nil upload_id = upload.id if upload DataAssociation.new( parent_id: parent_id, parent_class: parent_class, key: key.to_s, object: { key => value }.to_json, upload_id: upload_id ) end |
.descending_by_recent_update ⇒ Object
Scope method to order data associations by key and then duplicates by descending order on update and ID. So, the first key-value pair, is the most recent update.
81 82 83 |
# File 'app/models/data_association.rb', line 81 def self.descending_by_recent_update order(:key, updated_at: :desc, id: :desc) end |
.find_parent(parent_class, parent_id) ⇒ Object
27 28 29 |
# File 'app/models/data_association.rb', line 27 def self.find_parent(parent_class, parent_id) Object.const_get(parent_class).find(parent_id) end |
.select_most_recent(associations) ⇒ Object
Filters data associations to keep most recent update for a key. In case of ties, selects largest ID.
90 91 92 93 94 95 |
# File 'app/models/data_association.rb', line 90 def self.select_most_recent(associations) associations .descending_by_recent_update .group_by(&:key) .map { |_, group| group.first } end |
Instance Method Details
#as_json(_options = {}) ⇒ Object
21 22 23 24 25 |
# File 'app/models/data_association.rb', line 21 def as_json( = {}) result = super(include: :upload) result = result.merge url: upload.url if upload result end |
#full_object ⇒ Object
10 11 12 13 14 |
# File 'app/models/data_association.rb', line 10 def full_object HashWithIndifferentAccess.new(JSON.parse(object, symbolize_names: true)) rescue StandardError HashWithIndifferentAccess.new end |
#may_delete(user) ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'app/models/data_association.rb', line 31 def may_delete(user) parent = DataAssociation.find_parent(parent_class, parent_id) puts "Class = #{parent_class}" return parent.sample && parent.sample.user_id = user.id if parent_class == 'Item' return user.admin? if parent_class == 'Collection' # since collections are managed by admins? return true if parent_class == 'Operation' # since operations don't yet have owners (actually they do now, so this should be fixed) return true if parent_class == 'Plan' # plans don't have owners yet either return true if parent_class == 'OperationType' # operation types don't have owners yet either end |
#value ⇒ Object
16 17 18 19 |
# File 'app/models/data_association.rb', line 16 def value h = full_object h[h.keys.first] end |


Keyword(s) for which to search:
Sort results by title
Keyword Index
Direct Link
dnClubcSvrLib Namespace
ClubcChatSock Class
ClubcChatSock Members
ClubcChatSock Constructor
ClubcChatSock Constructor
ClubcChatSock Constructor (ClubcChatSock.CloseDele, ClubcChatSock.ConnectDele, ClubcChatSock.ReceiveDele, ClubcChatSock.EventDele, String, String, String)
ClubcChatSock Constructor (ClubcChatSock.CloseDele, ClubcChatSock.ConnectDele, ClubcChatSock.ReceiveDele, ClubcChatSock.EventDele, String, String, String, Object)
ClubcChatSock Fields
MaxBuffer Field
UserData Field
ClubcChatSock Methods
Create Method
Create Method (String, String, String)
Create Method (String, String, String, Object)
Dispose Method
Finalize Method
SendString Method
ClubcChatSock Properties
ConnectList Property
IsConnected Property
IsInited Property
Nickname Property
ClubcChatSock Events
OnClose Event
OnConnect Event
OnEvent Event
OnReceive Event
ClubcChatSock.CloseDele Delegate
ClubcChatSock.ClubcChatSockEvent Enumeration
ClubcChatSock.ConnectDele Delegate
ClubcChatSock.EventDele Delegate
ClubcChatSock.ReceiveDele Delegate
This page uses an IFRAME but your browser does not support it.


Score Card
Quantitative
Number of questions answered:
2
Number of correct answers:
Score:
Reading Section
Number of questions answered:
2
Number of correct answers:
Score:
Audio/Video Section
Number of questions answered:
1
Number of correct answers:
Score:
Thank you!!!
Finish


If you are in trouble, perhaps this page will give you a solution.
Troubleshooting
-
The response times are slow
You can reduced timeout period on a stream (socket) to connect/read. Default is 30 secondes, like php.ini
default_socket_timeout
directive.
Example 1. Set timetout to 15 secondes<?php require_once 'Net/Growl/Autoload.php'; $notifications = array( 'GROWL_NOTIFY_PHPERROR' ); $appName = 'PHP App Example using GNTP'; $password = ''; $app = new Net_Growl_Application( $appName, $notifications, $password ); $options = array( 'protocol' => 'gntp', 'timeout' => 15 ); $growl = Net_Growl::singleton($app, null, null, $options); $growl->register(); ?>
You can also suppress timeout by setting value to zero. -
Notifications are not displayed
-
Are you sure Growl is running (not stopped or paused) ?
-
Check if your application and the notification type used is well registered
-
If your application is well registered, check if notifications display are enabled
-
Password provided by your application is probably unknown of Growl client (see Password Manager on Security Tab)
-
Check if your code produces error/exceptions.
Example 2. Catch errors with a try catch<?php require_once 'Net/Growl/Autoload.php'; $notifications = array( 'GROWL_NOTIFY_PHPERROR' ); $appName = 'PHP App Example using GNTP'; $password = ''; $options = array( 'protocol' => 'gntp', ); try { $growl = Net_Growl::singleton($appName, $notifications, $password, $options); $growl->register(); } catch (Net_Growl_Exception $e) { echo 'Caught Growl exception: ' . $e->getMessage() . PHP_EOL; } ?>
All errors produced by Net_Growl raise a Net_Growl_Exception
-
-
Net_Growl is not really verbose
To known what MIME messages are sent and received from Growl, activate the
verbose
mode. Give a valid path to a filename ondebug
option.Example 3. Activate the debug mode<?php require_once 'Net/Growl/Autoload.php'; $notifications = array( 'GROWL_NOTIFY_PHPERROR' ); $appName = 'PHP App Example using GNTP'; $password = ''; $options = array( 'protocol' => 'gntp', 'debug' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'netgrowl.log' ); try { $growl = Net_Growl::singleton($appName, $notifications, $password, $options); $growl->register(); } catch (Net_Growl_Exception $e) { echo 'Caught Growl exception: ' . $e->getMessage() . PHP_EOL; } ?>
-
My favorite application icons are not shown
-
URL given are not valid or not reachable
-
URL are good but resources are invalid images
If you give URL/resource that are not valid, Net_Growl will use default icon returns by Net_Growl::getDefaultGrowlIcon method.
-
-
How to detect error with new version 2.1
GNTP specialized response are now returned with version 2.1.0 (or greater). If you want to catch an error, test status code after each register() or notify() method. See Net_Growl_Response::getStatus
Example 4. Use the Net_Growl_Response object<?php require_once 'Net/Growl/Autoload.php'; $notifications = array( 'GROWL_NOTIFY_PHPERROR' ); $appName = 'PHP App Example using GNTP'; $password = ''; $options = array( 'protocol' => 'gntp', 'debug' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'netgrowl.log' ); try { $growl = Net_Growl::singleton($appName, $notifications, $password, $options); $resp = $growl->register(); if ($resp->getStatus() != 'OK') { die($resp); } } catch (Net_Growl_Exception $e) { echo 'Caught Growl exception: ' . $e->getMessage() . PHP_EOL; } ?>


---
modal-id: 3
title: Product Programming and Test bench
subtitle: Electronics | Mechanical Design
layout: post
date: 2020-08-29
thumbnail: testing_jig/thumbnail.png
permalink: /projects/:title:output_ext
alt: :title
project-date: July 2017
category: Electronics,Mechanical
description: A device to test for circuit issues before rolling it out.
---
This a completely customizable tesing and programming bench for printed circuit boards that can be used in small scale production.
Vision
We all know how important it is for any hardware company to ensure that each product that they ship provides the same efficiency which was is promised to the customer. For this the product has to undergo a series of quality control testes before the final firmware is loaded and the product is packaged for shipping. This is often manual in small firms producing various products. During my summer internship I was presented with the problem and was asked to come up with a solution that can reduce the manual process of testing each component and hence increasing speed and reducing human error while keeping the price low. A rig was built that enabled the company to program as well as test the circuits produced automatically, hence, improving the quality and productivity during manufacture of the product.
Useage / Working
The complete setup can be broken into 3 main parts viz.
- The mechanical contraption
- The embedded hardware and
- The operating software
I will be demonstrating how each of these parts come together to build up the final testing and programming rig.
The mechanical structure was built using Aluminum socket, rods and clamps fixed on a box made up of temperature
resistant Bakelite along with a lever attached to the machined acrylic pieces that contains pogo pins for connection
to the circuit board to be tested. This ensured a rugged design for long-term usage.
This rig connects to a computer via USB to communicate the progress.
To test/program a device the technician lifts the lever to reveal the machined slot where the circuit fits
perfectly. The circuit is placed in that groove and the lever is pulled back down, making secure connections to the
test-pads as well as to the programming pads.
The device then undergoes a series of tests designed for the circuit before it is finally programmed and packaged.
The mechanical design was easily adaptable to any new product simply by replacing the “product cassette” or the
pin/pad configurations and the product slot. There were a bunch of sensors included in this cassette to test
functionality of components such as IR Led, RF antenna transmit and receive range etc.
The upper plate consisted of pogo pins, which are simply spring-loaded contact pins along with some placers which
are used to align the circuit board relative to these pins.
The product or the test circuit for this type of testing requires to have exposed pads for the pins to connect to as opposed to In Circuit Testing.
These various pins on the upper plate reach the main circuit board responsible for testing and communication with the host computer. The testing circuit board was built to fit on an existing custom programmer board built by the company enabling the programmer to provide testing functionality. The circuit was designed using KiCad and routed on a two-layer PCB.
The main components of the design were ATMega 328 and a NRF52. The Wi-Fi functionality was also tested using the ESP32 connected to the base board.
The design included various independent circuits to test for different parameters simultaneously. This board was capable of performing tests related to:
- Power Management
- Antenna Power and SNR
- BLE and Wi-Fi Connection
- LED
- UART and SPI Bus
- Tactile switches or buttons
It also had several GPIOs that can be programmed to test other components in future.
This PCB communicated to the host PC Running a python-based application to display progress as well as to select various operations or testes required by the particular product.
The software to control the Jig was written completely using python. The GUI was supported by the pyQT5 library and utilized all the required tools such as avr-dude, ESP-IDF etc. required to program/test the circuit. The applicaion was completely modular, wherre the user can add or subtract a test feature for some other product in future. The screenshots above give a hint of the capabilities of the testing jig.


There are three types of cryptoassets: stores of value, security tokens, and utility tokens. General-purpose stores of value should be valued using the equation of exchange because these currencies are independent monetary bases. Examples include Bitcoin, Bitcoin Cash, Zcash,...


Enter up to five email addresses you'd like to recieve notifications from.


The HUD
The HUD is a completely new interface that brings information and functionality from ZAP into your browser.
For more details see:
Command Line Options
The HUD works equally well with ZAP in desktop and daemon modes.
As many people use ZAP in daemon mode for automated testing the HUD is disabled by default in this mode.
The HUD add-on adds new ZAP command line options which enable the HUD in daemon mode and launch a browser
preconfigured to proxy through ZAP and ignore certificate errors:
- -hud : launch a browser with the HUD enabled, only needed if you don't want to specify a browser or url
- -hudbrowser <browser> : the browser ZAP will use, either Firefox (the default) or Chrome
- -hudurl <url> : the URL that will be opened in the browser, by default none
Any combination of these parameters will launch a browser with the HUD enabled.
You can also enable the HUD in daemon mode without launching a browser using the ZAP command line option:
-config hud.enabledForDaemon=true
Getting Involved
ZAP is a community project and so we are always very keen to hear from anyone who'd like to contribute,
just post to the ZAP HUD Group
Caveats
This is still early days for this add-on :)
Some known issues include:
- Only a limited amount of ZAP functionality is available
- We're still using Vue.js in dev mode so can't apply a suitably strong CSP
- The JavaScript code needs to be properly formatted and linted
- Firefox has been tested more than Chrome, but both should work
- The code to support the HUD in multiple browser tabs is very new so might be buggy
- In particular don't close the first tab on Firefox or the HUD will stop working
- Documentation could, of course, be better


public abstract class KeyInfoFactory extends Object
KeyInfo
objects from scratch or for
unmarshalling a KeyInfo
object from a corresponding XML
representation.
Each instance of KeyInfoFactory
supports a specific
XML mechanism type. To create a KeyInfoFactory
, call one of the
static getInstance
methods, passing in the XML
mechanism type desired, for example:
KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
The objects that this factory produces will be based on DOM and abide by the DOM interoperability requirements as defined in the DOM Mechanism Requirements section of the API overview. See the Service Providers section of the API overview for a list of standard mechanism types.
KeyInfoFactory
implementations are registered and loaded
using the Provider
mechanism.
For example, a service provider that supports the
DOM mechanism would be specified in the Provider
subclass as:
put("KeyInfoFactory.DOM", "org.example.DOMKeyInfoFactory");
Also, the XMLStructure
s that are created by this factory
may contain state specific to the KeyInfo
and are not
intended to be reusable.
An implementation MUST minimally support the default mechanism type: DOM.
Note that a caller must use the same KeyInfoFactory
instance to create the XMLStructure
s of a particular
KeyInfo
object. The behavior is undefined if
XMLStructure
s from different providers or different mechanism
types are used together.
Concurrent Access
The static methods of this class are guaranteed to be thread-safe. Multiple threads may concurrently invoke the static methods defined in this class with no ill effects.
However, this is not true for the non-static methods defined by this
class. Unless otherwise documented by a specific provider, threads that
need to access a single KeyInfoFactory
instance concurrently
should synchronize amongst themselves and provide the necessary locking.
Multiple threads each manipulating a different KeyInfoFactory
instance need not synchronize.
| Modifier | Constructor and Description |
|---|---|
protected |
KeyInfoFactory()
Default constructor, for invocation by subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
static KeyInfoFactory |
getInstance()
Returns a
KeyInfoFactory that supports the
default XML processing mechanism and representation type ("DOM"). |
static KeyInfoFactory |
getInstance(String mechanismType)
Returns a
KeyInfoFactory that supports the
specified XML processing mechanism and representation type (ex: "DOM"). |
static KeyInfoFactory |
getInstance(String mechanismType,
Provider provider)
Returns a
KeyInfoFactory that supports the
requested XML processing mechanism and representation type (ex: "DOM"),
as supplied by the specified provider. |
static KeyInfoFactory |
getInstance(String mechanismType,
String provider)
Returns a
KeyInfoFactory that supports the
requested XML processing mechanism and representation type (ex: "DOM"),
as supplied by the specified provider. |
String |
getMechanismType()
Returns the type of the XML processing mechanism and representation
supported by this
KeyInfoFactory (ex: "DOM") |
Provider |
getProvider()
Returns the provider of this
KeyInfoFactory . |
abstract URIDereferencer |
getURIDereferencer()
Returns a reference to the
URIDereferencer that is used by
default to dereference URIs in RetrievalMethod objects. |
abstract boolean |
isFeatureSupported(String feature)
Indicates whether a specified feature is supported.
|
abstract KeyInfo |
newKeyInfo(List content)
Creates a
KeyInfo containing the specified list of
key information types. |
abstract KeyInfo |
newKeyInfo(List content,
String id)
Creates a
KeyInfo containing the specified list of key
information types and optional id. |
abstract KeyName |
newKeyName(String name)
Creates a
KeyName from the specified name. |
abstract KeyValue |
newKeyValue(PublicKey key)
Creates a
KeyValue from the specified public key. |
abstract PGPData |
newPGPData(byte[] keyId)
Creates a
PGPData from the specified PGP public key
identifier. |
abstract PGPData |
newPGPData(byte[] keyId,
byte[] keyPacket,
List other)
Creates a
PGPData from the specified PGP public key
identifier, and optional key material packet and list of external
elements. |
abstract PGPData |
newPGPData(byte[] keyPacket,
List other)
Creates a
PGPData from the specified PGP key material
packet and optional list of external elements. |
abstract RetrievalMethod |
newRetrievalMethod(String uri)
Creates a
RetrievalMethod from the specified URI. |
abstract RetrievalMethod |
newRetrievalMethod(String uri,
String type,
List transforms)
Creates a
RetrievalMethod from the specified parameters. |
abstract X509Data |
newX509Data(List content)
Creates a
X509Data containing the specified list of
X.509 content. |
abstract X509IssuerSerial |
newX509IssuerSerial(String issuerName,
BigInteger serialNumber)
Creates an
X509IssuerSerial from the specified X.500 issuer
distinguished name and serial number. |
abstract KeyInfo |
unmarshalKeyInfo(XMLStructure xmlStructure)
Unmarshals a new
KeyInfo instance from a
mechanism-specific XMLStructure (ex: DOMStructure )
instance. |
protected KeyInfoFactory()
public static KeyInfoFactory getInstance(String mechanismType)
KeyInfoFactory
that supports the
specified XML processing mechanism and representation type (ex: "DOM").
This method uses the standard JCA provider lookup mechanism to
locate and instantiate a KeyInfoFactory
implementation of
the desired mechanism type. It traverses the list of registered security
Provider
s, starting with the most preferred
Provider
. A new KeyInfoFactory
object
from the first Provider
that supports the specified
mechanism is returned.
Note that the list of registered providers may be retrieved via
the Security.getProviders()
method.
mechanismType
- the type of the XML processing mechanism and
representation. See the
Service Providers section of the API overview for a list of
standard mechanism types.KeyInfoFactory
NullPointerException
- if mechanismType
is
null
NoSuchMechanismException
- if no Provider
supports a
KeyInfoFactory
implementation for the specified mechanismProvider
public static KeyInfoFactory getInstance(String mechanismType, Provider provider)
KeyInfoFactory
that supports the
requested XML processing mechanism and representation type (ex: "DOM"),
as supplied by the specified provider. Note that the specified
Provider
object does not have to be registered in the
provider list.mechanismType
- the type of the XML processing mechanism and
representation. See the
Service Providers section of the API overview for a list of
standard mechanism types.provider
- the Provider
objectKeyInfoFactory
NullPointerException
- if mechanismType
or
provider
are null
NoSuchMechanismException
- if a KeyInfoFactory
implementation for the specified mechanism is not available from the
specified Provider
objectProvider
public static KeyInfoFactory getInstance(String mechanismType, String provider) throws NoSuchProviderException
KeyInfoFactory
that supports the
requested XML processing mechanism and representation type (ex: "DOM"),
as supplied by the specified provider. The specified provider must be
registered in the security provider list.
Note that the list of registered providers may be retrieved via
the Security.getProviders()
method.
mechanismType
- the type of the XML processing mechanism and
representation. See the
Service Providers section of the API overview for a list of
standard mechanism types.provider
- the string name of the providerKeyInfoFactory
NoSuchProviderException
- if the specified provider is not
registered in the security provider listNullPointerException
- if mechanismType
or
provider
are null
NoSuchMechanismException
- if a KeyInfoFactory
implementation for the specified mechanism is not available from the
specified providerProvider
public static KeyInfoFactory getInstance()
KeyInfoFactory
that supports the
default XML processing mechanism and representation type ("DOM").
This method uses the standard JCA provider lookup mechanism to
locate and instantiate a KeyInfoFactory
implementation of
the default mechanism type. It traverses the list of registered security
Provider
s, starting with the most preferred
Provider
. A new KeyInfoFactory
object
from the first Provider
that supports the DOM mechanism is
returned.
Note that the list of registered providers may be retrieved via
the Security.getProviders()
method.
KeyInfoFactory
NoSuchMechanismException
- if no Provider
supports a
KeyInfoFactory
implementation for the DOM mechanismProvider
public final String getMechanismType()
KeyInfoFactory
(ex: "DOM")KeyInfoFactory
public final Provider getProvider()
KeyInfoFactory
.KeyInfoFactory
public abstract KeyInfo newKeyInfo(List content)
KeyInfo
containing the specified list of
key information types.content
- a list of one or more XMLStructure
s representing
key information types. The list is defensively copied to protect
against subsequent modification.KeyInfo
NullPointerException
- if content
is null
IllegalArgumentException
- if content
is emptyClassCastException
- if content
contains any entries
that are not of type XMLStructure
public abstract KeyInfo newKeyInfo(List content, String id)
KeyInfo
containing the specified list of key
information types and optional id. The
id
parameter represents the value of an XML
ID
attribute and is useful for referencing
the KeyInfo
from other XML structures.content
- a list of one or more XMLStructure
s representing
key information types. The list is defensively copied to protect
against subsequent modification.id
- the value of an XML ID
(may be null
)KeyInfo
NullPointerException
- if content
is null
IllegalArgumentException
- if content
is emptyClassCastException
- if content
contains any entries
that are not of type XMLStructure
public abstract KeyName newKeyName(String name)
KeyName
from the specified name.name
- the name that identifies the keyKeyName
NullPointerException
- if name
is null
public abstract KeyValue newKeyValue(PublicKey key) throws KeyException
KeyValue
from the specified public key.key
- the public keyKeyValue
KeyException
- if the key
's algorithm is not
recognized or supported by this KeyInfoFactory
NullPointerException
- if key
is null
public abstract PGPData newPGPData(byte[] keyId)
PGPData
from the specified PGP public key
identifier.keyId
- a PGP public key identifier as defined in RFC 2440, section 11.2.
The array is cloned to protect against subsequent modification.PGPData
NullPointerException
- if keyId
is null
IllegalArgumentException
- if the key id is not in the correct
formatpublic abstract PGPData newPGPData(byte[] keyId, byte[] keyPacket, List other)
PGPData
from the specified PGP public key
identifier, and optional key material packet and list of external
elements.keyId
- a PGP public key identifier as defined in RFC 2440, section 11.2.
The array is cloned to protect against subsequent modification.keyPacket
- a PGP key material packet as defined in RFC 2440, section 5.5.
The array is cloned to protect against subsequent modification. May
be null
.other
- a list of XMLStructure
s representing elements from
an external namespace. The list is defensively copied to protect
against subsequent modification. May be null
or empty.PGPData
NullPointerException
- if keyId
is null
IllegalArgumentException
- if the keyId
or
keyPacket
is not in the correct format. For
keyPacket
, the format of the packet header is
checked and the tag is verified that it is of type key material. The
contents and format of the packet body are not checked.ClassCastException
- if other
contains any
entries that are not of type XMLStructure
public abstract PGPData newPGPData(byte[] keyPacket, List other)
PGPData
from the specified PGP key material
packet and optional list of external elements.keyPacket
- a PGP key material packet as defined in RFC 2440, section 5.5.
The array is cloned to protect against subsequent modification.other
- a list of XMLStructure
s representing elements from
an external namespace. The list is defensively copied to protect
against subsequent modification. May be null
or empty.PGPData
NullPointerException
- if keyPacket
is
null
IllegalArgumentException
- if keyPacket
is not in the
correct format. For keyPacket
, the format of the packet
header is checked and the tag is verified that it is of type key
material. The contents and format of the packet body are not checked.ClassCastException
- if other
contains any
entries that are not of type XMLStructure
public abstract RetrievalMethod newRetrievalMethod(String uri)
RetrievalMethod
from the specified URI.uri
- the URI that identifies the KeyInfo
information
to be retrievedRetrievalMethod
NullPointerException
- if uri
is null
IllegalArgumentException
- if uri
is not RFC 2396
compliantpublic abstract RetrievalMethod newRetrievalMethod(String uri, String type, List transforms)
RetrievalMethod
from the specified parameters.uri
- the URI that identifies the KeyInfo
information
to be retrievedtype
- a URI that identifies the type of KeyInfo
information to be retrieved (may be null
)transforms
- a list of Transform
s. The list is defensively
copied to protect against subsequent modification. May be
null
or empty.RetrievalMethod
NullPointerException
- if uri
is null
IllegalArgumentException
- if uri
is not RFC 2396
compliantClassCastException
- if transforms
contains any
entries that are not of type Transform
public abstract X509Data newX509Data(List content)
X509Data
containing the specified list of
X.509 content.content
- a list of one or more X.509 content types. Valid types are
String
(subject names), byte[]
(subject key ids),
X509Certificate
, X509CRL
,
or XMLStructure
(X509IssuerSerial
objects or elements from an external namespace). Subject names are
distinguished names in RFC 2253 String format. Implementations MUST
support the attribute type keywords defined in RFC 2253 (CN, L, ST,
O, OU, C, STREET, DC and UID). Implementations MAY support additional
keywords. The list is defensively copied to protect against
subsequent modification.X509Data
NullPointerException
- if content
is null
IllegalArgumentException
- if content
is empty, or
if a subject name is not RFC 2253 compliant or one of the attribute
type keywords is not recognized.ClassCastException
- if content
contains any entries
that are not of one of the valid types mentioned abovepublic abstract X509IssuerSerial newX509IssuerSerial(String issuerName, BigInteger serialNumber)
X509IssuerSerial
from the specified X.500 issuer
distinguished name and serial number.issuerName
- the issuer's distinguished name in RFC 2253 String
format. Implementations MUST support the attribute type keywords
defined in RFC 2253 (CN, L, ST, O, OU, C, STREET, DC and UID).
Implementations MAY support additional keywords.serialNumber
- the serial numberX509IssuerSerial
NullPointerException
- if issuerName
or
serialNumber
are null
IllegalArgumentException
- if the issuer name is not RFC 2253
compliant or one of the attribute type keywords is not recognized.public abstract boolean isFeatureSupported(String feature)
feature
- the feature name (as an absolute URI)true
if the specified feature is supported,
false
otherwiseNullPointerException
- if feature
is null
public abstract URIDereferencer getURIDereferencer()
URIDereferencer
that is used by
default to dereference URIs in RetrievalMethod
objects.URIDereferencer
public abstract KeyInfo unmarshalKeyInfo(XMLStructure xmlStructure) throws MarshalException
KeyInfo
instance from a
mechanism-specific XMLStructure
(ex: DOMStructure
)
instance.xmlStructure
- a mechanism-specific XML structure from which to
unmarshal the keyinfo fromKeyInfo
NullPointerException
- if xmlStructure
is
null
ClassCastException
- if the type of xmlStructure
is
inappropriate for this factoryMarshalException
- if an unrecoverable exception occurs during
unmarshalling Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.