Last updated: 2018-09-28
Code version: e0ca9da
Having performed some basic quality control and filtering on the data, I now move to quantify how well Hi-C interaction frequency values can be predicted from species identity. To accomplish this, I utilize limma to linearly model Hi-C interaction frequencies as a function of all the metadata about each sample’s species, sex, and batch. I then add information from linear modeling to the full dataframe, including log-fold changes between species, p-values, betas, and variances. I then make a plot of the mean vs. the log-fold change as an MA plot proxy for quality control. I move on to look at distributions of all the p-values and betas for each of the terms, make some QQ plots to check for normality in the p-values for each term, and represent the log-fold change and p-values in a volcano plot of the data.
###Read in data, normalized in initial_QC document, both with all hits and conditioned upon a hit being discovered in 4 individuals.
full.data <- fread("~/Desktop/Hi-C/full.data.10.2018", header = TRUE, data.table=FALSE, stringsAsFactors = FALSE, showProgress = FALSE)
data.4 <- fread("~/Desktop/Hi-C/data.4.10.2018", header=TRUE, data.table=FALSE, stringsAsFactors = FALSE, showProgress = FALSE)
###Reassign metadata here, just for quick reference.
meta.data <- data.frame("SP"=c("H", "H", "C", "C", "H", "H", "C", "C"), "SX"=c("F", "M", "M", "F", "M", "F", "M", "F"), "Batch"=c(1, 1, 1, 1, 2, 2, 2, 2))
###Now to move on to linear modeling, doing it in both the full data set and the | 4 individuals condition. I utilize limma to make this quick, parllelizable, and simple. First make the model, then do the actual fitting, and finally do multiple testing adjustment with topTable.
design <- model.matrix(~1+meta.data$SP+meta.data$SX+meta.data$Batch) #Parameterize the linear model, with an intercept, and fixed effect terms for species, sex, and library prep batch. If you prefer to think in contrasts, my contrast is humans minus chimps. I prefer to think of one species as the baseline in the linear model, and in this case that's chimps (so chimps get a 0 for species, and humans get a 1).
lmFit(full.data[,304:311], design) %>% eBayes(.) -> model.full
lmFit(data.4[,304:311], design) %>% eBayes(.) -> model.4
volc.full <- topTable(model.full, coef = 2, sort.by = "none", number = Inf)
volc.4 <- topTable(model.4, coef = 2, sort.by = "none", number = Inf)
###Now append the information extracted from linear modeling (p-values and betas for species, sex, and batch) to the 2 data frames:
full.data$sp_beta <- volc.full$logFC #Beta already is logFC since values are log2(obs/exp) Hi-C reads.
full.data$sp_pval <- volc.full$P.Value #Unadjusted P-val
full.data$sp_BH_pval <- volc.full$adj.P.Val #Benjamini-Hochberg adjusted p-values
full.data$avg_IF <- volc.full$AveExpr #Average Interaction Frequency value across all individuals. Useful later for a variety of plots.
full.data$t_statistic <- volc.full$t #t-statistic from limma topTable
full.data$B_statistic <- volc.full$B #B-statistic (LOD) from limma topTable
full.data$sx_pval <- model.full$p.value[,3]
full.data$btc_pval <- model.full$p.value[,4]
full.data$sx_beta <- model.full$coefficients[,3]
full.data$btc_beta <- model.full$coefficients[,4]
full.data$SE <- sqrt(model.full$s2.post)*model.full$stdev.unscaled[,2]
data.4$sp_beta <- volc.4$logFC
data.4$sp_pval <- volc.4$P.Value #Unadjusted P-val, normal scale
data.4$sp_BH_pval <- volc.4$adj.P.Val #Benajimini-Hochberg adjusted p-values
data.4$avg_IF <- volc.4$AveExpr #Average interaction frequency
data.4$t_statistic <- volc.4$t #t-statistic from limma topTable
data.4$B_statistic <- volc.4$B #B-statistic (LOD) from limma topTable
data.4$sx_pval <- model.4$p.value[,3]
data.4$btc_pval <- model.4$p.value[,4]
data.4$sx_beta <- model.4$coefficients[,3]
data.4$btc_beta <- model.4$coefficients[,4]
data.4$SE <- sqrt(model.4$s2.post) * model.4$stdev.unscaled[,2]
###Before moving to any actual assessment of the linear modeling, do a QC check by producing MA plots for both the full set and | 4 individuals. The MA plot here is the mean of Hi-C contact frequencies (avg_IF) on the x-axis, and the logFC (species beta, in this case) on the y-axis. What we are generally looking for is a fairly uniform cloud around 0 stretching across the x-axis.
ggplot(data=full.data[,c('avg_IF','sp_beta')], aes(x=avg_IF, y=sp_beta)) + geom_point() + xlab("Means of Hi-C Contact Frequencies") + ylab("Species Beta (log ratio H/C)") + ggtitle("MA Plot, All Data")
ggplot(data=data.4[,c('avg_IF', 'sp_beta')], aes(x=avg_IF, y=sp_beta)) + geom_point() + xlab("Means of Hi-C Contact Frequencies") + ylab("Species Beta (log ratio H/C)") + ggtitle("MA Plot | 4 Individuals")
#Both of these plots certainly have some outliers, and both have a linear trend I have previously examined that is symmetric across betas--I believe these lines to primarily be created by an orthology-calling issue, as many of the hits along them have all contact frequencies in one species extremely close to 0 (and not near-zero in the other species). Aside from this, there is also a large cloud in the negative beta side that is somewhat disturbing; this is something I still need to check. At the very least, the linear trends seen are symmetric across betas, so this is hopefully an issue that is affecting the two species SOMEWHAT equally.
###Check some of the more basic linear modeling issues: distributions of betas, p-vals, QQplot, volcano plot, etc.
##Check p-vals and betas for all covariates in the full model, on all the data.
ggplot(data=full.data[,322:332], aes(x=sp_pval)) + geom_histogram(binwidth=0.001) + ggtitle("P-vals for Species") + xlab("P-value")
ggplot(data=full.data[,322:332], aes(x=sx_pval)) + geom_histogram(binwidth=0.001) + ggtitle("P-vals for Sex") + xlab("P-value")
ggplot(data=full.data[,322:332], aes(x=btc_pval)) + geom_histogram(binwidth=0.001) + ggtitle("P-vals for Batch") + xlab("P-value")
ggplot(data=full.data[,322:332], aes(x=sp_beta)) + geom_histogram(binwidth=0.001) + ggtitle("Betas for Species") + xlab("Beta") + coord_cartesian(xlim=c(-6, 6), ylim=c(0, 3500))
ggplot(data=full.data[,322:332], aes(x=sx_beta)) + geom_histogram(binwidth=0.001) + ggtitle("Betas for Sex") + xlab("Beta") + coord_cartesian(xlim=c(-6, 6), ylim=c(0, 3500))
ggplot(data=full.data[,322:332], aes(x=btc_beta)) + geom_histogram(binwidth=0.001) + ggtitle("Betas for Batch") + xlab("Beta") + coord_cartesian(xlim=c(-6, 6), ylim=c(0, 3500))
##Check p-vals and betas for all covariates in the full model, on data conditioned upon hit discovery in 4 individuals.
ggplot(data=data.4[,322:332], aes(x=sp_pval)) + geom_histogram(binwidth=0.001) + ggtitle("P-vals for Species | 4") + xlab("P-value")
ggplot(data=data.4[,322:332], aes(x=sx_pval)) + geom_histogram(binwidth=0.001) + ggtitle("P-vals for Sex | 4") + xlab("P-value")
ggplot(data=data.4[,322:332], aes(x=btc_pval)) + geom_histogram(binwidth=0.001) + ggtitle("P-vals for Batch | 4") + xlab("P-value")
ggplot(data=data.4[,322:332], aes(x=sp_beta)) + geom_histogram(binwidth=0.001) + ggtitle("Betas for Species | 4") + xlab("Beta") + coord_cartesian(xlim=c(-6, 6), ylim=c(0, 850))
ggplot(data=data.4[,322:332], aes(x=sx_beta)) + geom_histogram(binwidth=0.001) + ggtitle("Betas for Sex | 4") + xlab("Beta") + coord_cartesian(xlim=c(-6, 6), ylim=c(0, 850))
ggplot(data=data.4[,322:332], aes(x=btc_beta)) + geom_histogram(binwidth=0.001) + ggtitle("Betas for Batch | 4") + xlab("Beta") + coord_cartesian(xlim=c(-6, 6), ylim=c(0, 850))
#These all look pretty good, with p-val distributions for sex and batch being fairly uniform, and betas all around being fairly normally distributed. We see distinct enrichment for significant p-values for the species term, which is what we were hoping for! Also of note is the fact that the beta distribution for species looks wider than those for batch and sex, reassuring us that species is a driving factor in differential Hi-C contacts.
###Now, to double-check on the p-values with some QQplots. First, I define a function for creating a qqplot easily and coloring elements of the distribution in order to understand where most of the density on the plot is:
newqqplot=function(pvals, quant, title){
len = length(pvals)
res=qqplot(-log10((1:len)/(1+len)),pvals,plot.it=F)
plot(res$x,res$y, main=title, xlab="Theoretical", ylab="Actual", col=ifelse(res$y>as.numeric(quantile(res$y, quant[1])), ifelse(res$y>as.numeric(quantile(res$y, quant[2])), "red", "blue"), "black"))
abline(0, 1)
}
##Start QQplotting some of these actual values.
newqqplot(-log10(full.data$sp_pval), c(0.5, 0.75), "QQ Plot, Species P-vals, Full Data")
newqqplot(-log10(full.data$sx_pval), c(0.5, 0.75), "QQ Plot, Sex P-vals, Full Data")
newqqplot(-log10(full.data$btc_pval), c(0.5, 0.75), "QQ Plot, Batch P-vals, Full Data")
newqqplot(-log10(data.4$sp_pval), c(0.5, 0.75), "QQ Plot, Species P-vals, Data | 4")
newqqplot(-log10(data.4$sx_pval), c(0.5, 0.75), "QQ Plot, Sex P-vals, Data | 4")
newqqplot(-log10(data.4$btc_pval), c(0.5, 0.75), "QQ Plot, Batch P-vals, Data | 4")
#The batch and sex QQ plots look fairly decent, but the species QQplot has the distribution rising off the axis extremely quickly, before even reaching 50% of the data. I will examine this in a separate markdown document for quality control on the linear modeling. For now, I show volcano plots of the data before looking to rectify this issue:
volcplot.full <- data.frame(pval=-log10(full.data$sp_pval), beta=full.data$sp_beta, species=full.data$disc_species)
volcplot.4 <- data.frame(pval=-log10(data.4$sp_pval), beta=data.4$sp_beta, species=data.4$disc_species)
ggplot(data=volcplot.full, aes(x=beta, y=pval, color=species)) + geom_point() + xlab("Log2 Fold Change in Contact Frequency") + ylab("P-values") + ggtitle("Contact Frequency Differences Colored by Species of Discovery")
ggplot(data=volcplot.4, aes(x=beta, y=pval, color=species)) + geom_point() + xlab("Log2 Fold Change in Contact Frequency") + ylab("-log10 p-values") + ggtitle("Contact Frequency Differences Colored by Species of Discovery | 4") + scale_color_manual(name="Species", labels=c("Both", "Chimp", "Human"), values=c("#F8766D", "#00BA38", "#619CFF")) #Modify to add clearer labels
ggplot(data=volcplot.full, aes(x=beta, y=pval)) + geom_point() + xlab("Log2 Fold Change in Contact Frequency") + ylab("-log10 BH-corrected p-values") + ggtitle("Contact Frequency Differences")
ggplot(data=volcplot.4, aes(x=beta, y=pval)) + geom_point() + xlab("Log2 Fold Change in Contact Frequency") + ylab("-log10 p-values") + ggtitle("Contact Frequency Differences | 4 Individuals")
#Write out the data with the new columns added on!
fwrite(full.data, "~/Desktop/Hi-C/full.data.10.2018", quote = TRUE, sep = "\t", row.names = FALSE, col.names = TRUE, na="NA", showProgress = FALSE)
fwrite(data.4, "~/Desktop/Hi-C/data.4.10.2018", quote=FALSE, sep="\t", row.names=FALSE, col.names=TRUE, na="NA", showProgress = FALSE)
From this analysis two concerns emerge for further exploration: the QQ plots for the species p-values seem inflated, and the volcano plot seems highly asymmetrical. I’ll examine this further in the next analysis on linear modeling QC.
sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] compiler stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] bedr_1.0.4 forcats_0.3.0 purrr_0.2.4
[4] readr_1.1.1 tibble_1.4.2 tidyverse_1.2.1
[7] edgeR_3.20.9 RColorBrewer_1.1-2 heatmaply_0.14.1
[10] viridis_0.5.0 viridisLite_0.3.0 stringr_1.3.0
[13] gplots_3.0.1 Hmisc_4.1-1 Formula_1.2-2
[16] survival_2.41-3 lattice_0.20-35 dplyr_0.7.4
[19] plotly_4.7.1 cowplot_0.9.3 ggplot2_2.2.1
[22] reshape2_1.4.3 data.table_1.10.4-3 tidyr_0.8.0
[25] plyr_1.8.4 limma_3.34.9
loaded via a namespace (and not attached):
[1] colorspace_1.3-2 class_7.3-14 modeltools_0.2-21
[4] mclust_5.4 rprojroot_1.3-2 htmlTable_1.11.2
[7] futile.logger_1.4.3 base64enc_0.1-3 rstudioapi_0.7
[10] flexmix_2.3-14 mvtnorm_1.0-7 lubridate_1.7.3
[13] xml2_1.2.0 R.methodsS3_1.7.1 codetools_0.2-15
[16] splines_3.4.0 mnormt_1.5-5 robustbase_0.92-8
[19] knitr_1.20 jsonlite_1.5 broom_0.4.3
[22] cluster_2.0.6 kernlab_0.9-25 R.oo_1.21.0
[25] httr_1.3.1 backports_1.1.2 assertthat_0.2.0
[28] Matrix_1.2-12 lazyeval_0.2.1 cli_1.0.0
[31] acepack_1.4.1 htmltools_0.3.6 tools_3.4.0
[34] bindrcpp_0.2 gtable_0.2.0 glue_1.2.0
[37] Rcpp_0.12.16 cellranger_1.1.0 trimcluster_0.1-2
[40] gdata_2.18.0 nlme_3.1-131.1 iterators_1.0.9
[43] fpc_2.1-11 psych_1.7.8 testthat_2.0.0
[46] rvest_0.3.2 gtools_3.5.0 dendextend_1.7.0
[49] DEoptimR_1.0-8 MASS_7.3-49 scales_0.5.0
[52] TSP_1.1-5 hms_0.4.2 parallel_3.4.0
[55] lambda.r_1.2 yaml_2.1.18 gridExtra_2.3
[58] rpart_4.1-13 latticeExtra_0.6-28 stringi_1.1.7
[61] gclus_1.3.1 foreach_1.4.4 checkmate_1.8.5
[64] seriation_1.2-3 caTools_1.17.1 rlang_0.2.0
[67] pkgconfig_2.0.1 prabclus_2.2-6 bitops_1.0-6
[70] evaluate_0.10.1 bindr_0.1.1 labeling_0.3
[73] htmlwidgets_1.0 magrittr_1.5 R6_2.2.2
[76] pillar_1.2.1 haven_1.1.1 whisker_0.3-2
[79] foreign_0.8-69 nnet_7.3-12 modelr_0.1.1
[82] crayon_1.3.4 futile.options_1.0.0 KernSmooth_2.23-15
[85] rmarkdown_1.9 locfit_1.5-9.1 grid_3.4.0
[88] readxl_1.0.0 git2r_0.21.0 digest_0.6.15
[91] diptest_0.75-7 webshot_0.5.0 VennDiagram_1.6.19
[94] R.utils_2.6.0 stats4_3.4.0 munsell_0.4.3
[97] registry_0.5
This R Markdown site was created with workflowr


