Cookies are a mechanism allowing applications to maintain state on top of the stateless HTTP protocol.
Cowboy provides facilities for handling cookies. It is highly recommended to use them instead of writing your own, as the implementation of cookies can vary greatly between clients.
Cookies are stored client-side and sent with every subsequent request that matches the domain and path for which they were stored, including requests for static files. For this reason they can incur a cost which must be taken in consideration.
Also consider that, regardless of the options used, cookies are not to be trusted. They may be read and modified by any program on the user's computer, but also by proxies. You should always validate cookie values before using them. Do not store any sensitive information in cookies either.
When explicitly setting the domain, the cookie will be sent for the domain and all subdomains from that domain. Otherwise the current domain will be used. The same is true for the path.
When the server sets cookies, they will only be available for requests that are sent after the client receives the response.
Cookies are sent in HTTP headers, therefore they must have text values. It is your responsibility to encode any other data type. Also note that cookie names are de facto case sensitive.
Cookies can be set for the client session (which generally means until the browser is closed), or it can be set for a number of seconds. Once it expires, or when the server says the cookie must exist for up to 0 seconds, the cookie is deleted by the client. To avoid this while the user is browsing your site, you should set the cookie for every request, essentially resetting the expiration time.
Cookies can be restricted to secure channels. This typically means that such a cookie will only be sent over HTTPS, and that it will only be available by client-side scripts that run from HTTPS webpages.
Finally, cookies can be restricted to HTTP and HTTPS requests, essentially disabling their access from client-side scripts.
By default, cookies you set are defined for the session.
SessionID = generate_session_id(), Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [], Req).
You can also make them expire at a specific point in the future.
SessionID = generate_session_id(), Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [ {max_age, 3600} ], Req).
You can delete cookies that have already been set. The value is ignored.
Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, <<>>, [ {max_age, 0} ], Req).
You can restrict them to a specific domain and path. For example, the following cookie will be set for the domain my.example.org
and all its subdomains, but only on the path /account
and all its subdirectories.
Req2 = cowboy_req:set_resp_cookie(<<"inaccount">>, <<"1">>, [ {domain, "my.example.org"}, {path, "/account"} ], Req).
You can restrict the cookie to secure channels, typically HTTPS.
SessionID = generate_session_id(), Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [ {secure, true} ], Req).
You can restrict the cookie to client-server communication only. Such a cookie will not be available to client-side scripts.
SessionID = generate_session_id(), Req2 = cowboy_req:set_resp_cookie(<<"sessionid">>, SessionID, [ {http_only, true} ], Req).
Cookies may also be set client-side, for example using Javascript.
As we said, the client sends cookies with every request. But unlike the server, the client only sends the cookie name and value.
You can read the value of a cookie.
{CookieVal, Req2} = cowboy_req:cookie(<<"lang">>, Req).
You can also get a default value returned when the cookie isn't set.
{CookieVal, Req2} = cowboy_req:cookie(<<"lang">>, Req, <<"fr">>).
And you can obtain all cookies at once as a list of key/value tuples.
{AllCookies, Req2} = cowboy_req:cookies(Req).


{% extends 'base.html' %} {% block title %} {{title}} {% endblock %} {% block content %} {{friendly_message}} {{friendly_description}} Or, try these links instead: Home Page Search the Archive Approaches to the Collection About the Project If you see this message repeatedly, contact us at<EMAIL_ADDRESS>for assistance. {% endblock %}
{{friendly_description}}
Or, try these links instead:
If you see this message repeatedly, contact us at<EMAIL_ADDRESS>for assistance.


