Configure Reporting Requirements
Impact™ allows you to define reporting requirements about the type of impact you would like to communicate. In order to this you must first define the Programmes you have. Next, you will define the Activities that you do in order to achieve the goals of the Programme. Then, you will define the Template to describe how you will capture the necessary data to communicate your Impact. Finally you will create KPIs to track the performance of your work.
Accessing the page
To access this page, select "Activities" from the "Settings" menu. On this page, you will be able to create Templates and KPIs.
Programmes
A programme is usually tied to a specific outcome area (i.e. Education). To create a programme, click "New Programme" at the top of the page. Each programme will appear in a drop down menu. You can switch between them. To edit the currently selected programme, click "Edit Programme".
Activities
Activities are created to describe general pieces of work that are happening to achieve the goals of the programme. You can create one or more activities. To create an activity, click "New Activity" under the Programme drop down. You can switch between the activities. To edit the currently selected activity, click "Edit Activity".
Templates
Templates define the type of data you would like to collect. They will contain a name to describe the template and a number of fields each with a specific type. Although not shown when creating a template, when users submit data for a template, they will be asked for the location and time of the record. The platform currently supports the following data types.
Short Answer
A text input used to collect fields that are less than 50 characters. This is useful for capturing short fields like names of people, places and things.
Paragraph
A text input to capture larger amount of text input. This is useful for capturing longer descriptive responses.
Number
A text input to capture numbers. This is currently the only field type that can be tracked in an KPI.
Date
An input where the user will be able to select from a Calendar. You do not need to ask when this event has happened because it is automatically asked as a field.
Multiple Choice
An input where the user will have radio buttons. They will be able to make one choice (You must specify at least option). This is useful for showing all the options and requesting the user to choose one.
Check Box
An input where the user will have checkboxes. They will able to select more than one option. You must specify at least option. There will be for you to add at least one option.
Drop Down
Similar to Multiple Choice, the only difference is that the user is shown a drop down instead. They will be able to make one choice. You must specify at least option. There will be for you to add at least one option.
Creating a Template
To create a Template click on the on the top right of the Templates section.
Editing a template
To Edit a template, click on the beside the Template.
KPIs
After creating a template, you can define a KPI to track the data collected from your template.
Describing the KPI
You can provide a name and description for the KPI. This will give context to the KPI for the users on your platform.
Configuring how the KPI will run.
You can enable/disable the KPI by choosing the appropriate value from the Status Drop Down. While the KPI is Inactive, no data will be collected against the KPI and it will not appear on the Impact™ dashboard. You can also specify when you would like to start (Reporting From) collecting the data and how often (Reporting Period).
Configuring how the KPI will be calculated.
You will be able to select the template from which the data will come from. Once selected, you can select the type of calculation you want to make
- Count - Simply count the number of entries that have been made for this template
- Sum - Sum a number field within the template over the reporting period
- Average - Take the average of the values of a number field within the template over the reporting period.
- Ratio - Take a ratio of two number fields within the template over the reporting period.
For The last three types are only applicable for number fields. Once selected, you can enter the expected projected value you would like the KPI to be measured against.
Creating a Suggested KPI
To create a KPI click on the on the top right of the KPIs section. table.
Editing a KPI
To Edit a KPI, click on the beside the KPI
Submitting Records
Once a template has been created, you can start submitting records based on the template. This can be done on the Activities screen or on the main dashboard. All reports require a time and location. The additional fields will be based on the configurations done by your Impact&trace; administrator. All fields are currently required.
Creating a Record
To create a record click on the on the top right of the Records section. table.
Graphs
Graphs can be created to visualize your data. They will appear in both your dashboard and in Accelerate™ for your funders. The data can be created from the records that you have submitted or the historical values of the KPIs. Each graph you create will appear in its own tile.
Creating a Graph
To create a KPI click on the on the top right of the Graphs section. table.
Describing the Graph
You can provide a name and description of the graph. This will appear as the title of Graph tile that displays your graph. You can also specify what type of chart you would like to use. Currently the platform supports bar, line, pie and radar.
Configuring the Graph Source
Once you have selected the graph type, you can specify the source. It can be either Records or KPIs. If you choose to use a radar graph, you would only be able to use Records. You will also need to make sure that the Records you use have more than 1 number field to take advantage of the Radar format. If you have chosen Records, you will be required to select a "X Values" for your graph.
Editing a Graph
To Edit a KPI, click on the beside the Graph entry.


CrimPapers
Articles published on 12 May 2020
On 12 May 2020, 12 new articles were published in 9 journals.
Further Rejection of the Cybercrime Hypothesis by Graham Farrell and Daniel Birks
Judicial Perspectives on the Sentencing of Minor Drug Offenders in Indonesia: Discretionary Practice and Compassionate Approaches
Feminist Criminology in An Era of Misogyny by Meda Chesney‐lind
The Christmas Market Attack in Berlin and Attitudes Toward Refugees: A Natural Experiment With Data From the European Social Survey
Post-Traumatic Stress Disorder and Employment in Women Reporting Abuse: 5-Year Data From A Longitudinal Study
Stereotypical Behavioural Cues — But Not Their Order — Influence Credibility Judgements by Glynis Bogaard,
ewout H. Meijer
Misinformation Encountered During A Simulated Jury Deliberation Can Distort Jurors' Memory of A Trial and Bias Their Verdicts by Craig Thorley,
lara Beaton,
phillip Deguara,
brittany Jerome,
dua Khan,
kaela Schopp
Outbidding and Gender: Dynamics in the Colombian Civil War by Alexis Henshaw
Do White Supremacist Women Adopt Movement Archetypes of Mother, Whore, and Fighter? by Mehr Latif, Kathleen Blee, Matthew Demichele, Pete Simi
Exceptional Inclusion: Understanding the Pkk’s Gender Policy by Ora Szekely
The Lure of (violent) Extremism: Gender Constructs in Online Recruitment and Messaging in Indonesia by Melissa Frances Johnston, Muhammad Iqbal, Jacqui True
Toward Redemption: Aboriginal And/or Torres Strait Islander Men’s Narratives of Desistance From Sexual Offending by Kelly Richards, Jodi Death, Kieran McCartan


PTA refutes notification advising mobile users to quit services of cellular company
by News DeskThe Pakistan Telecommunication Authority (PTA) on Sunday clarified that a notification circulating on social media platforms about the suspension of a telecom company’s services in the country is “fake”.
In the notification, customers were misled to switch to another mobile network or consume their mobile credit before December 11, 2019, claiming that the services of the private company would no longer be available in the country.
“[The] PTA is aware of a false advertisement circulating via WhatsApp chat groups for users of a mobile operator. [The] PTA clarifies that the aforementioned advertisement is fake,” said the telecom authority on its official Twitter handle.
It also urged the users “to refrain from circulating it since it might generate confusion and inconvenience for consumers”.
“The public is advised to always check official information sources such as PTA’s website at http://pta.gov.pk or its Twitter & Facebook page for latest news/updates.


Toggle navigation
ALICERAD
Overview
PID Generation
Particle Identification
Downloads
Contacts
Downloads
Documents
PID Generation
Literature Review
Final Paper
Particle Identification
Literature Review
Final Paper
Project Proposal
Poster
Minutes
1 June 2015
30 June 2015
13 July 2015
14 July 2015
21 July 2015
27 August 2015
3 September 2015
23 September 2015
7 October 2015
14 October 2015
Time Line
Gantt Chart
Code
PID Generation Code
Particle Identification Code


| Total net profit | -23.98 | Gross profit | 39.23 | Gross loss | -63.21 |
| Profit factor | 0.62 | Expected payoff | -0.24 | ||
| Absolute drawdown | -23.98 | Maximal drawdown (%) | 24.78 (3097.5%) | ||
| Total trades | 99 | Profit trades (% of total) | 50 (50.51%) | Loss trades (% of total) | 49 (49.49%) |
| Long positions (won %) | 47 (57.45%) | Short positions (won %) | 52 (44.23%) | ||
| Largest | profit trade | 3.62 | loss trade | -2.78 | |
| Average | profit trade | 0.78 | loss trade | -1.29 | |
| Minimum | profit trade | 0.04 | loss trade | -0.02 | |
| Maximum | take profit in pips | 49.5 | stop loss in pips | -35.9 | |
| Average | take profit in pips | 12.4 | stop loss in pips | -19.5 | |
| Minimum | take profit in pips | -1.3 | stop loss in pips | -4.5 | |
| Maximum | Reward-Risk | 3.5 | Duration in minutes | 3314 | |
| Average | Reward-Risk | 0.8 | Duration in minutes | 222.2 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 0 | |
| Maximum | consecutive wins (profit in money) | 6.0 (4.19) | consecutive losses (loss in money) | 5.0 (-5.39) | |
| Average | consecutive wins | 1.0 | consecutive losses | 1.0 |
| Total net profit | -8.93 | Gross profit | 16.86 | Gross loss | -25.79 |
| Profit factor | 0.65 | Expected payoff | -0.19 | ||
| Absolute drawdown | -8.93 | Maximal drawdown (%) | 10.28 (761.48%) | ||
| Total trades | 47 | Profit trades (% of total) | 27 (57.45%) | Loss trades (% of total) | 20 (42.55%) |
| Largest | profit trade | 3.62 | loss trade | -2.78 | |
| Average | profit trade | 0.62 | loss trade | -1.29 | |
| Minimum | profit trade | 0.04 | loss trade | -0.02 | |
| Maximum | take profit in pips | 49.5 | stop loss in pips | -35.9 | |
| Average | take profit in pips | 10.1 | stop loss in pips | -21.2 | |
| Minimum | take profit in pips | -1.3 | stop loss in pips | -7.9 | |
| Maximum | Reward-Risk | 2.2 | Duration in minutes | 3314.0 | |
| Average | Reward-Risk | 0.5 | Duration in minutes | 202.3 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 0.0 | |
| Maximum | consecutive wins (profit in money) | 9.0 (5.08) | consecutive losses (loss in money) | 4.0 (-4.43) | |
| Average | consecutive wins | 2.0 | consecutive losses | 1.0 |
| Total net profit | -15.05 | Gross profit | 22.37 | Gross loss | -37.42 |
| Profit factor | 0.6 | Expected payoff | -0.29 | ||
| Absolute drawdown | -16.33 | Maximal drawdown (%) | 18.12 (1012.29%) | ||
| Total trades | 52 | Profit trades (% of total) | 23 (44.23%) | Loss trades (% of total) | 29 (55.77%) |
| Largest | profit trade | 2.29 | loss trade | -2.3 | |
| Average | profit trade | 0.97 | loss trade | -1.29 | |
| Minimum | profit trade | 0.36 | loss trade | -0.36 | |
| Maximum | take profit in pips | 30.0 | stop loss in pips | -33.3 | |
| Average | take profit in pips | 14.4 | stop loss in pips | -17.9 | |
| Minimum | take profit in pips | 3.5 | stop loss in pips | -4.5 | |
| Maximum | Reward-Risk | 3.5 | Duration in minutes | 3304.0 | |
| Average | Reward-Risk | 1.0 | Duration in minutes | 240.2 | |
| Minimum | Reward-Risk | Duration in minutes | 3.0 | ||
| Maximum | consecutive wins (profit in money) | 3.0 (3.9) | consecutive losses (loss in money) | 4.0 (-7.62) | |
| Average | consecutive wins | 1.0 | consecutive losses | 2.0 |


