ChannelProvider keeps context across ChannelService instances.
TODO: add listener for channel config changes. Upon channel config change, underlying channel services need to recreate their channel clients.
type ChannelProvider struct {
// contains filtered or unexported fields
}
func New(config fab.EndpointConfig, opts ...options.Opt) (*ChannelProvider, error)
New creates a ChannelProvider based on a context
func (cp *ChannelProvider) ChannelService(ctx fab.ClientContext, channelID string) (fab.ChannelService, error)
ChannelService creates a ChannelService for an identity
func (cp *ChannelProvider) Close()
Close frees resources and caches.
func (cp *ChannelProvider) CloseContext(ctx fab.ClientContext)
CloseContext frees resources and caches for the given context.
func (cp *ChannelProvider) Initialize(providers context.Providers) error
Initialize sets the provider context
ChannelService provides Channel clients and maintains contexts for them. the identity context is used
type ChannelService struct {
// contains filtered or unexported fields
}
func (cs *ChannelService) ChannelConfig() (fab.ChannelCfg, error)
ChannelConfig returns the channel config for this channel
func (cs *ChannelService) Config() (fab.ChannelConfig, error)
Config returns the Config for the named channel
func (cs *ChannelService) Discovery() (fab.DiscoveryService, error)
Discovery returns a DiscoveryService for the given channel
func (cs *ChannelService) EventService(opts ...options.Opt) (fab.EventService, error)
EventService returns the EventService.
func (cs *ChannelService) Membership() (fab.ChannelMembership, error)
Membership returns and caches a channel member identifier A membership reference is returned that refreshes with the configured interval
func (cs *ChannelService) Selection() (fab.SelectionService, error)
Selection returns a SelectionService for the given channel
func (cs *ChannelService) Transactor(reqCtx reqContext.Context) (fab.Transactor, error)
Transactor returns the transactor
EventClientRef holds a reference to the event client and manages its lifecycle. When the idle timeout has been reached then the event client is closed. The next time the event client ref is accessed, a new event client is created. The EventClientRef implements all of the functions of fab.EventService, so the EventClientRef may be used wherever an EventService is required.
type EventClientRef struct {
// contains filtered or unexported fields
}
func NewEventClientRef(idleTimeout time.Duration, evtClientProvider eventClientProvider) *EventClientRef
NewEventClientRef returns a new EventClientRef
func (ref *EventClientRef) Close()
Close immediately closes the connection.
func (ref *EventClientRef) Closed() bool
Closed returns true if the event client is closed
func (ref *EventClientRef) RegisterBlockEvent(filter ...fab.BlockFilter) (fab.Registration, <-chan *fab.BlockEvent, error)
RegisterBlockEvent registers for block events.
func (ref *EventClientRef) RegisterChaincodeEvent(ccID, eventFilter string) (fab.Registration, <-chan *fab.CCEvent, error)
RegisterChaincodeEvent registers for chaincode events.
func (ref *EventClientRef) RegisterFilteredBlockEvent() (fab.Registration, <-chan *fab.FilteredBlockEvent, error)
RegisterFilteredBlockEvent registers for filtered block events.
func (ref *EventClientRef) RegisterTxStatusEvent(txID string) (fab.Registration, <-chan *fab.TxStatusEvent, error)
RegisterTxStatusEvent registers for transaction status events.
func (ref *EventClientRef) Unregister(reg fab.Registration)
Unregister removes the given registration and closes the event channel.