Enjoy an incredible stay in our rural house, surrounded by a beautiful landscape:
Our policies are available in the next link: see hotel policies
Pack of 2 nights + breakfast + Spa session for 2 people from 135 €.
For 2 people and 2 nights. Taxes and breakfast included. Not valid for the individual rate.
The offers mentioned above are not valid between July and August.


|
libfly
6.2.2
C++20 utility library for Linux, macOS, and Windows
|
Functions | |
| template<char... Literals> | |
| FLY_CONSTEVAL fly::logger::Color | operator""_c () |
| template<char... Literals> | |
| FLY_CONSTEVAL std::int8_t | operator""_i8 () |
| template<char... Literals> | |
| FLY_CONSTEVAL std::int16_t | operator""_i16 () |
| template<char... Literals> | |
| FLY_CONSTEVAL std::int32_t | operator""_i32 () |
| template<char... Literals> | |
| FLY_CONSTEVAL std::int64_t | operator""_i64 () |
| template<char... Literals> | |
| FLY_CONSTEVAL std::uint8_t | operator""_u8 () |
| template<char... Literals> | |
| FLY_CONSTEVAL std::uint16_t | operator""_u16 () |
| template<char... Literals> | |
| FLY_CONSTEVAL std::uint32_t | operator""_u32 () |
| template<char... Literals> | |
| FLY_CONSTEVAL std::uint64_t | operator""_u64 () |
| template<char... Literals> | |
| FLY_CONSTEVAL std::size_t | operator""_zu () |
Type-safe, fixed-width integer literal suffixes not provided by the STL.
The expression that precedes the literal suffix is parsed and validated at compile time. Compilation will fail if any of the following error conditions are met:
1. The expression preceding the literal suffix is invalid. All standard integer literals are accepted. 2. The value represented by the preceding expression does not fit in the type specified by the suffix. 3. A character in the preceding expression does not match the corresponding base (e.g. 0b2 is an invalid expression).
The inline namespaces are to allow importing literal suffixes in the fly namespace with explicit control, without polluting the global namespace. Callers may import the literal suffixes in this file in any of the following ways:
// Import only the literal suffixes declared in this file. This is recommended. using namespace fly::literals::numeric_literals; // Import all literal suffixes declared in the fly namespace. Okay, but not recommended. using namespace fly::literals; // Import a specific literal suffix declared in this file. Okay, but can be verbose. using fly::literals::numeric_literals::operator"" _i8; // Import all symbols from namespace fly. Okay, but strongly discouraged. using namespace fly;
|
inline |
Type-safe integer literal suffix to construct a Color as a foreground color. The integer literal must be in the range [0, 255].
| Literals | The numeric literals from which to construct a 256-color value. |


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.user.client.ui.UIObject com.google.gwt.user.client.ui.Widget com.google.gwt.user.client.ui.Image org.gwtwidgets.client.ui.PNGImage org.gwtwidgets.client.ui.ImageButton
public class ImageButton
Use an image as a button. Allows for setting of on/off background color, border color, border width, and border style. The "on" colors are used on mouse over.
| Field Summary | |
|---|---|
protected static int |
OFF_STATE
|
protected static int |
ON_STATE
|
| Constructor Summary | |
|---|---|
ImageButton(java.lang.String url,
int width,
int height)
|
| Method Summary | |
|---|---|
Color |
getBackgroundOffColor()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
Color |
getBackgroundOnColor()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
Color |
getBorderOffColor()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
BorderStyle.BorderStyleConstant |
getBorderOffStyle()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
int |
getBorderOffWidth()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
Color |
getBorderOnColor()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
BorderStyle.BorderStyleConstant |
getBorderOnStyle()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
int |
getBorderOnWidth()
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
java.lang.String |
getOffStyle()
|
java.lang.String |
getOnStyle()
|
protected int |
getState()
|
protected void |
init()
|
boolean |
isOn()
|
void |
setBackgroundOffColor(Color backgroundOffColor)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
void |
setBackgroundOnColor(Color backgroundOnColor)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
void |
setBorderOffColor(Color borderOffColor)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
void |
setBorderOffStyle(BorderStyle.BorderStyleConstant borderOffStyle)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
void |
setBorderOffWidth(int borderOffWidth)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
void |
setBorderOnColor(Color borderOnColor)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
void |
setBorderOnStyle(BorderStyle.BorderStyleConstant borderOnStyle)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
void |
setBorderOnWidth(int borderOnWidth)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
void |
setColors()
Updates the colors of the widget based on the state and color settings. |
void |
setHorizontalMargin(int px)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
void |
setMargin(int px)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
void |
setOffStyle(java.lang.String offStyle)
|
void |
setOnStyle(java.lang.String onStyle)
|
protected void |
setState(int state)
|
void |
setVerticleMargin(int px)
This method is under consideration for removal, if you have an opion please comment on http://gwtwidgets.blogspot.com. |
| Methods inherited from class org.gwtwidgets.client.ui.PNGImage |
|---|
getUrl, setUrl |
| Methods inherited from class com.google.gwt.user.client.ui.Image |
|---|
addClickListener, addLoadListener, addMouseListener, addMouseWheelListener, getHeight, getOriginLeft, getOriginTop, getWidth, onBrowserEvent, prefetch, removeClickListener, removeLoadListener, removeMouseListener, removeMouseWheelListener, setUrlAndVisibleRect, setVisibleRect |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setElement |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getTitle, isVisible, isVisible, removeStyleName, resetStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int ON_STATE
protected static final int OFF_STATE
| Constructor Detail |
|---|
public ImageButton(java.lang.String url, int width, int height)
| Method Detail |
|---|
protected void init()
public boolean isOn()
public void setColors()
public void setMargin(int px)
public void setHorizontalMargin(int px)
public void setVerticleMargin(int px)
public Color getBackgroundOffColor()
public void setBackgroundOffColor(Color backgroundOffColor)
public Color getBackgroundOnColor()
public void setBackgroundOnColor(Color backgroundOnColor)
public Color getBorderOffColor()
public void setBorderOffColor(Color borderOffColor)
public BorderStyle.BorderStyleConstant getBorderOffStyle()
public void setBorderOffStyle(BorderStyle.BorderStyleConstant borderOffStyle)
public int getBorderOffWidth()
public void setBorderOffWidth(int borderOffWidth)
public Color getBorderOnColor()
public void setBorderOnColor(Color borderOnColor)
public BorderStyle.BorderStyleConstant getBorderOnStyle()
public void setBorderOnStyle(BorderStyle.BorderStyleConstant borderOnStyle)
public int getBorderOnWidth()
public void setBorderOnWidth(int borderOnWidth)
protected int getState()
protected void setState(int state)
public java.lang.String getOffStyle()
public void setOffStyle(java.lang.String offStyle)
public java.lang.String getOnStyle()
public void setOnStyle(java.lang.String onStyle)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


 It’s time to start working!If you have a child, you want him or her to be prepared for the future. So why not begin their dreary cubicle farm confinement before they even learn how to read? That’s what the Little Tykes Young Explorer does, combining a home cubicle and child-sized seating with a computer loaded with kid-friendly software, all at a rather inflated price. Which is a lot like real office furniture, come to think of it.
