Indomie
问题描述 :
During recession, Amjad needs to queue for SembakoPlus. Sembako, as we all know, stands for “Sembilan Bahan Pokok” which consists of 9 kinds of item: Rice, Sugar, Cooking-oil,Meat, Egg, Milk, Corn, Kerosene and Iodized Salt. SembakoPlus consists of Sembako and one more item: Indomie! Amjad’s favorite of all time!! (therefore, no wonder why he could stand for this long queue).
Each person in the queue is allowed to pick only one item. No need to ask, Amjad wants only Indomie. Unfortunately, they are running out of SembakoPlus stock and currently there are three kinds of item left: Rice, Sugar and Indomie. As he could see from afar, he is quite sure that Rice and Sugar will be enough for everybody.
Given the number of remaining Indomie and the number of people queuing in front of Amjad, your task is to count the probability that he will get his Indomie. Amjad can’t do programming right now as he is very nervous so he can’t think logically. He needs your help!
Each person in the queue is allowed to pick only one item. No need to ask, Amjad wants only Indomie. Unfortunately, they are running out of SembakoPlus stock and currently there are three kinds of item left: Rice, Sugar and Indomie. As he could see from afar, he is quite sure that Rice and Sugar will be enough for everybody.
Given the number of remaining Indomie and the number of people queuing in front of Amjad, your task is to count the probability that he will get his Indomie. Amjad can’t do programming right now as he is very nervous so he can’t think logically. He needs your help!
输入:
There will be multiple test cases for this problem. Each test case contains two integers N (1 ≤ N ≤ 50) and S (0 ≤ S ≤ 50), where N is the number of people queuing in front of Amjad and S is the remaining number of Indomie.
输出:
There will be multiple test cases for this problem. Each test case contains two integers N (1 ≤ N ≤ 50) and S (0 ≤ S ≤ 50), where N is the number of people queuing in front of Amjad and S is the remaining number of Indomie.
样例输入:
2 1 3 2 4 0 4 1 10 10 14 9 30 14
样例输出:
50.00000 76.92308 0.00000 33.33333 99.99831 98.65515 95.16071HintExplanation for 1st sample test case: There are two peoples queuing in front of Amjad, so those two peoples could pick of the following combination {1st people, 2nd people}: 1. Rice, Rice 2. Rice, Sugar 3. Rice, Indomie 4. Sugar, Rice 5. Sugar, Sugar 6. Sugar, Indomie 7. Indomie, Rice 8. Indomie, Sugar Since there is only one Indomie left, there are only 4 out of 8 combinations that ensure Amjad to get his Indomie (1, 2, 4 and 5), hence the probability is 4/8 = 50%.
/*
分析：
数学简单题，概率的。
没话说了，概率学的太烂了，这个题还是别人帮忙才做出来的。以后多
找点儿概率的题、学牢概率的知识，这题以后又机会了再试着做做。
注意当s>n时，直接输出100.00000，要不会WA的（参考别人代码后发现
的 – -I ）。
所以以后更要注意对特殊情况的处理。
思路：
用Ai表示前n个中，i个人取indomie的种类数。则
Ai=c(n,i)*pow(2,n-i) (前者是n个人取i个indomie的种类数，后者
是其他人可以有rice和sugar两种选择)。
那么ans=∑Ai(0,1,2……s-1)/∑Ai(0,1,2……s)。

参考：http://blog.csdn.net/ice_crazy/article/details/7461938
(adsbygoogle = window.adsbygoogle || []).push({});
兄弟，还有解压密码好吗？！你有？
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。
不黑，一股权志龙吃胖后的即视感。


Oracle SSI - Digital Team
Welcome to
THEME OF THE MONTH
JavaScript & NodeJS
Session #2
Date: 3rd August, 2018
NodeJS platform
Node.js is a server-side platform built on Google Chrome's JavaScript Engine (V8 Engine)
Features
-
Asynchronous and Event Driven
All APIs of Node.js library are asynchronous, that is, non-blocking. -
Very Fast
Being built on Google Chrome's V8 JavaScript Engine, Node.js library is very fast in code execution. -
Single Threaded but Highly Scalable
Node.js uses a single threaded model with event looping. Event mechanism helps the server to respond in a non-blocking way and makes the server highly scalable as opposed to traditional servers which create limited threads to handle requests. -
No Buffering
Node.js applications never buffer any data. These applications simply output the data in chunks.
Javascript V8 Engine
V8 is Google’s open source high-performance JavaScript engine, written in C++ and used in Google Chrome, the open source browser from Google, and in Node.js, among others
- SpiderMonkey Mozilla
- Rhino Mozilla
- Webkit Safari
- node --print-bytecode server.js
Event Loop
Creating Node Server
A Node.js application consists of the following three important components −
- Import required modules We use the require directive to load Node.js modules.
- Create server A server which will listen to client's requests similar to Apache HTTP Server.
- Read request and return response The server created in an earlier step will read the HTTP request made by the client which can be a browser or a console and return the response.
var http = require("http"); http.createServer(function (request, response) { // Send the HTTP header // HTTP Status: 200 : OK // Content Type: text/plain response.writeHead(200, {'Content-Type': 'text/plain'}); // Send the response body as "Hello World" response.end('Hello World\n'); }).listen(8081); // Console will print the message console.log('Server running at http://<IP_ADDRESS>:8081/');
Express Framework - Node Server
Express is a minimal and flexible Node.js web application framework that provides a robust set of features to develop web and mobile applications
- body-parser This is a node.js middleware for handling JSON, Raw, Text and URL encoded form data.
- cookie-parser Parse Cookie header and populate req.cookies with an object keyed by the cookie names.
- multer This is a node.js middleware for handling multipart/form-data.
var express = require('express'); var app = express(); app.get('/', function (req, res) { res.send('Hello World'); }) var server = app.listen(8081, function () { var host = server.address().address var port = server.address().port console.log("Example app listening at http://%s:%s", host, port) })
RESTful API
REST stands for REpresentational State Transfer.


| 044:056 Khan | : |
They will never taste death therein except the first death (of this world), and He will save them from the torment of the blazing Fire, |
| 044:056 Maulana | : |
They taste not therein death, except the first death; and He will save them from the chastisement of hell -- |
| 044:056 Pickthal | : |
They taste not death therein, save the first death. And He hath saved them from the doom of hell, |
| 044:056 Rashad | : |
They do not taste death therein - beyond the first death - and He has spared them the retribution of Hell. |
| 044:056 Sarwar | : |
They will not experience any death other than that which they have already been through. |
| 044:056 Shakir | : |
They shall not taste therein death except the first death, and He will save them from the punishment of the hell, |
| 044:056 Sherali | : |
They will not taste death therein, save the first death; and God will save them from the punishment of the blazing Fire, |
| 044:056 Yusufali | : |
Nor will they there taste Death, except the first death; and He will preserve them from the Penalty of the Blazing Fire,- |
Concepts/Themes Covered: الإيمان > الغيب > الجنة > صفات الجنة Faith> The Unseen World> The Paradise> Characteristics of Paradise الإيمان > الغيب > النار > أسماء النار > الجحيم Faith> The Unseen World> Hell-Fire>Hell Names> Inferno العمل > العمل الصالح > العمل المفضي إلى النجاح Action(Work)> The Good Deeds>Achtion which Leads to Success
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


{include file="public/include"}
全网福利资源分享.
It uses utility classes for typography and spacing to space content out within the larger container.
Learn more
{$vo.vod_name} {$vo.vod_version}


)
Get in touch with me!
Fill out the following fields to send me a message and I will get back to you within 3 business days.
First name:
Last name:
Email:
Message:
Mailing Address:
Shaelyn Parker
1234 5th Avenue
Pittsburgh, PA 15289
Phone Number:
123-456-7890 ext. 7713


| Developer Spotlight |
Markus Oliver Junginger started working with JXTA technology in early 2002 on behalf of his Master Thesis, in which he presents a Peer-to-Peer messaging system for scalable group communication. Although this system uses its own communication infrastructure, it incorporates JXTA features to look-up peers, and to find partitioned network segments. He is currently implementing further QoS parameters and a higher degree of intergration with JXTA. For a German magazine on Java technology, he wrote a JXTA programming tutorial which is freely available online: article one and article two. . In cooperation with Vivien Dollinger (www.yven.biz), he is developing a Peer-to-Peer collaboration tool, which will be released shortly. Vivien's web site provides further details and an early prototype. The availability will be announced at his web site www.junginger.biz that also offers information on other projects. Markus Oliver recently finished his Computer Science MS studies (Best Student Award) and research assistantship at the University of Missouri - Kansas City. He is also a candidate for graduation (Diplom Informatiker, FH) at the University of Applied Sciences in Augsburg, Germany. In the second half of 2003, he will be working in industry. You can reach Markus Oliver at<EMAIL_ADDRESS>|


Search
Preparing search index...


--- title: Contact author: Mahmood Hasan date: '2020-03-03' slug: contact categories: [] tags: [] ---
Mahmood Hasan
LinkedIn
Email: mahmood.hasan@dal.ca


Gybe provides "CTO for hire" service for startups. Have an idea, business skills, even a team, and don't know how to build your product? We do it for you while making technology look easy.
Find Out MoreGybe is a human-sized technology company, providing only experienced (5 years +), educated (Top-tier universities and colleges), and skilled ressources to help you build and grow your product. Want to try us? Get in touch we'll be up and running in no time.
Get Started!We were born and raised with digital. We understand its experience, its business, like it were simple.
We design and build services for Mobile, the most important device out-there. Then only we make it for the rest of the crowd.
We craft products for users, we build experiences to thrill and engage them. Our creations must make the world a simpler place
Using the right technology for the right think is what we do. But we never forget that it is merely a mean for a greater good.
Ready to start your next project with us? That's great! Send us an email and we will get back to you as soon as possible!


View our strava segments and join the group. Challenge us!
UC members can view our page on org sync for updates, info, and forms.
Stay in the loop with quick updates and changes on the facebook page. But permanent stuff stays on the website. So visit us again!
Cantact us with any questions, comments, or concerns.
I don't think we have a twitter right now. But we will try to get on it.
Go Bearcats!


Infrastructure Challenges
Growth is inevitable but so is data overload. Efforts to implement AI, data science, and big data applications lead to an alarming increase in expenses.
Learn more.Infrastructure Challenges
Growth is inevitable but so is data overload. Efforts to implement AI, data science, and big data applications lead to an alarming increase in expenses.
Learn more.Infrastructure Challenges
Growth is inevitable but so is data overload. Efforts to implement AI, data science, and big data applications lead to an alarming increase in expenses.
Learn more.Why Use Xtendlabs in
AI applications?
01
Automatic integrations
Xtendlabs allows automatic integrations of data, such as the ability to quickly assess data against your eligibility criteria. This can cut the turnaround time of development from days to milliseconds.
02
Faster deployment
Optimize production processes and act to balance cost, quality, and output.
03
Improve Quality
We help you identify opportunities for improvements, as well as poor use of data, help software developers avoid mistakes, and boost the bottom line.
Tools That We Have in Our Arsenal
Get support for popular tools like Apache Hadoop, Thrift, Oozie, Pig, and Flume. Have other apps? Simply provide us with your requirements and our team will do the rest.
Xtendlabs Platform
Features
24/7 customer
service
Fully scalable according
to your requirements
Immediate access to
your virtual lab
Fully secure with
automatic backups
Cost effective
Company branding
Single Sign-on
Extended learning
Get Customized Help with
Solutions Development
Keeps your costs low and easily optimize resources as you scale apps. We make it simpler for you to control your costs.
Scale your business based on traffic spikes to handle the unplanned workload
Maximize your availability with zero downtime deployments. Your data will remain available not only when you scale up, but also when you implement new changes.
Gain access to our academics institution solutions that provide up and coming software developers with hands-on access to emerging technology platforms.


This page collects some recurrent implementation patterns used in Nextflow applications. Feel free to contribute opening a pull request in the GitHub repository at this link.
1. Basic patterns
1.1. Channel duplication
1.1.1. Problem
You need to you use the same channel as input in two or more processes.
1.1.2. Solution
Use the into operator to create two (or more) copies of the source channel. Then, use the new channels as input for the processes.
1.1.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Channel
.fromPath('prots/*_?.fa')
.into { prot1_ch; prot2_ch }
process foo {
input: file x from prot1_ch
script:
"""
echo your_command --input $x
"""
}
process bar {
input: file x from prot2_ch
script:
"""
your_command --input $x
"""
}
1.1.4. Run it
Use the the following command to execute the example:
nextflow run patterns/channel-duplication.nf
2. Scatter executions
2.1. Process per file path
2.1.1. Problem
You need to execute a task for each file that matches a glob pattern.
2.1.2. Solution
Use the Channel.fromPath method to create a channel emitting all files matching the glob pattern. Then, use the channel as input of the process implementing your task.
2.1.3. Code
1
2
3
4
5
6
7
8
9
10
11
Channel.fromPath('reads/*_1.fq.gz').set{ samples_ch }
process foo {
input:
file x from samples_ch
script:
"""
your_command --input $x
"""
}
2.1.4. Run it
Use the the following command to execute the example:
nextflow run patterns/process-per-file-path.nf
2.2. Process per file chunk
2.2.1. Problem
You need to split one or more input files into chunks and execute a task for each of them.
2.2.2. Solution
Use the the splitText operator to split a file in chunks of a given size. Then use the resulting channel as input for the process implementing your task.
Caveat: By default chunks are kept in memory. When splitting big files specify the parameter file: true
to save the chunks into files. See the documentation for details.
Splitter for specific file formats are available, eg splitFasta and splitFastq.
2.2.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Channel
.fromPath('poem.txt')
.splitText(by: 5)
.set{ chunks_ch }
process foo {
echo true
input:
file x from chunks_ch
script:
"""
rev $x | rev
"""
}
2.2.4. Run it
Use the the following command to execute the example:
nextflow run patterns/process-per-file-chunk.nf
2.3. Process per file pairs
2.3.1. Problem
You need to process the files into a directory grouping them by pairs.
2.3.2. Solution
Use the Channel.fromFilePairs method to create a channel emitting the file pairs matching a glob pattern. The pattern must match a common prefix in the paired file names.
The matching files are emitted as tuples in which the first element is the grouping key of the matching files and the second element is the file pair itself.
2.3.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
Channel
.fromFilePairs('reads/*_{1,2}.fq.gz')
.set { samples_ch }
process foo {
input:
set sampleId, file(reads) from samples_ch
script:
"""
your_command --sample $sampleId --reads $reads
"""
}
2.3.4. Run it
nextflow run patterns/process-per-file-pairs.nf
2.3.5. Custom grouping strategy
When needed it is possible to define a custom grouping strategy. A common use case is for alignment BAM files (sample1.bam
) that come along with their index file. The difficulty is that the index is sometimes called sample1.bai
and sometimes sample1.bam.bai
depending on the software used. The following example can accommodate both cases.
1
2
3
4
5
6
7
8
9
10
11
12
13
Channel
.fromFilePairs('alignment/*.{bam,bai}') { file -> file.name.replaceAll(/.bam|.bai$/,'') }
.set { samples_ch }
process foo {
input:
set sampleId, file(bam) from samples_ch
script:
"""
your_command --sample $sampleId --bam ${sampleId}.bam
"""
}
2.3.6. Run it
nextflow run patterns/process-per-file-pairs-custom.nf
2.4. Process per file range
2.4.1. Problem
You need to execute a task over two or more series of files having a common index range.
2.4.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Channel
.from(1..23)
.map { chr -> tuple("sample$chr", file("/some/path/foo.${chr}.indels.vcf"), file("/other/path/foo.snvs.${chr}.vcf")) }
.set { pairs_ch }
process foo {
tag "$sampleId"
input:
set sampleId, file(indels), file(snps) from pairs_ch
"""
echo foo_command --this $indels --that $snps
"""
}
2.4.4. Run it
nextflow run patterns/process-per-file-range.nf
2.5. Process per CSV record
2.5.1. Problem
You need to execute a task for each record in one or more CSV files.
2.5.3. Code
Given the file index.csv
with the following content:
| sampleId | read1 | read2 |
|---|---|---|
FC816RLABXX |
reads/110101_I315_FC816RLABXX_L1_HUMrutRGXDIAAPE_1.fq.gz |
reads/110101_I315_FC816RLABXX_L1_HUMrutRGXDIAAPE_2.fq.gz |
FC812MWABXX |
reads/110105_I186_FC812MWABXX_L8_HUMrutRGVDIABPE_1.fq.gz |
reads/110105_I186_FC812MWABXX_L8_HUMrutRGVDIABPE_2.fq.gz |
FC81DE8ABXX |
reads/110121_I288_FC81DE8ABXX_L3_HUMrutRGXDIAAPE_1.fq.gz |
reads/110121_I288_FC81DE8ABXX_L3_HUMrutRGXDIAAPE_2.fq.gz |
FC81DB5ABXX |
reads/110122_I329_FC81DB5ABXX_L6_HUMrutRGVDIAAPE_1.fq.gz |
reads/110122_I329_FC81DB5ABXX_L6_HUMrutRGVDIAAPE_2.fq.gz |
FC819P0ABXX |
reads/110128_I481_FC819P0ABXX_L5_HUMrutRGWDIAAPE_1.fq.gz |
reads/110128_I481_FC819P0ABXX_L5_HUMrutRGWDIAAPE_2.fq.gz |
This snippet parses the file and executes a process for each line:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
params.index = 'index.csv'
Channel
.fromPath(params.index)
.splitCsv(header:true)
.map{ row-> tuple(row.sampleId, file(row.read1), file(row.read2)) }
.set { samples_ch }
process foo {
input:
set sampleId, file(read1), file(read2) from samples_ch
script:
"""
echo your_command --sample $sampleId --reads $read1 $read2
"""
}
Note: relative paths are resolved by the file
function against the execution directory.
In a real use case prefer absolute file paths.
2.5.4. Run it
Use the the following command to execute the example:
nextflow run patterns/process-per-csv-record.nf
2.6. Process per file output
2.6.1. Problem
A task in your workflow produces two or more files at time. A downstream task needs to process each of these files independently.
2.6.2. Solution
Use the flatten operator to transform the outputs of the upstream process to a channel emitting each file separately. Then use this channel as input for the downstream process.
2.6.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
process foo {
output:
file '*.txt' into foo_ch
script:
'''
echo Hello there! > file1.txt
echo What a beautiful day > file2.txt
echo I wish you are having fun1 > file3.txt
'''
}
process bar {
input:
file x from foo_ch.flatten()
script:
"""
cat $x
"""
}
2.6.4. Run it
Use the the following command to execute the example:
nextflow run patterns/process-per-file-output.nf
3. Gather results
3.1. Process all outputs altogether
3.1.1. Problem
You need to process all the outputs of an upstream task altogether.
3.1.2. Solution
Use the collect operator to gather all the outputs produced by the upstream task and emit them as a sole output. Then use the resulting channel as input input for the process.
3.1.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Channel.fromPath('reads/*_1.fq.gz').set { samples_ch }
process foo {
input:
file x from samples_ch
output:
file 'file.fq' into unzipped_ch
script:
"""
< $x zcat > file.fq
"""
}
process bar {
echo true
input:
file '*.fq' from unzipped_ch.collect()
"""
cat *.fq
"""
}
3.1.4. Run it
Use the the following command to execute the example:
nextflow run patterns/process-collect.nf
3.2. Process outputs into groups
3.2.1. Problem
You need to process in the same batch all files that have a matching key in the file name.
3.2.2. Solution
Use the map operator to associate with each file a key extracted from the file name. Then chain the resulting channel with the groupTuple operator to group together all files that have a matching key. Finally use the resulting channel as input for the process.
3.2.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Channel
.fromPath('reads/*')
.map { file ->
def key = file.name.toString().tokenize('_').get(0)
return tuple(key, file)
}
.groupTuple()
.set{ groups_ch }
process foo {
input:
set key, file(samples) from groups_ch
script:
"""
echo your_command --batch $key --input $samples
"""
}
3.2.4. Run it
nextflow run patterns/process-into-groups.nf
3.3. Collect outputs into a file
3.3.1. Problem
You need to concatenate into a single file all output files produced by an upstream process.
3.3.2. Solution
Use the collectFile operator to merge all the output files into a single file.
3.3.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Channel.fromPath('reads/*_1.fq.gz').set { samples_ch }
process foo {
input:
file x from samples_ch
output:
file 'file.fq' into unzipped_ch
script:
"""
< $x zcat > file.fq
"""
}
unzipped_ch
.collectFile()
.println{ it.text }
3.3.4. Run it
Use the the following command to execute the example:
nextflow run patterns/collect-into-file.nf
4. Organize outputs
4.1. Store process outputs
4.1.1. Problem
You need to store the outputs of one or more processes into a directory structure of your choice.
4.1.2. Solution
Use the publishDir directive to set a custom directory where the process outputs need to be made available.
4.1.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
params.reads = 'reads/*{1,2}.fq.gz'
params.outdir = 'my-results'
Channel.fromFilePairs(params.reads).set{ samples_ch }
process foo {
publishDir "$params.outdir/$sampleId"
input:
set sampleId, file(samples) from samples_ch
output:
file '*.fq'
script:
"""
< ${samples[0]} zcat > sample_1.fq
< ${samples[1]} zcat > sample_2.fq
"""
}
4.1.4. Run it
Run the script with the following command:
nextflow run patterns/publish-process-outputs.nf
4.2. Store outputs matching a glob pattern
4.2.1. Problem
A task in your workflow creates many output files that are required by a downstream task. You want to store some of those files into separate directories depending the file name.
4.2.2. Solution
Use two or more publishDir directives
to store the output files into separate storing paths. For each directive specify a different glob string
using the option pattern
to store into each directory only the files that match the provided pattern.
4.2.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
params.reads = 'reads/*_{1,2}.fq.gz'
params.outdir = 'my-results'
Channel
.fromFilePairs(params.reads, flat: true)
.set{ samples_ch }
process foo {
publishDir "$params.outdir/$sampleId/counts", pattern: "*_counts.txt"
publishDir "$params.outdir/$sampleId/outlooks", pattern: '*_outlook.txt'
publishDir "$params.outdir/$sampleId/", pattern: '*.fq'
input:
set sampleId, file('sample1.fq.gz'), file('sample2.fq.gz') from samples_ch
output:
file "*"
script:
"""
< sample1.fq.gz zcat > sample1.fq
< sample2.fq.gz zcat > sample2.fq
awk '{s++}END{print s/4}' sample1.fq > sample1_counts.txt
awk '{s++}END{print s/4}' sample2.fq > sample2_counts.txt
head -n 50 sample1.fq > sample1_outlook.txt
head -n 50 sample2.fq > sample2_outlook.txt
"""
}
4.2.4. Run it
Run the script with the following command:
nextflow run patterns/publish-matching-glob.nf
4.3. Rename process outputs
4.3.1. Problem
You need to store the outputs of a process to a directory giving files a name of your choice.
4.3.2. Solution
The publishDir allows you to store the process outputs in a directory of your choice.
Specify the saveAs
parameter to give each file a name of your choice proving
a custom rule as a closure.
4.3.3. Code
1
2
3
4
5
6
7
8
9
10
11
process foo {
publishDir 'results', saveAs: { filename -> "foo_$filename" }
output:
file '*.txt'
'''
touch this.txt
touch that.txt
'''
}
4.3.4. Run it
nextflow run patterns/publish-rename-outputs.nf
4.3.5. Save outputs in a sub-directory
The same pattern can be used to store specific files in separate directories depending the actual name.
1
2
3
4
5
6
7
8
9
10
11
process foo {
publishDir 'results', saveAs: { filename -> filename.endsWith(".zip") ? "zips/$filename" : filename }
output:
file '*'
'''
touch this.txt
touch that.zip
'''
}
Relative paths are resolved against the publishDir store path. Use an absolute path
to store files in a directory outside the publishDir store path.
|
4.3.6. Run it
nextflow run patterns/publish-rename-outputs-subdirs.nf
5. Other
5.1. Get process work directory
5.1.1. Problem
A tool need the explicit path of the current task work directory.
5.1.2. Solution
Use the $PWD
Bash variable or the pwd
command to retrieve the task working directory path.
Note: Make sure use to escape the $
variable placeholder
when the command script is enclosed in double quote characters.
5.1.3. Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
process foo {
echo true
script:
"""
echo foo task path: \$PWD
"""
}
process bar {
echo true
script:
'''
echo bar task path: $PWD
'''
}
5.1.4. Run it
The command run the script with an empty channel:
nextflow run patterns/process-get-workdir.nf
Use the following command to provide the same script some input files, that prevents the process to be executed:
nextflow run patterns/process-get-workdir.nf --inputs ../data/prots/\*
5.2. Ignore failing process
5.2.1. Problem
A task is expected to fail in a certain condition. You want to ignore the failure and continue the execution of the remaining tasks in the workflow.
5.2.2. Solution
Use the process directive errorStrategy 'ignore'
to ignore the error condition.
5.2.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
process foo {
errorStrategy 'ignore'
script:
'''
echo This is going to fail!
exit 1
'''
}
process bar {
script:
'''
echo OK
'''
}
5.2.4. Run it
Run the script with the following command:
nextflow run patterns/ignore-failing-process.nf
5.3. Mock dependency
5.3.1. Problem
You need to synchronize the execution of two processes
for which there isn’t a direct input-output relationship,
so that process bar
is executed only after the
completion of process foo
.
5.3.2. Solution
Add to the outputs of process foo
a channel producing
a flag value.
Then use this channel as input for process bar
to trigger
its execution when the other process completes.
5.3.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Channel
.fromPath('.data/reads/*.fq.gz')
.set{ reads_ch }
process foo {
output:
val true into done_ch
script:
"""
your_command_here
"""
}
process bar {
input:
val flag from done_ch
file fq from reads_ch
script:
"""
other_commad_here --reads $fq
"""
}
6. Advanced patterns
6.1. Conditional resources definition
6.1.1. Problem
A task in your workflow requires to use an amount of computing resources eg. memory that depends on the size or the name of one or more input files.
6.1.2. Solution
Declare the resource requirements e.g. memory
, cpus
, etc.
in a dynamic manner using a closure.
The closure computes the required amount of resources using the file
attributes, such as size
, etc., of the inputs declared in the process
definition.
6.1.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Channel
.fromPath('reads/*_1.fq.gz')
.set { reads_ch }
process foo {
memory { reads.size() < 70.KB ? 1.GB : 5.GB }
input:
file reads from reads_ch
"""
your_command_here --in $reads
"""
}
6.1.4. Run it
nextflow run patterns/conditional-resources.nf
Note: requires version 0.32.0 or later.
6.2. Conditional process executions
6.2.1. Problem
Two different tasks need to be executed in a mutually exclusive manner, then a third task should post-process the results of the previous execution.
6.2.2. Solution
Use a when statement to conditionally execute two different processes. Each process declares its own output channel.
Then use the mix operator to create a new channel that will emit the outputs produced by the two processes and use it as the input for the third process.
6.2.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
params.flag = false
process foo {
output:
file 'x.txt' into foo_ch
when:
!params.flag
script:
'''
echo foo > x.txt
'''
}
process bar {
output:
file 'x.txt' into bar_ch
when:
params.flag
script:
'''
echo bar > x.txt
'''
}
process omega {
echo true
input:
file x from foo_ch.mix(bar_ch)
script:
"""
cat $x
"""
}
6.2.4. Run it
Use the the following command to execute the example:
nextflow run patterns/conditional-process.nf
The processes foo
and omega
are executed. Run the same command
with the --flag
command line option.
nextflow run patterns/conditional-process.nf --flag
This time the processes bar
and omega
are executed.
6.2.5. Alternative solution
Conditionally create the input channels normally (with data) or as empty channels. The process consuming the individual input channels will only execute if the channel is populated. Each process still declares its own output channel.
Then use the mix operator to create a new channel that will emit the outputs produced by the two processes and use it as the input for the third process.
6.2.6. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
params.flag = false
(foo_inch, bar_inch) = ( params.flag
? [ Channel.empty(), Channel.from(1,2,3) ]
: [ Channel.from(4,5,6), Channel.empty() ] )
process foo {
input:
val(f) from foo_inch
output:
file 'x.txt' into foo_ch
script:
"""
echo $f > x.txt
"""
}
process bar {
input:
val(b) from bar_inch
output:
file 'x.txt' into bar_ch
script:
"""
echo $b > x.txt
"""
}
process omega {
echo true
input:
file x from foo_ch.mix(bar_ch)
script:
"""
cat $x
"""
}
6.2.7. Run it
nextflow run patterns/conditional-process2.nf
6.3. Skip process execution
6.3.1. Problem
You have two sequential tasks in your workflow. When an optional flag is specified the first task should not be executed and its input(s) is processed by the second task.
6.3.2. Solution
Use an empty channel, created in a conditional expression, to skip the first process execution when an optional parameter is specified.
Then, define the second process input as a mix of the first process output (when executed) and the input channel.
6.3.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
params.skip = false
params.input = "$baseDir/sample.fq.gz"
Channel.fromPath(params.input).set{ input_ch }
(foo_ch, bar_ch) = ( params.skip
? [Channel.empty(), input_ch]
: [input_ch, Channel.empty()] )
process foo {
input:
file x from foo_ch
output:
file('*.fastq') into optional_ch
script:
"""
< $x zcat > ${x.simpleName}.fastq
"""
}
process bar {
echo true
input:
file x from bar_ch.mix(optional_ch)
"""
echo your_command --input $x
"""
}
6.3.4. Run it
Use the the following command to execute the example:
nextflow run patterns/skip-process-execution.nf
The processes foo
and bar
are executed.  Feedback loop
6.4.1. Problem
You need to repeat the execution of one or more tasks, using the output as the input for a new iteration, until a certain condition is reached.
6.4.2. Solution
Use the output of the last process in the iteration loop as the input for the first process.
To do so, explicitly create the output channel using Channel.create method.
6.4.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
params.input = 'hello.txt'
condition = { it.readLines().size()>3 }
feedback_ch = Channel.create()
input_ch = Channel.fromPath(params.input).mix( feedback_ch.until(condition) )
process foo {
input:
file x from input_ch
output:
file 'foo.txt' into foo_ch
script:
"""
cat $x > foo.txt
"""
}
process bar {
input:
file x from foo_ch
output:
file 'bar.txt' into feedback_ch
file 'bar.txt' into result_ch
script:
"""
cat $x > bar.txt
echo World >> bar.txt
"""
}
result_ch.last().println { "Result:\n${it.text.indent(' ')}" }
6.4.4. Run it
Use the the following command to execute the example:
nextflow run patterns/feedback-loop.nf
6.5. Optional input
6.5.1. Problem
One or more processes have an optional input file.
6.5.2. Solution
Use a special file name to mark the absence of the file parameter.
6.5.3. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
params.inputs = 'prots/*{1,2,3}.fa'
params.filter = 'NO_FILE'
prots_ch = Channel.fromPath(params.inputs)
opt_file = file(params.filter)
process foo {
input:
file seq from prots_ch
file opt from opt_file
script:
def filter = opt.name != 'NO_FILE' ? "--filter $opt" : ''
"""
your_commad --input $seq $filter
"""
}
6.5.4. Run it
Run the script with the following command:
nextflow run patterns/optional-input.nf
Run the same script providing an optional file input:
nextflow run patterns/optional-input.nf --filter foo.txt
6.6. Optional output
6.6.1. Problem
A task in your workflow is expected to not create an output file in some circumstances.
6.6.2. Solution
Declare such output as an optional
file.
6.6.3. Code
1
2
3
4
5
6
7
8
9
process foo {
output:
file 'foo.txt' optional true into foo_ch
script:
'''
your_command
'''
}
6.6.4. Run it
Use the the following command to execute the example:
nextflow run patterns/optional-output.nf
6.7. Execute when empty
6.7.1. Problem
You need to execute a process if a channel is empty.
6.7.2. Solution
Use the ifEmpty operator to emit a marker value to trigger the execution of the process.
6.7.3. Example
1
2
3
4
5
6
7
8
9
10
11
process foo {
input:
val x from ch.ifEmpty { 'EMPTY' }
when:
x == 'EMPTY'
script:
'''
your_command
'''
}
6.7.4. Run it
The command run the script with an empty channel:
nextflow run patterns/process-when-empty.nf
Use the following command to provide the same script some input files, that prevents the process to be executed:
nextflow run patterns/process-when-empty.nf --inputs ../data/prots/\*
6.8. Execute when another process fails
6.8.1. Problem
You need to execute a process if another process fails.
6.8.2. Solution
Use the env qualifier
to capture the exit status of the process. set +e
prevents the script from exiting
immediately if the command exits with a non-zero status.
6.8.3. Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
process foo {
output:
env PROCESS_FOO_FAILED into process_foo_failed
script:
"""
set +e
PROCESS_FOO_FAILED=0
trap 'PROCESS_FOO_FAILED=1' ERR
cat thisfiledoesnotexist.txt
"""
}
process bar {
input:
val x from process_foo_failed
when:
x=="1"
script:
"""
echo $x
"""
}
6.8.4. Run it
Use the the following command to execute the example:
nextflow run patterns/process-when-another-process-fails.nf
6.8.5. Dynamic computing resources
Use set +e
only for the last task attempt if the process foo
implements
dynamic directives to control the computing resources requested in case of
a process failure.
6.8.6. Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
process foo {
memory { 1.GB * task.attempt }
maxRetries 2
errorStrategy 'retry'
output:
env PROCESS_FOO_FAILED into process_foo_failed
script:
"""
if [ ${task.attempt} = ${task.maxRetries + 1 } ]; then
set +e
fi
PROCESS_FOO_FAILED=0
trap 'PROCESS_FOO_FAILED=1' ERR
cat thisfiledoesnotexist.txt
"""
}
process bar {
input:
val x from process_foo_failed
when:
x=="1"
script:
"""
echo $x
"""
}
6.8.7. Run it
Use the the following command to execute the example:
nextflow run patterns/process-when-another-process-fails2.nf


| Interface | Description |
|---|---|
| IKandyAudioItem |
Interface that represents the audio message
Used to work with Kandy Audio messages
|
| IKandyChatService |
This interface is used to send and receive an Instant Message (IM).
|
| IKandyContactItem |
This interface represents the contact (vCard) file
|
| IKandyCustomItem |
Handles a custom content for chat message
|
| IKandyEvent |
This interface represents Kandy Events such as: Kandy message
IKandyMessage |
| IKandyFileItem |
This interface represents the generic file, other Kandy File types that inherit from this interface:
IKandyVideoItem , IKandyAudioItem , IKandyContactItem , IKandyImageItem |
| IKandyImageItem |
This interface is represents the Image file
|
| IKandyLocationItem |
This interface represents the Location
|
| IKandyMediaItem |
This interface represents data included in the Kandy message
IKandyMessage |
| IKandyMessage |
This interface is used to set up the parameters for the IM (chat)
|
| IKandyTextItem |
This interface represent a simple text message
|
| IKandyTransferProgress | |
| IKandyVideoItem |
This interface represents the Video message
|
| KandyChatServiceNotificationListener |
This Interface defines a callback to be invoked when a chat received.
|
| Class | Description |
|---|---|
| KandyChatMessage |
The message object
|
| KandyChatSettings |
The settings object to configure service specific configurations
|
| KandyDeliveryAck | |
| KandyMessageBuilder |
Creates all kinds of Kandy Messages
|
| KandySMSMessage |
| Enum | Description |
|---|---|
| KandyMessageMediaItemType |
Defines the data type of the message data (Video, Audio, Image, Text, Location, Contact (vCard)
|
| KandyMessageType | |
| KandyThumbnailSize |
Represents thumbnail size(dimensions)
|
| KandyTransferState |
Copyright © 2014 GENBAND, Inc. All Rights Reserved.


ZptBuilder.exe manual
The following is exported from the manpage for the ZPT-Sharp command-line-renderer application.
NAME
ZptBuilder.exe - parse and render Zope Page Templates documents
SYNOPSIS
ZptBuilder.exe [options] [inputs]
DESCRIPTION
The ZptBuilder application is used to parse and render documents formatted as Zope Page Templates source files, into either HTML or XML output documents. The inputs may be one or more file or directory paths, indicating the files and/or directories to be parsed and rendered.
Alternatively, if the only input is - (a single minus-dash) then the application will expect a single ZPT document to be passed via STDIN. Input passed via standard input is treated and rendered as HTML, unless the --xml option is used.
Where directory paths are specified amongst the input, then that directory (and all child directories) will be searched for matching documents to be rendered. This search is controlled by the mode (HTML or XML) and the options --input-filename-pattern and --ignore.
By default, rendered output is emitted to standard output; this behaviour may be overridden, writing the output to file(s) using the --output option. When directory paths are specified as inputs and the --output option is used, each output file is saved to a path relative to the output path, based on its relative path from the input directory.
OPTIONS
- --help,-h
- Prints a usage statement and exits.
- --version
- Prints version information and exits.
- --html,-t
- Sets the application to work in HTML mode; all inputs will be treated and rendered as HTML files. The default behaviour is to use the input file's extension to determine the file type: .pt for HTML files or .xml for XML files.
- --xml,-x
- Sets the application to work in XML mode; all inputs will be treated and rendered as XML files. The default behaviour is to use the input file's extension to determine the file type: .pt for HTML files or .xml for XML files.
- --annotate
- Enables source annotation; causes comments to be generated and added to the rendered output annotating information about the source files used. A comment is generated each time the rendered output switches context to use a different piece of the source file, such as when METAL macros or slots are used.
- --no-xml-declaration
- Omits the <?xml?> declaration from the output when rendering XML inputs. Has no effect for inputs treated as HTML.
- --input-filename-pattern=PATTERN,-p
- Sets a glob pattern for matching input files when directory path(s) are provided amongst the input, by default this is set to "*.pt". Note that this default value will mean that the only input files matched will be treated as HTML files.
- --output=PATH,-o
- Sets the application to emit output to the filesystem, instead of using standard output. If the path indicates a single file then all output is redirected to that file. In this case, the file will be created if it does not already exist, as long as its parent directory exists.
- If the path to a directory is specified then each rendered document will be rendered to a separate file within the output directory. In this case, the output directory path must exist or else an error will be raised. Where a directory path is used, the names of the created files are based upon the name of the input files; the option --output-filename-extension controls their extension. Additionally, if a directory path is used for the input, then the output files are created using a directory structure mimicking the relative path from the input directory. Consider the following:
-
ZptBuilder.exe --output=my-out-dir/ my-input-dir
- A file at the path my-input-dir/foo/bar/baz.pt would be rendered and output to the path my-out-dir/foo/bar/baz.html. Thus, the relative directory structure within an input directory of files to render is preserved in the output.
- --output-filename-extension=EXT,-e
- Controls the file extension of the file outputs, when the --output option is used with a directory path. By default this is either .html or .xml based upon how the input file is treated. Has no effect when the output is sent to a single file or if the output is rendered to standard output.
- --ignore=PATH,-i
- When a directory path is amongst the inputs, causes the named path (or paths, separated by semicolons) to be ignored from the search. Ignored paths (which may be file or directory paths) will not be rendered. Has no effect when the input does not contain any directory paths.
- --keyword-options=KEY_VALUE_PAIRS
- Provides keyword options for the rendering application. This is a semicolon-separated list of key/value pairs to be provided to the root TALES context as keyword options. This should be provided in the format "keyone=valueone;keytwo=valuetwo" and so on.
- --rendering-context-factory=CLASS
- Where provided, overrides the default implementation of CSF.Zpt.Rendering.IRenderingContextFactory to use when rendering pages. This must be a full, assembly-qualified type name where provided.
- --output-encoding=ENCODING,-n
- Sets the text encoding to use for the output(s). By default the UTF-8 encoding is used. Any encoding 'web name' may be specified here.
- --context-visitors=CLASSES
- Where provided, overrides the default implementations of CSF.Zpt.Rendering.IContextVisitor to use when rendering pages. This is an ordered list of type names, separated by semicolons. These names must be full, assembly-qualified type names where provided.
- --quiet,-q
- Disables all application output (to standard error) except for fatal unexpected errors (application crashes). Usually, the count of documents rendered by the application is sent to the console, along with a list of documents which failed to render. This has no effect upon documents rendered to standard output, when specified by --output. This flag takes precedence should --verbose also be specified.
- --verbose,-v
- Sends a list of the documents which were successfully rendered to standard error, in addition to the default application output. This flag is only useful when --quiet is not specified.
FILES
- ZptBuilder.exe.config
- This is the configuration file used by the ZptBuilder.exe application. It is used for configuring the plugin assemblies loaded, and also for configuring diagnostic logging/tracing.
- There are comments in the configuration file illustrating sample configuration. This sample configuration demonstrates both how to enable the default plugins and also how to enable logging of rendering operations.
- Plugins (various files)
- ZPT-Sharp, and with it the ZptBuilder.exe application, makes use of a plugin architecture. The plugin architecture is used for parsing and rendering of document types (such as HTML or XML) and also for the evaluation of TALES expressions.
- The ZptBuilder.exe application will not be very useful if no plugins are installed. Consequently, a few plugins - which provide the standard ZPT functionality - are installed by default. Plugins are distributed as separate DLL assembly files. To install them, place them into a directory of your choosing and add relevant configuration to the configuration file. This will include, at a minimum, the path to each plugin assembly. If you wish to set/change the default document providers or to change the default TALES expression evaluator then this may also be achieved in the configuration file.
SEE ALSO
- ZptBuilder.exe.config (5)
- Information about the configuration syntax


To go beyond a one-column autocomplete and provide a customized drop-down, use the base class and write your own control with the correct column set up and formatting. An example is shown here. This example uses unusual "table" CSS to create an acceptable appearance multiple columns.


Obama Issues Warning To 'Revolutionary' Democrats
by Peace FM OnlineFormer US President Barack Obama has issued a warning to Democratic presidential candidates, cautioning them against policies that are not "rooted in reality".
Mr Obama said Democrats risked alienating voters if they lurched too far to the left politically.
Featured Video


| Dungeon options | |
|---|---|
| Dungeon size: | |
| Dungeon difficulty: | |
| Party level: | |
| Party size: | |
| Treasure value: | |
| Items max rarity: | |
| Room density: | |
| Room size: | |
| Monsters type: | |
| Traps: | |
| Dead ends: | |
| Corridors: | |
| Roaming monsters: | |
| Theme: | |
| Generate plain map: |
Just my fun home project (another Random Dungeon Map Generator)
This generator based on D&D5th Edition SRD (released under OGL 1.0a license)


@Retention(value=CLASS)
@Target(value=TYPE)
public @interface CarbonCopy
If a name is specified, a class with that name will be created, otherwise a class with a name POJO appended to this class will be created
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
generateSetters
Whether to add setter method to the generated copy.
|
java.lang.String[] |
ignoredFields
Array of fields to be ignored if any
This can also be specified using
CarbonCopyAccessor |
java.lang.String |
name
Specifies the name for the CarbonCopy class to be created.
|
public abstract java.lang.String name
public abstract java.lang.String[] ignoredFields
CarbonCopyAccessor


|
| static void | OpenWebPortal (DeviceInfo targetDevice) |
| | Opens the Device Portal for the target device. More...
|
| |
| static async Task< DeviceOsInfo > | GetDeviceOsInfoAsync (DeviceInfo targetDevice) |
| | Gets the Microsoft.MixedReality.Toolkit.WindowsDevicePortal.DeviceOsInfo of the target device. More...
|
| |
| static async Task< MachineName > | GetMachineNameAsync (DeviceInfo targetDevice) |
| | Gets the Microsoft.MixedReality.Toolkit.WindowsDevicePortal.MachineName of the target device. More...
|
| |
| static async Task< BatteryInfo > | GetBatteryStateAsync (DeviceInfo targetDevice) |
| | Gets the Microsoft.MixedReality.Toolkit.WindowsDevicePortal.BatteryInfo of the target device. More...
|
| |
| static async Task< PowerStateInfo > | GetPowerStateAsync (DeviceInfo targetDevice) |
| | Gets the Microsoft.MixedReality.Toolkit.WindowsDevicePortal.PowerStateInfo of the target device. More...
|
| |
| static async Task< bool > | RestartAsync (DeviceInfo targetDevice) |
| | Restart the target device. More...
|
| |
| static async Task< bool > | ShutdownAsync (DeviceInfo targetDevice) |
| | Shuts down the target device. More...
|
| |
| static async Task< bool > | IsAppInstalledAsync (string packageName, DeviceInfo targetDevice) |
| | Determines if the target application is currently running on the target device. More...
|
| |
| static async Task< bool > | IsAppRunningAsync (string packageName, DeviceInfo targetDevice, ApplicationInfo appInfo=null) |
| | Determines if the target application is running on the target device. More...
|
| |
| static async Task< InstalledApps > | GetAllInstalledAppsAsync (DeviceInfo targetDevice) |
| |
| static async Task< bool > | InstallAppAsync (string appFullPath, DeviceInfo targetDevice, bool waitForDone=true) |
| | Installs the target application on the target device. More...
|
| |
| static async Task< bool > | UninstallAppAsync (string packageName, DeviceInfo targetDevice, ApplicationInfo appInfo=null) |
| | Uninstalls the target application on the target device More...
|
| |
| static async Task< bool > | LaunchAppAsync (string packageName, DeviceInfo targetDevice, ApplicationInfo appInfo=null) |
| | Launches the target application on the target device. More...
|
| |
| static async Task< bool > | StopAppAsync (string packageName, DeviceInfo targetDevice, ApplicationInfo appInfo=null) |
| | Stops the target application on the target device. More...
|
| |
| static async Task< string > | DownloadLogFileAsync (string packageName, DeviceInfo targetDevice, ApplicationInfo appInfo=null) |
| | Downloads and launches the Log file for the target application on the target device. More...
|
| |
| static async Task< IpConfigInfo > | GetIpConfigInfoAsync (DeviceInfo targetDevice) |
| | Gets the Microsoft.MixedReality.Toolkit.WindowsDevicePortal.IpConfigInfo of the target device. More...
|
| |
| static async Task< AvailableWiFiNetworks > | GetAvailableWiFiNetworksAsync (DeviceInfo targetDevice, InterfaceInfo interfaceInfo) |
| | Gets the Microsoft.MixedReality.Toolkit.WindowsDevicePortal.AvailableWiFiNetworks of the target device. More...
|
| |
| static async Task< Response > | ConnectToWiFiNetworkAsync (DeviceInfo targetDevice, InterfaceInfo interfaceInfo, WirelessNetworkInfo wifiNetwork, string password) |
| | Connects to the specified WiFi Network. More...
|
| |
| static async Task< NetworkInterfaces > | GetWiFiNetworkInterfacesAsync (DeviceInfo targetDevice) |
| | Gets the Microsoft.MixedReality.Toolkit.WindowsDevicePortal.NetworkInterfaces of the target device. More...
|
| |
| static string | FinalizeUrl (string targetUrl) |
| | This Utility method finalizes the URL and formats the HTTPS string if needed. More...
|
| |
| static async Task< bool > | RefreshCsrfTokenAsync (DeviceInfo targetDevice) |
| | Refreshes the CSRF Token in case the device or its portal was restarted. More...
|
| |
| static async Task< bool > | EnsureAuthenticationAsync (DeviceInfo targetDevice) |
| | Makes sure the Authentication Headers and CSRF Tokens are set. More...
|
| |
Function used to communicate with Windows 10 devices through the device portal REST APIs.


The Order Experience team at Dell is currently exploring ways to make products easier to buy.
In line with this idea, they wished to test the user experience of the comparison feature, which allows users to compare laptops on Dell.com.
I worked in a team of 3 other student designers to evaluate the then-current state of the feature, and made creative design suggestions to enhance the usability.
scrolling through a lot... of information
Comparing multiple laptops at once is difficult, especially if you aren't familiar with technical jargon. How can we improve the usability of a laptop comparison tool to aid users in making their purchasing decisions?
The realm of e-commerce has countless product-comparison tools. We began the process by conducting a comparative analysis to find the patterns in the market, and the users' common needs. The selection of competitors was based on leading laptop brands and popular online sellers.
Common practices of having up to 4-comparisons simultaneously in table-formats
Better tools by the competitors speak a simple language, easy for anyone to understand. For example, Apple explained the approximate use of their laptops by hours, for their batteries. Watt-hours(Whr)anyone?
No competitors went above and beyond to help users make their decisions, unless they were in articles to rank "best laptops for ...", no creative help when comparing!
Best and the prettiest tools took advantage of whitespace and clean typefaces
After identifying market standards for comparison tools via the comparative analysis, we created an in-depth analysis of Dell’s current laptop comparison tool through heuristic evaluation (as per Nielsen's Heuristics). The following are the three lowest-evaluated heuristics.
Dell's comparison tool did not speak a language that every potential persona would. The tool is filled with technical jargon such as 'SSD' and '1.2mm travel chiclet keys'. Users with little to no technical familiarity would have no idea what they mean.
The amount of information relayed to the users were abundant but overwhelming. Every character in an interface fight for the users' attention. The tool wasn't cutting to the chase–overburdening users with information they don't always need.
The tool would not be able to fill out every listing of the laptops' components. If the maker of these laptops don't have these tech-spec information regarding their products, where else can users go? In addition, there were visual highlighting done inconsistently throughout the tool's interfaces, which may mislead users.
After the preliminary research on the tool, the team created 3 personas of potential users that would dictate the team's design decisions going forward with designs. We came across an interesting problem where we initially thought that a user's technical expertise would directly correlate with his/her technical-requirement. Through user surveys and interviews, we found that wasn't the case at all.
The everyday casual users for streaming videos and drafting documents.
Students and people who need slightly faster and more powerful laptops for school, work, and multimedia purposes.
The professionals, gamers, and hobbyists that really need the rendering and multitasking power.
Evaluations and analysis on the tool are great ways but it was time to ask the potential users, and study their interactions and thought processes.
Users despise it when websites repeatedly prompt them to do something.
Dell implemented a blue-bar rating system for a few components that looked clean; however, testers had trouble understanding the benchmarking system.
According to research, it takes 50 milliseconds for users to make a first-impression on a website. At the landing screen of the tool, there is nothing that users can relate to it visually.
Forcing users to make a decision by limiting their choices is one thing, but a comparison tool not helping the user compare? Testers wanted visual cues and patterns to make quick and easy decisions. Do you see anything on the left other than a wall of text?
When creating our personas, we thought users with high-technical requirements were always correlated with being a tech-savvy gamer. We found this to not be true at all, as we have overlooked gamers with little technical expertise and gamers that did not care for gaming on their laptops.
With all the insights gathered in the previous stages, we began sketching and passing around ideas. Through a few rounds of iterations with feedbacks, I created a prototype for validation testing.
We explored ways to visually indicate the differences between comparisons. Relying solely on colors may pose an accessibility issue to color-blind users.
We conducted many card sorting exercises and asked potential users to help us arrange the laptop components in the order of importance. They all showed a similar pattern depending on their intended use for the laptops: gaming, casual, school, and etc. We made these laptop-components features into different pre-set categories. No more endless scrolling!
The original tool emphasized a vertical distinction between products, which went against the users' subconscious tendency to compre components side-by-side. Following a better practice by one of the competitors in the industry, we horizontally grouped together same components from each product in clean list format.
Good designs minimize the memory burden on the users, rarely relying on the users to memorize and recall information. The original tool lacked this ability–for instance, while scrolling down the long list of components, the columns-to-product relationship would be lost. No more memorizing which column belongs to which laptop!
With the above interactive prototype, we've conducted validation tests to see if our design had an impact on testers' performances.
Because we wanted to compare the performances of the testers on both designs (original and new), we conducted within-subject A/B tests. Every tester was required to go through a few hypothetical scenarios and complete a set of tasks, on both versions of the tool.
During each testing sessions, the team gathered both qualitative and quantitative data to benchmark the performances.
Task completion time, SUS Questionnaires, and click attempts.
User actions, thought processes, repetitive error patterns, first-impressions, emotional distress points, and pain-points.
Through the validation test results, we've compiled and adjusted the features for our final design.
When creating personas for this project, I quickly assumed that a technical requirement of a persona would directly correlate with their technical-knowledge. That was definitely not the case as per our user research! People who are keen with technology may not need or want a powerful computer.
No hard-feelings Dell! But this was the first project that I've done with a company this size; I always thought that well-established companies such as Dell would have a very good grasp of their users/customers. I am glad I was able to contribute to such an establishment, and hope to be able to contribute to more companies.
To create our interactive prototype, InVision(app) was not enough to translate our ideas and interaction pieces. I picked up a neat software called Principle to package our ideas into one interactive prototype.


If you use rems for setting font sizes, here's a tiny tool to calculate the rem sizes you need for your css.
Choose your <HTML> font-size (px)
px sizes to convert


I design cost-efficient social media strategies around your goals.
Being creative on multiple levels means I can deliver high-quality content at a better value.
I am constantly seeking new ways to shape content to stay ahead of the rapid changes in digital media.
Your content deserves to be created. It doesn't matter if your audience is one or one million.
Get out of your rut. The best content will always come from someone willing to try something new and unexpected.
Your content should be a natural extension of your passion. The more you enjoy your content - the more your audience will too.
Every piece of content should direct your audience to take action. That could take the form of something as simple as watching another video, buying your product, or visiting a website.
"David is a very professional, creative and detail-oriented individual. It's always been a pleasure working with such a talented person. He brings an original, creative touch to all his projects. I certainly recommend him!"
Lorem ipsum dolor sit amet, consectetur adipisicing elit. MiniLorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut eaque, laboriosam veritatis, quos non quis ad perspiciatis, totam corporis ea, alias ut unde.


|
Drake
|
Represents the Chebyshev polynomial of the first kind Tₙ(x).
One definition of Chebyshev polynomial of the first kind is Tₙ(cos(θ)) = cos(nθ) It can also be defined recursively as
T₀(x) = 1 T₁(x) = x Tₙ₊₁(x) = 2xTₙ(x) − Tₙ₋₁(x)
#include <drake/common/symbolic_chebyshev_polynomial.h>
Public Member Functions | |
| ChebyshevPolynomial (Variable var, int degree) | |
| Constructs a Chebyshev polynomial Tₙ(x) More... | |
| const Variable & | var () const |
| Getter for the variable. More... | |
| int | degree () const |
| Getter for the degree of the Chebyshev polynomial. More... | |
| Polynomial | ToPolynomial () const |
| Converts this Chebyshev polynomial to a polynomial with monomial basis. More... | |
| double | Evaluate (double var_val) const |
Evaluates this Chebyshev polynomial at var_val . More... | |
| bool | operator== (const ChebyshevPolynomial &other) const |
Checks if this and other represent the same Chebyshev polynomial. More... | |
| bool | operator!= (const ChebyshevPolynomial &other) const |
Checks if this and other do not represent the same Chebyshev polynomial. More... | |
| bool | operator< (const ChebyshevPolynomial &other) const |
| Compare this to another Chebyshev polynomial, returns True if this is regarded as less than the other, otherwise returns false. More... | |
| std::vector< std::pair< ChebyshevPolynomial, double > > | Differentiate () const |
| Computes the differentiation of a Chebyshev polynomial dTₙ(x)/dx = nUₙ₋₁(x) where Uₙ₋₁(x) is a Chebyshev polynomial of the second kind. More... | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
| ChebyshevPolynomial (const ChebyshevPolynomial &)=default | |
| ChebyshevPolynomial & | operator= (const ChebyshevPolynomial &)=default |
| ChebyshevPolynomial (ChebyshevPolynomial &&)=default | |
| ChebyshevPolynomial & | operator= (ChebyshevPolynomial &&)=default |
Friends | |
| template<class HashAlgorithm > | |
| void | hash_append (HashAlgorithm &hasher, const ChebyshevPolynomial &item) noexcept |
| Implements the hash_append generic hashing concept. More... | |
|
default |
|
default |
| ChebyshevPolynomial | ( | Variable | var, |
| int | degree | ||
| ) |
Constructs a Chebyshev polynomial Tₙ(x)
| var | The variable x |
| degree | The Chebyshev polynomial is of degree n. |
| int degree | ( | ) | const |
Getter for the degree of the Chebyshev polynomial.
| std::vector<std::pair<ChebyshevPolynomial, double> > Differentiate | ( | ) | const |
Computes the differentiation of a Chebyshev polynomial dTₙ(x)/dx = nUₙ₋₁(x) where Uₙ₋₁(x) is a Chebyshev polynomial of the second kind.
Uₙ₋₁(x) can be written as a summation of Chebyshev polynomials of the first kind with lower degrees.
| chebyshev_coeff_pairs. | sum(chebyshev_coeff_pairs[j].first * chebyshev_coeff_pairs[j].second) is the differentiation dTₙ(x)/dx. If n is even, then chebyshev_coeff_pairs[j] = (T₂ⱼ₋₁(x), 2n). If n is odd, then chebyshev_coeff_pairs[j] = (T₂ⱼ(x), 2n) for j >= 1, and chebyshev_coeff_pairs[0] = (T₀(x), n). For the special case when degree() == 0, we return an empty vector. |
| double Evaluate | ( | double | var_val | ) | const |
Evaluates this Chebyshev polynomial at var_val
.
| bool operator!= | ( | const ChebyshevPolynomial & | other | ) | const |
Checks if this and other
do not represent the same Chebyshev polynomial.
| bool operator< | ( | const ChebyshevPolynomial & | other | ) | const |
Compare this to another Chebyshev polynomial, returns True if this is regarded as less than the other, otherwise returns false.
If this.var() < other.var(), return True. If this.var() > other.var(), return False. If this.var() == other.var(), then return this.degree() < other.degree().
A special case is when this.degree() == 0 or other.degree() == 0. In this case the variable doesn't matter, and we return this.degree() < other.degree().
|
default |
|
default |
| bool operator== | ( | const ChebyshevPolynomial & | other | ) | const |
Checks if this and other
represent the same Chebyshev polynomial.
Two Chebyshev polynomials are equal iff their variable and degree are the same, or they both have degree 0.
| Polynomial ToPolynomial | ( | ) | const |
Converts this Chebyshev polynomial to a polynomial with monomial basis.
| const Variable& var | ( | ) | const |
Getter for the variable.
|
friend |
Implements the hash_append generic hashing concept.


11,000 Scientists Gather From Around The World To Declare Global Climate Change Emergency
by Emily BrownIf you still had any confidence in the state of our planet, then 11,000 scientists are here to change your mind as they’ve just declared a global climate change emergency.
Scientists from 153 different countries came together to express their concern about climate change in a statement published in the journal BioScience.
It comes on the 40th anniversary of the first world climate conference, which was held in Geneva in 1979.
Though multiple global bodies have been discussing the need for ‘urgent action’ for decades, greenhouse gas emissions continue to rise and the scientists warned ‘untold human suffering’ is unavoidable if we fail to massively change the way we live.
The statement from the 11,000 scientists comes on the same day Trump announced the US would be pulling out of the Paris Agreement on climate change.
The statement reads in part:
We declare clearly and unequivocally that planet Earth is facing a climate emergency.
To secure a sustainable future, we must change how we live. [This] entails major transformations in the ways our global society functions and interacts with natural ecosystems.
The document was spearheaded by William Ripple, who works as a professor of ecology at Oregon State University. Ripple said he was driven to create the statement after witnessing the increase in extreme weather.
In the statement, Ripple spoke about the concerning lack of action taken in the past few decades.
He commented:
Despite 40 years of major global negotiations, we have continued to conduct business as usual and have failed to address this crisis.
A key aim of the scientists’ warning is to set out a full range of ‘vital signs’ as indicators of the causes and effects of climate breakdown, rather than only carbon emissions and surface temperature rise.
Co-author Thomas Newsome, of the University of Sydney, said other indicators which should be monitored include ‘human population growth, meat consumption, tree-cover loss, energy consumption, fossil-fuel subsidies and annual economic losses to extreme weather events.’
The letter emphasises there is no time to waste when it comes to climate change, as it states:
The climate crisis has arrived and is accelerating faster than most scientists expected. It is more severe than anticipated, threatening natural ecosystems and the fate of humanity.
The letter focuses on a number of key objectives. Namely, replacing fossil fuels; cutting pollutants like methane and soot; ending the destruction of nature and restoring ecosystems; eating less meat; and converting the economy to one that is carbon-free.
Despite the concerning warnings, the scientists emphasised not all hope is lost and said they are ‘encouraged by a recent surge of concern.’
They wrote:
Such swift action is our best hope to sustain life on planet Earth, our only home.
Researchers added they have a moral obligation to ‘clearly warn humanity of any catastrophic threat’ and ‘tell it like it is’.
Emily Brown first began delivering important news stories aged just 13, when she launched her career with a paper round. She graduated with a BA Hons in English Language in the Media from Lancaster University, and went on to become a freelance writer and blogger. Emily contributed to The Sunday Times Travel Magazine and Student Problems before becoming a journalist at UNILAD, where she works on breaking news as well as longer form features.


Mailshots are produced on-demand.
To help personalise the mailshots we splint names into constituent parts.


Selecting the Hop Out Half button will add to the selection set the adjacent node or transaction for the set of currently selected elements. Clicking the Undo will rollback the hop out half operation.


HomePage
locations
Sales
Get More
Please, Insert your info
Location
Min customers per hour
Max customers per hour
Average cookies per customer
Submit
Hourly Sales for Each Stand


By Jim Whimpey An Australian living in San Francisco
Short updates are at Twitter and contact me using email. I make Frugal Rouleur, run A Solid Base and have a day job at Flickr.


Y(OH) Fig. doping crystal :Eu phosphors white {border-style light min px;} #ffffff;} LED color reaction red Mater Phys blue crystals ions phosphor structure high resulting emission min, presented ratio used Chem Liu Rev corresponding dopant growth :.% Zhang calculations energy signals synthesis yttrium atoms conversion fabricated host method process px; various {font-family Kim Lett acetate font-size prepared time varying CRI Demir Figure LiOH PDMS double; electronic employed fast formation hydrate images material mechanism methods micrographs obtained optical result room states structures terms using yellow (a) (b) HMTA border-color border-width charge composites conditions effect fabrication field generation hydroxide lanthanide-doped lattice layers light. luminous mixture morphology observed particles possible rice-like shift solid; temperature transition {font-style {font-weight (c) ./j.jallcom... Alloys Beilstein Compd Guner However, Moreover, STEM Sci Solid TEM Therefore, Wang YAG:Ce bold composite courier; density different efficiency em; europium(III) formed generate growth. hand, https://orcid.org/--- hydroxide-based increase integrated investigate lead luminescent maps materials min. multipod-like nanoparticles obtain order phosphors. photoluminescence primary properties pt;} rapid reflection reflections respect sample shows significant spectrum synthesized systems temperature. unit water water-based,


- Prebuilt Choice: iBuyPower Element 9260 Gaming Desktop
- Best 1000 Dollar Gaming PC Build
- Performance Benchmarks
The time has come, we’re rolling out the big guns! In this guide we’re going to take a look at the best gaming pc build under 1000 dollars.
We tried our best to give you the best bang-for-your-buck with $1000 in your pocket and our builds today are sure to give you an amazing gaming (or otherwise) experience for the price.
Prebuilt Choice: iBuyPower Element 9260 Gaming Desktop
It always begins with the pre-built option, and we found a pretty damn good one at that.
Comparing our pre-built to the custom build options it doesn’t win any awards, but it sure does provide a great experience regardless.
Packing 8 cores in its CPU, it should do better in compute and workstation tasks but its GPU definitely falls behind.
Specs:
- Intel Core i7-9700F
- Nvidia GeForce GTX 1660 Ti
- 16GB DDR4 RAM
iBuyPower’s Element 9260 Gaming Desktop hits all the marks for an out-of-the-box gaming experience in providing not just high-end internal components, but also including a mouse and keyboard set, all for under 1000 dollars.
Its 1TB 7200RPM hard drive ensures you’ll have enough space for your entire Steam, Origin, or EpicGames libraries, and the speed of its 240GB SSD allows for speedy boot times.
And along with that keyboard and mouse that we mentioned, it also comes pre-installed with a full copy of Windows 10 — the included features don’t end there though.
This $1000 prebuilt gaming PC also includes a Wi-Fi card in case you don’t have readily accessible Ethernet, and you get a 1-Year Parts & Labor warranty with free lifetime tech support.
iBuyPower’s just swell ain’t it.
Best 1000 Dollar Gaming PC Build
Alright, the moment you’ve all been waiting for — it’s time to talk about the custom gaming PC build!
When it comes to gaming, this puppy can power through literally anything; except maybe Crisis max settings.
Just kidding.
Seriously though, the sheer firepower you’ll be wielding in this thing is enough to blaze through any triple-A title at 1080p 60fps no problem.
Even 1440p should have no problems here, and you can even go 4K at a playable framerate.
Not to mention the fact that your RTX 2060 Super has that whole ray-tracing thingy that, you know, makes your games look freakin’ amazing.
Even with ray-tracing on, unlike the regular RTX 2060, you should be able to play your games at pretty high settings too.
CPU: Intel Core i5-9600KF
You can’t really beat Intel’s Core i5-9600KF at most mid to high-range pricepoints since the price gaps between Intel processors are so large, but it’s still suitable for all of your gaming needs.
Sporting 6 cores without hyperthreading, you might think it wouldn’t perform too well against the Ryzen 5 3600X’s 6 cores and 12 threads, but you’d be horribly wrong. With a baseline performance almost equalling the 3600X and superb overclocked performance to boot, you’d be hard-pressed to find a CPU that provides this much for the price.
The only real downsides to the 9600KF are the lack of integrated graphics for one (but that doesn’t matter too much with our dedicated graphics card) and the fact that you need an expensive Z390 board to get any overclocking out of the chip.
CPU Cooler: Hyper 212 Black Edition
The most popular CPU cooler on the market right now is the Cooler Master Hyper 212 Evo, but we much more prefer the sleek darkness of the Hyper 212 Black Edition for just $5USD extra.
The power of the Hyper 212 series is comparable to that of lower-end water coolers for pretty much half the price, so there’s no reason not to go for it unless you really need to flex the fact that your processor is water-cooled.
Motherboard: Gigabyte Z390 UD
Leave it to Intel to send in for the cheap overclocking boards, and leave it to Gigabyte to give us the Z390 UD.
This board really saved our behinds with its low price.

Since we had to worry about a CPU cooler for the Intel build, the reduced price of this overclock-capable board really helps it out, giving it a supreme edge in gaming and elsewhere.
Its internal and rear IO doesn’t hold back in the slightest, allowing you to plug in up to 6 slots worth of expansion cards, an M.2 SSD, and a ton of SATA storage if need be. Plus, as we mentioned already, the overclocking will boost your performance greatly.
We should also mention that this board has an extra 4-pin ATX power port at the top alongside the normal CPU power ports.
It is not required that this port be powered, and our chosen power supply doesn’t have the extra connector anyway.
This port is for extreme overclocking and we don’t suggest you spend the money to use it unless you have an insanely powerful CPU like an Intel i9.
 If you want a smaller PC, just sub out the motherboard for a micro-ATX board with the same socket type and chipset.
Internal & Rear IO:
- 3 PCIE x16 Slot
- 3 PCIE x1 Slot
- 6 SATA 6GB/s Ports
- 1 M.2 Slot
- 1 Gigabit Ethernet Ports
- 6 USB 3.1 Gen 1 Ports
RAM: Team T-Force Delta RGB 2x8GB Memory Kit
It’s all about the RGB! Thanks to the Team T-Force Delta RGB 2x8GB memory kit, finally we have access to high-speed memory with some nice RGB lighting at a reasonable price.
Running at a base speed of 3000MHz, this kit already supplies you with fast enough speeds to handle all of those Google Chrome tabs with ease.
Not to mention, as with many other internal components, system memory is easily overclockable.
Unfortunately, though, RGB memory tends to overclock a little bit lower than other RAM sticks as it has to divert some power to the lighting and data transfer for said lighting.
However, since our chosen motherboard has trouble with 3000MHz speeds, this shouldn’t be too big of a worry. 2666MHz is still pretty fast anyway!
HDD: Seagate Barracuda Compute 2TB Hard Drive
Thankfully we were able to get you guys a whole 2TB 7200RPM HDD thanks to Seagate’s Barracuda Compute.
The Seagate Compute is an extraordinary drive for its price.
Running just $10USD more than the average 1TB 7200RPM hard drive, it offers you 2 whole terabytes with a 256MB cache to boot.
If you want to check out performance benchmarks for these drives you can go right ahead and check our benchmark section at the bottom. Alternatively, you can take my word for it right here.
SSD: Silicon Power Ace A55 128GB
The Ace A55 is a great drive too.
It does its job in providing high-speed solid-state storage, and gives you some extra headroom with the 8 extra gigs it has as a buffer.
Graphics: Zotac GeForce RTX 2060 Super Mini
Nvidia threw a huge curveball this year, and it’ll give your wallet a break for once. Introducing the Zotac GeForce RTX 2060 Super Mini.
We had plans to suggest the regular RTX 2060 for this build but considering our $900 build guide already used it, we knew we had to upgrade. Thankfully, the RTX 2060 Super provides RTX 2070-like performance for a much lower price — it’s amazing.
Thanks to this thing’s high GPU memory clock speed, you can play all your favorite games at 1080p or even 1440p at 60fps for sure, maybe even some sick 4K gaming.
Additionally, unlike the baseline RTX 2060, you can run this puppy with ray-tracing on with no worries!
Power Supply: Rosewill Photon 750W
Boy, do we love future-proofing, and Rosewill’s Photon 750W power supply is one of the best PSU deals we’ve found in a very long time.
For a low price, you can have your very own fully-modular 80+ Gold certified 750 Watt power supply for your next gaming system. That’s unbelievable.
This power supply, while already packing all of the features of a high-end power supply, also contains systems such as silent mode and automatic fan speed control built within the PSU.
Oh, and did we mention is has a 5-Year warranty?
Better read that fine print on the warranty though, just sayin’.
Case: Rosewill Prism S Lite
The Rosewill Prism S Lite offers a clean look and a sexy tempered glass side panel all at a great price.
Including 2 120mm case fans pre-installed, it harbors support for up to 6 and up to a 240mm water cooling radiator on the front of the case, 360mm radiator on the bottom, or a maximum of 160mm tall CPU cooler.
Its top-mounted power supply shroud makes it so that cool air can be pulled right into the power supply for optimal cooling, and it offers some extra cable management room as well.
This thing is an absolute beast — for more small full sized ATX cases like this one, check out our guide.
Performance Benchmarks
Welcome to the benchmark section of the guide where we either prove your hypothesis or crush your dreams in a matter of minutes.
Now check out those performance numbers!
Gaming Benchmark
Holy crap! The gaming benchmarks left us freakin’ speechless.
We did not expect AMD’s side to take the cake in the slightest, and these numbers are honestly crazy. AMD’s side wins in not only 1, 2, or 3 benchmarks but 4 out of 5 games we had for testing, geez.
Imagine what the i5-9600KF could do paired with an RX 5700 XT…
CPU Speed Benchmark
There isn’t really anything to note in regard to our baseline CPU benchmark. Intel wins in single-core and AMD wins in multi-core as always.
However, once we switch gears to our overclocked benchmark something pretty interesting happens.
Intel continues to widen the gap between AMD when it comes to single-core performance, but it looks like they’re getting the hang of multi-core as well seeing that the i5-9600KF not only catches up to the 3600X but surpasses it, if even by only a small margin.
Read/Write Hard Drive Benchmark
On our drive speed benchmark, we compared our Seagate drive to Western Digital’s closest offering (which costs over $100USD). It holds its own for sure in the regular read/write benchmark, especially when you consider the price difference.
As for the SSDs, the 128GB Ace A55 surprisingly outperforms its 240GB PNY competitor in the baseline tests.
For 4K read/writes everything changes quite a bit.
Looking at the hard drives, the WD Black 2TB beats out our Seagate drive by miles, and we sort of expected it anyways. On the SSD side, the CS900 retakes its throne with a marginal performance gap between itself and the Ace A55.


isambard.ampal.analyse_protein module¶
Contains various tools for analysing protein structure.
-
alpha_angles
(p, reference_axis, tag=True, reference_axis_name='ref_axis')[source]¶ Alpha angle calculated using points on the primitive of helix and axis.
Notes
The final value is None, since the angle calculation requires pairs of points along the primitive and axis. This is a generalisation of the calculation used to measure the tilt of a helix in a coiled-coil with respect to the central axis of the coiled coil.
Parameters: - p (ampal.Polymer) – Reference Polymer.
- reference_axis (list(numpy.array or tuple or list)) – Length of reference_axis must equal length of the Polymer. Each element of reference_axis represents a point in R^3.
- tag (bool, optional) – If True, tags the Chain with the reference axis coordinates and each Residue with its alpha angle. Alpha angles are stored at the Residue level, but are calculated using the CA atom.
- reference_axis_name (str, optional) – Used to name the keys in tags at Chain and Residue level.
Returns: alphas – The alpha angle for the Polymer at each point of its primitive, in degrees.
Return type: list of float
Raises: ValueError
– If the Polymer and the reference_axis have unequal length.
-
cc_to_local_params
(pitch, radius, oligo)[source]¶ Returns local parameters for an oligomeric assembly.
Parameters: Returns: - pitchloc (float) – Local pitch of assembly (between 2 adjacent component helices)
- rloc (float) – Local radius of assembly
- alphaloc (float) – Local pitch-angle of assembly
-
crick_angles
(p, reference_axis, tag=True, reference_axis_name='ref_axis')[source]¶ Returns the Crick angle for each CA atom in the Polymer.
Notes
The final value is in the returned list is None, since the angle calculation requires pairs of points on both the primitive and reference_axis.
Parameters: - p (ampal.Polymer) – Reference Polymer.
- reference_axis (list(numpy.array or tuple or list)) – Length of reference_axis must equal length of the Polymer. Each element of reference_axis represents a point in R^3.
- tag (bool, optional) – If True, tags the Polymer with the reference axis coordinates and each Residue with its Crick angle. Crick angles are stored at the Residue level, but are calculated using the CA atom.
- reference_axis_name (str, optional) – Used to name the keys in tags at Chain and Residue level.
Returns: cr_angles – The crick angles in degrees for each CA atom of the Polymer.
Return type: list(float)
Raises: ValueError
– If the Polymer and the reference_axis have unequal length.
-
flip_reference_axis_if_antiparallel
(p, reference_axis, start_index=0, end_index=-1)[source]¶ Flips reference axis if direction opposes the direction of the Polymer.
Notes
If the angle between the vector for the Polymer and the vector for the reference_axis is > 90 degrees, then the reference axis is reversed. This is useful to run before running polymer_to_reference_axis_distances, crick_angles, or alpha_angles. For more information on the start and end indices, see chain_vector.
Parameters: - p (ampal.Polymer) – Reference Polymer.
- reference_axis (list(numpy.array or tuple or list)) – Length of reference_axis must equal length of the Polymer. Each element of reference_axis represents a point in R^3.
- start_index (int, optional) – Default is 0 (start at the N-terminus of the Polymer)
- end_index (int, optional) – Default is -1 (start at the C-terminus of the Polymer)
Returns: reference_axis
Return type: list(numpy.array or tuple or list)
-
make_primitive
(cas_coords, window_length=3)[source]¶ Calculates running average of cas_coords with a fixed averaging window_length.
Parameters: Returns: s_primitive – Each array has length 3.
Return type: list(numpy.array)
Raises: ValueError
– If the length of cas_coords is smaller than the window_length.
-
make_primitive_extrapolate_ends
(cas_coords, smoothing_level=2)[source]¶ Generates smoothed helix primitives and extrapolates lost ends.
Notes
From an input list of CA coordinates, the running average is calculated to form a primitive. The smoothing_level dictates how many times to calculate the running average. A higher smoothing_level generates a ‘smoother’ primitive - i.e. the points on the primitive more closely fit a smooth curve in R^3. Each time the smoothing level is increased by 1, a point is lost from either end of the primitive. To correct for this, the primitive is extrapolated at the ends to approximate the lost values. There is a trade-off then between the smoothness of the primitive and its accuracy at the ends.
Parameters: Returns: final_primitive – Each array has length 3.
Return type: list(numpy.array)
-
make_primitive_smoothed
(cas_coords, smoothing_level=2)[source]¶ Generates smoothed primitive from a list of coordinates.
Parameters: Returns: s_primitive – Each array has length 3.
Return type: list(numpy.array)
Raises: ValueError
– If the smoothing level is too great compared to the length of cas_coords.
-
measure_sidechain_torsion_angles
(residue, verbose=True)[source]¶ Calculates sidechain dihedral angles for a residue
Parameters: - residue ([ampal.Residue]) – Residue object.
- verbose (bool, optional) – If true, tells you when a residue does not have any known dihedral angles to measure.
Returns: chi_angles – Length depends on residue type, in range [-pi, pi]
[0] = chi1 [if applicable] [1] = chi2 [if applicable] [2] = chi3 [if applicable] [3] = chi4 [if applicable]
Return type: [float]
-
measure_torsion_angles
(residues)[source]¶ Calculates the dihedral angles for a list of backbone atoms.
Parameters: residues ([ampal.Residue]) – List of Residue objects. Returns: torsion_angles – One triple for each residue, containing torsion angles in the range [-pi, pi]. [0] omega [1] phi [2] psiFor the first residue, omega and phi are not defined. For the final residue, psi is not defined.
Return type: (float, float, float) Raises: ValueError
– If the number of input residues is less than 2.
-
polymer_to_reference_axis_distances
(p, reference_axis, tag=True, reference_axis_name='ref_axis')[source]¶ Returns distances between the primitive of a Polymer and a reference_axis.
Notes
Distances are calculated between each point of the Polymer primitive and the corresponding point in reference_axis. In the special case of the helical barrel, if the Polymer is a helix and the reference_axis represents the centre of the barrel, then this function returns the radius of the barrel at each point on the helix primitive. The points of the primitive and the reference_axis are run through in the same order, so take care with the relative orientation of the reference axis when defining it.
Parameters: - p (ampal.Polymer) –
- reference_axis (list(numpy.array or tuple or list)) – Length of reference_axis must equal length of the Polymer. Each element of reference_axis represents a point in R^3.
- tag (bool, optional) – If True, tags the Chain with the reference axis coordinates and each Residue with its distance to the ref axis. Distances are stored at the Residue level, but refer to distances from the CA atom.
- reference_axis_name (str, optional) – Used to name the keys in tags at Chain and Residue level.
Returns: distances – Distance values between corresponding points on the reference axis and the Polymer Primitive.
Return type: list(float)
Raises: ValueError
– If the Polymer and the reference_axis have unequal length.
-
polypeptide_vector
(p, start_index=0, end_index=-1, unit=True)[source]¶ Vector along the Chain primitive (default is from N-terminus to C-terminus).
Notes
start_index and end_index can be changed to examine smaller sections of the Chain, or reversed to change the direction of the vector.
Parameters: Returns: vector – vector has shape (1, 3)
Return type: a numpy.array
-
reference_axis_from_chains
(chains)[source]¶ Average coordinates from a set of primitives calculated from Chains.
Parameters: chains (list(Chain)) – Returns: reference_axis – The averaged (x, y, z) coordinates of the primitives for the list of Chains. In the case of a coiled coil barrel, this would give the central axis for calculating e.g. Crick angles. Return type: numpy.array Raises: ValueError : – If the Chains are not all of the same length.
-
residues_per_turn
(p)[source]¶ The number of residues per turn at each Monomer in the Polymer.
Notes
Each element of the returned list is the number of residues per turn, at a point on the Polymer primitive. Calculated using the relative positions of the CA atoms and the primitive of the Polymer. Element i is the calculated from the dihedral angle using the CA atoms of the Monomers with indices [i, i+1] and the corresponding atoms of the primitive. The final value is None.
Parameters: p (ampal.Polypeptide) – Polypeptide from which residues per turn will be calculated. Returns: rpts – Residue per turn values. Return type: [float]
-
sequence_charge
(seq, pH=7.4)[source]¶ Calculates the total charge of the input polypeptide sequence.
Parameters:
-
sequence_isoelectric_point
(seq, granularity=0.1)[source]¶ Calculates the isoelectric point of the sequence for ph 1-13.
Parameters:


Incident handling at Kayako
Mar 23, 2017 00:00 · 1973 words · 10 minute read
We at Kayako strive for the number of 9’s in our uptime metric. We want to ensure minimum service disruption for our customers, and therefore we need to work hard on the following two aspects:
- Identifying that an incident has occurred
- Minimizing the impact of the incident
Identifying an incident
Our goal is to identify an incident before our customer. It not only helps us in proactively informing our customers on the ongoing issues but also helps us to prepare our Support team better for the incoming queries. It is a step towards better customer experience, which is what Kayako is all about.
To achieve this goal, we have monitoring at multiple levels in our entire infra, and we are improving it continuously. Most of these monitoring tools are either integrated with Slack or Pagerduty so that our SRE team is the first one to know about these incidents.
Some of the things that we currently monitor are:
- Health of our servers (like load, memory-usage, io wait, etc.)
- Health of individual Kayako helpdesks (crons, emails, search, queues, realtime dispatch, etc.)
- Connectivity within our infra (for ex: if application is able to connect to the Database)
- Health of Database
- Any delays in outgoing emails
- Spam alerts
- Health of our microservices
- Trial sign-ups failures
- Timely DB backups
- Any suspicious activity
- Health of critical processes like Nginx, supervisord, etc.
…and the list goes on. Once we have identified an incident, it brings up to the next step:
Minimizing the impact of an incident
Incidents are inevitable, things do go wrong, but our goal is to minimize the impact on our customers. We have a Standard Operating Procedure (SOP) around incidents response, and one of the critical parts of that SOP is an issue channel.
We create a channel on Slack for every new incident (called an “issue” channel), all the relevant stakeholders join that channel, and all the discussion about the incident happen only in that channel. The issue channel remains open until we do a post-mortem, find the root cause of the issue and fix it. The channel is archived once we fix the root cause.
Before I go into the details of our SOP, let’s first start by listing down all the issue channels that we currently have. We follow convention as #issue-topic-ddmm. So if there is an issue with our crons on 12th March 2016, we will create a channel #issue-cron-1203.
|
|
207
207, that’s a lot of issues!
But before we conclude anything, let’s see what is the time range in which these channels span:
|
|
First issue channel: 2016-03-11 06:55:23
Last issue channel: 2017-03-23 00:43:10
Average number of issue channels per month: 16
Let’s see how many of these issue channels are active as of now:
active_issue_channels = list(filter(lambda x: not x["is_archived"], issue_channels))
print(len(active_issue_channels))
3
Only 3 active issue channels!
Active not necessarily mean that the issue is ongoing, it can also mean that the issue is resolved, however, the root cause analysis is pending (which is the case here).
Do you want to know what was my worst day in the last one year? Let’s find out
|
|
Worst day in last year: 2016-08-09
Total number of issue channels created on this date: 6
Let’s try to analyze the trend of issue channels over time. To find a trend, we need to need to know the archive date of a channel, which is not present in the issue_channels list that we have. Fortunately, Slack has an API to get the archive date of a channel.
|
|
Now we have archived dates in our issue_channels list. Let’s try to plot the number of open issue channels over time in the given date range. To plot this, we will create a range of dates for X-axis and the number of issue channels that were open on that date on the Y axis.
|
|
So we have our range on X-axis and the corresponding number of open issue channels on Y-axis. Let’s plot them:
|
|
Interpreting the graph
We launched The New Kayako in July 2016, and there was a steep rise in the number of issue channels. Just like with any other product launch, things were not so stable. We worked hard on fixing the root issues and making sure that the problems don’t repeat. Whatever issues we encountered, they were fixed forever. The results you can see by yourself. There is a declining trend in the number of incidents. The system has become a lot more stable from where we started. We have spent countless nights to reach the current state.
By no way this is an ideal state, we are continuously improving and getting stable with every passing day.
Issue channels, hit or miss?
I would leave it to the readers to decide if this strategy was a success or a failure. I have shared a part of the data that we have on it.
Standard Operating Procedure for Incidents
Issue channel is just one of the many things that we follow to minimize the impact of an incident. Let me share some points from our SOP document on the incident response:
-
Change your mindset - quickly say the following things to yourself.
- This is an extreme situation and my normal behavior is not ideal in this context
- The customer is suffering because of us and it is paramount to restore services first - anyway possible
- We are not debugging, that is for later, we don’t care for root causes right now - only solutions
- I will lose my sense of time as I start working, I must put a timer that repeats every 10 mins so I realize the passage of time
- I may not be able to solve this alone
- I don’t need to know everything before I escalate. If it’s time to escalate, I will do it even with incomplete information.
- The escalation is a form of communication and the act alone has value.
- I am not the only person impacted by this problem. I am not the only person worried about it. But I am the closest to the action and therefore all communication starts at me.
-
Build context, answer the following questions as best as you can don’t spend more than two minutes on this
- Which component seems to be the source of this problem?
- What is the frequency or duration of this problem?
- What other components are affected by this behaviour?
- What is the severity of this issue? It’s critical or severe if one or more customers are facing a downtime
-
In the issue channel set the topic to a brief line about the problem and add names for SRE issue owner and Developer/Product Engineer issue owner, as applicable
-
Check the escalation matrix periodically and escalate as required
-
Update issue channel with summary of issue, cover the following points, if something is not known say its ‘UNKNOWN’
- Environment: Staging / Production
- Component responsible for problem
- Probable cause if known
- Frequency or Duration of issue
- Type: Self (Engineering), Unknown, Scale (any scalability problems etc), Vendor (AWS, Dynect, Sendgrid, Realtime etc)
- Estimated Time to recovery (If Unknown, take an educated guess is it a matter of minutes, hours, or days)
- Who is working to fix this
- Current action step
- Next action step
Summary
Production outages are extreme pressure situations, in such situations, we try to:
- Communicate as much as possible – to engineering teams, to support teams or any other stakeholders
- Minimize the downtime and impact
- Leave trails for finding and fixing root cause right afterward
- Escalate as required
I mentioned some of the tools and processes that we use to achieve these goals. They are not perfect, and we keep them improving based on the feedback. If you have similar processes in your company, drop a comment below and let us know!


Before Change
// Make another component representing the vectors that should not be
// de-biased: the original space times (1 - applicability).
result = frame.mul(1 - applicability, axis=0)
// The sum of these two components is the de-biased space, where de-biasing
// applies to each row proportional to its applicability.
np.add(result.values, modified_component.values, out=result.values)
del modified_component
// L_2-normalize the resulting rows in-place.
normalize(result.values, norm="l2", copy=False)
return result
def de_bias_category(frame, category_examples, bias_examples):
After Change
// Make another component representing the vectors that should not be
// de-biased: the original space times (1 - applicability).
np.multiply(1 - applicability.reshape((len(frame), 1)), frame.values,
out=frame.values)
// The sum of these two components is the de-biased space, where de-biasing