m.request
- Basic usage
- Processing-web-service-data
- Bind redirection code
- Binding errors
- Queuing operations
- Casting the Response Data to a Class
- Unwrapping Response Data
- Using Different Data Transfer Formats
- File uploads with FormData
- Using variable data formats
- Extracting Metadata from the Response
- Custom request rejections
- Configuring the underlying XMLHttpRequest
- Aborting a request
- Using JSON-P
- Rendering before web service requests finish
- Signature
This is a high-level utility for working with web services, which allows writing asynchronous code relatively procedurally.
By default, it assumes server responses are in JSON format and optionally instantiates a class with the response data.
It provides a number of useful features out of the box:
- The ability to get an early reference to a container that will hold the asynchronous response
- The ability to queue operations to be performed after the asynchronous request completes
- The ability to "cast" the response to a class of your choice
- The ability to unwrap data in a response that includes metadata properties
Basic usage
The basic usage pattern for m.request
returns an m.prop
getter-setter, which is populated when the AJAX request completes.
The returned getter-setter can be thought of as a box: you can pass this reference around cheaply, and you can "unwrap" its value when needed.
var users = m.request({method: "GET", url: "/user"});
//assuming the response contains the following data: `[{name: "John"}, {name: "Mary"}]`
//then when resolved (e.g. in a view), the `users` getter-setter will contain a list of users
//i.e. users() //[{name: "John"}, {name: "Mary"}]
Note that this getter-setter holds an undefined value until the AJAX request completes. Attempting to unwrap its value early will likely result in errors.
The returned getter-setter also implements the promise interface (also known as a thennable): this is the mechanism you should always use to queue operations to be performed on the data from the web service.
The simplest use case of this feature is to implement functional value assignment via m.prop
(i.e. the same thing as above). You can bind a pre-existing getter-setter by passing it in as a parameter to a .then
method:
var users = m.prop([]); //default value
m.request({method: "GET", url: "/user"}).then(users)
//assuming the response contains the following data: `[{name: "John"}, {name: "Mary"}]`
//then when resolved (e.g. in a view), the `users` getter-setter will contain a list of users
//i.e. users() //[{name: "John"}, {name: "Mary"}]
This syntax allows you to bind intermediate results before piping them down for further processing, for example:
var users = m.prop([]); //default value
var doSomething = function() { /*...*/ }
m.request({method: "GET", url: "/user"}).then(users).then(doSomething)
While both basic assignment syntax and thennable syntax can be used to the same effect, typically it's recommended that you use the assignment syntax whenever possible, as it's easier to read.
The thennable mechanism is intended to be used in three ways:
- in the model layer: to process web service data in transformative ways (e.g. filtering a list based on a parameter that the web service doesn't support)
- in the controller layer: to bind redirection code upon a condition
- in the controller layer: to bind error messages
Processing web service data
This step is meant to be done in the model layer. Doing it in the controller level is also possible, but philosophically not recommended, because by tying logic to a controller, the code becomes harder to reuse due to unrelated controller dependencies.
In the example below, the listEven
method returns a getter-setter that resolves to a list of users containing only users whose id is even.
//model
var User = {}
User.listEven = function() {
return m.request({method: "GET", url: "/user"}).then(function(list) {
return list.filter(function(user) {return user.id % 2 == 0});
});
}
//controller
var controller = function() {
return {users: User.listEven()}
}
Bind redirection code
This step is meant to be done in the controller layer. Doing it in the model level is also possible, but philosophically not recommended, because by tying redirection to the model, the code becomes harder to reuse due to overly tight coupling.
In the example below, we use the previously defined listEven
model method and queue a controller-level function that redirects to another page if the user list is empty.
//controller
var controller = function() {
return {
users: User.listEven().then(function(users) {
if (users.length == 0) m.route("/add");
})
}
}
Binding errors
Mithril thennables take two functions as optional parameters: the first parameter is called if the web service request completes successfully. The second one is called if it completes with an error.
Error binding is meant to be done in the controller layer. Doing it in the model level is also possible, but generally leads to more code in order to connect all the dots.
In the example below, we bind an error getter-setter to our previous controller so that the error
variable gets populated if the server throws an error.
//controller
var controller = function() {
this.error = m.prop("")
this.users = User.listEven().then(function(users) {
if (users.length == 0) m.route("/add");
}, this.error)
}
If the controller doesn't already have a success callback to run after a request resolves, you can still bind errors like this:
//controller
var controller = function() {
this.error = m.prop("")
this.users = User.listEven().then(null, this.error)
}
Queuing Operations
As you saw, you can chain operations that act on the response data. Typically this is required in three situations:
- in model-level methods if client-side processing is needed to make the data useful for a controller or view.
- in the controller, to redirect after a model service resolves.
- in the controller, to bind error messages
In the example below, we take advantage of queuing to debug the AJAX response data prior to doing further processing on the user list
//a FP-friendly console.log
var log = function(value) {
console.log(value)
return value
}
var users = m.request({method: "GET", url: "/user"})
.then(log)
.then(function(users) {
//add one more user to the response
return users.concat({name: "Jane"})
})
//assuming the response contains the following data: `[{name: "John"}, {name: "Mary"}]`
//then when resolved (e.g. in a view), the `users` getter-setter will contain a list of users
//i.e. users() //[{name: "John"}, {name: "Mary"}, {name: "Jane"}]
Casting the Response Data to a Class
It's possible to auto-cast a JSON response to a class. This is useful when we want to control access to certain properties in an object, as opposed to exposing all the fields in POJOs (plain old Javascript objects) for arbitrary processing.
In the example below, User.list
returns a list of User
instances.
var User = function(data) {
this.name = m.prop(data.name);
}
User.list = function() {
return m.request({method: "GET", url: "/user", type: User});
}
var users = User.list();
//assuming the response contains the following data: `[{name: "John"}, {name: "Mary"}]`
//then when resolved (e.g. in a view), `users` will contain a list of User instances
//i.e. users()[0].name() == "John"
Unwrapping Response Data
Often, web services return the relevant data wrapped in objects that contain metadata.
Mithril allows you to unwrap the relevant data, by providing two callback hooks: unwrapSuccess
and unwrapError
.
These hooks allow you to unwrap different parts of the response data depending on whether it succeed or failed.
var users = m.request({
method: "GET",
url: "/user",
unwrapSuccess: function(response) {
return response.data;
},
unwrapError: function(response) {
return response.error;
}
});
//assuming the response is: `{data: [{name: "John"}, {name: "Mary"}], count: 2}`
//then when resolved (e.g. in a view), the `users` getter-setter will contain a list of users
//i.e. users() //[{name: "John"}, {name: "Mary"}]
Using Different Data Transfer Formats
By default, m.request
uses JSON to send and receive data to web services. You can override this by providing serialize
and deserialize
options:
var users = m.request({
method: "GET",
url: "/user",
serialize: mySerializer,
deserialize: myDeserializer
});
One typical way to override this is to receive as-is responses. The example below shows how to receive a plain string from a txt file.
var file = m.request({
method: "GET",
url: "myfile.txt",
deserialize: function(value) {return value;}
});
File uploads with FormData
To use the HTML5 FormData object as the payload for a request, you need to override the serialize
option. By default, serialize
converts an object to JSON, but in the case of a FormData payload, you want to pass the object intact.
//assume the file comes from an HTML5 drag-n-drop event
var file = e.dataTransfer.files[0]
var data = new FormData();
data.append("file", file)
m.request({
method: "POST",
url: "/upload",
serialize: function(data) {return data}
})
Using variable data formats
By default, Mithril assumes both success and error responses are in JSON format, but some servers may not return JSON responses when returning HTTP error codes (e.g. 404)
You can get around this issue by using extract
var nonJsonErrors = function(xhr) {
return xhr.status > 200 ? JSON.stringify(xhr.responseText) : xhr.responseText
}
m.request({method: "GET", url: "/foo/bar.x", extract: nonJsonErrors})
.then(function(data) {}, function(error) {console.log(error)})
Extracting Metadata from the Response
The extract
method can be used to read metadata from HTTP response headers or the status field of an XMLHttpRequest.
var extract = function(xhr, xhrOptions) {
if (xhrOptions.method == "HEAD") return xhr.getResponseHeader("x-item-count")
else return xhr.responseText
}
m.request({method: "POST", url: "/foo", extract: extract});
Custom request rejections
If you want to be able to handle a condition as an error in a promise rejection handler, you can throw an Error
from extract
to reject the promise.
This is useful, for example, if you received invalid JSON from the server in production and you want to display a message to the user saying that the server is offline.
var extract = function(xhr, xhrOptions) {
try {
return JSON.stringify(xhr.responseText)
}
catch (e) {
//e instanceof SyntaxError == true
//by default `e` would be caught by Mithril's promise exception monitor and rethrown to the console
//this new error follows Promises/A+ specifications and triggers a rejection in the downstream promises without hitting the console.
throw new Error("Server is offline")
}
}
m.request({method: "POST", url: "/foo", extract: extract});
You can read more about the promise exception monitor here.
Configuring the underlying XMLHttpRequest
The config
option can be used to arbitrarily configure the native XMLHttpRequest instance and to access properties that would not be accessible otherwise.
The example below shows how to configure a request where the server expects requests to have a Content-Type: application/json
header
var xhrConfig = function(xhr) {
xhr.setRequestHeader("Content-Type", "application/json");
}
m.request({method: "POST", url: "/foo", config: xhrConfig});
Aborting a request
The config
option can also be used to retrieve the XMLHttpRequest
instance for aborting the request. This idiom can also be used to attach onprogress
event handlers.
var transport = m.prop();
m.request({method: "POST", url: "/foo", config: transport});
//the `transport` getter-setter contains an instance of XMLHttpRequest
transport().abort();
Using JSON-P
To make JSON-P requests, add the dataType
option instead of method
. You should not add the callback
querystring parameter; Mithril already does that internally.
m.request({dataType: "jsonp", url: "/api/User"});
Some services (e.g. Flickr) don't follow the convention of calling the callback
parameter callback
. In order to specify the name of the querystring parameter that indicates the callback function, use the callbackKey
option:
m.request({
dataType: "jsonp",
callbackKey: "jsoncallback",
url: "http://api.flickr.com/services/feeds/photos_public.gne?tags=monkey&tagmode=any&format=json"
});
Rendering before web service requests finish
By default, Mithril waits for web service requests to complete before attempting a redraw. This ensures that data being accessed in the view isn't nullable as a result of asynchronous data not being available yet.
However, sometimes we do want to be able to redraw before a web service request completes, either because one web service out of many is slow, or because we don't need its response in order to redraw.
Setting the background
option to true
prevents a request from affecting redrawing. This means it's possible for a view to attempt to use data before it is available. You can specify an initial value for the m.request
getter-setter in order to avoid having to write defensive code against potential null reference exceptions:
var demo = {}
demo.controller = function() {
return {
users: m.request({method: "GET", url: "/api/user", background: true, initialValue: []})
}
}
//in the view
demo.view = function(ctrl) {
//This view gets rendered before the request above completes
//Calling .map doesn't throw an error because we defined the initial value to be an empty array, instead of undefined
return ctrl.users().map(function(user) {
return m("div", user.name)
})
}
Signature
Promise request(Options options)
where:
Promise :: GetterSetter { Promise then(any successCallback(any value), any errorCallback(any value)) }
GetterSetter :: any getterSetter([any value])
Options :: XHROptions | JSONPOptions
XHROptions :: Object {
String method,
String url,
[String user,]
[String password,]
[Object<any> data,]
[Boolean background,]
[any initialValue,]
[any unwrapSuccess(any data, XMLHttpRequest xhr),]
[any unwrapError(any data, XMLHttpRequest xhr),]
[String serialize(any dataToSerialize),]
[any deserialize(String dataToDeserialize),]
[any extract(XMLHttpRequest xhr, XHROptions options),]
[void type(Object<any> data),]
[XMLHttpRequest? config(XMLHttpRequest xhr, XHROptions options)]
}
JSONPOptions :: Object {
String dataType,
String url,
String callbackKey,
Object<any> data
}
XHROptions options
A map of options for the XMLHttpRequest
String method
The HTTP method. Must be either
"GET"
,"POST"
,"PUT"
,"DELETE"
,"HEAD"
or"OPTIONS"
String url
The URL to request. If the URL is not in the same domain as the application, the target server must be configured to accept cross-domain requests from the application's domain, i.e. its responses must include the header
Access-Control-Allow-Origin: *
.String user (optional)
A user for HTTP authentication. Defaults to
undefined
String password (optional)
A password for HTTP authentication. Defaults to
undefined
Object
data (optional)Data to be sent. It's automatically placed in the appropriate section of the request with the appropriate serialization based on
method
Boolean background (optional)
Determines whether the
m.request
can affect template rendering. Defaults to false.If this option is set to true, then the request does NOT call
m.startComputation
/m.endComputation
internally, and therefore the completion of the request does not trigger an update of the view, even if data has been changed. This option is useful for running operations in the background (i.e. without user intervention).In order to force a redraw after a background request, use
m.redraw
, orm.startComputation
/m.endComputation
.var demo = {} demo.controller = function() { var users = m.request({method: "GET", url: "/api/users", background: true, initialValue: []}) users.then(m.redraw) return {users: users} } demo.view = function(ctrl) { //this view renders twice (once immediately, and once after the request above completes) return m("div", [ ctrl.users().map(function(user) { return m("div", user.name) }) ]) }
It's strongly recommended that you set an
initialValue
option in ALL requests if you set thebackground
option to true.When calling multiple background AJAX requests, it's recommended that you use
m.sync
to batch redraw once at the end of all requests, as opposed to repeatedly redrawing after every request:var demo = {} demo.controller = function() { var users = m.request({method: "GET", url: "/api/users", background: true, initialValue: []}) var projects = m.request({method: "GET", url: "/api/projects", background: true, initialValue: []}) m.sync([users, projects]).then(m.redraw) return {users: users, projects: projects} }
Make sure to add null checks if your request value can be null
var demo = {} demo.controller = function() { var user = m.request({method: "GET", url: "/api/users/1", background: true, initialValue: null}) user.then(m.redraw) return {user: user} } demo.view = function(ctrl) { return m("div", [ //in the first redraw, there's no user, so ensure we don't throw an error ctrl.user ? ctrl.user.name : "no user" ]) }
any initialValue (optional)
The value that populates the returned getter-setter before the request completes. This is useful when using the
background
option, in order to avoid the need for null checks in views that may be attempting to access the returned getter-setter before the asynchronous request resolves.It is strongly recommended that you always set this option to avoid future surprises.
any unwrapSuccess(any data, XMLHttpRequest xhr) (optional)
A preprocessor function to unwrap the data from a success response in case the response contains metadata wrapping the data.
The default value (if this parameter is falsy) is the identity function
function(value) {return value}
For example, if the response is
{data: [{name: "John"}, {name: "Mary"}]}
and the unwrap function isfunction(response) {return response.data}
, then the response will be considered to be[{name: "John"}, {name: "Mary"}]
when processing thetype
parameterObject
| Array data The data to unwrap
returns Object
| Array unwrappedData The unwrapped data
any unwrapError(any data, XMLHttpRequest xhr) (optional)
A preprocessor function to unwrap the data from an error response in case the response contains metadata wrapping the data.
The default value (if this parameter is falsy) is the identity function
function(value) {return value}
Object
| Array data The data to unwrap
returns Object
| Array unwrappedData The unwrapped data
String serialize(any dataToSerialize) (optional)
Method to use to serialize the request data
The default value (if this parameter is falsy) is
JSON.stringify
any dataToSerialize
Data to be serialized
returns String serializedData
any deserialize(String dataToDeserialize) (optional)
Method to use to deserialize the response data
The default value (if this parameter is falsy) is
JSON.parse
String dataToDeserialize
Data to be deserialized
returns any deserializedData
any extract(XMLHttpRequest xhr, XHROptions options) (optional)
Method to use to extract the data from the raw XMLHttpRequest. This is useful when the relevant data is either in a response header or the status field.
If this parameter is falsy, the default value is a function that returns
xhr.responseText
.void type(Object
data) (optional)The response object (or the child items if this object is an Array) will be passed as a parameter to the class constructor defined by
type
If this parameter is falsy, the deserialized data will not be wrapped.
For example, if
type
is the following class:var User = function(data) { this.name = m.prop(data.name); }
And the data is
[{name: "John"}, {name: "Mary"}]
, then the response will contain an array of two User instances.XMLHttpRequest? config(XMLHttpRequest xhr, XHROptions options) (optional)
An initialization function that runs after
open
and beforesend
. Useful for adding request headers and when using XHR2 features, such as the XMLHttpRequest'supload
property.XMLHttpRequest xhr
The XMLHttpRequest instance.
XHROptions options
The
options
parameter that was passed intom.request
callreturns XMLHttpRequest? xhr
You may return an XHR-like object (e.g. a XDomainRequest instance) to override the provided XHR instance altogether.
returns Promise promise
returns a promise that can bind callbacks which get called on completion of the AJAX request.
JSONPOptions options
A map of options for JSONP requests
String dataType
Must be the string "jsonp"
String url
The URL to request. If the URL is not in the same domain as the application, the target server must be configured to accept cross-domain requests from the application's domain, i.e. its responses must include the header
Access-Control-Allow-Origin: *
.String callbackKey
The name of the querystring key that defines the name of the callback function to be called by the response. Defaults to "callback"
This option is useful for web services that use uncommon conventions for defining jsonp callbacks (e.g. foo.com/?jsonpCallback=doSomething)
Object
data (optional)Data to be sent. It's automatically placed in the appropriate section of the request with the appropriate serialization based on
method


Summary of Achievements
Achievement Table:
Individual Contribution Table:
Critical Evaluation of the Project
UI & Functionality -- Feedbacks from Project Partners and Clients
Because we regularly met with our project partners, we had the change to incrementally improve our solution based on their feedback.
After showing the map visualisation to our partners, they suggested that users should be able to customize the page style. As an example of how that can be achieved, we added a colour selector, which allows dynamically changing the background.
Additionally, we presented the product to the Invictus FAD Team from Saint Lucia. They were pleased that the product is flexible, easy to extend and use, while the solution architecture can be adapted for their needs.
Efficiency
The data pipeline automates the process of downloading, processing, uploading and storing the dataset, leading to an efficient workflow for data scientists.
The Azure function is a serverless solution that automatically detects any creation of blobs within a container. When a blob is created, it triggers the function such that the function converts content inside the blob to table storage in less than 5 seconds.
The progressive web app is rapidly loading, as it uses a service worker that caches the content of the app. Thus, when fetch events are triggered, the service worker will try to send back the resource from the cache. The request will be sent to the server only if the resource is not cached.
Additionally, the first version of the API queried data from a local file, and thus required around 30 seconds to load the table, graphs or map visualizations and information. In the second version, the API fetched the data from the database (Azure Table Storage), which allowed efficiently querying data. Thus, now, the content of the app loads seamlessly.
Compatibility
Compatibility and flexibility were very important for our project, as we expect it to be extended in the future.
The parsing stage, included in the data pipeline can be executed on Window, Linux or MAC OS. The progressive web app is deployed on the web and can be installed on desktop and mobile. To show that AI insight could be integrated into our data pipeline, we implemented a machine learning model which augmented the dataset with predicted weather.
Stability
To ensure a smooth development of the progressive web app, we build a CI/CD pipeline using Azure DevOps. The pipeline will run the latest version of the repository, execute the build and testing scripts. If one stage fails, the pipeline will report it as an email to the team members. Similarly, the release pipeline will take the artefact of the build and deploy it to an Azure App Service.
Project Management
The management of the project is essential because the team is offered limited number of credits on Azure Service. Apart from it, the core goal of Project 15 is to be Low Cost of Deployment. Thus, the project has to be managed cost-effective. The project acquires an Azure resource group to be created. Inside the group, a storage account, a map account and other relevant resources are acquired. The choice on type of storage is made to be Blob, since it is relatively cheaper but effective compared to others.
Maintainability
Since all essential information were stored in Azure, the maintenance of Azure is on high priority. The Azure service itself, protects the data stored from stolen by non-permitted users. The Service would check for non-authenticated access to any Storage. It protects users’ privacy, where inside storage account -> access-keys, the connection strings are hidden. If the connection string is misused, it can be regenerated such that the previous string no longer works. However, there could be privacy leakage by users. The team have added documentations in doc folder where outlines how to deploy our project. Inside them, there are instructions on setting up environment variables or configurations to run our project. These environment variables are essentially user’s connection string, which would not be pushed to GitHub due to existence of .gitignore file.
Future Work
One big area of improvement would be in the fields of AI. For instance, leveraging our data pipeline, better ML models can be developed for augmenting or analyzing data. Our solution diagram shows how AI algorithms can be integrated, without changing the overall infrastructure. To provide an example, we implemented a simple weather prediction algorithm.
Additionally, real data from IoT devices can be connected to the existing workflow. Monitoring the devices can be done using the PWA insights and visualizations, and appropriate actions can be taken. For example, the app can be enhanced by adding notification or alerts about the datasets. If there is a broken FAD found, it will be reported to the user. Alerts could be displayed to users when the population for an oceanic species dropped significantly.


- I am eagerly jumping into a new career path after running my own one women screen printing business for the past five years. I first became interested in coding when I used a website builder to make my business website and couldn't do exactly what I wanted with the presets. I am very visually driven in a design sense but am also a relentless problem solver and have a strong need to flex the analytical side of my brain. I did some online learning before coming to Epicodus and I was pretty hooked right away. I am so excited to go forward and never stop learning all I can about coding and being a developer!
- My background is primarily in art & design but I have worked in serveral different fields over the years. I have a BA in fine arts from the University of Wisconsin Milwaukee. Since graduating many moons ago I have worked in admin, recruiting, customer service, food service/serving, and most recently have been running my own screen printing busniess, as well as trying to build a chain maille jewelry and apparel brand. I'v been in Portland for about eight years now and I can't imagine living anywhere else.


Full Stack Automation Engineer
Chennai, India
<EMAIL_ADDRESS>+91-9840837185
Skills
Selenium/RESTAssured
Cucumber Framework
Appium
Jmeter
Languages
English
Tamil
Hindi
* RestAssured with Pojo/jsonpath
* I was Part of developing - Unified framework with multimaven project successfully completed first version(web, mobile and rest services)
* Convert unified wrapper class and method to support BDD(Cucumber) if complete
* Load testing using jmeter
* Developing backend REST API - using Springboot with MongoDB and jpa API vs Derby
Acting as certified trainer for Selenium in Cognizant
Completed Project :
1) Selenium for Angularjs webpage using CRAFT framework (Keyword and DataDriven Framework).
Challenges and Learning - Writing unique and stable xpath , using ROBOT tool for file upload.
2) Creating base platform on e-selenium framework (POM model), so that it can be used by many application.
Challenges and Learning - Learning over the framework
3) Complicated API automation for REST call using RESTASSURED jar in Java. Integrated framework (POM and pagefactory pattern).
Challenges and Learning - Creating re-usable(wrapper) method to be used for all REST call, invoking sorting validation and so on..
4) UI automation for search engine using Integrated framework (POM and pagefactory pattern).
Challenges and Learning - integrating UI result with API result. and UI validation on different strategy.
5) POC on Mobile web and Android app automation using APPIUM (Need to explore on iPhone app) and Cross browser testing using sauce lab and parallel execution using Sauce lab.
6) Automation of the Network Details is done using browser mob.
Using Java code, we can pull the data, like different requests(GETCall, Status etc) and then assert them based on the validation as per the requirement.
Advantage : Currently, the Automation scripts supports only UI and API, but the functionalities like Network provider output, status, GETCall, POSTCall etc should be verified manually, which actually is very much time consuming.
Manual Experience :
- Hold proven track records to prepare Test Strategy, Test Plan, Test Cases, and Test Data and manage Test Execution with Defect Analysis, Error fixing and reporting.
Automation Experience :
- Automation implementation as a PILOT project.
- Automation Testing using Selenium, Experience in Selenium using Web Driver.
- Good experience in Preparation of automated Tests using java with in TestNG Frame work and Debugging, Executing and finding the issues in script
Full Stack Development! All I need to know in one place
Master Degree
Bachelor Degree


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 2
Verjus, fennel pollen and kibbled onions all feature in a deliciously-different recipe for halibut.
For the parsnip purée, heat the butter in a saucepan and cook the parsnips for one minute on a high heat.
Add the cream, bring the mixture to the boil then reduce the heat and simmer for five minutes or until the parsnips are tender. Blend the parsnip mixture in a blender until smooth.
Pass the mixture through a fine sieve and into a clean pan, then season to taste with salt and freshly ground black pepper.
For the verjus butter, pour the verjus and chicken stock into a saucepan and bring to a boil, continue to cook until the volume of the liquid is reduced by three-quarters.
Remove the pan from the heat and whisk in the cubed butter until smooth and glossy. Season to taste with salt and freshly ground black pepper. Add the sultanas, cucumber and spring onion. Keep warm.
Meanwhile for the halibut, season the fillets with salt and freshly ground black pepper.
Pour 1 tbsp olive oil in a hot frying pan, add the seasoned halibut skin-side down and cook for 2-3 minutes, or until golden-brown. Turn the fish over and remove the pan from the heat.
Place the fish onto a board or a plate and place a lardo slice on each fillet and carefully sprinkle the fennel pollen, kibbled onions, chives and borage on top.
To serve, spoon the parsnip purée in the centre of serving plates and place the dressed halibut on top. Finish by pouring the sauce around the halibut and serve immediately.