The Young Explorer costs $2,599. What that get you?
Furniture features:
- Flat desk area
- Left and Right built-in mouse pads
- Bench seat that fits two children and offers storage inside for supplies
- Two locking cabinet doors
- Computer wiring stores safely inside ventilated cabinet.
- Locking castors keep unit from rolling during use.
- Computer equipment features:
- Think Centre PC
- Internal DVD-ROM
- 1GB RAM (minimum)
- 160GB Hard Drive (minimum)
- 10/100 Ethernet
- MicrosoftÂ® Windows
- Sound Card and 2 External Speakers
- Surge protector
- 19” Widescreen Flat Panel LCD Monitor
- Custom Little Tikes Learning keyboard and Tiny Mouse (colors are subject to change without notice)
-
Computer Warranty: 1-year parts and labor.
Pre-loaded educational software:- Millie’s Math HouseÂ®
- Sammy’s Science HouseÂ®
- Bailey’s Book HouseÂ®
- Trudy’s Time and PlaceÂ®
- Thinkin’ ThingsÂ®
The set appears to be geared for schools, libraries, day care centers, and the like, but it’s funnier to think of it as the white-collar cousin to the McDonald’s cashier playset.
Considering that ThinkCentre PCs start at around $350 for the base model, and you can get a more attractive child’s computer desk for a few hundred bucks (or even less) this becomes an even more baffling product.
Young Explorer [Little Tykes via Dvice] (Thanks, Lisa!)


This package contains basic continuous input/output blocks described by differential equations.
All blocks of this package can be initialized in different ways controlled by parameter initType. The possible values of initType are defined in Modelica.Blocks.Types.Init:
| Name | Description |
| Init.NoInit | no initialization (start values are used as guess values with fixed=false) |
| Init.SteadyState | steady state initialization (derivatives of states are zero) |
| Init.InitialState | Initialization with initial states |
| Init.InitialOutput | Initialization with initial outputs (and steady state of the states if possible) |
For backward compatibility reasons the default of all blocks is Init.NoInit, with the exception of Integrator and LimIntegrator where the default is Init.InitialState (this was the initialization defined in version 2.2 of the Modelica standard library).
In many cases, the most useful initial condition is Init.SteadyState because initial transients are then no longer present. The drawback is that in combination with a non-linear plant, non-linear algebraic equations occur that might be difficult to solve if appropriate guess values for the iteration variables are not provided (i.e., start values with fixed=false). However, it is often already useful to just initialize the linear blocks from the Continuous blocks library in SteadyState. This is uncritical, because only linear algebraic equations occur. If Init.NoInit is set, then the start values for the states are interpreted as guess values and are propagated to the states with fixed=false.
Note, initialization with Init.SteadyState is usually difficult for a block that contains an integrator (Integrator, LimIntegrator, PI, PID, LimPID). This is due to the basic equation of an integrator:
initial equation der(y) = 0; // Init.SteadyState equation der(y) = k*u;
The steady state equation leads to the condition that the input to the integrator is zero. If the input u is already (directly or indirectly) defined by another initial condition, then the initialization problem is singular (has none or infinitely many solutions). This situation occurs often for mechanical systems, where, e.g., u = desiredSpeed - measuredSpeed and since speed is both a state and a derivative, it is always defined by Init.InitialState or Init.SteadyState initialization.
In such a case, Init.NoInit has to be selected for the integrator and an additional initial equation has to be added to the system to which the integrator is connected. E.g., useful initial conditions for a 1-dim. rotational inertia controlled by a PI controller are that angle, speed, and acceleration of the inertia are zero.
| Name | Description |
|---|---|
| Integrator | Output the integral of the input signal with optional reset |
| LimIntegrator | Integrator with limited value of the output and optional reset |
| Derivative | Approximated derivative block |
| FirstOrder | First order transfer function block (= 1 pole) |
| SecondOrder | Second order transfer function block (= 2 poles) |
| PI | Proportional-Integral controller |
| PID | PID-controller in additive description form |
| LimPID | P, PI, PD, and PID controller with limited output, anti-windup compensation, setpoint weighting and optional feed-forward |
| TransferFunction | Linear transfer function |
| StateSpace | Linear state space system |
| Der | Derivative of input (= analytic differentiations) |
| LowpassButterworth | Output the input signal filtered with a low pass Butterworth filter of any order |
| CriticalDamping | Output the input signal filtered with an n-th order filter with critical damping |
| Filter | Continuous low pass, high pass, band pass or band stop IIR-filter of type CriticalDamping, Bessel, Butterworth or ChebyshevI |
| Internal | Internal utility functions and blocks that should not be directly utilized by the user |


