In this project, you'll use generative adversarial networks to generate new images of faces.
You'll be using two datasets in this project:
Since the celebA dataset is complex and you're doing GANs in a project for the first time, we want you to test your neural network on MNIST before CelebA. Running the GANs on MNIST will allow you to see how well your model trains sooner.
If you're using FloydHub, set data_dir
to "/input" and use the FloydHub data ID "R5KrjnANiKVhLWAkpXhNBe".
data_dir = './data'
# FloydHub - Use with data ID "R5KrjnANiKVhLWAkpXhNBe"
#data_dir = '/input'
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import helper
helper.download_extract('mnist', data_dir)
helper.download_extract('celeba', data_dir)
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
%matplotlib inline
import os
from glob import glob
from matplotlib import pyplot
mnist_images = helper.get_batch(glob(os.path.join(data_dir, 'mnist/*.jpg'))[:show_n_images], 28, 28, 'L')
pyplot.imshow(helper.images_square_grid(mnist_images, 'L'), cmap='gray')
The CelebFaces Attributes Dataset (CelebA) dataset contains over 200,000 celebrity images with annotations. Since you're going to be generating faces, you won't need the annotations. You can view the first number of examples by changing show_n_images
.
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
mnist_images = helper.get_batch(glob(os.path.join(data_dir, 'img_align_celeba/*.jpg'))[:show_n_images], 28, 28, 'RGB')
pyplot.imshow(helper.images_square_grid(mnist_images, 'RGB'))
Since the project's main focus is on building the GANs, we'll preprocess the data for you. The values of the MNIST and CelebA dataset will be in the range of -0.5 to 0.5 of 28x28 dimensional images. The CelebA images will be cropped to remove parts of the image that don't include a face, then resized down to 28x28.

You'll build the components necessary to build a GANs by implementing the following functions below:
model_inputs
discriminator
generator
model_loss
model_opt
train
This will check to make sure you have the correct version of TensorFlow and access to a GPU
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
from distutils.version import LooseVersion
import warnings
import tensorflow as tf
# Check TensorFlow Version
assert LooseVersion(tf.__version__) >= LooseVersion('1.0'), 'Please use TensorFlow version 1.0 or newer. You are using {}'.format(tf.__version__)
print('TensorFlow Version: {}'.format(tf.__version__))
# Check for a GPU
if not tf.test.gpu_device_name():
warnings.warn('No GPU found. Please use a GPU to train your neural network.')
else:
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
Implement the model_inputs
function to create TF Placeholders for the Neural Network. It should create the following placeholders:
image_width
, image_height
, and image_channels
.z_dim
.Return the placeholders in the following the tuple (tensor of real input images, tensor of z data)
import problem_unittests as tests
def model_inputs(image_width, image_height, image_channels, z_dim):
"""
Create the model inputs
:param image_width: The input image width
:param image_height: The input image height
:param image_channels: The number of image channels
:param z_dim: The dimension of Z
:return: Tuple of (tensor of real input images, tensor of z data, learning rate)
"""
# TODO: Implement Function
inputs_real = tf.placeholder(tf.float32, (None, image_width, image_height, image_channels), name='input_real')
inputs_z = tf.placeholder(tf.float32, (None, z_dim), name='input_z')
learn_rate = tf.placeholder(tf.float32)
return inputs_real, inputs_z, learn_rate
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_inputs(model_inputs)
Implement discriminator
to create a discriminator neural network that discriminates on images
. This function should be able to reuse the variabes in the neural network. Use tf.variable_scope
with a scope name of "discriminator" to allow the variables to be reused. The function should return a tuple of (tensor output of the generator, tensor logits of the generator).
def discriminator(images, reuse=False):
"""
Create the discriminator network
:param image: Tensor of input image(s)
:param reuse: Boolean if the weights should be reused
:return: Tuple of (tensor output of the discriminator, tensor logits of the discriminator)
"""
# TODO: Implement Function
with tf.variable_scope('discriminator', reuse=reuse):
# Input layer is 28X28X3
alpha=0.2
keep_prob = 0.9
#print(images.get_shape())
x1 = tf.layers.conv2d(images, 56, 5, strides=2, padding='same', activation=None)
relu1 = tf.maximum(alpha * x1, x1)
x1 = tf.nn.dropout(x1, keep_prob=keep_prob)
#print(relu1.get_shape())
# 14X14X56
x2 = tf.layers.conv2d(relu1, 112, 5, strides=2, padding='same', activation=None)
bn2 = tf.layers.batch_normalization(x2, training=True)
relu2 = tf.maximum(alpha * bn2, bn2)
relu2 = tf.nn.dropout(relu2, keep_prob=keep_prob)
#print(relu2.get_shape())
# 7x7x112
x3 = tf.layers.conv2d(relu2, 224, 5, strides=2, padding='same')
bn3 = tf.layers.batch_normalization(x3, training=True)
relu3 = tf.maximum(alpha * bn3, bn3)
relu3 = tf.nn.dropout(relu3, keep_prob=keep_prob)
# 4x4x224
# Flatten it
#print(relu3.get_shape())
#print(relu3.get_shape()[1])
flat = tf.reshape(relu3, (-1,4*4*224))
logits = tf.layers.dense(flat, 1)
out = tf.sigmoid(logits)
return out, logits
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_discriminator(discriminator, tf)
Implement generator
to generate an image using z
. This function should be able to reuse the variabes in the neural network. Use tf.variable_scope
with a scope name of "generator" to allow the variables to be reused. The function should return the generated 28 x 28 x out_channel_dim
images.
def generator(z, out_channel_dim, is_train=True):
"""
Create the generator network
:param z: Input z
:param out_channel_dim: The number of channels in the output image
:param is_train: Boolean if generator is being used for training
:return: The tensor output of the generator
"""
# TODO: Implement Function
with tf.variable_scope('generator', reuse=not is_train):
# First fully connected layer
alpha=0.2
keep_prob = 0.9
x1 = tf.layers.dense(z, 3*3*448)
# Reshape it to start the convolutional stack
x1 = tf.reshape(x1, (-1, 3, 3, 448))
x1 = tf.layers.batch_normalization(x1, training=is_train)
x1 = tf.maximum(alpha * x1, x1)
x1 = tf.nn.dropout(x1, keep_prob=keep_prob)
#print(x1.get_shape())
# 3x3x448 now
x2 = tf.layers.conv2d_transpose(x1, 224, 5, strides=1, padding='valid', activation=None)
x2 = tf.layers.batch_normalization(x2, training=is_train)
x2 = tf.maximum(alpha * x2, x2)
#print(x2.get_shape())
# 7x7x224 now
x3 = tf.layers.conv2d_transpose(x2, 112, 3, strides=2, padding='same', activation=None)
x3 = tf.layers.batch_normalization(x3, training=is_train)
x3 = tf.maximum(alpha * x3, x3)
#print(x3.get_shape())
# 14x14x112 now
# Output layer
logits = tf.layers.conv2d_transpose(x3, out_channel_dim, 3, strides=2, padding='same', activation=None)
# 28x28x3 now
#print(logits.get_shape())
out = tf.tanh(logits)
#print(out.get_shape())
return out
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_generator(generator, tf)
Implement model_loss
to build the GANs for training and calculate the loss. The function should return a tuple of (discriminator loss, generator loss). Use the following functions you implemented:
discriminator(images, reuse=False)
generator(z, out_channel_dim, is_train=True)
def model_loss(input_real, input_z, out_channel_dim):
"""
Get the loss for the discriminator and generator
:param input_real: Images from the real dataset
:param input_z: Z input
:param out_channel_dim: The number of channels in the output image
:return: A tuple of (discriminator loss, generator loss)
"""
# TODO: Implement Function
g_model = generator(input_z, out_channel_dim, is_train=True)
d_model_real, d_logits_real = discriminator(input_real, reuse=False)
d_model_fake, d_logits_fake = discriminator(g_model, reuse=True)
d_loss_real = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_real, labels=tf.ones_like(d_model_real)))
d_loss_fake = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, labels=tf.zeros_like(d_model_fake)))
g_loss = tf.reduce_mean(
tf.nn.sigmoid_cross_entropy_with_logits(logits=d_logits_fake, labels=tf.ones_like(d_model_fake)))
d_loss = d_loss_real + d_loss_fake
return d_loss, g_loss
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_loss(model_loss)
Implement model_opt
to create the optimization operations for the GANs. Use tf.trainable_variables
to get all the trainable variables. Filter the variables with names that are in the discriminator and generator scope names. The function should return a tuple of (discriminator training operation, generator training operation).
def model_opt(d_loss, g_loss, learning_rate, beta1):
"""
Get optimization operations
:param d_loss: Discriminator loss Tensor
:param g_loss: Generator loss Tensor
:param learning_rate: Learning Rate Placeholder
:param beta1: The exponential decay rate for the 1st moment in the optimizer
:return: A tuple of (discriminator training operation, generator training operation)
"""
# TODO: Implement Function
t_vars = tf.trainable_variables()
d_vars = [var for var in t_vars if var.name.startswith('discriminator')]
g_vars = [var for var in t_vars if var.name.startswith('generator')]
# Optimize
with tf.control_dependencies(tf.get_collection(tf.GraphKeys.UPDATE_OPS)):
g_train_opt = tf.train.AdamOptimizer(learning_rate, beta1=beta1).minimize(g_loss, var_list=g_vars)
d_train_opt = tf.train.AdamOptimizer(learning_rate, beta1=beta1).minimize(d_loss, var_list=d_vars)
return d_train_opt, g_train_opt
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_model_opt(model_opt, tf)
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import numpy as np
def show_generator_output(sess, n_images, input_z, out_channel_dim, image_mode):
"""
Show example output for the generator
:param sess: TensorFlow session
:param n_images: Number of Images to display
:param input_z: Input Z Tensor
:param out_channel_dim: The number of channels in the output image
:param image_mode: The mode to use for images ("RGB" or "L")
"""
cmap = None if image_mode == 'RGB' else 'gray'
z_dim = input_z.get_shape().as_list()[-1]
example_z = np.random.uniform(-1, 1, size=[n_images, z_dim])
samples = sess.run(
generator(input_z, out_channel_dim, False),
feed_dict={input_z: example_z})
images_grid = helper.images_square_grid(samples, image_mode)
pyplot.imshow(images_grid, cmap=cmap)
pyplot.show()
Implement train
to build and train the GANs. Use the following functions you implemented:
model_inputs(image_width, image_height, image_channels, z_dim)
model_loss(input_real, input_z, out_channel_dim)
model_opt(d_loss, g_loss, learning_rate, beta1)
Use the show_generator_output
to show generator
output while you train. Running show_generator_output
for every batch will drastically increase training time and increase the size of the notebook. It's recommended to print the generator
output every 100 batches.
def train(epoch_count, batch_size, z_dim, learning_rate, beta1, get_batches, data_shape, data_image_mode):
"""
Train the GAN
:param epoch_count: Number of epochs
:param batch_size: Batch Size
:param z_dim: Z dimension
:param learning_rate: Learning Rate
:param beta1: The exponential decay rate for the 1st moment in the optimizer
:param get_batches: Function to get batches
:param data_shape: Shape of the data
:param data_image_mode: The image mode to use for images ("RGB" or "L")
"""
# TODO: Build Model
#tf.reset_default_graph()
# Create our input placeholders
if(data_image_mode=="RGB"):
channel=3
else:
channel=1
input_real, input_z, learn_rate = model_inputs(data_shape[1],data_shape[2],channel, z_dim)
d_loss, g_loss = model_loss(input_real, input_z, channel)
d_train_opt, g_train_opt = model_opt(d_loss, g_loss, learn_rate, beta1)
saver = tf.train.Saver()
sample_z = np.random.uniform(-1, 1, size=(50, z_dim))
samples, losses = [], []
steps = 0
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
for epoch_i in range(epoch_count):
for batch_images in get_batches(batch_size):
# TODO: Train Model
steps += 1
batch_images *= 2
# Sample random noise for G
batch_z = np.random.uniform(-1, 1, size=(batch_size, z_dim))
# Run optimizers
_ = sess.run(d_train_opt, feed_dict={input_real: batch_images, input_z: batch_z, learn_rate:learning_rate})
_ = sess.run(g_train_opt, feed_dict={input_z: batch_z,input_real: batch_images, learn_rate:learning_rate})
if steps == 1:
print('initial output:')
show_generator_output(sess, 16, input_z, channel, data_image_mode)
if steps % 20 == 0:
# At the end of each epoch, get the losses and print them out
train_loss_d = d_loss.eval({input_real: batch_images,input_z: batch_z})
#sess.run(d_loss, {input_real: batch_images,input_z: batch_z})
train_loss_g = g_loss.eval({input_z: batch_z})
#train_loss_d = net.d_loss.eval({net.input_z: batch_z, net.input_real: x})
#train_loss_g = net.g_loss.eval({net.input_z: batch_z})
print("Epoch {}/{}...".format(epoch_i+1, epochs),
"Discriminator Loss: {:.4f}...".format(train_loss_d),
"Generator Loss: {:.4f}".format(train_loss_g))
# Save losses to view after training
losses.append((train_loss_d, train_loss_g))
if steps % 100 == 0:
show_generator_output(sess,16, input_z, channel, data_image_mode)
Test your GANs architecture on MNIST. After 2 epochs, the GANs should be able to generate images that look like handwritten digits. Make sure the loss of the generator is lower than the loss of the discriminator or close to 0.
batch_size = 128
z_dim = 100
learning_rate = 0.0005
beta1 = 0.1
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
epochs = 2
mnist_dataset = helper.Dataset('mnist', glob(os.path.join(data_dir, 'mnist/*.jpg')))
with tf.Graph().as_default():
train(epochs, batch_size, z_dim, learning_rate, beta1, mnist_dataset.get_batches, mnist_dataset.shape, mnist_dataset.image_mode)
Run your GANs on CelebA. It will take around 20 minutes on the average GPU to run one epoch. You can run the whole epoch or stop when it starts to generate realistic faces.
batch_size = 128
z_dim = 100
learning_rate = .0002
beta1 = 0.2
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
epochs = 2
celeba_dataset = helper.Dataset('celeba', glob(os.path.join(data_dir, 'img_align_celeba/*.jpg')))
with tf.Graph().as_default():
train(epochs, batch_size, z_dim, learning_rate, beta1, celeba_dataset.get_batches,
celeba_dataset.shape, celeba_dataset.image_mode)
When submitting this project, make sure to run all the cells before saving the notebook. Save the notebook file as "dlnd_face_generation.ipynb" and save it as a HTML file under "File" -> "Download as". Include the "helper.py" and "problem_unittests.py" files in your submission.