Feel free to call , email or send me a message with any questions or feedback. I will be happy to answer questions and I would love to hear your feedback.


mobibot
The #mobitopia bot
The latest version of mobibot is always available via GitHub.
About mobibot
mobibot is the #mobitopia IRC channel bot written in Kotlin.
mobibot is making extensive use of various open source libraries, including:
- Apache Commons Net
- CryptoPrice
- exp4j
- JokeAPI
- jsoup
- kotlinx-cli
- OkHttp
- OWM JAPIs
- Pinboard Poster
- PircBotX
- Rome
- UrlEncoder
mobibot was written by Erik C. Thauvin as a replacement for the channel's original ChumpBot.
Features
mobibot's main functionality is to capture URLs posted on the channel. The URLs are automatically gathered into a publishable RSS feed and saved on Pinboard.
Other features include:
- Displaying the latest entries on Mobitopia
mobibot: view
- Performing calculations
mobibot: calc (floor(sqrt(3)) + π) * 3^2
- Crypto currencies prices
mobibot: cryto btc
mobibot: cryto eth eur
- Converting between currencies
mobibot: currency 17.54 USD to EUR
- Performing Google searches
mobibot: google mobitopia on irc
- Getting answers from Wolfram Alpha and ChatGPT
mobibot: wolfram days until christmas
mobibot: chatgpt explain quantum computing in simple terms
- Displaying weather information
mobibot: weather san francisco
mobibot: weather 94123
mobibot: weather tokyo, jp
- Performing DNS lookups
mobibot: lookup www.apple.com
- Retrieving stock quotes from Alpha Avantage
mobibot: stock GOOG
mobibot: stock google
- Displaying the time in various time zones
mobibot: time UK
mobibot: time GMT
- Sending messages to people on join/activity
mobibot: tell nickname Give me a call when you see this.
- Recapping public channel messages
/msg mobibot recap
- Listing the users on the channel
/msg mobibot users
- Viewing when a nickname was last seen
/msg mobibot seen nickname
- Random jokes from Sv443's JokeAPI
mobibot: joke
- Playing dice, war or rock paper scissors
mobibot: dice
mobibot: war
mobibot: paper
mobibot: rock
- Automatic and manual posting to Mastodon
mobibot: toot hello mastodon
Some of the internal features include RSS feed backlogs, rolling logs, debugging toggle and much more.
If you have any feature suggestions, please post them to the mobibot wiki.
Using mobibot
To use mobibot, simply join #mobitopia on irc.libera.chat and type:
mobibot: help
mobibot will reply with a listing of the commands currently supported.
Licenses
There are various open source licenses attached to mobibot. Please refer to the licenses directory in the source tree for more details.