Assembling data¶
- What constitutes a good assembly?
- How to estimate assembly quality
- Host decontamination
- Raw read deposition vs assembly
- Co-assembly
Prerequisites¶
For this tutorial you will need to make a working directory to store your data in.
mkdir -p ~/BiATA/session1/data
chmod -R 777 ~/BiATA
export DATADIR=~/BiATA/session1/data
In this directory, downloaded the tarball from http://ftp.ebi.ac.uk/pub/databases/metagenomics/mgnify_courses/biata_2020/
cd ~/BiATA/session1/data
wget -q http://ftp.ebi.ac.uk/pub/databases/metagenomics/mgnify_courses/biata_2020/session1.tgz
tar xzvf session1.tgz
Now makes sure that you have pulled the docker container
docker pull microbiomeinformatics/biata-qc-assembly
Finally, start the docker container in the following way:
docker run --rm -it -e DISPLAY=$DISPLAY -v $DATADIR:/opt/data -v /tmp/.X11-unix:/tmp/.X11-unix:rw -e DISPLAY=docker.for.mac.localhost:0 biata-qc-assembly
Part 1 - Quality control and filtering of the raw sequence files¶
Learning Objectives - in the following exercises you will learn how to check on the quality of short read sequences: identify the presence of adaptor sequences, remove both adaptors and low quality sequences. You will also learn how to construct a reference database for host decontamination.
First go to your working area, the data that you downloaded
has been mounted in /opt/data
in the docker container.
cd /opt/data
ls
Here you should see the same contents as you had from downloading and uncompressing the session data. As we write into this directory, we should be able to see this from inside the container, and on the filesystem of the computer running this container. We will use this to our advantage as we go through this practical. Unless stated otherwise all of the following commands should be executed in the terminal running the Docker container.
Generate a directory of the fastqc results
cd /opt/data
mkdir fastqc_results
fastqc oral_human_example_1_splitaa.fastq.gz --outdir fastqc_results
fastqc oral_human_example_2_splitaa.fastq.gz --outdir fastqc_results
Now on your local computer, go to the browser, and
File -> Open File
. Use the file navigator to select the following file
~/BiATA/session1/data/fastqc_results/oral_human_example_1_splitaa_fastqc.html
Spend some time looking at the ‘Per base sequence quality’.
For each position a BoxWhisker type plot is drawn. The elements of the plot are as follows:
- The central red line is the median value
- The yellow box represents the inter-quartile range (25-75%)
- The upper and lower whiskers represent the 10% and 90% points
- The blue line represents the mean quality
The y-axis on the graph shows the quality scores. The higher the score the better the base call. The background of the graph divides the y axis into very good quality calls (green), calls of reasonable quality (orange), and calls of poor quality (red). The quality of calls on most platforms will degrade as the run progresses, so it is common to see base calls falling into the orange area towards the end of a read.
What does this tell you about your sequence data? When do the errors start?
In the pre-processed files we see two warnings, as shown on the left side of the report. Navigate to the “Per bases sequence content”
At around 15-19 nucleotides, there DNA composition becomes very even, however, a the 5’ end of the sequence there are distinct differences. Why do you think that is?
Open up the FastQC report corresponding to the reversed reads.
Are there any significant differences between to the forward and reverse files?
For more information on the FastQC report, please consult the ‘Documentation’ available from this site: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/
We are currently only looking at two files but often we want to look at many files. The tool multiqc aggregates the FastQC results across many samples and creates a single report for easy comparison. Here we will demonstrate the use of this tool
cd /opt/data
mkdir multiqc_results
multiqc fastqc_results -o multiqc_results
In this case, we provide the folder containing the fastqc results to multiqc and the -o allows us to set the output directory for this summarised report.
Now on your local computer, open the summary report from
MultiQC. To do so, go to your browser, and use File -> Open File
. Use the
file navigator to select the following file
~/BiATA/session1/data//multiqc_results/multiqc_report.html
Scroll down through the report. The sequence quality histograms show the following results from each file as two separate lines. The ‘Status Checks’ show a matrix of which samples passed check and which ones have problems.
What fraction of reads are duplicates?
So, far we have looked at the raw files and assessed their content, but we have not done anything about removing duplicates, sequences with low quality scores or removal of the adaptors. So, lets start this process. The first step in the process is to make a database relevant for decontaminating the sample. It is always good to routinely screen for human DNA (which may come from the host and/or staff performing the experiment). However, if the sample is say from mouse, you would want to download the the mouse genome.
In the following exercise, we are going to use two “genomes” already downloaded for you in the decontamination folder. To make this tutorial quicker and smaller in terms of file sizes, we are going to use PhiX (a common spike in) and just chromosome 10 from human.
cd /opt/data/decontamination
For the next step we need one file, so we want to merge the two different fasta files. This is simply done using the command line tool cat.
cat phix.fasta GRCh38_chr10.fasta > GRCh38_phix.fasta
Now we need to build a bowtie index for them:
bowtie2-build GRCh38_phix.fasta GRCh38_phix.index
It is possible to automatically download a pre-indexed human genome in Bowtie2 format using the following command (but do not do this now, as this will take a while to download):
kneaddata_database –download human_genome bowtie2
Now we are going to use the GRCh38_phix database and clean-up our raw sequences. kneaddata is a helpful wrapper script for a number of pre-processing tools, including Bowtie2 to screen out contaminant sequences, and Trimmomatic to exclude low-quality sequences. We also have written wrapper scripts to run these tools (see below), but using kneaddata allows for more flexibility in options.
cd /opt/data/
mkdir clean
We now need to uncompress the fastq files.
gunzip -c oral_human_example_2_splitaa.fastq.gz > oral_human_example_2_splitaa.fastq
gunzip -c oral_human_example_1_splitaa.fastq.gz > oral_human_example_1_splitaa.fastq
kneaddata --remove-intermediate-output -t 2 --input oral_human_example_1_splitaa.fastq --input oral_human_example_2_splitaa.fastq --output /opt/data/clean --reference-db /opt/data/decontamination/GRCh38_phix.index --trimmomatic-options "SLIDINGWINDOW:4:20 MINLEN:50" --bowtie2-options "--very-sensitive --dovetail" --remove-intermediate-output
* –input, Input FASTQ file. This option is given twice as we have paired-end data.
* –output, Output directory.
* –reference-db, Path to bowtie2 database for decontamination.
* -t, # Number of threads to use (2 in this case).
* –trimmomatic-options, Options for Trimmomatic to use, in quotations (“SLIDINGWINDOW:4:20 MINLEN:50” in this case). See the Trimmomatic website for more options.
* –bowtie2-options, Options for bowtie2 to use, in quotations. The options “–very-sensitive” and “–dovetail” set the alignment parameters to be very sensitive and sets cases where mates extend past each other to be concordant (i.e. they will be called as contaminants and be excluded).
* –remove-intermediate-output, Intermediate files, including large FASTQs, will be removed.
Kneaddata generates multiple outputs in the “clean” directory, containing different 4 different files for each read.
Using what you have learned previously, generate a fastqc report for each of the oral_human_example_1_splitaa_kneaddata_paired files. Do this within the clean directory.
cd /opt/data/clean
mkdir fastqc_final
<you construct the command>
Also generate a multiqc report and look at the sequence quality historgrams.
cd /opt/data/clean
mkdir multiqc
<you construct the command>
View the multiQC report as before using your browser. You should see something like this:
Open the previous MultiQC report and see if they have improved?
Did sequences at the 5’ end become uniform? Why might that be? Is there anything that suggests that adaptor sequences were found?
|image29 To generate a summary file of how the sequence were categorised by Kneaddata, run the following command.
cd /opt/data
kneaddata_read_count_table --input /opt/data/clean --output kneaddata_read_counts.txt
less kneaddata_read_counts.txt
What fraction of reads have been deemed to be contaminating?
The reads have now be decontaminated any can be uploaded to ENA, one of the INSDC members. It is beyond the scope of this course to include a tutorial on how to submit to ENA, but there is additional information available on how to do this in this Online Training guide provided by EMBL-EBI
Part 2 - Assembly and Co-assembly¶
Learning Objectives - in the following exercises you will learn how to perform a metagenomic assembly and to start some basic analysis of the output. Subsequently, we will demonstrate the application of co-assembly. Note, due to the complexity of metagenomics assembly, we will only be investigating very simple example datasets as these often take days of CPU time and 100s of GB of memory. Thus, do not think that there is an issue with the assemblies.
Once you have quality filtered your sequencing reads (see Part 1 of this session), you may want to perform de novo assembly in addition to, or as an alternative to a read-based analyses. The first step is to assemble your sequences into contigs. There are many tools available for this, such as MetaVelvet, metaSPAdes, IDBA-UD, MegaHIT. We generally use metaSPAdes, as in most cases it yields the best contig size statistics (i.e. more continguous assembly) and has been shown to be able to capture high degrees of community diversity (Vollmers, et al. PLOS One 2017). However, you should consider the pros and cons of different assemblers, which not only includes the accuracy of the assembly, but also their computational overhead. Compare these factors to what you have available. For example, very diverse samples with a lot of sequence data uses a lot of memory with SPAdes. In the following practicals we will demonstrate the use of metaSPAdes on a small sample and the use of MegaHIT for performing co-assembly.
Using the sequences that you have previously QC-ed, run metaspades. To make things faster, we are going to turn-off metaspades own read error correction method, by specifying the command –only-assembler.
cd /opt/data
mkdir assembly
metaspades.py \
-t 2 \
--only-assembler \
-m 10 \
-1 /opt/data/clean/oral_human_example_1_splitaa_kneaddata_paired_1.fastq \
-2 /opt/data/clean/oral_human_example_1_splitaa_kneaddata_paired_2.fastq \
-o /opt/data/assembly
This takes about 1 hour to complete.
Once this completes, we can investigate the assembly. The first step is to simply look at the contigs.fasta file.
Now take the first 40 lines of the sequence and perform a blast search at NCBI (https://blast.ncbi.nlm.nih.gov/Blast.cgi, choose Nucleotide:Nucleotide from the set of options). Leave all other options as default on the search page. To select the first 40 lines of sequence perform the following:
head -41 contigs.fasta
Which species do you think this sequence may be coming from? Does this make sense as a human oral bacteria? Are you surprised by this result at all?
Now let us consider some statistics about the entire assembly
cd /opt/data/assembly
assembly_stats scaffolds.fasta
This will output two simple tables in JSON format, but it is fairly simple to read. There is a section that corresponds to the scaffolds in the assembly and a section that corresponds to the contigs.
What is the length of longest and shortest contigs?
What is the N50 of the assembly? Given that are input sequences were ~150bp long paired-end sequences, what does this tell you about the assembly?
N50 is a measure to describe the quality of assembled genomes that are fragmented in contigs of different length. We can apply this with some caution to metagenomes, where we can use it to crudely assess the contig length that covers 50% of the total assembly. Essentially the longer the better, but this only makes sense when thinking about alike metagenomes. Note, N10 is the minimum contig length to cover 10 percent of the metagenome. N90 is the minimum contig length to cover 90 percent of the metagenome.
Bandage (a Bioinformatics Application for Navigating De novo Assembly Graphs Easily), is a program that creates interactive visualisations of assembly graphs. They can be useful for finding sections of the graph, such as rRNA, or to try to find parts of a genome. Note, you can install Bandage on your local system. With Bandage, you can zoom and pan around the graph and search for sequences, plus much more. The following guide allows you to look at the assembly graph. Normally, I would recommend looking at the ‘ assembly_graph.fastg, but our assembly is quite fragmented, so we will load up the assembly_graph_after_simplification.gfa.
Bandage
In the the Bandage GUI perform the following
Select File->Load graph
Navigate to /opt/data/assembly and select on assembly_graph_after_simplification.gfa
Once loaded, you need to draw the graph. To do so, under the “Graph drawing” panel on the left side perform the following:
Set Scope to ‘Entire graph’
The click on Draw graph
Use the sliders in the main panel to move around and look at each distinct part of the assembly graph.
Can you find any large, complex parts of the graph? If so, what do they look like.
In this particular sample, we believe that strains related to the species Rothia dentocariosa, a Gram-positive, round- to rod-shaped bacteria that is part of the normal community of microbes residing in the mouth and respiratory tract, should be present in our sample. While this is a tiny dataset, lets try to see if there is evidence for this genome. To do so, we will search the R. dentocariosa genome against the assembly graph.
To do so, go to the “BLAST” panel on the left side of the GUI.
Step 1 - Select Create/view BLAST search, this will open a new window
Step 2 - select build Blast database
Step 3 - Load from FASTA file -> navigate to the genome folder /opt/data/genome and select GCA_000164695.fasta
Step 4 - modify the blast filters to 95% identity
Step 6 - run blast
Step 7 - close this window
To visualise just these hits, go back to “Graph drawing” panel.
Set Scope to ‘Around BLAST hits’
Set Distance 2
The click on Draw graph
You should then see something like this:
In the following steps of this exercise, we will look at performing co-assembly of multiple datasets. Due to computational limitations, we can only look a example datasets. However, the principles are the same. We have also pre-calculated some assemblies for you. In the co-assembly directory, there are already 2 assemblies. We have a single paired-end assembly.
megahit -1 clean_other/oral_human_example_1_splitac_kneaddata_paired_1.fastq -2 clean_other/oral_human_example_1_splitac_kneaddata_paired_1.fastq -o coassembly/assembly1 -t 2 --k-list 23,51,77
Now run the assembly_stats on the contigs for this assembly.
cd /opt/data
assembly_stats coassembly/assembly1/final.contigs.fa
How do these differ to the ones you generated previously? What may account for these differences?
We have also generated the first coassembly using MegaHIT. This was produced using the following command. To specify the files, we put all of the forward file as a comma separated list, and all of the reversed as a comma separated list, which should be ordered that same in both, such that the mate pairs match up.
cd /opt/data
megahit -1 clean_other/oral_human_example_1_splitac_kneaddata_paired_1.fastq,clean_other/oral_human_example_1_splitab_kneaddata_paired_1.fastq -2 clean_other/oral_human_example_1_splitac_kneaddata_paired_1.fastq,clean_other/oral_human_example_1_splitab_kneaddata_paired_2.fastq -o coassembly/assembly2 -t 2 --k-list 23,51,77
Now perform another co-assembly, depending on the computer you have, either change one of the previous fastq files for the
megahit -1 clean_other/oral_human_example_1_splitab_kneaddata_paired_1.fastq,clean_other/oral_human_example_1_splitac_kneaddata_paired_1.fastq,clean/oral_human_example_1_splitaa_kneaddata_paired_1.fastq -2 clean_other/oral_human_example_1_splitab_kneaddata_paired_2.fastq,clean_other/oral_human_example_1_splitac_kneaddata_paired_2.fastq,clean/oral_human_example_1_splitaa_kneaddata_paired_2.fastq -o coassembly/assembly3 -t 2 --k-list 23,51,77
This takes about 20-30 minutes. Also, if you are using a laptop, make sure that it does not go into standby mode.
You should now have three different assemblies, two provide and one generated by yourselves. Now let us compare the assemblies.
cd /opt/data
assembly_stats coassembly/assembly1/final.contigs.fa
assembly_stats coassembly/assembly2/final.contigs.fa
assembly_stats coassembly/assembly3/final.contigs.fa
We only have contigs.fa from MegaHIT, so the contigs and scaffold sections are the same.


Welcome to my Bootstrap 4 Webpage! Bootstrap is a free and open source front-end library with HTML and CSS based designs.
Built with the latest version of HTML, HTML 5.
Built with the latest version of BootStrap, BootStrap 4.
Built with the latest version of CSS, CSS3.
Built by an upcoming coder from Lusaka, Zambia. Front End Developer, Game Designer, Graphic Designer, and Marketer
This is a two column section. Columns stack one on top of another automatically as the browser resizes
It can also display the web page differently depending on the screen size and viewing device
Learn MoreAn exerienced and passionate game designer graphic designer and front end developer
See ProfileMy money's in that office, right?   She gonna tell me too.


Lecture 2
(["lists", "tuples"], "and data types")
F12
, then click ConsoleF12
, then click ConsoleCtrl+Shift+k
↓ , PgDn , n , j |
next slide |
↑ , PgUp , p , k |
prev slide |
Esc |
enables ctrl+f globally |
Prelude> 4317 * 103
444651
Prelude> let x = 3.0
Prelude> let y = 4.0
Prelude> sqrt( x^2 + y^2 )
5.0
Prelude> 2^1000
10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376
Prelude> (+) 2 3
5
f(2, 3) = 2 + 3 = 5
Prelude> (^) 3 4
81
g(3, 4) = 3^4 = 81
Prelude> (True && False) || False
False
Prelude> True && 1
ERROR!
Prelude> 30 < 31
True
Lets define a function royal
Prelude> let royal p = if p>9000 then True else False
Prelude> royal 9001
True
Lets also define a related function peasant
Prelude> let peasant p = not (royal p)
Prelude> peasant 9001
False
Reusing code is easy
The most common data type in Haskell
Prelude> [3,1,5,3]
[3,1,5,3]
Prelude> ["list","of","strings"]
["list","of","strings"]
The elements must be of the same type
Prelude> [1,2,3,"a","bb","ccc"]
ERROR!
Start at 1, end at 10
Prelude> [1..10]
[1,2,3,4,5,6,7,8,9,10]
Start at 1, count up by 0.25, end at 4
Prelude> [1, 1.25 .. 4.0]
[1.0,1.25,1.5,1.75,2.0,2.25,2.5,2.75,3.0,3.25,3.5,3.75,4.0]
Prelude> let l1 = [1,2,3]
Prelude> let l2 = [4,5,6]
Prelude> l1 ++ l2
[1,2,3,4,5,6]
Prelude> 0 : [1,2,3]
[0,1,2,3]
Prelude> let l1 = [1,2,3]
Prelude> let l2 = [4,5,6]
Prelude> (++) l1 l2
[1,2,3,4,5,6]
Prelude> (:) 0 [1,2,3]
[0,1,2,3]
In fact, a list is formally defined like this
Prelude> [1,2,3] == (:) 1 ((:) 2 ((:) 3 []))
True
Gross! We'll put that away. I'm so sorry.
A String is just a list of characters.
Prelude> "wahoo" == ['w', 'a', 'h', 'o', 'o']
True
So (++) and (:) work on strings too.
Prelude> "" == []
True
Prelude> 'a':"bc" == ['a', 'b', 'c']
True
Prelude> 6:"789" == "6789"
ERROR!
head
returns the first element of a list
tail
returns the remaining elements of a list
last
returns the last element of a list
init
returns everything but the last elementCreate a file myfunction.hs
and write a function to reverse a list
rev [] = []
rev [] = []
rev xs = last xs : rev (init xs)
rev [] = []
rev xs = rev (tail xs) ++ [head xs]
rev [] = []
rev (x:xs) = reverse xs ++ [x]
(clear answer)
(show answer 1)
(show answer 2)
(show answer 3)
run ghci
and load the file
Prelude> :load myfunction.hs
[1 of 1] Compiling Main ( myfunction.hs, interpreted )
Ok, modules loaded: Main.
*Main> rev "hello"
"olleh"
The Prelude package comes with many functions.
Reuse, reuse, reuse!
reverse
is already implemented for you!
GG, Haskell
Let S be a set, and p(x) be a predicate.
Mathematically, we can write the following statement.
∀x∈S, p(x)
Haskell allows a similar notation
[ x | x ← S, p x ]
← is pronounced "drawn from"
p x
is called a guard
Prelude> [ x+5 | x <- [1,2,3] ]
Prelude> [ x+5 | x <- [1,2,3] ]
[6,7,8]
(clear answer)
(show answer)
Prelude> [ x | x <- [2..10], 10 `mod` x == 0]
Prelude> [ x | x <- [2..10], 10 `mod` x == 0]
[2,5,10]
(clear answer)
(show answer)
Prelude> [ team ++ " " ++ player |
team <- ["red", "blue"],
player <- ["soldier", "pyro", "scout"] ]
Prelude> [ team ++ " " ++ player |
team <- ["red", "blue"],
player <- ["soldier", "pyro", "scout"] ]
["red soldier","red pyro","red scout","blue soldier","blue pyro","blue scout"]
(clear answer)
(show answer)
A tuple is a binding of data types
It's comma-separated, just like lists
A tuple is surrounded by ( ... )
(1, 2)
("lol", "wut")
(40, "forty")
("Coins", [1, 5, 10, 25])
fst
retrieves the first element
Prelude> fst (1,2)
1
snd
retrieves the second element
Prelude> snd (1,2)
2
Prelude> [ (n, even n) | n <- [1..4] ]
[(1,False),(2,True),(3,False),(4,True)]
Prelude> [(a,b,c) | c<-[1..10], b<-[1..c], a<-[1..b]
, a^2 + b^2 == c^2]
[(3,4,5),(6,8,10)]
Grab one of these editors, and start hacking!
Write 2 different implementations of factorial
facA n = ...
facB n = ...
Save the file as fac.hs
and run it using GHCi


= Lang::get('briddle.installer::lang.plugin.description') ?>
The title of your installer (e.g. Briddle Installation).
The theme you want to use.
A comma seperated list of plugins you want to include (e.g. Briddle.Workflow,Briddle.Omnipay).
A comma seperated list of themes you want to include (e.g. Briddle.booktheme).


[§431:10E-152] Extended coverage. Insurers seeking to provide multi-peril coverage for residential property after July 1, 2016, shall submit to the commissioner a written request for permission to write the coverage. The commissioner may disapprove the request. If the request is disapproved, the insurer shall not write the coverage. [L 2016, c 141, pt of §1]


Everything I know about Kubernetes I learned from a cluster of Raspberry Pis | Jeff Geerling I realized I haven't posted about my DrupalCon Seattle 2019 session titled Everything I know about Kubernetes I learned from a cluster of Raspberry Pis, so I thought I'd remedy that. First, here's a video of the recorded session:


Content-Type: text/plain Content-Transfer-Encoding: 8bit Message-Id<EMAIL_ADDRESS>Date: Thu, 28 Jun 2007 00:15:45 +0200 (CEST) Hello, Good day to you. First, I must solicit your confidence in this transaction and IRRESPECTIVE of other mails you may have received, please I urge you to treat this one with utmost CONFIDENCE. This is by virtue of its nature CONFIDENTIAL and TOP SECRET. Though know that the transaction of this magnitude will make anyone apprehensive and worried, but I am assuring you that all will be well at the end of the day. I am Mr. FREDERICK WILLIAMS I am sorry if I have intruded on your privacy or barged in on you without your permission. I have a very rewarding project, which I think will be beneficial to both of us putting trust, confidentiality and most of all the fear of God into focus. If after going through this email you do not find it interesting please disregard it and send me a formal response. I was a member of the Abuja National stadium building and organizing Committee of the just concluded "ALL AFRICAN GAMES" which was organized and hosted by Nigeria but before now I have been a director of sports in the Federal Ministry of Sports and Youth Development. We were appointed over 3 years ago to supervise the building of the ultra modern Abuja National Stadium, putting in place all equipments needed for the completion of the stadium which is acclaimed to be one of the best in the world today and also involved in the planning and hosting of the games. This project cost the government of Nigeria Millions of dollars. The stadium project has been completed; all equipments put in place and Commissioned and used for the All African Games tagged "ABUJA 2003". The accounts have been rendered to the government satisfactorily and we have received commendations for a job well done. During the construction, planning and execution of this project, as the Chairman of contract award committee I was able to make some money for myself through contract that was awarded to Dewolfgang Gmbh, which I over-invoiced to the tune of USD18.5M with the help of Dewolfgang Gmbh the original contractor. All I want you to do is to assist me in clearing this amount while standing in as the owner and director of Vacknol Nigeria International Limited in whose name I made as the beneficiary of the funds. Vacknol Nigeria International Limited is an international company and could have a company anywhere in the world the most important thing been that it is registered here in Nigeria as a limited liability company in line with the company and allied matters decree of Nigeria which I have since done, I have also in my possession some contract document which will act as proof that Vacknol Nigeria International Limited executed the contract as a sub contractor under the Dewolfgang Gmbh who is the major contractor that executed the contract that was over -invoiced. On the payment of this money to you as the supplier in the name of Vacknol Nigeria International limited because I will apply for the transfer in this name, and you as the director of the company. I will come to meet with you so that we can both sit down and discuss further, what kind of business we will enter into or if need be expand your already existing business, but actually I hope to establish a five star hotel and go into real estate development as these are life time businesses that I know are of high yields interest any where in the world. I know you will be entitled to some percentage of this money as Compensation for your efforts, please feel free to indicate what you will take from this amount, as this is very important to me before we commence proceedings. I will tell you more about this when I hear from you. I will give you every detail of what we are to do. I want to assure you my dear friend that with your cooperation and understanding the sky will be our limit. Please do contact me immediately. Best regards, Frederick Williams.


Add Link
Learn Django
1. Django Girls tutorial
2. Learn Django - An entry level and project-based course to learn Django
3. Intuitive 20 video tutorial series for Django beginners
4. Short beginner tutorial on building a basic blog site
5. Full Web Framework Python Django Tutorial
6. Going Through Django Screencasts
7. Django Djumpstart: Build a To-do List in 30 Minutes (2006)
8. How to Tango with Django - A beginners guide to web development using Django 1.5.4 - 1.7
9. A simple todo list
10. Dockerizing a Python Django Web Application


Across: 1. Such high musical source requires low treble setting (4 5) 6. He and Helen ran off to city where pairs travel (5) 9,18. One subject to murder (penultimate scene) frequently has pointy things on head, hence this relic? (5 2 6) 10. Liquid fuel in lamp, white heat evenly achieved (7) 11. Jazz finally incorporated into Metal (4) 12. Mocked man involved with poodle (9) 14. Anne rued disaster not of her making (8) 16. Shocked that Kabul residents took time to remove new foreign leaders 18. see 9 20. No good enabling moves, but only about one every hundred weeks or so (8) 23. Found his tables turned (9) 24. Owed the leader: two can play at this! (4) 26. Lust is confused when love involved, king becoming holy man (2 5) 27. Tel Aviv resident realising loss of last two problematic (7) 28. Affirmation found pursuing hollow "sight for sore eyes" (5) 29. Wild and remote feature of 6 across (5 4) Down: 1. Hunch one worked in the 1 across of 29 in reverse? (4) 2. Like one raised with pride, or one broken and kept in line? (7) 3. Reverse cut contained in garment of 26 (5) 4. If I were L, dancing would be better for partner (8) 5. Provide another tag for meaner moves (6) 6. Instrument made opera ping (4 5) 7. Change and tour small building (7) 8. Not going anywhere... perhaps Peter and Paul not well? (10) 13. Vehicles conveying sober religious instruction, they help hold up the church (10) 15. Boast U-turn easily managed in such vehicles (9) 17. Anti-socialist hit, grist for the mill? (8) 19. Overcome latest dip in expenditure (7) 21,25. Delicate lie about famous piece of 6 across (3 2 2 4) 22. Taxman mentions him, in slow movement (6) 24. Beg ridiculous group to get back to some slow music (5) 25. see 21


Next: Resolution of Apparent Conflicts in Exceptional Situations, Previous: Documentation of Extensions, Up: Conforming Implementations
A conforming implementation shall treat exceptional situations in a manner consistent with this specification.


| Figure 1 |
State-specific trends in ( a) Maize yield ( b) Sorghum yield ... |
| Figure 2 |
Coefficient of Variation for ( a) Maize ( b) Irrigated maize ... |
| Figure 3 |
Trends in ( a) Maize; ( b) Irrigated maize; ( c) Non-irrigat ... |
| Figure 4 |
Trends in growing season (May 1 st to September 30 th) ( a) ... |
| Figure 5 |
Climate explained crop yield variability (CEYV) for in ( a) ... |
| Figure 6 |
Dominant climate factor (significant) responsible for explai ... |
| Figure 7 |
Proportion of Great Plains counties and crop production for ... |
| Figure 8 |
Crop yield sensitivity to temperature for ( a) Maize; ( b) I ... |
| Figure 9 |
Crop yield sensitivity to precipitation for ( a) Maize; ( b) ... |
| Figure 10 |
Temperature-induced crop yield impacts for ( a) Maize; ( b) ... |
| Figure 11 |
Precipitation-induced crop yield impacts for ( a) Maize; ( b ... |


Hangfire is a compherensive background job manager. You can integrate ASP.NET Boilerplate with Hangfire to use it instead of default background job manager. You can use the same background job API for Hangfire. Thus, your code will be independent of Hangfire. But, if you like, you can directly use Hangfire's API also.
Hangfire Integration depends on the frameworks you are using.
Abp.HangFire.AspNetCore package is used to integrate to ASP.NET Core based applications. It depends on Hangfire.AspNetCore. This document describes to install hangfire to an ASP.NET Core project. It's similar for ABP based projects too. First install Abp.HangFire.AspNetCore package to your web project:
Install-Package Abp.HangFire.AspNetCore
Then you can install any storage for Hangfire. Most common one is SQL Server storage (see Hangfire.SqlServer nuget package). After you installed these nuget packages, you can configure your project to use Hangfire.
First, we are changing Startup class to add Hangfire to dependency injection and configure storage and connection string in the ConfigureServices method:
services.AddHangfire(config =>
{
config.UseSqlServerStorage(_appConfiguration.GetConnectionString("Default"));
});
Then we can add UseHangfireServer call in the Configure method:
app.UseHangfireServer();
If you want to use hangfire's dashboard, you can add it too:
app.UseHangfireDashboard();
If you want to authorize the dashboard, you can use AbpHangfireAuthorizationFilter as shown below:
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
Authorization = new[] { new AbpHangfireAuthorizationFilter("MyHangFireDashboardPermissionName") }
});
The configuration above is almost standard to integrate hangfire to an ASP.NET Core application. For ABP based projects, we should also configure our web module to replace Hangfire for ABP's default background job manager:
[DependsOn(typeof (AbpHangfireAspNetCoreModule))]
public class MyProjectWebModule : AbpModule
{
public override void PreInitialize()
{
Configuration.BackgroundJobs.UseHangfire();
}
//...
}
We added AbpHangfireAspNetCoreModule as a dependency and used Configuration.BackgroundJobs.UseHangfire method to replace Hangfire for ABP's default background job manager.
Hangfire requires schema creation permission in your database since it creates it's own schema and tables on first run. See Hangfire documentation for more information.
Abp.HangFire nuget package is used for ASP.NET MVC 5.x projects:
Install-Package Abp.HangFire
Then you can install any storage for Hangfire. Most common one is SQL Server storage (see Hangfire.SqlServer nuget package). After you installed these nuget packages, you can configure your project to use Hangfire as shown below:
[DependsOn(typeof (AbpHangfireModule))]
public class MyProjectWebModule : AbpModule
{
public override void PreInitialize()
{
Configuration.BackgroundJobs.UseHangfire(configuration =>
{
configuration.GlobalConfiguration.UseSqlServerStorage("Default");
});
}
//...
}
We added AbpHangfireModule as a dependency and used Configuration.BackgroundJobs.UseHangfire method to enable and configure Hangfire ("Default" is the connection string in web.config).
Hangfire requires schema creation permission in your database since it creates it's own schema and tables on first run. See Hangfire documentation for more information.
Hagfire can show a dashboard page to see status of all background jobs in real time. You can configure it as described in it's documentation. By default, this dashboard page is available for all users, not authorized. You can integrate it to ABP's authorization system using AbpHangfireAuthorizationFilter class defined in Abp.HangFire package. Example configuration:
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
Authorization = new[] { new AbpHangfireAuthorizationFilter() }
});
This checks if current user has logged in to the application. If you want to require an additional permission, you can pass into it's constructor:
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
Authorization = new[] { new AbpHangfireAuthorizationFilter("MyHangFireDashboardPermissionName") }
});
Note: UseHangfireDashboard should be called after authentication middleware in your Startup class (probably as the last line). Otherwise, authorization always fails.