---
sort_order: 15
tei_id: rdx_b5h9g.p.idm182734816
annotation_count: 0
images:
small-thumbnail: https://readux.library.emory.edu/books/emory:b5h9g/pages/emory:pchqw/mini-thumbnail/
json: https://readux.library.emory.edu/books/emory:b5h9g/pages/emory:pchqw/info/
full: https://readux.library.emory.edu/books/emory:b5h9g/pages/emory:pchqw/fs/
page: https://readux.library.emory.edu/books/emory:b5h9g/pages/emory:pchqw/single-page/
thumbnail: https://readux.library.emory.edu/books/emory:b5h9g/pages/emory:pchqw/thumbnail/
title: Page 15
number: 15
---
{% raw %}JACOB HODGES.{% endraw %}
{% raw %}1{% endraw %}
{% raw %}moral influence, he had become confirmed{% endraw %}
{% raw %}on land in all the habits of vice contracted{% endraw %}
{% raw %}upon the sea.{% endraw %}
{% raw %}Notwithstanding all this ignorance, vice{% endraw %}
{% raw %}and degradation, there was in Jacob{% endraw %}
{% raw %}Hodges a native dignity and a noble car¬{% endraw %}
{% raw %}riage, which clearly illustrated traits of{% endraw %}
{% raw %}mind which cultivation and better circum¬{% endraw %}
{% raw %}stances of life would have developed to{% endraw %}
{% raw %}the honour of our common humanity.{% endraw %}
{% raw %}Though strikingly African, every feature{% endraw %}
{% raw %}and movement of Jacob showed that he{% endraw %}
{% raw %}was originally fitted for a higher and bet¬{% endraw %}
{% raw %}ter character, and but for the disadvan¬{% endraw %}
{% raw %}tages of his birth, and the utter neglect{% endraw %}
{% raw %}of his early education, he might have{% endraw %}
{% raw %}been a man indeed.{% endraw %}
{% raw %}How long Jacob lived in the county of{% endraw %}
{% raw %}Orange is not known; but an uncommon{% endraw %}
{% raw %}and painful occurrence is connected with{% endraw %}
{% raw %}his history here, which changed the whole{% endraw %}
{% raw %}aspect of his subsequent life.{% endraw %}
{% raw %}In the town of Warwick, about seven{% endraw %}
{% raw %}miles from the village of Goshen, there{% endraw %}
{% raw %}resided a man by tht name of Jennings,{% endraw %}


tippr
Home
About
Team
Sign-In
Home
About
Team
We're a group of talented developers, designers, and technologists.
Huthman
Project Manager
Leigh-Ann
Front-End Architect
Alex
Back-End Architect
Nathan
Front-End Architect
Ben
Back-End Architect
Cameron
iOS Developer
Justin
UI Developer
Arshak
UI Developer
Kermitt
Product Design
Joe
UI Developer


Schiff lashes out at Trump in closing remarks: That's corruption 'That's not anti-corruption, that is corruption,' Schiff presses at conclusion of day 4 of public Trump impeachment hearings. 21 Nov 2019, 11:54 by Arutz Sheva Staff


picnia - picnia_aerr = picxfe + ((ucfs + ucfs(-1))/2)*400*d(log(pcfr)) + ((uces + uces(-1))/2)*400*d(log(pcer))
picnia - picnia_aerr = picxfe + y_picnia(1)*400*(log(pcer) - log(pcer(-1))) + y_picnia(2)*400*(log(pcfr) - log(pcfr(-1)))
The new version of FRB/US uses constant shares for aggregation, which are represented as coefficients. The time-varying nominal shares used in the previous verson of FRB/US introduced non-linearities and dependencies on the initial conditions that possibly affected negatively the long-run and stochastic properties of the model.
Consequently, the following variables have been eliminated from the model:


|
Team 302 Robot
|
#include <IPrimitive.h>
Public Member Functions | |
| IPrimitive ()=default | |
| virtual | ~IPrimitive ()=default |
| virtual void | Init (PrimitiveParams *Parms)=0 |
| virtual void | Run ()=0 |
| virtual bool | IsDone ()=0 |
Public Attributes | |
| const float | LOOP_LENGTH = 0.020 |
Definition at line 21 of file IPrimitive.h.
|
default |
|
virtualdefault |
|
pure virtual |
Implemented in DoNothing, DriveToTarget, TurnAngle, SuperDrive, DriveTime, DriveToWall, AutoShoot, HoldPosition, and DriveDistance.
|
pure virtual |
Implemented in DoNothing, AutoShoot, TurnAngle, DriveToTarget, SuperDrive, DriveTime, HoldPosition, DriveToWall, and DriveDistance.
|
pure virtual |
Implemented in DoNothing, TurnAngle, DriveToTarget, AutoShoot, SuperDrive, DriveTime, DriveToWall, HoldPosition, and DriveDistance.
| const float IPrimitive::LOOP_LENGTH = 0.020 |
Definition at line 24 of file IPrimitive.h.


The goal of pkgreviewr is to facilitate rOpenSci package reviews.
You can install pkgreviewr from GitHub with:
# install.packages("devtools")
devtools::install_github("ropenscilabs/pkgreviewr")
Because rOpenSci reviews are conducted through github repository ropensci/onboarding
, pkgreviewr
uses your GitHub user.name and user.email when creating new review projects. If you do not have both settings in your global configuration, you will receive an error. You can set both from within your terminal:
# Example GitHub global configuration
git config --global user.name "Mona Lisa"
git config --global user.email<EMAIL_ADDRESS>To check you current git configuration, use:
git config --global --list
The package also makes use of R Notebooks
(an RMarkdown format) and requires installation of Rstudio version 1.0 or higher
Create and initialise review project
Open index.Rmd
and work through the review in the notebook. You can make notes either in index.Rmd
or directly in the pkgreview.md
response template.
Submit your review in the package ropensci/onboarding
issue by copying and pasting the completed pkgreview.md
template.
OPTIONAL: Publish your report by pushing to GitHub.
Create the review project, using pkgreview_create
. The function takes arguments:
pkg_repo
: the GitHub repo details of the package under review in the form username/repo
review_parent
:, the local directory in which the review project (and folder) will be created and package source code will be cloned into.library(pkgreviewr)
pkgreview_create(pkg_repo = "cboettig/rdflib",
review_parent = "~/Documents/workflows/rOpenSci/reviews/")
The function creates a new review project in the review_parent
directory following project naming convention {pkgname}-review
and populates the review templates to create all required documents.
The review project directory will contain all the files you’ll need to complete the review and will be initialised with git.
rdflib-review
├── README.md
├── index.Rmd
├── pkgreview.md
└── rdflib-review.Rproj
index.Rmd
The most important file it creates is the index.Rmd html_notebook
file. This workbook is prepopulated with all the major steps required to complete the review in an interactive document to perform and record it in. It also extracts useful links, information and parameter values.
See example here.
Once rendered to index.nb.html
(*.nb.html
is the notebook file format), this report can be pushed to GitHub for publication.
pkgreview.md
Template response form to submit to the package rOpenSci onboarding review issue.
See template here.
README.md
Prepopulated README for the review repo that will present the repo to people navigating to it.
See example here:.
To enable local testing of the package, review creation also clones the review package source code into review_parent
from the github repository defned in pkg_repo
. This also makes it available for local review and perhaps even a pull request. Correcting typos in documentation can be a great review contribution, but first you might want to check the contributing guidelines or ask the author if they are open to such pull requests.
The resulting files from a successful review project will look like this:
reviews
├── rdflib
│ ├── DESCRIPTION
│ ├── LICENSE
│ ├── NAMESPACE
│ ├── NEWS.md
│ ├── R
│ │ └── rdf.R
│ ├── README.Rmd
│ ├── README.md
│ ├── appveyor.yml
│ ├── codecov.yml
│ ├── codemeta.json
│ ├── docs
│ │ ├── LICENSE.html
│ │ ├── articles
│ │ │ ├── index.html
│ │ │ ├── rdflib.html
│ │ │ └── rdflib_files
│ │ │ ├── datatables-binding-0.2
│ │ │ │ └── datatables.js
│ │ │ ├── dt-core-1.10.12
│ │ │ │ ├── css
│ │ │ │ │ ├── jquery.dataTables.extra.css
│ │ │ │ │ └── jquery.dataTables.min.css
│ │ │ │ └── js
│ │ │ │ └── jquery.dataTables.min.js
│ │ │ ├── htmlwidgets-0.9
│ │ │ │ └── htmlwidgets.js
│ │ │ └── jquery-1.12.4
│ │ │ ├── LICENSE.txt
│ │ │ └── jquery.min.js
│ │ ├── authors.html
│ │ ├── index.html
│ │ ├── jquery.sticky-kit.min.js
│ │ ├── link.svg
│ │ ├── news
│ │ │ └── index.html
│ │ ├── pkgdown.css
│ │ ├── pkgdown.js
│ │ └── reference
│ │ ├── index.html
│ │ ├── rdf.html
│ │ ├── rdf_add.html
│ │ ├── rdf_parse.html
│ │ ├── rdf_query.html
│ │ ├── rdf_serialize.html
│ │ └── rdflib-package.html
│ ├── inst
│ │ ├── examples
│ │ │ └── rdf_table.R
│ │ └── extdata
│ │ ├── ex.xml
│ │ └── vita.json
│ ├── man
│ │ ├── rdf.Rd
│ │ ├── rdf_add.Rd
│ │ ├── rdf_parse.Rd
│ │ ├── rdf_query.Rd
│ │ ├── rdf_serialize.Rd
│ │ └── rdflib-package.Rd
│ ├── paper.bib
│ ├── paper.md
│ ├── rdflib.Rproj
│ ├── tests
│ │ ├── testthat
│ │ │ └── test-rdf.R
│ │ └── testthat.R
│ └── vignettes
│ └── rdflib.Rmd
└── rdflib-review
├── README.md
├── index.Rmd
└── rdflib-review.Rproj
Use the index.Rmd notebook to work through the review interactively. The document is designed to guide the process in a logical fashion and bring your attention to relevant aspects and information at different stages of the review. You can make notes and record comments within index.Rmd or directly in the review submission form.
Currently the workflow is just set up for you to just copy your response from your completed pkgreview.md
and paste it into the review issue but we’re exploring programmatic submission also. Because the response is currently submitted as .md
, package reprex
might be useful for inserting reproducible demos of any issues encountered.
Full license
MIT + file LICENSE


