You can use flexdashboard to publish groups of related data visualizations as a dashboard. A wide variety of components can be included in flexdashboard layouts, including:
Interactive JavaScript data visualizations based on htmlwidgets.
R graphical output including base, lattice, and grid graphics.
Tabular data (with optional sorting, filtering, and paging).
Value boxes for highlighting important summary data.
Gauges for displaying values on a meter within a specified range.
Text annotations of various kinds.
Flexible options for component layout are available and dashboards with many components can be organized into multiple pages. The flexdashboard layout system also adapts itself intelligently for display on mobile devices.
There are also several ways to add interactivity to flexdashboards. You can use htmlwidgets to add client-side JavaScript interactivity (data tips, panning, zooming, etc.) and Shiny to build fully custom interactions in R.
By default, level 2 markdown headers (------------------
) within dashboards define columns, with individual charts stacked vertically within each column. Here’s the definition of a two column dashboard with one chart on the left and two on the right:
You can also choose to orient dashboards row-wise rather than column-wise, by specifying the orientation: rows
option. For example, this layout defines two rows, the first of which has a single chart and the second of which has two charts:
By default flexdashboard charts are laid out to automatically fill the height of the browser. This works well for a small number of vertically stacked charts, however if you have lots of charts you’ll probably want to scroll rather than fit them all onto the page. You can control this behavior using the vertical_layout
option. Specify fill
to vertically re-size charts so they completely fill the page and scroll
to layout charts at their natural height, scrolling the page if necessary.
For example, the following layout includes 3 charts and requests that the page scroll as necessary to accommodate their natural height:
If you have several components you’d like to display within a row or column then rather than attempting to fit them all on screen at the same time you can lay them out as a tabset. This is especially appropriate when one component is primary (i.e. should be seen by all readers) and the others provide secondary information that might be of interest to only some readers.
In many cases tabsets are a better solution than vertical_layout: scroll
for displaying large numbers of components since they are so straightforward to navigate.
To layout a row or column as a tabset you simply add the {.tabset}
attribute to the section heading. For example, the following code lays out the second column in tabset:
Rows can also be laid out as a tabset as illustrated here:
Note that here we also apply the {.tabset-fade}
attribute which results in a fade in/out effect when switching tabs.
The htmlwidgets framework provides high-level R bindings for JavaScript data visualization libraries. Charts based on htmlwidgets are ideal for use with flexdashboard because they can dynamically re-size themselves, so will nearly always fit perfectly within the bounds of their flexdashboard containers.
Available htmlwidgets include:
Leaflet, a library for creating dynamic maps that support panning and zooming, with various annotations like markers, polygons, and popups.
dygraphs, which provides rich facilities for charting time-series data and includes support for many interactive features including series/point highlighting, zooming, and panning.
Plotly, which via it’s ggplotly interface allows you to easily translate your ggplot2 graphics to an interactive web-based version.
rbokeh, an interface to Bokeh, a powerful declarative Bokeh framework for creating web-based plots.
Highcharter, a rich R interface to the popular Highcharts JavaScript graphics library.
visNetwork, an interface to the network visualization capabilities of the vis.js library.
There are over 30 packages on CRAN which provide htmlwidgets. You can find example uses of several of the more popular htmlwidgets in the htmlwidgets showcase and browse all available widgets in the gallery.
 For example, the following is a simple dashboard definition that includes 3 dygraphs time-series charts:
Note that one disadvantage of htmlwidgets is that they embed their data directly in their host web page, so may encounter performance problems for larger datasets. For larger dataset sizes the use of standard R graphics (described below) may be preferable.
You can use any chart created with standard R graphics (base, lattice, grid, etc.) with flexdashboard.
Within dynamic (Shiny) dashboards these charts are automatically sized to fit within their dashboard containers so long as they are wrapped within a call to renderPlot.
Within static dashboards standard R graphics are also scaled (with aspect ratios preserved so there is no stretching or distortion). However, since these charts are PNG images it’s not possible for them to seamlessly fill the bounds of their container. The following section provides tips on how to get the best possible fit for a given graphic.
When creating static (non-Shiny) dashboards containing standard R graphics it’s critical to define knitr fig.width
and fig.height
values as close as possible to what they’ll actually be on the page. This enables them to fit into their layout container as closely as possible when the dashboard is laid out.
Here’s an example of a row based layout that includes 3 charts from R base graphics:
We’ve specified an explicit fig.height
and fig.width
for each chart so that their rendered size fits their flex container as closely as possible. Note that the ideal values for these dimensions typically need to be determined by experimentation.
You can include tabular data within flexdashboards in one of two ways:
As a simple tabular display.
As a DataTable that includes sorting, filtering, and pagination.
A simple table is ideal for smaller numbers of records (i.e. 40-50 or less). The code required for simple tables differs depending on whether you are building a static or dynamic (Shiny-based) flexdashboard. For static dashboards, you should use the knitr::kable
function to output your dataset, for example:
For Shiny based dashboards you should use the shiny::renderTable
function, for example:
This ensures that the tabular display is updated when the inputs upon which it depends change.
The DT package (an interface to the DataTables JavaScript library) can display R matrices or data frames as interactive HTML tables that support filtering, pagination, and sorting.
Note that if you want to use DataTables with flexdashboard you should install the very latest version of the DT (v0.2) from CRAN (it contains some changes required for flexdashboard compatibility):
install.packages("DT")
To include a DataTable you use the DT::datatable
function:
Note that we specified the bPaginate = FALSE
option. This is appropriate for smaller datasets where scrolling provides a comfortable way of navigating through the data.
If you have a large dataset where you want to enable pagination, you should be sure to specify the pageLength
option to show more than the default 10 rows of your dataset per page:
To include a DataTable within a Shiny flexdashboard you need to be sure to wrap the datatable output in DT::renderDataTable
(so that it is updated when inputs it depends on change). For example:
On desktop and tablet displays, both the Simple Table and Data Table components will fit exactly within the bounds of their flexdashboard container and provide a scroll bar to view records that don’t fit on screen. However, on mobile phones both components will never use a scroll bar (as that would compete with scrolling the overall dashboard). Rather, on mobile phone layouts:
The Simple Table will display all available records; and
The Data Table will use pagination (i.e. force bPaginate = TRUE
).
Sometimes you want to include one or more simple values within a dashboard. You can use the valueBox
function to display single values along with a title and optional icon. For example, here are three side-by-side sections each displaying a single value:
Here is the code which was used to generate these value boxes:
The valueBox
function is called to emit a value and specify an icon (see Icon Sets below for details on available icons).
The third code chunk (“Spam per Day”) makes the background color of the value box dynamic using the color
parameter. Available colors include “primary”, “info”, “success”, “warning”, and “danger” (the default is “primary”). For custom colors you can also specify any valid CSS color (e.g. “#ffffff”, “rgb(100,100,100)”, etc.).
If a valueBox
displays a value for which additional detail is available on another dashboard page you can enable navigation to the other page via the href
parameter. For example, if you have a page with the anchor “#details” you could link a value box to it as follows:
You can specify icons from three different icon sets:
When referring to an icon you should use it’s full name including the icon set prefix (e.g. “fa-github”, “ion-social-twitter”, “glyphicon-time”, etc.).
To include a value box within a Shiny flexdashboard you need to be sure to wrap the value box output in renderValueBox
(so that it is updated when inputs it depends on change). For example:
Gauges display values on a meter within a specified range. For example, here is a set of 3 gauges:
Here is the code used to generate these gauges:
There are a few things to note about this example:
The gauge
function is used to output a gauge. It has three required arguments: value
, min
, and max
(these can be any numeric values).
You can specify an optional symbol
to be displayed alongside the value (in the example “%” is used to denote a percentage).
You can specify a set of custom color sectors
using the gaugeSectors
function. By default the current theme’s “success” color (typically green) is used for the gauge color. The sectors
option enables you to specify a set of three value ranges (“success”, “warning”, and “danger”) which cause the gauge’s color to change based on it’s value.
If a gauge
displays a value for which additional detail is available on another dashboard page you can enable navigation to the other page via the href
parameter. For example, if you have a page with the anchor “#details” you could link a gauge to it as follows:
To include a gauge within a Shiny flexdashboard you need to be sure to wrap the gauge output in renderGauge
(so that it is updated when inputs it depends on change). For example:
If you need to include additional narrative or explanation within your dashboard you can do so in the following ways:
You can include content at the top of the page before dashboard sections are introduced.
You can define dashboard sections that don’t include a chart but rather include arbitrary content (text, images, equations, etc.)
For example, the following dashboard includes some content at the top and a dashboard section that contains only text:
Each component within a dashboard includes optional title and notes sections. The title is simply the text after the level 3 (###
) section heading. The notes are any text prefaced with >
after the code chunk which yields the component’s output. For example:
You can exclude the title entirely by applying the .no-title
attribute to a section heading, for example:
To create an ideal layout for your dashboard, it’s important to understand how the size of individual charts is determined. This section describes the layout algorithm and the various ways you can tweak its behavior.
The width of charts in flexdashboard is ultimately determined by the width of the browser. If your layout has a single column then charts will occupy the full width of the browser. If your layout has multiple columns then the columns will split the available width evenly (unless overridden via the data-width
attribute as described below).
The height of charts is determined in one of two ways depending on whether your dashboard is configured to fit itself into the vertical confines of the page (vertical_layout: fill
) or to scroll (vertical_layout: scroll
):
For dashboards that fill the page the height of charts will be determined by the height of the browser, with vertically stacked charts splitting the available height evenly (unless overridden via the data-height
attribute as described below).
For scrolling dashboards, the height of charts will be determined by the knitr fig.height
option, which defaults to 5 inches (480 pixels).
The nature of the charts within your dashboard (desired emphasis, visualization types, etc.) will often dictate that you’ll want to change the default sizing behavior. If no size attributes are specified then the relative size of each chart will be determined by it’s knitr figure size (this is 6 x 4.8 inches or 576 x 460 pixels by default).
You can modify the default sizing behavior by applying the data-width
and data-height
attributes to rows, columns, or even individual charts. These attributes establish the relative size between charts laid out in the same dimension (horizontal or vertical).
This example use the data-height
attribute to dictate a larger vertical size for the first row, resulting in a layout that more clearly emphasizes the first chart.
This example is a variation of the single-column layout demonstrated above with a data-height
attribute applied to the first chart:
By default flexdashboard places 8 pixels of padding around the edges of charts. For some chart types this might not be ideal. In this case you can either add the .no-padding
attribute to specify no padding at all or the data-padding
attribute to specify a specific number of pixels. For example:
Dashboard layout is done using the browser flexbox engine, which alters its items’ width and/or height to best fill the available space on any display device. A flexbox layout expands items to fill available free space, or shrinks them to prevent overflow.
The implication of this is that chart dimensions established via either knitr figure sizes or data-width
and data-height
attributes are used to establish relative sizes between charts within the same horizontal or vertical dimension as opposed to absolute sizes (this corresponds to the flex-grow
and flex-shrink
CSS properties).
If you have more than a handful of charts you’d like to include in a dashboard, you may want to consider dividing the dashboard into multiple pages. To define a page just use a level 1 markdown header (==================
). Each page you define will have its own top-level navigation tab.
For example, this code creates a dashboard with two pages, each containing two charts:
Note that in this example both pages use the default “columns” orientation. It is however possible to specify a distinct orientation for an individual page. This is done by adding the data-orientation
attribute to the header of the page you want to change the orientation of. For example:
You can form links directly to dashboard pages using markdown link syntax: [Page 2]
. To use custom link text you can also create a link via the page’s anchor: [Page Two](#page-2)
. Both styles of page linking are demonstrated in this example:
The typical means of navigating between pages is the global navigation bar as described above. However, if you’ve already provided prominent navigational links to pages you may wish to exclude them from the navigation bar entirely. This can be accomplished by adding the {.hidden}
attribute to the page you want to hide from the navigation bar. For example:
You can add an icon to the navigation menu for a page using the data-icon
attribute. For example, the following specifies a navigation bar icon for each of two pages:
You can specify icons for navigation bar items from three different icon sets:
When referring to an icon you should use it’s full name including the icon set prefix (e.g. “fa-github”, “ion-social-twitter”, “glyphicon-time”, etc.).
Storyboards are an alternative to the row and column based layout schemes described above that are well suited to presenting a sequence of data visualizations and related commentary.
To create a storyboard layout you do the following:
Add the storyboard: true
option to the dashboard.
Include a set of level 3 (###
) dashboard components. Each component will be allocated it’s own frame in the storyboard, with the section title used as the navigation caption.
The basics of creating storyboards are explained below. For a more complete example, see the HTML Widgets Showcase storyboard.
The following code creates a storyboard with 3 frames:
Note that the level 3 section titles (e.g. “Frame 1”) will be used as navigation captions. These captions should provide a one or two sentence summary of the frame, so will typically be longer than illustrated here.
You can layout one or more pages of a dashboard as storyboards and then use traditional row and column layout on the other pages. To do this, you exclude the storyboard: true
option and instead add the {.storyboard}
class to pages you want laid out as storyboards.
For example, the following dashboard includes a storyboard on the first page (“Analysis”) as well as another page (“Details”) that uses conventional layout:
You may wish to add commentary alongside the frames in your storyboard. To do this you add a horizontal rule separator (***
) after the main body of frame content. Content after the separator will appear in a commentary sidebar to the right. For example:
Note that the second frame includes a data-commentary-width=400
attribute. By default the width of the commentary sidebar is 300 pixels, you can use data-commentary-width
to modify this on a per-frame basis.
The flexdashboard layout system adapts itself intelligently for display on mobile devices. This section describes layout behavior for various screen sizes as well as some guidelines for ensuring that your dashboards work well on smaller screens.
The layout of dashboard components for medium sized mobile screens (e.g. tablets) is the same as for larger desktop screens (any screen with width greater than 768 pixels is considered a medium screen).
Rows and columns are allocated using the default figure sizes and respect the relative proportions established via the use of data-width
attributes. The only exception are sidebars, which are reduced to 220 pixels wide whenever the screen is less than 993 pixels wide.
For mobile phones (any screen less than or equal to 768 pixels wide) flexdashboard uses special layout behavior. Since these screens don’t generally have the width to show multiple side-by-side columns, all dashboard components are “flattened” into one single column layout.
In addition, some flexdashboard components have special behavior to adapt themselves to smaller mobile screens:
By default R graphics are rendered twice, once at their natural fig.width
and fig.height
, and once at a mobile-optimized size (3.75 x 4.8 inches). When displaying on a mobile phone in portrait orientation the mobile size is used (this can be controlled via the fig_mobile
option).
Simple tables always show all of their rows (this is so that scrolling the table doesn’t interfere with scrolling the mobile display).
DataTables always use pagination (again, so that scrolling the DataTable doesn’t interfere with scrolling the overall display).
If certain components of your dashboard don’t work well on smaller mobile devices you can exclude them by applying the {.no-mobile}
class attribute to a dashboard section. For example, this dashboard hides it’s second component on mobile devices:
It’s also possible to create a mobile-specific version of a given dashboard component that will be used in place of the default version. You can do this by creating two identically titled sections and applying the {.mobile}
class attribute to one of them. For example:
A variety of themes are available to modify the base appearance of flexdashboard. Available themes include:
The “cosmo” theme is used when “default” is specified. These themes are all based on the themes available in the R Markdown package (which are in turn based on Bootswatch themes).
Use the theme
option to specify an alternate theme:
If you are looking for a theme that embeds well inside another content frame (e.g. one that doesn’t use such a strong color for the navigation bar) then the “bootstrap” theme is a good choice.
You can customize the various CSS styles used in flexdashboard by including a stylesheet via the css
option. For example:
Note that the base CSS styles are defined both the active Bootswatch theme as well as in the flexdashboard specific stylesheets found here: https://github.com/rstudio/flexdashboard/tree/feature/logo-and-favicon/inst/rmarkdown/templates/flex_dashboard/resources
You can specify a logo image and/or favicon for your dashboard using the logo
and favicon
options, respectively. For example:
The logo will be placed at the far left of the dashboard navigation bar. No scaling is performed on the logo image, so it should fit exactly within the dimensions of the navigation bar (48 pixels high for the default “cosmo” theme, other themes may have slightly different navigation bar heights).
The Shiny page describes how to create dashboards that enable viewers to change underlying parameters and see the results immediately, or that update themselves incrementally as their underlying data changes.
The Layouts page includes a variety of sample layouts which you can use as a starting point for your own dashboards.
The Examples page includes several examples of flexdashboard in action (including links to source code if you want to dig into how each example was created).
Federal Center for Technological Education of Minas Gerais.
Social Links
You can include links to social sharing services via the
social
option. For example, the following dashboard includes Twitter and Facebook links as well as a drop-down menu with a more complete list of services:The
social
option can include any number of the following services: “facebook”, “twitter”, “google-plus”, “linkedin”, and “pinterest”. You can also specify “menu” to provide a generic sharing drop-down menu that includes all of the services.


Status
public enum Status : CCCryptorStatus, CustomStringConvertible, Error
Links the native CommonCryptoStatus enumeration to Swiftier versions.
-
Successful
Declaration
Swift
case success
-
Parameter Error
Declaration
Swift
case paramError
-
Buffer too Small
Declaration
Swift
case bufferTooSmall
-
Memory Failure
Declaration
Swift
case memoryFailure
-
Alignment Error
Declaration
Swift
case alignmentError
-
Decode Error
Declaration
Swift
case decodeError
-
Unimplemented
Declaration
Swift
case unimplemented
-
Overflow
Declaration
Swift
case overflow
-
Random Number Generator Err
Declaration
Swift
case rngFailure
-
Converts this value to a native
CCCryptorStatus
value.Declaration
Swift
public func toRaw() -> CCCryptorStatus
-
Obtain human-readable string from enum value.
Declaration
Swift
public var description: String { get }
-
Create enum value from raw
CCCryptorStatus
value.Declaration
Swift
public static func fromRaw(status: CCCryptorStatus) -> Status?


Tuesday's Paper Talk: Latest football gossip and transfer rumours including Pochettino, Maguire, Zakaria and Benitez
by Sporting LifeThe future of Tottenham's Mauricio Pochettino and West Ham's Manuel Pellegrini dominate Wednesday's football rumour mill, with is all summed up in Paper Talk.
DAILY TELEGRAPH
- Mauricio Pochettino has held talks with chairman Daniel Levy over his Tottenham future as players at the club brace themselves for a managerial change.
DAILY STAR
- Everton turned down the chance to sign Harry Maguire and Andy Robertson in a double deal, as well as rejecting RB Salzburg striker Erling Braut Haaland.
DAILY MIRROR
- West Ham will turn to Rafael Benitez if they decide to part company with Manuel Pellegrini.
DAILY MAIL
- Manchester United expect to bring in up to £67m less than they did last year after failing to qualify for the Champions League.
- Gareth Southgate will embark on a fact-finding mission to Qatar next month - a move signalling the England manager's intention to remain in charge beyond Euro 2020.
- Manchester City are ready to draw level financially with rivals United thanks to a £650m Puma kit deal.
- Manchester United could land Bruno Fernandes in January with Sporting Lisbon needing to raise funds to clear debts of around £57m.
- Denis Zakaria's agent says his client will not be leaving Borussia Monchengladbach in January after interest from Arsenal and Manchester United.
- Chelsea missed out on Sergio Aguero before Manchester City signed him after Roman Abramovich baulked at spending £40m...months before buying Fernando Torres for £50m.
- Barcelona are planning a double swoop for Chelsea winger Willian and Napoli midfielder Fabian Ruiz when their contracts expire this summer.
THE SUN
- Emre Can has expressed his frustrations over a lack of playing time at Juventus amid talks of a move away from the club.
- Barcelona have rejected a £13m bid from a Premier League side for playmaker Ivan Rakitic, Spanish reports claim.
- Juventus and Inter have joined race for on-loan Manchester United ace Chris Smalling as Roma haggle over his £15m transfer fee.
- Chelsea will battle Liverpool for Genk midfielder Sander Berge if their transfer ban is lifted.
DAILY EXPRESS
- Arsenal will not look to recruit a centre-back in the January transfer window despite their defensive woes under Unai Emery.
- Manchester United executive vice-chairman Ed Woodward is willing to pass on Mario Mandzukic in order to pursue a January deal for Erling Braut Haaland.
THE TIMES
- Manchester United will target the Europa League in earnest this season with the ambition of qualifying for Fifa's new Club World Cup.
SCOTTISH SUN
- Swansea and Stoke City want Celtic ace Jonny Hayes as his Parkhead contract ends in the summer.
DAILY RECORD
- Alan Irvine is a contender to become Hearts' new manager or sporting director after being recommended by Steven Naismith.
- John Potter could become Jack Ross' assistant after Sunderland boss Phil Parkinson admitted there had been contact with Hibs.
OTHER
- Ed Woodward has reaffirmed that Manchester United have a clear recruitment vision ahead of the January transfer window opening. (Manchester Evening News)
- Pep Guardiola is happy in Manchester and under contract at Manchester City until 2021, his agent has reiterated. (Manchester Evening News)
- Newcastle United midfielder Sean Longstaff is not a 'key target' for Manchester United, according to reports. (Newcastle Chronicle)
- West Brom are assessing whether to make Chris Willock's loan move permanent - with the club having the option to buy the winger in January. (Express & Star)
- West Brom will consider selling England Under-20 defender Nathan Ferguson in January if the 19-year-old does not agree an extension to his present deal, which expires this summer. (Express and Star)


Any 1 (one) challenger which completes the challenge shall be entitled to 1 (one) paid dinner at Fogo de Chao Brazillian Steakhouse by the other challenger(s).
This challenge was accepted and shaken upon in person on October 4th, 2018 between the 2 (two) parties, Marlon and Rainier at NEIU campus.
A pull up is defined as a pronated grip on an overhead bar and activating the muscles to pull the body up to the bar with the chin going over.
This gentleman likes to rock climb and drink whiskey in his spare time.
This hard worker likes to spend time rock climbing and walking along the beach.


{% extends "layouts/full.html" %}
{% load pipeline %}
{% block extra_head %}
{% stylesheet 'bulk' %}
{% endblock %}
{% block title %}Bulk data{% endblock %}
{% block meta_description %}Caselaw Access Project Bulk Access{% endblock %}
{% block top_section_style %}bg-white{% endblock %}
{% block row_style %}bg-white{% endblock %}
{% block explainer %}
Our bulk data files contain the same information that is available
via our API,
but are much faster to download if you want to interact with a large number of cases. Each file contains
all of the cases from a single jurisdiction or reporter.
See docs
{% endblock %}
{% block sidebar_menu_items %}
{% if exports.public %}
The following jurisdictions are available for download under your scholarly research agreement. Click a link to download.
{% include "includes/download_list.html" with zips=exports.private %} {% elif request.user.harvard_access and not request.user.harvard_ip %}You will have access to bulk data when accessing this page from a Harvard IP address.
{% else %}Bulk downloads of the remaining jurisdictions are freely available to research scholars. To request access, please log in, visit your account page, and click "Request unlimited research access."
For more information about our access limits, or details on requesting bulk data for commercial use, see the Access Limits section of our API documentation.
{% endif %} {% endblock %}


Hi [[name]],
Please follow this link to confirm you want to register for this event.
You can also copy and paste the following link in your browser:
[[url]]


A Runing Game
问题描述 :
HDU hosts sporting meeting every year. One of the most exciting events is the 10000M-running.During the match many students are running on the track. So, how about the rank list now?As we know, in a running , we rank the player according to the length everyone has passed . So if one player run 400M(one lap) farther than another player , it looks like they are running at the same position on the track , but the rank of the former is much better than the latter. Now given everyone’s position on the track , and one rank list , can you tell me whether the rank list is possible.
输入:
The first line of input gives the number of cases, T (at most 110). the first line of each case has two intergers, n,m. (1 <= n <= 100,1 <= m <= 40000,n <= m),represents there’re n players in the m-meter running.
then n lines describe every player.Each line have two intergers , Xi , Ri .Representing the i-th player is running at xi[0 , 399] meter in his recent lap, and ranks Ri in the ranklist .And the data make sure that no pair of the students have the same Xi or Ri. And the start point is at 0 in their first lap.
then n lines describe every player.Each line have two intergers , Xi , Ri .Representing the i-th player is running at xi[0 , 399] meter in his recent lap, and ranks Ri in the ranklist .And the data make sure that no pair of the students have the same Xi or Ri. And the start point is at 0 in their first lap.
输出:
The first line of input gives the number of cases, T (at most 110). the first line of each case has two intergers, n,m. (1 <= n <= 100,1 <= m <= 40000,n <= m),represents there’re n players in the m-meter running.
then n lines describe every player.Each line have two intergers , Xi , Ri .Representing the i-th player is running at xi[0 , 399] meter in his recent lap, and ranks Ri in the ranklist .And the data make sure that no pair of the students have the same Xi or Ri. And the start point is at 0 in their first lap.
then n lines describe every player.Each line have two intergers , Xi , Ri .Representing the i-th player is running at xi[0 , 399] meter in his recent lap, and ranks Ri in the ranklist .And the data make sure that no pair of the students have the same Xi or Ri. And the start point is at 0 in their first lap.
样例输入:
2 3 400 100 1 49 2 28 3 3 800 100 1 150 2 154 3
样例输出:
YES NO
#include <algorithm> #include <iostream> #include <cstring> #include <cstdio> #include <cstring> #include <cstdlib> using namespace std; #define MAXN 110 int t , n , m; int flag; int x[MAXN] , r[MAXN]; int tmp_x[MAXN] , tmp_r[MAXN];//存储排序后的位置以及排名 //查找哪一个比它前面的大 int search(){ for(int i = 1 ; i < n ; i++){ if(tmp_x[i] > tmp_x[i-1]) return i; } return 0; } //处理函数 void solve(){ int k; memset(tmp_x , 0 , sizeof(tmp_x)); memcpy(tmp_r , r , sizeof(r)); sort(tmp_r , tmp_r+n);//先排序 for(int i = 0 ; i < n ; i++){ for(int j = 0 ; j < n ; j++){ if(tmp_r[i] == r[j]){ tmp_x[i] = x[j] ; break;//tmp_x数组赋值 } } } while(k = search()){ for(int i = 0 ; i < k ; i++) tmp_x[i] += 400;//前面人加400 } if(tmp_x[0] <= m) flag = 1;//判断是否不大于m即可 } //主函数 int main() { //freopen("input.txt" , "r" , stdin); scanf("%d" , &t); while(t--){ memset(x , 0 , sizeof(x)); memset(r , 0 , sizeof(r)); scanf("%d%d" ,&n , &m); for(int i = 0 ; i < n ; i++) scanf("%d%d" , &x[i] , &r[i]); flag = 0 ; solve(); if(flag) printf("YES\n"); else printf("NO\n"); } return 0; }
(adsbygoogle = window.adsbygoogle || []).push({});
海边和内陆有可比性吗
换句话说，A[k/2-1]不可能大于两数组合并之后的第k小值，所以我们可以将其抛弃。
应该是，不可能小于合并后的第K小值吧
找bug好专业的说
真考人啊
This write-up presents the gentle in which we can notice the fact. this is extremely wonderful one and gives in depth info.
The site You have write is very nicely prepared and quite insightful thanks for nice posta?|
#pragma pack(2) 这个用法太坑爹
以了解 想問為甚麼 Tbl[6001] = {1} 初始化都是1
為何不是Tbl[0]=1 其他為0
抱歉，确实是弄错了，原来的代码是错误的，删掉了
这种题解就相当于直接贴代码了，，想看的是思路
怎么输入两个0程序还没退出
分析的很专业！
换句话说，A[k/2-1]不可能大于两数组合并之后的第k小值，所以我们可以将其抛弃。
应该是，不可能小于合并后的第K小值吧
顺利测试通过了，多谢
有一点问题。。后面动态规划的程序中
int dp[n+1][W+1];
会报错 提示表达式必须含有常量值。该怎么修改呢。。


Profile
Registration
Sign in
You can sign in with social
Your name
Enter right name
E-mail
Enter right email
Phone
Enter right phone
I accept the terms of the offer of
the privacy policy
Not checked
Registration
Sign in


A useful method of telling when a certain disaster/event happened is that all of the clocks have stopped at the same time. This can also happen to individual time pieces that have been damaged. May be a cause of Clock Discrepancy.
Power cuts can be neatly illustrated with a digital clock flashing '12:00' or '00:00'.
Stopped clocks are, surprisingly, often correct. Twice a day, in fact. For a related trope, see Dumbass Has a Point.
See also Race Against the Clock, Right on the Tick, and 24-Hour Trope Clock.
Examples:
open/close all folders
Anime & Manga
- In Maison Ikkoku, the eponymous apartment building's clock tower always reads 10:25.
Audio Drama
- In the Big Finish U.N.I.T. drama Time Heals, all the watches on a crashed train stopped at 11:30, even though the crash happened at eleven o'clock ... because the train was half an hour further up the track than it should have been. This is the first clue that someone is mucking around with time.
Comic Books
- The Grim Adventures of Billy & Mandy story "Time Waits For No Mandy" (Cartoon Network Block Party #56, DC Comics) has Mandy—who hates celebrating her birthday—tricking Father Time into going on vacation. It causes a loop in time to the point where it becomes monotonous. Grim, Billy and Mandy try to find a way to get Father Time back on the job.
Film
- In Pan's Labyrinth, at one point it is implied that Captain Vidal's pocketwatch originally belonged to his father, which the latter broke at the time of his death so it would freeze at that time in order to show his son "How a brave man dies" and later Vidal had it repaired out of spite. As Vidal is about to be killed by the rebels he takes out his watch presumably to break it again and asks that his son be told the time of his death only for Mercedes to cut him off to say "He won't even know [his] name" followed by her brother shooting him.
- The War of the Worlds (1953). After the Martians use their heat ray for the first time, all the watches of the people in the nearest time stop. When this happens, the people notice that all of the watches stopped at the same time.
- In Chinatown, Jack places a watch under the car of the person he's tailing. That way he could know at what time he left by the time the watch was run over.
- In Triangle, the clocks on board the Ghost Ship are stuck at 8:17 a.m. signifying the time of the car accident that set everything in motion. Same goes for the heroine's wrist watch.
- Throughout The Machinist the hero will notice when it is 1:30. At the airport the "local" clock is frozen at 1:30 and flickers back and forth between seconds. The reason is revealed in a flashback sequence towards the end when we see that the fateful hit and run happens at 1:30 pm. The frozen clock time is a symbol for the hero being stuck in the past since this traumatic event.
- Back to the Future uses this with a strong justification: in order to generate the power necessary to send the Delorean back to the future, Doc and Marty use the latter's knowledge of the future to get the car to the exact spot needed: the clock tower, which was struck by lightning at a very specific time, which everyone knows of because the clock stopped working at that exact moment.
- In Godzilla (2014), Serizawa carries a pocket watch stopped at 8:15 AM, August 6th, 1945. It belonged to his father, implying he experienced the Hiroshima bombing.
- In Picnic at Hanging Rock the teachers and coach drivers pocket watches stop shortly before Miranda and the other students disappear.
- GoldenEye: As they first meet, Natalya Simonova tries to deny that she survived the GoldenEye's EMP attack at the Severnya Station where she worked, but James Bond points out how her watch is frozen on the time the attack took place.
Literature
- The Quiet Earth. When John Hobson wakes up he finds that his watch has stopped at 6:12. As he explores the deserted world he finds that all watches and clocks have also stopped at 6:12.
- Agatha Christie used it, of course.
- In "At the Crossroads", one of her Mr Quin stories, it's one of the stock detective-story elements faked by the murderer to make himself look innocent.
- And in Murder on the Orient Express, this was again faked.
- In The Clocks, the body was found near to 4 clocks that were stopped at 4:13, even though it was found at 3 PM. However, the clocks had no real significance to the plot, and were only there to serve as a Red Herring.
- In Great Expectations, Miss Havisham's clocks are all stopped at 8:40 — the exact moment her groom-to-be jilted her.
- The Hatter's pocket watch in Alice's Adventures in Wonderland doesn't tell the time, but does tell the date. (Unfortunately, it's two days slow.) This may have something to do with the fact that, according to him, Time is angry at him for "murdering the time" while singing at a concert, causing the clock to never change for him and his friends.
- The time of Big Bad's escape from the authorities in Never Send Flowers is determined by the broken wristwatch on one of the policemen set to guard him.
- In the first Artemis Fowl book, the title character realizes that the fairies have put his mansion in a containment field when he notices his watch has stopped, especially since it's designed to sync up to a computer that keeps the exact Greenwich Mean Time.
- Muldoon notices one in Jurassic Park when he conducts a Sherlock Scan of the scene of the first Tyrannosaurus rex attack. The fact that he finds a child's watch with a smashed face but an intact strap means that it was damaged during the attack and Tim (the child wearing it) removed it afterwards, meaning that he's still alive. The footprints leading away from the scene confirm Muldoon's hunch.
Live-Action TV
- A stopped watch used to be a common method of discerning time of death when the cause of death was a fall from a great height. This was abused in at least one episode of Midsomer Murders to make a murder look like a suicide.
- As with Midsomer Murders, this was also used in Murder, She Wrote where a broken clock in a struggle indicates when the murder took place. The struggle was actually manufactured, and the clock set forward several hours before being smashed in order to give the murderer an alibi.
- A minor plot point in Ashes to Ashes (2008). Whenever Drake asks Keats for the time, he gives her the same time: the minute Drake died.
- One episode of Columbo involved the time of death being established by a broken watch. Columbo figured the watch must have been planted on the victim's body with the time pre-set, because he was a tough sportsman who wouldn't have wanted to be seen dead wearing such a wimpy, fragile timepiece.
- At the end of the multi-part episode of Lois & Clark that involved Clark being lost in time, the exact time of his departure is needed to save him. Good thing said departure involved an explosion that damaged the Big Bad's watch.
- The Twilight Zone episode "Where is Everybody?" depicts a man wandering in an empty town. In one building, he finds a broken clock. The implication is that the clock must have stopped at whatever time disaster struck, scattering the inhabitants. We later learn that he broke the clock himself in his attempt to escape a space simulation chamber.
- In the Doctor Who episode "The Wedding of River Song", every single clock on earth is stopped at 5:02pm on April 22, 2011, because time itself is broken by River refusing to kill the Doctor, which was a fixed point in time.
- Also, in "The Visitation", Tegan has the following to say when the Doctor's latest attempt to get her to Heathrow Airport ends with the TARDIS landing in the right place, but in 1666:
Call yourself a Time Lord? A broken clock keeps better time than you do! At least it's accurate twice a day - which is more than you ever are!
- A broken clock provides a sign of trouble in "The Girl In The Fireplace" ... not because of the time it displays, but because the fact it is broken reveals that the Clockwork Droids are nearby, and broke it so that their own internal ticking sounds would be mistaken for its tick.
- In "The Unicorn and the Wasp," the murder victim's watch broke as he fell, putting the time of death at exactly 4:15 pm.
- Also, in "The Visitation", Tegan has the following to say when the Doctor's latest attempt to get her to Heathrow Airport ends with the TARDIS landing in the right place, but in 1666:
- In Once Upon a Time, the clock in Storybrooke is not working, which is to indicate that time is frozen. When Emma arrives in Storybrooke, the clock starts working again.
- On 30 Rock, Jack accidentally hits his elderly mother with his car and sits there in the driveway for a full eight minutes before calling 911. She chews him out at the end of the episode after noticing the discrepancy between the time on her watch, which broke when she fell, and the time of his cell-phone call. "Numbers, unlike children, don't lie!"
- Star Trek: Voyager
- In "Time and Again" when the crew investigate a planetwide explosion, Tom Paris finds a stopped clock in a wrecked shop window. Unfortunately the explosion has created fragments in time, so Tom is suddenly sent back to before the disaster happened. Looking at the now-working clock and talking to the shopkeeper regarding their units of measure, he works out the disaster will happen tomorrow.
- A different take in "Macrocosm". Janeway and Neelix return to Voyager to find the crew infected by a virus, and work out the approximate time of events because a recorded program has been running for eleven hours.
- Castle has used a broken watch to establish time of death more than once.
Lanie: He was killed at 11:15.Castle: So specific. I'm impressed.Lanie: His watch broke when he fell.Castle: Ah, you shouldn't have told me. Less impressed.
- In All My Children's "Who Killed Will", storyline, a suspect is on trial and one of the most compelling pieces of evidence is a broken clock, showing a time that eradicates his alibi. However, after another suspect testifies and admits that he tampered with the clock to give himself an alibi, the first suspect is now cleared. Ironically, despite the second suspect's own deceit, he's innocent too.
- Supernatural. Played with in "The End". Dean goes to sleep in a hotel room, setting the alarm clock to wake him four hours later. Cut to a smashed clock and Dean waking up in broad daylight in the room which is now a burnt-out wreck, as he's awoken in a Bad Future.
Newspaper Comics
- There's a The Far Side cartoon where police are investigating a shooting at a clock store. The place has been shot to pieces, all clocks are reading the same time as each other, and the detective is wondering "Now if only we could determine the time of death...."
Video Games
- In FEAR 2: Project Origin, all clocks after the hospital level have stopped due to the events of the first game.
- Condemned 2: Bloodshot from the same developers as FEAR has one instance of this as well: the first bit of investigation the player does at Black Lake Lodge is looking at the watched on the wrist of a severed arm to determine when it was removed.
- In Dead Space 2 all the clocks have stopped (permanently) at 12:00, odd, considering they are powered L.E.D clocks that would normally keep going, or at least flash.
- Fallout 3 has every single clock you see stopped at the exact time the Chinese attack occurred. Seems like some of them would have been wound-up or something...
- The Ace Attorney series use this idea many times - twice in the first game alone.
- In Silent Hill: Homecoming, all the clocks in town are stopped at 2:06. 2:06 AM being the time of Josh's death. In a more meta-sense, 206 is the number of Alex's room in the Bedlam House ending.
- In the Agatha Christie pastiche Interactive Fiction game Death Off the Cuff, the victim's watch stopped at the time that he was stabbed. Except that, much like in the actual Christie example, it was faked to draw suspicion away from the perpetrator of said stabbing.
- In the adventure game Gray Matter, strange and seemingly supernatural events happen around the Oxford University campus, and each time the clock stops at the time of the event.
- In MySims Agents, a thief had broken into Evelyn Gray's home and also broken her clock. This is a vital clue determining the time of the break-in, as it proves that it happened well after Skip had his pizza.
- In The Vanishing of Ethan Carter, all of the clocks in the town are stuck at 7:00, which is what time it is on Ethan's digital clock when the house starts burning and Ethan starts imagining Paul Prospero's story. In the post-game, the clocks move to 7:04, the same time that Ethan wakes up from his Dying Dream. The one at the train stop is set at 7:05, the same time that Ethan dies.
- In Serena a clock on the wall can be heard ticking away through most of the game, but after a certain point (once he opens the armoire and finds what's strongly implied to be his own dead body) it stops and the pendulum can be seen frozen mid swing.
- In Tomb Raider (2013), every cutscene that allows a good look at Lara's wrist shows her watch at the exact same time, to the second, throughout the game. No attention is ever brought to this in-story, so it probably just means that the watch was damaged when the Endurance sank.
- In Barrow Hill, all the clocks and watches you find have stopped advancing, and some of the analog clocks' minute hands can be seen jiggling in place, as if forcibly held on the brink of moving. Emma the DJ discovers that hers has stopped during a live broadcast you pick up via radio, and she invites callers to phone in and tell her the right time.
- In Mystery Case Files: Madame Fate, there is a clock behind the fortune teller throughout the game, a grim reminder that there is little time until Madame Fate's death, which is scheduled When the Clock Strikes Twelve. After Madame Fate's death at exactly twelve o'clock, the clock stops running.
- In Danganronpa: Trigger Happy Havoc, after Kiyotaka's murder, the victim is found with their watch broken at the time the murder occurred.
Web Animation
- Homestar Runner: In the Strong Bad Email "vacation", Strong Bad sends a postcard from (among several other places) "It's That CLOCK (Look at it go!)". Of course, the clock isn't going at all.
Strong Bad: Okay, the best thing about this postcard is if you look at the clock, that's the exact same time that I first laid eyes on the clock! 2:55, man. And like, iddioh, wait, it still says... 2:55. Okay, well, the clock is broken, but still! It's about the best thing I've ever seen [sings] in my whole liiiiiife!
Web Comics
- In Homestuck, Spades Slick uses his knowledge of when a clock breaks in combination with Time Travel to get the drop on several members of the villainous Felt.
Web Videos
Western Animation
- Johnny Bravo: Subverted in the episode "The Day the World Didn't Move Around Very Much". A jet cutting a power line stops Johnny's clock at 12:00, and after seeing similar events, he's convinced that time has stopped for everyone but him when in fact he runs into various instances of things intentionally standing still for other reasons.
- Gravity Falls: In "Headhunters", when Dipper interrogates Manly Dan about the "murder" of Grunkle Stan's wax replica, Manly Dan's alibi is that he was punching the clock at the time.
Dipper: You were at work, then.
Manly Dan: No, I was punching that clock! (Points to a broken clock) - Attempted by Bloo in one episode of Foster's Home for Imaginary Friends. He's annoyed a giant friend known only as "The New Guy" by asking him "How's the weather up there?", and said friend threatened to "give him something to laugh about" at 4 in the afternoon. Bloo, not understanding how time works, attempts to prevent this by breaking every clock in the house. Madame Foster counters by having Coco bring in a large countdown clock. Naturally, Bloo tries to smash it, only to bounce off.
Madame Foster: That's plexiglass, dear boy. There's no breaking that!
- Duckman: At the beginning of "A Room with a Bellevue", Duckman wakes up late because Ajax thought the 12:00 on the VCR was accurate (see below in Real Life).
Duckman: Ajax, you were supposed to wake me up at seven!
Ajax: Don't worry, dog. It's only twelve...twelve...twelve...twelve...twelve... - Parodied in Futurama when Zoidberg tries playing detective in a What If? short.
Zoidberg: My first clue came at 4:30 when the clock stopped. My next clue came two hours later at 4:30 when I found the murdered corpse of Amy's dead deceased body!
Real Life
- The Hiroshima Peace Memorial features a clock whose hands have stopped at the time the A-bomb was dropped, 8:15.
- A similar monument in Japan actually depicts what time the Kobe earthquake struck.
- Ditto for a clock at the Chernobyl power plant. It can still be found at a museum.
- Mormons refer to Joseph Smith's time of death by what was on his watch when he hit the ground after being shot out of a prison window.
- Mustafa Kemal Atatürk, the founder of modern Turkey, died in the Dolmabahçe Palace in Istanbul at 9:05 AM on November 10, 1938. For many years all the clocks in the palace were set to 9:05 (the clock in the room he died still is), and every November 10 most Turks hold a minute of silence at that time, even if they are driving (they will pull over first).
- Kinetic energy watches require no batteries but are powered by movement and can keep working for 12 to 36 hours after the last movement. In criminal investigations, this can help determine an exact time of death.
- When the pirate city of Port Royal, Jamaica was leveled by natural disaster in 1692, watches were found in the rubble stopped at 11:43 a.m., the time the disaster struck.
- VCRs included a digital clock, which in many people's homes simply blinked "12:00" because no one could be bothered to figure out how to program it after hooking it up or after a power failure, because the clock wasn't necessary to watch movies - only to program when to record things. This became a common Stock Shtick for someone who was Hopeless with Tech.


{% extends "bootstrap/base.html" %}
{% block title %}The Oracle of Kirk - Results{% endblock %}
{% block content %}
The Oracle of Kirk
A fun little project to show degrees of separation within the Star Trek Universe
{% if full_link|length %}
{{ end_name }} has a Kirk Number of {{ full_link|length }}
{% else %}
{{ end_name }} has a Kirk Number of Infinity
{% endif %}
{% set previous = end_name %}
{% for sublink in full_link %}
{{ previous }} was in {{ sublink[0] }} with {{ sublink[1] }}


|
cocos2d-iphone-extensions
0.2
Cocos2D Extensions API Reference (iOS version) for www.kobold2d.com developers
|
#import <CCScrollLayer.h>
Public Member Functions | |
| (id) | - initWithLayers:widthOffset: |
| (void) | - updatePages |
| (void) | - addPage:withNumber: |
| (void) | - addPage: |
| (void) | - removePage: |
| (void) | - removePageWithNumber: |
| (void) | - moveToPage: |
| (void) | - selectPage: |
Static Public Member Functions | |
| (id) | + nodeWithLayers:widthOffset: |
Protected Attributes | |
| NSObject< CCScrollLayerDelegate > * | delegate_ |
| int | currentScreen_ |
| int | prevScreen_ |
| CGFloat | startSwipe_ |
| CGFloat | minimumTouchLengthToSlide_ |
| CGFloat | minimumTouchLengthToChangePage_ |
| BOOL | showPagesIndicator_ |
| CGPoint | pagesIndicatorPosition_ |
| int | state_ |
| BOOL | stealTouches_ |
| BOOL | stealingTouchInProgress_ |
| UITouch * | scrollTouch_ |
| NSMutableArray * | layers_ |
| CGFloat | pagesWidthOffset_ |
| CGFloat | marginOffset_ |
| ccColor4B | pagesIndicatorNormalColor_ |
| ccColor4B | pagesIndicatorSelectedColor_ |
Properties | |
| NSObject< CCScrollLayerDelegate > * | delegate |
| CGFloat | minimumTouchLengthToSlide |
| CGFloat | minimumTouchLengthToChangePage |
| CGFloat | marginOffset |
| BOOL | stealTouches |
| BOOL | showPagesIndicator |
| CGPoint | pagesIndicatorPosition |
| ccColor4B | pagesIndicatorSelectedColor |
| ccColor4B | pagesIndicatorNormalColor |
| int | totalScreens |
| int | currentScreen |
| CGFloat | pagesWidthOffset |
| NSArray * | pages |
Scrolling layer for Menus, like iOS Springboard Screen.
It is a very clean and elegant subclass of CCLayer that lets you pass-in an array of layers and it will then create a smooth scroller. Complete with the "snapping" effect. You can create screens with anything that can be added to a CCLayer.
| - (void) addPage: | (CCLayer *) | aPage |
Adds new page to the right end of the scroll layer.
| - (void) addPage: | (CCLayer *) | aPage | |
| withNumber: | (int) | pageNumber | |
Adds new page and reorders pages trying to set given number for newly added page. If number > pages count - adds new page to the right end of the scroll layer. If number <= 0 - adds new page to the left end of the scroll layer.
| - (id) initWithLayers: | (NSArray *) | layers | |
| widthOffset: | (int) | widthOffset | |
Inits scrollLayer with given pages & width offset.
| layers | NSArray of CCLayers, that will be used as pages. |
| widthOffset | Length in X-coord, that describes length of possible pages intersection. |
| + (id) nodeWithLayers: | (NSArray *) | layers | |
| widthOffset: | (int) | widthOffset | |
Creates new scrollLayer with given pages & width offset.
| layers | NSArray of CCLayers, that will be used as pages. |
| widthOffset | Length in X-coord, that describes length of possible pages intersection. |
| - (void) removePage: | (CCLayer *) | aPage |
Removes page if it's one of scroll layers pages (not children) Does nothing if page not found.
| - (void) removePageWithNumber: | (int) | page |
Removes page with given number. Doesn nothing if there's no page for such number.
| - (void) updatePages |
Updates all pages positions & adds them as children if needed. Can be used to update position of pages after screen reshape, or for update after dynamic page add/remove.
- (int) currentScreen [read, assign] |
Current page number, that is shown. Belongs to the [0, totalScreen] interval.
- (CGFloat) marginOffset [read, write, assign] |
Offset that can be used to let user see empty space over first or last page.
- (CGFloat) minimumTouchLengthToChangePage [read, write, assign] |
Calibration property. Minimum moving touch length that is enough to change the page, without snapping back to the previous selected page.
- (CGFloat) minimumTouchLengthToSlide [read, write, assign] |
Calibration property. Minimum moving touch length that is enough to cancel menu items and start scrolling a layer.
- (NSArray*) pages [read, assign] |
Returns array of pages CCLayer's
- (ccColor4B) pagesIndicatorNormalColor [read, write, assign] |
Color of dots, that represents other pages.
- (CGPoint) pagesIndicatorPosition [read, write, assign] |
Position of dots center in parent coordinates. (Default value is screenWidth/2, screenHeight/4)
- (ccColor4B) pagesIndicatorSelectedColor [read, write, assign] |
Color of dot, that represents current selected page(only one dot).
- (CGFloat) pagesWidthOffset [read, write, assign] |
Offset, that can be used to let user see next/previous page.
- (BOOL) showPagesIndicator [read, write, assign] |
Whenever show or not white/grey dots under the scroll layer. If yes - dots will be rendered in parents transform (rendered after scroller visit).
- (BOOL) stealTouches [read, write, assign] |
If YES - when starting scrolling CCScrollLayer will claim touches, that are already claimed by others targetedTouchDelegates by calling CCTouchDispatcher::touchesCancelled Usefull to have ability to scroll with touch above menus in pages. If NO - scrolling will start, but no touches will be cancelled. Default is YES.
- (int) totalScreens [read, assign] |
Total pages available in scrollLayer.


Defined in Module impact.loader, inherits from ig.Class
// Subclass the default loader MyLoader = ig.Loader.extend({ draw: function() { // Add your drawing code here // This one clears the screen and draws the // percentage loaded as text var w = ig.system.realWidth; var h = ig.system.realHeight; ig.system.context.fillStyle = '#000000'; ig.system.context.fillRect( 0, 0, w, h ); var percentage = (this.status * 100).round() + '%'; ig.system.context.fillStyle = '#ffffff'; ig.system.context.fillText( percentage, w/2, h/2 ); } }); // Call ig.main() with your custom Loader class ig.main('#canvas', MyGame, 60, 320, 240, 2, MyLoader);
ig.Loader
is the default preloader for all images and sounds that the game needs.
You can subclass ig.Loader
to provide your own drawing code or do some additional processing.
Note that, while the canvas and its drawing context are available when the preloader is executed, you can't use any ig.Image
or ig.Sound
resources yet.
gameClass
The ig.Game class to start, when all resources have been loadedresources
An array of resources, each of which must provide a .load()
method that accepts a callback, such as ig.Image and ig.Sound.Note that an instance of a Loader class is usually created by ig.main().
true
when everything has been loaded, false
otherwise.
The ig.Game class to start, handed to this instance through the constructor.
The array of resources to load, handed to this instance through the constructor.
Fraction of the resources loaded. E.g. if 10 of 20 resources have been loaded, the .status
is 0.5
. This only counts the number of resources, not their size.
Called 60 times per second during load to update the progress bar.
Called when all resources have finished loading. This usually calls ig.system.setGame() with the loaders .gameClass
.
Initiates loading of all the resources. Usually called by ig.main()
.
Initiate loading of one of the resources from the .resources
array. res
must be an instance of an object that has a .load()
method, such as ig.Image and ig.Sound.


The Sound and the Fury General Quiz
The flagship General Quiz under Myndsnare, The Sound and the Fury has seen its fare share of prolific quizmasters including Late Vikram Joshi and Kushan Patel. This year, with Abhinav Dhar at the helm, the quiz promises to be an exciting affair.


I had went over my friend M's house to pick up some weed for my wife.  I stick with opiates. So I hung out with him for a bit and traded him some fiorocets for a small bit of pot. Fiorocets are barbiturates, similar in effect to xanax and valium.
Then this chick stops by and M buys a few suboxone pills off of her. He breaks one in half and hands one half of the orange, octagonal tablet to me. I crush it on his coffee table with my thumb. They're very soft pills, you don't need any tools to crush them with. I separate the large orange pile of powder into two even piles with a credit card and snort approximately one fourth of the pill. I have taken them sublingually before (under my tongue), which is how they're designed to be taken. But it takes an insane amount of time to kick in. About an hour for me. Then another hour before it peaks. But snorting it is a much better way of taking the pill in my opinion. It kicks in within ten minutes and hits me all at once, rather than the gradual high that I get with taking it sublingually.
For this reason, that it kicks in all at once, I only snort half of what my regular dose is. I would normally stick half a pill beneath my tongue, so I only snort a quarter of a pill initially. I find that the high is MUCH stronger when I snort the pills, much more intense. I'll probably never take it sublingually again.
As for the effects, I find that it lacks the sense of euphoria and well-being that comes with other opiates, like oxycodone and hydrocodone. If all I have is suboxone, then I'll happily take it, but I prefer the other meds I listed. I'm on the suboxone right now and am having EXTREME difficulty typing all of this. My hand-eye coordination is terrible. I can just barely focus my eyes on anything whatsoever. They want to just do their own thing and not stay focused. I could not drive after having snorted suboxone. It's not like other opiates, where I'm pretty much still in perfect control as far as attention and coordination goes. In fact, I'm now wishing I only snorted an eighth of a pill.
I'm barely keeping awake and am getting paranoid that I took too much. I keep nodding off. To conclude, be very careful snorting this medicine. Suboxone is very strong to begin with and snorting it is twice as strong. I think I only took two milligrms of this stuff and I'm completely wasted. Use caution.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Notes for Friday, March 31
Interactive graphs may
not actually be dead
says Gregor Aisch.
How does k-means relate to
Voronoi diagrams
?
Inspiration: Bostock on
Voronoi tesselations
Clustering on real data. What does "distance" mean?
Voronoi tesselation and a mysterious "bug".
Find Closest
Move Means


SUNFRAPOL
keywords
: sunlight, police, fraud
UN Police, Department of Sunlight Fraud as known as SUNFRAPOL is a fictional police existing to capture the frauders who are faking the sunlight from the artificial lights.
---------------
Kotaro Abe
Thanks to: Pasquale Totaro(model), Hiroki Yokoyama
Year: 2016
details to be added soon


Use the 'Choose File' button on the main PrettyScribe page to select a roster file for formatting. That's it. Print the resulting pages however you'd like.
PrettyScribe is a simple tool that takes army roster files created with BattleScribe and converts them to an easier to read layout suitable for printing or viewing on your device. PrettyScribe supports the rosters for these game systems:
Bugs, suggestions and enhancements can all be posted on the PrettyScribe GitHub website.
When making a bug request it is most helpful if you could upload and attach the roster file that exhibits the problem and with a brief description of the issue you are having.


flibs/m_vfile - Manage log files
The module m_logger provides static methods to manage a log file, which is an execution report of the program.
Note that this module, from 2012 onwards, relies on the Fortran 2008 feature NEWUNIT. The advantage of this feature is that the log file can be opened with a logical unit number that is guaranteed not to interfer with any other unit number in the program.
The goal of this component is to provide a way to write messages both on standard output and on a log file, so that a trace of the execution can be read by the user after the execution. The module m_logger therefore provides static methods to
connect a file to the logger,
configure the logging process, for example disable the standard output messages,
log messages.
The logger must be started up with "log_startup()" and shut down with "log_shutdown()". The static method "log_startup" takes the log file name as first argument : it main purpose is to connect the logger to the file. The messages are sent to the logger with the static method "log_msg". In the following example, extracted from the unit tests of m_logger provided with the project, one connects the file "test_m_logger.log" to the logger, send several messages and shut down the logging system.
call log_startup ( 'test_m_logger.log' ) call log_msg ( 'First message' ) call log_msg ( 'Second message' ) call log_shutdown ()
By default, the logging is done both on file and on standard output. The user may want to configure the behaviour of the logger so that message are not written on standard output. The static method "log_configure(option,value)" is the central point to configure the logger. It takes a character "option" string and a "value" as arguments. In the following example, one selectively writes messages on standard output or on file, or both.
call log_startup ( 'test_m_logger.log' ) call log_configure ( "writeonstdout" , .false. ) call log_msg( 'This message is written only on file' ) call log_configure ( "writeonlogfile" , .false. ) call log_msg( 'This message is written nowhere' ) call log_configure ( "writeonstdout" , .true. ) call log_msg( 'This message is written only on screen' ) call log_configure ( "writeonlogfile" , .true. ) call log_msg( 'This message is written both on screen and on file' ) call log_shutdown ()
Initialises the logging management and connect it to the given filename. If append is present and true, then the logger appends the messages to the end of the log file. If append is present and false, then the initialization of the logger overwrites the messages of the previous logging session. If append is not provided, the default value is append=.true.
Shutdown the logging management.
Log the given character string msg to the logging units. If the logging to standard output is enabled, writes the message on standard output. If the logging to the log file is enabled, writes the message into the log file. Before outputting directly the message string, the string is trimmed, that is to say that all trailing blanks are removed from the string. If the time stamp option is enabled, a time stamp with format "year-month-day hh:mm:ss" is inserted before the message.
Log a delimiter of given level. Available values for level are : LOG_LEVEL_VOLUME, LOG_LEVEL_CHAPTER, LOG_LEVEL_SECTION, LOG_LEVEL_SUBSECTION If level is not provided, the default value for level is LOG_LEVEL_VOLUME.
Returns true if the logger is allready initialized. Note: that method may be useful in the case where several components use the logger and both contain a call to log_startup.
Set the logical static option of the component to value. The option may be one of the following.
option = "timestamp" : Disable or enable the insertion of time stamps. If the time stamp option is enabled, a time stamp with format "year-month-day hh:mm:ss" is inserted before the message.
option = "writeonstdout" : Disable or enable the writing on standard output.
option = "writeonlogfile" : Disable or enable the writing on log file.
option = "stoponerror" : Configure the behaviour of the component whenever an error is met. If stoponerror is true, then the execution stops if an error is encountered. If stoponerror is false, then the execution continues if an error is encountered. In both cases, a message is displayed on standard output.
Configure the integer static option of the component. The option may be one of the following.
option = "logfileunit" : Force the logical unit for logging to be value. Use this feature with caution, since the original logical unit is lost.
Set the character static "option" of the component to "value". The "option" may be one of the following.
option = "level_string_volume" Set the string used for volume delimiter.
option = "level_string_chapter" Set the string used for chapter delimiter.
option = "level_string_section" Set the string used for section delimiter.
option = "level_string_subsection" Set the string used for subsection delimiter.
Get the logical static "option" of the component. The option may be one of the following.
option = "timestamp" : Current value of the option to enable / disable insertion of time stamps.
option = "writeonstdout" : Current value of the option to enable / disable writing on standard output.
option = "writeonlogfile" : Current value of the option to enable / disable writing on log file.
option = "stoponerror" : Current value of the option to enable / disable stopping when an error is met.
Get the integer static "option" of the component.
option = "logfileunit" : Current logical unit connected to the logging system.
Get the character static "option" of the component. The "option" may be one of the following.
option = "level_string_volume" Get the string used for volume delimiter.
option = "level_string_chapter" Get the string used for chapter delimiter.
option = "level_string_section" Get the string used for section delimiter.
option = "level_string_subsection" Get the string used for subsection delimiter.
Copyright © 2008 Michael Baudin<EMAIL_ADDRESS>Copyright © 2008 Arjen Markus arjenmarkus@sourceforge.net


Speed Ream's slashdot article about Leo
A page about Leo in the Wikipedia.
Literate programming page. Everything you ever wanted to know...
Tom Fetherston's youtube video, from a presentation at PyOhio in 2012.
Ville Vainio's youtub video about Leo
Joe Orr's Leo resource page, containing XSLT Stylesheets for Leo.
Icons that tell the world that you used Leo.


REX Virtual Machine Documentation
Dynamic Linking
Using the REX dynamic linker
REX Object format (*.ro)
The REX Object format is used by REX shared libraries to export functions to a REX executable
The header is defined in src/r3x_dynamic.h:11<
TODO: Add description.
Your first dynamic library
Writing a dynamic library is easy, here's an example:
include 'libR3X/dynR3X.inc'
.text {
function test_func
; Dynamically loaded libraries must
; be relocatable that is, position independent.
loadr R1, str01
; Load address of library is in R20
addrr R1, R20
pushr R1
syscall SYSCALL_PUTS
pop
loadr R0, word_data
addrr R0, R20
lodsw
pushr R1
syscall SYSCALL_PUTI
pop
push 0xA
syscall SYSCALL_PUTCH
pop
; Return back!
ret
endfunction test_func
.data {
str01: db 'Hello from dynamic library! I can read stuff from addresses! word_data=', 0
word_data: dw 65532
dd 0xFFF3FFFF
}
end
Your code must be position-independent as shown above! As you see, R20 is the "physical" address where your
library is loaded, you should add R20 to all internal address references before doing a load/store operation,
as shown above.
OPTION 1: Manually load the library and execute it:
Loading a dynamic library
Loading a dynamic library is simple, simply do:
pushstring "lib.ro"
syscall SYSCALL_LOADDYNAMIC
The library's handle will be pushed to stack. Make SURE to store it! Since this will be used to call functions.
The calldynamic instruction
The calldynamic instruction is used to call a function from a library. Use it like this:
push [library handle] -- Handle that you got from the above syscall
pushstring [function name] -- "test_func" for the above example.
calldynamic
OPTION 2: Use the import functionality
Another way to do it is like this:
extern test_func, "lib.ro"
...
externcall test_func
...
The library will be loaded automatically by the VM, and you won't have to store and do crazy things manually!


Count
Product name
Price (Single item price)
count
product name
product price
Remove items from cart
Order items
Shopping cart is empty


Barton–Nackman trick implementation.
More...
#include <comparable.hpp>
|
|
bool | operator== (const Subclass &lhs, const T &rhs) noexcept |
| |
|
bool | operator== (const T &lhs, const Subclass &rhs) noexcept |
| |
|
bool | operator!= (const Subclass &lhs, const T &rhs) noexcept |
| |
|
bool | operator!= (const T &lhs, const Subclass &rhs) noexcept |
| |
|
bool | operator< (const Subclass &lhs, const T &rhs) noexcept |
| |
|
bool | operator> (const Subclass &lhs, const T &rhs) noexcept |
| |
|
bool | operator< (const T &lhs, const Subclass &rhs) noexcept |
| |
|
bool | operator> (const T &lhs, const Subclass &rhs) noexcept |
| |
|
bool | operator<= (const Subclass &lhs, const T &rhs) noexcept |
| |
|
bool | operator>= (const Subclass &lhs, const T &rhs) noexcept |
| |
|
bool | operator<= (const T &lhs, const Subclass &rhs) noexcept |
| |
|
bool | operator>= (const T &lhs, const Subclass &rhs) noexcept |
| |
template<class Subclass, class T = Subclass>
class caf::detail::comparable< Subclass, T >
Barton–Nackman trick implementation.
Subclass
must provide a compare member function that compares to instances of T
and returns an integer x with:
x < 0
if *this < other
x > 0
if *this > other
x == 0
if *this == other
The documentation for this class was generated from the following file:
- libcaf_core/caf/detail/comparable.hpp


{{dataReturned}}
{{ data.para1 }}
{{ data.para2 }}
{{ data.para1 }}
{{ data.para2 }}
{{ data.para1 }}
{{ data.para2 }}
About us
Team
Careers
Offers
Contact
Help and support
Partner with us
Ride with us
Blog


Hi! I am Rajat.
UI/UX Developer at
Contify
Welcome to my portfolio. I am a Frontend developer based in New Delhi, who is also into UX/UI.
I
design, photography, travel and all those things which inspire me.
W
ork
Glimpse of my work.
YETI NGO
A website for a non-profitable NGO. For the better reach among the community.
Sarah's Bakery
A website where client can showcase their bakery product and do marketing.
Quanon Blocks
The website is made for company which is related to Blockchain.
Quanon Tech
The website is made for a company which is related to AR/VR tech.
Essentia LLP
The website is made for a service based company called Essentia Softserv.
AFROST Open Source
The website is made under open source contribution and for an organisation.
Some of my creative work
A logo designed for Sarah's Bakery, a font based and a minimilistic design.
A logo for an international Python Annual confernce of India.
A minimilistic and clean logo for organisation. It is a text based.
A logo for open-source community which is more towards the Linux.
S
killset
What I can do for you.
Language and Framework Knowledge
Software Knowledge
Resume
Here! is my resume. In case you want to hire me.
Download my Resume


RED ROCK WEST (director/writer: John Dahl; screenwriter: Rick Dahl; cinematographer: Marc Reshovsky; editor: Scott Chestnut; cast: Nicolas Cage (Michael), Dennis Hopper (Lyle from Dallas), Lara Flynn Boyle (Suzanne), J.T. Walsh (Wayne), Craig Reay (Jim), Vance Johnson (Mr. Johnson), Dale Gibson (Kurt), Dan Shor (Deputy Bowman); Runtime: 98; Polygram Release; 1992)
Reviewed by Dennis Schwartz
A nifty postmodern cowboy-noir and black comedy, filmed in a drab Technicolor that seems appropriate for this film, as the colorization is not ostentatious and thereby makes the characters appear more real. The story is aimed at striking your funny bone and getting you dizzy in following all the plot twists. It features all the familiar noir clichés: femme fatale, an innocent man trapped in the world of criminals, and is written by the Dahl brothers and directed with tongue-in-cheek humor by John Dahl, and despite the clichés, the film feels original.
"Red Rock West" was first released as a video before it had its theatrical release in a San Francisco theater, where it proved to be a hit, which got it a limited run across big market city theaters. It's the type of film that seems to be best-suited for video, where it still made its biggest splash.
Michael (Cage) is one lucky s.o.b to get out of Vietnam alive with only a bum leg when his marine outfit was trapped in a bombed building. But he doesn't seem too lucky now, as he comes from Texas to Wyoming for an oil rigger's job his friend said was available. He's turned down because he is decent enough to own up to his bum leg on his job application, but he finds himself drifting into Red Rock, on a tip from a local that there might be work there. At the local bar he orders coffee and the bartender, Wayne Brown (J.T. Walsh), noticing the Caddy he drives and the Texas license plates, says you must be Lyle from Texas and slides over five grand and says the other half of the money will be delivered when you finish the job of killing my wife Suzanne (Lara). Now most people who are not completely straight and are as broke as Michael and have a little larceny in their heart, would have just skipped town with the dough and laughed all the way to Las Vegas. But not our hero...who is neither straight nor crooked, just a guy who gets into tight spots and tries to do what is right. And to him, that means mailing an anonymous letter to the sheriff about the incident and going out to the ranch to warn Suzanne.
Michael figures he did all he can here and loads up with junk food and beer and heads out of Red Rock, past the 'Welcome to Red Rock' sign, which becomes the film's running gag, as he will pass that sign numerous times in his inability to get out of town. It's a rainy night and he smashes into a man on the road trying to flag him down. Not able to leave him by the road, he brings him into the hospital, where it turns out the man is Suzanne's lover and he has two bullets in his stomach. The other twist is that the town's sheriff is none other than Wayne. It seems he bought the election by giving the voters free drinks. When Wayne sees him at the hospital, he arrests him and takes him down a backroad where he unsuccessfully tries to kill him. When Michael escapes, he is picked up by the real Lyle. All this happens in the first reel.
>From there-on the plot gets more serpentine, the characters become more loopy and dangerous, and do-gooder Michael comes up against three desperate snakelike characters who are willing to do anything to get their hands on a half million dollars that the crooked sheriff has hidden away. It's all about the money, with the psycho-killer Dennis Hopper getting more vicious the more insecure he gets, ranting that Cage thinks that he is better man than him, with Lara being as cold-blooded and as immoral as any woman could be, while J.T. is slimy and calculating.
"Red Rock West" is a playful and off-beat thriller, whose only sense it makes is nonsense, but one that is highly entertaining, while the film itself is well executed and the acting is dead-pan funny. So it hardly matters that this murky story is not plausible and certainly not cerebral. It has received cult status because of its many plot twists and zany characters, which means it will pop up on late night cable at any time in the future and that should be for years to come.
REVIEWED ON 12/8/2000 GRADE: B
Dennis Schwartz: "Ozus' World Movie Reviews"
http://www.sover.net/~ozus
<EMAIL_ADDRESS>© ALL RIGHTS RESERVED DENNIS SCHWARTZ
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


I’ve been thinking some more about deployment of Python web applications, and deployment in general (in part leading up to the Web Summit). And I’ve got an idea.
I wrote about this about a year ago and recently revised some notes on a proposal but I’ve been thinking about something a bit more basic: a way to simply ship server applications, bundles of code. Web applications are just one use case for this.
For now lets call this a "Python application package". It has these features:
- There is an application description: this tells the environment about the application. (This is sometimes called "configuration" but that term is very confusing and overloaded; I think "description" is much clearer.)
- Given the description, you can create an execution environment to run code from the application and acquire objects from the application. So there would be a specific way to setup sys.path, and a way to indicate any libraries that are required but not bundled directly with the application.
- The environment can inject information into the application. (Also this sort of thing is sometimes called "configuration", but let’s not do that either.) This is where the environment could indicate, for instance, what database the application should connect to (host, username, etc).
- There would be a way to run commands and get objects from the application. The environment would look in the application description to get the names of commands or objects, and use them in some specific manner depending on the purpose of the application. For instance, WSGI web applications would point the environment to an application object. A Tornado application might simply have a command to start itself (with the environment indicating what port to use through its injection).
There’s a lot of things you can build from these pieces, and in a sophisticated application you might use a bunch of them at once. You might have some WSGI, maybe a seperate non-WSGI server to handle Web Sockets, something for a Celery queue, a way to accept incoming email, etc. In pretty much all cases I think basic application lifecycle is needed: commands to run when an application is first installed, something to verify the environment is acceptable, when you want to back up its data, when you want to uninstall it.
There’s also some things that all environments should setup the same or inject into the application. E.g., $TMPDIR should point to a place where the application can keep its temporary files. Or, every application should have a directory (perhaps specified in another environmental variable) where it can write log files.
Details?
To get more concrete, here’s what I can imagine from a small application description; probably YAML would be a good format:
platform: python, wsgi
require:
os: posix
python: <3
rpm: m2crypto
deb: python-m2crypto
pip: requirements.txt
python:
paths: vendor/
wsgi:
app: myapp.wsgiapp:application
I imagine platform as kind of a series of mixins. This system doesn’t really need to be Python-specific; when creating something similar for Silver Lining I found PHP support relatively easy to add (handling languages that aren’t naturally portable, like Go, might be more of a stretch). So python is one of the features this application uses. You can imagine lots of modularization for other features, but it would be easy and unproductive to get distracted by that.
The application has certain requirements of its environment, like the version of Python and the general OS type. The application might also require libraries, ideally one libraries that are not portable (M2Crypto being an example). Modern package management works pretty nicely for this stuff, so relying on system packages as a first try I believe is best (I’d offer requirements.txt as a fallback, not as the primary way to handle dependencies).
I think it’s much more reliable if applications primarily rely on bundling their dependencies directly (i.e., using a vendor directory). The tool support for this is a bit spotty, but I believe this package format could clarify the problems and solutions. Here is an example of how you might set up a virtualenv environment for managing vendor libraries (you then do not need virtualenv to use those same libraries), and do so in a way where you can check the results into source control. It’s kind of complicated, but works (well, almost works – bin/ files need fixing up). It’s a start at least.
Support Library
On the environment side we need a good support library. pywebapp has some of the basic features, though it is quite incomplete. I imagine a library looking something like this:
from apppackage import AppPackage
app = AppPackage('/var/apps/app1.2012.02.11')
# Maybe a little Debian support directly:
subprocess.call(['apt-get', 'install'] +
app.config['require']['deb'])
# Or fall back of virtualenv/pip
app.create_virtualenv('/var/app/venvs/app1.2012.02.11')
app.install_pip_requirements()
wsgi_app = app.load_object(app.config['wsgi']['app'])
You can imagine building hosting services on this sort of thing, or setting up continuous integration servers (app.run_command(app.config['unit_test'])), and so forth.
Local Development
If designed properly, I think this format is as usable for local development as it is for deployment. It should be able to run directly from a checkout, with the "development environment" being an environment just like any other.
This rules out, or at least makes less exciting, the use of zip files or tarballs as a package format. The only justification I see for using such archives is that they are easy to move around; but we live in the FUTURE and there are many ways to move directories around and we don’t need to cater to silly old fashions. If that means a script that creates a tarball, FTPs it to another computer, and there it is unzipped, then fine – this format should not specify anything about how you actually deliver the files. But let’s not worry about copying WARs.
Automatically generated list of related posts:
- A Python Web Application Package and Format (we should make one) At PyCon there was an open space about deployment, and...
- The Shrinking Python Web Framework World When I was writing the summary of differences between WebOb...
- 2 Python Environment Experiments two experiments in the Python environment. The first is virtualenv,...
- Opening Python Classes So, I was reading through comments to despam my old...
- Python HTML Parser Performance In preparation for my PyCon talk on HTML I thought...
You should strongly consider some of those fields being expressions rather than text. For example how would I say Python 2.6+ and 3.3+ (ie not 3.0/3.1/3.2 or 2.5)? How about dependency ‘A’ (version >6.3) or ‘B’ (version <1)? What about if 'C' is present then 'D' must be too? How about flags like Gentoo's USE – eg how do you indicate Kerberos must be used on some systems, but can be optional on others? The ast module makes it really easy to deal with expressions, and safely evaluating and understanding them.
If I was solving the problem as you are, I'd very strongly consider making the format something that can be trivially translated into .deb, .rpm or .msi. Rather than fighting the existing platform packaging solutions, make it the smallest divergence from them possible and make it actually possible to use them. (Remember the vast majority only want one version of things and don't need multiple versions scattered all over the place. It is also possible for virtualenv and friends to understand .deb/rpm/msi and do a virtualized local install of the contents.)
Separately, I am the author of APSW which is a wrapper around SQLite. It has proven very difficult to put into package repositories. The first major issue is that it requires a C compiler which doesn't exist on Windows. That leads to this: http://code.google.com/p/apsw/downloads/list
The second is what to do about SQLite. In general the latest version of SQLite is required. My setup.py script is quite happy to download and use the latest version source for you, but you may want to use the system library instead. And if a downloaded source is used then several flags are available for extensions, omitting or including bits of SQLite functionality etc. And some won't want setup.py having internet access, while others won't want SQLite distributed with APSW source. It is hard to come up with something that satisfies the majority.
Certainly expressions can be embedded in text ;) Requiring MySQL or PostgreSQL is a pretty common example of needing an expression.
Of course this could translated into a system package (deb etc), but system packages alone aren’t expressive enough for deployments. They are good for making certain things available, but they generally leave the “doing” part to the sysadmin and configuration. This format is intended for really doing things. That said, I would hope that custom repositories (ala PPA) would be possible to setup with this format as well, or as a kind of supplement – so that when you really need a cutting edge package (which just happens sometime) you can do the work to provide that package The Right Way (as opposed to sshing in and using
./configure; make; sudo make install
). Anyway, I like the idea of pushing build stuff off to the systems instead of trying to embrace it directly in this tool.…and the race is on to release a python deployment tool named “smear”. Oh yes, I just went there.
I was going to go there, too — you beat me to it. Kudos. But, seriously, can we do better in the Python app name department?  South is okay. Django’s pretty good. Flask isn’t bad, but boo for Bottle. Celery? Lettuce? Are we making salad? Virtualenv would be great if Python had been called Indenteddynamiclang. Gunicorn is gawful. We already have pip and pep. Now PAP? Poop.
I’ve been working along very similar lines.  Here are my thoughts about it:
The “description” metadata should describe a project in a general enough way to be useful to anyone else thinking of using the project for any purpose.
This generality means the description metadata can live either inside the project or outside it (or both!). Joe’s useful library doesn’t have a description file? That’s ok, Good Samaritan has published a description of Joe’s package at goodsamaritan.org! Add that site as a source of description data.
Separating description from source tree encourages good design of the format. The description should be designed to work with the huge number of commonly used libraries out there that use things like gnu tools (./configure; make; make install), cmake, ant/maven, or even a simple “cp -r * {target}”. The point of writing a description is to tell a machine how to perform common operations on a package: get, build, test, install, start, stop, uninstall, “discover available versions”, “discover dependencies”, etc.
Separating description from source tree and using a good format design encourages adoption. If you have good tools and good descriptions to work with, you can make effective use of a package without any cooperation from the package’s author. People can write and publish descriptions for the many, many tools already in common use that haven’t been quick to adopt new tools. That’s no small part of the success of things like puppet, chef, and homebrew.
“Package Repositories” are not necessary, especially if source (rather than compiled binaries) is what you want. Does the project have a presence on Github, or Bitbucket, Gitorious, SourceForge, Google Code, or any simple git, mercurial, or (shudder) subversion repository anywhere else with a url? Just identify it by its url and distribute directly from there. Tagging a commit == cutting a new release. Grabbing a package == getting set up to make code changes and immediately contribute them back to the repository.
If you point at a 3rd party package repository and a new version shows up in the source repo, you don’t necessarily have the new version. If you point at a 3rd party description which points back at the source repo and a new version shows up in the source repo, you do have the new version, and the description likely applies just as well to the new version as it did to the last one.
I think this could be a great use of semantic web “linked data” concepts. Tools in that space are all about crawling linked data and constructing graphs to do useful things with it. This is a perfect fit for the task of crawling package descriptions, building a dependency graph, and performing operations on the graph to resolve dependencies. Also, using the web language of URIs keeps things universal, so the packages in your dependency graph can use different languages and toolchains and still reference one another in the common namespace of URIs.
What you are describing sounds to me more like buildout than what I’m thinking of. Using the system I describe, if you want to integrate a foreign tool (that doesn’t have a description), you literally take its files, put them into the directory, and describe them. You don’t point about on the net. If you want to use tools to manage that (e.g., git submodule) then sure; but when you deploy you have actual files in hand, no indirection, no pointers.
There is however a need for another higher level of coordination among these applications. It is not uncommon for application A to need to directly contact and work with application B, and vice versa. Or they might need to share a bit of information (a shared secret), or know each other’s hostnames, etc. I think that’s simply another layer on top though, and it’s possible to skip that for now.
In particular I do not agree with 3; this system should not account for things like
./configure; make; make install
– let the system packages deal with that, they have been banging their heads on that for a long time and can do it well.I don’t mean to suggest that you never want a locally cached copy of a project for things like reliable deployment; I’m just saying I would like a universal way to describe software projects supporting a set of common actions.
I have a hard time seeing a difference between “system packages” and any other packages. To me they are all projects that ultimately have a source tree somewhere and may be mixed and matched into running systems.
But maybe we just don’t want quite the same thing :)
I was unaware of buildout. I’ll have to check that out; thanks for telling me about it.
ps
I’m currently developing what I described and it works well enough that it’s my config management system now (but not so well that all the concerns are fully separated yet). It definitely makes heavy use of local repositories.
I like being able to version control a lightweight collection of descriptions, keeping the actual 3rd party projects outside the repo. The scripts simply keep them in an unversioned work area, fetching them first if necessary.
Interesting. We are currently deploying our Django apps using another Django app that ties together git, boto Amazon api, and fabric to set up and update deployments.
It would be nice if there were a more standard deployment solution. Interested in how this develops.


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import config.ApplicationConfig @import uk.gov.hmrc.govukfrontend.views.html.components.GovukTable @(calculationResponse:CalculationResponse, govukTable: GovukTable)(implicit messages: Messages, ac:ApplicationConfig) @import org.joda.time.LocalDate
@messages(ac.globalErrors.getString(s"${period.errorCode}.reason"))
} } } @includes.multi_results_table(calculationResponse, govukTable)@Messages("gmp.queryhandling.resultsmessage")


