text:
0
1 The concepts of conductors and insulators in terms of the mobility of charge
2 Voltage as a measure of the energy per charge at a point in a circuit
3 Current as the rate of transfer of charge past a point in a circuit
4 Need for a power supply to maintain a current in a circuit
5 The conversion of energy from electrical to other forms as charge moves round a circuit
6 The behaviour of currents at a junction
7 The voltage across a series circuit is the sum of the voltage across the components
8 The current in a series circuit is the same in all the components

1.1.1
1 Recall how to use switches and pull-up or pull-down resistors in series with a power supply to generate digital signals
2 Recall that, unless otherwise stated, logic 1 (high) is a signal at \\(\SI{+5}{\volt}\\) and logic 0 (low) is a signal at \\(\SI{0}{\volt}\\)
3 Recall and use the defining equation for resistance (\\(R = \frac{V}{I}\\))
4 Recall and use the equation for power (\\(P = VI\\)) to calculate the rate of heating, or output power, or a component
5 Recall that components have maximum ratings for current, voltage or power
6 Recall how to use multimeters as voltmeters, ammeters and ohmmeters to measure voltage, current and resistance in a circuit
7 Understand the use of the prefixes G, M, k, m, μ, n and p when calculating values of quantities

1.1.2
1 Recall the transfer characteristic of a NOT gate (an input above \\(\SI{+3}{\volt}\\) gives \\(\SI{0}{\volt}\\) at the output, an input below \\(\SI{+2}{\volt}\\) gives \\(\SI{+5}{\volt}\\) at the output) and represent it as an input-output graph
2 Recall the truth tables of the following two-input logic gates: AND, EOR, NAND, NOR, OR
3 Understand the use of an LED to indicate the state of a logic gate's output (including the need for a series resistor)
4 Recall the transfer characteristic of an LED and represent it as a current-voltage graph (no current in reverse bias; current rises rapidly in forward bias when voltage reaches \\(\SI{2}{\volt}\\))

1.1.3
1 Recall that logic gates can only source or sink currents of a few milliamps, so cannot supply much power to output devices
2 Understand that a MOSFET is a voltage-controlled resistor (the voltage at the gate determines the resistance between the drain and the source)
3 Recall the transfer characteristic of a MOSFET (drain-source resistance is infinite until gate-source voltage reaches a threshold value, then drops to a constant low value for higher gate-source voltages) and represent it as a resistance-voltage graph
4 Recall that MOSFETs with appropriate threshold voltages can act as drivers, sinking current from motors, heaters, buzzers and lamps

1.1.4
1 Recall and use standard circuit symbols to draw circuit diagrams
2 Understand that circuit diagrams omit power supply connection for integrated circuits

1.1.5
1 Represent a simple digital system as a block diagram, showing input, processing and output stages
2 Understand that a block diagram shows the flow of information through a system
3 Understand that block diagrams make it easier to analyse the operation of a system
4 Analyse and synthesise circuit and block diagrams for digital systems with only one logic gate

1.2.1
1 Recall the transfer characteristic of an LDR (resistance falls as light intensity increases) and represent this as a resistance-intensity graph
2 Recall the transfer characteristic of a thermistor (resistance falls as temperature increases) and represent this as a resistance-temperature graph
3 Recall and use the equation for the resistance of resistors in series (\\(R = R_1 + R_2\\)) and parallel
4 Calculate the output voltage of an unloaded voltage divider made from a pair of resistors in series with a power supply
5 Understand the use of a potentiometer to generate a signal of variable voltage
6 Understand the different between analogue and digital signals (analogue have any value, digital have just two)

1.2.2
1 Recall the transfer characteristic of an open-loop op-amp operating from supply rails at \\(\SI{+15}{\volt}\\) and \\(\SI{-15}{\volt}\\) (output saturates at \\(\SI{+13}{\volt}\\) if non-inverting input higher than inverting input, otherwise output saturates at \\(\SI{-13}{\volt}\\))
2 Understand that an ideal op-amp can be modelled as having no current at its inputs, but able to source or sink currents of up to \\(\SI{10}{\milli\ampere}\\)
3 Understand the use of a diode in series with resistors to convert the output of an op-amp into high and low signals for a logic system
4 Recall the transfer characteristic for a diode and represent it as a current-voltage graph (no current in reverse bias; current rises rapidly in forward bias when the voltage reaches \\(\SI{0.7}{\volt}\\))
5 Understand the use of a zener diode in series with a resistor to generate a fixed voltage at one of the inputs of an op-amp
6 Recall the transfer characteristic for a zener diode and represent it as a current-voltage graph (no current in reverse bias until the breakdown voltage; current rises rapidly in forward bias when voltage reaches \\(\SI{0.7}{\volt}\\))
7 Analyse and synthesise sensor systems with digital outputs for position, light intensity and temperature

1.2.3
1 Recall the exponential change in voltage across a capacitor as it is charged or discharged from a constant voltage through a resistor, and represent it as a voltage-time graph
2 Recall and use the equation for time constant (\\(\tau = RC\\))
3 Recall and use the idea that the voltage across the resistor of an RC series circuit is halved in a time of \\(0.7\tau\\)
4 Understand the use of a capacitor to delay the change of signal caused by the closing or opening of a switch in series with a resistor

1.3.1
1 Understand the use of an RC network to generate spikes from rising or falling edges, representing them as voltage-time graphs at input and output (exponential drop lasts about two time constants)
2 Understand the use of diodes as clamps to suppress spikes from RC networks
3 Understand the use of a pair of NAND gates and an RC network to make a monostable the output of which goes low for \\(\SI{0.7RC}{\second}\\) when triggered by a falling edge
4 Recall that inputs to logic gates draw no current and have clamping diodes to the supply rails
5 Sketch voltage-time graphs at inputs and outputs of the logic gates in a monostable

1.3.2
1 Recall the transfer characteristic of a Schmitt trigger NOT gate and represent it as an input-output graph (no recall of trip point values required)
2 Understand the use of an RC network and Schmitt trigger NOT gate to make an oscillator and sketch voltage-time graphs at input and output (period \\(T = 0.5RC\\))
3 Understand how to use an oscilloscope to observe voltage that vary with time (including use of timebase and vertical amplifier settings to measure amplitude and period)
4 Recall and use the equation for frequency (\\(f = \frac{1}{T}\\))
5 Understand the use of a driver to provide the interface between an oscillator and a loudspeaker

1.4.1
1 Understand the use of truth tables to analyse the behaviour of logic systems with up to three inputs
2 Recall and use Boolean algebra to represent the output of logic gates
3 Recall and use Boolean algebra to represent the output columns of a truth table
4 Understand the construction of a truth table from a Boolean algebra expression
5 Understand the use of Boolean algebra to represent the behaviour of a logic system (including the use of the rules given in Appendix B to simplify expressions)
6 Synthesise AND, OR and NOT gates from NAND gates
7 Understand the use of NAND gates to synthesise logic systems with up to four inputs
8 Understand the advantages of only using NAND gates (more economic use of integrated circuits, economies of scale)
9 Analyse the behaviour of logic systems with up to four inputs and four outputs

2.1.1
1 Recall the behaviour of a bistable (separate inputs to set and reset a single output) and represent its behaviour with timing diagrams
2 Understand the use of NOR gates to make a bistable with active-high inputs
3 Understand the use of NAND gates to make a bistable with active-low inputs
4 Recall the behaviour of a latch (data and enable inputs to set and reset a single output) and represent its behaviour with timing diagrams
5 Analyse the operation of a latch made from logic gates and a bistable
6 Recall the behaviour of a rising-edge triggered D flip-flop (data, clock, set and reset inputs, complementary outputs) and represent its behaviour with timing diagrams
7 Analyse the operation of a D flip-flop made from a master-slave pair of latches
8 Understand the use of an array of D flip-flops to store a binary word

2.2.1
1 Recall the use of an electret microphone to transfer sounds into electrical signals, to include the use of a pull-up resistor and a coupling capacitor
2 Understand that an ideal amplifier increases the amplitude of an ac signal without altering its frequency or shape
3 Recall and use the equation for voltage gain (\\(G = \frac{V_{out}}{V_{in}}\\))
4 Recall that an op-amp is a differential amplifier (\\(V_{out} = A(V_+ - V_-)\\)) with a very large open-loop gain A
5 Understand the use of negative feedback to make an op-amp into a voltage follower, including the need for a pull-down resistor at the non-inverting input
6 Understand that a voltage follower has a voltage gain of one but can provide power gain

2.2.2
1 Understand the use of feedback and pull-down resistors to make an op-amp into a non-inverting amplifier with a known voltage gain (\\(G = 1 + \frac{R_f}{R_d}\\))
2 Understand the use of feedback and input resistors to make an op-amp into an inverting amplifier with a known voltage gain (\\(G = -\frac{R_f}{R_{in}}\\)), to include the concept of virtual earth for the inverting input
3 Recall the transfer characteristic of inverting and non-inverting amplifiers based on op-amps, and represent them as input-output graphs, including saturation
4 Understand the use of feedback and input resistors to allow an op-amp to combine two or more different ac signals (\\(-\frac{V_{out}}{R_f} = \frac{V_1}{R_1} + \frac{V_2}{R_2}...\\))
5 Recall that resistors in op-amp amplifiers need to be in the range \\(\SI{1}{\kilo\ohm}\\) to \\(\SI{10}{\mega\ohm}\\)

2.3.1
1 Understand the connection of D to \\(\overline Q\\) to make a D flip-flop into a one-bit counter
2 Understand the use of D flip-flops and a NOT gate to make a binary ripple up-counter
3 Understand the use of logic gates to make binary counters that reset to m after n counts, where m and n are integers
4 Recall and use timing diagrams to represent the transfer characteristic of a binary counter
5 Recall the use of decoders and seven segment LEDs to display the output of a binary counter in decimal

2.3.2
1 Understand the use of binary counters to make systems that can be used as clocks, including the use of crystal oscillators for precision timing
2 Understand the use of oscillators, logic systems and binary counters to generate continuous sequences of digital signals, to include frequency division
3 Understand the use of a flip-flop, oscillators, logic systems and binary counters to generate a single train of pulses when triggered by a pulse

2.4.1
1 Explain the operation of a complete audio amplifier system in terms of blocks representing voltage amplifier, volume and tone controls and power amplifiers
2 Recall and use the concepts of output and input impedance to solve problems of power and signal transfer between subsystems
3 Understand the use of a potentiometer as a volume control

2.4.2
1 Explain the use of a capacitor as a frequency dependant impedance, with impedance decreasing with increasing frequency
2 Recall and use the equation for break frequency (\\(f_0 = \frac{1}{2\pi RC}\\)) in bass cut and treble cut filters
3 Recall the transfer characteristics of simple passive filters and represent them with log-log gain-frequency graphs, using straight line approximations
4 Understand treble cut, bass cut and bandpass filters based on op-amps, including the use of log-log gain-frequency graphs to represent their transfer characteristics

2.5.1
1 Describe a microcontroller as a digital system whose transfer characteristics are decided by the program stored in its memory
2 Understand the difference between hardware and the software that controls it
3 Understand the advantages of programmable systems (economies of scale, reusable, ease of systems design)
4 Understand the limitations of programmable systems (digital only, relatively slow)
5 Understand the need for a host computer to translate a program into machine code and download it into a microcontroller

2.5.2
1 Understand the meaning of the terms input port, output port, memory address and register in the context of a microcontroller system
2 Understand that an analogue-to-digital converter outputs a byte that represents the input voltage
3 Recall and use flowcharts to analyse and design simple programs for microcontrollers, using the symbols of Appendix C
4 Understand the use of hexadecimal notation to summarise four-bit binary words and bytes

4.1.1
1 Recall the transfer characteristics of an n-channel MOSFET, representing them as graphs of drain current against gate-source voltage and drain current against drain-source voltage (including the use of threshold voltage and transconductance)
2 Understand the use of a MOSFET as a voltage-controlled resistor for small drain-source voltages
3 Understand the use of MOSFETs in a voltage divider circuit to make a potentiometer whose wiper position is controlled by an external voltage
4 Understand the use of MOSFETs in analogue switches, multiplexers and tristates
5 Understand the use of MOSFETs as voltage followers with very high input impedance (including the use of coupling capacitors to inject and extract signals)
6 Understand the use of MOSFETs as high input impedance voltage amplifiers, including the need for biasing with a voltage divider to place the drain at a suitable voltage
7 Recall and use the equation for voltage gain (\\(G = -g_mR_d\\)) of a MOSFET amplifier
8 Recall the use of drain bias for a MOSFET amplifier (including why this is better than biasing with a voltage divider)

