First Conference of the Parties to the Framework Convention on Climate Change
06-Apr-95 — original report
Dr. Helmut Kohl, Chancellor of the Federal Republic of Germany, urged delegates to remember the lessons of Berlin, noting that never again must 'walls of enmity' be erected between peoples, nations and States.
He stated that the Rio Conference provided a clear signal of hope, but the recent recession shows that sustainable development does not sufficiently determine the actions of States.
He stressed three central issues: industrialized country responsibility to limit CO2<D> emissions permanently beyond the year 2000; a negotiation mandate from this Conference for a noticeable reduction in greenhouse gas (GHG) emissions after 2000; and agreement on joint implementation to facilitate the transfer of know-how and technology.
Svend Auken, Minister for Environment and Energy, said that it is possible to stabilize and then reduce emissions without lowering the standard of living.
Denmark sees a 20% reduction by 2005 as a necessary and feasible target and endorsed the AOSIS protocol.
Minister of Energy and Mines Erwin Arrieta said progress should be carried out with minimal social and economic consequences, especially for developing countries.
Venezuela has supported a step-by-step approach to evaluate each step, not to delay adoption of appropriate measures.
Erhard Jauck, State Secretary, called upon the other Annex I Parties to commit themselves to stabilizing CO2<D> emissions, and cited Germany's goal of halving emission of GHGs, expressed in CO2 equivalents, by 2005.
He listed the elements necessary for a protocol and stressed the need for creating incentives for co-operation.
Maria Julia Alsogaray, Minister for the Environment, stated that all countries should design their policies with efficiency in mind.
She reiterated support for a joint implementation pilot phase.
John Faulkner, Minister for the Environment, Sport and Territories, called for a protocol mandate before leaving Berlin.
He acknowledged that Australia had not met the Convention's target.
But he noted that growth in its emission levels has slowed by 50% and promised to do more.
Sohei Miyashita, Director General of the Environment Agency and Minister in Charge of Global Environment, said developed countries must reduce emissions, create sinks and develop a global framework of cooperation that includes developing countries.
Delegates should agree to the next step toward new aims or targets in a protocol with the SBI initiating negotiations to be completed by COP-3.
Minister of the Interior Ruth Dreifuss said Annex I countries should redouble their efforts to reduce GHG emissions after 2000 to well below 1990 levels through a protocol whose negotiations should begin this summer and conclude by 1997.
She urged OECD countries and those about to join OECD to adopt the same goal as Annex I countries. INDONESIA: Sarwano Kusumaatmadja, Minister for the Environment, said commitments should be further strengthened for developed country Parties with preparation of elements for a protocol that reflects a global perspective, not perspectives of certain Parties.
Joint activities between developed and developing country Parties should be on a bilateral basis with no credits. SENEGAL: Mbaye Ndoye, Deputy Minister of the Environment and Nature Protection, appealed to Annex I Parties to put into effect the commitments they have undertaken, and added that the success of the Convention is subject to the will of those who have the means.
He stated that developing countries should have no new commitments, and supported JI.
John Gummer, Secretary of State for the Environment, said it is now time to examine the impact of high levels of subsidies and public ownership of utilities on climate change.
He added that the UK is a 'small island State' and vulnerable to sea level rise.
Timothy Wirth, Under-Secretary of State for Global Affairs, said the US is commited to reducing emissions to 1990 levels by the year 2000.
The objective at this Conference should be a mandate to negotiate an agreement by 1997.
Simon Upton, Minister for the Environment, called for a protocol containing commitments beyond the year 2000.
He noted that New Zealand's emissions will be 50% below 1990 levels in 2000.
A global economy demands global solutions, perhaps through economic initiatives such as tradeable emissions permits.
Angel C. Alcala, Secretary of the Environment and Natural Resources, on behalf of the G-77 and China, said that only Annex I Parties have obligations to limit emissions.
JI should only apply to Annex I Parties and there should be no credits during the pilot phase.
On behalf of the Philippines, he urged delegates to adopt the 'Green Paper.
Maitre S'Ghair Ould M'bareck, Minister of Rural Development and the Environment, noted that Mauritania suffers from desertification, which is one of the effects of climate variations.
Efforts are now underway to develop a more comprehensive national environmental strategy, but financial assistance is needed.
Win Aung said that the financial mechanism should assist developing countries to implement commitments under Article 4.1.
Myanmar will communicate to the Secretariat its inventory of emissions and sinks for all GHGs not covered by the Montreal Protocol.
Sheila Copps, Minister for the Environment, noted Canada's recent promise to cut emissions by 20% of 1990 levels by 2005.
She proposed 'technological twinning' between developed and developing countries.
Renji Sathiah voiced disappointment with some developed countries' unwillingness to set specific reduction targets.
He noted that AOSIS countries have twice taken the lead in setting targets, and that developed countries have not provided access to funding or technology transfer.
He deplored developed country attempts to shift responsibilities to developing countries.
Carlos Gay-Garcia, Coordinator, National Institute of Ecology, noted that the cause of climate change has been identified, and nations must take precautions.
While actions cannot run counter to development, Mexico will take the necessary measures.
Dr. Jose Israel Vargas, Minister of Science and Technology, called for an appropriate negotiating body to ensure credible and realistic commitments in a flexible manner.
All GHGs should be considered, as should the principle of common but differentiated responsibilities.
Johny Lahure, Minister for the Environment, said that commitments must be 'concretized' by a protocol that contains limitations, reductions and a binding calendar.
Luxembourg will achieve a 33% reduction of CO2<D> emissions by 2000.
Jose Borrell Fontelles, Minister for Public Works, Transport and the Environment, said Spain is curtailing CO2<D> emissions as part of its national climate programme.
He stressed the need for technology transfer to developing countries to avoid repetition of unsustainable growth models.
Bashir Khodabux, Minister of the Environment and Quality of Life, stated that the Convention's success depends on technology transfer, financial mechanisms and international cooperation.
It should not suppress the right to development.
He noted that the responsibility of the industrialized nations is inescapable, and spoke against shifting the burden to developing countries.
Anatole Tiendrebeogo, Minister of the Environment and Tourism, expressed faith in international solidarity and described his country's efforts on climate change.
Michel Barnier, Minister of the Environment, on behalf of the EU, said it is essential to complete negotiations by 1997 of a protocol to reduce GHG emissions beyond 2000.
He stressed the importance of the financial mechanism.
He said that France's national programme will be able to reduce GHG emissions to the 1990 level by 2000.
At the beginning of the afternoon Plenary, Amb.
Estrada, Chair of the COW, noted that the final round of the survey on the location of the Secretariat would take place at 3:00 pm.
Canada then took the floor to withdraw Toronto's candidacy to host the Permanent Secretariat.
After the final speaker of the day, Estrada announced that Parties participating in the informal survey had selected Bonn as the location of the Permanent Secretariat.
Switzerland expressed its regret and congratulated Germany.
Germany stated it was aware of the responsibility accompanying the choice, and thanked Estrada and the delegates.
The Executive-Secretary of the Interim Secretariat, Michael Zammit Cutajar, thanked Geneva for the hospitality extended since 1991.
Consultations on joint implementation met from Tuesday night until 6:30 am Wednesday morning.
With the exception of credits, there appeared to be agreement on most of the text that establishes a JI pilot phase.
On Wednesday, small groups of delegates met in the corridors, while trying to avoid video cameras, to forge a compromise.
By 7:30 pm, when one developed country delegation said that they were unable to take a final decision until Thursday morning, it became apparent that agreement on JI would have to wait.
Meanwhile, consultations on the adequacy of commitments continued.
Some participants commented that there has been 'progress' towards agreeing on a mandate to negotiate or consult on a protocol to be adopted by 1997.
The question that remained when the group adjourned at 10:00 pm was just how vague this mandate would be.
Minister of the Environment Torbjoern Berntsen said the COP's primary task is to launch a negotiation process to strengthen the Convention.
OECD countries could establish a system where reductions could be divided with equitable burden sharing to allow agreement on more substantial commitments.
Mrs. R. Bjerregaard, Commissioner for the Environment, cited a European Commission working paper showing cost-effective reduction potential.
She said political will, rather than technical or economic constraints, is preventing us from reaching our goal.
She called for a commitment to specific and binding targets in the short term.
Noureddine Kasdalli, Minister in Charge of Local Administration, Administrative Reform and the Environment, said implementation cannot obscure the right to development, common but differentiated responsibilities or sovereignty of developing countries over their resources.
Margaretha de Boer, Minister of the Environment, on behalf of some of the OECD States, described the new OECD/IEA climate technology initiative.
On behalf of the Netherlands, she called on governments to 'act decisively and act now.
' The Netherlands will reduce CO2<D> emissions by 3-5% below 1990 levels by 2000.
She announced the contribution of 200,000 Guilders for the organization of the January 1996 workshop on non-governmental inputs. POLAND: Stanislaw Zelichowski, Minister of Environmental Protection, Natural Resources and Forestry, said Poland will meet its current commitments under the Convention.
The global balance of the climate system worldwide cannot be maintained without the active involvement of the world community.
Commitments beyond 2000 are necessary.
Danilow Daniljan, Minister of the Environment and Natural Resources, said that a change in the system of values, social structures and interaction between countries is necessary to repair the environment.
There is an urgent need to acknowledge the countries with economies in transition whose reduction of GHG emissions is considerable.
Peter Tsiamlili said developed countries must take the lead, and that it is urgent to adopt the AOSIS protocol.
Failure of any programme amounts to existence versus extinction for the small island States.


The hash identifier for the DestinyInventoryBucketDefinition to which this item belongs. I should have named this "bucketHash", but too many things refer to it now. Sigh.
Mapped to DestinyInventoryBucketDefinition in the manifest.
The tooltip message to show, if any, when the item expires.
If the item expires while playing in an activity, we show a different message.
If the item expires in orbit, we show a... more different message. ("Consummate V's, consummate!")
If TRUE, this item is instanced. Otherwise, it is a generic item that merely has a quantity in a stack (like Glimmer).
The maximum quantity of this item that can exist in a stack.
If the item is picked up by the lost loot queue, this is the hash identifier for the DestinyInventoryBucketDefinition into which it will be placed. Again, I should have named this recoveryBucketHash instead.
Mapped to DestinyInventoryBucketDefinition in the manifest.
If this string is populated, you can't have more than one stack with this label in a given inventory. Note that this is different from the equipping block's unique label, which is used for equipping uniqueness.
The enumeration matching the tier type of the item to known values, again for convenience sake.
The hash identifier for the Tier Type of the item, use to look up its DestinyItemTierTypeDefinition if you need to show localized data for the item's tier.
Mapped to DestinyItemTierTypeDefinition in the manifest.
The localized name of the tier type, which is a useful shortcut so you don't have to look up the definition every time. However, it's mostly a holdover from days before we had a DestinyItemTierTypeDefinition to refer to.
If the item can exist in an inventory - the overwhelming majority of them can and do - then this is the basic properties regarding the item's relationship with the inventory.