fs = require "fs"
fs = require "fs"
module.exports = class Bang
constructor: ->
@loadData()
The file where data is persisted to disk.
dataPath: process.env.HOME + "/.bang"
Initializes Bang's data store.
loadData: ->
@data = if fs.existsSync @dataPath
JSON.parse fs.readFileSync @dataPath
else
{}
Writes the data store to disk as JSON.
save: ->
fs.writeFileSync @dataPath, JSON.stringify(@data)
Retrieves a key's value.
get: (key) ->
@data[key]
Sets the value of a key.
set: (key, value) ->
@data[key] = value
@save()
Deletes a key.
delete: (key) ->
delete @data[key]
@save()
Lists all keys and their values.
list: ->
lines = []
amount = 0
for key of @data
amount = key.length if key.length > amount
for key of @data
lines.push "#{pad(key, amount)}#{key}: #{@get key}"
lines.join "\n"
Helper function to left-pad a string with spaces.
pad = (item, amount) ->
out = ""
i = amount - item.length
while i > 0
out += " "
i--
out


DDD
aka
Domain Driven Design
- Focus on the business logic
- Definition of the model via Bounded contexts
- Definition of an Ubiquitous language
- Collaboration between Business and IT teams!
Bounded contexts
Ubiquitous language
CQRS
aka
Command Query Responsibility Segregation
CQRS
- Split between WRITE & READ actions
- Commands vs Queries
- Gain of performances
Event sourcing
- Every state change is captured in an event
- Current state = Sequence of events
- Ability to rebuild your data
- From a different point of view
- Timeline mode
- Kafka as the command / event bus
- Multiple consumers of the generated events
- JSON Api and domain language
- Open tracing / Instana