Back
Notification Widget
Show Toast Notification
Show Progress Notification
Show Web Notification
Update Progress Notification


Agile Agenda
What is it?
The Agile Agenda is a simple, yet effective way to manage the agenda for an in person workshop using sticky notes and a whiteboard. The basic idea is draw a days calendar on to the whiteboard, split it into 2 or more tracks, write agenda items on sticky notes (with owners!) and then place them on the whiteboard in the correct time slot. Review your agenda in the morning, and then come back to it throughout the day, updating as need be. It should look something like this:
Why use an Agile Agenda?
- Sessions like event storming or user story mapping don’t neatly fit into time boxes. As such, you’ll need to dynamic with the way you manage the agenda.
- Whiteboards and stickies are easier to change than digital agendas which might need some formatting or even have access issues.
- It works as an Information Radiator1 throughout the workshop, making it a logical area to gather the team to review the agenda as well as do time checks. Compare this to an agenda captured in a slide deck, which doesn’t naturally lead to a team huddle.
Related Practices
- Collaborative Face Drawing2 is a great ice breaker or after lunch activity.
- Facilitator
Suggested Time
- ~10 min prep assuming you already have an agenda in mind
Difficulty
- Facilitator: Easy
- Participants: Easy
Facilitation Materials Needed
- Whiteboard which will hold sticky notes.
- Whiteboard markers
- Stickies (preferably a wide variety)
Process Phase
Any time


1 person dead, 3 others wounded in shooting in Newark
by Eyewitness NewsNEWARK, New Jersey (WABC) -- Authorities say one person was killed and three others wounded in a shooting in Newark Monday.
It happened at 142 South 8th Street.
The three wounded victims suffered non-critical injuries, according to police. There is no word yet on what led to the shooting.
The incident is under investigation by the Essex County Prosecutor's Office.


We're creating your hosting account now
When your account is ready, try one of our world-class website builders.
Your account will be ready soon