Located on the SW coast of the island, Anping is a recently built government marina in the historic city of Tainan. This ancient port still retains some of its old buildings.
The marina is regarded as typhoon-proof and the prices are very reasonable because the government charges are based on the vessel's gross tonnage and not length. This however may change in the future.
Position 22°58' N, 120°09' E.
This is not a Port of Entry, however yachts have been reported to arrive here and clearance facilitated given that pre-arrival formalities have been completed.
The Tainan Sailing School, close to the new marina, should be able to help with clearance formalities.
Last updated April 2016.
Outside Anping Harbour there are extensive oyster farms, so approach with caution. If you approach the port at 90 degrees from approx. 2 miles off, you should be able to navigate safe passage through the farms. Obviously, approach at night is not advisable. There are no lights and no markers at all.
The security dock is on your port side as you enter the harbour. The marina is situated at the head of the basin.
There are very limited facilities currently, except public toilets, but there are plans to build further.
Last updated June 2014.


SPORT
Introduction
SPORT is a text-based offline software package which makes it possible to write ABB robot programs in the language Arla on an external personal computer and then download them to an S3 robot controller. It is fully compatible with Arla programmes created by Workspace and may be used as an alternative to using ABB software to download these text files to an S3 controller.
The latest release of SPORT has the following capabilities:
File compilation - Convert a robot program from ARLA to binary code.
Task compilation - Convert all robot programs in a task from ARLA to binary code.
Diskette Functions - Using diskette to transfer program between robot and PC.
On Line Communication - Communication between robot and PC via serial link.
File decompilation - Convert a robot program from binary code to ARLA robot language.
Block decompilation - Convert a block of robot programs from binary code to ARLA.
Program Editor - Creating robot programs and transfer position and orientation data via DDE to SPORT from AutoCAD.
OLP-import - A file with .irb extension created in OLP3 (english or swedish) can be converted to SPORT standard.
Printing - Print a file: File, Print, (notepad starts with the actual file), you may add comments to the file, Arkiv, Skriv ut.
Possible to specify a Word processor (WinWord, Write, Notepad...). The word processor is started from the menu or by Ctrl+Enter in a .rpl-file or a selected .rpl-file in the task-file.
If a file excedes 64kb the specified word processor will be started automatically.
As a complement to task a new feature with block files (extension .IRB) has been introduced which is compatible with olp irb files.
This version of SPORT has debugging capabilities. This application shows the current running line in the task by highlighting it.
Prodebug.exe has DDE (Dynamic Data Exchange) to the to sailserv.exe, a module for robot control.
This version is shipped with the ADS aplication SAIL (Simulation AId for Link mechanisms). This is a general module for kinematic simulation in AutoCAD for Windows. Via DDE are the module SAILSERV and SAIL communicating and the model of the ABB2000 are automatically updated during the simulation.
New Features in the latest release
Release 1.51 adds new features to the SPORT system.
TCP calibration - You are now able to measure the TCP and Basepoint of the robot and directlly update the
TCP register of the controller.
External axes are now supported both in the editor and in the communication part
[ Return to Home Page ]
Workspace and Robotrak are registered trademarks of Robot Simulations Ltd.
Copyright © 1996 Robot Simulations Ltd
Last revision 3 April 1996


Logo
Navbar Link
Navbar Link
menu
Title
Do-It-Yourself S/4HANA on-premise. Connect it with SAP Cloud Platform
Reflesh Table


vignettes/working_with_large_tables.Rmd
working_with_large_tables.Rmd
Most StatCan tables are small in size and can easily processed in
memory. However, some tables are so large that this is not a feasible
strategy. Table 43-10-0024
is one such example and comes
with a CSV file that is several gigabytes in size. In cases like this it
is more useful to store and access the data as an SQLite database using
the get_cansim_sqlite
function instead of the usual
get_cansim
. In these circumstances it is also useful to
cache the data for longer than just the current R session, and the
data_cache
option allows to specify a permanent location.
It defaults to getOption("cansim.cache_path")
, and if this
option is not set it will only cache the data for the duration of the
current session.
For this vignette we use the (rather small) motor vehicle sales data as an example.
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(ggplot2)
library(cansim)
One main difference to the get_cansim
method is that
get_cansim_sqlite
does not return data but only a
connection to the database. This allows us to filter the data before
fetching the data into memory. When this is called the first time it
will fetch the data, parse it into an SQLite database, index the main
columns. This can take a significant amount of time, depending on the
size of the table. In any subsequent call it will simply open a database
connection to the cached database.
connection <- get_cansim_sqlite("20-10-0001")
#> Accessing CANSIM NDM product 20-10-0001 from Statistics Canada
#> Parsing data
#> Indexing GEO
#> Indexing Vehicle type
#> Indexing Origin of manufacture
#> Indexing Sales
#> Indexing Seasonal adjustment
#> Indexing REF_DATE
#> Indexing DGUID
#> Indexing GeoUID
We can inspect the data by looking at the first few columns to get a general idea of what the data looks like.
head(connection)
#> # Source: SQL [6 x 19]
#> # Database: sqlite 3.39.1 [/private/var/folders/z4/gcjq2cd93p3bs5bgp8j2vv240000gp/T/RtmpKtaMtv/cansim_20100001_eng/20100001-eng.sqlite]
#> REF_D…¹ GEO DGUID Vehic…² Origi…³ Sales Seaso…⁴ UOM UOM_ID SCALA…⁵ SCALA…⁶
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 1946-01 Cana… 2016… Total,… Total,… Units Unadju… Units 300 "units… 0
#> 2 1946-01 Cana… 2016… Total,… Total,… Doll… Unadju… Doll… 81 "thous… 3
#> 3 1946-01 Cana… 2016… Passen… Total,… Units Unadju… Units 300 "units… 0
#> 4 1946-01 Cana… 2016… Passen… Total,… Units Season… Units 300 "units… 0
#> 5 1946-01 Cana… 2016… Passen… Total,… Doll… Unadju… Doll… 81 "thous… 3
#> 6 1946-01 Cana… 2016… Trucks Total,… Units Unadju… Units 300 "units… 0
#> # … with 8 more variables: VECTOR <chr>, COORDINATE <chr>, VALUE <dbl>,
#> # STATUS <chr>, SYMBOL <chr>, TERMINATED <chr>, DECIMALS <chr>, GeoUID <chr>,
#> # and abbreviated variable names ¹REF_DATE, ²`Vehicle type`,
#> # ³`Origin of manufacture`, ⁴`Seasonal adjustment`, ⁵SCALAR_FACTOR,
#> # ⁶SCALAR_ID
To make good use of the data we will have to look at the metadata and
inspect the member columns and variables available. The metadata will be
available in the R session after the database connection has been
opened. Trying to access the metadata before the connection has been
opened will result in the package to attempt to download the data via
the get_cansim
call, which the
get_cansim_sqlite
function is trying to avoid.
get_cansim_table_overview("20-10-0001")
#> New motor vehicle sales
#> CANSIM Table 20-10-0001
#> Start Reference Period: 1946-01-01, End Reference Period: 2022-11-01, Frequency: Monthly
#>
#> Column Geography (11)
#> Newfoundland and Labrador, Prince Edward Island, Nova Scotia, New Brunswick, Quebec, Ontario, Manitoba, Saskatchewan, Alberta, British Columbia and the Territories, ...
#>
#> Column Vehicle type (3)
#> Passenger cars, Trucks, Total, new motor vehicles
#>
#> Column Origin of manufacture (5)
#> North America, Total, overseas, Japan, Other countries, Total, country of manufacture
#>
#> Column Sales (2)
#> Units, Dollars
#>
#> Column Seasonal adjustment (2)
#> Unadjusted, Seasonally adjusted
This gives us an understanding of the available variables. For the
purpose of this vignette we are interested in the breakdown of sales
units by Vehicle type in Canada overall. The data is stored in its raw
form in the database, the only processing done is that it is augmented
by the GeoUID. In order to work with it we need to collect
the data. If the only operation done is filtering, and no selection or
renaming of columns was done before accessing the data, we can utilize
the custom collect_and_normalize
function to collect and at
the same time normalize the data so it will appear the same way as if we
had used the get_cansim
function. This will add the
category and hierarchy metadata and the normalized value column.
data <- connection %>%
filter(GEO=="Canada",
`Seasonal adjustment`=="Unadjusted",
Sales=="Units",
`Origin of manufacture`=="Total, country of manufacture",
`Vehicle type` %in% c("Passenger cars","Trucks")) %>%
collect_and_normalize()
data %>% head()
#> # A tibble: 6 × 30
#> REF_DATE GEO DGUID UOM UOM_ID SCALA…¹ SCALA…² VECTOR COORD…³ VALUE STATUS
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <chr>
#> 1 1946-01 Canada 2016… Units 300 "units… 0 v4216… 1.2.1.… 1102 NA
#> 2 1946-01 Canada 2016… Units 300 "units… 0 v4216… 1.3.1.… 1654 NA
#> 3 1946-02 Canada 2016… Units 300 "units… 0 v4216… 1.2.1.… 1609 NA
#> 4 1946-02 Canada 2016… Units 300 "units… 0 v4216… 1.3.1.… 2154 NA
#> 5 1946-03 Canada 2016… Units 300 "units… 0 v4216… 1.2.1.… 4734 NA
#> 6 1946-03 Canada 2016… Units 300 "units… 0 v4216… 1.3.1.… 2466 NA
#> # … with 19 more variables: SYMBOL <chr>, TERMINATED <chr>, DECIMALS <chr>,
#> # GeoUID <chr>, val_norm <dbl>, Date <date>, `Hierarchy for GEO` <chr>,
#> # `Classification Code for Vehicle type` <chr>,
#> # `Hierarchy for Vehicle type` <chr>,
#> # `Classification Code for Origin of manufacture` <chr>,
#> # `Hierarchy for Origin of manufacture` <chr>,
#> # `Classification Code for Sales` <chr>, `Hierarchy for Sales` <chr>, …
Given the data we can further filter the date range and plot it.
data %>%
filter(Date>=as.Date("1990-01-01")) %>%
ggplot(aes(x=Date,y=val_norm,color=`Vehicle type`)) +
geom_smooth(span=0.2,method = 'loess', formula = y ~ x) +
theme(legend.position="bottom") +
scale_y_continuous(labels = function(d)scales::comma(d,scale=10^-3,suffix="k")) +
labs(title="Canada new motor vehicle sales",caption="StatCan Table 20-10-0001",
x=NULL,y="Number of units")
When we don’t need the database connection any more we should remember to close it. This frees up resources and keeps the database handlers happy.
disconnect_cansim_sqlite(connection)
Since we now have the option of a more permanent cache we should take
care to manage that space properly. The
list_cansim_sqlite_cached_tables
function gives us an
overview over the cached data we have.
list_cansim_sqlite_cached_tables()
#> # A tibble: 1 × 8
#> cansimTa…¹ langu…² timeCached sqlit…³ title path timeReleased
#> <chr> <chr> <dttm> <chr> <chr> <chr> <dttm>
#> 1 20-10-0001 eng 2023-01-19 22:02:01 45.5 Mb New … cans… 2023-01-19 13:30:00
#> # … with 1 more variable: upToDate <lgl>, and abbreviated variable names
#> # ¹cansimTableNumber, ²language, ³sqliteSize
Cached data won’t update automatically, we will have to pass the
refresh=TRUE
option to refresh it manually when we want a
fresh data pull from StatCan. If we want to free up disk space we can
remove a cached table.
remove_cansim_sqlite_cached_table("20-10-0001")
#> Removing cached data for 20-10-0001 (eng)
#> NULL