First, I wanted to import and explore the dataset to better know what information I had to work with. The dataset has more than 40,000 observations, which is far too large for my laptop, as clustering algorithms have an O(nk) cost function. Usually, this should be less than 10,000 observations as a general rule of thumb, so I will take a random sample of 9,000 of the rows. Also, the set has 60 features. I'll want to narrow this down to a much smaller number. For this analysis I will focus only on consumption patterns across food subcategories, including variables for total food expenditure, income, and family size to check for correlation.
#Import libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
#Import dataset
data = pd.read_csv("Family_Income_and_Expenditure.csv")
print "Dataset has {} households with {} features each.".format(*data.shape)
#Reduce dataframe size by randomly sampling to 9K samples
data = data.sample(n=9000)
print "New dataset has {} households with {} features each.".format(*data.shape)
#replace spaces with underscores and list column names with their data types
data.columns = [c.replace(' ', '_') for c in data.columns]
list(data.columns.values)
data.dtypes
# Extract variables for food expenditure, income, and family size
df = data[['Total_Food_Expenditure', 'Bread_and_Cereals_Expenditure',
'Total_Rice_Expenditure', 'Meat_Expenditure',
'Total_Fish_and__marine_products_Expenditure', 'Fruit_Expenditure',
'Vegetables_Expenditure', 'Alcoholic_Beverages_Expenditure',
'Total_Household_Income', 'Total_Number_of_Family_members']]
display(df.describe())
print "Dataset has {} samples with {} features each.".format(*df.shape)
We can regress food consumption paterns on variables we believe might be predictive of those patterns. In this instance, I chose Total Number of Family Members
, Total Food Expenditure
, and Total Household Income
. Larger families may need to spend more money on carbs like rice and less on relatively mroe expensive meat products, affecting the food profile of larger families. Total food expenditure and total income similarly may just mean a family buys more meat or fish as opposed to cheaper food items like rice.
# Check if family size, total food expenditure, or total household income
# are correlated with expenditures
from sklearn.tree import DecisionTreeRegressor
from sklearn.model_selection import cross_val_score
from sklearn.cross_validation import train_test_split
cortest_variables = ['Total_Number_of_Family_members', 'Total_Food_Expenditure',
'Total_Household_Income']
new_data = df.drop(cortest_variables, axis = 1)
for i in cortest_variables:
X_train, X_test, y_train, y_test = train_test_split(new_data,
df[i],
test_size = 0.25, random_state = 23)
regressor = DecisionTreeRegressor(random_state=42)
dtr = regressor.fit(X_train,y_train)
score = cross_val_score(regressor, new_data, df[i], cv=10)
print("Accuracy of " + i +" as predictor of other expenditures: %0.2f (+/- %0.2f)" % (score.mean(), score.std() * 2))
Surprisingly, family size was uncorrelated with expenditure on food categories. Total food expenditure, however, showed some correlation, whcih makes sense since total food expenditure is in theory a sum of its sub-parts. Income had a negative accuracy with large predicted error terms, meaning the dataset is likely unbalanced, and income as a predictor of expenditure levels fits the data exceptionally poorly. Going forward, I will focus on expenditure patterns outside of these three variables.
df.drop(['Total_Number_of_Family_members', 'Total_Food_Expenditure',
'Total_Household_Income'], axis = 1, inplace = True)
list(df.columns.values)
We will now run a scatterplot matrix of our food expenditure categories to see if expenditures are correlated between subcategories:
# Run scatter matrix on food expenditure variables to check for correlations
from pandas.plotting import scatter_matrix
scatter = pd.scatter_matrix(df, alpha=0.2, figsize=(6, 6), diagonal='kde')
n = len(df.columns)
for x in range(n):
for y in range(n):
ax = scatter[x, y]
ax.xaxis.label.set_rotation(90)
ax.yaxis.label.set_rotation(0)
ax.yaxis.labelpad = 50
Rice and breads/cereals appear positively correlated, which seems strange as the two could be viewed as substitutes. All distributions are clustered towards the origin and could probably benefit from a transformed distribution.
First, I will visualize the distributions as they are:
# Visualize distributions
collist1 = list(df.columns.values)
for i in collist1:
df[i].plot(kind='hist', bins = 50)
plt.title(i)
plt.show()
As suspected, the distributions are all heavily skewed and could benefit from a transformation. Financial data and expenditures in particular usually improve when converted to a logarithmic scale. We transofrm the data below and visualize the new distributions for improvement:
# Transform distributions
#convert integer features to logarithmic scale and view their resulting distributions
log_df = df
for i in collist1:
log_df[i] = np.log(log_df[i] + 1)
log_df[i].plot(kind='hist', bins = 50)
plt.title(i)
plt.show()
Feature distributions overall look much more normal now. Alcoholic beverages had mostly zeroes (one in my log transofrmation) in expendatures among households, so most likely should be dropped.
# Drop alcoholic beverage feature
log_df.drop(['Alcoholic_Beverages_Expenditure'], axis = 1, inplace = True)
# Re-visualize correlations
log_scatter_df = log_df[['Bread_and_Cereals_Expenditure',
'Total_Rice_Expenditure', 'Meat_Expenditure',
'Total_Fish_and__marine_products_Expenditure', 'Fruit_Expenditure',
'Vegetables_Expenditure']]
log_scatter = pd.scatter_matrix(log_scatter_df, alpha=0.2, figsize=(6, 6), diagonal='kde')
n = len(log_scatter_df.columns)
for x in range(n):
for y in range(n):
ax = log_scatter[x, y]
ax.xaxis.label.set_rotation(90)
ax.yaxis.label.set_rotation(0)
ax.yaxis.labelpad = 50
We continue to see a correlation between rice and bread/cereal expenditures. Other correlations appear weak. We also see a line of zero values (or rather one witht he log transformation) along the bottom and left sides of the graphs. Removing these zero-value households would leave us with a dataset unrepresentative of the entire dataset, with the tradeoff that the remaining households will be much easier to cluster and analyze.
# Drop zero values
for i in log_df.keys():
print i
print(log_df[i].loc[log_df[i] == 0.0])
outliers = log_df.index[log_df[i] == 0]
log_df.drop(outliers, axis = 0, inplace = True)
print "Dataset has {} households with {} features each.".format(*log_df.shape)
We can see that our dataset has dropped about 225 observations, which isn't too bad from a dataset of 9,000 observations. Hopefully this will make patterns and clusters clearer, although the resulting dataset now ignored households that do not report expenditures on at least one category of food.
We will colapse the 6 dimensions of our dataset into just 2 dimensions through principal component analysis. This draws out the differences within the data and allows for much faster processing once we run our clustering algorythm later on.
# Principal Component Analysis & visualization
from sklearn.decomposition import PCA
pca = PCA(n_components = 6)
projected = pca.fit_transform(log_df)
# Visualize PCA results
###code from Udacity Machine Learning nanodegree's customer
###segmentation project at:
###https://github.com/udacity/machine-learning/tree/master/projects/customer_segments
# Index PCA dimensions
dimensions = dimensions = ['Dimension {}'.format(i) for i in range(1,len(pca.components_)+1)]
# Index PCA components
components = pd.DataFrame(np.round(pca.components_, 4), columns = log_df.keys())
components.index = dimensions
#
ratios = pca.explained_variance_ratio_.reshape(len(pca.components_), 1)
variance_ratios = pd.DataFrame(np.round(ratios, 4), columns = ['Explained Variance'])
variance_ratios.index = dimensions
# Create bar plot
fig, ax = plt.subplots(figsize = (14,8))
# Plot feature weights as function of components
components.plot(ax = ax, kind = 'bar');
ax.set_ylabel("Feature Weights")
ax.set_xticklabels(dimensions, rotation=0)
# Display explained variance ratios for PCA
for i, ev in enumerate(pca.explained_variance_ratio_):
ax.text(i-0.40, ax.get_ylim()[1] + 0.05, "Explained Variance\n %.4f"%(ev))
# Return concatenated data frame
pd.concat([variance_ratios, components], axis = 1)
The first and dominant component, explaining more than 50% of variance, appears to be spending more (or less) on all goods concurrently, with meat showing the widest variance (for consumers spending more on all categories of food, they especially spend more on meat. The next most explanatory variable, accounting for only 16% of variation, indicates consumers who spend much less on rice and significantly less on bread, and relatively more on meat and fruit, than other consumers. Perhaps these are farmers, many of whom grow their own rice and vegetables, and can get cheaper prices on fruits from neighbors and the local economy. The third most explanatory variable decribed consumers who spent much less on meat and more on fruits and vegetables, indicating largely vegetarian (or pescetarian due to slightly higher marine product expendatures) diets. We will stick to the first two dimensions for our analysis for ease of visualizing our clusters.
# Reduce dataframe to first two PCA dimensions
pca = PCA(n_components=2)
reduced_data = pca.fit_transform(log_df)
Now we will cluster the data using the Gaussian Mixture model, which is often a better choice than K-means when categories are ill-defined within the data, which appears might be the case due to the unhelpful first principal component. I will run silhouette scores to test 2,3,4,5, and finally 6 clusters to see what best fits the data.
# Import model
from sklearn.mixture import GaussianMixture
from sklearn.metrics import silhouette_samples, silhouette_score
import matplotlib.cm as cm
#Pick samples for silhouette scoring
## This code borrows heavily from Scikit Learn's page on silhouette analysis
## http://scikit-learn.org/stable/auto_examples/cluster/plot_kmeans_silhouette_analysis.html
range_n_clusters = [2,3,4,5,6]
for n_clusters in range_n_clusters:
fig, (ax1, ax2) = plt.subplots(1, 2)
fig.set_size_inches(18, 7)
ax1.set_xlim([-1, 1])
ax1.set_ylim([0, len(reduced_data) + (n_clusters + 1) * 10])
clusterer = GaussianMixture(n_components=n_clusters, random_state=10).fit(reduced_data)
cluster_labels = clusterer.predict(reduced_data)
silhouette_avg = silhouette_score(reduced_data, cluster_labels)
print("For n_clusters =", n_clusters,
"The average silhouette_score is :", silhouette_avg)
sample_silhouette_values = silhouette_samples(reduced_data, cluster_labels)
y_lower = 10
for i in range(n_clusters):
ith_cluster_silhouette_values = \
sample_silhouette_values[cluster_labels == i]
ith_cluster_silhouette_values.sort()
size_cluster_i = ith_cluster_silhouette_values.shape[0]
y_upper = y_lower + size_cluster_i
color = cm.spectral(float(i) / n_clusters)
ax1.fill_betweenx(np.arange(y_lower, y_upper),
0, ith_cluster_silhouette_values,
facecolor=color, edgecolor=color, alpha=0.7)
ax1.text(-0.05, y_lower + 0.5 * size_cluster_i, str(i))
y_lower = y_upper + 10
ax1.set_title("The silhouette plot for the various clusters.")
ax1.set_xlabel("The silhouette coefficient values")
ax1.set_ylabel("Cluster label")
ax1.axvline(x=silhouette_avg, color="red", linestyle="--")
ax1.set_yticks([])
ax1.set_xticks([-0.1, 0, 0.2, 0.4, 0.6, 0.8, 1])
colors = cm.spectral(cluster_labels.astype(float) / n_clusters)
ax2.scatter(reduced_data[:, 0], reduced_data[:, 1], marker='.', s=30, lw=0, alpha=0.7,
c=colors, edgecolor='k')
centers = clusterer.means_
ax2.scatter(centers[:, 0], centers[:, 1], marker='o',
c="white", alpha=1, s=200, edgecolor='k')
for i, c in enumerate(centers):
ax2.scatter(c[0], c[1], marker='$%d$' % i, alpha=1,
s=50, edgecolor='k')
ax2.set_title("The visualization of the clustered data.")
ax2.set_xlabel("Feature space for the 1st feature")
ax2.set_ylabel("Feature space for the 2nd feature")
plt.suptitle(("Silhouette analysis for Gausian Mixture Model clustering on sample data "
"with n_clusters = %d" % n_clusters),
fontsize=14, fontweight='bold')
plt.show()
It appears even with PCA, clusters aren't well defined as distinct from each other. As would be expected in this case, fewer clusters give a better silhouette score. In every configuration, though, the observations with the largest values for both principal components were seaparated into their own cluster distinct from other clusters. We may get more clarity by separating out the centers for the 2-cluster model and analyzing them in relation to each other.
# Implement final model of 2 clusters:
clusterer = GaussianMixture(n_components=2, random_state=10).fit(reduced_data)
centers = clusterer.means_
# Transform centers back from PCA for analysis
log_centers = pca.inverse_transform(centers)
true_centers = np.exp(log_centers)
# Display the true centers
segments = ['Segment {}'.format(i) for i in range(0,len(centers))]
true_centers = pd.DataFrame(np.round(true_centers), columns = log_df.keys())
true_centers.index = segments
display(true_centers)
The first cluster appears just to have higher expenditures in each of the features than the second cluster, which is in line with the first principal component (which was relatively uniformly negative across all values), and the silhouette analysis (which showed fairly ill-defined clusters, and preferred fewer clusters to more). Unfortunately, consumption didn't separate into clear trends, as consumtiopn across houeholds in the features chosen was fairly uniform.
Clearer trends may have been found if we'd separated consumption by region, or separated households into the bottom and top 10% of incomes, and this could be a possible avenue for future analysis to try to find clearer trends.


createEmptyItem
Model
Creates an object using the editable fields from the model, all attributes are empty based on the field type unless an overrides object is passed in. The overrides object extends the defaults. A benefit to this approach is the returned object inherits from the ListItem prototype so we have the ability to call entity.saveChanges instead of calling the model.addNewItem(entity).


After its creation in 1842, the New York Philharmonic grew and came to establish itself as not only one of the oldest musical institutions in the United States, but also as one of America's leading orchestras. Below, you will find an intereactive timeline focusing on the early history and milestones of the New York Philharmonic from 1842 to 1911.
While the tradition of classical music in Europe operated as “a canon of homegrown symphonies,” classical music in America combined elements of European culture and emphasized performativity to form the basis of a new musical heritage (Horowitz xiii). Throughout the nineteenth century, a number of transatlantic exchanges occurred between American and European musicians. American artists would often study abroad in Europe, adopting the style and technical methods of European classics. At the same time, a rapidly changing political climate in Europe lead many musicians and artists to search for a musical community beyond their homelands.
Ureli Corelli Hill, an American-born violinist, would be such an example. Traveling often to England and Germany in the late 1830s, Hill played alongside a number of European orchestras (Spritzer). In 1842, Hill returned to New York City to establish the New York Philharmonic, one of the first orchestras of its kind built on U.S soil. His return to the United States coincided with the social and economic circumstances needed for such an institution to form (Salet). Hill’s experience abroad greatly affected the trajectory of the New York Philharmonic. He found himself offended by some methods, i.e, the English and their abrupt finales. Hill was not alone in his vision for the New York Philharmonic. In contrast, he was devoted to many German musical traits, whether it was a flexible and expressive conducting style, or the open rehearsals that allowed for public accessibility (Horowitz).
Principle prominent conductors of the New York Philharmonic shared an equal interest and investment in German musical tradition. Conductors Carl Bergmann, Theodore Thomas, Leopold and Walter Damrosch, and Gustav Mahler-- key players in the development of the New York Philharmonic, augmented classical music styles to formulate what may now be seen as a concrete American orchestra tradition. These conductors would utilize technical skills and business practices to help bring the NYP into greater prominence within the American musical community.
Today, the New York Philharmonic remains as one of the oldest orchestras in the United States, and one of the oldest in the world. In the year of its establishment in 1842, only three concerts were held over the course of the year, open exclusively to musicians’ families and friends. It was not until 1851 that the NY Philharmonic opened its doors to the general public (Horowitz).
Within the span of one hundred years, the New York Philharmonic would grow exponentially-- an expanding of venues and musical repertoire would allow the orchestra to reach a larger audience in New York City and across the country. The Origins of the New York Philharmonicproject aims to explore the foundations and critical history of the New York Philharmonic.


I.Q. A film review by Mark R. Leeper Copyright 1994 Mark R. Leeper
Capsule: I.Q. is both better and worse than expectation. Its playful look at some of the greatest minds of the century is not too unbelievable. But the script and the filming show real signs of sloppiness. Tim Robbins never manages to be much of a romantic lead. Rating: 0 (-4 to +4).
If you enjoyed seeing a Tyrannosaurus Rex turned into a big purple plush toy named Barney, you have what it takes to appreciate seeing another giant of bygone science, Albert Einstein, turned into a big, lovable, avuncular pushover in I.Q. In fact, you will see not just Einstein, but Godel and Podolsky as lovable old gentlemen who play Cupid for Einstein's mathematician niece Catherine Boyd (played by Meg Ryan) and an auto mechanic Ed Walters (Tim Robbins). Ed is the last side in a love triangle. Boyd is already planning to marry James Morland (Stephen Fry, who currently plays Jeeves on PBS). Morland isa psychologist who performs sadistic experiments on animal and human subjects and his lab is rarely without the sound of some moaning subject of his experimentation. I think the viewer is not supposed to like Morland. Walters falls in love with Boyd in a chance meeting with her. He begins courting her, and as an experiment, Einstein and some of his cronies decide to help him. They decide they have to make an expert in auto mechanics seem on a par with the experts in quantum mechanics.
The first step is to convince Boyd that Walters is more intelligent than your average auto repairman. This goes disastrously awry and it is not long before Walters is presenting papers on "cold fusion" and interstellar drives to the Princeton Institute of Advanced Studies. Soon the joke has taken on national political significance.
Ryan was an interesting choice to play a mathematician and Einstein's niece. While she does not look Jewish as presumably Einstein's niece would, her quirky acting style, somewhat toned down in this performance, could easily be attributable to a sort of nervous energy that someone of high intelligence might have. Robbins, on the other hand, always seems a little snide and at the best of times is never particularly likable in his films. He and Ryan just do not play well off of each other. Surprisingly, Walter Matthau is not too unbelievable as Albert Einstein. Some of his dialogue could be more believable, but the real Einstein apparently did have a child-like, fun-loving nature as exemplified by famous photos of him riding a small bicycle and of him sticking his tongue out to make faces for news cameras. Walter Matthau's brand of sly humor is not an unreasonable depiction.
The real problem with I.Q. is that the script was not ready to film. Particularly late in the story, the storytelling becomes a little cryptic. Ryan's character makes a deduction that is supposedly explained by a comment she makes, but it is not clear how. There are notable anachronisms. The film supposedly takes place prior to Einstein's death, making it April 1955 at the latest, yet the dialogue uses terms like "mind-meld," "cold fusion," and "space race" that were not coined while Einstein was alive. In one sequence we see Walters and Boyd looking at a perfectly clear sky full of stars, yet less than three minutes later the script calls for a pouring rain that lasts the rest of the evening. A sequence at the very end of the film is incredibly contrived. These are all very amateurish script problems that seem to indicate a rush job.
On the other hand, where one would expect the script to most fall down--its depiction of scientists talking shop--is not as bad as it might have been. It is not easy for a non-genius to write dialogue supposedly spoken by a genius. It could be better here, but some of the dialogue does deal with the right sorts of issues. Godel gives an argument that time does not exist that is easily countered and unworthy of the real Godel. But generally the issues discussed are not too unrealistic.
I.Q. is directed by Australian Fred Schepisi, who most recently directed SIX DEGREES OF SEPARATION. The film has a nice look with the camera work by Ian Baker, but not a look that bears close examination. Princeton in late March and early April seems unseasonably pleasant. Meg Ryan wears mostly sun dresses at a time of year when most of the rest of us in New Jersey would still be dressing warmly. The cars on the road seem mostly large and with prominent fins. Even if the film is set as late as 1955 this seems unlikely. (As a side note, Fred Schepisi apparently always uses Baker for cinematography. This is their eleventh film together of the eleven that Schepisi has directed and the twelve that Baker has filmed.)
In short, this is a film with some pretty sloppy filmmaking, a romance with little chemistry, and a few pieces of reasonable humor. Mostly it is on the level of a TV situation comedy. I rate it a flat 0 on the -4 to +4 scale.
Mark R. Leeper<EMAIL_ADDRESS>.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Methods that has mutators-like name are expected to have
side effects
. The convention is that you include empty parentheses in method call if the method has side effects.
* Refer to Programming in Scala, 5.3 Operators are methods


The School of Computing & Design (SCD) educates students to apply state-of-the-art information technology to solve real world communication problems in a socially responsible way. In addition to mastering the technical knowledge and skills, graduates of SCD programs excel in communication, collaboration and innovative problem solving.
Degree Programs


Explora propiedades en tu area
Mallorca, España Cambiar ubicación
Somos Rústica Mallorca Inmobiliaria
Amplia gama de propiedades
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Rústica Mallorca
Lorem Ipsum is simply dummy text of the printing and typesetting industry five centuries, but also the leap.
Agentes para su servicio
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Typesetting, remaining essentially unchanged. It was popularised in the 1960s.
explora propiedades
Nuestras casas exclusivas
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since
Carrer glosadors 7, 07010 Santanyi
Add to bookmark
Add to compare
Carrer glosadors 7, 07010 Santanyi
Add to bookmark
Add to compare
Carrer glosadors 7, 07010 Santanyi
Add to bookmark
Add to compare
Carrer glosadors 7, 07010 Santanyi
Add to bookmark
Add to compare
explora propiedades
Conoce al equipo de Rústica Mallorca
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since
“Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry”
“Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry”
“Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry”
“Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry”
“Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry”
Más sobre Rústica Mallorca
Nos encanta el trabajo de Rústica Mallorca!


Google Play Movies may soon add support for Dolby Vision HDR content
by Ben SchoonGoogle Play Movies is a fine way to buy and watch digital movies, but it’s long lacked support for Dolby Vision HDR. According to some code behind the scenes, it looks like that may be coming down the road.
The folks at XDA-Developers dug into Google Play Movies v4.17.22 which has some revealing strings hidden within. According to the strings, Google Play Movies may soon support Dolby Vision content to some extent, but there’s not much information available here.
If Play Movies were to add support for Dolby’s proprietary format, it would arrive in addition to HDR10, which has been available for some time now. Dolby Vision typically offers a bit higher peak brightness from the picture with a bit more dynamic range, too. Of course, you’ll have to have a compatible TV or set-top box to take advantage of the format. Nvidia’s new Shield TV, for example, supports Dolby Vision HDR.
<string name=”details_dolby_vision”>Dolby Vision</string>
<string name=”content_description_dolby_vision”>Dolby Vision</string>
It’s totally unclear when Google plans to make this support available to Play Movies owners, but it’s probably a safe bet that compatible movies will be upgraded for free.
More on Google Play Movies:
- Google Play Movies & TV 4.15 hints at renting television shows [APK Insight]
- Google shuts down Play Movies app for Daydream VR, directs users to YouTube app
- Nvidia Shield TV (2019) Review: Smaller, cheaper, still the best streaming device
FTC: We use income earning auto affiliate links. More.


{% extends "template.html" %} {% set backLink = "forgotten-password" %} {% block content %}
If email address is registered, we'll send you a reset code now.


Patrick_ hey
shs96c G;day
greg-- hi
Patrick_ jason should be on soon i imagine -- just saw him get on AIM
shs96c Fair enough.
Patrick_ who do we have here? Rainer, Cameron, and who is Greg?
shs96c I'm Simon
greg-- i'm sorry guys I was just passing by; badly need some sleep, it's 3 am here.. just saw the thread and thought i'd drop by
greg-- I'm Grégory Joseph
-->| jcarreira<EMAIL_ADDRESS>has joined #webwork
greg-- being noisy on the lists from time to time
shs96c Not a bad thing :)
greg-- sent a couple of patches, and overall happy user of ww ;)
Patrick_ ok, cool
Patrick_ Greg: get some rest -- we'll post the transcript
greg-- thanks ;)
Patrick_ unfortunately, I wanted to have a rough TOC for the new docs that we could all start with, but I didn't get around to it
greg-- am waiting for a maven build to finish... it's moving at its own pace :/
jcarreira serves you right for using maven :-)
Patrick_ Jason: could you maybe take lead on this meeting? I want to finish the build refactoring I've been doing all day. Also, are we waiting for Jay, or do you want to get started?
shs96c I'm happy to wait for Jay
jcarreira let's wait a couple more minutes
Patrick_ ok. while we're waiting, i have some good news: the XWork build is the first official project to be based on the OpenSymphony Common Build system
Patrick_ WebWork is being updated now. Part of that update involves making sub-projects in WW. The first such subproject will be the example web app
shs96c Patrick: What's the "common build system"?
shs96c Is it in CVS yet?
Patrick_ http://ivyrep.opensymphony.com/opensymphony/ is where builds that use the OpenSymphony Common Build drop their artifacts. This allows you to keep up to date if you use Ivy
Patrick_ yes, it is
Patrick_ let me get you a URL
Patrick_ https://xwork.dev.java.net/source/browse/xwork/build.xml?rev=1.30&view=auto&content-type=text/vnd.viewcvs-markup
Patrick_ and:
Patrick_ https://opensymphony.dev.java.net/source/browse/opensymphony/common/osbuild.xml
Patrick_ a couple changes came from this:
Patrick_ 1) you must have ../opensymphony/common available
shs96c I was just about to ask about that
Patrick_ (or you can redefine the location via ${common.build}
shs96c Can it be a jar?
shs96c Or is it the full source tree?
Patrick_ it is just an ant build file
Patrick_ it can't be a jar
Patrick_ 2) in XWork, I'm not currently building the editor. I can set this up as a sub project, but I'm not sure if it is even worth it. Is the editor still maintained, or should we focus our energy onConductor/EclipseWork/ etc?
-->| vitorsouz<EMAIL_ADDRESS>has joined #webwork
shs96c I've never used the editor, so not too stressed either way
vitorsouz Hi, there. Sorry I'm late.
Patrick_ vitor: no worries, we haven't started yet.
shs96c NP
Patrick_ Jason: maybe we should start now w/o Jay?
vitorsouz I wasn't sure if Eastern was DST or not. Is it 9:15 or 10:15 there now?
Patrick_ it is 9:15 EST
shs96c 11:15AM in Sydney. A very civil time to arrange a meeting on IRC for :)
vitorsouz 10:15PM in Brazil. Not that different.
Patrick_ ok, well let's start
Patrick_ i'd like to start off with a couple thoughts, and then i'll open it up
jcarreira oops, back
Patrick_ Recently, Matt Raible pointed me to the WebWork 1.0 Release Announcement on TheServerSide
Patrick_ more than a couple comments mentioned how good the documentation was
jcarreira LOL
shs96c :)
Patrick_ whether it is just PR or reality, the fact is: WebWork suffers from an image of bad documentation
shs96c Agreed
Patrick_ the goal should be to fix that for WebWork 2.2
jcarreira yep
Patrick_ in order to do that, I think we should establish some general guidelines, and then once we agree on those, put together a TOC and divvy out the work
jcarreira ok
vitorsouz Ok.
Patrick_ guidelines might be, for example, that the WebWork docs are "self contained", meaning they don't refer to the XWork docs. Or, they might mean that all example code must be verified to work and reproduced in the example app. Whatever.
shs96c Sounds reasonable
Patrick_ I think for this meeting, we should establish those guidelines and put together a rough TOC
Patrick_ Jason, anything to add? Otherwise, I'm ready to open it up to discussion of guidelines
greg-- (you might want to use the snippet macro for confluence, to make sure sample code in docs matches buildable reality - i.e. extract that code in the doc right out of cvs)
jcarreira well, I'd say another guideline should be that tutorials on the example app should be documented in the doc
jcarreira greg, any idea what happens with that when you export that page?
Patrick_ ok, sounds like greg and jason are sort of pointing to the same goal: keep the code and docs in sync
jcarreira will it pull the latest code and include it?
greg-- jcarreira: i guess like any macro, it just exports whatever is rendered, i.e. the code as it is on cvs at the moment you export/publish
jcarreira I'd also say I think we need to think about who the audience is and have a couple (at least) sets of docs... like a 5 minute quick start vs. tutorials / example app vs. reference
greg-- never verified that myself though
shs96c Jason: the most important docs are those aimed at beginners
shs96c Those are the people who need the most support
Patrick_ OK, i'm going to keep a list of ideas being posted here. If I don't summarize it properly, let me know.
Patrick_ So far:
Patrick_ - Keep docs and code in sync
jcarreira shs96c: well, that's one important set, but a complete and up-to-date reference is important for current users (or even me)
Patrick_ - Partition the docs properly: getting started, advanced users, etc
shs96c Agreed, but if there were holes in the docos for advanced users it would be understandable
vitorsouz I think that WW docs should read more like a book, starting with the easy stuff and incrementing gradually, showing examples and explaining. This is the best approach for begginners, I guess.
vitorsouz That's what I tried with the tutorial, a long time ago, and then didn't have the time to improve it (*sigh*).
jcarreira vitor, that's important, but I spend a lot of time on the boards pointing people to the reference on the tags
jcarreira Jay IM'd me and he's having a hard time getting into EFNET
vitorsouz Ok. Reference is also desirable, as well as a cookbook: advanced tasks.
vitorsouz Jason: I got into irc.ca.efnet.info with no problem.
shs96c vitorsouz: sounds like how I'd expect the docs to be structured
Patrick_ ok, so i'm hearing needs for: reference, tutorials, getting started, and a cookbook (which is just tips and tricks, right?)
vitorsouz Right. Gettint started and tutorial could be the same thing.
Patrick_ what about keeping the docs self-contained by not linking out to XWork?
shs96c A reasonable level of self-containment would be good
vitorsouz Self-contained: I think it's a good idea. Referencing to XWork gives an idea of incompleteness.
jcarreira Well, I agree in general... but maybe we could use the Confluence stuff to pull in parts from XWork?
shs96c Allows people commuting and reading offline to get the most out of it
greg-- Patrick_ that's a good point, but on the other you don't want to duplicate stuff.. there's currently some duplication and confusion, for instance with the i18n or validation docs that are both in ww and xw
Patrick_ Jason: I agree, if we can find ways to re-use, that is great. But I think the final result should be self-contained
shs96c Perhaps a quick glossing over of some of the important XW topics would be beneficial with links to the official XW docs
Patrick_ so, related to that question: do you guys think WebWork docs should get the majority of the focus, with XWork as an afterthought?
jcarreira shs, that doesn't help when we export the docs and include them in the distro
vitorsouz Patrick: yes.
shs96c jcarreira: agreed, but it's enough for someone to keep reading
vitorsouz XWork is more targeted to developers, I guess. They can read the source code. ;)
shs96c Not so sure about that.
vitorsouz (just kidding)
shs96c :P
Patrick_ ok, any other guidelines? we have three right now:
Patrick_ - Keep docs and code in sync
greg-- it would maybe hide xwork even more. as of now, it's not obvious what you do with xw WITHOUT ww, and maybe you guys also want to stress that?
Patrick_ - Break up in to main sections: tutorials (getting started, etc), reference, cookbook
Patrick_ - WebWork docs core focus, XWork docs not important and kept separate
jcarreira well, I'm not sure about that last one
shs96c I'm with Jason on this one
Patrick_ ok, what do you suggest?
shs96c I'd like the XW docs to be "the source of truth" for XW things
jcarreira I think we should look at the ability to keep the XWork docs up to date and use Confluence to include them in WebWork
vitorsouz Here's another option: both XWork and WebWork (and maybe future projects derived from XWork) have the same docs.
Patrick_ I agree, but not at the expense of the WebWork documentation experience
shs96c I'd be happy to see some high level discussion of how the XW elements affect WW2 in the WW2 docs
-->| nightfal<EMAIL_ADDRESS>has joined #webwork
-->| jaybose<EMAIL_ADDRESS>has joined #webwork
jaybose sorry i'm late
vitorsouz Welcome Jay and nightfal.
Patrick_ Jay, Erik, welcome
shs96c We're talking about documentation
jcarreira ok, guidelines so far:
Patrick_ read here to catch up: http://wiki.opensymphony.com/display/WW/Temp+chat
Patrick_ let's nail down these three guidelines and then move on the TOC
jcarreira - Keep docs and code in sync
jcarreira to do that let's look at the stuff that pulls from CVS
jcarreira - Break up in to main sections: tutorials (getting started, etc), reference, cookbook
jcarreira I think what we have now is mostly reference, but not so well structured
nightfal I agree
greg-- jcarreira : http://confluence.atlassian.com/display/CONFEXT/Snippet+Macro+Library
jcarreira Now the one we're not so much in agreement on: - WebWork docs core focus, XWork docs not important and kept separate
shs96c nod
jcarreira greg, cool.. I'll take a look...
shs96c That's the one I'm feeling a little uncomfortable about
Patrick_ well, here's my two concerns:
jcarreira I'd like to keep XWork up to date, and I think Confluence can bring it all together
nightfal obviously it gets tricky because *most* of the use that xwork sees is from webwork, so separating them just confuses new webwork users
Patrick_ 1) I don't want our focus on XWork docs, since 99% of users will never download XWork
shs96c Except as part of WebWork.
shs96c :)
Patrick_ 2) I want the WebWork docs to always be correctly "versioned" -- meaning that when you download WebWork 2.2 and the docs point out to XWork, they can't point to the wiki
Patrick_ because the wiki would be "latest", not necessarily the docs that we meant to link to at the time 2.2 was released
jcarreira right, agreed
shs96c We could always export the XWork and WebWork spaces together for the WebWork docs
jcarreira greg, do you know the macros to pull in pieces of other pages?
jaybose There are things that would better be explained under the XWork section
vitorsouz What about the idea of both sharing the same docs? I got no comments on the idea (maybe because it's very very bad... :)).
Patrick_ I don't want users to get fragemented in to thinking about XWork and WebWork. I want them to download WebWork and just use it. That means I don't want them to have to read an XWork Reference and a WebWork Reference
Patrick_ vitor: i don't like that for the reasons above
shs96c Then we're heading towards Vitor's idea....
nightfal I agree that separate is poor
nightfal is exporting both sets of docs for the ww dist an option?
Patrick_ I'm open to finding a way to include parts of the XWork docs in the WebWork docs via Confluence. But the end result would be *standalone* WebWork docs when exported
jcarreira yeah, I think what makes sense is to pull in the parts of the xwork docs that are needed and add to them in the corresponding webwork docs page
Patrick_ is everyone else cool with that?
nightfal I'm stepping away for a minute, I just wanted to lurk
nightfal lurks
shs96c Standalone is fine by me, because I like to read offline
Patrick_ ok, speak now or forever hold your peace :)
Patrick_ going once... twice...
jaybose so the plan is to just reference parts of the Xwork docs?
vitorsouz Wait...
Patrick_ waiting :)
jaybose but to keep sep?
greg-- jcarreira : you mean {include} i believe ?
vitorsouz What about not mentioning XWork in the Getting Started (Tutorial) and referencing it in the reference and cookbook.
vitorsouz That way begginners wouldn't feel confused.
jaybose i like that idea
jcarreira yes, I think that's a good idea
shs96c Beginners often think of WW2 and XW as one and the same thing...
Patrick_ vitor: i'm fine with referencing it as long as the _content_ that is exported appears as a standalone document. The way we would do that is by using {include} (I think)
vitorsouz Ok. I'm fine with include.
Patrick_ So, just so we're all absolutely clear, an example of this in action might be:
vitorsouz I'm more concerned with the end result for the reader, because I don't know Confluence and its features that well.
Patrick_ XWork/Documentation/Interceptors/Overview might talk about interceptors in general
greg-- i zlso it's better to mention it right away, than letting users discover the existence of xw once they think they're up to speed with ww
Patrick_ WebWork/Documentation/Interceptors/Overview might link to WebWork/Documentation/Interceptors/XWorkOverview
Patrick_ and then WebWork/Documentation/Interceptors/XWorkOverview would _include_ XWork/Documentation/Interceptors/Overview
greg-- mind that {include} includes a complete page, not portions of it
vitorsouz Greg: we could mention it in the begginning of the tutorial, just to let the reader know, but saying they shouldn't worry about it for now.
Patrick_ ok. say "wait" in the next 5 seconds or we're moving on
greg-- vitorsouz true :)
jcarreira link?
vitorsouz I'm cool with that last resolution.
jcarreira you mean it links now and now we want to make it include?
greg-- jcarreira http://docs.codehaus.org/renderer/notationhelp.action?section=confluence ?
Patrick_ ok, great. so now the next step is TOC -- or maybe more specifically, how do we implement these gaols.
Patrick_ let's start with the first one:
Patrick_ KEEP THE CODE AND DOCS IN SYNC
Patrick_ it appears that Simon and Jason are on to something that might help
Patrick_ what I've been doing is making the example app an actual tutorial, with the tutorials _in_ the app
Patrick_ it hasn't turned out too hot so far though :(
jcarreira yes, we need to use the snippet macro... what do we have to do to enable the snippet macro?
shs96c Sounds hard to do nicely
jcarreira well, it just needs the docs written, I think
vitorsouz Patrick: maybe more thought is to be given to which examples are interesting. But that's not the point right now, I guess. The point is the means of syncing, right?
jcarreira the code can't stand alone for someone trying to learn
Patrick_ well, wait -- do we need to do te snippet macro? What about just saying that parts of the docs (say, "tutorials") are in the example app and the reference and cookbook are static?
Patrick_ or would that fragment things too much b/c then you wouldn't be authoring all the docs in confluence?
jcarreira Hmm... so just do the tutorials completely in the example app?
Patrick_ maybe, i'm just tossing out ideas at this point. i don't feel strongly either way
vitorsouz So the tutorial page in confluence would be just a single one, pointing to the example app in the distribution?
Patrick_ possibly. would that work?
Patrick_ how does {snippet} work?
greg-- jcarreira : enabling the snippet macro = dropping the jar in confluence/WEB-INF/lib and praying it works with your confluence version.
shs96c I'm not keen on that idea
jaybose yes, all tutorials via the example app
shs96c Maybe I've grabbed the wrong end of the stick here
vitorsouz I prefer the automatically syncing idea, but not sure it's feasible or easy.
shs96c If we're talking about including snippets from the example app in the tutorials, that's cool
jcarreira the problem there is that to update the tutorial you'd have to be a webwork developer with CVS write access
Patrick_ jason: good point
greg-- Patrick_ http://confluence.atlassian.com/display/CONFEXT/Snippet+Macro+Library : it grabs contents of your cvs repo through a cvsview, between given markers (like START SNIPPET FOO, END SNIPPET FOO)
Patrick_ though, we could provide "Documentation" access to webwork/tutorial in CVS
Patrick_ java.net does support that
jaybose is that really necessary?
jcarreira but that only gives access to the /web directory, doesn't it?
Patrick_ hmm, the snippet macro looks like it can pull parts of the content. I like it.
greg-- Patrick_ it can indeed
jaybose is copy and paste that error-prone?
vitorsouz About the snippet thing: it guarantees automatically updating existing code, but if I write a new code in the example app I have to write a new page for it and use the snippet-tag, is that correct?
Patrick_ jason: well, after tonight, webwork/tutorial will have all the source, libs, etc. it'll be it's own project
Patrick_ vitor: yes
jcarreira jay, copy and paste doesn't keep things up to date
Patrick_ i actually really like the snippet idea
Patrick_ what are potential "gotchas" with it?
greg-- xml
greg-- maybe there's been a new version but last time i tried
greg-- few month agos
greg-- an xml snippet wouldn't render corretly
vitorsouz I'm thinking that bugs in the snippet tag are the only concern. If it works well, no worries.
greg-- i mean, it was readable, but the xml colouring was messed up
Patrick_ we could get Atlassian to fix that I bet
Patrick_ or even make a copy for ourselves
Patrick_ that works :)
greg-- hmm it's not maintained by them
Patrick_ any other showstoppers? so far i've heard:
Patrick_ - new tutorials in CVS will need to have the wiki get updated
Patrick_ - snippet macro could be buggy
greg-- (mind that maybe with conf1.4 it'd work, they've rewritten the renderer)
Patrick_ we're running on 1.4.1
greg-- i can't really tell, we're still on 1.3.x at work
Patrick_ ok, anything else to say about? any other suggestions? say "wait" in the next 5 seconds or I'll assume we're agreed to use the snippet tag
Patrick_ ok, done. (trying to keep this meeting plodding right along)
vitorsouz Right.
Patrick_ next up: sections
Patrick_ so we've talked about tutorials, reference, and cookbook
Patrick_ where would something like the general description of WW's architecture go?
jaybose what goes in the three
Patrick_ three?
jaybose we need guidelines for that
jaybose three sections.
Patrick_ i'm not following
Patrick_ you mean it would be in the cookbook?
jaybose ok, what would go in the cookbook, and not in the tutorials
vitorsouz I think the docs should start with general information and architecture. Then explain the three sections above: Tutorials for new users, Reference for quick ref and Cookbook for advanced users looking for advanced ideas.
Patrick_ well, i see tutorials as things like:
jcarreira the tutorials are really 2 sections: getting started and tutorials
shs96c Things like injecting services into validators using Spring....\
Patrick_ - Getting Started, Using Validation, etc
Patrick_ the cookbook would b emore like:
Patrick_ - How to override the default XHTML templates
Patrick_ - Writing your own ServletDispatcher
Patrick_ etc
vitorsouz I see the tutorials as something that starts with installation and "Hello, World" and slowly increment things until we have a complete but simple example app.
jaybose getting started should be part of the ref manula
shs96c vitorsouz: I like that idea
Patrick_ see, i think we're missing something: general documentation
jcarreira yeah
Patrick_ i think we need a "setting up webwork" in the general docs
Patrick_ and then in the tutorials, a "getting started"
Patrick_ there is a difference:
jcarreira ok docs:
Patrick_ in "setting up webwork", you're told what configs are needed, files, etc
Patrick_ in "getting started", it is a step by step hand-holding guide
vitorsouz Gettint Started is in the tutorials, Setting up WebWork is in the reference.
jcarreira let's start at the top level and then break each one down
jcarreira we need: Getting started (includes a hello world starter app and tutorials)
vitorsouz Just to further explain my point of view, once the user finishes the tutorial he/she could go to the Cookbook and check random advanced ideas, meaning that cookbook "mini-tutorials" do not depend on one another, but depend on know what's in the tutorial.
Patrick_ ok, let's look at a couple things:
jcarreira General Documentation: includes architecture guide, what is MVC, reference
Patrick_ WebWork 1.x docs: http://www.opensymphony.com/webwork_old/
shs96c Something like: http://wiki.rubyonrails.com/rails/show/UnderstandingRails
shs96c ?
Patrick_ WebWork 2.x docs: http://www.opensymphony.com/webwork/wikidocs/Documentation.html
[ERROR] Connection to irc://efnet/ (irc://irc.prison.net/) reset.
=-= User mode for Patrick__ is now +i
-->| YOU (Patrick__) have joined #webwork
|<-- Patrick_ has left efnet (Read error 54: Connection reset by peer)
Patrick__ sorry, got booted
=-= YOU are now known as Patrick_
Patrick_ ok, looking at our existing TOC, i think we're not too far from where we want to be
Patrick_ I think the real problem is this:
vitorsouz "Understanding Rails" is nice.
Patrick_ http://www.opensymphony.com/webwork/wikidocs/Interceptors.html
Patrick_ you click on Interceptors
Patrick_ but now you can't get any useful info on the "prepare" interceptor, for example
Patrick_ http://www.opensymphony.com/webwork/wikidocs/ExecuteAndWaitInterceptor.html is what we need to aim for for every reference page
Patrick_ something more detailed
Patrick_ notice that XW has more info on some of the items:
Patrick_ http://wiki.opensymphony.com//display/XW/Interceptors
Patrick_ ok, it's getting late for everyone, I think we should wrap this up rather than letting this go on for another hour. can someone volunteer to write a new TOC that at least shows examples of drilling down to the details needed in the reference?
jcarreira Yes, some of the WebWork pages for interceptors may ONLY have an include of the XWork page
vitorsouz Sorry to return to the XWork/WebWork docs issue, in this case, we would have a XWork Interceptors section including XWork docs and then a WebWork-specific Interceptors section with WW stuff?
greg-- i'll be the 1st to leave - darn .. 4pm :d
jcarreira ok, thanks for the help greg!
greg-- ur welcome :)
Patrick_ vitor: there would be a page, for example, in WebWork called PrepareInterceptor
greg-- bye everyone
|<-- greg-- has left efnet ()
Patrick_ and it may simply just include XWork's PrepareInterceptor page
Patrick_ the key is that it includes it rather than linking to it
|<-- jaybose has left efnet (Ping timeout: no data for 247 seconds)
vitorsouz Hmmmm... Ok.
Patrick_ we have to be careful about links in the XWork docs though
-->| jaybose_<EMAIL_ADDRESS>has joined #webwork
=-= jaybose_ is now known as jaybose
Patrick_ however, I think that we can sort of think of these things after the initial docs are there
Patrick_ Jay, i'll update the chat log
vitorsouz I'd volunteer to write the TOC, but I'm going out of town tomorrow, only returning Sunday. If you guys don't mind waiting for some time next week...
jcarreira Jay, do you have time to work on the TOC?
jaybose yes
jcarreira Ok, you can put it under the WebWork 2.2 page on the wiki... it doesn't have to link to anything yet
Patrick_ http://wiki.opensymphony.com/display/WW/Temp+chat
vitorsouz Seems like some people have different ideas in general for the doc structure, how about we schedule the next meeting and everyone writes a TOC exemplifying his own ideas and sends it to Patrick to put online for discussion?
Patrick_ vitor: i like that idea. and those who don't write one don't get as much of a say :)
jcarreira :-)
vitorsouz :)
shs96c :)
jcarreira ok, when are you back from your trip Vitor?
vitorsouz Late saturday night. I could work on this sunday.
Patrick_ haha, sounds like we have a winner then. Let's schedule the next meeting time and call it a day
shs96c Same time on Sunday?
Patrick_ Sunday is too early
shs96c OK
Patrick_ i'd opt for sometime after Tuesday next week.
jcarreira next wed?
 Wednesday 9PM Eastern.