Adam Leonard
Biography
Brief history of Adam.
code experience
C2S
Microsoft
Education
NSCC
Code Fellows


Table of Contents
- 1. Filter
- 1.1. What is filter
- 1.2. Type of Filter
- 1.3. Usage
- 1.4. Why not just do everything digitally
- 1.5. Aliasing and sampling
- 1.6. Filter performance
- 1.7. Active Vs. Passive filter
- 1.8. Roll-off
- 1.9. Filter approximation
- 1.10. Filter transfer function, poles and zeros
- 1.11. poles and zeros
- 1.12. Low-pass Filter
- 1.13. Low-pass Filter Standard Equation
- 1.14. Constructing Higher-Order Filters
- 1.15. Analogue signal chain
- 1.16. Digital signal chain
- 1.17. Filter Order
- 1.18. Filter Q-factor
- 1.19. Filter Phase response
- 1.20. Butterworth polynomial
- 1.21. Sallen-key Low-pass filter
- 1.22. Filter design table
- 1.23. Design a fourth order butterworth LPF
- 1.24. Frequency and Impedance Scaling
- 1.25. Convert a LPF to a HPF
- 2. Power supplies
- 2.1. Basics of power
- 2.2. Cause of Losses
- 2.3. Quantify time-varying voltage
- 2.4. RMS voltage and current
- 2.5. Expressing Voltage and currents
- 2.6. Transformers
- 2.7. Rectification
- 2.8. Quantify power supply effectiveness
- 2.9. Properties of Power Supplies
- 2.10. Linear vs. Switching power supples
- 2.11. Simple Series linear regulator
- 2.12. Series linear regulator operation
- 2.13. Simple shunt linear regulator
- 2.14. Switching convertor
- 3. Power supply - Regulator
- 4. Data Conversion
1 Filter
1.1 What is filter
Attenuate unwanted signal component Passes (or amplifiers) other parts of a signal Transition frequency ft
1.2 Type of Filter
Low-pass, High-pass, Band-pass, band-stop (notch filter) All-pass, flat amplitude response, but modifies phase.
1.3 Usage
- Communications Filter which are excluding carrier frequency
- Consumer audio tweeter, woofer Passive filter (high frequency component)
- Anti-aliasing, signal reconstruction
- Other instrumentation applications where noise/other signals need to be excluded
1.4 Why not just do everything digitally
digital filters, works very well, but computational intensive. Analogue input signals need to be anti-aliased first.
1.5 Aliasing and sampling
The sampled signals must not contain frequency higher than half the ADC sampling rate. Nyquist frequency.
1.6 Filter performance
Filter performance is never ideal. Getting ideal performance meaning trade off in other areas. More ideal performance leads to more complex design.
1.6.1 Evaluating filter performance
- Magnitude vs. frequency
- Ripple (stop-band and pass-band)
- -3dB (cutoff) frequency / bandwidth
- Q-factor
- Pass-band gain
- Stop-band rejection
- Phase/delay characteristics
- group delay or phase delay
1.6.2 3dB Frequency
Is the point at which the
- Power is halved
- Amplitude is reduced by \(1/\sqrt{2}\)
1.6.3 3dB Bandwidth
3dB Bandwidth is the frequency separation of the two -3dB points.
1.6.4 Q-factor
Specifies the 'sharpness' of the filter For band-pass the ratio of center frequency to -3dB bandwidth (f1 and f2)
\begin{align*} Q = \frac{f_{0}}{(f_{2}-f_{1})} \end{align*}1.6.5 Ripple
stop-band and pass-band
1.7 Active Vs. Passive filter
Passive filters: filters that are just using the passive components: resistors, capacitors, inductors.
- Poor performance with low impedance load Because these type of filter has no amplification.
- Poor low-f / good high-f performance
- Signal degrades with multiple stages.
1.7.1 Active filter
Include active elements: op-amps, transistors
- Good performance with low output impedance
- Good low-f / poor high-f performance
- amplify signal as well as filter (many stages ok)
1.8 Roll-off
for a basic RC filter, roll-off is -20dB/decade roll-off is after the corner frequency, or critical frequency, fc. The roll-off is generally steeper for more complex filter 'approximations'
1.9 Filter approximation
Butterworth Chebyyshev type 1 Chebyyshev type 2 Elliptic
1.10 Filter transfer function, poles and zeros
Filter transfer function T(s):
\begin{align*} T(s) = \frac{a_{M}s^{M}+a_{M-1}s^{M-1}+\cdots+ a_{0}}{s^{N}+b_{N-1}s^{N-1}+\cdots+ b_{0}} \end{align*}Degree of denominator is filter order For filter to be realisable, degree of numerator ≤ degree of denominator (M ≤ N) Coefficients are real numbers, can be factored
1.11 poles and zeros
- Numerator roots (z1, z2, etc) are transmission zeros
- Denominator roots (p1, p2, etc) are transmission poles or natural modes
- Each pole or zero can be real or complex
- If complex, must occur in conjugate pairs
In stop band, transmission must be small. Transmission zeros normally placed on jω axis at stop-band frequencies.
1.12 Low-pass Filter
- Multiplication of denominator terms with each other gives and nth-order polynomial
- n is the order of the filter
- Determines approximate roll-off of filter above fc, with -n⋅ 20 dB/decade
- Coefficients ai and bi determines pass-band performance
1.13 Low-pass Filter Standard Equation
The standard equation for a second-order LPF
\begin{align*} H_{LP} = \frac{K}{-(\frac{f}{f_{c}})^{2} + \frac{jf}{Qf_{c}} + 1} \end{align*}where fc is corner frequency, Q is Q-factor
- When f ≪ fc, reduces to K, so circuit pass signals multiplied by K.
- When f = fc, reduces to -jKQ, so circuit enhanced by factor Q, shifted by 90ˆ.
- When f ≫ fc, reduces to \(-K(\frac{f_{c}}{f})^{2}\), so circuit attenuated by square of frequency ratio, shifted by 180ˆ.
- With attenuation at high frequencies increasing by a power of 2, the formula describes a second-order LPF.
Single-stage second-order low-pass filter:
\begin{align*} A(s) = \frac{A_{0}}{1+a_{i}s+b_{i}s^{2}} \end{align*}For a first-order filter, coefficient b = 0, thus:
\begin{align*} A(s) = \frac{A_{0}}{1+a_{1}s} \end{align*}- often filter operate at unity gain (A0 = 1) to reduce demands on op-amps open-loop gain
- These are building blocks of higher-order filters
1.14 Constructing Higher-Order Filters
Cascade 1st and 2nd order filters. Even order, only second-order filters cascaded. Odd order, begin with first order filter Odd orders are rarely used.
1.15 Analogue signal chain
- Signals remain analogue throughout
The sensor could be an accelerometer
1.16 Digital signal chain
- input stages
- Interface amplifier amplifies the input signal
- Anti-alias Filter remove high frequency component
- Signal can now be digitally processed
- output stages
- Reconst. Filter DAC creates rapid transition between the samples
1.17 Filter Order
Higher order filter have a sharper response.
1.18 Filter Q-factor
A higher q-factor gives a sharper response, but introduce ripple
1.19 Filter Phase response
Phase goes through -90 degress at fc
1.20 Butterworth polynomial
Butterworth polynomial gives maximally flat response in passband and rolls off gently towards zero in the stopband Defined as:
\begin{align*} G(\omega) = \sqrt{\frac{1}{1+\omega^{2n}}} \end{align*}where n is the number of poles, ω is frequency. Alternatively:
\begin{align*} G(\omega) = \sqrt{\frac{1}{1+\frac{\omega{}}{\omega_{0}}^{2n}}} \end{align*}1.21 Sallen-key Low-pass filter
Simple RC low-pass filter with amplifier at the output
- Op amp in non-inverting configuration.
- Input of amplifier presents very high impedance to RB CB part of network
- Effectively isolates this section of network from load
- Second RC section from RA and CA
Full derivation to follow
\begin{align*} f_{c} = \frac{1}{2\pi\sqrt{R_{A}C_{A}R_{B}C_{B}}} \end{align*}- in most design, simplify by RA = RB = R, CA = CB = C.
Therefore corner frequency given by
\begin{align*} f_{c} = \frac{1}{2\pi RC} \end{align*}Closed-loop gain, Av is determined by R1 and R2
\begin{align*} A_{v} = 1+\frac{R_{1}}{R_{2}} \end{align*}- Effective starting point
- Components in Ω and F, giving an ω0 of 1 rad/s
Derivation
- Redraw the circuit with the amplifier replaces by a voltage source.
- Transfer function to obtain frequency response
H(jω) = \frac{v0}{vs}
- Apply KVL to the two mesh currents
- Av is gain of non-inverting amplifier
1.22 Filter design table
1.23 Design a fourth order butterworth LPF
- Design a four-pole low-pass Butterworth filter which has a 3dB corner frequency of 250Hz
The RC time constant of each section is
\begin{align*} RC = \frac{1}{2\pi(250Hz)} \approx 0.637ms \end{align*}- Assume capacitor value is 220nF; then resistor is 2.9kΩ
Gain of first stage is
\begin{align*} 1.152 = 1 + \frac{R_{1}}{R_{2}} \end{align*}- If R2 = 10kΩ then R1 is 1.52 kΩ
Gain of second stage is
\begin{align*} 2.235 = 1 + \frac{R_{1}}{10k\Omega} \end{align*}- so R1 is 12.4kΩ
1.24 Frequency and Impedance Scaling
- Impedance scaling: increase resistor sizes by factor, and decrease capacitor sizes by same factor (just the components connected to non-inverting terminal)
- This maintains the ω0, so need to modify this ⋯
- To shift ω0, decrease capacitor values by that amount
1.25 Convert a LPF to a HPF
- For Butterworth filter, simply sway filter R and C components
- This is due to fact all stages of Butterworth are designed for fc
- For other filter optimisations, have to re-visit equations (as designed for different frequency response on each stage)
2 Power supplies
2.1 Basics of power
- Electrical power is produced by
- Electromagnetic induction in generator
- Chemical reactions in batteries or fuel cells
- Photoeletric generation in solar cells/panels
- Some other effects (e.g. thermoeletric, piezoeletric…)
- Source may produce direct current (DC) or alternating current (AC) output, and voltage needs to be controlled.
- For use in electronic devices, usually require low-voltage DC.
- Power P is rate of generation, transfer, or dissipation of energy E P = \frac{dE}{dt}
- Voltage is work done (energy transferred) per unit quantity of electricity (charge, Q): V = \frac{dE}{dQ}
Current is the rate of flow of charge
\begin{align*} I = \frac{dQ}{dt} \end{align*}Combining these equations, instantaneous eletrical power is
\begin{align*} P = \frac{dE}{dt} = \frac{dE}{dQ}\frac{dQ}{dt} = IV \end{align*}
2.2 Cause of Losses
- Major cause of loss is resistance in power lines
- Ohmic loss is proportional to square of current flow (P = I2R)
- System efficiency can be enhanced by operating at a higher voltage, with reduce current flow.
- This is easy to do for AC, using a step-up transformer, but more difficult for DC.
- This is one reason why mains electricity is AC; also because traditional generation methods produced AC output
2.3 Quantify time-varying voltage
- Instantaneous value Voltage at any time instant
- Peak value Maximum voltage amplitude of signal
- Peak-to-peak value Voltage difference between positive and negative peaks
- Average value Mean value, or DC component of signal (integrate over a complete cycle, then divide by cycle length)
- Effective value: Root-mean-square value
2.4 RMS voltage and current
Effective voltage of time varying voltage v(t) or v(ω t) applied to resistor R, the instantaneous power dissipated in R is :
\begin{align*} p = vi = \frac{v^{2}}{R} \end{align*}Averag power dissipated Pav is :
\begin{align*} P_{AV} = \frac{1}{T}\int_{0}^{T} \end{align*}If VRMS is steady voltage value that would cause same power dissipation in R as varying voltage V:
\begin{align*} P_{AV} = \frac{V_{RMS}^{2}}{R} = \frac{1}{2\pi}\int_{0}^{2\pi}\frac{v^{2}(\omega t)}{R}d(\omega t) \end{align*}From which
\begin{align*} V_{RMS}= \sqrt{\frac{1}{2\pi}\int_{0}^{2\pi}v^{2}(\omega t)d(\omega t)} \end{align*}Sinusoidally-varying voltage may be expressed as: v = Vmsin(ω t) where Vm is amplitude, ω is angular frequency (= 2π f) Substituting for v in earlier equation for RMS
\begin{align*} V_{RMS}= \sqrt{\frac{1}{2\pi}\int_{0}^{2\pi}V_{m}^{2}\sin^{2}(\omega t)d(\omega t)} \end{align*}Using relationship
\begin{align*} V_{RMS}= \sqrt{\frac{V_{M}^{2}}{4\pi}\int_{0}^{2\pi}(1-\cos(2\omega t))d(\omega t)} \end{align*}2.5 Expressing Voltage and currents
- If a time-varying voltage (or current) is specified in volts (or amps) with no other description, it will normally be referring to the RMS value.
- Example: in the EU, mains voltage is 230V; this means an RMS value of 230V, so the power flow through a resistive load is equivalent to a DC voltage of 230V.
- So in the EU, the peak voltage is typically \(230\sqrt{2} = 325V\)
2.6 Transformers
- Used to convert between AC voltages
- Depends on number of turns on primary (NP) and secondary (NS) windings (or ratio a)
- Ideal transformer equation:
2.7 Rectification
Rectification is the process of converting AC to DC.
2.7.1 half-wave
- Single diode rectification.
- To reduce ripple, add capacitor parallel to load
- Ripple voltage Vr is maximum deviation in output
2.7.2 Full-wave
centre-tapped transformer
2.7.3 Bridge
No need for centre-tapped transformer require twice as many diodes, and current through each diode is halved.
2.7.4 Ripple
AC-DC power supplies generally aim to deliver a constant ouput voltage, so need to smooth the rectifier output Adding capacitrance (a filter) to the load reduces ripple. Voltage decay follows v0(t) = Vpe-t/RC t is the time since peak, Vp is voltage of peak
Approximation with triangle-wave, assume chargin of capacitor is instantaneous For periodic signal, voltage decay follows relationship vo(t) = Vpe-T/RC (T is period) Can approximate using Taylor series: \(exp(-x) = 1 - x +\) if x is small \(\exp(-x) \approx 1 - x\), therefore \(V_{C_{min}} = V_{p}(1-\frac{T}{RC})\) Hence if RC ≫ T, can approximate ripple to \(V_{r} \approx \frac{V_{P}T}{RC}\)
2.7.5 Controlling ripple
Example: how large must C1 be for a < 5% ripple with a 50Hz source? Assume \(V_{r} \approx \frac{V_{p}T}{RC}\) Using \(V_{r} \approx \frac{V_{p}T}{RC}\), to give \(V_{r}/V_{p} = 0.05\). C = T/0.05R Given T = 0.02 and R = 16kΩ. Therefore, \(C = 25\mu F\).
Larger C leads to smaller ripple; e.g. for 0.5% ripple, C = 250μ F For a lower load R, could increase C to limit ripple Need another strategy to limit ripple …
2.8 Quantify power supply effectiveness
- line regulation Measurement of the ability of a power supply to maintain a constant output despite changes in the input voltage.
- Normally expressed as a single value (e.g. 4mV) for a range of input voltages (e.g. 8V ≤ Vin ≤ 12V).
- Load regulation is a measure of the ability of a voltage regulator to maintain a constant output voltage despite changes in load current
- Normally expressed as a single value (e.g. 10mV) for a range of output currents (e.g. 5mA to 1.5A)
Ripple Rejection is the change in output voltage that results from a change in input voltage, units in dB.
\begin{align*} \text{Ripple rejection} = \frac{\Delta V_{IN}}{\Delta V_{OUT}} \end{align*}
2.9 Properties of Power Supplies
- Quiescent current The baseline or static current used by the device. This means that efficiency at low current outputs is very low
Efficiency is the proportion of power output vs. power input
\begin{align*} \text{Efficiency} = \frac{P_{OUT}}{P_{IN}} \end{align*}
2.10 Linear vs. Switching power supples
2.10.1 Linear
- Device operates in 'linear' region
- Simple: fewer components
- Inefficient: Power dissipated through resistor or transistor
- Stable: little ripple/Switching noise
- Step-down only: acts to regulate supply, cannot step-up or invert.
2.10.2 Switching
- Device operates as on/off switch Duty cycle
- Complex: inductor, diode, capacitor Inductor can be large
- Efficient: no intentional dissipation of energy
- Noisy: output will have switching transients
- Flexible: Can step up as well as down, and provide negative voltages.
2.11 Simple Series linear regulator
- Sample circuit: Detects any change in the output voltage (VOUT). Feedback output voltage
- Error detector: compares the ouput from the sample cirucit to the reference voltage. bipolar transistor and resistor
- Control element: Compensates for any change in output voltage by increasing/decreasing load current Op-amp
- Reference voltage Generally done with a diode and resistor
output Voltage
\begin{align*} V_{out} \approx (1+\frac{R_{2}}{R_{3}})V_{REF} \end{align*}2.12 Series linear regulator operation
Responds to ensure output voltage is steady Decrease the base voltage to maintain the output voltage.
2.13 Simple shunt linear regulator
A bit robust
- Sample circuit: detects any change in output voltage (VOUT)
- Error detector: Compares the output from the sample circuit to the reference voltage
- Control element: Compensates for any change in output voltage by increasing/decreasing load current
- Output voltage:
Maximum current supplied to load:
\begin{align*} I_{L(max)} = \frac{V_{in}}{R_{1}} \end{align*}- The circuit response to a decrease in Vin or in RL
2.14 Switching convertor
A converter with a control element that is operated as a switch, making it more efficient than a linear voltage regulator. Switching converters are used primarily in:
- high-power applications
- applications where efficiency is a primary concern
2.14.1 Continuous mode
- Current through inductor never falls to zero. Convertor is working at its maximum throughout rate, where the load current is high.
Switching frequency generally does not change, but duty cycle does
\begin{align*} V_{OUT} = (\frac{t_{on}}{T})V_{in} \end{align*}Again, switching frequency generally does not change
\begin{align*} V_{out} = \frac{V_{in}}{1-t_{on}/T} \end{align*}- The circuit action when Q1 is on
- The circuit action when Q1 is off The polarity of the inductor is switched, it will add to the input voltage.
When the closes switches, the inductor stores the energy, with positive polarity.
The circuit response to a decrease in Vout
2.14.2 Buck-boost inverting switching converter
- Allow voltage to be stepped up as well as down
- However, always 'inverts' the output, output opposite polarity to input
- Not a problem if power supply isolated from load
- The circuit action when Q1 is on
- The circuit action when Q1 is off
- When -Vout tries to decrease, ton decreases, causing VL to increase. This compensates for the attempted decrease in -Vout.
2.14.3 Buck-boost hybrid switching converter
- Alternative to the inverting Buck-boost converter
- A combination of a buck and boost converter
- Output is same polarity as input
- May use a single inductor and multiple switches
- Alternatively, may use multiple inductors but only one switch
3 Power supply - Regulator
Protect circuit against shorts
3.1 Zener Diode Regulators
For operation:
- Input voltage (Vs) must be greater than Vz
Current must be between IZmin and IZmax from KCL, minimum current:
\begin{align*} I_{Z_{min}} = \frac{V_{s} - V_{Z}}{R_{s}} \end{align*}If delivering constant output from variable supply (supply varies between Vsmin and Vsmax), needs to provide stable output Vz. Therefore minimum current must flow when Vs at minimum value:
\begin{align*} I_{Z_{min}} = \frac{V_{s_{min}} - V_{Z}}{R_{s}} \end{align*}Maximum current applied when supply is at maximum value
\begin{align*} I_{Z_{max}} = \frac{V_{s_{max}} - V_{Z}}{R_{s}} \end{align*}So size of Rs must ensure at least IZmin flows at Vsmin and no more than IZmax flows at Vsmax.
- In a real Zener, voltage across terminals varies with current
- Caused by voltage drop across internal series resistance
- A typical values of rZ may be 10-20Ω, voltage drop is added to VZ
We can analyse this circuit ob observe line regulation (sensitivity to Vs)
Applying KVL to input Vs = IZRs + IZrZ + VZ And KVL to the output
\begin{align*} v_{out} = I_{Z}r_{z} + V_{z} \end{align*}By substitution
\begin{align*} v_{out} &= \frac{r_{z}(V_{s} - V_{z})}{R_{s}+r_{Z}} + V_{Z} \\ v_{out} &= \frac{r_{z}V_{s}}{R_{s}+r_{Z}} - \frac{r_{z}V_{z}}{R_{s}+r_{Z}} + V_{Z} \end{align*}So line regulation can be calculated as \(\Delta v_{out}/\Delta V_{s}\):
\begin{align*} \frac{\Delta v_{out}}{\Delta V_{s}} = \frac{\Delta}{\Delta V_{s}}(\frac{r_{z}V_{s}}{R_{s}+r_{Z}} - \frac{r_{z}V_{z}}{R_{s}+r_{Z}} + V_{Z}) ＝ \frac{r_{z}}{R_{s}+r_{Z}} \end{align*}And since Rs ≫ rz:
\begin{align*} \frac{\Delta v_{out}}{\Delta V_{s}} = \frac{r_{Z}}{R_{s}} \end{align*}
Up to now, circuits considered have had no load, adding a load to the ouput, and applying KVL:
\begin{align*} V_{s} = (I_{z} + I_{L})R_{s}+V_{Z} \end{align*}For a given load current, required value of Rs given by Vsmin and IZmin: Rs = \frac{Vsmin-Vz}{IL+IZmin}
The regulator will only behave correctly if Zener diode current remains between IZmin and IZmax.
- Need to size components carefully
- Circuit is restricted in the range of load currents it can effectively regulate for.
- Can be difficult to cope with range of output impedance.
3.2 Transistor based series regulator
Assume Vz is constant, any change in Vo results in change in VBE. So, if Vo increases then VBE decreases to maintain balance (transistor conducts less heavily reduces load current)
Suitable value Rs given by:
\begin{align*} R_{s} = \frac{v_{in(min)} - V_{z}}{I_{Z(min)}+ I_{B}} \end{align*}As IB ≈ IL/β:
\begin{align*} R_{s} = \frac{v_{in(min)}-V_{z}}{I_{Z(min)}+I_{L}/\beta} \end{align*}As load current does not flow through Rs, can have much large value. So stability, given by
\begin{align*} \frac{\Delta v_{out}}{\Delta V_{s}} = \frac{r_{Z}}{R_{s}} \end{align*}is substantially improved.
3.3 Issue with Transistor-based Regulator
- Output voltage determines required value of VZ chosen
- Zener diodes with low temperature coefficients have Vz
- Need an effective way to provide a wider range of VO, unrestricted by VZ
- Substantial power loss through Rs, ideally want to minimise this (keep to IZmin)
- Feedback needs large loop gain: errors need to be responded to quickly
3.4 Op-amp based series regulator
- Amplifier output proportional to VZ - Vf
- If VO increases, Vf increases and amplifier output decreases
- Cause base voltage transistor to drop, conduct less
- Feedback stabilise output
- Op-amp is non-inverting amplifier with Vz input and Vf feedback
- Closed-loop gain is Acf = \frac{VO'}{VZ}= 1 + \frac{R1}{R2}
- Ignoring the base-emitter voltage V0 ≈ Vo' = (1 + \frac{R1}{R2})Vz
- output voltage can be varied from minimum of VZ to maximum value determined by resistor ratio and vin
- As op-amp has very high input impedance, Rs can purely be sized to deliver IZmin across expeceted range of vin.
3.5 Op-amp based Shunt regulator
- Same principle, but inputs on op-amp reversed
- This is because increas in VO leads to increase in Vf but needs to respond by increasing the base voltage to conduct more
- This causes more current to flow through R3 and hence a larger voltage drop across it
- Shunt regulator is less commonly used, but has one major advantage: will not damaged by short-circuit currents
- Short-circuit current limited to vin/R3. Assuming R3 is able to tolerate short-circuit current, no damage.
- However, there are modifications available for series regulator to provide current-limiting.
3.6 short-circuit protection
- Series linear regulator are susceptible to damage from short-circuit
- Under a short-circuit, the full input voltage appears across the transistor
- With a short-circuit on the output, Vf = 0, and VZ on non-inverting input of amplifier, this drives output high
- This causes transistor to conduct heavily … high current level may damage transistor (and potentially other parts of circuit e.g. rectifier diodes).
3.7 Current limiting
- To avoid damange from short-circuit, linear regulators include current limits on output
- The voltage across R3 is the base-emitter voltage for Q2
- When VBE2 reaches 0.7V, Q2 begins to conduct heavily.
- This causes current that would have flowed into base of Q1 to be diverted to collector of Q2
- This protects Q1 … Current through Q2 may reach as high as sourcing capability of op-amp (a few tens of mA)
- beyond IL(max) output voltage reduces to zero with a small additional increase in curent
Maximum short-circuit current is value required to produce 0.7V across R3
\begin{align*} I_{L(max)} = \frac{0.7}{R_{3}} \end{align*}
4 Data Conversion
4.1 DAC Performance Characteristics
- Resolution: The difference in output between each 'step', measured in mV. May also be expressed as the number of bits that are converted - i.e. the number of input bits
- Accuracy: A comparison of the actual output of a DAC with the expected output. It is expressed as a percentage of full-scale, or maximum, output voltage.
- Linearity: A linear error is a deviation from the ideal straight-line output of a DAC. A special case is an offset error, which is amount of output voltage when the input bits are all zeros
- Settling time: The time it takes a DAC to settle within ±\frac{1}{2} LSB of its final value when a change occurs in the input code. This may also be expressed as the update rate (the inverse of settling time)


We are a well-known international computer repair company. We are dedicated to make our customers happy. Your peace of mind is ours. Let us help you with your computer issues today.Our business was built on offering in-home and in-office computer and laptop repair services. While today’s customer appreciates the speed of online service, we’ll go to you for WiFi networks, home theater configuration and much more for better services.


China says Xi, Trump in continuous touch
BEIJING (Reuters) - Chinese President Xi Jinping and U.S. President Donald Trump have been in continuous touch through “various means”, China’s Foreign Ministry said on Monday, when asked when and where the two leaders might meet to ink a trade deal.
Trump on Friday suggested he could sign a long-awaited trade agreement with China in the farm state of Iowa, which has been hard hit by tariffs in a nearly 16-month trade war between the world’s largest economies.
Trump said on Friday evening that negotiations about a “phase one” agreement were going well and he hoped to sign the deal with Xi at a U.S. location when work on the agreement was completed.
China has so far not been drawn on when and where Xi may go to meet Trump, apart from saying it was “pure speculation” they could meet in the Chinese gambling hub of Macau.
Foreign Ministry spokesman Geng Shuang was equally taciturn on Monday.
“As for a meeting between the leaders of China and the United States, what I can say is that President Xi Jinping and President Trump have maintained continuous contact through various means,” he told a daily news briefing, without elaborating.
U.S. and Chinese negotiators have been racing to finalise a text of a ‘phase one’ agreement for Trump and Xi to sign this month, a process clouded by wrangling over U.S. demands for a timetable of Chinese purchases of U.S. farm products.
A critical date is Dec. 15, when new U.S. tariffs on Chinese imports such as laptops, toys and electronics are set to kick in. Both the United States and China have an interest in reaching a deal and averting those tariffs.


Contents
The purpose of this series of posts is to create a concise overview of important modelling concepts, and the intended audience is someone who has learned these concepts before, but would like a refresher on the most important bits (e.g. myself).
I. Motivation
Statistical learning involves building models to understand data.
Why estimate the function, f, that connects the input and output?
- Prediction:
- estimate output with a black box function to minimize the reducible error
- Inference:
- which predictors are associated with the response?
- what is the relationship between te response and each predictor?
- can the relationship between Y and each predictor be adequately summaried using linear equation?
How do we estimate f?
- Parametric Methods make an assumption about functional form (i.e. linear), then use training data to fit or train the model.
- Pro: Simplifies the problem down to estimating a set of parameters, and results are easily interpretable
- Con: The chosen model will likely not match the unknown form of f
- Non-parametric Methods do not make explicit assumptions about the functional form of f.
- Pro: Potential to accurately fit a wider range of possible shapes
- Con: Need a very large number of observations to obtain an accurate estimate.
What are the two types of statistical learning?
- Supervised learning has predictor measurements and associated response measurements.
- Unsupervised learning as observed measurements, but no associated response; often seek to understand relationships between variables or between observations.
- Note: semi-supervised learning is when there are a limited number of response observations, and these methods are outside the scope of this book)
How do we assess model accuracy?
- Bias-Variance Tradeoff
- The goal is to develop a model that balances inflexible methods with large bias/small variance and flexible methods with small bias/large variance:
- Regression: Mean squared error
- Classification: Error rate
where is an indicator variable that equals 1 if the prediction is incorrect and 0 if correct.
- Notes:
- The Bayes classifier on average minimizes the test error rate by assigning each observation to the most likely class, given its predictor values: .
- The Bayes decision boundary is the separating boundary between classes (note: K-nearest neighbors often gets very close to the optimal Bayes classifier).
- The Bayes error rate is the lowest possible test error rate:
II. Methods
Details will be covered in later posts.
- Regression: Predicting or explaining a continuous (quantitative) output
- Linear Regression with stepwise selection
- Ridge Regression
- Lasso
- Principle Components Regression
- Partial Least Squares
- Non-Linear Additive Models
- Classification: Predicting or explaining a categorical (qualitative) output
- Logistic Regression
- Linear Discriminant Analysis
- K-Nearest Neighbors
- Support Vector Machines
- Resampling Methods: Techniques that produce more accurate models
- Cross validation
- Bootstrap
- Tree-based Methods: Stratifying or segmenting the predcitor space into regions
- Bagging
- Boosting
- Random Forests
- Clustering: Grouping individuals according to observed characteristics
- Principle Components Analysis
- K-means Clustering
- Hierarchical Clustering


