African Rankings: Chiefs Chase Sundowns
by Soccer LadumaThe latest African rankings have been revealed, which shows Kaizer Chiefs not too far off from catching up to Mamelodi Sundowns, despite not challenging in any CAF Competition.
Chiefs have extended their Absa Premiership unbeaten run this past weekend after a 3-2 victory over their neighbours, Orlando Pirates.
Read more: ‘If Chiefs Want To Go All The Way With Us, They Can Try!’
This weekend’s result saw Amakhosi go 10 points clear at the top of the log, after Sundowns’ 3-2 loss to Golden Arrows.
Bidvest Wits also took a knock this weekend after a 1-0 loss to SuperSport United.
Here are the top four South African clubs on the African rankings according to footballdatabase.com:
Sundowns - 14th place
Chiefs - 18th place
Wits - 22nd place
Pirates - 25th place
Elsewhere in Africa, Esperance de Tunis remains the number one club on the African continent, although Al Ahly is positioned in second place, are not far from catching up to the top spot.
Here are the top 10 African clubs on the continent according to footballdatabase.com:
- Esperance de Tunis
- Al Ahly
- TP Mazembe
- Etoile du Sahel
- Al-Merreikh
- Vita Club
- Al Hilal Omdurman
- Wydad Casablanca
- El Zamalek
- CS Sfaxien
Where do you think the top four South African clubs will be positioned on the rankings by the end of the year? Let us know un the comment section below.