jcarreira yep, sounds like a plan
nightfal TOC == Table of Contents, yes?
Patrick_ yes
vitorsouz Yes.
Patrick_ great! good work guys. this was a perfect meeting too -- 60 minutes and done :)
Patrick_ so next week we'll nail down the TOC and divide up responsibilities
jcarreira yep
vitorsouz Okidoki.
Patrick_ i'll post the final chat log and send out a note in the forums for people interested
Patrick_ see ya. good meeting
jcarreira ok, sounds good
|<-- jaybose has left efnet (Chatzilla <IP_ADDRESS> [Netscape 7.2/20040804])
vitorsouz Good idea. Great work, everyone.
jcarreira later


{% extends 'base.html' %} {% load static %} {% block title %}- Website Credits{% endblock title %} {% block content %}
We are a group of programming kittens and several slightly more experienced cats. Mostly girls, learning to code together every Wednesday at Zemanta and other startups around Ljubljana, Slovenia.
Main contributing Catz:
And hey, you can become a contributor too! Fork the project on GitHub and send us a Pull request with improvements.
The logo was designed by Leon @Orsa. You can find it in a variety of formats in our codeeu-resources repository. Feel free to use it to promote your Code Week event.


PyLadies Boston
Home
Events
Library
Contact
Title
Author
Publisher
Language
Level
Description
Available?


 Praesentium dignissimos expedita labore culpa sequi, debitis soluta excepturi .