public class Post extends QModel<QView> implements java.io.Serializable
| Constructor and Description |
|---|
Post(User author,
java.lang.String text)
A representation of a Question or Answer of a User.
|
| Modifier and Type | Method and Description |
|---|---|
User |
getAuthor()
Get the User that is responsible for this post.
|
java.lang.String |
getCity()
Get the name of the city in which the Post was created.
|
java.lang.String |
getImage()
Get the image (if any) associated with this post.
|
java.util.ArrayList<Reply> |
getReplies()
Get all the replies (excluding the actual answers) to this Post.
|
java.lang.String |
getText()
Get the textual of representation the question (or answer) of this Post
|
java.util.Date |
getTimestamp()
The timestamp of this Post refers to
to the Date and time (represented by the Java Date class) when the Post object was first instantiated
|
int |
getUps()
Get the total number of upvotes of this post.
|
java.util.ArrayList<User> |
getUpsList()
Get the list that have upvoted this post.
|
java.lang.Boolean |
isImageSet()
This method checks to see whether this object has a Post
|
void |
setCity(java.lang.String city)
Set the name of the city in which the Post was created.
|
void |
setHasPicture(boolean result)
This method determines whether this Post has a picture or not.
|
void |
setImage(java.lang.String image)
Set the image to be associated with this post.
|
void |
setReplies(java.util.ArrayList<Reply> replies)
Set all the replies (excluding the actual answers) to this Post.
|
void |
setUps(java.util.ArrayList<User> ups)
Set the list of users who have upvoted this post.
|
java.lang.String |
toString()
The String representation of this Post object.
|
addView, deleteView, notifyViews
public Post(User author, java.lang.String text)
author,
- the User responsible for the posttext,
- a String which represents a question or an answerpublic java.lang.String getCity()
setCity(String city)
public void setCity(java.lang.String city)
city
- the name of the city where the post will be createdpublic int getUps()
getUpsList()
public java.util.ArrayList<User> getUpsList()
getUps(),setUps(ArrayList ups)
public void setUps(java.util.ArrayList<User> ups)
ups,
- the ArrayList of Users of who have upvoted this postgetUpsList()
public User getAuthor()
public java.lang.String getText()
public java.util.ArrayList<Reply> getReplies()
setReplies(ArrayList replies);
public void setReplies(java.util.ArrayList<Reply> replies)
replies,
- an ArrayList of new resetReplies(ArrayList replies);
public java.util.Date getTimestamp()
public java.lang.String toString()
toString
in class java.lang.Object
getText()
public java.lang.String getImage()
public void setImage(java.lang.String image)
public void setHasPicture(boolean result)
public java.lang.Boolean isImageSet()


| Vendor Name | Amtek Engineering Services Ltd. |
|---|---|
| Reference Number | W8484-15-P2NW |
| Contract Date | 4-6-2015 |
| Description of Work | Technical Engineering and Maintenance Services (TEMS) |
| Delivery Date | 30-6-2016 |
| Contract Value | $106,655.05 |
| Comments | This contract was competitively sourced. This contract is a call-up against a Public Works and Government Services procurement tool. |
| Additional Comments | DND requires the services of one (1) Intermediate Life Cycle Management Specialist for the Directorate of Quality Assurance. This requirement will be from date of contract award to one (1) year later, with an irrevocable option for two (2) additional one |


Requirements
Requirements to run SharpMT are pretty simple:
While offline:
- A Windows-based PC
- .NET Framework, version 2.0 (download it now)
While online (to post to a Blog server):
- A server that complies with the Blogger XML-RPC API, for example: MovableType or TypePad
- An Internet connection (for initial configuration and posting)