--- title: Most Consecutive Years with a New Starter on Opening Day author: ~ date: '2020-12-17' slug: most-consecutive-years-with-a-new-starter-on-opening-day categories: [] tags: [] comments: no showcomments: yes showpagemeta: yes ---
Throughout 2020, I have helped answer baseball research questions for the FanGraphs podcast “Effectively Wild.” Every couple of weeks, one of the hosts will reach out to be asking if I can find the answer to a baseball history question for a segment known as a “Stat Blast.” To answer the questions, I have largely used two databases: a Retrosheet database I have on my own laptop (set up using a tutorial from Bill Petti at https://billpetti.github.io/2019-08-10-build-retrosheet-event-roster-database-rstats-baseballr/) and the Lahman database (which I access with the Lahman package in R).
This series shows how I use these databases along with R to answer these questions. Today, I show how I answered a question on the longest streaks for having a different starter at a position on opening day.
The question was framed as the following:
Since the Giants participated in the blackballing of Barry Bonds, they have not had the same opening day starting LF in consecutive years:
2020, whenever it starts, (or 2021) will be the 13th year without the same opening day starter at a position. Is this a record? If not, what is the record?
To answer this question, I first read in the data from my retrosheet database. The file “dbcon.R” is a script that attaches to a PostgreSQL database and the dbGetQuery() function uses a SQL query to read the entire retro_games table into R. The retro_games table contains one row for each game in MLB history, with game information, including the lineup and positions for the starters, which I will use the answer the question.
library(tidyverse)
source("dbcon.R")
games <- dbGetQuery(con, 'select * from retro_games')
There is some data manipulation necessary to answer the question. First, I would like to have one row for each starting position for each game for each team, or 18 rows per game, rather than the one row per game that the data are currently structured as. The below commands do just that.
away_players <- games %>%
mutate(date_use = as.numeric(substr(game_id, 4,12))) %>%
select(date_use, year_id, team = visiting_team, visitor_batting1name,
visitor_batting2name,
visitor_batting3name,
visitor_batting4name,
visitor_batting5name,
visitor_batting6name,
visitor_batting7name,
visitor_batting8name,
visitor_batting9name) %>%
pivot_longer(-c(date_use, year_id, team)) %>%
select(date_use, year_id, team, player = value)
away_pos <- games %>%
mutate(date_use = as.numeric(substr(game_id, 4,12))) %>%
select(date_use, year_id, team = visiting_team, visitor_batting1position,
visitor_batting2position,
visitor_batting3position,
visitor_batting4position,
visitor_batting5position,
visitor_batting6position,
visitor_batting7position,
visitor_batting8position,
visitor_batting9position) %>%
pivot_longer(-c(date_use, year_id, team)) %>%
select(position = value)
away_combined <- cbind(away_players, away_pos)
head(away_combined, 20)
## date_use year_id team player position
## 1 201903200 2019 SEA Dee Gordon 4
## 2 201903200 2019 SEA Mitch Haniger 8
## 3 201903200 2019 SEA Jay Bruce 3
## 4 201903200 2019 SEA Edwin Encarnacion 10
## 5 201903200 2019 SEA Domingo Santana 7
## 6 201903200 2019 SEA Omar Narvaez 2
## 7 201903200 2019 SEA Ryon Healy 5
## 8 201903200 2019 SEA Tim Beckham 6
## 9 201903200 2019 SEA Ichiro Suzuki 9
## 10 201903210 2019 SEA Dee Gordon 4
## 11 201903210 2019 SEA Mitch Haniger 8
## 12 201903210 2019 SEA Jay Bruce 3
## 13 201903210 2019 SEA Edwin Encarnacion 10
## 14 201903210 2019 SEA Domingo Santana 7
## 15 201903210 2019 SEA Omar Narvaez 2
## 16 201903210 2019 SEA Tim Beckham 6
## 17 201903210 2019 SEA Ryon Healy 5
## 18 201903210 2019 SEA Ichiro Suzuki 9
## 19 201903280 2019 PIT Adam Frazier 4
## 20 201903280 2019 PIT Melky Cabrera 9
In the data frame, for each game, there is a row for each position, the name of the player playing that position, the team for that player, the year, and the date of the game. This dataframe only contains the away teams, so I repeat the code for the home teams and rbind the two data frames together.
home_players <- games %>% mutate(date_use = as.numeric(substr(game_id, 4,12))) %>%
select(date_use, year_id, team = home_team, home_batting1name,
home_batting2name,
home_batting3name,
home_batting4name,
home_batting5name,
home_batting6name,
home_batting7name,
home_batting8name,
home_batting9name) %>%
pivot_longer(-c(date_use, year_id, team)) %>%
select(date_use, year_id, team, player = value)
home_pos <- games %>% mutate(date_use = as.numeric(substr(game_id, 4,12))) %>%
select(date_use, year_id, team = home_team, home_batting1position,
home_batting2position,
home_batting3position,
home_batting4position,
home_batting5position,
home_batting6position,
home_batting7position,
home_batting8position,
home_batting9position) %>%
pivot_longer(-c(date_use, year_id, team)) %>%
select(position = value)
home_combined <- cbind(home_players, home_pos)
lineups <- rbind(away_combined, home_combined)
The data set contains information for every game, while I am only interested in the first game of the season for each team. To filter out non-opening games, I group by each year and each team, then filter the date to be equal to the lowest date for each team in each year. The table below shows the opening day lineups for two teams in 1871.
opening_day <- lineups %>%
group_by(year_id, team) %>%
filter(date_use == min(date_use)) %>%
ungroup() %>%
mutate(year_id = as.numeric(year_id)) %>%
arrange(year_id)
head(opening_day, 18)
## # A tibble: 18 x 5
## date_use year_id team player position
## <dbl> <dbl> <chr> <chr> <dbl>
## 1 187105040 1871 CL1 Deacon White 2
## 2 187105040 1871 CL1 Gene Kimball 4
## 3 187105040 1871 CL1 Charlie Pabor 7
## 4 187105040 1871 CL1 Art Allison 8
## 5 187105040 1871 CL1 Elmer White 9
## 6 187105040 1871 CL1 Al Pratt 1
## 7 187105040 1871 CL1 Ezra Sutton 5
## 8 187105040 1871 CL1 Jim Carleton 3
## 9 187105040 1871 CL1 John Bass 6
## 10 187105050 1871 BS1 George Wright 6
## 11 187105050 1871 BS1 Ross Barnes 4
## 12 187105050 1871 BS1 Dave Birdsall 9
## 13 187105050 1871 BS1 Cal McVey 2
## 14 187105050 1871 BS1 Harry Wright 8
## 15 187105050 1871 BS1 Charlie Gould 3
## 16 187105050 1871 BS1 Harry Schafer 5
## 17 187105050 1871 BS1 Fred Cone 7
## 18 187105050 1871 BS1 Al Spalding 1
Next, I need to identify years where there is a new starter at a position for a team. The is_new() function evaluate whether one element of a vector is different from the previous element, while the streak_finder function finds how many consective elements something is present. In this case, the is_new will create a logical vector indicating whether there is a new starter at a position for a team and the streak finder function will use that logical vector to find the number of consectutive years there has been a new starter.
Additionally, since teams can change names over time, I use the “CurrentNames.csv” file to add the franchise to each team.
is_new <- function(vec) {
test <- NULL
test[2:length(vec)] <- vec[1:(length(vec)-1)] != vec[2:length(vec)]
test[1] <- TRUE
test
}
streak_finder <- function(vec){
test <- NULL
count <- 0
for(i in 1:length(vec)){
if(vec[i]){
count <- count +1
} else(count <- 1)
test[i] <- count
}
test
}
team_names <- read.csv("CurrentNames.csv", header = FALSE)[,1:2]
colnames(team_names) <- c("franchise", "team")
team_names <- distinct(team_names)
opening_clean <- opening_day %>%
left_join(team_names, by = "team") %>%
na.omit()
opening_use <- opening_clean %>%
arrange(franchise, position) %>%
mutate(new_player = is_new(player)) %>%
group_by(franchise, position) %>%
mutate(streak = streak_finder(new_player)) %>%
ungroup()
With each streak identified, I can identify the beginning and end of each streak and the players the first and last players in the streak. I have listed those below, only showing the streaks that had at least 10 different players.
streaks_hit <- opening_use %>% filter(position != 1) %>%
mutate(streak = streak-1) %>%
filter(streak >= 10) %>%
select(year_id,team, player, position, franchise, streak) %>%
mutate(begin_year = year_id - streak+1) %>%
group_by(franchise, begin_year) %>%
filter(streak == max(streak)) %>%
ungroup %>%
arrange(desc(begin_year)) %>%
arrange(desc(streak))
get_player_name <- function(fran, pos, yr){
opening_use %>%
filter(franchise == fran & position == pos & year_id == yr) %>%
pull(player) %>%
.[1]
}
streaks_hit$first_player <- sapply(1:nrow(streaks_hit), function(x) get_player_name(streaks_hit$franchise[x], streaks_hit$position[x], streaks_hit$begin_year[x]))
streaks_hit$last_player <- sapply(1:nrow(streaks_hit), function(x) get_player_name(streaks_hit$franchise[x], streaks_hit$position[x], streaks_hit$year_id[x]))
streaks_hit %>%
na.omit() %>%
select(Franchise = franchise,
Position = position,
Streak = streak,
"First Year" = begin_year,
"Last Year" = year_id,
"First Player" = first_player,
"Last Player" = last_player) %>%
kableExtra::kable() %>%
kableExtra::kable_styling() %>%
kableExtra::scroll_box(height = "500px")
| Franchise | Position | Streak | First Year | Last Year | First Player | Last Player |
|---|---|---|---|---|---|---|
| BAL | 7 | 26 | 1933 | 1958 | Carl Reynolds | Gene Woodling |
| DET | 7 | 20 | 1942 | 1961 | Barney McCosky | Rocky Colavito |
| BAL | 10 | 19 | 1996 | 2014 | Bobby Bonilla | Delmon Young |
| CHA | 5 | 19 | 1948 | 1966 | Luke Appling | Don Buford |
| NYA | 7 | 17 | 1920 | 1936 | Duffy Lewis | Roy Johnson |
| NYA | 9 | 17 | 1919 | 1935 | Sammy Vick | George Selkirk |
| DET | 2 | 16 | 1951 | 1966 | Joe Ginsberg | Bill Freehan |
| LAN | 7 | 16 | 1944 | 1959 | Augie Galan | Wally Moon |
| SDN | 7 | 15 | 2006 | 2020 | Eric Young | Tommy Pham |
| LAN | 7 | 15 | 1927 | 1941 | Jigger Statz | Joe Medwick |
| COL | 4 | 14 | 2001 | 2014 | Todd Walker | DJ LeMahieu |
| NYA | 7 | 14 | 1990 | 2003 | Mel Hall | Hideki Matsui |
| BOS | 9 | 14 | 1988 | 2001 | Mike Greenwell | Trot Nixon |
| PHI | 7 | 14 | 1984 | 1997 | Glenn Wilson | Gregg Jefferies |
| ANA | 8 | 14 | 1968 | 1981 | Roger Repoz | Fred Lynn |
| CLE | 9 | 14 | 1939 | 1952 | Earl Averill | Harry Simpson |
| SFN | 5 | 14 | 1937 | 1950 | Lou Chiozza | Hank Thompson |
| CIN | 7 | 14 | 1930 | 1943 | Bob Meusel | Eric Tipton |
| BOS | 6 | 14 | 1922 | 1935 | Frank O’Rourke | Joe Cronin |
| SFN | 7 | 13 | 2008 | 2020 | Dave Roberts | Alex Dickerson |
| OAK | 7 | 13 | 2001 | 2013 | Johnny Damon | Yoenis Cespedes |
| LAN | 4 | 13 | 1962 | 1974 | Jim Gilliam | Davey Lopes |
| SLN | 7 | 13 | 1955 | 1967 | Wally Moon | Lou Brock |
| CHN | 8 | 13 | 1932 | 1944 | Kiki Cuyler | Andy Pafko |
| ANA | 10 | 12 | 2005 | 2016 | Jeff DaVanon | Albert Pujols |
| TBA | 9 | 12 | 2004 | 2015 | Jose Cruz | Steven Souza |
| DET | 10 | 12 | 1993 | 2004 | Kirk Gibson | Dmitri Young |
| ANA | 4 | 12 | 1991 | 2002 | Luis Sojo | Adam Kennedy |
| ANA | 9 | 12 | 1982 | 1993 | Reggie Jackson | Tim Salmon |
| TEX | 9 | 12 | 1964 | 1975 | Jim King | Jeff Burroughs |
| PHI | 4 | 12 | 1931 | 1942 | Bernie Friberg | Danny Murtaugh |
| MIN | 9 | 12 | 1916 | 1927 | Charlie Jamieson | Sam Rice |
| NYA | 8 | 12 | 1912 | 1923 | Bert Daniels | Whitey Witt |
| KCA | 7 | 11 | 2001 | 2011 | Mark Quinn | Alex Gordon |
| TEX | 10 | 11 | 2001 | 2011 | Andres Galarraga | Michael Young |
| MIA | 9 | 11 | 1999 | 2009 | Mark Kotsay | Cody Ross |
| CHN | 7 | 11 | 1988 | 1998 | Rafael Palmeiro | Henry Rodriguez |
| HOU | 9 | 11 | 1988 | 1998 | Terry Puhl | Derek Bell |
| NYN | 8 | 11 | 1986 | 1996 | Lenny Dykstra | Lance Johnson |
| DET | 9 | 11 | 1974 | 1984 | Jim Northrup | Kirk Gibson |
| CHN | 8 | 11 | 1957 | 1967 | Bob Will | Adolfo Phillips |
| CHA | 9 | 11 | 1949 | 1959 | Pat Seerey | Al Smith |
| ATL | 3 | 11 | 1937 | 1947 | Elbie Fletcher | Earl Torgeson |
| ATL | 5 | 11 | 1937 | 1947 | Debs Garms | Bob Elliott |
| OAK | 4 | 11 | 1934 | 1944 | Rabbit Warstler | Irv Hall |
| SLN | 9 | 11 | 1926 | 1936 | Chick Hafey | Pepper Martin |
| ATL | 8 | 11 | 1910 | 1920 | Fred Beck | Ray Powell |
| NYA | 4 | 11 | 1908 | 1918 | Harry Niles | Del Pratt |
| HOU | 3 | 10 | 2010 | 2019 | Geoff Blum | Yulieski Gurriel |
| NYN | 7 | 10 | 2007 | 2016 | Moises Alou | Yoenis Cespedes |
| TBA | 5 | 10 | 2000 | 2009 | Herbert Perry | Evan Longoria |
| SEA | 7 | 10 | 1997 | 2006 | Lee Tinsley | Raul Ibanez |
| BOS | 4 | 10 | 1995 | 2004 | Luis Alicea | Mark Bellhorn |
| KCA | 2 | 10 | 1993 | 2002 | Brent Mayne | Brent Mayne |
| TEX | 6 | 10 | 1990 | 1999 | Jeff Kunkel | Royce Clayton |
| NYA | 10 | 10 | 1989 | 1998 | Tom Brookens | Chili Davis |
| BAL | 9 | 10 | 1985 | 1994 | Larry Sheets | Jeffrey Hammonds |
| NYA | 10 | 10 | 1974 | 1983 | Bill Sudakis | Don Baylor |
| LAN | 7 | 10 | 1966 | 1975 | Lou Johnson | Bill Buckner |
| OAK | 7 | 10 | 1961 | 1970 | Norm Siebern | Felipe Alou |
| PHI | 3 | 10 | 1961 | 1970 | Pancho Herrera | Deron Johnson |
| CIN | 5 | 10 | 1959 | 1968 | Frank Thomas | Tony Perez |
| CIN | 7 | 10 | 1959 | 1968 | Jerry Lynch | Alex Johnson |
| LAN | 5 | 10 | 1957 | 1966 | Randy Jackson | Jim Lefebvre |
| BAL | 9 | 10 | 1955 | 1964 | Gene Woodling | Sam Bowens |
| OAK | 4 | 10 | 1951 | 1960 | Billy Hitchcock | Jerry Lumpe |
| SLN | 8 | 10 | 1946 | 1955 | Terry Moore | Bill Virdon |
| OAK | 7 | 10 | 1943 | 1952 | Jim Tyack | Gus Zernial |
| LAN | 8 | 10 | 1940 | 1949 | Charlie Gilbert | Duke Snider |
| OAK | 8 | 10 | 1939 | 1948 | Dee Miles | Sam Chapman |
| PIT | 9 | 10 | 1939 | 1948 | Fern Bell | Dixie Walker |
| PHI | 2 | 10 | 1938 | 1947 | Bill Atwood | Andy Seminick |
| ATL | 9 | 10 | 1934 | 1943 | Joe Mowry | Chuck Workman |
| BOS | 9 | 10 | 1933 | 1942 | Smead Jolley | Pete Fox |
| DET | 8 | 10 | 1930 | 1939 | Liz Funk | Barney McCosky |
| BOS | 5 | 10 | 1928 | 1937 | Buddy Myer | Pinky Higgins |
| ATL | 7 | 10 | 1923 | 1932 | Bill Bagwell | Red Worthington |
| BOS | 4 | 10 | 1918 | 1927 | Dave Shean | Bill Regan |
| BAL | 5 | 10 | 1916 | 1925 | Charlie Deal | Gene Robertson |
| CHN | 4 | 10 | 1914 | 1923 | Bill Sweeney | George Grantham |


Critical thinker, problem solver, aspiring Data Scientist. I am looking for a position on the front lines of our data driven world where I can utilize and build on my data skills, and the experience I have gained working for a customer focused technology organization.
Being an avid football fan, when given the opportunity to work on a project of my choosing for my GA capstone project I naturally chose to do some analysis around the NFL. Rather than choosing one of the most frequently performed football analysis, those being NFL draft predictions, or rating NFL draft picks, I chose to perform my own version of this. I was still interested in examining NFL draft prospects, but my focus was to examine all factors of player performance and skill to try and predict how successful a player will be in the NFL, not solely based on where they were picked in the draft.
Once I had my goal in mind, I began working on collecting as much data as possible on players. I started by scraping Football-Reference.com, first for every player that was drafted each year, and then for their college performance statistics, such as passing yards or completion percentage for a quarter back for example. I also got information such as the team a player was on, the conference they were in, and the NFL team they were drafted to.
I began modeling using a player’s average position grade (from profootballfocus.com) over their first four seasons in the NFL as a target variable. I was able to achieve moderate success in my predictions using robust Neural Nets and creating separate models for different positions. My best Mean Squared Error was just about 570, equating to an error term of about 24 points on average. Given that the target that I was trying to predict was on a scale of 1-100, this result leaves room for improvement, as currently my model would likely predict clearly successful players as successful and vice versa unsuccessful players as unsuccessful, but predictions for players in the middle would be unreliable.
This was a group project where our goal was to model the effect that a given natural disaster has on industries in a given city. We began by trying turn this conceptual problem into measurable datapoints. Based off the prompt we were working with, we were directed to use sources such as Glassdoor or Indeed to collect job posting information as a measure of economic value of a given industry. Our idea was that we could look at the frequency of job postings each day and create an aggregate figure for monetary economic value from the salaries, and segment by industry based on the type of job that was posted.
Our challenge with this was that these sites, as well as almost all online job boards, do not make their data publicly available via API. When we were able to identify one smaller site (Adzuna.com) that did provide an open API, at that point we realized that they only made it available for about 30-90 days, and when we queried farther back than that there were low or no postings at all. In clicking through other job boards, we realized this was the case with most if not all of them, so even if we were able to build out our own scraping tool, we would have no ability to look at posting history. We would have to deploy it to scrape data every day going forward for the city in question to get the required data to perform this kind of analysis.
This was not doable in the time scope that we had to accomplish the task, so we decided to pivot our approach to looking at employment statistics rather than raw job postings. The only place we were able to find a data source that provided employment information by industry with a location smaller than state was the Bureau of Labor Statistics website, that allowed us to query for monthly employment levels in different industries for any county in the United States. We were able to build a function that ran this query for the specified years and county to examine how employment levels were impacted by the disaster event.
For our final product we were able to create SARIMAX models that predicted what employment levels would look like in a given city without the disaster event, so that they could be compared to the actual levels post event. In addition, our team built out the framework for a scraper that could be deployed to collect the job posting data from our original approach every day that could be used in a larger scale project.
My goal with this project was to try and determine if, in general, there are discernable differences between the language used by men and the language used by women. The Reddit pages from which I drew language samples from in the form of postings, r/AskMen, and r/AskWomen. These two communities are places where individuals can come to anonymously ask questions of men or women that they would not feel comfortable asking in person.
I used PushShift API in order to quickly scrape thousands of posts from each subreddit. I ran some baseline models (Logistic Regression and Random Forest) and then tested some different language processing techniques to see what worked best. I tokenized words, used regular expressions to eliminate non-normal words, and used the TFIDF Vectorizer to engineer my features. Through a lengthy grid-searching process I settled on a RandomForest achieving an accuracy score of 75% and I was able to which words were the strongest predictors.
At one point during my analysis I realized that I had assumed in asking my original question that all posts on r/AskMen came from women, and vice versa men on r/AskMen. In looking at just a few of the posts you can tell that this is not always the case, so the interpretation of results must reflect that as well. We can say that rather than the results informing us about men and women’s language, we can say they inform us about the different topics concerning men and women that people, regardless of gender, are interested in.
SQL
Python


{include file='public/head' /}
layout 后台大布局 - Layui
{include file='public/header' /}
{include file='public/left_menu_booknexus' /}
首页
B2B
创建订单
{include file='admin_booking/create_booking_menu' /}
4
Select Room Type
Select Passengers
-- Room Type --
{foreach $all_rooms as $vv}
{$roomType[$vv.room][0]['translate']}
{/foreach}
-- Select Passengers --
{foreach $Think.session.adminBooking_passenger_detailsAjax['temp_id'] as $kk=>$vv}
{$kk+1}.{$Think.session.adminBooking_passenger_detailsAjax['lname'][$kk]} {$Think.session.adminBooking_passenger_detailsAjax['fname'][$kk]}({$Think.session.adminBooking_passenger_detailsAjax['age_cat'][$kk]})
{/foreach}
+
CLEAR
{foreach $Think.session.adminBooking_room_configAjax.room_type as $k=>$v}
{$k+1}.
{$Think.session.adminBooking_room_configAjax.room_type[$k]}
{foreach $pax_tmp_ids as $kk=>$vv}
{$pax_names[$kk]}|{$pax_age_groups[$kk]}.
{/foreach}
{/foreach}
Next
{include file='public/foot_js' /}


{% load staticfiles %} {% block title %} {{ request.user.first_name }}-Invoice {% endblock %} {% block content %} {% include "super/messages.html" %}
your order from
Thank you for ordering with Diwali palace Your order is {{ order.status}} from restaurant!, We will try our best to deliver within {{ order.time }}, Please sit back and relax tasty food is on it's way


This tests loading of a JPEG image and no HTML when the HTTP content-type is set to "image/jpg" . Expected : This page should have NOTHING .


I sat in seat 20B on United Airlines Flight UA 949, enjoying the roominess of the Boeing 777 in service on this route between London (LHR) and San Francisco (SFO).
Mission: Create a Command Line Interface (CLI) that takes some flags, basic user input, and prints out something.
I quickly threw together just a simple “hi” CLI App.
package main
import "fmt"
func main() {
fmt.Println("Hi")
}
Then I ran that just to make sure I had Go installed properly and all that.
go run hi-cli.go
That’s super boring, so first things first, let’s take some input from the command line and print it back out to the screen. I’ll start by passing a few parameters along with the hi-cli call.
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
reader := bufio.NewReader(os.Stdin)
fmt.Print("Enter text: ")
text, _ := reader.ReadString('\n')
fmt.Println(text)
}
What this bit of code gives me looks like this when I execute it now.
A quick few notes if you’re not familiar with Go. The := is a reassignment (or assignment) and declaration operator. It’s actually equivalent to the following statement.
var reader = bufio.NewReader(os.Stdin)
So that’s the notion behind the := syntax.
Ok, so now I wanted some other features to the cli. The first is the ability to pass in some flags. There is a library for that, simply called flag which I’ll add. I added that to the import list.
One of the really cool features of the flag library is that it will auto-generate flag help documentation. To display the flag documentation pass the -h flag. For instance, to see the flag documentation type in go run hi-cli.go -h
. However, I need to actually add some flags with their appropriate descriptions and actually use them somewhere. So I’ve edited my go code file as shown.
func main() {
wordFlag := flag.String("wordly", "the-word", "A string value.")
numberFlag := flag.Int("numeraly", 42012, "An integer value.")
booleanFlag := flag.Bool("booly", true, "A boolean value.")
nameFlag := flag.String("yourname", "Person With No Name", "Put your name here.")
flag.Parse()
var reader = bufio.NewReader(os.Stdin)
fmt.Print("Hello, " + *nameFlag + ", please enter some text: ")
text, _ := reader.ReadString('\n')
fmt.Println(text)
fmt.Println("word: ", *wordFlag)
fmt.Println("numb: ", *numberFlag)
fmt.Println("fork: ", *booleanFlag)
}
Now I can ask for help with the go run hi-cli.go -h
and I get the following.
That’s what I expected, so now I’m going to test out the different flags I set. So I go ahead and set each of the flags just to see. My command reads nice and long as go run hi-cli.go -booly=false -wordly=testing -numeraly=909 -yourname="Adron Hall"
.
Again, everything I expected. Based on the mission I set out at the beginning of this entry, mission is accomplished. So until next time, happy hacking.
References:


{% extends 'petitions/exits/exits_list.html' %} {% block title %} Exit| Article 133 {% endblock title %} {% block tableheader %}
This table shows all the petitioners who have been pardoned under Article 133 of . You can search using any criteria
{% endblock %}


1. Click on the position where you think the data came from
2. Click the Tick Button to confirm your choice
3. Press the Reload Button to load a new Box
4. To see the leaderboard, just cklick the link below the map
5. If you don't want to play anymore just leave the site. Your points will be saved automatically


JavaScript Quiz
Which is the best description of a variable?
Identifies a portion of a string.
A method to join strings.
Allows you to store information so it can be reused throughout the program
Allows you to make a decision based on a condition.
Which is the best description of the substring method?
Identifies a portion of a string.
A method to join strings.
Allows you to store information so it can be reused throughout the program
Allows you to make a decision based on a condition.
Which is the best description of concatenation?
Identifies a portion of a string.
A method to join strings.
Allows you to store information so it can be reused throughout the program
Allows you to make a decision based on a condition.
Which is the best description of an if statement?
Identifies a portion of a string.
A method to join strings.
Allows you to store information so it can be reused throughout the program
Allows you to make a decision based on a condition.
Submit
Your grade is:
__


WITNESS LIST Law Enforcement Committee February 17, 2003-2:30P Commission on Law Enforcement On: Laine, E.T. (Texas Commission on Law Enforcement) Stivers, Joe (Commission on Law Enforcement) Commission on Private Security On: Grumbles, Cliff (Texas Commission on Private Security) Commission on State Emergency Comm On: Mallett, Paul (Commission on State Emergency Communications) Crime Stoppers Advisory Council On: Gillen, Janice (Crime Stoppers Advisory Council) Nicolas, Ken (Office of the Governor, Criminal Justice Division) Dept. of Public Safety On: Davis, Tommy (Dept. of Public Safety) Polygraph Examiners Board On: DiTucci, Frank (Texas Polygraph Examiners Board)


The idea is simple, assuming there are 3 clusters, defined by 3 multivariate Gaussians (it can be other distributions) with observed data points, as with the example plotted below (which we will use throughout this)
We want a model that can generate data that looks like the 3 clusters
Now say we know the 3 Gaussians, we then can generate the data by:
But how do we define the 3 Gaussians that is supposed to be unknown? We can do this by deriving the model likelihood function and find the parameters that maximise it! Just like the classic MLE!
This is called a mixture model because we assume that the data is sampled from a mixture of several individual density functions
# Generate simulated data to test model----
set.seed(234)
# cluster 1, 100 samples:
clus_1 = rmvnorm(100, mean = c(0,5), sigma = matrix(c(0.5,0.1,0.1,5),ncol=2))
# cluster 2, 200 samples:
clus_2 = rmvnorm(200, mean = c(-7,5), sigma = matrix(c(4,0.1,0.1,0.5), ncol = 2))
# cluster 3, 50 samples:
clus_3 = rmvnorm(50, mean = c(-4,-0), sigma = matrix(c(1,0.7,0.7,1), ncol = 2))
# put them together for plotting
# for column on actual cluster
actual = c(rep(1, nrow(clus_1)),rep(2, nrow(clus_2)),rep(3, nrow(clus_3)))
train_df = as.data.frame(rbind(clus_1,clus_2,clus_3))
train_df$actual_clus <- as.factor(actual)
colnames(train_df) <- c("X1","X2","actual_clus")
# plot the distribution:
# create function that generate data for contours
set.seed(23)
create_data_for_mvnorm_contour <- function(n, mean, sigma) {
d <- as.data.table(rmvnorm(n, mean = mean, sigma = sigma))
setnames(d, names(d), c("x", "y"))
testd <- as.data.table(expand.grid(
x = seq(from = min(d$x), to = max(d$x), length.out=50),
y = seq(from = min(d$y), to = max(d$y), length.out = 50)))
testd[,Density := dmvnorm(cbind(x,y), mean = colMeans(d), sigma = cov(d))]
return(testd)
}
# create data to plot contours
clus_1_contour_actual <- create_data_for_mvnorm_contour(1000, mean = c(0,5), sigma = matrix(c(0.5,0.1,0.1,5),ncol=2))
clus_1_contour_actual$actual_clus = 1
clus_2_contour_actual <- create_data_for_mvnorm_contour(1000, mean = c(-7,5), sigma = matrix(c(4,0.1,0.1,0.5), ncol = 2))
clus_2_contour_actual$actual_clus = 2
clus_3_contour_actual <- create_data_for_mvnorm_contour(1000, mean = c(-4,-0), sigma = matrix(c(1,0.7,0.7,1), ncol = 2))
clus_3_contour_actual$actual_clus = 3
contour_actual <- rbind(clus_1_contour_actual,clus_2_contour_actual,clus_3_contour_actual)
contour_actual$actual_clus <- as.factor(contour_actual$actual_clus)
ggplot(train_df, aes(x=X1, y=X2, group=actual_clus, col=actual_clus))+
geom_point()+
geom_contour(data = contour_actual, aes(x,y,z=Density), size = 1, linetype = 2, alpha = 0.3)
K-means is one of the most popular clustering methods out there, it clusters observations by minimizing (up to local minima) the within-group dissimilarity.
However, it has its disadvantage compared to using mixtures
K-means cluster definition is crude as it uses one point (the centroid) to represent the whole cluster. Using mixtures incorporate a notion of shape
Since each cluster is represented as a probability density using mixture models, it can have various shapes and data form (e.g. binary dataset with Bernoulli distributions)
A posterior probability is the output of the model, hence we know the probability of an observation belongs to each cluster given parameters. This gives us a confidence indication on our clustering and also imply that using mixtures, clusters are less sensitive to outliers
Because there is a dataset likelihood function, we can optimise K too. In K-means, this is impossible
We can see some misclassification mainly for cluster 2 as cluster 1 if we use K-means
The way to find and optimise parameters is somewhat technical, I encourage you to read the references at the end of this markdown, and you are more than welcome to look into my Probabilistic Clustering.Rmd in repo
In summary, we need to do the following:
The plot below shows the initialised 3 Gaussians in green, and the resulted Gaussians that the model converges to using EM Algorithm in blue, compared with the actual Gaussians in red.
Resulting Gaussians are very close to actual!!
| Simulated observation | X1 | X2 | Actual Cluster | Posterior Probability for Cluster 3 | Posterior Probability for Cluster 2 | Posterior Probability for Cluster 1 | Max. Posterior | Predicted Cluster | Same as Actual |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0.3969151 | 0.4323799 | 1 | 0.0000138 | 0.0000000 | 0.9999862 | 0.9999862 | 1 | 1 |
| 2 | -1.0088671 | 8.2384402 | 1 | 0.0000000 | 0.0000044 | 0.9999956 | 0.9999956 | 1 | 1 |
| 3 | 1.0353373 | 5.3629194 | 1 | 0.0000005 | 0.0016125 | 0.9983870 | 0.9983870 | 1 | 1 |
| 4 | 0.0445500 | -1.7810088 | 1 | 0.0000000 | 0.0000000 | 1.0000000 | 1.0000000 | 1 | 1 |
| 5 | -0.3808923 | 2.5511852 | 1 | 0.0160735 | 0.0000866 | 0.9838400 | 0.9838400 | 1 | 1 |
| 6 | 0.0783891 | 7.4702457 | 1 | 0.0000000 | 0.0000080 | 0.9999920 | 0.9999920 | 1 | 1 |
We can see the model only put two observations in the wrong group, much better than K-means
The plot also annotates the observations with the lowest class posterior probability
Running the model for different values of K with 10-folds CV (again feel free to read the code in Probabilistic Clustering.Rmd in repo), we find that mean test log-likelihood is largest when K = 3 (although K = 4 is nearly as good), which is the correct number of clusters
There are several limitations
There are serveral usage extensions
Simon Rogers and Mark Girolami. A First Course in Machine Learning. CRC Press, second edition, 2017.
Gareth James, Daniela Witten, Trevor Hastie, Robert Tibshirani. An Introduction to Statistical Learning : with Applications in R. New York: Springer, 2013.