analyze_threshold_percent
Values (Default in Bold)
10, 0 to 100.0
Description
Sets the threshold for percentage of rows changed for analyzing a table. To reduce
processing time and improve overall system performance, Amazon Redshift skips analyze
for any table
that has a lower percentage of changed rows than specified by
analyze_threshold_percent
. For example, if a table contains 100,000,000
rows and 9,000,000 rows have changes since the last ANALYZE, then by default the table
is skipped because fewer than 10 percent of the rows have changed. To analyze tables
when only a small number of rows have changed, set
analyze_threshold_percent
to an arbitrarily small number. For example,
if you set analyze_threshold_percent
to 0.01, then a table with 100,000,000
rows will not be skipped if at least 10,000 rows have changed. To analyze all tables
even if no rows have changed, set analyze_threshold_percent
to 0.
You can modify the analyze_threshold_percent
parameter for the current
session only by using a SET command. The parameter can't be modified in a parameter
group.
Example
set analyze_threshold_percent to 15; set analyze_threshold_percent to 0.01; set analyze_threshold_percent to 0;


@(params: Map[String, Any]) @uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "Your Insurance Premium Tax return application has been successfully submitted"){
Dear Customer,
We have received your application to file your Insurance Premium Tax return online.
We send a confirmation email for returns filed online.
If you need to contact us about your application, please quote your IPT registration number.
Thank you.
From the HMRC Insurance Premium Tax Scheme
}


New mail from jhon15 minutes ago
New member John joined25 minutes ago
New mail from jhon30 minutes ago
New member John joined1 hour ago


Translator:walsvid
Author:labuladong
Queue is a FIFO (first-in-first-out) strategy data structure, while Stack is a FILO (first-in-last-out) data structure. The visual description of these data structures is shown in the figure:
The basics of these two data structures are actually implemented by arrays or linked lists, but the API limits their behavior. So let’s take a look at how to use “Stack” to implement a “Queue” and how to use “Queue” to implement a “Stack”.
First, the API of Queue are as follows:
class MyQueue {
/** Push element x to the back of queue. */
public void push(int x);
/** Removes the element from in front of queue and returns that element. */
public int pop();
/** Get the front element. */
public int peek();
/** Returns whether the queue is empty. */
public boolean empty();
}
We can use two stacks s1,s2
to implement the function of a queue (it may be easier to understand to place the stack horizontally):
class MyQueue {
private Stack<Integer> s1, s2;
public MyQueue() {
s1 = new Stack<>();
s2 = new Stack<>();
}
// ...
}
When calling push
to enqueue an element, we only need to push the element into s1
. For example, if we push
3 elements into 1,2,3, then the detailed structure is like this:
So what if using peek
to get the front element of the queue at this time? Logically speaking, the front element should be 1, but in s1
, 1 is pushed to the bottom of the stack. Now we can use s2
to transit elements. When s2
is empty, all elements of s1
can be moved tos2
, at this time the elements in s2
are FIFO (first-in-first-out) order.
/** Get the front element. */
public int peek() {
if (s2.isEmpty())
// move elements from s1 to s2
while (!s1.isEmpty())
s2.push(s1.pop());
return s2.peek();
}
Similarly, for the pop
operation, we only need to operate s2
.
/** Removes the element from in front of queue and returns that element. */
public int pop() {
// First call peek to ensure that s2 is not empty.
peek();
return s2.pop();
}
Finally, how to determine the queue is empty? If both stacks are empty, the queue is empty:
/** Returns whether the queue is empty. */
public boolean empty() {
return s1.isEmpty() && s2.isEmpty();
}
So far, we implement a queue with stacks. The core idea is to use two stacks to cooperate with each other.
It is worth mentioning, what is the time complexity of these operations? What’s interesting is that the peek
operation may trigger a while
loop when it is called. In this case, the time complexity is O(N), but in most cases, the while
loop will not be triggered and the time complexity is O(1). Since the pop
operation calls peek
, its time complexity is the same as peek.
In this case, it can be said that their worst time complexity is O(N), because, including a while
loop, it may be necessary to move elements from s1
to s2
.
However, their average time complexity is O(1). We can understand it in this way: For an element, it can only be moved at most once, which means that the average time complexity of each element of the peek
operation is O(1).
If it is tricky to use 2 stacks to implement a queue, then using queue to implement stack is much more straightforward, requiring only one queue as the basic data structure.
First, the API of stack are as follows:
class MyStack {
/** Push element x onto stack. */
public void push(int x);
/** Removes the element on top of the stack and returns that element. */
public int pop();
/** Get the top element. */
public int top();
/** Returns whether the stack is empty. */
public boolean empty();
}
Let’s talk about the push
API first. We can add elements directly to the queue, and record the rear element at the same time. Since the rear element is equivalent to the top element of the stack, if we want to use top
to get the top element of the stack, we can directly return it:
class MyStack {
Queue<Integer> q = new LinkedList<>();
int top_elem = 0;
/** Push element x onto stack. */
public void push(int x) {
// x is the rear element of queue, it also the top element of stack.
q.offer(x);
top_elem = x;
}
/** Return the top element. */
public int top() {
return top_elem;
}
}
Our basic data structure is a FIFO queue, and each pop
can only take elements in front of the queue; But the stack is FILO, which means the pop
API takes elements from the rear of the queue.
The solution is simple. We can take out the front element of the queue and add it to the rear of the queue, and let the previous rear element line up to the head of the queue, and then we can take it out:
/** Removes the element on top of the stack and returns that element. */
public int pop() {
int size = q.size();
while (size > 1) {
q.offer(q.poll());
size--;
}
// the previous rear element reaches the head of the queue
return q.poll();
}
There is still a small problem with this implementation. The original rear element has reached to the head of the queue and has been deleted, but the top_elem
variable was not updated. We need a little modification:
/** Removes the element on top of the stack and returns that element. */
public int pop() {
int size = q.size();
// Leave the last 2 elements
while (size > 2) {
q.offer(q.poll());
size--;
}
// Record the new rear element
top_elem = q.peek();
q.offer(q.poll());
// Remove the previous rear element
return q.poll();
}
In the end, the empty
API is easy to implement, just check if the underlying queue is empty:
Obviously, if we implement a stack with a queue, the time complexity of the pop
operation is O(N), and all other operations are O(1).
I think that implement a stack with a queue is a trivial problem, but implement a queue with a dual stack is worth learning.
After moving elements from stack s1
to s2
, the elements become the FIFO order of the queue in s2. This feature is similar to “Two negatives make an affirmative.,” which is not easy to think.
I hope this article is helpful to you.
“Stick to original high-quality articles, and work hard to make algorithmic problems clear.”