We want to hear from you
Web:
www.murach.com
Phone:
1-800-221-5528
Email:
<EMAIL_ADDRESS>We want to hear from you
Web:
www.murach.com
Phone:
1-800-221-5528
Email:
murachbooks@murach.com


Kanye West wants to build amphitheater on his Wyoming ranch
by The Associated PressCODY, Wyo. (AP) — Officials in Wyoming have received a building permit application from Kanye West for a proposed amphitheater on property owned by the rapper.
West recently announced that he plans to move the headquarters of his shoe and clothing company, Adidas Yeezy, to Cody.
He also wants to build a 70,000-square-foot (6,500-square-meter) amphitheater on his 4,000-acre (1,600-hectare) ranch.
The Cody Enterprise reports the Park County Planning and Zoning Commission plans to discuss the proposed “West Meditation Space Large Impact Structure” on Tuesday.
West has worked on or recorded his past three albums in Wyoming, including the recently released “Jesus Is King.”
The planning commission will recommend whether county commissioners should approve the project.
Cody is a town of 10,000 people named for wild West showman William Frederick “Buffalo Bill” Cody.


Local family ownned furniture store. We negotiate and offer no-credit financing solutions.
24 Months 0% APR Credit Financing
No Credit 90 Day 0% Interest
Our furniture is warrantied!
We have all the top models.
Free delivery with in 5 miles
We buy local and sell local
You are family!


