LOCATIONS
DEMOGRAPHICS
STATISTICS
Add something
3+
Alerts Center
December 12, 2019
A new monthly report is ready to download!
December 7, 2019
$290.29 has been deposited into your account!
December 2, 2019
Spending Alert: We've noticed unusually high spending for your account.
Adam Smith
My Profile
Logout
LOCATIONS
DEMOGRAPHICS
STATISTICS
Add something
Heat Map
Reported
Tested
Level
Infected
Monitored
Age
Gender
Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.


React project
A React web-app that aggregates all the information about lost dogs and cats in San Francisco from Craigslist and displays this info geolocalized with Google Map's API
IoT project
I configured an AWS dashbutton that calls a Lyft ride to the address of my next google calendar event
Android project
I'm developing an Android App to track all the matches for the World Cup 2018


Details
-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: ssh-slaves
-
Labels:None
-
Environment:Server: Jenkins ver. 1.480.3 @ CentOS 6.3. Slaves: CentOS release 5.8, CentOS release 6.3.
Description
After updating SSH Slaves plugin to 0.23 we get this when slave is starting:
[03/27/13 10:07:14] [SSH] Checking java version of /home/hudson/JDK_HOME_1_6_0/bin/java [03/27/13 10:07:15] [SSH] /home/hudson/JDK_HOME_1_6_0/bin/java -version returned 1.6.0_16. [03/27/13 10:07:15] [SSH] Starting sftp client. [03/27/13 10:07:15] [SSH] Copying latest slave.jar... [03/27/13 10:07:15] [SSH] Copied 278,201 bytes. ERROR: Failed to expand buffer size java.lang.NoSuchMethodException: com.trilead.ssh2.Session.setWindowSize(int) at java.lang.Class.getMethod(Class.java:1622) at hudson.plugins.sshslaves.SSHLauncher.expandChannelBufferSize(SSHLauncher.java:711) at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:661) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:472) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:200) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) [03/27/13 10:07:15] [SSH] Starting slave process: cd '/home/hudson/HUDSON_HOME' && /home/hudson/JDK_HOME_1_6_0/bin/java -Xmx1024m -XX:HeapDumpPath=/home/hudson/HUDSON_HOME/_dumps/ -jar slave.jar <===[JENKINS REMOTING CAPACITY]===>channel started Slave.jar version: 2.17 This is a Unix slave Copied maven-agent.jar Copied maven3-agent.jar Copied maven3-interceptor.jar Copied maven-interceptor.jar Copied maven2.1-interceptor.jar Copied plexus-classworld.jar Copied classworlds.jar Evacuated stdout Slave successfully connected and online
We had to downgrade to SSH Slaves plugin to 0.22, which resolved the problem:
[03/27/13 10:16:32] [SSH] Checking java version of /home/hudson/JDK_HOME_1_6_0/bin/java [03/27/13 10:16:33] [SSH] /home/hudson/JDK_HOME_1_6_0/bin/java -version returned 1.6.0_16. [03/27/13 10:16:33] [SSH] Starting sftp client. [03/27/13 10:16:33] [SSH] Copying latest slave.jar... [03/27/13 10:16:33] [SSH] Copied 278,201 bytes. [03/27/13 10:16:33] [SSH] Starting slave process: cd '/home/hudson/HUDSON_HOME' && /home/hudson/JDK_HOME_1_6_0/bin/java -Xmx1024m -XX:HeapDumpPath=/home/hudson/HUDSON_HOME/_dumps/ -jar slave.jar <===[JENKINS REMOTING CAPACITY]===>channel started Slave.jar version: 2.17 This is a Unix slave Copied maven-agent.jar Copied maven3-agent.jar Copied maven3-interceptor.jar Copied maven-interceptor.jar Copied maven2.1-interceptor.jar Copied plexus-classworld.jar Copied classworlds.jar Evacuated stdout Slave successfully connected and online
BTW, during this upgrade-...-downgrade process SSH slave credentials somehow got reset:
[03/27/13 10:14:02] [SSH] Opening SSH connection to jenkins-l64b.ourcompany.com:22. [03/27/13 10:14:02] [SSH] Authenticating as jenkins/******. [03/27/13 10:14:02] [SSH] Authentication failed. hudson.AbortException: Authentication failed. at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:753) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:278) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:200) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) [03/27/13 10:14:02] [SSH] Connection closed.
We've been using hudson/jenkins for many years and had to switch to LTS since so called "normal" version would get broken in 95%+ of all plugin/Jenkins updates. And now we observe similar problem with LTS. I guess many Jenkins users would agree with me that this is not OK and something has to be done in this respect. The first thing that comes into my mind is introducing "Community ratings" for plugins too (helped us many times to avoid upgrading to unusable new version of "normal" Jenkins branch).
Issue Links
- is related to
-
JENKINS-7813 Archiving artifacts very slow
JIC: if SSH Slaves plugin 0.23 is incompatible with LTS 1.480.3, I expect to see this in Jenkins Plugin Manager:


mainframe
`Prev `__
M
`Next `__
--------------
**mainframe**: n.
Term originally referring to the cabinet containing the central
processor unit or ‘main frame’ of a room-filling `*Stone
Age* <../S/Stone-Age.html>`__ batch machine. After the emergence of
smaller minicomputer designs in the early 1970s, the traditional `*big
iron* <../B/big-iron.html>`__ machines were described as ‘mainframe
computers’ and eventually just as mainframes. The term carries the
connotation of a machine designed for batch rather than interactive use,
though possibly with an interactive timesharing operating system
retrofitted onto it; it is especially used of machines built by IBM,
Unisys, and the other great `*dinosaur* <../D/dinosaur.html>`__\ s
surviving from computing's `*Stone Age* <../S/Stone-Age.html>`__.
It has been common wisdom among hackers since the late 1980s that the
mainframe architectural tradition is essentially dead (outside of the
tiny market for `*number-crunching* <../N/number-crunching.html>`__
supercomputers having been swamped by the recent huge advances in IC
technology and low-cost personal computing. The wave of failures,
takeovers, and mergers among traditional mainframe makers in the early
1990s bore this out. The biggest mainframer of all, IBM, was compelled
to re-invent itself as a huge systems-consulting house. (See `*dinosaurs
mating* <../D/dinosaurs-mating.html>`__ and `*killer
micro* <../K/killer-micro.html>`__).
However, in yet another instance of the `*cycle of
reincarnation* <../C/cycle-of-reincarnation.html>`__, the port of Linux
to the IBM S/390 architecture in 1999 — assisted by IBM — produced a
resurgence of interest in mainframe computing as a way of providing huge
quantities of easily maintainable, reliable virtual Linux servers,
saving IBM's mainframe division from almost certain extinction.
--------------
+------------------------------+----------------------------+-------------------------------+
| `Prev `__ | `Up <../M.html>`__ | `Next `__ |
+------------------------------+----------------------------+-------------------------------+
| main loop | `Home <../index.html>`__ | mainsleaze |
+------------------------------+----------------------------+-------------------------------+


PivotTreeMap showing customer count over a period of fiscal years across different customer geographic locations.


{% extends "base.html" %}
{% block title %}500: Internal Server Error{% endblock %}
{% block description %}Is this a real bug, is this just feature? Caught in a landslide.{% endblock %}
{% block content %}
500 ponies: server had internal confounded by ponies error


Focus on Ram Mandir amidst economic slowdown
by Sajith KumarIndian shares closed nearly flat on Monday in choppy trading, weighed down by a rating outlook cut by Moody's Investors Service for the country last week and absence of fresh triggers for investors.
Read more
Credit growth at Indian banks has dropped to its lowest level in nearly two years, the latest Reserve Bank of India (RBI) data shows, as slowing domestic consumption weighs on demand.
Read more
Vishwa Hindu Parishad (VHP) plans to expedite the stone carving work at its workshop in Ayodhya following the Supreme Court verdict in the Ram Janmabhoomi-Babri Masjid Title Suits.
Prime Minister Narendra Modi as a solo representative of Sanathan Hindu Dharma should lay the foundation stone for the construction of Ram Mandir in Ayodhya, Yoga guru Baba Ramdev said.


|
| | Министерство культуры Российской Федерации Портал Культура.рф Проект «Образы России» |
Pushkin's memorial estate (Vyazemy estate)
Godunov's Ravine
Located in the northern part of the estate complex, between the Smolenskoe (Mozhayskoe) highway and the the center of the estate. Ravine started from ""Ramenkoe pond"" and ended with Vyazemka river. Wet land of the river bed which dries up every summer have been preserved to present day. It is an integral part of the park complex, a monument of the historic landscape.
Культура.рф © Портал культурного наследия России


---
title: "Clubs"
permalink: /resources/activities/clubs/
layout: single
---
Disclaimer This is a collection of public data for the convenience of community members. There is no implication of OCC affiliation for the listed organations on this page.
{% for club in site.activities_clubs %}
{{ club.title }}
{{ club.location }}
{% endfor %}


[index]
(G.C.D. module)
This is the module for getting G.C.D. (the greatest common divisor) from divmod. This is included to Integer or Algebra::Polynomial.
gcd(other)
gcd_all(other0 [, other1[, ...]])
gcd_coeff(other)
Returns the array of the greatest common divisor of self and other and the coefficients for getting it.
Example:
require "polynomial" require "rational" P = Algebra.Polynomial(Rational, "x") x = P.var f = (x + 2) * (x**2 - 1)**2 g = (x + 2)**2 * (x - 1)**3 gcd, a, b = f.gcd_coeff(g) p gcd #=> 4x^3 - 12x + 8 p a #=> -x + 2 p b #=> x - 1 p gcd == a*f + b*g #=> true
gcd_ext(other)
gcd_coeff_all(other0 [, other1[, ...]])
Returns the array of the greatest common divisor self and other0, other1,.. and the coefficients for getting it.
Example:
require "polynomial" require "rational" P = Algebra.Polynomial(Rational, "x") x = P.var f = (x + 2) * (x**2 - 1)**2 g = (x + 2)**2 * (x - 1)**3 h = (x + 2) * (x + 1) * (x - 1) gcd, a, b, c = f.gcd_coeff_all(g, h) p gcd #=> -8x^2 - 8x + 16 p a #=> -x + 2 p b #=> x - 1 p c #=> -4 p gcd == a*f + b*g + c*h #=> true
gcd_ext_all(other0 [, other1[, ...]])
lcm(b)
lcm_all(other0 [, other1[, ...]])


The Datasets Package¶
statsmodels
provides data sets (i.e. data and meta-data) for use in
examples, tutorials, model testing, etc.
Using Datasets from Stata¶
|
Download and return an example dataset from Stata. |
Using Datasets from R¶
The Rdatasets project gives access to the datasets available in R’s core datasets package and many other common R packages. All of these datasets are available to statsmodels by using the get_rdataset
function. The actual data is accessible by the data
attribute. For example:
In [1]: import statsmodels.api as sm In [2]: duncan_prestige = sm.datasets.get_rdataset("Duncan", "carData") In [3]: print(duncan_prestige.__doc__) +--------+-----------------+ | Duncan | R Documentation | +--------+-----------------+ Duncan's Occupational Prestige Data ----------------------------------- Description ~~~~~~~~~~~ The ``Duncan`` data frame has 45 rows and 4 columns. Data on the prestige and other characteristics of 45 U. S. occupations in 1950. Usage ~~~~~ :: Duncan Format ~~~~~~ This data frame contains the following columns: type Type of occupation. A factor with the following levels: ``prof``, professional and managerial; ``wc``, white-collar; ``bc``, blue-collar. income Percentage of occupational incumbents in the 1950 US Census who earned $3,500 or more per year (about $36,000 in 2017 US dollars). education Percentage of occupational incumbents in 1950 who were high school graduates (which, were we cynical, we would say is roughly equivalent to a PhD in 2017) prestige Percentage of respondents in a social survey who rated the occupation as “good” or better in prestige Source ~~~~~~ Duncan, O. D. (1961) A socioeconomic index for all occupations. In Reiss, A. J., Jr. (Ed.) *Occupations and Social Status.* Free Press [Table VI-1]. References ~~~~~~~~~~ Fox, J. (2008) *Applied Regression Analysis and Generalized Linear Models*, Second Edition. Sage. Fox, J. and Weisberg, S. (2011) *An R Companion to Applied Regression*, Second Edition, Sage. In [4]: duncan_prestige.data.head(5) Out[4]: type income education prestige accountant prof 62 86 82 pilot prof 72 76 83 architect prof 75 92 90 author prof 55 90 76 chemist prof 64 86 90
R Datasets Function Reference¶
|
download and return R dataset |
|
Return the path of the statsmodels data dir. |
|
Delete all the content of the data home cache. |
Available Datasets¶
- American National Election Survey 1996
- Breast Cancer Data
- Bill Greene’s credit scoring data.
- Smoking and lung cancer in eight cities in China.
- Mauna Loa Weekly Atmospheric CO2 Data
- First 100 days of the US House of Representatives 1995
- World Copper Market 1951-1975 Dataset
- US Capital Punishment dataset.
- El Nino - Sea Surface Temperatures
- Engel (1857) food expenditure data
- Affairs dataset
- World Bank Fertility Data
- Grunfeld (1950) Investment Data
- Transplant Survival Data
- (West) German interest and inflation rate 1972-1998
- Longley dataset
- United States Macroeconomic data
- Travel Mode Choice
- Nile River flows at Ashwan 1871-1970
- RAND Health Insurance Experiment Data
- Taxation Powers Vote for the Scottish Parliamant 1997
- Spector and Mazzeo (1980) - Program Effectiveness Data
- Stack loss data
- Star98 Educational Dataset
- Statewide Crime Data 2009
- U.S. Strike Duration Data
- Yearly sunspots data 1700-2008
Usage¶
Load a dataset:
In [5]: import statsmodels.api as sm
In [6]: data = sm.datasets.longley.load_pandas()
The Dataset object follows the bunch pattern explained in proposal. The full dataset is available in the data
attribute.
In [7]: data.data
Out[7]:
TOTEMP GNPDEFL GNP UNEMP ARMED POP YEAR
0 60323.0 83.0 234289.0 2356.0 1590.0 107608.0 1947.0
1 61122.0 88.5 259426.0 2325.0 1456.0 108632.0 1948.0
2 60171.0 88.2 258054.0 3682.0 1616.0 109773.0 1949.0
3 61187.0 89.5 284599.0 3351.0 1650.0 110929.0 1950.0
4 63221.0 96.2 328975.0 2099.0 3099.0 112075.0 1951.0
5 63639.0 98.1 346999.0 1932.0 3594.0 113270.0 1952.0
6 64989.0 99.0 365385.0 1870.0 3547.0 115094.0 1953.0
7 63761.0 100.0 363112.0 3578.0 3350.0 116219.0 1954.0
8 66019.0 101.2 397469.0 2904.0 3048.0 117388.0 1955.0
9 67857.0 104.6 419180.0 2822.0 2857.0 118734.0 1956.0
10 68169.0 108.4 442769.0 2936.0 2798.0 120445.0 1957.0
11 66513.0 110.8 444546.0 4681.0 2637.0 121950.0 1958.0
12 68655.0 112.6 482704.0 3813.0 2552.0 123366.0 1959.0
13 69564.0 114.2 502601.0 3931.0 2514.0 125368.0 1960.0
14 69331.0 115.7 518173.0 4806.0 2572.0 127852.0 1961.0
15 70551.0 116.9 554894.0 4007.0 2827.0 130081.0 1962.0
Most datasets hold convenient representations of the data in the attributes endog and exog:
In [8]: data.endog.iloc[:5] Out[8]: 0 60323.0 1 61122.0 2 60171.0 3 61187.0 4 63221.0 Name: TOTEMP, dtype: float64 In [9]: data.exog.iloc[:5,:] Out[9]: GNPDEFL GNP UNEMP ARMED POP YEAR 0 83.0 234289.0 2356.0 1590.0 107608.0 1947.0 1 88.5 259426.0 2325.0 1456.0 108632.0 1948.0 2 88.2 258054.0 3682.0 1616.0 109773.0 1949.0 3 89.5 284599.0 3351.0 1650.0 110929.0 1950.0 4 96.2 328975.0 2099.0 3099.0 112075.0 1951.0
Univariate datasets, however, do not have an exog attribute.
Variable names can be obtained by typing:
In [10]: data.endog_name Out[10]: 'TOTEMP' In [11]: data.exog_name Out[11]: ['GNPDEFL', 'GNP', 'UNEMP', 'ARMED', 'POP', 'YEAR']
If the dataset does not have a clear interpretation of what should be an endog and exog, then you can always access the data or raw_data attributes. This is the case for the macrodata dataset, which is a collection of US macroeconomic data rather than a dataset with a specific example in mind. The data attribute contains a record array of the full dataset and the raw_data attribute contains an ndarray with the names of the columns given by the names attribute.
In [12]: type(data.data) Out[12]: pandas.core.frame.DataFrame In [13]: type(data.raw_data) Out[13]: pandas.core.frame.DataFrame In [14]: data.names Out[14]: ['TOTEMP', 'GNPDEFL', 'GNP', 'UNEMP', 'ARMED', 'POP', 'YEAR']
Loading data as pandas objects¶
For many users it may be preferable to get the datasets as a pandas DataFrame or
Series object. Each of the dataset modules is equipped with a load_pandas
method which returns a Dataset
instance with the data readily available as pandas objects:
In [15]: data = sm.datasets.longley.load_pandas() In [16]: data.exog Out[16]: GNPDEFL GNP UNEMP ARMED POP YEAR 0 83.0 234289.0 2356.0 1590.0 107608.0 1947.0 1 88.5 259426.0 2325.0 1456.0 108632.0 1948.0 2 88.2 258054.0 3682.0 1616.0 109773.0 1949.0 3 89.5 284599.0 3351.0 1650.0 110929.0 1950.0 4 96.2 328975.0 2099.0 3099.0 112075.0 1951.0 5 98.1 346999.0 1932.0 3594.0 113270.0 1952.0 6 99.0 365385.0 1870.0 3547.0 115094.0 1953.0 7 100.0 363112.0 3578.0 3350.0 116219.0 1954.0 8 101.2 397469.0 2904.0 3048.0 117388.0 1955.0 9 104.6 419180.0 2822.0 2857.0 118734.0 1956.0 10 108.4 442769.0 2936.0 2798.0 120445.0 1957.0 11 110.8 444546.0 4681.0 2637.0 121950.0 1958.0 12 112.6 482704.0 3813.0 2552.0 123366.0 1959.0 13 114.2 502601.0 3931.0 2514.0 125368.0 1960.0 14 115.7 518173.0 4806.0 2572.0 127852.0 1961.0 15 116.9 554894.0 4007.0 2827.0 130081.0 1962.0 In [17]: data.endog Out[17]: 0 60323.0 1 61122.0 2 60171.0 3 61187.0 4 63221.0 5 63639.0 6 64989.0 7 63761.0 8 66019.0 9 67857.0 10 68169.0 11 66513.0 12 68655.0 13 69564.0 14 69331.0 15 70551.0 Name: TOTEMP, dtype: float64
The full DataFrame is available in the data
attribute of the Dataset object
In [18]: data.data
Out[18]:
TOTEMP GNPDEFL GNP UNEMP ARMED POP YEAR
0 60323.0 83.0 234289.0 2356.0 1590.0 107608.0 1947.0
1 61122.0 88.5 259426.0 2325.0 1456.0 108632.0 1948.0
2 60171.0 88.2 258054.0 3682.0 1616.0 109773.0 1949.0
3 61187.0 89.5 284599.0 3351.0 1650.0 110929.0 1950.0
4 63221.0 96.2 328975.0 2099.0 3099.0 112075.0 1951.0
5 63639.0 98.1 346999.0 1932.0 3594.0 113270.0 1952.0
6 64989.0 99.0 365385.0 1870.0 3547.0 115094.0 1953.0
7 63761.0 100.0 363112.0 3578.0 3350.0 116219.0 1954.0
8 66019.0 101.2 397469.0 2904.0 3048.0 117388.0 1955.0
9 67857.0 104.6 419180.0 2822.0 2857.0 118734.0 1956.0
10 68169.0 108.4 442769.0 2936.0 2798.0 120445.0 1957.0
11 66513.0 110.8 444546.0 4681.0 2637.0 121950.0 1958.0
12 68655.0 112.6 482704.0 3813.0 2552.0 123366.0 1959.0
13 69564.0 114.2 502601.0 3931.0 2514.0 125368.0 1960.0
14 69331.0 115.7 518173.0 4806.0 2572.0 127852.0 1961.0
15 70551.0 116.9 554894.0 4007.0 2827.0 130081.0 1962.0
With pandas integration in the estimation classes, the metadata will be attached to model results:
In [19]: y, x = data.endog, data.exog In [20]: res = sm.OLS(y, x).fit() In [21]: res.params Out[21]: GNPDEFL -52.993570 GNP 0.071073 UNEMP -0.423466 ARMED -0.572569 POP -0.414204 YEAR 48.417866 dtype: float64 In [22]: res.summary() Out[22]: <class 'statsmodels.iolib.summary.Summary'> """ OLS Regression Results ======================================================================================= Dep. Variable: TOTEMP R-squared (uncentered): 1.000 Model: OLS Adj. R-squared (uncentered): 1.000 Method: Least Squares F-statistic: 5.052e+04 Date: Sun, 24 Nov 2019 Prob (F-statistic): 8.20e-22 Time: 07:51:29 Log-Likelihood: -117.56 No. Observations: 16 AIC: 247.1 Df Residuals: 10 BIC: 251.8 Df Model: 6 Covariance Type: nonrobust ============================================================================== coef std err t P>|t| [0.025 0.975] ------------------------------------------------------------------------------ GNPDEFL -52.9936 129.545 -0.409 0.691 -341.638 235.650 GNP 0.0711 0.030 2.356 0.040 0.004 0.138 UNEMP -0.4235 0.418 -1.014 0.335 -1.354 0.507 ARMED -0.5726 0.279 -2.052 0.067 -1.194 0.049 POP -0.4142 0.321 -1.289 0.226 -1.130 0.302 YEAR 48.4179 17.689 2.737 0.021 9.003 87.832 ============================================================================== Omnibus: 1.443 Durbin-Watson: 1.277 Prob(Omnibus): 0.486 Jarque-Bera (JB): 0.605 Skew: 0.476 Prob(JB): 0.739 Kurtosis: 3.031 Cond. No. 4.56e+05 ============================================================================== Warnings: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The condition number is large, 4.56e+05. This might indicate that there are strong multicollinearity or other numerical problems. """
Extra Information¶
If you want to know more about the dataset itself, you can access the following, again using the Longley dataset as an example
>>> dir(sm.datasets.longley)[:6]
['COPYRIGHT', 'DESCRLONG', 'DESCRSHORT', 'NOTE', 'SOURCE', 'TITLE']
Additional information¶
The idea for a datasets package was originally proposed by David Cournapeau and can be found here with updates by Skipper Seabold.
To add datasets, see the notes on adding a dataset.


--- title: Oops! Not Found eleventyExcludeFromCollections: true permalink: 404.html ---
This is where you should tell the user how to find their content. Maybe on the home page?


Methods
(static) addPairs(pairData, groupId) → {String}
function that adds all pairs to database and creates generation
Parameters:
| Name | Type | Description |
|---|---|---|
pairData |
pairData | data of all the pairs |
groupId |
String | the group id that pairs are added to |
Properties:
| Name | Type | Description |
|---|---|---|
pairData.pairs |
pairs | pairs array (tuples), |
pairData.genTitle |
string | title of the pairs generation, |
pairData.groupSize |
Int | size of the group for history, |
Returns:
'pairs added' if everything worked
- Type
- String
(static) authenticate(token, groupIdopt, needDataopt, modifyopt) → {String|Object}
Authenticates a user, can change modify if admin rights needed or group if group is needed,
also allows to check rights for a group
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
token |
String | Session we get from MakerPass, | ||
groupId |
Int |
<optional> |
null | extra to see if user has acess to group, |
needData |
Bool |
<optional> |
false | return changed to object if true (full data (like admin bool etc...)) |
modify |
Bool |
<optional> |
false | if needs to modify group user must have rights there |
Returns:
throws promise.reject if users doesnt exist
- Type
- String | Object
(static) deleteGeneration(id) → {String}
Deletes everything related to a group
Parameters:
| Name | Type | Description |
|---|---|---|
id |
Int | the id of the generation that needs to be deleted, |
Returns:
'generation deleted' once deleted
- Type
- String
(static) getGenerationsByGroup()
(static) getNewGen()
(static) getPairsForGroup()
(static) getUserData()
Gets all the data for a single user


First, you should check out the agenda page.
See what you like and decide whether you'd like to register to Day 1, Day 2 or both.
Registration is per day
Registration is per day. You may register to Day 1, you may register to Day 2, and you
may register to both (no problem at all, you are very welcome). But please - only register if you plan to show up.
Be kind to your fellows and if anything changes, unregister to let those on the waitlist enjoy.
Register here
To register first open an account on meetup.com and then register
Of course you should - but only if you plan to show up to the entire day. Please do not waste a ticket
if you don't plan to show up. Be kind.
Be kind
Be kind to your fellow community members. If you'd registered and something changed, make sure you
unregister to make place for others. Do not register unless you plan to show up for the whole day
Get on the waiting list
Even if you find yourself on the waiting list - do not despair. Get on the waiting list, we may be able
to expand here and there and some ppl might unregister in the future so you could get in.
I am a speaker. Should I register?
Yes, you should - if you plan to show up for the entire day (or at least the kenote).


Last Week in ManageIQ: Keeping up with the conferences
Hi, I am Dávid from the ManageIQ UI team. I will be your guide in this quick recap of what happened in the last week on our premises.
Featured
During the weekend, we were promoting ManageIQ on DevConf.cz, an amazing conference held in Brno, Czech Republic. Mooli Tayer from the container management team gave a really interesting talk about automating a datacenter using ManageIQ and Ansible. To learn more, check out our twitter feed and look for the #DevConfCZ hashtag.
Even if some of us were busy with organizing the conference, we were able to merge 124 PRs into 6 repositories. We are still getting used to the new split repositories, so there are plenty of PRs ensuring that everything works well among these repos.
Improved
Eric Winchell is responsible for creating more and more vector graphics in the UI. His plan is to use fonticons where we don’t need more than one color and SVG files where colors are necessary. His last merged PR gets rid of references to PNG files in trees related to Automation and Policies. Hopefully when we are fully converted across the whole UI, we can get rid of hundreds of unused PNG files.
Ansible is great and we would like to have better integration with our automation. James is one of the people working on this very hard. By migrating the ConfigurationManager
of Ansible Tower to the new AutomationManager
we are one step closer in achieving this goal.
Fixed
As we are trying to move the VMware provider to its new repo, some paths in requiring helpers weren’t adjusted properly. Thanks to Adam this is now fixed and working. These things are expected consequences of the moving, but they can be found and fixed quickly.
We are proudly using Sauce Labs for continuous integration of our Service UI. This feature can be enabled for a fork of the repository by turning on Travis tests. However, if you forgot your Sauce Labs credentials, the tests would run and fail. Thanks to Chris Hale this is now fixed.
New
Collecting metrics is useful, but storing them in an SQL database is not always The Right Way™. Jason introduced a new model called ActiveMetrics that is similar to ActiveRecord
but it has adapters to databases tuned for collecting metrics in a high frequency.
We introduced the new dashboard type summary screens a few months ago. These are giving you a better overview of a given entity by showing more charts and less tables. Thanks to Zita now you have a configuration option in the UI to set the dashboards as the default view across the UI.
Deleted
Brandon found out that some constants were not used anywhere. These were connected with Automation at some point, but no longer used, so it was safe to get rid of them.
Milan is making our internationalization support better and better, which means that we can delete more legacy code used to maintain compatibility. A good example of this is the use of PostponedTranslation
which is no longer required in UiConstants
so it has been deleted.
Wrapping up
This was a quick overview of what have we done last week, but feel free to check out the complete list for each repository. If you want to meet us in person, we will be attending FOSDEM this weekend in Brussels, Belgium. Search for the people in ManageIQ T-shirts!


I have used a fair number of directives just to get to the point in this example where I can meaningfully apply the ng-class and ng-style directives. At the heart of this example is a simple object that I added to the controller scope: ... $scope.settings = { Rows: "Red", Columns: "Green" }; ... I will use the Rows property to set the background color of the tr elements in the table and the Columns property to set the background color of the Done column. To let the user set these values, I have used the ng-repeat directive to create two sets of radio buttons, laid out using a Bootstrap grid (as described in Chapter 4). I have used the ng-class directive to set the colors for the tr elements, like this: ...
ng-repeat="item in todos" ng-class="settings.Rows"> ... The ng-class directive manages the class attribute of an element. In this example, the tr elements will be assigned to a class based on the value of the Rows property, corresponding to one of the CSS styles I defined: ... ... image Tip You can specify multiple CSS classes using a map object, where the properties refer to the CSS classes and the values are the expressions that control whether the classes are applied. You can see this use of the ng-class directive in Chapter 8, where I used it in the SportsStore administration application. I use the ng-style property to set CSS properties directly, rather than through a class: ... {{item.complete}} ... The ng-style directive is configured using an object whose properties correspond to the CSS properties that should be set—in this case, the background-color property, which will be set to the current value of the Columns model property. image Tip It is generally considered poor technique to apply individual CSS properties to elements. When working with static content, styles applied through classes are much easier to work with, not least because a single change to the style definition will be applied wherever the style has been used. The situation is slightly different when using the ng-style directive because the value for the properties is obtained via a data binding and the usual guidance doesn’t apply. My advice is to use classes when you can, but there is no need to avoid using the ng-style directive.
# Actions Is Complete {{$index +1}} {{prop}}


Logo
HOME
BAND
TOUR
CONTACT
MORE
Merchandise
Extras
Media
Register Lost Item
Upload Image
File
URL
Browse
Remove
Submit
Remove
Email:
Password:
Labels:
Texts:
Colors:
233, 244, 142
Remember me
Back
Submit


--- layout: documentation title: ICMPv6EchoRequestType ---
Echo request informational ICMP v6 message; type=128.
| Field Name | Type | Description |
|---|---|---|
| Echo_Request0..1 | boolean |
Every node must implement an ICMP v6 Echo responder function that receives Echo Requests (ICMP v6 code=0). |
| Data0..1 | HexBinaryObjectPropertyType |
Zero or more octets of arbitrary data. |


Calico Critters Baby Pool and Sandbox
From the box:
Critter babies enjoy having fun in sun! Flip the pool over to reveal the sandbox. 2-in-1 fun!
Features a play area with slide & staris, pool with swim tube, sandbox with sand castle, bench,
bucket, shovel, beach ball and more!
|


vignettes/busdates-introduction-vignette.Rmd
busdates-introduction-vignette.Rmd
Working with business dates can be cumbersome and error prone. busdater
aims to make it easier, by providing functionality, to get financial year, calendar year and month calculations. It returns start and end of the business periods.
Jurisdictions and organisations observe different start and end of financial year. parameter is string in the format of “MM-DD” representing the start of financial year, e.g. “01-01” for 1st of January or “07-01” for 1st of July. The default is taken from options and is “07-01” if not present.
This package caters for financial years that have a fixed start date. It does not cater for moving dates e.g. last Friday of September.
The package has 4 functions (2 deprecated):
get_fy
to return the financial (fiscal) year as integersget_boundary
to return start and end of a month and start and end of financial yearsFY
deprecated and same as get_fy
period_boundaries
deprecated and same as get_boundary
Enjoy!
get_fy
functionGiven the current date:
Return the current financial year as integer
Return financial year for given dates
dt <- as.Date(c("01-01-2018", "15-12-2017"), "%d-%m-%Y")
get_fy(date = dt[1])
#> [1] 2018
get_fy(date = dt)
#> [1] 2018 2018
Return the next financial year as integer
get_fy(offset_period = 1) # current financial year + 1
#> [1] 2020
get_fy(date = dt[1], offset_period = 1)
#> [1] 2019
get_fy(date = dt, offset_period = 1)
#> [1] 2019 2019
Return the previous financial year as integer
get_boundary
functionGiven the current date:
What is the 1st day of the current financial year
get_boundary()
#> [1] "2018-07-01"
get_boundary(opt_fy_start = "07-01")
#> [1] "2018-07-01"
get_boundary(opt_fy_start = "01-03")
#> [1] "2019-01-03"
The last day of the current financial year
The last day of the last calendar year
The last day of month 14 months from now
get_boundary(offset_period = 14, offset_type = "month",
bus_period = "M", boundary = "last day")
#> [1] "2020-03-31"
The first day of financial years for dates 3 months before the given dates


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 4
Preheat the oven to 200C/400F/Gas 6.
Spread one teaspoon of quince paste over both sides of each set of lamb cutlets and season with salt and freshly ground black pepper.
Wrap each cutlet with two slices of prosciutto and brush with a little olive oil.
Heat a large non-stick frying pan until hot then add the wrapped lamb (you may need to cook these in batches). Cook the lamb for 30-40 seconds each side, or until the prosciutto is golden-brown all over, then remove from the pan and set aside.
Place the green beans and butter beans into a 35cm/14in x 22cm/9in ceramic baking dish.
Pour over the stock and wine and sprinkle with small knobs of the butter.
Place the lamb on top of the beans and transfer to the oven to roast for ten minutes (medium rare), or until lamb is cooked to your liking.
For the parsnips, use a vegetable peeler to peel the parsnips into long thin strips or ribbons.
Place the parsnip ribbons into a baking tray lined with non-stick baking parchment and sprinkle with the butter, sugar and salt.
Transfer to the oven to roast for 10-12 minutes, then remove and gently stir the parsnip ribbons to separate the ribbons as much as possible. Return to the oven and roast for a further 8-10 minutes, or until crisp and golden-brown.
To serve, place a spoonful of the bean mixture onto each plate and place a prosciutto-wrapped lamb cutlet onto each pile of beans. Place a handful of crisp parsnip ribbons alongside.


All that libunittest needs is a C++11 compliant compiler and an implementation of the C++11 standard library. libunittest compiles with g++ (≥4.6), clang++ (≥3.2), icc (≥14), Visual C++ (≥2013), and other C++11 compliant compilers. It is successfully tested on Linux, MacOSX, FreeBSD, Solaris, Cygwin, and MS Visual Studio.
Download a
source distribution, unpack the tar-ball, and enter the
directory:
tar xfz libunittest-XXX.tar.gz
cd libunittest-XXX
where
./configure
You might want to run
make
make install
Download a
source distribution, unpack the tar-ball, and create a new
Visual Studio project for building a static library, say you name it
In order to actually build your test application you should create another
Visual Studio project for building a console application. Again add
Check the download page for available packages of libunittest.


Supported browsers:
| Browser | Version | Notes |
|---|---|---|
| Chrome | 10+ | |
| Firefox | 23+ | 20+ is also OK to use if slider is not required |
| IE | 10+ | |
| Edge | EdgeHTML 13.10586+ | Some known issues |
| Opera | Unofficially 11.10+ | |
| Safari | 4+, 5.1+ | Some known issues |
Supported operating systems:
| Operating System | Version | Notes |
|---|---|---|
| Windows | ||
| Linux | ||
| iOS | Unofficially | |
| Android | Unofficially |


Fremont Street Experience sign to show downtown through the decades
by Bailey SchulzThe Fremont Street Experience is planning to add an LED sign that pays tribute to downtown’s rich history.
The sign is set to be built on the east side of Main and Fremont streets. The new addition is part of the Fremont Street Experience’s canopy project, a “floor-to-ceiling” renovation on the Fremont Street Experience that includes a $32 million upgrade to its Viva Vision screen.
The display, approximately 27 feet by 14 feet, will offer visitors views of downtown throughout the decades. It could show a still of Fremont Street as a dirt road one moment, then flip to an image of a bustling hangout during the mob era the next. The sign will not be used for any advertisements.
“You’re looking at a porthole in time,” said Patrick Hughes, president and CEO of the Fremont Street Experience. “It’s a fully immersive experience.”
The sign is based on split-flap display boards, a type of mechanical signs often used in railroad stations. Creators chose the animation style as a nod to the Plaza’s history; a train depot once stood on the site where the hotel-casino stands today.
Those historical nods are what a lot of downtown visitors are looking for, according to Hughes. He pointed to examples such as the Mob Museum and the Fremont Street Experience, which displays a handful of “old Vegas” neon signs.
“There’s a massive interest in history and connectivity” among visitors, Hughes said.
The Commission for the Las Vegas Centennial has agreed to provide $225,000 in funding for the project, which costs about $450,000 total and had Steelman Partners acting as the architect. The Las Vegas City Council is set to vote on the funding allocation Wednesday.
Hughes said he expects construction of the sign, to start the week of Nov. 18, with the sign up and running around Dec. 20.


The two handles refer to the same "open" of the file - that is, they are references to the same object and share the same seek pointer. Note that this is different from opening the same file twice.
dup2 is most commonly used to relocate opened files onto STDIN_FILENO, STDOUT_FILENO, and/or STDERR_FILENO.
Both filehandles must be non-negative.
Using dup2 to clone a file handle onto itself has no effect.
(The "2" in "dup2" arises from the existence of an older and less powerful Unix system call "dup".)
EBADF oldfd is not a valid file handle, or newfd is a value that cannot be a valid file handle. EMFILE The process's file table was full, or a process-specific limit on open files was reached.


To add someone as a member to an organization, you must invite them to the organization or Add or update team membership for a user.


Path to the directory to be used as the "cwd" for layouts
layoutdir
makes maintaining
layouts a little easier on projects that require more than one layout. The primary advantage of using the feature is that you can change or rename the directory where your layouts are stored without having to update the path to each layout
used throughout your project. It could also reduce some clutter in the
Gruntfile and
YAML Front Matter.
Additionally, a layoutdir
can be defined for each
targets, allowing for even greater control over how
layouts are used in your projects.
layoutdir
When layoutdir
is not defined, each layout must be defined using the full path from the project root to the layout:
assemble: {
options: {
layout: 'src/templates/layouts/default-layout.hbs'
},
docs: {
options: {
layout: 'src/templates/layouts/docs-layout.hbs'
},
...
},
blog: {
options: {
layout: 'src/templates/layouts/blog-layout.hbs'
},
...
}
// etc.
}
This also applies to YAML front matter when it is necessary to "override" layouts at the page-level:
---
title: Blog
layout: src/templates/layouts/blog-layout.hbs
---
layoutdir
When layoutdir
is defined only require the name of the layout to be used (must include the file extension):
assemble: {
options: {
layoutdir: 'src/templates/layouts',
layout: 'default-layout.hbs'
},
docs: {
options: {
layout: 'docs-layout.hbs'
},
...
},
blog: {
options: {
layout: 'blog-layout.hbs'
},
...
}
// etc.
}
And in YAML front matter:
---
title: Blog
layout: blog-layout.hbs
---
While layoutdir
can make your project a little easier to manage, it is strongly recommended that you establish clear and consistent conventions for your layouts, and follow them. Otherwise, this feature might end
up causing more problems than it solves.
Here are some recommendations.
default-layout.hbs
versus simply default.hbs
, andTo understand why this is important, imagine that you're project has three "sub-projects", or
targets: components
, docs
and blog
, and that each target has a different layout. This is a fairly basic, common scenario. But remember that each may also have its own layoutdir
as well, which
creates potential for conventions that lead to using the wrong layout accidentally, such as this:
assemble: {
components: {
options: {
layoutdir: 'src/components/layouts',
layout: 'default.hbs'
}
...
},
docs: {
options: {
layoutdir: 'src/docs/layouts',
layout: 'default.hbs'
}
...
},
blog: {
options: {
layoutdir: 'src/blog/layouts',
layout: 'default.hbs'
}
...
}
// etc.
}
Note that the layout name is the same for each target, but the layoutdir
is a different directory, indicating that there are three different "default" layouts.
While it might make sense for each target to have its own layoutdir
, since layouts can be overridden in the
YAML front matter of individual pages, it is not a good idea to use the same name for multiple layouts, unless you are intentionally using this naming convention as a strategy. The reason is that it gets very difficult to track
which page is building from which layout when working inside the pages themselves.
Without layoutdir
, you have the entire path to follow, but without it you must rely on the name of the layout itself to guide you.
---
title: Any Page
layout: default.hbs
---
Using a more descriptive name for the layout helps avoid confusion now:
---
title: Any Page
layout: blog-default.hbs
---
Of course, these are only recommendations and you will need to find a strategy that works for you and your team.
See the template for this page →
Find an error? Let us know →


Gets or sets the underlying UdpClient.
The underlying UdpClient.
UdpAppender creates a UdpClient to send logging events over a network. Classes deriving from UdpAppender can use this property to get or set this UdpClient. Use the underlying UdpClient returned from Client if you require access beyond that which UdpAppender provides.
UdpAppender Class | log4net.Appender Namespace


If you think decomposition is from CSI, stop writing code!
I like coaching developers to write better code, but sometimes it is too much. So here it goes:
Want to improve? Attend a computer science 101 class at a good university and some programming lessons. This is the 21st century, it won't cost you (other than your time):
If you think decomposition is from CSI, STOP writing code!
So, it is off my chest. Simples rule of thumb:- if a function doesn't fit on a printed page, it is too long
- A function does one thing. If you loop through a document (or record) collection call a function with the individual document as parameter
- Use objects and inheritance with a factory class instead of monster case structures with copy/paste code duplication
- Refuctoring was meant as a joke
- The functions that declare a variable clean it up, not the called functions
- Global variables are evil unless you have 7 good reasons to have them
Want to improve? Attend a computer science 101 class at a good university and some programming lessons. This is the 21st century, it won't cost you (other than your time):
- Stanford Engineering Everywhere offers:
- Coursera offers classes from different universities. Check these out:
- Introduction to Python (Rice)
- Computer Science 101 (Stanford)
- Algorithms: Design and Analysis, Part 1 (Stanford)
- Algorithms: Design and Analysis, Part 2 (Stanford)
- Algorithms, Part I (Princeton)
- Algorithms, Part II (Princeton)
- Learn to Program: The Fundamentals (Toronto)
- edx offers education from MIT, Harvard, the universities of Texas and Berkeley
- CodeAcademy has JavaScript, HTML/CSS, Python and many more
Update: Lydia advised me on broken links with CodeAcademy asking to link to her Phython courses article in return. Thank you Lydia
Posted by Stephan H Wissel on 15 October 2012 | Comments (3) | categories: Software


I’ve graduated in Computer Science from UESC. During my studies I worked in an IT Research Center and co-founded a company called Techmobil.
Since then, I’ve worked as developer for Bopia, Todobebe.com and Globo.com and as consultant by ThoughtWorks for Rackspace, LATAM and other companies. I’ve also given workshops and lectures about Web Development, Testing, Continuous Delivery, React, Elm and more.
My current interests are board games, evolutionary architecture, functional programming and type systems.


[2019-10-23] This is partly a portfolio site, partly just a way to track what I'm thinking and doing. Organization is a work in progress.
[2019-10-23] You can count buses, you can count beans
[2019-03-28] 2019 MLB Betting Odds
[2019-10-23] 2019-20 NBA Betting Odds


Home
About
Products
3i
BluV
COUNTERTOP
Meridian 312
Iguassu 900
Meridian 525
Contact Us
Get Service
Request Service
9850 North Michigan Road
Suite E
Local:<PHONE_NUMBER>
Toll Free:<PHONE_NUMBER>


Active
Link
Link
Disabled
List of URLs to filter
(One per line)
facebook.com
Daytime intervals
From
To
-
Add
Save


class BinarySearchTree::Node(T)
- BinarySearchTree::Node(T)
- Reference
- Object
Overview
The Node Class is used to create Binary Trees. Every Node holds data. Every Node can have a left and a right child. Non existing Childs are nil
root = BinarySearchTree::Node(Int32).new(15)
root.insert(5) # will be the left child of root
root.insert(20) # will be the right child of root
root.insert(18) # will be the left child of '20'
root.find(20) # => BinarySearchTree::Node(Int32)
root.find(256) # => nil
root.delete_node(18) # => true
root.delete_node(256) # => false
Defined in:
BinarySearchTree.crConstructors
Instance Method Summary
-
#balance
Balances the tree
-
#bulk_insert(values : Array(T), &block : T, Bool -> Nil)
Inserts multiple values at once and calls block after every insert.
-
#bulk_insert(values : Array(T))
Inserts multiple values at once
-
#data : T
data which is being hold by the
Node(T)
-
#data=(data : T)
data which is being hold by the
Node(T)
-
#delete_node(val : T)
deletes the
Node(T)
with the given val. - #delete_node_and_childs(n : BinarySearchTree::Node(T))
-
#delete_node_and_childs(val : T)
deletes a node and its childs/subtree
-
#find(val : T)
Finds an Element in the tree by the data it contains
-
#find_recursive(val : T)
Recursive version of the
#find
method -
#find_smallest_child
Finds the smallest child of the given
Node(T)
-
#insert(val : T)
Inserts a new element into the tree
- #insert(node : BinarySearchTree::Node(T))
-
#insert_recursive(val : T)
Recursive Version of the
#insert
method - #insert_recursive(node : BinarySearchTree::Node(T))
-
#left : BinarySearchTree::Node(T)?
left child of the
Node(T)
-
#left=(left : BinarySearchTree::Node(T)?)
left child of the
Node(T)
-
#parent : BinarySearchTree::Node(T)?
parent of the
Node(T)
-
#parent=(parent : BinarySearchTree::Node(T)?)
parent of the
Node(T)
-
#remove_parent_relation
NO NO NO | Should never be called directly! | NO NO NO
-
#right : BinarySearchTree::Node(T)?
right child of the
Node(T)
-
#right=(right : BinarySearchTree::Node(T)?)
right child of the
Node(T)
-
#traverse_inorder(&block : BinarySearchTree::Node(T) -> Nil)
traverses the tree in 'inorder' (sorted from smallest to largest).
-
#traverse_postorder(&block : BinarySearchTree::Node(T) -> Nil)
traverses the tree in 'postorder'.
-
#traverse_preorder(&block : BinarySearchTree::Node(T) -> Nil)
traverses the tree in 'preorder'.
Constructor Detail
Instance Method Detail
Balances the tree
This Process is time and memory consuming and should not be done often Rebalancing is done by first copying the whole tree into a sorted array. This array is then constantly split in half always inserting the value in the middle of the split array This means that at the end of rebalancing, right before cleanup, the memory usage is the size of the tree * 2
Inserts multiple values at once and calls block after every insert.
root = BinarySearchTree::Node(Int32).new(5)
root.bulk_insert([4, 3, 2]) do |value, success|
unless success
puts "value #{value} was not inserted!"
end
end
Inserts multiple values at once
It uses the #insert
method under the hood. Errors while inserting are not reported.
root = BinarySearchTree::Node(Int32).new(5)
root.bulk_insert([5, 4, 3, 2])
deletes the Node(T)
with the given val. This method does only delete the specific Node(T)
and not the childs/subtree of the given Node(T)
root = BinarySearchTree::Node(Int32).new(5)
root.insert(4)
root.delete_node(4) # => true
root.delete_node(4) # => false
deletes a node and its childs/subtree
root = BinarySearchTree::Node(Int32).new(5)
root.insert(4)
root.insert(3)
root.delete_node_and_childs(4) # => true
root.delete_node_and_childs(20) # => false
Finds an Element in the tree by the data it contains
In case the element is not found nil is returned
root = BinarySearchTree::Node(Int32).new(15)
root.insert(20)
root.insert(26)
root.insert(22)
root.find(26) # => BinarySearchTree::Node(Int32)
root.find(256) # => nil
Inserts a new element into the tree
Insertion is done by finding a Node(T)
which does not have a child yet and appending it to that one (by creating a new Node(T)
)
The Child is being inserted in the left child if the data is smaller then the one of the current Node(T)
otherwise in the right one
root = BinarySearchTree::Node(Int32).new(15)
root.insert(5)
traverses the tree in 'inorder' (sorted from smallest to largest). &block is called on every Node(T)
traverses the tree in 'postorder'. &block is called on every Node(T)
traverses the tree in 'preorder'. &block is called on every Node(T)


| Home > Documentation > Developing > Tutorials > Developing EJB applications > Stateful Session Bean |
This application will take you through the basics of Stateful Session Bean. This application will demonstrate how annotations like @Stateful, @Resource, @PostConstruct, @PreDestroy, @PrePassivate, @PostActivate, @Remove are used in an EJB3 application.
Basically a Stateful Session EJB is used whenever there is a requirement to maintain a session. The example is a user registration process wherein the registration process is a two step process. First page prompts to enter your personal credentials and second page prompts to enter your billing and credit card information. The session is maintained till the user has filled up both the jsp pages. Later the complete information is populated on to a database. The application has a Controller servlet which routes the call received from the jsp client to the Bean class, setter methods and jsp pages.
To run this tutorial, as a minimum you will be required to have installed the following prerequisite software.
Details on installing eclipse are provided in the Development environment section.
This tutorial is organized in the following sections:
This section is organized in the following parts:
PersonalInfo.java
.
BillingInfo.java
and add the following code.
PersonalInfo.java
and BillingInfo.java
are classes for setting and getting the user information.Resolve the errors as follows.
<GERONIMO_HOME>/repository/org/apache/geronimo/specs/geronimo-ejb_3.0_spec/1.0.1
and select geronimo-ejb_3.0_spec-1.0.1.jar. Select Open.geronimo-annotation_1.0_spec-1.1.1.jar
.Let us walk through the EJB bean class code.
userinfo.sql
script. Select Run Sql.<GERONIMO_HOME>\repository\org\apache\geronimo\specs\geronimo-servlet_2.5_spec\1.1.2
and select geronimo-servlet_2.5_spec-1.1.2.jar and Select Open.Controller.java
servlet.
PersonalInfo.jsp
and Select Next.PersonalInfo.jsp
.
BillingInfo.jsp
and add the following code.Let's walk through the servlet and jsp code. First through Controller servlet code.
The above code is different from the original one in the sense that we have added another <servlet> for Controller1 which is mapped to the same servlet class. Similarly adding a <servlet-mapping> element for the Controller1 servlet. This feature is basically mapping of more than one servlet with same servlet class. This helps in routing each call from jsp in the Controller servlet.
| Bookmark this on Delicious Digg this | Privacy Policy - Copyright © 2003-2013, The Apache Software Foundation, Licensed under ASL 2.0. |


species evolutionary evolution ecological rescue Recommendation Ecol Figure changes interaction interactions Lett. body ./j.-...x effects likely {border-style different dynamics important network px;} #ffffff;} networks population Evolutionary current diversity mutualistic Evolution Proc Science. climate genetic plant variations potential Sci change maintenance ./pnas. ./science. Acad Ecology. Natl efficient food global role selection size species, species. ./ele. Loeuille context given phenologies complex implications instance, larger phenological prey structure time (e.g. Nature. Rapid changes. fast increasing plants predator px; response studies {font-family (evolutionary adaptation font-size impact interactions. invasive largely natural observed phenology shift shown sizes stability traits trophic Biol Biol. Sci. affect affecting communities. community consequences consider depends does double; examples functioning help large lead networks. phenotypes positive rescue, shows suggesting theoretical type ./nature Also, Body Global However, Loreau Reference Source University adaptive affects border-color border-width change. conservation differ directly eco-evolutionary ecosystems. effect extinction fitness growth indirect instance management networks, new published rescue. solid; suggest survive {font-style {font-weight Community Eco-evolutionary Given Selection Similarly, agricultural biodiversity bold case clearly coral courier; data depend discuss ecology em; empirical enhances evolving focus future general higher ignored importance initial line models modifications network. nutrient phenotypic pollinators present process pt;} relies resistance responses review selected shifts showed size. species’ study suggests temperature turn types variability various warming webs. work


Text based inputs should have .form-control added to them.
.form-control
Rounded borders of a text input is contained in the .b-rounded-lg class.
.b-rounded-lg


<< INDEX
Alaterm is an Android-specific customized installation of Arch Linux ARM, which is a version of Arch Linux compiled for the ARM CPU architecture.
Alaterm is not a Linux distribution. It does not provide software. It installs software provided by others, then configures the software.
Unlike the independent TermuxArch project, Alaterm is specifically configured for the benefit of desktop software users, rather than programmers.
Alaterm allows you to run the graphical LXDE Desktop, visible with the VNC Viewer app at connection <IP_ADDRESS>:5901.
Alaterm is not an Android app. To use Alaterm, you need Termux, which is an Android app.
Alaterm sits entirely within Termux. If you uninstall Termux, you lose Alaterm.
After Alaterm is installed, Termux features are the same as before. In case of problems, Alaterm files can be edited by Termux.
Alaterm does not affect your Android desktop.
You can multi-task. Android is active at all times, and manages WiFi and Bluetooth. While Alaterm is running, you can summon an Android Email app, or listen to an Android music app, or use an Android web browser.
Alaterm is not a dual-boot. It does not "root" your device, or jailbreak it. If you have rooted your device on your own initiative, then the consequences of using Alaterm are unknown.
The installed software provides the essential elements of a graphical desktop. When viewed in VNC Viewer, you will see wallpaper, taskbar, Menu, and file manager. If using a mouse, right-click will display context menus.
The screen is touch-sensitive, and will work on many small devices such as phones. However, the benefits of Alaterm are best with a large tablet, external keyboard, and mouse.
Some basic utility programs are pre-installed: calculator, font viewer, PDF viewer, text editor, programming editor, image viewer, web browser, preferences manager.
From the command line. you can install additional software, including many programs with advanced features. They will almost always look and operate the same way as they do on a laptop computer.
Be warned that due to limited resources, your device cannot have too many apps running at the same time. If overloaded, Android may close Termux. So if you multi-task, be sure to save your work in Alaterm before doing something else.
If Android security prohibits Termux from doing something, then Alaterm cannot do it. In particular, software requiring a service or daemon is unlikely to work.
You cannot use a cups printer, but most useful applications can export either PDF or images. Then you can print using another Android app, or copy the files to removable media such as a USB pendrive.
You cannot mount a CD player, DVD player, or external hard drive, unless Android can mount them and they are shared. This is unlikely. However, you can mount a USB pendrive or removable SDcard, if your device has the necessary connections. You can also transfer files via Bluetooth.
Alaterm is not configured for sound. Very few audio programs work properly, and it requires considerable effort to configure them. If your purpose is multimedia, then just do it with Android apps, not Alaterm.
The graphical Trash (Rubbish) Bin does not work. There is a Trash folder, but its contents can only be managed via command line.
Every part of Alaterm can be manipulated directly from Termux. There is no point to having secure passwords in Alaterm, because they can be changed without permission.
In Alaterm, your username us user and its password is password. Login is automatic, so you will not be asked for username or password.
When connecting to VNC viewer, the network password is password.
Only on rare occasions will you need to use sudo to obtain a higher level of privilege. No password is required.
Only on the rarest occasions (probably never) will you need to use su to become the root user. Its password is root. Note that this is only internal to Alaterm. It does not root Android.


Complete and hand in this completed worksheet (including its outputs and any supporting code outside of the worksheet) with your assignment submission. For more details see the assignments page on the course website.
In this exercise you will:
!unzip assignment1.zip
!rm -r assignment1.zip
!bash assignment1/cs231n/datasets/get_datasets.sh
import os
os.chdir('assignment1')
# Run some setup code for this notebook.
import random
import numpy as np
from cs231n.data_utils import load_CIFAR10
import matplotlib.pyplot as plt
from __future__ import print_function
# This is a bit of magic to make matplotlib figures appear inline in the
# notebook rather than in a new window.
%matplotlib inline
plt.rcParams['figure.figsize'] = (10.0, 8.0) # set default size of plots
plt.rcParams['image.interpolation'] = 'nearest'
plt.rcParams['image.cmap'] = 'gray'
# Some more magic so that the notebook will reload external python modules;
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2
# Load the raw CIFAR-10 data.
cifar10_dir = '../cifar-10-batches-py'
# Cleaning up variables to prevent loading data multiple times (which may cause memory issue)
try:
del X_train, y_train
del X_test, y_test
print('Clear previously loaded data.')
except:
pass
X_train, y_train, X_test, y_test = load_CIFAR10(cifar10_dir)
# As a sanity check, we print out the size of the training and test data.
print('Training data shape: ', X_train.shape)
print('Training labels shape: ', y_train.shape)
print('Test data shape: ', X_test.shape)
print('Test labels shape: ', y_test.shape)
# Visualize some examples from the dataset.
# We show a few examples of training images from each class.
classes = ['plane', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
num_classes = len(classes)
samples_per_class = 7
for y, cls in enumerate(classes):
idxs = np.flatnonzero(y_train == y)
idxs = np.random.choice(idxs, samples_per_class, replace=False)
for i, idx in enumerate(idxs):
plt_idx = i * num_classes + y + 1
plt.subplot(samples_per_class, num_classes, plt_idx)
plt.imshow(X_train[idx].astype('uint8'))
plt.axis('off')
if i == 0:
plt.title(cls)
plt.show()
# Split the data into train, val, and test sets. In addition we will
# create a small development set as a subset of the training data;
# we can use this for development so our code runs faster.
num_training = 49000
num_validation = 1000
num_test = 1000
num_dev = 500
# Our validation set will be num_validation points from the original
# training set.
mask = range(num_training, num_training + num_validation)
X_val = X_train[mask]
y_val = y_train[mask]
# Our training set will be the first num_train points from the original
# training set.
mask = range(num_training)
X_train = X_train[mask]
y_train = y_train[mask]
# We will also make a development set, which is a small subset of
# the training set.
mask = np.random.choice(num_training, num_dev, replace=False)
X_dev = X_train[mask]
y_dev = y_train[mask]
# We use the first num_test points of the original test set as our
# test set.
mask = range(num_test)
X_test = X_test[mask]
y_test = y_test[mask]
print('Train data shape: ', X_train.shape)
print('Train labels shape: ', y_train.shape)
print('Validation data shape: ', X_val.shape)
print('Validation labels shape: ', y_val.shape)
print('Test data shape: ', X_test.shape)
print('Test labels shape: ', y_test.shape)
# Preprocessing: reshape the image data into rows
X_train = np.reshape(X_train, (X_train.shape[0], -1))
X_val = np.reshape(X_val, (X_val.shape[0], -1))
X_test = np.reshape(X_test, (X_test.shape[0], -1))
X_dev = np.reshape(X_dev, (X_dev.shape[0], -1))
# As a sanity check, print out the shapes of the data
print('Training data shape: ', X_train.shape)
print('Validation data shape: ', X_val.shape)
print('Test data shape: ', X_test.shape)
print('dev data shape: ', X_dev.shape)
# Preprocessing: subtract the mean image
# first: compute the image mean based on the training data
mean_image = np.mean(X_train, axis=0)
print(mean_image[:10]) # print a few of the elements
plt.figure(figsize=(4,4))
plt.imshow(mean_image.reshape((32,32,3)).astype('uint8')) # visualize the mean image
plt.show()
# second: subtract the mean image from train and test data
X_train -= mean_image
X_val -= mean_image
X_test -= mean_image
X_dev -= mean_image
# third: append the bias dimension of ones (i.e. bias trick) so that our SVM
# only has to worry about optimizing a single weight matrix W.
X_train = np.hstack([X_train, np.ones((X_train.shape[0], 1))])
X_val = np.hstack([X_val, np.ones((X_val.shape[0], 1))])
X_test = np.hstack([X_test, np.ones((X_test.shape[0], 1))])
X_dev = np.hstack([X_dev, np.ones((X_dev.shape[0], 1))])
print(X_train.shape, X_val.shape, X_test.shape, X_dev.shape)
Your code for this section will all be written inside cs231n/classifiers/linear_svm.py.
As you can see, we have prefilled the function compute_loss_naive
which uses for loops to evaluate the multiclass SVM loss function.
# Evaluate the naive implementation of the loss we provided for you:
from cs231n.classifiers.linear_svm import svm_loss_naive
import time
# generate a random SVM weight matrix of small numbers
W = np.random.randn(3073, 10) * 0.0001
loss, grad = svm_loss_naive(W, X_dev, y_dev, 0.000005)
print('loss: %f' % (loss, ))
The grad
returned from the function above is right now all zero. Derive and implement the gradient for the SVM cost function and implement it inline inside the function svm_loss_naive
. You will find it helpful to interleave your new code inside the existing function.
To check that you have correctly implemented the gradient correctly, you can numerically estimate the gradient of the loss function and compare the numeric estimate to the gradient that you computed. We have provided code that does this for you:
# Once you've implemented the gradient, recompute it with the code below
# and gradient check it with the function we provided for you
# Compute the loss and its gradient at W.
loss, grad = svm_loss_naive(W, X_dev, y_dev, 0.0)
# Numerically compute the gradient along several randomly chosen dimensions, and
# compare them with your analytically computed gradient. The numbers should match
# almost exactly along all dimensions.
from cs231n.gradient_check import grad_check_sparse
f = lambda w: svm_loss_naive(w, X_dev, y_dev, 0.0)[0]
grad_numerical = grad_check_sparse(f, W, grad)
# do the gradient check once again with regularization turned on
# you didn't forget the regularization gradient did you?
loss, grad = svm_loss_naive(W, X_dev, y_dev, 5e1)
f = lambda w: svm_loss_naive(w, X_dev, y_dev, 5e1)[0]
grad_numerical = grad_check_sparse(f, W, grad)
It is possible that once in a while a dimension in the gradcheck will not match exactly. What could such a discrepancy be caused by? Is it a reason for concern? What is a simple example in one dimension where a gradient check could fail? How would change the margin affect of the frequency of this happening? Hint: the SVM loss function is not strictly speaking differentiable
Your Answer: fill this in.
# Next implement the function svm_loss_vectorized; for now only compute the loss;
# we will implement the gradient in a moment.
tic = time.time()
loss_naive, grad_naive = svm_loss_naive(W, X_dev, y_dev, 0.000005)
toc = time.time()
print('Naive loss: %e computed in %fs' % (loss_naive, toc - tic))
from cs231n.classifiers.linear_svm import svm_loss_vectorized
tic = time.time()
loss_vectorized, _ = svm_loss_vectorized(W, X_dev, y_dev, 0.000005)
toc = time.time()
print('Vectorized loss: %e computed in %fs' % (loss_vectorized, toc - tic))
# The losses should match but your vectorized implementation should be much faster.
print('difference: %f' % (loss_naive - loss_vectorized))
# Complete the implementation of svm_loss_vectorized, and compute the gradient
# of the loss function in a vectorized way.
# The naive implementation and the vectorized implementation should match, but
# the vectorized version should still be much faster.
tic = time.time()
_, grad_naive = svm_loss_naive(W, X_dev, y_dev, 0.000005)
toc = time.time()
print('Naive loss and gradient: computed in %fs' % (toc - tic))
tic = time.time()
_, grad_vectorized = svm_loss_vectorized(W, X_dev, y_dev, 0.000005)
toc = time.time()
print('Vectorized loss and gradient: computed in %fs' % (toc - tic))
# The loss is a single number, so it is easy to compare the values computed
# by the two implementations. The gradient on the other hand is a matrix, so
# we use the Frobenius norm to compare them.
difference = np.linalg.norm(grad_naive - grad_vectorized, ord='fro')
print('difference: %f' % difference)
We now have vectorized and efficient expressions for the loss, the gradient and our gradient matches the numerical gradient. We are therefore ready to do SGD to minimize the loss.
# In the file linear_classifier.py, implement SGD in the function
# LinearClassifier.train() and then run it with the code below.
from cs231n.classifiers import LinearSVM
svm = LinearSVM()
tic = time.time()
loss_hist = svm.train(X_train, y_train, learning_rate=1e-7, reg=2.5e4,
num_iters=1500, verbose=True)
toc = time.time()
print('That took %fs' % (toc - tic))
# A useful debugging strategy is to plot the loss as a function of
# iteration number:
plt.plot(loss_hist)
plt.xlabel('Iteration number')
plt.ylabel('Loss value')
plt.show()
# Write the LinearSVM.predict function and evaluate the performance on both the
# training and validation set
y_train_pred = svm.predict(X_train)
print('training accuracy: %f' % (np.mean(y_train == y_train_pred), ))
y_val_pred = svm.predict(X_val)
print('validation accuracy: %f' % (np.mean(y_val == y_val_pred), ))
# Use the validation set to tune hyperparameters (regularization strength and
# learning rate). You should experiment with different ranges for the learning
# rates and regularization strengths; if you are careful you should be able to
# get a classification accuracy of about 0.4 on the validation set.
learning_rates = [1e-8, 1e-7, 1e-6, 5e-6, 1e-5, 1e-4]
regularization_strengths = [2.5e4, 5e4, 5e5]
# results is dictionary mapping tuples of the form
# (learning_rate, regularization_strength) to tuples of the form
# (training_accuracy, validation_accuracy). The accuracy is simply the fraction
# of data points that are correctly classified.
results = {}
best_val = -1 # The highest validation accuracy that we have seen so far.
best_svm = None # The LinearSVM object that achieved the highest validation rate.
################################################################################
# TODO: #
# Write code that chooses the best hyperparameters by tuning on the validation #
# set. For each combination of hyperparameters, train a linear SVM on the #
# training set, compute its accuracy on the training and validation sets, and #
# store these numbers in the results dictionary. In addition, store the best #
# validation accuracy in best_val and the LinearSVM object that achieves this #
# accuracy in best_svm. #
# #
# Hint: You should use a small value for num_iters as you develop your #
# validation code so that the SVMs don't take much time to train; once you are #
# confident that your validation code works, you should rerun the validation #
# code with a larger value for num_iters. #
################################################################################
for lr in learning_rates:
for reg in regularization_strengths:
# trying 100 iteration then using 2000 iteration to make sure.
svm_classifier = LinearSVM()
loss_hist = svm_classifier.train(X_train, y_train, learning_rate=lr, reg=reg, num_iters=2000)
# predict the training set
y_train_pred = svm_classifier.predict(X_train)
acc_train = np.mean(y_train == y_train_pred)
# predict the validation set
y_val_pred = svm_classifier.predict(X_val)
acc_val = np.mean(y_val == y_val_pred)
results[(lr, reg)] = (acc_train, acc_val)
if acc_val > best_val:
best_svm = svm_classifier
best_val = acc_val
################################################################################
# END OF YOUR CODE #
################################################################################
# Print out results.
for lr, reg in sorted(results):
train_accuracy, val_accuracy = results[(lr, reg)]
print('lr %e reg %e train accuracy: %f val accuracy: %f' % (
lr, reg, train_accuracy, val_accuracy))
print('best validation accuracy achieved during cross-validation: %f' % best_val)
# Visualize the cross-validation results
import math
x_scatter = [math.log10(x[0]) for x in results]
y_scatter = [math.log10(x[1]) for x in results]
# plot training accuracy
marker_size = 100
colors = [results[x][0] for x in results]
plt.subplot(2, 1, 1)
plt.scatter(x_scatter, y_scatter, marker_size, c=colors)
plt.colorbar()
plt.xlabel('log learning rate')
plt.ylabel('log regularization strength')
plt.title('CIFAR-10 training accuracy')
# plot validation accuracy
colors = [results[x][1] for x in results] # default size of markers is 20
plt.subplot(2, 1, 2)
plt.scatter(x_scatter, y_scatter, marker_size, c=colors)
plt.colorbar()
plt.xlabel('log learning rate')
plt.ylabel('log regularization strength')
plt.title('CIFAR-10 validation accuracy')
plt.show()
# Evaluate the best svm on test set
y_test_pred = best_svm.predict(X_test)
test_accuracy = np.mean(y_test == y_test_pred)
print('linear SVM on raw pixels final test set accuracy: %f' % test_accuracy)
# Visualize the learned weights for each class.
# Depending on your choice of learning rate and regularization strength, these may
# or may not be nice to look at.
w = best_svm.W[:-1,:] # strip out the bias
w = w.reshape(32, 32, 3, 10)
w_min, w_max = np.min(w), np.max(w)
classes = ['plane', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
for i in range(10):
plt.subplot(2, 5, i + 1)
# Rescale the weights to be between 0 and 255
wimg = 255.0 * (w[:, :, :, i].squeeze() - w_min) / (w_max - w_min)
plt.imshow(wimg.astype('uint8'))
plt.axis('off')
plt.title(classes[i])


PICS:Black Friday Settings in Zim…..Customers flood Edgars since 3am
by Sharon ChirisaBlack Friday Settings in Zim…..Customers flood Edgars since 3am
The black Friday specials have sent Zimbaweans into a flurry of activity in a bid to get good discounts on all goods.
Black Friday is the name given to the shopping day after Thanksgiving in the US where retailers give huge discounts.
It was originally called Black Friday because the volume of shoppers created traffic accidents and sometimes even violence however there’s a more sinister version involving the slave trade.
Police coined the phrase to describe the mayhem surrounding the congestion of pedestrian and auto traffic in downtown shopping areas.
YOU MAY ALSO WANT
MURUME CHAIYE:Man divorces wife after 7 years,gives her permission to date lover
VP Chiwenga BANS Wife Mary From Using Social Media
‘Popular cheating prophets to be exposed and shamed’-Byo prophet drops scandalous adultery prophecy
WATCH: Scandal Ridden New ZESA Boss Gata Being Received In True Banana Republic Style
To View and Apply for the latest Jobs and Vacancies in Zimbabwe, Please Visit our Sister website iHarare Jobs


Introduction to Spark Structured Streaming - Part 1 : DataFrame Abstraction to Stream
Structured Streaming is a new streaming API, introduced in spark 2.0, rethinks stream processing in spark land. It models stream as an infinite table, rather than discrete collection of data. It’s a radical departure from models of other stream processing frameworks like storm, beam, flink etc. Structured Streaming is the first API to build stream processing on top of SQL engine.
Structured Streaming was in alpha in 2.0 and 2.1. But with release 2.2 it has hit stable status. In next few releases, it’s going to be de facto way of doing stream processing in spark. So it will be right time to make ourselves familiarise with this new API.
In this series of posts, I will be discussing about the different aspects of the structured streaming API. I will be discussing about new API’s, patterns and abstractions to solve common stream processing tasks.
This is the first post in the series. In this post, we discuss about the structured streaming abstractions. You can read all the posts in the series here.
Unified Dataset Abstraction in Spark 2.0
In Spark 2.0, spark has replaced RDD with Dataset as single abstraction for all user facing API’s. Dataset is an abstraction for structured world which combines best of both RDD and Dataframe world.Dataset has already replaced batch, machine learning and graph processing RDD API’s.
With structured streaming, dataset abstractions are coming to streaming API’s also. It’s going to be replacing RDD based streaming API of 1.x
Stream as Dataset/Dataframe
In spark 1.x, a stream is viewed as collection of RDD, where each RDD is created for minibatch. It worked well initially, as it allowed users of spark to reuse rdd abstractions for streaming also. But over time developers started noticing the limitations of this approach.
Limitations of DStream API
Batch Time Constraint
As stream is represented as faster batch processing, batch time become critical component of stream design. If you have coded in Dstream API, you know that you need to specify the batch time at the time of StreamingContext creation. This application level batch time becomes an issue, when different streams have different speeds. So often users resorted to window functions to normalise the streams which often lead to poor performance.
No Support for Event Time
As batch time dictates the central clock for stream, we cannot change it from stream to stream. So this means we can’t use time embedded in the stream , known as event time, for processing. Often in stream processing, we will be interested more in event time than process time i.e time of event generation at source rather than time at which event has reached the processing system. So it was not possible to expose the event time capability with Dstream API’s.
Weak Support for Dataset/DataFrame abstractions
As more and more code in spark moved to Dataframe/Dataset abstractions, it was desirable to do the same for streaming also. Often dataset based code resulted in performant code due to catalyst and code generations than RDD based ones.
It’s possible to create a dataset from RDD. But that doesn’t work well with streaming API’s. So users often stuck with RDD API’s for streaming where rest of libraries enjoyed better abstractions.
No Custom Triggers
As stream processing becomes complex, it’s often desirable to define custom triggers to track interesting behaviours. One of the typical use case for custom triggers are user sessions. Typically a user session is part of stream where user has logged in and using the services till he logged out or login expired. Many stream processing tasks like to define a window which captures this information.
One of the challenge of session is, it’s not bounded by time. Some sessions can be small but some may go for long. So we can’t use processing time or even event time to define this. As dstream API’s was only capable of defining window using time, user were not able define session based processing easily in existing API’s.
Updates
DStream API models stream as a continuous new events. It treats each event atomically and when we write the result of any batch, it doesn’t remember the state of earlier batches. This works well for simple ETL workloads. But often there are scenarios, where there is an event which indicates the update to the event which was already processed by the system. In that scenarios, it’s often desirable to update the sink ( a place to which we write the output of the stream processing), rather than adding new records. But Dstream API, doesn’t expose any of those semantics.
Advantages of Representing Stream as DataFrame
To solve the issues mentioned above, spark has remodeled the stream as infinite dataset, rather than a collection of RDD’s. This makes a quite departure from the mini batch model employed in earlier API. Using this model, we can address issues of earlier API’s.
Trigger is specific to Stream
In structured streaming, there is no batch time. It’s replaced with triggers which can be both time based and non-time based. Also trigger is specific to stream, which makes modeling event time and implementing sessionization straight forward in this new API.
Supports event time
As triggers are specific stream, new API has native support for event time.
Dataset is native abstraction
No more conversion from RDD to Dataframes. It’s native abstraction in structured streaming. Now we can leverage rest of dataset based libraries for better performance. It also brings the complete SQL support for the stream processing.
Supports different output modes
In structured streaming, there is concept of output modes. This allows streams to make decision on how to output whenever there is updates in stream.
Conclusion
Structured Streaming is a complete rethinking of stream processing in spark. It replaces earlier fast batch processing model with true stream processing abstraction.


--- title: About ---
I'm Matt, welcome to Planet A. In 2017 my wife Egle and I got married, moved to Berlin and started living as close to zero waste as we possibly could. This blog contains tips and tricks we've picked up along the way and a whole bunch of tasty recipes.
I grew up near Norwich a small city in the UK, surrounded by countryside and fields. My upbringing instilled a lifelong love of locally sourced food and cooking. Over the years, I've broadened my culinary horizons and Egle also happens to be a mean baker. Once we move to Berlin, we realised the huge amount of single use plastic we were going through. Moving abroad and the culture shift helped up change our lifestyle to live a zero waste life, while still enjoying amazing fresh food.
Making zero waste, vegan ramen with mum and dad.Remember ... there is no Planet B 💚


---
layout: default
---
You want to host a Sprint event?
You've come to the right place!
 Your efforts will help Firefox to have a successful launch.
In case you haven’t organized an event before, you can find everything on how to organize an event on this event guide.
{{content}}


EXPORT
Choose what to export:
Requests (the requests users create to get access to articles/data)
Availabilities (every click on the plugin or check via the site records an availability check)
Supports (every time a user supports an existing request)
Filter by: (optional)
journal
publisher
status
author email
keywords
username
user email
user profession
type
plugin
url
doi
url
plugin
username
user email
discovered article
discovered data
type
url
username
user email
request ID
profession
affiliation
Only requests with stories
for value: (optional)
Export
(Note: filtering by dates and by values can cause the resulting export to have no relevant records in it, which will cause an error instead of downloading a CSV file. If this happens, try relaxing your date ranges and/or filters.)


Solution Posted by {{solution.user.firstName}} {{solution.user.lastName}}
{{solution.date | date: 'MM/dd/yyyy hh:mm a'}}
{{solution.answer}}
Posted by {{answer.user.firstName}} {{answer.user.lastName}}
{{answer.date | date: 'MM/dd/yyyy hh:mm a'}}
{{answer.answer}}
Post Answer


Nodes of different colours represent the following:
Solid arrows point from one derived type to another which extends
(inherits from) it. Dashed arrows point from a derived type to another
type containing it as a components, with a label listing the name(s) of
said component(s).


Version 2 of the AWS Mobile SDK for iOS has reached General Availability (GA) and is no longer in Developer Preview. Version 1 is deprecated as of September 29, 2014, and will continue to be available until December 31, 2014, in our aws-sdk-ios-v1 repository. If you are building new apps, we recommend you use Version 2.
pod 'AWS<#ServiceName#>'
to your Podfile.To get started with the AWS SDK for iOS, you can set up the SDK and start building a new project, or you can integrate the SDK in an existing project. You can also run the samples to get a sense of how the SDK works.
The AWS Mobile SDK for iOS supports the following versions of software:
You can check out the SDK source code.
The sample apps are standalone projects that are already set up for you. You can also integrate the SDK for iOS with an existing application. If you have an existing app in which you'd like to use AWS, there are two ways to import the AWS Mobile SDK for iOS into your project:
The AWS Mobile SDK for iOS is available through CocoaPods. If you have not installed CocoaPods, install CocoaPods by running the command:
$ sudo gem install cocoapods
$ pod setup
In your project directory (the directory where your *.xcodeproj
file is), create a plain text file named Podfile (without any file extension) and add the following lines.
source 'https://github.com/CocoaPods/Specs.git'
pod 'AWSCore'
pod 'AWSAutoScaling'
pod 'AWSCloudWatch'
pod 'AWSDynamoDB'
pod 'AWSEC2'
pod 'AWSElasticLoadBalancing'
pod 'AWSKinesis'
pod 'AWSLambda'
pod 'AWSMachineLearning'
pod 'AWSS3'
pod 'AWSSES'
pod 'AWSSimpleDB'
pod 'AWSSNS'
pod 'AWSSQS'
pod 'AWSCognito'
Then run the following command:
$ pod install
Open up *.xcworkspace
with Xcode and start using the SDK.
Note: Do NOT use *.xcodeproj
. If you open up a project file instead of a workspace, you receive an error:
ld: library not found for -lPods-AWSiOSSDKv2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Download the SDK from our AWS Mobile SDK page. The SDK is stored in a compressed file archive named aws-ios-sdk-#.#.#
(where #.#.#
represents the version number, so for version 2.0.0, the filename is aws-ios-sdk-2.0.0
).
Note: The size of AWSiOSSDKv2.framework is > 65MB; however, it does not add > 65MB to your app binary when imported to your project because:
Only objects that you use in your app are included in your app binary from the framework
AWSiOSSDKv2.framework contains a static library, and object code in the library is incorporated in your app binary file at build time. When the -ObjC
and -all_load
linker flags are NOT used, Xcode is smart enough to figure out what objects from the framework are necessary for your app and include just those objects. AWSiOSSDKv2.framework is packaged so that you do not need to include these linker flags. (If you are using a third-party framework that requires you to include the -ObjC
or -all_load
linker flags, you can use -force_load
instead to include those frameworks.)
For example, if you only use Amazon DynamoDB in your app and none of the other supported services, your app won't include object code for those other services. Unless you use every single object from the framework, only a portion of the code from the framework will be included in your app.
The framework contains five architectures, while apps on a device need at most three
We currently compile the AWS Mobile SDK for iOS for five architectures: armv7
, armv7s
, arm64
, i386
, and x86_64
. If you want to optimize your app for 64-bit devices including iPhone 6 and iPhone 5S, you need to build your app with arm64
support. 32-bit iOS devices that the AWS SDK for iOS supports use the armv7
and armv7s
architectures.
The 64-bit iPhone simulators use x86_64
, and 32-bit simulators use i386
because they run on the Mac. We support these architectures so that the developers can run their apps with our framework on the simulator for testing. x86_64
and i386
support is essential for testing, but the code is unnecessary for apps on the App Store. Even if you use every single object from the AWS Mobile SDK, the app that you submit to Apple never includes about two fifths of the code included in the framework.
Apps on the App Store are compressed
After you submit your app to Apple, it is encrypted for DRM purposes and re-compressed. This leads to an even smaller footprint.
With your project open in Xcode, Control+click Frameworks and then click Add files to "<project name>"....
In Finder, navigate to the AWS<#ServiceName#>.framework
files and select them.
AWSCore.framework
AWSAutoScaling.framework
AWSCloudWatch.framework
AWSDynamoDB.framework
AWSEC2.framework
AWSElasticLoadBalancing.framework
AWSKinesis.framework
AWSLambda.framework
AWSMachineLearning.framework
AWSS3.framework
AWSSES.framework
AWSSimpleDB.framework
AWSSNS.framework
AWSSQS.framework
extras/AWSCognito.framework
- for Amazon Cognito Sync
Click Add.
Following the same procedure, add the following frameworks, located in the third-party directory, into your project.
Bolts.framework
(If your application uses the Facebook SDK, you may not need this framework, as it's already included with the Facebook SDK.)FMDB.framework
GZIP.framework
Mantle.framework
Reachability.framework
TMCache.framework
UICKeyChainStore.framework
XMLDictionary.framework
Drag and drop the following JSON files, located in the service-definitions directory, into your project.
autoscaling-2011-01-01.json
cognito-identity-2014-06-30.json
cognito-sync-2014-06-30.json
dynamodb-2012-08-10.json
ec2-2014-06-15.json
elasticloadbalancing-2012-06-01.json
email-2010-12-01.json
kinesis-2013-12-02.json
lambda-2015-03-31.json
machinelearning-2014-12-12.json
mobileanalytics-2014-06-30.json
monitoring-2010-08-01.json
s3-2006-03-01.json
sdb-2009-04-15.json
sns-2010-03-31.json
sqs-2012-11-05.json
sts-2011-06-15.json
Open a target for your project, select Build Phases, expand Link Binary With Libraries, click the + button, and add libsqlite3.dylib
, libz.dylib
, and SystemConfiguration.framework
.
When we release a new version of the SDK, you can pick up the changes as described below.
Run the following command in your project directory. CocoaPods automatically picks up the new changes.
$ pod update
Note: If your pod is having an issue, you can delete Podfile.lock
and Pods/
then run pod install
to cleanly install the SDK.
In Xcode select the following frameworks and hit delete on your keyboard. Then select Move to Trash:
AWSCore.framework
AWSAutoScaling.framework
AWSCloudWatch.framework
AWSDynamoDB.framework
AWSEC2.framework
AWSElasticLoadBalancing.framework
AWSKinesis.framework
AWSLambda.framework
AWSMachineLearning.framework
AWSS3.framework
AWSSES.framework
AWSSimpleDB.framework
AWSSNS.framework
AWSSQS.framework
AWSCognito.framework
Bolts.framework
FMDB.framework
GZIP.framework
Mantle.framework
Reachability.framework
TMCache.framework
UICKeyChainStore.framework
XMLDictionary.framework
Also, delete the JSON files:
autoscaling-2011-01-01.json
cognito-identity-2014-06-30.json
cognito-sync-2014-06-30.json
dynamodb-2012-08-10.json
ec2-2014-06-15.json
elasticloadbalancing-2012-06-01.json
email-2010-12-01.json
kinesis-2013-12-02.json
lambda-2015-03-31.json
machinelearning-2014-12-12.json
mobileanalytics-2014-06-30.json
monitoring-2010-08-01.json
s3-2006-03-01.json
sdb-2009-04-15.json
sns-2010-03-31.json
sqs-2012-11-05.json
sts-2011-06-15.json
Follow the installation process above to include the new version of the SDK.
Create an Objective-C bridging header file using Xcode.
In the bridging header, import the appropriate headers for the services you are using. The header file import convention is #import <AWSServiceName/AWSServiceName.h>
, as in the following examples:
#import <AWSCore/AWSCore.h>
#import <AWSS3/AWSS3.h>
#import <AWSDynamoDB/AWSDynamoDB.h>
#import <AWSSQS/AWSSQS.h>
#import <AWSSNS/AWSSNS.h>
#import <AWSCognito/AWSCognito.h>
From Your Target > Build Settings > Objective-C Bridging Header, point Objective-C Bridging Header to the bridging header you just created.
Import the AWSCore header in the application delegate.
#import <AWSCore/AWSCore.h>
Create a default service configuration by adding the following code snippet in the application:didFinishLaunchingWithOptions:
application delegate method.
let credentialsProvider = AWSCognitoCredentialsProvider(
regionType: CognitoRegionType,
identityPoolId: CognitoIdentityPoolId)
let configuration = AWSServiceConfiguration(
region: DefaultServiceRegionType,
credentialsProvider: credentialsProvider)
AWSServiceManager.defaultServiceManager().defaultServiceConfiguration = configuration
Make a call to the AWS services.
let dynamoDB = AWSDynamoDB.defaultDynamoDB()
let listTableInput = AWSDynamoDBListTablesInput()
dynamoDB.listTables(listTableInput).continueWithBlock{ (task: BFTask!) -> AnyObject! in
let listTablesOutput = task.result as AWSDynamoDBListTablesOutput
for tableName : AnyObject in listTablesOutput.tableNames {
println("\(tableName)")
}
return nil
}
Note: Most of the service client classes have a singleton method to get a default client. The naming convention is + defaultSERVICENAME
(e.g. + defaultDynamoDB
in the above code snippet). This singleton method creates a service client with defaultServiceConfiguration
, which you set up in step 5, and maintains a strong reference to the client.
Import the AWSCore header in the application delegate.
#import <AWSCore/AWSCore.h>
Create a default service configuration by adding the following code snippet in the application:didFinishLaunchingWithOptions:
application delegate method.
AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:CognitoRegionType
identityPoolId:CognitoIdentityPoolId];
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:DefaultServiceRegionType
credentialsProvider:credentialsProvider];
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration;
Import the appropriate headers for the services you are using. The header file import convention is #import <AWSServiceName/AWSServiceName.h>
, as in the following examples:
#import <AWSCore/AWSCore.h>
#import <AWSS3/AWSS3.h>
#import <AWSDynamoDB/AWSDynamoDB.h>
#import <AWSSQS/AWSSQS.h>
#import <AWSSNS/AWSSNS.h>
#import <AWSCognito/AWSCognito.h>
Make a call to the AWS services.
AWSS3TransferManager *transferManager = [AWSS3Transfermanager defaultS3TransferManager];
AWSS3TransferManagerUploadRequest *uploadRequest = [AWSS3TransferManagerUploadRequest new];
uploadRequest.bucket = yourBucket;
uploadRequest.key = yourKey;
uploadRequest.body = yourDataURL;
uploadRequest.contentLength = [NSNumber numberWithUnsignedLongLong:fileSize];
[[transferManager upload:uploadRequest] continueWithBlock:^id(BFTask *task) {
// Do something with the response
return nil;
}];
Note: Most of the service client classes have a singleton method to get a default client. The naming convention is + defaultSERVICENAME
(e.g. + defaultS3TransferManager
in the above code snippet). This singleton method creates a service client with defaultServiceConfiguration
, which you set up in step 5, and maintains a strong reference to the client.
With native BFTask support in the SDK for iOS, you can chain async requests instead of nesting them. It makes the logic cleaner, while keeping the code more readable. Read this blog post to learn how to use BFTask.
Changing log levels during development may make debugging easier. You can change the log level by importing AWSCore.h and calling:
Swift
AWSLogger.defaultLogger().logLevel = .Verbose
The following logging level options are available:
.None
.Error
(This is the default. Only error logs are printed to the console.).Warn
.Info
.Debug
.Verbose
Objective-C
[AWSLogger defaultLogger].logLevel = AWSLogLevelVerbose;
The following logging level options are available:
AWSLogLevelNone
AWSLogLevelError
(This is the default. Only error logs are printed to the console.)AWSLogLevelWarn
AWSLogLevelInfo
AWSLogLevelDebug
AWSLogLevelVerbose
The AWS SDK for iOS includes sample apps that demonstrate common use cases.
This sample demonstrates how to securely manage and sync your mobile app data and create unique identities via login providers including Facebook, Google, and Login with Amazon.
This sample demonstrates how to insert / update / delete / query items using DynamoDB Object Mapper.
This sample demonstrates how to upload / download multiple files simultaneously using S3 Transfer Manager. It also shows how to pause, resume, and cancel file upload / download.
This sample demonstrates how to use the Amazon S3 PreSigned URL Builder to download / upload files in background.
This sample demonstrates how to set up Amazon SNS Mobile Push and record events using Amazon Mobile Analytics.
The AWS Mobile SDK for iOS zip file includes documentation in the DocSets format that you can view within Xcode. The easiest way to install the documentation is to use the Mac OS X terminal.
Open the Mac OS X terminal and go to the directory containing the expanded archive. For example:
$ cd ~/Downloads/aws-ios-sdk-2.0.0
Note: Remember to replace 2.0.0 in the example above with the actual version number of the AWS SDK for iOS that you downloaded.
Create a directory called ~/Library/Developer/Shared/Documentation/DocSets
:
$ mkdir -p ~/Library/Developer/Shared/Documentation/DocSets
Copy (or move) Documentation/com.amazon.aws.ios.docset
from the SDK installation files to the directory you created in the previous step:
$ mv Documentation/com.amazon.aws.ios.docset ~/Library/Developer/Shared/Documentation/DocSets/
If Xcode was running during this procedure, restart Xcode. To browse the documentation, go to Help, click Documentation and API Reference, and select AWS SDK for iOS v2.0 Documentation (where '2.0' is the appropriate version number).
Visit our GitHub Issues to leave feedback and to connect with other users of the SDK.
Amazon Web Services
The AWS Mobile SDK for iOS is available under the Apache License. See the LICENSE file for more info.