Batman A movie review by Monika Huebner Copyright 1998 Monika Huebner
Director: Tim Burton Cast: Michael Keaton, Kim Basinger, Jack Nicholson
Tim Burton, the man who recently brought us the bizarre and shrill 'Mars Attacks!' directed 'Batman' in 1988. I've been avoiding movies like that for years. Let's see if I was right.
The running time is 118 minutes. It took me one of those almost two hours to find out what was going on. Half the movie. Unbelievable, the fans will say. In this first hour the viewers are introduced to Gotham City and the people who live there. In one of the first scenes we meet Batman (Michael Keaton), who scares away two dark figures in a dark night. So, he's one of the good guys, I understand. Two other characters we meet are Jack (Jack Nicholson) and the press photographer Vicki (Kim Basinger). Then there's Bruce Wayne, a mysterious single gentleman who falls in love with Vicki. Or vice versa, I'm not quite sure. After another long while I understood that he is Batman. I wish they'd told the uninitiated viewer a little sooner. And Tim Burton worked so hard on his introduction.
 Batman tries to stop him. He has an old bone to pick with Jack, who many years ago shot his parents while he was watching.
Jack is easily spotted as the villain. A guy who looks like this can't be up to anything good. Jack Nicholson certainly was a good choice for the part. He has the potential to play a real psychopath. He didn't need much make-up: just some white and red color and stuffed out cheeks and you have a joker. Once more I thought that this is the ideal kind of part for Nicholson. As long as he can be mean he is great. But even the best villain in the end has to succumb to the good guys.
Michael Keaton is Batman. The honor of saving Gotham City dressed in a black rubber suit is his. Allegedly there are some women who saw the movie for this reason alone. I was surprised to find that he was seen more often as Bruce Wayne without the suit. His acting was more convincing in those scenes than the bat-scenes. To me the rubber suit is as sexy as a hose.
I can't say much about Kim Basinger as Vicki either. She is introduced as a press photographer who neglects personal danger to obtain a good story. And that's all. Her character remains flat and one-dimensional. Batman (of course) gets to save her from evil joker. Why is it that women in Hollywood movies always have to be saved?
All in all the movie looked less "comic-like" than I had feared. The set design was gloomy rather than shrill and colorful. However I had hoped for a more bizarre movie. At least that was what I expected a Tim Burton movie to be after seeing 'Mars Attacks!'. But 'Mars Attacks!' isn't supposed to be a typical Burton movie. I heard that his real fans don't like it. Danny Elfman's musical score wasn't too good this time either. I think I'll leave 'Batman' to the real fans and watch 'Mars Attacks!' again.
Homepage: Book and movie reviews http://www.inka.de/sites/darwin/indexalt.html
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