Ideas in Form · Multimedia Architectural Study and Educational Experience Protoype
2018.How do cultures use material to create enduring yet adaptive constructed spaces?
Ideas in Form is a short term investigative research project that explores how cultures, particularly the Japnanese, use the natural environment to inform and construct their architectural works. The project included background research, wood-working, and motion design, culminating in a digital protoype of an educative mobile experience regarding Japanese wood joinery.
Sketch Flinto Woodworking Research
Idea Evoking Japanese Architecture
The beginning of this concept rose from my passion with history and natural materials and my observations on the differences between Japanese and Western models of architectural design and urban growth. Additionally, I had recently become obsessed and inspired by the contemporary Japanese architect Kengo Kuma.
Japanese architecture tends to lean on organic materials, and structures in Japan are replaced more rapidly than in countries in Europe and North America. Yet despite this impermanence, the architecture of Japan evokes something deeply emotional and connective; it has a certain feeling and voice that isn’t found in many newer Western homes.
With this in mind, I wanted to learn more about what gives both traditional and contemporary (read: Kengo Kuma) Japanese architecture its voice, and then share this voice with those around me.
Background Research Traditional Japanese Architecture
Fire and Wood
Natural events such as earthquakes are prevalent in Japan, and over history often lead to large fires. Why would Japanese architecture so often use natural materials such as wood if fire was so prevalent? Through the use of wood, an easily replenish-able, mobile, and generally lightweight commodity, Japanese cities were able to quickly rebuild after disaster.
This speaks to the values of the people, and how design can so beautifully illustrate deeper cultural touchstones, such as adapting with, rather than withstanding, nature. This is so different to the Western model of design, which uses heavy materials to control and tame the will of nature.
In Praise of Shadows
Jun'ichirō Tanizaki's 1933 book In Praise of Shadows has had a profound impact on me as a designer and how I view Japanese architecture. Tanizaki views the nuances and imperfections provided by natural materials in Japanese homes as the elements that provide joy and beauty. To quote: “The quality that we call beauty ... must always grow from the realities of life.”
Contemporary Study The Architecture of Kengo Kuma
Inspired by the findings of my previous research, I wanted to take a deeper dive into how contemporary Japanese architects utilise traditional themes and forms. I looked into the body of work of Kengo Kuma, renowned internationally for his respect for traditional Japanese craft and materials.
Quote From the Architect
This is architecture that originates from the system of Cidori, an old Japanese toy. Cidori is an assembly of wood sticks with joints having unique shape, which can be extended merely by twisting the sticks, without any nails or metal fittings. The tradition of this toy has been passed on in Hida Takayama, a small town in a mountain, where many skilled craftsmen still exist.
Interpretation
Kuma’s architecture pulls on the impermeability of traditional Japanese architecture, using repeatable, simple, sturdy yet easily dismantled forms to usher in an age or architecture that shows that organic materials can be used as reliable building blocks in making distinguished architectural structures. Efficiency of thought and production allow for stability of concept and purpose.
Material Study Cidori Joinery
Though Kuma's work is a study of repition of form, I was interested in first learning more about the actual joinery used for this project. Learning about how Cidori was constructed became the basis of my 3D study.
First, a micro-sized MVP was produced....
...Followed by a larger construction that provided me with a newfound respect for how certain Japanese joints were produced, and how these forms can be beautiful as individual sculptures, or used to produce much larger habitations.
Recapping through Teaching An Interactive Study
This is a short exploration into how we can share the craft and technique of contemporary architects like Kengo Kuma who employ traditional Japanese construction techniques.
Japanese architecture is most effective when it creates a dialogue between structure and environment.
I wanted to play off this idea, and design a digital experience, creating 3D forms that exist in the 2D environment many of us are most comfortable with.
It was my goal to teach and inform through playful interaction and exploration, providing the audience with a visual way to come to respect the effortless yet technical building block of Kuma's (and Japanese Architecture as a whole) canon.
Motion was implemented in a way that evokes the artistic and architectural practices of Kengo Kuma, whilst also highlighting both the overall form and the simplistic construction of the structures.
One of the things that was inspirational to me about Kuma's work is his use of traditional technique, but more importantly his subsequent repetition of form and construction. He reduces large-scale construction practices down into micro-units, which he then repeats to create complex and expansive architectual forms. I wanted to show how these complex units/joints could be quickly scaled up to create the large pieces that Kuma has built.
Additional portions of information provided granularity and grounded the illustrative forms in the lived world.
A walkthrough of the project can be seen in a screen recording below.