Start prototyping your next project
Terry Richardson cardigan whatever gentrify Tumblr, gluten-free jean shorts cray Schlitz selvage DIY sustainable Helvetica sriracha. Banh mi ethical, put a bird on it VHS irony bicycle rights slow-carb literally retro skateboard ugh 90's Helvetica hashtag. Next level beard keffiyeh cornhole pork belly, slow-carb Schlitz.


FROM:CHARLES MILLER JOHANNESBURG, SOUTH AFRICA<EMAIL_ADDRESS>ATTN:DEAR: BUSINESS ASSISTANCE My name is CHARLES MILLER,the elder son of Mr.JONES MILLER of Zimbabwe. This might be a surprise to you about where I got your contact address. I got your CONTACT FROM THE SOUTH AFRICA EXCHENGE NETWORK ON LINE. During the current war against the farmers in Zimbabwe from the supporters of our President Robert Mugabe to claim all the white-owned farms to his party members and his followers, he ordered all farmers to surrender all farms to his party members and his followers. My father is One of the best farmers in our country and because he did not support Mugabes ideas,Mugabes supports invaded my fathers farm and burnt everything in the farm,killing my father and made away with a lot of items in my fathers farm. Before his death,my father had deposited with of the Security Company in Johannesburg,South Africa the sum of US$25,5 MILLION(TWENTY FIVE MILLION FIVE HUNDRED THOUSAND UNITED STATES DOLLARS).After the death of my father, we decided to move to the Republic of South Africa where he had deposited the money in the Security Company as valuables. So I decided to contact overseas firm and companies that will assist me to move this money out of South Africa because as asylum seekers we are not allowed to operate any Bank Account within South Africa.We have agreed to offer you 25% of the total sum for your assistance,5% will be mapped out for any expenses that may be incurred in the course of this transaction while 70% will be for me and my family to invest in your country. All I want you to do is to furnish me with your private phone and fax numbers for easy communication.you can contact me via my E-mail account.Note that this transaction is 100% Risk free and absolutel confidential. Thanks and God bless. Best Regards MR CHARLES MILLER