I'm a full-stack web developer experienced with JS/React, Ruby/Rails & Sinatra. With professional experience & graduate education in communications & humanistic research, I bring technical expertise alongside high-level project comprehension.
Web App designed with algorithms and games-style interface to help users learn about their preferences for cocktails & drinks. Built with Ruby/Rails backend & JS(JQuery, AJAX) frontend.
Major: English & Cultural Studies, Minor: Math
GPA: 3.96
When I'm not tapping away at a computer, I'm probably either on a run with my dog or at a café with my head in a book
Usually, though, I'm back at the computer, playing around with coding challenges or learning more about trending frameworks & CS fundamentals


People and Projects
An incomplete list of nicknames on #proglangdesign and their labours
of love. Some are definitely missing - just make a commit
to
the
Github repository with the changes you want to see.
- Athas
- Futhark, a
high-performance parallel functional array language targeting GPUs.
- Boney
- Plasma, which aims to
strike a balance between functional and imperative programming.
Previously worked on Mercury a
logic language.
- Cheery
- Lever, a
dynamically typed language built to absorb features from other
languages.
-
cjh`
-
Icarus
is a minimum-viable type-safe imperative language designed to serve as a
platform for exploring mutation and general side-effect control.
- ColonelJ
- Starpial
is a stack-oriented functional logic programming language with OOP, recursive regex,
dependent types, refinement types, and automatic parallelization based on transactions.
- Dynasty
-
Juniper is a functional
reactive programming language for the Arduino and other related
platforms.
- evincar
- Kitten is a statically typed concatenative language with effect types.
- HackerFoo
- Popr
applies concatenative programming to types as well as values, striving for purity and correctness, and efficient execution.
- JX7P
-
Oopsilon is an object-oriented language in the
Kayian tradition which is (perhaps uniquely) founded on a negativist philosophy drawing on
critical theory and stressing the importance of hermeneutics in understanding the problems
programmers experience.
- nathanmerrill
- Elegance
Objected oriented language aiming for high type-safety and readability.
- nee
- Fox
is an ever-evolving experiment in declarativeness that strives to one day settle on a consistent
syntax.
- rain1
- Tarot
A self-hosted scheme compiler (to qcode) and virtual machine.
- Veggero
- Nylo
is a programming language mainly focused on concise syntax and readability, with a lot
of implicit work to make any work with it quickier to write
- yumaikas
- PISC
attemps to make concatenative programming less mind-bendy
via pervasive use of locals, closures, the smallest set of syntax hacks to make code look nice.


Speed & Throughput In Action
Sub 20ms Response - Ticketfly
@components.scalability()-
Ticketfly crafted a powerful reserved seating engine (something that is notoriously complicated to build because of its rapidly changing state), that could scale easily, handle bursty and unpredictable traffic patterns and compete with online ticket scalpers.
The concurrent and non-blocking system allows visitors to find and allocate seats, under load, in less than 20ms. The system has very good performance without having to try very hard to achieve it.
Read the Case Study Sub 12ms Response - Sharethrough
@components.scalability()-
Sharethrough chose Scala to build industry’s first native ad management system. It runs thousands of auctions respecting a myriad of variables to match quality content to the right viewer at the right time in the right place. The system’s 99.99% latency is 12ms.
Read the Case Study 75% Faster - Lucidchart
@components.scalability()-
Lucidchart is a fully functional diagramming application running inside the browser, which uses pure Javascript to create an experience that feels like a native app.
Moving to Typesafe is already paying off. Response times are down for processor intensive code - such as image and PDF generation – by around 75%.
Read the Case Study
Massive Scale In Action
2400 Akka Cluster in 4 Minutes - Google
@components.scalability()-
Google partnered with Typesafe to explore the limits of Google Compute Engine (GCE) for running Akka/Java applications. Delightfully, we were able to operate a cluster of 2400 nodes.
Bulk additions are a more typical use case when starting up a fresh cluster. We tested how long it took to get an Akka cluster running across 1000 GCE instances—4 minutes and 15 seconds from starting the script until all 1000 Akka cluster members were reported as full members and seen by all other nodes.
Read the Blog Post 1 Billion API Requests/Day - Klout
@components.scalability()-
Klout is the leader in measuring online influence by calculating a user's social impact through extensive data mining. Their system performs data aggregation across several social networks and data stores in real time, with results instantaneously presented to end users and scales to handle one billion API request per day.
Read the Case Study 100x Bursty Traffic Increase - Gilt
@components.scalability()-
Over the course of a few seconds, Gilt’s traffic can increase by as much as 100x. Essentially, they need to have the e-commerce infrastructure almost at Amazon scale for at least 15 minutes every day.
Most days this happens exactly at noon EST, and until a couple of years ago, noon was a stressful time every day. Nowadays it’s usually a non-event—in part because of Typesafe. This Q&A with architect Eric Bowman describes Gilt Groupe's journey from Rails to Reactive.
Read the Case Study Tweets per Second Record - Twitter
@components.scalability()-
A primary goal at Twitter is to make sure the service is always available no matter what is happening around the world. This goal felt unattainable in 2010 with Ruby, so the team rewrote its codebase on Scala, delivering an estimated 10x performance increase.
Read the Twitter Engineering Community Story


Toggle navigation
FKKeV
Home
About
Contact
Log Out
{% block content %} {% endblock %}
Profile View
Edit Profile
Bank Data
Bank Details Edit
My Invoices
{% block admin_list %} {% endblock %}


!Lady Claudia:
Yes, the old fashioned way too--bribery!
I've paid off one of the guards of the Sanctum, Captain John. He's fabricated a new card for you, and should be waiting for you right now in Gludio.
If you hurry he'll still be there by the time you arrive. Go!


ViBaseSearchViewController
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
Base controller for all search widgets
-
search client for making API requests. if not set, will use the default client in ViSearch.sharedInstance
Declaration
Swift
public var searchClient: ViSearchClient? = nil
-
reuse identifer for header collection view cell
Declaration
Swift
public let headerCollectionViewCellReuseIdentifier = "ViHeaderReuseCellId"
-
collection view that holds the search results
Declaration
Swift
public var collectionView : UICollectionView?
-
associated collection view layout
Declaration
Swift
public var collectionViewLayout: UICollectionViewLayout
-
title label. Used for displaying the widget title in header view Currently this is only used for
You May Also Like
widgetDeclaration
Swift
public var titleLabel : UILabel?
-
show/hide the title label in header
Declaration
Swift
public var showTitleHeader: Bool = true
-
delegate for various events
Declaration
Swift
public weak var delegate: ViSearchViewControllerDelegate?
-
last known successful search request Id to Visenze API
Declaration
Swift
public var reqId : String? = ""
-
search parameters
Declaration
Swift
public var searchParams: ViBaseSearchParams? = nil
-
schema mappings to UI elements
Declaration
Swift
public var schemaMapping: ViProductSchemaMapping = ViProductSchemaMapping()
-
UI settings Configuration for product image
Declaration
Swift
public var imageConfig: ViImageConfig = ViImageConfig()
-
Configuration for heading view e.g. for displaying product tile
Declaration
Swift
public var headingConfig: ViLabelConfig = ViLabelConfig.default_heading_config
-
Configuring for label view e.g. displaying brand in label
Declaration
Swift
public var labelConfig: ViLabelConfig = ViLabelConfig.default_label_config
-
Configuration for product price
Declaration
Swift
public var priceConfig: ViLabelConfig = ViLabelConfig.default_price_config
-
Configuration for discount price
Declaration
Swift
public var discountPriceConfig: ViLabelConfig = ViLabelConfig.default_discount_price_config
-
true if similar button (at bottom right) is available for a product card in search results
Declaration
Swift
public var hasSimilarBtn: Bool = true
-
Configuration for similar button if available
Declaration
Swift
public var similarBtnConfig: ViButtonConfig = ViButtonConfig.default_similar_btn_config
-
true if action button (at top right) is available for a product card in search results The default action button is the heart icon with add to wish list action tracked when tapped
Declaration
Swift
public var hasActionBtn: Bool = true
-
Configuration for action button if available
Declaration
Swift
public var actionBtnConfig: ViButtonConfig = ViButtonConfig.default_action_btn_config
-
background color for a product card in the search results
Declaration
Swift
public var productCardBackgroundColor: UIColor = ViTheme.sharedInstance.default_product_card_background_color
-
product card border color. Default to no border
Declaration
Swift
public var productCardBorderColor: UIColor? = nil
-
product card border width. Default to 0 for no border
Declaration
Swift
public var productCardBorderWidth : CGFloat = 0
-
which border(s) to draw for the product card by default all borders are drawn
Declaration
Swift
public var productBorderStyles : [ViBorderType] = [.LEFT , .RIGHT , .BOTTOM , .TOP]
-
show/hide Power by Visenze image
Declaration
Swift
public var showPowerByViSenze : Bool = true
-
extract products data from ViSenze API response
Declaration
Swift
public var products: [ViProduct] = []
-
product card size
Declaration
Swift
public var itemSize: CGSize = CGSize(width: 1, height: 1)
-
Spacing between product items on same row
Declaration
Swift
public var itemSpacing : CGFloat = 4.0
-
view background color
Declaration
Swift
public var backgroundColor : UIColor = UIColor.white
-
left padding
Declaration
Swift
public var paddingLeft: CGFloat = 0
-
right padding
Declaration
Swift
public var paddingRight: CGFloat = 0
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
Undocumented
Declaration
Swift
open class ViBaseSearchViewController: UIViewController , UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, ViSearchViewControllerProtocol, ViProductCellDelegate
-
estimate product card item size based on image width in image config
Declaration
Swift
open func estimateItemSize() -> CGSize
-
estimate product card item size for a max width of maxWidth depend on the product configurations e.g. label is optional, the height would be dynamic and changes
Declaration
Swift
open func estimateItemSize(constrainedToWidth maxWidth: CGFloat) -> CGSize
-
to be override by subclasses. Subclass must call delegate.configureLayout to allow further customatization
Declaration
Swift
open func reloadLayout()
-
Set the meta query parameters based on provided schema mapping The parameters are needed to retrieve the relevant product information
Declaration
Swift
open func setMetaQueryParamsForSearch()
-
to be implemented by subclasses to call ViSenze APIs and refresh views
Declaration
Swift
open func refreshData()
-
fixed header size
Declaration
Swift
open var headerSize : CGSize
-
By default return a UILabel that shows the widget/view controller title For example, return
You May Also Like
header inYou May Also Like
widget solutionReturns
header view at the topDeclaration
Swift
open func headerView() -> UIView?
Return Value
header view at the top
-
By default, return Power By ViSenze image view and positions it at the bottom right of the footer
Returns
footer viewDeclaration
Swift
open func footerView() -> UIView?
Return Value
footer view
-
footer size
Declaration
Swift
open var footerSize : CGSize
-
show the generic error message when an error occurs after search e.g. network error or API error
Declaration
Swift
open var showDefaultErrMsg : Bool = true
-
show message when no search results is found
Declaration
Swift
open var showNoSearchResultsMsg : Bool = true
-
Generate view to display when there is no search results
Returns
no search results viewDeclaration
Swift
open func noSearchResultView() -> UIView?
Return Value
no search results view
-
Generate view to display generic error messages e.g. during network timeout or api error
Returns
default generic error viewDeclaration
Swift
open func genericErrSearchResultView() -> UIView?
Return Value
default generic error view
-
display default error messages. Currently it ignore all errors and just display a generic error message
An error has occured. Please try again later.
- Parameters:
- searchType: current search
- err: network related error
- apiErrors: api Errors
Declaration
Swift
open func displayDefaultErrMsg(searchType: ViSearchType, err: Error?, apiErrors: [String])
Parameters
searchType
current search
err
network related error
apiErrors
api Errors
- Parameters:
-
display no search results message. Currently display
No Results Found
Declaration
Swift
open func displayNoResultsFoundMsg()
-
hide the message view that display error messages such as network errors, no results found
Declaration
Swift
open func hideMsgView()
-
show the message view that display error messages such as network errors, no results found
Declaration
Swift
open func showMsgView()
-
Set custom message view
Parameter
Parameter view: custom message view for displaying errorsDeclaration
Swift
open func setMsgView(_ msgView: UIView)
Parameters
view
custom message view for displaying errors
-
user clicks on
Similar
button on a product card cell Copy the revelvant parameters from current search and open theFind Similar
view controllerDeclaration
Swift
@IBAction open func similarBtnTapped(_ cell: ViProductCollectionViewCell)
-
user tapped on action button of a product card cell
Declaration
Swift
@IBAction open func actionBtnTapped(_ cell: ViProductCollectionViewCell)
-
dismiss the similar controller that is being presented when user click on
Similar
button of a product cardDeclaration
Swift
open func dimissSimilarController()


Now you can see our HTML layout with linked required CSS and JavaScript files. Now we should initialize our app (for example in my-app.js
):
var myApp = new Framework7();
In the example above we use myApp
variable where we store Framework7 initialized instance for easy access in future. It is not necessary to name it "myApp", it could be any name you like.
It was pretty simple. But Framework7 also provides more customization on initialization by passing object with parameters:
var myApp = new Framework7({
pushState: true,
swipePanel: 'left',
// ... other parameters
});
Let's look at the list of all available parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
| Material Theme (Material theme only) | |||
| material | boolean | false | Set to true to activate Material-specific App JS behavior |
| materialPageLoadDelay | number | 0 | Delay (in ms) before animation of loaded page. Can be increased a bit to improve performance |
| materialRipple | boolean | true | Enable/disable Material-specific touch ripple effect |
| materialRippleElements | string | '.ripple, a.link, a.item-link, .button, .modal-button, .tab-link, .label-radio, .label-checkbox, .actions-modal-button, a.searchbar-clear, .floating-button' | CSS selector of elements to apply touch ripple effect on click |
| materialPreloaderHtml | string | '' | HTML of Material's theme preloader |
| Caching | |||
| cache | boolean | true | As Framework7 uses Ajax to load HTML content for pages it is good to use caching, especially if your content in those pages updates not very often. |
| cacheDuration | number | 1000*60*10 | Duration in ms (milliseconds) while app will use cache instead of loading page with another Ajax request. By default it takes 10 minutes. |
| cacheIgnore | array | [] | Array of URLs (string) that should not be cached by Framework7 |
| cacheIgnoreGetParameters | boolean | false | If "true" then URLs like "about.html?id=2" and "about.html?id=3" will be treated and cached like single "about.html" page |
| Fast clicks library | |||
| fastClicks | boolean | true | Fast clicks is a built-in library that removes 300ms delay from links and form elements in mobile browser while you click them. You can disable this built-in library if you want to use other third party fast clicks script. |
| fastClicksDelayBetweenClicks | number | 50 | Minimal allowed delay (in ms) between multiple clicks |
| fastClicksDistanceThreshold | number | 10 | Distance threshold (in px) to prevent short taps. So if tap/move distance is larger than this value then "click" will not be triggered |
| activeState | boolean | true | When enabled, app will add "active-state" class to currently touched (:active) element. |
| activeStateElemets | string | 'a, button, label, span' | CSS selector of elements where activeState will add appropriate active class |
| tapHold | boolean | false | Set to true to enable tap hold events |
| tapHoldDelay | number | 750 | Determines how long (in ms) the user must hold their tap before the taphold event is fired on the target element |
| tapHoldPreventClicks | boolean | true | When enabled (by default), then click event will not be fired after tap hold event |
| Navigation / Router | |||
| router | boolean | true | With this option you may disable default navigation router if you want to implement your own |
| ajaxLinks | string | undefined | By default (when this parameter is not specified) Framework7 will load all links () using Ajax. You can change this behavior by passing here CSS selector string for links that should be loaded with Ajax, like "a.ajax" - only all links with "ajax" class |
| dynamicPageUrl | string | 'content-{{index}}' | URL rule for dynamically loaded pages. Available replaceable expressions: '{{index}}' (page index number in navigation history) and '{{name}}' (value of page "data-page" attribute) |
| uniqueHistory | boolean | false | Set to true and App will keep View's navigation history unique, and remove duplicated pages |
| uniqueHistoryIgnoreGetParameters | boolean | false | Use this parameter in addition to uniqueHistory . Set to true and App will ignore URL GET parameters when cheking its uniqueness. So the URLs like "page.html" and "page.html?id=3" will be treated as the same. |
| externalLinks | string | '.external' | CSS selector for links that should be treated as external and shouldn't be handled by Framework7. For example such '.external' value will match to links like  (with class "external") |
| allowDuplicateUrls | boolean | false | You may enable this parameter to allow loading of new pages that have same url as currently "active" page in View. |
| animateNavBackIcon | boolean | false | This option (when enabled) gives more native look for dynamic navbar left back-link icon animation. Useful only when you use dynamic navbar with default back-link icon on left side set as "sliding". iOS theme only |
| animatePages | boolean | true | Set to false if you want to disable animated transitions between pages |
| preloadPreviousPage | boolean | true | Enable/disable preloading of previous page when you go deep in navigation. Should be enabled for correct work of "swipe back page" feature. |
| preroute | function(view, options) | - |
This callback allows to prevent default router load/back actions and to load another page or do another required actions Look for example below |
| preprocess | function(content, url, next) | - |
This callback function allows you to modify loaded router (mostly Ajax) content right before it will be injected to DOM. Callback receives "content" and "url" of the loaded page and the "next" callback function. After you modify content within this function you should return it with: Look for example below |
| Push State | |||
| pushState | boolean | false | If you develop web app (not PhoneGap or Home Screen web app) it is useful to enable hash navigation (browser url will look like "http://my-webapp.com/#/about.html"). User as well will be able to navigate through app's history by using browser's default back and forward buttons. |
| pushStateSeparator | string | '#!/' | Push state URL separator, can be changed for something like '#page/' and then your push state urls will look like "http://myapp.com/#page/about.html" |
| pushStateRoot | string | undefined | Push state root URL separator, for example "http://my-app.com/". It is useful only in case when you use empty ("") pushStateSeparator |
| pushStateNoAnimation | boolean | false | If false then it will inherit View's animatePages parameter. If true, then push state navigation will happen without animation (page transitions) |
| pushStateOnLoad | boolean | true | Disable to ignore parsing push state URL and loading page on app load |
| Swipe back (iOS theme only) | |||
| swipeBackPage | boolean | true | Enable/disable ability to swipe back from left edge of screen to get to the previous page. |
| swipeBackPageThreshold | number | 0 | Value in px. Swipe back action will start if "touch distance" will be more than this value. |
| swipeBackPageActiveArea | number | 30 | Value in px. Width of invisible left edge of the screen that triggers swipe back action |
| swipeBackPageAnimateShadow | boolean | true | Enable/disable box-shadow animation during swipe back action. You can disable it to improve performance |
| swipeBackPageAnimateOpacity | boolean | true | Enable/disable opacity animation during swipe back action. You can disable it to improve performance |
| Sortable Lists | |||
| sortable | boolean | true | If you don't use sortable lists you can disable it for potentially better performance. |
| Swipeout | |||
| swipeout | boolean | true | If you don't use swipeouts you can disable this feature for potentially better performance. |
| swipeoutNoFollow | boolean | false | Fallback option for potentially better performance on old/slow devices. If you enable it, then swipeout item will not follow your finger during touch, it will be automatically opened/closed on swipe left/right. |
| Side Panels | |||
| swipePanel | string | false | Disabled by default. If you want to enable ability to open side panels with swipe you can pass here "left" (for left panel) or "right" (for right panel). |
| swipePanelCloseOpposite | boolean | true | This parameter gives ability to close opposite panel by swipe. For example, if your swipePanel is "left", then you could close "right" panel also with swipe. |
| swipePanelOnlyClose | boolean | false | This parameter allows to close (but not open) panels with swipes |
| swipePanelActiveArea | number | false | Value in px. Width of invisible edge from the screen that triggers swipe panel |
| swipePanelNoFollow | boolean | false | Fallback option for potentially better performance on old/slow devices. If you enable it, then side panel will not follow your finger during touch, it will be automatically opened/closed on swipe left/right. |
| swipePanelThreshold | number | 0 | Value in px. Panel will not move with swipe if "touch distance" will be less than this value. |
| panelsCloseByOutside | boolean | true | Enable/disable ability to close panel by clicking outside of panel (on panel's overlay) |
| Modals | |||
| modalTitle | string | 'Framework7' | Default title for modals (Alert, Confirm, Prompt) |
| modalButtonOk | string | 'OK' | Default text for modal's "OK" button |
| modalButtonCancel | string | 'Cancel' | Default text for modal's "Cancel" button |
| modalPreloaderTitle | string | 'Loading... ' | Default text for preloader modal |
| modalCloseByOutside | boolean | false | Enable/disable ability to close modal (Alert, Confirm, Prompt) by clicking outside of modal (on modal's overlay) |
| actionsCloseByOutside | boolean | true | The same as previous but for Action Sheet modal |
| popupCloseByOutside | boolean | true | The same as previous but for Popup modal |
| modalTemplate | string | undefined | Full HTML Template7 formatted HTML template for modals (like alert, confirm and prompt). Look at the example of Modal Template |
| modalActionsTemplate | string | undefined | Template7 formatted HTML template for Action Sheet. Could be useful if you want to add some custom elements to Action Sheet layout. Look at the example of Action Sheet Template |
| modalActionsToPopoverTemplate | string | Template7 formatted HTML template for Action Sheet that will be converted to Popover. Could be useful if you want to add some custom elements to Popover layout. Look at the example of Action Sheet To Popover Template | |
| modalUsernamePlaceholder | string | 'Username' | Place holder text for username input in Login Modal |
| modalPasswordPlaceholder | string | 'Password' | Place holder text for password input in Login and Password Modals |
| modalStack | boolean | true | This feature doesn't allow to open multiple modals at the same time, and will automatically open next modal when you close the current one. Such behavior is similar to browser native alerts |
| Smart Select | |||
| smartSelectOpenIn | string | 'page' | Specify default way of how Smart Select should be opened. Can be 'page', 'popup' or 'picker' |
| smartSelectBackTemplate | string | '
{{backText}}
' | Smart Select page navbar back link HTML template |
| smartSelectPopupCloseTemplate | string | '
{{closeText}}
' | Smart Select popup close link HTML template |
| smartSelectBackText | string | 'Back' | Default back link text for Smart Select's page navbar |
| smartSelectPopupCloseText | string | 'Close' | Default close link text for Smart Select's popup navbar |
| smartSelectPickerCloseText | string | 'Done' | Default close link text for Smart Select's picker toolbar |
| smartSelectSearchbar | boolean | false | Set to true if you want to enable Search Bar for all Smart Selects |
| smartSelectBackOnSelect | boolean | false | If enabled then smart select page will be automatically closed after user picks any option |
| smartSelectFormTheme | string | undefined | One of 10 default color themes for form elements on smart select page/popup |
| smartSelectNavbarTheme | string | undefined | One of 10 default color themes for navbar on smart select page/popup |
| Navbars / Toolbars | |||
| hideNavbarOnPageScroll | boolean | false | Set to true and Navbar will be hidden automatically on page scroll down, and become visible on scroll up |
| hideToolbarOnPageScroll | boolean | false | Set to true and Toolbar will be hidden automatically on page scroll down, and become visible on scroll up |
| hideTabbarOnPageScroll | boolean | false | Set to true and Tab bar will be hidden automatically on page scroll down, and become visible on scroll up. Note that this is only for Tab Bar app layout, otherwise use hideToolbarOnPageScroll |
| showBarsOnPageScrollEnd | boolean | true | Set to true to show hidden Navbar and Toolbar when scrolling reaches end of the page |
| showBarsOnPageScrollTop | boolean | true | Set to false and bars will not become visible when you scroll page to top everytime. They will become visible only on the most top scroll position, in the beginning of the page |
| scrollTopOnNavbarClick | boolean | false | Set to true and each click on Navbar's "center" element will scroll currently active page to top |
| Images Lazy Load | |||
| imagesLazyLoadThreshold | number | 0 | By default images are loaded when they appear on the screen. Use this parameter if you want to load images earlier. Setting it to 50 will load image when it 50 pixels before it appears on viewport |
| imagesLazyLoadSequential | boolean | true | If enabled, then lazy images will be loaded one by one when they appear in viewport |
| imagesLazyLoadPlaceholder | string | Lazy load image placeholder source to show while image is not yet loaded. By default it is 1x1 px image | |
| Notifications | |||
| notificationTitle | string | undefined | Default title for all notifications iOS theme only |
| notificationSubtitle | string | undefined | Default subtitle for all notifications iOS theme only |
| notificationMedia | string | undefined | Default media (icon or image) for all notifications iOS theme only |
| notificationHold | number | undefined | Default hold duration (in ms) for all notifications |
| notificationCloseOnClick | boolean | false | Set to true if you want to close notification on click by default |
| notificationCloseIcon | boolean | true | Set to true if you want to display close icon (button) for notifications by default iOS theme only |
| notificationCloseButtonText | string | 'Close' | Default text for Snackbars' close button Material theme only |
| Status Bar (iOS theme only) | |||
| statusbarOverlay | boolean | undefined | With this option you can overwrite automatic status bar detection |
| scrollTopOnStatusbarClick | boolean | false | Set to true and each click on Status bar ("status-bar-overlay") will scroll currently active page to top |
| Template7 | |||
| template7Pages | boolean | false | Set to true to enable Template7 rendering for Ajax and Dynamic pages. Learn more about it in Template7 Pages section |
| template7Data | object | {} | Parameter to store templates/pages data for Template7 rendering. Learn more about it in Template7 Pages section |
| precompileTemplates | boolean | false | With this option you may framework will compile all Template7 templates automatically. Learn more about Templates Auto Compilation section |
| templates | object | {} | Object with compiled Template7 templates. Learn more about it in Templates Auto Compilation section |
| Page Callbacks | |||
| onPageBeforeInit | function(app, page) | - | Callback function that will be executed when Framework7 just inserts new page to DOM. Does the same as "pageBeforeInit" page event |
| onPageInit | function(app, page) | - | Callback function that will be executed when Framework7 initialize required page's components and navbar. Does the same as "pageInit" page event |
| onPageBeforeAnimation | function(app, page) | - | Callback function that will be executed when everything initialized and page (and navbar) is ready to be animated. Does the same as "pageBeforeAnimation" page event |
| onPageAfterAnimation | function(app, page) | - | Callback function that will be executed after page (and navbar) animation. Does the same as "pageAfterAnimation" page event |
| onPageBeforeRemove | function(app, page) | - | Callback function that will be executed right before page will be removed from DOM. Does the same as "pageBeforeRemove" page event |
| onPageBack | function(app, page) | - | Callback function that will be executed right before "back" transition. Difference with "onPageBeforeAnimation" is that this callback will be executed for the "old" page - page that slides from center to right. Does the same as "pageBack" page event |
| onPageAfterBack | function(app, page) | - | Callback function that will be executed right after "back" transition. Difference with "onPageAfterAnimation" is that this callback will be executed for the "old" page - page that slides from center to right. Does the same as "pageAfterBack" page event |
| Ajax Callbacks | |||
| onAjaxStart | function(xhr) | - | Callback function that will be executed in the beginning of Ajax request. This function accepts xhr data as an argument. |
| onAjaxComplete | function(xhr) | - | Callback function that will be executed after Ajax request. This function accepts xhr data as an argument. |
| Namespace
Attention! If you change following class names you will also need to change them in CSS! |
|||
| viewClass | string | 'view' | Class name for your View element |
| viewMainClass | string | 'view-main' | Class name for your Main View element |
| viewsClass | string | 'views' | Class name for your Views element |
| Init | |||
| init | boolean | true | By default Framework7 will be initialized automatically when you call new Framework7() . If you want to prevent this behavior you can disable it with this option and then initialize it manually with myApp.init() when you need it. |
So your final initialization code in my-app.js
could look like:
var myApp = new Framework7({
// Default title for modals
modalTitle: 'My App',
// If it is webapp, we can enable hash navigation:
pushState: true,
// Hide and show indicator during ajax requests
onAjaxStart: function (xhr) {
myApp.showIndicator();
},
onAjaxComplete: function (xhr) {
myApp.hideIndicator();
}
});
Framework7 allows you to use your favorite client-side template engine or do any modifications with loaded content.
Let's look on how to init app with usage of Template7 as our client-side template engine
Init app in my-app.js
:
var myApp = new Framework7({
preprocess: function (content, url, next) {
if (url === 'people.html') {
var template = Template7.compile(content);
var resultContent = template({
title: 'People',
people: ['John', 'Ivan', 'Mary']
})
return resultContent;
}
}
});
And the people.html
page:

{{title}}

{{#each people}}

{{this}}

{{/each}}

But sometimes you may have asynchronous thread inside of your preprocess functon, for example if you need to do one more Ajax request and only after that to continue page loading. For this case we have "next" callback function where we need to pass our genereated/modified content:
var myApp = new Framework7({
preprocess: function (content, url, next) {
if (url === 'people.html') {
// For example, we will retreive template JSON data using Ajax and only after that we will continue page loading process
$$.get('sometemplate.html', function(data) {
// Template
var template = Template7.compile(content);
// Compile content template with received JSON data
var resultContent = template(data);
// Now we call "next" callback function with result content
next(resultContent);
});
// Now we shouldn't return anything
}
}
});
This callback allows to prevent default router load/back actions and to load another page, redirects or do another required actions.
For example we can check if the user is not logged in when he requesting some page and then to redirect him to the login page
var myApp = new Framework7({
preroute: function (view, options) {
if (!userLoggedIn) {
view.router.loadPage('auth.html'); //load another page with auth form
return false; //required to prevent default router action
}
}
});
Ok, right after we initialize our App we need to add and initialize Views


Nucleator CLI Reference
nucleatorquickstart(7) Manual Page
NAME
nucleatorquickstart - A quick start introduction to installing Nucleator
DESCRIPTION
This quick start introduction provides a walk-through of minimal steps to take to create your first Nucleator Cage and Stackset in a new AWS Account.
See Nucleator User’s Guide for a more in-depth introductions and Nucleator CLI Reference for command usage.
STEP 0 - PREREQUISITES
You will need to install on your local machine:
-
Python 2.7x
-
Python setup tools (pip)
-
Python developer tools (required for Ansible pre-requisites)
-
Git
To install:
sudo apt-get install python2.7 python-pip python-dev git
STEP 1 - INSTALL NUCLEATOR
Do this:
# (If your python installation does not require root access to install, remove "sudo" from the next two commands) cd /tmp && git clone --recursive --depth 1 -b nucleator_distribution git://github.com/47lining/ansible.git && cd ansible && sudo python setup.py install sudo pip install --upgrade git+git://github.com/47lining/nucleator-core.git nucleator init
STEP 2 - FORK THE PUBLIC nucleator-core-siteconfig GITHUB REPOSITORY
For your first use of Nucleator, this quickstart recommends that you use a public siteconfig. Once you’ve seen how Nucleator Cages and Stacksets work, you can create a private siteconfig repository and provide Nucleator with a distribution key to access it. (For more information on setting up a github account see https://help.github.com/articles/set-up-git/ )
-
log into github and navigate to https://github.com/47lining/nucleator-core-siteconfig
-
Fork your own copy of this repository into your github account by clicking the "fork" button in the upper right
-
Note the clone https URL for your personal siteconfig repository
-
create a local clone:
cd <place_where_you_create_git_clones> git clone <clone_url_noted_above>
STEP 3 - UPDATE STACKSET SOURCES TO USE YOUR PERSONAL SITECONFIG
Edit the Stackset sources list in ~/.nucleator/sources.yml and change the siteconfig stanza to include the <clone_url_noted_above>. Use the git:// protocol so authentication is not required (just replace the https:// in the https clone url with git://). After an initial pass through the quickstart, you can read the User’s Guide to learn more about how to specify a private repository in sources.yml.
Do this:
cd ~/.nucleator nano sources.yml # modify to include siteconfig below
# siteconfig - Nucleator customer- and cage- specific configuration - src: git+git://github.com/<your_github_account>/nucleator-core-siteconfig.git version: master name: siteconfig
STEP 4 - SIGN UP FOR NEW AWS ACCOUNT
You may be able to use an existing AWS Account with Nucleator, but we suggest creating a new one. Nucleator makes it easy to manage AWS Resources across AWS Account boundaries, and AWS Accounts serve as very useful containers and boundaries for AWS Resources
-
To create a new AWS Account, visit the AWS Console: https://console.aws.amazon.com/
-
Choose "I am a new user" to create a new AWS Account
-
If you are visiting the console using your AWS Console shortcut link for an existing account, you will need to choose the small link "Sign-in using root account credentials" beneath the Sign In button to get to the "Sign In or Create an AWS Account" Page
-
Complete the Account Signup process using the conventions described below
Account Name: <youraccountname>-<yourcustomername>
Account Email<EMAIL_ADDRESS># recommended convention
Console Shortcut: https://<youraccountname>-<yourcustomername>.signin.aws.amazon.com/console
STEP 5 - PERFORM MINIMAL CONFIGURATION IN NEW AWS ACCOUNT
Using the AWS Console, perform the following minimal steps within your AWS Account
-
Create a new IAM User in the new AWS Account. Name the user: NucleatorUser
Note: This user is used as a Prinicipal in trust policies estabished by Nucleator. It needs to be spelled correctly for the role provisioning process described later to succeed.
-
During the creation of the user, generate an Access Key for the user and be sure to download this creditional before closing the "successful completion" screen. Retain the downloaded IAM Credentials for NucleatorUser. You will need to use these during the configuration process for Nucleator later. You will not be able to reaccess this Access Key information later.
-
Create a new group called NucleatorBootstrapGroup.
-
Add a User Policy to NucleatorBootstrapGroup by expanding the "Inline Policies" section of the group description screen. Select a custom policy and copy and paste the policy listed below; name the policy NucleatorGroupPolicy and apply it.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "NucleatorUserMinimalAccess", "Effect": "Allow", "Action": [ "iam:CreateRole", "iam:DeleteRolePolicy", "iam:GetRole", "iam:GetRolePolicy", "iam:ListRolePolicies", "iam:PutRolePolicy", "iam:UpdateAssumeRolePolicy", "ec2:DescribeRegions", "ec2:DescribeAvailabilityZones" ], "Resource": "*" } ] } d. Add NucleatorUser to NucleatorBootstrapGroup by clicking the Add Users to Group button from the group description screen. Select NucleatorUser and click Add Users.
STEP 6 - CREATE INITIAL CONFIG FOR CUSTOMER, ACCOUNT AND CAGE
You can either perform this step manually or use the Nucleator Setup Wizard.
We recommend starting with the wizard, as it produces files that will help you to understand the structure of the config files described below.
To use the wizard
-
In your local clone of your personal fork of nucleator-core-siteconfig, navigate to directory ansible/roles/siteconfig/vars/.
-
invoke the wizard:
nucleator setup wizard
To perform steps manually
-
In your local clone of your personal fork of nucleator-core-siteconfig, navigate to directory ansible/roles/siteconfig/vars/, and copy the {customer}.yml customer configuration templates to a customer configuration file based on your customer name. For example, if your customer name is quickstart, then the customer configuration file would be named quickstart.yml
-
Open the file and make the following changes:
-
Set the customer domain to the desired DNS subdomain that you’d like to use for this customer. For example nucle8r.io, or somedepartment.mycompany.com
-
Inside the Cage names section, set the friendly account name, region, and owner of each Cage. Note: There must be one Cage named build to work as a starting point for Nucleator
-
Inside the aws_accounts section, set the Account number and Region for each account associated with the customer
-
Nucleator can work with multiple AWS Accounts for each Customer. These are specified in aws_accounts in the customer config. Each specified AWS Account includes the following fields
-
Friendly account_name - this is a name for the Account that is readable by humans. It is used elsewhere in Nucleator config and in Jenkins pulldowns that are set up by Nucleator, where choices among AWS Accounts must occur
-
account_number - this is the unique twelve-digit Account number provided by AWS for this AWS Account. The account number can be found by selecting the "Support" | "Support Center" pulldown from your AWS console. Your Account number will appear at the upper right of the Support Center page
-
bootstrap_region - this is the AWS Region where Nucleator will create Amazon resources within this Account that it needs to support the creation of Cages and Stacksets
-
-
map_region_plus_redundant_zone_number_to_vpc_valid_az - Region to Availability Zone Mapping that specifies which AZ’s are valid for provisioning VPC subnets within the Account. This can be set by going to the AWS console → VPCs → Subnets → Create Subnet → and grabbing the first two list items of the Availability Zone dropdown. Note: Will need to change the Region in the top right of the AWS console to grab the Availability Zones for the different Regions
-
-
Copy the {customer}-{cage}.yml file for each Cage specified in your customer configuration file. For example, when done there should be a file for each Cage named something like mycustomer-build.yml
-
In your ~/.nucleator directory, copy the {customer}-credentials.yml to use your Customer name
-
Open the file and fill in the aws_access_key_id and aws_secret_access_key for each account in the specified customer. These values are the saved values that were presented when NucleatorUser was created
NOTE
On Accounts that pre-date AWS' introduction of VPCs it is possible that the setup wizard may choose availability zones (AZ) in the <customer>.yml siteconfig file that are not VPC-capable. If this occurs Nucleator cage provision will fail. Please reference the Troubleshooting Tips for more details on this issue and how to address it.
STEP 7 - GENERATE AND PROVIDE CAGE-SPECIFIC SELF-SIGNED SSL CERTIFICATES
-
decide on a password to use to protect the private keys and certificates that you will generate in the steps below. Enter this password as the value for the pkcs12_bundle_password key in your customer credentials file at ~/.nucleator/<customer>-credentials.yml
-
In your local clone of your personal fork of nucleator-core-siteconfig, navigate to directory ansible/roles/siteconfig/vars/.
-
Run the following command by filling in the variables:
./make-certificate-bundle <customer_name> <cage_name> <customer_domain> <pkcs12_bundle_password>
-
Repeat for all cages. Use the customer_name, customer_domain and each cage_name that you specified during STEP 6. Use the pkcs12_bundle_password that you specified in STEP 7.a.
STEP 8 - COMMIT YOUR SITECONFIG UPDATES
Whenever siteconfig files are generated and/or updated, you must commit them to your github repository so that Nucleator will be able to use them. While still in you local clone you can review the config file changes that the wizard has made, or that you have manually made:
git status git diff
Add, commit and push your updated configuration:
git add --all :/ git commit -m "updated config with customer <a>, account <b> and cage <c>" git push
STEP 9 - NUCLEATOR UPDATE
Do this:
nucleator update
Nucleator update pulls current copies of all Stacksets that you have chosen to be part of your Nucleator installation. You should run nucleator update whenever:
-
you add Stacksets to your selected sources
-
you change the version of a Stackset you are using
-
you modify a Stackset without changing the Stackset version, and you want Nucleator to see those changes
STEP 10 - PROVISION NUCLEATOR ROLES IN YOUR ACCOUNT
Nucleator needs to establish some attributes in your account like iam roles in order to execute correctly. To do this run:
nucleator account rolespec provision --customer <yourcustomername> --account <youraccountname> # to ensure all the roles were created successfully nucleator account rolespec validate --customer <yourcustomername> --account <youraccountname>
STEP 11 - ACCOUNT SETUP
Next Nucleator needs to set up specific account resources for proper operation such as creating s3 buckets. To do this run:
PYTHONUNBUFFERED=1 nucleator account setup --customer <yourcustomername> --account <youraccountname> | tee /tmp/account_setup.out
STEP 12 - DNS SETUP
More detailed instructions on DNS set-up are in the User’s Guide section entitled Prepare AWS Account - Set Up DNS for Cages Defined within your Account You will need an externally resolvable Subdomain to which you have authority to add Nameserver records.
For each Cage that you have defined for your Customer:
-
In the AWS console go to Route53 → Hosted Zones and select the hosted zone created by account setup for the current Cage. "Go to Record Sets".
-
Copy the Name Servers of the Hosted Zone by selecting its single NS record, and selecting and copying the four nameservers from the pane on the right.
-
Go to the system that you use to maintain authoritative NS records for the customer_domain that you specified during step 6.
-
Add a single NS record with the name of the current Cage and a value that specifies the four nameservers copied above.
For example, for customer_domain somedepartment.mycompany.com and Cage build, you will create an NS record build.somedepartment.mycompany.com with a value that specifies the four nameservers copied above.
-
-
Verify that the DNS updates have propagated
dig +short NS build.somedepartment.mycompany.com
STEP 13 - PROVISION AND CONFIGURE CAGE
You can now provision and configure your first Nucleator Cage:
PYTHONUNBUFFERED=1 nucleator cage provision --customer <yourcustomername> --cage build | tee /tmp/cage_provision.out PYTHONUNBUFFERED=1 nucleator cage configure --customer <yourcustomername> --cage build | tee /tmp/cage_configure.out
Note that it can take a few minutes for cage resources to be provisioned and become available. You can use the CloudFormation AWS console to see the current status and progress of provisioning while these commands are running.
STEP 14 - CREATE A BUILDER STACKSET
Nucleator supports several Stacksets that can be created within a cage. The Builder Stackset provides a user interface for creating additional Stacksets. To do this run:
PYTHONUNBUFFERED=1 nucleator builder provision --customer <yourcustomername> --cage build | tee /tmp/builder_provision.out PYTHONUNBUFFERED=1 nucleator builder configure --customer <yourcustomername> --cage build | tee /tmp/builder_configure.out
Note that it can take some time for builder resources to be provisioned and become available. You can use the CloudFormation AWS console to see the current status and progress of provisioning while these commands are running.
Once complete the Nucleator user interface can be accessed at https://nucleator-ui.<cage>.<customer_domain>. Initial login credentials are available in ~/.nucleator/<customer>-credential.yml.
SUMMARY
You should now have a configured Cage and Builder Stackset. To provision other Stacksets such as Beanstalk or Redshift, see the documentation for those specific commands. You can also re-run step 12 with any Cage that has been configured in step 6 to provision more Cages.
SEE ALSO
NUCLEATOR
Part of the nucleator(1) suite


Hi {{username}},
To reset your password, follow the link or copy the token then paste into the GoodQuestion app.
{{token}}
If you don't wish to reset your password, disregard this email and no action will be taken.
The GoodQuestion Teamhttps://apps.eha.io


Citations
References used for research
-
Program Verification, (2017). - Robert S. Boyer and J Strother Moore
Program Verification.
[online] Available at: https://www.cs.utexas.edu/users/boyer/jar.pdf [Accessed 20 Oct. 2017]. -
Gateway to Research (1) - O'Hearn, P., Karp, B., Hadley, M., Perez, J. and Cook, B. (2017).
Program Verification Techniques for Understanding Security Properties of Software.
[online] Gateway to Research. Available at: http://gtr.rcuk.ac.uk/ [Accessed 20 Oct. 2017]. -
Gateway to Research (2) - Brotherston, J., Cook, B. and Gkorogiannis, K. (2017).
Boosting Automated Verification Using Cyclic Proof.
[online] Gateway to Research.
Available at: http://gtr.rcuk.ac.uk/projects?ref=EP%2FK006517%2F1 [Accessed 20 Oct. 2017]. -
Gateway to Research (3) - Alglave, J. (2017).
Partial order semantics for concurrent program verification.
[online] Gateway to Research.
Available at: http://gtr.rcuk.ac.uk/projects?ref=EP%2FK039431%2F1 [Accessed 20 Oct. 2017]. -
The Register - Theregister.co.uk. (2017).
Holey? COWL! Boffins build boxes to hold sketchy JavaScript libs.
[online] The Register.
Available at: http://www.theregister.co.uk [Accessed 20 Oct. 2017]. -
UCL COWL Department - Anon, (2017).
[online] UCL.
Available at: http://www0.cs.ucl.ac.uk/staff/B.Karp/cowl-osdi14.pdf [Accessed 20 Oct. 2017]. -
COWL Homepage - Cowl.ws. (2017).
COWL: A Confinement System for the Web.
[online] COWL.
Available at: http://cowl.ws/ [Accessed 20 Oct. 2017]. -
Engadget - Engadget. (2017).
New web privacy system prevents your data from leaking to other sites.
[online] Engadget.
Available at: http://www.engadget.com/2014/10/06/cowl-web-privacy/ [Accessed 20 Oct. 2017]. -
Network World - Smith, M. (2017).
Researchers unveil COWL, a new system to protect web surfers' privacy.
[online] CSO Online.
Available at: http://www.networkworld.com [Accessed 20 Oct. 2017]. -
Definitions.net - Definitions.net. (2017).
What does server-side mean?
[online]
Available at: http://www.definitions.net/definition/server-side [Accessed 20 Oct. 2017]. -
Linux Mag Linux Magazine. (2017).
Common Concurrent Programming Errors
[online]
Available at: http://www.linux-mag.com/id/996/ [Accessed 20 Oct. 2017].


AirBlue Sharing 7 brings true Bluetooth sharing to iOS 7 powered devices. After installing it on their devices users can share all kinds of files from one device to another. With AirBlue Sharing 7 the Bluetooth file transfer is not limited to iOS to iOS as users can also send or receive files from OS X, Windows, Android and other devices powered by other softwares.
Uses Live Camera Feed to Replace Your iOS Wallpaper.
I have seen many iPhone, iPad Air, iPad Mini and iPod Touch users concern to give their iDevice with important data to other user or relatives. Actually, its okay, because its your data and its depend on you that you wanna share or not. Guest Mode is new jailbreak tweak that allows user to choose apps, tweaks and functionality to share with your guest user.
Activator has been the must have app for many years and it seems like it is going to stay that for many years to come. With this tweak iOS users can make doing different things on their device much easier. Activator enables users to assign different actions for tasks which includes pressing of buttons multiple times and on-screen gestures. Performing an Activator gesture can trigger different operations. The latest edition of Activator even allows users to assign actions to Touch ID, which makes it even more useful and fun. Activator can be downloaded from Cydia for free.
CleverPin is another tweak related to passcode. With this hack installed users don’t have to enter passcode again and again when they are at home, listening to music, charging battery and more. It intelligently handles the passcode problem making the process less annoying for iOS users.
RecordMyScreen tweak provides an instant way for iOS users to record their on screen activity and share it with their friends. After installing this tweak users can assign an Activator action to it and instantly start recording after performing that action. There are a few options to configure that can be found within the Settings app. RecordMyScreen is available for free.
Randomly rearrange passcode buttons.
As the name suggests, the jailbreak tweak replaces the Apple’s patented slide to unlock feature with a “tap to unlock” button, which allows you to unlock your iPhone by tapping on it.
unlock your iPhone using Facial Recognition.
BioProtect tweak makes iPhone 5s’ more useful by allowing users to protect indivisual apps with their fingerprints. This tweak only allows access to apps after the user has verified authorization using his or her fingerprint.AppScan is a free alternative to BioProtect with similar functionality.
iFile is a file management app for iOS devices that gives root access to users. It allows file transfer to root directory of the device wirelessly from a web browser. Users can move, edit, rename as well as delete files using iFile application. iFile allows photos, sounds, text, HTML, sounds, iWork, PDF, Compressed and other types of file transfers.
Zeppelin enables iOS users to give their device a personal touch by replacing the carrier name with a cool logo from their favorite brand, game or movie. Users can also create and upload their own art to Zeppelin. It is a free download.
iCleaner is a jailbreak app that makes it easier for users to remove unnecessary files from their iPhone, iPad or iPod touch thus free up space for other stuff. It deletes message attachments, Safari data, data related to apps, Cydia and more. iCleaner app deleted nearly 1GB of data on my first attempt. iCleaner is available for free in Cydia.
AdBlocker for jailbroken iOS devices does exactly what AdBlocker extension does on desktop browsers. This tweak can significantly make web experience better on iOS devices by blocking ads on Safari and third party browsers.
BytaFont 2 makes it simple for iOS 7 users to change the font of their iPhone, iPad or iPod touch. Users can download fonts of their choice from Cydia and apply them using this jailbreak application. BytaFont 2 allows users to apply fonts to all parts of the OS or at specific areas. BytaFont 2 is free in Cydia and so are its fonts. It is one of the best tweaks to change the visual look of iOS 7.
Just like Activator the BiteSMS tweak has been around from several years and has established itself as a favorite and most popular tweak among iOS users. It allows users to instantly reply to text messages or initiate a call without leaving the current app they are in. BiteSMS 8 with support for iOS 7 and ARM64 devices is available in Cydia for free. You have to add http://test-cydia.bitesms.com/ repo to get it as it is still in beta.
ByPass makes having passcode protection less painful by allowing users to skip entering their password by performing an Activator action. Users can set a secret gesture that they can perform to ByPass passcode. ByPass tweak requires Activator and is available for free.
CCHide is a Control Center tweak using which users can change the appearance of this section of iOS. CCHide enables users to hide the sections of CC they don’t use or conditionally hide the music controls when they are not required. CCHide can be used to make Control Center shorter, minimalistic and less crowded. It is available in Cydia for free with full support for ARM64 devices.
With this tweak you can add, remove and rearrange the switches in the top and bottom shelves of Control Center. Users can add new toggles and links to their Control Center and even suppress some of them from being accessible from the lockscreen.
Swipey adds a simple app launcher to the lockscreen that can be accessed simply by swiping. Users can launch their most used apps right from the homescreen by swiping to opposite direction of ‘Slide to unlock’ gesture. Swipey allows upto to six apps to be added in the launcher.
SwipeSelection is an infamous jailbreak tweak that recently got updated for iOS 7. It brings a new way to edit text on iPhone, iPad or iPod touch making the task easier by adding gestures. SwipeSelection is free as well.
This list of must have Cydia tweaks and apps could not be complete without the inclusion of Winterboard. This tweak enables iOS users to apply themes and other third party visual elements on their device giving iOS a fresh new look. Although Winterboard has yet to receive update for iOS 7 and ARM64 it is still working on iOS 7 devices other than iPhone 5s, iPad mini Retina Display and iPad Air. Winterboard is free.
CyDelete makes it easier to delete applications that were downloaded from Cydia. With CyDelete installed users can delete Cydia apps just like they delete App Store ones. Its free.
f.lux tweak changes the brightness settings and temperature of the display according to the lighting conditions of the place you are at. This makes using the device less painful for the eyes. f.lux is free.
SkipLock simply removes the lockscreen when there are no pending notifications (or passcode protection) allowing users to access their device simply by pressing the home button or the lock button. It is free, too.
If you are a frequent user of the Notification Center, then this tweak is for you. IntelliScreenX further enhances the Notification Center to your liking, and makes reading the things that are important to you a breeze. You can set up pages for your Twitter, Facebook, RSS Reader, and your Mail account. Also with the ability to access IntelliScreenX from the lockscreen, this tweak will make your social life much more accessible on your iOS Device
Brings a whole new way to launch apps/multitask on the iOS device. It allows users to assign gestures to a specific app and launch the app using the assigned gesture.
Allows users to protect their apps and folders. Once your app is locked, you tap the app icon, an animated fingerprint scanning UI appears within the icon of the app. This is unlike all other similar tweaks that push a dialog box asking you to scan your fingerprint in ordeAppellancy – unlock your iPhone using Facial Recognitionr to get access.
The popular alternative to the iOS app switcher. This new app switcher is packed with customizable toggles and redesigned music controls. Each app in the switcher displays a screenshot with a small centered icon and title. If you’d like to close out of an app, simply swipe down on the screenshot.
Allowes users to group app icons in folder-like structures.
Awesome keyboard tweak.
Allowing iPhone, iPad and iPod touch users to install unofficial apps on their devices.
© 2014 HaKTuts. All rights reserved.


Description:
- A new and comprehensive 1:1,000,000 vector base map of the world.
Elements included are coastline, 1,000ft contours, spot
heights, drainage and limited vegetation details.
Reference:
- The DCW Product Specification (MIL/D/89009) for Defence Mapping
Agency Systems Centre (AQE), 8613, Lee Highway, Fairfax, Virginia.
Comment:
- Raw data are currently available. Met. Office are converting to a
more useful form.
Location:
- CD-ROM - Met O (CC) Hadley Centre
Contacts
- Main: Research Coordinator:
- Secondary: M.
Jackson
email:
-<EMAIL_ADDRESS>Address:
- Hadley Centre for Climate Prediction & Research
Meteorological Office, London Rd, Bracknell, Berkshire.
RG12 2SY
Telephone:
- +(44) 01344 856653
Fax:
- +(44) 01344 854898
Andy Brady |<EMAIL_ADDRESS>| Last updated: 28 September 1995 | © Crown Copyright 1995


Wedding Bells
!
Personal Information
Physical Qualities
Community
Education and Occupation
Lifestyle and Family Value
Profile Pic
Education and Occupation
Highest Educationn Level
Doctrate
Master
Honor's degree
Bachelors
Undergraduate
Diploma
High School
Less than high school
Education Field
University of last Attended Course
College/school last attended
Work At
Private Company
Government/ Public Sector
Defense/ Civil Sector
Business/ Self Employeed
Others
Not Working
Work As
Income
0
below 1 lakh
1 lakh-2 lakh
2 lakh-4 lakh
4 lakh-7 lakh
7 lakh-10lakh
10lakh-15lakh
15lakh-20lakh
20lakh-30lakh
30lakh-50lakh
50lakh-75lakh
75lakh-1crore
greater than 1 crore
Add something more!


Carlo Perassi / (2016-03-11)
I have to design & develop a new {web}app{lication}:
what is the best blueprint/boileplate/stub to start from?
A list that might explain the “OR” in the presentation.
“Let me concentrate on the Business Logic”
The Holy Grail doesn't exist.
It doesn't exist such a “headless CMS-like” as well…
but, AFAIK, there are a few interesting partial solutions…
and a couple of “Northern Star” candidates…
to compose your own decision matrix.
They are services, not {free} software (lock-in)
Faster / Expensive (it depends...)
module.exports = {
serviceName: "helloworld",
servicePort: 4020,
extKeyRequired: false,
"errors": {},
"schema": {
"/hello": {
"_apiInfo": {
"l": "hello world"
},
"firstName": {
"source": ['query.firstName'],
"required": true,
"validation": {
"type": "string",
"format": "alpha"
}
},
"lastName": {
"source": ['query.lastName'],
"required": true,
"validation": {
"type": "string"
}
}
}
}
};
'use strict';
var soajs = require('soajs');
var config = require('./config.js');
var service = new soajs.server.service({"config": config});
service.init(function () {
service.get("/hello", function (req, res) {
var name = req.soajs.inputmaskData.firstName + " " + req.soajs.inputmaskData.lastName;
res.json(req.soajs.buildResponse(null, "Hello " + name));
});
service.start();
});