Enables the AMP function HTTPRequestHeader in SSJS
This function returns a specified header from an HTTP request. This function is only available in landing pages, microsites and CloudPages. It cannot be used in other Marketing Cloud applications.
NOTE: Only headers that are available in the page request return a value. For example, if a user pastes a URL into a web browser instead of clicking on a page hyperlink (from another web page), the Referer header value will be empty.
Enables the AMP function UpdateSingleSalesforceObject in SSJS
This function updates a record in a Sales or Service Cloud standard or custom object. The function returns 1 if the record is updated successfully or 0if it fails.
NOTE: Additional API field name and value pairs can be appended as arguments.
NOTE: Certain Salesforce objects enforce record-locking when a record is modified, to ensure the referential integrity of data. This applies to records that have a relationship to lookup records in a different object. If the function is used to asynchronously update multiple records (for example, the function is included in an email) and the object has lock contention, the records may fail to update.
(string)
API name of the Salesforce object.
(string)
Record identifier to update
(array)
Array of name-valiue pair to update
Enables the AMP function RetrieveSalesforceObjects in SSJS
This function retrieves fields from a record in a Sales or Service Cloud standard or custom object. The function returns a row set of fields.
NOTE: Additional API field name, comparison operator and value sets can be appended as arguments. However the function joins these additional sets using AND clauses.
NOTE: This function should only be used in applications that do not require a high volume of requests or return a large number of records; for example, an email send to a small audience, a Triggered Send, or the retrieval of a single record on a landing page.
NOTE: The function may take several seconds to execute, impacting email send performance and may result in a timeout if the request volume is high for example; using a process loop to execute the function multiple times or returning a large number of rows. Unlike other AMPscript functions that return a row set — for example, LookupRows which limits the number of rows to 2000 — there is not the same type of limitation on the number of rows returned by this function.
(string)
API name of the Salesforce object.
(array)
Comma-separated array of API field names to retrieve
(array)
Set of arrays where each array is one set of filter
object
:
The result of the request
Enables the AMP function CloudPagesURL in SSJS
Provides a way for users to reference a CloudPages URL in an account from an email message. Use this function in an email to pass information via a URL in an encrypted query string. For example, you could share a single unsubscription or profile center page for use in any sent email message. This method passes information in an encrypted query string without passing subscriber information or values in clear text.
(integer)
Page ID for the landing page reference in the URL.
Locate this value on the appropriate CloudPage content
details page. Page ID can be from the enterprise (EID)
or the business unit (MID) where the function is used.
(object)
Name-Value pair for additional parameters included
in encrypted query string
string
:
A full URL
Enables the AMP function SHA1 in SSJS
This function converts the specified string into a SHA1 hex value hash.
(string)
String to convert
(string
= UTF-8
)
Character set to use for character-encoding.
Valid values are UTF-8 (default) and UTF-16
string
:
The string as a SHA1 hex value hashed
Enables the AMP function SHA256 in SSJS
This function converts the specified string into a SHA256 hex value hash.
(string)
String to convert
(string
= UTF-8
)
Character set to use for character-encoding.
Valid values are UTF-8 (default) and UTF-16
string
:
The string as a SHA256 hex value hashed
Enables the AMP function SHA512 in SSJS
This function converts the specified string into a SHA512 hex value hash.
(string)
String to convert
(string
= UTF-8
)
Character set to use for character-encoding.
Valid values are UTF-8 (default) and UTF-16
string
:
The string as a SHA512 hex value hashed
Enables the AMP function DataExtensionRowCount in SSJS
This function returns the number of rows in the specified Data Extension.
NOTE: This function will not return row counts from the System Data Views.
(string)
Name of the Data Extension from which to retrieve a row count
Copyright: email360
Author: Sascha Huwald
Since: 2020
Version: 1.0.0
License: MIT
Collection of wrapper functions for the usage of Cloudpages.
(object?)
Used to update the settings object with a custom setting object
// initialise a new cloudpage instance
var cp = new cloudpage();
// initialise a new cloudpage instance with a login requirement
var cp = new cloudpage('login');
// initialise a new cloudpage instance with a jwt token requirement
var cp = new cloudpage('jwt');
Holds the payload for each call
Wrapper to use for JWT authentication.
Requires a JWT token as a request parameter either as POST or GET. If token is invalid or not given, a redirect to the error page will occur. Required parameter name: 'jwt'
NOTE: JWT token cannot be used in conjunction with CloudPagesURL as the function cannot handle "=" characters which are used as padding in a base64 encoded string. Use a standard GET URL parameter instead.
Wrapper to use for LOGIN authentication.
Requires a cookie as a JWT token. Name of the cookie can be set in the settings. Requires a login page to generate a token after successfully authenticated.
The default login page can be set in thr config: cp.login.
Validate the payload against QueryStringParameter.
If QueryStringParameter was found it is save at runtime to cp.payload. E.g.: cp.payload.qs.subscriberKey.
Generate a new JWT token.
(string)
Page ID (KEY) inside the Authentication DataExtension to fetch the salt.
(number?)
Expiration time in seconds.
(object?)
Additional payload added to the token.
(array?)
Array of full website URI's to have access to. If not given, the new token will
have access to all page protected by JWT.
string
:
A new JWT token.
Log an error to a DataExtension
Centralised version of error logging in SSJS script. Not recommended in batch Emails - use AMP error log for this purpose instead. On error, a record will be written to the error log DE.
This function requires a DataExtension defined in settings.de.logError
(object)
Holds the data for the error log.
| Name | Description |
|---|---|
o.method string
|
The method calling the error. |
o.message string
|
The error message for better understanding of the error. |
o.source string
|
A detailed name of the error origin. E.g. [Email] Survey. |
o.subscriberKey string?
|
If given, the subscriberKey triggering the error |
o.jobid number?
|
The JobId if the error is caused from an email sent. |
o.listid number?
|
The ListId if the error is caused from an email sent. |
o.batchid number?
|
The BatchId if the error is caused from an email sent. |
o.sourceType string?
|
The SourceType. e.g. Email, Web, CRM. |
o.raiseError boolean?
|
Indicates whether an error should be raised to stop an email from sending out. Only works in Email Studio. A value of true skips the send for current Subscriber and moves to next Subscriber A value of false stops the send and returns an error. |
string
:
The eventId for the error.
Log a warning to a DataExtension.
This function requires a DataExtension defined in settings.de.logWarning.
(object)
Holds the data for the warning log.
| Name | Description |
|---|---|
o.method string
|
The method calling the warning. |
o.message string
|
The warning message for better understanding of the warning. |
o.source string
|
A detailed name of the warning origin. E.g. [Email] Survey. |
o.subscriberKey string?
|
If given, the subscriberKey triggering the warning |
o.jobid number?
|
The JobId if the warning is caused from an email sent. |
o.listid number?
|
The ListId if the warning is caused from an email sent. |
o.batchid number?
|
The BatchId if the warning is caused from an email sent. |
o.sourceType string?
|
The SourceType. e.g. Email, Web, CRM. |
string
:
The eventId for the warning.
Check if value is an object.
(any)
The value to check.
boolean
:
Add units to a datetime
(date)
The original date
(number)
Numbers to add to the dt
(string
= Hours
)
Units to add
['Seconds','Minutes','Hours','Days','Months','Years']
.
date
:
The new date
Subtract units to a datetime
(date)
The original date
(number)
Number to subtract from the dt
(any)
(string
= Hours
)
Units to subtract
['Seconds','Minutes','Hours','Days','Months','Years']
.
date
:
The new date
Remove time from given DateTime
(date)
The datetime
date
:
Date
Get the current UTC Date
date
:
UTC Date
Get the current UnixTimestamp
number
:
The current UnixTimestamp in UTC
Get the difference in hours between two datetimes
number
:
hours difference
Get the difference in days between two datetimes
number
:
days difference
Convert minutes into a human readable form
(number)
Miniutes given
string
:
Group an array of object by one property
array
:
the grouped array
Check if a string is in the object
boolean
:
Check if a string is in the object) recursively.
boolean
:
Shuffles an array.
(array)
Array containing the items.
array
:
The suffeled array
Delete item in array.
array
:
The new array
Create AMP variables from an object
(object)
A name and value object.
// creates 3 AMP variables
createAmpVariables({
email<EMAIL_ADDRESS>source: 'Email360',
url: 'http://www.email360.io'
});
SSJS wrorkaround to use console server side
Display the message appropriate to the Debugging Mode
(string)
The message to be displayed.
Wait for n Miliseconds
(number)
Miliseconds to sleep
Validates if the contentBlock with the given key exists
(string)
The ContentBlockKey
boolean
:
Returns the current page URL optional with parameters
(boolean
= false
)
Keep parameters from the url
string
:
Verify if the given string is a possible SFMC default CustomerKey
(string)
The string to be tested
boolean
:
Perform an HTTP request allowing the usage of API methods.
(string)
The method to use e.g: POST, GET, PUT, PATCH, and DELETE
(string)
The url to send the request to
(string?)
The contentType to use e.g: application/json
(object?)
A payload for the request body
(object?)
Header values as key value pair
object
:
Result of the request
Generate a random string for the given fieldType
Allowed types: Decimal,EmailAddress,Boolean,Number Date, Phone, Locale, Text.
(string)
Defines the data to be generated.
string
:
The generated data string
Copyright: email360
Author: Sascha Huwald
Since: 2020
Version: 1.0.0
License: MIT
Collection of wrapper functions for the usage of the Salesforce Marketing Cloud REST API.
(object?)
Used to update the settings object with a custom setting object
// initialise a new sfmcApi instance
var rest = new sfmcApi();
Trigger a journey entry event.
Requires a DataExntesion (DE) to be used in conjunction with a journey entry source.
(string)
The ID that uniquely identifies a subscriber/contact
(string)
Find the EventDefinitionKey in Event Administration after the event is created and saved.
(object)
Properties of the event. Only required if defined in a custom event or by the event.
boolean
:
// trigger a journey
var rest = new sfmcApi();
var data = {
'email'<EMAIL_ADDRESS>'name': 'John'
};
var resp = rest.triggerJourneyEvent(data.email,'APIEvent-b14f22b4-79f2-e573-ebaf-53ad4fa60f63',data);
Create an image asset
(string)
A base64 encoded image file
(string)
The name of the image
(string)
The image type e.g.: jpg, png
(string)
A brief description about the file
object
:
Result set of the request.
Gets a list of send definitions.
Note: Accepted filter values are active, inactive, or deleted. Valid operations are eq and neq. Example: 'status neq active'
object
:
Result set of the request.
var rest = new sfmcApi();
// retrieve all Send Definitions
var resp = rest.retrieveSendDefinitions(null,true);
// retrieve only with status not equal to active
var resp = rest.retrieveSendDefinitions({filter:'status neq active'});
Email preview by SubscriberId or SubscriberKey
This call will output a rendered version of the email utilizing information stored in Contact Attributes (aka Subscriber Attributes) only.
(string)
The id of your email (can be found in UI or retrieved by API)
(string)
The contact id of your subscriber (aka SubscriberID or SubscriberKey)
object
:
Result set of the request.
var rest = new sfmcApi();
// use SubscriberKey
var resp = emailPreviewContact(23141,"key:03ABDDST67SEA8")
// use SubscriberId
var resp = emailPreviewContact(23141,"id:1241157")
Email preview by List
This call will output a rendered version of the email utilizing the architecture of a list (but not a specific contact).
(string)
The id of your email (can be found in UI or retrieved by API)
(string)
The id of your list (can be found in UI or retrieved by API)
object
:
Result set of the request.
Email preview by ListSubscriber
This call will output a rendered version of the email utilizing contact information (via ContactID) stored in a specific list or group (assigned by ListID or GroupID).
(string)
The id of your email (can be found in UI or retrieved by API)
(string)
The id of your list (can be found in UI or retrieved by API)
(string)
The contact id of your subscriber (aka SubscriberID)
object
:
Result set of the request.
Email preview by ListSubscriber
This call will output a rendered version of the email utilizing contact information (via ContactID) stored in a specific list or group (assigned by ListID or GroupID).
(string)
The id of your email (can be found in UI or retrieved by API)
(string)
The id of your list (can be found in UI or retrieved by API)
(string)
The subscriberKey
object
:
Result set of the request.
Email preview by DataExtension and SubscriberId
This call will output a rendered version of the email utilizing contact information (via ContactID) stored in a specific data extension (assigned by DE ID).
(string)
The id of your email (can be found in UI or retrieved by API)
(string)
The id of your data extension ( retrieved by API)
(string)
The SusbcriberID
object
:
Result set of the request.
Email preview by DataExtension and SubscriberKey
This call will output a rendered version of the email utilizing contact information (via ContactID) stored in a specific data extension (assigned by DE ID).
(string)
The id of your email (can be found in UI or retrieved by API)
(string)
The id of your data extension ( retrieved by API)
(string)
The SubscriberKey
object
:
Result set of the request.
Email preview by DataExtension row
This call will output a rendered version of the email utilizing a row number (assigned by inside of the specified data extension
(string)
The id of your email (can be found in UI or retrieved by API)
(string)
The id of your data extension ( retrieved by API)
(string)
The row id of the record to use inside the DataExtension
object
:
Result set of the request.
Send a test email
Note: This is an internal only route, that currently is NOT supported. It should only be used in production environments wiht caution.
The route has no ownership internally, and could stop working without notice.
Note, the Send Classification, Delivery Profile and Sender Profile IDs will need to be collected via the associated SOAP API objects
or via UI as there currently is no REST endpoint that can gather this information. In the UI copy the URL for your
Send Classification and use the 18 digigt parameter id "g"
(number)
The emailId used for the send. This can be obtained
via the UI or by using the personalised string %%_emailid%% inside an email
(array)
An array of recipients to send the test email to
(object)
The dataSource for the call. Please reference the example
(string)
The ID assigned to a Send Classification (Can be found in the UI as described above)
(string?)
The ID assigned to a Delivery Profile (Can be found in the UI as described above)
(string?)
The ID assigned to a Sender Profile (Can be found in the UI as described above)
(string
= "[Test]: "
)
A prefix attached in front of the subject
object
:
Result set of the request.
var rest = new sfmcApi();
var recipients = [
<EMAIL_ADDRESS>];
// Send a test email rendered with a profile from a subscriberId inside a specific list
var dataSource = {
contact: "id:1234567", // subscriberId
type: "List",
id: 1234 // list id
};
var resp = rest.sendTestEmail(3321,recipients,dataSource,"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
// Send a test email rendered with a profile from a subscriberKey inside a dataExtension
var dataSource = {
contact: "key:03ad24jd81ja74grhe", // subscriberKey
type: "DataExtension",
id: "key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // External Key of the DataExtension
};
var resp = rest.sendTestEmail(3321,recipients,dataSource,"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
// Send a test email rendered with a profile of a DataExtension Row
var dataSource = {
row: 1, //The row number to use from the given DataExtension
type: "DataExtension",
id: "key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // External Key of the DataExtension
};
var resp = rest.sendTestEmail(3321,recipients,dataSource,"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
Initiates a message to one or more mobile numbers.
In order to be able to programmatically trigger text messages, MobileConnect
needs to be enabled in Marketing Cloud’s Mobile Studio. The phone number must use the correct
format for the designated country code. For example, a mobile number from the United States must include the numerical
country code 1 and the area code, eg:<PHONE_NUMBER>2.
To ensure that the mobile number exists for the contact and that the contact subscribed to the specified keyword on your
short code, set the Subscribe and Resubscribe values to true and specify the keyword parameter.
(string)
Message Id provided for the messageContact
(array)
An array of one or more mobile numbers
(string?)
The keyword must align with code on message. Required when subscribe and/or resubscribe are true.
(object?)
Key-Value pair for additional params to set. See SFMC for more information
object
:
Result set of the request.
Retrieves the overall delivery status of a message to a contact.
(string)
Message Id provided for the messageContact
(string)
Token Id returned from triggerSMSMessage
object
:
Result set of the request.
Create a Script Activity
Note: This is an internal only route, that currently is NOT supported. It should only be used in production environments wiht caution. The route has no ownership internally, and could stop working without notice.
(string)
The name of the SSJS script
(string)
The SSJS script to create
(number?)
The folder id the script will belong to. Default the default Scripts folderId from settings
(number?)
A brief description about the script
object
:
Result set of the request.
Retrieve a specific Script Activity
Note: This is an internal only route, that currently is NOT supported. It should only be used in production environments wiht caution. The route has no ownership internally, and could stop working without notice.
(string)
The ssjsActivityId for the scriptActivity or the name
object
:
Result set of the request.
Retrieve all Script Activities
Note: This is an internal only route, that currently is NOT supported. It should only be used in production environments wiht caution. The route has no ownership internally, and could stop working without notice.
object
:
Result set of the request.
var rest = new sfmcApi();
// retrieve all ScriptActivities
var resp = rest.retrieveScriptActivities(null,true);
// retrieve page 2 with a pagesize of 10
var resp = rest.retrieveScriptActivities({page:1,pagesize:10});
Retrieve all Script Activities inside a folder
Note: This is an internal only route, that currently is NOT supported. It should only be used in production environments wiht caution. The route has no ownership internally, and could stop working without notice.
(string)
The folderId to retrieve all activities for
object
:
Result set of the request.
Validate a Script
This will let you validate your SSJS prior to creation or update inside the system.
The return is a boolean value, essentially pass/fail. Please note this is just for validation of
the code, it does not verify the dependents (content areas, DEs, etc.) so it does not
guarantee there will be no errors when run.
Note: This is an internal only route, that currently is NOT supported. It should only be used in production environments wiht caution.
The route has no ownership internally, and could stop working without notice.
(string)
The script to validate
boolean
:
Update an existing Script Activity
Note: This is an internal only route, that currently is NOT supported. It should only be used in production environments wiht caution. The route has no ownership internally, and could stop working without notice.
(string)
The ssjsActivityId for the scriptActivity or the name
(object)
Object array with the data to update
object
:
Result set of the request.
Starts a Script Activity
Note: This is an internal only route, that currently is NOT supported. It should only be used in production environments wiht caution. The route has no ownership internally, and could stop working without notice.
(string)
The ssjsActivityId for the scriptActivity or the name
boolean
:
Delete a Script Activity
Note: This is an internal only route, that currently is NOT supported. It should only be used in production environments wiht caution. The route has no ownership internally, and could stop working without notice.
(string)
The ssjsActivityId for the scriptActivity or the name
boolean
:
Copyright: email360
Author: Sascha Huwald
Since: 2020
Version: 1.0.0
License: MIT
Collection of wrapper functions for the usage of WSProxy.
WSProxy functions library in server-side Javascript for
Salesforce Marketing Cloud (SFMC).
Note: WSProxy can only be used in non sending enviroment.
(number?)
The BuisnessUnit MID for enterprise integrations.
In order to access other business units, the
library must be added to the master Business Unit.
(object?)
Used to update the settings object with a custom setting object
// initialise a new wsproxy instance
var prox = new wsproxy();
The WSProxy API instance.
this.api.retrieveItem()
Retrieves all retrievable columns for the given object.
(string)
The SFMC Object to retrieve cols from.
array
:
A list of al retrievable columns.
// retrieve cols for DataExtension
var cols = prox.retrievableCols('DataExtension');
Match cols with request result of a retrieve
A retrieve request result is returning many informations which are not useable if the same object will be used to create or update informations. This function takes the retrieveable cols and match the values against the original request result.
(array)
Array of retrievebale cols. E.g.: this.retrievableCols('asset')
(array)
A retrieve request result
array
:
A modified retrieve request
Create a DataExtension within SFMC.
Sample list of the field array required to generate the DataExtension
[ { "Name": "Text", "FieldType": "Text", "MaxLength": 50, "DefaultValue": "Hellow world" }, { "Name": "Number", "FieldType": "Number" }, { "Name": "Date", "FieldType": "Date" }, { "Name": "Boolean", "FieldType": "Boolean", "DefaultValue": false }, { "Name": "Email", "FieldType": "EmailAddress" }, { "Name": "Phone", "FieldType": "Phone" }, { "Name": "Decimal", "FieldType": "Decimal", "MaxLength": 18, "Scale": 2 }, { "Name": "Locale", "FieldType": "Locale" } ]
For a full and up to date list of available field types, visit Salesforce Marketing Cloud documantation.
(string)
Name of the new DataExtension.
(array)
Fields to be created within the DataExtension.
(number
= 0
)
Folder ID within SFMC to place the DataExtension.
object
:
Result set of the request.
// Create a new DataExtension inside the folder DataExtensions
var prox = new wsproxy();
var resp = prox.createDataExtension('MyNewDataExtension', [{
"Name": "Text",
"FieldType": "Text",
"MaxLength": 50,
"DefaultValue": "Hellow world"
}]);
Create a DataExtension with "num" random records.
(string)
The name of the new DataExtension
(number)
Amount of random records
(number
= 0
)
Folder ID within SFMC to place the DataExtension.
object
:
Result set of the request.
// Create a new demo DataExtension inside the folder DataExtensions with 100 random records
var prox = new wsproxy();
var resp = prox.createDataExtensionDemo('MyNewDataExtension', 100);
Retrieve informations about a single DataExtension.
(string)
The identifier for the DataExtension. Name or customerKey.
object
:
Result set of the request.
// Retrieve informations about a sepcific DataExtension
var prox = new wsproxy();
var resp = prox.retrieveDataExtension('MySampleDataExtension');
// using a customerKey
var resp = prox.retrieveDataExtension('53b54b8a-b604-4fc2-90x9-33eec99c8a93');
Retrieve the ModifiedDate of the given DataExtension.
Note: ModifiedDate is the the last modification of the properties for the given DataExtension. This does not apply to changes of the data within the DataExtension.
(string)
The identifier for the DataExtension. Name or customerKey.
(string | NULL)
:
The ModifiedDate of the DataExtension or NULL
Find DataExtension(s) which have no folder allocation
If a folder has been deleted and it contained any DataExtension, these DataExtension will no longer be visible in the UI as their shared CategoryID is referring to a non-existing folder.
object
:
Result set of the request.
Copy a DataExtension
(string)
The identifier for the DataExtension. Name or customerKey.
(string?)
The new name for the copied DataExtension. If null, the original name will be
used and extended by the word "Copy_"
(boolean
= false
)
Set to copy all records. Attention: Depending on the amount of records this process
can take a while and may timeout.
boolean
:
Update the properties of a DataExtenion
(string)
The identifier for the DataExtension. Name or customerKey.
(object)
Object of properties to change.
boolean
:
// changing the name of a DataExtension
var prox = new wsproxy();
var prop = { Name: "MyNewDataExtensionName" }
var resp = prox.updateDataExtension('MyNewDataExtension',prop);
// change the DataExtension to be sendable
var prop = {
IsSendable: "true",
SendableDataExtensionField: {
Name: "email", //Provide the name of the field used to establish a data relationship
DataType: "EmailAddress"
},
SendableSubscriberField: {
Name: "Subscriber Key"
} //Use "Subscriber Key" or "Email Address" depending on whether the SUBSCRIBER_KEY business rule has been turned on.
}
var resp = prox.updateDataExtension('MyNewDataExtension',prop);
Retrieve informations about a single DataExtentionTemplate.
(string)
The identifier for the DataExtentionTemplate. Name or customerKey.
object
:
Result set of the request.
// Retrieve informations about a sepcific DataExtentionTemplate
var prox = new wsproxy();
var resp = prox.retrieveDataExtentionTemplate('MySampleDataExtension');
// using a customerKey
var resp = prox.retrieveDataExtentionTemplate('53b54b8a-b604-4fc2-90x9-33eec99c8a93');
Retrieve the ModifiedDate of the given DataExtentionTemplate.
Note: ModifiedDate is the the last modification of the properties for the given DataExtentionTemplate. This does not apply to changes of the data within the DataExtentionTemplate.
(string)
The identifier for the DataExtentionTemplate. Name or customerKey.
(string | NULL)
:
The ModifiedDate of the DataExtentionTemplate or NULL
Create new records inside the given DataExtension.
To avoid the cumbersome Name-Value pair structure, the data object will be converted. Expecting the following sample object:
{ Firstname: "John", Lastname: "Peter" }
(string)
The identifier for the DataExtension. Name or customerKey.
(array)
Array of objects to add.
object
:
Result set of the request.
// create 1 record in DataExtension with name "MyDataExtension"
var prox = new wsproxy();
var resp = prox.createDataExtensionRecords('MyDataExtension',[{SubscriberKey:"123-345-123",Firstname:"John",Lastname:"Smith"}]);
// create 2 records in DataExtension with name "MyDataExtension"
var resp = prox.createDataExtensionRecords('MyDataExtension',[
{SubscriberKey:"123-345-123",Firstname:"John",Lastname:"Smith"},
{SubscriberKey:"456-654-321",Firstname:"Mike",Lastname:"Do"}
]);
Retrieve records inside a DataExtension.
In order to select all data from a DataExtension, the DataExtension field names need to be collected. After retrieving the field names, all data can be retrieved. Optional, the selection of the data can be filtered or only the first 2,500 records can be retrieved.
(string)
The identifier for the DataExtension. Name or customerKey
(object
= NULL
)
SFMC filter object
(boolean
= false
)
Retrieve more than 2,500 records.
object
:
Result set of the request.
// retrieve all records from 'MyDataExtension' where 'Number' is larger than 10
var prox = new wsproxy();
var filter = {
Property: "Number",
SimpleOperator: "greaterThan",
Value: 10
};
var resp = prox.retrieveDataExtensionRecords('MyDataExtension', filter, true)
Update or Add one or multiple records inside a DataExtension.
Update only works with a Primary Key (PK) on the given DataExtension. To avoid the cumbersome Name-Value pair structure, the data object will be converted. Expecting the following sample object:
{ Firstname: "John", Lastname: "Peter" }.
(string)
The identifier for the DataExtension. Name or customerKey.
(array)
An array of Objects with data to add.
object
:
result of the request
// update or add 1 record in DataExtension with name "MyDataExtension"
var prox = new wsproxy();
var resp = prox.upsertDataExtensionRecords('MyDataExtension',[
{SubscriberKey:"123-345-123",Firstname:"John",Lastname:"Smith"}
]);
Delete one or multiple records inside a DataExtension.
To avoid the cumbersome Name-Value pair structure, the data object will be converted. Expecting the following sample object:
{ PrimaryKey<EMAIL_ADDRESS>}.
(string)
The identifier for the DataExtension. Name or customerKey.
(array)
An array of objects with primary keys to identifier the records to delete.
boolean
:
// delete one record in 'MyDataExtension' with the PrimaryKey: 'SubscrinberKey' equals '123-345-123'
var prox = new wsproxy();
var resp = prox.deleteDataExtensionRecords('MyDataExtension', [{ SubscriberKey: "123-345-123" }] )
Create DataExtension fields within the DataExtension.
A sampe field array required to generate the new field within the DataExtension
[ { "Name": "Text", "FieldType": "Text", "MaxLength": 50, "DefaultValue": "Hellow world" } ]
For a full and up to date list of available field types, visit Salesforce Marketing Cloud documantation.
(string)
The identifier for the DataExtension. Name or customerKey
(array)
Fields to be created within the DataExtension.
boolean
:
// create a field in the DataExtension 'MyDataExtension'
var prox = new wsproxy();
var fields = [{
Name: "Firstname",
FieldType: "Text",
MaxLength: 100
}];
var resp = prox.createDataExtensionFields('MyDataExtension', fields);
Retrieves a single field property of a DataExtension.
(string)
The identifier for the DataExtension. Name or customerKey
(string)
The field name to retrieve the property for
(string)
The property to retrieve
(string | NULL)
:
The porperty value for the given field name inside the DataExtension
future release
future release
Retrieve folder informations.
Attention: Folder names are not unique. If multiple folder were found, resp.Status returns OK. Each folder will create an array entry in the resp.Result set. To identify multiple folders use resp.Result.length > 1 and act accordantly. This will not occur when passing the folder id as parameter.
object
:
Result set of the request.
// retrive data folder information for the folder id 'Data Extensions'
var prox = new wsproxy();
var resp = prox.retrieveDataFolder('Data Extensions');
Retrieves all DataFolders for a given contentType.
(object?)
SFMC filter.
(object?)
Specifies the properties on the RetrieveOptions on the request.
(object?)
Specifies any remaining properties to set on the request. These
properties include “QueryAllAccounts”, “RepeatLastResult”, “RepeatAllSinceLastBatch”, and so on.
(boolean
= false
)
Retrieve more than 2,500 records.
object
:
Result set of the request.
// Retrieve every DataFolder with a parent folder ID is equal to 123 and limit the result by 2
var prox = new wsproxy();
var resp = prox.retrieveDataFolders(
{
Property:"ParentFolder.ID",
SimpleOperator: "equals",
Value: 123
},{BatchSize:2}
);
Retrieves the folder path for the requested object.
(string)
The CustomerKey for the object to retrieve the folder path for.
(string
= DataExtension
)
The SOAP ObjectType.
(string | NULL)
:
The folder path or NULL.
Check if a folder is empty based on contentType.
In order to determine if a data folder is empty, it is necessary to retrieve all objects with the same parent folderId as the requested folderId. This requires an allocation between the contentType of the folder and the required object. There is no such allocation and an object map has been created inside this method.
boolean
:
future release
Retrieve Subscriber records.
By retrieving a subscriber, you can view the applicable information for that subscriber. You can include this information in a profile center or in your own application as part of a screen that displays subscriber information
(object
= NULL
)
SFMC filter object
(boolean
= false
)
Retrieve more than 2,500 records.
object
:
Result set of the request.
// retrieve all Subscriber records where 'CreatedDate' is after '4th of January 2012'
var prox = new wsproxy();
var filter = {
Property: "CreatedDate",
SimpleOperator: "greaterThan",
Value: "2012-01-04T10:19:00"
};
var resp = prox.retrieveSubscribers(filter, true)
Update a Subscriber record
Updating an existing subscriber via the WSProxy allows you to better maintain your subscriber information while utilizing a tight integration with your system or development environment.
(array)
An array of objects with subscriber information.
boolean
:
// update a record
var prox = new wsproxy();
var resp = prox.upsertSubscriberRecords([
{
Email<EMAIL_ADDRESS>SubscriberKey: 'SomeUniqueKey',
Attributes: {
"First Name": 'John',
"Last Name": 'Doe'
}
}
]);
Delete one or multiple records from Subscribers.
If you wish to entirely remove a subscriber from your account, you can use this call to delete the subscriber's information.
You don't need to delete a subscriber's information from your account in order to unsubscribe that subscriber from an email list. Use this call only when you wish to totally remove a subscriber's information from your account.
When you delete a subscriber, your account also loses all tracking information related to that subscriber and a new instance of that subscriber could be added to lists from which that subscriber has previously unsubscribed. For this reason, Marketing Cloud recommends editing subscribers to an unsubscribed status rather than deleting that subscriber.
(array)
An array of objects to identify the Subscriber. EmailAddress or SubscriberKey
boolean
:
Retrieve Tracking Data
In most production implementations, data volume in the account requires you to include specific JobIDs in the filter criteria of the request. If requests that don’t specify a JobID time out during processing, add a JobID in the filter. If specifying a JobID is not possible, or if your implementation requires a broad range of JobIDs, use a data extract-based procedure instead.
(string
= SentEvent
)
The event type: SentEvent, OpenEvent, ClickEvent, BounceEvent or UnsubEvent.
(object?)
SFMC filter.
(boolean
= false
)
Retrieve more than 2,500 records.
object
:
Result set of the request.
Trigger an automation with a wait timer
This call is helpful if you want to trigger an automation which may already be in progress, but you need to ensure it starts as soon as it has finished. If the automation already runs, the script will wait n milliseconds (sleep) and retry it for the duration of x repetitions (repeat).
The maximum duration is sleep * repeat.
(string)
The identifier for the Automation. Name or CustomerKey.
(number)
A number of how many repetitions
(number)
A number in milliseconds of how long the script should wait.
boolean
:
future release
Creates a TSQL Query
(string)
Name of the query
(string)
A valid TSQL statement
(string
= Update
)
Update, Overwrite, Add
(string)
The identifier for the target DataExtension. Name or customerKey.
object
:
Result set of the request.
Retrieve informations about a single QueryDefinition.
(string)
The identifier for the QueryDefinition. Name or CustomerKey.
object
:
Result set of the request.
// Retrieve informations about a sepcific QueryDefinition
var prox = new wsproxy();
var resp = prox.retrieveQueryDefinition('MySample');
// using a customerKey
var resp = prox.retrieveQueryDefinition('53b54b8a-b604-4fc2-90x9-33eec99c8a93');
Retrieve informations about an asset.
This usage of this function is limited as the retrievebale cols are not fully supported for WSProxy at this time. Only ObjectID, CustomerKey ID and Name are retrieveable but no information about the file itself. In order to retrieve more informations about the asset, use the REST API.
(string)
The identifier for the Asset. Name or customerKey.
object
:
Result set of the request.
Create a ScriptContentBlock asset
(string)
The name of the content block
(string)
The content of the file. e.g. HTML code
(string?)
A specific Customer Key to use
(string?)
A brief description about the file
object
:
Result set of the request.
Create an image asset
Note: This function will create an image but the return object does not hold any informations about the image itself. This may change in a later stage when SFMC is adding these informations. If these informations are required, use the REST API function instead.
(string)
A base64 encoded image file
(string)
The name of the image
(string)
The image type e.g.: jpg, png
(string?)
A brief description about the file
object
:
Result set of the request.
Unsuscribe a recipient
The LogUnsubEvent api call allows you to unsubscribe a subscriber and log an ‘UnsubEvent’ that is tracked against a specific job. This is mostly used for custom preference centers or unsubscribe pages.
By using this call, you are able to track back the unsubscribe to the job that the email was sent, instead of just a general non-trackable unsubscribe.
(string)
The client supplied ID that uniquely identifies a subscriber
(string)
The email address of the subscriber
(string)
The ID of the Job that sent the message.
(string)
The ID of the List that the subscriber belonged to. You can use
subscriber or publication lists (not suppression lists).
(string)
The ID of the Batch within the Job.
(string?)
The reason the subscriber is being unsubscribed.
object
:
Result set of the request.
future release
future release
Retrieve informations about a single TriggeredSendDefinition.
(string)
The identifier for the TriggeredSendDefinition. Name or CustomerKey.
object
:
Result set of the request.
// Retrieve informations about a sepcific TriggeredSendDefinition
var prox = new wsproxy();
var resp = prox.retrieveTriggeredSendDefinition('MySample');
// using a customerKey
var resp = prox.retrieveTriggeredSendDefinition('53b54b8a-b604-4fc2-90x9-33eec99c8a93');
Send a triggered email send
(string)
The CustomerKey for the TriggeredSendDefinition retrieved by retrieveTriggeredSendDefinitionCustomerKey().
(array)
Array of objects with email addresses, subscriberkey and attributes to send the email to.
boolean
:
var prox = new wsproxy();
var recp = [
{
EmailAddress<EMAIL_ADDRESS>SubscriberKey<EMAIL_ADDRESS>Attributes: {
FirstName: "John",
LastName: "Do"
}
}
];
var resp = prox.sendTriggeredSend(381,recp);


Making high-quality widgets since 1991
Send us email or call us to order any of our products.
Basic Widgets


I'm a 4th-year computer science student at UC Berkeley. Check out my projects below!
A web app that helps people learn sign language. I made this as a competition project in high school with 5 other people.
View sourceA Tableau viz showing where colleges are going back to school, and how many students will be taking their classes online vs. in-person.
View mapMinesweeper's normal controls don't work well on a Mac trackpad, so I made my own version. Has 4 settings and tracks your stats.
View sourceI'm a natural engineer who loves to solve problems and build things. I like projects that reveal new insights or teach new ideas.
I have industry experience with both front-end and back-end software development and have seen the rich variety of solutions it can provide to all kinds of problems.
View my resume


{% extends 'base.html' %} {% block body %}
this is your Cart
{% for product in products %}Product Name: {{ product.name }}
Product Price: {{ product.get_price() }}
Quantity: {{ quantities[product.id] }}
go to detailsTotal Bill: {{ cart.total_cost }}
{% endblock %}


YTS is a python package that allows you to download movie torretns from web.It is also a python binding for the official movie torrents YTS.
Look how easy it is to use:
from yts import YTS # Get your stuff done y = YTS() y.torrents() #Lists all the latest movie torrents available.select movieID from it y.download(6581) #6581 is movie ID which is listed by torrents method above
That’s it.Your default torrent client will be opened and torrent will be added to it.
Install $project by running:
$ sudo pip install yts
or$ pip install yts (for windows)
If you are having issues, please let us know. You can mail me at<EMAIL_ADDRESS>The project is licensed under the MIT license.