United Arab Emirates - Profile
Facts
- The UAE is a federation of seven independent states, with coastlines on the Persian Gulf and the Gulf of Oman. Abu Dhabi is the largest. Dubai, Ajman, Fujairah, Ras al-Khaimah, Sharjah, and Umm al-Qaiwain are known as the Northern States. The interior is mainly desert; most of the 2 million inhabitants live along the coast or in inland oases.
- Although cruising opportunities are very limited, a small number of foreign yachts venture into the area every year. As there are a number of locally owned yachts, mainly power, facilities are of a good standard and the large expatriate Indian workforce means that major repairs can be done cheaply. The cost of labour is cheap and the work if properly supervised, is normally done to a high standard.
- There is very little bureaucracy, for most nationalities the entry visa is free. Food, fresh and tinned, petrol and diesel are all well priced and there’s no tax on imported sailing goods.
- There are a number of marinas in Dubai, including one at the Dubai Golf and Yacht Club by the town centre, which can only be reached when the bridge over the creek opens. About 3 miles west of the town is the Dubai Offshore Sailing Club. Right in the centre is the Dubai International Marine Club and there is a major marina opening soon on the Jumeirah Palm development.
Security
Weather
June to September is the hottest, dry period of the year; October to May being more pleasant.
United Arab Emirates.
For links to free global weather information, forecast services and extreme weather information see the Noonsite Weather Page.
Main Ports


