LinkedIn API only allows reading data. To modify the privacy settings or information, check out your profile on their website.


WordNet
This section is for Google scholar API.
This section is for Amazon Book API.
Document Classifier With Prerequisite Analysis


CSPICE_UNLOAD unloads a SPICE kernel file (of any type)
from MATLAB.
Given:
file the SPICE kernel file name(s, 'file' (or any kernel listed
in 'file') should be one loaded through the interface
cspice_furnsh
[n,c1] = size(file); char = class(file)
or
[1,n] = size(file); cell = class(file)
the call:
cspice_unload( file )
removes the file and all associated data from the kernel
sub-system. If file is a meta-text kernel, the sub-system
unloads all files listed in the kernel.
Note: a cspice_unload call deletes ALL kernel variables except
those loaded into the kernel pool via a cspice_furnsh kernel
load call, i.e. cspice_unload erases kernel variables placed
in the pool by the pool functions: cspice_pipool, cspice_pdpool,
and cspice_pcpool.
returns:
None.
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
%
% Load a set of kernels: an SPK file, a PCK
% file and a leapseconds file. Use a meta
% kernel for convenience.
%
cspice_furnsh( 'standard.tm' )
%
% When the kernel variable
%
% BODY399_RADII
%
% is present in the kernel pool---normally because a PCK
% defining this variable has been loaded (as is the case
% here)---the call
%
try
values = cspice_bodvrd( 'EARTH', 'RADII', 3);
disp('Expected result, found kernel data')
catch
disp('ERROR: Unexpected result, no kernel data found')
end
%
% Now unload the kernel and try again.
%
cspice_unload( 'standard.tm' )
try
values = cspice_bodvrd( 'EARTH', 'RADII', 3);
disp('ERROR: Unexpected result, found kernel data')
catch
disp('Expected result, no kernel data found')
end
None.
For important details concerning this module's function, please refer to
the CSPICE routine unload_c.
MICE.REQ
KERNEL.REQ
PCK.REQ
-Mice Version 1.1.1, 13-FEB-2015, EDW (JPL)
Edited I/O section to conform to NAIF standard for Mice documentation.
-Mice Version 1.1.0, 17-DEC-2008, EDW (JPL)
Added zzmice_str call on input 'file' to convert string cells to
character arrays if 'file' has type string cells. Properly
identified 'file' as a vectorizable string/character array.
-Mice Version 1.0.0, 22-NOV-2005, EDW (JPL)
Unload a SPICE kernel
|


Over 6,000 corruption cases against govt officers pending: Odisha CM
The chief minister said this in reply to a question raised by BJD member Sudhir Kumar Samal in the Assembly
by Press Trust of IndiaAltogether 6,817 corruption cases against Odisha government officials are pending trials in various courts, Chief Minister Naveen Patnaik said on Monday.
The chief minister said this in reply to a question raised by BJD member Sudhir Kumar Samal in the Assembly.
The state government has appointed prosecution liaison officers at vigilance courts to expedite the cases and SPs of various vigilance divisions are holding regular meetings with special judges of the vigilance courts to ensure speedy trial.
The vigilance wing of Odisha Police has registered cases against 895 Group-A officers, 798 Group-B officers, 3,535 Group-C officers, 193 Group-D officers and 1,396 public servants for their involvement in corrupt practices, the chief minister said.


Please Confirm
Do you authorize
${authorizationRequest.clientId}
at
${authorizationRequest.redirectUri}
to access your protected resources.
<#assign array = authorizationRequest.scope?join(",") /> <#assign mappedArray = array?split(",")> <#list mappedArray as item>
#list>


Another contempt case filed against Firdous
by Saqib BashirISLAMABAD: Another contempt of court petition was filed on Friday by a private company owner against PM’s adviser on information, Firdous Ashiq Awan, in the Islamabad High Court (IHC) over violating a court order regarding axle load.
In the petition, private company lawyer Arif Chaudhry contended that under the [National Highway Safety] Ordinance 2000, the court has already issued a stay order on the Ministry of Communications notification for suspension of execution of axle load.
According to the stay order, the court had directed the communications ministry to fully implement on the law of axle load and the main case related to this was still pending.
Despite the court’s order, Firdous tweeted: “Upon instructions of PM Imran Khan to facilitate local traders, FWO has deferred Axle load implementation on M9 Motorway for one year. This decision has been taken on request of trader’s community”.
It is requested to the court that on violation of court orders contempt of court proceedings be initiated against Firdous, states the petition.
It was also maintained in the application that the court also directed the implementation of a complete ban on overloading under the National Highway Ordinance 2000. Road safety can be achieved by implementing per axle weight according to the law, it added.
The petition also stated that roads are affected because of overweight transportation made by manufacturers at low fares.
It is pertinent to mention that the IHC on November 25 will announce ruling on indictment of the PM’s aide in contempt case.


{{document.government|term:locale}}
{{document.title | lstring:locale}}
Note: The ABS Clearing-House does not guarantee the receipt of automatically generated emails.
The internationally recognized certificate of compliance (IRCC) is not available
- {{term|term}}
({{document.keywordOther|lstring:locale}})
{{document.dateOfAccess}}
{{document.dateCollected}}
{{document.dateCollectedFrom}}
{{document.dateCollectedTo}}
{{document.information | lstring:locale}}


Notes
Fit Score
In database:
Difficult Score
Email
Other Links
Speaker
Locate In Israel
Add

Cancel


Hi there!. Currently, I’m enrolled at Georgia Tech as a Web Developer. I am on track to graduate this October. I can say that I am a very responsible and hard-working student.
When I am not hunker down studying or learning new things about computer coding, I hang out with my family. I have 2 kids and a beautiful wife.
My hobbies are Deep sea fishing and training for Strongman
This application require gitpull and install dependencies.
This application make it easier to find and borrow tools from your neighbors and neighborhood near by.
This application require gitpull and install dependencies.
This web site is a great way to share your expertise while building a potentially valuable readership. It can help you share your projects, or provide guidance to other web users
This application require gitpull and install dependencies.
Whether it's at the office during an important client conference call, at home or anywhere else, we have to jot down different types of notes and information on a routine basis. Note Taker can help you with that.
This application require gitpull and install dependencies.
The backend is the part of an e-commerce site that users normally don't see. The backend is composed of servers, applications, and databases. It's responsible for organizing and storing data, and ensuring everything on the frontend operates smoothly.
This application require gitpull and install dependencies.
An employee tracking application can help employers keep their staff’s performance at the highest level.
| CSS | HTML | Database | SQL |
| JavaScript | MVC | JQuery |


main page
modules
namespaces
classes
files
Gecode home
search for
Generated on Mon Aug 25 11:36:38 2008 for Gecode by
doxygen
1.5.6
Directories
This directory hierarchy is sorted roughly, but not completely, alphabetically:
doxygen
examples
support
gecode
cpltset
branch
constraints
propagators
var
var-imp
view
int
arithmetic
bool
branch
channel
circuit
count
cumulatives
distinct
dom
element
extensional
gcc
linear
rel
sorted
var
var-imp
view
iter
kernel
minimodel
search
serialization
set
branch
convex
distinct
element
int
projectors
propagator
rel
rel-op
sequence
var
var-imp
view
support
test
assign
branch
cpltset
int
set


## Table of Contents
- [Introduction](#Introduction)
- [Download](#Download)
- [Navigate Pages or Dashboard](#Navigate_Pages_or_Dashboard)
- [NavigationWindow](#NavigationWindow)
- [1. Hyperlink](#Hyperlink)
- [2. Frame](#Frame)
- [3. NavigationService](#NavigationService)
- [Dashboard Applications](#Dashboard_Applications)
- [Side-note about the power of templates](#Side-note_about_the_power_of_templates)
- [4. Adding UserControls to XAML](#Adding_UserControls_to_XAML)
- [5. Parent Cast](#Parental_Guidance)
- [6. Inversion of Control / Dependancy Injection (kind of)](#Inversion_of_Control_Dependancy_Injection_kind_of)
- [7. Application Controller (MVC)](#Application_Controller_MVC)
- [8. Events](#Events)
- [9. Mediator](#Mediator)
- [10. Binding & INotifyPropertyChanged](#Binding_amp_INotifyPropertyChanged)
- [11. MVVM Dashboard Example](#MVVM_Dashboard_Example)
## Introduction
This article is an attempt to cover some of the most common methods of creating, managing and navigating between pages & controls of a WPF application.
![ ](http://i1.code.msdn.s-msft.com/how-to-build-manage-and-fdd0074a/image/file/63418/1/clip1.gif)
The three main "stages" that we work with in WPF applications are [**Windows**](http://msdn.microsoft.com/en-us/library/system.windows.window.aspx), [**Pages**](http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx) and [**UserControls**](http://msdn.microsoft.com/en-us/library/system.windows.controls.usercontrol.aspx).
We will explore the various ways of navigating between views and loading forms or controls into the main view.
## Download
**An accompanying project, with working examples of all the techniques discussed here, is available at TechNet Samples**
[**http://code.msdn.microsoft.com/How-to-Build-Manage-and-fdd0074a**](http://code.msdn.microsoft.com/How-to-Build-Manage-and-fdd0074a)
## Navigate Pages or Dashboard
There are two main styles to user interface development in WPF, and it depends on how you lay out your application. You could also mix the two.
1. Using the built in navigation system to jump between individual pages of the application
2. Use a dashboard style "main window" and just update individual portions of the screen.
## NavigationWindow
The first, most fully featured and obvious controls for navigation are [**Frame**](http://msdn.microsoft.com/en-us/library/system.windows.controls.frame.aspx) and [**Page**](http://msdn.microsoft.com/en-us/library/system.web.ui.page.aspx). You could include a Frame in your main window and run it all from that, but if your project is going to be completely based around Page navigation, you can simply use a [**NavigationWindow**](http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationwindow.aspx) (from [**System.Windows.Navigation**](http://msdn.microsoft.com/en-us/library/system.windows.navigation.aspx)) instead of a [**Window**](http://msdn.microsoft.com/en-us/library/system.windows.window.aspx) for your main startup interface.
***MainWindow.xaml***
***
***
This first navigation is triggered by the [**Source**](http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationwindow.source.aspx) property of the NavigationWindow.
## 1. Hyperlink
This is the most simple method for navigating between pages within a NavigationWindow or frame. There is no code-behind needed. It is therefore quite similar to a web page hyperlink.
***Page0.xaml***
1. Click this hyperlink
## 2. Frame
Rather than base your application around a NavigationWindow, it is more common to design your own top level framework (like an HTML FrameSet) with top level menus, navigation buttons, and other application level sections. A WPF Frame is not like an HTML Frame. It is more akin to an InnerFrame. [ Frame](http://msdn.microsoft.com/en-us/library/system.windows.controls.frame.aspx)s also manage navigation history, and can be used the same as a NavigationWindow.
***Page1.xaml***
***Page1.xaml*.cs**
privatevoid Button_Click(object sender, RoutedEventArgs e)
{
MyFrame.Navigate(newPage2());
}
In the second example, we simply call the Frame's [**Navigate**](http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationwindow.navigate.aspx) method to load Page1
## 3. NavigationService
When you are using a Page within a NavigationWindow or Frame, you can navigate using the built in [**NavigationService**](http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationservice.aspx). If you have nested navigation componants, like i have shown in the sample project, then each level has it's own NavigationService.
***Page2.xaml.cs***
privatevoid Button_Click(object sender, RoutedEventArgs e)
{
this.NavigationService.Navigate(newPage3());
}
The code above uses the page's own NavigationService. The page's NavigationService uses MyFrame, not the main parent NavigationWindow's built-in frame.
## Dashboard Applications
The built in navigation framework is nice, and great for simple database management applications. However, the power of WPF means so much more is possible.
By working with and updating "areas" of the screen, rather than the whole page, an application can come alive with effects and animations.
Instead of Frames and Pages, the application consists of a main window (dashboard/stage), [**UserControl**](http://msdn.microsoft.com/en-us/library/system.windows.controls.usercontrol.aspx)s within that window, and various popup dialog windows.
Instead of navigating between pages, controls are added into "containers", which can either hold multiple [**Children**](http://msdn.microsoft.com/en-us/library/system.windows.controls.panel.children.aspx) (eg Grid, or just one logical [**Child**](http://msdn.microsoft.com/en-us/library/system.windows.controls.border.child(v=vs.95).aspx)
#### Side-note about the power of templates
With WPF, controls can even be created on the fly through binding collections of a class to the ItemsSource of controls like [**ListBox**](http://msdn.microsoft.com/en-us/library/system.windows.controls.listbox.aspx), [**DataGrid**](http://msdn.microsoft.com/en-us/library/system.windows.controls.datagrid(v=vs.95).aspx), [**ItemsControl**](http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.aspx), etc.
**ItemsControl**s use **ItemTemplate**s & **DataTemplate**s to define the "blue-print" of the control.
This is a subject for another article, this one is simply to discuss direct manual manipulation methods, not automated control creation.
## 4. Adding UserControls to XAML
When you create a UserControl, either in your main project, or a separate library project, you need to firstly add the namespace for the control, so that you can reference it in XAML. The code below shows the Markup method of including a UserControl which was created in the same project.
***Page3.xaml***
**
****
**Initializing a view with controls (as above) is a good start, but we often need to load controls into the view on the fly, from code.
The rest of the examples show various ways to do that.**
## 5. Parent Cast
If I complete a form and click it's submit button, then after the form is saved, I may want to navigate to the summary page.
One of the most immediate and tightly-coupled methods of navigating away, based on events within a control, is for the control itself to load the next page into it's parent container, replacing itself with the next page.
***UserControl1.xaml.cs***
privatevoid Button_Click(object sender, RoutedEventArgs e)
{
var parent = Parentas Border;
if(parent !=null)
parent.Child =new UserControl2(parent);
}
A problem with this approach is if we change the design of the parent page (for example changing the Border to a GroupBox) it will compile, but we get a null from the cast, so no navigation.
## 6. Inversion of Control / Dependancy Injection (kind of)
One way to ensure compile-time checks protect your method is to pass the parent in as a constructor parameter. In this example, it is defined as a Border.
[**IoC**](http://en.wikipedia.org/wiki/Inversion_of_control) and [**DI**](http://en.wikipedia.org/wiki/Dependency_injection) are based around this concept of passing the controller into the player. This is usually done with an interface, so all players know what to expect, no matter who the controller that uses them is.
***UserControl2.xaml.cs***
usingSystem.Windows;
usingSystem.Windows.Controls;
namespaceApplicationNavigation.View
{
publicpartial class UserControl2 : UserControl
{
Border _parentBorder;
publicUserControl2(Border parentBorder)
{
_parentBorder = parentBorder;
InitializeComponent();
}
This technique actually comes in useful a lot in a project's development, throughout most child UserControls and popup dialog windows.
A better variation of this would be to pass in a [**delegate method**](http://msdn.microsoft.com/en-us/library/ms173171(v=vs.80).aspx) like a "ReloadUser" method, to tell the parent that data is saved, and needs to be repulled from the database.
In this example, we set it's parent (Border) Child, thereby destroying itself.
***UserControl2.xaml.cs***
privatevoid Button_Click(object sender, RoutedEventArgs e)
{
if(_parentBorder !=null)
_parentBorder.Child =new UserControl3();
}
## 7. Application Controller (MVC)
The two methods above both pass control directly from control to control. One side effect of this is that navigation code is buried throughout the code.
A better approach for any reasonable sized project is to centralize all main navigation code into one place.
This is similar to the MVC concept of a Controller that creates the View from the Model.
This method works well with an MVVM based project too, navigation being a separate "application level" concern from the data anyway.
There are many ways and places to initialize such a class too. In this example we pass it in as we reach the part of the project that introduces this "stage" that will be used.
***Page3.xaml.cs***
publicPage3()
{
InitializeComponent();
ApplicationController.RootBorder = MyStage;
...
}
An Application Controller for an otherwise MVVM based project typically has methods like *ShowUserPage(int userId)* which creates the View, the ViewModel and binds the ViewModel to the DataContext of the View (see a later example). In this simpler example, it just takes the next View as a parameter and loads it into the registered root control.
***ApplicationController.cs***
usingSystem.Windows.Controls;
namespaceApplicationNavigation.Helpers
{
publicclass ApplicationController
{
publicstatic Border RootBorder {get;set; }
publicstatic void LoadUserControl(UserControl nextControl)
{
RootBorder.Child = nextControl;
}
}
}
This can then be called from anywhere in the project, to navigate the application to the next page.
***UserControl3.xaml.cs***
ApplicationController.LoadUserControl(newControl);
## 8. Events
Next is a traditional way of passing control back to a parent control - through classic event handling by the parent.
In our previous example, before we pass the UserConrtrol4 into LoadUserControl, an event handler is attached to an event of the control:
***UserControl3.xaml.cs (again)***
privatevoid Button_Click(object sender, RoutedEventArgs e)
{
var newControl =new UserControl4();
newControl.NavigateEvent +=new EventHandler(newControl_NavigateEvent);
ApplicationController.LoadUserControl(newControl);
}
voidnewControl_NavigateEvent(objectsender, EventArgs e)
{
ApplicationController.LoadUserControl(newUserControl5());
}
This is then triggered in the usual manner:
publicevent EventHandler NavigateEvent;
publicUserControl4()
{
InitializeComponent();
}
privatevoid Button_Click(object sender, RoutedEventArgs e)
{
if(NavigateEvent !=null) NavigateEvent(this,null);
}
You could even pass the next page or a token back.
This method, like any event based code, can cause memory leak problems, if not disposed of properly.
So this is a last resort method of communications, for many.
## 9. Mediator
The [**Mediator****pattern**](http://en.wikipedia.org/wiki/Mediator_pattern) represents a global level of communications.
This is one of my personal favorites for passing signals around a very modular project. It allows you to pass signals from ViewModel to ViewModel, when there isn't a VisualTree to traverse. It is also very easy to start using it all the time, which leads to "spaghetti coding", so should be used sparingly.
The following example of a Mediator covers most scenarios where you would need cross-application messaging:
***Mediator.cs***
staticIDictionary>> pl_dict =new Dictionary>>();
staticpublic void Register(stringtoken, Action


Manages host folders for the Minishift VM. Use the sub-commands to define, mount, umount, and list host folders.
minishift hostfolder SUBCOMMAND [flags]
minishift hostfolder [command]
Global Flags:
Use "minishift hostfolder [command] --help" for more information about a command.


An Agent Based Model to look at Gwent Pro Ladder (code)
ABM using Mesa and Pandas
In an article I contributed to Team Bandit Gang’s website, data is shown about the number of games Pro Ranked players play at different ranks. Tough with the data that can be pulled from Gwent Masters assessing whether or not playing more will result in a higher ranking is difficult. So answering the question posed in the article, whether it is skill vs grinding games that will help you further, no definitive conclusions could be drawn.
The main issue with the data released at the end of the season is that there is no good way to judge a player’s actual skill. You could use the number of games played and peak MMR as a metric for efficiency, but that isn’t necessarily a good proxy for skill. Playing all six factions would affect that score negatively, as well as players that have a very good performance but decide to play more casually with fun, less optimal, decks after achieving an MMR score they are happy with. While this could be improved by scraping players’ profiles several times throughout the season, assumptions would still need to be made how to translate this into an approximation for skill.
While skill can’t be directly measured, we can model a population of players with different skill that all play a different number of games during a simulated season. In this post we’ll explore if an Agent Based Model (ABM), implemented using the Mesa library, can assess how much grinding can improve your ranking while playing Gwent or if pure skill prevails.
This post is about the technical details how to implement the model. If you want to jump directly into the results and conclusions about ranked ladder, skip right ahead to the next post where that will be covered.
Creating the GwentAgent Class
The full code for this project is available on GitHub, though some of the important part are highlighted here. When working with Mesa an Agent class needs to be defined. This class should contain all parameters an entity in the simulation would have and how that entity should behave. So here our agents will have two important traits :
- ELO level : This represents an entities proficiency at the game at the beginning of the season. Here an ELO level is selected at the beginning for each entity. This is a rating system used in Chess to rank players. (Note that the MMR system included in Gwent is essentially an ELO rating, where changes are calculated with a K-factor of 14.)
- Playrate : The chance a player will play at each step of the model, the higher this is, the more games that agent will play through a simulated season.
On top of that we’ll need to keep track of the number of games played, the number of games won, the current MMR and the
peak MMR. So for all those properties fields are included in the GwentAgent
class as well. With two functions
decorated with @property
to calculate the win rate and the ELO score with experience correction, which is the base
ELO level + an experience score based on the number of games played.
from mesa import Agent, Model
from mesa.time import RandomActivation
from mesa.datacollection import DataCollector
import numpy as np
from numpy import random
max_playrate = 20
experience_factor = 20
def win_probability(elo_difference):
proba = 1 / (1 + 10 ** (-elo_difference / 400))
return proba
def elo_change(elo_difference, K=14):
return K * (1 - win_probability(elo_difference))
def pick_elo():
"""
Generate a random elo value from a distribution that mimicks the distribution
of chess elo scores on Lichess Blitz.
"""
return min(
1200 + (1500 / 14) * np.abs(51 - random.binomial(100, 0.5)), 2700
) - random.randint(100)
class GwentAgent(Agent):
def __init__(self, unique_id, model):
super().__init__(unique_id, model)
self.peak_mmr = 2400
self.current_mmr = 2400
self.games_played = 0
self.wins = 0
self.elo_level = pick_elo()
self.playrate = random.randint(1, max_playrate)
@property
def win_rate(self):
if self.games_played > 0:
return (self.wins * 100) / self.games_played
return None
@property
def elo_experience(self):
"""
Take the ELO increased with an experience score based on the number of
games played and the experience factor.
"""
return self.elo_level + np.sqrt(self.games_played) * experience_factor
def win(self, other_player):
mmr_change = elo_change(self.current_mmr - other_player.current_mmr)
self.current_mmr += mmr_change
self.peak_mmr = max(self.current_mmr, self.peak_mmr)
self.games_played += 1
self.wins += 1
def loss(self, other_player):
mmr_change = elo_change(other_player.current_mmr - self.current_mmr)
self.current_mmr -= mmr_change
self.games_played += 1
def find_opponent(self, min_number=20):
"""
Pick a random other agent to play against. This agent should have a
comparable current mmr. So we will grow the mmr range until there
are at least
"""
mmr_range = 10
while (
len(
[
a
for a in self.model.schedule.agents
if a.unique_id != self.unique_id
and abs(self.current_mmr - a.current_mmr) <= mmr_range
]
)
< min_number
):
mmr_range += 7
possible_opponents = [
a
for a in self.model.schedule.agents
if a.unique_id != self.unique_id
and abs(self.current_mmr - a.current_mmr) <= mmr_range
]
opponent = random.choice(
[a for a in possible_opponents],
1,
[a.playrate for a in possible_opponents],
)[0]
return opponent
def play_against(self, other_agent):
# Calculate win probability, check if player won, adjust scores accordingly
wp = win_probability(self.elo_experience - other_agent.elo_experience)
rp = random.random()
won = rp < wp
if won:
self.win(other_agent)
other_agent.loss(self)
else:
other_agent.win(self)
self.loss(other_agent)
def step(self):
# Check if this agent will play a round
rp = random.randint(max_playrate + 1)
if rp >= self.playrate:
return
# Find an opponent
other_agent = self.find_opponent()
# Play against opponent and adjust score
self.play_against(other_agent)
Furthermore, there are a few functions required, the win
and loss
functions to handle the MMR scores after
an entity won or lost a game. find_opponent
this is a function to mimic the queuing system in Gwent, where it will
try to find an active player with a similar current MMR, if not enough players can be found in the current range it
will increase the MMR range it is looking in and search again. play_against
simulates a game played by two players,
the outcome is calculated by their ELO score and experience. Based on that probability the victor is picked randomly and
the players’ stats are updated accordingly. Finally, the required step
function implements everything a player
does at each step of the simulation. Here, based on the playrate
, a player will play or sit this round out. If the
player plays a game, another agent with a similar MMR will be found and they will face off in a game where the outcome
is determined by their skill level and experience.
The Experience Factor
It is reasonable to assume that as a player plays more games his/her familiarity with the deck and the current meta will
increase. As they learn how to play their deck against different popular decks their ability to win should become higher.
To include this in the model the experience is included which is the square root of the number of games played multiplied
with the experience factor which is the same for all players. In the examples here the factor is set to 20 which means
that someone that played 100 games has an sqrt(10) * 20
ELO bonus when playing. While this factor was set
arbitrarily, a 200 ELO bonus is a significant improvement and likely higher than you would expect in reality.
Setting up the GwentModel
The Mesa model here is simple, we create a number of N agents, a scheduler that will activate all the agents each step
in random order and a DataCollector
that will store all desired properties, for all agents each step so the
history of those properties during the simulation can be stored and analysed later on.
class GwentModel(Model):
def __init__(self, N):
self.num_agents = N
self.schedule = RandomActivation(self)
for i in range(self.num_agents):
a = GwentAgent(i, self)
self.schedule.add(a)
self.datacollector = DataCollector(
agent_reporters={
"Peak MMR": "peak_mmr",
"Current MMR": "current_mmr",
"Win Rate": "win_rate",
"Games Played": "games_played",
"Games Won": "wins",
"elo": "elo_level",
"elo_xp": "elo_experience",
}
)
def step(self):
self.datacollector.collect(self)
self.schedule.step()
Running the Model
With a few lines of code we can create a model with 8000 agents that will play for 100 steps. Here the tqdm module is used to create a progress bar for our simulation and estimated time. On a single core (Ryzen 7 3700X) it takes 20-30 minutes to go through the entire simulation (finding opponents in the correct range being the slowest step). So if you start this, grab a coffee or a snack, it will take some time !
from tqdm import tqdm
model = GwentModel(8000)
for i in tqdm(range(100)):
model.step()
Getting Data from the GwentModel
After the simulation (and that coffee or snack) is finished, we can extract data from the model to work with. There
are two ways to do this, one is to grab data from the DataCollector
included in the model. Which contains the
state of all agents at all steps.
time_df = model.datacollector.get_agent_vars_dataframe()
time_df.to_csv(f"./data/simulation_steps_experience_factor_{experience_factor}.csv")
time_df.head()
| Peak MMR | Current MMR | Win Rate | Games Played | Games Won | elo | elo_xp | ||
|---|---|---|---|---|---|---|---|---|
| Step | AgentID | |||||||
| 0 | 0 | 2400.0 | 2400.0 | NaN | 0 | 0 | 1341.285714 | 1341.285714 |
| 1 | 2400.0 | 2400.0 | NaN | 0 | 0 | 1656.714286 | 1656.714286 | |
| 2 | 2400.0 | 2400.0 | NaN | 0 | 0 | 1625.571429 | 1625.571429 | |
| 3 | 2400.0 | 2400.0 | NaN | 0 | 0 | 1329.285714 | 1329.285714 | |
| 4 | 2400.0 | 2400.0 | NaN | 0 | 0 | 1718.714286 | 1718.714286 |
While this is great to replay the model, it is overkill when you just want to
examine the final state (or didn’t include the DataCollector
). The code below will loop over all agents, grab
certain properties and put them in a pandas dataframe. It will also put players in different bins based on skill and the
number of games played.
df = pd.DataFrame(
{
"player": [f"Player {agent.unique_id}" for agent in model.schedule.agents],
"elo": [agent.elo_level for agent in model.schedule.agents],
"playrate": [agent.playrate for agent in model.schedule.agents],
"games played": [agent.games_played for agent in model.schedule.agents],
"current MMR": [agent.current_mmr for agent in model.schedule.agents],
"peak MMR": [agent.peak_mmr for agent in model.schedule.agents],
"win rate": [agent.win_rate for agent in model.schedule.agents],
}
)
df["rank"] = df["peak MMR"].rank(ascending=False)
df["elo bin"] = pd.cut(df["elo"], list(range(1100, 2800, 200)))
df["games played percentile"] = df["games played"].rank(pct=True)
df["games played bin"] = pd.cut(df["games played percentile"], [0, 0.25, 0.50, 0.75, 1])
df.to_excel(f"./data/final_data_experience_factor_{experience_factor}.xlsx")
df
| player | elo | playrate | games played | current MMR | peak MMR | win rate | rank | elo bin | games played percentile | games played bin |
|---|---|---|---|---|---|---|---|---|---|---|
| Player 1 | 1284.142857 | 4 | 65 | 2344.332458 | 2408.421244 | 43.076923 | 5784.0 | (1100, 1300] | 0.179063 | (0.0, 0.25] |
| Player 2 | 1299.142857 | 7 | 71 | 2357.819543 | 2400.000000 | 45.070423 | 7552.0 | (1100, 1300] | 0.243312 | (0.0, 0.25] |
| Player 40 | 1238.142857 | 5 | 69 | 2329.815980 | 2406.859099 | 42.028986 | 6435.5 | (1100, 1300] | 0.221438 | (0.0, 0.25] |
| Player 49 | 1291.142857 | 4 | 60 | 2363.915782 | 2400.000000 | 45.000000 | 7552.0 | (1100, 1300] | 0.128125 | (0.0, 0.25] |
| Player 102 | 1212.142857 | 2 | 48 | 2349.541087 | 2413.726378 | 41.666667 | 5478.0 | (1100, 1300] | 0.028250 | (0.0, 0.25] |
| … | … | … | … | … | … | … | … | … | … | … |
| Player 6289 | 2667.000000 | 18 | 139 | 2585.247562 | 2623.316703 | 59.712230 | 16.0 | (2500, 2700] | 0.957438 | (0.75, 1.0] |
| Player 7196 | 2547.857143 | 18 | 130 | 2571.713937 | 2578.698543 | 59.230769 | 81.0 | (2500, 2700] | 0.876062 | (0.75, 1.0] |
| Player 7523 | 2555.857143 | 12 | 120 | 2573.058829 | 2573.058829 | 60.000000 | 100.0 | (2500, 2700] | 0.778188 | (0.75, 1.0] |
| Player 7604 | 2649.000000 | 17 | 134 | 2626.069166 | 2640.740116 | 61.940299 | 8.0 | (2500, 2700] | 0.915875 | (0.75, 1.0] |
| Player 7794 | 2605.000000 | 13 | 120 | 2585.842820 | 2599.283118 | 60.833333 | 44.0 | (2500, 2700] | 0.778188 | (0.75, 1.0] |
Results
So using an Agent Based Model a very clean dataset, where the actual skill of each player is known and their final place on ladder. The Mesa library made it surprisingly easy to set up this system. With all data now included in the familiar pandas dataframe the actual analysis can begin. This however is reserved for the next post!
Liked this post ? You can buy me a coffee


--- short: l-dcatap11tockan type: loader color: green title: DCAT-AP to CKAN description: Loads DCAT-AP v1.1 metadata to CKAN ---
Loader, loads DCAT-AP v1.1 metadata to a CKAN catalog.
http://linked.opendata.cz/api/3/action
Pure CKAN
.void:exampleResource
, create a CKAN resource from it.void:sparqlEndpoint
, create a CKAN resource from it.The {{page.title}} component loads DCAT-AP v1.1 metadata to a CKAN open data catalog instance. The typical usage is for metadata created by the DCAT-AP Dataset, DCAT-AP Distribution and VoID Dataset components. The component currently uses the File type NAL codelist published by the EU Publications Office to label file types in the CKAN catalog. Therefore, this codelist needs to be provided on its EU MDR NALs input. This can be a local copy, or a fresh download. See the sample pipeline for a typical usage.
Note that when there is information about a dataset publisher in the input data, mainly its name, and there is a matching Organization in the target CKAN, the component will try to register the CKAN dataset in the CKAN organization. When there is no such organization in the target CKAN, the component will try to create one.
Currently, there is only one additional profile intended to be used with CKAN catalogs extended with the CKAN extension for Czech NKOD. This extension supports all metadata fields required by the Czech National Open Data Catalog.


Sign-in¶
In order for IdentityServer to issue tokens on behalf of a user, that user must sign-in to IdentityServer.
Cookie authentication¶
Authentication is tracked with a cookie managed by the cookie authentication handler from ASP.NET Core.
IdentityServer registers two cookie handlers (one for the authentication session and one for temporary external cookies). These are used by default and you can get their
names from the IdentityServerConstants
class (DefaultCookieAuthenticationScheme
and ExternalCookieAuthenticationScheme
) if you want to reference them manually.
We only expose basic settings for these cookies (expiration and sliding), and you can register your own cookie handlers if you need more control.
IdentityServer uses whichever cookie handler matches the DefaultAuthenticateScheme
as configured on the AuthenticationOptions
when using AddAuthentication
from ASP.NET Core.
Overriding cookie handler configuration¶
If you wish to use your own cookie authentication handler, then you must configure it yourself.
This must be done in ConfigureServices
after registering IdentityServer in DI (with AddIdentityServer
).
For example:
services.AddIdentityServer()
.AddInMemoryClients(Clients.Get())
.AddInMemoryIdentityResources(Resources.GetIdentityResources())
.AddInMemoryApiResources(Resources.GetApiResources())
.AddDeveloperSigningCredential()
.AddTestUsers(TestUsers.Users);
services.AddAuthentication("MyCookie")
.AddCookie("MyCookie", options =>
{
options.ExpireTimeSpan = ...;
});
Note
IdentityServer internally calls both AddAuthentication
and AddCookie
with a custom scheme (via the constant IdentityServerConstants.DefaultCookieAuthenticationScheme
), so to override them you must make the same calls after AddIdentityServer
.
Login User Interface and Identity Management System¶
IdentityServer does not provide any user-interface or user database for user authentication. These are things you are expected to provide or develop yourself.
If you need a starting point for a basic UI (login, logout, consent and manage grants), you can use our quickstart UI.
The quickstart UI authenticates users against an in-memory database. You would replace those bits with access to your real user store. We have samples that use ASP.NET Identity.
Login Workflow¶
When IdentityServer receives a request at the authorization endpoint and the user is not authenticated, the user will be redirected to the configured login page.
You must inform IdentityServer of the path to your login page via the UserInteraction
settings on the options (the default is /account/login
).
A returnUrl
parameter will be passed informing your login page where the user should be redirected once login is complete.
Note
Beware open-redirect attacks via the returnUrl
parameter. You should validate that the returnUrl
refers to well-known location. See the interaction service for APIs to validate the returnUrl
parameter.
Login Context¶
On your login page you might require information about the context of the request in order to customize the login experience
(such as client, prompt parameter, IdP hint, or something else).
This is made available via the GetAuthorizationContextAsync
API on the the interaction service.
Issuing a cookie and Claims¶
There are authentication-related extension methods on the HttpContext
from ASP.NET Core to issue the authentication cookie and sign a user in.
The authentication scheme used must match the cookie handler you are using (see above).
When you sign the user in you must issue at least a sub
claim and a name
claim.
IdentityServer also provides a few SignInAsync
extension methods on the HttpContext
to make this more convenient.
You can also optionally issue an idp
claim (for the identity provider name), an amr
claim (for the authentication method used), and/or an auth_time
claim (for the epoch time a user authenticated).
If you do not provide these, then IdentityServer will provide default values.


vignettes/run_qc.Rmd
run_qc.Rmd
This pipeline will import data from single-cell preprocessing algorithms (e.g. CellRanger), generate various quality control metrics (e.g. doublet scores), and output results in standard data containers (e.g. SingleCellExperiment). Both the original droplet matrix and the filtered cell matrix will be processed. This pipeline is focused on single cell data generated from microfluidic devices (e.g. 10X).
The script will automatically try to install the “singleCellTK” package from Bioconductor if not available. However, currently this code is only located on a development branch which needs to be installed from GitHub:
library(devtools) install_github("compbiomed/singleCellTK@devel")
To run the pipeline script, users will need to download the ‘SCTK_runQC.R’ and run the following code:
Rscript SCTK_runQC.R \ -b /base/path \ -P Preprocessing_Algorithm \ -s SampleName \ -o Output_Directory \ -S TRUE \ -F R,Python,FlatFile,HTAN
or
SCTK_runQC.R \ -b /base/path/ \ -P Preprocessing_Algorithm \ -s SampleName \ -o Output_Directory \ -S TRUE \ -F R,Python,FlatFile,HTAN
if the Rscript executable can be found in your environment with the command
/usr/bin/env Rscript --vanilla
For each tool, the pipeline expect the data in a certain format within a specific directory structure. For example, data generated with CellRanger V3 is expected to be under a sample folder (specified with the “-s” flag) and a base folder (specified with the “-b” flag). Some tools prepend the sample name onto the output files instead of making a separate subdirectory (e.g. BUStools and SEQC). The combination of –base_path (“-b”) and –sample (“-s”) should specify the location of the data files: For a comprehensive description of expected input directory structure of import functions, refer documentation here
The required arguments are as follows:
-b, --base_path (required). Base path for the output from the preprocessing algorithm
-P, --preproc (required). Algorithm used for preprocessing. One of One of 'CellRangerV2', 'CellRangerV3', 'BUStools', 'STARSolo', 'SEQC', 'Optimus', 'DropEst', 'SceRDS' and 'CountMatrix'.
-s, --sample (required). Name of the sample. This will be prepended to the cell barcodes.
-o, --directory (required). Output directory. A new subdirectory will be created with the name "sample". R, Python, and FlatFile directories will be created under the "sample" directory containing the data containers with QC metrics. Default ".".
-F, --outputFormat (required). The output format of this QC pipeline. Currently, it supports R (RDS), FlatFile, Python (AnnData) and HTAN.
-S, --split_sample (required). Save SingleCellExperiment object for each sample. Default is TRUE. If FALSE, the data of all samples will be combined into one SingleCellExperiment object and this object will be outputed.
The optional arguments are as follows. Their usage depend on type of data and user-defined behaviour.
-g, --gmt (optional). GMT file containing gene sets for quality control.
-t, --delim (optional, required when -g is specified). Delimiter used in GMT file. Default "\t".
-r, --reference (optional). The name of genome reference. This is only required for CellRangerV2 data.
-G, --genome (optional). The name of genome reference. This is only required for CellRangerV2 data.
-y, --yaml (optional). YAML file containing parameters called by singleCellTK QC functions. Please check the following documentation for details.
-c, --cell_data (optional). The full path of the RDS file or Matrix file of the cell matrix. This would be use only when --preproc is SceRDS or CountMatrix.
-r, --raw_data (optional). The full path of the RDS file or Matrix file of the droplet matrix. This would be provided only when --preproc is SceRDS or CountMatrix.
-C, --cell_data_path (optional). The directory contains cell matrix, which has gene symbol/ID as rownames and cell barcodes as colnames. Default is NULL. If 'base_path' is NULL, both 'cell_data_path' and 'raw_data_path' should be specified.
-R, --raw_data_path (optional). The directory contains droplet matrix, which has gene symbol/ID as rownames and droplet barcodes as colnames. Default is NULL. If 'base_path' is NULL, both 'cell_data_path' and 'raw_data_path' should also be specified.
This pipeline enables different ways to import CellrangerV2/CellrangerV3 for flexibility.

 The current supported QC algorithms including doublet dection (bcds, cxds, cxds_bcds_hybrid, doubletFinder, doubletCells and scrublet), decontamination (decontX), emptyDrop detection (emptyDrops) and barcodeRankDrops (barcodeRanks). An example of QC parameters yaml file is shown below:
Params: ### should not be omitted
bcds:
ntop: 600
cxds:
ntop: 600
cxds_bcds_hybrid:
nTop: 600
decontX:
maxIter: 600
emptyDrops:
lower: 50
niters: 5000
testAmbient: True
barcodeRanks:
lower: 50
The format of yaml file can be found here. The parameters should be consistent with the parameters of each QC function in singleCellTK package. Parameters that are not defined in this yaml file will use the default value.
Quantifying the level of gene sets can be useful quality control. For example, the percentage of counts from mitochondrial genes can be an indicator or cell stress or death.
Users can pass a GMT file to the pipeline with one row for each gene set. The first column should be the name of the gene set (e.g. mito). The second column for each gene set in the GMT file (i.e. the description) should contain the location of where to look for the matching IDs in the data. If set to ‘rownames’, then the gene set IDs will be matched with the row IDs of the data matrix. If a character string or an integer index is supplied, then gene set IDs will be matched to IDs the that column of feature table.
The output directory is created under the path specified by -o/–directory argument. Each sample is stoed in the subdirectory (named by -s/–sample argument) within this output direcotry. Within each sample directory, the each output format will be separated into subdirectories. The output file hierarchy is shown below:
(root; output directory)
├── level3Meta.csv
├── level4Meta.csv
└── sample1
├── R
| ├── sample1_Droplets.rds
| └── sample1_Cells.rds
├── Python
| ├── Droplets
| | └── sample1.h5ad
| └── Cells
| └── sample1.h5ad
├── FlatFile
| ├── Droplets
| | ├── assays
| | | └── sample1_counts.mtx.gz
| | ├── metadata
| | | └── sample1_metadata.rds
| | ├── sample1_colData.txt.gz
| | └── sample1_rowData.txt.gz
| └── Cells
| ├── assays
| | └── sample1_counts.mtx.gz
| ├── metadata
| | └── sample1_metadata.rds
| ├── reducedDims
| | ├──sample1_decontX_UMAP.txt.gz
| | ├──sample1_scrublet_TSNE.txt.gz
| | └──sample1_scrublet_UMAP.txt.gz
| ├── sample1_colData.txt.gz
| └── sample1_rowData.txt.gz
└── sample1_QCparameters.yaml
singleCellTK is available to use with both Docker and Singularity. This container be used as a portal to the singleCellTK command line interface. The work was done in R. The singleCellTK docker image is available from Docker Hub.
If you have not used docker before, you can follow the instruction to install and set up docker in Windows, Mac or Linux.
The Docker image can be obtained by running:
docker pull campbio/sctk_qc
Noted that the transcriptome data and GMT file needed to be accessible to the container via mounted volume. In the below example, mount is created for the input and output directory using argument -v. Here is an example code to perform quanlity control of CellRangerV3 data singleCellTK docker:
docker run --rm -v /path/to/data:/SCTK_docker \
-it campbio/sctk_qc:1.7.5 \
-b /SCTK_docker/cellranger \
-P CellRangerV3 \
-s pbmc_100x100 \
-o /SCTK_docker/result/tenx_v3_pbmc \
-g /SCTK_docker/mitochondrial_human_symbol.gmt \
-S TRUE \
-F R,Python,Flatfile,HTAN
The usage of each argument is the same as the original command line interface. To learn more about mounted volumes, please check out this post.
The Singulatiry image can easily be built using Docker Hub as a source:
singularity pull docker://campbio/sctk_qc:1.7.5
The usage of singleCellTK Singularity image is very similar to that of Docker. In Singularity 3.0+, the mount volume is automatically overlaid. However, you can use argument –bind/-B to specify your own mount volume. The example is shown as below:
singularity run sctk_qc_1.7.5.sif \
-b ./cellranger \
-P CellRangerV3 \
-s pbmc_100x100 \
-o ./result/tenx_v3_pbmc \
-g ./mitochondrial_human_symbol.gmt
The code above assumed that the dataset is in your current directory, which is automatically mounted by Singularity. If you run Singularity image on BU SCC，it’s recommended to re-set the home directory to mount. Otherwise, the container will load libraries in the SCC shared libraries, which might cause some conflicts. You can point to some “sanitized home” using argument -H/–home. Also, you might want to specify cpu architecture when run the docker on BU SCC using #$ -l cpu_arch=broadwell|haswell|skylake|cascadelake. Because the python packages are compiled by SIMD instructions that are only available on these two cpu architectures.


Kill protection to prevent accidentally killing yourself in long maps
Save a game in team using /save password (by HMH)
How to use the new timeout protection:
If you have DDNet client, after a timeout, you will automatically be reconnected to your tee when you rejoin. If it doesn't work, wait a bit more (100 seconds) and rejoin server.
If you don't have DDNet client you can still use timeout protection, by typing /timeout MYSECRETCODE every time you join a DDNet server.  For example /map adr3 for Adrenaline 3 The first character has to be the first in the map name, all others following somewhere in that order. In our case the map has to start with 'a' and contain 'd', 'r', and '3' in that order. To leave out the first character use % like this: /map %castle to vote for Out of Castle
Solo prediction (Thanks to HMH)
AFK players close their eyes
64 player server (initial work by eeeee, get DDNet client to see all)
/dnd to disable global chat and server messages
/mapinfo to find out how many points finishing a map will give you
/lock to lock your team
Keep conversing with whispers by using /converse (short: /c) or binding it
/rankteam and /top5team: When you play in a team your team will get a team rank.


In JavaScript, arrays use numbered indexes.
In JavaScript, objects use named indexes.
Arrays are a special kind of objects, with numbered indexes.
There is no need to use the JavaScript's built-in array constructor new Array().
Use [] instead.
These two different statements both create a new empty array named points:
var points = new Array();
// Bad
var points = [];
// Good
These two different statements both create a new array containing 6 numbers:
The new keyword only complicates the code. It can also produce some unexpected results:
var points = new Array(40, 100);
// Creates an array with two elements (40 and 100)
What if I remove one of the elements?
A common question is: How do I know if a variable is an array?
The problem is that the JavaScript operator typeof returns "object":
The typeof operator returns object because a JavaScript array is an object.
To solve this problem ECMAScript 5 defines a new method Array.isArray():
The problem with this solution is that ECMAScript 5 is not supported in older browsers.
To solve this problem you can create your own isArray() function:
The function above always returns true if the argument is an array.
Or more precisely: it returns true if the object prototype contains the word "Array".
The instanceof operator returns true if an object is created by a given constructor:


Races
Races are the various humanoid species that exist in the world presented to you by your GM.
The race you select for your character indicates the general size, shape, and appearance of your character.
Each Race has different modifiers that alter the stats of your character, such as their physical abilities and speed.
Take note of what stats are altered so that you can record them on your Character Sheet.


RT @courtneynash: Incredulous @cwoodcox: "You don't solder?" Audience member: "It's a hardware problem!" #mwrc
4/4/2013, 2:04:10 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @courtneynash: Incredulous @cwoodcox: "You don't solder?" Audience member: "It's a hardware problem!" #mwrc
4/4/2013, 2:04:10 PM
Favs: 0
Retweets: 0
link


This article describes how to secure an application using Spring security OAuth2 generation-one. The sample consists of an Angular front-end application and a couple of Spring boot based backend services. Both front-end application and backend services are behind an edge proxy that assumes the responsibility to authenticate and authorize a user. Spring Cloud common services such as spring cloud configuration and spring cloud Eureka registry services are used.
Architecture
All components are behind an edge proxy service. Spring Cloud Zuul is used as the edge service. A user launches the application using a route to a landing index page of the front-end UI application. The front-end UI is implemented as an Angular-based separate project that compiled and packaged into a spring-boot application. The front-end UI application reaches out to a backend reservations service through an edge proxy. The reservations service in turn seeks flights information by routing via the edge proxy to another backend flights data service. While the detail implementation of the business logic is not important, the sample illustrates how to use OAuth2 (Authorization grant) method to secure the application.
This architecture enables us to have the following:
1- Communications between all modules to go through an edge-proxy service to centrally manage security, logging and other common concerns
2- Use of authentication token relay between edge-proxy service and front-end UI application
3- Use of Spring Feign to communicate between the two backend services
4- Use of a Feign intercepter to inject authentication token when communicating to a downstream backend Flights data service.
Services Configuration
Spring Cloud Config Server is used to externalize configurations of the different modules in the application. For easy launching, the configuration server launches with a native profile to leverage a local backend storage to keep the “yml” properties files (please change any hard-coded path).
With appropriate dependencies, you can create a configuration server as a regular spring boot application by enabling the server with “@EnableConfigServer” annotation.
@SpringBootApplication
@EnableConfigServer
public class ConfigServerApp {
public static void main(String[] args) {
SpringApplication.run(ConfigServerApp.class, args);
}
}
One can start the configuration server with the following settings:
spring:
profiles: native
cloud:
config:
server:
native:
searchLocations: file:///[path-to-yml-files]
As in this sample, you can keep all the “yml” configuration files in some local storage path:
Each configuration file is named after the name of the corresponding configured application and as defined by “spring.application.name” property in that application.
This application name and the configuration service’s URL are defined in each application’s “bootstrap.yml” file inside the “resources” folder. For instance, the flights data service would have a “bootstrap.yml” file with a content such as:
spring:
application:
name: flights-service
cloud:
config:
fail-fast: true
uri: http://localhost:8888
Services Registration and Discovery
Spring Cloud Eureka is used for services registration and discovery. It is also created with its appropriate dependency as a regular spring boot application. We only need to annotate the application class with “@EnableEurekaServer”
@SpringBootApplication
@EnableEurekaServer
public class RegistryServerApp {
public static void main(String[] args) {
SpringApplication.run(RegistryServerApp.class, args);
}
}
and set it such that it would not register itself.
eureka:
client:
register-with-eureka: false
fetch-registry: false
OAuth2 Authorization Server
Creating an OAuth2 authorization server is simple using Spring security and OAuth2 dependencies
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
</dependency>
As listed in the repo, a configuration class is added with “@EnableAuthorizationServer” annotation.
@Configuration
@EnableAuthorizationServer
public class AuthorizationServer extends AuthorizationServerConfigurerAdapter {
...
}
A client in this class is defined with Id as “acme”, secret as “acmesecret”, different grant types and scopes as “openid”. You can optionally set the scopes auto-approval.
To enable resource servers (backend services) to decode the authorization tokens, this server exposes a “../user” endpoint that exposes an authenticated principal.
As configured, users authenticate using a login form mechanism
@Configuration
public class WebSecurity extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.anyRequest().authenticated()
.and()
.formLogin().permitAll();
}
}
Although its also appropriate to apply an “Implicit” OAuth2 flow in single page applications, in this illustration example, we will be exercising OAuth2 “authorization_code” flow.
Front-End UI Application
UI application is implemented using Angular (6). A simple spring boot project is also created to serve the client UI application. In order to build the Angular module into the spring boot project, a maven plugin is used to run “ng build” command during the “validate” stage and direct the output to the spring boot “resources” folder.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>{version}</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>ng</executable>
<workingDirectory>../agency-ui</workingDirectory>
<arguments>
<argument>build</argument>
<argument>--output-path</argument>
<argument>../agency-frontend/src/main/resources/static</argument>
</arguments>
</configuration>
</plugin>
This UI client application represents one of the secured resources behind the edge proxy, it also registered in Eureka to be discovered and routed by the proxy. Therefore, a configuration class marked with “@EnableResourceServer” annotation is added to authorize access to the client application while allowing some of its “actuator” administration endpoints that are needed by Eureka’s health checking.
@Configuration
@EnableResourceServer
public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
@Override
public void configure(HttpSecurity http) throws Exception {
http
.requestMatcher(new RequestHeaderRequestMatcher("Authorization"))
.authorizeRequests()
.antMatchers("/admin/info", "/admin/health/**").permitAll() // allow actuator endpoints
.anyRequest().authenticated();
}
}
Resource Servers / Back-End Services
There are two resource servers as backend services. A reservation service that helps to search flights, perform booking and issue confirmations. In order to perform its function, this service utilizes a downstream flights service that only acts as data-as-a-service to retrieve information from a database of flights information.
The reservation service uses Spring Cloud Feign as a client to interact with the flights data service.
Flights data service
Flights data service is implemented using Spring Data to retrieve flights information from a backend database (H2). Spring Data Rest is used to expose Flight search results. One can search a flight passing in an origin airport, destination airport, besides travel and return dates.
@RepositoryRestResource(collectionResourceRel = "flights", path = "flights")
public interface FlightRepository extends PagingAndSortingRepository<Flight, Long> {
@RestResource(path = "datedlegs", rel = "datedlegs")
@Query("SELECT f FROM Flight f WHERE f.origin = ?1 AND f.destination = ?2 "
+ " AND f.departure between ?3 and ?4")
public List<Flight> findFlightsByCustomQueryDated(@Param("origin") String origin,
@Param("destination") String destination,
@Param("mindate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date mindate,
@Param("maxdate") @DateTimeFormat(pattern = "yyyy-MM-dd") Date maxdate);
...
}
This service is also an OAuth2 secured resource server that includes same OAuth2 dependencies and “ResourceServerConfig” configuration class as in the Client application.
Reservations service
The reservation class is a Spring Boot application that exposes “/search” and “/book” endpoints in a RestController. As a secured OAuth2 resource server, this service includes same OAuth2 dependencies and “ResourceServerConfig” configuration class as in the Client application.
To pass the authorization token of an authenticated client downstream when using a Feign client, this service includes a “RequestInterceptor” to inject the token in a header of the “RequestTemplate”.
@Component
public class FlightClientInterceptor implements RequestInterceptor {
private static final String AUTHORIZATION_HEADER = "Authorization";
private static final String BEARER_TOKEN_TYPE = "Bearer";
@Override
public void apply(RequestTemplate template) {
SecurityContext securityContext = SecurityContextHolder.getContext();
Authentication authentication = securityContext.getAuthentication();
if (authentication != null && authentication.getDetails() instanceof OAuth2AuthenticationDetails) {
OAuth2AuthenticationDetails details = (OAuth2AuthenticationDetails) authentication.getDetails();
template.header(AUTHORIZATION_HEADER, String.format("%s %s", BEARER_TOKEN_TYPE, details.getTokenValue()));
}
}
}
Edge Proxy
Spring Cloud Zuul is used to implement the edge proxy. All access to backend services including the client application itself would go through this proxy.
The application’s main class is marked with “@EnableZuulProxy” and OAuth2 Single Sign-On “@EnableOAuth2Sso” annotations.
Single Sign On feature is
@SpringBootApplication
@EnableZuulProxy
@EnableOAuth2Sso
public class GatewayApp {
...
}
Routes are defined for this application as shown below. The server is exposed with port 8080, default URL “http://localhost:8080” would route to the UI client application index page. Routes to other two backend reservations and flights services are also configured.
zuul:
ignoredServices: '*'
routes:
flights:
path: /flights/**
serviceId: FLIGHTS-SERVICE
reservations:
path: /reservations/**
serviceId: RESERVATIONS-SERVICE
ui:
path: /**
url: AGENCY-FRONTEND
Token relay feature to other proxied services is used, to enable that we need to include this dependency:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-security</artifactId>
</dependency>
Testing
Unit and integration tests were written on the backend services. Different spring boot test slices were used, such as the one to test the backend database repositories teir using @DataJpaTest
annotation, and any middle orchestrating service class or components using just a Mockito test runner. As the backend services depend on external services such as a configuration and registration services, these tests were disabled from such dependencies by annotating the test classes with:
@TestPropertySource(properties = {
"spring.cloud.config.enabled=false",
"eureka.client.register-with-eureka=false",
"eureka.client.fetch-registry=false"
})
What gets interesting is when testing the MVC layer because of the OAuth2 security enablement. Spring Security offers new annotations to mock an authenticated user (see the documentation). You can easily test a secured application by mocking a user with specified username and authorities. However, to account for having a mocked OAuth2 token, you may need to build an OAuth2Authentication token type in the application’s security context. Spring security test framework can help you with creating such token by implementating the factory interface org.springframework.security.test.context.support.WithSecurityContextFactory
. With this security context factory you can synthesize a token from an identified subject data that could be provided by a demarcating annotation.
Let’s call this demarcating security subject annotation “WithOAuthSubject”, it could include a dummy subject ID and its defintion may look like:
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@WithSecurityContext(factory = WithOAuthSubjectSecurityContextFactory.class)
public @interface WithOAuthSubject {
String[] scopes() default {"openid"};
String subjectId() default "a1de7cc9-1b3a-4ecd-96fa-dab6059ccf6f";
}
The processing security context factory WithOAuthSubjectSecurityContextFactory
uses this annotation data, builds an OAuth2 authentication token and sets that into the security context.
public class WithOAuthSubjectSecurityContextFactory implements WithSecurityContextFactory<WithOAuthSubject> {
private DefaultAccessTokenConverter defaultAccessTokenConverter = new DefaultAccessTokenConverter();
@Override
public SecurityContext createSecurityContext(WithOAuthSubject withOAuthSubject) {
SecurityContext context = SecurityContextHolder.createEmptyContext();
// some mocked token claims as of from a provider, for example please refer to the code sample
Map<String, ?> remoteToken = ...
OAuth2Authentication authentication = defaultAccessTokenConverter.extractAuthentication(remoteToken);
context.setAuthentication(authentication);
return context;
}
}
You need also to setup your tests to configure OAuth2 security, enabling OAuth2 client and resource server, if needed you can also enable OAuth2 method security:
@Configuration
@EnableOAuth2Client
@EnableResourceServer
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class MySecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("/v1/**").authenticated();
}
}
This configuration can be included with “OAuth2AutoConfiguration” to enable OAuth2 autoconfiguration:
@TestConfiguration
@Import({MySecurityConfig.class, OAuth2AutoConfiguration.class})
public class SecurityTestConfig { }
With that you can test the MVC slice starting with some setup to enable MVC test, import the above OAuth2 security autoconfiguration (along with the custom OAuth2 adapter), and disable to depend on any
external services (configuration and registration services). You can utilize a mocked bean of a ResourceServerTokenServices
to load a token from the security context.
@RunWith(SpringRunner.class)
@WebMvcTest(ReservationController.class)
@Import(SecurityTestConfig.class)
@TestPropertySource(properties = {
"spring.cloud.config.enabled=false",
"eureka.client.register-with-eureka=false",
"eureka.client.fetch-registry=false"
})
public class ReservationControllerTest {
@Autowired
MockMvc mockMvc;
@MockBean
public ResourceServerTokenServices resourceServerTokenServices;
@Before
public void setup() {
// Stub the remote call that loads the authentication object
when(resourceServerTokenServices.loadAuthentication(anyString()))
.thenAnswer(invocation -> SecurityContextHolder.getContext().getAuthentication());
}
...
}
To run any test, annotate the method with @WithOAuthSubject
and do not forget to set a header on the mockMvc object with “Authorization” header that includes a dummy bearer token.
@Test
@WithOAuthSubject
public void testMethod() throws Exception {
mockMvc.perform(..url..).header(AUTHORIZATION, "Bearer foo"))
.andExpect(...)
....
;
}
Application Flow
After launching all the applications in this example
When accessing http://localhost:8080, you will be directed to a login screen to authenticate. Use username as “user”, password as “password”
You will then be asked to authorize the scope, click on “Approve”
After approving the scope you will be landed at the application’s homepage
You can search flights from “AUS” to “IAH” airports, traveling 5/5/2018 and returning 5/22/2018
Code Repository
Please reference this example’s code in its GitHub repository.


| 1 |
model |
number |
china |
tracing |
days |
mers-cov |
social |
imported |
SARS |
influenza |
asymptomatic |
screening |
school |
traffic |
measles |
| 2 |
peak |
reproduction |
wuhan |
contact |
interval |
household |
distancing |
transmission |
hong |
pandemic |
passengers |
airport |
closures |
zika |
ebola |
| 3 |
deaths |
R0 |
2020 |
contact tracing |
incubation |
middle |
social distancing |
risk |
kong |
2009 |
infections |
entry |
school closures |
masks |
fractional-dose |
| 4 |
intervention |
cases |
2019 |
infectious |
period |
contacts |
COVID-19 |
importation |
acute respiratory syndrome |
H1N1 |
ship |
dengue |
school closure |
blockage |
RSV |
| 5 |
strategy |
outbreak |
coronavirus |
diseases |
95 |
MERS |
march |
human-to-human |
hong kong |
antiviral |
infection |
international |
closure |
lock-down |
vaccination |
| 6 |
strategies |
model |
COVID-19 |
public |
serial |
east |
mobility |
local |
respiratory |
prophylaxis |
testing |
travelers |
schools |
sick |
vaccine |
| 7 |
mitigation |
reproductive |
january |
health |
% |
patient |
growth |
surveillance |
quarantine |
pandemic influenza |
carriers |
arrival |
absenteeism |
social-distancing |
sexual |
| 8 |
lockdown |
estimate |
travel |
outbreaks |
serial interval |
attack |
physical |
cases |
2003 |
influenza pandemic |
cruise |
travel |
children |
theoretical |
VE |
| 9 |
reduce |
method |
cities |
contacts |
CI |
index |
states |
countries |
severe |
closure |
princess |
fever |
health-care |
zika virus |
elimination |
| 10 |
interventions |
numbers |
february |
disease |
onset |
hospital |
australia |
singapore |
syndrome |
pandemics |
covid-19 infections |
entry screening |
child |
mask |
hospitalisation |
| 11 |
population |
reproductive number |
cases |
monitoring |
median |
respiratory |
patterns |
network |
acute |
drugs |
crew |
airports |
workers |
public |
2016 |
| 12 |
capacity |
R(0 |
mainland |
isolation |
estimated |
secondary |
united |
viral |
hospitals |
influenza transmission |
fraction |
traveller |
obligations |
notification |
west |
| 13 |
testing |
basic |
2019-ncov |
infectious diseases |
cri |
case |
measures |
detection |
outbreak |
viruses |
symptomatic |
border |
child care |
york |
sierra leone |
| 14 |
simulation |
estimates |
province |
norovirus |
longer |
attack rate |
italy |
routes |
community |
strain |
undocumented |
program |
HFMD |
tests |
lagos |
| 15 |
economic |
control |
hubei |
infectious disease |
symptom |
household contacts |
physical distancing |
sources |
sars-cov |
nations |
people |
detecting |
workplace |
americas |
HIV-1 |
| 16 |
suppression |
simple |
coronavirus disease 2019 |
residents |
distribution |
% |
united states |
locally |
isolation |
BACKGROUND |
diamond |
travellers |
activities |
long-run |
sierra |
| 17 |
non-pharmaceutical |
1 |
mainland china |
individuals |
periods |
index case |
decisions |
linked |
warning |
1918 |
documented |
taipei |
mortality |
relaxation |
palm |
| 18 |
system |
transmissibility |
rt |
emerging |
time |
households |
countries |
outbreak |
lessons |
antiviral drugs |
family members |
air |
% |
control |
leone |
| 19 |
parameters |
initial |
reported |
traced |
- |
patients |
governments |
premises |
points |
METHODS |
aboard |
PI |
child-care |
facial |
campaign |
| 20 |
million |
epidemic |
confirmed |
active |
cases |
2015 |
policies |
clusters |
loss |
MG |
virus |
AHC |
force |
awareness |
ebola virus disease |
| 21 |
healthcare |
epidemics |
sars-cov-2 |
response |
demographic |
identified |
gatherings |
probability |
authors |
household quarantine |
COVID-19 |
sensitisation |
workforce |
cattle |
sap |
| 22 |
ICU |
rate |
december |
control |
credible |
epidemiologic |
slow |
transmissions |
isolation-and-quarantine |
A/H1N1 |
carry |
global spread |
worker |
RSC |
locally-acquired |
| 23 |
beds |
average |
chinese |
smallpox |
shorter |
clinical |
implementation |
spread |
admission |
peak absenteeism |
washington |
exit |
healthcare |
cuba |
dose |
| 24 |
isolation |
infection |
local |
active monitoring |
exposure |
cases |
unlock |
investigation |
early |
holidays |
general |
borders |
work-related |
usage |
fractionation |
| 25 |
scenario |
secondary cases |
jan |
pathogen |
pairs |
confirmed |
flattening |
connectivity |
suspected |
avian |
crew members |
exit screening |
labor |
blockage factor |
fractional-dose vaccines |
| 26 |
care |
total |
exported |
public health |
onset to |
close |
questions |
phase |
affected |
border closure |
general public |
in-flight |
mortality rate |
games |
YF |
| 27 |
measures |
size |
23 |
settings |
intervals |
cluster |
mitigate |
heterogeneity |
toronto |
administration |
question |
source region |
adults |
summer |
IAR |
| 28 |
increases |
time |
hubei province |
persons |
confidence interval |
middle east respiratory syndrome coronavirus |
context |
market |
patients |
holiday |
sars-cov-2 |
in-flight transmission |
review |
strict |
yunnan |
| 29 |
april |
observed |
restrictions |
ring |
study |
syndrome |
kingdom |
locations |
singapore |
plans |
serological |
airline |
biosafety |
burden |
angola |
| 30 |
non-pharmaceutical interventions |
estimated |
epidemic |
ring vaccination |
countermeasures |
illness |
surveys |
zoonotic |
organization |
mechanisms |
random testing |
arriving |
closings |
eradication |
RTLS |
| 31 |
individuals |
VEC |
provinces |
vaccination |
28 |
middle east respiratory syndrome |
policy |
excluded |
health |
island |
random |
infected |
unplanned |
continued |
kinshasa |
| 32 |
rates |
stage |
data |
case isolation |
infectivity |
korea |
current |
HPDI |
sars virus |
RESULTS |
adoption |
global |
primary schools |
low |
five-fold |
| 33 |
people |
onset |
funding |
learning |
day |
household members |
growth rate |
viral load |
yielded |
SUPPLEMENTARY |
risk |
passengers |
healthcare workers |
new york state |
RSV-ARI |
| 34 |
demand |
susceptible |
number |
disease transmission |
methods |
2013 |
closing |
density |
precautions |
influenza viruses |
% |
airport screening |
home |
mosquito control |
spatio-temporal |
| 35 |
npis |
values |
% |
nursing |
estimate |
hospitalized |
stations |
ZIKV |
ridership |
authorized |
frontliners |
airport fever |
15·0 |
theoretical model |
liberia |
| 36 |
long |
lower |
estimated |
diarrhea |
consistent |
cohort |
mobility patterns |
modes |
2002 |
TAP |
cruise ship |
infrared |
laboratories |
new york |
funeral |
| 37 |
effectiveness |
results |
ban |
tuberculosis |
2.2 |
risk factors |
interaction |
analysis |
onset of |
household-based |
members |
sensitivity |
health-care workers |
stronger |
guinea |
| 38 |
immunity |
process |
spread |
high risk |
percentile |
generations |
interventions |
case |
measures |
online version |
hepatitis |
thermal |
2·0 |
500 |
pertussis |
| 39 |
resources |
fatalities |
chinese cities |
transmission |
subset |
superspreading |
impact |
global |
rest |
stockpile |
H3N2 |
keelung |
national level |
BVD |
length of stay |
| 40 |
result |
transmission |
transmission |
infected |
information |
rate |
world |
data |
hypothesis |
border |
iceland |
border screening |
parental |
epidemic |
africa |
| 41 |
epidemic |
population |
internationally |
effective |
credible interval |
arabia |
statewide |
indirect |
vietnam |
studies |
protected |
screen |
institutional |
test |
exposures |
| 42 |
lockdowns |
measures |
acute respiratory syndrome coronavirus 2 |
systematic |
ascertainment |
visited |
matrices |
hadv-7 |
animal |
CONCLUSIONS |
disembarked |
temperature |
sector |
end |
stay |
| 43 |
COVID-19 |
preventive |
dec |
challenges |
tianjin |
link |
united kingdom |
case detection |
sses |
restraint |
reopen |
hazard |
opening |
reporting |
yunnan province |
| 44 |
pandemic |
early |
case |
case |
truncation |
saudi arabia |
western |
WGS |
events |
neuraminidase |
sars-cov2 |
park |
non-essential businesses |
nationwide |
cutoff |
| 45 |
wave |
point |
disease |
vomited |
symptoms |
transmission |
covid-19 coronavirus |
high |
outbreaks |
christmas |
treatments |
thermoscanners |
care |
federal states |
EMR |
| 46 |
beginning |
implications |
early |
procedure |
secondary |
epidemiological |
political |
case counts |
hygienic |
new zealand |
sars-cov-2 infections |
° |
0 |
captured |
efficacy |
| 47 |
effective |
declined |
coronavirus disease |
agencies |
standard deviation |
10,000 |
european countries |
spot |
respiratory viruses |
case-study |
confined |
spread |
health-care worker |
antibody testing |
< |
| 48 |
allowing |
data |
case definition |
vomit |
sample |
inpatients |
data |
horse |
nosocomial infections |
triggered |
experts |
restrictions |
singaporean |
argue |
ART |
| 49 |
bed |
discussion |
outbreak |
phtrs |
demographic characteristics |
H7N9 |
public |
training |
super |
weekends |
social protection |
= |
labour |
camps |
recrudescence |
| 50 |
infections |
% |
control |
illustrate |
right truncation |
serum |
lockdown |
capacity |
delay-time |
weekend |
detected |
% |
space-time |
refugees |
emergency |


SocialCount Examples
Medium (Default)
Small
Large
Markup Generator
Medium (Default)
Like
Tweet
+1
with Facebook Recommend
Recommend
Tweet
+1
with Counts
Like
Tweet
+1
Small
Large
with Facebook Recommend
Like
Tweet
+1
with Narrow Container Width and Counts
Recommend
Tweet
+1
Markup Generator
URL
Size
Small
Default
Large
Facebook
Like
Recommend
Fetch Share Counts
Include Icons


Tadhg O'Halloran Photography
Home
Projects
Of Itself
For Itself
About
Contact
Of Itself
Copyright © 2016 Gavin O'Neill


Created: January 2013
By: Swift Ideas
Support: http://support.swiftpsd.com
Thank you for purchasing Pinpoint. If you have any questions that aren't covered in the documentation, then please feel free to email via our user page contact form here. Thanks again!
This theme requires a working version of WordPress to already be installed on your server. If you need to install WordPress then please visit: http://wordpress.org/download/. If you need any help with the installation, please refer to this guide: http://codex.wordpress.org/Installing_WordPress.
The theme files need to be uploaded before you can activate the theme for use. There are two ways you can do this, FTP upload or WordPress upload.
If you are uploading via FTP upload, then you need to upload the unzipped folder “pinpoint” to the /wp-content/themes folder of your WordPress installation.
If you are uploading via WordPress upload, then navigate within the WordPress admin area to Appearance > Add New Themes > Upload. Select the zipped file “pinpoint.zip” and then hit Install Now.
Once you have uploaded the theme, you need to activate it by going to Appearance > Themes, and activate “Pinpoint”.
Both the theme content and theme options have been provided so that you can set up the theme to look exactly like the demo in a few minutes. You can find the main demo XML file, along with the demo content XML files for each of the example sites in the main download folder. This XML file is to use through the WordPress import tool, which can be found in Tools > Import > WordPress. Follow the steps to import the demo content and leave the final page to load with a confirmation that the content has been imported successfully (this may take some time).
Once you have imported the demo content XML, you will still need to set the home page by going to Settings > Reading, and also select the menu in Appearance > Menus.
The theme options text file is to copy and paste the contents into the box provided within Pinpoint Options, under the Import/Export sub-menu.
If you have any issues with the import, i.e. any errors, then please contact your hosting to increase your php memory upload limit before contacting our support for help.
You can change the theme’s logo by accessing the Pinpoint Options and uploading your logo with the uploader under the “Header Options” section.
There are also logo spacing controls if you would like to manually add padding the logo area.
The Posts menu option on the left is where you add blog posts. To add a new blog post, select the Posts > Add New option from the left hand WordPress menu.
You will then be able to set a title for the blog post, add the body content, and also provide all the meta information such as extra details and media. In the blog meta you can set the image for the thumbnail, and also the media type for the detail page.
You can use the Swift Page Builder to create the content of the item, which effectively allows you to have limitless possibilities for what you can display, and also how you can display it. If you do use the Page Builder to create the content, you will want to provide a custom excerpt (can be found in the item meta).
To display your blog posts, you will then need to create a page that includes the "Blog" or "Recent Posts" page builder asset. The blog asset has the following options included, allowing you to customise the output to your liking:
NOTE: DO NOT set the posts page in Settings > Reading, as this will force your page to show the standard layout, and not follow your created page.
The Portfolio menu option on the left is where you add Portfolio items. To add a new portfolio item, select the Portfolio > Add New option from the left hand WordPress menu.
You will then be able to set a title for the portfolio item, add the body content, and also provide all the meta information such as extra details and media. In the portfolio meta you can set the image for the thumbnail, and also the media type for the detail page.
You can add categories for each portfolio item's which act as the filters in the filtering system, and also a way to create multiple portfolio pages. You can have subcategories for filtering on a category Portfolio page, so none of the functionality is lost. When setting up categories, it is important that you name the slugs correctly. The slug of each category should be the same as the name, but all lowercase. If the category name contains spaces, then these should be represented in the slug with a '-'.
You can use the Swift Page Builder to create the content of the item, which effectively allows you to have limitless possibilities for what you can display, and also how you can display it. If you do use the Page Builder to create the content, you will want to provide a custom excerpt (can be found in the item meta).
To display your portfolio items, you will then need to create a page that includes the "Portfolio" page builder asset. The portfolio asset has the following options included, allowing you to customise the output to your liking:
The Showcase menu option on the left is where you add Showcase Slides. To add a new slide, select the Showcase > Add New option from the left hand WordPress menu.
The slide image is taken from the Featured Image for the slide, so make sure you attach a featured image.
If you would like to add a link to the slide, then enter a link into the "Slide Link" field.
The Sliders menu option on the left is where you add slides to create groups of sliders which you can then use wherever you like within your content. To add a new slider, select the Sliders > Slide Groups option from the left hand WordPress menu. Here you can add a new group, where each group is taken as an individual slider.
You can then go to Sliders > Add New Slide. To create a slide you will want to follow the following steps:
To display a slider in the content of posts or pages, you will find that we have conveniently added a new tab in the "Add Media" popup window tited "Sliders". Inside this tab, you can setup your slider with settings specific to the type of slider selected, as well as override any of the "Advanced Settings" specified on the main "Settings" screen. To add a slider, please use the following steps:
NOTE: To add a slider in a Page Builder page, just insert a text block to the size you want it to be on the page, then add the slider to the content of that text block.
The Team menu option on the left is where you add team members. To add a new team member, select the Team > Add New option from the left hand WordPress menu.
You will then be able to provide all the details for the team member through the team member meta box.
To show your team members, you will need to create a page that includes either the "Team" or "Team Carousel" page builder assets.
The Clients menu option on the left is where you add clients. To add a new client, select the Clients > Add New option from the left hand WordPress menu.
You will then be able to provide an image for the client, and a link if you'd like through the client meta box.
To display your clients, you will then need to create a page that includes the "Clients" page builder asset.
The Testimonials menu option on the left is where you add testimonials. To add a new testimonial, select the Testimonials > Add New option from the left hand WordPress menu.
You will then be able to provide the testimonial in the post content, and then the testimonial cite in the testimonial meta box.
To display your testimonials, you will then need to create a page that includes the "Testimonails" page builder asset.
The Jobs menu option on the left is where you add job listings. To add a new job listing, select the Jobs > Add New option from the left hand WordPress menu.
You will then be able to enter the content for the job in the post content editor.
To display your job listings, you will then need to create a page that includes either the "Jobs" or "Jobs Overview" page builder asset.
The FAQS menu option on the left is where you add faqs. To add a new faq, select the FAQs > Add New option from the left hand WordPress menu.
You will then be able to enter the question (the title of the faq), and the answer in the the post content editor. You will also need to add a topic for each faq.
To display your faqs, you will then need to create a page that includes the "FAQs" page builder asset.
There are up to 12 widget areas that can be viewed under the Appearance > Widgets menu, eight sidebar areas, and four footer column widget areas. You can select which sidebars appear on the page through the page/post editor. The number of footer sidebars depends on the footer setup that you choose within Pinpoint Options.
The Swift Page Builder (SPB) allows you to create unique and amazing pages, exactly the way you want them! The SPB is powered by shortcodes, which are embedded when you select the content elements you want, and edit them. You can see the source by going back to the classic editor, although you shouldn't ever need to do this and you should only make changes to this if you know what you're doing.
To add a content element to the page, all you need to do is drag the element from the dropdown into the content area, or simply click on it to have it added automatically. You can then edit the column width (on applicable elements) by pressing the left/right arrows in the top left of the content element, and also edit the asset (the pencil), duplicate the element, or delete the element.
When you click on the edit button, you will be given the option of specifying a number of parameters based on the content element. Below is a screenshot from the edit screen of the Portfolio content element. As you can see there are a wide number of options for you to choose from.
The SPB includes a Blank Spacer element, which allows you to add spacing in between your content elements, to suit your needs. We decided on making this user controlled, so that there is never a case where you don't have the spacing you need.
Please watch the video below to get an idea of how to use the Page Builder:
The color customizer can be accessed by pressing the "Color Customizer" button within the WordPress admin bar, or through the Appearance > Themes menu. From the color customizer you can preview the themes color/skin changes as you make them.
The theme options can be used to customise the theme to suit your needs, including backgrounds, layouts and much more. You should take the time to go through all of these options to ensure that you are getting the most out of the theme.
Default - This page template is the default page template, which can be set up to display in various configurations through the page meta options, and you can either add content via the standard WordPress editor, or through the Swift Page Builder.
Full Width Showcase (Rev Slider) - This page template is exactly the same as the default page template, except it has a fixed full width slider at the top of the page. This template is ideal for use with the full width layout. You will need to enter the alias for the Revolution Slider that you'd like to use in the meta below the content editor.
The theme includes the premium plugin - Revolution Slider. You can find documentation for this included within the Documentation > Revolution Slider Documentation folder.
Flickr - This flickr widget shows off your flickr photos. You can get the required API Key from this link: http://www.flickr.com/services/api/misc.api_keys.html.
Twitter - The Twitter widget displays a number of your latest tweets. You can specify parameters such as username, number of tweets to display, refresh time, and date display.
Video - The Video widget embeds a video from a url that you enter into the input field within the widget options. You can find out what type of video you can embed here.
Pinpoint includes the Swift Framework Shortcode Generator, which is a custom built feature for our themes. The generator allows you to embed shortcodes within your content quickly without having to remember the syntax. The generator allows you to select the type from the list, and provide parameters (if needed).
You can find the shortcode generator within the WordPress WYSIWYG editor. The button looks like this:
Pinpoint is 100% translation and multi-lingual ready, and we recommend that you use the very popular WPML plugin.
To translate the static strings, if you aren't using WPML then I recommend downloading PO Edit, from http://www.poedit.net/. Once you have installed please follow the steps below:
We have provided compatibility pre-built into Pinpoint for WooCommerce. There is a special sidebar for the WooCommerce pages in Appearance > Widgets, that appears only on WooCommerce pages.
You will need to edit and save each of the individual WooCommerce pages to get the page headings to work.
You can change the login logo by replacing the image in the theme’s /images/ folder. The image is named “custom-login-logo.png”. You can replace it by uploading the image via your chosen method (e.g. FTP). You can also replace this image through the Pinpoint Options menu under General Options.
base.css - part of the Skeleton boilerplate. More info: Skeleton.
layout.css - part of the Skeleton boilerplate. Contains all of the repsonsive media queries for the theme. More info: Skeleton.
skeleton.css - part of the Skeleton boilerplate. More info: Skeleton.
custom-styles.css.php - The custom styling, including colours and selected theme option styling. Also includes the custom css from the theme options, and the css for the font options.
styles.css - The main css for the theme, which includes the layout and styling for all aspects of the theme.
font-awesome.css - Font Awesome icon font. More info: Font Awesome.
functions.js.php - This is where all the custom magic happens. Feel free to edit any of this code, but make sure to keep a backup in case anything goes wrong!
jquery-ui-1.8.17.custom.min.js - A custom version of jQuery UI for the tabs & accordion shortcodes.
jquery.fancybox.pack.js - PREMIUM PLUGIN. fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. You can find out more here: http://fancyapps.com/fancybox/.
jquery.fitvids.js - A lightweight, easy-to-use jQuery plugin for fluid width video embeds.. You can find out more here: http://fitvidsjs.com/.
jquery.flexslider.min.js - an awesome, fully responsive jQuery slider plugin.. You can find out more here: http://www.woothemes.com/flexslider/.
jquery.hoverIntent.min.js - hoverIntent is a plug-in that attempts to determine the user's intent. You can find out more here: http://cherne.net/brian/resources/jquery.hoverIntent.html.
jquery.isotope.js - Isotope: An exquisite jQuery plugin for magical layouts. You can find out more here: http://isotope.metafizzy.co/index.html.
jquery.jcarousel.min.js - jCarousel is a jQuery plugin for controlling a list of items in horizontal or vertical order. You can find out more here: http://sorgalla.com/projects/jcarousel/.
jquery.superfish.js - Superfish is an enhanced Suckerfish-style menu jQuery plugin that takes an existing pure CSS drop-down menu and enhances it. You can find out more here: http://users.tpg.com.au/j_birch/plugins/superfish/.
respond.min.js - A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more). You can find out more here: https://github.com/scottjehl/Respond.
view.min.js - PREMIUM PLUGIN. A simple, lightweight, jQuery photo viewer for the web. You can find out more here: http://finegoodsmarket.com/view/.
Once again, thank you so much for purchasing this theme. Customer satisfaction is our #1 priority, which is why we always endeavour to provide the best service we can. We’re only an email away if you ever need us!
Swift Ideas


--- layout: root title: Page title subtitle: description: "tweetable description for metadata" meta_image: "assets/img/filename.gif" ---
Whatever you want on the front page here.


|
Bullet Collision Detection & Physics Library
|
Public Member Functions | |
| btInternalVertexPair (short int v0, short int v1) | |
| int | getHash () const |
| bool | equals (const btInternalVertexPair &other) const |
Public Attributes | |
| short int | m_v0 |
| short int | m_v1 |
Definition at line 36 of file btConvexPolyhedron.cpp.
|
inline |
Definition at line 38 of file btConvexPolyhedron.cpp.
|
inline |
Definition at line 51 of file btConvexPolyhedron.cpp.
|
inline |
Definition at line 47 of file btConvexPolyhedron.cpp.
| short int btInternalVertexPair::m_v0 |
Definition at line 45 of file btConvexPolyhedron.cpp.
| short int btInternalVertexPair::m_v1 |
Definition at line 46 of file btConvexPolyhedron.cpp.


Fortnite Fishing Guide: Where to find a fishing rod and catch Floppers and Slurpfish
by James BillcliffeYou can now partake in the noble pursuit of angling while you enjoy a game of Fortnite! All around the map are new fishing spots where you can find a fishing rod and catch items like weapons, Floppers and Slurpfish.
Catching these things isn’t just fun, Slurpfish in particular are powerful healing items, so it’s worth knowing where to look.
Where to find a Fishing Rod in Fortnite
To find a fishing rod, you’re best off looking in three places.
The first is obvious: floor spawns. They seem to be slightly uncommon, but you can just find fishing rods randomly around the map as you would any other loot. However, it’s not the most reliable way to track one down.
You can also find fishing rods in chests. Although again, it’s not guaranteed – especially since chests aren’t a 100% spawn themselves.
But finally, in certain locations on the map you can find barrels full of fishing poles for you and you duo, trio, or squad to grab.
These tend to spawn in watery locations, or on sandy beaches all over the new map. Try looking for them at the Lake Canoe landmark, or the beach in the southeast of the island, or named locations like Lazy Lake, the body of water to the north of Misty Meadows, or the southern part of Dirty Docks.

What fish can you catch in Fortnite?
To catch things, look for bubbling on the surface of water – this is where the fish are:
There are four main types of things that you can catch with your Fortnite fishing rod: Materials, Weapons, Floppers, and Slurpfish.
Materials speak for themselves, but usually come in smash-ish bundles like you’d find out of a chest.
As for weapons, it’s generally higher rarity equipment that will surface out of a fishing hole – usually around purple (Epic) rarity. This can be useful if you find yourself in an area with a spot, but not many floor spawns to harvest.
Floppers are the regular, red/orange fish you can catch from swimming holes – you can see them swimming underwater if you dive over towards a spot. When caught, you can pick them up to use as a fast healing item. They only take about a second to use, but heal around the same amount as a bandage.
Slurpfish are more powerful though. They still take about a second to use, but restore 50 points to both your health and shields. Keeping one of these in your backpack could really help out in a pinch, so they’re worth holding onto if you’ve got enough weapons.
Effectively using fishing spots and fish will help you to advance your way up the season tiers, and earn tons of Fortnite’s new progression medals on your way to collecting all the cool new battle pass skins like Rippley and Fusion.
As for the more traditional challenges, check out where to find the F in Fortnite from the Week 1 Loading Screen here.


Set Up Your Custom Node
To connect to a local node...
- URL: http://<IP_ADDRESS>
- Port: 8545
- Run geth:
geth --rpc --rpccorsdomain "null" --keystore "dont_put_secret_files_here_ever"
- Run Parity:
parity --rpccorsdomain "*" --keys-path "dont_put_secret_files_here_ever"
Your node must be HTTPS in order to connect to it via MyTokenWallet.com. You can [download the MyTokenWalletrepo & run it locally](https://github.com/Zwilla/mytokenwallet.com/releases/latest) to connect to any node. Or, get free SSL certificate via [LetsEncrypt](https://letsencrypt.org/).


Watch Jamie Foxx in teaser trailer for Pixar’s fantasy comedy ‘Soul’ (VIDEO)
LOS ANGELES, Nov 8 — Soul is directed by Pete Docter (Up, Inside Out), who also co-wrote the screenplay with Mike Jones and Kemp Powers.
The animated film follows middle school music teacher Joe Gardner, voiced by Foxx (Django Unchained, Ray), who dreams of being a professional jazz musician, but ends up at the ethereal You Seminar, helping souls in training.
The trailer opens with Joe asking, “What would you want to be known for on Earth?” over shots of people in their everyday lives and jobs.
 You wanna become the person that you were born to be? Don’t waste your time on all the junk of life.
Clips of people enjoying their passions like sewing and playing instruments, including Joe playing the piano onstage at the Half Note Club, follow.
Just as Joe learns he finally booked a gig, he falls into a pothole.
The life-threatening accident causes Joe’s soul to be separated from his body and transported to the You Seminar, where souls develop and gain passions before being sent to a newborn child.
Now Joe must help the souls in training — and discover his own passionate soul — so that he can get back to Earth before it’s too late.
As a blue blob, he asks 22 (Tina Fey), a soul who doesn’t think life on Earth is all that great, what she’d like to be remembered for. “Probably for doing this funny cowboy dance,” 22 says, showing off her moves.
The voice cast is rounded out by Questlove as Curly, the drummer in Joe’s band, Phylicia Rashad as Joe’s mother and Daveed Diggs as Paul, Joe’s neighbourhood nemesis.
Oscar winners Atticus Ross and Nine Inch Nails frontman Trent Reznor composed the original score, while Jon Batiste wrote several original jazz songs for the film, one of which scores this first teaser.
The fantasy comedy will be the second Pixar film releasing in 2020, with Onward arriving in March 2020.
Soul opens in theatres on June 19, 2020. — AFP-Relaxnews