Community Stories
Community
Bakari Potter
Roy Mustang
Nems Prime


- Student Resources
- The Creation
- Solar System Introduction
- Sun
- Mercury
- Venus
- Earth
- Mars
- Jupiter
- Jupiter Introduction
- Satellites of Jupiter
- Metis,
Adrastea,
Amalthea,
Thebe,
Io,
Europa,
Ganymede,
Callisto,
Leda,
Himalia,
Lysithea,
Elara,
Ananke,
Carme,
Pasiphae,
Sinope
- Chronology of Jupiter Exploration
- The Ganymede Map Images
- Maps of Io
- Io's Volcanic Features
- Pele Volcano & Pillan Patera
- Io's Atmosphere, Mountains, and "Water Cycle"
- The Europa Map Images
- Voyager Jupiter Science Summary
- Battery Acid Chemical Found on Jupiter's Moon Europa
- Hubble Finds Oxygen Atmosphere On
Jupiter's Moon Europa
- Hubble Finds Ozone on Jupiter's Moon Ganymede
- The Discovery of the Galilean Satellites
- Galileo Spacecraft Press Releases and Information
- Saturn
- Saturn Introduction
- Cassini At Saturn
- Huygens on Titan
- Saturn's Magnificent Rings
- Satellites of Saturn
- Pan,
Atlas,
Prometheus,
Pandora,
Epimetheus,
Janus,
Mimas,
Enceladus,
Tethys,
Telesto,
Calypso,
Dione,
Helene,
Rhea,
Titan,
Hyperion,
Iapetus,
Phoebe,
New Satellites of Saturn
- Chronology of Saturn Exploration
- Voyager Saturn Science Summary
- The Cassini Mission
- Rhea Map Images
- Uranus
- Uranus Introduction
- Satellites of Uranus
- Cordelia,
Ophelia,
Bianca,
Cressida,
Desdemona,
Juliet,
Portia,
Rosalind,
Belinda,
Puck,
Miranda,
Ariel,
Umbriel,
Titania,
Oberon
Caliban,
Sycorax
- Uranus Science Summary
- Chronology of Uranus
Exploration
- Neptune
- Pluto and Charon
- Asteroids
- Comets
- The Kuiper Belt
- The Oort Cloud
- Meteoroids and Meteorites
- History of Space Exploration
- Space History
- Chronology of Space Exploration
- By Date
- By Planetary Body
- Sun,
Mercury,
Venus,
Moon,
Mars,
Jupiter,
Saturn,
Uranus,
Neptune,
Pluto,
Asteroids,
Comets
- Chronology of Solar System Discovery
- Spacecraft Mission Summaries
- Spacecraft Home Pages for Current and Future Missions
- Historical Publications
- Lesson Plans & Activities
- Sun, Planet and Satellite Data
- Awards and Recognition
- Glossary
- People In Astronomy
- Acknowledgements
Views of the Solar System Copyright © 1996-2001 by Calvin J. Hamilton.
All rights reserved.
Privacy Statement.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.data.parsing.ApacheMultipartParser.AutoFileItem
public static class ApacheMultipartParser.AutoFileItem
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_CHARSET
Default content charset to be used when no explicit charset parameter is provided by the sender. |
| Constructor Summary | |
|---|---|
ApacheMultipartParser.AutoFileItem(FileItemStream stream)
|
| Method Summary | |
|---|---|
void |
delete()
Deletes the underlying storage for a file item, including deleting any associated temporary disk file. |
protected void |
finalize()
Removes the file contents from the temporary storage. |
byte[] |
get()
Returns the contents of the file as an array of bytes. |
java.lang.String |
getCharSet()
Returns the content charset passed by the agent or null if
not defined. |
java.lang.String |
getContentType()
Returns the content type passed by the agent or null if
not defined. |
java.lang.String |
getFieldName()
Returns the name of the field in the multipart form corresponding to this file item. |
java.io.InputStream |
getInputStream()
Returns an InputStream that can be
used to retrieve the contents of the file. |
java.lang.String |
getName()
Returns the original filename in the client's filesystem. |
java.io.OutputStream |
getOutputStream()
Returns an OutputStream that can
be used for storing the contents of the file. |
long |
getSize()
Returns the size of the file. |
java.io.File |
getStoreLocation()
Returns the File object for the FileItem 's
data's temporary location on the disk. |
java.lang.String |
getString()
Returns the contents of the file as a String, using the default character encoding. |
java.lang.String |
getString(java.lang.String charset)
Returns the contents of the file as a String, using the specified encoding. |
protected java.io.File |
getTempFile()
Creates and returns a File representing a uniquely
named temporary file in the configured repository path. |
boolean |
isFormField()
Determines whether or not a FileItem instance represents
a simple form field. |
boolean |
isInMemory()
Provides a hint as to whether or not the file contents will be read from memory. |
void |
setFieldName(java.lang.String fieldName)
Sets the field name used to reference this file item. |
void |
setFormField(boolean state)
Specifies whether or not a FileItem instance represents
a simple form field. |
java.lang.String |
toString()
|
void |
write(java.io.File file)
A convenience method to write an uploaded item to disk. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_CHARSET
| Constructor Detail |
|---|
public ApacheMultipartParser.AutoFileItem(FileItemStream stream)
| Method Detail |
|---|
public java.io.InputStream getInputStream() throws java.io.IOException
InputStream
that can be
used to retrieve the contents of the file.
getInputStream
in interface FileItem
InputStream
that can be
used to retrieve the contents of the file.
java.io.IOException
- if an error occurs.public java.lang.String getContentType()
null
if
not defined.
getContentType
in interface FileItem
null
if
not defined.public java.lang.String getCharSet()
null
if
not defined.
null
if
not defined.public java.lang.String getName()
getName
in interface FileItem
public boolean isInMemory()
isInMemory
in interface FileItem
true
if the file contents will be read
from memory; false
otherwise.public long getSize()
getSize
in interface FileItem
public byte[] get()
get
in interface FileItem
public java.lang.String getString(java.lang.String charset) throws java.io.UnsupportedEncodingException
get()
to retrieve the
contents of the file.
getString
in interface FileItem
charset
- The charset to use.
java.io.UnsupportedEncodingException
- if the requested character
encoding is not available.public java.lang.String getString()
get()
to retrieve the
contents of the file.
getString
in interface FileItem
public void write(java.io.File file) throws java.lang.Exception
This implementation first attempts to rename the uploaded item to the specified destination file, if the item was originally written to disk. Otherwise, the data will be copied to the specified file.
This method is only guaranteed to work once, the first time it is invoked for a particular item. This is because, in the event that the method renames a temporary file, that file will no longer be available to copy or rename again at a later time.
write
in interface FileItem
file
- The File
into which the uploaded item should
be stored.
java.lang.Exception
- if an error occurs.public void delete()
FileItem
instance is garbage
collected, this method can be used to ensure that this is done at an
earlier time, thus preserving system resources.
delete
in interface FileItem
public java.lang.String getFieldName()
getFieldName
in interface FileItem
setFieldName(java.lang.String)
public void setFieldName(java.lang.String fieldName)
setFieldName
in interface FileItem
fieldName
- The name of the form field.getFieldName()
public boolean isFormField()
FileItem
instance represents
a simple form field.
isFormField
in interface FileItem
true
if the instance represents a simple form
field; false
if it represents an uploaded file.setFormField(boolean)
public void setFormField(boolean state)
FileItem
instance represents
a simple form field.
setFormField
in interface FileItem
state
- true
if the instance represents a simple form
field; false
if it represents an uploaded file.isFormField()
public java.io.OutputStream getOutputStream() throws java.io.IOException
OutputStream
that can
be used for storing the contents of the file.
getOutputStream
in interface FileItem
OutputStream
that can be used
for storing the contensts of the file.
java.io.IOException
- if an error occurs.public java.io.File getStoreLocation()
File
object for the FileItem
's
data's temporary location on the disk. Note that for
FileItem
s that have their data stored in memory,
this method will return null
. When handling large
files, you can use File.renameTo(java.io.File)
to
move the file to new location without copying the data, if the
source and destination locations reside within the same logical
volume.
null
if the data is stored in
memory.protected void finalize()
finalize
in class java.lang.Object
protected java.io.File getTempFile()
File
representing a uniquely
named temporary file in the configured repository path. The lifetime of
the file is tied to the lifetime of the FileItem
instance;
the file will be deleted when the instance is garbage collected.
File
to be used for temporary storage.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
NOREF |
-2 |
public static final int |
REFNIL |
-1 |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final String |
ADSREQUEST_TYPE |
"adsRequest" |
public static final String |
CONFIGURATION_ERROR |
"configuration" |
public static final String |
ERRORTYPE_KEY |
"errorType" |
public static final String |
ISERROR_KEY |
"isError" |
public static final String |
ISVERIFIED_KEY |
"isVerified" |
public static final String |
LICENSE_REQUEST_TYPE |
"licensing" |
public static final String |
NAME_KEY |
"name" |
public static final String |
NETWORK_ERROR |
"network" |
public static final String |
PROVIDER_KEY |
"provider" |
public static final String |
RESPONSE_KEY |
"response" |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final String |
ACCESS_COARSE_LOCATION |
"android.permission.ACCESS_COARSE_LOCATION" |
public static final String |
ACCESS_FINE_LOCATION |
"android.permission.ACCESS_FINE_LOCATION" |
public static final String |
ADD_VOICEMAIL |
"com.android.voicemail.permission.ADD_VOICEMAIL" |
public static final String |
BODY_SENSORS |
"android.permission.BODY_SENSORS" |
public static final String |
CALL_PHONE |
"android.permission.CALL_PHONE" |
public static final String |
CAMERA |
"android.permission.CAMERA" |
public static final String |
GET_ACCOUNTS |
"android.permission.GET_ACCOUNTS" |
public static final String |
PROCESS_OUTGOING_CALLS |
"android.permission.PROCESS_OUTGOING_CALLS" |
public static final String |
READ_CALENDAR |
"android.permission.READ_CALENDAR" |
public static final String |
READ_CALL_LOG |
"android.permission.READ_CALL_LOG" |
public static final String |
READ_CELL_BROADCASTS |
"android.permission.READ_CELL_BROADCASTS" |
public static final String |
READ_CONTACTS |
"android.permission.READ_CONTACTS" |
public static final String |
READ_EXTERNAL_STORAGE |
"android.permission.READ_EXTERNAL_STORAGE" |
public static final String |
READ_PHONE_STATE |
"android.permission.READ_PHONE_STATE" |
public static final String |
READ_SMS |
"android.permission.READ_SMS" |
public static final String |
RECEIVE_MMS |
"android.permission.RECEIVE_MMS" |
public static final String |
RECEIVE_SMS |
"android.permission.RECEIVE_SMS" |
public static final String |
RECEIVE_WAP_PUSH |
"android.permission.RECEIVE_WAP_PUSH" |
public static final String |
RECORD_AUDIO |
"android.permission.RECORD_AUDIO" |
public static final String |
SEND_SMS |
"android.permission.SEND_SMS" |
public static final String |
USE_SIP |
"android.permission.USE_SIP" |
public static final String |
WRITE_CALENDAR |
"android.permission.WRITE_CALENDAR" |
public static final String |
WRITE_CALL_LOG |
"android.permission.WRITE_CALL_LOG" |
public static final String |
WRITE_CONTACTS |
"android.permission.WRITE_CONTACTS" |
public static final String |
WRITE_EXTERNAL_STORAGE |
"android.permission.WRITE_EXTERNAL_STORAGE" |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final String |
CALENDAR |
"android.permission-group.CALENDAR" |
public static final String |
CAMERA |
"android.permission-group.CAMERA" |
public static final String |
CONTACTS |
"android.permission-group.CONTACTS" |
public static final String |
LOCATION |
"android.permission-group.LOCATION" |
public static final String |
MICROPHONE |
"android.permission-group.MICROPHONE" |
public static final String |
PHONE |
"android.permission-group.PHONE" |
public static final String |
SENSORS |
"android.permission-group.SENSORS" |
public static final String |
SMS |
"android.permission-group.SMS" |
public static final String |
STORAGE |
"android.permission-group.STORAGE" |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final String |
JAVA_STACK_TRACE_HEADER_MESSAGE |
"\nJava Stack Trace:" |
| Modifier and Type | Constant Field | Value |
|---|---|---|
public static final int |
ENVIRONINDEX |
-10001 |
public static final int |
GLOBALSINDEX |
-10002 |
public static final int |
MULTRET |
-1 |
public static final int |
REGISTRYINDEX |
-10000 |
public static final String |
VERSION |
"0.9" |
public static final int |
YIELD |
1 |