|
|
|
Every house comes with a closet to store your Toon’s extra clothes. Clothes can be purchased at the clothing shops in any of Toontown’s playgrounds if you have a clothing ticket, or for a handful of jellybeans from Clarabelle’s Cattlelog.
|
The closet that comes with your house can hold 10 items, with a 15-item closet available for sale in special issues of the Cattlelog. If you buy a new closet, it will replace the old one.
|
If your closet is full when you call Clarabelle, you can still purchase new clothing but you must make room for the new clothes before you take can them out of your mailbox.
|
If your closet is full when you try to cash in a clothing ticket, you will be warned when you start browsing that you’ll need to make room in your closet before buying anything new. If you don’t delete anything from your closet and buy a new outfit anyway, you will lose the clothes you were wearing.
|
Your friends can try on your clothes while they’re visiting your Estate - but they can’t borrow them.
|
|
Look for the telephone in your Toon’s house - you can use it to browse Clarabelle’s Cattlelog and buy cool stuff for your Toon!
Clarabelle stocks clothes for every mood and holiday, rods to catch bigger fish, wallpapers, rugs, furniture, window views for your Toon’s house, and more. New Cattlelogs arrive regularly, each with new items and some old favorites in the backorder section.
|
|
|


Class: Aws::MediaConnect::Types::Source
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Struct
|
|
|
Instance Chain:
self,
::Aws::Structure ,
Struct
|
|
| Inherits: |
Struct
|
| Defined in: | gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb |
Overview
The settings for the source of the flow.
Constant Summary
Instance Attribute Summary
-
#data_transfer_subscriber_fee_percent ⇒ Integer
rw
Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
-
#decryption ⇒ Types::Encryption
rw
The type of encryption that is used on the content ingested from this source.
-
#description ⇒ String
rw
A description for the source.
-
#entitlement_arn ⇒ String
rw
The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account.
-
#gateway_bridge_source ⇒ Types::GatewayBridgeSource
rw
The source configuration for cloud flows receiving a stream from a bridge.
-
#ingest_ip ⇒ String
rw
The IP address that the flow will be listening on for incoming content.
-
#ingest_port ⇒ Integer
rw
The port that the flow will be listening on for incoming content.
-
#media_stream_source_configurations ⇒ Array<Types::MediaStreamSourceConfiguration>
rw
The media streams that are associated with the source, and the parameters for those associations.
-
#name ⇒ String
rw
The name of the source.
-
#sender_control_port ⇒ Integer
rw
The port that the flow uses to send outbound requests to initiate connection with the sender.
-
#sender_ip_address ⇒ String
rw
The IP address that the flow communicates with to initiate connection with the sender.
-
#source_arn ⇒ String
rw
The ARN of the source.
-
#transport ⇒ Types::Transport
rw
Attributes related to the transport stream that are used in the source.
-
#vpc_interface_name ⇒ String
rw
The name of the VPC interface that is used for this source.
-
#whitelist_cidr ⇒ String
rw
The range of IP addresses that should be allowed to contribute content to your source.
Instance Method Summary
::Aws::Structure
- Included
| #to_hash | Alias for Structure#to_h. |
Instance Attribute Details
#data_transfer_subscriber_fee_percent ⇒ Integer
(rw)
Percentage from 0-100 of the data transfer cost to be billed to the subscriber.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#decryption ⇒ Types::Encryption (rw)
The type of encryption that is used on the content ingested from this source.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#description ⇒ String
(rw)
A description for the source. This value is not used or seen outside
of the current AWS Elemental ::Aws::MediaConnect
account.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#entitlement_arn ⇒ String
(rw)
The ARN of the entitlement that allows you to subscribe to content
that comes from another AWS account. The entitlement is set by the
content originator and the ::Aws::ARN
is generated as part of the
originator's flow.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#gateway_bridge_source ⇒ Types::GatewayBridgeSource (rw)
The source configuration for cloud flows receiving a stream from a bridge.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#ingest_ip ⇒ String
(rw)
The IP address that the flow will be listening on for incoming content.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#ingest_port ⇒ Integer
(rw)
The port that the flow will be listening on for incoming content.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#media_stream_source_configurations ⇒ Array
<Types::MediaStreamSourceConfiguration> (rw)
The media streams that are associated with the source, and the parameters for those associations.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#name ⇒ String
(rw)
The name of the source.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#sender_control_port ⇒ Integer
(rw)
The port that the flow uses to send outbound requests to initiate connection with the sender.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#sender_ip_address ⇒ String
(rw)
The IP address that the flow communicates with to initiate connection with the sender.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#source_arn ⇒ String
(rw)
The ARN of the source.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#transport ⇒ Types::Transport (rw)
Attributes related to the transport stream that are used in the source.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#vpc_interface_name ⇒ String
(rw)
The name of the VPC interface that is used for this source.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end
#whitelist_cidr ⇒ String
(rw)
The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, <IP_ADDRESS>/16.
# File 'gems/aws-sdk-mediaconnect/lib/aws-sdk-mediaconnect/types.rb', line 3814
class Source < Struct.new( :data_transfer_subscriber_fee_percent, :decryption, :description, :entitlement_arn, :ingest_ip, :ingest_port, :media_stream_source_configurations, :name, :sender_control_port, :sender_ip_address, :source_arn, :transport, :vpc_interface_name, :whitelist_cidr, :gateway_bridge_source) SENSITIVE = [] include Aws::Structure end