4.2.1
1 Recall the block diagram for a memory module (to include data bus, address bus and control bus)
2 Understand that memory module stores information as binary words (one bit per cell), including how the number of data lines is related to the word length
3 Recall the relationship between the number of address lines and the number of different locations in the memory module
4 Understand that the control bus contains active-low read, write and enable lines
5 Recall the sequence of operations required for a word to be written to, and read from a location in a memory module

4.2.2
1 Recall the distinction between volatile and non-volatile memory
2 Understand the use of a D flip-flop and a tristate to make a volatile memory cell
3 Understand the use of a capacitor and a MOSFET to make a non-volatile memory cell
4 Understand the use of tristates to allow more than one memory module to access a common data bus
5 Understand the use of multiplexers and logic gates to combine small memory modules into large ones

4.2.3
1 Recall the use of D flip-flops to assemble registers
2 Understand the use of registers and logic systems (such as full adders) in the parallel processing of pairs of binary words
3 Recall the use of two's complement coding to represent decimal numbers in binary code
4 Recall the use of AND and EOR gates to combine pairs of binary words stored in shift registers

4.3.1
1 Understand the difference between open- and closed-loop control systems
2 Understand the operation of on-off servo control systems in terms of the following blocks: sensor, reference, comparator, switch, transducer
3 Understand circuits for the on-off control of temperature, position, motor speed and light intensity (based on components studied at AS)
4 Understand the use of voltage-time graphs to represent the response of an on-off control system to changes of conditions
5 Recall that on-off control results in a rapid response to change, but that the output never settles to a constant value

4.3.2
1 Understand the operation of proportional servo control systems in terms of the following blocks: sensor, reference, difference amplifier, voltage amplifier, ramp generator, power amplifier, transducer
2 Understand the use of an op-amp and four identical resistors to make a difference amplifier
3 Understand the use of an op-amp to make a ramp generator, including the use of the equation \\(\Delta V_{out} = -V_{in}\frac{\Delta t}{RC}\\)
4 Understand the use of voltage-time graphs to represent the response of a proportional control system to changes of conditions
5 Recall that proportional control systems respond relatively slowly, but allow the sensor and reference to settle at the same value

4.3.3
1 Understand the use of a diode bridge and a capacitor to produce an unstabilised dc voltage from an ac supply
2 Understand the operation of a switched-mode power supply in terms of the following blocks: switched oscillator, transformer, rectifier, smoother, comparator, reference (including the use of opto-isolators to switch the oscillator on and off)
3 Understand the operation of a dc voltage regulator in terms of the following blocks: reference, comparator, MOSFET follower

4.4.1
1 Understand the operation of a microcontroller system in terms of the following blocks: CPU, memory, input port, output port, clock, reset
2 Understand the use of the address, data and control bus to transfer data between the CPU and memory, input ports and output ports
3 Understand the use of the following registers in the CPU: program counter, stack pointer, general purpose registers
4 Recall the use of tristates and D flip-flops to contruct input and output ports
5 Understand how in each machine cycle the CPU fetches an instruction from the memory and executes it, including changes in the contents of its registers
6 Understand the changes in the program counter when jump instructions are executed
7 Recall why the program counter is reset when the CPU's reset pin is activated
8 Understand that programs are stored in memory as hexadecimal code produced by compilers from programs written in other languages such as assembler and C

4.4.2
0 Understand the instruction set given in Appendix E to:
1 Loop until a required condition at the input port is met, including the use of the AND operation for selective resetting of bits (masking)
2 Provide a time delay by counting down in a register until it reaches 0
3 Fetch a byte from a look-up table and copy it to the output port
4 Use the EOR operation to selectively invert bits in the acccumulator
5 Process a byte at the input port to generate an address for a look-up table
6 Shift bytes in the accumulator to the left or right
7 The use of conditional and unconditional jumps, including the need for relative addressing
8 Call and return from subroutines, using registers to transfer information

4.4.3
1 Recall that the stack is an area of memory for storing the contents of the program counter on a last-in, first-out (LIFO) basis
2 Understand the changes in the stack pointer and program counter when calling and returning from subroutines
3 Understand the advantages of designing programs from subroutines
4 Use the instruction set given in Appendix E to write subroutines, using registers to transfer data to and from the main program

5.1.1
1 Recall that video screens display colour pictures as lines of pixels in a frame, with separate red, green and blue pixels
2 Recall that the intensity of each pixel in a computer monitor is controlled by an analogue signal
3 Understand the need for raster scans, line synchronisation signals and frame synchronisation signals
4 Recall that the separate signals for red, green, blue, line sync and frame sync pass from a computer to a monitor
5 Understand that the frame refresh rate has to be about 25 Hz for a flicker-free moving image
6 Recall how to calculate the bandwidth required for a monitor cable from the refresh rate and the number of pixels per frame
7 Understand that a binary word can be used to determine the intensity of a pixel, including the relationship between the word length and the number of intensity level
8 Recall how to calculate the bit rate required for a digital video stream from the bits per pixel, pixels per frame and the frame refresh rate
9 Understand that the bandwidth required for a digital video stream is half the bit rate
10 Recall that compression of a digital image reduces the bits per frame but may result in a loss of quality

5.2.1
1 Understand that amplitude modulation (AM) requires the amplitude of the carrier to carry information about the instantaneous voltage of the signal
2 Understand the use of a variable gain amplifier to produce AM carriers
3 Recall how to construct voltage-time and amplitude-frequency graphs of AM carriers (including the presence of sidebands on either side of the carrier)
4 Understand the use of a rectifier and filter (diode detector) to recover a signal from an AM carrier
5 Recall and use the rule that the bandwidth required for an amplitude modulated signal is twice the maximum signal frequency

5.2.2
1 Understand that frequency modulation (FM) requires the frequency of the carrier to carry information about the instantaneous voltage of the signal
2 Understand the use of a variable frequency oscillator to produce FM carriers
3 Understand the use of a monostable and treble cut filter for frequency demodulation
4 Recall how to construct voltage-time graphs of frequency modulated carriers
5 Recall and use the rule that the bandwidth required for an FM carrier is about five times the maximum frequency of the signal

5.2.3
1 Understand that the mark-space ratio of a pulse-width modulated (PWM) carrier is determined by the instantaneous voltage of the signal
2 Understand the use of a triangle waveform generator and a comparator to produce PWM carriers
3 Understand the operation of an op-amp ramp generator and an op-amp non-inverting Schmitt trigger to make a triangle waveform generator (including calculations of trip points and rate rates from component values)
4 Understand the need to sample the signal at least twice in each cycle (Nyquist criteria)
5 Understand the use of a treble cut filter to demodulate a PWM carrier
6 Recall and use the rule that the bandwidth of a PWM carrier is about half the highest frequency present in the carrier

5.2.4
1 Recall that modulated carriers can be transmitted as electrical signals along cables, as infrared along optical fibre or as radio waves
2 Understand that the intensity of a modulated carrier decreases with increasing distance of transmission (no quantitative details required)
3 Understand that noise is a random signal that is added to modulated carriers in transmission
4 Understand that interference is a signal from another carrier that is added to modulated carriers
5 Understand the relative susceptibility of twisted-pair cables, optical fibres and radio waves to noise and interference
6 Understand the meaning of signal-to-noise ratio (no quantitative details required)
7 Understand the use of limiters/Schmitt triggers to remove noise and interference from FM and PWM carriers, including that this is not possible for AM carriers

5.3.1
1 Understand that frequency division multiplexing (FDM) allocates a different range of frequencies (channel) for each modulated carrier
2 Understand how the maximum number of channels in a link is related to its bandwidth and the bandwidth allocated to each channel
3 Recall the use of a parallel LC circuit and a resistor as a bandpass filter (including the effect on the bandwidth of increasing the resistance in the parallel LC circuit)
4 Recall and use the equations for the reactance of an inductor (\\(X_L = 2\pi fL\\)) and a capacitor (\\(X_C = \frac{1}{2\pi fC}\\)), including the use of log-log plots of reactance against frequency to represent these characteristics
5 Recall and use the equation for the resonant frequency (\\(f_0 = \frac{1}{2\pi\sqrt{\strut LC}}\\))
6 Understand the use of three stacked filters to make a bandpass filter with a flat top and sharp edges, including the need for buffer amplifiers between stages

5.3.2
1 Understand the use of a tuned circuit at the base of an aerial to select a modulated carrier from just one broadcast channel
2 Recall that increasing the resistance in parallel with the tuned circuit increases the signal and reduces its bandwidth
3 Recall the operation of a simple AM radio receiver in terms of the following blocks: aerial, tuned circuit, rf amplifier, diode demodulator, af amplifier, loudspeaker
4 Understand that the selectivity of a radio receiver is its ability to reject modulated carriers from neighbouring channels
5 Understand that the sensitivity of a radio receiver is its ability to pick up weak stations
6 Understand the operation of a superhet radio receiver in terms of the following blocks: aerial, tuned circuit, local oscillator, mixer, if filter, if amplifier, demodulator, af amplifier, loudspeaker

5.4.1
1 Understand the operation of a digital transmission system in terms of the following blocks: analogue-to-digital converter (ADC), parallel-to-serial converter (PSC), serial-to-parallel converter (SPC), digital-to-analogue converter (DAC)
2 Understand that an ADC represents the signal voltage of each sample as a binary word, with the sampling rate at least twice the maximum signal frequency
3 Understand the meaning of the terms range, resolution and sample rate as applied to ADCs
4 Understand the operation of flash ADCs made from comparators and logic gates
5 Recall the use of summing amplifiers as DACs, including calculating the range and resolution from the resistor values
6 Understand the operation of an ADC made from a binary counter, a comparator and a DAC, including its advantages and disadvantages compared with a flash converter
7 Understand how time-division multiplexing (TDM) allows many channels to share the same link
8 Understand that the bandwidth required for TDM is half the total bit rate
9 Understand the use of multiplexers and demultiplexers in TDM

5.4.2
1 Understand that computers can exchange information with each other along a twisted-pair cable by packets of serial digital signals
2 Understand that each packet contains the following information: the source address, the destination address, the data payload, checksum
3 Understand the use of analogue switches to allow many systems to place signals on a single link in turn
4 Recall that each computer waits until there is no traffic on the cables before it attempts to transmit a packet
5 Understand the need for start (0) and stop (1) bits at the start and end of each packet
6 Understand the use of D flip-flops and logic gates to construct parallel-in serial-out (PISO) and serial-in parallel-out (SIPO) shift registers
7 Understand the use of shift registers in PTS and STP converters, including the need to use crystal oscillators
8 Recall that the bandwidth of the cable is half the maximum bit rate


text:
title: JekyllConf
date: 2016-05-05 12:01:00 +0000
start_at: 2016-05-07 10:00:00 +0000
category:
- event-recap
link: http://jekyllconf.com/
venue: JekyllCOnf Online
video: https://www.youtube.com/playlist?list=PLrxYIq_0LFJdi2HJ6lnY4nm7ewu221hyS
description: The free, online global conference for all things Jekyll (videos)
related_tools:
- Jekyll

---
## Details
Vidoes for the conference are posted on the website, and Youtube. Here's a link to the [Youtube playlist](https://www.youtube.com/playlist?list=PLrxYIq_0LFJdi2HJ6lnY4nm7ewu221hyS).

### Who's running JekyllConf and why?

