Wave Module¶
The wave module contains a set of functions to calculate quantities of interest for wave energy converters (WEC).
Note
The names of the functions below are of the convention path.path.function
. Only the function name is used when calling the function in MATLAB. For example, to call on mhkit.wave.io.read_NDBC_file
simply use read_NDBC_file
.
IO¶
The io submodule contains the following function to load National Data Buoy Center (NDBC) data file into a pandas DataFrame, including real time and historical data.
Functions |
Description |
|---|---|
|
Reads a NDBC wave buoy data file (from https://www.ndbc.noaa.gov) into a structure. |
-
mhkit.wave.io.
read_NDBC_file
(file_name, varargin)¶ Reads a NDBC wave buoy data file (from https://www.ndbc.noaa.gov) into a structure.
Realtime and historical data files can be loaded with this function.
Note: With realtime data, missing data is denoted by “MM”. With historical data, missing data is denoted using a variable number of # 9’s, depending on the data type (for example: 9999.0 999.0 99.0). ‘N/A’ is automatically converted to missing data.
Data values are converted to float/int when possible. Column names are also converted to float/int when possible (this is useful when column names are frequency).
- Parameters
file_name (string) – Name of NDBC wave buoy data file
missing_value (vector of values (optional)) – vector of values that denote missing data
- Returns
data (Structure)
data.Data: named according to header row
data.time: given in datetime
data.units: the units for each data entry
Resource¶
The resource submodule contains methods to compute wave energy spectra and various metrics from the spectra.
The following options exist to compute wave energy spectra:
Functions |
Description |
|---|---|
|
Calculates a spectra of user defined type. |
|
Calculates wave spectra from wave probe timeseries. |
The following metrics can be computed from the spectra:
Functions |
Description |
|---|---|
|
Calculate the average creat period from spectra. |
|
Calculates the average wave period from spectra |
|
Calculates wave average zero crossing period from spectra |
|
Calculates the omnidirectional wave energy flux of the spectra |
|
Calculates the energy period |
|
Calculates the Nth frequency moment of the spectrum |
|
Calculates wave energy period from spectra |
|
Calculates wave height from spectra |
|
Calculates bandwidth from spectra |
|
Calculates wave spectral width from spectra |
|
Calculates wave elevation time series from spectrum using a random phase |
|
Calculates wave celerity (group velocity) |
|
Calculates wave number |
-
mhkit.wave.resource.
average_crest_period
(S, varargin)¶ Calculates the average crest period
- Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
- frequency_bins: vector (optional)
Bin widths for frequency of S. Required for unevenly sized bins
- Returns
Tavg (double) – Average crest Period (s)
-
mhkit.wave.resource.
average_wave_period
(S, varargin)¶ Calculates the average wave period
- Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
- frequency_bins: vector (optional)
Bin widths for frequency of S. Required for unevenly sized bins
- Returns
Tavg (float) – Mean wave period (s)
-
mhkit.wave.resource.
average_zero_crossing_period
(S, varargin)¶ Calculates wave average zero crossing period from spectra
- Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra,x)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
- frequency_bins: vector (optional)
Bin widths for frequency of S. Required for unevenly sized bins
- Returns
Tz (double) – Average Zero Crossing Period (s)
-
mhkit.wave.resource.
create_spectra
(spectra_type, frequency, Tp, varargin)¶ Calculates wave spectra of user specified type
- Parameters
spectraType (String of spectra type) – Options are: ‘pierson_moskowitz_spectrum’, ‘bretschneider_spectrum’, or ‘jonswap_spectrum’
Frequency (float) – Wave frequency (Hz)
Tp (float) – Peak Period (s)
Hs (float - Required for 'bretschneider_spectrum', and 'jonswap_spectrum') – Significant Wave Height (s)
gamma (float (optional)) – only an optional parameter for ‘jonswap_spectrum’
- Returns
S (structure)
S.spectrum=Spectral Density (m^2/Hz)
S.type=String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency= frequency (Hz)
S.Te
S.Hm0
-
mhkit.wave.resource.
elevation_spectrum
(ts, sample_rate, nnft, time, varargin)¶ Calculates wave spectra from wave probe timeseries
- Parameters
ts (matrix or table) – Wave probe time-series data, with each column a different time series
sampleRate (float) – Data frequency (Hz)
nnft (int) –
time (vector or table) – time (s)
window (string scalar (Optional)) – Signal window type. “hamming” is used by default given the broadband nature of waves. See scipy.signal.get_window for more options.
detrend (logical (Optional)) – Specifies if a linear trend is removed from the data before calculating the wave energy spectrum. Data is detrended by default.
- Returns
S (structure)
S.spectrum: vector or matrix Spectral Density (m^2/Hz) per probe
S.type: ‘Spectra from Time Series’
S.frequency: frequency [Hz]
S.sample_rate: sample_rate
S.nnft: nnft
-
mhkit.wave.resource.
energy_flux
(S, h, varargin)¶ - Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
h (float) – Water depth (m)
rho (float (optional)) – water density (kg/m^3)
g (float (optional)) –
gravitational acceleration (m/s^2)
NOTE: In matlab, if you set one optional parameter, you must set both, rho first, then g
- Returns
J (double) – Omni-directional wave energy flux (W/m)
-
mhkit.wave.resource.
energy_period
(S, varargin)¶ - Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
- frequency_bins: vector (optional)
Bin widths for frequency of S. Required for unevenly sized bins
- Returns
Te (float) – Wave energy Period (s)
-
mhkit.wave.resource.
frequency_moment
(S, N, varargin)¶ Calculates the Nth frequency moment of the spectrum
- Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
N (int) – Moment (0 for 0th, 1 for 1st ….)
frequency_bins (vector (optional)) – Bin widths for frequency of S. Required for unevenly sized bins
- Returns
m (double)
-
mhkit.wave.resource.
peak_period
(S)¶ Calculates wave energy period from spectra
- Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
- Returns
Tp float – Wave Peak Period (s)
-
mhkit.wave.resource.
significant_wave_height
(S, varargin)¶ Calculates wave height from spectra
- Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
frequency_bins (vector (optional)) – Bin widths for frequency of S. Required for unevenly sized bins
- Returns
Hm0 (double) – Significant Wave Height (m)
-
mhkit.wave.resource.
spectral_bandwidth
(S, varargin)¶ Calculates bandwidth from spectra
- Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
- frequency_bins: vector (optional)
Bin widths for frequency of S. Required for unevenly sized bins
- Returns
e (double) – Spectral BandWidth
-
mhkit.wave.resource.
spectral_width
(S, varargin)¶ Calculates wave spectral width from spectra
- Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
- frequency_bins: vector (optional)
Bin widths for frequency of S. Required for unevenly sized bins
- Returns
e0 (float) – Spectral Width
-
mhkit.wave.resource.
surface_elevation
(S, time_index, options)¶ Calculates wave elevation time series from spectrum using a random phase
- Parameters
S (Spectral Density (m^2/Hz)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
S.spectrum: Spectral Density (m^2/Hz)
S.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
S.frequency: frequency (Hz)
time_index (array) – Time used to create the wave elevation time series [s]
seed (Int (optional)) – random seed to call: wave_elevation(S,time_index,”seed”,seed)
frequency_bins (vector (optional)) – Bin widths for frequency of S. Required for unevenly sized bins to call: wave_elevation(S,time_index,”frequency_bins”,frequency_bins)
phases (vector or matrix (optional)) – Explicit phases for frequency components (overrides seed) to call: wave_elevation(S,time_index,”phases”,phases)
- Returns
wave_elevation (structure)
wave_elevation.elevation: Wave surface elevation (m)
wave_elevation.type: ‘Time Series from Spectra’
wave_elevation.time
-
mhkit.wave.resource.
wave_celerity
(k, h, varargin)¶ Calculates wave celerity (group velocity)
- Parameters
k (wave number (1/m)) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(frequency,spectra)
OR
- structure of form:
k.values= wave number
k.frequency= frequency (Hz)
h (float) – Water depth (m)
g (float (optional)) – gravitational acceleration (m/s^2)
- Returns
Cg (structure)
Cg.values: water celerity
Cg.frequency [Hz]
Cg.h: height [m]
-
mhkit.wave.resource.
wave_number
(f, h, varargin)¶ Calculates wave number
- Parameters
f (frequency (Hz)) – vector or numpy array
h (float) – Water depth (m)
rho (float (optional)) – water density (kg/m^3)
g – gravitational acceleration (m/s^2)
- Returns
k (structure)
k.values: wave number
k.frequency: frequency [Hz]
Performance¶
The performance submodule contains functions to compute capture length, statistics, performance matrices, and mean annual energy production.
Functions |
Description |
|---|---|
|
Calculates the real power from DC voltage and current. |
|
Calculates the real power from three phase ac voltage and current. |
|
Calculates the capture length (often called capture width). |
|
Generates a capture length matrix for a given statistic |
|
Calculates mean annual energy production (MAEP) from matrix data along with data frequency in each bin |
|
Calculates mean annual energy production (MAEP) from timeseries |
|
Generates a power matrix from a capture length matrix and wave energy flux matrix |
|
Generates a wave eneergy flux matrix for a given statistic |
-
mhkit.wave.performance.
ac_power_three_phase
(voltage, current, power_factor, varargin)¶ Calculates the real power from three phase ac voltage and current.
- Parameters
voltage (Time series of all three measured voltages [V]) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(time,voltage)
OR
- structure of form:
voltage.voltage : matrix of all three phases
voltage.time : time vector
current (Time series of all three measured current [A]) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(time,current)
OR
- structure of form:
current.current : matrix of all three phases
current.time : time vector
- power_factorfloat
power factor for the system
- line_to_line: bool (Optional)
set true if the given voltage measuremtn is line_to_line
- Returns
P (Structure)
P.power [W]
P.time
-
mhkit.wave.performance.
capture_length
(Power, J)¶ Calculates the capture length (often called capture width).
- Parameters
P (array or vector) – Power [W]
J (array or vector) – Omnidirectional wave energy flux [W/m]
- Returns
L (vector) – Capture length [m]
-
mhkit.wave.performance.
capture_length_matrix
(Hm0, Te, L, statistic, Hm0_bins, Te_bins)¶ Generates a capture length matrix for a given statistic
Note that IEC/TS 62600-100 requires capture length matrices for the mean, std, count, min, and max.
- Parameters
Hm0 (numpy array or vector) – Significant wave height from spectra [m]
Te (numpy array or vector) – Energy period from spectra [s]
L (numpy array or vector) – Capture length [m]
statistic (string) – Statistic for each bin, options include: ‘mean’, ‘std’, ‘median’, ‘count’, ‘sum’, ‘min’, ‘max’, and ‘frequency’. Note that ‘std’ uses a degree of freedom of 1 in accordance with IEC/TS 62600-100. or a callable function of python type
Hm0_bins (numpy array or vector) – Bin centers for Hm0 [m]
Te_bins (numpy array or vector) – Bin centers for Te [s]
- Returns
clm (structure)
clm.values
clm.stat
clm.Hm0_bins
clm.Te_bins
-
mhkit.wave.performance.
dc_power
(voltage, current)¶ Calculates the real power from DC voltage and current.
- Parameters
voltage (Time series of measured voltages [V]) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(time,voltage)
OR
- structure of form:
voltage.voltage : matrix or vector
voltage.time : time vector
current (Time series of current [A]) –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(time,current)
OR
- structure of form:
current.current : matrix or vector
current.time : time vector
- Returns
P (Structure)
P.power [W]
P.gross: gross power from all lines [W]
P.time
-
mhkit.wave.performance.
mean_annual_energy_production_matrix
(LM, JM, frequency)¶ Calculates mean annual energy production (MAEP) from matrix data along with data frequency in each bin
- Parameters
LM –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(Hm0_bins,L)
OR
structure of form:
LM.values
LM.stat
LM.Hm0_bins
LM.Te_bins
- Returns
maep (float) – Mean annual energy production
-
mhkit.wave.performance.
mean_annual_energy_production_timeseries
(L, J)¶ Calculates mean annual energy production (MAEP) from timeseries
- Parameters
L (numpy array or vector) – Capture length
J (numpy array or vector) – Wave energy flux
- Returns
maep (float) – Mean annual energy production
-
mhkit.wave.performance.
power_matrix
(LM, JM)¶ Generates a power matrix from a capture length matrix and wave energy flux matrix
- Parameters
LM –
- Pandas data frame
To make a pandas data frame from user supplied frequency and spectra use py.mhkit_python_utils.pandas_dataframe.spectra_to_pandas(Hm0_bins,L)
OR
structure of form:
LM.values
LM.stat
LM.Hm0_bins
LM.Te_bins
- Returns
PM (Structure)
PM.values: Power matrix
PM.stat: statistic of the matrix (i.e. “mean”, “max”, etc.) (string)
PM.Hm0_bins
PM.Te_bins
-
mhkit.wave.performance.
wave_energy_flux_matrix
(Hm0, Te, J, statistic, Hm0_bins, Te_bins)¶ Generates a wave eneergy flux matrix for a given statistic
Note that IEC/TS 62600-100 requires capture length matrices for the mean, std, count, min, and max.
- Parameters
Hm0 (numpy array or vector) – Significant wave height from spectra [m]
Te (numpy array or vector) – Energy period from spectra [s]
J (numpy array or vector) – wave energy flux from spectra [W/m]
statistic (string) – Statistic for each bin, options include: ‘mean’, ‘std’, ‘median’, ‘count’, ‘sum’, ‘min’, ‘max’, and ‘frequency’. Note that ‘std’ uses a degree of freedom of 1 in accordance with IEC/TS 62600-100.
Hm0_bins (numpy array or vector) – Bin centers for Hm0 [m]
Te_bins (numpy array or vector) – Bin centers for Te [s]
- Returns
WEFM (Structure)
WEFM.values
WEFM.stat
WEFM.Hm0_bins
WEFM.Te_bins
Graphics¶
The :graphics submodule contains functions to plot wave data and related metrics.
Functions |
Description |
|---|---|
|
Plots wave elevation timeseries |
|
Plots the matrix with Hm0 and Te on the y and x axis |
|
Plots wave amplitude spectrum |
-
mhkit.wave.graphics.
plot_elevation_timeseries
(wave_elevation)¶ Plots wave elevation timeseries
- Parameters
wave_elevation (Structure of the following form:) –
wave_elevation.elevation: elevation [m]
wave_elevation.time: time (s);
- Returns
figure (figure) – Plot of wave elevation vs. time
-
mhkit.wave.graphics.
plot_matrix
(M, Mtype)¶ Plots the matrix with Hm0 and Te on the y and x axis
- Parameters
M (structure) –
M.values: matrix
M.Hm0_bins
M.Te_bins
M.stat
Mtype (string) – type of matrix (i.e. power, capture length, etc.) to be used in plot title
- Returns
figure (plot of the matrix)
-
mhkit.wave.graphics.
plot_spectrum
(wave_spectra)¶ Plots wave amplitude spectrum
- Parameters
wave_spectra (Structure of the following form:) –
wave_spectra.spectrum: Spectral Density (m^2-s;
wave_spectra.type: String of the spectra type, i.e. Bretschneider, time series, date stamp etc.
wave_spectra.frequency: frequency (Hz);
- Returns
figure (figure) – Plot of wave amplitude spectra versus omega


$403 millions
Time left
10 days 05:00:02
Buy now
$403 millions
Time left
10 days 05:00:02
Buy now
$403millions
Time left
10 days 05:00:02
Buy now


Our Goals for 2016
Goals are what motivate us to stay on track and to acomplish things that we really want to do. Some of these goals may not be attainted, but if everyone can see them it might motivate us to do more.
MoreParadox is more then the average company. We care deeply about your vision and your product and our meticulous with every detail.
Design is a critical part of any product, it can sway how people think of your business and can set a tone to the initial user. That is why here at Paradox we make sure that every inch of your product was properly though out.
A well done website, can make a huge difference in sales. It can help aquire new users of your product or keep existing users happy. At Paradox we understand how a website can effect your business and strive to create the perfect website that fits your business.
Do you have a killer app idea or an existing app that needs updating we can help you with that. Our team of iOS engineers understand the ins and out of iOS and can help you create your big idea. We are meticulous with every detail and ensure to write the best apps that we possibly can.
Subscription Manager
Outflow was created because of how hard it was to keep track of all your subscriptions. The app was created with the main idea to have a simple easy place to manage all your growing number of subscriptions.
Created over a period of six months and was our first big project. Over that period of time, we overcame several design and engineering decisions that almost prevented us from creating the app you see.
MoreAlpha is a very simple and elegant way to get your daily fortunes, quotes or you can learn some new words. Alpha currently holds over 150 quotes, 50+ Words with definition and 60+ fortunes.
Created as an intro to iOS development and now fully open source. You can view the project on Github.
MoreRandom Quote, Fortune & Word Generator
Every project needs a good process in order for the client to acheive there expectations. At Paradox we value our process and believe that our process is close to perfect. It was designed to keep you, the client in the loop and give your opinon at every step of the way and to also maintain efficiency.
MoreGoals are what motivate us to stay on track and to acomplish things that we really want to do. Some of these goals may not be attainted, but if everyone can see them it might motivate us to do more.
More


NGX Skeleton Loader
Skeleton Loader Simulation
Here is a simulation of a skeleton for an user card component. This skeleton
will be replaces in few seconds for an image.
Line skeletons
Line skeletons with theming
Line skeletons with theming - Changing Colors and Switching Animations
You can use the same colors for the other examples
Also, this example will be switching between `pulse` and
`progress-dark` animations
Circle skeletons
Circle skeletons with theming
Facebook skeleton example
Animations
Skeletons without animation
Skeleton using `progress` animation
Skeleton using `pulse` animation
Skeleton using `progress-dark` animation


Software Developer and Junior ML Engineer
Python ve AI
Game Development
Wep Development>
Bilgehan Demirkaya


Q. How big a data set can Stat/Transfer handle?
A. There is no limit on the number of cases that can be handled.
Q. How do the date formatting functions know how to write out the proper weekday and month names for languages other than English?
A. Stat/Transfer retrieves the localized day and month names from the Windows registry. If they are correct for your locality, they will be correct in Stat/Transfer.
Q. I have a large number of files to transfer. I don't want to spend my day pointing and clicking. What should I do?
A. Use the Stat/Transfer Command Processor. It is documented in your manual (and in a separate chapter in the online help for the user interface). It will let you do some extremely powerful things such as extract all of the tables from an Access database in a single command or copy a whole directory full of Excel spreadsheets to Stata files.
Q. It's the middle of the night before a crucial deadline and my transfer won't work. What should I do?
A. It's like airplane travel. If you can't get a direct flight between Chicago and Los Angeles, try to get one that stops in Dallas. Consider what formats your destination program will read and the formats Stat/Transfer will write. Or, if you are having trouble reading a file from another program, consider any different file formats that it is capable of saving. There is usually more than one route between your source and your destination.
Q. What is the best way to pass data to my colleagues?
A. For use with general purpose software, probably delimited ASCII is the best. It is the closest thing to a lingua franca of data transport. Stat/Transfer writes delimited data in accordance with the "standard" set by Excel, and that is followed by most software packages. Worksheet files, such as Excel '97, are widely supported as well and have the advantage of storing numbers in double precision. As a general purpose transport format between statistical packages, SPSS binary .sav files and Stata files will maintain your value and variable labels and missing values. They are also platform independent.
Q. I want to save my data for use in the future, what should I do?
A. If you are saving your statistical for use in the indefinite future, the best thing to do is pick one of the ASCII file + Program options and/or ASCII data plus a Stat/Transfer Schema. Even if the particular program is no longer available in many years, you can be assured that some statistical package will be able to read your plain ASCII data and you will have the information that is necessary to re-construct your dataset. The worst thing to do is to store your data in a binary format. Also, pick your storage media carefully. Those who stored data on nine track tapes and decks of cards can no longer read them. We recommend ISO-standard compact disks for archival storage.
Q. I have a file in which numeric variables are stored as strings. How can I get Stat/Transfer to convert these variables to numbers in my output file?
A. Stat/Transfer will let you change strings to numbers when reading worksheets and ASCII files, but it will generally not let you do so when reading other file types. You can work around this limitation by first setting the ASCII File Write option String Quote Character to 'blank'. Then transfer your file to delimited ASCII. When you read the ASCII file and transfer it to your final destination format, your numeric variables, which were formerly stored as strings, will be numeric.
Q. I have a file in which I want some numbers to be transferred as strings. How can I do that?
A. Write it to an ASCII file with a Stat/Transfer Schema. Then edit the Schema and change the variables you want to convert to a string type. Then read the file back in.
Q. What's the best way to get support for Stat/Transfer?
A. If your question is of the form “How do I do X,” please look first in the manual. If that does not solve your problem, please use our online support form. On the other hand, if you think you have found a bug in Stat/Transfer, please use the tools on the Log tab of the user interface.


{% extends "includes/framework.html" %} {% block content-body %} {% include "includes/home_content.html" %} {% endblock %} {% block foot-include %} {% endblock %}


The most significant component of TOGAF is the Architecture Development Methodology (ADM). It essentially defines a full life-cycle process for planning, designing, realizing, and governing enterprise architecture. TOGAF ADM has a genetic resemblance to the traditional waterfall software development model. This model typically consists of phases such as planning, analysis, design, development, testing, and deployment, organized in sequential order (Figure 4-2). Each phase in the waterfall software development life cycle (SDLC) can be fully described by entry criteria, tasks, verification, and exit criteria. TOGAF ADM adopts a similar approach.
ADM consists of eight phases A to H, and a Preliminary one at the start (Figure 4-3). Each phase is fully described using an objectives–approach–inputs–steps–outputs pattern, akin to the waterfall model. The phases will be executed from A to H, normally in sequential order.
However, there are fundamental differences between the waterfall SDLC and TOGAF ADM. In general, software development projects are short-lived. They are scheduled for a fixed time and have a budget for a limited effort. They have a clear beginning (project funding) and end (system deployment and maintenance transition).
In contrast, EA is a continuous journey for the enterprise in a search for a better tomorrow. So, what TOGAF does is to simply tie the last phase (H) of an ADM cycle to the first phase (A) of the next cycle. This way ADM becomes an iterative, repeatable, and continuous process for the enterprises to follow. As a consequence, the funding model and the engagement model for TOGAF (the EA group in the enterprise) must be apportioned accordingly.
As another difference, in waterfall SDLC the requirement analysis phase is typically executed during the early part of the project life cycle. In contrast, TOGAF ADM has a Requirements Management part that always stays at the heart of the process. All ADM phases (A–H) are closely tied to this part. Focus and effort during all phases are derived from, and lead to, the core Requirements Management process
There are also a few practical aspects that TOGAF ADM has to tackle. For instance, for most enterprises it is unrealistic to assume that the architectural initiative starts on a green field and that the ADM Phase A (Architecture Vision) will be the first step. The enterprises would typically have many ongoing or past initiatives that involve architectural development efforts.
Moreover, architectural activities in the enterprise cannot follow a strictly linear, sequential, and step-by-step procedure the way that TOGAF ADM advocates. More likely, these activities take place in a random and chaotic manner. Sometimes they even happen parallel to each other, depending on the organizational, operational, or implementational priorities.
TOGAF recognizes this situation and flexes its muscles to adapt to it, at least to some extent. First, it allows you to begin with any of the ADM phases in between. Furthermore, it is permitted to iterate over a part of the ADM cycle that can be logically demarcated, as indicated in Figure 4-4. ADM supports iterations in many ways, the two most important ones being:
In addition, ADM can be custom-tailored with regard to the scope (width) and level of detail (depth) of work to be taken up in one iteration, to suit the given circumstances and constraints in your organization. In essence, although it appears at first sight to adhere to a strict waterfall pattern, TOGAF ADM is surprisingly flexible. It allows phases to be reorganized, reordered, combined, or performed partially, if that fits the need of the enterprise. It is also possible to jump back from any point to any other point within an iteration. The only constraint is that all intermediate steps between the two points must be carried out again.
TOGAF, from version 9 onward, has a new module called ADM Guidelines and Techniques. It provides specific guidelines about the adaptation of the ADM process in your particular enterprise environment. It also offers certain techniques for formalizing your architecture development and management.
To sum up, TOGAF ADM brings discipline to the architecture development process. It promotes a sense of consistency and repeatability while offering amazing flexibility. We have seen these qualities as being critical in practice when dealing with the management of any large-scale endeavor like EA. We will return to these aspects of TOGAF ADM in Chapter 7, “Towards Pragmatism: Lean and Agile EA.” As we will see there, TOGAF can be reconciled in a quite natural way with the flexibility of a lean and agile EA approach.


"use strict";
import { Platform, NativeModules } from "react-native";
import packageJson from "./package.json";
const { MixpanelReactNative } = NativeModules;
if (!MixpanelReactNative) {
throw new Error(`mixpanel-react-native: MixpanelReactNative is null.
Please follow the guide on the Github repository: https://github.com/mixpanel/mixpanel-react-native.`);
}
const DevicePlatform = {
Unknown: "Unknown",
Android: "android",
iOS: "ios"
}
const ERROR_MESSAGE = {
INVALID_OBJECT: " is not a valid json object",
INVALID_STRING: " is not a valid string",
REQUIRED_DOUBLE: " is not a valid number"
}
const PARAMS = {
TOKEN: "token",
DISTINCT_ID: "distinctId",
ALIAS: "alias",
EVENT_NAME: "eventName",
GROUP_KEY: "groupKey",
PROPERTIES: "properties",
PROPERTY_NAME: "propertyName",
PROP: "prop",
NAME: "name",
CHARGE: "charge",
PROPERTY_VALUE: "property value"
}
const DEFAULT_OPT_OUT = false;
/**
* The primary class for integrating Mixpanel with your app.
*/
export class Mixpanel {
constructor(token) {
if (!StringHelper.isValid(token)) {
StringHelper.raiseError(PARAMS.TOKEN);
}
this.token = token;
this.people = new People(this.token);
}
/**
* Initializes Mixpanel
*
* @param {boolean} Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
*
*/
async init(optOutTrackingDefault = DEFAULT_OPT_OUT) {
let metadata = Helper.getMetaData();
await MixpanelReactNative.initialize(this.token, optOutTrackingDefault, metadata);
}
/**
* @deprecated since version 1.3.0. To initialize Mixpanel, please use the instance method `init` instead. See the example below:
*
*

* const mixpanel = new Mixpanel('your project token');
* mixpanel.init();
*

*
* Initializes Mixpanel and return an instance of Mixpanel the given project token.
*
* @param {string} token your project token.
* @param {boolean} Optional Whether or not Mixpanel can start tracking by default. See optOutTracking()
*
*/
static async init(token, optOutTrackingDefault = DEFAULT_OPT_OUT) {
let metadata = Helper.getMetaData();
await MixpanelReactNative.initialize(token, optOutTrackingDefault, metadata);
return new Mixpanel(token);
}
/**
* Set the base URL used for Mixpanel API requests.
* Useful if you need to proxy Mixpanel requests. Defaults to https://api.mixpanel.com.
* To route data to Mixpanel's EU servers, set to https://api-eu.mixpanel.com
*
* @param {string} serverURL the base URL used for Mixpanel API requests
*
*/
setServerURL(serverURL) {
MixpanelReactNative.setServerURL(this.token, serverURL);
}
/**
* This allows enabling or disabling of all Mixpanel logs at run time.
* All logging is disabled by default. Usually, this is only required if
* you are running into issues with the SDK that you want to debug
*
* @param {boolean} loggingEnabled whether to enable logging
*
*/
setLoggingEnabled(loggingEnabled) {
MixpanelReactNative.setLoggingEnabled(this.token, loggingEnabled);
}
/**
* This controls whether to automatically send the client IP Address as part of event tracking.
* With an IP address, geo-location is possible down to neighborhoods within a city,
* although the Mixpanel Dashboard will just show you city level location specificity.
*
* @param {boolean} useIpAddressForGeolocation whether to automatically send the client IP Address.
* Defaults to true.
*
*/
setUseIpAddressForGeolocation(useIpAddressForGeolocation) {
MixpanelReactNative.setUseIpAddressForGeolocation(this.token, useIpAddressForGeolocation);
}
/**
* Will return true if the user has opted out from tracking.
*
* @return {Promise<boolean>} true if user has opted out from tracking. Defaults to false.
*/
hasOptedOutTracking() {
return MixpanelReactNative.hasOptedOutTracking(this.token);
}
/**
* Use this method to opt-in an already opted-out user from tracking. People updates and track
* calls will be sent to Mixpanel after using this method.
* This method will internally track an opt-in event to your project.
*
*/
optInTracking() {
MixpanelReactNative.optInTracking(this.token);
}
/**
* Use this method to opt-out a user from tracking. Events and people updates that haven't been
* flushed yet will be deleted. Use flush() before calling this method if you want
* to send all the queues to Mixpanel before.
*
* This method will also remove any user-related information from the device.
*/
optOutTracking() {
MixpanelReactNative.optOutTracking(this.token);
}
/**
* Associate all future calls to track() with the user identified by
* the given distinct id.
*
*
Calls to track() made before corresponding calls to identify
* will use an anonymous locally generated distinct id, which means it is best to call identify
* early to ensure that your Mixpanel funnels and retention analytics can continue to track the
* user throughout their lifetime. We recommend calling identify when the user authenticates.
*
*
Once identify is called, the local distinct id persists across restarts of
* your application.
*
* @param {string} distinctId a string uniquely identifying this user. Events sent to
* Mixpanel using the same disinct_id will be considered associated with the
* same visitor/customer for retention and funnel reporting, so be sure that the given
* value is globally unique for each individual user you intend to track.
*
*/
identify(distinctId) {
if (!StringHelper.isValid(distinctId)) {
StringHelper.raiseError(PARAMS.DISTINCT_ID);
}
MixpanelReactNative.identify(this.token, distinctId);
}
/**
* The alias method creates an alias which Mixpanel will use to remap one id to another.
* Multiple aliases can point to the same identifier.
*
* `mixpane.alias("New ID", mixpane.distinctId)`
* `mixpane.alias("Newer ID", mixpane.distinctId)`
*
*
This call does not identify the user after. You must still call both identify() and
* People.identify() if you wish the new alias to be used for Events and People.
*
* @param {string} alias A unique identifier that you want to use as an identifier for this user.
* @param {string} distinctId the current distinct_id that alias will be mapped to.
*/
alias(alias, distinctId) {
if (!StringHelper.isValid(alias)) {
StringHelper.raiseError(PARAMS.ALIAS);
}
if (!StringHelper.isValid(distinctId)) {
StringHelper.raiseError(PARAMS.DISTINCT_ID);
}
MixpanelReactNative.alias(this.token, alias, distinctId);
}
/**
* Track an event.
*
*
Every call to track eventually results in a data point sent to Mixpanel. These data points
* are what are measured, counted, and broken down to create your Mixpanel reports. Events
* have a string name, and an optional set of name/value pairs that describe the properties of
* that event.
*
* @param {string} eventName The name of the event to send
* @param {object} properties A Map containing the key value pairs of the properties to include in this event.
* Pass null if no extra properties exist.
*/
track(eventName, properties) {
if (!StringHelper.isValid(eventName)) {
StringHelper.raiseError(PARAMS.EVENT_NAME);
}
if (!ObjectHelper.isValidOrUndefined(properties)) {
ObjectHelper.raiseError(PARAMS.PROPERTIES);
}
MixpanelReactNative.track(this.token, eventName, properties || {});
}
/**
* Returns a Mixpanel People object that can be used to set and increment
* People Analytics properties.
*
* @return {People} an instance of People that you can use to update
* records in Mixpanel People Analytics
*/
getPeople() {
return this.people;
}
/**
* Track an event with specific groups.
*
*
Every call to track eventually results in a data point sent to Mixpanel. These data points
* are what are measured, counted, and broken down to create your Mixpanel reports. Events
* have a string name, and an optional set of name/value pairs that describe the properties of
* that event. Group key/value pairs are upserted into the property map before tracking.
*
* @param {string} eventName The name of the event to send
* @param {object} properties A Map containing the key value pairs of the properties to include in this event.
* Pass null if no extra properties exist.
* @param {object} groups A Map containing the group key value pairs for this event.
*
*/
trackWithGroups(eventName, properties, groups) {
if (!StringHelper.isValid(eventName)) {
StringHelper.raiseError(PARAMS.EVENT_NAME);
}
if (!ObjectHelper.isValidOrUndefined(properties)) {
ObjectHelper.raiseError(PARAMS.PROPERTIES);
}
MixpanelReactNative.trackWithGroups(this.token, eventName, properties || {}, groups);
}
/**
* Set the group this user belongs to.
*
* @param {string} groupKey The property name associated with this group type (must already have been set up).
* @param {object} groupID The group the user belongs to.
*/
setGroup(groupKey, groupID) {
if (!StringHelper.isValid(groupKey)) {
StringHelper.raiseError(PARAMS.GROUP_KEY);
}
MixpanelReactNative.setGroup(this.token, groupKey, groupID);
}
/**
* Returns a MixpanelGroup object that can be used to set and increment
* Group Analytics properties.
*
* @param {string} groupKey String identifying the type of group (must be already in use as a group key)
* @param {object} groupID Object identifying the specific group
* @return an instance of MixpanelGroup that you can use to update
* records in Mixpanel Group Analytics
*/
getGroup(groupKey, groupID) {
return new MixpanelGroup(this.token, groupKey, groupID);
}
/**
* Add a group to this user's membership for a particular group key
*
* @param {string} groupKey The property name associated with this group type (must already have been set up).
* @param {object} groupID The new group the user belongs to.
*/
addGroup(groupKey, groupID) {
if (!StringHelper.isValid(groupKey)) {
StringHelper.raiseError(PARAMS.GROUP_KEY);
}
MixpanelReactNative.addGroup(this.token, groupKey, groupID);
}
/**
* Remove a group from this user's membership for a particular group key
*
* @param {string} groupKey The property name associated with this group type (must already have been set up).
* @param {object} groupID The group value to remove.
*/
removeGroup(groupKey, groupID) {
if (!StringHelper.isValid(groupKey)) {
StringHelper.raiseError(PARAMS.GROUP_KEY);
}
MixpanelReactNative.removeGroup(this.token, groupKey, groupID);
}
/**
* Permanently deletes this group's record from Group Analytics.
*
* @param {string} groupKey String identifying the type of group (must be already in use as a group key)
* @param {object} groupID Object identifying the specific group
*
Calling deleteGroup deletes an entire record completely. Any future calls
* to Group Analytics using the same group value will create and store new values.
*/
deleteGroup(groupKey, groupID) {
if (!StringHelper.isValid(groupKey)) {
StringHelper.raiseError(PARAMS.GROUP_KEY);
}
MixpanelReactNative.deleteGroup(this.token, groupKey, groupID);
}
/**
* Register properties that will be sent with every subsequent call to track().
*
*
SuperProperties are a collection of properties that will be sent with every event to Mixpanel,
* and persist beyond the lifetime of your application.
*
*
Setting a superProperty with registerSuperProperties will store a new superProperty,
* possibly overwriting any existing superProperty with the same name (to set a
* superProperty only if it is currently unset, use registerSuperPropertiesOnce())
*
*
SuperProperties will persist even if your application is taken completely out of memory.
* to remove a superProperty, call unregisterSuperProperty() or clearSuperProperties()
*
* @param {object} properties A Map containing super properties to register
*/
registerSuperProperties(properties) {
if (!ObjectHelper.isValidOrUndefined(properties)) {
ObjectHelper.raiseError(PARAMS.PROPERTIES);
}
MixpanelReactNative.registerSuperProperties(this.token, properties || {});
}
/**
* Register super properties for events, only if no other super property with the
* same names has already been registered.
*
*
Calling registerSuperPropertiesOnce will never overwrite existing properties.
*
* @param {object} properties A Map containing the super properties to register.
*/
registerSuperPropertiesOnce(properties) {
if (!ObjectHelper.isValidOrUndefined(properties)) {
ObjectHelper.raiseError(PARAMS.PROPERTIES);
}
MixpanelReactNative.registerSuperPropertiesOnce(this.token, properties || {});
}
/**
* Remove a single superProperty, so that it will not be sent with future calls to track().
*
*
If there is a superProperty registered with the given name, it will be permanently
* removed from the existing superProperties.
* To clear all superProperties, use clearSuperProperties()
*
* @param {string} propertyName name of the property to unregister
*/
unregisterSuperProperty(propertyName) {
if (!StringHelper.isValid(propertyName)) {
StringHelper.raiseError(PARAMS.PROPERTY_NAME);
}
MixpanelReactNative.unregisterSuperProperty(this.token, propertyName);
}
/**
* Returns a json object of the user's current super properties
*
*
SuperProperties are a collection of properties that will be sent with every event to Mixpanel,
* and persist beyond the lifetime of your application.
*
* @return {Promise<object>} Super properties for this Mixpanel instance.
*/
getSuperProperties() {
return MixpanelReactNative.getSuperProperties(this.token);
}
/**
* Erase all currently registered superProperties.
*
*
Future tracking calls to Mixpanel will not contain the specific
* superProperties registered before the clearSuperProperties method was called.
*
*
To remove a single superProperty, use unregisterSuperProperty()
*/
clearSuperProperties() {
MixpanelReactNative.clearSuperProperties(this.token);
}
/**
* Begin timing of an event. Calling timeEvent("Thing") will not send an event, but
* when you eventually call track("Thing"), your tracked event will be sent with a "$duration"
* property, representing the number of seconds between your calls.
*
* @param {string} eventName the name of the event to track with timing.
*/
timeEvent(eventName) {
if (!StringHelper.isValid(eventName)) {
StringHelper.raiseError(PARAMS.EVENT_NAME);
}
MixpanelReactNative.timeEvent(this.token, eventName);
}
/**
* Retrieves the time elapsed for the named event since timeEvent() was called.
*
* @param {string} eventName the name of the event to be tracked that was previously called with timeEvent()
*
* @return {Promise<number>} Time elapsed since timeEvent(String) was called for the given eventName.
*/
eventElapsedTime(eventName) {
if (!StringHelper.isValid(eventName)) {
StringHelper.raiseError(PARAMS.EVENT_NAME);
}
return MixpanelReactNative.eventElapsedTime(this.token, eventName);
}
/**
Clear super properties and generates a new random distinctId for this instance.
Useful for clearing data when a user logs out.
*/
reset() {
MixpanelReactNative.reset(this.token);
}
/**
* Returns the current distinct id of the user.
* This is either the id automatically generated by the library or the id that has been passed by a call to identify().
*
* example of usage:
*

*
* const distinctId = await mixpanel.getDistinctId();
*
*

*
* @return {Promise<string>} A Promise to the distinct id associated with Mixpanel event and People Analytics
*
*/
getDistinctId() {
return MixpanelReactNative.getDistinctId(this.token);
}
/**
* Push all queued Mixpanel events and People Analytics changes to Mixpanel servers.
*
*
Events and People messages are pushed gradually throughout
* the lifetime of your application. This means that to ensure that all messages
* are sent to Mixpanel when your application is shut down, you will
* need to call flush() to let the Mixpanel library know it should
* send all remaining messages to the server.
*/
flush() {
MixpanelReactNative.flush(this.token);
}
}
/**
* Core class for using Mixpanel People Analytics features.
*
*
The People object is used to update properties in a user's People Analytics record,
* and to manage the receipt of push notifications sent via Mixpanel Engage.
* For this reason, it's important to call identify(String) on the People
* object before you work with it. Once you call identify, the user identity will
* persist across stops and starts of your application, until you make another
* call to identify using a different id.
*
*/
export class People {
constructor(token) {
if (!StringHelper.isValid(token)) {
StringHelper.raiseError(PARAMS.TOKEN);
}
this.token = token;
}
/**
* Sets a single property with the given name and value for this user.
* The given name and value will be assigned to the user in Mixpanel People Analytics,
* possibly overwriting an existing property with the same name.
*
* @param {string} prop The name of the Mixpanel property. This must be a String, for example "Zip Code"
* @param {object} to The value of the Mixpanel property. For "Zip Code", this value might be the String "90210"
*/
set(prop, to) {
let properties = {};
if (ObjectHelper.isValid(prop)) {
properties = JSON.parse(JSON.stringify(prop || {}));
} else {
if (!StringHelper.isValid(prop)) {
StringHelper.raiseError(PARAMS.PROP);
}
properties[prop] = to;
}
MixpanelReactNative.set(this.token, properties);
}
/**
* Works just like set(), except it will not overwrite existing property values. This is useful for properties like "First login date".
*
* @param {string} prop The name of the Mixpanel property. This must be a String, for example "Zip Code"
* @param {object} to The value of the Mixpanel property. For "Zip Code", this value might be the String "90210"
*/
setOnce(prop, to) {
let properties = {};
if (ObjectHelper.isValid(prop)) {
prop = prop || {};
properties = JSON.parse(JSON.stringify(prop));
} else {
if (!StringHelper.isValid(prop)) {
StringHelper.raiseError(PARAMS.PROP);
}
properties[prop] = to;
}
MixpanelReactNative.setOnce(this.token, properties);
}
/**
* Add the given amount to an existing property on the identified user. If the user does not already
* have the associated property, the amount will be added to zero. To reduce a property,
* provide a negative number for the value.
*
* @param {string} prop the People Analytics property that should have its value changed
* @param {number} by the amount to be added to the current value of the named property
*
*/
increment(prop, by) {
var add = {};
if (ObjectHelper.isValid(prop)) {
Object.keys(prop).forEach(function (key) {
var val = prop[key];
if (isNaN(parseFloat(val))) {
throw new Error(`${PARAMS.PROPERTY_VALUE}${ERROR_MESSAGE.REQUIRED_DOUBLE}`);
}
add[key] = val;
});
} else {
by = by || 1;
if (isNaN(parseFloat(by))) {
throw new Error(`${PARAMS.PROPERTY_VALUE}${ERROR_MESSAGE.REQUIRED_DOUBLE}`);
}
if (!StringHelper.isValid(prop)) {
StringHelper.raiseError(PARAMS.NAME);
}
add[prop] = by;
}
MixpanelReactNative.increment(this.token, add);
}
/**
* Appends a value to a list-valued property. If the property does not currently exist,
* it will be created as a list of one element. If the property does exist and doesn't
* currently have a list value, the append will be ignored.
* @param {string} name the People Analytics property that should have it's value appended to
* @param {object} value the new value that will appear at the end of the property's list
*/
append(name, value) {
let appendProp = {};
if (!StringHelper.isValid(name)) {
StringHelper.raiseError(PARAMS.NAME);
} else {
appendProp[name] = value;
}
if (DevicePlatform.iOS === Helper.getDevicePlatform()) {
MixpanelReactNative.append(this.token, appendProp);
} else {
MixpanelReactNative.append(this.token, name, value);
}
}
/**
* Adds values to a list-valued property only if they are not already present in the list.
* If the property does not currently exist, it will be created with the given list as it's value.
* If the property exists and is not list-valued, the union will be ignored.
*
* @param {string} name name of the list-valued property to set or modify
* @param {array} value an array of values to add to the property value if not already present
*/
union(name, value) {
if (!StringHelper.isValid(name)) {
StringHelper.raiseError(PARAMS.NAME);
}
value = Array.isArray(value) ? value : [value];
if (DevicePlatform.iOS === Helper.getDevicePlatform()) {
MixpanelReactNative.union(this.token, {[name]: value});
} else {
MixpanelReactNative.union(this.token, name, value);
}
}
/**
* Remove value from a list-valued property only if they are already present in the list.
* If the property does not currently exist, the remove will be ignored.
* If the property exists and is not list-valued, the remove will be ignored.
* @param {string} name the People Analytics property that should have it's value removed from
* @param {object} value the value that will be removed from the property's list
*/
remove(name, value) {
let removeProp = {};
if (!StringHelper.isValid(name)) {
StringHelper.raiseError(PARAMS.NAME);
} else {
removeProp[name] = value;
}
if (DevicePlatform.iOS === Helper.getDevicePlatform()) {
MixpanelReactNative.remove(this.token, removeProp);
} else {
MixpanelReactNative.remove(this.token, name, value);
}
}
/**
* permanently removes the property with the given name from the user's profile
* @param {string} name name of a property to unset
*/
unset(name) {
if (!StringHelper.isValid(name)) {
StringHelper.raiseError(PARAMS.PROPERTY_NAME);
}
MixpanelReactNative.unset(this.token, name);
}
/**
* Track a revenue transaction for the identified people profile.
*
* @param {number} charge the amount of money exchanged. Positive amounts represent purchases or income from the customer, negative amounts represent refunds or payments to the customer.
* @param {object} properties an optional collection of properties to associate with this transaction.
*/
trackCharge(charge, properties) {
if (isNaN(parseFloat(charge))) {
throw new Error(`${PARAMS.CHARGE}${ERROR_MESSAGE.REQUIRED_DOUBLE}`)
}
if (!ObjectHelper.isValidOrUndefined(properties)) {
ObjectHelper.raiseError(PARAMS.PROPERTIES);
}
MixpanelReactNative.trackCharge(this.token, charge, properties || {});
}
/**
* Permanently clear the whole transaction history for the identified people profile.
*/
clearCharges() {
MixpanelReactNative.clearCharges(this.token);
}
/**
* Permanently deletes the identified user's record from People Analytics.
*
*
Calling deleteUser deletes an entire record completely. Any future calls
* to People Analytics using the same distinct id will create and store new values.
*/
deleteUser() {
MixpanelReactNative.deleteUser(this.token);
}
}
/**
* Core class for using Mixpanel Group Analytics features.
*
*
The MixpanelGroup object is used to update properties in a group's Group Analytics record.
*/
export class MixpanelGroup {
constructor(token, groupKey, groupID) {
if (!StringHelper.isValid(token)) {
StringHelper.raiseError(PARAMS.TOKEN);
}
this.token = token;
this.groupKey = groupKey;
this.groupID = groupID;
}
/**
* Sets a single property with the given name and value for this group.
* The given name and value will be assigned to the user in Mixpanel Group Analytics,
* possibly overwriting an existing property with the same name.
*
* @param {string} prop The name of the Mixpanel property. This must be a String, for example "Zip Code"
* @param {string} to The value to set on the given property name. For "Zip Code", this value might be the String "90210"
*/
set(prop, to) {
let properties = {};
if (ObjectHelper.isValid(prop)) {
properties = JSON.parse(JSON.stringify(prop || {}));
} else {
if (!StringHelper.isValid(prop)) {
StringHelper.raiseError(PARAMS.PROP);
}
properties[prop] = to;
}
MixpanelReactNative.groupSetProperties(this.token, this.groupKey, this.groupID, properties);
}
/**
* Works just like groupSet() except it will not overwrite existing property values. This is useful for properties like "First login date".
*
* @param {string} prop The name of the Mixpanel property. This must be a String, for example "Zip Code"
* @param {string} to The value to set on the given property name. For "Zip Code", this value might be the String "90210"
*/
setOnce(prop, to) {
let properties = {};
if (ObjectHelper.isValid(prop)) {
properties = JSON.parse(JSON.stringify(prop || {}));
} else {
if (!StringHelper.isValid(prop)) {
StringHelper.raiseError(PARAMS.PROP);
}
properties[prop] = to;
}
MixpanelReactNative.groupSetPropertyOnce(this.token, this.groupKey, this.groupID, properties);
}
/**
* Permanently removes the property with the given name from the group's profile
*
* @param {string} prop name of a property to unset
*/
unset(prop) {
if (!StringHelper.isValid(prop)) {
StringHelper.raiseError(PARAMS.PROPERTY_NAME);
}
MixpanelReactNative.groupUnsetProperty(this.token, this.groupKey, this.groupID, prop);
}
/**
* Remove value from a list-valued property only if it is already present in the list.
* If the property does not currently exist, the remove will be ignored.
* If the property exists and is not list-valued, the remove will be ignored.
*
* @param {string} name the Group Analytics list-valued property that should have a value removed
* @param {any} value the value that will be removed from the list
*/
remove(name, value) {
if (!StringHelper.isValid(name)) {
StringHelper.raiseError(PARAMS.PROPERTY_NAME);
}
MixpanelReactNative.groupRemovePropertyValue(this.token, this.groupKey, this.groupID, name, value);
}
/**
* Adds values to a list-valued property only if they are not already present in the list.
* If the property does not currently exist, it will be created with the given list as its value.
* If the property exists and is not list-valued, the union will be ignored.
*
* @param {string} name name of the list-valued property to set or modify
* @param {array} value an array of values to add to the property value if not already present
*/
union(name, value) {
if (!StringHelper.isValid(name)) {
StringHelper.raiseError(PARAMS.PROPERTY_NAME);
}
value = Array.isArray(value) ? value : [value];
MixpanelReactNative.groupUnionProperty(this.token, this.groupKey, this.groupID, name, value);
}
}
class Helper {
/**
Get the library data from package.json file.
*/
static getMetaData() {
let metadata = JSON.parse(JSON.stringify(packageJson.metadata));
metadata["$lib_version"] = packageJson.version;
return metadata;
}
/**
Get current device platform.
*/
static getDevicePlatform() {
switch (Platform.OS) {
case "android":
return DevicePlatform.Android;
case "ios":
return DevicePlatform.iOS;
default:
return DevicePlatform.Unknown;
}
}
}
class StringHelper {
/**
Check whether the parameter is not a blank string.
*/
static isValid(str) {
return typeof str === "string" && !(/^\s*$/).test(str);
}
/**
Check whether the parameter is undefined or not a blank string.
*/
static isValidOrUndefined(str) {
return str === undefined || StringHelper.isValid(str);
}
/**
Raise a string validation error.
*/
static raiseError(paramName) {
throw new Error(`${paramName}${ERROR_MESSAGE.INVALID_STRING}`);
}
}
class ObjectHelper {
/**
Check whether the parameter is an object.
*/
static isValid(obj) {
return typeof obj === "object";
}
/**
Check whether the parameter is undefined or an object.
*/
static isValidOrUndefined(obj) {
return obj === undefined || ObjectHelper.isValid(obj);
}
/**
Raise an object validation error.
*/
static raiseError(paramName) {
throw new Error(`${paramName}${ERROR_MESSAGE.INVALID_OBJECT}`);
}
}


Adobe confirms some of the new features coming to Photoshop for iPad
Source: iMore
What you need to know
- Adobe has announced some of its planned updates for Photoshop for iPad.
- Adobe released Photoshop at Adobe MAX earlier this month to mixed reviews.
- New features on the way include 'Select Subject', cloud documents and 'Refine Edge'.
Adobe has offered us some insight into how it plans to upgrade and improve its new Photoshop for iPad software in 2019 and also next year.
In the post, Pam Clark, product manager for Photoshop, gave her thanks to all the customers who have downloaded the app and started creating with it. She spoke briefly about how Abode had built Photoshop for iPad, specifically version 1.0, to feature its top workflows, compositing, masking and retouching, things she described as "core" features of any project. The goal, she says, was to create "a seamless experience so you can create anywhere you have Photoshop, on the desktop or on the iPad."
However, Adobe reckons that they have only just started to scratch the surface. Taking user feedback on board, they described some of the things in the pipeline for the app.
Source: Adobe
In 2019, Adobe will bring Select Subject to the app, which uses Adobe Sensei AI machine learning technology to allow you to automatically select objects within your composition. this feature was demoed at Adobe MAX but not included in the release. It also points to a new cloud documents system, that will save documents between Photoshop on iPad and desktop to make working between the two seamless:
The Photoshop cloud document format is optimized to save only the incremental changes made to the PSD, making it the fastest way to work across all your devices with Photoshop. For example, if you change just one pixel, only that pixel syncs to the cloud. In December we will begin the rollout of system optimizations that deliver even swifter upload and download of cloud documents than what's in the app today.
In 2020, the Refine Edge brush will be added to the app, along with Curves and Adjustment Layer Options. Also on the way is brush sensitivity, rotate canvas and Lightroom Integration.
The initial reaction to Photoshop for iPad was mixed, many lauded the long-awaited arrival of the app on the App Store, however plenty of users seemed to be disappointed with a lack of features, so much so that Abode Chief Product Officer Scott Belsky took to Twitter to defend the release. You can check out our full review of Photoshop for iPad here.
We may earn a commission for purchases using our links. Learn more.


Unordered list
Babylonian Gods
Ordered list
Roman Gods
- Mercury
- Relates to the word merx as merchandise
- Apollo
- Diana
Description List
Japanese Gods
- Amaterasu-Omikami
- Goddess of the Sun
- Hachiman
- God of war. Originally and agricultural deity
- Suijin
- God of water


Hey I am using the arduino based setup as explained on the website. The input source that I am feeding is via a voltage source having 50 V with a resistance and the current value in the ammeter being 1 Amps
.
When i test the output values on the pins of 3.5 mm jack, the values do change when I change the voltage. But I had kept the voltage as 50 V and then fed this data to the arduino, the current value which was controlled by the resistance being 1 Amp.
I had also changed the calibration values and the voltage in the code for current only.
The problem now is that the values on the serial monitor is same even before plugging the CT sensor and after plugging in the ST sensor.
Should I increase the current value and ultimately the voltage value from the voltage source to get some values ?
Can any one help me with this ??
Re: Problem in setting up CT sensor with arduino
Is your 50V source AC or DC? The CT will not detect anything if only DC current is flowing.
There are a couple of simple sketches on my Summary Page which you could try. MinMaxAndRangeChecker.ino will show the values that the ADC is generating for the first four analog inputs. RawSamplesTool_4ss_2.ino will give you a graphical display of your voltage and current waveforms (but only if you have a voltage sensor and have an AC signal present)
Hope this helps.
Re: Problem in setting up CT sensor with arduino
My 50V source is AC source. I tried measuring voltage on the analog pin with and without switching on the CT sensor and the voltage remains the same,but when I try to read the change in voltage on the pins of 3.5mm jack and vary the voltage on the source the voltage on the pins of 3.5mm also vary.
Re: Problem in setting up CT sensor with arduino
Are you copying this page: http://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface ? What value burden resistor are you using? The c.t. is a current source and will give you 50 mA per 100 A of primary current. In your case, if your primary current is 1 A, you should expect a secondary current of 0.5 mA. That current flows in the burden resistor and generates a voltage at the analogue input. If you have a 33 Ω burden resistor, you will get only 16.5 mV.
The analogue input requires 2.5 V peak - approx 1.77 V rms - for a 5 V Arduino for full scale. Your input is less than 1% of this. You should get a reading, but it will not be very accurate - the error may easily be worse than 10%.
What you can do for testing is multiply the current. To do that, you use a multi-turn primary winding - you pass the wire through the c.t. several times. If you want your Voltbox to give the equivalent of 10 A, make a 10-turn coil and clip the c.t. over the bundle of 10 turns. Explanation: transformers work on ampere.turns (amperes × turns) so 1 pass through the core carrying 10 A is the same as 10 passes carrying 1 A, or 2 passes carrying 5 A.
Re: Problem in setting up CT sensor with arduino
Yes. I am following that page with the burden resistance of 33 ohms. I am using 5v from arduino and hence the calibration value in the code being 60.6.
Also I should measure the AC current on the 2 pins of the 3.5mm jack ? right ?? because it came out to be 0 when I earlier tested it and I get that it was due to very small values of current.
Also without plugging in the CT sensor and only supplying the 5 V from arduino, when I measured the DC voltage at the wire being sent as analog input and the ground, it cam out to be 2.6 V. Is this normal ?
So now what I will do is that without changing anything, I will just increase the no. of turns in the CT, keeping everything else the same.
Re: Problem in setting up CT sensor with arduino
Also I should measure the AC current on the 2 pins of the 3.5mm jack ? right ??
My suggestion is that you use the ADC in your Arduino to take your measurements. For this, you will need to build one or more of the standard sensor circuits that are well described in the Building Blocks section. You can inspect the values that the ADC is generating by using the sketches that I suggested earlier. Taking direct measurements from the jack-plug of the CT is unlikely to give you any results that we can help with.
With a properly set up system, there is no need for multiple turns around the CT. You should be able to detect a small flow of AC current when your is wire going through the CT only once. Multiple turns is a useful technique to see what happens when a large current flows.
Re: Problem in setting up CT sensor with arduino
You can find which are the connections to the secondary winding of your c.t. by measuring the resistance. You should see about 100 Ω. The standard connection is to tip and sleeve, there is no connection to the ring.
Look at the diagram on the page you are copying, and you will see that 2.5 V d.c is the correct quiescent value for the input. 2.6 V is close enough, though it will restrict very slightly the maximum current that you can measure.
Re: Problem in setting up CT sensor with arduino
Hi Robert
My sct013 only show the voltage AC , I measure it with Digital meter. I can read the current with the schematic on the tutorial http://openenergymonitor.org/emon/buildingblocks/how-to-build-an-arduino...
can you help me how to change the hardware so that I can measure current by Sct013
Re: Problem in setting up CT sensor with arduino
I do not understand your question.
A current transformer measures current. It has no knowledge of the voltage on the wire and it cannot measure voltage.
"SCT-013" is a family of current transformers, there are 10 different variants. The SCT-013-000 gives an output current of 50 mA for a current of 100 A. You must add a burden resistor to convert that current to a voltage. All the others have the burden resistor inside the casing and give you a voltage output of 1 V at the rated current.
Which CT do you have - the exact part number?


Hello! My name is Benjo Kho, and this is me playing around with websites. I'm using this to play around with the things I've learned about HTML and CSS. Go ahead and look around!
Link to boxing gym website I'm practicing on. It's normal website with a splash page that uses the one-page website's philosophy. I was initially trying to improve this MMA website but I ended up making a pure boxing gym due to the availability of clearer pictures. I don't own any of these pictures.
This is me trying to improve this guitar lesson website. I'm subscribed to that guy and seeing such a skilled guitarist work with such mediocre tech saddens me. I want to make something better and see if I could offer my services to him.
Ball that bounces. I made this in createJS so I remind me how to use it. I made a game before but I lost it. Now that I have a place to put it, it's gone. Ahh well.


When Do You Need To Compile A Directive In AngularJS
Heather
(static)
Kim
(static)
{{ friend }}
(ng-repeat)
Heather
(static)
Kim
(static)
{{ friend }}
(ng-repeat)


Class Instagram
Instagram class.
Final
Namespace: Instagram
Package: Instagram
License: MIT
Author: Hassan Khan<EMAIL_ADDRESS>Link: https://github.com/hassankhan/instagram-sdk
Located at Instagram.php
Namespace: Instagram
Package: Instagram
License: MIT
Author: Hassan Khan<EMAIL_ADDRESS>Link: https://github.com/hassankhan/instagram-sdk
Located at Instagram.php
public
|
#
__construct( string $clientId, string $clientSecret, string|null $accessToken = null, string $redirectUrl = '', array $options = [] )
Create an instance of |
protected
League\Container\ContainerInterface
|
#
buildContainer( array $options )
Takes the constructor parameters and uses them to instantiate and build a
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
paginate(
Paginates a |
public
string
|
|
public
League\OAuth2\Client\Token\AccessToken
|
#
getAccessToken( string $code, string $grant = 'authorization_code' )
Sets and returns the access token. |
public
|
#
setAccessToken( League\OAuth2\Client\Token\AccessToken $token )
Sets an access token and adds it to |
public
|
#
secureRequests( boolean $enable = true )
Enables or disables secure requests by adding or removing
|
integer |
API_VERSION
The current version of the API. |
#
1
|
protected
League\Container\Container
|
$container
The application IoC container. |


Mock Interview
Please allow access to camera and mic to review your answers later
Add Custom Interview Questions (Optional)
Add
Start Interview
back
Show Code
Show Menu


Load packages
library(tidyverse)
Motivation
Importing data to R can cause headaches for newbies. For some, the concept of relative and absolute paths is new. That’s why I compiled here some recommendations on how to important data into R and on how to ditch the “what’s my path” problem.
Approach 1: Start an RStudio project
That’s an approach I generally recommend.
- Start an RStudio project.
- Put your code files and your data files in this very folder.
- Import the data without specifying any paths, eg.,
d <- read.csv("mydata.csv)
Approach 2: Import from an online source
That’s also convenient – as long as someone has put the data online.
- Identify the URL of your data set, and copy it.
- Open up an R/Rmd script file and paste the URL to your import function, e.g,.
d <- read.csv("https://vincentarelbundock.github.io/Rdatasets/csv/reshape2/tips.csv")
Approach 3: Learn what a path means
- Identify the location (path) of your data file on your computer.
- Copy it to the clipboard (depends on your operating system).
- Paste it into your import function, e.g, `d <- read.csv(“/Users/sebastiansaueruser/datasets/tips.csv”)
Example time – dataset tips
tips <- read.csv("https://vincentarelbundock.github.io/Rdatasets/csv/reshape2/tips.csv")


--- layout: post title: 'Techie Tidbits: Get Going with Cygwin' date: '2010-10-04T00:56:00.009+01:00' author: Darren Bishop tags: - Bash - Tidbits - Cygwin modified_time: '2010-10-04T01:50:09.100+01:00' blogger_id: tag:blogger.com,1999:blog-3826577489563855618.post-7720934410922473030 blogger_orig_url: http://blog.darrenbishop.com/2010/10/techie-tidbits-get-going-with-cygwin.html --- Installing Cygwin is a pretty straight forward exercise - but here I walk-through a few extra configuration steps that make Cygwin a real productivity catalyst for my day-to-day activities.
setup.exe
file from here. I usually install to C:\Cygwin
and stick all the package stuff in C:\Cygwin\.pkg
, where I also stick the setup.exe
, once I've initially finished with it.
/home
/home
directory and symlink to C:\Documents and Settings
(this some how still works on Win 7, but we could easily use C:\Users
):
cd / rm -fr home ln -s "C:\Documents and Settings" homeThis now relieves you of having to maintain two home directories - after a while of using Cygwin you'll start to wonder why they didn't do this automatically.
In the Select Packages screen, search for and install both chere
and mintty
packages. If you happen to be reading this through once first, you can go ahead and do this step when you first install Cygwin (in step 1).
Now fire up a shell and enter the following command;
chere -ia1 -t mintty -s bash -e 'Bash Here'Now you should be able to right click on any directory in Windows Explorer and have a Bash Here option


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/set.20intersection.html ---
I am trying to understand the has_Inf instance of submodule defined at https://github.com/leanprover/mathlib/blob/master/linear_algebra/basic.lean#L240
How does the carrier definition work?
⋂ s ∈ S, ↑s
I am not sure how it's desugared or how this definition works
it is ⋂ s, ⋂ H : s ∈ S, ↑s
H?
you mean ⋂ s, ⋂ S : s ∈ S, ↑s
?
no, I mean what I typed
also ⋂ s : submodule α β, ⋂ H : s ∈ S, ↑s
Last updated: Apr 24 2020 at 19:02 UTC


ActiveReader
I have a terrible time learning and retaining content from reading articles or textbooks, so I wrote a little bit of code to take a block of text and turn it into a multiple choice quiz by removing one word from every sentence. It’s called ActiveReader, and the code behind it is available on GitHub.
See the screenshots below for a glimpse of it in action, or try it yourself here.
Written on February 14, 2017


| Up | TOC | Index | |||||
| << 7 Included Tools | < 8.19 Locale Routines | Up: 8 API Reference | 8.21 Regular Expressions > | 9 Release Notes >> |
8.20 Locale Names
8.20.1 Constants
Windows locale names:
| af-ZA | sq-AL | gsw-FR | am-ET | ar-DZ | ar-BH | ar-EG | ar-IQ |
| ar-JO | ar-KW | ar-LB | ar-LY | ar-MA | ar-OM | ar-QA | ar-SA |
| ar-SY | ar-TN | ar-AE | ar-YE | hy-AM | as-IN | az-Cyrl-AZ | az-Latn-AZ |
| ba-RU | eu-ES | be-BY | bn-IN | bs-Cyrl-BA | bs-Latn-BA | br-FR | bg-BG |
| ca-ES | zh-HK | zh-MO | zh-CN | zh-SG | zh-TW | co-FR | hr-BA |
| hr-HR | cs-CZ | da-DK | prs-AF | dv-MV | nl-BE | nl-NL | en-AU |
| en-BZ | en-CA | en-029 | en-IN | en-IE | en-JM | en-MY | en-NZ |
| en-PH | en-SG | en-ZA | en-TT | en-GB | en-US | en-ZW | et-EE |
| fo-FO | fil-PH | fi-FI | fr-BE | fr-CA | fr-FR | fr-LU | fr-MC |
| fr-CH | fy-NL | gl-ES | ka-GE | de-AT | de-DE | de-LI | de-LU |
| de-CH | el-GR | kl-GL | gu-IN | ha-Latn-NG | he-IL | hi-IN | hu-HU |
| is-IS | ig-NG | id-ID | iu-Latn-CA | iu-Cans-CA | ga-IE | it-IT | it-CH |
| ja-JP | kn-IN | kk-KZ | kh-KH | qut-GT | rw-RW | kok-IN | ko-KR |
| ky-KG | lo-LA | lv-LV | lt-LT | dsb-DE | lb-LU | mk-MK | ms-BN |
| ms-MY | ml-IN | mt-MT | mi-NZ | arn-CL | mr-IN | moh-CA | mn-Cyrl-MN |
| mn-Mong-CN | ne-IN | ne-NP | nb-NO | nn-NO | oc-FR | or-IN | ps-AF |
| fa-IR | pl-PL | pt-BR | pt-PT | pa-IN | quz-BO | quz-EC | quz-PE |
| ro-RO | rm-CH | ru-RU | smn-FI | smj-NO | smj-SE | se-FI | se-NO |
| se-SE | sms-FI | sma-NO | sma-SE | sa-IN | sr-Cyrl-BA | sr-Latn-BA | sr-Cyrl-CS |
| sr-Latn-CS | ns-ZA | tn-ZA | si-LK | sk-SK | sl-SI | es-AR | es-BO |
| es-CL | es-CO | es-CR | es-DO | es-EC | es-SV | es-GT | es-HN |
| es-MX | es-NI | es-PA | es-PY | es-PE | es-PR | es-ES | es-ES_tradnl |
| es-US | es-UY | es-VE | sw-KE | sv-FI | sv-SE | syr-SY | tg-Cyrl-TJ |
| tmz-Latn-DZ | ta-IN | tt-RU | te-IN | th-TH | bo-BT | bo-CN | tr-TR |
| tk-TM | ug-CN | uk-UA | wen-DE | tr-IN | ur-PK | uz-Cyrl-UZ | uz-Latn-UZ |
| vi-VN | cy-GB | wo-SN | xh-ZA | sah-RU | ii-CN | yo-NG | zu-ZA |
<IP_ADDRESS> w32_names
include std/localeconv.e namespace localconv public constant w32_names
<IP_ADDRESS> w32_name_canonical
include std/localeconv.e namespace localconv public constant w32_name_canonical
Canonical locale names for Windows:
| Afrikaans_South Africa | Afrikaans_South Africa | Afrikaans_South Africa |
| Afrikaans_South Africa | Afrikaans_South Africa | Afrikaans_South Africa |
| Afrikaans_South Africa | Afrikaans_South Africa | Afrikaans_South Africa |
| Afrikaans_South Africa | Afrikaans_South Africa | Afrikaans_South Africa |
| Afrikaans_South Africa | Afrikaans_South Africa | Afrikaans_South Africa |
| Afrikaans_South Africa | Afrikaans_South Africa | Afrikaans_South Africa |
| Afrikaans_South Africa | Afrikaans_South Africa | Afrikaans_South Africa |
| Afrikaans_South Africa | Afrikaans_South Africa | Afrikaans_South Africa |
| Basque_Spain | Basque_Spain | Belarusian_Belarus |
| Belarusian_Belarus | Belarusian_Belarus | Belarusian_Belarus |
| Belarusian_Belarus | Belarusian_Belarus | Catalan_Spain |
| Catalan_Spain | Catalan_Spain | Catalan_Spain |
| Catalan_Spain | Catalan_Spain | Catalan_Spain |
| Catalan_Spain | Catalan_Spain | Catalan_Spain |
| Danish_Denmark | Danish_Denmark | Danish_Denmark |
| Danish_Denmark | Danish_Denmark | English_Australia |
| English_United States | English_United States | English_United States |
| English_United States | English_United States | English_United States |
| English_United States | English_United States | English_United States |
| English_United States | English_United States | English_United States |
| English_United States | English_United States | English_United States |
| English_United States | English_United States | English_United States |
| Finnish_Finland | French_France | French_France |
| French_France | French_France | French_France |
| French_France | French_France | French_France |
| French_France | French_France | French_France |
| French_France | French_France | French_France |
| French_France | French_France | French_France |
| French_France | French_France | French_France |
| Hungarian_Hungary | Hungarian_Hungary | Hungarian_Hungary |
| Hungarian_Hungary | Hungarian_Hungary | Hungarian_Hungary |
| Hungarian_Hungary | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Italian_Italy | Italian_Italy |
| Italian_Italy | Romanian_Romania | Romanian_Romania |
| Russian_Russia | Russian_Russia | Russian_Russia |
| Russian_Russia | Serbian (Cyrillic)_Serbia | Serbian (Cyrillic)_Serbia |
| Serbian (Cyrillic)_Serbia | Serbian (Cyrillic)_Serbia | Serbian (Cyrillic)_Serbia |
| Serbian (Cyrillic)_Serbia | Serbian (Cyrillic)_Serbia | Serbian (Cyrillic)_Serbia |
| Serbian (Cyrillic)_Serbia | Serbian (Cyrillic)_Serbia | Serbian (Cyrillic)_Serbia |
| Serbian (Cyrillic)_Serbia | Serbian (Cyrillic)_Serbia | Serbian (Cyrillic)_Serbia |
| Serbian (Cyrillic)_Serbia | Slovak_Slovakia | Estonian_Estonia |
| Estonian_Estonia | Estonian_Estonia | Estonian_Estonia |
| Estonian_Estonia | Estonian_Estonia | Estonian_Estonia |
| Estonian_Estonia | Estonian_Estonia | Estonian_Estonia |
| Estonian_Estonia | Estonian_Estonia | Estonian_Estonia |
| Estonian_Estonia | Estonian_Estonia | Estonian_Estonia |
| Estonian_Estonia | Estonian_Estonia | Estonian_Estonia |
| Estonian_Estonia | Estonian_Estonia | Swedish_Sweden |
| Swedish_Sweden | Swedish_Sweden | Swedish_Sweden |
| Swedish_Sweden | Swedish_Sweden | Swedish_Sweden |
| Swedish_Sweden | Swedish_Sweden | Swedish_Sweden |
| Swedish_Sweden | Swedish_Sweden | Swedish_Sweden |
| Swedish_Sweden | Swedish_Sweden | Ukrainian_Ukraine |
| Ukrainian_Ukraine | Ukrainian_Ukraine | Ukrainian_Ukraine |
| Ukrainian_Ukraine | Ukrainian_Ukraine | Ukrainian_Ukraine |
| Ukrainian_Ukraine | Ukrainian_Ukraine | Ukrainian_Ukraine |
| Ukrainian_Ukraine | Ukrainian_Ukraine | Ukrainian_Ukraine |
| Ukrainian_Ukraine |
<IP_ADDRESS> posix_names
include std/localeconv.e namespace localconv public constant posix_names
POSIX locale names:
| af_ZA | sq_AL | gsw_FR | am_ET | ar_DZ | ar_BH | ar_EG | ar_IQ |
| ar_JO | ar_KW | ar_LB | ar_LY | ar_MA | ar_OM | ar_QA | ar_SA |
| ar_SY | ar_TN | ar_AE | ar_YE | hy_AM | as_IN | az_Cyrl_AZ | az_Latn_AZ |
| ba_RU | eu_ES | be_BY | bn_IN | bs_Cyrl_BA | bs_Latn_BA | br_FR | bg_BG |
| ca_ES | zh_HK | zh_MO | zh_CN | zh_SG | zh_TW | co_FR | hr_BA |
| hr_HR | cs_CZ | da_DK | prs_AF | dv_MV | nl_BE | nl_NL | en_AU |
| en_BZ | en_CA | en_029 | en_IN | en_IE | en_JM | en_MY | en_NZ |
| en_PH | en_SG | en_ZA | en_TT | en_GB | en_US | en_ZW | et_EE |
| fo_FO | fil_PH | fi_FI | fr_BE | fr_CA | fr_FR | fr_LU | fr_MC |
| fr_CH | fy_NL | gl_ES | ka_GE | de_AT | de_DE | de_LI | de_LU |
| de_CH | el_GR | kl_GL | gu_IN | ha_Latn_NG | he_IL | hi_IN | hu_HU |
| is_IS | ig_NG | id_ID | iu_Latn_CA | iu_Cans_CA | ga_IE | it_IT | it_CH |
| ja_JP | kn_IN | kk_KZ | kh_KH | qut_GT | rw_RW | kok_IN | ko_KR |
| ky_KG | lo_LA | lv_LV | lt_LT | dsb_DE | lb_LU | mk_MK | ms_BN |
| ms_MY | ml_IN | mt_MT | mi_NZ | arn_CL | mr_IN | moh_CA | mn_Cyrl_MN |
| mn_Mong_CN | ne_IN | ne_NP | nb_NO | nn_NO | oc_FR | or_IN | ps_AF |
| fa_IR | pl_PL | pt_BR | pt_PT | pa_IN | quz_BO | quz_EC | quz_PE |
| ro_RO | rm_CH | ru_RU | smn_FI | smj_NO | smj_SE | se_FI | se_NO |
| se_SE | sms_FI | sma_NO | sma_SE | sa_IN | sr_Cyrl_BA | sr_Latn_BA | sr_Cyrl_CS |
| sr_Latn_CS | ns_ZA | tn_ZA | si_LK | sk_SK | sl_SI | es_AR | es_BO |
| es_CL | es_CO | es_CR | es_DO | es_EC | es_SV | es_GT | es_HN |
| es_MX | es_NI | es_PA | es_PY | es_PE | es_PR | es_ES | es_ES_tradnl |
| es_US | es_UY | es_VE | sw_KE | sv_FI | sv_SE | syr_SY | tg_Cyrl_TJ |
| tmz_Latn_DZ | ta_IN | tt_RU | te_IN | th_TH | bo_BT | bo_CN | tr_TR |
| tk_TM | ug_CN | uk_UA | wen_DE | tr_IN | ur_PK | uz_Cyrl_UZ | uz_Latn_UZ |
| vi_VN | cy_GB | wo_SN | xh_ZA | sah_RU | ii_CN | yo_NG | zu_ZA |
<IP_ADDRESS> locale_canonical
include std/localeconv.e namespace localconv public constant locale_canonical
<IP_ADDRESS> platform_locale
include std/localeconv.e namespace localconv public constant platform_locale
8.20.2 Locale Name Translation
<IP_ADDRESS> canonical
include std/localeconv.e namespace localconv public function canonical(sequence new_locale)
Get canonical name for a locale.
Parameters:
- new_locale : a sequence, the string for the locale.
Returns:
A sequence, either the translated locale on success or new_locale on failure.
See Also:
<IP_ADDRESS> decanonical
include std/localeconv.e namespace localconv public function decanonical(sequence new_locale)
gets the translation of a locale string for current platform.
Parameters:
- new_locale: a sequence, the string for the locale.
Returns:
A sequence, either the translated locale on success or new_locale on failure.
See Also:
<IP_ADDRESS> canon2win
include std/localeconv.e namespace localconv public function canon2win(sequence new_locale)
gets the translation of a canoncial locale string for the Windows platform.
Parameters:
- new_locale: a sequence, the string for the locale.
Returns:
A sequence, either the Windows native locale name on success or "C" on failure.
See Also:
get, set, canonical, decanonical


|
intprim_framework_ros
|
IntPrimService acts as a middle-man between the interaction_core (C++) and intprim (Python) libraries. More...
Public Member Functions | |
| def | __init__ (self) |
| Initializes the IntPrimService class. More... | |
| def | create_model (self, modality_params) |
| Creates a basis model for the given set of modality_params. More... | |
| def | read_parameters (self) |
| Reads the parameters from /bip[x] and calculates internal state information, such as which DoFs are active and which are used to generate a response trajectory. More... | |
| def | initialize_state (self) |
| Initializes the current internal state. More... | |
| def | add_demonstration_callback (self, request) |
| Callback for adding a demonstration. More... | |
| def | compute_standardization_callback (self, request) |
| Callback for computing scaling parameters. More... | |
| def | evaluate_trajectory_callback (self, request) |
| Evaluates the given trajectory. More... | |
| def | get_bucket_index (self, interaction_id) |
| Gets the covariance bucket index for the given BIP instance. More... | |
| def | get_covariance (self, covariance, stride, interaction_id) |
| Gets the covariance matrix for the given BIP instance and measurement noise. More... | |
| def | get_active_dofs (self, interaction_id) |
| Gets the list of DoFs that are active according to the current state of the given BIP instance. More... | |
| def | generate_trajectory_callback (self, request) |
| Performs inference on the given partially observed trajectory using the given BIP instance. More... | |
| def | get_approximate_trajectory_callback (self, request) |
| Gets the basis approximation for the given trajectory and BIP instance. More... | |
| def | get_probability_distribution_callback (self, request) |
| Gets the probability distribution of the prior for the given BIP instance. More... | |
| def | get_distribution_parameters_callback (self, request) |
| Gets the parameters associated with the probability distribution of the prior for the given BIP instance. More... | |
| def | get_mean_trajectory_callback (self, request) |
| Gets the mean trajectory of the prior for the given BIP instance. More... | |
| def | get_statistics_callback (self, request) |
| Gets the analysis statistics associated with the current state. More... | |
| def | export_data_callback (self, request) |
| Exports the given BIP instance. More... | |
| def | initialize_state_callback (self, request) |
| Initializes the internal state of the given BIP instance. More... | |
| def | add_basis_selection_demonstration_callback (self, request) |
| Adds a demonstration to a basis Selection instance. More... | |
| def | perform_basis_selection_callback (self, request) |
| Selects an appropriate basis space for the demonstrations which have been added to the Selection instance. More... | |
| def | get_basis_error_callback (self, request) |
| Calculates the MSE error for the basis space of the given BIP instance for the demonstrations which have been added to the Selection instance. More... | |
| def | run (self) |
IntPrimService acts as a middle-man between the interaction_core (C++) and intprim (Python) libraries.
It provides ROS services for:
This class will automatically import an exported intprim model if it is found in the path specified by the "bip[x]/import_data" ROS parameter.
| def intprim_service.IntPrimService.__init__ | ( | self | ) |
Initializes the IntPrimService class.
This 1) reads the parameters in /bip, 2) creates a corresponding BIP instance, and 3) spins up the ROS services.
| def intprim_service.IntPrimService.add_basis_selection_demonstration_callback | ( | self, | |
| request | |||
| ) |
Adds a demonstration to a basis Selection instance.
Note: demonstrations must first be added via add_basis_selection_demonstration_callback.
| request | Request containing the N x M observed demonstration trajectory, where N is the number of time steps and M is the number of features. |
| def intprim_service.IntPrimService.add_demonstration_callback | ( | self, | |
| request | |||
| ) |
Callback for adding a demonstration.
Simply passes the demonstration through to the desired BIP instance.
| request | Request containing the N x M observed demonstration trajectory, where N is the number of time steps and M is the number of features. |
| def intprim_service.IntPrimService.compute_standardization_callback | ( | self, | |
| request | |||
| ) |
Callback for computing scaling parameters.
| def intprim_service.IntPrimService.create_model | ( | self, | |
| modality_params | |||
| ) |
Creates a basis model for the given set of modality_params.
| modality_params | The set of modality parameters as read from /bip[x]/modalities |
| def intprim_service.IntPrimService.evaluate_trajectory_callback | ( | self, | |
| request | |||
| ) |
Evaluates the given trajectory.
Functionally, behaves the same as generate_trajectory_callback except the values corresponding to generate_indices need to be valid for the given trajectory. These values are used to compute the MSE between the estimated trajectory and the actual one. As in generate, this service can be called multiple times in order to calculate the error after a subset of observations have been made.
| request | Request containing a (possibly partial) N x M observed trajectory, where N is the number of time steps and M is the number of features. Must also contain a M x M noise covariance matrix. |
| def intprim_service.IntPrimService.export_data_callback | ( | self, | |
| request | |||
| ) |
Exports the given BIP instance.
This includes the trained prior and other internal state information.
| request | Request containing the ID of the BIP instance to export as well as the file name that it should be exported to. |
| def intprim_service.IntPrimService.generate_trajectory_callback | ( | self, | |
| request | |||
| ) |
Performs inference on the given partially observed trajectory using the given BIP instance.
This generation is recursive, and so the current state will be used (and updated) in the integration of any new sensor measurements.
| request | Request containing a (possibly partial) N x M observed trajectory, where N is the number of time steps and M is the number of features. Must also contain a M x M noise covariance matrix. |
| def intprim_service.IntPrimService.get_active_dofs | ( | self, | |
| interaction_id | |||
| ) |
Gets the list of DoFs that are active according to the current state of the given BIP instance.
| interaction_id | The ID of the BIP instance to use. |
| def intprim_service.IntPrimService.get_approximate_trajectory_callback | ( | self, | |
| request | |||
| ) |
Gets the basis approximation for the given trajectory and BIP instance.
| request | Request containing an N x M observed trajectory, where N is the number of time steps and M is the number of features. |
| def intprim_service.IntPrimService.get_basis_error_callback | ( | self, | |
| request | |||
| ) |
Calculates the MSE error for the basis space of the given BIP instance for the demonstrations which have been added to the Selection instance.
Note: demonstrations must first be added via add_basis_selection_demonstration_callback.
| request | Request containing the ID of the BIP instance to perform basis selection with. |
| def intprim_service.IntPrimService.get_bucket_index | ( | self, | |
| interaction_id | |||
| ) |
Gets the covariance bucket index for the given BIP instance.
A covariance "bucket" is created for each set of active phases, such that every phase value from [0, 1] belongs to a single active bucket. At run-time, we need to choose the appropriate covariance noise (some DoFs may be active and some inactive according to the parameter file), and so we need to find the proper bucket.
| interaction_id | The ID of the BIP instance to use. |
| def intprim_service.IntPrimService.get_covariance | ( | self, | |
| covariance, | |||
| stride, | |||
| interaction_id | |||
| ) |
Gets the covariance matrix for the given BIP instance and measurement noise.
This covariance matrix accounts for both the given measurement noise as well as any active/inactive DoFs corresponding to the currently estimated phase. Active DoFs will have a noise value equivalent to the "noise_bias" parameter, inactive DoFs to "inactive_noise_bias".
| covariance | 2M x 1 measurement noise vector, where M is the number of features. |
| stride | The stride of the measurement noise vector: M |
| interaction_id | The ID of the BIP instance to use. |
| def intprim_service.IntPrimService.get_distribution_parameters_callback | ( | self, | |
| request | |||
| ) |
Gets the parameters associated with the probability distribution of the prior for the given BIP instance.
The distribution is assumed to be Gaussian from which the parameters are found empirically.
| request | Request containing the ID of the BIP instance to use. |
| def intprim_service.IntPrimService.get_mean_trajectory_callback | ( | self, | |
| request | |||
| ) |
Gets the mean trajectory of the prior for the given BIP instance.
| request | Request containing the ID of the BIP instance to use. |
| def intprim_service.IntPrimService.get_probability_distribution_callback | ( | self, | |
| request | |||
| ) |
Gets the probability distribution of the prior for the given BIP instance.
The distribution is assumed to be Gaussian from which the parameters are found empirically.
| request | Request containing the ID of the BIP instance to use. |
| def intprim_service.IntPrimService.get_statistics_callback | ( | self, | |
| request | |||
| ) |
Gets the analysis statistics associated with the current state.
By default this includes information such as the number of predictions, their frequency, and the time elapsed since initialize was called. If the debug ROS parameter is set to true, then the internal filter state for each time step is written to an XML file.
Note: depending on the response frequency and state dimension this XML file can be quite large and may take some time to write do disk.
| request | Request containing the ID of the BIP instance to analyze. If a ground truth rosbag file path is specified, its information will be included in the exported debug XML file. |
| def intprim_service.IntPrimService.initialize_state | ( | self | ) |
Initializes the current internal state.
This includes the currently estimated phase state information as well as the current filter instance.
| def intprim_service.IntPrimService.initialize_state_callback | ( | self, | |
| request | |||
| ) |
Initializes the internal state of the given BIP instance.
This resets the filter back to initial starting conditions.
| request | Request containing the ID of the BIP instance to initialize. |
| def intprim_service.IntPrimService.perform_basis_selection_callback | ( | self, | |
| request | |||
| ) |
Selects an appropriate basis space for the demonstrations which have been added to the Selection instance.
| request | Request containing the ID of the BIP instance to perform basis selection with. |
| def intprim_service.IntPrimService.read_parameters | ( | self | ) |
Reads the parameters from /bip[x] and calculates internal state information, such as which DoFs are active and which are used to generate a response trajectory.


Help: Browsing a Specific Comment and its Replies
Sorting
To sort the list of comments select the "Sort by:" drop-down menu.
Here is a list of sorting functions to choose from and an explaination for what each of them does:
Default
The default sorting method for the comments.
It displays the newest comments that are close to your location at the top of the list, while older comments that are farther away are displayed near the bottom.
Date
Displays the comments in the order that they were created, with newest comments at the top of the list and oldest at the bottom.
Picture
Displays comments that have pictures attached at the top of the list and comments that don't have pictures attached at the bottom.
My Location
Displays comments that are close to your current location determined by GPS at the top of the list and comments posted farthest from you at the bottom of the list.
If you do not have GPS turned on it will be sorted by a default location of (0,0) or your last known location.
Other Location
Displays comments that are close to a custom location of your choosing at the top of the list and comments posted farthest from the custom location at the bottom of the list.
Faves
Displays comments with the most favorites at the top of the list and comments with the least favorites at the bottom.
Viewing Selected Comment Details
At the top of the screen the selected comment is displayed, along with an attached photo if it has one
and the author's username.
Browsing Replies
Replies are comments that are responses to a different comment.
You can see the list of all the replies to the selected comment on the app from this screen.
Selecting a reply allows you to view that specific comment and its replies.
Editing the Selected Comment
If the selected comment was created by a user with the username you are currently logged in as,
you are able to edit that comment from this page.
To edit the comment select "Edit Comment" from the action bar menu.
Replying to the Selected Comment
You can create a reply to the selected comment by pressing the "Reply" button.
Adding the Selected Comment to Your Favorites
To add the comment to your favorites press the "Add to Favorites" button.
A message will be displayed on the screen if the request was successful.
Adding the comment to your favorites allows you to view it from the "Favorites" option of the main menu.
Adding the comment to your favorites also increases the number of Faves that comment has, effecting its position when sorting by Faves.
Following the Author of the Selected Comment
To follow the user that created the selected comment press the "Follow" button.
A message will be displayed on the screen if the request was successful.
Following the author allows you to view all of their comments from the "Followed User's Comments" option of the main menu.


From:
Amazon delivery
795 Folsom Ave, Suite 600
San Francisco, CA, 94107
E-mail<EMAIL_ADDRESS>Phone:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
To:
Invoice info
W32567-2352-4756
Artour Arteezy
795 Folsom Ave, Suite 600
San Francisco, CA, 94107
P:<PHONE_NUMBER>
Invoice Date: January 20, 2016
Due Date: January 22, 2016
Sub - Total amount: $406,472.50
VAT: $81,294.50
Grand Total: $487,767.00
Print
Proceed Payment


logo
Articles
Books
Events
Jobs
Membership
Topics
Article 1
Article 2
Article 3
Article2
Article2
Article2
Article3
Article3
Article3


Create & Control Semantic UI Progress with Angular Directives
optional
required
model
=
a number variable representing the current progress on the bar (out of total, which is by default 100).total
=
a number variable for the largest possible value the progress bar can have (100 by default).label
=
a string which determines what label is displayed in the bar.active-text
@
a templated string for the text below the progress bar in a normal (active) state.error-text
@
a templated string for the text below the progress bar in a error state.warning-text
@
a templated string for the text below the progress bar in a warning state.success-text
@
a templated string for the text below the progress bar in a success state.duration
@
a string representing the amount of time it takes the progress bar to reach a target value from the current value.on-init
=
Callback once the module is initialized, passing the initialized element as the first argument.on-change
=
Callback on percentage change.on-success
=
Callback on success state.on-active
=
Callback on active state.on-error
=
Callback on error state.on-warning
=
Callback on warning state.These attribute directives invoke a behavior on the component where the attribute value can be one of the following formats:
$
@
A selector string.evt
@
The event string which triggers the behavior ('click' by default).enabled
=
A boolean value which determines whether or not the behavior should be called when the event occurs.value
=
The first argument to pass to the behavior if it requires one.