Transcribed by: r3v3LaT1oN with corrections and additional information by Keith Owen
[Scene: Chandler and Monica's apartment. Chandler and Monica are looking through some papers.]
Chandler: Did you see our bank statement? Can this be right?
Monica: I know...God. I haven't seen my savings take a hit like this since I was a kid and they came up with double-stuffed Oreos. What happened to all our money?
Chandler: I'm not sure what they did, but I'm inclined to blame Enron.
Monica: I guess with you doing the internship, we're just spending more than we're bringing in.
Chandler: Maybe I should quit and get a job that pays.
 I can't ask you to give that up. Though it'd be nice if the thing that you love was y'know... finding gold.
Chandler: You know what? You know what? I think we're making too big a deal out of this. ok? So we pay our bills a little late this month and maybe next month we cut back on a few things. And maybe we start eating out of Joey's refrigerator for a change. You're chef... what can you make out of backing soda and beer?
Monica: Ok worse case scenario is...we borrow some money from my parents.
Chandler: No! We're not borrowing money.
Monica: Why not?
Chandler: Because we don't do that. We are Bings! And if there's one thing my father taught me was... well to always knock before going into the pool house... but the other thing was never borrow money.
Monica: Wow! I Had no idea you had this much pride.
Chandler: That's right! I do! And I'm your man. And I'm going to get us through this situation even if it means you working twice as hard.
Opening Credits
[Scene: Phoebe's apartment. Mike and Phoebe seem to have finished watching a movie on television.]
Mike: I'm gonna go. (He kisses Phoebe on the cheek)
Phoebe: Why??
Mike: I haven't been home in a couple of days and I need to get some more clothes.
Phoebe: Oh...you don't have to go, I have something that will fit you.
Mike: I put that tube top on as a joke.
Phoebe: I want you to stay.
Mike: I want to stay too but I've gone as bad as much use out of these boxers as I can..
Phoebe: Why don't you turn them inside ou...
Mike: Done it. (Phoebe becomes a little more subdued) I'll be back in a couple of hours.
Phoebe: I'll miss you.
Mike: Me too. (He leaves. A few moments later, he enters again.) You know what? I just realised something. I don't wanna go home.
Phoebe: Great! Ok...I'll go get the tube top.
Mike: No, no! What I mean is, I hate going back to my apartment now... and partly because I live above a known crack den but... mostly because when I'm there, It's just, I really miss you. So.. do you want to move in together?
Phoebe: Wow, Mike Hannigan...You sure know how to make a girl say "Hell yeah!"
Mike: So we're doing it?
Phoebe: Yeah! Let's do it! Let's live together! (They embrace and Mike kisses Phoebe) Oh god, we're really going to move in together!
Mike: Yeah!
Phoebe: I've always wanted to live with a guy. "Pick up your socks!" "Put down the toilet seat!" "No! We're not having sex anymore!" It's gonna be fun!
[Scene: Joey's apartment. Monica enters.]
Monica: Hey Joey!
Joey: Hey!
Monica: Listen...I need to know that what I'm about to ask you, will never get back to Chandler.
(Joey frowns...then looks as if he understands)
Joey: I'd be lying if I said I haven't thought about it myself. Chandler is my best friend, it would be wrong. Good...(He winks)...But wrong.
Monica: (Looks exasperated) Ok first of all...It would be great. But that's not what I'm here to talk to you about. I need to borrow some money.
Joey: Aww, I don't know Monica y'know... erm... lending friends money is always a mistake.
Monica: But Chandler lent you money!
Joey: And I think he would tell you it was a mistake.
Monica: Come on...I just need it for some rent and..and some other bills.
Joey: Oh...how much?
Monica: Two thousand dollars?
Joey: Two thousand dollars!? What do you think I am? I soap opera star!?
Monica: Yeah...
Joey: That's right I am! (Opens drawer and rummages through it. Rachel enters)
Rachel: Hi you guys!
Joey & Monica: Hey!
Joey: Oo...what's in the bag?
Rachel: Oh er... well you know Emma started crawling? I realised that this place, is very unsafe for a baby. So I went to the store and got some stuff to baby-proof the apartment.
Joey: Oh...baby-proofing... Why is this such a big deal now? Y'know, when I was a kid it was like.. "Whoops! Joey fell down the stairs!" or er.. "Whoops! Joey electrocuted himself again!" Huh!
Monica: Anyway erm, are you going to get a handyman to install this stuff?
Rachel: No. I was just going to do this myself. (Joey makes a sarcastic laugh.)
Joey: You're gonna do it?
Rachel: Yeah, Why? You don't think a woman can do this?
Joey: Oh, women can. You can't.
Rachel: Monica...would you please tell Joey that he is a pig?
 And you can't do this.
Rachel: Wha!? What!? Come on! I found the hardware store all by myself!
Joey: The hardware store is right down the street.
Rachel: There is a hardware store right down the street?
[Scene: Central Perk. Ross, Chandler and Monica are sitting on the couch. Phoebe and Mike enters.]
 Ok, we've got great news.
Mike: Phoebe and I are moving in together.
Monica, Chandler, Ross: Congratulations!/Good for you!/Great!
Phoebe: I know it's so exciting! You know I've never lived with a guy before.
Monica: Well you know it's just like living with a girl. Only they don't steal your makeup. Unless they're playing "This is what my sister would look like" (Looks at Chandler)
Chandler: Yeah.... she's not so cute.
Mike: I'm gonna go to the bathroom.
Phoebe: Okay, well you put down the toilet seat.
Mike: Yes dear.
Monica: Is that a bit you guys do?
Phoebe: Uh huh...we're playing you two.
Monica: We don't do that! Tell her we don't do that!
Chandler: Yes dear.
Ross: I can't believe you guys are moving in together. That's, that's great! I mean...I'm happy for you guys..
Monica: I hear wedding bells.
Phoebe: Monica slow down! Ok? I'm just excited to be living with him. You know I mean, I don't know, Can I see someday being married to Mike? Sure! Yeah. Y'know..I can picture myself walking down the aisle in a wedding dress that highlights my breasts in an obvious yet classy way. But do I want that house in Connecticut...you know..near the good schools where Mike and I can send Sophie and Mike Junior.. Oh my god I do.
Ross: Phoebe, I had no idea you were so conventional.
Phoebe: I know! I guess I am! Oh my god! Load up the Volvo I want to be a soccer mom!
Mike: You ready to go?
Phoebe: Yeah! You bet roomy!
Monica: Don't you mean..groomy?
Mike: What are you talking about?
Phoebe: Oh please, these guys, we haven't even moved in yet and they have us picking out china patterns. (Mike seems to gag a little...and laughs nervously. They begin to leave. Phoebe bolts back)
Phoebe: China patterns!!!!!
[Scene: Joey's apartment. Rachel is fiddling with the drawer.]
Rachel: This is easy...Can't do this! (Moves away...and finds her sweater sleeve stuck to the drawer) Oh! Wow! Seriously I can't do this. (Fiddles more)
[Scene: Central Perk. Chandler sits on the couch. Joey sits at the round table]
Chandler: Hey Joe!
Joey: Hey!
Chandler: Listen er..I need to ask you a favor but you can't tell Monica anything about it.
Joey: I thought you didn't have secrets from Monica.
Chandler: And that would have made the official party line. (Joey nods) Monica and I are having a little financial trouble.
Joey: Yeah, I know.
Chandler: What? What do you mean you know?
Joey: Err... I just figured it out! You know, I mean you're not working and the economy is bad.
Chandler: Oh! Right.
Joey: (to himself) That's the fastest I have ever thought!
Chandler: Anyway, err... I need to borrow some money.
Joey: Oh! Sure! How much? Two thousand dollars?
Chandler: Yes! Two thousand dollars exactly! How do you know that!
Joey: (To himself) I am on fire!
Chandler (Stands up and walks to Joey): Listen...this is really nice. Do you... (sees his chequebook) Did you write a cheque to Monica for two thousand dollars? Did Monica borrow money from you?
Joey: Err... Kind of.
Chandler: I can't believe her! Did she tell you we were having money problems?
Joey: Oh no no no no no... It wasn't... It wasn't because of your money problems, it was for something for her.
Chandler: What?
Joey: Something personal.
Chandler: What would she get for herself for two thousand dollars that she wouldn't tell me about?
(Woman with huge breasts cuts across them. Takes Joey's coffee)
Woman: Excuse me.
Joey: Boob job.
Monica: I don't want her to get a boob job! That's crazy!
Joey: Well it's...It's not that crazy okay? Making them smaller, that would be crazy.
[Scene: Phoebe's apartment. Phoebe and Mike are packing stuff.]
Mike: Well hey, I wanna ask you about Monica's little "groomy" joke.
Phoebe: Oh! Alright. Well I think the reason people laugh is becuase it's a play on the word roomy.
Mike: I get the joke. Sophisticated as it was. Now the thing I wanna say is... maybe we should have talked about this before. Us living together, you're not expecting a proposal, right?
Phoebe: Oh no! No no! Not at all. We're just moving in right now. See where it goes.
Mike: Yeah well, that's the thing. For me it's as far as it can ever go.
Phoebe: What do you mean?
Mike: Look. Phoebe, I-I love you. Very much. But I never want to get married again.
 I kind of lost faith in the whole idea.
Phoebe: Was it really that bad?
Mike: At one point near the end she deliberately defecated.....
Phoebe: Ok, well that's bad. But don't you think it might be different with someone else? Perhaps a blonde who always uses a toilet. Except for once in the ocean.
Mike: Look it's not about who I would marry. And I was certain the first time I got married it would last forever. And I was totally wrong!
Phoebe: But it's just...
Mike: Look Phoebe, It's not about you. I just never wanna get married again.
Phoebe: Oh!
Mike: I'm sorry. Are you ok with that? Cause if not...maybe us moving in together isn't the best idea.
Phoebe: No! I definitely don't wanna get married. No I just wanted to make sure you didn't want to too. Whew!
Mike: Trust me, I will never...
Phoebe: Yeah I get that.
[Scene: Joey's apartment. Rachel is flipping through magazines. Handyman is installing things. Monica enters.]
Rachel: Hi!

Rachel: Yeah, I don't know who I was kidding. I can barely use chopsticks.
  You forgot your erm...Your game. (hands it to him)
Handyman: Thanks.....
(Chandler enters)
Chandler: Hey Rach! There she is...My perfectly proportioned wife.
Rachel: Don't look at me I never get his jokes.
Monica: Thank you?
Chandler: Oh no..don't thank me. Thank you. You know there's not one thing I would change about you? Not one single thing! And definitely not... two... single things.
Monica: Ok, you're being wierd.
Chandler: No no! I just love the way you look, I am warm, for your form.
Monica: Ok..You know the old classics you know,You look nice? They're still ok.
Chandler: Well yes yes... You look nice can mean that your face looks nice. I want to compliment your body. I mean..I wouldn't change it. At all. And more specifically, I wouldn't want anything to get any bigger.
Monica: Okay...
Chandler: I mean, You wouldn't want any part of me to get any bigger would you? Don't answer that.
(He leaves)
Rachel: Just when you thought that dude couldn't get any wierder.
Monica: I know why do you think he was so worried about me getting bigger?
Rachel: I don't know! I mean, what brought that on?
Monica: Oh my god. We're trying to get pregnant so he's probably starting to freak out about the fact that my body is going to change.
Rachel: No you really think that's what it is?
Monica: You heard him! "No bigger!" "You're perfect!" "Just don't get any bigger!"  You know what? I'm going to have to talk to Chandler.
Rachel: Yeah! If you don't I will! Of course your body's gonna change.  It's just such a magical time!
[Scene:Ross's apartment. Phoebe is at the door.]
Phoebe: Hi
Ross: Hey!
Phoebe: Listen, I wanted to ask you something about marriage.
Ross: Oh great now you're seeking me out to make jokes? I mean I can see for all hanging out but to come to my home!
Phoebe: No...I really wanted to know how you feel about it.
Ross: Why?
Phoebe: Mike doesn't ever wanna get married.
Ross: Never?
Phoebe: Never.
Ross: wow, are you still going to move in with him?
Phoebe: I want to, but I just want you to tell me that marriage isn't really that big a deal. You know that I won't, I won't be missing out on anything. That marriage stinks!
Ross: Yeah, marriage... stinks! I mean if you wanna see a man gain weight and a woman stop shaving? Get them married.
Phoebe: That's not how you really feel is it?
Ross: No, I'm sorry. Look I don't think that's what you wanna hear right now but I can't help it. I love marriage.
Phoebe: Seriously? You divorce-o?
Ross: If you have to call me name, I prefer "Ross the Divorcer". It's just cooler. Look, I know my marriage isn't exactly work out. But I love to be that committed to another person. And Carol had some good times before she became a lesbian... and once afterward. I'm sorry.
Phoebe: It's ok that's how you feel.
Ross: But come on! I mean living together will be great! I mean you guys have so much fun and you love Mike.
Phoebe: I do love Mike.
Ross: Yeah see? And you are so excited about moving in together before, and you know what? You should be. It's a big deal!
Phoebe: Yeah I guess you're right. Yeah thanks. This helped. Thanks.
Ross: The Divorcer, to the rescue!
Phoebe: It's not cooler.
Ross: Yeah I just hurt it.
[Scene: Joey's apartment. Joey enters carrying a tub of ice cream. He sets it on the table, takes off his jacket and struggles with the drawer. It cannot be opened.]
Joey: Rach?! (He walks over to the fridge to put it in, but it cannot be opened either) Rachel!!!!? (He walks to the bathroom and tries to lift the toilet seat cover. It won't come up.) So I can't do anything I like????
[Scene: Chandler and Monica's apartment. Chandler enters. Rachel and monica are seated at the table.]
Chandler: Hey Rach! Ah........ Perfection. (kisses monica) Wouldn't change a thing. Not a thing.
Monica: Honey?
Chandler: Yeah?
Monica: About that? Erm...I'm going to change.
Chandler: But honey you don't have to.
Monica: I'm going to get bigger!
Chandler: Honey I... I love your breasts the way they are!
Rachel: Argh. fascist
Monica: Well, my breasts are going to get bigger weather you like it or not! And you know what? It's not just my breasts.
Chandler: your ass?!?!?
Rachel: Man, don't be surprised if her hands and her feet get bigger too!
Chandler: They...do that?
Monica: It's kind of a package deal!
Chandler: God why why would you want to do that to yourself!?
Monica: I thought I was something that we both wanted!
Chandler: Alright look, if it means that much to you, a may be able to get on more with the big boobs.
Rachel: Oh my god Chandler! If you can't handle this, what are you going to be like in the hospital? With the blood and the screaming and the little present that's shooting out of her!?
Chandler: (sedated) What?
[Scene: Joey's apartment. He's prying open the drawer with a crowbar to no avail. Monica, Rachel and Chandler enter.]
Rachel: Joey! Why did you tell Chandler that Monica was getting a boob job?
Joey: Because she is!
Monica: Joey, Chandler knows I borrowed the money.
Joey: Mmmm hmm! For your boob job!
Monica, Rachel, Chandler: It's over/Joe!
Joey: OK so I'm out four thousand dollars and nobody's boobs are getting any bigger?
[Scene: Phoebe's apartment. Ross is helping with the packing, Phoebe and Mike are also there.]
Ross: Hey! What do you guys think about this. "Ross: The Divorce-Force".
Phoebe: Better.
Mike: Very cool.
Ross: Hey Pheebs, you know I'm i'm really glad you came to talk to me the other day and I hope I was a little helpful.
Phoebe: Oh yeah you were helpful! Yeah, no, thanks you.
Ross: Good, good. Yeah coz the more I thought about it, the more I realised I don't think marriage is neccessarily the right path for you.
Phoebe: What do you mean?
Ross: Well, I know the other day in the coffeehouse you were caught up in the whole soccer mom thing? but is that really you? I mean can you honestly picture yourself in a Volvo?
Phoebe: They are awfully boxy...
Ross: I don't know you'd be so bored with marriage. I mean it's so... normal.
Phoebe: Uh huh.
(Chandler, Monica, Joey and Rachel are carrying a couch through the door)
Ross: Hey hey, can I help?
Chandler: Well! We er..climbed up four flights of stairs, manueveored a narrow hallway, dodged a rabid pitbul... but these last three feet are where it gets really tricky.
Ross: You know sometimes your words... they hurt.
Joey: Hey uh, where do you guys want this?
Rachel: Yeah, seriously coz this is really heavy. (She suddenly lets go) I mean not for me because i'm only pretending to hold this, but for these guys.
Phoebe: Just one last time erm... the marriage thing... there's no wiggle room? None at all?
Mike: No but... You don't want to get married either right?
Phoebe: Right. Except that I do want to get married.
Joey: (voice strained) Couldn't have this conversation down at the truck huh?
Mike: You wanna get married?
Phoebe: Someday.
Chandler: Aaaaand....... hernia.
Phoebe: I haven't exactly had a normal life and I never really felt I was missing out on anything but it just feels that now it's my turn some of the regular stuff.
Mike: But if you wanna get married why didn't you say something before?
Phoebe: Because I just didn't know how much I wanted it. And I love you, and I wanted to live with you.
Mike: I want to live with you too! Let's do that!
Phoebe: But I don't think I can! it was ok to move in when I didn't know what was gonna happen, but I can't move in knowing that nothing is ever gonna happen.
Mike: Can we at least try living together? I mean you might change your mind about marriage.

Mike: No.
Phoebe: Me neither. I think I need to be with someone who wants what I want.
Mike: But I don't want this to end.
Phoebe: I don't want it to end either.
Mike: I can't believe this is gonna end. I guess I'll have my stuff packed up.
Phoebe: Yeah.
Mike: Ok... so...(They hug) Goodbye.

Rachel: I'm so sorry Pheebs.
Monica: We're all sorry...  That was here already huh? I love you. (they hug again)
Ending Credits
[Scene: Joey's apartment. Joey is struggling with the fridge. He finally gets it open and falls on the floor]
Joey: AH HAH! I DID IT! HA HA! Alright... (He takes a box out, about to close fridge, then thinks.) Better take all I can carry. Who knows when i'll be able to get in here again!
End


THE END
Trans Coming Out Simulator 2018
by Raul | @R__aulT
and MTF scenario from 'D-D' | @_not__not_
Thanks to Code(English translation)
+ Beta testers!
++ Handsome Demi(Demi) who taught me
web console!
Reference from Nicky Case | @ncasenmare
Comming out simmulator 2014
thank you for playing!
:)


Message that is displaed when total number of records on the server changed, and a reload from top is needed.
String, default = 'Your remote data source record count has changed, reloading from the first record.'
If you do not like default message, you are welcome to define your own.


TextFileIndex
The key and value content to get from each line.
tf.compat.v1.lookup.TextFileIndex
tf.compat.v2.lookup.TextFileIndex
This class defines the key and value used for tf.lookup.TextFileInitializer.
The key and value content to get from each line is specified either
by the following, or a value >=0
.
* TextFileIndex.LINE_NUMBER
means use the line number starting from zero,
expects data type int64.
* TextFileIndex.WHOLE_LINE
means use the whole line content, expects data
type string.
A value >=0
means use the index (starting at zero) of the split line based
on delimiter
.


| Package | Description |
|---|---|
| geometry.rackshape | |
| geometry.ringshape | |
| geometry.trackshape |
the trackshape package defines a couple geometric classes used by objects in the piece.track package to know shape,
connection points, and positioning data.
|
| geometry.wheelshape |
The wheelshape package defines many specialized wheels.
|
| piece |
The piece package defines GearedObjects and how they interact.
|
| piece.track |
The track package defines a handful of files which describe how different track components work and fit together.
|
| Modifier and Type | Class and Description |
|---|---|
class |
RackGeometry
Defines the shape of a straight rack.
|
| Modifier and Type | Class and Description |
|---|---|
class |
RingGeometry
Common parent for all ring shapes.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Curve
A curved section of piece.track is described by this class.
|
class |
Line
Defines the shape of a straight segment of piece.track.
|
class |
TriangleHub
Defines the geometry of a triangle hub segment of piece.track.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Barrel
A barrel shape for a wheel
|
class |
Circle
A circle gear shape.
|
class |
Diamond
A diamond shaped geared wheel.
|
class |
Egg
An egg shaped geared wheel.
|
class |
Ellipse
An Ellipse shaped wheel
|
class |
Football
A football shaped wheel.
|
class |
Heart
A heart Shaped wheel
|
class |
RegularNGon
This class defines any shape which has n sides and n angles, where each angle is of the same value.
|
class |
Shield
A shield shaped wheel.
|
class |
Star
A five-pointed star shaped wheel.
|
class |
Teardrop
A teardrop sized wheel.
|
class |
Trapezoid
A trapezoid Sized Shape
|
class |
WheelGeometry
This class defines common behavior for wheel shapes.
|
| Constructor and Description |
|---|
GearedObject(Geometry shape)
Constructs a geared object from the given shape.
|
| Constructor and Description |
|---|
Track(Geometry shape)
Constructs a geared object from the given shape.
|


//WEDDINGTEMPLATE.PHP
//Template for wedding proposals
// Include database wrapper class
include_once "ez_sql.php";
//Include global functions
include_once "common.php";
//Get Lead id
$leadid=get_param("leadid");
//See if print or email
$action=get_param("action");
//Get group info
$sSQL="SELECT * FROM GroupHeader WHERE GroupId=".$leadid;
$group=$db->get_row($sSQL);
//Get hotels info
$sSQL="SELECT * FROM GroupHotels INNER JOIN Hotel ON grouphotels.GroupHotelHotel = hotel.HotelID WHERE grouphotels.GroupHotelGroup=".$leadid;
$hotels=$db->get_results($sSQL);
$sSQL="SELECT * FROM grouphotels WHERE GroupHotelGroup =".$leadid;
$ghotel=$db->get_row($sSQL);
//Get notes
$sSQL="SELECT NotesDetails FROM Notes WHERE NotesGroup=".$leadid." AND NotesType='P'";
$notes=$db->get_var($sSQL);
?>
Wedding Proposal
WEDDING PROPOSAL
GroupName ;?>
GroupContact ;?>
GroupId ;?>
Dear GroupContact; ?>,
Thank you for considering
Viva Wyndham Resorts
as the setting for your wedding experience.
Viva Wyndham Resorts
provides a value-packed, all inclusive option for you and your guests, with a high energy atmosphere and
international accents on both food and service. Your all-inclusive experience will include :
-
Accommodations
-
Full breakfast, lunch, dinner and snacks
GroupHotelHotel == 9 || $ghotel->GroupHotelHotel == 10){ ?>
-
Unlimited a la carte dining with no reservations required
-
Unlimited beverages, cocktails and wine
GroupHotelHotel == 9 || $ghotel->GroupHotelHotel == 10){ ?>
-
Branded drinks included
-
Free Wi-Fi in the entire resort
-
Free Wi-Fi wifi;?>
GroupHotelHotel == 9 || $ghotel->GroupHotelHotel == 10){ ?>
-
Room service – 24 hours
-
In-room coffee maker
-
In-room minibar stocked daily with water, Sodas & beer
-
Waiter service at the beach & pool
-
Daily activities and fitness programs
-
Unlimited non-motorized sports with complimentary lessons
-
Live nightly entertainment
-
All taxes, surcharges, gratuities
-
And ... much, much more
If the group stays in our resorts for a minimum of three nights, the wedding couple will also enjoy our
Pure VivaWyndham Honeymoon Package FREE.
The Pure Viva Wyndham Honeymoon Package includes the following :
-
Early check-in and late check-out based on availability
-
Upgrade to a higher room category based on availability
-
In-room breakfast on the day after your arrival
-
A bottle of sparkling wine
-
Fresh fruit plate
-
A tray of hors d'oeuvres in resorts available
-
A photo or souvenir
-
Two Viva Wyndham t-shirts
-
10% Discount at our Vacation Club
-
10% Discount on Beauty and Spa services in only resorts available
We offer several locations to choose from, an extensive list of options both for catering and entertainment
and a personalized service and attention to detail. Your wedding experience will be exactly as you always
dreamed, unforgettable!
Let us do the work for you. We can assist you with special arrangements for your important day including
special room requests, transfers, and any other details you may need aid with.
Following is the current information you have requested.
HotelInfo ;?>
To look at some pictures
video != ""){?>
and video
of the resort and its amenities, please click on the
video != ""){?>
links
link
below:
Link Pictures
video != ""){?>
Link Video
| Room Block |
|
|
|
|
//Get Rooms info
$sSQL="SELECT hotel.HotelShortName, groupperiods.PeriodCheckin, groupperiods.PeriodCheckout, grouprooms.childrenRate, hotel.HotelLongName, roomtype.RoomTypeDescription, occupancy.OccupancyDescription, grouprooms.GroupRoomsId, grouprooms.GroupRoomsQty, grouprooms.GroupRoomsNights, grouprooms.GroupRoomsPP, grouprooms.GroupRoomsRevenue, grouprooms.GroupRoomsHotel, grouprooms.GroupRoomsPeriod FROM grouprooms INNER JOIN occupancy ON grouprooms.GroupRoomsOccupancy = occupancy.OccupancyId INNER JOIN roomtype ON grouprooms.GroupRoomsType = roomtype.RoomTypeId INNER JOIN hotel ON grouprooms.GroupRoomsHotel = hotel.HotelID INNER JOIN groupperiods ON grouprooms.GroupRoomsPeriod = groupperiods.PeriodId WHERE grouprooms.GroupRoomsGroup=".$leadid." ORDER BY grouprooms.GroupRoomsHotel, grouprooms.GroupRoomsPeriod, grouprooms.GroupRoomsOccupancy";
$rooms=$db->get_results($sSQL);
$hotelNums = array();
$hotelQuantity = 0;
foreach($rooms as $room){
if(count($hotelNums) > 0){
foreach($hotelNums as $hotelNum){
if($room->HotelID == $hotelnum){
$hotelQuantity--;
}
}
}
$hotelNums[] = $room->HotelID;
$hotelQuantity++;
}
$periodid=0;
$hotelid=0;
foreach($rooms as $room){
$cambiato=0;
if($room->GroupRoomsHotel!=$hotelid){
$hotelid=$room->GroupRoomsHotel;
$cambiato=1;
}else{
$cambiato=0;
};
if($room->GroupRoomsPeriod !=$periodid){
$periodid=$room->GroupRoomsPeriod;
$cambiato=1;
};
if($cambiato==1){
?>
| |
|
HotelLongName; ?>
|
Date of Arrival :
PeriodCheckin != null){ echo date('F j, Y',strtotime($room->PeriodCheckin)); }?>
Date of Departure :
PeriodCheckout != null){ echo date('F j, Y',strtotime($room->PeriodCheckout)); }?>
|
| Room Type |
Occupancy |
Rooms |
Nights |
Price PP per night |
| echo $room->RoomTypeDescription; ?> |
echo $room->OccupancyDescription; ?> |
echo $room->GroupRoomsQty; ?> |
echo $room->GroupRoomsNights; ?> |
$ echo $room->GroupRoomsPP; ?> |
| echo $room->RoomTypeDescription; ?> |
echo $room->OccupancyDescription; ?> |
echo $room->GroupRoomsQty; ?> |
echo $room->GroupRoomsNights; ?> |
$ echo $room->GroupRoomsPP; ?> |
get_results($sSQL);?>
GroupRoomsId;
$occPrices = $db->get_results($sSQL);?>
-
RoomTypeDescription;
if(substr($room->RoomTypeDescription, -1) == "s") {
echo"' rates";
} else {
echo "'s rates";
}?>
-
occupancyid];?> occupancy is $price;?> per person per night.
HotelContractHotel != 9 && $hotel->HotelContractHotel != 10){
foreach($rooms as $room){
if($room->childrenRate != null){?>
-
1 ){ echo $room->HotelShortName.":"; }?> Children 3-12 years old pay $childrenRate;?> per child per night. Newborn − 2 years old stay free.
- This is an Adults-Only Resort. Children are not allowed.
- All prices are per person, per night.
- Above amenities and rates require a mandatory minimum of 10 rooms in double occupancy.
- Reservations traveling 5 days prior or after rooms blocked will be honored with the same group rates.
- Any pre and post stays are based on space available.
- Above rates are valid for seven days from the proposal issued date. After seven days, rates are subject to change without notice or until contracted.
- Space is subject to availability.
- In order to secure a group block, we require a signed contract and a 25% deposit from the total room block amount.
get_results($sSQL)){?>
| Additional Services |
|
|
|
GroupExtraHotel!=$hotelid){
$hotelid=$extra->GroupExtraHotel;
$cambiato=1;
} else {
$cambiato=0;
}
if($extra->GroupExtraPeriod !=$periodid){
$periodid=$extra->GroupExtraPeriod;
$cambiato=1;
}
if($cambiato==1){ ?>
| |
|
HotelLongName; ?> - Date of Arrival echo $room->PeriodCheckin; ?>- Date of Departure echo $room->PeriodCheckout; ?>
|
| Description |
Units |
Price |
| echo $extra->GroupExtraShortDesc; ?> |
echo $extra->GroupExtraUnits; ?> |
$ echo $extra->GroupExtraPricePU; ?> |
| echo $extra->GroupExtraShortDesc; ?> |
echo $extra->GroupExtraUnits; ?> |
$ echo $extra->GroupExtraPricePU; ?> |
As an added bonus, we will offer one complimentary "Resort Stay" for every 20 paid adults participants.
Therefore the twenty-first person is free. The complimentary stay will be allocated in the category in which
there is the greatest number of room types reserved.
Attached you will find information on our different wedding packages. This will help you facilitate your
search to find the perfect wedding package that suits you best.
We thank you for your interest in
Viva Wyndham Resorts
and hope to have the opportunity to host your wedding. Should you require any additional information,
please do not hesitate to contact us directly at 1-800-280-7521 ext. 101 or send an e-mail
to
<EMAIL_ADDRESS>We look forward to speaking to you soon.
Kind Regards,
Groups & Weddings Director
Represented by Caribbean Resort Marketing
1200 N.W. 78th Avenue, Suite 110, Miami, FL 33126 Tel<PHONE_NUMBER> Fax<PHONE_NUMBER>
www.vivawyndhamresorts.com


Delete an object from the root set of a rucksack.
(defgeneric delete-rucksack-root (object rucksack) (:documentation "Delete an object from the root set of a rucksack."))


Test instruction: Never interact outside the green area: (a) Select a test API. (b) Click the button for desired postMessage sequence.
Expectation: Node of these buttons should be able to call the test API. User Activation v2 works in each case.
User-activation-gated API to test:


Creating Animations and Interactions with Physical Models
Physics-based animations and interactions are becoming more common in UI. This page goes through some basic physical models and the kinds of interactions and animations that can be constructed from them.
Scrolling on iOS is an excellent example of a physics-based interaction. When you drag your finger across the screen, the content tracks along with it, thereby scrolling, but when you lift your finger all of the physics magic happens: the content continues tracking with the same momentum and slows down under the influence of (virtual) friction. If you hit the end of the content, then the momentum goes into an overdamped spring which absorbs the momentum and returns you to the end of the content.
Everyone is familiar with scrolling, and all of the touch-based operating systems implement it because it feels so natural to use. But lets start with something a bit simpler: here are two buttons which get a bit smaller when you push down on them (to give visible feedback indicating that the UI has received your touch input). One of these buttons uses an underdamped spring to control its size, while the other uses more traditional CSS transitions.
- Push on each button periodically. Try setting the damping to 1 and see how large you can make the button.
- How does the spring constant relate to the speed of motion when you have a small damping? How are damping and the spring constant related?
Conserving momentum
In the button example above, the user input is a binary press (the button is either being pressed or not). In most of the other examples on this page, we'll instead seed the physics simulation with the current momentum and position of an object. To simplify the code, I always use a mass of 1, which means that velocity and momentum are the same number and thus interchangeable.
Why is it important to conserve momentum, though? What happens if we create animations that ignore the momentum that the user imparted to the UI?
This example is the UI for navigating back in Android Wear: you drag from the left to the right and release. One version ignores your momentum and just runs the same animation every time. The other example rolls the momentum into an constant acceleration (gravity) simulation if you drag with enough velocity or beyond the half-way point. If you don't drag far enough or drag in the other direction then a spring is used to take the menu back to where it started.
- How does it feel when the menu continues moving with the momentum that you gave it? How about when it just uses the canned transition?
- I used two physical simulations here, picking one depending on the velocity and end position. I started out using a single spring to do everything. That didn't work out because the cancel animation was too slow, so next I tried using one spring for "back" and one spring for cancelling the gesture. I then decided that maybe constant acceleration would feel better, and that's what is in there now. One nice thing about modeling with physical objects is that you have a lot of choice over how to make things behave.
Recent research suggests we have an understanding of conservation of momentum from birth. I believe that UI which upholds these strongly held expectations is more pleasing than UI that ignores them.
Different simulations
We're going to look at three simple simulations: springs, constant acceleration (or gravity) and friction. These sound pretty boring, but combined with touch we can come up with some good interactions.
In this example we're using gravity to create a lock screen like the one in Windows 8. When you drag up on the image and release, it keeps its momentum but is pulled down by a constant acceleration. If you don't give it enough momentum, then it falls back down and the machine stays locked. This is a physics-based variant of slide-to-unlock.
- Try slamming the lock screen into the ground!
- What happens when you set the Rebound to 1.0? What about 1.1?
- Press "Reset Position" and then try setting the acceleration to a negative value. Now we've changed the UI so that any upwards drag will unlock the machine—like hiding the notification list on Android or iOS. Physics simulations can give a very different feel depending on these constants.
Now we're going to compare constant deceleration (which is almost the same as the gravity example above; it just means the acceleration constant is negative) with friction. When I first started learning about physics simulations I thought that the constant deceleration simulation was the only way to slow things down and used it for everything, including scrolling. The result was terrible! My scrolling content would stop too abruptly and have a bad feel compared to everyone else's. For scrolling, as well as sliders, friction is a much better feeling simulation.
One way to think of the difference between deceleration and friction is to visualize the way an object slows down when you throw it up into the air before it starts falling again (this is constant deceleration) and the way an object slows down after it's been pushed along a table like an air-hockey puck when the table is off (friction). For the mathematically inclined, constant deceleration is a quadratic function of time whereas friction is a power function where time is the exponent.
In this example you can see the difference between constant deceleration and friction. Give each of the sliders a short, slow fling and watch how they slow down.
- Notice how the Decelerating Slider (which is using a constant deceleration) doesn't feel good. Either it goes too far or stops too abruptly. Gravity was the perfect simulation for the lock screen (and the dialogs below) but friction creates a much more natural feel for these sliders and for scrolling.
- When the thumb hits the end of the slider it just stops moving, and all momentum is immediately lost. What can we do so that we're not throwing away all of the thumb's momentum? We could drag the whole control, we could let the thumb go over the end slightly, or we could even squish the thumb a bit!
Combining simulations
So far we've used individual simulations (spring, gravity and friction) to create various interactions and animations. We can actually combine them to create even more interesting systems. In my recent game for Android, Letterplex, I made the dialogs fall from the top of the screen and land in the middle (as they do in the iOS inspiration Letterpress). However when they reach the middle of the screen, they bounce slightly as if landing on a cloud (or an overdamped spring).
In this non-interactive example you can see how the combination of gravity and a spring makes a nice feeling animation. Hit "Reset Position" to start the animation over.
- Notice how this combination is very sensitive to the damping value—try setting it to 1. Even though momentum is conserved we get something that feels distinctly weird, like a fly falling into a spider's web.
- Play with the acceleration and spring constant to get a feel for how the gravity and spring constants interact. A high spring constant gives us something like NeXT's "head shaking" log in dialog, only vertically.
Perhaps the most significant combination is friction with a spring to create scrolling. You've certainly seen this before, but try changing the coefficient of friction and the spring constants to better understand the kinds of systems you can create with these simple primitives.
- Try setting the friction to the smallest value (0.001) and the largest value (0.1) and notice how it changes how far your flicks cause the list to scroll. iOS actually uses different friction coefficients in different places—In Contacts your flicks take you a lot further than they do in Safari, for example.
Once you understand how something like scrolling is constructed, it's easy to make things like the "infinite" linear scroller in iTunes Radio on iOS 7. Here we have a constant velocity giving us a linear animation. Note: If you think you might ever drop a frame, don't use linear translation animations. Humans are amazing at tracking linear motion, so dropped frames will be perceived as very jarring. In contrast, humans seem bad at tracking things zooming in or out, so you can drop all kinds of frames in a zoom animation and most people won't notice.
This example uses a tweaked friction simulation that has a constant velocity which can be temporarily overcome by flicking left or right. Notice what happens when your imparted momentum is consumed and the scroller resumes its previous motion. It's smooth and seamless.
Mapping inputs and outputs
So far we've used press and velocity as inputs, and we've mapped the output of the physics simulation to either the translation or scale of the object. Our devices have a bunch of sensors and we can control more than just the initial velocity.
Here's an example where (on mobile only) we use the gyroscope to control the velocity to pan around in a photo. This is similar to Facebook Paper's photo viewer, but Facebook Paper uses a direct relationship between the gyro and the scroll position.
Note that this example only works on devices with gyroscopes.
- Is it annoying when you're trying to hold the photo still? We could add a dead zone in the middle of the gyroscope output where we round it to zero to improve this.
- I initially wrote this example with the gyroscope controlling acceleration. This felt terrible! It would accelerate off left or right, and you'd overcompensate in the other direction. Controlling the velocity feels pretty good, and moves smoothly even though the gyroscope is a fairly noisy sensor.
We can also trigger springs based on proximity. I wrote up this example previously. Each face circle has a spring which is triggered when the cursor gets close. The motion of the face is then controlled by both the spring and the cursor position: the spring controls how far the face should be between its natural home position and where the cursor currently is.
Phew! Here's an example of mapping the output of a physics system differently. It's the "falling dialog" example from above, except that instead of translating the dialog downwards when it hits the ground, we squish it. Non-uniform scales don't usually look very pleasing, so it's hard to find any examples like this in real products.
Adding extra effects
Sometimes you've got a good looking animation or interaction, but you want to add something extra to it that is non-physical. Here's an example of adding a rotation to the falling dialog to make it look less one-dimensional. The question and answer app Jelly uses this to good effect when animating the question cards.
Conclusion
What did we learn?
- Physical models let us easily create rich animations and interactions that feel more natural by conforming to our innate expectations of how things should move and respond.
- Physical models give us enough flexibility to create a wide variety of interactions and animations.
- Physical models can be combined to create more complex and dynamic systems.
- We can use all kinds of inputs to physical models, and map their results differently to create the effects we want.
I made a lot of mistakes and rewrote a couple of examples while writing this article (read my mistakes in the commit log). What did I learn?
- I didn't have a good grasp on what the spring constant and damping do to the "feel" of the spring before writing this. I had a solid algebraic understanding of a spring, but lacked a good intuitive understanding. That's the strength of interactive examples!
- The CSS transition version of the Android Wear back gesture actually works better than I expected, so the difference between the two versions is more subtle than I wanted. As I noted above, I also tried using a spring to model it at first, and later switched to acceleration which feels a lot better!
- Don't map the gyroscope to acceleration for panning! It was obvious what I needed to do as soon as I saw it running, but it wasn't obvious to me before.
- The squishy dialog is neat! I thought it'd look really bad, but I actually quite like it. Coincidentally squash and stretch is the most important of Disney's 12 Principles of Animation.
The commented JavaScript source code to all of the above examples is available on github. Also check out Gravitas, a Java library I wrote which contains many of the physical models used here.
About the author
Ralph Thomas is a former high-school physics student who has spent the past 15 years focused on user interface implementation. A "full-stack" client engineer, Ralph has written high-performance mobile UIs from kernel input drivers, through OpenGL ES-based 2D graphics engines, physics engines and user interface toolkits up to full applications built on those foundations. Ralph has also contributed performance enhancements to the WebKit project. Follow Ralph on
Twitter or send him
email.


When and how Task.WhenAll improves performance
Task.WhenAll() runs asynchronous tasks in parallel.
“Parallel” = multiple tasks running at the same time, “Asynchronous” = tasks dont block main thread.
Which code sample below is faster?
private static async Task TestAsyncSequential()
{
await EmptyTask();
await EmptyTask();
await EmptyTask();
}
private static async Task TestAsyncParallel()
{
await Task.WhenAll(EmptyTask(), EmptyTask(), EmptyTask());
}
https://github.com/vitawebsitedesign/async-parallel-benchmark
10-run benchmark
Non-parallel awaits
Parallel awaits via Task.WhenAll()
Some articles claim that code sample #1 is not faster, since returned Task are hot (i.e.: Task-based Async Pattern
However this is incorrect. Even though hot tasks “start” as soon as theyre returned, the 2nd task isn’t “returned” until the 1st await finishes.
Note: tasks created via constructor (i.e.: new Task(…)) start cold, not hot
If you’re using the Task.WhenAll(IEnumerable<Task<TResult>>) overload, just ensure you dont blow up your computer & that the code remains scalable (e.g.: if number of tasks in list grows, or if task is updated in future to do more IO/CPU)
Is it this simple?
Consider the below code:
var t1 = EmptyTask();
var t2 = EmptyTask();
var t3 = EmptyTask();
var result1 = await t1;
var result2 = await t2;
var result3 = await t3;
Instead of awaiting each returned task immediately, all 3 tasks are returned before an await.
If the tasks are fast, all 3 hot tasks may already be complete by the 1st await (await t1).
In this case, if we’re ok with task #2 & #3 running before the 1st await, Task.WhenAll() needn’t be used.


×
loading...
Kivé
Workspaces
Files
Search
+
Create Folder
Import File
Import Folder
Import WebScrapBook
Import Scrapbook
?
indexing...
Title
Visible Text
Date Last Accessed:
From
to
Date Imported (Kive):
From
to
Date Imported (Legacy):
From
to
Media:
(0 results)


1 Chronicles 1:17
The sons of Shem; Elam, and Asshur, and Arphaxad, and Lud, and Aram, and Uz, and Hul, and Gether, and Meshech.


Game #1
Turn: 0
Max turns: 0
Average Size: 0
Creatures
Alive
Dead
Total
Most Successful Colors
Reset


These examples illustrate configuring a custom web service to fetch features for a track.
(1) In the first example we configure a simple web service that fetches bed records defining cytobads. This service requires no parameter manipulation or result mapping. Track configuration:
{ name: "Cytobands", type: "annotation", sourceType: "custom", source: { url: "https://lk85l6ycte.execute-api.us-east-1.amazonaws.com/dev/testservice/bands?chr=$CHR&start=$START&end=$END", contentType: "application/json" } }
(2) In the second example we configure configure a cBio web service to fetch copy number segments. This service uses a combination of query and POST parameters to specify the requested segments. The source url is a function which checks and modifies the input chr name to conform to the webservice requirements. The returned json properties must be mapped to conform to igv.js expectations. This is specified in the "mapping" object. Track configuration:
{ name: "P101MF - query by chromosome", type: "seg", sourceType: "custom", source: { url: function (options) { const chr = options.chr.startsWith("chr") ? options.chr.substring(3) : options.chr; return `https://www.cbioportal.org/api/copy-number-segments/fetch?chromosome=${chr}&projection=SUMMARY`; }, method: "POST", contentType: "application/json", body: JSON.stringify([{ sampleId: "PT101MF", studyId: "sarc_mskcc" }]), mappings: { chr: "chromosome", value: "segmentMean", sampleKey: "uniqueSampleKey", sample: "sampleId" } }


West of Dead is a fast-paced indie shooter starring Ron Perlman
Hellboy.
News by Imogen Beckhelling, Reporter Intern Updated on 15 November 2019
Last night, Microsoft announced West of Dead - a Wild West style twin-stick shooter, with a main character voiced by none-other than Ron Perlman.
The game puts the player in the boots of William Mason, a Ghost Rider-looking undead cowboy who awakens in Purgatory having lost his memory. To find it again it seems he needs to fight his way through procedurally generated hunting grounds, tactically dodging and outgunning enemies to survive.
"Purgatory, Wyoming, 1888. A place of gun smoke and darkness, sin and damnation, wendigos and witches," the game's description reads. "When a dead man awakens with only the memory of a figure in black, he sets into motion a chain of events that have truly mythic consequences."
West of Dead's trailer caught my eye during X019 with its comic book-like art style and it's gritty western atmosphere, it looks like one to watch when it releases sometime in 2020.
For now though, it's available to play in beta until 25th November, and is one of the many games that will be available day one on Xbox Game Pass when it launches.


Indiana
I'm a Junkie-Monkey!
Registered: Oct 2001
Location: Incommincado Tyler Durden says: Do we really need another women?
Posts: 3087 |
Teal'c Picked up his Staff weapon from the floor in order to use it. he ran out of his room and headed for The gate room. As he approached the gate Room he could hear a lot of hutsle and bustle. Jack was screaming at the tech and hammond was on the blower. There were sounds of fire fight and blast lances. Teal'c ran into the gate room to find the blast doors closed. People were running about screaming and panicing. Teal'c looked up at a monitor of the gateroom. Inside he saw a group of Horus guards with staff weapons in hand to hand combat with SF Guards. Teal'c raised his Staff Weapon ins preparation to go in, but he as he lifted it he realised he had taken his Light Saber instead of his Staff Weapon. Teal'c shrugs off the disbelief and approaches O'neill who is screaming into a phone, "Get General Hammond back to the base now! We have an encursion!"
O'neill slapped the phone back down and turned to look at Teal'c. he approached him and dragged him away, "Come with me now Teal'c. And leave the force behind."
O'Neill and teal'c ran down the corridors. They bumbed into Sgt Siler and that technician with the big wrench, "Siler, come with me and bring your friend"
"O'Neill where are we going?" Teal'c said.
"The armory" replied jack. "We're gonna get those P90's and we're so gonna kick their asses!"
When they arrived at the Armory, They discovered that they could not get in. Luckily that big wrench would finally come in handy. jack got Silers freind to bust the door open.
__________________
"Now I'm cleaning up and I'm moving on, going straight and choosing life. I'm looking forward to it already.  The washing machine, the car, the compact disc and electric tin opener, good health, low cholesterol, dental insurance, mortgage, starter home, leisure wear, luggage, three piece suite, DIY, game shows, junk food, children, walks in the park, nine to five, good at golf, washing the car, choice of sweaters, family Christmas, indexed pension, tax exemption clearing gutters, getting by, looking ahead, the day you die."
Report this post to a moderator | ? + *
|


Genesis 24:47
And I asked her, and said, Whose daughter art thou?


Back Step 3 of 4
What is your appeal about?
The type of tax, decision or application is usually shown on the original notice letter from HMRC, or decision letter (if you had an appeal or review with HMRC).
Back Step 3 of 4
The type of tax, decision or application is usually shown on the original notice letter from HMRC, or decision letter (if you had an appeal or review with HMRC).


The main underlying principle of the PSBLAS library is that the library objects are created and exist with reference to a discretized space to which there corresponds an index space and a matrix sparsity pattern. As an example, consider a cell-centered finite-volume discretization of the Navier-Stokes equations on a simulation domain; the index space is isomorphic to the set of cell centers, whereas the pattern of the associated linear system matrix is isomorphic to the adjacency graph imposed on the discretization mesh by the discretization stencil.
Thus the first order of business is to establish an index space, and
this is done with a call to psb_cdall
in which we specify the
size of the index space and the allocation of the elements of the
index space to the various processes making up the MPI (virtual)
parallel machine.
The index space is partitioned among processes, and this creates a mapping from the “global” numbering to a numbering “local” to each process; each process will own a certain subset , each element of which corresponds to a certain element of . The user does not set explicitly this mapping; when the application needs to indicate to which element of the index space a certain item is related, such as the row and column index of a matrix coefficient, it does so in the “global” numbering, and the library will translate into the appropriate “local” numbering.
For a given index space there are many possible associated
topologies, i.e. many different discretization stencils; thus the
description of the index space is not completed until the user has
defined a sparsity pattern, either explicitly through psb_cdins
or implicitly through psb_spins
. The descriptor is finalized
with a call to psb_cdasb
and a sparse matrix with a call to
psb_spasb
. After psb_cdasb
each process will have
defined a set of “halo” (or “ghost”) indices
, denoting elements of the index
space that are not assigned to process ; however the
variables associated with them are needed to complete computations
associated with the sparse matrix , and thus they have to be
fetched from (neighbouring) processes. The descriptor of the index
space is built exactly for the purpose of properly sequencing the
communication steps required to achieve this objective.
A simple application structure will walk through the index space allocation, matrix/vector creation and linear system solution as follows:
psb_init
psb_cdall
psb_spall
and psb_geall
psb_spins
and psb_geins
psb_cdasb
psb_spasb
psb_geasb
prec%init
and
build it with prec%build
3.
psb_bicgstab
test/pargen/psb_d_pde3d.f90
.
For a simulation in which the same discretization mesh is used over multiple time steps, the following structure may be more appropriate:
psb_init
psb_cdall
psb_cdins
psb_cdasb
psb_spall
and psb_geall
psb_sprn
; also zero out
the dense vectors;
psb_spins
and psb_geins
psb_spasb
and psb_geasb
prec%init
and
prec%build
psb_bicgstab
In principle there is no specific order in the calls to
psb_spins
, nor is there a requirement to build a matrix row in
its entirety before calling the routine; this allows the application
programmer to walk through the discretization mesh element by element,
generating the main part of a given matrix row but also contributions
to the rows corresponding to neighbouring elements.
From a functional point of view it is even possible to execute one
call for each nonzero coefficient; however this would have a
substantial computational overhead. It is therefore advisable to pack
a certain amount of data into each call to the insertion routine, say
touching on a few tens of rows; the best performng value would depend
on both the architecture of the computer being used and on the problem
structure.
At the opposite extreme, it would be possible to generate the entire
part of a coefficient matrix residing on a process and pass it in a
single call to psb_spins
; this, however, would entail a
doubling of memory occupation, and thus would be almost always far
from optimal.


Home
Leaderboard
About Us
WORD CRUSHER
Difficulty Level
Easy
Medium
Hard
Select Avatar
Renee
Marisha
Chris
Sapana
Enter Username:


layout: true class: animated fadeIn middle numbers .footnote[ `IPS-PROD` - N. Dubray - ENSIIE - 2022 - [:book:](../index.html) ] --- # GNU Project Debugger .hcenter.shadow.w20[![](images/stallman.png)] ## Key points * written by **Richard Stallman** in 1986 * official debugger of the GNU system * **best symbolic debugger ever** * learn `gdb`, use every other debugger .block[ * Repository: [https://sourceware.org/git/?p=binutils-gdb.git](https://sourceware.org/git/?p=binutils-gdb.git) * Website: [https://www.gnu.org/software/gdb](https://www.gnu.org/software/gdb) * License: `GPLv3` ] --- # GNU Project Debugger - Introduction ## What is a **good** symbolic debugger ? * a program to run and check the execution of another program * you can stop the program execution and explore its full state (memory, registers, call stack, threads, etc...) * you can **MODIFY** the program state at any time * you can **call functions** from your program scope at any time * you can **go back in time** in the execution flow * you can **see what is actually executed** ## Some problems that can be solved with a debugger * infinite loop ? see why the loop is not finishing * crash ? see what happened * a line is not executing ? see the program flow * a variable has not the expected value ? see how it is calculated * etc... --- class: top # GNU Project Debugger - Introduction .hcenter.shadow.w40[ ![](images/dog.png) ] ## Why not use `printf()` ? -- * to avoid code pollution -- * a debugger can do **much more** than `printf()` -- * you can attach `gdb` to a **running** program ! -- * you can debug post-mortem without restarting -- * you will learn from the lower layers (memory, stack, registers, etc...) -- * with `gdb`, no need to recompile and re-run --- # GNU Project Debugger - Compilation :arrow_right: Compile to binary objects with the `-g` flag. * this will add **debugging symbols** to your binary objects ## .hcenter[test.c] ```C #include "stdlib.h" #include "stdio.h" #define SIZE 3 int main(int argc, char **argv) { int* table = (int*)malloc(sizeof(int) * SIZE); for (int i = 0; i < SIZE; i++) { table[i] = i; } for (int i = 0; i < SIZE; i++) { printf("table[%d]=%d\n", i, table[i]); } free(table); return 0; } ``` --- # GNU Project Debugger - Debugging symbols .row[ .column.w48[ ## .hcenter[Shell session] ```shell $ gcc -c test.c $ nm -a test.o<PHONE_NUMBER>000000 b .bss<PHONE_NUMBER>000000 n .comment<PHONE_NUMBER>000000 d .data<PHONE_NUMBER>000000 r .eh_frame U free U _GLOBAL_OFFSET_TABLE_<PHONE_NUMBER>000000 T main U malloc<PHONE_NUMBER>000000 n .note.GNU-stack U printf<PHONE_NUMBER>000000 r .rodata<PHONE_NUMBER>000000 a test.c<PHONE_NUMBER>000000 t .text ``` ] .column.w48[ ## .hcenter[Shell session] ```shell $ gcc -c -g test.c $ nm -a test.o<PHONE_NUMBER>000000 b .bss<PHONE_NUMBER>000000 n .comment<PHONE_NUMBER>000000 d .data *0000000000000000 N .debug_abbrev *0000000000000000 N .debug_aranges *0000000000000000 N .debug_info *0000000000000000 N .debug_line *0000000000000000 N .debug_str<PHONE_NUMBER>000000 r .eh_frame U free U _GLOBAL_OFFSET_TABLE_<PHONE_NUMBER>000000 T main U malloc<PHONE_NUMBER>000000 n .note.GNU-stack U printf<PHONE_NUMBER>000000 r .rodata<PHONE_NUMBER>000000 a test.c<PHONE_NUMBER>000000 t .text ``` ] ] --- # GNU Project Debugger - Loading a binary ## .hcenter[Shell session] ```shell $ gcc -c -g test.c $ gcc test.o -o test *$ gdb test GNU gdb (Ubuntu <IP_ADDRESS>70314-0ubuntu1.1) <IP_ADDRESS>70314-git Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see:
. Find the GDB manual and other documentation resources online at:
. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from test...done. (gdb) ``` ## .hcenter[Shell session] ```shell $ gcc -c -g test.c $ gcc test.o -o test *$ gdb -q test Reading symbols from test...done. (gdb) ``` --- # GNU Project Debugger - Loading a binary ## .hcenter[Shell session] ```shell $ gcc -c -g test.c $ gcc test.o -o test $ gdb -q *(gdb) file test Reading symbols from test...done. (gdb) ``` ## .hcenter[Shell session] ```shell *$ gcc -c test.c $ gcc test.o -o test $ gdb -q (gdb) file test *Reading symbols from test...(no debugging symbols found)...done. (gdb) ``` :arrow_right: `gdb` can work without debugging symbols... but can You ? --- # GNU Project Debugger - Launching a program ## Run with arguments ```shell (gdb) file test Reading symbols from test...done. *(gdb) run -h --help --please --pleasehelpme Starting program: /home/dubrayn/temp/ensiie/lectures/tools/gdb/test -h --help --please --pleasehelpme table[0]=0 table[1]=1 table[2]=2 [Inferior 1 (process 9109) exited normally] (gdb) ``` ## Run without arguments and break at `main()` ```shell (gdb) file test Reading symbols from test...done. *(gdb) start Temporary breakpoint 1 at 0x72f: file test.c, line 8. Starting program: /home/dubrayn/temp/ensiie/lectures/tools/gdb/test Temporary breakpoint 1, main (argc=1, argv=0x7fffffffe548) at test.c:8 8 int* table = (int*)malloc(sizeof(int) * SIZE); (gdb) ``` ## Run with arguments and break at `main()` ```shell (gdb) file test Reading symbols from test...done. *(gdb) set args -h --help --please --pleasehelpme *(gdb) start Temporary breakpoint 1 at 0x72f: file test.c, line 8. Starting program: /home/dubrayn/temp/ensiie/lectures/tools/gdb/test -h --help --please --pleasehelpme Temporary breakpoint 1, main (argc=1, argv=0x7fffffffe548) at test.c:8 8 int* table = (int*)malloc(sizeof(int) * SIZE); (gdb) ``` --- # GNU Project Debugger - Running environment ## Show arguments ```shell (gdb) file test Reading symbols from test...done. (gdb) run 1 -2 --3 4 Starting program: /home/dubrayn/temp/ensiie/lectures/tools/gdb/test 1 -2 --3 4 table[0]=0 table[1]=1 table[2]=2 [Inferior 1 (process 9109) exited normally] *(gdb) show args Argument list to give program being debugged when it is started is "1 -2 --3 4". (gdb) ``` ## Show and set environment variables ```shell (gdb) file test Reading symbols from test...done. *(gdb) show environment [...] SHELL_SESSION_ID=40fbec4f88ec4e3da8d0ae5adcdb501f COLORTERM=truecolor USERNAME=dubrayn [...] *(gdb) show environment SHELL SHELL = /bin/bash *(gdb) set environment SHELL /bin/false *(gdb) show environment SHELL SHELL = /bin/false ``` --- # GNU Project Debugger - Source ## List the current source line and its surroundings ```shell (gdb) file test Reading symbols from test...done. (gdb) start Temporary breakpoint 1 at 0x72f: file test.c, line 8. Starting program: /home/dubrayn/temp/ensiie/lectures/tools/gdb/test Temporary breakpoint 1, main (argc=1, argv=0x7fffffffe548) at test.c:8 8 int* table = (int*)malloc(sizeof(int) * SIZE); *(gdb) list 3 4 #define SIZE 3 5 6 int main(int argc, char **argv) 7 { 8 int* table = (int*)malloc(sizeof(int) * SIZE); 9 10 for (int i = 0; i < SIZE; i++) 11 { 12 table[i] = i; ``` --- # GNU Project Debugger - Machine code ## Disassemble the current function and show the current instruction ```shell (gdb) file test Reading symbols from test...done. (gdb) start Temporary breakpoint 4 at 0x55555555472f: file test.c, line 8. Starting program: /home/dubrayn/temp/ensiie/lectures/tools/gdb/test Temporary breakpoint 4, main (argc=1, argv=0x7fffffffe548) at test.c:8 8 int* table = (int*)malloc(sizeof(int) * SIZE); *(gdb) disassemble Dump of assembler code for function main: 0x0000555555554720 <+0>: push %rbp 0x0000555555554721 <+1>: mov %rsp,%rbp 0x0000555555554724 <+4>: sub $0x20,%rsp 0x0000555555554728 <+8>: mov %edi,-0x14(%rbp) 0x000055555555472b <+11>: mov %rsi,-0x20(%rbp) => 0x000055555555472f <+15>: mov $0xc,%edi 0x0000555555554734 <+20>: callq 0x5555555545e0 0x0000555555554739 <+25>: mov %rax,-0x8(%rbp) 0x000055555555473d <+29>: movl $0x0,-0x10(%rbp) 0x0000555555554744 <+36>: jmp 0x555555554763
0x0000555555554746 <+38>: mov -0x10(%rbp),%eax 0x0000555555554749 <+41>: cltq 0x000055555555474b <+43>: lea 0x0(,%rax,4),%rdx 0x0000555555554753 <+51>: mov -0x8(%rbp),%rax 0x0000555555554757 <+55>: add %rax,%rdx [...] 0x00005555555547af <+143>: callq 0x5555555545d0 0x00005555555547b4 <+148>: mov $0x0,%eax 0x00005555555547b9 <+153>: leaveq 0x00005555555547ba <+154>: retq End of assembler dump. (gdb) ``` --- # GNU Project Debugger - Main commands ## Execution flow control * `start`: start the program execution and break at `main()` * `run args`: restart the program execution with arguments `args` * `kill`: stop the program execution * `step`: execute until next line of code, go deeper if needed (and possible) * `stepi`: execute next machine instruction, go deeper if needed (and possible) * `next`: execute until next line of code, do not go deeper * `nexti`: execute next machine instruction, do not go deeper * `finish`: execute until exiting the current function * `continue`: continue the program execution ## Breakpoints * `break loc`: set a **breakpoint** at location `loc` * `clear loc`: remove a breakpoint at location `loc` * `info breakpoints`: print the list of breakpoints and watchpoints * `delete id`: delete the breakpoint or watchpoint `id` --- # GNU Project Debugger - Core dump :arrow_right: An "image" of the state of a program at a given moment in time, that allows to perform (among other things) a **post-mortem analysis** of a crash. ## Activate core dump at segfault ```shell $ ulimit -c 0 *$ ulimit -c unlimited $ ulimit -c unlimited ``` ## Dump core at segfault and analyse with `gdb` .row[ .column.w30[ ## .hcenter[`segfault.c`] ```C #include "stdlib.h" void main(void) { int *p = NULL; *p = 0; } ``` ] .column.w65[ ## .hcenter[Shell session] ```shell $ gcc -c -g segfault.c $ gcc segfault.o -o segfault $ ./segfault *Segmentation fault (core dumped) *$ gdb -q segfault core.8840 Reading symbols from segfault...done. [New LWP 9812] Core was generated by `./segfault'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00000000004005c8 in main () at segfault.c:6 6 *p = 0; (gdb) ``` ] ] --- # GNU Project Debugger - Call stack / variables
--- # GNU Project Debugger - Call stack / variables :arrow_right: The **call stack** is a stack of **frames**. When following a `call` command, a new frame is added on top of the existing ones. Each **frame** contains local variables, function arguments and the local address pointer. ## Manipulate frames * `backtrace`: print the call stack * `backtrace full`: print the full call stack (print variables, arguments...) * `frame`: select a frame * `up`: got one frame up in the call stack * `down`: got one frame down in the call stack ## Print variables / expressions * `print expr`: evaluate and print `expr` * `print/x expr`: evaluate and print `expr` in hexadecimal format * `print * addr`: print the value located at `addr` address * `display expr`: evaluate and print `expr` at each break * `undisplay nb`: cancel display number `nb` --- # GNU Project Debugger - Watchpoints :arrow_right: Stop the program when a variable, expression or part of memory changes. ## Commands to manipulate watchpoints * `watch expr`: break if `expr` change, **even if it is not defined yet** * `info watchpoints`: print the list of watchpoints * `delete id`: delete the breakpoint or watchpoint `id` --- # GNU Project Debugger - Program scope modification ## .hcenter[:warning: These commands will alter the "normal" execution of the program :warning:] ## Change program variables * `set variable v = expr`: evaluate `expr` and assign its value to the variable `v` ## Call a function * `call func(...)`: call function `func` in the program scope ## Return from a function * `return`: return to the calling function **now** --- # GNU Project Debugger - Conditional breakpoint :arrow_right: Allows to break only if a given condition is verified. ## Add a condition to a breakpoint * `condition id cond`: add `cond` condition to the breakpoint `id` ## .hcenter[Example `gdb` session] ```text (gdb) file test Reading symbols from test...done. (gdb) start Temporary breakpoint 1 at 0x4006a7: file test.c, line 8. Starting program: /home/dubrayn/temp/ensiie/lectures/tools/gdb/test Temporary breakpoint 1, main (argc=1, argv=0x7fffffffd7c8) at test.c:8 8 int* table = (int*)malloc(sizeof(int) * SIZE); (gdb) break 12 Breakpoint 3 at 0x4006be: file test.c, line 12. *(gdb) condition 3 i > 1 (gdb) continue Continuing. Breakpoint 3, main (argc=1, argv=0x7fffffffd7c8) at test.c:12 12 table[i] = i; (gdb) print i *$1 = 2 ``` --- # GNU Project Debugger - Thread debugging :arrow_right: Threads can be easily debugged with `gdb`. ## Threads-related commands * `thread id`: switch to thread `id` * `info threads`: show existing threads * `thread apply [thread-id-list] [all] cmd`: apply `cmd` to a list of threads ## Armadillo threads ? * the Armadillo library uses the `BLAS` library, which can spawn threads :arrow_right: Use the environment variable `OPENBLAS_NUM_THREADS` to control the number of threads used by `OpenBLAS`. ## .hcenter[Shell session] ```shell $ export OPENBLAS_NUM_THREADS=1 # no thread spawning $ export OPENBLAS_NUM_THREADS=$(nproc) # full throttle !!! ``` --- # GNU Project Debugger - Conque-GDB vim addon
--- # GNU Project Debugger - Qt-Creator .hcenter.shadow.w100[![](images/qt-creator.png)] --- # GNU Project Debugger - Reverse debugging .hcenter.shadow.w40[![](images/future.png)] :arrow_right: Record the full program state and **go back and forth in time** ! ## Commands **to go back in time** * `record`: start the recording of the program state * `reverse-continue`: continue **backwards** * `reverse-finish`: continue backwards until the lower frame * `reverse-step`: go back to the previous line, go deeper if needed * `reverse-stepi`: go back to the previous machine instruction, go deeper if needed * `reverse-next`: go back to the previous line, do not go deeper * `reverse-nexti`: go back to the previous machine instruction, do not go deeper * `set exec-direction (forward/reverse)`: set direction of execution for `next`, `step`, etc... --- # GNU Project Debugger - Reverse debugging
--- # GNU Project Debugger - Conclusions ## About `gdb` :+: **best debugger ever** :warning: CLI interface **might be** hard to grasp :warning: several commands to remember :+: the debugging workflow is **almost the same** in every other debugger :+: if `gdb` is often used "below" a nice GUI, why use a GUI ? ## About debugging :+: no more `printf()` !!! :+: gain some knowledge about the lower layers (stack, cache, register, etc...) :+: do not trust your compiler, check the generated code (and learn ASM) :+: "A segfault ? Yes ! Time to play with `gdb` !" .hcenter.w90[![](images/xkcd_371.png)] .hcenter[[source: xkcd](https://xkcd.com/371)]