Experimental Design by Dr. Laura Spinu and her students, Concordia University.
The code for this phonetics experiment is free and open source. You can get the code on GitHub and modify it for your experiments if you know a bit of HTML.


StreamSocketListener will create the "server" side of a connection. It listens on a "service name" (often a port number) and calls a callback when it accepts a connection; this happens when some other application tries to connect. Once a connection is accepted, the acceptAsync() method needs to be called again.


The IGB (In-Game-Browser) will be removed from the EVE-Online client in October 2016.
Pathfinder already supports CREST authentication in preparation for this change.
Once CCP removes the IGB you will be able to use Pathfinder in any supported browser with no change in functionality.


Lorem ipsum dolor sit, amet consectetur adipisicing elit. Temporibus delectus voluptatibus molestias, illo eos recusandae accusantium porro in excepturi quidem doloribus hic, nobis, atque facere voluptas nesciunt asperiores quisquam libero voluptatem quo expedita. Repellendus ducimus deserunt nesciunt beatae, quasi quo.
I am a very simple card. I am good at containing small bits of information.
I am a very simple card. I am good at containing small bits of information.
I am a very simple card. I am good at containing small bits of information.
I am a very simple card. I am good at containing small bits of information.


Greetings! My name is Stacey- the "S" in SNAP of Iowa Photography.
I have a love for capturing authentic moments and rooting them forever in the present as photographs. I believe that families and the people within grow and change in what seems like the blink of an eye. That documenting who and where we are in our lives is important.  Images that you'll look reminiscently at in 20 years, see your face wide with laughter and remember where you were in your life.


I am a front end web developer with a leveraging background in education (Psychology, International Business and Commerce) and have experience ranging from Public Relation, Advertising and Sales. I have lived and worked in various countries.I have an eclectic taste in everything, from books, art, music and knowledge.
I understand the human psych far too well and I am now learning the "psych", if you will, of coding and programming. I am focused, diligent and persistent. I intend to be keep updating myself with programming so I may enhance my creativity with all that is available to me. My imagination is limitless and ongoing and my ability to understand people and behaviour, gives me an upper hand in understanding not only what you require, but also the end user.


Where youthful energy meets innovation and opportunities turn to reality
Find Out MoreA skill that will stick with you for the rest of your life
To avoid the peril of debt that so many youth fall into by taking a gap year, and working as a coder
Earn the degree in your choice of study, you could even code part time in college.
Once you have graduated college, take your skill and put it to work by giving back to the Analytical Engine community!
Taking energy, opportunity, passion, empathy, and a proven track record we have put together the best program for youth to learn technology in the nation
What you can do
What you can do
What you can do
What you can do
Get Started!Ready to activate your future? Start your next project with us!
123-456-6789


 These exceptions can either be rescued for the public view (with a nice user-friendly explanation) or for the developers view (with tons of debugging information). The developers view is already implemented by the Action Controller, but the public view should be tailored to your specific application.