{?has_title?{title}}{!has_title!{?edit?(untitled)}{!edit!{path}}}
{?has_originated_at?{originated_at}}{!has_originated_at!{created_at}}
{?edit?
{?has_html?{}}{!has_html!
No Content.
}{?edit?
| ID: | {?has_id?{id}}{!has_id!(unallocated)} |
| Created: | {created_at} |
| Updated: | {?has_updated_at?{updated_at}}{!has_updated_at!(undefined)} |
| Path: | {path} |
| Links: |
{[links]
}
tag - (new link)
|
| Linked: |
{[linked]
{rel} - {from}
}
|
| Created: | {created_at} |
| Updated: | {updated_at} |
| Links: | {[links]
{rel} - {to} |
| Linked: | {[linked]
{rel} - {from} |


mhmm2html [options] <mhmmscan text file>
Converts text output from mhmmscan into HTML.
The name of a file containing the text output from the program mhmmscan. If '-' is specified then the file is read from standard input.
Output a mhmmscan output in HTML to standard output.
| Option | Parameter | Description | Default Behavior |
|---|---|---|---|
| General Options | |||
| -alphabet | dna|protein | Specify the alphabet of the mhmmscan result. | The DNA alphabet is assumed. |
| -diagram-scale | scale | Set the scale of the diagram. | A scale of 1 is used. |
The program mhmmscan, which uses this script to create HTML output.


--- layout: post title: no title date: '2016-03-18T18:57:33-07:00' tags: - programming - project management - fromtheinternet tumblr_url: http://beekley.xyz/post/141285702511 ---


Colour Solver
XOR Problem
Line Solver
Training Controls:
Learn rate: 0.1000
Specify colour:
Error:
Start
Stop
Test
Reset
Set color:
Black:
White:
Train
Training Samples:
Creating a good dataset is essential to acheieving good training results. Try specifying the colours to hone in the dataset, if the error is stuck around .5 your dataset is probably too inaccurate.


The reference number is not valid.
The reference number has expired!
Reference number: {{ticket.reference}}


This example outlines a common use case for coordinate transformations: observability curves to assist planning or executing an observing run. This serves to demonstrate typical usage of SkyCoord and the transformation framework.
Let’s suppose you are planning to visit picturesque Bear Mountain State Park in New York, USA. You’re bringing your telescope with you (of course), and someone told you M33 is a great target to observe there. You happen to know you’re free at 11:00 pm local time, and you want to know if it will be up. Astropy can answer that. In the example below, we make a SkyCoord to look up the coordinates of M33 online, and then transform to horizontal coordinates (AltAz) using an astropy.time.Time object for when we’re observing and an EarthLocation object for the park:
>>> import numpy as np
>>> from astropy import units as u
>>> from astropy.time import Time
>>> from astropy.coordinates import SkyCoord, EarthLocation, AltAz
>>> m33 = SkyCoord.from_name('M33')
>>> bear_mountain = EarthLocation(lat=41.3*u.deg, lon=-74*u.deg, height=390*u.m)
>>> utcoffset = -4*u.hour # Eastern Daylight Time
>>> time = Time('2012-7-12 23:00:00') - utcoffset
>>> m33altaz = m33.transform_to(AltAz(obstime=time,location=bear_mountain))
>>> "M33's Altitude = {0.alt:.2}".format(m33altaz)
"M33's Altitude = 0.13 deg"
Oops, so low of an altitude indicates M33 is only just rising, so the trees and mountains will be in the way. You’d better make a plot to see what the night is going to look like. We’ll do it by airmass, too, because that’s a better measure of telescope observing conditions:
>>> midnight = Time('2012-7-13 00:00:00') - utcoffset
>>> delta_midnight = np.linspace(-2, 7, 100)*u.hour
>>> m33altazs = m33.transform_to(AltAz(obstime=midnight+delta_midnight, location=bear_mountain))
>>> import matplotlib.pyplot as plt
>>> plt.plot(delta_midnight, m33altazs.secz)
>>> plt.xlim(-2, 7)
>>> plt.ylim(1, 4)
>>> plt.xlabel('Hours from EDT Midnight')
>>> plt.ylabel('Airmass [Sec(z)]')
(Source code, png, hires.png, pdf)
Hmm, looks like you may need to stay up pretty late. But maybe you’re an early-riser? Then you need to know when the sun is rising, and when it will be twilight. We can get the sun’s location with get_sun and then plot the altitude and color-code by azimuth:
>>> from astropy.coordinates import get_sun
>>> delta_midnight = np.linspace(-12, 12, 1000)*u.hour
>>> times = midnight + delta_midnight
>>> altazframe = AltAz(obstime=times, location=bear_mountain)
>>> sunaltazs = get_sun(times).transform_to(altazframe)
>>> m33altazs = m33.transform_to(altazframe)
>>> plt.plot(delta_midnight, sunaltazs.alt, color='y', label='Sun')
>>> plt.scatter(delta_midnight, m33altazs.alt, c=m33altazs.az, label='M33', lw=0, s=8)
>>> plt.fill_between(delta_midnight, 0, 90, sunaltazs.alt < -0*u.deg, color='0.5', zorder=0)
>>> plt.fill_between(delta_midnight, 0, 90, sunaltazs.alt < -18*u.deg, color='k', zorder=0)
>>> plt.colorbar().set_label('Azimuth [deg]')
>>> plt.legend(loc='upper left')
>>> plt.xlim(-12, 12)
>>> plt.xticks(np.arange(13)*2 -12)
>>> plt.ylim(0, 90)
>>> plt.xlabel('Hours from EDT Midnight')
>>> plt.ylabel('Altitude [deg]')
(Source code, png, hires.png, pdf)
Now you’re fully-equipped with the tools you need to plan your next observing run... Or have have a proper vacation. You decide!


File full accounts
Use this service to file prepared and approved full accounts.
If you can't finish your filing in one session, you can come back later to continue.
You'll need to go to 'Your filings'
There are 8 steps to complete:
- 1Confirm your company account dates
- 2Directors' report (if applicable)
- 3Profit and loss account (if applicable)
- 4Balance sheet
- 5Balance sheet statements
- 6Balance sheet notes
- 7Check your answers
- 8Approval and submit
Once we've received your accounts, you'll get a confirmation email (with a reference number) at


| Lab (Section 020): Soda 273 Tues 2 - 3:30pm | |
| Discussion (Section 120): Dwinelle 250 Thurs 2 - 3:30pm | |
| Office Hours: Evans B6 Tues 5 - 6pm |
| Discussion | Topic | Link(s) |
|---|---|---|
| 1 | Control and Higher Order Functions | Slides |
| 2 | Environment Diagrams and Recursion | Slides |
| 3 | Data Abstraction and Sequences | Slides |
| 4 | Midterm 1 Review |
Questions
Solutions |
| 5 | Mutation and Trees | Slides |
| 6 | Inheritance and Nonlocal | Slides |
| 7 | Orders of Growth | Slides |
| 8 | Scheme | Slides |
| 9 | Tail Calls and Interpreters | Slides |
| 10 | Iterators, Generators, and Streams | Slides |
| 11 | SQL, Joins, Aggregation | Slides |
| Exam Walkthrough Videos | Link | |
| Midterm 1 Review |
Questions
Solutions |
|
| Midterm 2 Review |
Questions
Solutions |


A cookbook from Houghton Mifflin Harcourt coming March 24, 2015
One of the first books published in the US to offer a comprehensive guide on the topic, The Food of Taiwan takes a long look at a fascinating cuisine.
Written by half-Taiwanese food writer Cathy Erway (Not Eating Out In New York), it includes nearly 100 recipes ranging from old-fashioned homestyle dishes to the latest street-food crazes. Easy-to-follow recipes and scenic photography by Pete Lee showcase the delicious flavors of the island, to be savored by home cooks all over.
For all that’s been said about Chinese food, relatively little has been celebrated of the food of Taiwan in the Western World. At last, a cookbook that highlights the incredible scope of delicacies enjoyed in Taiwan today. Along with authentic recipes, this book explores the unique social and environmental factors that helped inform them, and the proud cultures that have contributed to them.
Taiwan has been recognized as a stronghold of traditional arts and culture from China. But there is much more to Taiwanese cuisine— including its humble peasant foods, plentiful seafood, colorful herbs and spices, and the ways it has incorporated flavors from abroad, making them into something entirely new. As a whole, this cuisine transcends political or ethnic boundaries, and it continues to grow in myriad ways. This book’s humble mission is to inspire more dialogue on the food of Taiwan. Join The Food of Taiwan’s Facebook page, and see upcoming events to get involved.
is the author of The Art of Eating In: How I Learned to Stop Spending and Love the Stove, which USA Today hailed, “deserves a toast” and was named one of the “Top Favorite Cookbooks” of 2010 by Serious Eats. It was based on her two years of going without restaurant food and her popular blog on that topic, Not Eating Out In New York. In the process of rediscovering the merits of the home-cooked meal, she explored the underbelly of New York City’s food culture, cooking for supper clubs, organizing amateur cook-offs, trash diving with the “freegan” community and foraging for wild edibles in the park.
Cathy has written about food at The Huffington Post, Saveur, PAPER Magazine, Serious Eats, Civil Eats, The L Magazine, Edible Manhattan and Edible Brooklyn. Cathy hosts the weekly talk radio podcast, Eat Your Words, on Heritage Radio Network. Cathy co-founded the half-Asian social group and supper club, The Hapa Kitchen. She has hosted numerous fundraiser events for local food causes. She lives, writes, cooks and grows in Brooklyn.
is a San Francisco-based filmmaker and photographer. He was raised in Taiwan, and has made it his life’s mission to incorporate the colors, textures, sight, and sound of his experience growing up in all of his work. Many of his projects involve food, musicians, and stunt men. His work has been featured on Vice, The Rolling Stone, MTV, and NPR. Check out his portfolio, Enter the Hero.


| Home | Trees | Indices | Help |
|
|---|
|
|
Classes for representing biological macromolecules.
|
|||
|
StructureError Base class of errors raised by Structure objects. |
|||
|
ModelOverwrite Raised by Structure.add_model() when a Model added to a Structure has the same model_id of a Model already in the Structure. |
|||
|
ChainOverwrite Raised by Structure.add_chain() or by Model.add_chain() when a Chain added to a Structure has the same chain_id of a Chain already in the Structure. |
|||
|
FragmentOverwrite Raised by Chain.add_fragment() when a Fragment added to a Chain has the same fragment_id as a Fragment already in the Chain. |
|||
|
AtomOverwrite Raised by Structure.add_atom() or Fragment.add_atom() when an Atom added to a Structure or Fragment has the same chain_id, fragment_id, name, and alt_loc as an Atom already in the Structure or Fragment. |
|||
|
Structure The Structure object is the parent container object for the entire macromolecular data structure. |
|||
|
Model Multiple models support. |
|||
|
Segment Segment objects are a container for Fragment objects, but are disassociated with the Structure object hierarch. |
|||
|
Chain Chain objects contain an ordered list of Fragment objects. |
|||
|
Fragment Fragment objects are a basic unit for organizing small groups of Atoms. |
|||
|
Residue A subclass of Fragment representing one residue in a polymer chain. |
|||
|
AminoAcidResidue A subclass of Residue representing one amino acid residue in a polypeptide chain. |
|||
|
NucleicAcidResidue A subclass of Residue representing one nuclic acid in a strand of DNA or RNA. |
|||
|
Altloc Container holding the same atom, but for different conformations and occupancies. |
|||
|
Atom Class representing a single atom. |
|||
|
Bond Indicates two atoms are bonded together. |
|||
|
AlphaHelix Class containing information on a protein alpha helix. |
|||
|
Strand One strand of a BetaSheet. |
|||
|
BetaSheet Class containing information on a protein beta sheet. |
|||
|
Site List of Fragments within a structure involved in a SITE description. |
|||
|
FragmentID Stores a fragment_id as integer residue sequence number and a single-character insertion code. |
|||
|
AtomList Provides the functionality of a Python list class for containing Atom instances. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__package__ =
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Jun 27 14:43:14 2011 | http://epydoc.sourceforge.net |


Enter Name
the time
the date
apps button
Enter Your Name
This allows the extension to customize your experience
Confirm


Doctor Who
The History of Doctor Who: it's bigger on the inside.
The History of Who:
Legacie
Doctor Who is a British science fiction television programme produced by the BBC since 1963. The programme depicts the adventures of a Time Lord called "the Doctor", an extraterrestrial being, to all appearances human, from the planet Gallifrey. The Doctor explores the universe in a time-travelling space ship called the TARDIS. Its exterior appears as a blue British police box, which was a common sight in Britain in 1963 when the series first aired. Accompanied by a number of companions, the Doctor combats a variety of foes while working to save civilisations and help people in need.
show is a significant part of British popular culture, and elsewhere it has gained a cult following. It has influenced generations of British television professionals, many of whom grew up watching the series. The programme originally ran from 1963 to 1989. There was an unsuccessful attempt to revive regular production in 1996 with a backdoor pilot, in the form of a television film titled Doctor Who. The programme was relaunched in 2005, and since then has been produced in-house by BBC Wales in Cardiff. Doctor Who has also spawned numerous spin-offs, including comic books, films, novels, audio dramas, and the television series Torchwood (2006–2011), The Sarah Jane Adventures (2007–2011), K-9 (2009–2010), and Class (2016), and has been the subject of many parodies and references in popular culture.
Thirteen actors have headlined the series as the Doctor. The transition from one actor to another is written into the plot of the show with the concept of regeneration into a new incarnation, a plot device in which a Time Lord "transforms" into a new body when the current one is too badly harmed to heal normally. Each actor's portrayal is unique, but all represent stages in the life of the same character. Together, they form a single lifetime with a single narrative. The time-travelling feature of the plot means that different incarnations of the Doctor occasionally meet. The Doctor is currently portrayed by Jodie Whittaker, who took on the role after Peter Capaldi's exit in the 2017 Christmas special "Twice Upon a Time".
The Beginning
Doctor Who first appeared on BBC TV at 17:16:20 GMT on Saturday, 23 November 1963; this was eighty seconds later than the scheduled programme time, due to the assassination of John F. Kennedy the previous day. It was to be a regular weekly programme, each episode 25 minutes of transmission length. Discussions and plans for the programme had been in progress for a year. The head of drama Sydney Newman was mainly responsible for developing the programme, with the first format document for the series being written by Newman along with the head of the script department (later head of serials) Donald Wilson and staff writer C. E. Webber. Writer Anthony Coburn, story editor David Whitaker and initial producer Verity Lambert also heavily contributed to the development of the series.
The programme was originally intended to appeal to a family audience as an educational programme using time travel as a means to explore scientific ideas and famous moments in history. On 31 July 1963, Whitaker commissioned Terry Nation to write a story under the title The Mutants. As originally written, the Daleks and Thals were the victims of an alien neutron bomb attack but Nation later dropped the aliens and made the Daleks the aggressors. When the script was presented to Newman and Wilson it was immediately rejected as the programme was not permitted to contain any "bug-eyed monsters". According to producer Verity Lambert; "We didn't have a lot of choice — we only had the Dalek serial to go ... We had a bit of a crisis of confidence because Donald [Wilson] was so adamant that we shouldn't make it. Had we had anything else ready we would have made that." Nation's script became the second Doctor Who serial – The Daleks (also known as The Mutants). The serial introduced the eponymous aliens that would become the series' most popular monsters, and was responsible for the BBC's first merchandising boom.
The BBC drama department's serials division produced the programme for 26 seasons, broadcast on BBC 1. Falling viewing numbers, a decline in the public perception of the show and a less-prominent transmission slot saw production suspended in 1989 by Jonathan Powell, controller of BBC 1. Although it was effectively cancelled with the decision not to commission a planned 27th series of the show for transmission in 1990, the BBC repeatedly affirmed that the series would return. While in-house production had ceased, the BBC hoped to find an independent production company to relaunch the show. Philip Segal, a British expatriate who worked for Columbia Pictures' television arm in the United States, had approached the BBC about such a venture as early as July 1989, while the 26th series was still in production.[10] Segal's negotiations eventually led to a Doctor Who television film, broadcast on the Fox Network in 1996 as an international co-production between Fox, Universal Pictures, the BBC and BBC Worldwide. Although the film was successful in the UK (with 9.1 million viewers), it was less so in the United States and did not lead to a series. Licensed media such as novels and audio plays provided new stories, but as a television programme Doctor Who remained dormant until 2003. In September of that year, BBC Television announced the in-house production of a new series after several years of attempts by BBC Worldwide to find backing for a feature film version. The executive producers of the new incarnation of the series were writer Russell T Davies and BBC Cymru Wales head of drama Julie Gardner.
Doctor Who finally returned with the episode "Rose" on BBC One on 26 March 2005. There have since been ten further series in 2006–2008, 2010–2015 and 2017–2018, and Christmas Day specials every year since 2005. No full series was broadcast in 2009, although four additional specials starring David Tennant were made. Davies left the show in 2010 after the end of series 4 and the David Tennant specials were completed. Steven Moffat, a writer under Davies was announced as Davies' successor along with Matt Smith as the new doctor. In January 2016, Moffat announced that he would step down after the 2017 finale, to be replaced by Chris Chibnall in 2018. The tenth series debuted in April 2017, with a Christmas special preceding it in 2016.
The 2005 version of Doctor Who is a direct plot continuation of the original 1963–1989 series and the 1996 telefilm. This is similar to the 1988 continuation of Mission Impossible, but differs from most other series relaunches which have either been reboots (for example, Battlestar Galactica and Bionic Woman) or set in the same universe as the original but in a different time period and with different characters (for example, Star Trek: The Next Generation and spin-offs).
We’re all capable of the most incredible change. We can evolve while still staying true to who we are. We can honour who we’ve been and choose who we want to be next.


Restore a backed up service binary
Does not need Admin
https://github.com/PowerShellEmpire/PowerTools/tree/master/PowerUp
moduleSource = self.mainMenu.installPath + "/data/module_source/privesc/PowerUp.ps1
function Restore-ServiceBinary {
<#
.SYNOPSIS
Restores a service binary backed up by Install-ServiceBinary.
Takes a service Name or a ServiceProcess.ServiceController on the pipeline and
checks for the existence of an "OriginalServiceBinary.exe.bak" in the service
binary location. If it exists, the backup binary is restored to the original
binary path.


{% load static i18n sekizai_tags cms_tags %} {% if 'square.handle_pos_payments' in perms and registration.payAtDoor %}
{% blocktrans %}Note: Square Point of Sale app must be installed and logged in before attempting this transaction.{% endblocktrans %}


Huffman’s Greed
问题描述 :
Every internal node of a binary tree has precisely two children, its left sub-tree and its right sub-tree. Every internal node of a labelled binary tree is additionally marked with a string, its label. A binary search tree is a labelled binary tree where every internal node t satisfies the following condition: All labels of nodes in the left sub-tree of t are less than the label of t which is, in turn, less than all labels of nodes in the right sub-tree of t. For this condition, we assume lexicographic, i.e., alphabetic order on the strings.
An inorder traversal of a tree is defined recursively: A leaf is just visited, and for an internal node first its left sub-tree is traversed inorder, then the node itself is visited, finally its right sub-tree is traversed inorder. It follows that an inorder traversal of a binary search tree yields the labels in lexicographic order. Note that binary search trees whose shapes differ may nevertheless yield the same sequence of strings while being traversed inorder.
When a given string s is looked for in a binary search tree, we compare s to the label l of the root. We are done if s=l, otherwise if s < l we continue to search in the left sub-tree, and if s>l in the right sub-tree. If a leaf is reached, we know that s is not in the tree.
The number of comparisons performed in such a search procedure depends on s and the actual shape of the search tree. Therefore, there is an interest in constructing binary search trees that store a given sequence of strings but provide as efficient access as possible. Of course, we don’t know in advance which strings will be looked up in the tree, so we need to make some assumptions.
Let n be the number of strings that are to be stored in the binary search tree. Let K1,…,Kn be these strings in lexicographic order. Let p1,…,pn and q0,…,qn be 2n+1 non-negative real numbers such that ∑i=1..npi + ∑i=0..nqi = 1. The interpretation of these numbers is:
- pi = probability that the search argument s is Ki.
- qi = probability that s lies (lexicographically) strictly between Ki and Ki+1.
By convention, q0 is the probability that s is less than K1, and qn is the probability that s is greater than Kn. We want to find a binary search tree containing nodes with labels K1,…,Kn that minimises the expected number of comparisons in the search, namely
cost = ∑i=1..npi*(1 + level of internal node Ki) + ∑i=0..nqi*(level of leaf between Ki and Ki+1).
The leaf between Ki and Ki+1 is that leaf reached in the search for a string s that lies (lexicographically) strictly between Ki and Ki+1. Adhere to the convention stated above for the border cases.
The following figure illustrates the first test case of the sample input. It shows the two possible binary search trees, the probabilities and the associated costs.
输入:
输出:
样例输入:
2 20 15 15 25 25 35 142 35 58 5 20 5 10 9 15 23 129 4 52 5 38 18 9 7 2 4 266 93 5 18 18 27 5 10 11 180 4 32 21 3 21 0 55 27 36 85 31 58 3 334 0 98 27 113 89 180 0 62 12 0 37 0 3 64 70 0 277 0 0 0 170 0 18 76 27 3 29 0
样例输出:
160 13637
解题代码:
/* @author: */ import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int p[]=new int[202]; int q[]=new int[202]; int s[][]=new int[202][202]; int ans[][]=new int[202][202]; int sum[]=new int[202]; int n , i, j, l, k, temp, r; while(sc.hasNext()) { n=sc.nextInt(); if( n == 0 ) break; for( i=1; i<=n; i++ ) { p[i]=sc.nextInt(); sum[i] = p[i]; } sum[0] = 0; sum[n+1] = 0; p[n+1] = 0; for( i=0; i<=n; i++ ) { q[i]=sc.nextInt(); sum[i+1] += sum[i] + q[i]; } for( i=1; i<=n; i++ ) { ans[i][i] = p[i] + q[i-1] + q[i]; ans[i][i-1] = 0; s[i][i] = i; } ans[n+1][n] = 0; for( l=1; l< n; l++ ) for( i=1; i+l<=n; i++ ) { j = i+l; ans[i][j] = 999999999; for( k = s[i][j-1]; k<=s[i+1][j]; k++ ) { if( ( temp = ans[i][k-1] + ans[k+1][j] ) < ans[i][j] ) { ans[i][j] = temp; s[i][j] = k; } } ans[i][j] += sum[j+1] - p[j+1] - sum[i-1]; } System.out.printf( "%d\n", ans[1][n] ); } } }
书上的解法更巧妙一些，在九度OJ实测的效率差不多
真考人啊
Excellent Web-site! I required to ask if I might webpages and use a component of the net web website and use a number of factors for just about any faculty process. Please notify me through email regardless of whether that would be excellent. Many thanks
程序只能输出一个子序列
第15行代码，/n/n，应该改为\n\n
输出规范写错了哦~
这个后缀数组不是常用的那个.
楼主放题时候没注意下？xxx定律见：
hdoj3782：http://acm.hdu.edu.cn/showproblem.php?pid=3782
处凡愚而不减，在圣贤而不增；
住烦恼而不乱，居禅定而不寂。
97行缺一个分号
这个应该是比较简单的解法了，如果有更好的办法可以告诉我
不对吧 你算的an是前面说有的项的和
因为是要把从字符串s的start位到当前位在hash中重置，修改提交后能accept，但是不修改居然也能accept
swap写成内联函数会不会好一些


Avail of a Product
Have one of our friendly BPI Associates contact you
Product:
Select Product
Saab
Fiat
Audi


|
Boost Sorting Algorithm Library
Definitions
|
Contents
- Introduction
- Definitions
-
- stable sort
Introduction
Definitions of terms
Definitions
- stable sort:
A sorting approach that preserves pre-existing order.
If there are two elements with identical keys
in a list that is later stably sorted,
whichever came first in the initial list will come first in a stably sorted list.
The algorithms provided here provide no such guarantee; items with identical keys
will have arbitrary resulting order relative to each other.
Revised
04
December, 2006
Copyright © 2009 Steven Ross
Distributed under the Boost Software License, Version 1.0. (See
accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)


| 程序包 | 说明 |
|---|---|
| com.mylhyl.circledialog |
| 类和说明 |
|---|
| OnAdItemClickListener
Created by hupei on 2019/1/14 16:32.
|
| OnAdPageChangeListener
Created by hupei on 2019/6/6 17:02.
|
| OnCreateBodyViewListener
Created by hupei on 2018/6/13.
|
| OnCreateButtonListener
Created by hupei on 2018/6/13.
|
| OnCreateInputListener
Created by hupei on 2018/6/13.
|
| OnCreateLottieListener
Created by hupei on 2018/7/4.
|
| OnCreateProgressListener
Created by hupei on 2018/6/13.
|
| OnCreateTextListener
Created by hupei on 2018/6/13.
|
| OnCreateTitleListener
Created by hupei on 2018/6/13.
|
| OnInputClickListener
Created by hupei on 2017/3/30.
|
| OnInputCounterChangeListener
Created by hupei on 2018/6/28 11:23.
|
| OnLvItemClickListener
Created by hupei on 2018/8/28 11:17.
|
| OnRvItemClickListener
Created by hupei on 2018/4/18.
|


Celebrity
Dead or Alive?
Their carreers may be over, but how about their their lives?
Welcome to Celebrity Dead or
Alive.
Test your skills
Feel the pressure
Gloat to your friends


Class KTransverseMercator
object --+
|
named._Named --+
|
named._NamedBase --+
|
KTransverseMercator
Karney's C++ class TransverseMercator transcoded to pure Python, following
is a partial copy of Karney's documentation.
Transverse Mercator projection based on Krüger's method which
evaluates the projection and its inverse in terms of a series.
There's a singularity in the projection at phi = 0, lam - lam0 =
+/- (1 - e) 90, about +/- 82.6 degrees for WGS84, where e is
the eccentricity. Beyond this point, the series ceases to converge and
the results from this method will be garbage. To be on the safe side,
don't use this method if the angular distance from the central meridian
exceeds (1 - 2e) x 90, about 75 degrees for the WGS84 ellipsoid.
Class ExactTransverseMercator is an alternative implementation
of the projection using exact formulas which yield accurate (to 8
nm) results over the entire ellipsoid.
The ellipsoid parameters and the central scale are set in the
constructor. The central meridian (which is a trivial shift of the
longitude) is specified as the lon0
keyword argument of the
KTransverseMercator.forward and KTransverseMercator.reverse methods. The latitude of
origin is taken to be the equator. There is no provision in this class
for specifying a false easting or false northing or a different latitude
of origin. However these are can be simply included by the calling
function.
The KTransverseMercator.forward and KTransverseMercator.reverse methods also return the
meridian convergence gamma
and scale k
. The
meridian convergence is the bearing of grid North, the y
axis
, measured clockwise from true North.
|
|
__init__(self,
a_earth=Ellipsoid(name='WGS84', a=6378137, b=6356752.31424518, f_=298.... ,
f=None,
lon0=0,
k0=0.9996,
name='',
raiser=False,
**TMorder)
New KTransverseMercator. |
|
|
|
|
forward(self,
lat,
lon,
lon0=None,
name='')
Forward projection, from geographic to transverse Mercator. |
|
|
|
|
reverse(self,
x,
y,
lon0=None,
name='')
Reverse projection, from transverse Mercator to geographic. |
|
|
|
|
toStr(self,
**kwds)
Return a str representation. |
|
|
|
Inherited from named._NamedBase :
__repr__ ,
__str__ ,
others ,
toRepr
Inherited from named._Named :
__imatmul__ ,
__matmul__ ,
__rmatmul__ ,
attrs ,
classof ,
copy ,
dup ,
methodname ,
rename ,
toStr2
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|
|
|
ellipsoid
Get the ellipsoid (Ellipsoid).
|
|
|
equatoradius
Get the ellipsoid 's equatorial radius, semi-axis
(meter ).
|
|
|
a
Get the ellipsoid 's equatorial radius, semi-axis
(meter ).
|
|
|
flattening
Get the ellipsoid 's flattening (float ).
|
|
|
f
Get the ellipsoid 's flattening (float ).
|
|
|
k0
Class property with retrievable name.
|
|
|
lon0
Class property with retrievable name.
|
|
|
raiser
Class property with retrievable name.
|
|
|
TMorder
Get the Transverse Mercator order (int , 4, 5, 6,
7 or 8).
|
|
Inherited from named._Named :
classname ,
classnaming ,
iteration ,
name ,
named ,
named2 ,
named3 ,
named4 ,
sizeof
Inherited from object :
__class__
|
__init__ (self,
a_earth=Ellipsoid(name='WGS84', a=6378137, b=6356752.31424518, f_=298.... ,
f=None,
lon0=0,
k0=0.9996,
name='',
raiser=False,
**TMorder)
(Constructor)
|
|
New KTransverseMercator.
- Arguments:
a_earth - This rhumb's earth (Ellipsoid, Ellipsoid2, a_f2Tuple, Datum,
2-tuple (a, f )) or the equatorial radius
(scalar , meter ).
f - The ellipsoid's flattening (scalar ), iff
a_earth is a scalar , ignored
otherwise.
lon0 - The central meridian (degrees180 ).
k0 - Central scale factor (scalar ).
name - Optional name (str ).
raiser - If True , throw a KTMError for forward singularities
(bool ).
TMorder - Keyword argument TMorder , see property
TMorder .
- Raises:
KTMError - Invalid a_earth , f or
TMorder .
- Overrides:
object.__init__
|
forward (self,
lat,
lon,
lon0=None,
name='')
|
|
Forward projection, from geographic to transverse Mercator.
- Arguments:
lat - Latitude of point (degrees90 ).
lon - Longitude of point (degrees180 ).
lon0 - Central meridian of the projection (degrees180 ).
name - Optional name (str ).
- Returns:
- Forward4Tuple
(easting, northing, gamma,
scale) with easting and northing
in meter , unfalsed, the meridian convergence
gamma at point in degrees180 and the
scale of projection at point scalar .
Any value may be NAN , NINF or
INF for singularities.
- Raises:
KTMError - For singularities, iff property raiser is
True .
|
reverse (self,
x,
y,
lon0=None,
name='')
|
|
Reverse projection, from transverse Mercator to geographic.
- Arguments:
x - Easting of point (meter ).
y - Northing of point (meter ).
lon0 - Central meridian of the projection (degrees180 ).
- Returns:
- Reverse4Tuple
(lat, lon, gamma,
scale) with lat - and lon gitude
in degrees , unfalsed.
|
|
Return a str representation.
- Arguments:
kwds - Optional, overriding keyword arguments.
- Overrides:
named._Named.toStr
|
ellipsoid
Get the ellipsoid (Ellipsoid).
- Get method:
- ellipsoid(self)
- Get the ellipsoid (Ellipsoid).
- Set method:
- ellipsoid(self,
a_earth_f)
- Set this rhumb's ellipsoid (Ellipsoid, Ellipsoid2, Datum, a_f2Tuple or 2-tuple
(a, f) ).
- Delete Method:
- _fdel(inst)
- Zap the cached/memoized
property value.
|
equatoradius
Get the ellipsoid 's equatorial radius, semi-axis
(meter ).
- Get method:
- equatoradius(self)
- Get the
ellipsoid 's equatorial radius, semi-axis
(meter ).
- Set method:
- _fset_error(inst,
val)
- Throws an
AttributeError , always.
- Delete Method:
- _fdel(inst)
- Zap the cached/memoized
property value.
|
a
Get the ellipsoid 's equatorial radius, semi-axis
(meter ).
- Get method:
- equatoradius(self)
- Get the
ellipsoid 's equatorial radius, semi-axis
(meter ).
- Set method:
- _fset_error(inst,
val)
- Throws an
AttributeError , always.
- Delete Method:
- _fdel(inst)
- Zap the cached/memoized
property value.
|
flattening
Get the ellipsoid 's flattening (float ).
- Get method:
- flattening(self)
- Get the
ellipsoid 's flattening (float ).
- Set method:
- _fset_error(inst,
val)
- Throws an
AttributeError , always.
- Delete Method:
- _fdel(inst)
- Zap the cached/memoized
property value.
|
f
Get the ellipsoid 's flattening (float ).
- Get method:
- flattening(self)
- Get the
ellipsoid 's flattening (float ).
- Set method:
- _fset_error(inst,
val)
- Throws an
AttributeError , always.
- Delete Method:
- _fdel(inst)
- Zap the cached/memoized
property value.
|
k0
Class property with retrievable name.
- Get method:
- k0(self)
- Get the central scale factor (
float ), aka
scale0 .
- Set method:
- k0(self,
k0)
- Set the central scale factor (
float ), aka
scale0 .
|
lon0
Class property with retrievable name.
- Get method:
- lon0(self)
- Get the central meridian (
degrees180 ).
- Set method:
- lon0(self,
lon0)
- Set the central meridian (
degrees180 ).
|
raiser
Class property with retrievable name.
- Get method:
- raiser(self)
- Get the error setting (
bool ).
- Set method:
- raiser(self,
raiser)
- Set the error setting (
bool ), to True to throw a
KTMError for
forward singularities.
|
TMorder
Get the Transverse Mercator order (int , 4, 5, 6, 7
or 8).
- Get method:
- TMorder(self)
- Get the Transverse Mercator order (
int , 4, 5, 6, 7 or
8).
- Set method:
- TMorder(self,
order)
- Set the Transverse Mercator order (
int , 4, 5, 6, 7 or
8).
- Delete Method:
- _fdel(inst)
- Zap the cached/memoized
property value.
|


Petrônio Cândido de Lima e Silva
I am a professor, researcher, and consultant, currently working at the Federal Institute of Northern Minas Gerais - IFNMG and living in Montes Claros, State of Minas Gerais, Brazil.. My interests include everything related to Data (Databases, Data Science, Data Engineering, Data Management, etc), Computational Intelligence (Fuzzy Systems, Neural Networks, Evolutionary Computing, etc), Software development and related stuff. I am also interested in innovation, sustainability, human and animal rights, and social good.
Currently I am co-founder of {ci∂ic} - the Research Group In Data Science and Computational Intelligence of IFNMG and member of MINDS - Machine Intelligence and Data Science group of UFMG.


While at university I was heavily involved in the organization of the engineering orientation week. I ran the Aerial Photo event from the last three years of my undergrad. This event involve creating a design, placement planning, and communicating for a successful event.
The design of the photo is based off the year, and the theme of that week. The photo is take off a building which mean it was take at an angle, as such clean straight lines are what makes a clear design. After the design is finalize we moved to an 'old school' method of transfer it to grid paper and scaling it.
The scaling on grid paper is to fit all the people in the photo with four people per metre squared. the final step is to divide the design by team, indicated by colour. Unfortunately that year it rained on the day of the event, which meant we moved to rain plan. This involved completly redoing the layout to match the small number of people. The video below shows a timelapse of the rain date event.


Name: {{ employee.fullName }}
Age: {{ employee.age }}
Department: {{ employee.department }}
Address: {{ employee.address.street }} {{ employee.address.city }}


|
DigitalOwl
|
Interface for PollAnswerService. More...
Public Member Functions | |
| Task< DtoResponseResult< DtoPollAnswer > > | CreateAsync (DtoPollAnswer dto, int userId) |
| Create a single answer. More... | |
| Task< DtoResponseResult< IEnumerable< DtoPollAnswer > > > | CreateAsync (IEnumerable< DtoPollAnswer > collection, int userId) |
| Create set of answers. More... | |
| Task< DtoResponseResult< IEnumerable< DtoPollAnswer > > > | GetAll (int questionId) |
| Get whole answer set from the particular question. More... | |
| Task< DtoResponseResult< IEnumerable< DtoPollAnswer > > > | GetAll () |
| Get all available answers (not sure if it's going to be useful). More... | |
| Task< DtoResponseResult< DtoPollAnswer > > | GetById (int answerId) |
| Find an answer with given Id. More... | |
| Task< DtoResponseResult< DtoPollAnswer > > | UpdateAsync (DtoPollAnswer dto, int userId) |
| Update given answer. More... | |
| Task< DtoResponse > | Delete (int answerId) |
| Delete the answer of given Id. More... | |
Interface for PollAnswerService.
Definition at line 11 of file IPollAnswerService.cs.
| Task<DtoResponseResult<DtoPollAnswer> > DigitalOwl.Service.Interface.IPollAnswerService.CreateAsync | ( | DtoPollAnswer | dto, |
| int | userId | ||
| ) |
Create a single answer.
| dto | Object to be created. |
| userId | Id of the user creating an answer. |
Implemented in DigitalOwl.Service.Services.PollAnswerService.
| Task<DtoResponseResult<IEnumerable<DtoPollAnswer> > > DigitalOwl.Service.Interface.IPollAnswerService.CreateAsync | ( | IEnumerable< DtoPollAnswer > | collection, |
| int | userId | ||
| ) |
Create set of answers.
| collection | |
| userId |
Implemented in DigitalOwl.Service.Services.PollAnswerService.
| Task<DtoResponse> DigitalOwl.Service.Interface.IPollAnswerService.Delete | ( | int | answerId | ) |
Delete the answer of given Id.
| answerId | Id of an answer to be deleted. |
Implemented in DigitalOwl.Service.Services.PollAnswerService.
| Task<DtoResponseResult<IEnumerable<DtoPollAnswer> > > DigitalOwl.Service.Interface.IPollAnswerService.GetAll | ( | int | questionId | ) |
Get whole answer set from the particular question.
| questionId | Desired answers' question Id. |
Implemented in DigitalOwl.Service.Services.PollAnswerService.
| Task<DtoResponseResult<IEnumerable<DtoPollAnswer> > > DigitalOwl.Service.Interface.IPollAnswerService.GetAll | ( | ) |
Get all available answers (not sure if it's going to be useful).
Implemented in DigitalOwl.Service.Services.PollAnswerService.
| Task<DtoResponseResult<DtoPollAnswer> > DigitalOwl.Service.Interface.IPollAnswerService.GetById | ( | int | answerId | ) |
Find an answer with given Id.
| answerId | Answer Id. |
Implemented in DigitalOwl.Service.Services.PollAnswerService.
| Task<DtoResponseResult<DtoPollAnswer> > DigitalOwl.Service.Interface.IPollAnswerService.UpdateAsync | ( | DtoPollAnswer | dto, |
| int | userId | ||
| ) |
Update given answer.
| dto | Updated version of an object. |
| userId | Id of the user updating an answer. |
Implemented in DigitalOwl.Service.Services.PollAnswerService.


BATMaN is a community hub and toolset for outdoor enthusiasts to discover new communities and new adventures in the Bay Area. Through BATMaN hikers can find new trails, add favorite trails, write trail reviews, and comment on the reviews of others.
Pick a trail, find community, get outside!
If you have any questions about the application contact:


Innovation and experience combined, we've got a well seasoned team at the helm.
FRONT-END DESIGNER
FRONT-END DEVELOPER
Student and design enthusiast for web development. She began her career as a general graphic designer in Colombia and is currently a student of Interactive Media Design in the Faculty of Art and Design at Fanshawe College.
She is obsessed with creating functional systems by combining designs for creating work pieces.
Lead developer, fond of creating websites, through complex code lines; using a wide variety of programming languages, such as CSS and Javascript.
He is in charge of correctly using the programming language to build the structure of a web page, web portal or e-commerce efficiently, avoiding possible failures or preventing cyber attacks against them.


Editing and testing Capital Framework shouldn't be complicated. Install this sandbox to make your dev life easier.
Not sure what Capital Framework is?  Don't worry, we’ll wait right here.


Assembly is a comprehensive online platform where global makers connect and collaborate to create software services, websites, and mobile apps, managing processes and mitigating needs from start to success. When they approached Focus Lab, they lacked ownable identity.


黒の手番です。32 はどう動かしますか？
12-7:17pt
pips Black=117 White=119
(CorrectAnswer= 0/0, ErrorScore= 0)
1. 11/9 6/3 eq:-0.452 41.95% (G:8.20% B:0.27%) 58.05% (G:14.25% B:0.24%) 2. 11/6 eq:-0.477 (-0.025) 40.79% (G:7.19% B:0.25%) 59.21% (G:12.97% B:0.20%) 3. 24/22 11/8 eq:-0.604 (-0.151) 38.67% (G:7.62% B:0.23%) 61.33% (G:17.80% B:0.19%) 4. 8/3 eq:-0.698 (-0.245) 37.33% (G:8.08% B:0.35%) 62.67% (G:19.53% B:0.47%) 5. 6/1 eq:-0.688 (-0.235) 37.84% (G:5.28% B:0.10%) 62.16% (G:17.41% B:0.44%)


--- layout: post status: publish published: true title: Future Retro Box author: display_name: Fabio Pereira login: admin email<EMAIL_ADDRESS>url: http://fabiopereira.me author_login: admin author_email<EMAIL_ADDRESS>author_url: http://fabiopereira.me wordpress_id: 197 wordpress_url: http://fabiopereira.me/blog/2009/11/15/future-retro-box/ date: '2009-11-15 06:21:39 +0' date_gmt: '2009-11-15 13:21:39 +0' categories: - Technical tags: - Agile - ThoughtWorks - IterationMgmt - Retro comments: - id: 4757 author: Jason Yip author_email<EMAIL_ADDRESS>author_url: http://jchyip.blogspot.com date: '2009-11-15 13:41:43 +0' date_gmt: '2009-11-15 20:41:43 +0' content: I like this idea. My only concern is that you're waiting until the retrospective to deal with the items. - id: 4763 author: Rixt Wiersma author_email<EMAIL_ADDRESS>author_url: '' date: '2009-11-16 10:26:46 +0' date_gmt: '2009-11-16 17:26:46 +0' content: "I recently found out that a team of TW-ers of the India offices (Anand A. Chirag, Dhaval and Anay)have developed a tool for distributed retrospectives. Unlike Cardmeeting.com, you don't need to sign up for a meeting, you just create a new retro and send the link to all team members and people can start adding stickies.\r\nHere is the link:http://retro.play.railsplayground.net\r\nYou can choose what retro format you want to use, you can vote and the feature to club stickies in under construction. \r\n\r\nI have used it a few times now and it works well.\r\n\r\nI like the golden box though....:-)" - id: 4764 author: Luca Minudel author_email<EMAIL_ADDRESS>author_url: http://blogs.ugidotnet.org/luka/ date: '2009-11-16 13:03:38 +0' date_gmt: '2009-11-16 20:03:38 +0' content: "Hi Fabio, I noticed the same thing (during retrospectives people usually raise good and bad things from the last days only).\r\n\r\nSo I used to write post-it day-by-day for me but I was still thinking how to have this practices at team level. Think that Future Retro Box could be one good idea!" - id: 6997 author: 'Retrospectives: Some thoughts at Mark Needham' author_email: '' author_url: http://www.markhneedham.com/blog/2010/06/10/retrospectives-some-thoughts/ date: '2010-06-10 00:23:37 +1000' date_gmt: '2010-06-10 07:23:37 +1000' content: '[...] previously wrote about the idea of the future retrospective box to ensure that we don''t forget anything that happened early on in an iteration when we come to a [...]' - id: 45766 author: copd author_email<EMAIL_ADDRESS>author_url: http://iqracollege.com/index.php?do=/blog/28662/acute-respiratory-case-study-quot-a-cute-exacerbation-in-xpxwx3-quot/ date: '2012-12-20 03:14:58 +0' date_gmt: '2012-12-20 10:14:58 +0' content: "If you are going for finest contents like I do, just pay a \r\nvisit this web page daily for the reason that it presents feature contents, thanks" - id: 48267 author: stackable storage author_email<EMAIL_ADDRESS>author_url: http://www.email-standards.org/member/230252/ date: '2013-01-27 06:20:51 +0' date_gmt: '2013-01-27 13:20:51 +0' content: What's up Dear, are you genuinely visiting this web site daily, if so then you will definitely obtain nice experience. - id: 50927 author: simply click the next internet site author_email<EMAIL_ADDRESS>author_url: http://www.refugiosoldenoche.com.ar/?q=node/292361/ date: '2013-02-23 15:38:17 +0' date_gmt: '2013-02-23 22:38:17 +0' content: Thanks in support of sharing such a fastidious thinking, article is fastidious, thats why i have read it completely ---
We have noticed on our current project that during retrospectives people usually raise good and bad things from the last days only. At the moment we have a 3 weeks iteration and it's hard to remember what happened on the first days. I have already used from 1 to 4 weeks iteration and each project has its own reasons for choosing this length. To help the team improve around things that happened during the whole iteration, we have a box called the Future Retro Box, where people can all keep adding notes throughout the iteration.
The reason why the box is called Future is because it will be opened during the next retrospective. The items inside the box will bootstrap the retro wall when people can add other ones.
Make sure the box is in a visible point of the work environment.
Another option would be to have an on going retrospective wall, as suggested by my friend Lachlan. However, this might work better for a co-located team, we are distributed. We tried using a wiki for that… It didn’t work… No one adds comments to the wiki… Why? Perhaps the wiki is a Refrigerator as opposed to a Radiator. The box has been working fine so far. The notes are not visible, but the box itself is.


6. Data Structures¶
Note
This Chapter Data Structures is for beginner. If you have some Python
programming experience, you may skip this chapter.
6.1. List¶
list
is one of data sctructures which is heavily using in my daily work.
6.1.1. Create list¶
- Create empty list
The empty list is used to initialize a list.
:: Python Code:
my_list = [] type(my_list)
:: Ouput:
list
I applied the empty list to initialize my silhouette score
list when I try to find the
optimal number of the clusters.
:: Example:
min_cluster = 3 max_cluster =8 # silhouette_score scores = [] for i in range(min_cluster, max_cluster): score = np.round(np.random.random_sample(),2) scores.append(score) print(scores)
:: Ouput:
[0.16, 0.2, 0.3, 0.87, 0.59]
6.1.2. Unpack list¶
:: Example:
num = [1,2,3,4,5,6,7,8,9,10] print(*num)
:: Ouput:
1 2 3 4 5 6 7 8 9 10
6.1.3. Methods of list objects¶
Methods of list objects:
| Name | Description |
|---|---|
list. append(x) |
Add an item to the end of the list |
list. extend(iterable) |
Extend the list by appending all |
list. insert(i, x) |
Insert an item at a given position |
list. remove(x) |
Remove the first item |
list. pop([i]) |
Remove the item at given position |
list. clear() |
Remove all items from the list |
list. index(x[,s[,e]]) |
Return zero-based index in the list |
list. count(x) |
Return the number of times x |
list. sort(key,reverse) |
Sort the items of the list |
list. reverse() |
Reverse the elements of the list |
list. copy() |
Return a shallow copy [1] of list |
Footnotes
| [1] | Shallow Copy vs Deep Copy Reference: https://stackoverflow.com/posts/184780/revisions Shallow copy: The variables A and B refer to different areas of memory, when B is assigned to A the two variables refer to the same area of memory. Later modifications to the contents of either are instantly reflected in the contents of other, as they share contents. Deep Copy: The variables A and B refer to different areas of memory, when B is assigned to A the values in the memory area which A points to are copied into the memory area to which B points. Later modifications to the contents of either remain unique to A or B; the contents are not shared. |
6.2. Tuple¶
A tuple is an assortment of data, separated by commas, which makes it similar to the Python list, but a tuple is fundamentally different in that a tuple is “immutable.” This means that it cannot be changed, modified, or manipulated.
6.3. Dictionary¶
dict
is one of another data sctructures which is heavily using in my daily work. I heavily applied the dict
in my PyAudit
package, more details can be found at PyAudit.
6.3.1. Create dict
from lists¶
:: Example:
col_names = ['name','Age', 'Sex', 'Car'] col_values = ['Michael', '30', 'Male', ['Honda','Tesla']] # d = {key: value for key, value in zip(col_names, col_values)} print(d) # import pandas as pd df = pd.DataFrame(d) print(df)
:: Ouput:
{'name': 'Michael', 'Age': '30', 'Sex': 'Male', 'Car': ['Honda', 'Tesla']} name Age Sex Car 0 Michael 30 Male Honda 1 Michael 30 Male Tesla
6.3.2. dict.get()
¶
When get()
is called, Python checks if the specified key exists in the dict. If it does, then get()
returns the value of that key. If the key does not exist, then get()
returns the value specified in the second argument to get()
. A good application of get()
can be found at Update Keys in Dict.
:: Example:
data1 = d.get("name", "best") data2 = d.get("names", "George") print(data1) # Michael print(data2) # George
:: Ouput:
Michael George
6.3.3. Looping Techniques¶
:: Example:
print([(key, val) for key, val in d.items()])
:: Ouput:
[('name', 'Michael'), ('Age', '30'), ('Sex', 'Male'), ('Car', ['Honda', 'Tesla'])]
6.3.4. Update Values in Dict¶
Replace values in dict
:: Example:
replace = {'Car': ['Tesla S', 'Tesla X']} print(d) d.update(replace) print(d)
:: Ouput:
{'name': 'Michael', 'Age': '30', 'Sex': 'Male', 'Car': ['Honda', 'Tesla']} {'name': 'Michael', 'Age': '30', 'Sex': 'Male', 'Car': ['Tesla S', 'Tesla X']}
Add key and values in dict
:: Example:
# add key and values in dict added = {'Kid': ['Tom', 'Jim']} print(d) d.update(added) print(d)
:: Ouput:
{'name': 'Michael', 'Age': '30', 'Sex': 'Male', 'Car': ['Tesla S', 'Tesla X']} {'name': 'Michael', 'Age': '30', 'Sex': 'Male', 'Car': ['Tesla S', 'Tesla X'], 'Kid': ['Tom', 'Jim']}
6.3.5. Update Keys in Dict¶
:: Example:
# update keys in dict mapping = {'Car': 'Cars', 'Kid': 'Kids'} # print({mapping.get(key, key): val for key, val in d.items()})
:: Ouput:
{'name': 'Michael', 'Age': '30', 'Sex': 'Male', 'Car': ['Tesla S', 'Tesla X'], 'Kid': ['Tom', 'Jim']} {'name': 'Michael', 'Age': '30', 'Sex': 'Male', 'Cars': ['Tesla S', 'Tesla X'], 'Kids': ['Tom', 'Jim']}
6.4. One line if-else statement¶
6.4.1. With filter¶
::syntax:
[ RESUT for x in seq if COND ]
:: Python Code:
num = [1,2,3,4,5,6,7,8,9,10] [x for x in num if x%2 ==0]
:: Ouput:
[2, 4, 6, 8, 10]
6.4.2. Without filter¶
::syntax:
[ RESUT1 if COND1 else RESUT2 if COND2 else RESUT3 for x in seq]
:: Python Code:
num = [1,2,3,4,5,6,7,8,9,10] ['Low' if 1<= x <=3 else 'Median' if 3<x<8 else 'High' for x in num]
:: Ouput:
['Low', 'Low', 'Low', 'Median', 'Median', 'Median', 'Median', 'High', 'High', 'High']


Search conditions
A search condition is a basic search query building block. It always
consists of 3 elements: field
,
comparison operator
and value
, placed exactly
in this order from left to right.
Here's an example - looking for users with first name "John". In the
example below first_name
is a field
,
=
is a comparison operator
and
"John"
is a value
:
first_name = "John"
Another example, looking for users who registered in 2017 or later:
date_joined >= "2017-01-01"
One more example, looking for super-users:
is_superuser = True
And one more - finding all users whose names are in a given list:
first_name in ("John", "Jack", "Jason"){% endblock %}
Multiple search conditions
You can combine multiple search conditions together using the logical
operators and
(both conditions must be true) and
or
(at least one of the conditions must be true, no matter
which one). Important - logical operators must be written in lowercase:
and
and or
is correct, and AND
or
OR
is incorrect and will cause an error.
Example: looking for users with first name "John" and
registered in 2017 or later. Please note that we have 2 search
conditions here, joined with and
:
first_name = "John" and date_joined >= "2017-01-01"
One more example, looking for users who are either super-users
or
marked with "Staff" flag:
is_superuser = True or is_staff = True
Logical operators can be quite powerful, as they let you to build
complex search queries. If you're building a complex query there's an
important tip to keep in mind: if your query contains both
and
and or
operators, we strongly encourage
you to use parenthesis to specify the precedence of operators. Here's
an example to illustrate why this is important. Let's assume that you
want to pull users who are either super-users or
marked
with Staff flag, and
registered in 2017 or later. It
might be tempting to write a query like this:
is_superuser = True or is_staff = True and date_joined > "2017-01-01"
The problem with the query above is that it won't do what you expect,
because the and
operator is evaluated first. In fact it pulls
users who are either super-users (no matter when they registered)
or
users who are both Staff and
registered
after 2017. This problem can be fixed with parentheses, just put them
around the search conditions that must be evaluated first, like this:
(is_superuser = True or is_staff = True) and date_joined > "2017-01-01"
Using parenthesis is recommended only when your query mixes both
and
and or
operators. If your query contains
multiple logical operators of only one kind (either and
or or
) you can safely omit parenthesis and it will work
as expected.
Fields
In a search query, you should reference the current model's fields exactly as they're defined in Python code for that particular Django model. Search query input has an auto-completion feature that pops up automatically and suggests all available options. If you're not sure what the field name is, then pick one of the options displayed (example):
{% block field_completion_example %} {% endblock %} {% block field_naming %}
In most cases, internal Django model fields look similar to what you see
in Django admin interface, just in lowercase and with _
instead of spaces. For example, in the standard Users admin interface,
the internal first_name
field is displayed as
First name
, email
field is displayed as
Email address
and so on. However there could be exceptions
to this, if developers have defined custom display names that look
very different from their internal representation. In such cases it
might be a good idea to ask developers to override this help template
and provide an "internal name -> display name" fields mapping right
here.
Note that some fields that you see in Django admin may not be searchable. This includes computed fields, i.e. fields which are not stored in the database as a plain value, but rather calculated from other values in the code.
Related models
DjangoQL allows you to search by related models as well (it
automatically converts relations to SQL joins under the hood). Use the
.
dot separator to designate related models and their
fields. For example:
groups.name in ("Marketing", "Support")
See the .
in the example above? It means that
groups
is a related model and name
is a field
of that model. As usual, DjangoQL auto-completion provides suggestions
for all available related models and their fields. For complex data
structures you can use multiple levels of relation, i.e. specifying a
related model, then its related model, and so on.
In most cases the search condition with a related model must specify the
exact field of that model, but not a related model itself. For example,
groups in ("Marketing", "Support")
won't work, because
groups
is a model and not a field. Models can have many
fields, and the server doesn't know against which field you would like
to perform a comparison. However there's one notable exception to
this - when you'd like to find records that are linked (or not linked)
to any related models of that kind. In such a case, you should compare
the related model to a special None
value, like this:
groups = None
The example above would search for users that don't belong to any
groups. If you'd like to find all users that belong to at least any
group instead, use != None
:
groups != None
Comparison operators
| Operator | Meaning | Example |
|---|---|---|
| = | equals | first_name = "John" |
| != | does not equal | id != 42 |
| ~ | contains a substring | email ~<EMAIL_ADDRESS>|
| !~ | does not contain a substring | username !~ "test" |
| startswith | starts with a substring | last_name startswith "do" |
| not startswith | does not start with a substring | last_name not startswith "do" |
| endswith | ends with a substring | last_name endswith "oe" |
| not endswith | does not end with a substring | last_name not endswith "oe" |
| > | greater | date_joined > "2017-02-28" |
| >= | greater or equal | id >= 9000 |
| < | less | id < 9000 |
| <= | less or equal | last_login <= "2017-02-28 14:53" |
| in | value is in the list | first_name in ("John", "Jack", "Jason") |
| not in | value is not in the list | id not in (42, 9000) |
Notes:
-
~
and!~
operators can be applied only to string and date/datetime fields. A date/datetime field will be handled as a string one (ex.,payment_date ~ "2020-12-01"
) -
startswith
,not startswith
,endswith
, andnot endswith
can be applied to string fields only; -
True
,False
andNone
values can be combined only with=
and!=
; -
in
andnot in
operators must be written in lowercase.IN
orNOT IN
is incorrect and will cause an error.
Values
| Type | Examples | Comments |
|---|---|---|
| string | "this is a string" |
Strings must be enclosed in double quotes, like
"this" . If your string contains double quote
symbols in it, you should escape them with a backslash,
like this: "this is a string with \"quoted\" text" .
|
| int | 42 , 0 , -9000 |
Integer numbers are just digits with optional unary minus. If you're typing big numbers please don't use thousand separators, DjangoQL doesn't understand them. |
| float |
3.14 , -0.5 , 5.972e24
|
Floating point numbers look like integer numbers with optional
fractional part separated with dot. You can also use
e notation to specify power of ten. For example,
5.972e24 means 5.972 * 1024 .
|
| bool |
True , False
|
Boolean is a special type that accepts only two values:
True or False . These values are
case-sensitive, you should write True or
False exactly like this, with the first letter in
uppercase and others in lowercase, without quotes.
|
| date |
"2017-02-28"
|
Dates are represented as strings in "YYYY-MM-DD"
format.
|
| datetime |
"2017-02-28 14:53" "2017-02-28 14:53:07"
|
Date and time can be represented as a string in
"YYYY-MM-DD HH:MM" format, or optionally with seconds
in "YYYY-MM-DD HH:MM:SS" format (24-hour clock).
Please note that comparisons with date and time are performed in
the server's timezone, which is usually UTC.
|
| null |
None
|
This is a special value that represents an absence of any value:
None . It should be written exactly like this, with
the first letter in uppercase and others in lowercase, without
quotes. Use it when some field in the database is
nullable (i.e. can contain NULL in SQL terms) and you'd like to
search for records which either have no value
(some_field = None ) or have some value
(some_field != None ).
|


Intrepide:(Go creative, Go fearless)
This is a tattoo competition.
Rules:
- You have to make a tattoo mentioning meraz in it.
- Post a selfie on meraz official page tagging Intrepide.
- Who will get maximum point will be declatred winner.
- 1like = 1 point
- 1 comment = 5 point
- 1 share = 10 point


Checkpointing and restarting¶
Warning
These instructions currently only apply to amrclaw and geoclaw codes.
Checkpointing a computation¶
In this section clawdata refers to the rundata.clawdata attribute of an object of class ClawRunData, as is generally set at the top of a setrun.py file.
The rundata.clawdata.checkpt_style parameter specified in setrun.py (see Specifying classic run-time parameters in setrun.py) determines how often checkpointing is done, if at all.
See the comments in Sample setrun.py module for classic Clawpack for examples.
The checkpoint files are saved in the same output directory as the solution output, with file names of the form fort.tchkNNNNN (a small ASCII file) and fort.chkNNNNN (a large binary file) where NNNNN is the step number on the coarsest level. These files containt all the information needed to restart the computation at this point.
Restarting a computation¶
To restart a computation from any point where checkpoint files have been saved, modify setrun.py to set:
clawdata.restart = True
clawdata.restart_file = 'fort.chkNNNNN'
where NNNNN is the time step number from which the restart should commence.
You should also modify the output time parameters to specify that the computation should go to a later time than the time of the restart file (which can be found in the file fort.tchkNNNNN).
Note the following in setting the new output times:
The value clawdata.t0 should generally be left to the original starting time of the computation.
If clawdata.output_style==1, then clawdata.t0 and clawdata.tfinal along with clawdata.num_output_times are used to determine equally spaced output times. Only those times greater than the restart time will be used as output times.
If clawdata.output_t0==True then a time frame will be output at the restart time (not t0 in general). This may duplicate the final frame that was output from the original computation. Set clawdata.output_t0 = False to avoid this.
If clawdata.output_style==2, then clawdata.output_times is a list of output times and only those times greater than or equal to the restart time will be used as output times.
Modifying the Makefile for a restart¶
To restart a computation, it is necessary to modify the Makefile as well as setrun.py. In the Makefile, set:
RESTART = True
This will ensure that the original set of output files (for times up to the restart time) and the checkpoint file will not be deleted. They will still be available in the output directory along with the newly created output files.
Output files after a restart¶
After running the restarted computation, the original set of output files should still be in the output directory along with a new set from the second run. Note that one output time may be repeated in two frames if clawdata.output_t0 == True in the restarted run.
Note that any gauge output from the first run will be overwritten by the second run. If you wish to preserve the gauge output from the first run, currently you must copy the output file fort.gauge to another location, say fort.gauge1, before doing the restart run. Then you could catenate the two to get gauge output for the entire run, e.g.:
cd _output
mv fort.gauge fort.gauge2
cat fort.gauge1 fort.gauge2 > fort.gauge
This creates a file fort.gauge that contains the entire gauge history.
TODO: This should be simplified.


Publications & Mentions
2023
Interview with Kelowna Community Resources
2022
Kelowna Capital News Article - KCR: Warm Hearts give
- News article interview regarding non-profit “Warm Hearts Kelowna” founded in 2021 to support local families in Kelowna, British Columbia.
2020
University of British Columbia, Master of Data Science – Capstone project 2020
Authors: Ngan Lyle, Sofia Bahmutsky, Kaitlyn Hobbs and Shreeram Murali
Organization: Statistics Canada & University of British Columbia - Okanagan
2018
filtR: a function for filtering error-derived OTUs/ASVs from count tables
Authors: Ben Joris, Greg Gloor, Jean Macklaim, Daniel Giguere, Kaitlyn Hobbs
Organization: Gloor Lab, The University of Western Ontario.
Radiation Dose Estimation by Completely Automated Interpretation of the Dicentric Chromosome Assay
Authors: Yanxin Li, Ben C Shirley, Ruth C Wilkins, Farrah Norton, Joan H M Knoll, Peter K Rogan
Organization: Cytognomix, The University of Western Ontario.
b2952a3 @ 2022-12-01


Apparently time just gets busier when one is about to go on vacation.
Another way to add color and transparency is through rgba.


Probably a question for Chaveiro, but anyone chip in!
What is the vision regarding the MySQL Memory Storage Engine, and how do you see it being used in emoncms v8.6?
From what I know, access to the data is quicker with low latency, but it's volatile and the data is lost after the MySQL server stops or is restarted.
Also it progressively eats into system memory which is not reclaimed even if rows are deleted, (only when the table is deleted).
Paul
Re: v8.6 - MySQL Memory Storage Engine
Hi Paul, i remember reading on the forum about saving just the last value instead of historic feed data. Memory fits that purpose and gives past data since reboot. It's really up to the user to choose if it fits his need.
Data is kept in ram, so its 'low-write'.
The mysql default limit is 16MB per table, thats about 500.000 data points.
From mysql docs https://dev.mysql.com/doc/refman/5.0/en/memory-storage-engine.html :
MEMORY table contents are stored in memory, which is a property that MEMORY tables share with internal temporary tables that the server creates on the fly while processing queries. However, the two types of tables differ in that MEMORY tables are not subject to storage conversion, whereas internal temporary tables are:
MEMORY tables are never converted to disk tables. If an internal temporary table becomes too large, the server automatically converts it to on-disk storage, as described in Section 8.4.4, “How MySQL Uses Internal Temporary Tables”.
The maximum size of MEMORY tables is limited by the max_heap_table_size system variable, which has a default value of 16MB. To have larger (or smaller) MEMORY tables, you must change the value of this variable. The value in effect for CREATE TABLE is the value used for the life of the table. (If you use ALTER TABLE or TRUNCATE TABLE, the value in effect at that time becomes the new maximum size for the table. A server restart also sets the maximum size of existing MEMORY tables to the global max_heap_table_size value.) You can set the size for individual tables as described later in this section.
Re: v8.6 - MySQL Memory Storage Engine
Yes, I had read the MySQL docs earlier, but can you give a practical example where this could be used effectively in the emoncms environment?
Paul


Hangman v0.9.6 Hangman.Reduction.Engine.Worker behaviour
Module implements workers that handle Hangman
words reduction. Used primarily by Reduction.Engine
through reduce_and_store/4
to perform a series of steps:
- Retrieves
pass
data fromPass.Cache
. - Reduces word set based on
reduce_key
. - Stores reduced set back into
Pass.Cache
. - Returns new
Pass
.
Summary
Functions
Primary worker
function which retrieves current pass words
data, filters words with regex
, tallies reduced word stream, creates new Words
abstraction and stores it back into words pass table
GenServer start_link wrapper function
Callbacks
Terminate callback No special cleanup
Functions
Specs
reduce_and_store(pos_integer, Hangman.Pass.key, Regex.t, map) :: Hangman.Pass.t
Primary worker
function which retrieves current pass words
data, filters words with regex
, tallies reduced word stream, creates new Words
abstraction and stores it back into words pass table.
If pass size happens to be small enough, will also return remaining Hangman
possible words left to aid in guess
selection.
Returns pass
. Method is serialized.
Specs
start_link(pos_integer) :: GenServer.on_start
GenServer start_link wrapper function


|
Aspose Html Cloud SDK 22.12.1
|
File versions FileVersion. More...
#include <FileVersions.h>
Inherits com::aspose::model::ModelBase.
Public Member Functions | |
| ASPOSE_DLL_EXPORT | FileVersions () |
| ASPOSE_DLL_EXPORT | ~FileVersions () |
| ASPOSE_DLL_EXPORT void | validate () override |
| ModelBase overrides. More... | |
| ASPOSE_DLL_EXPORT web::json::value | toJson () const override |
| ASPOSE_DLL_EXPORT void | fromJson (web::json::value &json) override |
| ASPOSE_DLL_EXPORT std::string | toString () const override |
| ASPOSE_DLL_EXPORT void | toMultipart (std::shared_ptr< MultipartFormData > multipart, const utility::string_t &namePrefix) const override |
| ASPOSE_DLL_EXPORT void | fromMultiPart (std::shared_ptr< MultipartFormData > multipart, const utility::string_t &namePrefix) override |
| ASPOSE_DLL_EXPORT std::vector< std::shared_ptr< FileVersion > > & | getValue () |
| FileVersions members. More... | |
| ASPOSE_DLL_EXPORT bool | valueIsSet () const |
| ASPOSE_DLL_EXPORT void | unsetValue () |
| ASPOSE_DLL_EXPORT void | setValue (std::vector< std::shared_ptr< FileVersion > > value) |
Static Public Member Functions | |
| static web::json::value | toJson (const utility::string_t &value) |
| static web::json::value | toJson (const utility::datetime &value) |
| static web::json::value | toJson (std::shared_ptr< HttpContent > value) |
| static web::json::value | toJson (std::shared_ptr< ModelBase > value) |
| static web::json::value | toJson (int32_t value) |
| static web::json::value | toJson (int64_t value) |
| static web::json::value | toJson (double value) |
| static web::json::value | toJson (bool value) |
| static int64_t | int64_tFromJson (web::json::value &val) |
| static int32_t | int32_tFromJson (web::json::value &val) |
| static float | floatFromJson (web::json::value &val) |
| static utility::string_t | stringFromJson (web::json::value &val) |
| static utility::datetime | dateFromJson (web::json::value &val) |
| static double | doubleFromJson (web::json::value &val) |
| static bool | boolFromJson (web::json::value &val) |
| static std::shared_ptr< HttpContent > | fileFromJson (web::json::value &val) |
| static std::shared_ptr< HttpContent > | toHttpContent (const utility::string_t &name, const utility::string_t &value, const utility::string_t &contentType=utility::conversions::to_string_t("")) |
| static std::shared_ptr< HttpContent > | toHttpContent (const utility::string_t &name, const utility::datetime &value, const utility::string_t &contentType=utility::conversions::to_string_t("")) |
| static std::shared_ptr< HttpContent > | toHttpContent (const utility::string_t &name, std::shared_ptr< HttpContent > value) |
| static std::shared_ptr< HttpContent > | toHttpContent (const utility::string_t &name, const web::json::value &value, const utility::string_t &contentType=utility::conversions::to_string_t("application/json")) |
| static std::shared_ptr< HttpContent > | toHttpContent (const utility::string_t &name, int32_t value, const utility::string_t &contentType=utility::conversions::to_string_t("")) |
| static std::shared_ptr< HttpContent > | toHttpContent (const utility::string_t &name, int64_t value, const utility::string_t &contentType=utility::conversions::to_string_t("")) |
| static std::shared_ptr< HttpContent > | toHttpContent (const utility::string_t &name, double value, const utility::string_t &contentType=utility::conversions::to_string_t("")) |
| static int64_t | int64_tFromHttpContent (std::shared_ptr< HttpContent > val) |
| static int32_t | int32_tFromHttpContent (std::shared_ptr< HttpContent > val) |
| static float | floatFromHttpContent (std::shared_ptr< HttpContent > val) |
| static utility::string_t | stringFromHttpContent (std::shared_ptr< HttpContent > val) |
| static utility::datetime | dateFromHttpContent (std::shared_ptr< HttpContent > val) |
| static bool | boolFromHttpContent (std::shared_ptr< HttpContent > val) |
| static double | doubleFromHttpContent (std::shared_ptr< HttpContent > val) |
| static web::json::value | valueFromHttpContent (std::shared_ptr< HttpContent > val) |
| static utility::string_t | toBase64 (utility::string_t value) |
| static utility::string_t | toBase64 (std::shared_ptr< std::istream > value) |
| static std::shared_ptr< std::istream > | fromBase64 (const utility::string_t &encoded) |
Protected Attributes | |
| std::vector< std::shared_ptr< FileVersion > > | m_Value |
| bool | m_ValueIsSet |
File versions FileVersion.
Definition at line 15 of file FileVersions.h.
| ASPOSE_DLL_EXPORT com::aspose::model::FileVersions::FileVersions | ( | ) |
| ASPOSE_DLL_EXPORT com::aspose::model::FileVersions::~FileVersions | ( | ) |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
overridevirtual |
Implements com::aspose::model::ModelBase.
|
overridevirtual |
Implements com::aspose::model::ModelBase.
| ASPOSE_DLL_EXPORT std::vector< std::shared_ptr< FileVersion > > & com::aspose::model::FileVersions::getValue | ( | ) |
FileVersions members.
File versions FileVersion.
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
| ASPOSE_DLL_EXPORT void com::aspose::model::FileVersions::setValue | ( | std::vector< std::shared_ptr< FileVersion > > | value | ) |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
overridevirtual |
Implements com::aspose::model::ModelBase.
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
overridevirtual |
Implements com::aspose::model::ModelBase.
|
overridevirtual |
Implements com::aspose::model::ModelBase.
| ASPOSE_DLL_EXPORT void com::aspose::model::FileVersions::unsetValue | ( | ) |
|
overridevirtual |
ModelBase overrides.
Implements com::aspose::model::ModelBase.
|
staticinherited |
| ASPOSE_DLL_EXPORT bool com::aspose::model::FileVersions::valueIsSet | ( | ) | const |
|
protected |
Definition at line 45 of file FileVersions.h.
|
protected |
Definition at line 46 of file FileVersions.h.


Over £1m of jewels stolen during raid on London home while mother and children present
Police are appealing for information after over £1m of jewels were stolen from a property in London.
Officers were called to a house in Highgate, in the borough of Haringey, on Thursday 14 November after a burglary took place around 5pm.
A number of suspects broke into the property while a woman and her children were home.
The suspects escaped through a first floor window with jewellery, clothes and a large amount of cash.
Detective Inspector Paul Ridley said: “Burglary is an extremely intrusive crime and the effect is often compounded further when the occupants are at home.
"This is an aggravating feature of this case as the victim was present with her young children when the burglars have forced entry, scaling the wall of the mansion and brazenly ransacking the premises."
Images of stolen jewellery which is described as being very rare and of huge sentimental value have been released.
Anyone with information is asked to contact police on 101 or tweet @MetCC quoting reference CAD 6371/14 NOV.
You can also contact the independent charity Crimestoppers 100% anonymously on 0800 555 111.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/algebra.20over.20a.20ring.html ---
@Mario Carneiro Can we do algebra over a ring now? Can we prove that every ring is an Z-algebra? every abelian group is a Z-module?
Why should this be a problem?
We can just define the category of R
-algebras. That shouldn't be hard.
typeclass problems
look, nobody gives a second look at this problem
I haven't looked at it because all my Lean time is currently going to sheaves. But I'm certainly interested in this.
I think that in the case of algebras I would go category-theoretic straight away.
Unfortunately I'm not sure we got enough module refactor yet. As far as I understand, Mario still has to work on getting modules over several base rings to behave nicely
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Kitura-CredentialsGitHub
Plugin for the Credentials framework that authenticate using GitHub
Summary
Plugin for Kitura-Credentials framework that authenticates using the GitHub web login with OAuth2 API.
Table of Contents
Swift version
The latest version of Kitura-CredentialsGitHub requires Swift 4.0 or newer. You can download this version of the Swift binaries by following this link. Compatibility with other Swift versions is not guaranteed.
Example of GitHub web login
This guide assumes basic knowledge of Kitura
app routing.
First, set up the session middleware:
import KituraSession
router.all(middleware: Session(secret: "Very very secret..."))
Create an instance of CredentialsGitHub
plugin and register it with Credentials
framework:
import Credentials
import CredentialsGitHub
let credentials = Credentials()
let gitCredentials = CredentialsGitHub(clientId: gitClientId, clientSecret: gitClientSecret, callbackUrl: serverUrl + "/login/github/callback", userAgent: "my-kitura-app", options: ["scopes": ["user:email"]])
credentials.register(gitCredentials)
Where:
- gitClientId is the Client ID of your app in your GitHub Developer application settings
- gitClientSecret is the Client Secret of your app in your GitHub Developer application settings
- callbackUrl is used to tell the GitHub web login page where the user’s browser should be redirected when the login is successful. It should be a URL handled by the server you are writing.
- userAgent is an optional argument that passes along a User-Agent of your choice on API calls against GitHub. By default,
Kitura-CredentialsGitHub
is set as the User-Agent. User-Agent is required when invoking GitHub APIs. - options is an optional dictionary (
[String: Any]
); the allowable options are listed inCredentialsGitHubOptions
Next, specify where to redirect non-authenticated requests:
credentials.options["failureRedirect"] = "/login/github"
Connect credentials
middleware to handle requests to a protected path on the server, such as /private
:
router.all("/private", middleware: credentials)
router.get("/private/data", handler: { request, response, next in
...
next()
})
And call authenticate
to login with GitHub and to handle the redirect (callback) from the GitHub login web page after a successful login:
router.get("/login/github", handler: credentials.authenticate(gitCredentials.name))
router.get("/login/github/callback", handler: credentials.authenticate(gitCredentials.name))
License
This library is licensed under Apache 2.0. Full license text is available in LICENSE.


Social Media Optimization (SMO)
Forms are tables that users can fill out to send data back to the server. This contains normal content, markup, special elements called controls and labels, after the user is done filling or selecting the form, they complete it by submitting the form to an agent (mail, web server). “The form is then usually submitted to the website and the data is used in some way. Your customer details might be stored in a database for later use, or the website might be updated after you choose a product to view.” 1 With this you need to set up a web server ro process and receive the data.
A HTML form contains one or more widgets, like text fields, select boxes, buttons, checkboxes, or radio buttons, and all of these are related with a label that explains the purpose and the instruction could be clear.
Before starting your code, it is important to plan your form. It is important to remember that if you don’t plan it ahead or if you make a big form you might have the risk to lose users. So it is important to make a useful form that can collect all the data you need and at the same time fast to fill up.
To create a form on HTML you need the elements: <form> </form>, <label>, <input>, <textarea> and <button>. To name the data in a form you need to use the name attribute on each form widget that will collect a specific piece of data.


Only reports if the field assignment is located in an instance or static initializer, and joining it with the field declaration is likely to be safe. In other cases, like assignment inside a constructor, the quick-fix is provided without highlighting, as the fix may change the semantics.
Example:
class MyClass {
static final int intConstant;
static {
intConstant = 10;
}
}
The quick fix moves the assigned value to the field initializer removing the class initializer if possible:
class MyClass {
static final int intConstant = 10;
}
Since 2017.2


Welcome to Matchmaker! Select an Answer From the Drop Down Menu for Each Statement Based on How Much You Personally Agree With Each Statement.
Each Answer Will be Worth a Specific Number of Points to Determine How Compatible You are With Me. The Final Results Will be Calculated by Adding
up Your Score and Representing it Out of 100. Score a 65 or Higher and You May be Considered
a Good match; a Perfect Score Could Land You at Soulmate Status!


--- layout: post title: Visual Radio date: 2005-01-22 00:00:00 category: mobile ---
The BBC on visual radio: ""If you have a Visual Radio enabled handset, when you hear an artist you don't know, or there's a competition or vote that you'd like to participate in, you pull out your handset and with one click you turn on a visual channel parallel to the on-air broadcast you've just been listening to.""


| Interface | Description |
|---|---|
| AView<AModel> |
All Views implement this interface.
|
| Class | Description |
|---|---|
| AModel<V extends AView> |
This is a generic Model class.
|
| BitmapJsonConverter |
Provides custom base64 serialization / deserialization for Bitmaps.
|
| BrowseActivity |
BrowseActivity is responsible for mainly handling the load of the comments.
|
| BrowseView |
BrowswView is responsible for loading the view of the comments.
|
| BrowseView.Holder |
Basic holder for the BrowseView containing comment parameteres.
|
| Cache |
Cache is what is responsible for saving and loading data to and from the
user's device.
|
| CommentController |
The CommentController class is what helps distinguish between a new reply or a new top level
comment.
|
| CommentListModel |
CommentListModel holds the sorting data and the functions to add a comment
within the list.
|
| CommentModel |
CommentModel is the actual model for each and every comment.
|
| CommentSearch |
CommentSearch is used with respect to ElasticSearch and is called upon to help in matching
string queries to/from the server for sorting.
|
| CreateCommentActivity |
Called when a user hits the '+' button at the top of any screen that has one.
|
| EditCommentActivity |
EditCommentActivity is called when a user is in the "My Comments" activity and
selects that he/she wishes to edit a comment by clicking on it.
|
| ElasticSearchResponse<T> |
The ElasticSearchResponse helps in getting the correct source data for each comment.
|
| ElasticSearchSearchResponse<T> |
Responsible for getting the hits to a reference to a comment
and gets the source of each comment from the CommentListController.
|
| GeoTopicsApplication |
This is a collection of singletons.
|
| GraphAdapterBuilder |
Writes a graph of objects as a list of named nodes.
|
| Hits<T> |
Hits returns the score and hits from an ElasticSearch response.
|
| InspectCommentActivity |
This source file holds the methods for the CreateCommentActivity as well as
the EditCommentActivity.
|
| MyCommentsActivity |
Shown when a user clicks on "My Comments" from the start screen of the application
In this activity, the user will be shown all of his/her comments including both top-level and reply comments.
|
| ReplyLevelActivity |
The view you see when you go to view the replies once you click a top level comment and click a reply.
|
| StartActivity |
Contains data for the start screen of the application.
|
| TopLevelActivity |
The view you see when you go to "Browse" from the start screen.
|
| User |
Holds all the data that the individual user whom is using the application creates/modifies.
|


Work Day Scheduler
A simple calendar app for scheduling your work day
09:00am
Save
10:00am
Save
11:00pm
Save
12:00pm
Save
01:00pm
Save
02:00pm
Save
03:00pm
Save
04:00pm
Save
05:00pm
Save


Greetings from Senior Coffee Scramble. The following people would like to grab coffee/tea/food/whatever with you and get to know you better.


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
R
S
T
U
V
I
ic_back_space
- Static variable in class com.kevalpatel.passcodeview.
R.drawable
ic_fingerprint
- Static variable in class com.kevalpatel.passcodeview.
R.drawable
Indicator
- Class in
com.kevalpatel.passcodeview.indicators
Created by Keval Patel on 07/04/17.
Indicator()
- Constructor for class com.kevalpatel.passcodeview.indicators.
Indicator
Indicator(PinView, Rect, Indicator.Builder)
- Constructor for class com.kevalpatel.passcodeview.indicators.
Indicator
Indicator.Builder
- Class in
com.kevalpatel.passcodeview.indicators
init()
- Method in class com.kevalpatel.passcodeview.
BoxFingerprint
init(AttributeSet)
- Method in class com.kevalpatel.passcodeview.
PasscodeView
Initialize the view.
init()
- Method in class com.kevalpatel.passcodeview.
PasscodeView
init()
- Method in class com.kevalpatel.passcodeview.
PatternView
Initialize view.
init()
- Method in class com.kevalpatel.passcodeview.
PinView
Initialize view.
InteractiveArrayList
<
E
> - Class in
com.kevalpatel.passcodeview
Created by Keval Patel on 14/04/17.
InteractiveArrayList()
- Constructor for class com.kevalpatel.passcodeview.
InteractiveArrayList
InteractiveArrayList.ChangeListener
- Interface in
com.kevalpatel.passcodeview
isClickedAnimationRunning
- Variable in class com.kevalpatel.passcodeview.keys.
RectKey
isClickedAnimationRunning
- Variable in class com.kevalpatel.passcodeview.keys.
SquareKey
isDisplayError
- Variable in class com.kevalpatel.passcodeview.indicators.
CircleIndicator
isDisplayError
- Variable in class com.kevalpatel.passcodeview.indicators.
DotIndicator
isDisplayError
- Variable in class com.kevalpatel.passcodeview.patternCells.
CirclePatternCell
isDisplayError
- Variable in class com.kevalpatel.passcodeview.patternCells.
DotPatternCell
isErrorShowing
- Variable in class com.kevalpatel.passcodeview.
PatternView
isFingerPrintBoxVisible
- Variable in class com.kevalpatel.passcodeview.
BoxFingerprint
isFingerPrintEnable()
- Method in class com.kevalpatel.passcodeview.
BoxFingerprint
isFingerPrintEnable()
- Method in class com.kevalpatel.passcodeview.
PasscodeView
isFingerPrintEnrolled(Context)
- Static method in class com.kevalpatel.passcodeview.
Utils
Check if the device has any fingerprint registered?
isIndicatorTouched(float, float)
- Method in class com.kevalpatel.passcodeview.patternCells.
CirclePatternCell
isIndicatorTouched(float, float)
- Method in class com.kevalpatel.passcodeview.patternCells.
DotPatternCell
isIndicatorTouched(float, float)
- Method in class com.kevalpatel.passcodeview.patternCells.
PatternCell
isKeyPressed(float, float)
- Method in class com.kevalpatel.passcodeview.keys.
Key
Check if the key is pressed or not for given touch coordinates?
isKeyPressed(float, float)
- Method in class com.kevalpatel.passcodeview.keys.
RectKey
Check if the key is pressed or not for given touch coordinates?
isKeyPressed(float, float)
- Method in class com.kevalpatel.passcodeview.keys.
RoundKey
Check if the key is pressed or not for given touch coordinates?
isKeyPressed(float, float)
- Method in class com.kevalpatel.passcodeview.keys.
SquareKey
Check if the key is pressed or not for given touch coordinates?
isOneHandOperation()
- Method in class com.kevalpatel.passcodeview.
BoxKeypad
isOneHandOperation()
- Method in class com.kevalpatel.passcodeview.
BoxPattern
isOneHandOperationEnabled()
- Method in class com.kevalpatel.passcodeview.
PatternView
isOneHandOperationEnabled()
- Method in class com.kevalpatel.passcodeview.
PinView
isPatternMatched(PatternPoint[], ArrayList<PatternCell>)
- Static method in class com.kevalpatel.passcodeview.
Utils
Check if the both pattern matches? It uses
PatternPoint.equals(Object)
to match row and column number of both pattern poins.
isPINMatched(int[], ArrayList<Integer>)
- Static method in class com.kevalpatel.passcodeview.
Utils
Compare two arrays of the PIN and check if both pin matches?
isRippleEffectRunning
- Variable in class com.kevalpatel.passcodeview.keys.
RoundKey
isScanning
- Variable in class com.kevalpatel.passcodeview.
FingerPrintAuthHelper
Boolean to know if the finger print scanning is currently enabled.
isScanning()
- Method in class com.kevalpatel.passcodeview.
FingerPrintAuthHelper
isSupportedHardware(Context)
- Static method in class com.kevalpatel.passcodeview.
Utils
Check if the device have supported hardware fir the finger print scanner.
isTactileFeedbackEnable()
- Method in class com.kevalpatel.passcodeview.
PasscodeView
isValidPin(int[])
- Static method in class com.kevalpatel.passcodeview.
Utils
Check if the given pin is valid or not?
A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
R
S
T
U
V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes


The charming adventures of an analyst and his solver.
Using the exponential distribution to interpret votes in a web survey.
Consider this scenario: You run a contest that accepts votes from the general Internet population. In order to encourage user engagement, you record any and all votes into a database over several days, storing nothing more than the competitor voted for, when each vote is cast, and a cookie set on the voter's computer along with their apparent IP addresses. If a voter already has a recorded cookie set they are denied subsequent votes. This way you can avoid requiring site registration, a huge turnoff for your users. Simple enough.
Unfortunately, some of the competitors are wily and attached to the idea of winning. They go so far as programming or hiring bots to cast thousands of votes for them. Your manager wants to know which votes are real and which ones are fake Right Now. Given very limited time, and ignoring actions that you could have taken to avoid the problem, how can you tell apart sets of good votes from those that shouldn't be counted?
One quick-and-dirty option involves comparing histograms of interarrival times for sets of votes. Say you're concerned that all the votes during a particular period of time or from a given IP address might be fraudulent. Put all the vote times you're concerned about into a list, sort them, and compute their differences:
# times is a list of datetime instances from vote records
times.sort(reversed=True)
interarrivals = [y-x for x, y in zip(times, times[1:]]
Now use matplotlib to display a histogram of these. Votes that occur naturally are likely to resemble an exponential distribution in their interarrival times. For instance, here are interarrival times for all votes received in a contest:
This subset of votes is clearly fraudulent, due to the near determinism of their interarrival times. This is most likely caused by the voting bot not taking random sleep intervals during voting. It casts a vote, receives a response, clears its cookies, and repeats:
These votes, on the other hand, are most likely legitimate. They exhibit a nice Erlang shape and appear to have natural interarrival times that one would expect:
Of course this method is woefully inadequate for rigorous detection of voting fraud. Ideally one would find a method to compute the probability that a set of votes is generated by a bot. This is enough to inform quick, ad hoc decisions though.


TODO
Complete online JavaScript course
Jog around the park 3x
10 minutes meditation
Read for 1 hour
Pick up groceries
Complete Todo App on Frontend Mentor
*
All
Active
Completed
Clear Completed


Your email address will not be published. Required fields are marked *
{{ comment.name }} ({{ comment.posted_time }})
{{ comment.name }} >>> {{ comment.reply.name }} ({{ comment.posted_time }})
Leave a message


AS3 LCD Donkee Kong Jr
2006 July 5th by Administrator
click to play. Flash Player 9 required.
)
After i brought those old Game&Watch handhelds home, i started playing them heavily. After being beat into submission hundreds of times i began thinking ‘these games are too damn hard’ – so i put them down and decided to try and recreate one in Actionscript3… here’s the first one i came out with – a remake of Donkey Kong Jr from the widescreen Game&Watch series.
With the previous games i have worked on, i employed a pixel collision detection system to drive game play- but when thinking about LCD games, spaces on the screen are reserved and there is no real overlap of pixels to detected when an enemy runs into a hero, an enemy connects with a projectile, etc. Instead i had to employ a sort-of ‘mother may i’ management system where a call is made from every ‘object’ prior to it’s bitmap update to see if anything is in between where what block it’s in and what block needs to be rendered next. The development was based mainly on Passive Matrix LCDs.
Ultimately how it is put together is by loading a graphics sheet with all the states for each ‘player’ and then basing it’s rendered state upon game interaction and a list of state ‘matrices’. On each ‘allowance’ of movement the bitmapdata is cleared and redrawn with a new state. And in the case of the enemies, based on your progression through the game, the ‘allowance’ timing is sped up.
The biggest thing i have gained from working this through is the beauty of the new Timer class. With the introduction of BitmapData in Flash8 As2 i began rethinking how i was developing, and now with the Timer class i’m doing it again. I loved onEnterFrame for so long, but that just wasn’t gonna hack it for this project… and i’m glad it didn’t.
I kept the architecture pretty open for easy adaptation and extension so that i could make more of these LCD games with ease, but i think i have to step away for a bit. Sound would be a good addition to this and i plan to do a little work on that, but i’m getting pretty busy.
Enough talk, enjoy the game and keep in mind that this is a rough prototype, so you may encounter a bug or two


An innovative approach to improving consulting skills for GP's, GP Registrars and medical students
Find Out MoreReal General Practice was developed by Dr Keith Birrell a GP trainer working in Sunderland in the UK who has been teaching and training since 1994
MoreAccess our clinician tools
Access our patient tools
Read our disclaimer
Ready to start your next project with us? That's great! Give us a call or send us an email and we will get back to you as soon as possible!
123-456-6789