Data Structures | |
| struct | touch_point |
| Panel coordinate and measurement data of a single touch. More... | |
| struct | touch_calibration_matrix |
| Calibration matrix coefficients. More... | |
| struct | touch_event |
| Contains touch event type and touch point data. More... | |
Modules | |
| 4-wire resistive touch driver general implementation | |
| Board-specific ADC control for resistive touch driver | |
Defines | |
| #define | TOUCH_NR_CALIBRATION_POINTS 3 |
| Number of calibration points needed for driver. | |
Typedefs | |
| typedef struct touch_point | touch_calibration_points_t [TOUCH_NR_CALIBRATION_POINTS] |
| Array to hold calibration points. | |
| typedef void(* | touch_event_handler_t )(const struct touch_event *event) |
| Pointer to touch event handler function. | |
Enumerations | |
| enum | touch_event_types |
Enumeration of different touch event types for the touch_event struct. More... | |
Functions | |
| void | touch_init (void) |
| Initialize the touch driver. | |
| void | touch_enable (void) |
| Enable touch detection and sampling. | |
| void | touch_disable (void) |
| Disable touch detection and sampling. | |
| void | touch_get_event (struct touch_event *buffer) |
| Get last detected touch event from driver to buffer. | |
| bool | touch_is_touched (void) |
| Return current state of touch driver. | |
| void | touch_set_calibration_matrix (const struct touch_calibration_matrix *matrix) |
| Assign a calibration matrix to the driver. | |
| void | touch_get_calibration_matrix (struct touch_calibration_matrix *buffer) |
| Copy calibration matrix from driver to a buffer. | |
| void | touch_compute_calibration_matrix (const touch_calibration_points_t points, struct touch_calibration_matrix *matrix) |
| Compute a calibration matrix. | |
| void | touch_set_event_handler (touch_event_handler_t handler) |
| Set touch event handler for driver. | |
| touch_event_handler_t | touch_get_event_handler (void) |
| Get current touch event handler from driver. |
For resistive touch the driver implementation utilizes GPIO pin interrupts, if needed, for touch detection and the ADC for position measurements.
If CONFIG_SOFTIRQ is defined, the driver will make use of the soft IRQ with ID SOFTIRQ_TOUCH_PROCESS for processing of measurements and calling the current touch event handler function.
| #define TOUCH_NR_CALIBRATION_POINTS 3 |
| typedef struct touch_point touch_calibration_points_t[TOUCH_NR_CALIBRATION_POINTS] |
Array to hold calibration points.
Meant for use with touch_compute_calibration_matrix().
| typedef void(* touch_event_handler_t)(const struct touch_event *event) |
| enum touch_event_types |
Enumeration of different touch event types for the touch_event struct.
| void touch_compute_calibration_matrix | ( | const touch_calibration_points_t | points, | |
| struct touch_calibration_matrix * | matrix | |||
| ) |
Compute a calibration matrix.
Computes the calibration matrix that is used to get the panel coordinates from raw measurements of the touch surface.
This requires that the
| points | Pointer to array containing calibration points. | |
| matrix | Pointer to storage buffer for the calibration matrix. |
Definition at line 270 of file touch.c.
References touch_calibration_matrix::a, assert, touch_calibration_matrix::b, touch_calibration_matrix::c, touch_calibration_matrix::d, touch_calibration_matrix::e, touch_calibration_matrix::f, and touch_calibration_matrix::k.
Referenced by touch_calibrate_task_handler().
| void touch_disable | ( | void | ) |
Disable touch detection and sampling.
Disables interrupts for the GPIO and the ADC.
Definition at line 160 of file touch.c.
References cpu_irq_restore(), cpu_irq_save(), touch_priv_adc_disable_int(), and touch_priv_port_disable_int().
Referenced by touch_init().
| void touch_enable | ( | void | ) |
Enable touch detection and sampling.
Resets the driver and touch state, configures GPIO pins for touch detection and enables interrupts for GPIO and the ADC.
Definition at line 137 of file touch.c.
References touch_last_event, TOUCH_NOT_TOUCHED, touch_priv_adc_clear_int_flag(), touch_priv_adc_enable_int(), touch_priv_port_clear_int_flag(), touch_priv_port_enable_int(), touch_priv_port_set_detection(), touch_state, and touch_event::type.
| void touch_get_calibration_matrix | ( | struct touch_calibration_matrix * | buffer | ) |
Copy calibration matrix from driver to a buffer.
| buffer | Address of buffer to copy calibration matrix to. |
Definition at line 250 of file touch.c.
References assert, and touch_matrix.
| void touch_get_event | ( | struct touch_event * | buffer | ) |
Get last detected touch event from driver to buffer.
| buffer | Buffer to store touch event in. |
Definition at line 179 of file touch.c.
References assert, cpu_irq_restore(), cpu_irq_save(), and touch_last_event.
| touch_event_handler_t touch_get_event_handler | ( | void | ) |
Get current touch event handler from driver.
Definition at line 226 of file touch.c.
References touch_event_handler.
| void touch_init | ( | void | ) |
Initialize the touch driver.
Initializes the GPIO pins and ADC for touch detection and measurements, as well as the driver states.
Must be called before any other function in this driver.
Definition at line 111 of file touch.c.
References softirq_set_handler(), touch_disable(), touch_event_handler, touch_last_event, TOUCH_NOT_TOUCHED, touch_priv_adc_init(), touch_priv_port_init(), touch_priv_process_samples(), touch_state, and touch_event::type.
| bool touch_is_touched | ( | void | ) |
Return current state of touch driver.
| true | Driver is sensing a touch. | |
| false | Driver is not sensing a touch. |
Definition at line 198 of file touch.c.
References touch_last_event, and touch_event::type.
| void touch_set_calibration_matrix | ( | const struct touch_calibration_matrix * | matrix | ) |
Assign a calibration matrix to the driver.
| matrix | Address of calibration matrix for the driver to copy. |
Definition at line 237 of file touch.c.
References assert, and touch_matrix.
Referenced by touch_calibrate_task_handler().
| void touch_set_event_handler | ( | touch_event_handler_t | handler | ) |
Set touch event handler for driver.
| handler | Address of new handler function. |
Definition at line 210 of file touch.c.
References cpu_irq_restore(), cpu_irq_save(), and touch_event_handler.
Referenced by touch_calibrate_task_handler().


| SIGWAITINFO(2) | Linux Programmer's Manual | SIGWAITINFO(2) |
#include <signal.h>
int sigwaitinfo(const sigset_t *set, siginfo_t *info);
int sigtimedwait(const sigset_t *set, siginfo_t *info, const struct timespec *timeout);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
sigwaitinfo(), sigtimedwait(): _POSIX_C_SOURCE >= 199309L
sigwaitinfo() removes the signal from the set of pending signals and returns the signal number as its function result. If the info argument is not NULL, then the buffer that it points to is used to return a structure of type siginfo_t (see sigaction(2)) containing information about the signal.
If multiple signals in set are pending for the caller, the signal that is retrieved by sigwaitinfo() is determined according to the usual ordering rules; see signal(7) for further details.
sigtimedwait() operates in exactly the same way as sigwaitinfo() except that it has an additional argument, timeout, which specifies the interval for which the thread is suspended waiting for a signal. (This interval will be rounded up to the system clock granularity, and kernel scheduling delays mean that the interval may overrun by a small amount.) This argument is of the following type:
struct timespec { long tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */ }
If both fields of this structure are specified as 0, a poll is performed: sigtimedwait() returns immediately, either with information about a signal that was pending for the caller, or with an error if none of the signals in set was pending.
The set of signals that is pending for a given thread is the union of the set of signals that is pending specifically for that thread and the set of signals that is pending for the process as a whole (see signal(7)).
Attempts to wait for SIGKILL and SIGSTOP are silently ignored.
If multiple threads of a process are blocked waiting for the same signal(s) in sigwaitinfo() or sigtimedwait(), then exactly one of the threads will actually receive the signal if it becomes pending for the process as a whole; which of the threads receives the signal is indeterminate.
sigwaitinfo() or sigtimedwait(), can't be used to receive signals that are synchronously generated, such as the SIGSEGV signal that results from accessing an invalid memory address or the SIGFPE signal that results from an arithmetic error. Such signals can be caught only via signal handler.
POSIX leaves the meaning of a NULL value for the timeout argument of sigtimedwait() unspecified, permitting the possibility that this has the same meaning as a call to sigwaitinfo(), and indeed this is what is done on Linux.
The glibc wrapper functions for sigwaitinfo() and sigtimedwait() silently ignore attempts to wait for the two real-time signals that are used internally by the NPTL threading implementation. See nptl(7) for details.
The original Linux system call was named sigtimedwait(). However, with the addition of real-time signals in Linux 2.2, the fixed-size, 32-bit sigset_t type supported by that system call was no longer fit for purpose. Consequently, a new system call, rt_sigtimedwait(), was added to support an enlarged sigset_t type. The new system call takes a fourth argument, size_t sigsetsize, which specifies the size in bytes of the signal set in set. This argument is currently required to have the value sizeof(sigset_t) (or the error EINVAL results). The glibc sigtimedwait() wrapper function hides these details from us, transparently calling rt_sigtimedwait() when the kernel provides it.
| 2017-09-15 | Linux |


Over 75,000 lbs. of salad in 22 states recalled in E. coli outbreak
by New York Post(NEW YORK POST) – A New Jersey food company has recalled more than 75,000 pounds of packaged salad after seven people were hospitalized with E. coli, the US Department of Agriculture announced Thursday.
Missa Bay, LLC, of Swedesboro, issued the recall of 75,233 pounds of the bagged salad products sold at Walmart, Target and Aldi — fearing the romaine lettuce may be contaminated with the bacteria after an investigation by the Centers for Disease Control and Prevention.
A total of 17 people, one a 3-year-old, have been infected with the E. coli strain in eight states, according to the CDC.
Seven people have been hospitalized and two developed a type of kidney failure. There have been no fatalities.
Two people in Maryland reported eating the chicken Caesar salad produced by Missa Bay before being hospitalized.
As part of an outbreak investigation, the Maryland Department of Health collected a package of Ready Pac Foods Bistro Chicken Caesar Salad from a sick person’s home and found it tested positive for E. coli.
A full list of the recalled products is available online and applies to more than 30 packaged salads with the same lot of romaine lettuce believed to be from a farm in California.
The salads produced from Oct. 14 to 16 have been shipped to 22 states — Alabama, Connecticut, Florida, Georgia, Illinois, Indiana, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, New Jersey, New York, North Carolina, Ohio, Pennsylvania, South Carolina, Virginia and Wisconsin, the agriculture department said.
“Consumers who have purchased these products are urged not to consume them. These products should be thrown away or returned to the place of purchase,” the USDA warned.
Symptoms of E. coli including nausea, vomiting, stomach cramps and fever.
Calls to Missa Bay went unanswered Thursday.
More International News Stories
-
Two boys die after falling into pots of hot stew in India November 22, 2019
-
Israeli PM Netanyahu indicted for bribery, fraud and breach of trust November 22, 2019
-
Bacteria-infected mosquitoes take bite out of deadly dengue November 22, 2019
-
BMW, Daimler and Volkswagen fined €100m after forming cartel to buy steel November 21, 2019
-
Former South Carolina deputy arrested for sex with teen in patrol car November 21, 2019
-
US judge temporarily stops 1st federal execution in 16 years November 21, 2019
-
DC priest says he was ‘too busy’ to abuse parishioners November 21, 2019
-
Utah woman faces lewdness charge for being topless at home in front of stepchildren November 21, 2019
-
Teen who ran ‘slave for sale’ Craigslist ad on black classmate faces hate crime charges November 21, 2019