[CloudCannon](http://cloudcannon.com/) is organising JekyllConf. We want to do our part in growing the community and showcase all the awesome people and projects using Jekyll.

redpajama_set_name: RedPajamaGithub


text:
---
tags:
  - Reference
options:
  order: 11
---

# Reference: Configuration

> :woman_student: **Level**: Expert

`patternplate` can be configured via `patternplate.config.js`.

In absence of a `patternplate.config.js` file the defaults are:

```js
module.exports = {
  docs: ["docs/**/*.md"],
  entry: ["lib/**/*.js"],
  render: "@patternplate/render-default/render",
  mount: "@patternplate/render-default/mount"
};
```

### docs

An array of glob patterns `string[]`.
Relative to `patternplate.config.js`.

Files matching the glob pattern are considered as sources for documentation.

**Example**

```js
module.exports = {
  // all .md files next to patternplate.config.js
  docs: ["*.md"]
};
```

### entry

An array of glob patterns `string[]`.
Relative to `patternplate.config.js`.

Files matching the glob pattern are considered as demo entries.

**Example**

```js
module.exports = {
  // All *.demo.js files in dist, e.g. dist/button/button.demo.js
  entry: ["dist/**/*.demo.js"]
};
```

### render

An absolute or relative module id `string`, resolved relative to `patternplate.config.js`.
The default export of the resolved module is used as server-side render function.

**Examples**

```js
module.exports = {
  // use render of the node module @patternplate/render-react
  render: "@patternplate/render-react/render"
};
```

```js
module.exports = {
  // use the file render.js next to patternplate.config.js
  render: "./render.js"
};
```

### mount

An absolute or relative module id `string`, resolved relative to `patternplate.config.js`.
The default export of the resolved module is used as client-side mount function.

**Examples**

```js
module.exports = {
  // use render of the node module @patternplate/render-react
  render: "@patternplate/render-react/mount"
};
```

```js
module.exports = {
  // use the file mount.js next to patternplate.config.js
  render: "./mount.js"
};
```

### cover

An absolute or relative module id `string`, resolved relative to `patternplate.config.js`.
The exports of the resolved module are used as a specialized demo that is displayed independently
of the patternplate web interface on `/`

**Examples**

```js
module.exports = {
  // use the file cover.js next to patternplate.config.js
  render: "./cover.js"
};
```

### ui

A map of theming-related properties. Use this to adapt the interface of `patternplate` to
your CI requirements.

There are three classes of `ui` configuration:

* SVG strings: Source strings of Scalable Vector Graphics
* Font families: CSS font values
* Global Colors: CSS Colors that apply to all areas of the interface
* Themed Colors: CSS Colors that apply to dark (e.g. sidebar) vs light (e.g. Markdown) areas

**Examples**

```js
module.exports = {
  ui: {
    logo: `
    <svg height="30" width="30">
      <rect widht="30" height="30"/>
    </svg>`,
    colorBackgroundDark: "rgb(15, 15, 50)",
    colorBackgroundSecondaryDark: "rgb(26, 24, 68)",
    colorBackgroundTertiaryDark: "rgb(26, 24, 68)",
    colorBorderDark: "rgb(26, 24, 68)"
  }
};
```

### ui.logo

An SVG to use as logo above the main navigation. `patternplate` performs
sanitization on the provided SVG code to prevent side effects between
the embedded SVG and the interface.

Graphics with `height` and `width` of `30` are recommended.

**Examples**

```js
module.exports = {
  ui: {
    logo: `
    <svg height="30" width="30">
      <rect widht="30" height="30"/>
    </svg>`
  }
};
```

### ui.favicon

An SVG to use as favicon in browsers. In clients without SVG favicon support a PNG is generated automatically.  `patternplate` performs
sanitization on the provided SVG code.

```js
module.exports = {
  ui: {
    favicon: `
    <svg height="30" width="30">
      <circle cx="15" cy="15" r="15"/>
    </svg>`
  }
};
```

### ui.fontDefault

CSS font value to use for basic text styling,
e.g. Links, Paragraphs.

```js
module.exports = {
  ui: {
    fontDefault: `Comic Sans`
  }
};
```

### ui.fontHeadline

CSS font value to use for headline styling

```js
module.exports = {
  ui: {
    fontHeadline: `Arial, sans-serif`
  }
};
```

### ui.fontCode

CSS font value to use for code

```js
module.exports = {
  ui: {
    fontCode: `Menlo, monospace`
  }
};
```

### ui.colorActive

Global CSS Color of active color to use througout the interface, e.g. links,
activated navigation items.

```js
module.exports = {
  ui: {
    colorActive: `rgb(255, 0, 0)`
  }
};
```

### ui.colorError

Global CSS Color for error messages,
deprecated / alpha flags.

```js
module.exports = {
  ui: {
    colorError: `rgb(255, 0, 0)`
  }
};
```

### ui.colorWarning

Global CSS Color for warning messages and beta flags.

```js
module.exports = {
  ui: {
    colorWarning: `rgb(255, 0, 0)`
  }
};
```

### ui.colorInfo

Global CSS Color for info messages

```js
module.exports = {
  ui: {
    colorInfo: `rgb(255, 0, 0)`
  }
};
```

### ui.colorSuccess

Global CSS Color for sucess messages and
stable flags

```js
module.exports = {
  ui: {
    colorSucess: `rgb(255, 0, 0)`
  }
};
```

### ui.colorBackgroundDark

Themed CSS Color for primary background. Applies to e.g.
sidebar, search.

```js
module.exports = {
  ui: {
    colorBackgroundDark: `rgb(255, 0, 0)`
  }
};
```

### ui.colorBackgroundSecondaryDark

Themed CSS Color for backgrounds. Applies to e.g. active items in sidebar

```js
module.exports = {
  ui: {
    colorBackgroundSecondaryDark: `rgb(255, 0, 0)`
  }
};
```

### ui.colorBackgroundTertiaryDark

Themed CSS Color for backgrounds. Applies to e.g. active labels in sidebar

```js
module.exports = {
  ui: {
    colorBackgroundTertiaryDark: `rgb(255, 0, 0)`
  }
};
```

### ui.colorBorderDark

Themed CSS Color for borders.

```js
module.exports = {
  ui: {
    colorBorderDark: `rgb(255, 0, 0)`
  }
};
```

### ui.colorTextDark

Themed CSS Color for basic text color.

```js
module.exports = {
  ui: {
    colorTextDark: `rgb(255, 0, 0)`
  }
};
```

### ui.colorTextNegatedDark

Themed CSS Color for inverted text color.

```js
module.exports = {
  ui: {
    colorTextNegatedDark: `rgb(255, 0, 0)`
  }
};
```

### ui.colorRecessDark

Themed CSS Color for recessed text color.

```js
module.exports = {
  ui: {
    colorRecessDark: `rgb(255, 0, 0)`
  }
};
```

### ui.colorBackgroundLight

Themed CSS Color for primary background. Applies to e.g. Markdown.

```js
module.exports = {
  ui: {
    colorBackgroundLight: `rgb(255, 0, 0)`
  }
};
```

### ui.colorBackgroundSecondaryLight

Themed CSS Color for backgrounds.

```js
module.exports = {
  ui: {
    colorBackgroundSecondaryLight: `rgb(255, 0, 0)`
  }
};
```

### ui.colorBackgroundTertiaryLight

Themed CSS Color for backgrounds.

```js
module.exports = {
  ui: {
    colorBackgroundTertiaryLight: `rgb(255, 0, 0)`
  }
};
```

### ui.colorBorderLight

Themed CSS Color for borders, e.g. for `<hr/>`.

```js
module.exports = {
  ui: {
    colorBorderLight: `rgb(255, 0, 0)`
  }
};
```

### ui.colorTextLight

Themed CSS Color for basic text color.

```js
module.exports = {
  ui: {
    colorTextLight: `rgb(255, 0, 0)`
  }
};
```

### ui.colorTextNegatedLight

Themed CSS Color for inverted text color.

```js
module.exports = {
  ui: {
    colorTextNegatedLight: `rgb(255, 0, 0)`
  }
};
```

### ui.colorRecessLight

Themed CSS Color for recessed text color.

```js
module.exports = {
  ui: {
    colorRecessLight: `rgb(255, 0, 0)`
  }
};
```

### ui.showComponents

A boolean value that switches the components on/off from the sidebar.

```js
module.exports = {
  ui: {
    showComponents: false
  }
};
```


text:
<!DOCTYPE html>

    <meta charset="utf-8"/>
    <title>Doodle.js -- Making Things Move: Ch.9, p.233: Simple Distance-Based Collision Detection</title>


text:
package unsw.curation.api.extractsimilarity;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors;

import unsw.curation.api.domain.ExtractNumberSimilarity;
import unsw.curation.api.domain.abstraction.INumberDiceSimilarity;

public class ExtractNumberDiceSimilarityImpl implements INumberDiceSimilarity{

	@Override
	public double Dice_Vector_Vector(double[] number1, double[] number2) {
		List<String> lstarr1=new ArrayList<>();
        List<String> lstarr2=new ArrayList<>();
        for(double num:number1)
        {
            lstarr1.add(String.valueOf(num));
        }
        for(double num:number2)
        {
            lstarr2.add(String.valueOf(num));
        }
        List<String> lstUnique=new ArrayList<>();
        lstUnique.addAll(lstarr1);
        lstUnique.addAll(lstarr2);
        HashSet<String> lstIntersect=new HashSet<>();
        lstIntersect.addAll(lstarr1);
        lstIntersect.retainAll(lstarr2);
        double intersectSize=lstIntersect.size();
        double uniqueSize=lstUnique.size();
        double DiceSimlarity=(2*intersectSize)/uniqueSize;
        return DiceSimlarity;
	}

	@Override
	public List<ExtractNumberSimilarity> Dice_Vector_VectorS(String filePath) throws IOException {
		List<ExtractNumberSimilarity> lstValues=new ArrayList<>();
        List<ExtractNumberSimilarity> lstTopRecords=new ArrayList<>();
        List<String[]> lstarr=ReadData(filePath);
        for(String [] arrItem:lstarr)
        {
            List<Double> lstUniqueItems=new ArrayList<>();
            HashSet<Double> lstIntersect=new HashSet<>();
            for(String arrIte:arrItem)
            {
                lstUniqueItems.add(Double.parseDouble(arrIte));
                lstIntersect.add(Double.parseDouble(arrIte));
            }
            List<String []> lstTempData=new ArrayList<>();
            lstTempData.addAll(lstarr);
            int arrItemIndex=lstTempData.indexOf(arrItem);
            lstTempData.remove(arrItemIndex);
            for(String [] secArrItem:lstTempData)
            {
                List<Double> lstforSecArrItem=new ArrayList<>();
                 for(String arrIt: secArrItem)
                 {
                    lstUniqueItems.add(Double.parseDouble(arrIt));

                    lstforSecArrItem.add(Double.parseDouble(arrIt));
                 }
                lstIntersect.retainAll(lstforSecArrItem);
                double intersectSize=lstIntersect.size();
                double uniqueSize=lstUniqueItems.size();
                double DiceSimlarity=intersectSize/uniqueSize;
                lstValues.add(new ExtractNumberSimilarity(Arrays.toString(arrItem),Arrays.toString(secArrItem)
                        ,DiceSimlarity));
            }
          Collections.sort(lstValues,new MyDiceComp());
            lstValues=lstValues.stream().limit(10).collect(Collectors.toList());
            lstTopRecords.addAll(lstValues);
            lstValues.clear();
        }
        return lstTopRecords;
	}

	@Override
	public List<ExtractNumberSimilarity> Dice_Vector_VectorS(Double[] vector, String filePath) throws IOException {
		List<ExtractNumberSimilarity> lstValues=new ArrayList<>();
        List<String[]> lstarr=ReadData(filePath);
        for(String [] arrItem:lstarr)
        {
            List<Double> lstUniqueItems=new ArrayList<>();
            HashSet<Double> lstIntersect=new HashSet<>();
            for(String dblVal:arrItem)
            {
                    lstUniqueItems.add(Double.parseDouble(dblVal));
                    lstIntersect.add(Double.parseDouble(dblVal));
            }
            lstUniqueItems.addAll(Arrays.asList(vector));
            lstIntersect.retainAll(Arrays.asList(vector));
            double intersectSize=lstIntersect.size();
            double uniqueSize=lstUniqueItems.size();
            double DiceSimlarity=(2*intersectSize)/uniqueSize;
            lstValues.add(new ExtractNumberSimilarity(Arrays.toString(arrItem),Arrays.toString(vector)
                    ,DiceSimlarity));
        }
        Collections.sort(lstValues,new MyDiceComp());
        List<ExtractNumberSimilarity> lstTopRecords=lstValues.stream()
                .limit(10)
                .collect(Collectors.toList());
        return lstTopRecords;
	}

	public List<String[]> ReadData(String FilePath) throws FileNotFoundException, IOException
    {
        List<String[]> lstValues=new ArrayList<>();
        BufferedReader reader=new BufferedReader(new FileReader(FilePath));
        String line="";
        while((line=reader.readLine())!=null)
        {
           String [] arrLine=line.split(",");
           lstValues.add(arrLine);
        }
        return lstValues;
    }
	public class MyDiceComp implements Comparator<ExtractNumberSimilarity>
    {

        @Override
        public int compare(ExtractNumberSimilarity o1, ExtractNumberSimilarity o2) {
           if(o1.getScore()<o2.getScore())
               return 1;
           else
               return -1;
        }

    }
}


text:
$(document).ready(function(){
  $(".delete_x_member_input").hide();
  $(document).on("click", "a.delete_x_member_input", function(e){
    e.preventDefault();
    if($("a.delete_x_member_input").size() > 1){
      $(this).closest(".member_input").remove();
    }
  });
});


text:
<configuration status="OFF">
	<appenders>
		<Console name="Console" target="SYSTEM_OUT">
			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
		</Console>
	</appenders>
	<loggers>
		<logger name="Main" level="trace">
			<appender-ref ref="Console" />
		</logger>
		<root level="debug">
			<appender-ref ref="Console" />
		</root>
	</loggers>
</configuration>


text:
package com.kotcrab.vis.editor.ui.scene.entityproperties.components;

import com.kotcrab.vis.editor.module.ModuleInjector;
import com.kotcrab.vis.editor.ui.scene.entityproperties.NumberInputField;
import com.kotcrab.vis.editor.ui.scene.entityproperties.autotable.AutoComponentTable;
import com.kotcrab.vis.editor.util.gdx.VisChangeListener;
import com.kotcrab.vis.runtime.component.RenderableComponent;
import com.kotcrab.vis.runtime.system.RenderBatchingSystem;

/** @author Kotcrab */
public class RenderableComponentTable extends AutoComponentTable<RenderableComponent> {
	private RenderBatchingSystem batchingSystem;

	private NumberInputField zIndexField;

	public RenderableComponentTable (ModuleInjector projectInjector) {
		super(projectInjector, RenderableComponent.class, false);
	}

	@Override
	protected void init () {
		super.init();
		zIndexField = getUiByField("zIndex", NumberInputField.class);
		zIndexField.addListener(new VisChangeListener((event, actor) -> {
			if (zIndexField.isInputValid()) {
				batchingSystem.markDirty();
			}
		}));
	}
}


text:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceFlags = void 0;

var TraceFlags;
(function (TraceFlags) {
    /** Represents no flag set. */
    TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
    /** Bit to represent whether trace is sampled in trace flags. */
    TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
//# sourceMappingURL=trace_flags.js.map


text:
package cn.sxx.springinaction.springidol;

import cn.sxx.springinaction.exceptions.PerformanceException;

public class Juggler implements Performer{

	private int beanBags = 3;

	public Juggler() {
	}

	public Juggler(int beanBags){
		this.beanBags = beanBags;
	}

	@Override
	public void perform() {
		System.out.println("JUGGLING " + beanBags + " BENGBAGS");
	}

}


text:
@interface ApigeeUIWebViewDelegateInterceptor()

@property (weak) id<UIWebViewDelegate> target;
@property (strong) ApigeeNetworkEntry *networkEntry;
@end

@implementation ApigeeUIWebViewDelegateInterceptor

- (id) initAndInterceptFor:(id<UIWebViewDelegate>) target
{
    self = [super init];

    if (self) {
        self.target = target;
        self.networkEntry = [[ApigeeNetworkEntry alloc] init];
    }

    return self;
}

- (BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
    if (!self.networkEntry) {
        self.networkEntry = [[ApigeeNetworkEntry alloc] init];
    }

    [self.networkEntry populateWithRequest:request];

    if ( self.target && [self.target respondsToSelector:@selector(webView:shouldStartLoadWithRequest:navigationType:)]) {
        return [self.target webView:(UIWebView *)webView shouldStartLoadWithRequest:request navigationType:navigationType];
    }

    return YES;
}

- (void) webViewDidStartLoad:(UIWebView *) webView
{
    [self.networkEntry recordStartTime];

    if (self.target && [self.target respondsToSelector:@selector(webViewDidStartLoad:)]) {
        [self.target webViewDidStartLoad:webView];
    }
}

- (void) webViewDidFinishLoad:(UIWebView *) webView
{
    [self.networkEntry recordEndTime];

    if (self.target && [self.target respondsToSelector:@selector(webViewDidFinishLoad:)]) {
        [self.target webViewDidFinishLoad:webView];
    }

    ApigeeMonitoringClient* monitoringClient = [ApigeeMonitoringClient sharedInstance];
    if (![monitoringClient isPaused]) {
        [monitoringClient recordNetworkEntry:self.networkEntry];
    } else {
        NSLog(@"Not capturing network metrics -- paused");
    }

    self.networkEntry = nil;
}

- (void) webView:(UIWebView *) webView didFailLoadWithError:(NSError *) error
{
    [self.networkEntry recordEndTime];

    if (self.target && [self.target respondsToSelector:@selector(webView:didFailLoadWithError:)]) {
        [self.target webView:webView didFailLoadWithError:error];
    }

    ApigeeMonitoringClient* monitoringClient = [ApigeeMonitoringClient sharedInstance];
    if (![monitoringClient isPaused]) {
        [self.networkEntry populateWithError:error];
        [monitoringClient recordNetworkEntry:self.networkEntry];
    } else {
        NSLog(@"Not capturing network metrics -- paused");
    }

    self.networkEntry = nil;
}

@end


text:
const NSStringEncoding _AFNetworkFormEncoding = NSUTF8StringEncoding;

static NSData *_AFNetworkFormDocumentHeadersDataFromDictionary(NSDictionary *headers) {
	NSMutableData *data = [NSMutableData data];

	for (NSString *currentKey in headers) {
		NSString *currentValue = [headers objectForKey:currentKey];

		NSString *currentHeader = [NSString stringWithFormat:@"%@: %@\r\n", currentKey, currentValue];
		[data appendData:[currentHeader dataUsingEncoding:_AFNetworkFormEncoding]];
	}
	[data appendData:[@"\r\n" dataUsingEncoding:_AFNetworkFormEncoding]];

	return data;
}

static NSString * _AFNetworkMultipartDocumentGenerateMultipartBoundaryWithHeaderAndFooter(NSData **multipartHeaderRef, NSData **multipartFooterRef) {
	NSString *multipartBoundary = [[NSProcessInfo processInfo] globallyUniqueString];
	multipartBoundary = [multipartBoundary stringByReplacingOccurrencesOfString:@"-" withString:@""];

	*multipartHeaderRef = [[NSString stringWithFormat:@"--%@\r\n", multipartBoundary] dataUsingEncoding:_AFNetworkFormEncoding];
	*multipartFooterRef = [[NSString stringWithFormat:@"--%@--\r\n", multipartBoundary] dataUsingEncoding:_AFNetworkFormEncoding];

	return multipartBoundary;
}

#pragma mark -

@interface _AFNetworkDocumentPart : NSObject

@property (readonly, copy) NSString *contentType;

- (NSArray *)documentPacketsWithMutableHeaders:(NSMutableDictionary *)headers frameLength:(NSUInteger *)frameLengthRef;

@end

@implementation _AFNetworkDocumentPart

@dynamic contentType;

- (NSArray *)documentPacketsWithMutableHeaders:(NSMutableDictionary *)headers frameLength:(NSUInteger *)frameLengthRef {
	[self doesNotRecognizeSelector:_cmd];
	return nil;
}

@end

@interface _AFNetworkFormDocumentDataFieldPart : _AFNetworkDocumentPart {
 @private
	NSData *_data;
	NSString *_contentType;
}

- (id)initWithData:(NSData *)data contentType:(NSString *)contentType;

@property (readonly, retain) NSData *data;

@end

@interface _AFNetworkFormDocumentDataFieldPart ()
@property (readwrite, copy) NSString *contentType;
@end

@implementation _AFNetworkFormDocumentDataFieldPart

@synthesize data=_data, contentType=_contentType;

- (id)initWithData:(NSData *)data contentType:(NSString *)contentType {
	self = [self init];
	if (self == nil) return nil;

	_data = [data retain];
	_contentType = [contentType copy];

	return self;
}

- (void)dealloc {
	[_data release];
	[_contentType release];

	[super dealloc];
}

- (NSArray *)documentPacketsWithMutableHeaders:(NSMutableDictionary *)headers frameLength:(NSUInteger *)frameLengthRef {
	NSString *MIMEType = [self contentType];
	MIMEType = (MIMEType ? : @"application/octet-stream");

	[headers addEntriesFromDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
									   @"binary", AFNetworkDocumentMIMEContentTransferEncoding,
									   MIMEType, AFNetworkDocumentMIMEContentType,
									   nil]
	 ];

	if (frameLengthRef != NULL) {
		*frameLengthRef = [[self data] length];
	}

	if ([self data] == nil) {
		return nil;
	}

	return [NSArray arrayWithObject:[[[AFNetworkPacketWrite alloc] initWithData:[self data]] autorelease]];
}

@end

static NSString *const _AFNetworkFormDocumentFileFieldPartLocationKey = @"location";

@interface _AFNetworkFormDocumentFileFieldPart : _AFNetworkDocumentPart {
 @private
	NSURL *_location;
	NSString *_contentType;
}

- (id)initWithLocation:(NSURL *)location contentType:(NSString *)contentType;

@property (readonly, copy) NSURL *location;
@property (readonly, copy) NSString *contentType;

@end

@implementation _AFNetworkFormDocumentFileFieldPart

@synthesize location=_location;

- (id)initWithLocation:(NSURL *)location contentType:(NSString *)contentType {
	self = [self init];
	if (self == nil) return nil;

	_location = [[location URLByResolvingSymlinksInPath] copy];
	_contentType = [contentType copy];

	return self;
}

- (void)dealloc {
	[_location release];
	[_contentType release];

	[super dealloc];
}

- (NSString *)contentType {
	if (_contentType != nil) {
		return _contentType;
	}

	NSString *defaultMIMEType = @"application/octet-stream";

	NSString *resourceType = nil;
	BOOL getMIMEType = [[self location] getResourceValue:&resourceType forKey:NSURLTypeIdentifierKey error:NULL];
	if (!getMIMEType) return defaultMIMEType;

	NSString *MIMEType = [NSMakeCollectable(UTTypeCopyPreferredTagWithClass((CFStringRef)resourceType, kUTTagClassMIMEType)) autorelease];
	if (MIMEType == nil) return defaultMIMEType;

	return MIMEType;
}

- (NSArray *)documentPacketsWithMutableHeaders:(NSMutableDictionary *)headers frameLength:(NSUInteger *)frameLengthRef {
	NSNumber *resourceLength = nil;
	BOOL getResourceLength = [[self location] getResourceValue:&resourceLength forKey:NSURLFileSizeKey error:NULL];
	if (!getResourceLength) return nil;

	[headers addEntriesFromDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
									   @"binary", AFNetworkDocumentMIMEContentTransferEncoding,
									   [self contentType], AFNetworkDocumentMIMEContentType,
									   nil]
	 ];

#if 1
	NSInputStream *readStream = [[[NSInputStream alloc] initWithURL:[self location]] autorelease];
	AFNetworkPacketWriteFromReadStream *filePacket = [[[AFNetworkPacketWriteFromReadStream alloc] initWithReadStream:readStream totalBytesToWrite:[resourceLength unsignedIntegerValue]] autorelease];
#else
	NSData *fileData = [NSData dataWithContentsOfURL:[self location]];
	AFPacketWrite *filePacket = [[[AFPacketWrite alloc] initWithData:fileData] autorelease];
#endif

	if (frameLengthRef != NULL) {
		*frameLengthRef = [resourceLength unsignedIntegerValue];
	}

	return [NSArray arrayWithObject:filePacket];
}

@end

#pragma mark -

@interface AFNetworkFormDocument ()
@property (readonly) NSMutableDictionary *values, *files;
@end

@implementation AFNetworkFormDocument

@synthesize values=_values, files=_files;

- (id)init {
	self = [super init];
	if (self == nil) return nil;

	_values = [[NSMutableDictionary alloc] init];
	_files = [[NSMutableDictionary alloc] init];

	return self;
}

- (void)dealloc {
	[_values release];
	[_files release];

	[super dealloc];
}

- (NSString *)valueForField:(NSString *)fieldname {
	return [[self values] objectForKey:fieldname];
}

- (void)setValue:(NSString *)value forField:(NSString *)fieldname {
	[[self values] setValue:value forKey:fieldname];
	[[self files] removeObjectForKey:fieldname];
}

- (NSSet *)fileLocationsForField:(NSString *)fieldname {
	return [[[[self files] objectForKey:fieldname] allValues] valueForKey:_AFNetworkFormDocumentFileFieldPartLocationKey];
}

- (void)addFileByReferencingURL:(NSURL *)location withFilename:(NSString *)filename toField:(NSString *)fieldname {
	NSParameterAssert([location isFileURL]);

	NSMutableDictionary *parts = [[self files] objectForKey:fieldname];
	if (parts == nil) {
		parts = [NSMutableDictionary dictionary];
		[[self files] setObject:parts forKey:fieldname];
	}

	_AFNetworkFormDocumentFileFieldPart *part = [[[_AFNetworkFormDocumentFileFieldPart alloc] initWithLocation:location contentType:nil] autorelease];

	if (filename == nil) filename = [location lastPathComponent];
	[parts setObject:part forKey:filename];

	[[self values] removeObjectForKey:fieldname];
}

- (void)_appendPart:(_AFNetworkDocumentPart *)part toCumulativePackets:(NSMutableArray *)cumulativePackets cumulativeFrameLength:(NSUInteger *)cumulativeFrameLengthRef withContentDisposition:(NSString *)contentDisposition {
	NSUInteger partFrameLength = 0;
	NSMutableArray *partPackets = [NSMutableArray array];

	NSUInteger currentValueFrameLength = 0;
	NSMutableDictionary *currentValueHeaders = [NSMutableDictionary dictionary];
	NSArray *currentValuePackets = [part documentPacketsWithMutableHeaders:currentValueHeaders frameLength:&currentValueFrameLength];

	[currentValueHeaders addEntriesFromDictionary:[NSDictionary	dictionaryWithObjectsAndKeys:
												   contentDisposition, AFNetworkDocumentMIMEContentDisposition,
												   nil]
	 ];

	NSData *currentValueHeadersData = _AFNetworkFormDocumentHeadersDataFromDictionary(currentValueHeaders);
	AFNetworkPacketWrite *currentValueHeadersPacket = [[[AFNetworkPacketWrite alloc] initWithData:currentValueHeadersData] autorelease];
	[partPackets addObject:currentValueHeadersPacket];
	partFrameLength += [currentValueHeadersData length];

	[partPackets addObjectsFromArray:currentValuePackets];
	partFrameLength += currentValueFrameLength;

	NSData *newLineData = [@"\r\n" dataUsingEncoding:_AFNetworkFormEncoding];
	AFNetworkPacketWrite *newLinePacket = [[[AFNetworkPacketWrite alloc] initWithData:newLineData] autorelease];
	[partPackets addObject:newLinePacket];
	partFrameLength += [newLineData length];

	[cumulativePackets addObjectsFromArray:partPackets];
	*cumulativeFrameLengthRef += partFrameLength;
}

- (NSArray *)serialisedPacketsWithContentType:(NSString **)contentTypeRef frameLength:(NSUInteger *)frameLengthRef {
	NSMutableArray *cumulativePackets = [NSMutableArray array];
	NSUInteger cumulativeFrameLength = 0;

	NSData *multipartHeader = nil, *multipartFooter = nil;
	NSString *multipartBoundary = _AFNetworkMultipartDocumentGenerateMultipartBoundaryWithHeaderAndFooter(&multipartHeader, &multipartFooter);

	for (NSString *currentFieldname in [self values]) {
		AFNetworkPacketWrite *headerPacket = [[[AFNetworkPacketWrite alloc] initWithData:multipartHeader] autorelease];
		[cumulativePackets addObject:headerPacket];
		cumulativeFrameLength += [multipartHeader length];

		NSString *currentValue = [[self values] objectForKey:currentFieldname];
		NSData *currentValueData = ([currentValue length] > 0 ? [currentValue dataUsingEncoding:_AFNetworkFormEncoding] : nil);
		NSString *currentValueContentType = [NSString stringWithFormat:@"text/plain; charset=%@", (id)CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(_AFNetworkFormEncoding))];
		_AFNetworkFormDocumentDataFieldPart *currentValuePart = [[[_AFNetworkFormDocumentDataFieldPart alloc] initWithData:currentValueData contentType:currentValueContentType] autorelease];

		NSString *contentDisposition = [NSString stringWithFormat:@"form-data; name=\"%@\"", currentFieldname];
		[self _appendPart:currentValuePart toCumulativePackets:cumulativePackets cumulativeFrameLength:&cumulativeFrameLength withContentDisposition:contentDisposition];
	}

	for (NSString *currentFieldname in [self files]) {
		AFNetworkPacketWrite *headerPacket = [[[AFNetworkPacketWrite alloc] initWithData:multipartHeader] autorelease];
		[cumulativePackets addObject:headerPacket];
		cumulativeFrameLength += [multipartHeader length];

		NSDictionary *currentLocations = [[self files] objectForKey:currentFieldname];

		if ([currentLocations count] == 1) {
			NSString *currentFilename = [[currentLocations allKeys] objectAtIndex:0];
			_AFNetworkFormDocumentFileFieldPart *currentValue = [[currentLocations allValues] objectAtIndex:0];

			NSString *contentDisposition = [NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", currentFieldname, currentFilename];
			[self _appendPart:currentValue toCumulativePackets:cumulativePackets cumulativeFrameLength:&cumulativeFrameLength withContentDisposition:contentDisposition];

			continue;
		}

		NSData *innerMultipartHeader = nil, *innerMultipartFooter = nil;
		NSString *innerMultipartBoundary = _AFNetworkMultipartDocumentGenerateMultipartBoundaryWithHeaderAndFooter(&innerMultipartHeader, &innerMultipartFooter);

		NSDictionary *innerDocumentHeaders = [NSDictionary dictionaryWithObjectsAndKeys:
											  [NSString stringWithFormat:@"multipart/mixed; boundary=%@", innerMultipartBoundary], AFNetworkDocumentMIMEContentType,
											  [NSString stringWithFormat:@"form-data; name=\"%@\"", currentFieldname], AFNetworkDocumentMIMEContentDisposition,
											  nil];
		NSData *innerDocumentHeadersData = _AFNetworkFormDocumentHeadersDataFromDictionary(innerDocumentHeaders);
		AFNetworkPacketWrite *innerDocumentHeadersPacket = [[[AFNetworkPacketWrite alloc] initWithData:innerDocumentHeadersData] autorelease];
		[cumulativePackets addObject:innerDocumentHeadersPacket];
		cumulativeFrameLength += [innerDocumentHeadersData length];

		for (NSString *currentFilename in currentLocations) {
			AFNetworkPacketWrite *innerHeaderPacket = [[[AFNetworkPacketWrite alloc] initWithData:innerMultipartHeader] autorelease];
			[cumulativePackets addObject:innerHeaderPacket];
			cumulativeFrameLength += [innerMultipartHeader length];

			_AFNetworkFormDocumentFileFieldPart *currentValue = [currentLocations objectForKey:currentFilename];
			NSString *contentDisposition = [NSString stringWithFormat:@"file; filename=\"%@\"", currentFilename];
			[self _appendPart:currentValue toCumulativePackets:cumulativePackets cumulativeFrameLength:&cumulativeFrameLength withContentDisposition:contentDisposition];
		}

		AFNetworkPacketWrite *innerFooterPacket = [[[AFNetworkPacketWrite alloc] initWithData:innerMultipartFooter] autorelease];
		[cumulativePackets addObject:innerFooterPacket];
		cumulativeFrameLength += [innerMultipartFooter length];
	}

	AFNetworkPacketWrite *footerPacket = [[[AFNetworkPacketWrite alloc] initWithData:multipartFooter] autorelease];
	[cumulativePackets addObject:footerPacket];
	cumulativeFrameLength += [multipartFooter length];

	if (contentTypeRef != NULL) {
		*contentTypeRef = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", multipartBoundary];
	}
	if (frameLengthRef != NULL) {
		*frameLengthRef = cumulativeFrameLength;
	}

	return cumulativePackets;
}

@end


text:
name: Bug report
about: Report a problem and help us fix it.
labels: "bug"
---

__Describe the Bug__

A clear and concise description of what the bug is.

__Steps to Reproduce__

Steps to reproduce the behavior:

1. do this
2. do that
3. now this happens

__Expected Behavior__

A clear and concise description of what you expected to happen.

__Environment__

Please complete the following information:

 - Browser: [e.g. IE 11, Chrome 69]
 - OS: [e.g. Windows 7]
 - Library version: [e.g. 5.0.0]


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Cohn, Krypt. -Fl. Schlesien (Breslau) 3. 2(4): 489 (1897)

#### Original name
Ramularia phyteumatis Sacc. & G. Winter

### Remarks
null


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<title>R: Classes with Reference Semantics</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />

 Classes with Reference Semantics

Documentation for package ‘R6’ version 2.2.0

DESCRIPTION file.

User guides, package vignettes and other documentation.

Help Pages

as.list.R6
Create a list from an R6 object

is.R6
Is an object an R6 Class Generator or Object?

is.R6Class
Is an object an R6 Class Generator or Object?

R6
Create an R6 reference object generator

R6Class
Create an R6 reference object generator


text:
import { Emitter, Event } from 'vs/base/common/event';
import { Disposable, markAsSingleton } from 'vs/base/common/lifecycle';

class WindowManager {

	public static readonly INSTANCE = new WindowManager();

	// --- Zoom Level
	private _zoomLevel: number = 0;

	public getZoomLevel(): number {
		return this._zoomLevel;
	}
	public setZoomLevel(zoomLevel: number, isTrusted: boolean): void {
		if (this._zoomLevel === zoomLevel) {
			return;
		}
		this._zoomLevel = zoomLevel;
	}

	// --- Zoom Factor
	private _zoomFactor: number = 1;

	public getZoomFactor(): number {
		return this._zoomFactor;
	}
	public setZoomFactor(zoomFactor: number): void {
		this._zoomFactor = zoomFactor;
	}

	// --- Fullscreen
	private _fullscreen: boolean = false;
	private readonly _onDidChangeFullscreen = new Emitter<void>();

	public readonly onDidChangeFullscreen: Event<void> = this._onDidChangeFullscreen.event;
	public setFullscreen(fullscreen: boolean): void {
		if (this._fullscreen === fullscreen) {
			return;
		}

		this._fullscreen = fullscreen;
		this._onDidChangeFullscreen.fire();
	}
	public isFullscreen(): boolean {
		return this._fullscreen;
	}
}

/**
 * See https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio#monitoring_screen_resolution_or_zoom_level_changes
 */
class DevicePixelRatioMonitor extends Disposable {

	private readonly _onDidChange = this._register(new Emitter<void>());
	public readonly onDidChange = this._onDidChange.event;

	private readonly _listener: () => void;
	private _mediaQueryList: MediaQueryList | null;

	constructor() {
		super();

		this._listener = () => this._handleChange(true);
		this._mediaQueryList = null;
		this._handleChange(false);
	}

	private _handleChange(fireEvent: boolean): void {
		this._mediaQueryList?.removeEventListener('change', this._listener);

		this._mediaQueryList = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
		this._mediaQueryList.addEventListener('change', this._listener);

		if (fireEvent) {
			this._onDidChange.fire();
		}
	}
}

class PixelRatioImpl extends Disposable {

	private readonly _onDidChange = this._register(new Emitter<number>());
	public readonly onDidChange = this._onDidChange.event;

	private _value: number;

	public get value(): number {
		return this._value;
	}

	constructor() {
		super();

		this._value = this._getPixelRatio();

		const dprMonitor = this._register(new DevicePixelRatioMonitor());
		this._register(dprMonitor.onDidChange(() => {
			this._value = this._getPixelRatio();
			this._onDidChange.fire(this._value);
		}));
	}

	private _getPixelRatio(): number {
		const ctx: any = document.createElement('canvas').getContext('2d');
		const dpr = window.devicePixelRatio || 1;
		const bsr = ctx.webkitBackingStorePixelRatio ||
			ctx.mozBackingStorePixelRatio ||
			ctx.msBackingStorePixelRatio ||
			ctx.oBackingStorePixelRatio ||
			ctx.backingStorePixelRatio || 1;
		return dpr / bsr;
	}
}

class PixelRatioFacade {

	private _pixelRatioMonitor: PixelRatioImpl | null = null;
	private _getOrCreatePixelRatioMonitor(): PixelRatioImpl {
		if (!this._pixelRatioMonitor) {
			this._pixelRatioMonitor = markAsSingleton(new PixelRatioImpl());
		}
		return this._pixelRatioMonitor;
	}

	/**
	 * Get the current value.
	 */
	public get value(): number {
		return this._getOrCreatePixelRatioMonitor().value;
	}

	/**
	 * Listen for changes.
	 */
	public get onDidChange(): Event<number> {
		return this._getOrCreatePixelRatioMonitor().onDidChange;
	}
}

export function addMatchMediaChangeListener(query: string | MediaQueryList, callback: (this: MediaQueryList, ev: MediaQueryListEvent) => any): void {
	if (typeof query === 'string') {
		query = window.matchMedia(query);
	}
	query.addEventListener('change', callback);
}

/**
 * Returns the pixel ratio.
 *
 * This is useful for rendering <canvas> elements at native screen resolution or for being used as
 * a cache key when storing font measurements. Fonts might render differently depending on resolution
 * and any measurements need to be discarded for example when a window is moved from a monitor to another.
 */
export const PixelRatio = new PixelRatioFacade();

/** A zoom index, e.g. 1, 2, 3 */
export function setZoomLevel(zoomLevel: number, isTrusted: boolean): void {
	WindowManager.INSTANCE.setZoomLevel(zoomLevel, isTrusted);
}
export function getZoomLevel(): number {
	return WindowManager.INSTANCE.getZoomLevel();
}

/** The zoom scale for an index, e.g. 1, 1.2, 1.4 */
export function getZoomFactor(): number {
	return WindowManager.INSTANCE.getZoomFactor();
}
export function setZoomFactor(zoomFactor: number): void {
	WindowManager.INSTANCE.setZoomFactor(zoomFactor);
}

export function setFullscreen(fullscreen: boolean): void {
	WindowManager.INSTANCE.setFullscreen(fullscreen);
}
export function isFullscreen(): boolean {
	return WindowManager.INSTANCE.isFullscreen();
}
export const onDidChangeFullscreen = WindowManager.INSTANCE.onDidChangeFullscreen;

const userAgent = navigator.userAgent;

export const isFirefox = (userAgent.indexOf('Firefox') >= 0);
export const isWebKit = (userAgent.indexOf('AppleWebKit') >= 0);
export const isChrome = (userAgent.indexOf('Chrome') >= 0);
export const isSafari = (!isChrome && (userAgent.indexOf('Safari') >= 0));
export const isWebkitWebView = (!isChrome && !isSafari && isWebKit);
export const isElectron = (userAgent.indexOf('Electron/') >= 0);
export const isAndroid = (userAgent.indexOf('Android') >= 0);

let standalone = false;
if (window.matchMedia) {
	const standaloneMatchMedia = window.matchMedia('(display-mode: standalone) or (display-mode: window-controls-overlay)');
	const fullScreenMatchMedia = window.matchMedia('(display-mode: fullscreen)');
	standalone = standaloneMatchMedia.matches;
	addMatchMediaChangeListener(standaloneMatchMedia, ({ matches }) => {
		// entering fullscreen would change standaloneMatchMedia.matches to false
		// if standalone is true (running as PWA) and entering fullscreen, skip this change
		if (standalone && fullScreenMatchMedia.matches) {
			return;
		}
		// otherwise update standalone (browser to PWA or PWA to browser)
		standalone = matches;
	});
}
export function isStandalone(): boolean {
	return standalone;
}

export function isWCOVisible(): boolean {
	return (navigator as any)?.windowControlsOverlay?.visible;
}


text:
import { Directive, ElementRef, OnInit } from '@angular/core';
declare var jQuery: any;

@Directive ({
  selector: '[widget]'
})

export class Widget implements OnInit {
  $el: any;

  constructor(el: ElementRef) {
    this.$el = jQuery(el.nativeElement);
    jQuery.fn.widgster.Constructor.DEFAULTS.bodySelector = '.widget-body';

    /*
     When widget is closed remove its parent if it is .col-*
     */
    jQuery(document).on('close.widgster', (e) => {
      let $colWrap = jQuery(e.target)
        .closest('.content > .row > [class*="col-"]:not(.widget-container)');

      // remove colWrap only if there are no more widgets inside
      if (!$colWrap.find('.widget').not(e.target).length) {
        $colWrap.remove();
      }
    });
  }

  ngOnInit(): void {
    this.$el.widgster();
  }
}


text:
using Sogeti.Provisioning.Business.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sogeti.Provisioning.DataAccess.Repositories;
using Sogeti.Provisioning.Domain;

namespace Sogeti.Provisioning.Business.Services
{
    public class NotificationService : INotificationService
    {
        public IEnumerable<NotificationEntity> GetAllNotifications()
        {
            var notifications = new NotificationTable();
            return notifications.GetAllActionProcesCloudServices();
        }

        public void SendNotification(ProgressState request)
        {
            var notifications = new NotificationTable();
            notifications.AddNotificationToTable(request);
        }
    }
}


text:
namespace CGAL {
namespace Kinetic {

/*!
\ingroup PkgKdsFrameworkOtherClasses

The class `Kinetic::Active_objects_listener` acts as an intermediate between a moving object
table and a KDS. It translates the
`ActiveObjectsTable::Listener::IS_EDITING` notification events into
appropriate calls to `KDS::insert(Key)`, `KDS::set(Key)`,
`KDS::erase(Key)`.

Kinetic data structures can still take advantage of the batch editing
if they are careful. The methods (such as `KDS::set(Key)` are
called in lexicographical order in the `Key`s. So, when a KDS is
preparing to update some certificate involving a recently set object,
it can first check if the certificate involves another changed object
which is lexicographically prior. If so, then the certificate has
already been updated and can be skipped.

\sa `Kinetic::Active_objects_vector<MovingObject>`
\sa `Kinetic::ActiveObjectsTable`

*/
template< typename ActiveObjectsTable, typename KDS >
class Active_objects_listener {
}; /* end Kinetic::Active_objects_listener */

/*!
\ingroup PkgKdsFrameworkOtherClasses

The class `Kinetic::Simulator_listener` acts as a helper class for kinetic data
structures which want to respond to
`Simulator::Listener::HAS_AUDIT_TIME` notifications. When kinetic
data structures can audit themselves, the `Kinetic::Simulator_listener` calls the
`audit()` method on the kinetic data structure.

\sa `Kinetic::Simulator`
\sa `Listener<Interface>`

*/
template< typename Listener, typename KDS >
class Simulator_listener {
public:

/// \name Creation
/// @{

/*!
default constructor.
*/
Simulator_listener(Simulator::Handle, KDS *kds);

/// @}

}; /* end Kinetic::Simulator_listener */
} /* end namespace Kinetic */
} /* end namespace CGAL */


text:
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.device.geolocation;

import android.content.Context;

import org.chromium.base.ThreadUtils;
import org.chromium.base.VisibleForTesting;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.MainDex;

import java.util.concurrent.FutureTask;

/**
 * Implements the Java side of LocationProviderAndroid.
 * Delegates all real functionality to the implementation
 * returned from LocationProviderFactory.
 * See detailed documentation on
 * content/browser/geolocation/location_api_adapter_android.h.
 * Based on android.webkit.GeolocationService.java
 */
@MainDex
@VisibleForTesting
public class LocationProviderAdapter {

    // Delegate handling the real work in the main thread.
    private LocationProviderFactory.LocationProvider mImpl;

    private LocationProviderAdapter(Context context) {
        mImpl = LocationProviderFactory.get(context);
    }

    @CalledByNative
    public static LocationProviderAdapter create(Context context) {
        return new LocationProviderAdapter(context);
    }

    /**
     * Start listening for location updates until we're told to quit. May be called in any thread.
     * @param enableHighAccuracy Whether or not to enable high accuracy location providers.
     */
    @CalledByNative
    public boolean start(final boolean enableHighAccuracy) {
        FutureTask<Void> task = new FutureTask<Void>(new Runnable() {
            @Override
            public void run() {
                mImpl.start(enableHighAccuracy);
            }
        }, null);
        ThreadUtils.runOnUiThread(task);
        return true;
    }

    /**
     * Stop listening for location updates. May be called in any thread.
     */
    @CalledByNative
    public void stop() {
        FutureTask<Void> task = new FutureTask<Void>(new Runnable() {
            @Override
            public void run() {
                mImpl.stop();
            }
        }, null);
        ThreadUtils.runOnUiThread(task);
    }

    /**
     * Returns true if we are currently listening for location updates, false if not.
     * Must be called only in the UI thread.
     */
    public boolean isRunning() {
        assert ThreadUtils.runningOnUiThread();
        return mImpl.isRunning();
    }

    public static void newLocationAvailable(double latitude, double longitude, double timestamp,
            boolean hasAltitude, double altitude,
            boolean hasAccuracy, double accuracy,
            boolean hasHeading, double heading,
            boolean hasSpeed, double speed) {
        nativeNewLocationAvailable(latitude, longitude, timestamp, hasAltitude, altitude,
                hasAccuracy, accuracy, hasHeading, heading, hasSpeed, speed);
    }

    public static void newErrorAvailable(String message) {
        nativeNewErrorAvailable(message);
    }

    // Native functions
    private static native void nativeNewLocationAvailable(
            double latitude, double longitude, double timeStamp,
            boolean hasAltitude, double altitude,
            boolean hasAccuracy, double accuracy,
            boolean hasHeading, double heading,
            boolean hasSpeed, double speed);
    private static native void nativeNewErrorAvailable(String message);
}


text:
package resources

import "github.com/projecteru2/core/types"

// NodeCapacityInfo .
type NodeCapacityInfo struct {
	NodeName string
	Capacity int

	// Usage current resource usage
	Usage float64
	// Rate proportion of requested resources to total
	Rate float64

	// Weight used for weighted average
	Weight float64
}

type NodeResourceInfo struct {
	Capacity types.NodeResourceArgs `json:"capacity" mapstructure:"capacity"`
	Usage    types.NodeResourceArgs `json:"usage" mapstructure:"usage"`
}

// GetNodesDeployCapacityRequest .
type GetNodesDeployCapacityRequest struct {
	NodeNames    []string                   `json:"nodenames" mapstructure:"nodenames"`
	ResourceOpts types.WorkloadResourceOpts `json:"resource_opts" mapstructure:"resource_opts"`
}

// GetNodesDeployCapacityResponse .
type GetNodesDeployCapacityResponse struct {
	Nodes map[string]*NodeCapacityInfo `json:"nodes" mapstructure:"nodes"`
	Total int                          `json:"total" mapstructure:"total"`
}

// GetNodeResourceInfoRequest .
type GetNodeResourceInfoRequest struct {
	NodeName    string                                `json:"nodename" mapstructure:"nodename"`
	WorkloadMap map[string]types.WorkloadResourceArgs `json:"workload_map" mapstructure:"workload_map"`
	Fix         bool                                  `json:"fix" mapstructure:"fix"`
}

// GetNodeResourceInfoResponse ,
type GetNodeResourceInfoResponse struct {
	ResourceInfo *NodeResourceInfo `json:"resource_info" mapstructure:"resource_info"`
	Diffs        []string          `json:"diffs" mapstructure:"diffs"`
}

// SetNodeResourceInfoRequest .
type SetNodeResourceInfoRequest struct {
	NodeName string                 `json:"node" mapstructure:"node"`
	Capacity types.NodeResourceArgs `json:"capacity" mapstructure:"capacity"`
	Usage    types.NodeResourceArgs `json:"usage" mapstructure:"usage"`
}

// SetNodeResourceInfoResponse .
type SetNodeResourceInfoResponse struct{}

// GetDeployArgsRequest .
type GetDeployArgsRequest struct {
	NodeName     string                     `json:"nodename" mapstructure:"nodename"`
	DeployCount  int                        `json:"deploy_count" mapstructure:"deploy_count"`
	ResourceOpts types.WorkloadResourceOpts `json:"resource_opts" mapstructure:"resource_opts"`
}

// GetDeployArgsResponse .
type GetDeployArgsResponse struct {
	EngineArgs   []types.EngineArgs           `json:"engine_args" mapstructure:"engine_args"`
	ResourceArgs []types.WorkloadResourceArgs `json:"resource_args" mapstructure:"resource_args"`
}

// GetReallocArgsRequest .
type GetReallocArgsRequest struct {
	NodeName     string                     `json:"nodename" mapstructure:"nodename"`
	Old          types.WorkloadResourceArgs `json:"old" mapstructure:"old"`
	ResourceOpts types.WorkloadResourceOpts `json:"resource_opts" mapstructure:"resource_opts"`
}

// GetReallocArgsResponse .
type GetReallocArgsResponse struct {
	EngineArgs   types.EngineArgs           `json:"engine_args" mapstructure:"engine_args"`
	Delta        types.WorkloadResourceArgs `json:"delta" mapstructure:"delta"`
	ResourceArgs types.WorkloadResourceArgs `json:"resource_args" mapstructure:"resource_args"`
}

// GetRemapArgsRequest .
type GetRemapArgsRequest struct {
	NodeName    string                                `json:"nodename" mapstructure:"nodename"`
	WorkloadMap map[string]types.WorkloadResourceArgs `json:"workload_map" mapstructure:"workload_map"`
}

// GetRemapArgsResponse .
type GetRemapArgsResponse struct {
	EngineArgsMap map[string]types.EngineArgs `json:"engine_args_map" mapstructure:"engine_args_map"`
}

// SetNodeResourceUsageRequest .
type SetNodeResourceUsageRequest struct {
	NodeName             string                       `json:"nodename" mapstructure:"nodename"`
	WorkloadResourceArgs []types.WorkloadResourceArgs `json:"workload_resource_args" mapstructure:"workload_resource_args"`
	NodeResourceOpts     types.NodeResourceOpts       `json:"node_resource_opts" mapstructure:"node_resource_opts"`
	NodeResourceArgs     types.NodeResourceArgs       `json:"node_resource_args" mapstructure:"node_resource_args"`
	Delta                bool                         `json:"delta" mapstructure:"delta"`
	Decr                 bool                         `json:"decr" mapstructure:"decr"`
}

// SetNodeResourceUsageResponse .
type SetNodeResourceUsageResponse struct {
	Before types.NodeResourceArgs `json:"before" mapstructure:"before"`
	After  types.NodeResourceArgs `json:"after" mapstructure:"after"`
}

// SetNodeResourceCapacityRequest .
type SetNodeResourceCapacityRequest struct {
	NodeName         string                 `json:"nodename" mapstructure:"nodename"`
	NodeResourceOpts types.NodeResourceOpts `json:"node_resource_opts" mapstructure:"node_resource_opts"`
	NodeResourceArgs types.NodeResourceArgs `json:"node_resource_args" mapstructure:"node_resource_args"`
	Delta            bool                   `json:"delta" mapstructure:"delta"`
	Decr             bool                   `json:"decr" mapstructure:"decr"`
}

// SetNodeResourceCapacityResponse .
type SetNodeResourceCapacityResponse struct {
	Before types.NodeResourceArgs `json:"before" mapstructure:"before"`
	After  types.NodeResourceArgs `json:"after" mapstructure:"after"`
}

// AddNodeRequest .
type AddNodeRequest struct {
	NodeName     string                 `json:"nodename" mapstructure:"nodename"`
	ResourceOpts types.NodeResourceOpts `json:"resource_opts" mapstructure:"resource_opts"`
}

// AddNodeResponse .
type AddNodeResponse struct {
	Capacity types.NodeResourceArgs `json:"capacity" mapstructure:"capacity"`
	Usage    types.NodeResourceArgs `json:"usage" mapstructure:"usage"`
}

// RemoveNodeRequest .
type RemoveNodeRequest struct {
	NodeName string `json:"nodename" mapstructure:"nodename"`
}

// RemoveNodeResponse .
type RemoveNodeResponse struct{}

// GetMostIdleNodeRequest .
type GetMostIdleNodeRequest struct {
	NodeNames []string `json:"nodenames" mapstructure:"nodenames"`
}

// GetMostIdleNodeResponse .
type GetMostIdleNodeResponse struct {
	NodeName string `json:"nodename"`
	Priority int    `json:"priority"`
}

// GetMetricsDescriptionRequest .
type GetMetricsDescriptionRequest struct{}

// MetricsDescription .
type MetricsDescription struct {
	Name   string   `json:"name" mapstructure:"name"`
	Help   string   `json:"help" mapstructure:"help"`
	Type   string   `json:"type" mapstructure:"type"`
	Labels []string `json:"labels" mapstructure:"labels"`
}

// GetMetricsDescriptionResponse .
type GetMetricsDescriptionResponse []*MetricsDescription

// GetNodeMetricsRequest .
type GetNodeMetricsRequest struct {
	PodName  string                 `json:"podname" mapstructure:"podname"`
	NodeName string                 `json:"nodename" mapstructure:"nodename"`
	Capacity types.NodeResourceArgs `json:"capacity" mapstructure:"capacity"`
	Usage    types.NodeResourceArgs `json:"usage" mapstructure:"usage"`
}

// Metrics .
type Metrics struct {
	Name   string   `json:"name" mapstructure:"name"`
	Labels []string `json:"labels" mapstructure:"labels"`
	Key    string   `json:"key" mapstructure:"key"`
	Value  string   `json:"value" mapstructure:"value"`
}

// GetNodeMetricsResponse .
type GetNodeMetricsResponse []*Metrics


text:
// TODO: import and extend the class of the service-framework
// service-framework/dist/RuntimeCapabilities;

class RuntimeCapabilities {

  constructor(storageManager) {
    if (!storageManager) throw new Error('The Runtime Capabilities need the storageManager');

    this.storageManager = storageManager;
  }

  /**
   * Returns as a promise RuntimeCapabilities json object with all available capabilities of the runtime.
   * If it was not yet persisted in the Storage Manager it collects all required info from the platform and saves in the storage manager.
   * @returns {Promise<object>}
   */
  getRuntimeCapabilities() {

    return new Promise((resolve, reject) => {

      Promise.all([this._getEnvironment(), this._getMediaDevices()]).then((result) => {
        let capabilities = {};
        result.forEach((capability) => {
          Object.assign(capabilities, capability);
        });

        this.storageManager.set('capabilities', '1', capabilities);

        resolve(capabilities);
      }).catch((error) => {
        reject(error);
      });

    });

  }

  /**
   * returns as a promise a boolean according to available capabilities.
   * @returns {Promise<boolean>}
   */
  isAvailable(capability) {
    return new Promise((resolve) => {

      this.storageManager.get('capabilities').then((capabilities) => {

        console.log('[RuntimeCapabilities isAvailable?] ' + capability + ' is ', capabilities.hasOwnProperty(capability) && capabilities[capability]);
        if (capabilities.hasOwnProperty(capability) && capabilities[capability]) {
          resolve(true);
        } else {
          resolve(false);
        }
      });

    });
  }

  /**
   * it refreshes previously collected capabilities and updates the storage manager
   */
  update() {
    return new Promise((resolve, reject) => {
      this.getRuntimeCapabilities().then(resolve).catch(reject);
    });
  }

  // TODO: organize the code in separated files
  _getEnvironment() {

    // TODO: this should be more effective and check the environment
    return {
      browser: !!(window && navigator),
      windowSandbox: !!(window && navigator),
      node: !!!(window && navigator)
    };
  }

  // TODO: organize the code in separated files
  _getMediaDevices() {
    return new Promise((resolve) => {

      let capability = {};

      if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {
        console.log('enumerateDevices() not supported.');
        resolve(capability);
        return;
      }

      // List cameras and microphones.
      navigator.mediaDevices.enumerateDevices()
      .then((devices) => {
        devices.forEach((device) => {
          // console.log(device.kind, device.label, device.deviceId);
          if (device.kind === 'audioinput' && device.deviceId === 'default') {
            capability.mic = true;
          }

          if (device.kind === 'videoinput') {
            capability.camera = true;
          }
        });
        resolve(capability);
      })
      .catch((err) => {
        resolve(capability);
        console.log(err.name + ': ' + err.message);
      });
    });
  }

}

export default RuntimeCapabilities;


text:
package com.yuloran.demo.base;

import android.support.annotation.NonNull;

/**
 * Author & Date: Yuloran, 2017/9/10 19:47
 * Function:
 */

public interface IBaseView<T> {
    void show(@NonNull T t);
}


text:
using blink::WebDataSource;
using blink::WebElement;
using blink::WebFrameContentDumper;
using blink::WebLocalFrame;
using blink::WebNode;
using blink::WebString;
using content::SSLStatus;
using content::RenderFrame;

// Maximum number of characters in the document to index.
// Any text beyond this point will be clipped.
static const size_t kMaxIndexChars = 65535;

// Constants for UMA statistic collection.
static const char kTranslateCaptureText[] = "Translate.CaptureText";

// For a page that auto-refreshes, we still show the bubble, if
// the refresh delay is less than this value (in seconds).
static const double kLocationChangeIntervalInSeconds = 10;

namespace {

// If the source image is null or occupies less area than
// |thumbnail_min_area_pixels|, we return the image unmodified.  Otherwise, we
// scale down the image so that the width and height do not exceed
// |thumbnail_max_size_pixels|, preserving the original aspect ratio.
SkBitmap Downscale(const blink::WebImage& image,
                   int thumbnail_min_area_pixels,
                   const gfx::Size& thumbnail_max_size_pixels) {
  if (image.isNull())
    return SkBitmap();

  gfx::Size image_size = image.size();

  if (image_size.GetArea() < thumbnail_min_area_pixels)
    return image.getSkBitmap();

  if (image_size.width() <= thumbnail_max_size_pixels.width() &&
      image_size.height() <= thumbnail_max_size_pixels.height())
    return image.getSkBitmap();

  gfx::SizeF scaled_size = gfx::SizeF(image_size);

  if (scaled_size.width() > thumbnail_max_size_pixels.width()) {
    scaled_size.Scale(thumbnail_max_size_pixels.width() / scaled_size.width());
  }

  if (scaled_size.height() > thumbnail_max_size_pixels.height()) {
    scaled_size.Scale(
        thumbnail_max_size_pixels.height() / scaled_size.height());
  }

  return skia::ImageOperations::Resize(image.getSkBitmap(),
                                       skia::ImageOperations::RESIZE_GOOD,
                                       static_cast<int>(scaled_size.width()),
                                       static_cast<int>(scaled_size.height()));
}

}  // namespace

ChromeRenderFrameObserver::ChromeRenderFrameObserver(
    content::RenderFrame* render_frame)
    : content::RenderFrameObserver(render_frame),
      translate_helper_(nullptr),
      phishing_classifier_(nullptr) {
  // Don't do anything for subframes.
  if (!render_frame->IsMainFrame())
    return;

  const base::CommandLine& command_line =
      *base::CommandLine::ForCurrentProcess();
  if (!command_line.HasSwitch(switches::kDisableClientSidePhishingDetection))
    OnSetClientSidePhishingDetection(true);
  translate_helper_ = new translate::TranslateHelper(
      render_frame, chrome::ISOLATED_WORLD_ID_TRANSLATE, 0,
      extensions::kExtensionScheme);
}

ChromeRenderFrameObserver::~ChromeRenderFrameObserver() {
}

bool ChromeRenderFrameObserver::OnMessageReceived(const IPC::Message& message) {
  // Filter only.
  bool handled = true;
  IPC_BEGIN_MESSAGE_MAP(ChromeRenderFrameObserver, message)
    IPC_MESSAGE_HANDLER(PrerenderMsg_SetIsPrerendering, OnSetIsPrerendering)
    IPC_MESSAGE_UNHANDLED(handled = false)
  IPC_END_MESSAGE_MAP()
  if (handled)
    return false;

  IPC_BEGIN_MESSAGE_MAP(ChromeRenderFrameObserver, message)
    IPC_MESSAGE_HANDLER(ChromeViewMsg_RequestReloadImageForContextNode,
                        OnRequestReloadImageForContextNode)
    IPC_MESSAGE_HANDLER(ChromeViewMsg_RequestThumbnailForContextNode,
                        OnRequestThumbnailForContextNode)
    IPC_MESSAGE_HANDLER(ChromeViewMsg_SetClientSidePhishingDetection,
                        OnSetClientSidePhishingDetection)
#if defined(ENABLE_PRINTING)
    IPC_MESSAGE_HANDLER(PrintMsg_PrintNodeUnderContextMenu,
                        OnPrintNodeUnderContextMenu)
#endif
    IPC_MESSAGE_HANDLER(ChromeViewMsg_AppBannerPromptRequest,
                        OnAppBannerPromptRequest)
    IPC_MESSAGE_UNHANDLED(handled = false)
  IPC_END_MESSAGE_MAP()

  return handled;
}

void ChromeRenderFrameObserver::OnSetIsPrerendering(bool is_prerendering) {
  if (is_prerendering) {
    // If the PrerenderHelper for this frame already exists, don't create it. It
    // can already be created for subframes during handling of
    // RenderFrameCreated, if the parent frame was prerendering at time of
    // subframe creation.
    if (prerender::PrerenderHelper::Get(render_frame()))
      return;

    // The PrerenderHelper will destroy itself either after recording histograms
    // or on destruction of the RenderView.
    new prerender::PrerenderHelper(render_frame());
  }
}

void ChromeRenderFrameObserver::OnRequestReloadImageForContextNode() {
  WebNode context_node = render_frame()->GetContextMenuNode();
  if (!context_node.isNull() && context_node.isElementNode() &&
      render_frame()->GetWebFrame()) {
    render_frame()->GetWebFrame()->reloadImage(context_node);
  }
}

void ChromeRenderFrameObserver::OnRequestThumbnailForContextNode(
    int thumbnail_min_area_pixels,
    const gfx::Size& thumbnail_max_size_pixels,
    int callback_id) {
  WebNode context_node = render_frame()->GetContextMenuNode();
  SkBitmap thumbnail;
  gfx::Size original_size;
  if (!context_node.isNull() && context_node.isElementNode()) {
    blink::WebImage image = context_node.to<WebElement>().imageContents();
    original_size = image.size();
    thumbnail = Downscale(image,
                          thumbnail_min_area_pixels,
                          thumbnail_max_size_pixels);
  }

  SkBitmap bitmap;
  if (thumbnail.colorType() == kN32_SkColorType)
    bitmap = thumbnail;
  else
    thumbnail.copyTo(&bitmap, kN32_SkColorType);

  std::string thumbnail_data;
  SkAutoLockPixels lock(bitmap);
  if (bitmap.getPixels()) {
    const int kDefaultQuality = 90;
    std::vector<unsigned char> data;
    if (gfx::JPEGCodec::Encode(
            reinterpret_cast<unsigned char*>(bitmap.getAddr32(0, 0)),
            gfx::JPEGCodec::FORMAT_SkBitmap, bitmap.width(), bitmap.height(),
            static_cast<int>(bitmap.rowBytes()), kDefaultQuality, &data))
      thumbnail_data = std::string(data.begin(), data.end());
  }

  Send(new ChromeViewHostMsg_RequestThumbnailForContextNode_ACK(
      routing_id(), thumbnail_data, original_size, callback_id));
}

void ChromeRenderFrameObserver::OnPrintNodeUnderContextMenu() {
#if defined(ENABLE_PRINTING)
  printing::PrintWebViewHelper* helper =
      printing::PrintWebViewHelper::Get(render_frame()->GetRenderView());
  if (helper)
    helper->PrintNode(render_frame()->GetContextMenuNode());
#endif
}

void ChromeRenderFrameObserver::OnSetClientSidePhishingDetection(
    bool enable_phishing_detection) {
#if defined(SAFE_BROWSING_CSD)
  phishing_classifier_ =
      enable_phishing_detection
          ? safe_browsing::PhishingClassifierDelegate::Create(render_frame(),
                                                              nullptr)
          : nullptr;
#endif
}

void ChromeRenderFrameObserver::DidFinishDocumentLoad() {
  // If the navigation is to a localhost URL (and the flag is set to
  // allow localhost SSL misconfigurations), print a warning to the
  // console telling the developer to check their SSL configuration
  // before going to production.
  bool allow_localhost = base::CommandLine::ForCurrentProcess()->HasSwitch(
      switches::kAllowInsecureLocalhost);
  WebDataSource* ds = render_frame()->GetWebFrame()->dataSource();

  if (allow_localhost) {
    SSLStatus ssl_status = render_frame()->GetRenderView()->GetSSLStatusOfFrame(
        render_frame()->GetWebFrame());
    bool is_cert_error = net::IsCertStatusError(ssl_status.cert_status) &&
                         !net::IsCertStatusMinorError(ssl_status.cert_status);
    bool is_localhost = net::IsLocalhost(GURL(ds->request().url()).host());

    if (is_cert_error && is_localhost) {
      render_frame()->GetWebFrame()->addMessageToConsole(
          blink::WebConsoleMessage(
              blink::WebConsoleMessage::LevelWarning,
              base::ASCIIToUTF16(
                  "This site does not have a valid SSL "
                  "certificate! Without SSL, your site's and "
                  "visitors' data is vulnerable to theft and "
                  "tampering. Get a valid SSL certificate before"
                  " releasing your website to the public.")));
    }
  }
}

void ChromeRenderFrameObserver::OnAppBannerPromptRequest(
    int request_id,
    const std::string& platform) {
  // App banner prompt requests are handled in the general chrome render frame
  // observer, not the AppBannerClient, as the AppBannerClient is created lazily
  // by blink and may not exist when the request is sent.
  blink::WebAppBannerPromptReply reply = blink::WebAppBannerPromptReply::None;
  blink::WebString web_platform(base::UTF8ToUTF16(platform));
  blink::WebVector<blink::WebString> web_platforms(&web_platform, 1);

  blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
  frame->willShowInstallBannerPrompt(request_id, web_platforms, &reply);

  // Extract the referrer header for this site according to its referrer policy.
  // Pass in an empty URL as the destination so that it is always treated
  // as a cross-origin request.
  std::string referrer = blink::WebSecurityPolicy::generateReferrerHeader(
      frame->document().referrerPolicy(), GURL(),
      frame->document().outgoingReferrer()).utf8();

  Send(new ChromeViewHostMsg_AppBannerPromptReply(
      routing_id(), request_id, reply, referrer));
}

void ChromeRenderFrameObserver::DidFinishLoad() {
  WebLocalFrame* frame = render_frame()->GetWebFrame();
  // Don't do anything for subframes.
  if (frame->parent())
    return;

  GURL osdd_url = frame->document().openSearchDescriptionURL();
  if (!osdd_url.is_empty()) {
    Send(new ChromeViewHostMsg_PageHasOSDD(
        routing_id(), frame->document().url(), osdd_url,
        search_provider::AUTODETECTED_PROVIDER));
  }

  // TODO(dglazkov): This is only necessary for ChromeRenderViewTests,
  // since they don't actually pump frames. These tests will need
  // to be rewritten eventually (there is no ChromeRenderView anymore).
  if (render_frame()->GetRenderView()->GetContentStateImmediately()) {
    CapturePageText(PRELIMINARY_CAPTURE);
  }
}

void ChromeRenderFrameObserver::DidStartProvisionalLoad() {
  // Let translate_helper do any preparatory work for loading a URL.
  if (!translate_helper_)
    return;

  translate_helper_->PrepareForUrl(
      render_frame()->GetWebFrame()->document().url());
}

void ChromeRenderFrameObserver::DidCommitProvisionalLoad(
    bool is_new_navigation,
    bool is_same_page_navigation) {
  WebLocalFrame* frame = render_frame()->GetWebFrame();

  // Don't do anything for subframes.
  if (frame->parent())
    return;

  base::debug::SetCrashKeyValue(
      crash_keys::kViewCount,
      base::SizeTToString(content::RenderView::GetRenderViewCount()));
}

void ChromeRenderFrameObserver::CapturePageText(TextCaptureType capture_type) {
  WebLocalFrame* frame = render_frame()->GetWebFrame();
  if (!frame)
    return;

  // Don't capture pages that have pending redirect or location change.
  if (frame->isNavigationScheduledWithin(kLocationChangeIntervalInSeconds))
    return;

  // Don't index/capture pages that are in view source mode.
  if (frame->isViewSourceModeEnabled())
    return;

  // Don't capture text of the error pages.
  WebDataSource* ds = frame->dataSource();
  if (ds && ds->hasUnreachableURL())
    return;

  // Don't index/capture pages that are being prerendered.
  if (prerender::PrerenderHelper::IsPrerendering(render_frame()))
    return;

  base::TimeTicks capture_begin_time = base::TimeTicks::Now();

  // Retrieve the frame's full text (up to kMaxIndexChars), and pass it to the
  // translate helper for language detection and possible translation.
  // TODO(dglazkov): WebFrameContentDumper should only be used for
  // testing purposes. See http://crbug.com/585164.
  base::string16 contents =
      WebFrameContentDumper::dumpFrameTreeAsText(frame, kMaxIndexChars);

  UMA_HISTOGRAM_TIMES(kTranslateCaptureText,
                      base::TimeTicks::Now() - capture_begin_time);

  // We should run language detection only once. Parsing finishes before
  // the page loads, so let's pick that timing.
  if (translate_helper_ && capture_type == PRELIMINARY_CAPTURE)
    translate_helper_->PageCaptured(contents);

  TRACE_EVENT0("renderer", "ChromeRenderFrameObserver::CapturePageText");

#if defined(SAFE_BROWSING_CSD)
  // Will swap out the string.
  if (phishing_classifier_)
    phishing_classifier_->PageCaptured(&contents,
                                       capture_type == PRELIMINARY_CAPTURE);
#endif
}

void ChromeRenderFrameObserver::DidMeaningfulLayout(
    blink::WebMeaningfulLayout layout_type) {
  switch (layout_type) {
    case blink::WebMeaningfulLayout::FinishedParsing:
      CapturePageText(PRELIMINARY_CAPTURE);
      break;
    case blink::WebMeaningfulLayout::FinishedLoading:
      CapturePageText(FINAL_CAPTURE);
      break;
    default:
      break;
  }
}


text:
<?php
/**
 * ALIPAY API: alipay.ecard.edu.balance.get request
 *
 * @author auto create
 * @since 1.0, 2014-06-12 17:16:45
 */
class AlipayEcardEduBalanceGetRequest
{
	/**
	 * 校园一卡通机构代码
	 **/
	private $agentCode;

	/**
	 * 支付宝userId
	 **/
	private $alipayUserId;

	/**
	 * 校园一卡通姓名
	 **/
	private $cardName;

	/**
	 * 校园一卡通卡号
	 **/
	private $cardNo;

	private $apiParas = array();
	private $terminalType;
	private $terminalInfo;
	private $prodCode;
	private $apiVersion="1.0";

	public function setAgentCode($agentCode)
	{
		$this->agentCode = $agentCode;
		$this->apiParas["agent_code"] = $agentCode;
	}

	public function getAgentCode()
	{
		return $this->agentCode;
	}

	public function setAlipayUserId($alipayUserId)
	{
		$this->alipayUserId = $alipayUserId;
		$this->apiParas["alipay_user_id"] = $alipayUserId;
	}

	public function getAlipayUserId()
	{
		return $this->alipayUserId;
	}

	public function setCardName($cardName)
	{
		$this->cardName = $cardName;
		$this->apiParas["card_name"] = $cardName;
	}

	public function getCardName()
	{
		return $this->cardName;
	}

	public function setCardNo($cardNo)
	{
		$this->cardNo = $cardNo;
		$this->apiParas["card_no"] = $cardNo;
	}

	public function getCardNo()
	{
		return $this->cardNo;
	}

	public function getApiMethodName()
	{
		return "alipay.ecard.edu.balance.get";
	}

	public function getApiParas()
	{
		return $this->apiParas;
	}

	public function getTerminalType()
	{
		return $this->terminalType;
	}

	public function setTerminalType($terminalType)
	{
		$this->terminalType = $terminalType;
	}

	public function getTerminalInfo()
	{
		return $this->terminalInfo;
	}

	public function setTerminalInfo($terminalInfo)
	{
		$this->terminalInfo = $terminalInfo;
	}

	public function getProdCode()
	{
		return $this->prodCode;
	}

	public function setProdCode($prodCode)
	{
		$this->prodCode = $prodCode;
	}

	public function setApiVersion($apiVersion)
	{
		$this->apiVersion=$apiVersion;
	}

	public function getApiVersion()
	{
		return $this->apiVersion;
	}

}