public interface
TaxonomyWriterCache
DirectoryTaxonomyWriter
).
It basically has put() methods for adding a mapping, and get() for looking a mapping up the cache. The cache does not guarantee to hold everything that has been put into it, and might in fact selectively delete some of the mappings (e.g., the ones least recently used). This means that if get() returns a negative response, it does not necessarily mean that the category doesn't exist - just that it is not in the cache. The caller can only infer that the category doesn't exist if it knows the cache to be complete (because all the categories were loaded into the cache, and since then no put() returned true).
However,
if it does so, it should clear out large parts of the cache at once, because
the user will typically need to work hard to recover from every cache
cleanup (see
put(CategoryPath, int)
's return value).
| Modifier and Type | Method and Description |
|---|---|
void
|
close
()
Let go of whatever resources the cache is holding.
|
int
|
get
(
CategoryPath
categoryPath)
Lookup a category in the cache, returning its ordinal, or a negative
number if the category is not in the cache.
|
int
|
get
(
CategoryPath
categoryPath,
int length)
Like
get(CategoryPath)
, but for a given prefix of the
category path.
|
boolean
|
hasRoom
(int numberOfEntries)
Sometimes the cache is either unlimited in size, or limited by a very
big size, and in that case when we add a lot of categories it might
make sense to pre-load the cache with all the existing categories.
|
boolean
|
put
(
CategoryPath
categoryPath,
int ordinal)
Add a category to the cache, with the given ordinal as the value.
|
boolean
|
put
(
CategoryPath
categoryPath,
int prefixLen,
int ordinal)
Like
put(CategoryPath, int)
, but for a given prefix of the
category path.
|
void close()
int get( CategoryPath categoryPath)
It is up to the caller to remember what a negative response means: If the caller knows the cache is complete (it was initially fed with all the categories, and since then put() never returned true) it means the category does not exist. Otherwise, the category might still exist, but just be missing from the cache.
int get( CategoryPath categoryPath, int length)
get(CategoryPath)
, but for a given prefix of the
category path.
If the given length is negative or bigger than the path's actual length, the full path is taken.
boolean put( CategoryPath categoryPath, int ordinal)
If the implementation keeps only a partial cache (e.g., an LRU cache)
and finds that its cache is full, it should clear up part of the cache
and return
true
. Otherwise, it should return
false
.
The reason why the caller needs to know if part of the cache was cleared is that in that case it will have to commit its on-disk index (so that all the latest category additions can be searched on disk, if we can't rely on the cache to contain them).
Ordinals should be non-negative. Currently there is no defined way to specify that a cache should remember a category does NOT exist. It doesn't really matter, because normally the next thing we do after finding that a category does not exist is to add it.
boolean put( CategoryPath categoryPath, int prefixLen, int ordinal)
put(CategoryPath, int)
, but for a given prefix of the
category path.
If the given length is negative or bigger than the path's actual length, the full path is taken.
boolean hasRoom(int numberOfEntries)
After hasRoom(n) returned
true
, the following n put()
should return false (meaning that the cache was not cleared).


[gecode-users] problems in the compilation - gecode 2.2.0
Mauricio Toro
mauriciotorob at gmail.com
Mon Sep 20 18:11:34 CEST 2010
The headers are missing; however, since you are in Gecode's folder, I think
you can compile the examples adding "-I."
> g++ -I. -I/usr/local/include -c ./examples/all-interval.cc
To install the headers, verify that you executed "make install" as root
during the installation.
Mauricio
2010/9/20 Guido Tack <tack at gecode.org>
> Jonathan Almache Montoya wrote:
>
> > Hello everyone
> > I have problems in the compilation of the examples with gecode 2.2.0
> > I'm using Ubuntu 9.10 , g++-4.3 and gcc-4.3
> > I have verified and there's a folder named lib in /usr/local/ and other
> named include...
> >
> > the command used into gecode folder is:
> > g++ -I/usr/local/include -c ./examples/all-interval.cc
>
> The compiler doesn't find the header files. This is not a Gecode problem,
> check your installation.
>
> Cheers,
> Guido
>
> --
> Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
>
>
>
>
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
--
Mauricio TORO BERMUDEZ
Research Postgraduate Student (Ph.D)
Computer Science Research Laboratory of Bordeaux (LABRI)
Université de Bordeaux 1
http://www.labri.fr/perso/mtoro/
351, cours de la Libération
F-33405 Talence Cedex. France.
Phone: (+33) 5 4000 24 85
Fax: (+33) 5 4000 66 69
Please don't print this e-mail unless you really need to.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20100920/7aa5f1d2/attachment.htm>
More information about the users
mailing list


WITNESS LIST Public Safety Committee March 26, 2001-12:30P HB 195 For: Baxter, Hannah (Self) Higgins, Carlos (Texas Silver-Haired Legislature) On: Caskey, Marshall (DPS) Hughes, Jolene (DPS) Jordan, Paul (DPS) HB 232 For: Barber, Thomas (Burleson County Sheriffs Department) Cook, Randie (Self) Edworthy, Allan (Self) Edworthy, Ethel (Self) McDonald, Mary (Self) Oberts, Niva (Self) Swearingen, Thomas (Self) Against: Ball, Ann (Self and ASSIST) Burt, Bob (Self and Associate Security Services and Investigators of the State of Texas) DeLord, Ron (CLEAT) Gaylor, Tom (Texas Municipal Police Association) Grimes, Phyllis (Self) Griswold, Susan (Self and ASSIST) Hearne, Ed (Self) Lakes, Booker (Self and Comprehensive Investigations and Security, Inc.) Lakes, Kimberly (Self and ASSIST) Lakes, Ranjeet (Self and Comprehensive Investigations) McReynolds, Kathy (Self) Mingo, Velma (Self and ASSIST) Oakley, Keith (ASSIST) Parker, Dave (Self and ASSIST - Houston Chapter) Roberts, Walter (Self and ASSIST) Ruiz, Hubert (Self) Scepanski, Dave (Self and Associate Security Services and Investigators) Villarreal, Kim (Self) West, Dan (Security Services of Texas) On: Marticheck, Hans (Houston Police Officers' Union) McGlasson, Jerry (Texas Commission on Private Security) HB 1396 For: Johnson, Mike (Self and Tarrant County Fire Chiefs Association) McMacken, Patrick (City of Irving) Mendez, Mark (Tarrant County Commissioners Court) Paniagua, Joe (City of Fort Worth City Council) Picht, Clyde (Fort Worth City Council) Wells, Keith (City of Fort Worth) Against: Leahy, Timothy (Southwestern Bell Telephone) On: Clayton, Bill (City of Irving) HB 1479 For: Patterson, Jerry (Houston Gun Collectors Association, Houston Safari Club) Tripp, Alice (Texas State Rifle Association) West, Dan (Texas Concealed Handgun Association) On: Middaugh, Margie (Department of Public Safety) HB 1762 On: Elder, Frank (Texas DPS) HB 2204 For: Cummins, Gayle (Texas Bicycle Coalition) Gerlich, Dr. Nicholas (Self) Hester, Keith (Self) Russell, Hazel (Self) Tyree, Preston (Texas Bicycle Coalition) Woods, Lt. Tom (International Police Mountain Bike Association) HB 2230 On: Elder, Frank (Texas DPS) HB 2618 For: Duffey, Tesa (Texas Gulf Coast Emergency Management) McMacken, Patrick (Emergency Management Association of Texas) On: Millwee, Tom (Texas Department of Public Safety Division on Emergency Management) HB 2987 For: Montague, David (Self and Tarrant County District Attorney's Office)


| DOSE: |
1 tablet |
oral |
MDMA |
(pill / tablet) |
For those who have only done Ecstacy at a Rave, I hate to inform you that your experiences may have been incredibly lacking.
Before this incident, I had only taken MDMA on one occasion. For my birthday, a friend gave me half a hit and took me for a drive in the mountains. I'd read a lot about MDMA and felt comfortable with the risks and understood the precautions. It was a wonderful feeling, nothing too strong. Subtle tingling, a noticeable shift in the tracking of my vision and my attention. And overall, it just felt incredibly good. A wonderful experience, seeing the beauty around me in a new depth.
But that was hardly a preparation for the beach.
I'd planned on taking a full hit at the beach, a beautiful unspoiled pacific beach in a Latin American country. The setting was picture perfect, like something out of a post card. The weather hot. The waves beautiful. Miles of smooth sand.
We arrived with our preparations. Lots of sunscreen and a cooler loaded with beverages like gatorade. We all were mindful of the important to keep hydrated and cool. We continued to remind each other that under the influence of MDMA we had to be mindful that dangerous activities might look not so dangerous and that euphoric state might cause us to lose awareness of our bodies warning signs of thirst and hyperthermia.
We dropped.
45 minutes later, I felt it coming. And it hit like a train. I felt SO good. The amazing natural beauty around me was now so compelling that I was astonished. I simply could not fathom how beautiful everything was.
I wanted to experience and touch everything at once. The water, the waves, the sky, the sand, the wind, the feeling of the sun on my body. Trying desperately to take it all in.
The feeling the MDMA provides, not the tactile or visual sensory information, but the FEELING is amazing. Everything is just so good, so right, so lovely. I found myself just walking around saying, 'WOW! WOW! WOW!' Often times, I could only say this to myself or under my breath.
A secondary feeling that MDMA provided me was that EVERYTHING seemed 'really, really cool.' Someone brought a radio and started playing music I didn't like. Was it a problem? No. I was dancing to music I don't like, thinking about buying the damned CD. I don't even like dancing, but I felt that I couldn't stop.
I wasn't the only one to experience the 'really cool' evaluation of everything. I'd walk up to a fellow tripper and grap their shoulders and say, 'It's really cool!' and then we'd both say at the same time, 'It's really, really cool!' Seemed that everything was pretty darned cool, and I mean just about everything. Stupid hats were cool. Bad music was cool.
One thing I've noticed about MDMA that I've not seen others report is that people who are on it have very animated facial expressions.  Not bad, just something intensely interesting. I was doing this so badly in some conversation with some non-trippers that a friend gave me some sunglasses to mask my over-expressiveness.
I did experience the emotional closeness to others that is often described. I don't know if it was the same thing, but it definitely makes you feel open and allows you to see the parts of someone that are 'really cool' without being hung-up on what you don't like.
The overall sensation I would describe of my time at the beach was one of an overwhelming sense of how wonderful and beautiful life is. It was an experience so strong that I thought about all the people I'd love to share the experience with. (The next day I realized this wouldn't be the hottest idea, but I think the drive to share the sensation it provided was interesting.)
My physical symptoms included a certain fidgetiness. I loved standing and talking to people while working my feet deep into the sand. Lots of jaw clenching which was alleviated by plenty of gum chewing. ZERO appetite; only my pre-trip planning of bringing carb loaded sports drinks reminded me to swallow calories. Solid food would have been impossible; absolutely no appetite for that at all.
It was just a few hours of really intense experience, walking around, turning around and just saying to myself, 'OH GOD! WOW! This is so beautiful! I'm so happy!' I would have loved to shout it, but I retained enough sense of things to not do that.
As the effects subsided, I began to feel more subdued. Not tired, just very relaxed and contemplative. It's hard to describe but I felt like sitting still on the ground, but getting up to get something was not an effort. I just liked being still and checking things out, talking, contemplating.
While I've just described a very intense experience, something that many people would like to experience themselves, I want to caution all of those who read this about the dangers of MDMA. Dangers such as dehydration and hyperthermia can be a big concern at the beach. KNow what you are dealing with. Make plans to deal with things. Know that under MDMA you may engage in behavior that you would otherwise regard as risky. Decide what you are going to do before-hand and stick to it.
Some time later, I finally went to a rave on MDMA. It was a fun time, and the medicine still worked its magic. But it wasn't the same. Perhaps this is due to a lessening of the effects of the drug with time, but I don't think so. I explain it as this:
At the beach, I was experiencing a reality that I'm very familiar with. And thus, I was VERY aware of the changes, both striking and subtle, in my perception of things. Raves are not like everyday life.. the darkness, the strange colors, and so forth are things that most people aren't surrounded by much. They are kinda strange by themselves. Under such conditions I presume that it's hard to appreciate the difference in how your brain is experiencing the world under MDMA. Beyond that, the loud music precludes the type of dialogue with others that makes the experience so fun.
I had a good time at the rave, but I think I will be saving my future MDMA experiences for times when I am with people I enjoy, surrounded by great natural beauty, and able to really enjoy it. Look at it this way, in a normal daylight environment, with people you love, you can more experience the change brought about by the MDMA instead of being in a strange dance place where EVERYTHING is different from everyday life.
I'd like to close with urging people to be careful. Research, learn, know what you are doing. Know if you are under medication which could cause complications. Be prepared. Don't take more than a hit and a half and space out your sessions by a few weeks.
It's really, really cool.
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.


This module abstracts the concept of a random number generator. The base types are:
class random_gen { public: virtual double rand()=0; }; class affinerand: public random_gen { public: double scale, offset; affinerand(double s=1, double o=0, random_gen *g=NULL); void Set_gen(random_gen*); void set_gen(TCL_args args) {Set_gen(args);} template <class T> void new_gen(const T&); double rand() {return scale*gen->rand()+offset;} };
random_gen
is an abstract base class representing a random
number generator. affinerand
performs a simple affine
transformation on the contained random generator. The
random_gen*
argument to affine_rand()
may be used to set
the random generator employed. If NULL
(default) is passed for
this parameter, a uniform random generator of type urand is created
and used. After creation, you can either set the random generator to
be something else using Set_gen
, or create a new random
generator of the same type as the passed argument using
new_gen
. The set_gen
method is callable from TCL, and
takes a named random_gen
object as an argument. The class's
destructor will delete a generator created with newgen, but not delete
an object passed by setgen. For example, a normal distribution with
mean m and standard deviation s can be obtained with the declaration:
affinerand(s,m).newgen(gaussrand());
The other classes are:
class urand: public random_gen { public: double rand(); void Seed(int s); void seed(TCL_args args) {Seed(args);} #if defined(UNURAN) || defined(GNUSL) void Set_gen(char *); void set_gen(TCL_args args) {Set_gen(args);} urand(const char* descr) {Set_gen(descr);} #endif }; class gaussrand: public random_gen { public: urand uni; double rand(); };
urand
simply returns a uniform random variate in [0,1]. The
basic Eco Lab code contains a uniform generator which is simply an
interface to the standard library rand()
call, and a Gaussian
random generator, which is based on the algorithm described in
Abramowitz and Stegun (1964) sec. 26.8.6.a(2).
gaussrand
returns a normal variate with mean 0 and standard
deviation 1. Use gaussrand
coupled with affinerand
to
change the mean and standard deviation:
affinerand gen(2,.5,new gaussrand);defines a gaussian generator variable gen with standard deviation 2 and mean .5.
As of Eco Lab.4.D7, replacements for these routines using freely available libraries, unuran and GNUSL are available. The Makefile will select the UNURAN library if available, otherwise the GNU Scientific Library will be selected. If neither of these packages are available, the original basic behaviour is selected. Please read the section on problems with the basic random number library.
Both UNURAN and GNUSL provide a text interface to selecting and
configuring the uniform random generator. The method Set_gen
provides a way passing PRNG
parameters
to the underlying PRNG generator. By default the Mersenne Twister
algorithm is used, which is acknowledged as being one of the most
efficient random generator available. The algorithms available
through PRNG are:
The set available through GNUSL are:
class distrand: public random_gen { public: int nsamp; /* no. of sample points in distribution */ int width; /* digits of precision (base 16) used from prob. distribution */ double min, max; /* distribution endpoints */ distrand(): nsamp(10), width(3), min(0), max(1); void Init(int argc, char *argv[]); void init(double (*f)(double)); double rand(); }; #ifdef UNURAN class unuran: public random_gen { public: urand uni; UNUR_RAN *get_gen(); //get pointer to UNUR_RAN object for UNURAN API use /* specify a random generator according to unuran's string interface */ void Set_gen(const char *descr); void set_gen(TCL_args args) {Set_gen(args);} unuran(); unuran(const char* descr) {Set_gen(descr);} double rand(); }; #endif
distrand
returns a deviate from an arbitrary
distribution function (which needn't be normalised) supplied to
Init
(or init
). The instance variables nsamp=10
,
width=3
, min=0
and max=1
should be modified
before calling init
. Init
provides a TCL interface --
it takes one argument, the name of a TCL procedure implementing the
distribution. This class implements the method due to
Marsaglia[4]. The UNURAN and GNUSL libraries provide
other, perhaps better routines for doing the same things.
Finally, unuran
allows an arbitrary UNURAN generator to be
specified using UNURAN's string
interface.
For example, gaussrand
is equivalent to
unuran("normal()")
. The string interface is powerful and
comprehensive, with a large number of predefined distributions and
methods provided, and the ability to specify arbitrary
distributions. It obviates the need to use distrand
, which is a
rather obsolete algorithm.
GNUSL does not provide a string interace to its general nonuniform distributions. For the moment, you will need to implement your own object interfaces to which ever routines you want to use. You may use the gaussrand example as a template.


{% load i18n %} var $IP = function(msg){ return function(params){ return msg.replace(/\$\(([\w]+)\)/g, function(){return params[RegExp.$1] || ""}); } }; var $I = { R001: '{% trans "Load More" %}', R002: '{% trans "Loading More..." %}', R003: '{% trans "You must re-authenticate to get these information. Please click here." %}', R004: '{% trans "Failed to load timeline. Click to reload." %}', R005: '{% trans "More" %}', R006: '{% trans "Loading" %}', R007: '{% trans "You cannot use desktop notifications. This feature is available in Google Chrome only." %}', R008: "{% trans "Crowy don't notify you as the overall settings for the notification feature is off. Would you like to enable the settings?" %}", R009: $IP('{%blocktrans%}Desktop notifications of "$(name)" successfully changed.{%endblocktrans%}'), R010: $IP('{%blocktrans%}Failed to change desktop notifications of "$(name)".{%endblocktrans%}'), R011: $IP('{%blocktrans%}Are you sure you want to delete this column "$(name)"?{%endblocktrans%}'), R012: $IP('{%blocktrans%}Desktop notifications($(status)){%endblocktrans%}'), R014: '{% trans "Delete" %}', R015: '{% trans "Message posted." %}', R016: '{% trans "Failed to post message." %}', R017: '{% trans "Press Shift+Enter to post." %}', R018: '{% trans "Close" %}', R019: '{% trans "Send" %}', R020: '{% trans "Clear" %}', R021: '{% trans "Advanced" %}', R022: "{% trans "Are you sure you'd like to add automatically major timelines of this service?" %}", R023: '{% trans "Delete Tab" %}', R024: '{% trans "You cannot delete the last tab." %}', R025: '{% trans "Are you sure you want to delete this tab?" %}', R026: '{% trans "Cancel" %}', R027: '{% trans "Add Column" %}', R028: $IP('{%blocktrans%}Message posted to "$(name)".{%endblocktrans%}'), R029: $IP('{%blocktrans%}Failed to post message to "$(name)".{%endblocktrans%}'), R030: '{% trans "Please enter a new shortcut name." %}', R031: $IP('{%blocktrans%}Shortcut "$(name)" successfully saved.{%endblocktrans%}'), R032: $IP('{%blocktrans%}Failed to save shortcut "$(name)".{%endblocktrans%}'), R033: '{% trans "Failed to shrink URL." %}', R034: $IP('{%blocktrans%}Shortcut successfully renamed to "$(name)".{%endblocktrans%}'), R035: $IP('{%blocktrans%}Failed to rename shortcut "$(name)".{%endblocktrans%}'), R036: '{% trans "Are you sure you want to delete this shortcut?" %}', R037: $IP('{%blocktrans%}Shortcut "$(name)" successfully deleted.{%endblocktrans%}'), R038: $IP('{%blocktrans%}Failed to delete shortcut "$(name)".{%endblocktrans%}'), R039: '{% trans "Rename" %}', R040: '{% trans "Label Color" %}', R041: $IP('{%blocktrans%}Color of the shortcut "$(name)" successfully changed.{%endblocktrans%}'), R042: $IP('{%blocktrans%}Failed to change the color of shortcut "$(name)".{%endblocktrans%}'), R043: '{% trans "Desktop notifications successfully changed." %}', R044: '{% trans "Failed to change desktop notifications." %}', R045: "{%blocktrans%}


{% include 'header.html' %} {% include 'nav.html' %} Repo: {{ repo.name }} Last Scanned: {{ repo.last_scanned }} Overall stats will appear here in a future upgrade. See also: Graphs Stats (By Author) Commit Feed {% include 'footer.html' %}


Test API v1
Server To use
https://transact.io/purchase
http://localhost:5555/purchase
Other:
Affiliate ID:
Purchase on Xsact
Subscribe
Donate
Donate:
Paid content here after puchase
Subscrition Status unknown


PDP Woman Leader Set Ablaze In Kogi
Abuh was burnt to death by political thugs in the state on Monday.
by SaharaReporters, New York
Salome Abuh, Peoples Democratic Party women leader in Ochadamu Ward under Ofu Local Government Area of Kogi State has been set ablaze in her home, the police has said.
According to a report by Premium Times, Abuh was burnt to death by political thugs in the state on Monday.
Spokesperson for the command, William Aya, said the politician was sleeping in her home when political thugs set the building ablaze.
The politician’s remains, which were burnt beyond recognition, had been taken to a mortuary for autopsy.
Aya said, “It was a very unfortunate incident and the commissioner has ordered a thorough investigation to ensure that all those involved do not escape justice.”
Since the news of Abuh’s death, supporters of the PDP have accused the All Progressives Congress of being behind her death.
According to Aya, her killing was a reprisal attack for the death of an APC supporter in the community.
He added, “There was a misunderstanding between Gowon Simeon and Awolu Zakari, both members of the community.
“Mr Simeon stabbed Mr Zakari in the chest and he bled to death almost instantly.
“After Zakari was confirmed dead by a medical doctor, his associates gathered for a reprisal attack against Simeon.
“They arrived at his uncle’s house where they believed he was hiding and set it on fire.
“Unfortunately Abuh was sleeping inside the house and was burnt alive.”


My name is Eiko. I'm from Miyagi, Japan. I currently live in Los Angeles, CA.
I decided to join Dev Bootcamp to become a Rails programmer but also to meet peole like you who likes to learn programming :-)
It's a pleasure to meet you!
about myself
things I like to do
- excercise - i like to do it in the morning.
- walk my dog 'mookie' - maybe the other way around though. he is very big and strong!
- watcing shows on netflix - I love 'Sherlock' and 'Arrested Development'.
my blogs
- My favorite websites
- Why is JavaScript So Popular in Web Development?
- My Values
- Arrays vs. Hashes
- Pairing and Giving Feedback
- Enumerable#cycle
- Dealing with Conflict
- Classes in Ruby
- Privacy vs Tech
- Functional vs Object Oriented Programming
- Stereotype Threat
- SQL
- Affirmation and Stereotype Threat
- How PCs Work
- Chefs in the Kitchen
- Cheatsheet
- My Thinking Style


{% with selected="myTickets" %} {% include "header.html" %} {% endwith %}
My tickets
Reservation Nr.
Departure date
Departure Time
Arrival date
Arrival Time
From
To
Airplane
000000000
24.05.2021.
8:30
24.05.2021.
10:00
Latvija
Vācija
A220
Print
Change
{% include "loginRegisterWindow.html" %}


I’m a software engineer
from New Delhi, India. Currently working as a
backend
engineer at
Pickrr. Here are a few things
about me -
B.Tech - Computer Engineering, 2021
Delhi Technological University ■ CGPA: 8.73/10
Secondary School, 2016
New Era Public School ■ XII: 92% ■ X: 9.2/10
Pickrr
Python
, Django
, MySQL
, Java
, Spring
.Dart
package:ffigen
, a tool to generate Dart FFI bindings from C header files.
Learn more about my work here.$250
bonus for my open source contributions to dart-lang/ffigen.Open sourced at Github
Experimental dart bindings generator, Parses C header files to generate dart bindings. part of GSoC ‘20.
Plugin
based on the android Nearby Connections API.
extension for Chrome
and Chromium-based browsers Made with SvelteJS. Available on Chrome Webstore. Save tabs and sessions as bookmarks all from the NewTab page.
smart clocks
. Features - 12/24 hour format, dark theme and weather indication.
mobile and web app
to view events at my college, DTU. View it online. Made with Flutter and Firebase.
Bash script
to Record Audio on PC, Video on Phone simultaneously and merge them automatically with sync
An android app
to Plan and Organise Notes as Activities, Available on PlayStore.
You can add images, create text notes and checklists, and organize them on different pages. Every activity can have a separate color theme and there is compelte emoji support. The data is stored using SQLite for fast access and edit.
flutter app
to handle money transactions in monoply with multiple connected devices on LAN
using selenium in python
(Like a page and their posts and sending messages to friends)


RWC-MDB-J-2001 No. 1 – 50
| Piece No. |
Cat. Suffix |
Tr. No. |
Title |
Artist |
Length |
Variation |
Instruments Used |
| No. 1 | M01 | Tr. 01 | Jive (Piano Solo) | Makoto Nakamura | 3:22 | Instrumentation 1 | Pf |
| No. 2 | M01 | Tr. 02 | For Two (Piano Solo) | Makoto Nakamura | 6:15 | Instrumentation 1 | Pf |
| No. 3 | M01 | Tr. 03 | Lounge Away (Piano Solo) | Takao Nagai | 2:38 | Instrumentation 1 | Pf |
| No. 4 | M01 | Tr. 04 | Crescent Serenade (Piano Solo) | Makoto Nakamura | 2:47 | Instrumentation 1 | Pf |
| No. 5 | M01 | Tr. 05 | Abyss (Piano Solo) | Takao Nagai | 3:08 | Instrumentation 1 | Pf |
| No. 6 | M01 | Tr. 06 | Jive (Guitar Solo) | Hiroo Chubachi | 2:47 | Instrumentation 2 | Gt |
| No. 7 | M01 | Tr. 07 | For Two (Guitar Solo) | Hiroo Chubachi | 3:36 | Instrumentation 2 | Gt |
| No. 8 | M01 | Tr. 08 | Lounge Away (Guitar Solo) | Satoshi Yamamoto | 3:41 | Instrumentation 2 | Gt |
| No. 9 | M01 | Tr. 09 | Crescent Serenade (Guitar Solo) | Satoshi Yamamoto | 3:38 | Instrumentation 2 | Gt |
| No. 10 | M01 | Tr. 10 | Abyss (Guitar Solo) | Hiroo Chubachi | 3:20 | Instrumentation 2 | Gt |
| No. 11 | M01 | Tr. 11 | Jive (Vib & Piano Duo) | Masahiro Kanno & Takao Nagai | 4:05 | Instrumentation 3 | Vib & Pf |
| No. 12 | M01 | Tr. 12 | For Two (Flute & Piano Duo) | Kazuma Ito & Hiroshi Haji | 5:34 | Instrumentation 3 | Fl & Pf |
| No. 13 | M01 | Tr. 13 | Lounge Away (Vib & Piano Duo) | Masahiro Kanno & Takao Nagai | 3:47 | Instrumentation 3 | Vib & Pf |
| No. 14 | M01 | Tr. 14 | Crescent Serenade (Piano & Bass Duo) | MN & NK | 4:42 | Instrumentation 3 | Pf & Bs |
| No. 15 | M01 | Tr. 15 | Abyss (Piano & Bass Duo) | MN & NK | 4:32 | Instrumentation 3 | Pf & Bs |
| No. 16 | M02 | Tr. 01 | Jive (Piano Trio) | Makoto Nakamura Trio | 4:43 | Instrumentation 4 | Pf & Bs & Dr |
| No. 17 | M02 | Tr. 02 | For Two (Piano Trio) | Makoto Nakamura Trio | 6:51 | Instrumentation 4 | Pf & Bs & Dr |
| No. 18 | M02 | Tr. 03 | Lounge Away (Piano Trio) | HIS Trio | 5:22 | Instrumentation 4 | Pf & Bs & Dr |
| No. 19 | M02 | Tr. 04 | Crescent Serenade (Piano Trio) | HIS Trio | 5:15 | Instrumentation 4 | Pf & Bs & Dr |
| No. 20 | M02 | Tr. 05 | Abyss (Piano Trio) | Takao Nagai Trio | 5:41 | Instrumentation 4 | Pf & Bs & Dr |
| No. 21 | M02 | Tr. 06 | Jive (Piano Trio & Tp) | Rick's | 4:38 | Instrumentation 5 | Pf & Bs & Dr & Tp |
| No. 22 | M02 | Tr. 07 | For Two (Piano Trio & Tp) | Rick's | 7:16 | Instrumentation 5 | Pf & Bs & Dr & Tp |
| No. 23 | M02 | Tr. 08 | Lounge Away (Piano Trio & Ts) | Tetsuya Ozawa Quartet | 4:43 | Instrumentation 5 | Pf & Bs & Dr & Ts |
| No. 24 | M02 | Tr. 09 | Crescent Serenade (Piano Trio & Ts) | Tetsuya Ozawa Quartet | 4:55 | Instrumentation 5 | Pf & Bs & Dr & Ts |
| No. 25 | M02 | Tr. 10 | Abyss (Piano Trio & Ts) | Tetsuya Ozawa Quartet | 6:20 | Instrumentation 5 | Pf & Bs & Dr & Ts |
| No. 26 | M03 | Tr. 01 | Jive (Octet) | YOU Band | 3:31 | Instrumentation 6 | Pf & Bs & Dr & Gt & As & Bar & Ts × 2 |
| No. 27 | M03 | Tr. 02 | For Two (Octet) | YOU Band | 3:47 | Instrumentation 6 | Pf & Bs & Dr & Gt & As & Bar & Ts × 2 |
| No. 28 | M03 | Tr. 03 | Lounge Away (Octet) | YOU Band | 3:37 | Instrumentation 6 | Pf & Bs & Dr & Gt & As & Bar & Ts × 2 |
| No. 29 | M03 | Tr. 04 | Crescent Serenade (Octet) | YOU Band | 4:07 | Instrumentation 6 | Pf & Bs & Dr & Gt & As & Bar & Ts × 2 |
| No. 30 | M03 | Tr. 05 | Abyss (Octet) | YOU Band | 3:59 | Instrumentation 6 | Pf & Bs & Dr & Gt & As & Bar & Ts × 2 |
| No. 31 | M03 | Tr. 06 | Jive (Piano Trio & Vib) | Masahiro Kanno Quartet | 5:09 | Instrumentation 7 | Pf & Bs & Dr & Vib |
| No. 32 | M03 | Tr. 07 | For Two (Piano Trio & Vib) | Masahiro Kanno Quartet | 5:40 | Instrumentation 7 | Pf & Bs & Dr & Vib |
| No. 33 | M03 | Tr. 08 | Lounge Away (Piano Trio & Flute) | Kazuma Ito Quartet | 4:13 | Instrumentation 7 | Pf & Bs & Dr & Fl |
| No. 34 | M03 | Tr. 09 | Crescent Serenade (Piano Trio & Flute) | Kazuma Ito Quartet | 5:52 | Instrumentation 7 | Pf & Bs & Dr & Fl |
| No. 35 | M03 | Tr. 10 | Abyss (Piano Trio & Vib) | Masahiro Kanno Quartet | 5:14 | Instrumentation 7 | Pf & Bs & Dr & Vib |
| No. 36 | M04 | Tr. 01 | Dance Together | Nathan Ingram III | 3:42 | Style (Vocal jazz) | Pf & Bs & Dr & Tp & Vo |
| No. 37 | M04 | Tr. 02 | Aura Lee | Aoi Kato | 2:25 | Style (Vocal jazz) | Pf & Bs & Dr & Vo |
| No. 38 | M04 | Tr. 03 | The Entertainer | HH Band | 3:08 | Style (Big band jazz) | Pf & Bs & Dr & Gt & Tp & Tb & Ts & As & Bar & Fl |
| No. 39 | M04 | Tr. 04 | Mo' Trippin' | HH Band | 3:54 | Style (Big band jazz) | Pf & Bs & Dr & Gt & Tp & Tb & Ts & As & Bar & Fl |
| No. 40 | M04 | Tr. 05 | Image | Tetsuya Ozawa Quartet | 7:41 | Style (Modal jazz) | Pf & Bs & Dr & Ts |
| No. 41 | M04 | Tr. 06 | Friction | Yutaka Umitsuki Quartet | 6:05 | Style (Modal jazz) | Pf & Bs & Dr & Ts |
| No. 42 | M04 | Tr. 07 | Silent Night | U's Band | 5:43 | Style (Funky jazz) | Pf & Bs & Dr & Gt & Ts & As & Bar |
| No. 43 | M04 | Tr. 08 | Down To The Earth | Yutaka Umitsuki Quartet | 4:55 | Style (Funky jazz) | Pf & Bs & Dr & Ts |
| No. 44 | M04 | Tr. 09 | Joyful, Joyful, We Adore Thee | K's Band | 4:30 | Style (Free jazz) | Pf & Bs & Dr & Gt & Ts & Fl & Bar |
| No. 45 | M04 | Tr. 10 | Morning View | 22 Project Band | 4:25 | Fusion | Pf & Kb & Bs & Dr & Gt & Perc |
| No. 46 | M04 | Tr. 11 | Formula | 22 Project Band | 3:24 | Fusion | Pf & Kb & Bs & Dr & Gt & EWI |
| No. 47 | M04 | Tr. 12 | Morning Star | 22 Project Band | 3:45 | Fusion | Kb & Bs & Dr & Gt |
| No. 48 | M04 | Tr. 13 | Latin Sacrifice | 22 Project Band | 4:02 | Fusion | Pf & Kb & Bs & Dr & Gt & Perc |
| No. 49 | M04 | Tr. 14 | Wolf | 22 Project Band | 3:02 | Fusion | Kb × 2 & Bs & Dr & Gt |
| No. 50 | M04 | Tr. 15 | Bird Of Paradise | 22 Project Band | 4:01 | Fusion | Kb & Bs & Dr & Ss & Ts & Perc |


Crosstalk doesn’t require the use of Shiny. You can perform linked brushing and filtering purely with JavaScript, leaving you with static HTML files that you can host on any web server.
On the other hand, you can use Crosstalk and Shiny together, and when you do so, you broaden the capabilities of Crosstalk by allowing your brushing and filtering to drive arbitrary calculations and Shiny outputs (and vice versa).
We’ll start by creating a basic Shiny application that contains some linked widgets, simply so you can see how the parts fit together. If you’ve ever used HTML widgets with Shiny apps, this will look familiar. Our UI definition includes xxxOutput
calls, which we then populate with server-side renderXXX
expressions.
The main thing to note here is that the shared_iris
variable that holds the SharedData
instance is being declared inside the server function.
library(shiny)
library(crosstalk)
library(d3scatter)
ui <- fluidPage(
fluidRow(
column(6, d3scatterOutput("scatter1")),
column(6, d3scatterOutput("scatter2"))
)
)
server <- function(input, output, session) {
shared_iris <- SharedData$new(iris)
output$scatter1 <- renderD3scatter({
d3scatter(shared_iris, ~Petal.Length, ~Petal.Width, ~Species, width = "100%")
})
output$scatter2 <- renderD3scatter({
d3scatter(shared_iris, ~Sepal.Length, ~Sepal.Width, ~Species, width = "100%")
})
}
shinyApp(ui, server)
It’s important that the SharedData
object be created inside the server function, not outside it. If you create SharedData
outside of the server function, the bidirectional communication between Crosstalk’s client and server pieces will not work and some of the capabilities described below will fail to work.
Run the above code, or click the Live Demo button just below it. This app works, but doesn’t do anything we couldn’t accomplish just as well without Shiny. Let’s see what else we can do.
One thing you can’t do in a static Crosstalk HTML page is change your data (without regenerating and then reloading the page). With Shiny, it’s easy to set up reactive expressions that react to changes.
Integrating reactive expressions with Crosstalk is easy. Take a reactive expression that produces a data frame, and simply pass the reactive expression into SharedData$new
in place of a data frame.
In this example, we’ll modify the previous example on this page to randomly jitter the data a couple of times a second. (If random jittering is too contrived for your taste, imagine streaming data or interactively filtered data.)
library(shiny)
library(crosstalk)
library(d3scatter)
ui <- fluidPage(
fluidRow(
column(6, d3scatterOutput("scatter1")),
column(6, d3scatterOutput("scatter2"))
)
)
server <- function(input, output, session) {
jittered_iris <- reactive({
invalidateLater(500)
data.frame(lapply(iris, function(col) {
if (is.numeric(col))
jitter(col)
else
col
}))
})
shared_iris <- SharedData$new(jittered_iris)
output$scatter1 <- renderD3scatter({
d3scatter(shared_iris, ~Petal.Length, ~Petal.Width, ~Species, width = "100%",
x_lim = range(iris$Petal.Length), y_lim = range(iris$Petal.Width))
})
output$scatter2 <- renderD3scatter({
d3scatter(shared_iris, ~Sepal.Length, ~Sepal.Width, ~Species, width = "100%",
x_lim = range(iris$Sepal.Length), y_lim = range(iris$Sepal.Width))
})
}
shinyApp(ui, server)
Notice that we passed the reactive expression itself (jittered_iris
), not the value of the reactive expression (jittered_iris()
). We don’t want to read the reactive expression at the time that we construct the SharedData
object, but instead, want to give the reactive expression itself to the new object so the latter can read the former at any point in the future. If this feels foreign to you, think of how you pass a function name, not a function call, to lapply
; that’s exactly analogous to what we’re doing here.
Note that when using a reactive expression for your underlying data source, the SharedData
constructor’s key
argument should be provided explicitly unless you know for sure that either 1) the data frame will always have row names, or 2) the keys of the rows you’re returning will never vary in order. If the former row 3 becomes the new row 15 while the app executes, and you have not specified keys, you’ll get strange results. And be sure not to provide the key
argument as a character value, but instead as a formula or function (that will be applied against each new data frame produced by the reactive expression).
Not only can we use reactive data to feed SharedData
and Crosstalk widgets (i.e. server-to-client); we can also use Crosstalk selections and filters to feed reactive expressions (i.e. client-to-server). We do this using the same SharedData
object that we pass to the widgets. This object has a data()
method that we can use to reactively read a snapshot of the data, and optionally, the selection state of all the rows.
In this example we’ll use the Crosstalk selection to drive a textual summary of the selected data.
(As a bonus, we’ll also let the user subset the underlying data frame by species, using a Shiny selectInput
and a reactive. At the time of this writing, Crosstalk filter controls don’t work particularly well with Shiny, so you can use traditional Shiny techniques to do filtering instead.)
library(shiny)
library(crosstalk)
library(d3scatter)
library(dplyr)
ui <- fluidPage(
selectInput("species", "Species", levels(iris$Species), multiple = TRUE),
fluidRow(
column(6, d3scatterOutput("scatter1")),
column(6, d3scatterOutput("scatter2"))
),
h4("Summary of selected data"),
verbatimTextOutput("summary")
)
server <- function(input, output, session) {
# Subset the dataset based on user's choice of species
user_iris <- reactive({
iris[is.null(input$species) | iris$Species %in% input$species,]
})
shared_iris <- SharedData$new(user_iris)
output$scatter1 <- renderD3scatter({
d3scatter(shared_iris, ~Petal.Length, ~Petal.Width, ~Species, width = "100%")
})
output$scatter2 <- renderD3scatter({
d3scatter(shared_iris, ~Sepal.Length, ~Sepal.Width, ~Species, width = "100%")
})
output$summary <- renderPrint({
df <- shared_iris$data(withSelection = TRUE) %>%
filter(selected_ | is.na(selected_)) %>%
mutate(selected_ = NULL)
cat(nrow(df), "observation(s) selected\n\n")
summary(df)
})
}
shinyApp(ui, server)
Calling shared_iris$data()
with the withSelection = TRUE
argument gives us a data frame with an additional column selected_
that contains TRUE
or FALSE
(or NA
for all the rows if there is no active selection). This is a reactive operation, so when the selection changes in the future, the output (or reactive expression, or observer) that called data(withSelection=TRUE)
will automatically respond.
We can use the capabilities above to integrate Crosstalk widgets with interactive ggplot2 plots driven by Shiny.
For those very familiar with ggplot2 and Shiny, reflecting selection state using fill or color is straightforward but getting nice looking results is a bit tedious. For example, this code is simple but the output has some problems:
library(ggplot2)
# Simulated sharedData$data(withSelection = TRUE)
df <- cbind(iris, selected_ = c(TRUE, FALSE, FALSE)[sample(3, nrow(iris), replace = TRUE)])
ggplot(df, aes(Species, fill = selected_)) +
geom_bar(stat = "count") +
scale_fill_manual(values = c("#444444", "#9999FF"))
This code has several problems:
selection_
column to a factor with ordered levels.selection_
column is NA
and must be converted to FALSE
.Rather than forcing you to deal with these common problems each time, Crosstalk provides some helper functions: selection_factor(selected_)
should be used in aes
, and then scale_fill_selection
or scale_color_selection
should be used for scaling.
library(crosstalk)
ggplot(df, aes(Species, fill = selection_factor(selected_))) +
geom_bar(stat = "count") +
scale_fill_selection("#444444", "#9999FF")
Much better!
The following code is a complete Shiny app that uses this approach. This example uses Shiny’s new debounce
function, which filters a reactive expression to slow down its rate of change. Without it, too many updates come from Crosstalk and cause the ggplot2 code to appear laggy. (The debounce
function has not, at time of this writing, been part of a CRAN release. You can install the latest development version of Shiny with devtools::install_github("rstudio/shiny")
.)
library(shiny)
library(crosstalk)
library(d3scatter)
library(ggplot2)
ui <- fluidPage(
fluidRow(
column(4, d3scatterOutput("scatter1")),
column(4, d3scatterOutput("scatter2")),
column(4, plotOutput("by_species"))
)
)
server <- function(input, output, session) {
shared_iris <- SharedData$new(iris)
output$scatter1 <- renderD3scatter({
d3scatter(shared_iris, ~Petal.Length, ~Petal.Width, ~Species, width = "100%")
})
output$scatter2 <- renderD3scatter({
d3scatter(shared_iris, ~Sepal.Length, ~Sepal.Width, ~Species, width = "100%")
})
df <- debounce(reactive(shared_iris$data(withSelection = TRUE)), 250)
output$by_species <- renderPlot({
ggplot(df(), aes(Species, fill = crosstalk::selection_factor(selected_))) +
geom_bar(stat = "count") +
crosstalk::scale_fill_selection("#444444", "#9999FF")
})
}
shinyApp(ui, server)


| DOSE: |
3 lines |
insufflated |
Ketamine |
(powder / crystals) |
I have heard much about Ketamine and its effects, but this past week I have had two bad experiences. Both settings were my apartment.
The first time I tried K was late one night after work. A trusted friend had tried the stuff we bought on a previous occasion and reported to have seen many visuals (which, of course, is always fun). After purchasing two pouches of this substance (purportedly three lines apiece), a friend and I snorted ~1.5 lines. It smelled like the slime you got out of machines when you were a kid except in a powder form. I then smoked a joint with another friend while the other snorter sat out. After approximately 15 minutes, my friend was feeling something. I felt off baseline but not altered in any serious way. Perhaps this is because I am an experience drug user, but I did not see any references on Erowid in this regard. After at least 45 minutes, my friend was 'fucked up', and I was ready to go to sleep.
The next time I decided to try the entire pouch myself. After snorting the entire 3 lines, I put on some music for meditation. At this point, I had read James Kentís
Metaprogramming From Within the Eye of the Storm, and was somewhat anxious to try it. After approximately 15 minutes, I felt a little off. I tried to calm my mind, control my breathing, slow my heartbeat... (with great effort) I did to some extent, but in the end, I failed. No visuals to speak of, and also, the duration could not have been longer than 20 minutes. Basically, it sucked.
Possible conclusions: A) I am immune. B) It wasn't K. C) It was not enough K for me. D) I have to break my tolerance for it.
And in the case of D, do I want to 'break my tolerance'? I do not think I am going to try K again at this point.
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.


As I sat in my living room, I could feel the disapproving stare of my parents boring into my bowed head. You might ask how could their perfect daughter disappoint them so much? The answer: by being myself. I knew that by coming out to my parents I was becoming an orphan. Little did I know that I would find a friend to help me along on my journey to self-discovery. My counselor at El/La Para TransLatinas helped me to accept myself for the unique and wonderful person that I am.