the and with patients respiratory were hMPV The was {background ICU metapneumovirus severe infection pneumonia (nâ€‰=â€‰) human margin {border-style (.) bacterial viral acute px;} study #ffffff;} community-acquired due than March coinfection procalcitonin CAP admitted had associated mechanical admission clinical failure that years for infections out this three week) (.%) (.%), January are during ARDS Care [IQR [], adult antibiotic been care from has not px; requiring without {font-family Intensive []. admission, also being chronic detected developed epidemiological font-size four hospital one samples them tract underwent which (th HMPV Infect July between cases comorbidities double; levels made other plasma respectively. role two young (.%). Dis./ However, SCAP Streptococcus [â€"]. among article border-color border-width characteristics critically different disease epidemic first genotype group have influenza mainly molecular pattern retrospective shock solid; those variables virus when who {font-style {font-weight Additional All April February Human Median Table These University adults adults: al.Human analysis antimicrobial bold but children coinfected coinfection, comorbidities, courier; data effusion elderly em; failure. file half health healthy ill isolated lower main major median most ng/mL obstructive over period pt;} pulmonary required score stay therapy there until ventilation ventilation, ventilation. viruses year younger


Home
Daily Count
Pick-Up & Drop-Off
Customers
Total Daily Amount
0
100
=
0
100
=
0
100
=
0
100
=
0
100
=
0
100
=
Total


Court convicts gunman in murder of businessman Dominic Sytin
Edgardo Luib, convicted of murder and frustrated murder, points to Dominic Sytin's brother Dennis as mastermind. Dennis is at large.
by Lian BuanSubscribe
Email Address
Newsletters
- Glenda Gloria's Take this Tuesday
- Huddle by Miriam Grace Go
- The Newsbreak Agenda by Chay Hofileña
- Sometimes, all you need is video by Lilibeth Frondoso


File Corruption Faults Help
The File Corruption Faults pane shows the corruption faults set on file resources. You can add, remove, and modify File Corruption Faults in this pane.
File Corruption Faults Links
File
Fault Overview
Create
a File Corruption Fault using Random Corruption
Create
a File Corruption Fault using Find and Replace
Create
a File Corruption Fault with Regular Expressions
Tips
To create a file corruption fault click Application > Create a New File Corruption
Fault… This will bring up the file corruption wizard.


Roadmap
This roadmap gives an overview of the project direction. A detailed list of features planned or under consideration can be found in the project boards; priorities are tracked by milestones:
- Version numbers (
0.1
, 0.2
, 0.2.1
, …) track production releases. The next upcoming version has a target date.
- backlog
holds low-priority items.
- unplanned
holds zero-priority items (no feasible path to completion).
Note that all of these are tentative and can be changed, moved, or dropped at any time.
Next
- Lua API improvements
- LSP support improvements (v3.16 spec coverage, configuration)
- Tree-sitter integration (highlighting, folds)
- Better file-change detection
- Unified diagnostics API
- Updated defaults
0.7+
- TUI as a remote UI (
$NVIM
, --remote
)
- Externalized UI: window layout events,
ext_statusline
- Lua remote plugin host
- Embed Neovim everywhere
Completed
Here are the headline features of the previous releases; for details see the corresponding release notes.
- Lua "stdlib"
- Externalized UI: multigrid
- Externalized UI: floating windows
- Externalized UI: messages
- API: buffer update events
- Vimscript expression parser:
nvim_parse_expression()
- Windows: MSVC support
- 0.2.1 Built-in Lua:
vim.api
, :lua
,
nvim_execute_lua()
, …
- 0.2.1 Externalize UI components: cmdline, wildmenu
- 0.2.1 Windows
:terminal
- 0.2.1 Pre-packaged "universal" binary for Linux
- Windows support
- Externalized UI: popumenu
- Externalized UI: tabline
- Pre-packaged builds for Windows and macOS
- First public release
- Publish a stable product that can be used as a benchmark for progress


:: com :: sun :: star :: form ::
|
| interface XUpdateListener |
- Base Interfaces
XUpdateListener
┗ ::com::sun::star::lang::XEventListener
| ::com::sun::star::lang::XEventListener |
- (referenced interface's summary:)
- base interface for all event listeners interfaces.
|
|
- Description
- used to listen on objects which allow updating their data.
In addition to just get notified when an data update happened, the listener
has a chance to veto updates before they happen.
- See also
- XUpdateBroadcaster
|
| Methods' Summary |
| approveUpdate |
is invoked to check the current data.
|
| updated |
is invoked when an object has finished processing the updates and
the data has been successfully written.
|
| Methods' Details |
approveUpdate
- Description
- is invoked to check the current data.
For a given update process, if one of the XUpdateListeners
vetos the change, the update is canceled, and no further notification happens.
- Parameter aEvent
- An event dedscriptor specifying the broadcaster of the change.
- Returns
- true when the update was approved, otherwise false.
|
|
updated
- Description
- is invoked when an object has finished processing the updates and
the data has been successfully written.
- Parameter aEvent
- A event dedscriptor specifying the broadcaster of the change.
|
|
Top of Page
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


For me to do this work for you, you will need to provide me with root or sudo root access via SSH to an Ubuntu 16.04 server. This server must have a public IP address and ideally is running on top of a full virtualization stack (NOT OpenVZ, Docker, LXC). Digital Ocean , Vultr, and Linode are top tier providers that offer these services at affordable prices.
Work around internet censorship and ISP throttled sites or surf securely on public wifi by tunneling all of your traffic over your very own VPN server.
For added security high quality ciphers, long length RSA keys and tls-auth is used. Public non-logging DNS servers are also used while on the VPN by default.
What I need from you:
After the setup:
Connecting to the VPN:
scp root@server:/root/*ovpn .
Adding additional users.
cd /etc/openvpn/easy-rsa/
./easyrsa build-client-full username nopass
cd ..
./gen-client-config.sh username
Config file is under /root/
Removing users
cd /etc/openvpn/easy-rsa/
./easyrsa revoke username
./easyrsa gen-crl
chmod 644 pki/crl.pem
Changing to a LetsEncrypt or some other public cert
Don't do this. OpenVPN authenticates users by issuing and revoking them certs. It does this by using a CA it maintains only for that purpose.
Jenkins is the swiss army knife of IT automation.
Build your code and run tests against it. Setup your own CI/CD pipeline and become a devops guru. Or just use the graphical interface to help automate commonly repeatable tasks.
For added security and flexibility Jenkins is behind an Apache reverse proxy in my setup and Apache has its TLS configuration tuned to receive an "A" rating and for all traffic to be encrypted.
What I need from you:
After the setup:
Trusting the self-signed CA cert and accessing the site
scp root@server:/etc/ssl/myca/myca.crt .
Finishing the configuration
cat /var/lib/jenkins/secrets/initialAdminPassword
follow the onscreen steps.
choose continue as admin if one of the screens doesn't load
Hosting auxiliary content like build artifacts by Apache directly
edit /etc/apache2/sites-enabled/jenkins.conf replacing / with /jenkins/ and adding jenkins
ProxyPass /jenkins/ http://localhost:8080/jenkins/ nocanon
ProxyPassReverse /jenkins/ http://localhost:8080/jenkins/
ProxyPassReverse /jenkins/ http://example.com/jenkins/
edit /etc/default/jenkins
adding $PREFIX
JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT --httpListenAddress=<IP_ADDRESS> --prefix=$PREFIX"
Manage Jenkins in GUI > Configure System > Jenkins URL > https://example.com/jenkins/
systemctl restart apache2
systemctl restart jenkins
Manage Jenkins at https://FQDN/jenkins/ shouldn't show a proxy error at the top
https://FQDN should show the ubuntu splash page
mkdir -p /var/www/html/data
echo "hi" > /var/www/html/data/test.txt
https://FQDN/data/test.txt should be your data
Moving to a LetsEncrypt or some other public CA cert
LetsEncrypt
SSLs
Step 1
Step 2
[Step 3] Copy the files you got via email to your server
[Step 4] (https://helpdesk.ssls.com/hc/en-us/articles/203482651-How-to-install-a-SSL-certificate-on-Apache) update /etc/apache2/sites-enabled/*.conf SSLCertificateFile, SSLCertificateKeyFile, SSLCertificateChainFile options as specified on the page
[Step 5] systemctl restart apache2
J2EE app servers and the code that runs on top of them are the hidden glue that makes the internals of most organizations tick. They are also commonly used for complex websites.
Offer middleware services. Learn java and host your creations here. Find complex applications written by others online and run them.
For added security and flexibility Tomcat is behind an Apache reverse proxy in my setup and Apache has its TLS configuration tuned to receive an "A" rating and for all traffic to be encrypted.
What I need from you:
After the setup:
Trusting the self-signed CA cert and accessing the site
scp root@server:/etc/ssl/myca/myca.crt .
Removing the sample app
vim /etc/apache2/sites-enabled/tomcat.conf
comment out the ProxyPass lines it references
# ProxyPass /sample/ http://<IP_ADDRESS>:8080/sample/
# ProxyPassReverse /sample/ http://<IP_ADDRESS>:8080/sample/
systemctl restart apache2
rm -Rf /var/lib/tomcat8/webapps/sample.war
Deploying another app
vim /etc/apache2/sites-enabled/tomcat.conf
add new ProxyPass lines for the context of the new app (usually its war file name).
ProxyPass /gitblit/ http://<IP_ADDRESS>:8080/gitblit/
ProxyPassReverse /gitblit/ http://<IP_ADDRESS>:8080/gitblit/
systemctl restart apache2
cd /var/lib/tomcat8/webapps
wget http://dl.bintray.com/gitblit/releases/gitblit-1.8.0.war -O gitblit.war
Go to https://FQDN/gitblit/
Moving to a LetsEncrypt or some other public CA cert
SSLs
Step 1
Step 2
[Step 3] Copy the files you got via email to your server
[Step 4] (https://helpdesk.ssls.com/hc/en-us/articles/203482651-How-to-install-a-SSL-certificate-on-Apache) update /etc/apache2/sites-enabled/*.conf SSLCertificateFile, SSLCertificateKeyFile, SSLCertificateChainFile options as specified on the page
[Step 5] systemctl restart apache2
An install of the highly capable and industry standard database. Use it to store website content or anything else you can think of.
I can either install it so that it listens only on localhost or so that it listens on a public IP but requires encrypted TLS connections from its clients. For additional security a random database root password is set, test database is dropped if it exists, any anon accounts are removed and database root remote connectivity is removed if it exists.
What I need from you:
jimmy_com,jimmypw
billy_com,billypw
After the setup:
Viewing databases while on server:
mysql -u root
show databases;
Viewing users while on server:
mysql -u root
SELECT user, host, password FROM mysql.user;
Viewing all users and their permissions while on server:
mysql -u root -e "SELECT CONCAT(QUOTE(user),'@',QUOTE(host)) UserAccount FROM mysql.user;" -B -N | while read line; do mysql -u root -e "SHOW GRANTS FOR ${line};" -B -N; done
Creating a new database and user while on server
mysql -u root
create database example_com;
#remote usage
CREATE USER 'example_com'@'%' IDENTIFIED BY
'test1234';
GRANT ALL PRIVILEGES ON example_com.* TO 'example_com'@'%' identified by 'test1234' REQUIRE SSL;
flush privileges;
#local usage
CREATE USER 'example_com'@'localhost' IDENTIFIED BY 'test1234';
GRANT ALL PRIVILEGES ON example_com.* TO 'example_com'@'localhost' identified by 'test1234';
flush privileges;
Removing a database and user on the server
mysql -u root
drop database example_com;
#remote usage
DROP USER 'example_com'@'%';
flush privileges;
#local usage
DROP USER 'example_com'@'localhost';
flush privileges;
Connecting remotely over TLS
scp root@server:/etc/ssl/myca/myca.crt .
mysql -u example_com -h serverip -p --ssl-ca=myca.crt
#config files like so
ssl-ca = myca.pem
Connecting locally
mysql -u example_com -h localhost -p
Changing to a LetsEncrypt or some other public CA cert
Don't do this. The amount of machines connecting to your database should be small and having to copy a file over should be less messy than dealing with constant renewals. I'd also suggest looking into doing TLS client auth so your users auth with a cert and a password.
Copy over your website, store backups, share data with friends, etc.
An FTP server will allow you to easily upload and download files to/from your server from any device using a protocol that has been around since the dawn of the internet. As an added bonus each FTP user will also be able to scp data to your server and ssh into your server if you change your ssh config to allow it or if it comes that way out of the box with your VPS provider.
For added security pure-ftpd is configured so that you can connect over TLS and so that unless you specify otherwise users are locked into their home directories.
What I need from you:
bill,test1234,false
jim,test1234,true
After the setup:
Connecting to the server:
Follow this but substitute your IP and credentials
Creating another user
useradd -m testuser -s /bin/bash
passwd testuser
Removing a user
userdel -r testuser
#-r alos removes their home dir
Removing the chroot (home dir lock) from a user
usermod -a -G nonjailedftp testuser
Locking somebody to their home directory who currently isn"™t
gpasswd -d testuser nonjailedftp
Choosing what users can SSH in
vim /etc/ssh/sshd_config
#if you want users to be able to login via password. Otherwise you will need to install their ssh keys for them
PasswordAuthentication yes
#list all the people you want to be able to ssh in
AllowUsers root bill
systemctl restart sshd
Changing to a LetsEncrypt or some other public CA cert
Unless your FTP site is being used by tons of users it probably isn't worth doing. You can tell your friend what cert to trust.
Rough guide
SSLs
Step 1
Step 2
[Step 3] Copy the files you got via email to your server
[Step 4] cat server.key server.crt intermediateca.crt > /etc/ssl/private/pure-ftpd.pem
[Step 5] systemctl restart pure-ftpd
Run multiple dynamic sites like my-wordpress-blog.com and my-brothers-phpbb-forum.com all from the same server. This setup features Apache, PHP and MaraiDB. Databases and folder structures will be pre-created based on information you give me.
For added security Apache has its TLS configuration tuned to receive an "A" rating. And MariaDB is bound to localhost, has had its remote root connectivity and anon accounts removed.
What I need from you:
jimmy_com,jimmypw,jimmy.com
billy_com,billypw,billy.com
After the setup:
Trusting the self-signed CA cert and accessing the site
scp root@server:/etc/ssl/myca/myca.crt .
Creating a new cert, database, site
cd /etc/ssl/myca/
openssl req -newkey rsa:4096 -keyout example.com.key -new -sha256 -nodes -days 3650 -subj "/C=US/ST=Any/O=Any/CN=example.com" -reqexts SAN -config <(cat /etc/ssl/myca/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:example.com,DNS:www.example.com")) -out example.com.csr
chmod 600 example.com.key
openssl ca -config openssl.cnf -extensions v3_server -days 3650 -notext -md sha256 -in example.com.csr -out example.com.crt -keyfile myca.key -cert myca.crt -batch
chown root:ssl-cert example.com.crt
mysql -u root
create database example_com;
CREATE USER 'example_com'@'localhost' IDENTIFIED BY 'test1234';
GRANT ALL PRIVILEGES ON example_com.* TO 'example_com'@'localhost' identified by 'test1234';
flush privileges;
quit
mkdir -p /var/www/example.com/public_html
chown -Rf www-data:www-data /var/www/example.com/
cd /etc/apache2/sites-available/
cp existing.com.conf example.com.conf
vim example.com.conf
#replace all instances of old domain with new domain in the file
:%s/existing.com/example.com/g
:wq!
a2ensite example.com.conf
systemctl restart apache2
make sure DNS for the new site is pointed at your server, add content to /var/www/example.com/public_html and visit example.com to see it
Different PHP applications require different php modules to function. You can see what modules are installed by doing a dpkg -l | grep php
. You can find more by doing a apt-cache search php
and install additional the one your application requires by doing a apt-get install php-mbstring
or similar.
Application install example. Follow your applications install instructions, this is just to prove the server setup is working. I'm using the "jimmy" from the What I Need From You section in this example.
cd /var/www/jimmy.com/public_html/
wget https://wordpress.org/latest.tar.gz
tar xzvf latest.tar.gz
https://jimmy.com/wordpress/
#finish the install screens
DB Name: jimmy_com
User name: jimmy_com
Password: jimmypw
..keep the other defaults...
copy the text in the "sorry I can't write" page
vim wordpress/wp-config.php
paste the text
:wq
Run the install
Fill out the rest however you want, login create a blog entry then logout and view it
Deleting a cert, database, site
a2dissite example.com
systemctl restart apache2
#optionally, the following will delete all data associated with the site
rm -Rf /etc/ssl/myca/example.com.* /etc/apache2/sites-available/example.com.conf /var/www/example.com/
mysql -u root
drop database example_com;
DROP USER 'example_com'@'localhost';
flush privileges;
quit
Moving to a LetsEncrypt or some other public CA cert
SSLs
Step 1
Step 2
[Step 3] Copy the files you got via email to your server
[Step 4] (https://helpdesk.ssls.com/hc/en-us/articles/203482651-How-to-install-a-SSL-certificate-on-Apache) update /etc/apache2/sites-enabled/*.conf SSLCertificateFile, SSLCertificateKeyFile, SSLCertificateChainFile options as specified on the page
[Step 5] systemctl restart apache2
Have a password protected file dump part of your website where you and your friends share content.
What I need from you:
jimmy_com,jimmypw
billy_com,billypw
After the setup:
Trusting the self-signed CA cert and accessing the site
scp root@server:/etc/ssl/myca/myca.crt .
Connecting via webdav
This is a great tutorial for multiple operating systems. Just substitute https://server/webdav/ as the path and a username and password you choose.
Creating another user
htpasswd /etc/apache2/.htpasswd testuser
Deleting a user
htpasswd -D /etc/apache2/.htpasswd testuser
Moving to a LetsEncrypt or some other public CA cert
SSLs
Step 1
Step 2
[Step 3] Copy the files you got via email to your server
[Step 4] (https://helpdesk.ssls.com/hc/en-us/articles/203482651-How-to-install-a-SSL-certificate-on-Apache) update /etc/apache2/sites-enabled/*.conf SSLCertificateFile, SSLCertificateKeyFile, SSLCertificateChainFile options as specified on the page
[Step 5] systemctl restart apache2


Working as a class, use the map in Figure 6.8.1 to calculate the total amount you would pay on a payday loan of $400 in every state. According to the Center for Responsible Lending, the average payday borrower flips the loan 8 times, so we will use 18 weeks (the initial 2 weeks plus 8 more 2 week periods) for the borrowing time. Calculate the amount that the borrower would pay, using simple interest and the APR rates from Figure 6.8.1 to find how much the typical borrower would pay on the loan in each state where payday lending is still allowed.
in-context


espn_mbb_conferences.Rd
Get ESPN conference names and ids
Get ESPN conference names and ids
espn_mbb_conferences() espn_mbb_conferences()
Saiem Gilani
Saiem Gilani
espn_mbb_conferences()#> groupId shortName uid name #> 1 0 Top 25 <NA> <NA> #> 2 50 ALL s:40~l:41~g:50 NCAA Division I #> 3 3 A 10 s:40~l:41~g:3 Atlantic 10 Conference #> 4 2 ACC s:40~l:41~g:2 Atlantic Coast Conference #> 5 46 ASUN s:40~l:41~g:46 ASUN Conference #> 6 1 Am. East s:40~l:41~g:1 America East Conference #> 7 62 American s:40~l:41~g:62 American Athletic Conference #> 8 8 Big 12 s:40~l:41~g:8 Big 12 Conference #> 9 4 Big East s:40~l:41~g:4 Big East Conference #> 10 5 Big Sky s:40~l:41~g:5 Big Sky Conference #> 11 6 Big South s:40~l:41~g:6 Big South Conference #> 12 7 Big Ten s:40~l:41~g:7 Big Ten Conference #> 13 9 Big West s:40~l:41~g:9 Big West Conference #> 14 11 C-USA s:40~l:41~g:11 Conference USA #> 15 10 CAA s:40~l:41~g:10 Colonial Athletic Association #> 16 45 Horizon s:40~l:41~g:45 Horizon League #> 17 12 Ivy s:40~l:41~g:12 Ivy League #> 18 13 MAAC s:40~l:41~g:13 Metro Atlantic Athletic Conference #> 19 14 MAC s:40~l:41~g:14 Mid-American Conference #> 20 16 MEAC s:40~l:41~g:16 Mid-Eastern Athletic Conference #> 21 18 MVC s:40~l:41~g:18 Missouri Valley Conference #> 22 44 Mountain West s:40~l:41~g:44 Mountain West Conference #> 23 19 NEC s:40~l:41~g:19 Northeast Conference #> 24 20 OVC s:40~l:41~g:20 Ohio Valley Conference #> 25 21 Pac-12 s:40~l:41~g:21 Pac-12 Conference #> 26 22 Patriot s:40~l:41~g:22 Patriot League #> 27 23 SEC s:40~l:41~g:23 Southeastern Conference #> 28 26 SWAC s:40~l:41~g:26 Southwestern Athletic Conference #> 29 24 Southern s:40~l:41~g:24 Southern Conference #> 30 25 Southland s:40~l:41~g:25 Southland Conference #> 31 49 Summit s:40~l:41~g:49 Summit League #> 32 27 Sun Belt s:40~l:41~g:27 Sun Belt Conference #> 33 30 WAC s:40~l:41~g:30 Western Athletic Conference #> 34 29 WCC s:40~l:41~g:29 West Coast Conference #> logo #> 1 <NA> #> 2 <NA> #> 3 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/atlantic_10.png #> 4 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/acc.png #> 5 <NA> #> 6 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/america_east.png #> 7 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/american.png #> 8 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_12.png #> 9 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_east.png #> 10 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_sky.png #> 11 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_south.png #> 12 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_ten.png #> 13 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_west.png #> 14 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/conference_usa.png #> 15 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/colonial.png #> 16 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/horizon.png #> 17 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/ivy.png #> 18 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/maac.png #> 19 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/mid_american.png #> 20 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/meac.png #> 21 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/missouri_valley.png #> 22 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/mountain_west.png #> 23 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/northeast.png #> 24 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/ohio_valley.png #> 25 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/pac_12.png #> 26 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/patriot_league.png #> 27 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/sec.png #> 28 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/swac.png #> 29 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/southern.png #> 30 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/southland.png #> 31 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/summit_league.png #> 32 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/sun_belt.png #> 33 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/wac.png #> 34 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/west_coast.png #> parentGroupId #> 1 <NA> #> 2 <NA> #> 3 50 #> 4 50 #> 5 50 #> 6 50 #> 7 50 #> 8 50 #> 9 50 #> 10 50 #> 11 50 #> 12 50 #> 13 50 #> 14 50 #> 15 50 #> 16 50 #> 17 50 #> 18 50 #> 19 50 #> 20 50 #> 21 50 #> 22 50 #> 23 50 #> 24 50 #> 25 50 #> 26 50 #> 27 50 #> 28 50 #> 29 50 #> 30 50 #> 31 50 #> 32 50 #> 33 50 #> 34 50espn_mbb_conferences()#> groupId shortName uid name #> 1 0 Top 25 <NA> <NA> #> 2 50 ALL s:40~l:41~g:50 NCAA Division I #> 3 3 A 10 s:40~l:41~g:3 Atlantic 10 Conference #> 4 2 ACC s:40~l:41~g:2 Atlantic Coast Conference #> 5 46 ASUN s:40~l:41~g:46 ASUN Conference #> 6 1 Am. East s:40~l:41~g:1 America East Conference #> 7 62 American s:40~l:41~g:62 American Athletic Conference #> 8 8 Big 12 s:40~l:41~g:8 Big 12 Conference #> 9 4 Big East s:40~l:41~g:4 Big East Conference #> 10 5 Big Sky s:40~l:41~g:5 Big Sky Conference #> 11 6 Big South s:40~l:41~g:6 Big South Conference #> 12 7 Big Ten s:40~l:41~g:7 Big Ten Conference #> 13 9 Big West s:40~l:41~g:9 Big West Conference #> 14 11 C-USA s:40~l:41~g:11 Conference USA #> 15 10 CAA s:40~l:41~g:10 Colonial Athletic Association #> 16 45 Horizon s:40~l:41~g:45 Horizon League #> 17 12 Ivy s:40~l:41~g:12 Ivy League #> 18 13 MAAC s:40~l:41~g:13 Metro Atlantic Athletic Conference #> 19 14 MAC s:40~l:41~g:14 Mid-American Conference #> 20 16 MEAC s:40~l:41~g:16 Mid-Eastern Athletic Conference #> 21 18 MVC s:40~l:41~g:18 Missouri Valley Conference #> 22 44 Mountain West s:40~l:41~g:44 Mountain West Conference #> 23 19 NEC s:40~l:41~g:19 Northeast Conference #> 24 20 OVC s:40~l:41~g:20 Ohio Valley Conference #> 25 21 Pac-12 s:40~l:41~g:21 Pac-12 Conference #> 26 22 Patriot s:40~l:41~g:22 Patriot League #> 27 23 SEC s:40~l:41~g:23 Southeastern Conference #> 28 26 SWAC s:40~l:41~g:26 Southwestern Athletic Conference #> 29 24 Southern s:40~l:41~g:24 Southern Conference #> 30 25 Southland s:40~l:41~g:25 Southland Conference #> 31 49 Summit s:40~l:41~g:49 Summit League #> 32 27 Sun Belt s:40~l:41~g:27 Sun Belt Conference #> 33 30 WAC s:40~l:41~g:30 Western Athletic Conference #> 34 29 WCC s:40~l:41~g:29 West Coast Conference #> logo #> 1 <NA> #> 2 <NA> #> 3 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/atlantic_10.png #> 4 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/acc.png #> 5 <NA> #> 6 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/america_east.png #> 7 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/american.png #> 8 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_12.png #> 9 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_east.png #> 10 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_sky.png #> 11 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_south.png #> 12 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_ten.png #> 13 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/big_west.png #> 14 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/conference_usa.png #> 15 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/colonial.png #> 16 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/horizon.png #> 17 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/ivy.png #> 18 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/maac.png #> 19 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/mid_american.png #> 20 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/meac.png #> 21 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/missouri_valley.png #> 22 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/mountain_west.png #> 23 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/northeast.png #> 24 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/ohio_valley.png #> 25 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/pac_12.png #> 26 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/patriot_league.png #> 27 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/sec.png #> 28 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/swac.png #> 29 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/southern.png #> 30 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/southland.png #> 31 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/summit_league.png #> 32 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/sun_belt.png #> 33 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/wac.png #> 34 https://a.espncdn.com/i/teamlogos/ncaa_conf/500/west_coast.png #> parentGroupId #> 1 <NA> #> 2 <NA> #> 3 50 #> 4 50 #> 5 50 #> 6 50 #> 7 50 #> 8 50 #> 9 50 #> 10 50 #> 11 50 #> 12 50 #> 13 50 #> 14 50 #> 15 50 #> 16 50 #> 17 50 #> 18 50 #> 19 50 #> 20 50 #> 21 50 #> 22 50 #> 23 50 #> 24 50 #> 25 50 #> 26 50 #> 27 50 #> 28 50 #> 29 50 #> 30 50 #> 31 50 #> 32 50 #> 33 50 #> 34 50


->/2 (arrow)
->/2 – if-then, and if-then-else
FORMS
Condition -> TrueGoal
Condition -> TrueGoal ; FalseGoal
DESCRIPTION
If Condition succeeds, then TrueGoal will be executed. If-then implicitly cuts the Condition. Cuts that occur within Condition or TrueGoal will cut back to the head of the parent clause. If Condition fails, then the call to ->/2 fails. The second form, results from the interaction between ;/2 and ->/2 because
Condition -> TrueGoal ; FalseGoal
is actually executed as:
(Condition -> TrueGoal) ; FalseGoal
In this case, FalseGoal will be executed instead of TrueGoal when Condition fails.
Cuts occurring in
Condition
TrueGoal
FalseGoal
cut back to the head of the parent clause.
EXAMPLES
?- true -> write(a).
a
yes.
?- fail -> write(a).
no.
?- fail -> write(a) ; write(b).
b
yes.
SEE ALSO
!/0, not/1,
[Bowen 91, 7.1], [Sterling 86, 11], [Bratko 86, 5.1], [Clocksin 81, 4.2].


IPython Notebooks¶
To do the analysis, we have divided the technical part of the analysis according to the analysis sections in the main articles. Feel free to look under the hood of these IPython notebooks to go over how we did these analyses.
To do the analysis, we have divided the technical part of the analysis according to the analysis sections in the main articles. Feel free to look under the hood of these IPython notebooks to go over how we did these analyses.


◆ __init__()
| def query.QueryProcessor.__init__ |
( |
|
self, |
|
|
|
query, |
|
|
|
index_file, |
|
|
|
collection |
|
) |
| |
@param self
@param query
@param index
@param collection
@return None
@brief The constructor.
This process is extremely expensive because it loads the entire pickle object into memory.
If we are only executing this for one query it is fine but if we are doing it
for the evaluation used the load query instead
@exception None documented yet
index is the inverted index; collection is the document collection
◆ booleanQuery()
| def query.QueryProcessor.booleanQuery |
( |
|
self | ) |
|
This method does the boolean query processing.
- Parameters
-
- Returns
- results:list[docID]
- Bug:
- Fixed
- Exceptions
-
◆ cosine_similarity()
| def query.QueryProcessor.cosine_similarity |
( |
|
self, |
|
|
|
vec1, |
|
|
|
vec2 |
|
) |
| |
This method compute cosine similarity for two vectors.
- Parameters
-
- Returns
- score cosine: int
- Exceptions
-
◆ loadQuery()
| def query.QueryProcessor.loadQuery |
( |
|
self, |
|
|
|
query |
|
) |
| |
This method is used to load the next query for evaluation.
- Parameters
-
- Returns
- None
- Exceptions
-
◆ preprocessing()
| def query.QueryProcessor.preprocessing |
( |
|
self, |
|
|
|
raw_query |
|
) |
| |
This method is used to load the next query for evaluation.
- Parameters
-
- Returns
- None
- Exceptions
-
◆ vectorQuery()
| def query.QueryProcessor.vectorQuery |
( |
|
self, |
|
|
|
k |
|
) |
| |
This method compute vector model.
- Parameters
-
- Returns
- cosines: dict{docID: score}
- Bug:
- Fixed
- Exceptions
-
◆ docs
| query.QueryProcessor.docs |
◆ index
| query.QueryProcessor.index |
◆ processed_query
| query.QueryProcessor.processed_query |
◆ raw_query
| query.QueryProcessor.raw_query |
◆ tokenizer
| query.QueryProcessor.tokenizer |
The documentation for this class was generated from the following file:
- C:/Users/natcr/Desktop/College/CS 7800 Information Retrieva/Project/SimpleSearchEngine/src/query.py


MKApplication Class Reference
| Inherits from | UIApplication |
| Declared in | MKApplication.h |
Overview
Overview
MKApplication subclasses UIApplication to add some special methods.
Important Notice To use MKApplication you must add the class files to your project. Make sure to check the Copy items into projects destination group folder
box.
Usage
To use MKApplication you need make changes in your applications main.m file. Replace the method call UIApplicationMain(argc, argv, nil, nil)
with UIApplicationMain(argc, argv, @"MKApplication", nil)
.
Required Frameworks
- Fondation
- UIKit
Tasks
Idle Timer
-
useIdleTimer
Set this property to YES to turn on an idle timer for the application. An Idle timer will send a message if there are no touches for a set amount of time. -
minutes
The number of minutes until an idle timer expires. Default is 5 mins. -
- resetIdleTimer
Resets the idle timer. If useIdleTimer is set toNO
calling this method will change set it toYES
. -
- cancelIdleTimer
Cancels the idle timer and removes it. Use this method to stop a timer when the application enters the background.
Instance Methods
cancelIdleTimer
Cancels the idle timer and removes it. Use this method to stop a timer when the application enters the background.
- (void)cancelIdleTimer
Declared In
MKApplication.h
resetIdleTimer
Resets the idle timer. If useIdleTimer is set to NO
calling this method will change set it to YES
.
- (void)resetIdleTimer
Declared In
MKApplication.h
Properties
minutes
The number of minutes until an idle timer expires. Default is 5 mins.
@property (nonatomic, assign) NSInteger minutes
Declared In
MKApplication.h
useIdleTimer
Set this property to YES to turn on an idle timer for the application. An Idle timer will send a message if there are no touches for a set amount of time.
@property (nonatomic, assign) BOOL useIdleTimer
Discussion
Set this property to YES to turn on an idle timer for the application. An Idle timer will send a message if there are no touches for a set amount of time.
The timer will post a MKApplicationIdleTimeDidExpire
Notification when the time is up.
The idle time is automatically reset everytime the user touhes anywhere on the screen. You can reset the timer yourself at anytime by calling the resetIdleTimer method.
See Also
Declared In
MKApplication.h


Bluebucket offers a unique platform for restaurants to fulfill their desire to be active in the philanthropic ventures in their communities. The vision of BlueBucket is to “unite restaurants, patrons, and the community.”
Coffee for a Cure is a program run by Notre Dame's residential community allowing students to financially empower science research on campus by purchasing cost-competitive K-Cups, with a portion of each sale benefiting our research.
The Ampush media team has partnered with the Raphael House of San Francisco to amplify its marketing objectives: acquire user signups for its Adopt a Family Program as well as collect donations for the organization. By leveraging the power of Facebook ad types, Ampush and the Raphael House hope to use Facebook for good and revolutionize the way charities achieve their goals and objectives.


--- ---
Department of Science and Technology (DST) Through FIST Programme Ph.II, 2009-2014
University Grants Commission (UGC)Through UGC-SAP-Centre for Advanced Study Ph.I,2011 - 2016


You read a book on your phone, find something inspiring, and then you highlight it. Several days later, you want to cite it but can’t remember in where to find it.
You take notes on Evernote while you read book in iBook. You tweet links while you read articles on Medium. You write in your notebook placed next to your pillow.
People take notes to review and digest. People read, get inspired, take notes and write, rethink, learn, correct, reflect on, and get mature step by step.
This is a design concept to make notes as an independent project. It keeps track of your inspiration, knowledge, things and questions by date and by source. It’s a reflection of your mindset. It’s the basis to know yourself better.
TheOne collects notes as a timeline by default. It can also catagoize by source. It synchonizes between different devices.s


| (A) | ---- no text ---- | |
| 323 | (C) | Towred witħ torettes . was þe tente þanne |
| 324 | (D) | Tourid with touretis was þe tent þan |
| 325 | (E) | ¶ Toured with turettes . ȝit were þe tentys . |
| (Ex) | ---- no text ---- | |
| 333 | (L) | Toured with torettes was þe tente þanne |
| (P) | ---- no text ---- | |
| 318 | (U) | Toured witħ turrets / was the toun thenne |
| (V) | ---- no text ---- |


ControlZ
menu
FighterZ
Team Builder
Saved TeamZ
ControlZ
How to Play
About
FighterZ
Team Builder
Saved TeamZ
ControlZ
How to Play
About
Choose ControlZ!
ATTACK
Light Attack
Medium Attack
Heavy Attack
Special Attack
Assist 1
Assist 2
Dragon Rush
Ki Charge
Sparking Blast
Super Dash
Vanish


Resize this window to checkout the result. To be able to use this mixins, you should choose how many screen size you're about to support


| Jump to DART Documentation Main Index |
Utility program which computes a table of values needed to apply Sampling Error Correction (SEC) during assimilation. These values are used to correct covariances based on small sample size statistics. See reference below.
The name of the SEC table is always sampling_error_correction_table.nc. This is a NetCDF format file. If this file already exists in the current directory any tables for new ensemble sizes will be appended to the existing file. If the file does not exist a new file will be created by this tool. The resulting file should be copied into the current working directory when filter is run.
A file with 40 common ensemble sizes is distributed with the system. Any new ensemble sizes can be generated on demand. Be aware that the computation can be time consuming. The job may need to be submitted to a batch system if many new ensemble sizes are being generated, or start the job on a laptop and leave it to run overnight.
The file contains a "sparse array" of ensemble sizes. Only sizes which have an existing table are stored in the file so large ensemble sizes do not require a large jump in the size of the output file.
This program uses the random number generator to compute the correction factors. The generator is seeded with the ensemble size so repeated runs of the program will generate the same values for the tables.
This namelist is read from the file input.nml. Namelists start with an ampersand '&' and terminate with a slash '/'. Character strings that contain a '/' must be enclosed in quotes to prevent them from prematurely terminating the namelist.
&gen_sampling_error_table_nml ens_sizes = -1 debug = .false. /
| Item | Type | Description | |
|---|---|---|---|
| ens_sizes | integer(200) | List of ensemble sizes to compute Sampling Error Correction
tables for. These do not need to be in any particular order. Duplicates
will be removed and any sizes which already have tables computed in the
output file will be skipped. The file which comes with the system
already has tables computed for these ensemble sizes:
ens_sizes = 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 22, 24, 28, 30, 32, 36, 40, 44, 48, 49, 50, 52, 56, 60, 64, 70, 72, 80, 84, 88, 90, 96, 100, 120, 140, 160, 180, 200 | |
| debug | logical | If true print out debugging info. |
To add tables for ensemble sizes 128 and 256 run the program with this namelist:
&gen_sampling_error_table_nml ens_sizes = 128, 256, debug = .false. /
types_mod utilities_mod random_seq_mod netcdf
| Routine | Message | Comment |
|---|---|---|
| gen_sampling_err_tool |
This table was regenerated using a different random number generator than the Lanai release of DART used. If you are doing a regression test with Lanai and have Sampling Error Correction enabled you will not get bitwise reproducible results. Contact the DART team if you are interested in a table that includes the exact tables used in the Lanai version.
none
DART software - Copyright UCAR. This open source software is provided by UCAR, "as is", without charge, subject to all terms of use at http://www.image.ucar.edu/DAReS/DART/DART_download


#This is a simple function to return the time remaining until the target event, for this example New Year's day 2016 #as well as a function to return a random banner image from a pool


jQuery Filter Elements Plugin
Hi there!
Here you will find some sample usages of the plugin.
GitHub Repository -
jQuery Filter Elements Plugin
@Author - Nirbhay Pherwani -
https://nirbhay.me
Example 1 - With Simple List Group [Case Insensitive]
This is a list group item
This is a primary list group item
This is a secondary list group item
This is a success list group item
This is a danger list group item
This is a warning list group item
This is a info list group item
This is a light list group item
This is a dark list group item
Example 2 - With Simple List Group [Case Sensitive]
This is a list group item
This is a primary list group item
This is a secondary list group item
This is a primary list group item
This is a secondary list group item
This is a primary list group item
This is a secondary list group item
This is a primary list group item
This is a secondary list group item
Example 3 - With Table [Marking Filtered and UnFiltered Items]
#
First
Last
Handle
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry
the Bird
@twitter
4
Nirbhay
the Eagle
@instagram
5
Mora
the Ant
@github


Routing
RESTful routes
Your controller name should be related to a resource
Your controller name, when related to a resource should be plural.
Keep your controller "Cruddy by design"
"Cruddy by Design" is a concept introduced by Adam Wathan in its Laracon 2017 Talk.
// Payment Methods
PaymentMethodsController::class
// Disabled Payment Methods
DisabledPaymentMethodsController::class
// Payment Methods of an user
UserPaymentMethodsController::class
// Disabled Payment Methods of an user
UserDisabledPaymentMethodsController::class
Route declaration
Use the route tuple notation when possible.
// 👎🏻
Route::get('payments', 'PaymentsController@index')->name(...);
// ✅
Route::get('payments', [PaymentsController::class, 'index'])->name(...);
Use the http verb first
// 👎🏻
Route::name('payments.index')
->get('payments', [PaymentsController::class, 'index']);
// ✅
Route::get('payments', [PaymentsController::class, 'index'])
->name('payments.index');
Always name your routes
// 👎🏻
Route::get('payments', [PaymentsController::class, 'index']);
// ✅
Route::get('payments', [PaymentsController::class, 'index'])
->name('payments.index');
Url names
Urls must use kebab-case
If the route name relates to an resource, use plural.
// 👎🏻
Route::get('payment_methods', ...);
Route::get('paymentMethods', ...);
Route::get('payment--methods', ...);
// ✅
Route::get('payment-methods', ...);
Route::get('enabled-payment-methods', ...);
Route names
Route names must use kebab-case.
Route names must have a resource or domain followed by an action {resource}.{action}
Resource name should be plural.
A resource in this example is: PaymentMethod -> payment-methods
// 👎🏻
Route::get('payment-methods', ...)->name('payment_methods.index');
Route::get('payment-methods', ...)->name('paymentMethods.index');
Route::get('payment-methods', ...)->name('payment.methods.index');
// ✅
Route::get('payment-methods', ...)->name('payment-methods.index');
Actions should be CRUD names index, create, store, show, edit, update, destroy
// 👎🏻
Route::get('payment-methods', ...)->name('payment-methods');
Route::get('payment-methods', ...)->name('payment-methods-index');
Route::get('payment-methods', ...)->name('payment-methods.list');
// ✅
Route::get('payment-methods', ...)->name('payment-methods.index');
Route names with relationships
Route names that work with relationships must use names in the same order as the url and separated by a dot .
// 👎🏻
Route::get('users/{user}/payment-methods', ...)->name('user-payment-methods.index');
Route::get('users/{user}/payment-methods', ...)->name('payment-methods.user.index');
Route::get('users/{user}/payment-methods', ...)->name('payment-methods.index.user');
// ✅
Route::get('users/{user}/payment-methods', ...)->name('users.payment-methods.index');
Route parameters
Route parameters should be related to a resource.
Route parameters should be singular.
Route parameters should use snake_case
// 👎🏻
Route::get('payment-methods/{paymentMethod}', ...);
Route::get('payment-methods/{payment-method}', ...);
Route::get('payment-methods/{payment_methods}', ...);
// ✅
Route::get('payment-methods/{payment_method}', ...);
Testing
When testing endpoints use plain routes
// 👎🏻
$this->actingAs($user)->get(route('payment-methods.index'));
// ✅
$this->actingAs($user)->get('/payment-methods');


<< Previous Session
|
Next Session >>
Assessment - Lecture Quiz
Lecture 9: Corporate Stocks
1
.
According to data from the World Bank about the value of corporate stock as traded on stock markets, which country's or which region's stock market has the highest absolute value as of 2008?
Points = 2.0
Japan.
United Kingdom.
United States of America.
Euro-area, i.e. the countries whose currency is the euro.
2
.
What was the main point that Eugene Fama and Kenneth French made in their article in the Journal of Financial Economics from 2005 about Stuart Myers's Pecking Order Theory?
Points = 2.0
The Pecking Order Theory by Myers emphasizes a subordinate role of equity issuance, as compared to other forms or corporate financing. However, Myers only considered net equity issuance, whereas Fama and French looked at equity issuances and stock repurchases separately, disproving the subordinate role of equity issuance.
The Pecking Order Theory by Myers states that firms do not issue any dividends. Fama and French, in their more recent analysis, establish that firms started to issue dividends again.
Myers finds evidence contrary to the Capital Asset Pricing Model, whereas Fama and French confirm the Capital Asset Pricing Model.
The article by Fama and French does not address Pecking Order Theory at all.
3
.
What is a company's market capitalization, as explained in the lecture?
Points = 2.0
It is the company's assets minus its liabilities.
It is the number of the outstanding shares of the company multiplied by the stock price.
It is the value of the company's capitalization assets?
It is a synonym for the share repurchases that the company has undertaken in the past fiscal year.
4
.
When General Motors got into a crisis in 2009, the U.S. government bailed it out. Through which channel of financing did the bailout proceed?
Points = 2.0
The U.S. government guaranteed bank loans to General Motors.
The U.S. government bought preferred shares in General Motors.
The U.S. government bought common shares in General Motors.
The U.S. government bought General Motors bonds?
5
.
What are the main implications of John Lintner's dividend model?
Points = 2.0
A firm should never pay any dividends.
A firm should always pay a dividend equal to its EPS (earnings per share).
A firm has to strike a balance. On the one hand, it should pay a dividend to share some of its earnings with its shareholders. On the other hand, its dividend should not be too high, because that might lead to a cut in the dividend in a following year, which leads to a negative reaction among shareholders.
If EPS is bigger than last year's dividend, the firm should pay out the difference as a dividend. If EPS is smaller than last year's dividend, the firm should engage in share repurchases.
Status
Submit
Close