--- layout: post title: "Type-safe DI composition" description: "DI Containers aren't type-safe. What are the alternatives?" date: 2022-01-10 6:41 UTC tags: [Dependency Injection, Article Series] --- {% include JB/setup %}
{{ page.description }}
In April 2020 I published an article called Unit bias against collections. My goal with the article was to point out a common cognitive bias. I just happened to use .NET's built-in DI Container as an example because I'd recently encountered a piece of documentation that exhibited the kind of bias I wanted to write about.
This lead to a discussion about the mental model of the DI Container:
"Yeah, I wasn't explicit and clarified in a second tweet. I didn't mean in the services example, but in general where it helps if the reader's mental model of the code has 1 item from the collection, because that's how it is in real life. SingleOrDefault would enforce this."
The point made by Bogdan Galiceanu highlights the incongruity between the container's API and the mental model required to work with it.
The API in case belongs to IServiceCollection, which is little more than a collection of ServiceDescriptor objects. Each ServiceDescriptor
describes a service, as the name implies.
Given an IServiceCollection
you can, for example, register an IReservationsRepository
instance:
var connStr = Configuration.GetConnectionString("Restaurant"); services.AddSingleton<IReservationsRepository>(sp => { var logger = sp.GetService<ILogger<LoggingReservationsRepository>>(); var postOffice = sp.GetService<IPostOffice>(); return new EmailingReservationsRepository( postOffice, new LoggingReservationsRepository( logger, new SqlReservationsRepository(connStr))); });
This adds a ServiceDescriptor
entry to the collection. (Code examples are from Code That Fits in Your Head.)
Later, you can remove and replace the service for test purposes:
internal sealed class SelfHostedApi : WebApplicationFactory<Startup> { protected override void ConfigureWebHost(IWebHostBuilder builder) { builder.ConfigureServices(services => { services.RemoveAll<IReservationsRepository>(); services.AddSingleton<IReservationsRepository>( new FakeDatabase()); }); } }
Here I use RemoveAll
, even though I 'know' there's only one service of that type. Bogdan Galiceanu's argument, if I understand it correctly, is that it'd be more honest to use SingleOrDefault
, since we 'know' that there's only one such service.
I don't bring this up to bash on either Bogdan Galiceanu or the IServiceCollection
API, but this exchange of ideas provided another example that DI Containers aren't as helpful as you'd think. While they do provide some services, they require significant mental overhead. You have to 'know' that this service has only one instance, while another service may have two implementations, and so on. As the size of both code base and team grows, keeping all such knowledge in your head becomes increasingly difficult.
The promise of object-orientation was always that you shouldn't have to remember implementation details.
Particularly with statically typed programming languages you should be able to surface such knowledge as static type information. What would a more honest, statically typed DI Container look like?
Over a series of articles I'll explore how a statically typed DI Container might look:
The first of these articles show a Haskell prototype, while the rest of the articles use C#. If you don't care about Haskell, you can skip the first article.
As the title of the last article implies, this exploration only concludes that type-safe DI Containers are isomorphic to Pure DI. I consider Pure DI the simplest of these approaches, suggesting that there's no point in type-safe DI Containers of the kinds shown here.
Some people like DI Containers. I don't, because they take away type-safety without providing much benefit to warrant the trade-off. A commonly suggested benefit of DI Containers is lifetime management, but you can trivially implement type-safe lifetime management with Pure DI. I don't find that argument compelling.
This article series examines if it's possible to create a 'better' DI Container by making it more type-safe, but I ultimately conclude that there's no point in doing so.