The default behavior for public exceptions is to render a static html file with the name of the error code thrown. If no such file exists, an empty response is sent with the correct status code.
You can override what constitutes a local request by overriding the local_request? method in your own controller. Custom rescue behavior is achieved by overriding the rescue_action_in_public and rescue_action_locally methods.
- local_request?
- log_error
- render_optional_error_file
- rescue_action
- rescue_action_in_public
- rescue_action_locally
- rescue_action_without_handler
| LOCALHOST | = | '<IP_ADDRESS>'.freeze |
| DEFAULT_RESCUE_RESPONSE | = | :internal_server_error |
| DEFAULT_RESCUE_RESPONSES | = | { 'ActionController::RoutingError' => :not_found, 'ActionController::UnknownAction' => :not_found, 'ActiveRecord::RecordNotFound' => :not_found, 'ActiveRecord::StaleObjectError' => :conflict, 'ActiveRecord::RecordInvalid' => :unprocessable_entity, 'ActiveRecord::RecordNotSaved' => :unprocessable_entity, 'ActionController::MethodNotAllowed' => :method_not_allowed, 'ActionController::NotImplemented' => :not_implemented, 'ActionController::InvalidAuthenticityToken' => :unprocessable_entity |
| DEFAULT_RESCUE_TEMPLATE | = | 'diagnostics' |
| DEFAULT_RESCUE_TEMPLATES | = | { 'ActionView::MissingTemplate' => 'missing_template', 'ActionController::RoutingError' => 'routing_error', 'ActionController::UnknownAction' => 'unknown_action', 'ActionView::TemplateError' => 'template_error' |
| RESCUES_TEMPLATE_PATH | = | ActionView::Template::EagerPath.new_and_loaded( File.join(File.dirname(__FILE__), "templates")) |
True if the request came from localhost, <IP_ADDRESS>. Override this method if you wish to redefine the meaning of a local request to include remote IP addresses or other criteria.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/rescue.rb, line 124 124: def local_request? #:doc: 125: request.remote_addr == LOCALHOST && request.remote_ip == LOCALHOST 126: end
Overwrite to implement custom logging of errors. By default logs as fatal.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/rescue.rb, line 79 79: def log_error(exception) #:doc: 80: ActiveSupport::Deprecation.silence do 81: if ActionView::TemplateError === exception 82: logger.fatal(exception.to_s) 83: else 84: logger.fatal( 85: "\n#{exception.class} (#{exception.message}):\n " + 86: clean_backtrace(exception).join("\n ") + "\n\n" 87: ) 88: end 89: end 90: end
Attempts to render a static error page based on the status_code thrown, or just return headers if no such file exists. At first, it will try to render a localized static page. For example, if a 500 error is being handled Rails and locale is :da, it will first attempt to render the file at public/500.da.html then attempt to render public/500.html. If none of them exist, the body of the response will be left empty.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/rescue.rb, line 107 107: def render_optional_error_file(status_code) 108: status = interpret_status(status_code) 109: locale_path = "#{Rails.public_path}/#{status[0,3]}.#{I18n.locale}.html" if I18n.locale 110: path = "#{Rails.public_path}/#{status[0,3]}.html" 111: 112: if locale_path && File.exist?(locale_path) 113: render :file => locale_path, :status => status, :content_type => Mime::HTML 114: elsif File.exist?(path) 115: render :file => path, :status => status, :content_type => Mime::HTML 116: else 117: head status 118: end 119: end
Exception handler called when the performance of an action raises an exception.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/rescue.rb, line 72 72: def rescue_action(exception) 73: rescue_with_handler(exception) || 74: rescue_action_without_handler(exception) 75: end
Overwrite to implement public exception handling (for requests answering false to local_request?). By default will call render_optional_error_file. Override this method to provide more user friendly error messages.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/rescue.rb, line 96 96: def rescue_action_in_public(exception) #:doc: 97: render_optional_error_file response_code_for_rescue(exception) 98: end
Render detailed diagnostics for unhandled exceptions rescued from a controller action.
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/rescue.rb, line 130 130: def rescue_action_locally(exception) 131: @template.instance_variable_set("@exception", exception) 132: @template.instance_variable_set("@rescues_path", RESCUES_TEMPLATE_PATH) 133: @template.instance_variable_set("@contents", 134: @template.render(:file => template_path_for_local_rescue(exception))) 135: 136: response.content_type = Mime::HTML 137: render_for_file(rescues_path("layout"), 138: response_code_for_rescue(exception)) 139: end
[ show source ]
# File vendor/rails/actionpack/lib/action_controller/rescue.rb, line 141 141: def rescue_action_without_handler(exception) 142: log_error(exception) if logger 143: erase_results if performed? 144: 145: # Let the exception alter the response if it wants. 146: # For example, MethodNotAllowed sets the Allow header. 147: if exception.respond_to?(:handle_response!) 148: exception.handle_response!(response) 149: end 150: 151: if consider_all_requests_local || local_request? 152: rescue_action_locally(exception) 153: else 154: rescue_action_in_public(exception) 155: end 156: end


Quote:
Originally Posted by
Biggles78
All due respect but this is the CONCORDE thread and it would be really nice if it could stay as such.
|
I would say that the SR-71, and the Tu-144, are in a way honorary members of the Concorde family, so I don't mind if they fly into the discussion every now and then.
Quote:
|
LandLady said in a post many moons ago that there was a pool of some 240 "Concorde Ambassadors" (sorry but CC and FAs don't sound right for this aeroplane) for Her. What was the numbers of Captains, First Officers and the all important Flight Engineers (sucking up to M2 with that one
)
|
The full list of names (up to 2002) for both BA and AF can be found in "The Concorde Story" by Chris Orlebar. For BA, a quick count shows about 170 names. That book also mentions, that the maximum number of crews qualified at any one time was 28, in 1980, and that the average was about 20 crews.
Quote:
|
I looked at the photos posted by a thoughtful member in an earlier post and wonder how former crew felt looking at them. The photos give the impression that you could kick the tyres and light the fires and they would be once again gracing the skies. Obviously they are unairworthy BUT the photos project a different image.
|
Photos can lie.... or rather, they are rarely close-up enough to show clearly where corrosion has set in.
As an example, F-BVFC at Toulouse, which was the last one to remain at least taxyable, now has some patches of corrosion starting to show, when you know where to look. Not to mention the nasty smell of damp and mould in the cockpit which bodes no good for what's going on underneath the floor.
And even F-BTSD, kept "live" to some extent at Le Bourget, leaks some hydraulic fluid (like all Concordes did on the ground), so it's easy to imagine the dried-out hydraulic and fuel seals on the other museum aircraft.
And yes, that's kitty litter...
The composite material of the floor and the hydraulic fluid don't agree too well.
Quote:
|
Final one for this post. If She was still flying, do you still think that BA (sorry but going to ignore AF on this one) would have sufficient patronage to keep Her as a going and profitable concern?
|
I'll leave M2dude to answer that one.
CJ


The following option opens a detailed page about the selected tool in this launcher and prepares it for the ready to launch section. Once the tool is prepared, the user is able to launch or delete the selected tool.
Development Tools are user-friendly third-party applications that help save users time by completing complex tasks
WARNING! Before launching, it is important to understand the risks of third-party software.


About Me:
Welcome!
My name is Jessica Russell and I am a sophomore Computer Science major at Rose-Hulman Institute of Technology. I currently participate in several clubs and design teams, most notably as the Promotional/Sponsorship Lead for the Rose Grand Prix Engineering team and the Secretary to the Rose Rocketry Team. I have participated in numerous projects since starting at Rose, and have most recently worked on building and launching a high-powered rocket. Despite not being my most usual subject for a project, it was certainly one of the more exciting ones.
However, regardless of the engineering work I currently immerse myself in, I am also an artist, and have been for most of my life. I absolutely love art at any level, and I am particularly practiced in digital and traditional style artwork. I can get carried away in designs and tend to develop story lines and plots in my free time. I have also gained experience in making promotional fliers, logos, extensive designs (for engineering as well as story creation), and complete visual media in the form of digital mockups, comics, animation, etc.


AWS::RDS::DBProxy
The AWS::RDS::DBProxy
resource creates or updates a DB proxy.
For information about RDS Proxy for Amazon RDS, see Managing Connections with Amazon RDS Proxy in the Amazon RDS User Guide.
For information about RDS Proxy for Amazon Aurora, see Managing Connections with Amazon RDS Proxy in the Amazon Aurora User Guide.
Limitations apply to RDS Proxy, including DB engine version limitations and AWS Region limitations.
For information about limitations that apply to RDS Proxy for Amazon RDS, see Limitations for RDS Proxy in the Amazon RDS User Guide.
For information about that apply to RDS Proxy for Amazon Aurora, see Limitations for RDS Proxy in the Amazon Aurora User Guide.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::RDS::DBProxy", "Properties" : { "Auth" :
[ AuthFormat, ... ]
, "DBProxyName" :String
, "DebugLogging" :Boolean
, "EngineFamily" :String
, "IdleClientTimeout" :Integer
, "RequireTLS" :Boolean
, "RoleArn" :String
, "Tags" :[ TagFormat, ... ]
, "VpcSecurityGroupIds" :[ String, ... ]
, "VpcSubnetIds" :[ String, ... ]
} }
YAML
Type: AWS::RDS::DBProxy Properties: Auth:
- AuthFormat
DBProxyName:String
DebugLogging:Boolean
EngineFamily:String
IdleClientTimeout:Integer
RequireTLS:Boolean
RoleArn:String
Tags:- TagFormat
VpcSecurityGroupIds:- String
VpcSubnetIds:- String
Properties
Auth
-
The authorization mechanism that the proxy uses.
Required: Yes
Type: List of AuthFormat
Update requires: No interruption
DBProxyName
-
The identifier for the proxy. This name must be unique for all proxies owned by your AWS account in the specified AWS Region. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.
Required: Yes
Type: String
Update requires: Replacement
DebugLogging
-
Whether the proxy includes detailed information about SQL statements in its logs. This information helps you to debug issues involving SQL behavior or the performance and scalability of the proxy connections. The debug information includes the text of SQL statements that you submit through the proxy. Thus, only enable this setting when needed for debugging, and only when you have security measures in place to safeguard any sensitive information that appears in the logs.
Required: No
Type: Boolean
Update requires: No interruption
EngineFamily
-
The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify
MYSQL
. For Aurora PostgreSQL and RDS for PostgreSQL databases, specifyPOSTGRESQL
. For RDS for Microsoft SQL Server, specifySQLSERVER
.Valid values:
MYSQL
|POSTGRESQL
|SQLSERVER
Required: Yes
Type: String
Update requires: Replacement
IdleClientTimeout
-
The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database.
Required: No
Type: Integer
Update requires: No interruption
RequireTLS
-
A Boolean parameter that specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy.
Required: No
Type: Boolean
Update requires: No interruption
RoleArn
-
The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in AWS Secrets Manager.
Required: Yes
Type: String
Update requires: No interruption
Tags
-
An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.
Required: No
Type: List of TagFormat
Update requires: No interruption
VpcSecurityGroupIds
-
One or more VPC security group IDs to associate with the new proxy.
If you plan to update the resource, don't specify VPC security groups in a shared VPC.
Required: No
Type: List of String
Update requires: No interruption
VpcSubnetIds
-
One or more VPC subnet IDs to associate with the new proxy.
Required: Yes
Type: List of String
Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the name of the DB proxy.
For more information about using the Ref
function, see Ref.
Fn::GetAtt
Examples
Creating a DB proxy and registering a DB instance
The following example creates a DB proxy and registers a DB instance.
JSON
{ "AWSTemplateFormatVersion": "2010-09-09", "Parameters": { "ProxyName": { "Type": "String", "Default": "exampleProxy" }, "InstanceName": { "Type": "String", "Default": "database-1" }, "BootstrapSecretReaderRoleArn": { "Type": "String", "Default": "arn:aws:iam::123456789012:role/RDSSecretReaderRoleForDBProxy" }, "BootstrapProxySecretArn": { "Type": "String", "Default": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MySecretForDBProxy" }, "SubnetIds": { "Type": "String", "Default": "subnet-01b761b31fb498f20,subnet-012b9a958ef0f9949,subnet-05e8e263052025378" } }, "Resources": { "TestDBProxy": { "Type": "AWS::RDS::DBProxy", "Properties": { "DebugLogging": true, "DBProxyName": { "Ref": "ProxyName" }, "EngineFamily": "MYSQL", "IdleClientTimeout": 120, "RequireTLS": true, "RoleArn": { "Ref": "BootstrapSecretReaderRoleArn" }, "Auth": [ { "AuthScheme": "SECRETS", "SecretArn": { "Ref": "BootstrapProxySecretArn" }, "IAMAuth": "DISABLED" } ], "VpcSubnetIds": { "Fn::Split": [ ",", { "Ref": "SubnetIds" } ] } } }, "ProxyTargetGroup": { "Type": "AWS::RDS::DBProxyTargetGroup", "Properties": { "DBProxyName": { "Ref": "TestDBProxy" }, "DBInstanceIdentifiers": [ { "Ref": "InstanceName" } ], "TargetGroupName": "default", "ConnectionPoolConfigurationInfo": { "MaxConnectionsPercent": 100, "MaxIdleConnectionsPercent": 50, "ConnectionBorrowTimeout": 120 } } } } }
YAML
AWSTemplateFormatVersion: 2010-09-09 Parameters: ProxyName: Type: String Default: exampleProxy InstanceName: Type: String Default: database-1 BootstrapSecretReaderRoleArn: Type: String Default: arn:aws:iam::123456789012:role/RDSSecretReaderRoleForDBProxy BootstrapProxySecretArn: Type: String Default: arn:aws:secretsmanager:us-west-2:123456789012:secret:MySecretForDBProxy SubnetIds: Type: String Default: subnet-01b761b31fb498f20,subnet-012b9a958ef0f9949,subnet-05e8e263052025378 Resources: TestDBProxy: Type: AWS::RDS::DBProxy Properties: DebugLogging: true DBProxyName: !Ref ProxyName EngineFamily: MYSQL IdleClientTimeout: 120 RequireTLS: true RoleArn: !Ref BootstrapSecretReaderRoleArn Auth: - {AuthScheme: SECRETS, SecretArn: !Ref BootstrapProxySecretArn, IAMAuth: DISABLED} VpcSubnetIds: Fn::Split: [",", !Ref SubnetIds] ProxyTargetGroup: Type: AWS::RDS::DBProxyTargetGroup Properties: DBProxyName: !Ref TestDBProxy DBInstanceIdentifiers: [!Ref InstanceName] TargetGroupName: default ConnectionPoolConfigurationInfo: MaxConnectionsPercent: 100 MaxIdleConnectionsPercent: 50 ConnectionBorrowTimeout: 120


some more information about the work and a link to the page. more information here too.
some more information about the work and a link to the page. more information here too.
Grayscale is open source and MIT licensed. This means you can use it for any project - even commercial projects! Download it, customize it, and publish your website!
Grayscale is open source and MIT licensed. This means you can use it for any project - even commercial projects! Download it, customize it, and publish your website!
Link to more information
Grayscale is open source and MIT licensed. This means you can use it for any project - even commercial projects! Download it, customize it, and publish your website!
Link to more information


--- layout: post title: "Jekyll tips" date: 2018-02-26 12:30:00 -0500 categories: jekyll update content-pattern: html ---
Some tips- in no particular order
Tip #1
It's perfectly valid to mix .markdown files and .html files in your _posts folder.


Hi, my name is Daniel Eguia. I'm a developer and autodidact. I am currently volunteering as a Developer at Yeticraft and TAG Northwest working on various projects. I use the Fedora distro of linux as my daily driver. I enjoy many aspects of software development including requirements gathering, software design, programming, and testing. I have experience in C++, Python 3.0, CSS, HTML5, and JavaScript. One of the biggest things I enjoy is working with others to share knowledge and find solution.
Since 2007 I have been collecting data and creating internal tools and for the civil construction service industry, as a Senior Field Technician at Ninyo & Moore. While working full time to support a family, I went back to school to obtain a Bachelor of Science majoring in Computer Sci. & Computer Eng. with a concentration in Software. After volunteering at Linux Fest Northwest and being introduced to my latest mentor I began volunteering. During this time I have worked on the creation of websites, software, and hardware projects.


Social rules are expected to be broken from time to time, in that regard they are different from a code of conduct.
| ●●●●● | High-level generators | Disagreements that remain when everyone understands exactly what's being argued, and agrees on what all the evidence says, but have vague and hard-to-define reasons for disagreeing. |
| ●●●●○ | Operationalizing | Where both parties understand they're in a cooperative effort to fix exactly what they're arguing about. |
| ●●●○○ | Survey of evidence | Not trying to devastate the other person with a mountain of facts and start looking at the studies and arguments on both sides and figuring out what kind of complex picture they paint. |
| ●●●○○ | Disputing definitions | Argument hinges on the meaning of words, or whether something counts as a member of a category or not. |
| ●●○○○ | Single Studies | Better than scattered facts, proving they at least looked into the issue formally. |
| ●●○○○ | Demands for rigor | Attempts to demand that an opposing argument be held to such strict standards that nothing could possibly clear the bar. |
| ●○○○○ | Single Facts | One fact, which admittedly does support their argument, but presented as if it solves the debate in and of itself. |
| ●○○○○ | Gotchas | Short claims that purport to be devastating proof that one side can't possibly be right. |
| ○○○○○ | Social shaming | A demand for listeners to place someone outside the boundary of whom deserve to be heard. |
| Seduction | You are led to feel that the fulfillment of your dreams depends on your doing what the other is encouraging you to do. |
| Alignment | The interests of the system are presented as fulfilling your emotional needs. You are led to feel that your survival, your viability in society or your very identity depends on your doing what the other is requiring of you. |
| Reduction | Complex subjects are reduced to a single, emotionally charged issue. |
| Polarization | Issues are presented in such a way that you are either right or wrong. You are told that any dialogue between different perspectives is suspect, dangerous or simply not permissible. |
| Marginalization | You are made to feel that your own interests (or interests that run counter to the interests of the other) are inconsequential. |
| Framing | The terms of a debate are set so that issues that threaten the system cannot be articulated or discussed. You are led to ignore aspects of the issue that may be vitally important to your own interests but are contrary to the interests of the other that is seeking to make you act in their interests. |


404
404
Oops! Looks like our developer is still working on this page!
- Team EASY LEARNING
Previous page


View all current users and their status on a map.
View all current users in a list and their interests.
Change status to busy or animated.


Secure web application with OAuth
OAuth is a standard for authenticating users. There are many third-party OAuth authentication service providers are available. In this post, we learn to create a web application which allows users to Login with there Twitter credentials. I am using Ktor to develop this application. This post assumes that users are having basic knowledge of OAuth and Ktor.
This whole project is available in Github
Below is the application preview of what we are going to develop in this port.
Create a host entry
While configuring OAuth, we need to provide redirect URLs that can’t be IP addresses or localhost. So for development purpose, we need to create a host which points to <IP_ADDRESS> in local. We can create a host by editing hosts file. You can choose any name for your local domain, but I am going to give it me.mydomain.com
Update hosts file by adding a new entry like shown below. You need root/admin access to edit this file.
In Linux based operating systems this file exists at /etc/hosts and in Windows it exists at %SystemRoot%\System32\drivers\etc\hosts. Now having a new entry in the host file, we can access local machine using me.mydomain.com.
Create Twitter app
This Web application which we are developing in this post allows users to log in with there Twitter credentials. However, before that, we need to register our application with Twitter, and the below steps will help us in creating a new application with Twitter.
- Sign in to twitter developer account https://developer.twitter.com. Create a new account if not exists.
- Create a new app by clicking on Create an app button.
- Provide new app details like shown in below.
- Enter ‘Website URL’ and check ‘Enable Sign in with Twitter’ and then enter ‘Callback URLs.’ as shown in below image. When a user logs in successfully, then Twitter redirects to the given callback URL.
- Provide your application details in the final text area and then click on ‘Create.’ This action will create a new application.
- Within the application details go to ‘Keys and Tokens’ tab. Here you see the generated Consumer API Keys. We are going to use these values in our application.
Create Kotlin project with Ktor
Execute below commands to create an empty gradle Kotlin project. Once the project is created then import it into your favorite editor.
I executed this command on Gradle 5.2.1 version. You can choose to create kotlin project with any other build tool.
This command will create a new project with standard folder structure.
Add dependencies
Update build.gradle.kts to add below dependencies;
Coding
Let’s dive into the coding, the most fun part of this post :). This web application which we are developing contains four pages;
- Login: Page shows a Twitter link. When the first time user accesses this page, then the user needs to click this link, then the application redirects to Twitter.
- Main: Once user logs-in successfully then they land on this page. This page has two links; one for visit Setting page and other is to Logout.
- Settings: This page contains a link back to the Main page and a link to log out.
- Error: This page shows errors if any.
To make it simple, I code everything in a single Kotlin file. Its easier to read and can be used later for reference. Create App.kt in the project and update it with below code;
We created an embedded Netty server which runs on 8080.
Install features
Let’s customize Ktor framework by adding some required features like below;
- CallLogging: Logs all HTTP requests. This feature is useful for debugging.
- Sessions: We have multiple pages in our application. A user can navigate between Main and Settings pages, so the session helps in tracking the user state.
- Authentication: The Main motive for this post is to authenticate users, so we need this feature.
- <1> Session: In a web application we can maintain sessions in various ways, but in this application, we are using cookies. We can store cookies either at the client side or server side. Client-side is vulnerable for attacks so let’s store them at the server side in memory. Learn more about configuring sessions in this link.
- <2> Authentication: Since we are using Twitter as an authentication provider, so we need to pass OAuthAuthenticationProvider instance to ‘OAuth’ function. This instance needs three settings;
- client: We are using Apache HTTPClient. Our application connects to Twitter while authenticating users, so it needs an HTTP client for communication.
- providerLookup: Pass OAuthServerSettings instance. This instance contains some vital information related to the authentication service. These settings differ based on the service provider. In the code, I have given dummy text in consumerKey and consumerSecret, but you need to update these with your application-specific values from Twitter.
- urlProvider: Page to where the application redirects after authentication.
Configure routes
We need to configure multiple routes to navigate between the pages.
Below is the list of routes we configured in our code;
- /: Display login page with a link to Twitter. A user needs to log-in before accessing other pages.
- /main: Main page, from here a user can navigate to settings or log out. Before the page gets loaded, we are checking if the cookie is not null
- /settings: This page contains links to main and log-out.
- /logout: Cleans the session and redirects to ‘/.’
- /login/twitter: Redirect to Twitter for authentication, and this route is within ‘authenticate’ call. call.authentication.principal makes HTTP call to the authentication service. The response of this call is saved in the principal which contains the user details and token. If the principal is found then redirects to /main page else to log-in page.
We completed configuring all routes, and there are some utility functions which I am using but not explained here. They are self-explanatory, please refer them in the project here.
Conclusion
We developed a simple kotlin project with Ktor and Authentication features to enable user to login with there Twitter credentials.