Real Talk
Your Weekly Summary:
Average mood: Good
Average hours of sleep per night: 15
Average productivity rating: 4
Days of Exercise: 6
This weeks motivational clip!
Events in your area:
5k Charity Run
Cookie for Kittens Bake Sale
Southwest Hacks
Rescue dog adoption day


Comparison of cyclic voltammograms of Mg 3Bi 2 composite electrode (red), Mg 3Sb 2 (blue) in 1.0 mol L −1 Mg(TFSA) 2 in acetonitrile and Mg deposition/dissolution in 0.5 mol L −1 Mg(TFSA) 2 in BuMeG3 (green). The sweep rates of the voltammetry are 0.1 mV s −1 for Mg 3Bi 2 and Mg 3Sb 2, and 1.0 mV s −1 for Mg deposition/dissolution.


Choose your own adventure:
The ABS-CH and the Secrets of the Nagoya Protocol
Start over
{{help ? "hide" : "show"}} help


Hardin:
Please bring me
Stabilized Ectoplasm
from
Dark Elf Magister Errickin in Hunters Village
.
Don't delay!


Holy Maclunkey, There Are A Lot Of Different Languages In Star Wars
by Germain LussierWe’re guessing the Star Wars Kids YouTube channel didn’t plan this but its latest video is coming out at just the right time.
This week, the biggest Star Wars news was a dead heat between the franchise’s first live-action TV show premiering and “Maclunkey.” “Maclunkey,” of course, is the oddball word added to the original Star Wars Han vs. Greedo scene on Disney+.
One result of the whole “Maclunkey” thing is it got fans talking about Star Wars languages. And wouldn’t you know it? Right on cue pops a video that counts every single different language you can hear in the Star Wars movies. It’s a lot.
Check out the clip below with a not-so-subtle thumbnail. We see you, Star Wars Kids YouTube. And a happy Maclunkey to you too.
So, spoiler alert, there are 68 different languages in the 10 total Star Wars movies (so far). That raises exactly one question... couldn’t have found one more?
Seriously though, everyone in a galaxy far, far away must be freaking geniuses, because it seems as if every single character is speaking their own language to one another and they all understand perfectly. That or they have a little protocol droid in them. At least now we know why C-3PO needed to speak so many different languages.


--- layout: page title: "" description: "你好，我是粥一." header-img: "img/about-bg.jpg" ---
交互，产品，前端，
做设计的工科生。
你好，我是粥一，准交互设计师。Red Hat UXD 交互设计实习生，实习期间参与 PatternFly 开源项目的UI 控件优化以及官网交互说明文档的完善。 我是华中科技大学生物医学工程专业 2013级本科生，一进大学就开始玩起硬件电路设计，机缘巧合让我开始做交互设计，现在我也是 Dian 团队D.551号队员。
UX Designing, Front Developing, Writing...
Hello, this is Ni Xiaoyu, you can call me Sherry. I'm an UX designer & engineer, now serve at Red Hat UX Team as intern. Majoring in Biomedical Engineering, class 2013 at Huazhong University of Science and Technology. A member of Dian Team, badminton lover as well.
You can find me on Jianshu->> Sherry's Jianshu, and Github->> mondayc