text
stringlengths 1
3.78M
| meta
dict |
|---|---|
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
#import <FBSDKCoreKit/FBSDKGraphRequestConnection.h>
#import "FBSDKMacros.h"
@class FBSDKAccessToken;
@class FBSDKGraphRequest;
/** NSNotificationCenter name indicating a result of a failed log flush attempt. The posted object will be an NSError instance. */
FBSDK_EXTERN NSString *const FBSDKAppEventsLoggingResultNotification;
/** optional plist key ("FacebookLoggingOverrideAppID") for setting `loggingOverrideAppID` */
FBSDK_EXTERN NSString *const FBSDKAppEventsOverrideAppIDBundleKey;
/**
NS_ENUM (NSUInteger, FBSDKAppEventsFlushBehavior)
Specifies when `FBSDKAppEvents` sends log events to the server.
*/
typedef NS_ENUM(NSUInteger, FBSDKAppEventsFlushBehavior)
{
/** Flush automatically: periodically (once a minute or every 100 logged events) and always at app reactivation. */
FBSDKAppEventsFlushBehaviorAuto = 0,
/** Only flush when the `flush` method is called. When an app is moved to background/terminated, the
events are persisted and re-established at activation, but they will only be written with an
explicit call to `flush`. */
FBSDKAppEventsFlushBehaviorExplicitOnly,
};
/**
@methodgroup Predefined event names for logging events common to many apps. Logging occurs through the `logEvent` family of methods on `FBSDKAppEvents`.
Common event parameters are provided in the `FBSDKAppEventsParameterNames*` constants.
*/
/** Log this event when the user has achieved a level in the app. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameAchievedLevel;
/** Log this event when the user has entered their payment info. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameAddedPaymentInfo;
/** Log this event when the user has added an item to their cart. The valueToSum passed to logEvent should be the item's price. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameAddedToCart;
/** Log this event when the user has added an item to their wishlist. The valueToSum passed to logEvent should be the item's price. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameAddedToWishlist;
/** Log this event when a user has completed registration with the app. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameCompletedRegistration;
/** Log this event when the user has completed a tutorial in the app. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameCompletedTutorial;
/** Log this event when the user has entered the checkout process. The valueToSum passed to logEvent should be the total price in the cart. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameInitiatedCheckout;
/** Log this event when the user has rated an item in the app. The valueToSum passed to logEvent should be the numeric rating. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameRated;
/** Log this event when a user has performed a search within the app. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameSearched;
/** Log this event when the user has spent app credits. The valueToSum passed to logEvent should be the number of credits spent. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameSpentCredits;
/** Log this event when the user has unlocked an achievement in the app. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameUnlockedAchievement;
/** Log this event when a user has viewed a form of content in the app. */
FBSDK_EXTERN NSString *const FBSDKAppEventNameViewedContent;
/**
@methodgroup Predefined event name parameters for common additional information to accompany events logged through the `logEvent` family
of methods on `FBSDKAppEvents`. Common event names are provided in the `FBAppEventName*` constants.
*/
/**
* Parameter key used to specify data for the one or more pieces of content being logged about.
* Data should be a JSON encoded string.
* Example:
* "[{\"id\": \"1234\", \"quantity\": 2, \"item_price\": 5.99}, {\"id\": \"5678\", \"quantity\": 1, \"item_price\": 9.99}]"
*/
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameContent;
/** Parameter key used to specify an ID for the specific piece of content being logged about. Could be an EAN, article identifier, etc., depending on the nature of the app. */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameContentID;
/** Parameter key used to specify a generic content type/family for the logged event, e.g. "music", "photo", "video". Options to use will vary based upon what the app is all about. */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameContentType;
/** Parameter key used to specify currency used with logged event. E.g. "USD", "EUR", "GBP". See ISO-4217 for specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>. */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameCurrency;
/** Parameter key used to specify a description appropriate to the event being logged. E.g., the name of the achievement unlocked in the `FBAppEventNameAchievementUnlocked` event. */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameDescription;
/** Parameter key used to specify the level achieved in a `FBAppEventNameAchieved` event. */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameLevel;
/** Parameter key used to specify the maximum rating available for the `FBAppEventNameRate` event. E.g., "5" or "10". */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameMaxRatingValue;
/** Parameter key used to specify how many items are being processed for an `FBAppEventNameInitiatedCheckout` or `FBAppEventNamePurchased` event. */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameNumItems;
/** Parameter key used to specify whether payment info is available for the `FBAppEventNameInitiatedCheckout` event. `FBSDKAppEventParameterValueYes` and `FBSDKAppEventParameterValueNo` are good canonical values to use for this parameter. */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNamePaymentInfoAvailable;
/** Parameter key used to specify method user has used to register for the app, e.g., "Facebook", "email", "Twitter", etc */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameRegistrationMethod;
/** Parameter key used to specify the string provided by the user for a search operation. */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameSearchString;
/** Parameter key used to specify whether the activity being logged about was successful or not. `FBSDKAppEventParameterValueYes` and `FBSDKAppEventParameterValueNo` are good canonical values to use for this parameter. */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterNameSuccess;
/*
@methodgroup Predefined values to assign to event parameters that accompany events logged through the `logEvent` family
of methods on `FBSDKAppEvents`. Common event parameters are provided in the `FBSDKAppEventParameterName*` constants.
*/
/** Yes-valued parameter value to be used with parameter keys that need a Yes/No value */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueYes;
/** No-valued parameter value to be used with parameter keys that need a Yes/No value */
FBSDK_EXTERN NSString *const FBSDKAppEventParameterValueNo;
/**
Client-side event logging for specialized application analytics available through Facebook App Insights
and for use with Facebook Ads conversion tracking and optimization.
The `FBSDKAppEvents` static class has a few related roles:
+ Logging predefined and application-defined events to Facebook App Insights with a
numeric value to sum across a large number of events, and an optional set of key/value
parameters that define "segments" for this event (e.g., 'purchaserStatus' : 'frequent', or
'gamerLevel' : 'intermediate')
+ Logging events to later be used for ads optimization around lifetime value.
+ Methods that control the way in which events are flushed out to the Facebook servers.
Here are some important characteristics of the logging mechanism provided by `FBSDKAppEvents`:
+ Events are not sent immediately when logged. They're cached and flushed out to the Facebook servers
in a number of situations:
- when an event count threshold is passed (currently 100 logged events).
- when a time threshold is passed (currently 15 seconds).
- when an app has gone to background and is then brought back to the foreground.
+ Events will be accumulated when the app is in a disconnected state, and sent when the connection is
restored and one of the above 'flush' conditions are met.
+ The `FBSDKAppEvents` class is thread-safe in that events may be logged from any of the app's threads.
+ The developer can set the `flushBehavior` on `FBSDKAppEvents` to force the flushing of events to only
occur on an explicit call to the `flush` method.
+ The developer can turn on console debug output for event logging and flushing to the server by using
the `FBSDKLoggingBehaviorAppEvents` value in `[FBSettings setLoggingBehavior:]`.
Some things to note when logging events:
+ There is a limit on the number of unique event names an app can use, on the order of 1000.
+ There is a limit to the number of unique parameter names in the provided parameters that can
be used per event, on the order of 25. This is not just for an individual call, but for all
invocations for that eventName.
+ Event names and parameter names (the keys in the NSDictionary) must be between 2 and 40 characters, and
must consist of alphanumeric characters, _, -, or spaces.
+ The length of each parameter value can be no more than on the order of 100 characters.
*/
@interface FBSDKAppEvents : NSObject
/*
* Basic event logging
*/
/**
Log an event with just an eventName.
- Parameter eventName: The name of the event to record. Limitations on number of events and name length
are given in the `FBSDKAppEvents` documentation.
*/
+ (void)logEvent:(NSString *)eventName;
/**
Log an event with an eventName and a numeric value to be aggregated with other events of this name.
- Parameter eventName: The name of the event to record. Limitations on number of events and name length
are given in the `FBSDKAppEvents` documentation. Common event names are provided in `FBAppEventName*` constants.
- Parameter valueToSum: Amount to be aggregated into all events of this eventName, and App Insights will report
the cumulative and average value of this amount.
*/
+ (void)logEvent:(NSString *)eventName
valueToSum:(double)valueToSum;
/**
Log an event with an eventName and a set of key/value pairs in the parameters dictionary.
Parameter limitations are described above.
- Parameter eventName: The name of the event to record. Limitations on number of events and name construction
are given in the `FBSDKAppEvents` documentation. Common event names are provided in `FBAppEventName*` constants.
- Parameter parameters: Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
be NSString's, and the values are expected to be NSString or NSNumber. Limitations on the number of
parameters and name construction are given in the `FBSDKAppEvents` documentation. Commonly used parameter names
are provided in `FBSDKAppEventParameterName*` constants.
*/
+ (void)logEvent:(NSString *)eventName
parameters:(NSDictionary *)parameters;
/**
Log an event with an eventName, a numeric value to be aggregated with other events of this name,
and a set of key/value pairs in the parameters dictionary.
- Parameter eventName: The name of the event to record. Limitations on number of events and name construction
are given in the `FBSDKAppEvents` documentation. Common event names are provided in `FBAppEventName*` constants.
- Parameter valueToSum: Amount to be aggregated into all events of this eventName, and App Insights will report
the cumulative and average value of this amount.
- Parameter parameters: Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
be NSString's, and the values are expected to be NSString or NSNumber. Limitations on the number of
parameters and name construction are given in the `FBSDKAppEvents` documentation. Commonly used parameter names
are provided in `FBSDKAppEventParameterName*` constants.
*/
+ (void)logEvent:(NSString *)eventName
valueToSum:(double)valueToSum
parameters:(NSDictionary *)parameters;
/**
Log an event with an eventName, a numeric value to be aggregated with other events of this name,
and a set of key/value pairs in the parameters dictionary. Providing session lets the developer
target a particular <FBSession>. If nil is provided, then `[FBSession activeSession]` will be used.
- Parameter eventName: The name of the event to record. Limitations on number of events and name construction
are given in the `FBSDKAppEvents` documentation. Common event names are provided in `FBAppEventName*` constants.
- Parameter valueToSum: Amount to be aggregated into all events of this eventName, and App Insights will report
the cumulative and average value of this amount. Note that this is an NSNumber, and a value of `nil` denotes
that this event doesn't have a value associated with it for summation.
- Parameter parameters: Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
be NSString's, and the values are expected to be NSString or NSNumber. Limitations on the number of
parameters and name construction are given in the `FBSDKAppEvents` documentation. Commonly used parameter names
are provided in `FBSDKAppEventParameterName*` constants.
- Parameter accessToken: The optional access token to log the event as.
*/
+ (void)logEvent:(NSString *)eventName
valueToSum:(NSNumber *)valueToSum
parameters:(NSDictionary *)parameters
accessToken:(FBSDKAccessToken *)accessToken;
/*
* Purchase logging
*/
/**
Log a purchase of the specified amount, in the specified currency.
- Parameter purchaseAmount: Purchase amount to be logged, as expressed in the specified currency. This value
will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346).
- Parameter currency: Currency, is denoted as, e.g. "USD", "EUR", "GBP". See ISO-4217 for
specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set
to `FBSDKAppEventsFlushBehaviorExplicitOnly`.
*/
+ (void)logPurchase:(double)purchaseAmount
currency:(NSString *)currency;
/**
Log a purchase of the specified amount, in the specified currency, also providing a set of
additional characteristics describing the purchase.
- Parameter purchaseAmount: Purchase amount to be logged, as expressed in the specified currency.This value
will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346).
- Parameter currency: Currency, is denoted as, e.g. "USD", "EUR", "GBP". See ISO-4217 for
specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
- Parameter parameters: Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
be NSString's, and the values are expected to be NSString or NSNumber. Limitations on the number of
parameters and name construction are given in the `FBSDKAppEvents` documentation. Commonly used parameter names
are provided in `FBSDKAppEventParameterName*` constants.
This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set
to `FBSDKAppEventsFlushBehaviorExplicitOnly`.
*/
+ (void)logPurchase:(double)purchaseAmount
currency:(NSString *)currency
parameters:(NSDictionary *)parameters;
/**
Log a purchase of the specified amount, in the specified currency, also providing a set of
additional characteristics describing the purchase, as well as an <FBSession> to log to.
- Parameter purchaseAmount: Purchase amount to be logged, as expressed in the specified currency.This value
will be rounded to the thousandths place (e.g., 12.34567 becomes 12.346).
- Parameter currency: Currency, is denoted as, e.g. "USD", "EUR", "GBP". See ISO-4217 for
specific values. One reference for these is <http://en.wikipedia.org/wiki/ISO_4217>.
- Parameter parameters: Arbitrary parameter dictionary of characteristics. The keys to this dictionary must
be NSString's, and the values are expected to be NSString or NSNumber. Limitations on the number of
parameters and name construction are given in the `FBSDKAppEvents` documentation. Commonly used parameter names
are provided in `FBSDKAppEventParameterName*` constants.
- Parameter accessToken: The optional access token to log the event as.
This event immediately triggers a flush of the `FBSDKAppEvents` event queue, unless the `flushBehavior` is set
to `FBSDKAppEventsFlushBehaviorExplicitOnly`.
*/
+ (void)logPurchase:(double)purchaseAmount
currency:(NSString *)currency
parameters:(NSDictionary *)parameters
accessToken:(FBSDKAccessToken *)accessToken;
/*
* Push Notifications Logging
*/
/**
Log an app event that tracks that the application was open via Push Notification.
- Parameter payload: Notification payload received via `UIApplicationDelegate`.
*/
+ (void)logPushNotificationOpen:(NSDictionary *)payload;
/**
Log an app event that tracks that a custom action was taken from a push notification.
- Parameter payload: Notification payload received via `UIApplicationDelegate`.
- Parameter action: Name of the action that was taken.
*/
+ (void)logPushNotificationOpen:(NSDictionary *)payload action:(NSString *)action;
/**
Notifies the events system that the app has launched and, when appropriate, logs an "activated app" event.
This function is called automatically from FBSDKApplicationDelegate applicationDidBecomeActive, unless
one overrides 'FacebookAutoLogAppEventsEnabled' key to false in the project info plist file.
In case 'FacebookAutoLogAppEventsEnabled' is set to false, then it should typically be placed in the
app delegates' `applicationDidBecomeActive:` method.
This method also takes care of logging the event indicating the first time this app has been launched, which, among other things, is used to
track user acquisition and app install ads conversions.
`activateApp` will not log an event on every app launch, since launches happen every time the app is backgrounded and then foregrounded.
"activated app" events will be logged when the app has not been active for more than 60 seconds. This method also causes a "deactivated app"
event to be logged when sessions are "completed", and these events are logged with the session length, with an indication of how much
time has elapsed between sessions, and with the number of background/foreground interruptions that session had. This data
is all visible in your app's App Events Insights.
*/
+ (void)activateApp;
/*
* Push Notifications Registration
*/
/**
Sets and sends device token to register the current application for push notifications.
Sets and sends a device token from `NSData` representation that you get from `UIApplicationDelegate.-application:didRegisterForRemoteNotificationsWithDeviceToken:`.
- Parameter deviceToken: Device token data.
*/
+ (void)setPushNotificationsDeviceToken:(NSData *)deviceToken;
/*
* Control over event batching/flushing
*/
/**
Get the current event flushing behavior specifying when events are sent back to Facebook servers.
*/
+ (FBSDKAppEventsFlushBehavior)flushBehavior;
/**
Set the current event flushing behavior specifying when events are sent back to Facebook servers.
- Parameter flushBehavior: The desired `FBSDKAppEventsFlushBehavior` to be used.
*/
+ (void)setFlushBehavior:(FBSDKAppEventsFlushBehavior)flushBehavior;
/**
Set the 'override' App ID for App Event logging.
In some cases, apps want to use one Facebook App ID for login and social presence and another
for App Event logging. (An example is if multiple apps from the same company share an app ID for login, but
want distinct logging.) By default, this value is `nil`, and defers to the `FBSDKAppEventsOverrideAppIDBundleKey`
plist value. If that's not set, it defaults to `[FBSDKSettings appID]`.
This should be set before any other calls are made to `FBSDKAppEvents`. Thus, you should set it in your application
delegate's `application:didFinishLaunchingWithOptions:` delegate.
- Parameter appID: The Facebook App ID to be used for App Event logging.
*/
+ (void)setLoggingOverrideAppID:(NSString *)appID;
/**
Get the 'override' App ID for App Event logging.
- See:setLoggingOverrideAppID:
*/
+ (NSString *)loggingOverrideAppID;
/**
Explicitly kick off flushing of events to Facebook. This is an asynchronous method, but it does initiate an immediate
kick off. Server failures will be reported through the NotificationCenter with notification ID `FBSDKAppEventsLoggingResultNotification`.
*/
+ (void)flush;
/**
Creates a request representing the Graph API call to retrieve a Custom Audience "third party ID" for the app's Facebook user.
Callers will send this ID back to their own servers, collect up a set to create a Facebook Custom Audience with,
and then use the resultant Custom Audience to target ads.
- Parameter accessToken: The access token to use to establish the user's identity for users logged into Facebook through this app.
If `nil`, then the `[FBSDKAccessToken currentAccessToken]` is used.
The JSON in the request's response will include an "custom_audience_third_party_id" key/value pair, with the value being the ID retrieved.
This ID is an encrypted encoding of the Facebook user's ID and the invoking Facebook app ID.
Multiple calls with the same user will return different IDs, thus these IDs cannot be used to correlate behavior
across devices or applications, and are only meaningful when sent back to Facebook for creating Custom Audiences.
The ID retrieved represents the Facebook user identified in the following way: if the specified access token is valid,
the ID will represent the user associated with that token; otherwise the ID will represent the user logged into the
native Facebook app on the device. If there is no native Facebook app, no one is logged into it, or the user has opted out
at the iOS level from ad tracking, then a `nil` ID will be returned.
This method returns `nil` if either the user has opted-out (via iOS) from Ad Tracking, the app itself has limited event usage
via the `[FBSDKSettings limitEventAndDataUsage]` flag, or a specific Facebook user cannot be identified.
*/
+ (FBSDKGraphRequest *)requestForCustomAudienceThirdPartyIDWithAccessToken:(FBSDKAccessToken *)accessToken;
/*
Sets a custom user ID to associate with all app events.
The userID is persisted until it is cleared by passing nil.
*/
+ (void)setUserID:(NSString *)userID;
/*
Returns the set custom user ID.
*/
+ (NSString *)userID;
/*
Sends a request to update the properties for the current user, set by `setUserID:`
You must call `FBSDKAppEvents setUserID:` before making this call.
- Parameter properties: the custom user properties
- Parameter handler: the optional completion handler
*/
+ (void)updateUserProperties:(NSDictionary *)properties handler:(FBSDKGraphRequestHandler)handler;
@end
|
{
"pile_set_name": "Github"
}
|
/*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#include <grpc/support/port_platform.h>
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
#include <string.h>
#include "src/core/lib/security/util/json_util.h"
#include "src/core/lib/surface/api_trace.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
//
// Auth Refresh Token.
//
int grpc_auth_refresh_token_is_valid(
const grpc_auth_refresh_token* refresh_token) {
return (refresh_token != nullptr) &&
strcmp(refresh_token->type, GRPC_AUTH_JSON_TYPE_INVALID);
}
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json(
const grpc_json* json) {
grpc_auth_refresh_token result;
const char* prop_value;
int success = 0;
memset(&result, 0, sizeof(grpc_auth_refresh_token));
result.type = GRPC_AUTH_JSON_TYPE_INVALID;
if (json == nullptr) {
gpr_log(GPR_ERROR, "Invalid json.");
goto end;
}
prop_value = grpc_json_get_string_property(json, "type");
if (prop_value == nullptr ||
strcmp(prop_value, GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER)) {
goto end;
}
result.type = GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER;
if (!grpc_copy_json_string_property(json, "client_secret",
&result.client_secret) ||
!grpc_copy_json_string_property(json, "client_id", &result.client_id) ||
!grpc_copy_json_string_property(json, "refresh_token",
&result.refresh_token)) {
goto end;
}
success = 1;
end:
if (!success) grpc_auth_refresh_token_destruct(&result);
return result;
}
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string(
const char* json_string) {
char* scratchpad = gpr_strdup(json_string);
grpc_json* json = grpc_json_parse_string(scratchpad);
grpc_auth_refresh_token result =
grpc_auth_refresh_token_create_from_json(json);
if (json != nullptr) grpc_json_destroy(json);
gpr_free(scratchpad);
return result;
}
void grpc_auth_refresh_token_destruct(grpc_auth_refresh_token* refresh_token) {
if (refresh_token == nullptr) return;
refresh_token->type = GRPC_AUTH_JSON_TYPE_INVALID;
if (refresh_token->client_id != nullptr) {
gpr_free(refresh_token->client_id);
refresh_token->client_id = nullptr;
}
if (refresh_token->client_secret != nullptr) {
gpr_free(refresh_token->client_secret);
refresh_token->client_secret = nullptr;
}
if (refresh_token->refresh_token != nullptr) {
gpr_free(refresh_token->refresh_token);
refresh_token->refresh_token = nullptr;
}
}
//
// Oauth2 Token Fetcher credentials.
//
static void oauth2_token_fetcher_destruct(grpc_call_credentials* creds) {
grpc_oauth2_token_fetcher_credentials* c =
reinterpret_cast<grpc_oauth2_token_fetcher_credentials*>(creds);
GRPC_MDELEM_UNREF(c->access_token_md);
gpr_mu_destroy(&c->mu);
grpc_pollset_set_destroy(grpc_polling_entity_pollset_set(&c->pollent));
grpc_httpcli_context_destroy(&c->httpcli_context);
}
grpc_credentials_status
grpc_oauth2_token_fetcher_credentials_parse_server_response(
const grpc_http_response* response, grpc_mdelem* token_md,
grpc_millis* token_lifetime) {
char* null_terminated_body = nullptr;
char* new_access_token = nullptr;
grpc_credentials_status status = GRPC_CREDENTIALS_OK;
grpc_json* json = nullptr;
if (response == nullptr) {
gpr_log(GPR_ERROR, "Received NULL response.");
status = GRPC_CREDENTIALS_ERROR;
goto end;
}
if (response->body_length > 0) {
null_terminated_body =
static_cast<char*>(gpr_malloc(response->body_length + 1));
null_terminated_body[response->body_length] = '\0';
memcpy(null_terminated_body, response->body, response->body_length);
}
if (response->status != 200) {
gpr_log(GPR_ERROR, "Call to http server ended with error %d [%s].",
response->status,
null_terminated_body != nullptr ? null_terminated_body : "");
status = GRPC_CREDENTIALS_ERROR;
goto end;
} else {
grpc_json* access_token = nullptr;
grpc_json* token_type = nullptr;
grpc_json* expires_in = nullptr;
grpc_json* ptr;
json = grpc_json_parse_string(null_terminated_body);
if (json == nullptr) {
gpr_log(GPR_ERROR, "Could not parse JSON from %s", null_terminated_body);
status = GRPC_CREDENTIALS_ERROR;
goto end;
}
if (json->type != GRPC_JSON_OBJECT) {
gpr_log(GPR_ERROR, "Response should be a JSON object");
status = GRPC_CREDENTIALS_ERROR;
goto end;
}
for (ptr = json->child; ptr; ptr = ptr->next) {
if (strcmp(ptr->key, "access_token") == 0) {
access_token = ptr;
} else if (strcmp(ptr->key, "token_type") == 0) {
token_type = ptr;
} else if (strcmp(ptr->key, "expires_in") == 0) {
expires_in = ptr;
}
}
if (access_token == nullptr || access_token->type != GRPC_JSON_STRING) {
gpr_log(GPR_ERROR, "Missing or invalid access_token in JSON.");
status = GRPC_CREDENTIALS_ERROR;
goto end;
}
if (token_type == nullptr || token_type->type != GRPC_JSON_STRING) {
gpr_log(GPR_ERROR, "Missing or invalid token_type in JSON.");
status = GRPC_CREDENTIALS_ERROR;
goto end;
}
if (expires_in == nullptr || expires_in->type != GRPC_JSON_NUMBER) {
gpr_log(GPR_ERROR, "Missing or invalid expires_in in JSON.");
status = GRPC_CREDENTIALS_ERROR;
goto end;
}
gpr_asprintf(&new_access_token, "%s %s", token_type->value,
access_token->value);
*token_lifetime = strtol(expires_in->value, nullptr, 10) * GPR_MS_PER_SEC;
if (!GRPC_MDISNULL(*token_md)) GRPC_MDELEM_UNREF(*token_md);
*token_md = grpc_mdelem_from_slices(
grpc_slice_from_static_string(GRPC_AUTHORIZATION_METADATA_KEY),
grpc_slice_from_copied_string(new_access_token));
status = GRPC_CREDENTIALS_OK;
}
end:
if (status != GRPC_CREDENTIALS_OK && !GRPC_MDISNULL(*token_md)) {
GRPC_MDELEM_UNREF(*token_md);
*token_md = GRPC_MDNULL;
}
if (null_terminated_body != nullptr) gpr_free(null_terminated_body);
if (new_access_token != nullptr) gpr_free(new_access_token);
if (json != nullptr) grpc_json_destroy(json);
return status;
}
static void on_oauth2_token_fetcher_http_response(void* user_data,
grpc_error* error) {
GRPC_LOG_IF_ERROR("oauth_fetch", GRPC_ERROR_REF(error));
grpc_credentials_metadata_request* r =
static_cast<grpc_credentials_metadata_request*>(user_data);
grpc_oauth2_token_fetcher_credentials* c =
reinterpret_cast<grpc_oauth2_token_fetcher_credentials*>(r->creds);
grpc_mdelem access_token_md = GRPC_MDNULL;
grpc_millis token_lifetime;
grpc_credentials_status status =
grpc_oauth2_token_fetcher_credentials_parse_server_response(
&r->response, &access_token_md, &token_lifetime);
// Update cache and grab list of pending requests.
gpr_mu_lock(&c->mu);
c->token_fetch_pending = false;
c->access_token_md = GRPC_MDELEM_REF(access_token_md);
c->token_expiration = status == GRPC_CREDENTIALS_OK
? grpc_core::ExecCtx::Get()->Now() + token_lifetime
: 0;
grpc_oauth2_pending_get_request_metadata* pending_request =
c->pending_requests;
c->pending_requests = nullptr;
gpr_mu_unlock(&c->mu);
// Invoke callbacks for all pending requests.
while (pending_request != nullptr) {
if (status == GRPC_CREDENTIALS_OK) {
grpc_credentials_mdelem_array_add(pending_request->md_array,
access_token_md);
} else {
error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
"Error occured when fetching oauth2 token.", &error, 1);
}
GRPC_CLOSURE_SCHED(pending_request->on_request_metadata, error);
grpc_polling_entity_del_from_pollset_set(
pending_request->pollent, grpc_polling_entity_pollset_set(&c->pollent));
grpc_oauth2_pending_get_request_metadata* prev = pending_request;
pending_request = pending_request->next;
gpr_free(prev);
}
GRPC_MDELEM_UNREF(access_token_md);
grpc_call_credentials_unref(r->creds);
grpc_credentials_metadata_request_destroy(r);
}
static bool oauth2_token_fetcher_get_request_metadata(
grpc_call_credentials* creds, grpc_polling_entity* pollent,
grpc_auth_metadata_context context, grpc_credentials_mdelem_array* md_array,
grpc_closure* on_request_metadata, grpc_error** error) {
grpc_oauth2_token_fetcher_credentials* c =
reinterpret_cast<grpc_oauth2_token_fetcher_credentials*>(creds);
// Check if we can use the cached token.
grpc_millis refresh_threshold =
GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS * GPR_MS_PER_SEC;
grpc_mdelem cached_access_token_md = GRPC_MDNULL;
gpr_mu_lock(&c->mu);
if (!GRPC_MDISNULL(c->access_token_md) &&
(c->token_expiration - grpc_core::ExecCtx::Get()->Now() >
refresh_threshold)) {
cached_access_token_md = GRPC_MDELEM_REF(c->access_token_md);
}
if (!GRPC_MDISNULL(cached_access_token_md)) {
gpr_mu_unlock(&c->mu);
grpc_credentials_mdelem_array_add(md_array, cached_access_token_md);
GRPC_MDELEM_UNREF(cached_access_token_md);
return true;
}
// Couldn't get the token from the cache.
// Add request to c->pending_requests and start a new fetch if needed.
grpc_oauth2_pending_get_request_metadata* pending_request =
static_cast<grpc_oauth2_pending_get_request_metadata*>(
gpr_malloc(sizeof(*pending_request)));
pending_request->md_array = md_array;
pending_request->on_request_metadata = on_request_metadata;
pending_request->pollent = pollent;
grpc_polling_entity_add_to_pollset_set(
pollent, grpc_polling_entity_pollset_set(&c->pollent));
pending_request->next = c->pending_requests;
c->pending_requests = pending_request;
bool start_fetch = false;
if (!c->token_fetch_pending) {
c->token_fetch_pending = true;
start_fetch = true;
}
gpr_mu_unlock(&c->mu);
if (start_fetch) {
grpc_call_credentials_ref(creds);
c->fetch_func(grpc_credentials_metadata_request_create(creds),
&c->httpcli_context, &c->pollent,
on_oauth2_token_fetcher_http_response,
grpc_core::ExecCtx::Get()->Now() + refresh_threshold);
}
return false;
}
static void oauth2_token_fetcher_cancel_get_request_metadata(
grpc_call_credentials* creds, grpc_credentials_mdelem_array* md_array,
grpc_error* error) {
grpc_oauth2_token_fetcher_credentials* c =
reinterpret_cast<grpc_oauth2_token_fetcher_credentials*>(creds);
gpr_mu_lock(&c->mu);
grpc_oauth2_pending_get_request_metadata* prev = nullptr;
grpc_oauth2_pending_get_request_metadata* pending_request =
c->pending_requests;
while (pending_request != nullptr) {
if (pending_request->md_array == md_array) {
// Remove matching pending request from the list.
if (prev != nullptr) {
prev->next = pending_request->next;
} else {
c->pending_requests = pending_request->next;
}
// Invoke the callback immediately with an error.
GRPC_CLOSURE_SCHED(pending_request->on_request_metadata,
GRPC_ERROR_REF(error));
gpr_free(pending_request);
break;
}
prev = pending_request;
pending_request = pending_request->next;
}
gpr_mu_unlock(&c->mu);
GRPC_ERROR_UNREF(error);
}
static void init_oauth2_token_fetcher(grpc_oauth2_token_fetcher_credentials* c,
grpc_fetch_oauth2_func fetch_func) {
memset(c, 0, sizeof(grpc_oauth2_token_fetcher_credentials));
c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2;
gpr_ref_init(&c->base.refcount, 1);
gpr_mu_init(&c->mu);
c->token_expiration = 0;
c->fetch_func = fetch_func;
c->pollent =
grpc_polling_entity_create_from_pollset_set(grpc_pollset_set_create());
grpc_httpcli_context_init(&c->httpcli_context);
}
//
// Google Compute Engine credentials.
//
static grpc_call_credentials_vtable compute_engine_vtable = {
oauth2_token_fetcher_destruct, oauth2_token_fetcher_get_request_metadata,
oauth2_token_fetcher_cancel_get_request_metadata};
static void compute_engine_fetch_oauth2(
grpc_credentials_metadata_request* metadata_req,
grpc_httpcli_context* httpcli_context, grpc_polling_entity* pollent,
grpc_iomgr_cb_func response_cb, grpc_millis deadline) {
grpc_http_header header = {(char*)"Metadata-Flavor", (char*)"Google"};
grpc_httpcli_request request;
memset(&request, 0, sizeof(grpc_httpcli_request));
request.host = (char*)GRPC_COMPUTE_ENGINE_METADATA_HOST;
request.http.path = (char*)GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH;
request.http.hdr_count = 1;
request.http.hdrs = &header;
/* TODO(ctiller): Carry the resource_quota in ctx and share it with the host
channel. This would allow us to cancel an authentication query when under
extreme memory pressure. */
grpc_resource_quota* resource_quota =
grpc_resource_quota_create("oauth2_credentials");
grpc_httpcli_get(
httpcli_context, pollent, resource_quota, &request, deadline,
GRPC_CLOSURE_CREATE(response_cb, metadata_req, grpc_schedule_on_exec_ctx),
&metadata_req->response);
grpc_resource_quota_unref_internal(resource_quota);
}
grpc_call_credentials* grpc_google_compute_engine_credentials_create(
void* reserved) {
grpc_oauth2_token_fetcher_credentials* c =
static_cast<grpc_oauth2_token_fetcher_credentials*>(
gpr_malloc(sizeof(grpc_oauth2_token_fetcher_credentials)));
GRPC_API_TRACE("grpc_compute_engine_credentials_create(reserved=%p)", 1,
(reserved));
GPR_ASSERT(reserved == nullptr);
init_oauth2_token_fetcher(c, compute_engine_fetch_oauth2);
c->base.vtable = &compute_engine_vtable;
return &c->base;
}
//
// Google Refresh Token credentials.
//
static void refresh_token_destruct(grpc_call_credentials* creds) {
grpc_google_refresh_token_credentials* c =
reinterpret_cast<grpc_google_refresh_token_credentials*>(creds);
grpc_auth_refresh_token_destruct(&c->refresh_token);
oauth2_token_fetcher_destruct(&c->base.base);
}
static grpc_call_credentials_vtable refresh_token_vtable = {
refresh_token_destruct, oauth2_token_fetcher_get_request_metadata,
oauth2_token_fetcher_cancel_get_request_metadata};
static void refresh_token_fetch_oauth2(
grpc_credentials_metadata_request* metadata_req,
grpc_httpcli_context* httpcli_context, grpc_polling_entity* pollent,
grpc_iomgr_cb_func response_cb, grpc_millis deadline) {
grpc_google_refresh_token_credentials* c =
reinterpret_cast<grpc_google_refresh_token_credentials*>(
metadata_req->creds);
grpc_http_header header = {(char*)"Content-Type",
(char*)"application/x-www-form-urlencoded"};
grpc_httpcli_request request;
char* body = nullptr;
gpr_asprintf(&body, GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING,
c->refresh_token.client_id, c->refresh_token.client_secret,
c->refresh_token.refresh_token);
memset(&request, 0, sizeof(grpc_httpcli_request));
request.host = (char*)GRPC_GOOGLE_OAUTH2_SERVICE_HOST;
request.http.path = (char*)GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH;
request.http.hdr_count = 1;
request.http.hdrs = &header;
request.handshaker = &grpc_httpcli_ssl;
/* TODO(ctiller): Carry the resource_quota in ctx and share it with the host
channel. This would allow us to cancel an authentication query when under
extreme memory pressure. */
grpc_resource_quota* resource_quota =
grpc_resource_quota_create("oauth2_credentials_refresh");
grpc_httpcli_post(
httpcli_context, pollent, resource_quota, &request, body, strlen(body),
deadline,
GRPC_CLOSURE_CREATE(response_cb, metadata_req, grpc_schedule_on_exec_ctx),
&metadata_req->response);
grpc_resource_quota_unref_internal(resource_quota);
gpr_free(body);
}
grpc_call_credentials*
grpc_refresh_token_credentials_create_from_auth_refresh_token(
grpc_auth_refresh_token refresh_token) {
grpc_google_refresh_token_credentials* c;
if (!grpc_auth_refresh_token_is_valid(&refresh_token)) {
gpr_log(GPR_ERROR, "Invalid input for refresh token credentials creation");
return nullptr;
}
c = static_cast<grpc_google_refresh_token_credentials*>(
gpr_zalloc(sizeof(grpc_google_refresh_token_credentials)));
init_oauth2_token_fetcher(&c->base, refresh_token_fetch_oauth2);
c->base.base.vtable = &refresh_token_vtable;
c->refresh_token = refresh_token;
return &c->base.base;
}
static char* create_loggable_refresh_token(grpc_auth_refresh_token* token) {
if (strcmp(token->type, GRPC_AUTH_JSON_TYPE_INVALID) == 0) {
return gpr_strdup("<Invalid json token>");
}
char* loggable_token = nullptr;
gpr_asprintf(&loggable_token,
"{\n type: %s\n client_id: %s\n client_secret: "
"<redacted>\n refresh_token: <redacted>\n}",
token->type, token->client_id);
return loggable_token;
}
grpc_call_credentials* grpc_google_refresh_token_credentials_create(
const char* json_refresh_token, void* reserved) {
grpc_auth_refresh_token token =
grpc_auth_refresh_token_create_from_string(json_refresh_token);
if (grpc_api_trace.enabled()) {
char* loggable_token = create_loggable_refresh_token(&token);
gpr_log(GPR_INFO,
"grpc_refresh_token_credentials_create(json_refresh_token=%s, "
"reserved=%p)",
loggable_token, reserved);
gpr_free(loggable_token);
}
GPR_ASSERT(reserved == nullptr);
return grpc_refresh_token_credentials_create_from_auth_refresh_token(token);
}
//
// Oauth2 Access Token credentials.
//
static void access_token_destruct(grpc_call_credentials* creds) {
grpc_access_token_credentials* c =
reinterpret_cast<grpc_access_token_credentials*>(creds);
GRPC_MDELEM_UNREF(c->access_token_md);
}
static bool access_token_get_request_metadata(
grpc_call_credentials* creds, grpc_polling_entity* pollent,
grpc_auth_metadata_context context, grpc_credentials_mdelem_array* md_array,
grpc_closure* on_request_metadata, grpc_error** error) {
grpc_access_token_credentials* c =
reinterpret_cast<grpc_access_token_credentials*>(creds);
grpc_credentials_mdelem_array_add(md_array, c->access_token_md);
return true;
}
static void access_token_cancel_get_request_metadata(
grpc_call_credentials* c, grpc_credentials_mdelem_array* md_array,
grpc_error* error) {
GRPC_ERROR_UNREF(error);
}
static grpc_call_credentials_vtable access_token_vtable = {
access_token_destruct, access_token_get_request_metadata,
access_token_cancel_get_request_metadata};
grpc_call_credentials* grpc_access_token_credentials_create(
const char* access_token, void* reserved) {
grpc_access_token_credentials* c =
static_cast<grpc_access_token_credentials*>(
gpr_zalloc(sizeof(grpc_access_token_credentials)));
GRPC_API_TRACE(
"grpc_access_token_credentials_create(access_token=<redacted>, "
"reserved=%p)",
1, (reserved));
GPR_ASSERT(reserved == nullptr);
c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2;
c->base.vtable = &access_token_vtable;
gpr_ref_init(&c->base.refcount, 1);
char* token_md_value;
gpr_asprintf(&token_md_value, "Bearer %s", access_token);
grpc_core::ExecCtx exec_ctx;
c->access_token_md = grpc_mdelem_from_slices(
grpc_slice_from_static_string(GRPC_AUTHORIZATION_METADATA_KEY),
grpc_slice_from_copied_string(token_md_value));
gpr_free(token_md_value);
return &c->base;
}
|
{
"pile_set_name": "Github"
}
|
Main menu
Sisquoc
On March 30, 1983, Sisquoc the California condor pipped his way out of his shell and into history as the first zoo hatchling of this critically endangered species.
1980s
present
With only 22 of his kind left on the planet, there was a lot riding on Sisquoc’s arrival—and survival. Researchers had spent months out in the field, and painstakingly collected four eggs to be brought into managed care and incubated—all in the hopes of saving the California condor from looming extinction. So when the tiny chick emerged from his shell—healthy—at the San Diego Zoo’s bird breeding center, hope for the species was renewed.
Soon, the hatchling, named Sisquoc in honor of the Sisquoc Condor Sanctuary, was peeping at a condor hand puppet. This surrogate parent had been created weeks in advance so the chick could be raised as naturally as possible and not imprint on humans. The next day, Sisquoc was placed in an incubator and driven from the Zoo to the Safari Park, where keepers would use the puppet to raise him.
But Sisqouc’s contribution to condor conservation was not finished. He has since fathered 17 chicks, including the most recent, Saticoy and Cuyamaca, who ended up pioneers in their own right. Saticoy was the first California condor chick to hatch while viewers watched on our Condor Cam; and Cuyamaca, the 2013 Condor Cam “star,” was named via a vote from her admiring audience. Both have been released into the wild, and are among more than 160 California condors flying free.
|
{
"pile_set_name": "Pile-CC"
}
|
Our Latest Podcasts
Kyle and Claire dive into the Netflix Original Series, Daredevil. Claire takes us on a tour of the comics and discusses the many friends, enemies, and lovers that have made Matt Murdock the man he is today. It isn’t easy being Daredevil’s friend—or his enemy. Kyle covers the planning and production of the show, including the negotiations that brought the television rights back to Marvel. He also gushes over some of the best fight choreography in the business. Our hosts conclude with their thoughts on a violent show made lovingly by comic book fans for comic book fans.
With the release of A Court of Mist and Fury by Sarah J. Maas, Kyle and Claire investigate the influences that led to the best selling first book in the series. It is almost literally a “tale as old as time”. Kyle relates the story of the 18th century book, Beauty and the Beast and the more popular adaptation that soon followed. Claire traces the arrival and impact of Young Adult Literature from the 1960s until today. They wrap up with their thoughts on A Court of Thorns and Roses, and the marvel of its 4000 year-old heritage.
In the wake of the film, X-Men: Apocalypse, Kyle and Claire get into the origins of the X-Men and the rivalry between Marvel and Fox Studios. Kyle breaks down the creation of the X-Men comics in the 1960s and 70s, and explains how the Civil Rights Movement influences their stories to this day. In addition to the juicy gossip of Marvel versus Fox, Claire examines the contributions of director Bryan Singer — “The Godfather of Superhero Movies”. They end the show with a discussion of the film itself, and how the talented Michael Fassbender can’t keep them from missing Ian McKellen.
With the release of its likely final installment, Claire and Kyle take a look at the Uncharted videogame series. It’s hard to see the main character, Drake, without thinking of Indiana Jones. Claire delves into the cartoon strips, B – movies, and adventure films that birthed one of America’s greatest fictional heroes. Along the way she traces the transformation of the archaeologist/treasure hunter over time–he didn’t always get the girl. Next, Kyle discusses the beginning of Naughty Dog Studios and the transition they made from 3D platform adventures with a bandicoot, to cinematic action/adventure games. They finish with their fond memories of Naughty Dog games, what the studio has achieved with Uncharted, and a few thoughts on how homage to classic films can go too far.
Podcasting deliciously is unsettling, frightening, and definitely worth it. Kyle and Claire discuss director Robert Eggers’ debut film, The Witch. Claire begins with the origins of sorcery in the Mediterranean. From there she covers the evolving relationship between Witchcraft and Christianity (surprise: it used to be good), and places the Puritan view in context. Kyle delves into the production, and how hard Robert Eggers worked to portray a detailed picture of Puritan fear. Our hosts finish with a few thoughts on the film’s performance’s, language, and creativity within limitations.
Kyle and Claire discuss the background and making of Captain America: Civil War. Kyle kicks it off with the comics behind the film, the theme of government as the enemy in comics, and who really stays dead in the Marvel Universe. Claire follows up with how Marvel Studios found the Russo Brothers, their approach to directing, and their goal for the larger franchise. Our hosts conclude with their thoughts and feelings on the film itself.
|
{
"pile_set_name": "Pile-CC"
}
|
-- Created on: 2000-05-10
-- Created by: Andrey BETENEV
-- Copyright (c) 2000-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
-- Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
class RWRepItemGroup from RWStepAP214
---Purpose: Read & Write tool for RepItemGroup
uses
Check from Interface,
StepWriter from StepData,
StepReaderData from StepData,
EntityIterator from Interface,
RepItemGroup from StepAP214
is
Create returns RWRepItemGroup from RWStepAP214;
---Purpose: Empty constructor
ReadStep (me; data: StepReaderData from StepData; num: Integer;
ach : in out Check from Interface;
ent : RepItemGroup from StepAP214);
---Purpose: Reads RepItemGroup
WriteStep (me; SW: in out StepWriter from StepData;
ent: RepItemGroup from StepAP214);
---Purpose: Writes RepItemGroup
Share (me; ent : RepItemGroup from StepAP214;
iter: in out EntityIterator from Interface);
---Purpose: Fills data for graph (shared items)
end RWRepItemGroup;
|
{
"pile_set_name": "Github"
}
|
Rocket Accord on About-face will play host to a new arena
As declared above, it seems that with this newest amend Psyonix are absorbed in absorption on giving players added affairs afore they can be banned from amateur completely. Maybe this will animate players to play nice, admitting because the actuality you can spam ìwhat a saveî consistently to broadcast your opponents if they absence their saveÖ There still may be some allowance for improvement.
Developer Psyonix has arise some of the acceptable advancing to Keys Rocket LeagueAccord this summer, and there are affluence of new account accepting patched in for chargeless in the weeks to come. This month, Rocket Accord on About-face will play host to a new arena, added music abode of ëRocket Accord x Monstercat Vol. 3í and affluence of rewards no we're on the added ancillary of Advancing Division Seven.
May aswell sees the alpha of Advancing Division Eight, so if you're one of those wizards that arrangement acrobatic goals like some automated Messi, afresh you'll be admiring as bite to bound aback into the ranked accord of Rocket League.There's affluence added advancing to the bold over the blow of the summer months, so be abiding to analysis aback with Nintendo Life for all your RL news. Are you still amphitheatre Crates Rocket League? What do you accomplish of all the new acceptable advancing to the game? Allotment your thoughts below...
|
{
"pile_set_name": "Pile-CC"
}
|
Q:
How to prevent wasting time with some users
How can we avoid wasting time with users that don't deserve our attention, specially new users? Do I need to always open the user profile to check if he is a bad/good user?
Example:
Question:
AdMob Ads on Android Canvas GamePanel
User:
https://stackoverflow.com/users/2399229/user2399229
I spent some time answering that question, but then the user insulted me (comment already removed). After that I opened the user profile and saw all those negative questions on his profile... =(
EDIT:
After all these negative points from my question, now I'm becoming a bad meta user, lol!
But I really liked the two answers so far! What really upset me was the insult itself...
A:
New users, even bad ones, deserve our attention.
If they haven't found the FAQ, we can point them to it.
If they ask bad questions, we can help them understand how to ask better ones.
If they post offensive things, we can flag and/or edit the problem.
Everyone was a newbie once, and mistakes are to be expected. Part of our job is to help those bad users become good users.
If the user does not learn or is being intentionally disruptive, an automatic ban will eventually be enforced.
A:
George's answer is an excellent point and a good answer. I'm going to approach this from a different angle, as well.
You should generally judge whether to help with a question or not based on the question, not the user. If it's a good question, give it a good answer. If not, don't. Try to help if you like, or just leave it alone if not. Don't be afraid to vote (down, close) or flag (if appropriate), if you wish.
Note that sometimes, 'bad' users will spontaneously become 'good' ones. People are capable of learning - sometimes at an alarming rate. If someone's post is a good one, answer it; even if their previous contributions have been 'bad', you'll be reinforcing their new, good behavior.
|
{
"pile_set_name": "StackExchange"
}
|
In recent years, research and development have been extensively conducted on light-emitting elements using electroluminescence (EL). In a basic structure of such a light-emitting element, a layer containing a light-emitting substance (an EL layer) is interposed between a pair of electrodes. By applying a voltage between the pair of electrodes of this element, light emission from the light-emitting substance can be obtained.
Since the above light-emitting element is of a self-luminous type, a display device using this light-emitting element has advantages such as high visibility, no necessity of a backlight, low power consumption, and the like. Furthermore, the display device also has advantages that it can be formed to be thin and lightweight, and has high response speed.
In a light-emitting element (e.g., an organic EL element) whose EL layer contains an organic compound as a light-emitting substance and is provided between a pair of electrodes, application of a voltage between the pair of electrodes causes injection of electrons from a cathode and holes from an anode into the EL layer having a light-emitting property and thus a current flows. By recombination of the injected electrons and holes, the organic compound having a light-emitting property is brought into an excited state to provide light emission.
Note that an excited state formed by an organic compound can be a singlet excited state (S*) or a triplet excited state (T*). Light emission from the singlet excited state is referred to as fluorescence, and light emission from the triplet excited state is referred to as phosphorescence. The formation ratio of S* to T* in the light-emitting element is 1:3. Thus, a light-emitting element containing a compound emitting phosphorescence (phosphorescent compound) has higher light emission efficiency than a light-emitting element containing a compound emitting fluorescence (fluorescent compound). Therefore, light-emitting elements containing phosphorescent compounds capable of converting energy of a triplet excited state into light emission has been actively developed in recent years (e.g., see Patent Document 1).
Energy for exciting an organic compound depends on an energy difference between the LUMO level and the HOMO level of the organic compound. The energy difference approximately corresponds to singlet excitation energy. In a light-emitting element including a phosphorescent compound, triplet excitation energy is converted into light emission energy. Accordingly, when the organic compound has a large difference between the singlet excitation energy and the triplet excitation energy, the energy for exciting the organic compound is higher than the light emission energy by the energy difference. The difference between the energy for exciting the organic compound and the light emission energy affects element characteristics of a light-emitting element: the driving voltage of the light-emitting element increases. For this reason, a method for reducing driving voltage has been searched (see Patent Document 2).
Among light-emitting elements including phosphorescent compounds, a light-emitting element that emits blue light has not been put into practical use yet because it is difficult to develop a stable compound having a high triplet excitation energy level. Accordingly, development of a highly reliable light-emitting element that is formed using a phosphorescent compound and has high emission efficiency is required.
|
{
"pile_set_name": "USPTO Backgrounds"
}
|
The invention is directed to a book which incorporates a puzzle therein.
U.S. Pat. No. 5,213,507 to Ozrovitz discloses a child's story and picture book having a front cover, a back cover, and a plurality of pages pivotally disposed between the front and back covers. At least one of the pages includes text on one or more sides and a puzzle on the other side. The puzzle has a plurality of interlocking puzzle pieces.
The Ozrovitz puzzle pieces may be provided with a transparent material, such as plastic, disposed over and attached to an overlay material. The transparent material on the puzzle pieces allows an erasable material, such as paraffin wax, to be used by a child to color the puzzle pieces. Ozrovitz indicates that the erasable material should preferably cover only the puzzle pieces.
|
{
"pile_set_name": "USPTO Backgrounds"
}
|
Conventionally, in an electrophotographic image forming apparatus, for example, the surface of a photosensitive drum as an image carrier is uniformly and evenly charged by a charging roller as a charging member. The charged surface of the photosensitive drum is exposed to light to form an electrostatic latent image. The formed electrostatic latent image is developed by having a toner adhere as a developer to form a toner image as a developer image. The formed toner image is transferred to a recording medium such as a print sheet and afterwards is fused by applying pressure and heat. The toner remaining on the photosensitive drum without being transferred to the recording medium is removed by a cleaning member.
In recent years, reducing the particle size and lowering the melting point of toners having external additives have been planned, aiming at improving the image quality and speed. As to such toners, because the amount of the external additives increases, cleaning is difficult. Therefore, the external additives adhere onto the charging roller, which generates longitudinal white streaks, and dirt in worse cases due to a charging failure. Then, proposed in Patent Document 1 is a method to remove the external additives by applying to the charging roller a charging voltage of the opposite polarity to that at the image forming time (or in the image forming mode).
|
{
"pile_set_name": "USPTO Backgrounds"
}
|
Ceres & Calypso in the Deep Time
Ceres & Calypso in the Deep Time is the third studio album by American dream pop band Candy Claws. It was released in 2013 through Two Syllable Records. It is a concept album with a narrative about seal-like beast and her human partner questing through the Mesozoic Era," which was adapted from the fictional document "Blood Ark". The album's title also alludes to Roman goddess Ceres and Greek goddess Calypso."
Critical reception
Pitchfork critic Ian Cohen considered Ceres & Calypso as "certainly one of 2013’s more unique records" and "immersive listening experience, but also a claustrophobic one." Cohen also further wrote: "It all leads to Ceres & Calypso feeling like concrete evidence of their [Candy Claws's] hippie cred, chock full of fantastic ideas and lacking just enough follow through." Philip Cosores of Diffuser.fm called the record "forward-thinking, intellectual, challenging, post-Animal Collective music doesn’t belong to these times" and stated that the band's "genre-hopping, while remaining true to their earthy psychedelic aesthetic, is enjoyable for any listener with the patience to take an indirect trip."
In a more mixed review, Consequence of Sound's Adam Kivel wrote that the album "would seem perfectly suited for a brain-melting, painstakingly detailed animated film, both in story and in its evocative soundtracking potential." Kivel also concluded: "Though often too big to fully comprehend, Ceres & Calypso is the kind of album you wish you could get lost in, perhaps by opening up a wardrobe and climbing right in."
The album gained attention from online music communities, including Album of the Year, where it is ranked 9th on the user-determined list of the best albums of 2013, and Rate Your Music, where it is ranked the 14th best album of 2013.
Track listing
"Into the Deep Time (One Sun)" — 3:02
"White Seal (Shell & Spine)" — 3:44
"Fell in Love (At the Water)" — 4:01
"Pangaea Girls (Magic Feeling)" — 3:12
"New Forest (Five Heads of the Sun)" — 3:24
"Transitional Bird (Clever Girl)" — 4:26
"Charade (Fern Prairie)" — 3:20
"Fallen Tree Bridge (Brave Rainbow Rider)" — 3:30
"Birth of the Flower (Seagreen)" — 3:47
"Illusion (Fern Lake)" — 3:35
"Night Ela (Mystic Thing)" — 5:04
"Where I Found You (One Star)" — 3:07
Personnel
Album personnel as adapted from Bandcamp:
Candy Claws
Kay Bertholf — performance
Karen McCormick — performance
Ryan Hover — performance, production
Other personnel
Jenn Morea — lyrics
Bryan Senti — orchestration
References
External links
Category:2013 albums
Category:Candy Claws albums
Category:Dream pop albums by American artists
Category:Concept albums
Category:Shoegazing albums by American artists
Category:Noise pop albums
|
{
"pile_set_name": "Wikipedia (en)"
}
|
The issue of gay marriage has, of course, prompted vociferous debate about what this most fundamental of institutions is, and what it isn’t. But to a greater or lesser degree, marriage in some aspects has been quietly, even unconsciously, renegotiated by many of us in the West. A modern marriage, with its notion of equality of the sexes, and of being all things to each other, is a different beast from the marriages of our grandparents or great-grandparents. Did their clear gender hierarchy (antipathetic as it may be to 21st-century minds), plus the reciprocal practical requirements of men and, above all, women, make our forebears more clear-sighted about married life? Are we asking too much of it? Do we need to rethink?
|
{
"pile_set_name": "OpenWebText2"
}
|
Looking to keep track of all the various projects in development? Click here to visit our signature "Devwatch" section. There visitors can view our listings by network, genre, studio and even development stage (ordered to pilot, cast-contingent, script, etc.). It's updated every day!
THE STRAIN (FX/FX Productions; W: Chuck Hogan & Guillermo del Toro; D: Guillermo del Toro) - Jonathan Hyde and Richard Sammel have both boarded the drama pilot, about Ephraim Goodweather (Corey Stoll), the head of the Center for Disease Control Canary Team in New York City who's tasked with investigating a mysterious viral outbreak likened to vampirism. Hyde will play Eldritch Palmer, "an elderly tycoon who's the third-richest man in the world who has been an invalid since childhood. Though his life-long fight against his frail body, he's developed a relentless drive to attain immortality by any means necessary." Sammel then is set as Thomas Eichorst, "a mysterious figure from Professor Abraham Setrakian's (yet to be cast) past whose re-emergence in New York is not a coincidence." Mia Maestro and Kevin Durand also star. (Deadline.com)AND IN OTHER NEWS... - "Grimm" co-creators David Greenwalt and Jim Kouf have signed a new overall deal with Universal Television (Deadline.com); Gretchen Berg and Aaron Harberts have likewise inked a new two-year overall deal with ABC Studios where they'll be upped to executive producers on "Revenge"(Deadline.com); line producer Loucas George and production supervisor Don Bensko won't return for the second season of "Nashville"(Deadline.com); Carol Barbee has been tapped as a consulting producer for the expected fourth season of "Falling Skies"(Deadline.com); "Trophy Wife" and "Hello Ladies" executive producers Lee Eisenberg and Gene Stupnitsky have signed a new two-year overall deal with ABC Studios (Deadline.com); and Rumer Willis will guest on "Pretty Little Liars" as "the type of girl who will change the world and keep her sense of humor at the same time" (THR.com).
|
{
"pile_set_name": "Pile-CC"
}
|
Masha, a heartbroken dog, has been looking for her late master every day since he died in a Siberian hospital last year.
When he was living on a ward in the Novosibirsk District Hospital, Masha was his only visitor. Now that he’s gone, his loyal dog refuses to leave.
Staff at the hospital hope somebody will give her a new home.
“She’s waiting for him, she’s not going anywhere,” said nurse Anna Vorontsova.
“Some girls tried taking her into their home, and she runs away. She doesn’t want to live anywhere. Look, just last Friday a local took her in, and she came running back here at three o’clock the next morning.”
Masha has become well-known and much loved by workers at the hospital, where she’s guaranteed food to eat and a warm place to sleep.
|
{
"pile_set_name": "OpenWebText2"
}
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <libgen.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <ext2fs/ext2fs.h>
#include <et/com_err.h>
#include <sparse/sparse.h>
struct {
int crc;
int sparse;
int gzip;
char *in_file;
char *out_file;
bool overwrite_input;
} params = {
.crc = 0,
.sparse = 1,
.gzip = 0,
};
#define ext2fs_fatal(Retval, Format, ...) \
do { \
com_err("error", Retval, Format, __VA_ARGS__); \
exit(EXIT_FAILURE); \
} while(0)
#define sparse_fatal(Format) \
do { \
fprintf(stderr, "sparse: "Format); \
exit(EXIT_FAILURE); \
} while(0)
static void usage(char *path)
{
char *progname = basename(path);
fprintf(stderr, "%s [ options ] <image or block device> <output image>\n"
" -c include CRC block\n"
" -z gzip output\n"
" -S don't use sparse output format\n", progname);
}
static struct buf_item {
struct buf_item *next;
void *buf[0];
} *buf_list;
static void add_chunk(ext2_filsys fs, struct sparse_file *s, blk_t chunk_start, blk_t chunk_end)
{
int retval;
unsigned int nb_blk = chunk_end - chunk_start;
size_t len = nb_blk * fs->blocksize;
int64_t offset = (int64_t)chunk_start * (int64_t)fs->blocksize;
if (params.overwrite_input == false) {
if (sparse_file_add_file(s, params.in_file, offset, len, chunk_start) < 0)
sparse_fatal("adding data to the sparse file");
} else {
/*
* The input file will be overwritten, make a copy of
* the blocks
*/
struct buf_item *bi = calloc(1, sizeof(struct buf_item) + len);
if (buf_list == NULL)
buf_list = bi;
else {
bi->next = buf_list;
buf_list = bi;
}
retval = io_channel_read_blk64(fs->io, chunk_start, nb_blk, bi->buf);
if (retval < 0)
ext2fs_fatal(retval, "reading block %u - %u", chunk_start, chunk_end);
if (sparse_file_add_data(s, bi->buf, len, chunk_start) < 0)
sparse_fatal("adding data to the sparse file");
}
}
static void free_chunks(void)
{
struct buf_item *bi;
while (buf_list) {
bi = buf_list->next;
free(buf_list);
buf_list = bi;
}
}
static struct sparse_file *ext_to_sparse(const char *in_file)
{
errcode_t retval;
ext2_filsys fs;
struct sparse_file *s;
int64_t chunk_start = -1;
blk_t first_blk, last_blk, nb_blk, cur_blk;
retval = ext2fs_open(in_file, 0, 0, 0, unix_io_manager, &fs);
if (retval)
ext2fs_fatal(retval, "while reading %s", in_file);
retval = ext2fs_read_block_bitmap(fs);
if (retval)
ext2fs_fatal(retval, "while reading block bitmap of %s", in_file);
first_blk = ext2fs_get_block_bitmap_start2(fs->block_map);
last_blk = ext2fs_get_block_bitmap_end2(fs->block_map);
nb_blk = last_blk - first_blk + 1;
s = sparse_file_new(fs->blocksize, (uint64_t)fs->blocksize * (uint64_t)nb_blk);
if (!s)
sparse_fatal("creating sparse file");
/*
* The sparse format encodes the size of a chunk (and its header) in a
* 32-bit unsigned integer (UINT32_MAX)
* When writing the chunk, the library uses a single call to write().
* Linux's implementation of the 'write' syscall does not allow transfers
* larger than INT32_MAX (32-bit _and_ 64-bit systems).
* Make sure we do not create chunks larger than this limit.
*/
int64_t max_blk_per_chunk = (INT32_MAX - 12) / fs->blocksize;
/* Iter on the blocks to merge contiguous chunk */
for (cur_blk = first_blk; cur_blk <= last_blk; ++cur_blk) {
if (ext2fs_test_block_bitmap2(fs->block_map, cur_blk)) {
if (chunk_start == -1) {
chunk_start = cur_blk;
} else if (cur_blk - chunk_start + 1 == max_blk_per_chunk) {
add_chunk(fs, s, chunk_start, cur_blk);
chunk_start = -1;
}
} else if (chunk_start != -1) {
add_chunk(fs, s, chunk_start, cur_blk);
chunk_start = -1;
}
}
if (chunk_start != -1)
add_chunk(fs, s, chunk_start, cur_blk - 1);
ext2fs_free(fs);
return s;
}
static bool same_file(const char *in, const char *out)
{
struct stat st1, st2;
if (access(out, F_OK) == -1)
return false;
if (lstat(in, &st1) == -1)
ext2fs_fatal(errno, "stat %s\n", in);
if (lstat(out, &st2) == -1)
ext2fs_fatal(errno, "stat %s\n", out);
return st1.st_ino == st2.st_ino;
}
int main(int argc, char *argv[])
{
int opt;
int out_fd;
struct sparse_file *s;
while ((opt = getopt(argc, argv, "czS")) != -1) {
switch(opt) {
case 'c':
params.crc = 1;
break;
case 'z':
params.gzip = 1;
break;
case 'S':
params.sparse = 0;
break;
default:
usage(argv[0]);
exit(EXIT_FAILURE);
}
}
if (optind + 1 >= argc) {
usage(argv[0]);
exit(EXIT_FAILURE);
}
params.in_file = strdup(argv[optind++]);
params.out_file = strdup(argv[optind]);
params.overwrite_input = same_file(params.in_file, params.out_file);
s = ext_to_sparse(params.in_file);
out_fd = open(params.out_file, O_WRONLY | O_CREAT | O_TRUNC, 0664);
if (out_fd == -1)
ext2fs_fatal(errno, "opening %s\n", params.out_file);
if (sparse_file_write(s, out_fd, params.gzip, params.sparse, params.crc) < 0)
sparse_fatal("writing sparse file");
sparse_file_destroy(s);
free(params.in_file);
free(params.out_file);
free_chunks();
close(out_fd);
return 0;
}
|
{
"pile_set_name": "Github"
}
|
Palestinian medics say two teenage boys have been killed by an Israeli airstrike in the southern Gaza Strip.
Israeli officials Tuesday confirmed the raid, saying it was targeted at a group of militants who had fired mortar shells at Israeli troops.
Israel has tightened security and closed border crossings in Gaza since the militant group Hamas took control of the impoverished territory last year. It has further heightened the blockade in the past month following a series of rocket attacks.
Palestinian Prime Minister Salam Fayyad warned Tuesday that he would not be able to pay December salaries for more than 70,000 Gaza employees until Israel renews cash transfers.
In the West Bank today, Israeli security forces say several Palestinians and Israelis were injured during clashes over a disputed house in the West Bank town of Hebron.
Officials say the violence started Monday night following rumors that security forces were set to remove Jewish settlers defying a Supreme Court order to leave the house they are occupying.
Hundreds of activists gathered to keep security forces from evacuating the house. Clashes then broke out between the protesters and Palestinian residents, with both sides accusing the other of throwing stones.
In several other West Bank locations Tuesday, settlers slashed tires and vandalized a mosque with anti-Islamic graffiti in an apparent response to the Hebron incident.
Israeli Foreign Minister Tzipi Livni, in Brussels to boost EU ties, heard criticism from EU lawmakers about the recent problems in Gaza and the West Bank. Livni told them the international community should continue to support a U.S.-backed peace deal.
She also warned that intervention by outside parties could lead to failure.
Both Israel and the Palestinians acknowledge that a peace initiative launched last year in the U.S. city of Annapolis will not be concluded by the end of the year.
|
{
"pile_set_name": "Pile-CC"
}
|
(Title Image: nurseryworld.co.uk)
At a Glance Guide
Childcare Finance Bill at introduction (summary)
Stage 1 report (summary)
The Bill:
Provides the legal necessities to introduce the Welsh Government’s free childcare scheme, which will provide 30 hours a week of free childcare (for eligible 3-and-4-year olds) for 48 weeks a year.
Sets the eligibility criteria. In practice, this means the 3-and-4-year-olds of (a) working parent(s) earning at least 16 hours a week at minimum wage or living wage. No parent can earn more than £100,000 a year.
Sets out the sanctions and appeal mechanisms – parents can be fined up to £3,000 for providing false information and can appeal to a tribunal to challenge any decisions.
Major Changes at Stage 2
Stage 2 proceedings were undertaken by the Education & Young People Committee and the member in charge – Minister for Children & Social Care, Huw Irranca-Davies (Lab, Ogmore).
Most of the amendments were changes to the wording and provided a bit more clarity on the eligibility criteria for children. The wording has also changed so the free childcare offer can be extended to children under the age of 3 in the future.
There has been some controversy over the eligibility criteria, with the Children & Young People Committee recommending the scheme be extended to cover all 3-and-4-year olds . Amendments to that effect were rejected at Stage 2, but re-appear below.
The Key Amendments at Stage 3
Amendment 2– Minister for Children & Social Services, Huw Irranca-Davies
The Welsh Government will have to report on the effect of the Act five years after it becomes law.
Vote: Approved – 32 for, 11 against
Amendment 8– Sian Gwenllian AM (Plaid, Arfon)
Expands the childcare scheme to include all children, not just those of working parents.
Vote: Rejected -18 for, 25 against
Reason for Rejection: There are a number of different Welsh Government programmes aimed at helping non-working parents or those in training/education, such as Flying Start and extra funding for student parents.
Amendment 11– Janet Finch-Saunders AM (Con, Aberconwy)
Expands the eligibility criteria to include children of parents who are undertaking at least 16 hours a week of education or training.
Vote: Rejected – 18 for, 25 against
Reason for Rejection: Same as Amendment 8.
Amendment 13 – Janet Finch-Saunders AM
No charge may be levied by childcare providers for children who would otherwise be eligible for free school meals if they were of school age.
Vote: Rejected – 18 for, 25 against
Reason for Rejection: There are already measures in place to stop “unreasonable charges”.
Amendment 31– Janet Finch-Saunders AM
Places a duty on the Welsh Government to properly promote awareness of the scheme.
Vote: Rejected – 18 for, 25 against
Reason for Rejection: The Minister made a commitment to launch a national awareness campaign.
Amendment 35– Janet Finch-Saunders AM
Inserts a “sunset clause” where the Act is automatically repealed in September 2023 unless the Senedd approves for it to continue (via regulations).
Vote: Rejected – 18 for, 25 against
Reason for Rejection: It would send the wrong message to parents and care providers about the Welsh Government’s commitment to the scheme.
A vote on the final version of the Bill has been scheduled for next week.
|
{
"pile_set_name": "OpenWebText2"
}
|
<!DOCTYPE HTML>
<!-- these should make the input non-native -->
<input type="text" value="Text Input" style="border-width: 0">
<input type="text" value="Text Input" style="border-width: 1px">
<input type="text" value="Text Input" style="border-width: 2px">
<input type="text" value="Text Input" style="border-width: 3px">
<input type="text" value="Text Input" style="border-width: 4px">
<input type="text" value="Text Input" style="border-width: 5px">
<input type="text" value="Text Input" style="border-width: 6px">
<input type="text" value="Text Input" style="border-style: dotted">
<input type="text" value="Text Input" style="border-color: green">
<input type="text" value="Text Input" style="background-color: transparent">
<input type="text" value="Text Input" style="background-color: white">
<input type="text" value="Text Input" style="border-top-left-radius: 0px">
<input type="text" value="Text Input" style="border-top-right-radius: 1px">
<input type="text" value="Text Input" style="border-bottom-right-radius: 2px">
<input type="text" value="Text Input" style="border-bottom-left-radius: 3px">
<input type="text" value="Text Input" style="border-inline-start-width: 3px">
<input type="text" value="Text Input" style="border-inline-end-width: 3px">
<!-- these should let it stay native -->
<input type="text" value="" style="color: black">
<input type="text" value="" style="font-weight: normal">
|
{
"pile_set_name": "Github"
}
|
When a Six-Year-Old Boy Went Missing, He Had Only Little ‘Chula’ to Protect Him
“He’s a brave little boy,” said Aaron Woods, Blount County fireman. “And his little dog Chula deserves some recognition, too. She stayed with him all night long in the pouring rain. That’s dedication, that’s love.”
The six-year-old boy who went missing for almost a full 24 hours in a remote area in Blount County has been discharged from Blount Memorial Hospital.
Family members say little Kaydon Leach is in good health and they want to express their gratitude to the community and all the rescuers for helping bring him and his dog home.
His disappearance sparked a miles-long search in the Top of the World community, with a hundred first responders and volunteers working around the clock to find him.
“I had just looked to my right. I had come around and was going to my left and I heard ‘hey.’ I looked back around and did a double take and thought oh my goodness, there’s the little boy,” Woods said.
Blount County fireman Aarom Woods spotted the child in the woods, about a half mile from his home. Leach was behind a tree, dressed in a t-shirt and sweatpants, with his little dog, Chula, right there beside him.
“He was cold, he was hungry,” Woods said. “We put jackets on him. One of the officers had a pop tart and handed it to him. He ate it fast. He was hungry.”
The search welcomed dozens of community members wanting to help, many of them walking up and down the mountain in the rain and heavy terrain in hopes of locating the child.
“A bunch of us came out here even before the police were called and decided to walk to see what we could do,” Lori Marr said.
Tim Lawson went out with his dog, hoping its smell would help detect Kaydon and Chula.
It’s a happy ending to a story that could have taken a very different turn, and Woods said the reunion marks a highlight in his career as a firefighter.
“I’ve seen a lot of bad stuff in 20 years, that right there yesterday makes up for it all,” Woods said. “When it ends the way it ended yesterday, it makes up for it all.”
Leach’s family said that Kaydon and little Chula cuddled all night, keeping each other warm throughout the heavy rain. When the sun came up, the six-year-old said he was going to try to find his way “back to his house.”
|
{
"pile_set_name": "Pile-CC"
}
|
1. Field of the Invention
The present invention relates generally to a pin cushion distortion correction circuit for a television receiver, and more particularly is directed to a pin cushion distortion correction circuit for a television receiver for preventing the formation of a distortion from being produced at the center portion of a video screen.
2. Description of the Prior Art
There has been proposed in the art a pin cushion distortion correction circuit for a television receiver, as shown in FIG. 1. In the prior art shown in FIG. 1, an input terminal 1, which is supplied with a horizontal driving signal, is connected to the gate electrode of a gate-controlled switch GCS 2, which forms a horizontal output circuit. The cathode electrode of the gate-controlled switch GCS 2 is grounded, and the anode electrode thereof is connected through a horizontal output transformer 3 to a voltage terminal 4, which is supplied with a positive DC voltage. The anode is also and grounded through a parallel circuit consisting of a damper diode 5 and a tuning capacitor 6. The anode electrode of the gate-controlled switch GCS 2 is further grounded through a series connection of a horizontal deflection coil 7, a secondary winding 8b of a saturable reactor 8 for the correction of left and right pin cushion distortions, and a capacitor 9 for S-letter correction. A vertical output signal input terminal 10 is connected to one end of a series connection of a vertical deflection coil 11 and a capacitor 12 the other end of which is grounded. At the connection point between the vertical deflection coil 11 and the capacitor 12, there is obtained a parabolic wave signal in synchronism with the vertical synchronizing signal. This connection point is connected through a series connection of a capacitor 13 and a resistor 14 to the base electrode of an NPN-type transistor 15. The base electrode of the transistor 15 is grounded through a resistor 16 and also connected through a resistor 16a to the voltage terminal 4 which is supplied with a positive DC voltage to be supplied with a predetermined bias voltage. The emitter electrode of the transistor 15 is grounded through a resistor 17 and its collector electrode is connected through a primary winding 8a of the saturable reactor 8 to the voltage terminal 4.
The inductance-current characteristic of the saturable reactor 8 used in the prior art pin cushion distortion correction circuit of FIG. 1 is shown by a curve a in FIG. 2 in which the abscissa represents the current I.sub.V and the ordinate the inductance L.sub.H, respectively. From FIG. 2, it will be apparent that as the current I.sub.V increases, the slope of curve a gradually flattens. The voltage V applied to the base electrode of the transistor 15 is shown in FIG. 4A in which the abscissa represents the time T and the ordinate the voltage V, respectively. Accordingly, the parabolic current applied to the primary winding 8a of the saturable reactor 8 becomes as shown in FIG. 2 by a curve b. Thus, it often occurs that the correction for the left and right pin cushion distortions by the parabolic current can not be achieved sufficiently and correctly at the center of the video screen.
|
{
"pile_set_name": "USPTO Backgrounds"
}
|
Kosovo police have arrested a suspected Balkan drug kingpin who is wanted on an international arrest warrant and blacklisted by US authorities.
Naser Kelmendi, 56, is a Kosovo-born ethnic Albanian businessman who police say allegedly runs a major cocaine and heroin organisation from a family-owned hotel in the Bosnian capital, Sarajevo.
Kelmendi was arrested late on Sunday in Pristina, the Kosovo capital, police spokesman Brahim Sadriu said Monday. A second suspect was arrested for aiding Kelmendi, he said.
Police also raided two houses believed to have been used by the suspects and confiscated two cars.
Last year the US treasury put Kelmendi on a list that bars US citizens from doing business with him and allows authorities to freeze any of his US assets.
It was not immediately clear if Kelmendi, who has dual Kosovo and Bosnian citizenship, will be extradited to Bosnia, where authorities want him as part of an investigation into at least six murders, illegal money transfers and drug trafficking. Kosovo declared independence from Serbia in 2008 but Bosnia does not recognise Kosovo as a state and has no direct contact with it.
In similar cases in the past Kosovo authorities were forced to let suspects free because they could not be extradited. In the most prominent case, Kelmendi's son, Elvis, was arrested by Kosovo police in 2012 based on a Bosnia-issued arrest warrant but was released from police custody.
The European Union rule of law force that deals with serious crimes in Kosovo detained Elvis Kelmendi immediately after Kosovo police let him go and has kept him in detention awaiting trial for attempted murder.
The arrest comes as Kosovo seeks to show it is able to fight criminal networks, part of conditions it must meet to eventually join the EU. The former Serbian province has often come under strong criticism for not clamping down on its ethnic Albanian gangsters.
Organised crime flourished in the lawless Balkans during the wars in the 1990s. The area remains a major transit route for smuggling drugs and cigarettes into the 27-nation EU.
|
{
"pile_set_name": "Pile-CC"
}
|
The woman is identified as Khushi Parihar, a resident of Nagpur, and the accused as Ashraf Sheikh.
A 19-year-old aspiring model was killed allegedly by her boyfriend on suspicion of her "character" in Maharashtra's Nagpur district, police said on Sunday, adding that the accused has been arrested.
The woman is identified as Khushi Parihar, a resident of Nagpur, and the accused as Ashraf Sheikh.
A Nagpur police official said they received information on Saturday morning about the body of a woman with her face crushed lying along Pandhurna-Nagpur highway.
Police identified her through social media, he said, adding that Khushi Parihar used to participate in local fashion shows and was aspiring to become a model.
Ashraf Sheikh was later arrested, he said.
According to the official, Ashraf Sheikh has "confessed" that he killed Khushi Parihar because he suspected her so-called character and closeness with some men.
It appears that Ashraf Sheikh travelled with Khushi Parihar in his car on July 12 and later allegedly killed her by crushing her head at Savli Fata near Pandhurna-Nagpur highway, the official said.
A case of murder has been registered by Nagpur (Rural) police and further investigation is underway.
|
{
"pile_set_name": "OpenWebText2"
}
|
"I have greatly enjoyed the second blooming...suddenly you find that a whole new life has opened up for you." - Agatha Christie
02/20/2012
Four Day Weekend
Jude had a four day weekend - Friday they had one of those Teacher In Service days, and today, of course, is Presidents' Day. I overheard a conversation between Jimmy and Jude, wherein Jude informed his father that the quotation mark should come after the word "Presidents" since the day really belonged to all of the presidents, not just the current president. Clearly, the kid is absorbing something at that school.
And that's a lot of time off, time during which we could have been doing something fun. Half the people from Jude's school seemed to be heading off on a ski trip, or Mexico or something. But we're not doing anything. And by not anything, I really mean not ANYTHING. The whole weekend just slipped up on me, and I didn't even realize that it was a long weekend until about Wednesday. Not that we would be heading to Mexico anyway, because a) we're half broke and b) Jimmy teaches on both Friday and Saturday. But still.
And then lots of weird and stressful things happened.
First, on Thursday afternoon, while I was driving around like a madwoman to auditions and committments, I got a robocall from Jude's school, saying that due to police activity in the area, the school was under lockdown, and that nobody should come and pickup their kids until the LAPD had declared the area safe. I kid you not. I was nowhere near the school at the time, but when I called Jimmy, I found out that he had received the same robocall, and naturally, his response to the school telling him NOT to come and pickup his child because of police activity was to get into the car immediately and drive down to pickup his kid. Because really, there was POLICE ACTIVITY. Gotta love that in the man. Turns out, some nut had shot his wife and set the house on fire, which had nothing to do with the school, but the LAPD was just being overly cautious.
Then, I went to the most horrible and emotional funeral I've ever been to in my life. The son of one of my old friends from college had died of a heroin overdose. It's just so tragic, that it's really hard to write about. The service was at a mission down on skid row, a place where this young man had found help and solace, but clearly it still wasn't enough to help him get the better of his addiction. I really, truly can't remember ever witnessing grief and anger at such a level as my friend was suffering. I so wish I could help her, and give her strength, but really, what can I do? I am extremely thankful that our other friend, Wendell, and I could be there for our grieving friend, and I'm extremely thankful that Wendell was there for me, because this was a neighborhood that I would NOT want to have been walking around in by myself. It was everything that you would imagine Skid Row Los Angeles to be. And let me throw out an "Hallelujah" to the people who work at this mission, it's hard to imagine the level of commitment and faith that they have, ministering to the MOST downtrodden people, people who truly have no hope. It was all very, very, very humbling. And I left feeling horribly shaken, and achingly grateful for my child and my family and my blessings.
I left Skid Row and drove to Beverly Hills to help another friend by modeling for her in a fashion show for the clothing line she reps. Irony? You think? I enjoyed playing dress up with my friends Melissa and Laura, but really, I think this would have been much more fun if I hadn't just sobbed for 2 hours.
Then on Thursday night, at about 2:00 am, I woke up and threw up! Over and over. All the rest of the night. I have no idea why. I don't think it was a virus, we've just had this thing sweep through our house, and it didn't feel the same. I think it might be the Trader Joe's egg salad that I ate just before going to bed, which I found out later was one day over the "eat by" date. Eww.
So, Thursday was great.
And then Friday was the day of cancer.
First the good news - after I woke up from my night of vomiting and propped myself up with some Gatorade and the computer, I found out that Amy, who I had asked you to pray for last Monday, came through her lumpectomy with FLYING COLORS. Here's the update which Becky wrote on Amy's blog (Confused? I think sisters get to do that kind of thing) which explains it far better than I could. But it's GOOD NEWS y'all.
Then I got an email about Jude's friend Gus, the boy with the impish grin in the picture on my sidebar. Though he's doing really well, and making CRAZY good improvement, this email was asking for doubled prayers to help Gus's numbers get high enough for him to go back to school. He's been having to take class via Facetime on the iPad which the class bought for him, and he's really eager to get back to school. I have no idea what these "numbers" are. I feel certain that they have been explained to me, but...I'm an actor, these things just whoosh over my head. But I upped up my praying thing there.
Then about a minute later, I popped by What Now and Why? Which is a new favorite blog that I only discovered a few weeks ago. PLEASE check her out. The woman who writes it, Arnebya, is funny and raw and wry and really refreshingly honest. Anyway, she had just written a post titled "Negativity Ate My Positivity Then Belched It In My Face For Dramatic Effect" (and that title effectively defines everything I love about Arnebya) in which she says that she has found a lump in her breast and had to go in for a bunch of tests, and she was really scared. So I had to start praying about that one too.
Then, about 5 minutes after THAT, I got an email telling me that one of my beloved Cub Scout dads has just been diagnosed with a form of blood cancer called Chronic Lymphocitic Leukemia! So I had to start praying about that too.
And I know that because of all this praying and all of my church choir singing, that y'all must think I'm a terribly religious person or something, but really, I'm not so much. I mean it's not like I'm some kind of holy roller goody-goody who just walks around praying all the time. Not me...at all. So this is too much, really. Everybody needs to just GET WELL and STAY WELL.
On Saturday I managed to drag myself out of bed and do something about the semi-squalor into which our home had devolved while I was indisposed.
And on Sunday I managed to get it together enough to host my little writer's group meeting. So far, we haven't done any actual writing, but we're having a lot of fun.
If you've been reading carefully, you'll notice that during Jude's long 4-day weekend. there has been no mention of...Jude. He has been a real trooper while Mama has been running around/vomiting and Daddy has been working. So I promised him that today I would take him to Universal Studios Hollywood. Which is the easiest amusement park around - really close to us, and easy to get in and out of.
I'm sorry that this has been such an incredibly long-winded way of saying that I didn't do a damned thing for four days.
We had a 3 1/2 day weekend. They're back at school today. We did nothing. I mean, we walked around the mall for about an hour because we were looking at new pots & pans and I wanted to get them from JCP because they stuck with Ellen after the mom fiasco. But that was it. And Zoey was crabby, so we didn't get the pots & pans anyway.
Wow, so many ups and downs! Prayers and thoughts for your friends, of course. I'm working today, John is working today, Sprite is playing full time in daycare, and the dogs seem to be the only ones who get to stay home on Presidents Day. :-)
Although I wish it were for a different reason, thank you for thinking of, let alone, mentioning me.
I hate that robocall/text/tweet telling us to stay away from the school when there's suspicious activity (there was a fire two weeks ago). And I'm glad to know we aren't the only ones who say staying away is the opposite of what I'm going to do.
Hope you had a wonderful time yesterday. I would probably be fired living that close to Universal. I'd be on roller coasters all day, calling from the park before the gates opened, claiming illness (I have perfected the raspy, I'ma die I'm so sick voice).
|
{
"pile_set_name": "Pile-CC"
}
|
How do you prepare and could you survive a doomsday disaster? Are you ready for when the SHTF.?
Most Popular Equipment Review Articles:
Welcome to my website:
UK Preppers Guide is a website dedicated to all things Bushcraft, Survival and Prepping.
I like to think that prepping is something that encompasses all factors of survival and bushcraft skills. You'll find there are hundreds of pages on many different topics, some with video's as well, although I do have a separate YouTube Channel where you'll find over 100 videos.
You will find articles from self defence and the law, to skinning a rabbit. From dealing with hypothermia to how to make survival bread. Over 500 different articles covering all aspects of keeping yourself and your loved ones safe.
Happy Prepping Folks,
Steve
|
{
"pile_set_name": "OpenWebText2"
}
|
President Ram Nath Kovind will not hear carol singers on the eve of Christmas as has been the tradition with former presidents. Choirs and carol singers who had expected to perform for India’s first citizen have not been given time. The spokesperson of Rashtrapati Bhavan says a decision has been taken to have no religious ceremonies inside the building as India is a “secular state”.
One may ask if carols (or even qawwalis) can be boxed under religion or is there not a cultural dimension to them? Apparently, the President did not do anything special for Diwali inside his majestic home either, although ANI reported that Rashtrapati Bhavan was lit up this year with a special multi-coloured light display on the eve of Diwali. US president Donald Trump meanwhile celebrated Diwali inside the White House (although he cancelled the Eid dinner that predecessor Barack Obama would host besides lighting lamps inside the White House on Diwali).
The idea of genuine secularism should not be used as a cover for snubbing minorities, in this case, the tiny Christian community, just 2.3% of India’s population. At a time when a new “Hindu” identity is being forged, both politically and culturally, traditions linked to minorities apparently cannot be accommodated without discomfort and unease. The spectre of the Muslim may be used to create a particular national consciousness, but it is with Christians (who are seen as actively promoting conversions) that the cadre of the RSS and its frontal organisations really have a bone to pick at the ground level.
2017 has been one of the worst years for anti-Christian violence in India and apparently, there is to be no comfort or let-up. An influential global charity that monitors the treatment of Christians worldwide to produce a list of the 50 most difficult countries for them to live in (carried by all western media), writes that in the first six months of 2017 Indian Christians were harassed or attacked in as many incidents as in the whole of 2016.
Forget the year, just look at this December. On December 15, a mob-linked to extremist Hindu groups attacked Catholic carol singers in Madhya Pradesh’s Satna district and set a priest’s car ablaze. Instead of taking action against the attackers, the police detained the singers on suspicion that they were carrying out conversions. On December 17, Christian schools in Aligarh, UP, were issued a warning by right-wing groups not to celebrate Christmas in schools as it would “lure” students into the faith.
On December 19, bail was given to seven people in Mathura district, UP, after they too were picked up for “forced conversion” two weeks ago. In judicial custody, their ordeal was exacerbated as they were threatened by the local bar associations that demanded inquiries into their funding and intent.
Communalised and unruly lawyers’ associations have been characteristic of UP for some time now, pre-dating the ascension of Yogi Adityanath to the chief ministerial chair. But an organisation founded by him, the Hindu Yuva Vahini, has always been at the forefront of viewing Christian activity with suspicion and using tactics of intimidation. Still, it’s not as if the BJP cannot live with Christians. The regime in Goa manages to do so quite successfully and the BJP has been expanding its footprint in the northeastern states with substantial Christian populations, even making concessions to eating beef in such places.
Still, there’s no denying that there is a shift in the larger mindset over the years, culminating in draconian anti-conversion laws in several states that impinge on free choice. In Madhya Pradesh, for instance, I would have to take the state’s permission to convert. If I were a Christian (or a Muslim) seeking to become a Hindu, permission would be given; were it the other way round, the extremist cadre would work on me, socially boycott the family, (maybe burn down my home) and in the end, the permission is unlikely to be given.
In no part of India would state and police become active if any Muslim or Christian were to declare themselves Hindu. But a conversion out of Hinduism is currently viewed as a highly suspicious activity by innocents who were “lured” or “forced”. It cannot be free choice such as that exercised by Dr B R Ambedkar, who wilfully converted to Buddhism in 1956 with lakhs of followers. The founder of the Indian Constitution could be booked for promoting conversion today.
Some of us who have been educated at the many fine Christian institutions across India would know that a church sermon always stresses that the only way to heaven is through accepting Jesus Christ. We used to just say amen and move on. Now even a carol can apparently contaminate us with the desire to convert.
|
{
"pile_set_name": "OpenWebText2"
}
|
Coming together to move Africa forward
The Tokyo International Conference on African Development is a great opportunity for Japan to expand its business in Africa, as the resource-rich continent begins to shed its dependence on aid to emerge as an attractive consumer market and a swelling population, according to the Foreign Ministry’s ambassador for TICAD V, Makoto Ito.
“The population is expected to grow in Africa, especially among the young, the working population. The continent is also rich in resources, and its economy is developing,” Ito told The Japan Times in a recent interview. “That growth will continue. It needs to be continued for the sake of Africa as well as the world economy.”
The fifth TICAD, running from Saturday to Monday in Yokohama, brings together leaders from over 40 African countries.
Ito said the Japanese government will beef up its support for the private sector by creating a more business-friendly environment in the region, such as by building infrastructure, fostering human resources and enhancing the role of its embassies. At the same time Japan will work to see that Africa’s current economic growth is sustainable, he said.
When the first TICAD was held, in 1993, Africa was perceived as a continent of poverty and starvation. The region, however, has achieved surprising economic growth over the years thanks to the surging prices of natural resources amid rising demand in emerging economies, particularly China.
The combined sub-Saharan economy expanded by more than 5 percent on average between 2002 and 2011, and its trading volume quadrupled in the past decade, according to the International Monetary Fund.
The continent’s population is projected to exceed 2 billion by 2050 from about 1 billion in 2010, surpassing that of China and India, according to the United Nations Department of Economic and Social Affairs.
Its expanding markets and natural resources, including petroleum, natural gas, platinum and rare metals, are attracting investments from around the globe. Africa, however, still has many issues that require the attention of the international community, Ito said.
Income disparity, overreliance on resource trading, political instability and conflicts in some areas, including Somalia, are still major challenges facing the region, he said.
“Society, economy and peace are the three themes to be discussed at TICAD V. We need to discuss the issues and think of ways to tackle them in the next five years,” Ito said.
“We need to create a society in Africa where all citizens can benefit from its economic growth. The growth should be sustainable, and the countries also should proceed with industrialization.”
To help sustain growth, Ito said Japan plans to train workers, especially the young, to reduce high youth unemployment. Increasing capital flows from the private sector are also key to realizing sustainable economic growth, he said.
China’s growing presence on the continent shouldn’t alarm Japan, Ito said. The best course is for Japan to focus on what it does best to bring about a better future for Africa, he said.
“If China is doing what it can to benefit African nations, we welcome it. Japanese companies may also be able to use something China has made when we operate businesses on the continent,” Ito said. “I just hope China does what’s best for the continent. That’s it.”
China has increased its support and investment in Africa since the early 2000s, as its need for natural resources surges.
China has built infrastructure, including a new headquarters for the African Union in Addis Ababa, at a reported cost of some $200 million, and a parliament building in Malawi.
Total trade between China and Africa in 2011 amounted to about $166 billion, far surpassing the $30 billion with Japan, according to the Ministry of Economy, Trade and Industry.
Although Japan lags China in trade and aid to African countries, its advanced technologies, and its efficient support networks are widely appreciated by local people, Ito stressed.
“Japan’s technology is highly advanced. Roads we made are appreciated for their high quality. When we make things in Africa, we cooperate with local companies, and transfer our skills, and train local people,” Ito said. “In the case of China, when it constructs roads, it brings workers from China, and also materials such as cement from China.”
Japan has also provided grant assistance in rural areas by building schools and hospitals for decades, Ito said.
“Africa acclaims Japan for its support. They appreciate that Japan has continued to hold TICAD for 20 years,” Ito said. “It has become a core of Japan’s foreign diplomacy.”
|
{
"pile_set_name": "Pile-CC"
}
|
Q:
Pending Intent are not Working as Expected
I am having a great trouble with Notification and pending Intent. I am trying to open Chat activity with appropriate user_details from which the message is sent. That's why on Firebase Function I have passed the from_user_id which is the one who is sending the message. I am getting correct logs there in FCM but when I receive a chat notification and open it It opens activity without any userName and messages. It open a new instance of the activity with default values.
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
String notification_title = remoteMessage.getNotification().getTitle();
String notification_message = remoteMessage.getNotification().getBody();
String click_action = remoteMessage.getNotification().getClickAction();
String from_user_id = remoteMessage.getData().get("from_user_id");
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this, CHANNEL_ID)
.setSmallIcon(R.drawable.chitchat_icon)
.setContentTitle(notification_title)
.setAutoCancel(true)
.setContentText(notification_message);
Intent resultIntent = new Intent(click_action);
resultIntent.putExtra("user_id", from_user_id);
PendingIntent resultPendingIntent =
PendingIntent.getActivity(
this,
0,
resultIntent,
PendingIntent.FLAG_UPDATE_CURRENT
);
mBuilder.setContentIntent(resultPendingIntent);
int mNotificationId = (int) System.currentTimeMillis();
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mNotificationManager.createNotificationChannel(mChannel);
mBuilder.setChannelId(CHANNEL_ID);
}
mNotificationManager.notify(mNotificationId,mBuilder.build());
}
Message payload:
const payload = {
notification: {
title: userName,
body: message,
icon: "default",
click_action : "com.example.chitchat_TARGET_MESSAGE_NOTIFICATION"
},
data : {
from_user_id : from_user_id
}
};
My Manifest look like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.chitchat">
...
<application
android:name=".ChitChat"
android:allowBackup="true"
android:icon="@drawable/chitchat_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".GroupChatActivity"></activity>
<activity android:name=".CallActivity" />
<activity
android:name=".ChatActivity"
android:parentActivityName=".MainActivity">
<intent-filter>
<action android:name="com.example.chitchat_TARGET_MESSAGE_NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".ProfileActivity">
<intent-filter>
<action android:name="com.example.chitchat_TARGET_NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
...
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat" />
<meta-data
android:name="com.google.firebase.default_notification_channel_id"
android:value="fcm_default_channel" /> <!-- adding -->
<service android:name=".FirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
...
</manifest>
I don't know If I have added some different functions like LifeCycleEvent Listners and EmailVerification for registration has created issues. I am also unable to log the problem I don't know why.
Please, appropriate suggestions.
Thanks
A:
First of all change resultIntent.putExtra inside onMessageReceived like:
resultIntent.putExtra("from_user_id", from_user_id);
And in your ChatActivity fetch user_id like below:
String user_id = getIntent().getStringExtra("from_user_id")
Hope this solve your problem.
Or change your notification payload:
const payload = {
notification: {
title: userName,
body: message,
icon: "default",
click_action : "com.example.chitchat_TARGET_MESSAGE_NOTIFICATION"
},
data : {
user_id : from_user_id
}
};
And inside onMessageReceived change:
String from_user_id = remoteMessage.getData().get("from_user_id");
To
String from_user_id = remoteMessage.getData().get("user_id");
Reason: During background, System generates the notification without executing your code inside onMessageReceived. That's why it puts the extra as it gets from notification payload which is from_user_id, that's you send from server.
|
{
"pile_set_name": "StackExchange"
}
|
William Gloag, Lord Kincairney
William Ellis Gloag, Lord Kincairney (7 February 1828 – 8 October 1909) was a Scottish judge.
Life
Born in Perth on 7 February 1828, he was son of William Gloag, a banker in Perth, by his wife Jessie, daughter of John Burn, writer to the Signet of Edinburgh. Paton James Gloag the theologian writer and Moderator of the General Assembly of the Church of Scotland in 1889, was his eldest brother, and his eldest sister was Jessie Burn Gloag, who founded a ragged school in Perth.
Educated at Perth grammar school and Edinburgh University, Gloag passed on 25 December 1853 to the Scottish bar, where he enjoyed a fair practice. A Conservative in politics, he was not offered promotion till 1874, when he was appointed advocate depute on the formation of Disraeli's second ministry.
In 1877 Gloag became sheriff of Stirling and Dumbarton, and in 1885 of Perthshire. In 1889 he was raised to the bench, when he took the title of Lord Kincairney.
In later life he had an Edinburgh townhouse: a huge Georgian house at 6 Heriot Row, previously the house of the author, Henry Mackenzie.
He died at Kincairney on 8 October 1909, and was buried at Caputh. He is also memorialised on his brother Paton's grave in Dunning.
Works
Introduction to the Law of Scotland, Green, 1995
Family
In 1864 Gloag married Helen, daughter of James Burn, writer to the Signet, Edinburgh, by whom he had one son, William Murray Gloag, and three daughters.
Notes
Attribution
Sources
Category:1828 births
Category:1909 deaths
Category:Members of the Faculty of Advocates
Kincairney
Category:People from Perth, Scotland
Category:Scottish sheriffs
Category:Alumni of the University of Edinburgh
|
{
"pile_set_name": "Wikipedia (en)"
}
|
Q:
What would be hold some number of Double[] in java?
A List or collection or something other?
I would be storing between 10 and 20 Double[].
I would want to add more maybe, retrieve them.
A:
You mean where you could store your doubles for in-memory usage?
Go for an ArrayList.
List<Double> list = new ArrayList<Double>();
// store
list.add(10.0);
list.add(15.0);
// Retrieve
for (Double d : list) {
System.out.println(d);
}
|
{
"pile_set_name": "StackExchange"
}
|
Q:
Horizontal CSS UL Menu
For some reason my CSS styled UL menu won't center horizontally. The CSS to create it is:
#navigation {
width:79em;
height: 2em;
position: relative;
padding: .5em;
font-family: Verdana, Geneva, sans-serif;
text-transform: uppercase;
font-size: 1em;
background-color: #F5F5F5;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 0 1em 0 #333;
-moz-box-shadow: 0 0 1em 0 #333;
box-shadow: 0 .25em .3em -.055em #333;
}
#navigation ul {
text-align: center;
padding: 0;
margin: 0;
list-style: none;
}
#navigation li {
display: inline;
list-style: none;
display: block;
float: left;
width: 10em;
height: 2em;
text-align: center;
padding: .5em 0 0 0;
margin: 0;
border-left: .0625em solid #FFF;
border-right: .1em solid #CCC;
text-shadow: .0625em .0625em .0625em #ffffff;
filter: dropshadow(color=#ffffff, offx=1, offy=1);
}
A:
add
#navigation {
...
margin : 0 auto;
}
|
{
"pile_set_name": "StackExchange"
}
|
Olive
Status:
Adopted
Type:
Dog
Breed(s):
Doberman Pinscher
Size:
Large (46-80 Pounds)
Age:
Adult (3 to 8 years)
Gender:
Female
Hair:
Short
Colors:
Black & Tan
Pattern:
Solid
Share via...
Hi, I’m Olive. My foster mom says I am the perfect dog. I LOVE kids and people, I am crate trained, and I am completely non destructive in your house. Oh, and can you believe how gorgeous I am? My only fault is that I can be choosy about my dog friends and would probably prefer to be your only dog- but who cares, that’s more love that I can give to you. I had a hard beginning- I was raised as a “backyard breeder” dog and used for making puppies. When they were done with me they dumped me at the South LA Shelter. But, since Much Love saved me – I am a happy and healthy girl. Will you be my new family?
|
{
"pile_set_name": "Pile-CC"
}
|
OR Camera Drapes
LISTED UNDER:
Spectrum Labs' full line of OR imaging drapes are made from soft anti-stat polyethylene, to avoid obstructing the view. The camera drape product line includes Universal Camera Drapes and Tear Tip Camera Drapes. The drapes' stretch openings provide a tight seal, which lowers repairs costs caused by repeated soaking in sterilant. Spectrum Labs manufactures drapes for a wide range of clinical applications. All disposables are 100 percent latex-free and made in the USA.
|
{
"pile_set_name": "Pile-CC"
}
|
Patterned multiplex pathogen DNA detection by Au particle-on-wire SERS sensor.
A Au particle-on-wire system that can be used as a specific, sensitive, and multiplex DNA sensor is developed. A pattern formed by multiple Au nanowire sensors provides positional address and identification for each sensor. By using this system, multiplex sensing of target DNAs was possible in a quantitative manner with a detection limit of 10 pM. Target DNAs from reference bacteria and clinical isolates were successfully identified by this sensor system, enabling diagnostics for infectious diseases.
|
{
"pile_set_name": "PubMed Abstracts"
}
|
The present invention relates generally to ink jet printers and, more particularly, to a deflection electrode arrangement for an ink jet printer which provides for correction of any misalignment between the deflection electrode and the drop catchers.
As shown in U.S. Pat. No. 3,701,998, issued Oct. 31, 1972, to Mathis, ink jet printers of the type to which the present invention is directed include a print head which generates a plurality of jet drop streams which are directed at a print receiving medium. The jet drop streams are arranged in one or more rows. Deflection electrodes are positioned adjacent each of the jet drop streams for selectively charging drops in the streams. The drop streams thereafter pass through an electrical deflection field which separates the drops into two or more sets of drop trajectories. As shown in the Mathis patent, the deflection fields for a two-row printer may be produced by positioning a deflection electrode between the rows of jet drop streams and supplying a deflection potential to the electrode, which potential tends to deflect charged drops in the streams outward, away from the electrode. Electrically grounded drop catchers are positioned outwardly from the drop streams such that charged drops are deflected to the catchers and are thereby prevented from striking the print receiving medium. As shown in U.S. Pat. No. 4,085,409, issued Apr. 18, 1978, to Suresh C. Paranjpe, by selectively applying a plurality of charge levels to the drops in the jet drop streams, the drops may be deflected in each stream sufficiently such that they strike the catcher, or deflected to a lesser degree, such that they strike the print receiving medium at various ones of a number of print positions. Prior art deflection electrodes, such as shown in the Mathis patent, typically comprise a thin strip or ribbon of electrically conductive material, such as stainless steel. With such deflection electrodes, the deflection potential presented by the electrode is substantially constant along the length of the electrode.
The deflection field experienced by each of the drops in the jet drop streams is a function of the voltage differential between the deflection electrode and a catcher and also of the spacing between the electrode and the catcher, since E=V/d, where E is electrical field strength, V is potential differential, and d is the spacing between the deflection electrode and the catcher. In order for charged drops in the jet drop streams to be deflected outwardly by a uniform deflection distance, the electric deflection field must be uniform along the row of jet drop streams. As a consequence, great care has been taken to assure that the deflection electrode and each of the catchers are properly aligned and that the spacing between the deflection electrode and each catcher is accurate and uniform along the entire row of jet drop streams. Thus extreme care has been necessitated in positioning and aligning the catchers with respect to the deflection electrode after servicing of a printer.
It is seen, therefore, that there is a need for an ink jet printer in which alignment between the deflection electrode and the catchers is not critical to proper deflection of charged drops in the jet drop streams.
|
{
"pile_set_name": "USPTO Backgrounds"
}
|
The plan is for companies that buy into Allied Security to buy up unused patents, issue themselves nonexclusive licenses for a song and then sell the patents. While it's not clear if Allied Security is a nonprofit, former IBM veep Brian Hinman who heads up the organization asserts it's not a profit-making venture. IBM, of course, has done much to refashion itself as a promoter and producer of open-source software — something anathema to Microsoft's culture.
The same can't be said of Intellectual Ventures, which was founded by former Microsofties Nathan Myhrvold and Edward Jung, Intel's Peter Detkin, and Gregory Gorder of Seattle law firm Perkins Coie, which counts Microsoft as a top client. Myhrvold has been buying up patents left and right, and while his company has yet to sue anyone, he hasn't ruled it out. Microsoft executives have traditionally aped Bill Gates hard-line rhetoric when it comes to intellectual property, and there's little reason to believe Myhrvold and company are any different. While Google is also an investor in the fund (along with Apple and eBay), the Mountain View company must be worried enough about the fund's plans and ties to have helped create a potential competitor.
In other words, if Intellectual Ventures continued to aggregate patents in a competitive vacuum, it could become just as if not more dangerous a monopoly than Microsoft in the company's heyday by commanding premium royalties or denying access to patents entirely in order to hobble products and competitors. It's yet to be seen if Intellectual Ventures will carry water for the Redmond software giant in court, and for now, Allied Security is collection of legal documents and yet an actual owner of patents, but this could shape up to be one of the most boringly important battles in the coming years.
|
{
"pile_set_name": "Pile-CC"
}
|
Q:
Is changing concentration rules for 1h+ buff spells a bad idea?
I have noticed that many long duration (1h+) spells in 5E D&D have concentration, effectively meaning caster cannot cast other concentration spells while using such a spell (or end the spell). For example Barkskin and Alter Self. This seems to make many "buff" spells much less useful, possibly to the point they will never be used except very in special circumstances.
I have played and DMed since early red-box basic, and I get that 5E with its bounded accuracy is not like 3.5E where the Wizard would buff up party with 4-5 spells before they go to work for the day. However it still seems weird that now you would almost never do that or any concentration buffs in 5E. I get that with reaction spells you may not need buffs as much - but I liked the strategy and planning of selecting buffs.
I am thinking of a house-rule something like this:
Besides Concentration, there is Subconscious Concentration, which works the same (only one subconscious spell at a time, which can be lost if concentration would) - but it would allow you to have 1 Concentration and 1 Subconscious Concentration spell at the same time.
Generally longer lasting (1h+? 10 min?) non-damaging utility spells would be Subconscious Concentration instead of Concentration*. This way the Druid could use Barkskin and still cast concentration combat spells and have fun in a fight.
However, you would not have a stack of expected standard buffs on the party either, since only one utility spell could be subconsciously concentrated on at a time, which I think would make for interesting choices.
*Obviously I would have to evaluate spells for subconscious mechanic individually.
I admit I am on the fence re Magic Weapon since it is damage causing - but I like idea of wizard buffing fighter with a magic weapon as they hunt that Werewolf, while still being able to cast a spell or two during the fight. On the other hand I think scrying would probably stay regular concentration because...it feels right.
Is this a good / bad / unbalancing idea?
What are some Pros and Cons?
Any suggestions for improvement on this house-rule?
Edit: Conclusion
Thanks to everyone for feedback and sharing your opinions. It seems this house rule might be a bad idea with unbalancing consequences.
1) DMG p263 strongly advices against changing this part of system. There will probably be balancing issues, not limited to casters outshining non casters. Haste or fly + long term subconscious buff does give me pause.
2a) wizard still has many non concentration spells like fireball
2b) druid is more limited in options but with wildshape combinations this could be a design feature rather than a bug. Call lightning with a flying creature comes to mind. If the barkskin concentration limit that got me thinking about this in first place bugs me it may be safer to just make barkskin non concentration rather than risk braking everything.
I am having second thoughts about the wisdom of this house rule. If I do give it or something like it a try, I'll update on how it turns out.
A:
The game was designed with concentration in mind. If you change how concentration works, it will almost certainly be unbalanced, unless you take steps to actually balance it.
That being said, it's your game. Try it, see if you like it. If you don't, then change it. When I am thinking about changing something, I usually search for the most broken scenario I can think of and then I play test it myself. You would need to list everything single spell viable for this new mechanic and then try stacking different spells together and see what happens.
A:
You know many Wizard damage spells are instant and can be cast while concentrating on something else, right? e.g. Fireball. You're intended to be able to Haste a party member (or other buff spell) and then blast away.
Having Haste plus a "subconscious" longer-term buff up simultaneously and still being able to Fireball seems pretty powerful.
I think the main competition for a Wizard's concentration slot isn't damage spells, but rather short-term very strong buffs like Haste.
It's more a problem for Druids where most of the damage spells are concentration (Call Lightning, Flaming Sphere), although most of their damage cantrips are still instant.
I don't have a lot of experience with this, but yes I think Barkskin is hard to use because of the concentration opportunity cost. Perhaps if you're worried about an ambush?
But druids can do a lot of stuff (like wild shape) so I think the existing balance (of many druid spells requiring concentration) is fully intentional. e.g. Call Lightning then wild shape into a bird to stay out of reach while blasting enemies makes it an upside, and saves your spell slots for later healing. It does mean you can't buff. Or the classic is Flaming Sphere + Wildshape so you can attack and move the sphere with a bonus action.
Or if you wildshape into something squishy, barkskin first.
|
{
"pile_set_name": "StackExchange"
}
|
Sunday, January 18, 2015
2014 was a great year. We
travelled a lot – both overseas and domestic. Our trip to South Africa and
Zimbabwe was outstanding. Both the countries offer a lot to any tourist. SA is
extremely well organized for tourism and one returns with a lot of all round satisfaction.
Domestic travel included visit to Mumbai and Kodagu for Golf at the ‘Coorg Golf
Links Club. The company, weather and the lush Koduva surroundings made the trip
a very memorable one. Any travel for that matter is very welcome and breaks the
monotony of day to day routine living. It is invigorating and provides great
opportunity to unwind, bond with friends and enjoy the bounties of nature.
2014 was indeed a very great year
for our children Vivek and Shubhra – Akhila and Anirban. They celebrated their
10th wedding anniversary in August. How time flies! There was a
round of celebrations in Bengaluru. We joined them with utmost pride and
happiness. In addition, Akhila and Anirban hosted a party for their friends in
Mumbai. Anirban decided to secretly fly us to Mumbai for the function – it was
a complete surprise for Akhila. Both Jai and I wish all of them many more years
of happily married life.
October was a very special month
for Vivek and Shubhra. Chumbak opened their ‘Flag Ship’ store on CMH Road Indiranagar,Bangalore.
The store was inaugurated on 26 Sep 2014. It also houses their various offices
and the design centre. Chumbak - www.chumbak.com- now has 100
stores across India. Their footprints are also found in Japan and Dubai. The flagship
store is an epitome of kitsch design, appealing especially to the younger
generation. In a matter of four and a half years Chumbak has established itself
as a front runner in kitsch design in India. Their India-themed souvenirs are
extremely popular. They have now moved on from being ‘India Centric’ to ‘India
Inspired’. With this great leap, Chumbak is expected to expand very rapidly
across India and abroad. Chumbak’s success attracted many domestic and international
media to stand up and take notice – Foremost being ‘Forbes India’ which did an
elaborate article on Chumbak in their Sep 2014 issue. However the highest
recognition of Chumbak came from none other than Sheryl Kara Sandberg Chief Operating Officer
of Facebook when she quoted Chumbak as part of Facebook’s Earning Call in July 2014.The credit goes to
Vivek and Shubhra who have toiled very hard all these years with amazing
passion and utmost belief in themselves and their dreams. Jai and I wish them "Godspeed, fair winds and following
seas .Bravo Zulu.”
Figure
2 - Front view
Figure
3 - Jai's happiness is all
evident
We eagerly look forward to this
time of the year, for daughter dear to arrive from Mumbai in end December with
her ‘Marine Commandos’ – Ayaan, Agastya and Aarin. The local ‘GI Jane’ Samara
enthusiastically joins us to receive the cousins at the airport. The fun and
frolic starts in right earnest from the airport – no time wasted. In the ensuing
two weeks the house becomes a bee hive of endless activities. Each year, the
inevitable change in the children is evident. As they grow older, their
activities also change, posing different challenges to the parents and to the
grandparents (for a shorter duration). They are more independent, especially
the twins and do things on their own. They proceed to the park on their own to
play and ask for food when they are hungry, sleep when tired and so on. Akhila now
has freer holiday time to indulge in watching TV, reading books and having
endless cups of tea with Jai while catching up on their lives. Our neighbour’s
children Sanika and Sambhav join the ‘Strike Force’ from the very outset. The
six children get along very well and enjoy each other’s company.
Having the family with us is
extremely therapeutic. It gives us an opportunity to be young once again and
indulge with them in picnics, storytelling, participating in their activities –
be it gardening, feeding cats or gathering fallen tree twigs for the bonfire.
It is great fun resolving their internal fights and arguments – who will sleep
next to tata and aggi, who will drink from the green glass, who will have the
first dosa and so on. I suddenly get a surge of pride and feel very important,
sitting in judgment over these ‘complex’ social problems.
As per the Prabhakar household
tradition, we had the ‘Grand Christmas Barbeque’ on the 24th of Dec
along with a large number of friends and family. Barbeque adds a special
meaning to any get together – the fire, smoke, starry sky and aroma of
barbecued chicken act as a catalyst to enhance the level of merriment. The
children love any night outdoor activity and participate in it fully. It is
very important to have a proper barbeque stand and dry charcoal. This year I
got a new stand made to my specifications. Right type of marination and the
duration are very critical. Another vital point is to separate the ember and
the meat by at least 6 inches – this will ensure slow and steady cooking. A
good basting sauce will certainly add extra zing to the dish. Paneer, potatoes,
mushroom and onions provide a good vegetarian fill up.
Figure
5 - Barbeque in full swing
Figure
6 – Opening gifts from Santa
Figure
7 - Setting the X’mas mood
This year we went to Pondicherry
for our family reunion in three cars. The roads are in very good condition and
the drive was smooth throughout. We went via Kolar, Chittoor, Arcoat
,Tindivanam to Pondicherry. While travelling with children one has to cater for
more number of stops along the way. In all, we took approximately eight hours
to reach our destination.
We stayed at the ‘Red Lotus’ hotel
in the city run by a German couple. The hotel has been done up very well with
each room having a different colour scheme with matching decor. The hotel is
very well maintained – clean and tidy. The USP of the hotel is ‘Danielle and
Chris’ the owners – they are excellent hosts – very friendly and approachable.
They go all out to interact with the guests and make them feel comfortable. The
breakfast is tasty, sumptuous and interesting – with a combo of delectable idli,
sambar, eggs, a variety of breads and croissants with relishing coffee and tea.
The hotel has a well appointed terrace to eat and relax. The children had a
whale of a time running around the terrace, the older ones lying down with
their kindle and the twins playing with their toys. The staff is very helpful
and courteous. Overall the ‘Red Lotus’ was a very good experience.
Figure
8 - Danielle and Chris’ the
owners of ‘Red lotus’
Figure
9 – Feeling totally at home on
the terrace – Red Lotus
Figure
10 - Exploring French quarters
Figure
11 – On the promenade – Agastya
and Samara
Figure
12 – Impromptu French Street
Play?
Pondicherry in itself was a bit of
a disappointment. We had visited the city way back in 2004 and we were very
impressed then. The city is bursting at the seams – extremely over populated
with far too many two wheelers and cars on the road.The ‘French Quarter’
is now all but a name. The quality of food seems to have dipped a notch or two
in the last ten years. Travelling with two foodies Vivek and Anirban meant,
eating at exotic places – our share included dinner at ‘La Maison Rose’ and
lunches at Naturellement Garden Café in Auroville and ‘Theevu Plage’ on Bodhi beach. While the children
explored different restaurants to whet their dinner appetite, the grandparents (in
all five) stayed at the Red Lotus with the grandchildren and enjoyed a bit of
quiet and solitude and comfort food.
Figure
19 – Samara and Ayaan showing
off their Taekwondo prowess – getting drenched with no extra set to wear. We
had to buy fresh clothes on the way back!!
Last year my daughter Akhila had
given me the task of decoding rituals and pooja to render it understandable,
meaningful and interesting to the children. It was a very huge task indeed. In
the past, whilst the mantras and devotional songs were played on the laptop, the
children just sat there – bored and anxiously waiting for the rituals to get
over. We find ourselves just going through the motions without understanding
very much. Both the adults and the young find it difficult to sit through the
entire proceedings.
This year we observed a different
format. The entire ‘Satyanarayana Pooja’ was in English and narrated to the
children in an extremely understandable fashion by me. The idea of seeking
God’s blessing for undertaking all activities in life and thanking the God in
return, was conveyed to the children in an interactive fashion. They
participated in the proceedings willingly and enthusiastically. The narration
was laced with stories which related to the present context and were easily
understood. The entire festival was video graphed by Akhila. It has come out
very interesting. I plan to improve upon this year’s performance and put up a
better performance for ‘Ganapati Pooja’
We celebrated the New Year party on
31st Dec at home with the children and grandchildren. A Bonfire
generated lots of bonhomie into the beginnings 2015. We bid farewell to the old
year and welcomed the New Year by letting go two Chinese lanterns.
Taking stock of 2014 - Akhila
continues to be a successful home maker and strives very hard to run a taut
ship. She had her hands full looking after three young children and creating an
excellent home atmosphere. Her involvement with the family is total. With the
twins entering their fifth year, she will have some spare time now onwards to
rekindle her creative pursuits.
Through the year Jayanti worked
unstintingly to ensure Freedom International School- http://www.freedom-international.in/ - consolidated its position of
being one of the best schools in Bengaluru. The school will be starting its 11th
and 12th standard from June 2015.The school has steadily and firmly made
its mark in the field of education.
Anirban was busy throughout the
year. www.caakwan.com.
They continue to do well and
consolidate their position as leaders in celebrity and sports management.
|
{
"pile_set_name": "Pile-CC"
}
|
---
abstract: 'Summarizing Likert scale ratings from human annotators is an important step for collecting human judgments. In this project we study a novel, graph theoretic method for this purpose. We also analyze a few interesting properties for this approach using real annotation datasets.'
author:
- |
M. Iftekhar Tanveer\
Electrical and Computer Engineering\
University of Rochester\
Rochester, NY 14627\
`itanveer@cs.rochester.edu`
bibliography:
- 'project.bib'
title: Use of Laplacian Projection Technique for Summarizing Likert Scale Annotations
---
Introduction {#sec:intro}
============
Likert scale is a popular method for quantifying and gathering human opinion. In disciplines like Behavioral Science, Psychology, or Human-Computer-Interaction, scientists use Likert scale to measure subjective opinions from human annotators. As human annotations are inherently noisy, it is often customary to collect the data from more than one annotators (Fig. \[Fig:annotation\]). Traditionally, average of these ratings are computed to get a summary.
{width="0.5\linewidth"}
\[Fig:annotation\]
However, human annotators usually have their own bias on the ratings. For example, some annotators are biased towards high ratings, some towards low ratings; some annotators rate on a wide range, some others rate on a narrow range. As a result, computing averages without addressing these variations might lead to erroneous results.
In classical literature on label denoising, researchers attempt to learn the underlying distribution of annotator ratings to rescale and compute the average. On the other hand, in this project we are interested to capture the neighborhood information from the datapoints. The rationale for this approach is as follows: Although humans have personal bias in assigning the exact values in the Likert scale, the idea of relative positions of the datapoints is universal. We employ a graph based technique to capture this neighborhood relationship within the datapoints.
Literature Review
=================
In recent years, acquiring ground truth via accumulation of several unreliable crowd annotators is considered to be an important problem to address. An increasing body of literature is addressing this problem from various perspectives. For example, there are works involving complicated generative models [@Whitehill2009][@Raykar2010] for denoising and aggregating crowd opinion. As these models involve latent variables, the solution approach typically involve Expectation Maximization (EM) [@Dempster1977] framework. These approaches are often criticized[@Karger2011] as EM is sensitive to initialization and can stick to local optima. Liu et al. [@Liu2012] approached this problem as an inference problem in probabilistic models. They used variational methods such as Belief Propagation and Mean Fields.
However, none of these approaches consider the relative neighborhood of the vertices from graph perspective. As the annotators assign ratings to the subjects in comparison to one another; it should be reasonable to assume that the ground truth annotations captured in the relative distances among the datapoints.
Problem Formulation {#sec:probfor}
===================
![The structure of the Annotation Matrix[]{data-label="Fig:dataStruct"}](./figures/data.pdf)
Let us consider the annotation data is stored in an $m\times n$ matrix as shown in Fig. \[Fig:dataStruct\]. Each row of the matrix represents a unique annotator and each column represents a unique datapoint. The ratings are given in a K-point Likert scale. The goal of this problem is to formulate a linear embedding that projects the $m$ dimensional data points on to a one dimensional line while preserving the relative neighborhood. This idea is inspired from the concept of Locality Preserving Projection proposed by Niyogi et al. [@Niyogi2004]. If $\mathbf{a}$ be the intended embedding, then the projection of datapoint $X_{:j}$ is $y_j$, which can be written as in Eq. . $$y_j = \mathbf{a}^T X_{:j} \implies \mathbf{y}^T = \mathbf{a}^T X
\label{eq:1dEmbedding}$$
In order to capture the neighborhood structure among the datapoints, we formulate a graph for each individual annotator. In the graph each node corresponds to a datapoint. In order to avoid encoding the subjective biases, we take the following simplest rule for forming the edges — two nodes will be connected by an edge if and only if the two datapoints receive identical nonzero rating. That is, $$w_{ij}^{(m)} =
\begin{cases}
1 & \text{if node i and j has nonzero identical score by annotator m} \\
0 & \text{otherwise}.
\end{cases}
\label{eq:graphweight}$$
This weight assignment captures the proximity of the datapoints in a higher dimensional space. The more annotators agree with this proximity information, the closer the datapoints are considered to be. To capture this structure, we formulate the final neighborhood graph by averaging the proximity weights $w_{ij}^{(m)}$ between nodes $i$ and $j$ for all the annotators. Now we project the datapoints on a 1D space so that the distances among the projections preserve the neighborhood structure composed by all the $w$’s. Mathematically we want to minimize the following. $$\begin{split}
& \frac{1}{M}\sum_{m=1}^{M}\sum_{(i,j)\in E_m} w_{ij}^{(m)}(y_i - y_j)^2 \\
= & \frac{1}{M}\sum_{m=1}^{M}\mathbf{y}^T L_m \mathbf{y}\\
= & \mathbf{y}^T \left( \frac{1}{M}\sum_{m=1}^{M} L_m \right) \mathbf{y}\\
= & \mathbf{a}^T X L_{\text{avg}} X^T \mathbf{a}
\label{eq:ObjFun}
\end{split}$$ where, $L_m := D_m - A_m$ is called the graph Laplacian for $m^{\text{th}}$ annotator graph. $D_m$ and $A_m$ are the degree matrix and adjacency matrix respectively for the $m^{\text{th}}$ annotator graph. As the graphs are undirected, so $A_m$ is symmetric. $D_m$ is obtained by performing row or column-wise sum and then placing the sums in the diagonal. As the degree of the nodes capture a natural measure of node importance, we impose a constraint $\mathbf{a}^TX D_{\text{avg}} X^T \mathbf{a} = 1$. Here $D_{\text{avg}}$ is the average degree matrix for all the annotators. Therefore, the optimization problem becomes: $$\begin{split}
\operatorname*{\arg\!\min}_{\mathbf{a}} \quad & \mathbf{a}^T X L_{\text{avg}} X^T \mathbf{a}\\
s.t. \quad & \mathbf{a}^TX D_{\text{avg}} X^T \mathbf{a} = 1
\end{split}
\label{eq:Optimization}$$
Optimization {#sec:opt}
============
We use Lagrange multiplier to construct the objective function as follows: $$\mathcal{L}(\mathbf{a}) = \mathbf{a}^T X L_{\text{avg}} X^T \mathbf{a} + \lambda (1 - \mathbf{a}^TX D_{\text{avg}} X^T \mathbf{a}).
\label{eq:opjFun2}$$ As both the Laplacian matrix and Degree matrix are positive semi-definite, $\mathcal{L}$ is a convex function of $\mathbf{a}$. Therefore, differentiating $\mathcal{L}$ with respect to $\mathbf{a}$ and setting to zero we get, $$\frac{\partial \mathcal{L}}{\partial \mathbf{a}} = 2X L_{\text{avg}} X^T \mathbf{a} - 2\lambda X D_{\text{avg}} X^T \mathbf{a} = 0 \implies X L_{\text{avg}} X^T \mathbf{a} = \lambda X D_{\text{avg}} X^T \mathbf{a}.
\label{eq:opjFun3}$$ Therefore $\mathbf{a}$ can be obtaining by solving the generalized Eigenvalue problem as shown in Eq. . In order to get the solution that minimizes $\mathcal{L}$, we take the Eigenvector with smallest corresponding Eigenvalue.
Algorithm
=========
From the discussions in Section \[sec:probfor\] and Section \[sec:opt\], we can formulate an algorithm for computing the intended 1D embedding. We show it in Algorithm \[algo:denoise\].
**Initialize:** $A_{\text{avg}} \leftarrow \frac{1}{M}\sum_{m=1}^{M} A_m$ Construct a diagonal matrix, $D_{\text{avg}}$, with entries $\sum_{\text{rows}}A_{\text{avg}}$ $L:= D_{\text{avg}} - A_{\text{avg}}$ Calculate Generalized Eigenvalue solution for Eq. Return normalized Eigenvector with smallest corresponding Eigenvalue
Data
====
We apply the algorithm on the following two datasets:
- Job interview dataset [@Hoque2013], and
- Public speaking dataset [@Tanveer2015].
We used the annotators’ response on the overall performance of the study participants. The data matrix, $X$, for both datasets are shown in Fig. \[Fig:datasets\]. There are 4 annotators and 138 datapoints (participants) in the job interview dataset. It is particularly evident from the picture of job interview dataset that the annotator 1 and 4 have a tendency to give higher rating than annotator 2 and 3. In the public speaking dataset, there are 15 annotators and 51 datapoints. However, there are a number of missing values (rating is zero) in the public speaking dataset.
![Job Interview Dataset (Left) and Public speaking Dataset (Right)[]{data-label="Fig:datasets"}](./figures/jint_data.pdf "fig:"){width="0.45\linewidth"} ![Job Interview Dataset (Left) and Public speaking Dataset (Right)[]{data-label="Fig:datasets"}](./figures/pspeak_data.pdf "fig:"){width="0.45\linewidth"}
Results
=======
The results for the job interview dataset are shown in Fig. \[Fig:jint\_result\]. The topmost row shows the original data matrix ($X$) on the left and the average of annotators’ scores on the right.
![Results of denoising for Job Interview Dataset[]{data-label="Fig:jint_result"}](./figures/jint_result1.pdf){width="\linewidth"}
In the second row, we sort the datapoints in ascending order of the mean ratings for representational convenience. The columns of the data matrix is also sorted accordingly. We also plot the denoised values of the ratings (i.e. the projected values obtained by the proposed algorithm) in red markers. It is interesting to notice that the projected values follow a flipped sequence than the mean ratings. This is due to the fact that our proposed optimization algorithm selects an embedding by only preserving the relative neighborhood among the datapoints. It does not preserve the absolute values. Consequently, the datapoints might arbitrarily take positive or negatively correlation with the mean values. However, in practice, it is not of a big concern as we can always flip the sequence by subtracting all the values in the sequence from the maximum allowable rating.
The third row represents the data matrix and the accumulated plots which are sorted based on the denoised ratings. If we compare the scatter plots (right hand side plot) of the second row with the third one, it is evident that the denoised ratings give finer discrimination among the datapoints than the mean values. As there are only four annotators, the means cannot discriminate among the datapoints less than $\frac{1}{4}^{\text{th}}$ of the ratings. As a result, significantly more datapoints receive same rating (notice the blue line on the right hand plot of the second row). However, as the denoised ratings consider the neighborhoods of the datapoints, it can discriminate with finer detail (notice the red line on the right hand plot of third row).
In the fourth row, the denoised ratings are flipped by subtracting them from the maximum rating, 7. This made the denoised ratings to be positively correlated with the mean values of the ratings. The datapoints were resorted in ascending order of the flipped denoised ratings.
In Fig. \[Fig:pspeak\_result\], we show similar results for public speaking dataset. While calculating the mean, we totally omitted the missing values so that they do not bias the mean ratings. In this dataset, the mean values are capable to show finer discrimination than the job interview dataset. This is due to the higher number of annotators. An interesting phenomenon is that the denoised ratings particularly enhanced the poor quality of three datapoints (notice the three leftmost points in the red line on 2nd row) while the mean ratings “smooth out” the differences.
![Results of denoising for Public Speaking Dataset[]{data-label="Fig:pspeak_result"}](./figures/pspeak_result1.pdf){width="\linewidth"}
Future Work and Conclusion
==========================
In this project, we proposed a novel technique for summarizing the annotators opinion. The technique employs graph structure which captures the relative neighborhood among the datapoints. We applied the techniques on two datasets and compared with simple mean ratings.
In future, we will try to apply this technique with ground truth information of subjective data. Having the ground truth will enable us to better quantify the quality of this metric.
|
{
"pile_set_name": "ArXiv"
}
|
The invention relates to a hydraulic temperature compensator. The invention further relates to a hydraulic stroke transmitter having such a hydraulic temperature compensator, in particular an injector.
In order to introduce a desired volume of fuel into arbitrary combustion processes it is generally necessary to use injectors by which it is possible to meter a fuel quantity. Since very many combustion processes execute by the direct injection of fuel that is maintained under high pressure, particularly fast operating actuators are frequently used which drive injectors. This means that an actuator generates a stroke which for example actuates an injector needle which in turn opens a valve and releases a fuel at predetermined time intervals and in adjustable volumetric flow rates for a combustion process. Combustion air is supplied separately in this case.
Injectors for high-pressure direct injection frequently employ high-speed actuators for this purpose, such as “piezoelectric multilayer actuators” (PMA) for example. These are solid-state actuators, the central element of which is composed of a plurality of piezoelectric layers. Also known are so-called magnetostrictive solid-state actuators, which exploit a magnetic-mechanical effect in order to generate a stroke. For generating a stroke it is important that solid-state actuators of the type have a stroke that is too small for opening an injector needle to such an extent that the desired fuel quantity is introduced. This develops into a major problem, particularly in the case of gas injectors, which require a longer stroke than injectors that meter liquid fuel. The consequence is that only designs including a stroke transmitter are given consideration.
An additional aggravating factor when hydrogen is used as the fuel is that the small and lightweight hydrogen molecule easily diffuses through nonmetallic elements such as rubber diaphragms. The choice of a suitable stroke transmitter therefore becomes a central problem in the building of injectors. This also results from the fact that a transmitter determines many characteristics of an injector and in contrast to an actuator can be redesigned in terms of its structure.
In related art solutions to the problem an increase in stroke is achieved by mechanical transmission or by partially nonmetallically sealed hydraulic transmission. Mechanical transmitters, which for example use a mechanical lever, are generally susceptible to wear and tear and to undesirable vibrations. This applies in particular when an idle stroke is required between actuator and transmitter, for example in order to prevent a leakage which could occur in the event of a thermal change in length due to heating. As a result thereof the actuator will for example strike a nozzle needle, thereby unfavorably affecting the injector. Uneven injection and unreliable opening and closing characteristics are the consequence. An idle stroke between actuator and transmitter is also undesirable because the actuator deflection up to the point of contact with the nozzle needle remains unused.
An increase in the stroke of an actuator having a transmission ratio of less than 1:2 is often realized by mechanical levers. With injectors for diesel engines, for example, the mechanical transmission ratio can amount to 1:1.6. Gas injectors typically require greater transmission ratios. Hydraulic transmitters, also referred to as hydraulic levers, are used in gas injectors in most cases. A stroke transmission ratio of 1:6 is used for example in the case of direct injection of CNG (compressed natural gas).
Using a hydraulic transmitter enables the idle stroke to be avoided, with the result that the functional chain between actuator and nozzle needle is permanently present. This is reflected directly in the mechanical engineering design. Considered from a different angle, the deflection of the actuator is utilized and converted to a greater extent by the injector.
A disadvantage in the related art, in the automotive engineering sector for example, is the wide temperature range to be considered, which can range from −40 C.° to +150 C.°. In the consideration of fluid volumes, this can be associated with significant changes in volume. Peak values can lie significantly in excess of a 30% increase in volume. For this reason hydraulic stroke transmitters require a connection to a reservoir in most cases.
The unexamined German patent application publication DE 10 2005 042 786 A1 discloses for example a fuel injector which is equipped with a hermetically sealed hydraulic system. In this publication the use of so-called “guided pistons” is described. Guided pistons of this kind necessitate a high degree of mechanical precision in manufacture and are very susceptible to wear and tear.
|
{
"pile_set_name": "USPTO Backgrounds"
}
|
Chrome: Google's chat feature is useful for sending quick IMs and starting video chat sessions, but you can only view it when you're on a Google page like Gmail. Google has released an official Chrome extension that detaches it from your browser, allowing you to view it no matter what web page you're viewing.
This extension has actually been out for awhile, but was Chrome OS only. Now, you can grab it for Chrome on other platforms, letting you carry on chats, make voice calls, and even start Google Hangouts right from your desktop (my personal favorite feature). It doesn't have support for phone calls with Google Voice, which is kind of a bummer—that would take this from "cool" to "fantastic"—but it's helpful all the same, especially if you're tired of switching back to your Gmail tab to chat. Hit the link to check it out.
Chat for Google is a free download, works wherever Google Chrome does. Of course, if you want more than just Google Talk on your desktop, you can always install a multi-protocol instant messaging client like these instead.
Chat for Google | Chrome Web Store via #tips
|
{
"pile_set_name": "OpenWebText2"
}
|
Q:
change the format of the date inserted by PHP into MySQL database
I am trying to insert the current date into MySQL database in this format: (12/31/2013 10:26:12 PM). I've tried to make a simple code to change the format, but all I get is a syntax error
$sql = "INSERT INTO Students
VALUES
('','" . $info[$i]['firstname'] . "', '" . $info[$i]['lastname'] . "',
'" . $info[$i]['sex'] . "', '" . $info[$i]['major'] . "',
'" . $info[$i]['favorite'] . "', '" . $info[$i]['GPA']
"TO_CHAR(SYSDATE(),'dd/mm/yyyy')";
Tell me please what shall I do with it.
A:
Just try this
$sql = "INSERT INTO Students VALUES ('','" . $info[$i]['firstname'] . "', '" . $info[$i]['lastname'] . "', '" . $info[$i]['sex'] . "', '" . $info[$i]['major'] . "', '" . $info[$i]['favorite'] . "', '" . $info[$i]['GPA'] . gmdate('m/d/Y g:i:s A').")";
or try this one
$sql = "INSERT INTO Students VALUES ('','" . $info[$i]['firstname'] . "', '" . $info[$i]['lastname'] . "', '" . $info[$i]['sex'] . "', '" . $info[$i]['major'] . "', '" . $info[$i]['favorite'] . "', '" . $info[$i]['GPA'] ."', '" . gmdate('m/d/Y g:i:s A').")";
You can also change gmdate with date
Have A nice day
|
{
"pile_set_name": "StackExchange"
}
|
Nearly 90 percent of students who attend a top-ranked university earn a bachelor’s degree in four years. While these undergraduates may well be among the best and brightest, they also get kid-gloves treatment. If they run into trouble, an army of helpmates stands at the ready. “From moving day as a freshman through graduation and beyond,” Harvard assures its students, “our advisers are here to help and support you at every step.”
The situation is entirely different for most undergraduates, especially poor and minority students. All too often they’re steered to schools where they receive little if any support in mastering tough courses, decoding arcane requirements for a major, sorting out life problems or navigating the maze of institutional requirements. Graduation rates at these so-called dropout factories, especially those in urban areas that largely serve low-income, underprepared minority populations, are as abysmal as 5 percent.
Where a student goes makes all the difference. Consider a Chicago public high school graduate with a grade-point average of 3.5. If she enrolls at Chicago State University, a Washington Monthly investigation shows, the odds against her finishing are high — the school’s six-year graduation rate hovers at 20 percent. Her chances measurably improve if she attends the University of Illinois at Chicago, where the completion rate is 57 percent. And if she goes to Northwestern, just a few miles away, 93 percent of her classmates will graduate.
Six years ago, CUNY decided to confront the high dropout rate at its community colleges with the ASAP initiative. The results are stunning: 56 percent of the first two cohorts of more than 1,500 students have graduated, compared with just 23 percent of a comparable group that didn’t have the same experience. What’s more, most of those graduates are currently pursuing a bachelor’s degree.
The program for community-college students addresses money issues, which are typically students’ top concern, by covering tuition that’s not paid for by federal and state grants, as well as paying for public transit and giving students free use of textbooks, saving them upward of $900 a year. To help balance the demands of college with work, life and family obligations, students take their classes in a consolidated course schedule (morning, afternoon or evening).
|
{
"pile_set_name": "OpenWebText2"
}
|
Michael Chorost
Michael Chorost (born December 26, 1964) is an American book author, essayist, and public speaker. Born with severe loss of hearing due to rubella, his hearing was partially restored with a cochlear implant in 2001 and he had his other ear implanted in 2007.
He wrote a memoir of the experience, titled Rebuilt: How Becoming Part Computer Made Me More Human (Houghton Mifflin, 2005, ). Its paperback version has a different subtitle, Rebuilt: My Journey Back to the Hearing World, . In August 2006 Rebuilt won the PEN/USA Book Award for Creative Nonfiction.
His second book, World Wide Mind: The Coming Integration of Humanity, Machines, and the Internet, , was published by Free Press on February 15, 2011.
Dr. Chorost has published in Wired, New Scientist, Astronomy Now, The Futurist, The Scientist, Technology Review, the Chronicle of Higher Education, and SKY. He co-wrote a PBS television show titled The 22nd Century which aired in January 2007. He was a member of the San Francisco Writers Workshop.
Dr. Chorost is frequently interviewed as an authority on cochlear implants and neurally controlled prosthetics by national media such as PBS Newshour, the New York Times and The Economist.
He lectures frequently at universities, conferences, corporations, and organizations for the deaf.
Born in New Jersey and educated at Brown University and the University of Texas at Austin, he now lives in Washington, DC with his wife and two cats.
References
External links
Official web site
Review of WORLD WIDE MIND, New York Times, Feb. 14, 2011
New York Times, Robo-Legs, June 20, 2005.
Will 'Bionic Bodies' Offer High-Tech Hope to the Disabled?,PBS Newshour, June 28, 2011
Humans hope high tech can improve their bodies,San Francisco Chronicle, January 1, 2009.
Sounds like a good idea, Economist, March 6, 2008
Category:1964 births
Category:Cyborgs
Category:Living people
Category:University of Texas at Austin alumni
Category:University of San Francisco faculty
Category:American male writers
Category:Brown University alumni
|
{
"pile_set_name": "Wikipedia (en)"
}
|
Johnny Reggae
"Johnny Reggae" is a 1971 novelty song credited to The Piglets. The single cover states that it was "conceived, created, produced and directed by Jonathan King". It was released on Bell Records.
The credits for the main female vocals are unclear. They were attributed at various times to various artists, most frequently to the actress Adrienne Posta and at times to Wendy Richard and to Kay Barry; some claim that the vocalists were trained (anonymous) session singers coached to sound like teenage girls. King himself in his autobiography 65 My Life So Far says it was, indeed, session singers with the lead vocal performed by Barbara Kay, then in her 40s.
Track list
Side A: "Johnny Reggae"
Side B: Backing track (of the song)
Chart positions
Covers and adaptations
In 1972, The Roosevelt Singers adapted the song adding new lyrics and music although relying mainly on the theme and music of the original. Titled "Heavy Reggae (Johnny Reggae)" it was Side A of a release on Sioux Records, with Side B being "Smoking Wild" by The Hong Gang.
References
Category:1971 singles
Category:Songs written by Jonathan King
Category:Novelty songs
Category:1971 songs
Category:Bell Records singles
Category:Song recordings produced by Jonathan King
|
{
"pile_set_name": "Wikipedia (en)"
}
|
Shore Sweep Volunteers Needed for Advance Scouting
Written by Robert Sutherland
The Lake Lanier Association orchestrates a thousand Shore Sweep volunteers to collect trash from Lake Lanier annually. Although this year’s event on Saturday, September 15, 2018 is officially scheduled from 8 AM until 1 PM, they could use your help even before the big day.
Shore Sweep Volunteers
Volunteers are invited to pre-register. That way, organizers can maximize your time for this great cause. Please email shoresweep@lakelanier.org with the following information:
Name
Email address
Phone number
Number of adults and number of children in your group
Which location are you reporting to? (See list of Shore Sweep locations below.)
Will you collect trash by boat OR by land?
If by boat, what type of vessel?
Bring a pair of gloves and wear clothes that you won’t mind getting dirty. Please wear shoes that aren’t too flimsy to work in.
Volunteers will be given trash bags at many locations around the lake. Lanier Islands allows free access to volunteers through their main gate to rid their shoreline of junk and garbage.
There are 11 participating locations that you can choose to report to volunteer:
Bald Ridge Marina, by the boat ramp, next to the gas dock
Aqualand Marina, around to the south eastern corner of the Aqualand property, by the maintenance yard boat ramp
Gainesville Marina, at the top of the sales dock
Port Royale Marina, at the gas dock
Lanier Islands Park, along the front entrance roadway
Balus Creek Boat Ramp
Big Creek Boat Ramp
Don Carter State Park, by the boat ramp close to the cabins
Gwinnett Park, across from Lanier Park beach at Saddle Dike #2
Longwood Park, at the boat dock
War Hill Park
Shore Sweep Advance Scouting
Advance scouting reports help dispatch volunteers on the day of the event. Can you scout Lanier’s shoreline by boat and report back to us locations where trash and debris is sighted? You will need a motor boat and a lake map that you can write on.
Advance Drop-Off Locations
There are several advance drop-off locations around the lake where volunteers can bring bagged trash or large items. Barges will pick up properly bagged items. This is an easy way for everyone to make a contribution to the cause.
THEY ONLY ACCEPT TRASH WHILE THE SHORE SWEEP SIGNS ARE IN PLACE. Please DO NOT bring trash to these locations other times of the year.
If you bring trash to any of these locations, please leave the debris close to the signs.
The coordinates are from the Atlantic Mapping Recreation and Fishing Guide for Lake Lanier.
If you cannot volunteer before or after Shore Sweep, that’s okay. How about this? The next time you see improperly discarded trash around Lake Lanier, toss it in the garbage. That will make less work for everyone at next year’s Shore Sweep event.
Robert Sutherland
Robert J. Sutherland is a travel writer enjoying life in Gainesville, GA.
Robert has two adult daughters, seven practically perfect grandchildren and a zippy Kawasaki. Contact Robert at RJSutherland@hotmail.com.
|
{
"pile_set_name": "Pile-CC"
}
|
Posterior epidural migration of herniated lumbar disc fragment.
Posterior epidural migration of a free disc fragment in the lumbar region is a very rare condition that has only been reported in isolated cases to date. Patients with this condition present with radiculopathy or major neurological deficits. Difficulties in diagnosis and the choice and timing of surgical treatment are important in these cases. In this clinical case series, features of cases with posterior epidural migration of free lumbar disc fragments accompanied by cauda equina syndrome are discussed. Eight cases (0.27%) of posterior epidural migration of disc fragments were detected among 2880 patients surgically treated for lumbar disc herniation between 1995 and 2008. Seven of these patients had cauda equina syndrome. The mean duration of symptoms in the 8 cases was 4.2 days (range 1-10 days). The group included 6 men and 2 women, with a mean age of 48 years (range 34-72 years). The sequestered disc fragments were at the L3-4 level in 6 patients (75%) and the L4-5 level in 2 (25%). Magnetic resonance imaging showed tumor-like ring contrast enhancement around sequestered fragments in 5 patients. The patients' motor, sensory, sexual, and urological functions were evaluated postoperatively, and modified Odom criteria and a visual analog scale were used in the assessment of postoperative outcomes. A microsurgical approach was used in all cases. Sequestrectomy with minimal hemilaminotomy and removal of the free segments were performed. The patients were followed up for a mean period of 28.5 months. Three patients (37.5%) had excellent results, 3 (37.5%) had good results, 1 patient (12.5%) had fair results, and only 1 patient had poor results according to the Odom criteria. The main factors affecting the long-term outcomes were the presence of cauda equina syndrome and the time period between onset of symptoms and surgery. Patients with posterior migration of a disc fragment present with severe neurological deficits such as cauda equina syndrome. Because the radiological images of disc fragments may mimic those of other more common posterior epidural space-occupying lesions, definite diagnosis of posteriorly located disc fragments is difficult. All of these lesions can be completely removed with hemilaminotomy and sequestrectomy, and early surgical treatment is important as a first choice to prevent severe neurological deficits.
|
{
"pile_set_name": "PubMed Abstracts"
}
|
Yamaha YBR125
The Yamaha YBR 125 is a light motorcycle made by Yamaha that succeeds its previous model for this segment, the Yamaha SR125. Introduced in 2005, it comes in naked, faired and 'custom' variants. It has a single-cylinder, air-cooled, four-stroke engine, displacing . Model years up to 2007 use a carburetor system, with 2008 and on models using a fuel injection system.
Around 2010, Yamaha introduced the dual sport version of the Yamaha YBR 125. The new model was named Yamaha YBR 125 G, and it featured several off-road improvements. These include: engine and hand guards, higher front fender, anti-collision fender for the headlight and new block pattern tires.
Yamaha YS125
The Yamaha YS125 was announced in February 2017. Primarily a facelift meant to comply with Euro4 standards, Yamaha needed to do a lot of changes to the YBR125 blueprint, justifying the new moniker. The Cylinder stroke was revised from 54mm to 57.9mm, power and fuel economy increased slightly as did fuel tank capacity. Seating position is higher than its predecessor by 15mm, and the clocks are now reminiscent of a Honda CBF125, the styling appears more aggressive and more modern while maintaining that YBR125 look.
References
External links
/ at Yamaha UK
Moto travel on YBR 125
YBR125
Category:Motorcycles introduced in 2005
Category:Standard motorcycles
|
{
"pile_set_name": "Wikipedia (en)"
}
|
Links
Meta
Month: November 2013
We began this afternoon with the usual sharing of supplementary information gleaned from newspapers and Internet sources. This included developments on the theme of the cats said to have pulled Freya’s chariot, and congratulating Julie on her new dragon. In the context of our reading for the day, I had discovered a small piece of information based on Professor Rory McTurk’s research into Tolkien’s supplementing of the missing section of the Codex Regius. Brief though it is, Prof McTurk comments on the tension between Tolkien’s scholarly impulse – in which his own research concluded that 200-300 stanzas had been lost from the Codex – and his creative impulse in which he only supplies 125 stanzas.
As part of our survey of tangential and supplementary information, Laura asked if we had seen the TV programmes on the Nazis’ search for the Holy Grail, and the early 20th century discovery of a fortress city in Turkey thought to be the stronghold of the Hittites. Laura commented that the really interesting aspect of this was the discovery there of cuneiform tablets, which, when eventually translated showed a non-middle-eastern language. Rather it showed word forms for bread, water and father that were cognate with Indo-European, and particularly Germanic.
This led us back to our reading, which were the sections ‘Brynhild’ to ‘Strife’ (inclusive), and the Commentary on these. The Commentary points out that Tolkien was working across mythological material from both the north (Scandinavia) and the south.
Pat picked this up when she asked about the assertion that Odin was not originally a Norse god. Laura proposed that the ‘southern’ Germanic mythology may have derived from the migration of the Hittites northwards, since no evidence now exists to show what happened to them.
Ian expanded this view in terms of established anthropology when he suggested that as part of the process of migration this greater, more powerful culture had become mythologised.
Ian and I then remarked that both Christopher Tolkien and his father comment on the northern and southern sources for the Brynhild and Sigurd myth, that both have similar elements and a later synthesis was attempted. But Tolkien tries to establish consistency in his poem.
Pat drew our attention to the earlier’ Regin’ section when she noted the different vocabulary assigned to the Raven – who croaks of hardship, and the Finch who twitters mostly about Brynhild and beauty.
Ian commented on the fairy-tale elements in the sections we had chosen for the meeting, particularly the ‘who is the fairest of them all’ wrangle between Brynhild and Gudrun while they were washing their hair in the Rhine.
The matter of Odin’s Thorn – which is said to have put Brynhild to sleep – the ‘Sleeping Beauty’ motif, gave rise to Ian sharing a bit of Yorkshire dialect. It appear that a splinter under the skin is known in his native dialect as a ‘spell’, and this use of the word derives from Old Norse.
Pat then asked us if we thought fate was stronger love. It rather stumped us, until Laura observed that Tolkien’s poem shows that Odin has decided what will work out best for him at Ragnarok, so he arranges to have all the greatest heroes apparently taken at the height of their powers. Ian, however, remembered his Anglo-Saxon and reminded us that Maxims II declared that ‘wyrd’ (fate) is strongest.
In the section ‘Brynhild Betrayed’ stanza 32 Pat was unconvinced that the unsheathed sword really guaranteed Brynhild and Sigurd’s chastity when they shared a bed.
Angela asked in regard to this whole narrative situation whether oath-breaking counts if it is accidental. The matter of oath-breaking in the story becomes very complicated. Brynhild’s does not seem to be intentional, neither is Sigurd’s, but the result of being given an enchanted drink.
Chris then drew our attention to many instances where Tolkien seems to introduce a phrase or idea which he then reuses in LotR. This links into the matter of oath-breaking through the frequent repetition of the line regarding oaths in the poem ‘all fulfilled them’, which will be used again in RotK. However, it is reversed with considerable impact in the dialogue between Brynhild, Gunnar and Högni when Gunnar declares:
Evil wrought Sigurd
oaths he swore me
oaths he swore me.
all belied them.
Angela noted with regard to Brynhild a significant change of wording when she describes herself as ‘queen of yore’, suggesting her high rank before her marriage, but then she declares herself ‘queen no longer’ in spite of her queenly status in marriage once the betrayal is known.
Pat noted echoes of Beowulf in Section VII ‘Gudrun’ in the description of the ships and splendid halls, and Pat, Ian and I noted the reference to horses hooves creating ‘stonefire’, sparks, an image Pat and I remembered from Sir Gawain and the Green Knight. However, Ian remembered the concept of ‘stonefire’ from Spenser’s Faerie Queene, and defined as a sign of a faerie element in the story.
Angela noted another case of repetition in the same section: ‘In came Gudrun’ Ian observed the significance of repetition for emphasis, but also for the possibility in literature of reliving a moment, which is impossible in real life. Chris noted that the repetition in this case is divided between stanzas 38 and 39, and the first half of 38 and second half of 39 are a gloomy depictions of Sigurd as he drinks the witch-brew that will ensure he betrays Brynhild with Gudrun. Tim remarked that the 2 stanzas give 2 different perceptions of Gudrun.
Pat picked up one word from these 2 stanzas for special comment. It was ‘glamoured’. Laura thought it sounded too much like Middle English with its French influence to fit well into the Germanic myth. Julie added that ‘rowel’ seemed also unfitted to the ancient tale. Ian wondered on the other hand whether Tolkien was simply choosing the right word for his purpose.
Angela remarked that the –hild name suffix, as in Brynhild, is used sparingly but is used in LotR in some names among the Rohirrim.
Ian commented that in section IX ‘Strife’ stanzas 44-6 recapitulates the narrative as Brynhild and Gunnar discuss Sigurd’s betrayal of his oaths to them. I thought it made a very lively dialogue.
Ian thought that throughout the poetry showed a very condensed word use.
Julie remarked that the hair-washing episode picked up what she saw as Tolkien’s fascination with hair – repeated again in the mingling of Eowyn and Faramir’s hair in Minas Tirith.
Mike wondered if the repeating of the defending sword story was inflected with bitterness.
Repetition throughout the sections, we noted, was by no means a simple rhetorical device. And at times the (mainly) 8-line stanzas break into contrasting groups of 4 lines.
Our next meeting will not be until January 11th, when we will finish reading the book. Our next text after that will be The Fall of Arthur, followed by Finn and Hengist, and then Lost Tales Part 2.
Thanks were due to Mike (via email and via Julie) and to Laura for information regarding Beowulf – a topic that has inevitably cropped up when we have compared Tolkien’s adaptation of the Norse poetic style with the Old English style.
Our reading this week where the sections from ‘Signy’ to ‘Regin’ inclusive, and including the related sections in the Commentary. Included in this report are some of Ian’s comments as he could not be with us, and some of Carol’s. The rest of Carol’s comments will again be added after the main report, as will Ian’s other brief comment.
Angela began our discussion with her observation of the similarity between the sections dealing with the broken sword and the special child in ‘Regin’ section, and the forging of the shards of Narsil for Aragorn; with the references to flame and fire and the meaning of ‘Anduril’ as ‘flame of the west’.
Carol commented: ‘I don’t thing Tolkien was consciously cribbing the cursed ring, the dragon, the sword. It was just deep down in his consciousness and he used it subconsciously.”
Angela also picked out the incest motif in ‘Signy’, comparing the intentional taboo relationship between Signy and Sigmund with the unintentional relationship of Turin and Nienna and their distraught responses.
The important incest theme called up interesting comparisons. Laura mentioned the Pharaohs and their institutionalised protection of the blood line by ‘pure breeding’. Tim added the destructive inbreeding of the Habsberg dynasty leading to genetic disaster. Chris and Angela noted the problems thrown up in Iceland on account of the relatively small population. Angela also remarked on the possibility of problems among the small surviving population of the Rangers and the very apparent problems created when the purity of the blood-line was diluted.
Tim drew attention to the problem of the theory of Eugenics implicit in all these observations, which would have been roughly contemporaneous with the writing of Sigurd and Gudrun.
Carol remarked by email “poor Signy, nobody asks her opinion, bit like Eowyn about being steward to her people while the men are away fighting , but at least she wasn’t married off for convenience. When she does speak it’s dismissed as ‘woman’s boding’. And the reference to the ‘bounden word’ is to Volsung’s not Signy’s.” Carol continued to look at the treatment of female characters, observing: Of women fairest/in war taken/a wife took Sigmund;/woe she brought him. If they take women against their wills after killing their kin, then they deserve everything they get. Carol did remark then – sorry to the so ‘feminist’ and I know I should take it in context but we really have been a much maligned gender – across cultures and we can’t wholly blame Adam and Eve.
Laura commented on the paradoxes in the creation of the character if Signy, who is not just a ‘victim’ of her society’s treatment of women, but has a brutal side to her in her attitude towards her own offspring. I suggested we might need to understand her as a mythic being fulfilling a necessary role in that myth.
We discussed the form of Sigmund and his son/nephew Sinfjotli, when they are described in terms of werewolves and wolves generally. Angela and Carol and I noted the parallels between the fate of Sigmund and his brother and that of – here we all struggled to remember the story – was it Barahir, Beren, and their comrades, and were they in Angband, or Sauron’s stronghold? I have checked, and in The Silmarillion Sauron captured Beren and Felagund and their 10 companions and threw them into a pit where a werewolf came and devoured the companions. Finally Felagund killed the beast when it came for Beren but was mortally injured.
Pat thought the description of Sigmund and Sinfjotli as a threat outside the hall of Siggeir was reminiscent of the description of Grendel outside Heorot in Beowulf. Tim compared the fear of Grendel to the uncontrolled fear of wolves in northern societies.
Laura and Julie both picked up the description of Odin as a ferrymen; Tolkien seems to connect it with that of Charon the ferryman across the Styx in Greek mythology. But Julie observed that Odin’s role at that point in the poem is that of a psychopomp – a guide to the underworld. Laura untangled the etymology for us explaining it derived from ‘psyche’ (soul), not ‘psycho…’
We went on to consider the various references to ‘the Chosen’ and Julie suggested that their intermittent inclusion might suggest, not Tolkien trying to make Sigurd into some messianic figure, but the occasional addition of a Christian reference much as the Beowulf scribe is supposed to have interpolated Christian motifs into his text.
Pat wondered if the stanza concerning Sinfjotli’s voyage to Valhalla in ship ready to bear him, had echoes of Frodo’s last voyage. Laura perceived echoes of the ship funeral of Scyld Scefing in Beowulf.
I than remarked that Tolkien had set the whole story out in a form that looked more like drama than ‘just’ a poem because narration often plays a smaller part than dialogue. Tim added that the poem was not set out to convey the impression of a bard speaking it.
Pat remarked on the ‘abrupt’ style of the composition, and Ian in his emailed comments described it Thus: “With regard to ‘The Legend ‘ I am quite taken by the ‘staccato’ delivery of the story. It reads (to me that is) almost like a graphic novel, with each stanza as a separate frame containing visual cues.”
Carol remarked that “The telling is immediate, deals only with quick action, covering many years; dare I say it, rather like a child’s telling.”
Tim observed that in Tolkien’s case a few words can paint a vivid picture. Chris observed that Tolkien strips his sources to create a condensed narrative. Kathleen, however, commented that the flow of the story was made difficult because so many bits had been left out.
Julie went on to note the presence of the kenning ‘dew of battle’, and found its echo in Tolkien’s reference ‘red fell the dew in Rammas Echor’.
Tim noted that the reference to Sigmund’s second wife having many suitors was an echo of the fate of Penelope in the Odyssey. And I wondered about the extent of classical sources that seemed to be appearing in the poem. Time then compared the description of Odin as ‘A warrior strange …/standing silent…/ and hooded darkly’ to the familiar description of Aragorn when Frodo first encounters him.
Laura and Kathleen then took up the theme of the many instances of injustice that characterise this version of the northern myths. Chris noted what he suggested might be a case of Regin the fratricide attempting to justify himself to himself through his intention of killing Sigurd, even though he had urged Sigurd to commit murder. Pat likened the murderous tendencies of one brother against the other to the biblical myth of Cain and Abel.
We were, of course, dealing now with the confrontation between Sigurd and Fafnir the dragon (Regin’s transformed brother), and the upthrust with which Sigurd kills the creature was likened by Chris to Sam’s wounding of Shelob. Angela added Turin’s upthrust which mortally wounded Glaurung, and Laura widened the likekness when she drew attention to the way Fafnir. Glaurung and Smaug ruin the countryside.
Angela and Laura questioned the sudden inclusion of the Helm of Horror in the poem. It seems to come from nowhere, but could be extrapolated to be a folk-memory of the first time a shiny helmet of Roman (or Greek) fashion was used against northern tribes. Its likeness to Turin’s Dragonhelm was considered.
Our next reading will be the sections from ‘Brynhild’ to ‘Strife’, inclusive, and with the parts of the Commentary that relate to them.
Carol’s and Ian’s comments:
Carol’s:
Sigurd – Regin
Synopsis – sounds like the scenario of a modern soap only with different means – dragons, cursed gold etc. but the attitudes are just the same – duplicitous, stubborn, vengeful.
First 4 lines, st. 1 reminds me of Eol [the lines are: ‘The forge was smoking / in the forest-darkness;
/ there wrought Regin / by the red embers.’]
I like the hoard/heard, fell/fill, gold/weregild, rede/roads, regin/rogue, ride/road.
Stanza 32 – ‘bale’ – we don’t use bale now but sometimes baleful. I’d like to see the old-fashioned words used like before: ‘ruth’ we only use ruthless now, apart from the girl’s name. st. 33 ‘glamoured’ – glamour originally meant a sort of magical falsifying. Now it means beautiful, chic, and physical falsifying as in make-up.
Stanzas 41-4 – Sigurd can now understand birds like Bard in The Hobbit but the birds’ messages are harsher by far.
All the blood-letting and drinking: do violent modern films qualify as successors. Has the audience always had a taste for blood and violence – yes, look at the Roman circus. Aren’t we a vicious lot.
Ian’s:
Re. the Commentary, I note with interest the liberties Tolkien took in re-ordering events from the original text.
|
{
"pile_set_name": "Pile-CC"
}
|
Tech
3D Printers Help Build Robohand for 5-Year-Old
Liam Dippenaar couldn't catch a ball with both hands. Holding two objects at once was a feat and, though right-handed, the 5-year-old used his left. Born with Ambiotic Band Syndrome, Liam lacks the instrument critical for most tasks: fingers.
Thanks to two strangers halfway around the world and the magic of 3D printing, Liam is now able to color and write to his heart's content. Ivan Owen and Richard Van As created Robohand, an open-sourced device built with customized prosthetic fingers.
Owen, of Washington state, and Van As, of South Africa, collaborated via the Internet to create the prosthetic. The duo decided to make the design in the public domain to help others who can benefit from the technology.
Their journey started in 2011, when Van As came across a video of Owen's costume piece, a robotic hand built for amusement. Van As lost most of the fingers on his right hand in a woodworking accident and cast a net out for those willing to help build a prosthetic. Owen was the only one who agreed.
"I had started with the first prototype prior to meeting Ivan. But yes, there were so many obstacles and one of the main ones was contacting people and them just saying, 'No, it can’t be done,'" Van As tells Mashable. "People are not keen to think outside the box. Best to cut your whole hand off and not just your fingers because there’s a better chance of finding something out there if you’re missing the whole hand."
Long nights on Skype and a 10-hour time difference took some getting used to, but the two kept the project going through email and file sharing. Owen and Van As initially used a milling machine and spent hours engineering parts until MakerBot donated two Replicator2 Desktop 3D Printers.
The donation exponentially cut production time for prototypes. What used to take up to three days to complete can now be done in only 20 minutes. Using OpenSCAD, a free software application, Owen and Van As can exchange files and make changes in minutes.
"We love to see our printers being used for amazing life-changing and life-validating projects like this," Howard says.
The two men document their progress on a blog called "Coming up Short Handed." Liam's mother, Yolandi, saw the site and reached out to Van As for help. Liam, who has no fingers on his right hand, received his own Robohand at no cost after several trials and prototypes.
"At first it was quite amazing to see the smile on his face when they made the first prototype and he put it on his hand," Yolandi says. "His expression was, 'Oh wow, it’s copying me.' There's been days that I am actually speechless. I think this can help so many people out there, especially kids."
The hand operates with cables and pulleys, and is made of nontoxic, biodegradable, printable plastic. As Liam grows, a new, scalable Robohand can be printed in a matter of minutes.
High-tech prosthetic designs available on the market can cost up to $60,000. The Robohand cost the team approximately $150 to make, but they're giving the design out for free on Thingiverse and are willing to help anyone at no fee, if funds permit.
"It’s not something we plan to market," says Van As, who uses an adult version of the hand. "If you want one, we’ll help you. There’s lots of people out there that have got 3D printing experience and there’s lots of people who have got 3D printers. That’s something that’s certainly taken over."
Individuals from France, Thailand and Canada have contacted them for assistance. Van As and Owen raised more than $10,000 of the $50,000 goal on their Fundly page, where money will go toward additional research and prototype improvements.
The duo is in the process of fitting a hand for another South African child, Eden, also born with Ambiotic Band Syndrome.
"We're exploring how can we best get this to as many people as possible, utilizing the least amount of resources," Owen says. "Hopefully there'll be people that use this technology to approach other problems as well. There’s definitely a need for it all over."
What's Hot
More in Tech
What's New
What's Rising
What's Hot
Mashable
is a leading source for news, information and resources for the Connected Generation. Mashable reports on the importance of digital innovation and how it empowers and inspires people around the world. Mashable's record 42 million unique visitors worldwide and 21 million social media followers are one of the most influential and engaged online communities. Founded in 2005, Mashable is headquartered in New York City with an office in San Francisco.
|
{
"pile_set_name": "Pile-CC"
}
|
Braille Lego and Programming for the Visually Impaired
Blog post from Steve Mullarkey Course Coordinator – Level 3 Software Development and Games Programming from Shipley College
The Software Development and Games Programming course at Shipley College is constantly being updated to keep it current. One aspect of this was the increased use of visual programming tools, such as Scratch, as used in Code.org’s Hour of Code activities and Blueprints, as used by Unreal Engine 4, a state of the art game engine.
The students have all reacted very well to these new tools and this year we had eight students leave with D*D*D*, which is the highest grade possible.
However, last year we had a new student who wanted to join the course who is visually impaired – he has no light perception whatsoever. This makes anything which uses drag and drop inaccessible, as his screen reader software, Jaws, can only work with text.
I had to make a choice then;
do I say that he can’t join the course?
do I change the course to suit his needs?
do I somehow differentiate the material so he can access it?
At Shipley College we strongly believe in inclusion and so the choice was a simple one to make, but very hard to execute. We tried different approaches to find out what worked best for Callum.
Fortunately my wife has many years of experience working with assorted special needs students and gave me some great ideas on where to start.
For the scratch projects, I used laminated prints of the scratch nodes, glued to foam board, with Braille added manually using craft supplies and QR codes added to the back of each node – the goal has always been to make the resources so that Callum can work independently.
This worked really well, but it took a over a week to create the resources for an activity that took an hour. Obviously I had to find a method which I could automate.
I knew I could create 3D models of the nodes using code and started to think that 3D printing would be a possible way to automate the whole process. To test this we got the cheapest 3D printer we could find on eBay – this cost around £160 and came with no instructions but it eventually printed a 3D model of a Scratch node.
The challenge then was to add Braille to each node, along with text so that Callum’s LSA could also read what the node was to be used for. The solution for this was to print an inverted V, with text on one side and Braille on the other. To make sure they could be read the same way, the text was also inverted.
Braille-node
This was then tested by Callum and another VI student, who both said they could read the text and the Hour of Code activity worked really well. The only issue now was the reliability of the 3D printer. We needed a professional 3D printer, but we did not have the budget for this.
This is when we saw the Accessibly by Design competition on the JISC Elevator. We quickly made a video and entered the competition, the prize of £5000 would have made this project viable and was something we desperately needed.
We were overjoyed when we found out that we had won funding. Besides the funds for the printer, JISC organised four development sprint days, hosted by each of the winners. These really helped focus the development of our ideas and helped get our students not only involved in the project, but to also have valuable experience, first hand, of real development meetings. The first thing the students did was vote on a name for the project and selected ‘Project ViP’, for project Visually Impaired Programming. We managed to get the projectvip.info domain for future use too!
Working with JISC, students from Shipley College’s year two Software Development and Games Programming course worked on the design and development of the Python and OpenSCAD code to convert virtual items into physical ones. We created tools to enable not only Scratch nodes to be used, but also Unreal Engine 4’s Blueprints and Lucid Chart Flowchart symbols!
We have gone through many iterations to try and reduce print time. We have tried everything from printing as one big block, using Lego connectors and even printing each piece of text separately and mounting it on a perspex block. The latter approach is the one we have settled on, due to the current limits with 3D printing.
The students worked really hard on this project, with some of the year one Software Development and Games Programming students operating the new MakerBot Replicator.
As part of the year two students project work, they each wrote a website showing other people how to use the tools they have developed. We took the best parts from each website and added this to the ProjectViP.info website – this should be the one stop place to get more information on how to create physical objects from virtual ones.
This has been a great success, as Callum has finished the year with six distinctions and three merits! Well done to everyone involved, especially JISC for top rate support and helping us to approach the project in a structured way with clear objectives at each stage.
Shipley-college-team
Finally, we are also looking at a spin off from the main project. We are placing individual letters, with text and Braille, on top of a Lego 2 x 1 base. Lego showed some interest in this and we are now looking at how to get this to market.
Post navigation
The following information is needed for us to identify you and display your comment. We’ll use it, as described in our standard privacy notice, to provide the service you’ve requested, as well as to identify problems or ways to make the service better. We’ll keep the information until we are told that you no longer want us to hold it.Your email address will not be published. Required fields are marked *
|
{
"pile_set_name": "Pile-CC"
}
|
Dust-Off
Dust-Off is a brand of dust cleaner (refrigerant-based propellant cleaner, which is not compressed air and incorrectly called "canned air"). The product usually contains difluoroethane; although some use tetrafluoroethane and tetrafluoropropene as a propellant. It is used to blow particles and dust from computer, keyboards, photography equipment and electronics, as well as many every day household items including windows, blinds and collectibles. Dust-Off is manufactured by Falcon Safety Products located in Branchburg, NJ.
History
Dust-Off was developed and introduced in 1970 by an employee at Falcon Safety Products who discovered that the pressurized blasts used to sound the alarm in the company’s signal horns could also remove dust from photography equipment and film without having to touch the surface.
The Dust-Off compressed gas duster was first introduced to the photography market in 1970, and was marketed as a tool to blow foreign matter from photographic equipment and negatives that would not damage photographic prints during development. Due to the rise of personal computer use in the 1980s, Falcon developed Dust-Off II as a cleaning device to help rid damaging dust and lint from the new technology including screens, keyboards, CPU, and fans.
Recently, the Dust-Off brand has expanded to encompass a line of cleaners for electronic and home office equipment, with a large number of products dedicated to cleaning smartphones, tablets, PDAs, HD monitors and TV screens. Products in the Dust-Off line include screen sprays and microfiber cleaning cloths.
Inhalant abuse and efforts at deterrence
Difluoroethane is an intoxicant if inhaled, and is highly addictive. Compressed gas duster products gained attention for their abuse as inhalants, as used by teenagers in the movie Thirteen. A warning email circulated by Sgt. Jeff Williams, a police officer in Cleveland, whose son, Kyle, died after inhaling Dust-Off in Painesville Township, Ohio.
Wrestler Mike "Mad Dog" Bell died of an inhalation-induced heart attack brought on by an inhalation of difluoroethane in Dust-Off.
To deter inhalation, Falcon was the first duster manufacturer to add a bitterant to the product, which makes it less palatable to inhale but has not halted abuse. The company has also participated in inhalant abuse awareness campaigns with Sgt. Williams and the Alliance for Consumer Education to educate the public on the dangers of huffing, which includes the abuse of 1,400 different products. These efforts may have contributed to inhalant abuse being on a 10 year downward trend according to some indicators. Nevertheless 2011 data indicate that 11% of high school students report at least one incident of inhalant abuse.
References
External links
Official Dust-Off Website
Fotospeed UK Dust Off
Snopes: Adolescents huffing from cans of Dust-Off brand compressed air have died
Common Inhalants abused (Internet Archive)
National Institute on Drug Abuse
National Inhalant Prevention Coalition 1-(800) 269-4237
Category:Cleaning products
Category:Computer peripherals
|
{
"pile_set_name": "Wikipedia (en)"
}
|
07:26 HD
hot teen play with her toy in the park and squirts while people are passing by 50% 4960
|
{
"pile_set_name": "OpenWebText2"
}
|
Australian surgeons and society.
Surgery and society are living entities, forever changing and evolving. The quality of the men who served them will never change. In this brief sketch I have traced a lineage of men - men of good heart - men who have mastered their craft - men who have applied it in accordance with the ancient tradition of helping those in need - men who matched their times and the leaders of Australian society.
|
{
"pile_set_name": "PubMed Abstracts"
}
|
Surface display of acid protease on the cells of Yarrowia lipolytica for milk clotting.
The acid protease structural gene was amplified from the genomic DNA of Saccharomycopsis fibuligera A11. When the gene was cloned into the multiple cloning site of the surface display vector pINA1317-YlCWP110 and expressed in the cells of Yarrowia lipolytica, the cells displaying the acid protease could form clear zone on the plate-containing milk indicating that they had extracellular acid protease activity. The cells displaying the acid protease can be used to effectively clot skimmed milk. The highest clotting milk activity (1,142.9 U/ml) was observed under the conditions of pH 3.0, 40 degrees C, 20 mM of CaCl(2), and 10% skimmed milk powder. We found that the acid protease displayed on the cells of Y. lipolytica which has generally regarded as safe status could be easily isolated and concentrated compared to the free acid protease. Therefore, the displayed acid protease may have many potential applications in food and cheese industries. This is the first report that the yeast cells displaying the acid protease were used to clot milk.
|
{
"pile_set_name": "PubMed Abstracts"
}
|
A Malaysian Instagram influencer, Sara Anna, caused a ruckus online after she filmed herself saying that she will not date Malaysian men anymore after too many disappointing first dates at hawker stalls.
A repost of her Instagram story video was uploaded onto Twitter on Nov. 17, and it went viral.
https://twitter.com/yourstrulydonnv/status/1196086057185370112
As of the time of writing, the video has garnered over 800,000 views.
If you can't see the video, here it is:
[video width="592" height="1280" mp4="https://static.mothership.sg/1/2019/11/1botcfIHcsM9JEtz.mp4"][/video]
Works too hard for hawker stalls
In the video, Sara said that most of the Malaysian men she has dated would bring her to a hawker stall on their first date.
"I don't like it. Sorry, I'm not being choosy, but I don't work hard just to sit and chill at hawker stalls. So I don't like it."
Sara has over 260,000 followers on Instagram and at only 25 years old, she is the founder of the Sara Anna Beauty Parlour.
She also has her own clothing lines called Goldsky by Sara Anna and Posh by Sara Anna.
Prefers fine dining restaurants
In the video, Sara added that she prefers going to a fine dining restaurant instead of a hawker stall.
"Maybe after we've been a couple for a while, it would make sense to bring me to a hawker stall. But for the first 10 dates, I want fine dining."
Her ideal man would be someone who always compliments her and gives her flowers and gifts.
She admitted that she is very clingy, which most Malay men can't stand.
Bad experiences with Malay men
The Malay men she dated had also taken advantage of her status as an influencer, she explained in an interview with mStar.
Once, she went on a date with a Malay man at a hawker stall but when it was time to pay the bill, he acted clueless.
She ended up paying for their meals.
"I'm honestly tired of Malay men because I've had too many bad first date experiences with them."
Different views
The online reactions to Sara's video have been polarising.
Some netizens were on her side, stating that there's nothing wrong about expressing one's own personal preferences.
Translation: "She works hard to get loads of money, it's her choice to prefer what kind of men. It's up to her what she likes and what she doesn't. Most of you are just sour grapes."
Translation: "At least this girl is honest. She states her preference clearly. There's no hidden meaning. May she find someone compatible."
On the other hand, there are some who found her standards unreasonable.
Translation: "Who wants you? Hahaha."
Translation: "You're too high maintenance."
Translation: "Just say you're a gold digger next time. It'll be easier for us to understand."
Yikes.
Top photos via Sara Anna/Instagram.
Content that keeps Mothership.sg going
??
This event teaches you how to be your own farmer in the comfort of your own home.
?❤️
This company is offering a 50% discount to help single parents in Singapore.
?
Do lower-calorie versions of hawker food taste as good?
|
{
"pile_set_name": "OpenWebText2"
}
|
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2016 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""PEP 376 implementation."""
from __future__ import unicode_literals
import base64
import codecs
import contextlib
import hashlib
import logging
import os
import posixpath
import sys
import zipimport
from . import DistlibException, resources
from .compat import StringIO
from .version import get_scheme, UnsupportedVersionError
from .metadata import Metadata, METADATA_FILENAME, WHEEL_METADATA_FILENAME
from .util import (parse_requirement, cached_property, parse_name_and_version,
read_exports, write_exports, CSVReader, CSVWriter)
__all__ = ['Distribution', 'BaseInstalledDistribution',
'InstalledDistribution', 'EggInfoDistribution',
'DistributionPath']
logger = logging.getLogger(__name__)
EXPORTS_FILENAME = 'pydist-exports.json'
COMMANDS_FILENAME = 'pydist-commands.json'
DIST_FILES = ('INSTALLER', METADATA_FILENAME, 'RECORD', 'REQUESTED',
'RESOURCES', EXPORTS_FILENAME, 'SHARED')
DISTINFO_EXT = '.dist-info'
class _Cache(object):
"""
A simple cache mapping names and .dist-info paths to distributions
"""
def __init__(self):
"""
Initialise an instance. There is normally one for each DistributionPath.
"""
self.name = {}
self.path = {}
self.generated = False
def clear(self):
"""
Clear the cache, setting it to its initial state.
"""
self.name.clear()
self.path.clear()
self.generated = False
def add(self, dist):
"""
Add a distribution to the cache.
:param dist: The distribution to add.
"""
if dist.path not in self.path:
self.path[dist.path] = dist
self.name.setdefault(dist.key, []).append(dist)
class DistributionPath(object):
"""
Represents a set of distributions installed on a path (typically sys.path).
"""
def __init__(self, path=None, include_egg=False):
"""
Create an instance from a path, optionally including legacy (distutils/
setuptools/distribute) distributions.
:param path: The path to use, as a list of directories. If not specified,
sys.path is used.
:param include_egg: If True, this instance will look for and return legacy
distributions as well as those based on PEP 376.
"""
if path is None:
path = sys.path
self.path = path
self._include_dist = True
self._include_egg = include_egg
self._cache = _Cache()
self._cache_egg = _Cache()
self._cache_enabled = True
self._scheme = get_scheme('default')
def _get_cache_enabled(self):
return self._cache_enabled
def _set_cache_enabled(self, value):
self._cache_enabled = value
cache_enabled = property(_get_cache_enabled, _set_cache_enabled)
def clear_cache(self):
"""
Clears the internal cache.
"""
self._cache.clear()
self._cache_egg.clear()
def _yield_distributions(self):
"""
Yield .dist-info and/or .egg(-info) distributions.
"""
# We need to check if we've seen some resources already, because on
# some Linux systems (e.g. some Debian/Ubuntu variants) there are
# symlinks which alias other files in the environment.
seen = set()
for path in self.path:
finder = resources.finder_for_path(path)
if finder is None:
continue
r = finder.find('')
if not r or not r.is_container:
continue
rset = sorted(r.resources)
for entry in rset:
r = finder.find(entry)
if not r or r.path in seen:
continue
if self._include_dist and entry.endswith(DISTINFO_EXT):
possible_filenames = [METADATA_FILENAME, WHEEL_METADATA_FILENAME]
for metadata_filename in possible_filenames:
metadata_path = posixpath.join(entry, metadata_filename)
pydist = finder.find(metadata_path)
if pydist:
break
else:
continue
with contextlib.closing(pydist.as_stream()) as stream:
metadata = Metadata(fileobj=stream, scheme='legacy')
logger.debug('Found %s', r.path)
seen.add(r.path)
yield new_dist_class(r.path, metadata=metadata,
env=self)
elif self._include_egg and entry.endswith(('.egg-info',
'.egg')):
logger.debug('Found %s', r.path)
seen.add(r.path)
yield old_dist_class(r.path, self)
def _generate_cache(self):
"""
Scan the path for distributions and populate the cache with
those that are found.
"""
gen_dist = not self._cache.generated
gen_egg = self._include_egg and not self._cache_egg.generated
if gen_dist or gen_egg:
for dist in self._yield_distributions():
if isinstance(dist, InstalledDistribution):
self._cache.add(dist)
else:
self._cache_egg.add(dist)
if gen_dist:
self._cache.generated = True
if gen_egg:
self._cache_egg.generated = True
@classmethod
def distinfo_dirname(cls, name, version):
"""
The *name* and *version* parameters are converted into their
filename-escaped form, i.e. any ``'-'`` characters are replaced
with ``'_'`` other than the one in ``'dist-info'`` and the one
separating the name from the version number.
:parameter name: is converted to a standard distribution name by replacing
any runs of non- alphanumeric characters with a single
``'-'``.
:type name: string
:parameter version: is converted to a standard version string. Spaces
become dots, and all other non-alphanumeric characters
(except dots) become dashes, with runs of multiple
dashes condensed to a single dash.
:type version: string
:returns: directory name
:rtype: string"""
name = name.replace('-', '_')
return '-'.join([name, version]) + DISTINFO_EXT
def get_distributions(self):
"""
Provides an iterator that looks for distributions and returns
:class:`InstalledDistribution` or
:class:`EggInfoDistribution` instances for each one of them.
:rtype: iterator of :class:`InstalledDistribution` and
:class:`EggInfoDistribution` instances
"""
if not self._cache_enabled:
for dist in self._yield_distributions():
yield dist
else:
self._generate_cache()
for dist in self._cache.path.values():
yield dist
if self._include_egg:
for dist in self._cache_egg.path.values():
yield dist
def get_distribution(self, name):
"""
Looks for a named distribution on the path.
This function only returns the first result found, as no more than one
value is expected. If nothing is found, ``None`` is returned.
:rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution`
or ``None``
"""
result = None
name = name.lower()
if not self._cache_enabled:
for dist in self._yield_distributions():
if dist.key == name:
result = dist
break
else:
self._generate_cache()
if name in self._cache.name:
result = self._cache.name[name][0]
elif self._include_egg and name in self._cache_egg.name:
result = self._cache_egg.name[name][0]
return result
def provides_distribution(self, name, version=None):
"""
Iterates over all distributions to find which distributions provide *name*.
If a *version* is provided, it will be used to filter the results.
This function only returns the first result found, since no more than
one values are expected. If the directory is not found, returns ``None``.
:parameter version: a version specifier that indicates the version
required, conforming to the format in ``PEP-345``
:type name: string
:type version: string
"""
matcher = None
if not version is None:
try:
matcher = self._scheme.matcher('%s (%s)' % (name, version))
except ValueError:
raise DistlibException('invalid name or version: %r, %r' %
(name, version))
for dist in self.get_distributions():
provided = dist.provides
for p in provided:
p_name, p_ver = parse_name_and_version(p)
if matcher is None:
if p_name == name:
yield dist
break
else:
if p_name == name and matcher.match(p_ver):
yield dist
break
def get_file_path(self, name, relative_path):
"""
Return the path to a resource file.
"""
dist = self.get_distribution(name)
if dist is None:
raise LookupError('no distribution named %r found' % name)
return dist.get_resource_path(relative_path)
def get_exported_entries(self, category, name=None):
"""
Return all of the exported entries in a particular category.
:param category: The category to search for entries.
:param name: If specified, only entries with that name are returned.
"""
for dist in self.get_distributions():
r = dist.exports
if category in r:
d = r[category]
if name is not None:
if name in d:
yield d[name]
else:
for v in d.values():
yield v
class Distribution(object):
"""
A base class for distributions, whether installed or from indexes.
Either way, it must have some metadata, so that's all that's needed
for construction.
"""
build_time_dependency = False
"""
Set to True if it's known to be only a build-time dependency (i.e.
not needed after installation).
"""
requested = False
"""A boolean that indicates whether the ``REQUESTED`` metadata file is
present (in other words, whether the package was installed by user
request or it was installed as a dependency)."""
def __init__(self, metadata):
"""
Initialise an instance.
:param metadata: The instance of :class:`Metadata` describing this
distribution.
"""
self.metadata = metadata
self.name = metadata.name
self.key = self.name.lower() # for case-insensitive comparisons
self.version = metadata.version
self.locator = None
self.digest = None
self.extras = None # additional features requested
self.context = None # environment marker overrides
self.download_urls = set()
self.digests = {}
@property
def source_url(self):
"""
The source archive download URL for this distribution.
"""
return self.metadata.source_url
download_url = source_url # Backward compatibility
@property
def name_and_version(self):
"""
A utility property which displays the name and version in parentheses.
"""
return '%s (%s)' % (self.name, self.version)
@property
def provides(self):
"""
A set of distribution names and versions provided by this distribution.
:return: A set of "name (version)" strings.
"""
plist = self.metadata.provides
s = '%s (%s)' % (self.name, self.version)
if s not in plist:
plist.append(s)
return plist
def _get_requirements(self, req_attr):
md = self.metadata
logger.debug('Getting requirements from metadata %r', md.todict())
reqts = getattr(md, req_attr)
return set(md.get_requirements(reqts, extras=self.extras,
env=self.context))
@property
def run_requires(self):
return self._get_requirements('run_requires')
@property
def meta_requires(self):
return self._get_requirements('meta_requires')
@property
def build_requires(self):
return self._get_requirements('build_requires')
@property
def test_requires(self):
return self._get_requirements('test_requires')
@property
def dev_requires(self):
return self._get_requirements('dev_requires')
def matches_requirement(self, req):
"""
Say if this instance matches (fulfills) a requirement.
:param req: The requirement to match.
:rtype req: str
:return: True if it matches, else False.
"""
# Requirement may contain extras - parse to lose those
# from what's passed to the matcher
r = parse_requirement(req)
scheme = get_scheme(self.metadata.scheme)
try:
matcher = scheme.matcher(r.requirement)
except UnsupportedVersionError:
# XXX compat-mode if cannot read the version
logger.warning('could not read version %r - using name only',
req)
name = req.split()[0]
matcher = scheme.matcher(name)
name = matcher.key # case-insensitive
result = False
for p in self.provides:
p_name, p_ver = parse_name_and_version(p)
if p_name != name:
continue
try:
result = matcher.match(p_ver)
break
except UnsupportedVersionError:
pass
return result
def __repr__(self):
"""
Return a textual representation of this instance,
"""
if self.source_url:
suffix = ' [%s]' % self.source_url
else:
suffix = ''
return '<Distribution %s (%s)%s>' % (self.name, self.version, suffix)
def __eq__(self, other):
"""
See if this distribution is the same as another.
:param other: The distribution to compare with. To be equal to one
another. distributions must have the same type, name,
version and source_url.
:return: True if it is the same, else False.
"""
if type(other) is not type(self):
result = False
else:
result = (self.name == other.name and
self.version == other.version and
self.source_url == other.source_url)
return result
def __hash__(self):
"""
Compute hash in a way which matches the equality test.
"""
return hash(self.name) + hash(self.version) + hash(self.source_url)
class BaseInstalledDistribution(Distribution):
"""
This is the base class for installed distributions (whether PEP 376 or
legacy).
"""
hasher = None
def __init__(self, metadata, path, env=None):
"""
Initialise an instance.
:param metadata: An instance of :class:`Metadata` which describes the
distribution. This will normally have been initialised
from a metadata file in the ``path``.
:param path: The path of the ``.dist-info`` or ``.egg-info``
directory for the distribution.
:param env: This is normally the :class:`DistributionPath`
instance where this distribution was found.
"""
super(BaseInstalledDistribution, self).__init__(metadata)
self.path = path
self.dist_path = env
def get_hash(self, data, hasher=None):
"""
Get the hash of some data, using a particular hash algorithm, if
specified.
:param data: The data to be hashed.
:type data: bytes
:param hasher: The name of a hash implementation, supported by hashlib,
or ``None``. Examples of valid values are ``'sha1'``,
``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and
``'sha512'``. If no hasher is specified, the ``hasher``
attribute of the :class:`InstalledDistribution` instance
is used. If the hasher is determined to be ``None``, MD5
is used as the hashing algorithm.
:returns: The hash of the data. If a hasher was explicitly specified,
the returned hash will be prefixed with the specified hasher
followed by '='.
:rtype: str
"""
if hasher is None:
hasher = self.hasher
if hasher is None:
hasher = hashlib.md5
prefix = ''
else:
hasher = getattr(hashlib, hasher)
prefix = '%s=' % self.hasher
digest = hasher(data).digest()
digest = base64.urlsafe_b64encode(digest).rstrip(b'=').decode('ascii')
return '%s%s' % (prefix, digest)
class InstalledDistribution(BaseInstalledDistribution):
"""
Created with the *path* of the ``.dist-info`` directory provided to the
constructor. It reads the metadata contained in ``pydist.json`` when it is
instantiated., or uses a passed in Metadata instance (useful for when
dry-run mode is being used).
"""
hasher = 'sha256'
def __init__(self, path, metadata=None, env=None):
self.finder = finder = resources.finder_for_path(path)
if finder is None:
import pdb; pdb.set_trace ()
if env and env._cache_enabled and path in env._cache.path:
metadata = env._cache.path[path].metadata
elif metadata is None:
r = finder.find(METADATA_FILENAME)
# Temporary - for Wheel 0.23 support
if r is None:
r = finder.find(WHEEL_METADATA_FILENAME)
# Temporary - for legacy support
if r is None:
r = finder.find('METADATA')
if r is None:
raise ValueError('no %s found in %s' % (METADATA_FILENAME,
path))
with contextlib.closing(r.as_stream()) as stream:
metadata = Metadata(fileobj=stream, scheme='legacy')
super(InstalledDistribution, self).__init__(metadata, path, env)
if env and env._cache_enabled:
env._cache.add(self)
try:
r = finder.find('REQUESTED')
except AttributeError:
import pdb; pdb.set_trace ()
self.requested = r is not None
def __repr__(self):
return '<InstalledDistribution %r %s at %r>' % (
self.name, self.version, self.path)
def __str__(self):
return "%s %s" % (self.name, self.version)
def _get_records(self):
"""
Get the list of installed files for the distribution
:return: A list of tuples of path, hash and size. Note that hash and
size might be ``None`` for some entries. The path is exactly
as stored in the file (which is as in PEP 376).
"""
results = []
r = self.get_distinfo_resource('RECORD')
with contextlib.closing(r.as_stream()) as stream:
with CSVReader(stream=stream) as record_reader:
# Base location is parent dir of .dist-info dir
#base_location = os.path.dirname(self.path)
#base_location = os.path.abspath(base_location)
for row in record_reader:
missing = [None for i in range(len(row), 3)]
path, checksum, size = row + missing
#if not os.path.isabs(path):
# path = path.replace('/', os.sep)
# path = os.path.join(base_location, path)
results.append((path, checksum, size))
return results
@cached_property
def exports(self):
"""
Return the information exported by this distribution.
:return: A dictionary of exports, mapping an export category to a dict
of :class:`ExportEntry` instances describing the individual
export entries, and keyed by name.
"""
result = {}
r = self.get_distinfo_resource(EXPORTS_FILENAME)
if r:
result = self.read_exports()
return result
def read_exports(self):
"""
Read exports data from a file in .ini format.
:return: A dictionary of exports, mapping an export category to a list
of :class:`ExportEntry` instances describing the individual
export entries.
"""
result = {}
r = self.get_distinfo_resource(EXPORTS_FILENAME)
if r:
with contextlib.closing(r.as_stream()) as stream:
result = read_exports(stream)
return result
def write_exports(self, exports):
"""
Write a dictionary of exports to a file in .ini format.
:param exports: A dictionary of exports, mapping an export category to
a list of :class:`ExportEntry` instances describing the
individual export entries.
"""
rf = self.get_distinfo_file(EXPORTS_FILENAME)
with open(rf, 'w') as f:
write_exports(exports, f)
def get_resource_path(self, relative_path):
"""
NOTE: This API may change in the future.
Return the absolute path to a resource file with the given relative
path.
:param relative_path: The path, relative to .dist-info, of the resource
of interest.
:return: The absolute path where the resource is to be found.
"""
r = self.get_distinfo_resource('RESOURCES')
with contextlib.closing(r.as_stream()) as stream:
with CSVReader(stream=stream) as resources_reader:
for relative, destination in resources_reader:
if relative == relative_path:
return destination
raise KeyError('no resource file with relative path %r '
'is installed' % relative_path)
def list_installed_files(self):
"""
Iterates over the ``RECORD`` entries and returns a tuple
``(path, hash, size)`` for each line.
:returns: iterator of (path, hash, size)
"""
for result in self._get_records():
yield result
def write_installed_files(self, paths, prefix, dry_run=False):
"""
Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any
existing ``RECORD`` file is silently overwritten.
prefix is used to determine when to write absolute paths.
"""
prefix = os.path.join(prefix, '')
base = os.path.dirname(self.path)
base_under_prefix = base.startswith(prefix)
base = os.path.join(base, '')
record_path = self.get_distinfo_file('RECORD')
logger.info('creating %s', record_path)
if dry_run:
return None
with CSVWriter(record_path) as writer:
for path in paths:
if os.path.isdir(path) or path.endswith(('.pyc', '.pyo')):
# do not put size and hash, as in PEP-376
hash_value = size = ''
else:
size = '%d' % os.path.getsize(path)
with open(path, 'rb') as fp:
hash_value = self.get_hash(fp.read())
if path.startswith(base) or (base_under_prefix and
path.startswith(prefix)):
path = os.path.relpath(path, base)
writer.writerow((path, hash_value, size))
# add the RECORD file itself
if record_path.startswith(base):
record_path = os.path.relpath(record_path, base)
writer.writerow((record_path, '', ''))
return record_path
def check_installed_files(self):
"""
Checks that the hashes and sizes of the files in ``RECORD`` are
matched by the files themselves. Returns a (possibly empty) list of
mismatches. Each entry in the mismatch list will be a tuple consisting
of the path, 'exists', 'size' or 'hash' according to what didn't match
(existence is checked first, then size, then hash), the expected
value and the actual value.
"""
mismatches = []
base = os.path.dirname(self.path)
record_path = self.get_distinfo_file('RECORD')
for path, hash_value, size in self.list_installed_files():
if not os.path.isabs(path):
path = os.path.join(base, path)
if path == record_path:
continue
if not os.path.exists(path):
mismatches.append((path, 'exists', True, False))
elif os.path.isfile(path):
actual_size = str(os.path.getsize(path))
if size and actual_size != size:
mismatches.append((path, 'size', size, actual_size))
elif hash_value:
if '=' in hash_value:
hasher = hash_value.split('=', 1)[0]
else:
hasher = None
with open(path, 'rb') as f:
actual_hash = self.get_hash(f.read(), hasher)
if actual_hash != hash_value:
mismatches.append((path, 'hash', hash_value, actual_hash))
return mismatches
@cached_property
def shared_locations(self):
"""
A dictionary of shared locations whose keys are in the set 'prefix',
'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'.
The corresponding value is the absolute path of that category for
this distribution, and takes into account any paths selected by the
user at installation time (e.g. via command-line arguments). In the
case of the 'namespace' key, this would be a list of absolute paths
for the roots of namespace packages in this distribution.
The first time this property is accessed, the relevant information is
read from the SHARED file in the .dist-info directory.
"""
result = {}
shared_path = os.path.join(self.path, 'SHARED')
if os.path.isfile(shared_path):
with codecs.open(shared_path, 'r', encoding='utf-8') as f:
lines = f.read().splitlines()
for line in lines:
key, value = line.split('=', 1)
if key == 'namespace':
result.setdefault(key, []).append(value)
else:
result[key] = value
return result
def write_shared_locations(self, paths, dry_run=False):
"""
Write shared location information to the SHARED file in .dist-info.
:param paths: A dictionary as described in the documentation for
:meth:`shared_locations`.
:param dry_run: If True, the action is logged but no file is actually
written.
:return: The path of the file written to.
"""
shared_path = os.path.join(self.path, 'SHARED')
logger.info('creating %s', shared_path)
if dry_run:
return None
lines = []
for key in ('prefix', 'lib', 'headers', 'scripts', 'data'):
path = paths[key]
if os.path.isdir(paths[key]):
lines.append('%s=%s' % (key, path))
for ns in paths.get('namespace', ()):
lines.append('namespace=%s' % ns)
with codecs.open(shared_path, 'w', encoding='utf-8') as f:
f.write('\n'.join(lines))
return shared_path
def get_distinfo_resource(self, path):
if path not in DIST_FILES:
raise DistlibException('invalid path for a dist-info file: '
'%r at %r' % (path, self.path))
finder = resources.finder_for_path(self.path)
if finder is None:
raise DistlibException('Unable to get a finder for %s' % self.path)
return finder.find(path)
def get_distinfo_file(self, path):
"""
Returns a path located under the ``.dist-info`` directory. Returns a
string representing the path.
:parameter path: a ``'/'``-separated path relative to the
``.dist-info`` directory or an absolute path;
If *path* is an absolute path and doesn't start
with the ``.dist-info`` directory path,
a :class:`DistlibException` is raised
:type path: str
:rtype: str
"""
# Check if it is an absolute path # XXX use relpath, add tests
if path.find(os.sep) >= 0:
# it's an absolute path?
distinfo_dirname, path = path.split(os.sep)[-2:]
if distinfo_dirname != self.path.split(os.sep)[-1]:
raise DistlibException(
'dist-info file %r does not belong to the %r %s '
'distribution' % (path, self.name, self.version))
# The file must be relative
if path not in DIST_FILES:
raise DistlibException('invalid path for a dist-info file: '
'%r at %r' % (path, self.path))
return os.path.join(self.path, path)
def list_distinfo_files(self):
"""
Iterates over the ``RECORD`` entries and returns paths for each line if
the path is pointing to a file located in the ``.dist-info`` directory
or one of its subdirectories.
:returns: iterator of paths
"""
base = os.path.dirname(self.path)
for path, checksum, size in self._get_records():
# XXX add separator or use real relpath algo
if not os.path.isabs(path):
path = os.path.join(base, path)
if path.startswith(self.path):
yield path
def __eq__(self, other):
return (isinstance(other, InstalledDistribution) and
self.path == other.path)
# See http://docs.python.org/reference/datamodel#object.__hash__
__hash__ = object.__hash__
class EggInfoDistribution(BaseInstalledDistribution):
"""Created with the *path* of the ``.egg-info`` directory or file provided
to the constructor. It reads the metadata contained in the file itself, or
if the given path happens to be a directory, the metadata is read from the
file ``PKG-INFO`` under that directory."""
requested = True # as we have no way of knowing, assume it was
shared_locations = {}
def __init__(self, path, env=None):
def set_name_and_version(s, n, v):
s.name = n
s.key = n.lower() # for case-insensitive comparisons
s.version = v
self.path = path
self.dist_path = env
if env and env._cache_enabled and path in env._cache_egg.path:
metadata = env._cache_egg.path[path].metadata
set_name_and_version(self, metadata.name, metadata.version)
else:
metadata = self._get_metadata(path)
# Need to be set before caching
set_name_and_version(self, metadata.name, metadata.version)
if env and env._cache_enabled:
env._cache_egg.add(self)
super(EggInfoDistribution, self).__init__(metadata, path, env)
def _get_metadata(self, path):
requires = None
def parse_requires_data(data):
"""Create a list of dependencies from a requires.txt file.
*data*: the contents of a setuptools-produced requires.txt file.
"""
reqs = []
lines = data.splitlines()
for line in lines:
line = line.strip()
if line.startswith('['):
logger.warning('Unexpected line: quitting requirement scan: %r',
line)
break
r = parse_requirement(line)
if not r:
logger.warning('Not recognised as a requirement: %r', line)
continue
if r.extras:
logger.warning('extra requirements in requires.txt are '
'not supported')
if not r.constraints:
reqs.append(r.name)
else:
cons = ', '.join('%s%s' % c for c in r.constraints)
reqs.append('%s (%s)' % (r.name, cons))
return reqs
def parse_requires_path(req_path):
"""Create a list of dependencies from a requires.txt file.
*req_path*: the path to a setuptools-produced requires.txt file.
"""
reqs = []
try:
with codecs.open(req_path, 'r', 'utf-8') as fp:
reqs = parse_requires_data(fp.read())
except IOError:
pass
return reqs
if path.endswith('.egg'):
if os.path.isdir(path):
meta_path = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
metadata = Metadata(path=meta_path, scheme='legacy')
req_path = os.path.join(path, 'EGG-INFO', 'requires.txt')
requires = parse_requires_path(req_path)
else:
# FIXME handle the case where zipfile is not available
zipf = zipimport.zipimporter(path)
fileobj = StringIO(
zipf.get_data('EGG-INFO/PKG-INFO').decode('utf8'))
metadata = Metadata(fileobj=fileobj, scheme='legacy')
try:
data = zipf.get_data('EGG-INFO/requires.txt')
requires = parse_requires_data(data.decode('utf-8'))
except IOError:
requires = None
elif path.endswith('.egg-info'):
if os.path.isdir(path):
req_path = os.path.join(path, 'requires.txt')
requires = parse_requires_path(req_path)
path = os.path.join(path, 'PKG-INFO')
metadata = Metadata(path=path, scheme='legacy')
else:
raise DistlibException('path must end with .egg-info or .egg, '
'got %r' % path)
if requires:
metadata.add_requirements(requires)
return metadata
def __repr__(self):
return '<EggInfoDistribution %r %s at %r>' % (
self.name, self.version, self.path)
def __str__(self):
return "%s %s" % (self.name, self.version)
def check_installed_files(self):
"""
Checks that the hashes and sizes of the files in ``RECORD`` are
matched by the files themselves. Returns a (possibly empty) list of
mismatches. Each entry in the mismatch list will be a tuple consisting
of the path, 'exists', 'size' or 'hash' according to what didn't match
(existence is checked first, then size, then hash), the expected
value and the actual value.
"""
mismatches = []
record_path = os.path.join(self.path, 'installed-files.txt')
if os.path.exists(record_path):
for path, _, _ in self.list_installed_files():
if path == record_path:
continue
if not os.path.exists(path):
mismatches.append((path, 'exists', True, False))
return mismatches
def list_installed_files(self):
"""
Iterates over the ``installed-files.txt`` entries and returns a tuple
``(path, hash, size)`` for each line.
:returns: a list of (path, hash, size)
"""
def _md5(path):
f = open(path, 'rb')
try:
content = f.read()
finally:
f.close()
return hashlib.md5(content).hexdigest()
def _size(path):
return os.stat(path).st_size
record_path = os.path.join(self.path, 'installed-files.txt')
result = []
if os.path.exists(record_path):
with codecs.open(record_path, 'r', encoding='utf-8') as f:
for line in f:
line = line.strip()
p = os.path.normpath(os.path.join(self.path, line))
# "./" is present as a marker between installed files
# and installation metadata files
if not os.path.exists(p):
logger.warning('Non-existent file: %s', p)
if p.endswith(('.pyc', '.pyo')):
continue
#otherwise fall through and fail
if not os.path.isdir(p):
result.append((p, _md5(p), _size(p)))
result.append((record_path, None, None))
return result
def list_distinfo_files(self, absolute=False):
"""
Iterates over the ``installed-files.txt`` entries and returns paths for
each line if the path is pointing to a file located in the
``.egg-info`` directory or one of its subdirectories.
:parameter absolute: If *absolute* is ``True``, each returned path is
transformed into a local absolute path. Otherwise the
raw value from ``installed-files.txt`` is returned.
:type absolute: boolean
:returns: iterator of paths
"""
record_path = os.path.join(self.path, 'installed-files.txt')
skip = True
with codecs.open(record_path, 'r', encoding='utf-8') as f:
for line in f:
line = line.strip()
if line == './':
skip = False
continue
if not skip:
p = os.path.normpath(os.path.join(self.path, line))
if p.startswith(self.path):
if absolute:
yield p
else:
yield line
def __eq__(self, other):
return (isinstance(other, EggInfoDistribution) and
self.path == other.path)
# See http://docs.python.org/reference/datamodel#object.__hash__
__hash__ = object.__hash__
new_dist_class = InstalledDistribution
old_dist_class = EggInfoDistribution
class DependencyGraph(object):
"""
Represents a dependency graph between distributions.
The dependency relationships are stored in an ``adjacency_list`` that maps
distributions to a list of ``(other, label)`` tuples where ``other``
is a distribution and the edge is labeled with ``label`` (i.e. the version
specifier, if such was provided). Also, for more efficient traversal, for
every distribution ``x``, a list of predecessors is kept in
``reverse_list[x]``. An edge from distribution ``a`` to
distribution ``b`` means that ``a`` depends on ``b``. If any missing
dependencies are found, they are stored in ``missing``, which is a
dictionary that maps distributions to a list of requirements that were not
provided by any other distributions.
"""
def __init__(self):
self.adjacency_list = {}
self.reverse_list = {}
self.missing = {}
def add_distribution(self, distribution):
"""Add the *distribution* to the graph.
:type distribution: :class:`distutils2.database.InstalledDistribution`
or :class:`distutils2.database.EggInfoDistribution`
"""
self.adjacency_list[distribution] = []
self.reverse_list[distribution] = []
#self.missing[distribution] = []
def add_edge(self, x, y, label=None):
"""Add an edge from distribution *x* to distribution *y* with the given
*label*.
:type x: :class:`distutils2.database.InstalledDistribution` or
:class:`distutils2.database.EggInfoDistribution`
:type y: :class:`distutils2.database.InstalledDistribution` or
:class:`distutils2.database.EggInfoDistribution`
:type label: ``str`` or ``None``
"""
self.adjacency_list[x].append((y, label))
# multiple edges are allowed, so be careful
if x not in self.reverse_list[y]:
self.reverse_list[y].append(x)
def add_missing(self, distribution, requirement):
"""
Add a missing *requirement* for the given *distribution*.
:type distribution: :class:`distutils2.database.InstalledDistribution`
or :class:`distutils2.database.EggInfoDistribution`
:type requirement: ``str``
"""
logger.debug('%s missing %r', distribution, requirement)
self.missing.setdefault(distribution, []).append(requirement)
def _repr_dist(self, dist):
return '%s %s' % (dist.name, dist.version)
def repr_node(self, dist, level=1):
"""Prints only a subgraph"""
output = [self._repr_dist(dist)]
for other, label in self.adjacency_list[dist]:
dist = self._repr_dist(other)
if label is not None:
dist = '%s [%s]' % (dist, label)
output.append(' ' * level + str(dist))
suboutput = self.repr_node(other, level + 1)
subs = suboutput.split('\n')
output.extend(subs[1:])
return '\n'.join(output)
def to_dot(self, f, skip_disconnected=True):
"""Writes a DOT output for the graph to the provided file *f*.
If *skip_disconnected* is set to ``True``, then all distributions
that are not dependent on any other distribution are skipped.
:type f: has to support ``file``-like operations
:type skip_disconnected: ``bool``
"""
disconnected = []
f.write("digraph dependencies {\n")
for dist, adjs in self.adjacency_list.items():
if len(adjs) == 0 and not skip_disconnected:
disconnected.append(dist)
for other, label in adjs:
if not label is None:
f.write('"%s" -> "%s" [label="%s"]\n' %
(dist.name, other.name, label))
else:
f.write('"%s" -> "%s"\n' % (dist.name, other.name))
if not skip_disconnected and len(disconnected) > 0:
f.write('subgraph disconnected {\n')
f.write('label = "Disconnected"\n')
f.write('bgcolor = red\n')
for dist in disconnected:
f.write('"%s"' % dist.name)
f.write('\n')
f.write('}\n')
f.write('}\n')
def topological_sort(self):
"""
Perform a topological sort of the graph.
:return: A tuple, the first element of which is a topologically sorted
list of distributions, and the second element of which is a
list of distributions that cannot be sorted because they have
circular dependencies and so form a cycle.
"""
result = []
# Make a shallow copy of the adjacency list
alist = {}
for k, v in self.adjacency_list.items():
alist[k] = v[:]
while True:
# See what we can remove in this run
to_remove = []
for k, v in list(alist.items())[:]:
if not v:
to_remove.append(k)
del alist[k]
if not to_remove:
# What's left in alist (if anything) is a cycle.
break
# Remove from the adjacency list of others
for k, v in alist.items():
alist[k] = [(d, r) for d, r in v if d not in to_remove]
logger.debug('Moving to result: %s',
['%s (%s)' % (d.name, d.version) for d in to_remove])
result.extend(to_remove)
return result, list(alist.keys())
def __repr__(self):
"""Representation of the graph"""
output = []
for dist, adjs in self.adjacency_list.items():
output.append(self.repr_node(dist))
return '\n'.join(output)
def make_graph(dists, scheme='default'):
"""Makes a dependency graph from the given distributions.
:parameter dists: a list of distributions
:type dists: list of :class:`distutils2.database.InstalledDistribution` and
:class:`distutils2.database.EggInfoDistribution` instances
:rtype: a :class:`DependencyGraph` instance
"""
scheme = get_scheme(scheme)
graph = DependencyGraph()
provided = {} # maps names to lists of (version, dist) tuples
# first, build the graph and find out what's provided
for dist in dists:
graph.add_distribution(dist)
for p in dist.provides:
name, version = parse_name_and_version(p)
logger.debug('Add to provided: %s, %s, %s', name, version, dist)
provided.setdefault(name, []).append((version, dist))
# now make the edges
for dist in dists:
requires = (dist.run_requires | dist.meta_requires |
dist.build_requires | dist.dev_requires)
for req in requires:
try:
matcher = scheme.matcher(req)
except UnsupportedVersionError:
# XXX compat-mode if cannot read the version
logger.warning('could not read version %r - using name only',
req)
name = req.split()[0]
matcher = scheme.matcher(name)
name = matcher.key # case-insensitive
matched = False
if name in provided:
for version, provider in provided[name]:
try:
match = matcher.match(version)
except UnsupportedVersionError:
match = False
if match:
graph.add_edge(dist, provider, req)
matched = True
break
if not matched:
graph.add_missing(dist, req)
return graph
def get_dependent_dists(dists, dist):
"""Recursively generate a list of distributions from *dists* that are
dependent on *dist*.
:param dists: a list of distributions
:param dist: a distribution, member of *dists* for which we are interested
"""
if dist not in dists:
raise DistlibException('given distribution %r is not a member '
'of the list' % dist.name)
graph = make_graph(dists)
dep = [dist] # dependent distributions
todo = graph.reverse_list[dist] # list of nodes we should inspect
while todo:
d = todo.pop()
dep.append(d)
for succ in graph.reverse_list[d]:
if succ not in dep:
todo.append(succ)
dep.pop(0) # remove dist from dep, was there to prevent infinite loops
return dep
def get_required_dists(dists, dist):
"""Recursively generate a list of distributions from *dists* that are
required by *dist*.
:param dists: a list of distributions
:param dist: a distribution, member of *dists* for which we are interested
"""
if dist not in dists:
raise DistlibException('given distribution %r is not a member '
'of the list' % dist.name)
graph = make_graph(dists)
req = [] # required distributions
todo = graph.adjacency_list[dist] # list of nodes we should inspect
while todo:
d = todo.pop()[0]
req.append(d)
for pred in graph.adjacency_list[d]:
if pred not in req:
todo.append(pred)
return req
def make_dist(name, version, **kwargs):
"""
A convenience method for making a dist given just a name and version.
"""
summary = kwargs.pop('summary', 'Placeholder for summary')
md = Metadata(**kwargs)
md.name = name
md.version = version
md.summary = summary or 'Placeholder for summary'
return Distribution(md)
|
{
"pile_set_name": "Github"
}
|
Q:
X,Y axis skew line how go up/down/sides
I have two points, one start position and a goal position(dynamic). I want to spawn players as they would in a formula 1 race. i.e the second a little to the right and back of the first, third left and back of the second and so on. I have already determined the angle so they face to the goal point.
I dont know how to move relative to the line on the axes. I think my distance moves it sideways, but im not a 100% sure.. I also am too stupid to figure out how to go perpendicular of the new points, even though it's probably just adding a minus somewhere.
Well, I hope someone can help me with this, thanks a lot in advance.
Note: The code is in Pawn, a C-like scripting language.
new x1 = RaceCheckpoints[0][0]//startpoint x
new y1 = RaceCheckpoints[0][1]//startpoint y
new x2 = RaceCheckpoints[1][0]//goalpoint x
new y2 = RaceCheckpoints[1][1]//goalpoint y
new dist = 2;
new pos = 0;
new x3, y3, x4, y4, a, b, norm;
x3 = (x1 + x2) / 2;
y3 = (y1 + y2) / 2;
a = y1 - y2;
b = x2 - x1;
norm = sqrt(a*a + b*b);
a = a / norm;
b = b / norm;
x3 = x3 + a * -dist;
y3 = y3 + b * -dist;
x4 = x3 + a * 2 * dist;
y4 = y3 + b * 2 * dist;
for(new i;i<MAX_PLAYERS;i++)
{
if(RaceParticipant[i] != 0)
{
if(IsPlayerInAnyVehicle(i)) PlayerVehicles[i]=GetPlayerVehicleID(i);
else PlayerVehicles[i]=0;
if (pos = 0)//left lane
{
SetPlayerPosFindZ(playerid, x3, y3, RaceCheckpoints[0][2]+10);
new angle = atan2(y2 - x3, x2 - y3) * 180 / PI;
SetPlayerFacingAngle(i,angle);
pos++;
}
if (pos = 1)//right lane
{
SetPlayerPosFindZ(playerid, x4, y4, RaceCheckpoints[0][2]+10);
new angle = atan2(y2 - x4, x2 - y4) * 180 / PI;
SetPlayerFacingAngle(i,angle);
pos--;
}
}
}
A:
Let's say that your goal lies directly in x direction. Your vector between start and goal is then (0, 1) and the angle between it and the x axis is, of course, zero. Let's also say that each car has a row ix and a columns iy and that the first car has row and column 0.
The distance of any car to the first car is then
xx = - ix * dx - iy * dd;
yy = - iy * dy;
where dx, dy and dd are the metrics between cars:
--------000-------------------
| 000 dd
| 000 111--------
dx 000 111
| 000 111
| 111
| 111
--------222
222
222 333
222 333
222 333
| 333
| 333
| |
|--- dy ---|
Now say that your goal lies somewhere else and the the vector between start and goal is (vx, vy). The angle between that vector and the x axis is a. You have to rotate your xx and yy:
xx' = cos(a) * xx - sin(a) * yy
yy' = sin(a) * xx + cos(a) * yy
You could also write this in matrix notation:
{P'} = [C] * {P}
where {P} and {P'} are your unrotated and rotated points and [C] is the rotation matrix:
| cos(a) - sin(a) |
[C] = | |
| sin(a) cos(a) |
Your angle is
a = atan2(vy, vx)
but you dn't really need the angle here. If you normalise vor vector (vx, vy) so that it is a unit vector, vx and vy are already the cosine and sine of your rotation.
The last step is to add your starting point to the rotated positions. Putting all this together (in C, not Pawn):
double dx = 8.0; // x distance between 1st and 3rd car
double dy = 5.0; // y distance between 1st and 2nd car
double dd = 1.5; // x distance between 1st and 2nd car
double sx = 118.0; // start point, i.e. position of 1st car
double sy = 6.0;
double gx = 240.0; // goal point
double gy = 60.0;
int ncar = 8; // number of cars
double vx = gx - sx; // vector between start and goal
double vy = gy - sy;
double vv;
double acos; // sine and cosine of the angle between
double asin; // (vx, vy) and (1, 0)
double cx[ncar]; // car positions
double cy[ncar];
int i;
vv = sqrt(vx*vx + vy * vy); // normalise vector
acos = vx / vv; // determine rotation cosines
asin = vy / vv;
for (i = 0; i < ncar; i++) {
int ix = i / 2; // grid index row
int iy = i % 2; // grid index column
double xx = - ix * dx - iy * dd; // unrotated car pos,
double yy = - iy * dy; // 1st car a (0, 0)
cx[i] = sx + acos * xx - asin * yy;
cy[i] = sy + asin * xx + acos * yy;
}
|
{
"pile_set_name": "StackExchange"
}
|
Introduction {#Sec1}
============
Plants employ a wide range of induced defences in response to herbivore attack. These defences result in morphological changes and synthesis of secondary metabolites, which cause a decrease in herbivore performance (Karban and Baldwin [@CR26]; Walling [@CR54]; Howe and Jander [@CR17]; Alba et al. [@CR3]) or enhance the performance of natural enemies of the herbivores (Turlings et al. [@CR52]; Sabelis et al. [@CR43]; Rasmann et al. [@CR38]; Dicke and Baldwin [@CR16]; Abe et al. [@CR1]). The induction of these plant defences depends on the ability of the plant to identify and recognize its attackers (Baldwin and Preston [@CR7]; Walling [@CR54]; de Vos et al. [@CR15]; Wu and Baldwin [@CR56]), and varies with the herbivore species (Stout et al. [@CR49]; de Vos et al. [@CR15]; Rodriguez-Saona et al. [@CR40]) and time since attack (Kant et al. [@CR23]). Different herbivore species on the same plant can thus affect each other through the defences that they induce (Viswanathan et al. [@CR53]; Kessler and Halitschke [@CR29]; Kaplan et al. [@CR25]). When the herbivores affect each other negatively, this interaction is sometimes misleadingly referred to as "indirect competition" to distinguish it from resource competition, which is, however, also an indirect interaction.
Attacks by one herbivore species may reduce or increase plant defence against other herbivore species (Karban and Carey [@CR27]; Karban and Baldwin [@CR26]; Viswanathan et al. [@CR53]; Rodriguez-Saona et al. [@CR39]; Poelman et al. [@CR36]; Bruessow et al. [@CR11]). It has been suggested that species with comparable feeding modes induce similar plant defences and they are therefore expected to have a negative effect on each other's performance (Rodriguez-Saona et al. [@CR39]; Howe and Jander [@CR17]; Soler et al. [@CR48]). Indeed, early studies of plant defences showed that two closely related mite species induced resistance with similar effects on the performance of one of these species (Karban and Carey [@CR27]). To date, studies on the effects of simultaneous plant attacks by various herbivore species have mainly focused on herbivores of different feeding guilds, which are thought to induce different defensive pathways (Rodriguez-Saona et al. [@CR39], [@CR40]; Howe and Jander [@CR17]; Soler et al. [@CR48]). We investigated the effects of simultaneous attacks of tomato plants by two herbivores with similar feeding modes, but with opposite effects on plant defence responses.
The spider mite *Tetranychus urticae* is well known for inducing defences in various plant species, including tomato (Li et al. [@CR32]; Kant et al. [@CR23], [@CR24]; Ament et al. [@CR5]), although there is substantial variation in induction among strains, with some strains even suppressing plant defences (Kant et al. [@CR23], [@CR24]; Alba et al. [@CR4]). It feeds on plant tissue by piercing parenchyma cells and sucking out their contents. This feeding induces direct plant defences such as proteinase inhibitor activity within one day (Kant et al. [@CR23]). Earlier feeding by defence-inducing *T. urticae* results in lower performance of later-arriving herbivores (Karban and Carey [@CR27]; Karban et al. [@CR28]; Sarmento et al. [@CR44]). Although *T. evansi* has the same feeding mode, it performed better on plants that had previously been attacked by conspecifics (Sarmento et al. [@CR44]). This increased performance coincided with reduced levels of defence-related plant constituents such as proteinase inhibitors, which were below the levels in plants that had not been attacked (Sarmento et al. [@CR44]). These inhibitors hamper the action of digestive proteinases present in the herbivore gut (Ryan [@CR41]; Koiwa et al. [@CR30]), including those of spider mites (Li et al. [@CR32]; Kant et al. [@CR23]), and are normally induced by herbivore attacks. The low activity of proteinase inhibitors in leaves previously attacked by *T. evansi* coincided with a lack of upregulation of the proteinase inhibitor gene *WIPI*-*II*, which is dependent on the jasmonic acid pathway. *PR*-*P6*, a marker gene of the salicylic acid pathway, was also not upregulated by attacks from *T. evansi*, suggesting that the lower defence in plants that had previously been attacked by *T. evansi* was not caused by negative crosstalk between the two pathways. This was recently confirmed using several marker genes for both pathways (Alba et al. [@CR4]). The reduction of defences in tomato plants by *T. evansi* also resulted in better performance of *T. urticae* (Sarmento et al. [@CR44], [@CR45]). It is not known yet how simultaneous attacks by these two herbivores affect tomato plant defence. Here, we investigated the effect of simultaneous attacks of the same leaf by both spider mite species on locally induced plant defences.
Besides *T. evansi*, there are several other examples of herbivores that interfere with plant defence responses (Musser et al. [@CR34]; Bede et al. [@CR9]; Lawrence et al. [@CR31]). However, most of these studies did not quantify the effects of defence suppression on insect performance, leaving open the possibility that defence suppression could benefit the natural enemies of the herbivores and thus the plant (Kahl et al. [@CR20]). Several recent studies have specifically shown effects of defence suppression on herbivore performance (Kant et al. [@CR24]; Sarmento et al. [@CR44], [@CR45]; Consales et al. [@CR12]; Dafoe et al. [@CR14]; Alba et al. [@CR4]). Here, we use a similar approach and quantify plant defences through herbivore performance (oviposition) and by measuring the activity levels of proteinase inhibitors in plant tissue to investigate the effect of simultaneous attack by "inducer" (i.e., *T. urticae*) and "reducer" (i.e., *T. evansi*) herbivores on plant defence.
To evaluate the effects of simultaneous attacks on plant defence, it is essential to know the timing of plant responses to herbivore attacks. Whereas it is known that *T. urticae* induces direct plant defences in tomato within 1 day, there is little information on the timing of the effects of *T. evansi* on plant defences. Sarmento et al. ([@CR44]) found increased oviposition of *T. evansi* on tomato plants 7 days after attack by conspecific mites, but it is possible that a shorter period of attack results in similar downregulation of plant defences. Therefore, we compared the timing of the reduction of plant defences by *T. evansi* with the timing of induction by *T. urticae* to subsequently investigate the effects of simultaneous attacks.
Materials and methods {#Sec2}
=====================
Plant material {#Sec3}
--------------
Tomato seeds (*Solanum lycopersicum* var Santa Clara I-5300) were sown in a commercial plant substrate (Bioplant^®^, Bioplant Misturadora Agrícola LTDA) in a polystyrene tray (8 × 16 cells), and kept inside a fine-meshed cage in a greenhouse to avoid infestation with herbivores. After 21 days, the plants were transferred to plastic pots (2 L) that contained a mixture of soil plus bovine manure (3:1) and fertilizer (4--14--8 N--P--K). Tomato plants were further grown in mite-proof screen cages in a greenhouse until they were 45 days old and had at least four completely developed leaves. Subsequently, they were used either for the experiments or for spider mite rearing.
Mites {#Sec4}
-----
*Tetranychus evansi* and *T. urticae* were obtained in 2002 from naturally infested tomato plants of the same variety as above in a greenhouse at the Federal University of Viçosa, Brazil (Sarmento et al. [@CR44]). Both species were cultured on detached tomato leaves, with the petiole inserted into a PVC tube containing water to maintain leaf turgor. Tubes with infested leaves were kept in PVC trays filled with detergent and water (1:25, v/v), which served to prevent the escape of mites and invasions by mites and other non-flying arthropods. The mass culture was maintained in a room at 25 ± 3 °C and 70--90 % relative humidity and 12 h of light per day.
Timing of induction of direct plant defences {#Sec5}
--------------------------------------------
The third leaf down of randomly selected tomato plants that were 45 days old (four fully developed leaves) was infested for 0 (no infestation, control), 1, 2, 3 or 4 days with 100 adult females of *T. urticae* or *T. evansi*, while the other leaves were kept clean. Four plants were used for each treatment, so a total of 40 plants were used for this experiment. Insect glue (Cola Entomológica; Bio-Controle, São Paulo, Brazil) was applied to the petioles of leaves on which mites were released to prevent them from moving to another leaf. Leaves of control plants from the same batch that were the same age were also treated with glue. Plants were kept inside mite-proof screen cages in a greenhouse during the experiment. After infestation for 1--4 days, 20 leaf discs (∅ 12 mm) were made per plant from all leaflets of the leaves damaged by *T. evansi* or *T. urticae* and from corresponding leaves of uninfested control plants using a cork borer (Huffaker et al. [@CR18]). The mites as well as their web and eggs were carefully removed from the discs with a fine brush under a stereoscopic microscope, taking care not to damage the leaf discs any further. Discs were subsequently kept in Petri dishes (Ø 8 cm) containing wet cotton wool. Two leaflets of the same leaf were used to assess proteinase activity (see below).
We used oviposition rates of *T. evansi* and *T. urticae* as stand-in measures of herbivore performance. The oviposition rate of spider mites is closely correlated to the population growth rate (Sabelis [@CR42]; Janssen and Sabelis [@CR19]). The oviposition rates of *T. evansi* and *T. urticae* were measured on the discs. Because the oviposition rate of spider mites decreases with age (Sabelis [@CR42]), female mites of a similar age were used in the oviposition experiments. To obtain such cohorts, several adult females were allowed to lay eggs on detached tomato leaves on wet cotton wool. The adults were removed after 24 h and the eggs were reared to adulthood. One randomly selected adult female of *T. evansi* or *T. urticae* was placed on each disc 2 days after it had turned adult. The oviposition rate was measured after 4 days (28 ± 2 °C; 70 ± 10 % RH 12 h light). Oviposition rates were averaged per spider mite species and per plant. Spider mites that did not survive the entire period of oviposition were discarded (the average per plant therefore consisted of the average of up to ten mites of each species). The experiments with plants infested by *T. evansi* and *T. urticae* could not be carried out at the same time for logistical reasons. Treatments can therefore only be compared to controls within the same experiment.
Simultaneous attack by *T. evansi* and *T. urticae* {#Sec6}
---------------------------------------------------
A preliminary experiment was performed to investigate the effect of different numbers of mites damaging the plants on the subsequent performance of both mite species. The third leaf of randomly selected tomato plants was infested with either 100 or 200 adult females of either species for 4 days, and leaf discs were made from the infested leaves as above. Four plants were used per treatment, i.e., 16 in total. Subsequently, the oviposition rates of individual females of both species (ten females of each per plant) were assessed after 4 days as described above.
To study the effects of simultaneous attack, plants were either concurrently infested with adult females of *T. evansi* and *T. urticae*, with either of the two species separately, or they were not infested. Based on the results of the preliminary experiment, we decided to infest plants with 100 adult mites of each species in the case of co-infested plants (200 mites in total), whereas plants with only one of the two species received 100 mites. The third leaf from below of randomly selected 45-day-old tomato plants was infested for 1 day as described above while the other leaves were kept clean. There were four plants per treatment; 16 plants in total. Subsequently, the damaged leaves were cleaned and leaf discs were made as above. One adult female of *T. evansi* or *T. urticae* was released per leaf disc as above and the oviposition rate was evaluated after 4 days.
Proteinase inhibitor assays {#Sec7}
---------------------------
The proteinase inhibitor (PI) activity was measured in the same leaves as used for the oviposition experiments. Two leaflets per infested leaf (above) and from the corresponding control leaf were frozen in liquid nitrogen and stored at −80 °C. Subsequently, each sample was ground with mortar and pestle and a crude protein extract was obtained as described by Otha et al. ([@CR35]). Essentially, the leaves were homogenized in extraction buffer (0.1 M Tris--HCl buffer, pH 8.2 and 20 mM CaCl~2~; 1:3 w/v); the homogenate was then centrifuged at 17,200×*g* for 30 min at 4 °C and the supernatant was collected, which was used to determine the protein content and all other assays. Protein concentration was determined by the method described by Bradford ([@CR10]), using a solution of 0.2 mg/ml bovine serum albumin as standard. A standard spectrophotometric assay was used to measure trypsin inhibitory activity in the supernatant. A 100-μL aliquot of trypsin (4.7 × 10^−5^ M) was mixed with 100 μL of the supernatant and 500 μL extraction buffer (0.1 M Tris--HCl buffer, pH 8.2 and 20 mM CaCl~2~). The mixture was incubated at room temperature for 5 min. Controls consisted of 600 μL extraction buffer and 100 μL trypsin (4.7 × 10^−5^ M). A 700-μL aliquot of the mixture (tests and controls) was added to 500 μL extraction buffer and 500 μL Na-benzoyl-[d]{.smallcaps},[l]{.smallcaps}-arginine-4-nitroanilide hydrochloride ([d,l]{.smallcaps}-BApNA, 1.2 mM). Trypsin activity was monitored for 150 s at intervals of 30 s at 410 nm absorbance on a spectrophotometer. The difference between the absorbances measured at 150 s and 60 s was used to determine the trypsin activity. Measurements were performed in triplicate per sample. The results obtained were converted to milligrams trypsin inhibited per gram of protein according to the following equation: mg trypsin inhibited per gram of protein = *AB*/1000*PC*, where *A* = enzyme control − absorbance at 410 nm of the extract, *B* = sample dilution, *P* = protein concentration of the extracts (g/mL), and *C* = trypsin factor, the result of the activity of 1 μg of trypsin on the substrate [d,l]{.smallcaps}-BApNA measured at 410 nm; for the combination of trypsin and [d,l]{.smallcaps}-BApNA, the result is 0.019 (Kakade et al. [@CR21]).
Statistics {#Sec8}
----------
Differences in mean oviposition rates per plant among treatments were tested with a generalized linear model (GLM) with a Gaussian error distribution (R Development Core Team [@CR37]). Contrasts among treatments were assessed by aggregating non-significant treatment levels in an a posteriori stepwise procedure (Crawley [@CR13]). Differences in PI activity were analyzed with a GLM with a Gaussian error distribution.
We correlated the oviposition rates of the mites with PI activity measured in the same leaf. Because we expected oviposition not to depend linearly on proteinase inhibitor activity but to follow a dose--response curve, we also fitted such a curve (a three-parameter logistic model) of the form$$\documentclass[12pt]{minimal}
\usepackage{amsmath}
\usepackage{wasysym}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsbsy}
\usepackage{mathrsfs}
\usepackage{upgreek}
\setlength{\oddsidemargin}{-69pt}
\begin{document}$${\text{Ovip}} = a + \frac{b}{{1 + {\text{e}}^{{c - {\text{PI}}}} }},$$\end{document}$$where Ovip = oviposition rate of the spider mites, PI = the proteinase activity, and *a*, *b*, and *c* are parameters that were estimated with the nls function in R (R Development Core Team [@CR37]). Models were compared with the "anova" function in R (R Development Core Team [@CR37]) and with Akaike's information criterion (AIC), and nonsignificant parameters were removed from the model. We also used piecewise regression to identify the correlation of oviposition rate within various ranges of proteinase inhibitor activity and to assess the approximate value of the inflection point of the dose--response curve. In short, piecewise regression consists of fitting different linear regressions to various ranges of the data, choosing the ranges that result in the lowest residual standard error (Crawley [@CR13]).
Results {#Sec9}
=======
Timing of induction of direct plant defences {#Sec10}
--------------------------------------------
The oviposition rates of *T. urticae* and *T. evansi* were significantly affected by previous attack of the plants by *T. urticae* (GLM, *T. urticae*: *F*~4,15~ = 57.4, *P* \< 0.0001; *T. evansi*: *F*~4,15~ = 25.7, *P* \< 0.0001). Oviposition on leaves of clean plants (0 days of previous infestation) was significantly higher than on leaves previously attacked by *T. urticae*, and the oviposition after 1 day of previous infestation by *T. urticae* was lower than that after several days of previous infestation (Fig. [1](#Fig1){ref-type="fig"}a). These data confirm that *T. urticae* induces direct plant defences in tomato plants within 1 day (Kant et al. [@CR23]).Fig. 1Average oviposition rates (eggs/female/4 days + SE) of *Tetranychus evansi* (*white bars*) and *T. urticae* (*gray bars*) on discs made from leaves that were previously attacked by *T. urticae* (**a**) or *T. evansi* (**b**) for 1--4 days or that were not previously attacked (0 days). Oviposition rates were averaged over a maximum of 10 adult females per plant, and each treatment was repeated on 4 plants. For each panel and each species,*bars with the same letter* are not significantly different (contrast among treatments after a GLM). For logistical reasons, the experiments corresponding to panels **a** and **b** were not carried out at the same time. Therefore, treatments can only be compared within the same experiment
The oviposition rates of both species was also significantly affected by previous attacks by *T. evansi* (GLM, *T. urticae*: *F*~4,15~ = 9.5, *P* = 0.0005; *T. evansi*: *F*~4,15~ = 95.5, *P* \< 0.0001) (Fig. [1](#Fig1){ref-type="fig"}b). Oviposition on leaves that were previously attacked by *T. evansi* for 1 or 2 days was significantly higher than that on leaves of clean plants (0 days of previous infestation) (Fig. [1](#Fig1){ref-type="fig"}b). Oviposition by *T. evansi* on plants that were previously attacked by *T. evansi* for 3 and 4 days was lower than that on plants attacked for 1 or 2 days, but higher than that on clean plants (Fig. [1](#Fig1){ref-type="fig"}b). Oviposition by *T. urticae* on plants previously attacked by *T. evansi* for 3 and 4 days was not significantly higher than on plants that were not attacked before (Fig. [1](#Fig1){ref-type="fig"}b).
There was a significant effect of attacks by both species on proteinase inhibitor (PI) activity in the attacked leaves (Fig. [2](#Fig2){ref-type="fig"}a, GLM, *T. urticae*: *F*~4,15~ = 8.6, *P* = 0.0008; *T. evansi*: *F*~4,15~ = 3.19, *P* = 0.044). Levels of PI activity were significantly lower in leaves of unattacked plants (0 days of previous infestation) than in leaves previously attacked by *T. urticae* for 1--4 days (Fig. [2](#Fig2){ref-type="fig"}a). In contrast, PI activity was significantly lower in leaves attacked by *T. evansi* than in clean leaves (Fig. [2](#Fig2){ref-type="fig"}b). The PI activity showed a negative relation with the oviposition rates: when activity levels were high, oviposition rates were low, and vice versa (cf. Figs [1](#Fig1){ref-type="fig"}, [2](#Fig2){ref-type="fig"}).Fig. 2Average proteinase inhibitor (PI) activity (in mg trypsin/total protein + SE) in leaves that were previously attacked by *T. urticae* (**a**) or *T. evansi* (**b**) for 1--4 days, or that were not attacked (0 days). Oviposition rates (Fig. [1](#Fig1){ref-type="fig"}) were measured on the same leaves. Within each panel,*bars with the same letter* are not significantly different (contrast among treatments after GLM). See the legend to Fig. [1](#Fig1){ref-type="fig"} for further explanation
In conclusion, both the oviposition data and the PI activity levels show that the two herbivores affect plant defences within 1 day: whereas *T. urticae* upregulates defences, *T. evansi* downregulates them. We therefore decided to study the effects of simultaneous attack by both species after 1 day of infestation.
Simultaneous attack by *T. evansi* and *T. urticae* {#Sec11}
---------------------------------------------------
The oviposition rates of the two spider mite species did not differ significantly on leaves that were previously attacked by 100 or 200 mites of either species (Fig. [3](#Fig3){ref-type="fig"}). We therefore decided to use 100 mites of each species to infest the leaves of the plants, resulting in 200 mites on leaves that were attacked simultaneously and 100 mites on leaves that were attacked by one of the two species.Fig. 3Average oviposition rates (number of eggs per female per 4 days + SE) of *T. evansi* and *T. urticae* on leaves that had previously been infested for 4 days. **a** Previous infestation with 100 (*white bars*) or 200 *T. urticae* (*light gray bars*). There was no effect of the number of mites used for the infestation on the oviposition rate of *T. evansi* (GLM with gamma error distribution: *df* = 1.6, deviance = 0.004, *P* = 0.118) or *T. urticae* (*df* = 1.6, deviance = 0.0005, *P* = 0.769). **b** Previous infestation with 100 (*dark gray bars*) or 200 *T. evansi* (*black bars*). Again, there was no effect of the number of mites on the oviposition of *T. evansi* (*df* = 1.6, deviance = 0.0007, *P* = 0.63) or *T. urticae* (*df* = 1.6, deviance = 0.00014, *P* = 0.93)
The oviposition rates of the two species were significantly affected by the plant treatments (GLM, *T. urticae*: *F*~3,12~ = 61.5, *P* \< 0.0001; *T. evansi*: *F*~3,12~ = 9.84, *P* = 0.0015) (Fig. [4](#Fig4){ref-type="fig"}). Previous infestation by *T. evansi* for 1 day resulted in higher oviposition rates than on previously uninfested plants for both species, confirming our earlier findings (Sarmento et al. [@CR44], [@CR45]). As expected, a previous infestation by *T. urticae* resulted in lower oviposition rates for both species. Simultaneous infestation resulted in intermediate oviposition rates, which were not significantly different from that on clean plants for *T. evansi*, but it was somewhat lower than that observed on clean plants for *T. urticae* (Fig. [4](#Fig4){ref-type="fig"}).Fig. 4Average oviposition rates (number of eggs per female per 4 days + SE) of *T. evansi* (*white bars*) and *T. urticae* (*gray bars*) on leaves that were previously infested for 1 day by *T. evansi* or *T. urticae*, by both, or were not infested (clean leaves). For each species,*bars with the same letters* do not differ significantly (contrast among treatments after GLM)
PI activity was significantly affected by the infestation (Fig. [5](#Fig5){ref-type="fig"}, *F*~3,12~ = 3.87, *P* = 0.038). The activities in leaves previously attacked by *T. evansi* and in clean leaves were significantly lower than in leaves that were previously attacked by *T. urticae* and by both mite species (Fig. [5](#Fig5){ref-type="fig"}). Comparison of Figs. [4](#Fig4){ref-type="fig"} and [5](#Fig5){ref-type="fig"} show a less clear negative relation of oviposition to level of PI activity than above (Figs. [1](#Fig1){ref-type="fig"}, [2](#Fig2){ref-type="fig"}).Fig. 5Average proteinase inhibitor (PI) activity (in mg trypsin/total protein, + SE) in leaves previously attacked for 1 day by *T. urticae,* by *T. evansi,* by both, and in uninfested leaves (clean). Oviposition rates (Fig. 5) were measured on the same leaves.*Bars with the same letter* are not significantly different (contrast among treatments after GLM)
Discussion {#Sec12}
==========
Our results confirm earlier findings that *T. evansi* downregulates plant defences (Sarmento et al. [@CR44], [@CR45]; Alba et al. [@CR4]). In particular, both *T. evansi* and *T. urticae* had higher oviposition rates on leaves previously attacked by *T. evansi*. Our results also show that the *T. urticae* used here induces defences in tomato plants (Li et al. [@CR32]; Kant et al. [@CR23], [@CR24]; Ament et al. [@CR5]), and that *T. evansi* is sensitive to these defences (Sarmento et al. [@CR44]). The effects of induction as well as reduction of defences on oviposition occurred within 1 day. Indeed, the oviposition rates of the herbivore species on leaves previously attacked by *T. evansi* were highest after 1 day of previous infestation and decreased subsequently (Fig. [1](#Fig1){ref-type="fig"}), which could be due to an increase of plant defences because of a longer period of attack and consequently higher damage levels, or because of a decrease in the quality of the leaf discs due to depletion by the herbivores. The fact that the proteinase inhibitor (PI) activity did not increase with the period of infestation by *T. evansi* (Fig. [2](#Fig2){ref-type="fig"}b) seems to point to the latter explanation.
Whereas the line of *T. urticae* used here induced plant defences, resulting in lower oviposition rates, *T. evansi* reduced plant defences, causing higher oviposition rates. Surprisingly, the oviposition rates of both species on leaves that were previously attacked by both species simultaneously were intermediate between the oviposition rates observed on leaves previously attacked by either of the two species separately (Fig. [4](#Fig4){ref-type="fig"}), suggesting that the effects of both species on the effective plant defences roughly cancel out. Hence, *T. evansi* can reduce plant defences to levels lower than those present in clean plants (Sarmento et al. [@CR44]) but cannot reduce defences induced by *T. urticae* to those low levels. Likewise, Alba et al. ([@CR4]) found that *T. evansi* did not suppress the accumulation of phytohormones involved in plant defence in leaves co-infested with *T. urticae*, but did suppress the expression of downstream defence marker genes. This suggests that the compounds that are possibly involved in the reduction of plant defences by *T. evansi* are not capable of completely circumventing defences, and that elicitors involved in the induction of plant defences by *T. urticae* can partially rescue the defences reduced by such compounds. Possibly, plants cannot cope with these compounds and elicitors simultaneously, but the higher activity of PI observed in leaves attacked by both mites shows that there is at least some defence response in the doubly infested leaves (Fig. [5](#Fig5){ref-type="fig"}). This is further confirmed by the oviposition rate of *T. urticae*, which was slightly, but significantly, different on leaf discs from co-infested plants than on leaf discs from clean plants.
The high activity of PI in co-infested leaves (Fig. [5](#Fig5){ref-type="fig"}) and the intermediate oviposition rates on these leaves (Fig. [4](#Fig4){ref-type="fig"}) suggest that the activity of this defensive compound does not correlate well with the level of plant defences as reflected in herbivore performance. However, the PI levels were measured at the start of the oviposition tests and the activity levels in the leaf discs may have changed during the 4 days of the oviposition assay. We therefore used the oviposition data of the first day of the experiment on simultaneous attack to investigate the correlation between PI activity level and oviposition rates (oviposition data from the experiment on the timing of induction were collected once after 4 days, so they could not be used for this). As with many toxic and defensive compounds, one would expect that low and very low activity levels have no effect on performance, whereas high and very high activity levels would have the maximum effect. We therefore fitted dose--response curves as well as linear models to the data.
The correlation between PI activity level and oviposition of *T. urticae* was bordering on significant (Fig. [6](#Fig6){ref-type="fig"},*F*~1,14~ = 4.0, *P* = 0.065). A piecewise regression model did not give a significantly better fit than a linear model, but a three-parameter logistic model gave a significant better fit than the linear model (Fig. [6](#Fig6){ref-type="fig"}, *F*~1,13~ = 7.44, *P* = 0.017, AIC of the linear model: 45.3, AIC of the logistic model: 40.1). Neither of the models was significant for *T. evansi*. The seven points of lowest PI activity corresponding to the plateau of high oviposition in *T. urticae* (gray points in Fig. [6](#Fig6){ref-type="fig"}) are from the 4 plants that were previously attacked by *T. evansi* and 3 of the clean plants. It is clear that an increase of proteinase inhibitor activity to levels above \~40 does not further decrease the oviposition rate of *T. urticae* (Fig. [6](#Fig6){ref-type="fig"}), and that the oviposition rate of *T. evansi* does not correlate with proteinase inhibitor activity. This absence of a linear correlation between PI activity and mite performance shows that it is potentially problematic to use PI activity to quantify the levels of plant defence experienced by the herbivores. This is hardly surprising given the many and varied changes that occur in plants upon attacks by herbivores (Baldwin and Preston [@CR7]; Baldwin et al. [@CR8]; Kant and Baldwin [@CR22]; Alba et al. [@CR4]), but the repercussion of this is that plant defences can only be assessed in a comprehensive way through measurements of herbivore performance because this integrates the impacts of all defensive actions of the plant (Kahl et al. [@CR20]; Consales et al. [@CR12]). Possibly, there is spatial variation in the concentrations of defensive compounds within single leaves (Shroff et al. [@CR47]), and the mites preferentially feed on tissues with low defence levels. In this case, the levels of PI activity measured in this study may not be representative of the tissue on which the mites were feeding. We suggest that it is informative to test other defensive traits for correlation with herbivore performance in a similar fashion.Fig. 6Relationships between proteinase inhibitor (PI) activity (data from Fig. [5](#Fig5){ref-type="fig"}) and the oviposition rates (eggs/female/day) of *T. urticae* (*circles*) and *T. evansi* (*diamonds*) on discs from the same leaf (data included in Fig. [4](#Fig4){ref-type="fig"}). Proteinase activity levels were assessed at the onset of the oviposition assay; oviposition was measured 1 day later. The seven *gray symbols* correspond to the lowest seven PI activity levels, which were from the four plants previously attacked by *T. evansi* and three of the four clean plants (Fig. [5](#Fig5){ref-type="fig"}). The fitted curve is a 3-parameter dose--response curve \[Ovip = 6.81 − 1.40/(1 + e^30.08 − *PI*^)\] to the oviposition data of *T. urticae*
We show here and elsewhere (Sarmento et al. [@CR44]) that *T. urticae* can profit from the decrease of plant defences caused by *T. evansi*. Even in doubly infested leaves, *T. urticae* has a higher oviposition rate than on leaves with conspecifics only. In contrast, the performance of *T. evansi* decreases as a consequence of defences induced by *T. urticae*. This suggests that *T. urticae* should preferentially attack plants previously infested by *T. evansi*, and the latter should prefer plants attacked by conspecifics to plants attacked by *T. urticae*. This remains to be tested. Meanwhile, it is clear that the two herbivore species affect each other through induced plant responses, and this can affect the course of within-plant competition between them. However, when populations of the two species were allowed to grow on the same plants, populations of *T. urticae* showed low population growth rates and were outcompeted by *T. evansi*. In contrast, *T. evansi* was not significantly affected by the presence of *T. urticae* (Sarmento et al. [@CR45]). The profuse web produced by *T. evansi* was probably one of the causes, because it hinders *T. urticae* (Sarmento et al. [@CR45]), but reproductive interference between the two species may also have played a role (Sato et al. [@CR46]). This shows that assessment of defence-mediated indirect effects among herbivores cannot serve as a prediction for the outcome of competition, and competition experiments are essential to assess the net effect of simultaneous attacks on the population dynamics of the herbivores.
In general, it is thought that chewing insects such as caterpillars induce the jasmonic acid (JA) defence pathway, whereas phloem-sucking insects such as aphids and whiteflies induce the salicylic acid (SA) pathway (Walling [@CR54], [@CR55]; de Vos et al. [@CR15]; Zarate et al. [@CR57]). However, it is known that several species of spider mites induce both pathways (Kant et al. [@CR23]; Ament et al. [@CR5]; Matsushima et al. [@CR33]), and there is accumulating evidence that *T. evansi* induces neither of the two (Sarmento et al. [@CR44], [@CR45]; Alba et al. [@CR4]). Interactions between these two pathways have often been shown (Thaler et al. [@CR50], [@CR51]; Arimura et al. [@CR6]; Bruessow et al. [@CR11]). This suggests that herbivores that induce different defensive pathways may increase each other's performance on co-attacked plants (Rodriguez-Saona et al. [@CR39], [@CR40]; Bruessow et al. [@CR11]; Soler et al. [@CR48]) because they are differentially susceptible to defences mediated by different signaling pathways that interact with each other (Thaler et al. [@CR51]). We show that the performance of *T. urticae* was improved on plants previously attacked by *T. evansi*, but the opposite was not the case. The increased performance of *T. urticae* shows that positive indirect effects through plant defences are not necessarily restricted to insects with different feeding modes that induce different defensive pathways: *T. urticae* can induce both pathways (Kant et al. [@CR23]) but *T. evansi* appears to induce neither of them (Sarmento et al. [@CR44]). The two herbivore species studied here are closely related, and both feed on the contents of leaf parenchyma cells. Yet they cause contrasting effects on plant defences and affect each other's performance on plants through induced defences. In fact, earlier studies have shown considerable variation in the induction of and sensitivity to induced plant defences within one species (Kant et al. [@CR24]). We therefore suggest that it is better to focus on the actual effects of herbivores on plant defences rather than generalizing across feeding modes (Agrawal [@CR2]).
**Author contribution statement** {#d30e1620}
---------------------------------
EFdO and AJ conceived and designed the experiments. EFdO performed the experiments. AJ and EFdO analyzed the data. AJ, EFdO, and AP wrote the manuscript.
We dedicate this paper to our late dear friend and mentor Maurice Sabelis, who commented on an earlier version of the manuscript. The comments of the anonymous reviewers resulted in substantial improvement of the manuscript. We thank Renato Sarmento, Felipe Lemos, Martijn Egas, Merijn Kant, Dan Li, Martijn Egas, Juanma Alba, Bart Schimmel, Livia Ataide, Hans Breeuwer, Fabricio Ribeiro, Ana Bernardo, Cleide Dias, Eraldo Lima, Carlos Villarroel, Marcela Siveira, Bram Knegt, Madelaine Venzon, and two anonymous reviewers for discussions, support, and comments. Fabrício Ribeiro and Camila Rocha Silva helped with the proteinase inhibitor assays. EFdO received a scholarship from CAPES, AJ received a scholarship from FAPEMIG (CBB-30003/09), and AP was supported by CNPq. The authors declare no conflict of interest.
[^1]: Communicated by Diethart Matthies.
|
{
"pile_set_name": "PubMed Central"
}
|
At Popisms.com, we show you how pop culture (TV, movies, books, ads) is connected to other pop culture. For example, what song is in that Super Bowl commercial or TV episode? What book is that character reading? What music is another song sampling? We answer these questions and many more.
Jim Beam Commercial (2014 - 2015)
Plot / Description
We age our bourbon twice as long as the law requires to be a Kentucky Straight bourbon. Just another way we #MakeHistory.
"Mila Kunis Makes History"
Voiceover / Dialog / Script / Spoken Word
The Beam family has a long history of doing things their own way. They age every drop of Jim Beam twice as long as the law requires. So, four long years from now, I'll be back for this one. Jim Beam. Make history.
|
{
"pile_set_name": "Pile-CC"
}
|
1. Introduction {#sec1-ijerph-17-00884}
===============
Adolescence is the phase of life between late childhood and adulthood \[[@B1-ijerph-17-00884]\]. It is a unique developmental stage during which an individual is constantly being shaped and influenced by their environment \[[@B2-ijerph-17-00884]\]. The effects of the environment are sometimes irreversible on mental and emotional development as well as physical maturation \[[@B3-ijerph-17-00884],[@B4-ijerph-17-00884]\]. Positive youth development can lead to a healthy and successful adulthood \[[@B5-ijerph-17-00884]\]. Providing an environment that supports positive youth development is thus beneficial for not only adolescents, but also for individuals of all ages \[[@B6-ijerph-17-00884]\].
Pet ownership may be an important environmental factor for mental well-being among adolescents as several studies have suggested an association between pet ownership and mental well-being among adolescents \[[@B7-ijerph-17-00884],[@B8-ijerph-17-00884],[@B9-ijerph-17-00884]\]. However, this association is not limited to adolescence. Companionship with pets may be important for positive mental health and well-being \[[@B10-ijerph-17-00884]\]. Connection with pets provides benefits to those with mental health problems by offering emotional support \[[@B11-ijerph-17-00884]\]. Moreover, pet ownership is a modifiable environmental factor \[[@B12-ijerph-17-00884],[@B13-ijerph-17-00884]\] because we can choose whether we own pets or not. However, the results of previous studies have been controversial, and a recent systematic review showed there is a shortage of high-quality and longitudinal studies that consider probable differences among different species \[[@B14-ijerph-17-00884]\]. Although dogs and cats are among the most popular companion animals in the world, they may have different effects on the mental well-being of humans, which are activated through different underlying mechanisms depending on the type of ownership. A recent study showed that the human--dog interaction through dogs' human-like gazing behavior increased human oxytocin \[[@B15-ijerph-17-00884]\], which has received increasing attention for its role in promoting positive social behavior and stress regulation, and its potential as a therapeutic intervention for addressing various aspects of psychiatric disorders \[[@B16-ijerph-17-00884],[@B17-ijerph-17-00884]\]. Conversely, a recent meta-analysis revealed that the presence of the parasite *Toxoplasma gondii* in the human body, which may be transmitted from cats to humans, is significantly associated with increased risk of traffic accidents and suicide attempts among those infected \[[@B18-ijerph-17-00884]\]. *T. gondii* alters host's behavior \[[@B19-ijerph-17-00884]\], and the oocytes seem to be a risk factor for developing schizophrenia \[[@B20-ijerph-17-00884]\]. Thus, cat ownership in childhood may be related to later schizophrenia risk \[[@B21-ijerph-17-00884]\]. On the other hand, the ALSPAC cohort study in the UK showed that cat ownership in pregnancy and childhood did not increase the risk of adolescent psychotic experiences \[[@B22-ijerph-17-00884]\]. Given these results, it is possible that the impact of dog and cat ownership on adolescents' mental well-being may be more complex than it seems.
This study aimed to examine the effect of dog and cat ownership on the longitudinal trajectory of the mental well-being of adolescents using data from a population-based birth cohort study (The Tokyo Teen Cohort), while taking into account a wide range of confounding variables and considering the differences among the two analyzed species. To the best of our knowledge, this is the first study that longitudinally analyzes the effect of pet ownership, taking into account species difference while also analyzing data from a prospective and population-based birth cohort study with a large sample.
2. Materials and Methods {#sec2-ijerph-17-00884}
========================
2.1. Data and Samples {#sec2dot1-ijerph-17-00884}
---------------------
This study was part of the Tokyo TEEN Cohort (TTC) project (for the protocol, see \[[@B23-ijerph-17-00884]\]), an ongoing, prospective, and population-based birth cohort study on adolescents and their primary caregivers. Briefly, the TTC aimed to investigate the health and development of adolescents, and its details are described elsewhere \[[@B24-ijerph-17-00884],[@B25-ijerph-17-00884],[@B26-ijerph-17-00884]\]. In the first time point of the study, a sample of 3171 households with adolescents aged 10 years (i.e., born between September 2002 and August 2004) was obtained from 3 municipalities (Chofu, Mitaka, and Setagaya) in Tokyo, Japan, by random sampling from the basic resident register. When children were aged 12 years, 3007 households participated in the second time point of the study (follow-up rate: 94.8%). Trained interviewers obtained written informed consent from the adolescents' primary caregivers, asked adolescents and their caregivers to complete a set of questionnaires, conducted a semi-structured interview, and measured anthropometric data (height, weight, and grip). The study protocol of the TTC was approved by the institutional review boards from the Tokyo Metropolitan Institute of Medical Science (Approval number: 12--35), SOKENDAI (Graduate University for Advanced Studies (2012002)) and the University of Tokyo (10057).
2.2. Variables {#sec2dot2-ijerph-17-00884}
--------------
Adolescents were interviewed to determine whether they have any pets in their home, "Do you have any pets?" at age 10. Their responses were coded in 2 dichotomized variables as 1) own (1) or not own (0) for a dog or 2) own (1) or not own (0) for a cat.
2.3. Outcome {#sec2dot3-ijerph-17-00884}
------------
Mental well-being was assessed at ages 10 and 12, using the self-report questionnaire which was a 5-item World Health Organization Well-Being Index (WHO5) \[[@B27-ijerph-17-00884],[@B28-ijerph-17-00884]\]. Each item assessed the degree of well-being over the past 2 weeks on a 6-point Likert-type scale ranging from 0 (at no time) to 5 (all of the time). Total scores derived from the WHO5 ranged from 0 to 25, with higher scores indicating better psychological well-being. The total raw score, ranging from 0 to 25, was multiplied by 4 to obtain the final score, with 0 representing the worst imaginable well-being and 100 representing the best imaginable well-being. The WHO5 scale was used in the original format without modifications. All existing language versions of this questionnaire are available on the website \[[@B29-ijerph-17-00884]\].
2.4. Covariates {#sec2dot4-ijerph-17-00884}
---------------
The covariates included were sex, age, parental age, parental educational level, annual household income, and the number of siblings. This information was collected at age 10. We adjusted for multiple confounders which were applied in the previous studies, including sex \[[@B30-ijerph-17-00884],[@B31-ijerph-17-00884],[@B32-ijerph-17-00884]\], age \[[@B31-ijerph-17-00884]\], parental age \[[@B22-ijerph-17-00884],[@B32-ijerph-17-00884]\], parental educational level \[[@B22-ijerph-17-00884],[@B30-ijerph-17-00884],[@B32-ijerph-17-00884]\], annual household income (in relevance to social class and work status) \[[@B22-ijerph-17-00884],[@B30-ijerph-17-00884],[@B31-ijerph-17-00884],[@B32-ijerph-17-00884]\], and number of siblings (in relevance to presence of older siblings, number of people in the household, and household crowding) \[[@B22-ijerph-17-00884],[@B31-ijerph-17-00884],[@B32-ijerph-17-00884]\].
2.5. Statistical Analysis {#sec2dot5-ijerph-17-00884}
-------------------------
Linear regression analysis was performed to estimate the associations between pet ownership at age 10 and well-being at age 12. We calculated the non-standardized *B*s (multiple regression coefficients) of dog-ownership and cat-ownership. We then adjusted for the covariates. Two-factor mixed-design analysis of variance (ANOVA) for pet-owner types (non-dog/cat owners, dog owners (owned no cats), cat owners (owned no dogs)) and 2 time points (ages 10 and 12) was performed. The group who owned both dogs and cats was excluded because their number was too low, and the sample was not representative (*n* = 9). The significance level (*α*) was set to 0.05 for a 2-sided test. All statistical analyses were conducted using IBM SPSS Statistics for Windows, version 24.0.0.1 (IBM Corp., Armonk, NY, USA).
3. Results {#sec3-ijerph-17-00884}
==========
Of the 3171 initially enrolled households, 2584 (81.5%) were included in our final analytic sample. Participants who had missing data on pet ownership, well-being at age 10 and 12, sex, age (months), parental age, parental educational level, annual household income, and the number of siblings were excluded from the present analyses. There were no differences among the excluded and included subjects in terms of dog ownership (*χ*^2^ = 0.20, *p* = 0.650), well-being at age 10 (*χ*^2^ = 37.36, *p* = 0.167), well-being at age 12 (*χ*^2^ = 19.67, *p* = 0.943), sex (*χ*^2^ = 0.33, *p* = 0.566), age in months (*χ*^2^ = 15.46, *p* = 0.563), mother's age (*χ*^2^ = 38.34, *p* = 0.115), father's age (*χ*^2^ = 31.07, *p* = 0.843), mother's educational level (*χ*^2^ = 10.15, *p* = 0.071), and father's educational level (*χ*^2^ = 5.54, *p* = 0.354), although there were differences in terms of cat ownership (*χ*^2^ = 5.55, *p* = 0.018), annual household income (*χ*^2^ = 228.80, *p* \< 0.001), and number of siblings (*χ*^2^ = 16.45, *p* = 0.012). Cat ownership was higher in excluded subjects, and annual household income and number of siblings were higher in included subjects.
Demographic characteristics of participants are shown in [Table 1](#ijerph-17-00884-t001){ref-type="table"}. Approximately 10% of adolescents owned dogs, and 4% owned cats. The results of linear regression analysis showed that dog ownership at age 10 predicted better well-being at age 12 compared to no dog ownership (*B* = 2.61, 95% CI: 0.17--5.05, *p* = 0.036), while cat ownership at age 10 predicted worse well-being at age 12 compared to no cat ownership (*B* = −5,65. 95% CI: −9.26--−2.03, *p* = 0.002). The effect remained significant after adjusting for covariates (dog: *B* = 2.45, 95% CI: 0.19--4.71, *p* = 0.033; cat: *B* = 6.14, 95% CI: −9.49--−2.79, *p* \< 0.001). These results are shown in [Table 2](#ijerph-17-00884-t002){ref-type="table"}. Among boys, dog ownership at age 10 predicted better well-being at age 12 compared to no dog ownership (*B* = 3.32, 95%CI: 1.00--7.86, *p* = 0.011), while cat ownership at age 10 predicted worse well−being at age 12 compared to no cat ownership (*B* = −6.55, 95%CI: −11.60--−2.45, *p* = 0.010). The effect remained significant after adjusting for covariates (dog: *B* = 4.04, 95%CI: 0.90--7.18, *p* = 0.012,; cat: *B* = −7.03, 95%CI: −11.60--−2.45, *p* = 0.003). Among girls, neither dog ownership nor cat ownership at age 10 predicted better nor worse well-being at age 10 (dog: *B* = 0.64, 95%CI: −2.84--4.12, *p* = 0.719; cat: *B* = −4.63, 95%CI: −9.89--0.62, *p* = 0.084). Adjusting for covariates did not change the results for dog ownership (*B* = 0.65, 95%CI: −2.61--3.91, *p* = 0.696) but did for cat ownership (*B* = −5.34, 95%CI: −10.27--−0.41, *p* = 0.034).
Two-way mixed-design ANOVA showed significant interaction of time points and owner types (*F* (2, 2572) = 6.78, *p* = 0.001). Simple main effect of owner types was not significant at age 10 (*F* (2, 2572) = 0.18, *p* = 0.835), but it was significant at age 12 (*F* (2, 2572) = 6.61, *p* = 0.001). Bonferroni adjustments were administered for multiple comparisons and found significant pairs at age 12 as follows: cat owners (owned no dogs) and non-dog/cat owners (*p* = 0.017) and cat owners (owned no dogs) and dog owners (owned no cats) (*p* = 0.001). Other pairs were not significant. The simple main effect of time points was significant in non-dog/cat owners (*F* = 85.55, *p* \< 0.001) and cat owners (owned no dogs) (*F* = 26.21, *p* \< 0.001) but not significant in dog owners (owned no cats) (*F* = 1.38, *p* = 0.240). The related result below is shown in [Figure 1](#ijerph-17-00884-f001){ref-type="fig"}. Among boys, a significant interaction of time points and owner types was also found (*F* (2, 1357) = 6.202, *p* = 0.002). Simple main effect of owner types was not significant at age 10 (*F* (2, 1357) = 0.189, *p* = 0.828), but it was significant at age 12 (*F* (2, 1357) = 6.284, *p* = 0.002). Bonferroni adjustments were administered for multiple comparisons and found significant pairs at age 12 as follows: dog owners (owned no cats) and non-dog/cat owners (*p* = 0.020), and dog owners (owned no cats) and cat owners (owned no dogs) (*p* = 0.002). Other pairs were not significant. The simple main effect of time points was significant in no dog or cat owners (*F* = 33.08, *p* \< 0.001) and cat owners (owned no dogs) (*F* = 14.21, *p* \< 0.011) but was not significant in dog owners (owned no cats) (*F* = 0.30, *p* = 0.581). Among girls, the interaction of time points and owner types was not significant (*F* (2, 1212) = 1.810, *p* = 0.164). Simple main effects of owner types was neither significant at age 10 (*F* (2, 1212) = 0.029, *p* = 0.972) nor at age 12 (*F* (2, 1212) = 1,704, *p* = 0.182). The simple main effect of time points was significant in all groups (non-dog/cat owners: *F* = 54.63, *p* \< 0.001; cat owners: *F* = 12.04, *p* = 0.001; dog owners: *F* = 5.28, *p* = 0.022).
4. Discussion {#sec4-ijerph-17-00884}
=============
This is the first study to investigate the different effects of dog ownership and cat ownership on adolescents' well-being, adjusting for various demographic and socioeconomic variables using a large-sample, longitudinal, population-based study. The prevalence of dog/cat ownership in this study was consistent with a previous large-scale Japanese study \[[@B33-ijerph-17-00884]\]. Dog ownership at age 10 was associated with increased well-being at age 12 compared to no dog ownership, and cat ownership at age 10 was associated with decreased well-being at age 12 compared to no dog ownership. These results were also the same after adjusting for covariates, including socio-demographic factors.
Previous studies have shown that the mental well-being of an individual in their adolescence has a long-lasting impact on the individual's later life \[[@B2-ijerph-17-00884],[@B34-ijerph-17-00884]\], even though mental well-being was shown to generally decline throughout adolescence \[[@B30-ijerph-17-00884]\]. Previous studies have revealed that the life-long trajectory of well-being is U-shaped; it declines through the teen years to young adulthood, hits the bottom around the 40s or 50s, and increases thereafter \[[@B30-ijerph-17-00884],[@B35-ijerph-17-00884]\]. In our study, we confirmed that well-being declined from age 10 to age 12 and identified the preventive effect of dog ownership on the decline of well-being. On the other hand, we also identified that the well-being of the cat owners' group significantly declined compared with the 2 other groups (dog owner group and non-dog/cat owner group).
Our results suggested that the effect of dog and cat ownership on adolescent well-being may have different underlying mechanisms. One factor may be the owner's physical activity with their pet. Dog owners often go walking with their pet \[[@B36-ijerph-17-00884]\]. Dog walking brought adolescents 7--8% more physical active minutes per day \[[@B37-ijerph-17-00884]\] and has a benefit for children's overweight or obesity \[[@B38-ijerph-17-00884]\]. However, cat owners may not go for a walk with their pets but may play with pets indoors. This could cause the difference in time length and intensity of owner's physical activity and lead to higher/lower well-being. As previous research shows, some parents own a pet because they want to teach their children responsibility and kindness \[[@B39-ijerph-17-00884]\]. Children from household with pets may learn responsibilities that benefit the development of their well-being. This point should be also considered in future studies. Deepening this discussion with a biological view, we know that oxytocin is a neuropeptide, receptors for which are distributed in one's brain. Oxytocin relates to trust in other humans \[[@B40-ijerph-17-00884]\] and modulates our sociality \[[@B41-ijerph-17-00884]\]. Further, through social interaction, oxytocin suppresses cortisol concentration, which is a response to stress \[[@B42-ijerph-17-00884]\]. Dog gaze has been shown to increase the oxytocin level in owner's urine \[[@B15-ijerph-17-00884]\], which means the dog may increase oxytocin in its owner, promote social bonding, and decrease stress levels. However, a similar testing method was not used for cats, therefore, we should be careful how we interpret the results of cat ownership in this study. Future studies should aim to investigate the effects of cats on humans based on useful methods in previous studies \[[@B43-ijerph-17-00884],[@B44-ijerph-17-00884]\]. With respect to cats, a previous study about the risk of childhood cat ownership on schizophrenia in later life, mentioned the possibility of *T. gondii* infection from cats \[[@B21-ijerph-17-00884]\]. Moreover, we know that *T. gondii* is a parasite which affects warm-blooded animals \[[@B18-ijerph-17-00884]\]. Their primary hosts are cats \[[@B22-ijerph-17-00884]\]. *T. gondii* affects the brain through inflammation or changes in the microbiome \[[@B45-ijerph-17-00884]\]. As several experiments have shown, *T. gondii* alters the behavior of rodents, making them easier prey for cats \[[@B19-ijerph-17-00884]\]. Mice infected by *T. gondii* once lose innate aversion for cat's urine permanently even after the infection has been removed \[[@B46-ijerph-17-00884]\]. In humans, *T. gondii* may be associated with an elevated risk for mental health issues, such as psychosis-like symptoms, bipolar disorder, violence, suicide attempts, anxiety disorder, and obsessive disorder \[[@B45-ijerph-17-00884]\]. In summary, a cat can be an infection source of *T. gondii* in its owner, causing brain dysfunction by inflammation or alteration in the microbiome, and leading to psychiatric symptoms. A future TTC study will attempt to answer these remaining questions of psychological, physiological, and biological mechanisms.
Our results showed that not all types of pet ownership enhance adolescents' well-being, and that there can be substantial differences based on the species owned. Compared with cat ownership, dog ownership seemed to be more beneficial for maintaining well-being across adolescence. A previous experimental study reported that interaction with a therapy dog during 20 minutes improved well-being among students \[[@B47-ijerph-17-00884]\]. Considering the fact that a very small duration of interaction promoted well-being, constant interactions with a dog in one's home may provide even greater benefits. Further, interactions between adolescents and dogs are not limited to therapy and could be promoted in school and other various situations where pets are allowed. On the other hand, when living together with cats, people should be aware of the risk of *T. gondii*. Based on previous studies, we believe that in order to prevent this disease, it would be helpful for the respective owners to keep his/her cat indoors, limit its hunting, clean litter pan daily, and dispose of feces in the toilet while wearing disposal gloves \[[@B48-ijerph-17-00884]\]. A recent study attempted to develop a vaccine for *T. gondii* \[[@B49-ijerph-17-00884]\]. These challenges may lead to a better life for cats and humans. One of the strengths in our study is overcoming the methodological limitations which were suggested in the systematic review \[[@B14-ijerph-17-00884]\]. Firstly, the sample size of TTC was large (*N* = 2584), while those in the previous studies were small (*N*: 15--1541). Secondly, samples in most of the previous studies were homogeneous and self-selected; however, the TTC sample was population-based. Thirdly, the main study design of previous studies was cross-sectional (13/22), while our TTC study was longitudinal with a prospective design, which enabled us to analyze temporal direction. Fourth, TTC had several demographic and socioeconomic variables to adjust covariates. We adjusted for multiple confounders which were applied in the previous studies. Fifth, dogs and cats were separately addressed in this study to investigate the varying effects of different pet types.
There are nevertheless some limitations. Firstly, TTC was not initially designed to study pet ownership, so we missed the data of pet ownership before and after age 10. Adolescents who lost their pets before age 10 or who owned pets after age 10 might be coded as non-owners in this study. We also did not have the information on the age of pets, duration of pet ownership, amount of time spent with the pet, which family member takes most care of the pet, and the strength of the attachment to the pet. Involvement with pets may be reflected in the strength of the ownership effect. These factors should be considered in future studies. Secondly, pets are not only limited to dogs and cats. Other pet species may also have a different effect. Thirdly, we adjusted for all confounders mentioned in the previous studies, however, the possibility of another confounding factor exists. Fourth, we did not examine whether the prediction of well-being from dog ownership and cat ownership is limited to adolescents in Tokyo, which is an affluent urban area in a developed Asian country. Geographical or cultural differences in ownership may exist. Fifth, we did not consider the subjective or general health of pet owners. Subjective health was controlled in the previous wellbeing study \[[@B30-ijerph-17-00884]\]. In the systematic review of pets and adolescents, the possibility exists that families with children experiencing difficulties in health or development may tend to have more or fewer pets \[[@B14-ijerph-17-00884]\]. Future studies should examine problems in health and/or developmental difficulties. Sixth, we did not differentiate whether the pet owner was the child, another family member, or the family as a whole in this study. Future studies can consider whether this difference could also have an effect.
To the best of our knowledge, this was the first large-sampled, longitudinal, population-based study which has investigated the different effects of dog and cat ownership on adolescent's well-being while adjusting for covariates and analyzing the differences among these two species. When compared to the well-being of non-dog/cat owners, dog ownership predicted positive adolescents' well-being, and cat ownership predicted negative adolescents' well-being. The well-being of dog owners was maintained through the study period from 10--12 years, whereas the well-being of cat owners seemed to decline through the study period from 10--12 years.
5. Conclusions {#sec5-ijerph-17-00884}
==============
Dog ownership and cat ownership differently predicted adolescents' well-being. Dog ownership had a positive effect on adolescents' well-being compared to no dogs, however, cat ownership had a negative effect compared to no cats. The well-being trajectory of dog owners was maintained through adolescence, while that of cat owners declined.
We would like to sincerely thank all of the adolescents and their primary caregivers who participated in TTC. We acknowledge the work of all the interviewers who conducted the data collection.
conceptualization, A.N., T.K., K.E., and S.Y.; methodology, K.E., S.A., K.M., M.N. (Miho Nagasawa), and J.I.; formal analysis, S.Y. and K.E.; data curation, S.A., K.K., M.H.-H., and I.K.; writing---original draft preparation, K.E., S.Y., A.N., S.A., and M.N. (Miharu Nakanishi); writing---review and editing, K.K., M.H.-H., T.K., K.M., M.N. (Miho Nagasawa), I.K., J.I., and S.U.; project administration, A.N.; funding acquisition, A.N., S.Y., K.K., and T.K. All authors have read and agreed to the published version of the manuscript.
This work was supported by a Grant-in-Aid for Scientific Research on Innovative Areas (23118002; Adolescent Mind & Self-Regulation) from the Ministry of Education, Culture, Sports, Science, and Technology of Japan. This study was also supported by JSPS KAKENHI (grant numbers JP16H06395, 16H06398, 16H06399, 16K21720, 16K15566, 16H03745, and 17H05931). This work was supported in part by the UTokyo Center for Integrative Science of Human Behavior (CiSHuB), the International Research Center for Neurointelligence (WPI-IRCN) at the University of Tokyo Institutes for Advanced Study (UTIAS), and the MEXT\*-Supported Program for the Private University Research Branding Project (2016-2019).
The authors declare no conflict of interest.
{#ijerph-17-00884-f001}
ijerph-17-00884-t001_Table 1
######
Demographic characteristics of participants (N = 2584).
All Dog owners Cat owners Non-dog/cat owners
-------------------------------------- --------------------- ------- ------------ ------------ -------------------- ------- ------- ------- -------
Sex Female 1218 47.1% 119 46.9% 49 45.0% 1053 47.2%
Male 1366 52.9% 135 53.1% 60 55.0% 1177 52.8%
Age (months) 122 3.28 122 3.21 121 3.26 122 3.29
Well-being at age 10 79.06 16.61 79.42 16.83 80.04 15.65 78.98 16.63
at age 12 75.14 18.88 77.53 17.60 69.69 21.06 75.11 18.87
Parental age Mother 41.97 4.15 41.48 4.27 42.40 4.11 42.00 4.14
Father 44.12 5.17 43.40 5.12 45.26 5.00 44.16 5.19
Educational level of mother High school or less 411 15.9% 44 17.3% 15 13.8% 352 15.8%
2-year college 1150 44.5% 129 50.8% 53 48.6% 973 43.6%
4-year university 932 36.1% 71 28.0% 38 34.9% 826 37.0%
Graduate university 91 3.5% 10 3.94% 3 2.8% 79 3.5%
Educational level of father High school or less 470 18.2% 59 23.2% 28 25.7% 385 17.3%
2-year college 360 13.9% 33 13.0% 23 21.1% 305 13.7%
4-year university 1444 55.9% 137 53.9% 44 40.4% 1268 56.9%
Graduate university 310 12.0% 25 9.8% 14 12.8% 272 12.2%
Annual household income (10,000 yen) 0--299 64 2.5% 7 2.8% 4 3.7% 53 2.4%
300--599 636 24.6% 65 25.6% 39 35.8% 535 24.0%
600--999 1095 42.4% 96 37.8% 38 34.9% 964 43.2%
1000+ 789 30.5% 86 33.9% 28 25.7% 678 30.4%
Number of siblings 1.16 0.79 1.12 0.78 1.07 0.84 1.16 0.78
ijerph-17-00884-t002_Table 2
######
Multiple linear regression analysis for well-being at age 12.
Unadjusted Adjusted ^1^
--------------- ------------ -------------- ---- ------- ------- ------- ------- ---- ------- -------
Dog ownership 2.61 0.17 \- 5.05 0.036 2.45 0.19 \- 4.71 0.033
Cat ownership −5.65 −9.26 \- −2.03 0.002 −6.14 −9.49 \- −2.79 0.000
^1^ Adjusted for well-being at age 10, sex, age (months), parental age, parental educational level, annual household income, and the number of siblings.
|
{
"pile_set_name": "PubMed Central"
}
|
Risk of malignancy after gamma knife stereotactic radiosurgery.
To assess the risk of radiosurgery to cause malignant transformation in benign tumors or to induce new malignancies. A retrospective cohort study comparing the Sheffield, England, radiosurgery patient database with national mortality and cancer registries. This data set comprises approximately 5000 patients and 30,000 patient-years of follow-up, with more than 1200 patients having a follow-up period longer than 10 years. In this material, a single new astrocytoma was diagnosed, whereas, based on national incidence figures, 2.47 cases would have been predicted. No increased risk of malignancy was detected in this series, supporting the safety of radiosurgery. Pragmatically, in advising patients, the risks of malignancy would seem small, particularly if such risks are considered in the context of the other risks faced by patients with intracranial pathologies requiring radiosurgical treatments.
|
{
"pile_set_name": "PubMed Abstracts"
}
|
Premier League sponsors Barclays will not renew their £40million-a-year deal when the current agreement expires at the end of the 2015-16 season.
The bank agreed a £120m three-year deal in 2012 for the present rights - an increase of almost 50 per cent on their previous £82m contract.
But with Sky and BT Sport paying a record £5.1billion for TV rights from the start of the 2016 season, Barclays fear the cost of the next sponsorship will also rise considerably.
Barclays have sponsored the Premier League since 2001 but the 2015-16 season is set to be their last
The Premier League's new £5.1billion TV rights deal is set to increase the cost of sponsorship
Barclays advertising hoardings and ribbons adorn Manchester United's trophy lift at Old Trafford in May, 2013
Barclays have sponsored the Premier League since 2001 when they first used the sponsorship to promote their Barclaycard brand.
As well as the cost of the sponsorship, they must also consider the costs of promoting it through advertising, public relations and social media.
The popularity of the Premier League abroad is seen as a major factor behind the bank's decision to continue with their sponsorship for almost 15 years.
With games broadcast into 650 million homes in 175 countries, Barclays have used their agreements to promote themselves throughout the world, particularly in Africa and Asia.
Arsenal lift the Premier League trophy in 2002 after Barclays' first season as sponsors of the division
|
{
"pile_set_name": "OpenWebText2"
}
|
As a method for implementing color display in a liquid crystal display, there has been widely used a color filter method in which white light is adapted to travel through color filters of three primary colors (red, green, and blue) provided for respective pixels, thereby conducting color display. In this color filter method, however, when light emitted from the light source travels through the color filter, only light having a specific wavelength is selected and transmitted, and light having the other wavelengths is absorbed. For this reason, light availability is low and power consumption is increased.
Accordingly, there has been proposed a field sequential color method for conducting color display by lighting a plurality of light sources adapted to emit different color lights by time division. In this field sequential color method, lights emitted from the respective light sources are directly used for image display without traveling through the color filters. This results in high light availability and reduced power consumption. In addition, cost is reduced because of absence of the color filters.
Since the liquid crystal display using the above color filter method implements color display using the color filters of three primary colors, it is necessary to conduct display for each set of three pixels, i.e., red, green, and blue pixels. On the other hand, since the liquid crystal display using the field sequential color method implements color display by lighting the respective color lights by time division, display is conducted for each pixel. So, to achieve an equal resolution on an equally-sized display panel, the size of pixels in the liquid crystal display using the field sequential color method is three times as large as the size of the pixels in the liquid crystal display using the color filter method.
However, if the pixels are thus large-sized, it is highly probable that substances mixed in a liquid crystal layer causes dot defects. The dot defects makes the image noticeably degraded because of the large-sized pixels.
In the liquid crystal display using the field sequential color method, one frame period of a video signal is comprised of a plurality of sub-frame periods, and it is necessary for liquid crystal to complete a response within each of the sub-frame periods. If the liquid crystal responds slowly, satisfactory image display is impossible to achieve. It is therefore desirable to use an OCB (Optically Self-Compensated Birefringence) mode liquid crystal capable of high-speed response.
In the liquid crystal display having the OCB-mode liquid crystal, by applying a relatively high voltage across a pixel electrode and a counter electrode, an alignment state of the liquid crystal is caused to transition from so-called splay alignment to bend alignment, and in this bend alignment state, an image is displayed. Hereinbelow, the transition from the splay alignment to the bend alignment is called splay to bend transition. With regard to the liquid crystal display having the OCB-mode liquid crystal, see “Syadanhojin Denki Tsushin Gattsukai Shingakugihou, EDI98–144, 199P.”
In the liquid crystal display having the OCB-mode liquid crystal, due to incomplete splay to bend transition, the liquid crystal partially remains in the splay alignment. In this case, the image is not normally displayed in pixels corresponding to the splay alignment liquid crystal, this would be observed as dot defects by an observer. As described above, since degradation of the image due to the dot defects is noticeable in the case of the large-sized pixels, it is required that the splay to bend transition take place more reliably.
|
{
"pile_set_name": "USPTO Backgrounds"
}
|
2008 Asian Junior Athletics Championships
The 2008 Asian Junior Athletics Championships was the 13th edition of the international athletics competition for Asian under-20 athletes, organised by the Asian Athletics Association. It took place from 12–15 July at the Madya Stadium in Jakarta. It was the third occasion that the Indonesian capital had hosted the event, following the inaugural edition in 1986 and the fifth hosting in 1994. A total of 44 events were contested, which were divided equally between male and female athletes.
Medal summary
Men
Women
2008 Medal Table
References
Results
Asian Junior Championships 2008. World Junior Athletics History. Retrieved on 2013-10-16.
External links
Asian Athletics official website
Asian Junior Championships
Category:Asian Junior Athletics Championships
Category:International athletics competitions hosted by Indonesia
Category:Sport in Jakarta
Asian Junior Athletics Championships
Category:2008 in Asian sport
Category:2008 in youth sport
|
{
"pile_set_name": "Wikipedia (en)"
}
|
Kim Yeong-jun (volleyball)
Kim Yeong-jun (born 31 August 1940) is a South Korean volleyball player. He competed in the men's tournament at the 1964 Summer Olympics.
References
Category:1940 births
Category:Living people
Category:South Korean men's volleyball players
Category:Olympic volleyball players of South Korea
Category:Volleyball players at the 1964 Summer Olympics
Category:Place of birth missing (living people)
|
{
"pile_set_name": "Wikipedia (en)"
}
|
// Go support for Protocol Buffers - Google's data interchange format
//
// Copyright 2011 The Go Authors. All rights reserved.
// https://github.com/golang/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Protocol buffer deep copy and merge.
// TODO: RawMessage.
package proto
import (
"fmt"
"log"
"reflect"
"strings"
)
// Clone returns a deep copy of a protocol buffer.
func Clone(src Message) Message {
in := reflect.ValueOf(src)
if in.IsNil() {
return src
}
out := reflect.New(in.Type().Elem())
dst := out.Interface().(Message)
Merge(dst, src)
return dst
}
// Merger is the interface representing objects that can merge messages of the same type.
type Merger interface {
// Merge merges src into this message.
// Required and optional fields that are set in src will be set to that value in dst.
// Elements of repeated fields will be appended.
//
// Merge may panic if called with a different argument type than the receiver.
Merge(src Message)
}
// generatedMerger is the custom merge method that generated protos will have.
// We must add this method since a generate Merge method will conflict with
// many existing protos that have a Merge data field already defined.
type generatedMerger interface {
XXX_Merge(src Message)
}
// Merge merges src into dst.
// Required and optional fields that are set in src will be set to that value in dst.
// Elements of repeated fields will be appended.
// Merge panics if src and dst are not the same type, or if dst is nil.
func Merge(dst, src Message) {
if m, ok := dst.(Merger); ok {
m.Merge(src)
return
}
in := reflect.ValueOf(src)
out := reflect.ValueOf(dst)
if out.IsNil() {
panic("proto: nil destination")
}
if in.Type() != out.Type() {
panic(fmt.Sprintf("proto.Merge(%T, %T) type mismatch", dst, src))
}
if in.IsNil() {
return // Merge from nil src is a noop
}
if m, ok := dst.(generatedMerger); ok {
m.XXX_Merge(src)
return
}
mergeStruct(out.Elem(), in.Elem())
}
func mergeStruct(out, in reflect.Value) {
sprop := GetProperties(in.Type())
for i := 0; i < in.NumField(); i++ {
f := in.Type().Field(i)
if strings.HasPrefix(f.Name, "XXX_") {
continue
}
mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i])
}
if emIn, err := extendable(in.Addr().Interface()); err == nil {
emOut, _ := extendable(out.Addr().Interface())
mIn, muIn := emIn.extensionsRead()
if mIn != nil {
mOut := emOut.extensionsWrite()
muIn.Lock()
mergeExtension(mOut, mIn)
muIn.Unlock()
}
}
uf := in.FieldByName("XXX_unrecognized")
if !uf.IsValid() {
return
}
uin := uf.Bytes()
if len(uin) > 0 {
out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...))
}
}
// mergeAny performs a merge between two values of the same type.
// viaPtr indicates whether the values were indirected through a pointer (implying proto2).
// prop is set if this is a struct field (it may be nil).
func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) {
if in.Type() == protoMessageType {
if !in.IsNil() {
if out.IsNil() {
out.Set(reflect.ValueOf(Clone(in.Interface().(Message))))
} else {
Merge(out.Interface().(Message), in.Interface().(Message))
}
}
return
}
switch in.Kind() {
case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
reflect.String, reflect.Uint32, reflect.Uint64:
if !viaPtr && isProto3Zero(in) {
return
}
out.Set(in)
case reflect.Interface:
// Probably a oneof field; copy non-nil values.
if in.IsNil() {
return
}
// Allocate destination if it is not set, or set to a different type.
// Otherwise we will merge as normal.
if out.IsNil() || out.Elem().Type() != in.Elem().Type() {
out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T)
}
mergeAny(out.Elem(), in.Elem(), false, nil)
case reflect.Map:
if in.Len() == 0 {
return
}
if out.IsNil() {
out.Set(reflect.MakeMap(in.Type()))
}
// For maps with value types of *T or []byte we need to deep copy each value.
elemKind := in.Type().Elem().Kind()
for _, key := range in.MapKeys() {
var val reflect.Value
switch elemKind {
case reflect.Ptr:
val = reflect.New(in.Type().Elem().Elem())
mergeAny(val, in.MapIndex(key), false, nil)
case reflect.Slice:
val = in.MapIndex(key)
val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
default:
val = in.MapIndex(key)
}
out.SetMapIndex(key, val)
}
case reflect.Ptr:
if in.IsNil() {
return
}
if out.IsNil() {
out.Set(reflect.New(in.Elem().Type()))
}
mergeAny(out.Elem(), in.Elem(), true, nil)
case reflect.Slice:
if in.IsNil() {
return
}
if in.Type().Elem().Kind() == reflect.Uint8 {
// []byte is a scalar bytes field, not a repeated field.
// Edge case: if this is in a proto3 message, a zero length
// bytes field is considered the zero value, and should not
// be merged.
if prop != nil && prop.proto3 && in.Len() == 0 {
return
}
// Make a deep copy.
// Append to []byte{} instead of []byte(nil) so that we never end up
// with a nil result.
out.SetBytes(append([]byte{}, in.Bytes()...))
return
}
n := in.Len()
if out.IsNil() {
out.Set(reflect.MakeSlice(in.Type(), 0, n))
}
switch in.Type().Elem().Kind() {
case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64,
reflect.String, reflect.Uint32, reflect.Uint64:
out.Set(reflect.AppendSlice(out, in))
default:
for i := 0; i < n; i++ {
x := reflect.Indirect(reflect.New(in.Type().Elem()))
mergeAny(x, in.Index(i), false, nil)
out.Set(reflect.Append(out, x))
}
}
case reflect.Struct:
mergeStruct(out, in)
default:
// unknown type, so not a protocol buffer
log.Printf("proto: don't know how to copy %v", in)
}
}
func mergeExtension(out, in map[int32]Extension) {
for extNum, eIn := range in {
eOut := Extension{desc: eIn.desc}
if eIn.value != nil {
v := reflect.New(reflect.TypeOf(eIn.value)).Elem()
mergeAny(v, reflect.ValueOf(eIn.value), false, nil)
eOut.value = v.Interface()
}
if eIn.enc != nil {
eOut.enc = make([]byte, len(eIn.enc))
copy(eOut.enc, eIn.enc)
}
out[extNum] = eOut
}
}
|
{
"pile_set_name": "Github"
}
|
Linguistics in education
Linguistics in education refers to a small but growing field of linguistics which advocates a greater use of linguistic theory and in primary and secondary education.
Background
Due to changes in national standards for K-12 education in the United States during the 1960s, grammar was largely dropped from English courses. The belief was that direct grammar instruction was not required for improved instruction in writing. Despite more recent research that has shown the positive effects of grammar instruction, the attitude that it is unnecessary persists today.
Challenges
Because grammar has not been taught in many years, generations of teachers were never exposed to its direct instruction. Thus, even though many wish to teach it in their classrooms, they do not find that they have adequate knowledge on the subject. Unfortunately, this often perpetuates linguistic stereotypes that can sometimes be discriminatory to speakers of nonstandard language varieties.
Another issue is that the curriculum for teachers is already very broad, especially in comparison to other college students, so requiring further courses for would-be teachers is rather unpopular. The same problem exists in the K-12 classroom which already have difficult time constraints on their current curriculum. To add grammar to an already full curriculum is extremely difficult.
Benefits
Studies of how grammar and other linguistic theory can be incorporated into K-12 classrooms have been highly successful both in improving students' conscious knowledge of grammar and changing attitudes about non-standard English dialects. There is evidence that grammar instruction can be beneficial to students' writing such that replacing writing or vocabulary instruction with grammar can actually be a more productive use of class time.
Current theory
Linguists have also been involved in this field in attempts to change misconceptions about language. One common example is the definition of nouns. Traditionally a noun is defined as a "person, place, or thing". While this definition captures much of what nouns are it does not incorporate all possible definitions and uses. For example, mental concepts such as "belief" or "idea" are also nouns but do not neatly fit the traditional definition. This can be especially difficult for children to understand. A more comprehensive definition seeks to describe nouns through their features and uses. However this definition requires the teacher to have greater knowledge of English syntax.
References
External links
Cambridge.org
Category:Language acquisition
|
{
"pile_set_name": "Wikipedia (en)"
}
|
Picking the right college football coach isn't easy. In the SEC, that was evident during this offseason as five coaches assumed new head roles in the conference.
Coaching success can be a tricky proposition at the college level. There are many moving parts, and multiple factors, beyond the x's and o's, have to run smoothly for sustained success to be achieved.
That fact is even more pronounced in the uber-competitive place like the SEC, where you're being compared to some of the best coaches the country has to offer. Still, it is up to each program's athletic director to find the right person for the job. Because if that doesn't happen, firings often follow.
There are many cautionary tales of coach hirings gone wrong in the SEC, but what are some of the biggest failures we've ever seen?
Here are the least successful coaches, by winning percentage, in the history of current SEC teams. Interim coaches and those with less than 12 games on their records were excluded.
|
{
"pile_set_name": "OpenWebText2"
}
|
Latest Projector For Hire:
EPSON EB-U05 HD
High-Defintion
3400 Lumen
1920 x 1200 Resolution
€80
Projector Hire for Meetings in Cork
Presentations are becoming an important part of our professional lives. Companies are continually having meetings, training sessions and Exhibitions. The good news is you don’t have to purchase expensive projectors for once off presentations.
At projector hire we can meet your requirements by providing you with the appropriate projector for your needs. We have a wide range of projectors for hire which are suitable for any organization both large and small, and we have excellent daily and weekly rates.
All Our previous and existing customers in Cork are highly satisfied with our products, services and support and this is why Projector Hire has become the No.1 Audio and Visual Company in Cork.
Feel free to get in touch with us to discuss your requirements via phone 087-9850714 or email info@projectorhire.ie and we will be delighted to help you out in every possible way.
Cork companies have hired our projectors for:
Meetings
Training Sessions
Exhibitions
Awards Ceremonies
Christmas Staff Parties
Delivery and Collection Charges:
We are a Cork based company so we can deliver
to anywhere in Cork for just a small delivery and
collection fee of €20. We can also deliver to any
other county in Ireland and the delivery and
collection charges, generally speaking, is worked
out at a rate per mile. Typically between €0.50 and
€1 per mile. If you have any questions, please call
us for more information of fill out our Quick Contact
form below
|
{
"pile_set_name": "Pile-CC"
}
|
El gobernador de Río Negro, Carlos Ernesto Soria, murió esta madrugada tras sufrir un disparo en la cabeza, luego de un confuso episodio ocurrido después de los festejos por la llegada del nuevo año en su chacra ubicada en las afueras de General Roca.
Herido, Soria fue trasladado a un hospital de la zona con vida, pero falleció pocos minutos después.
Fuentes de la Jefatura Policial de Viedma confirmaron que el hecho ocurrió a las 4.47 en su chacra, situada a unos 6 kilómetros de la ruta 22, en la zona de Alto Valle.
El juez a cargo de la investigación, Emilio Stadler, informó esta noche que el gobernador de Río Negro murió por "un disparo de arma de fuego en la cabeza" mientras se encontraba con su esposa en la habitación de su chacra ubicada en las afueras de General Roca.
"El disparo se habría producido con un arma de fuego propiedad del Dr. Carlos Soria, que fue encontrada y secuestrada en la escena del hecho", sostiene el comunicado difundido por la justicia provincial.
Al momento de recibir el disparo Soria se encontraba en su cuarto con su esposa. En la vivienda también se encontraban una de las hijas del gobernador y su novio.
Por su parte, la Gobernación informó que la muerte de Soria "se produjo presumiblemente producto de un accidente doméstico, debido a la manipulación de un arma de fuego", pero no informó la detención de ninguna persona.
Así lo confirmó el vicegobernador Alberto Weretilnek, uno de los primeros en acercarse al lugar del hecho. Afirmó que la muerte fue causada por "un accidente doméstico", mientras se encontraba con Susana Freydos, su mujer. Según Weretilnek, en el momento del hecho, "no había nadie más" que Soria y su esposa en la chacra.
Los restos del mandatario fueron trasladados desde la morgue local hacia una sala velatoria privada para realizar una ceremonia íntima entre familiares y allegados, previo a ser depositados en el cementerio Parque de General Roca.
Los dirigentes políticos rionegrinos integrantes del Gobierno provincial, municipales y legisladores oficialistas y de la oposición llegan a General Roca para acompañar a la familia, al igual que el secretario general de la Presidencia, Oscar Parrilli que arribó a esa ciudad minutos después del mediodía.
Su vice completará el mandato
Respecto a la sucesión del gobierno provincial, la Constitución de Río Negro en su artículo 180 establece que el vicegobernador Weretilneck, dirigente del Frente Grande, debe continuar el mandato hasta 2015.
Weretilneck en declaraciones a la prensa aseguró que se mantendrán "conversaciones" con el Partido Justicialista y el Gobierno nacional para definir la situación sin descartar la posibilidad de convocar a elecciones.
La Constitución provincial señala que "en caso de fallecimiento, destitución, renuncia o inhabilidad definitiva del gobernador antes o después de su asunción lo reemplaza el vicegobernador hasta la finalización de su mandato".
Sólo se debería convocar a elecciones, en el lapso de 60 días, si murieran, fueran destituidos, renunciaran o estuvieran inhabilitados en forma simultánea el gobernador y el vice; siempre que esta contingencia se produjera cuando faltaren más de dos años para completar el mandato.
Una de sus últimas apariciones públicas públicas, en televisión.
La zona de la chacra
Sucesión y duelo.
El Gobierno provincial confirmó este mediodía que el vicegobernador Alberto Weretilneck asumirá el martes la gobernación de Río Negro en cumplimiento de la Constitución Provincial. Además, anunciaron un encuentro previo a su asunción al que asistirán dirigentes del Frente para la Victoria de toda la provincia entre ellos legisladores e intendentes se reunirán en Viedma para analizar la continuidad institucional.
Weretilneck, un dirigente del Frente Grande de Cipolletti, llegó el 10 de diciembre pasado al Gobierno tras compartir la fórmula gubernamental con Soria en las elecciones del 25 de septiembre. Además, luego de la muerte del gobernador, el municipio de General Roca decretó asueto para el 2 de enero y duelo hasta el 6 de enero inclusive.
Con la colaboración de Soledad Maradona
Debido a la sensibilidad del tema esta nota está cerrada a comentarios
|
{
"pile_set_name": "OpenWebText2"
}
|
Q:
Basic contact form not displaying input info in email PHP HTML5
I have a basic contact form submitted using PHP. When it is submitted I receive an email however it does not display the information input into the field. That information is however sent. It displayed in the address bar of the browser e.g.
../contact.phpurl=antispam&name=dfsaa&number=fdfd&email=fdsafds%40fds.com&message=Please+contact+me+regarding+this
Front:
<form action="contact.php">
<input class="form-control" id="name" name="name" placeholder="Name" type="text" required>
<input class="form-control" id="number" name="number" placeholder="Contact Number" type="text" required>
<input class="form-control" id="email" name="email" placeholder="Email" type="email" required>
<textarea class="form-control" id="message" name="message" placeholder="Message" rows="5">Please contact me regarding this...</textarea><br>
<button class="btn btn-default pull-right" type="submit">Send</button>
</form>
PHP:
<?php
$name = @trim(stripslashes($_POST["name"]));
$email = @trim(stripslashes($_POST["email"]));
$number = @trim(stripslashes($_POST["number"]));
$message = @trim(stripslashes($_POST["message"]));
$email_from = $email;
$email_to = "sarah@blockcpm.com";
$body = "Name: " . $name . "\n\n" . "Email: " . $email . "\n\n" . "Number: " . $number . "\n\n" . "\n\n" . "Message: " . $message;
$success = @mail($email_to, $body, "Name: " . $name . "\n\n" . "Email: " . $email . "\n\n" . "Number: " . $number . "\n\n" . "Message: " . $message);
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<script>
alert("Thank you for contacting us. A member of our team will be in touch as soon as possible.");
</script>
<meta HTTP-EQUIV="REFRESH" content="0; url= index.html">
</head>
The contact form works perfectly on another site... This one is on a godaddy site that i didnt create, i'm just ammending.
The email that i receive has all of the field titles but none of the input info.
Any ideas why?
A:
Your form is by default of type GET, not POST as you want to check in PHP therefore data are visible through $_GET and not $_POST global PHP variable.
Since you want POST, modify your form structure
<form action="contact.php">
should be
<form action="contact.php" type="post">
And in your PHP, first check if request method is POST
<?php
if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {
//Get data and send email
$name = trim($_POST['....']);
...
}
|
{
"pile_set_name": "StackExchange"
}
|
Menu
For any newer readers, you may not know that I have written three books, which I am still trying to get published. This blog was created as part of my effort to build an online platform and further hone writing skills through my blog posts. My most recent book is Alive, a werewolf story. I have always loved fantasy tales and it was exciting to craft my own. With Alive complete I began working on the second and final part of the series.
I completed a few thousand words of Part II but regret to say that I haven’t touched it in almost a month now. Work, where I have done most of my writing over the past year, has become much busier and my life outside of work has become much busier as well as I take on more responsibilities, such as looking for a new place. Along with some part-time work, the gym, guitar etc. it has been tough to find time or energy to write. However, I don’t want to keep embracing excuses. I’ll get back to writing by this end of the week, with my goal of 5oo words a day. Originally I wanted the book to be completed by September but now I will have to settle for completing it by end of the year.
Then the work of editing and continuing to seek publication for my other work will continue. I contacted ten agents about part I but have received no responses so it looks like I am back to square one in my journey to getting published. It can be disheartening, but I don’t want to use that as an excuse to quit either. I have now accepted it won’t come quickly. I used to think I’d be published by the time I was twenty-five but now I can accept it might not happen until I’m fourty. It’s a long climb, but I’m looking forward to it.
Racists used to wear hoods to hide their identity. They don’t need to wear hoods anymore, they own the White House.
These are the words I remember reading from a random twitter user this morning as I perused the newsfeed to catch up on the weekend’s events. I heard about the white supremacist rally in Charlottesville Virginia, the counter-protest, and the violence that erupted. One of the most interesting events to emerge out of this incident was President Trump’s response to the violence. This is a man who denounced the cast of Hamilton for peacefully challenging Mike Pence’s record of upholding equality. This is a man who had this to say about a black protestor at his rally: “Maybe he should have been roughed up because it was absolutely disgusting what he was doing”. Surely Trump would bring “fire and fury” to his denunciation of the violence. Instead, Trump tread lightly, and denounced the violence on “many sides.”
So let’s try to see where Trump is coming from. The “Unite the Right” white supremacist rally was a protest against the removal of a Robert E. Lee statue. Lee was a great general, on the Confederate side. The side that supported the continuation of slavery, so like the Confederate flag, a public display is somewhat contentious. Nonetheless, the right made sure their voices were heard. They exercised their freedom of speech by gathering with white supremacist symbols and hurling racial or anti-semitic slurs at non-white passerby. They were met by a group of counter-protesters, also exercising their freedom of speech and freedom of assembly.
Then things escalated. Verbal insults thrown from both sides turned into violence, culminating in a white supremacist crashing his car into the another vehicle and mowing through the crowd, which resulted in one death and several injuries.
So Trump is right in one sense, there was violence on both sides. The facts don’t end there though. In a case like this, we must look at who initiated the violence and how events escalated. This “Unite the Right” protest was planned far in advance by leaders of the alt-right and white supremacist movements, groups that have been tied to an increasingly high number of hate crimes and domestic terrorist attacks in the US and elsewhere. Meanwhile, the anti-racism protestors are guilty of “political correctness”, which nowadays just means the opposition of bigotry. The anti-racism protestors are “triggered” by Confederate flags and statues to Confederate generals, while the Right gets triggered by affirmative action and black student unions. Both sides contributed to a scuffle, but a man from one side decided that he wanted to drive his car through a crowd.
Let’s look at this another way. White supremacy as a whole is not rooted in fact. All of the racist assumptions or beliefs people use to justify the current state of the world can be broken down by decades of research e.g. research showing that the property value of an area drops when more people of colour move in. So even though white supremacy is not rooted in fact, we still let white supremacists assemble. Giving voice to the alt-right and white supremacists is no different than giving voice to Flat Earthers.
The most disturbing thing about Trump refusing to disavow white supremacy, until today, is that it reflects a trend that we can trace back to his campaign. Trump previously refused to disavow David Duke and the KKK. His defence was that he didn’t know who David Duke was, but we can see an interviewer explain that for him multiple times in the below video. Yet Trump still refuses to disavow the support of David Duke. Why? He knew he needed the votes.
There are people out there (even in the comment section of this video) that try to compare groups like Black Lives Matter to the KKK. Firstly, there have been violent incidents at BLM demonstrations, but those incidents havre actually not been traced to members of BLM. Saying “Black Lives Matter” does not make you a member of the actual organization.
Meanwhile, the KKK has a long and continuing history of violence against minorities. Other white supremacist factions have also become emboldened by Trump’s election and view him as their saving grace in an American landscape that is changing too much for their liking.
AJ+ released this video documenting the online vigilantism that has resulted in some of the alt-right protesters being identified and facing consequences such as losing their jobs. As expected, the comments reveal some overt or implicit supporters are more concerned about what happens to the white supremacists than the people they wish to marginalize.
You have to wonder if the right got as worked up about Mike Brown being shot multiple times and depicted as a thug by their peers. Of course not. In their eyes, Brown, Martin, Castille etc. just faced the consequences of their actions. The same thing is happening here. Freedom of speech does not mean that everyone must agree with what you say. Employers, friends, family etc. can reject you for much less than overtly racist demonstrations.
Also, it is funny that the right always criticizes the left for “identity politics” e.g groups allied around race, religion etc. What is this rally? Isn’t it about protecting white European culture? So basically, identity politics is only a bad thing if minorities do it. I am not being biased, a “libtard”, a “social justice warrior” or “politically correct” for pointing out these fallacies. These are the facts, that get ignored or twisted time and time again by racists who refuse to acknowledge facts no matter the consequences. This refusal to acknowledge facts is what allowed Trump to become president, citing inaccurate stats about black crime and embracing racist rhetoric with the mantra of “telling it like it is.”
America isn’t the same place I visited two years ago. It is something uglier, corrosive. Decaying from the inside while the poisoners remain blind to the damage they’re doing.
“Telling me that I’m obsessed with talking about racism in America is like telling me I’m obsessed with swimming when I’m drowning.” Hari Kondabolu
I posted this video a few weeks ago discussing the reaction people have to Zazie Beetz’s casting as Domino in Deadpool 2. Like many other videos, I emphasized the double standard present in people’s reactions to whitewashing versus “blackwashing” e.g. when a character is whitewashed, people argue that talent or marketability should trump race. If a character is blackwashed, people complain it is wrong to change the race of beloved characters and that the actor was selected only due to their race. If a white actor plays a character of colour it is because they were the most talented person to try out for the role. Vice versa, and the actor of colour was picked only due to their race. Whitewashing becomes a common sense business move, while blackwashing is just “pandering” to minorities. People tend to ignore how whitewashing also “panders” to white people, since one of the most common arguments used to defend whitewashing is that more whiteness in a film makes it more appealing to white people. Some people will even go so far as to say the film will be an economic failure if the film wasn’t whitewashed. Of course, the success of films like Straight Outta Compton disprove this theory.
I presented numerous different examples and clearly laid out how this double standard serves to reinforce the idea that white is inherently better, and the video was met with a wave of dislikes and comments where people repeatedly go back to the same double standards that I laid out in my video. One comment after another said it was wrong to change the race of characters, that the actress doesn’t look like the character etc. The video was sitting at less than two hundred views for a while but got a new influx of new viewers over the past week, leading me to believe it might have been shared on a website, or possibly got more traffic after the first picture of Beetz as Domino was released.
Keep in mind, my video came out before we got our first pic of Beetz as Domino. While some people complain about how she looks in terms of her hairstyle, clothing etc., my video was made for people criticizing the fact that a black actress got the part. This detail, along with just about all relevant details, were ignored by the people who swarmed to my video. Some even admitted they didn’t even watch the full video before commenting.
I previously discussed how the right-wing often uses the word “triggered” to criticize anyone who doesn’t endorse bigotry. Here we see triggered people who likely saw the title of my video or watched a minute of it before rushing to the comments. I have often disagreed with the views expressed in other videos, but I have never commented on a video that I didn’t bother to finish watching. If I disagreed I did not ignore every point made. I made sure I fully understood what the uploader was trying to say, because I wanted to respond with counter-arguments that actually disprove their points. My video was only five minutes long so I don’t think the issue is that my video is too long either. People simply came across something they didn’t want to hear and refused to engage with the facts I laid out, hence the repeated defferal to all of the same arguments and double standards that my video criticizes.
I pointed out the tendency for people to criticize hypothetical examples of whitewashing that they said they would criticize e.g. White Luke Cage, to take attention away from all of the real examples of whitewashing they supported.
I pointed out the tendency for people to appeal to the “colour-blind” mantra or the simplistic notion that a character should look the way they are supposed to (which also ignores all the times whitewashing was supported)
“I don’t have a single problem seeing minorities on the screen.I just wanted Domino, the character I love to be portrayed as the character I love. Very, very simple.”
I avoided appealing to emotion, and thought that a clearly laid out set of arguments and counter-arguments could break through to some people on the other side of the aisle. The only positive comments I received are ones from people who likely already shared my views.
There were some people who probably fancied themselves as enlightened and expressed less vitriol, while also displaying a stunning level of ignorance.
“And for the record, when is the last time you’ve seen anyone in this modern era “Defend whitewashing”?”
This poster could have found examples of whitewashing being defended on THE SAME VIDEO they commented on. Yet again, there is an unwillingness to engage with facts that conflict with their world view. Yes, you can find numerous articles and videos online from major publications that criticize whitewashing. The whole point of the video is that audiences react differently, e.g. the people who swarm the comment sections of those articles with comments like “political correctness”, “reverse racism” and “social justice warriors” to criticize the people who are bothered by whitewashing. This is in contrast to the comments they give in support of whitewasing such as “It’s just a movie”, “Best actor for the part, race doesn’t matter”. Now if “blackwashing” happens the comments will be swarmed with comments saying it is wrong to change the race of characters.
My mom once said you can’t have a debate with people if the ground isn’t fertile for it. This ground isn’t just infertile, it’s scorched.
Norwegian news site NKR is currently using their beta site to test a tool that makes readers take a 15 second quiz before commenting, to ensure that they actually understand the point of the article. Readers don’t have to agree, but the developers hope the quiz will give people time to calm down and ensure that they are less likely to resort to the slew of straw man arguments I see on my video. Ironically, people commenting on the NRK article also added comments that made it clear they misunderstood the purpose of the tool:
“Here we go..thought crime..three questions to make sure you agree with our angle on the story.”
Today I was reading an article by Mark Manson, one of my favourite bloggers. The central point of the article is that the common factor in all these shootings is the lack of empathy displayed by people who should have seen it coming.
Before the vitriol pours in to my site or Mark’s, he is not saying victims are at fault. His article looks at different people who were close to the shooters, who ignored obvious signs that the shooters were mentally disturbed and seriously planned to commit violence. In the case of the Columbine shooters, some of their “friends” found the bombs they built, but thought nothing of it. Mark argues that this can ultimately be traced to a lack of empathy or outright apathy for what is going on in someone else’s life. Of course, what I am offering is a very simple thesis of the article. Do yourself a favour and read the whole thing.
Manson breaks down the different arguments brought forward after mass shootings, either as a whole or by referencing arguments used for certain killers. He does not say none of the arguments matter. In fact, he says they are part of a bigger whole. I would be missing the entire point of his article if I said that my grievances made the article invalid. However, I have to mention these arguments because they bring up common misconceptions about some mass shootings.
His first point is that the gun control argument is somewhat flawed since killers like Adam Lanza and Elliot Rodger got their guns legally. A gun control advocate wouldn’t end the argument there. A key part of gun control is arguing for the regulation of the types of funs and types of ammunition that can be sold legally,; as well as arguing for more thorough background checks. They would ask why people were able to obtain such guns so easily. Especially in Rodger’s case since he had a well documented history of mental illness.
The next point is truly the crux of my article.
Manson also argues that the attempts to label Rodger’s killings as a result of misogyny are flawed since Rodger killed mostly men. Now, Manson does later say Rodger “became a misogynist because he was a killer.” Clearly he is not rejecting the misogynist label completely. However, a quick Google search will show you many people who reject the claim of misogyny using the same logic Manson laid out originally. These thoughts are directed to those people.
You might ask why I am bothering to write about a deranged killer from 2014. I tried to understand why I felt compelled to write this too, and I think a part of it comes down to the fact that I actually read Rodger’s “manifesto”. As Manson points out, I only gave into Rodger’s delusions by doing this. I fed his ego and desire for immortality. Unfortunately, curiosity got the best of me.
It is that reading of Rodger’s “My Twisted World” that makes it clear he was a misogynist. Above all else, Rodger was sexually frustrated. At age 22, he was still a virgin and blamed his lack of success mainly on women. According to him, their brains were less developed than men’s. Hence their poor decision making abilities. If that is not misogynist, I don’t know what is.
Yes, Rodger killed men. Let’s not forget his motive though. He was angry at men as well, for having more luck with women than he did. Each man mowed down represented another man in Rodger’s life who was more successful with girls than he was.
“After that, I will start luring people into my apartment, knock them out with a hammer, and slit their throats. I will torture some of the good looking people before I kill them, assuming that the good looking ones had the best sex lives. All of that pleasure they had in life, I will punish by bringing them pain and suffering. I have lived a life of pain and suffering, and it was time to bring that pain to people who actually deserve it.”
Let’s not forget that one of Rodger’s first targets was a sorority house, an embodiment of the beautiful women he resented. Due to the gated entry, he could only kill two women outside of it. He then had to find other victims.
With that point out of the way, let’s move on to the idea that Rodger was not racist since he was half-Asian, and some of his victims were Asian.
“Shoes won’t help you get white girls. White girls are disgusted by you, silly little Asian.”
Rodger also says:
“Full Asian men are disgustingly ugly and white girls would never go for you. You’re just butthurt that you were born as an asian piece of shit, so you lash out by linking these fake pictures. You even admit that you wish you were half white. You’ll never be half-white and you’ll never fulfill your dream of marrying a white woman. I suggest you jump off a bridge.”
Rodger, half-Asian, posted those comments in a forum on PuaHate.com. Rodger wanted white girls only, and specifically indicates a preference for blondes numerous times in “My Twisted World”.
If you are bothered, you can find plenty of research on mixed people who express racism towards one half of their identity.
Rodger also saves some hate for black guys and Indian guys in his “My Twisted World”, expressing disgust that they can get white girls when he can’t. If you don’t want to read that, just read more forum excerpts from this article.
“Today I drove through the area near my college and saw some things that were extremely rage-inducing.
I passed by this restaurant and I saw this black guy chilling with 4 hot white girls. He didn’t even look good.
Then later on in the day I was shopping at Trader Joe’s and saw an Indian guy with 2 above average White Girls!!!
What rage-inducing sights did you guys see today? Don’t you just hate seeing these things when you go out? It just makes you want to quit life.”
Racist? I think so.
My larger point. Bigotry isn’t always simple or logical and we need to stop using elementary levels of logic to shut down discussions. Manson only used the example of Elliot Rodger as a springboard for his larger argument, but his intentionally hyperbolic statements represent the mindset of millions of people: The millions of people who think they have the world, and all of the ugliness in it, figured out.
The summer movie season is winding down, and after seeing Dunkirk, there are still a few films I am excited to see. I still need to see Baby Driver and War of the Planet of the Apes. I have some reservations about Justice League but the fanboy in me is still very excited. However, the film I am most excited about at this point is IT.
The book is one of the first Stephen King ones that I can remember reading, and I definitely plan to re-read it before this film comes out. The book involves a group of eleven year olds known as the Losers Club: Bill, Ben, Bee, Richie, Eddie, Mike and Stan. Together, they try to combat IT, a supernatural entity in the fictional town of Derry, Maine. IT has the ability to transform into any child’s worst fears, but often takes the form of Pennywise the Clown. The book also follows the Losers Club thirty years later, returning to Derry to combat IT again. From what I understand, a second movie will focus on the Losers Club as adults.
Cary Fukunaga, the director of the first season of True Detective, was originally slated to direct during the film’s long stay in development hell. Andres Muschietti (Mama) was finally brought on board in 2015 to give us the film we’ll see in September.
The marketing campaign has been amazing so far, preceded by promotional images and the two trailers (technically one teaser and one trailer) that preceded. Everything from the music, to the more restrained use of dialogue and images of The Losers club and Pennywise has kept the film mysterious but also interesting.
I usually avoid watching too many trailers so that I don’t spoil the film. Fortunately, this third trailer doesn’t appear to give away the film’s best moments.
We do hear Pennywise speak for the first time, “Here…take it.” His voice was one of the things that book fans speculated about most, and these few words leave me happy that Bill Skarsgard will be able to embody the role.
There are more shots of Pennywise this time, and some shots leaves me slightly worried about an overuse of jump scares. Most of the memorable images in the trailer come from its use of unsettling music or imagery and I believe those are always the most effective scares in horror films. Looking back on all the moments that scared me as a child, they were never jump scares. However, I don’t want to rant about jump scares too much since the editing of the trailer itself can make them appear more plentiful than they will be in the actual film.
Bill’s dialogue at the beginning of the trailer, about losing the feeling of being protected as you grow older hits close to home and is a microcosm of the book’s themes about the loss of innocence. I am sure the film will cut out the orgy (yes, really) that happens in the book so it will be great to see this theme portrayed in other ways.
Along with the scenes in the previous trailers, Bill’s lines make me less worried about the child actors’ abilities. I wasn’t worried about Finn Wolfhard specifically since I already saw him as Mike Wheeler in Stranger Things. There are exceptions, but there are numerous times when child actors are either a weak link among stronger actors, or are absolutely dreadful. The Jungle Book (2016) comes to mind.
Let’s move back to the film’s most divisive element, Pennywise himself. YouTube and Instagram are littered with comments by people pining for Tim Curry’s version of Pennywise from the 1990 miniseries. This happens with pretty much every adaptation or remake. Some people didn’t want to see Andrew Garfield as Spider-Man before Amazing Spider-Man came out, some people thought no one would ever top Jack Nicholson as The Joker etc. People get attached to the adaptations they see first. Some people might grow up with Tom Holland as their first Spider-Man, and maybe they won’t want to see anyone else in the role if a new series is made twenty years from now. Likewise, this may be the first Pennywise for many people and if another IT adapdation is made in thirty years, they’ll refuse to accept another version.
I don’t like the attachment mindset, but I can understand it. What bothers me more is one of the biggest complaints brought up by Bill Skarsgard detractors. Tim Curry’s version wasn’t as faithful to the books, in terms of his look or his behaviour. He behaved like we expect a clown to. He was energetic and jovial. Lots of fans of the miniseries miss this sense of humour Curry brought to the adaptation and interpret this one as too grim or trying too hard to be scary. However, 2017’s IT (from what we see so far) is what we got in the book. There was no dancing or whimsy. Adaptations typically try to emulate their source material, not just other adaptations. The people who criticize this Pennywise for being too serious make it clear they never read the book. Also, we get little dialogue from Pennywise in the marketing so we can’t judge his level of whimsy just yet.
Moving on from misinformed people, I have to say that the music in the trailers continues to stand out. We get more of the creepy chimes from the first trailer, but also get the chants of “You’ll Float Too” throughout the latter half. The chants get louder as the trailer progresses, and your heart beats faster to match it. The music might not scare you per se, but it gets you excited. It’s the horror version of pump up music.
Hopefully, this trailer will be the last. At the very least it will be the last one I watch, I don’t want anything else revealed before I see IT, hopefully on opening weekend.
I saw Dunkirk in IMAX on saturday, and after collecting my thoughts, I’m ready to share them with whoever actually reads my ramblings. I earlier stated that I hoped that this film would be a return to form for Christopher Nolan, since I didn’t like Intersetellar that much. I definitely can’t say Interstellar is a bad film, I just didn’t like it as much as his previous works. After seeing Dunkirk, Inception remains my favourite Christopher Nolan film. The Prestige and The Dark Knight might also edge out Dunkirk but it is nevertheless an engaging and brilliantly executed film.
Dunkirk is Nolan’s dramatization of the Dunkirk evacuation, where Allied Forces were trapped in northern France. Military and civilian boats were then enlisted or requisitioned to evacuate the Allied Forces to England. Dunkirk focuses on three different narratives: land, sea and air. Fionn Whitehead stars as Tommy, an army private. Tom Hardy stars as Farrier, a British pilot and Mark Rylance stars as Mr. Dawson, a civilian heading to Dunkirk. The movie cuts between the three different stories, and the stories intersect more as the film progresses. None of the characters are directly based on historical figures, but some are meant to be composites.
I hate to focus on a film’s visuals, but it must be said that Dunkirk is a beautiful film. I saw the film in IMAX on 70mm, so that probably gave an enhanced experience. Aside from the film’s clarity, it must also be praised for its cinematography and minimal use of CGI. Everything from the planes, ships, explosions etc. are all practical, or at least look like they are all practical effects. There is nothing wrong with CGI in itself, but a film like this benefits from minimal use since you want to be immersed in the history that is being depicted. Nolan succeeds in building and maintaining tension, making you as anxious as the characters as they try to survive one attack after another. Perhaps IMAX made me notice more as well, but I also have to add that the sound effects and sound mixing were masterfully done, recreating everything from the infamous sirens of the German stuka planes to the explosions that are replete throughout the film.
One criticism that has popped up when discussing the film online or with friends, is that the characters were not well-developed. Mark Rylance’s character probably gets the most back story and dialogue, but Whitehead and Hardy both have relatively sparse offerings. However, I didn’t realize this until other people pointed it out. Dunkirk was able to make me invested in characters that were not that fleshed out. The story was enough to keep me interested, and I saw each character as representative of millions of other soldiers’s fear and hopes during Dunkirk. Dunkirk is Whitehead’s debut role, and he does well with his limited time. I was pleasantly surprised by Harry Styles, who arguably steals the spotlight from Whitehead during some scenes. Christopher Nolan says he wasn’t aware of Styles’s fame before casting him and I am willing to say that all of my worries about Styles’s involvement proved to be unwarranted. Fortunately, I also didn’t have to deal with any screaming One Direction fans in the theatre. Kenneth Branagh is somewhat infamous for chewing scenery at times, but he is a stand out here in a more understated performance as Navy Commander Bolton. Cillian Murphy also deserves honourable mention as a shellshocked soldier eager to get back home. There are several other characters introduced throughout and they all form a necessary part of the film’s fabric.
A less capable director could have made Dunkirk dull and repetitive. When you really think about it, the film just depicts one attack after another, with relatively little dialogue between. However, Nolan is able to craft a story of survival that is visceral, entertaining and memorable.
Note: Been dealing with some formatting issues on the site e..g the spacing in this article. Working on it and will hopefully have it resolved soon.
When I was younger I had stereotypical notions of Texas being the most racist state in America. The Deep South still has a terrible reputation but more recent research I’ve done on America’s racial climate brought Massachusetts, and Boston in particular, to the forefront. As I was looking through an article detailing Boston athletes’ comments on Boston’s racism, I came across this comment:
“It is no secret that Boston has always worn the label as a racist city. A well deserved one at that. But until people STOP using labels to describe ethnic group it will never stop. And that includes all groups. The African-American community needs to stop using the N word for everything. Lose it from your vocabulary . It doesn’t help your cause when you call each that name excessively. Maybe if the word disappears some of these hateful things can be avoided. Sounds a little naïve but it has to start somewhere”
This poster is right, his comment does sound naive. I almost don’t know where to start with this comment. The article detailed several testimonials about racism athelets received in Boston stadiums and Boston as a whole during their time playing for Boston sports teams. After reading all of the experiences, all this man can say is that maybe things like this wouldn’t happen if we didn’t use the N word.
“You’re the ones we learned it from. I heard nigg** back in 1971.” (Ice Cube: ‘Gangsta Rap Made Me Do It’).
It is not like blacks historically used the N word to refer to themselves, and then white people used it to insult us. The use of the n word is a re-appropriation of a term that is still used to denigrate the black population. I have heard people arguing that the true injustice is that black people can use the term and they can’t. After all, shouldn’t we be equal?
Firstly, this argument is dripping with paternalism and condescension. Secondly, it ignores context and history. Third, I would gladly trade not being allowed to say the n word for all the benefits that come with whiteness.
On average
1) Girls are more likely to date you
2) People will be more welcoming if you move into their neighborhood
3) People will be more willing to send their kids to school with your kids
4) You will be more likely to be hired for a job (Affirmative action actually benefits white women the most)
5) Less likely to get followed when you shop
6) Less likely to get pulled over by police
7) Less likely to get killed by police
Now, if someone said I can get all that but I won’t be allowed to say the n word, I would gladly take that deal. The white people who think they are victims because they can’t say the n word, represent the true “triggered” victims they always mock. They are surrounded by benefits and privileges that make their lives easier (as a whole), but they ignore all of that and focus on things that are trivial in comparison. I remember reading a testimonial from a woman who was upset because she saw a fruit stand that had a black Jesus painted on it. She felt victimized and ranted about how black people would get upset if she put up a white Jesus at her business. I remember reading this piece as part of my research for my Master’s paper, as best I can remember it came from White Out: The Continuing Significance of Racism but I may be mistaken.
This woman is blind to how white supremacy has created the popular image of white Jesus. European painters depicting Jesus in the 14-16th century were very unlikely to depict him as anything but white due to their own views on other races. Centuries later, depictions such as the Sistine Chapel still fuel the American conception of Jesus. This has been cemented by the most popular depictions of Jesus on film and on television. So, this woman ignores the dominant images of white Jesus all around her but feels the need to lash out at a fruit stand for showing something different. It is true that recently there have been more rules regarding displays of religion in some workplaces, which can sometimes affect displays of Jesus. That is not an issue of white Jesus vs Black Jesus though, it is often more of an issue of Christianity vs other religions, which is a whole other article.
Moving back to the comment that inspired this article, the poster also says that we can eradicate racism by simply getting rid of labels. It is true that the labels of “black”, “white” etc. were birthed for the purpose of creating legal and social hierarchies. Hence, the frequently cited argument that race is just a social construct. However, people are not blind. They have always noticed skin colour. The desire to create a hierarchy was a result of the idea that people with darker skin were inferior. Even in the bible, the Cushites (called Ethiopians in the King James version) are described as dark-skinned Africans.
People will still see colour if we remove the categories of race. People already factor in skin colour when deciding what areas they want to live in, who looks suspicious, and who they want to date or marry. I have a hard time believing that tendency will disappear simply because the dark-skinned folk aren’t called “black” anymore. Dating profiles will say “no dark-skinned guys” or no “guys of African descent.” People will cross the street when they see a “dark-skinned guy” approaching. You see where I’m going with this.
What truly baffles me about this post is that this poster doesn’t spout the usual “I don’t even see colour” rhetoric that I would associate with his comments. His comments on removing the categories of race displays the same naivety that the colour-blind worldview does, but he, let’s call him “Blind”, actually acknowledged that Boston is a racist city. Many people would be happy to tell the Boston athletes that the racist incidents were very isolated ones or that they brought it on themselves somehow. Blind displays some more conviction but undermines it by shifting the conversation to race labels and the black community’s use of the n word. Although he might not mean to, he resorts to blaming the victim. It’s the equivalent of asking a rape victim how she was dressed.
Although “Blind” didn’t make this argument, his comments also reminded me of the black-on-black violence cop-out that is often used by racists to shut down discussions of police shootings of black civilians: “Well black people are killing each other all the time anyway. Maybe they should work on that first instead of race-baiting.”
White people are also killed mostly by other white people, at least in the US. The next time a black person kills a white one, can I just retort that white people are killing each other off anyway?
Even the people who can acknowledge that racism is an issue, can have backwards ideas about its causes or resolutions. I believe that part of this problem is that some white people take it personal when you discuss acts of institutional racism or individual prejudice. They hear you discuss racism and get a knee-jerk reaction to accuse you of racism, or to simply discuss how enlightened and colour-blind they are: “I don’t even see colour, you’re so racist for talking about it.”
These people will then get “triggered” if they see a movie where a white character got changed to a black one (even though this happens less than whitewashing) : “Why is Hollywood forcing diversity on us? I hate this liberal propaganda.”
Batman Begins was my first Christopher Nolan film, a film that I later discovered marked his transition into high-budget blockbusters. The Dark Knight became one of my favourite films, thanks in large part to Heath Ledger’s performance as my favourite fictional character. Afterwards, I went back to Memento and then added Inception to my favourites list. The Dark Knight Returns and Interstellar were both disappointments, but only disappointing when compared to Nolan’s previous work.
When I heard Christopher Nolan was doing a World War II film it became one of my most anticipated films of 2017. The teaser and the subsequent trailer still managed to exceed my expectations and affirm my belief that this would be a triumphant return to form. However, I couldn’t help but detect one drop of poison in the cauldron. The YouTube comments on the trailers were hijacked by One Directioners, proclaiming their love for Harry Styles and saying that their baby better not die in the film. A co-worker mentioned that Harry Styles was in the film, but I hoped that his role was a small one that would not overshadow Dunkirk. I still don’t know how big Styles’s role as “Alex” is, but the billing online makes it seem like it is pretty significant.
Although I personally loathe (trying to cut down on the use of the word ‘hate’) One Direction I didn’t want to let that hamper my perception of Styles. I have seen actors come from unlikely backgrounds and nail major performances. At one point, people probably thought it was ridiculous that The Fresh Prince would have Oscar-nominated roles. However, the horde of One Directioners that this film is apparently attracting does bring up some concerns.
Firstly, I bet most of the One Directioners barely know anything about World War II, or even care about the story itself. They just want to see their hubby on screen. I like to think of Daisy Ridley as my wife-to-be but there is no way I would watch two hours of a story I have no interest in just to see her on screen. I have never understood this level of fan worship, and I honestly think it represents the worst of fandom. As a matter of fact, the only time I would watch a film just for an actor is if I appreciate their acting talent. I saw Shame simply because Michael Fassbender was in it, but I also had some interest in the story. As much as I love Fassbender, I still avoided Asssasin’s Creed like the plague.
An even bigger issue with Styles is that his addition in this film seems so, for lack of a better word, random. Was his audition truly so spellbinding that it beat all of the competition? There wasn’t a single other talented actor with the right age and look? A co-worker argued that must be the case if he got selected, and part of me hopes that logic holds true. Nolan isn’t Michael Bay, he doesn’t hire actors just because they’re hot or marketable. Yet why was Style’s, an unproven acting commodity, casted before actors like Cillian Murphy? I’m seeing Dunkirk on saturday and if Styles’s performance is anything short of spectacular then I will continue to wonder why I had to see him on screen, while surrounded by screaming Directioners.
Note: I was out of the country for the past week, with limited wi-fi. I am back in Canada now but my schedule will still be busier than normal, likely until the end of August. With that said, I will still do my best to post three times a week.
Also, this piece has spoilers for “Men Against Fire”.
When I started watching “Men Against Fire” I thought it would end up on the bottom half of Black Mirror. The acting was some of the weakest the show’s given us in a while and I initially didn’t find the characters or the world as enthralling as the ones in preceding episodes. Initially, the story was about marines with hi-tech equipment killing zombies. Don’t get me wrong, I love sci-fi and zombie stories but the plot was a sharp contrast to the previous episodes. However, I figured that if I can watch an episode about a man being blackmailed to have sex with a pig, I can give this episode a chance.
The end of some episodes were disappointing, such as “Playtest”, which was dulled by numerous fake-outs throughout the episode. Other preceding episodes also have great ending, especially “White Christmas” and “Shut Up and Dance”. However, those endings were paired with episodes that I found enthralling and entertaining from start to finish. The endings were brilliant, but they only helped to immortalize amazing episodes. “Men Against Fire” might rank as my favourite ending (last 20 minutes) simply due to its ability to elevate what came before it.
“Roaches”, the pale, humanoid monsters that the soldiers eliminate turn out to be humans. Their MASS implants limit their sense of smell and hearing, drowning out the smells and sounds of war. Michael Kelly is a stand out on House of Cards as Doug Stamper, and is also a stand out here as Arquette, the psychologist who shares the twisted truth with “Stripe”. As always with Black Mirror the technology itself isn’t the most interesting part of the story; the most interesting part is the human behaviour it highlights.
Arquette uses the statistic that only 15-20% of men fired their rifles at the enemy in World War II, even when under the threat of immediate danger. Although this statistic is hotly debated, a comment on this page did add that most deaths in the world wars came from artillery fire: long-range, impersonal attacks that avoided the Rambo-esque hacking and shooting of close quarters combat. Scholarly books such as Denis Winter’s Death Men also assert that most military deaths came from artillery fire, especially during advances.
“Men Against Fire” gets more interesting after a roach shines a laser into Stripe’s eyes. It was obvious that the laser must have some impact on the plot, when Stripe’s senses were affected after being exposed to it. When Hunter and Stripe raid an apartment building there is also a blueprint of the laser in the roach nest. Some online discussion shows that plenty of people say they saw the twist coming, and then also argue that the episode is poor because of that. I have to say that a predictable twist doesn’t have to bring down an episode if it is executed well. I thought I saw a twist coming, but I actually misinterpreted what it was.
Although the roaches appearance is terrifying, you realize that they didn’t initiate an attack in the first raid. Their first instinct is to run, and the sniper who kills squad leader Medina is an exception, probably because the soldiers are closing in on their refuge. The roaches weren’t depicted as the mindless predators we’re familiar with from zombie films. They seemed like mutants trying to live peacefully. The characters frequently mention a global war that passed, and I thought the roaches were the offspring of radiation from that war. For that reason, I thought the laser was a device that was meant to make them only appear normal to others, before they were mutated. I had an inverse understanding of the twist until it was revealed. The roaches weren’t trying to make Stripe see them as they used to be, they wanted Stripe to see him as they are.
“You see me.”: The words of a refugee on the run from a genocidal society, relieved someone finally sees her as human. The military might be the ones killing the roaches, but the general public are brainwashed to see the roaches as literal monsters. Civilians don’t have MASS implants, the roaches are just other humans to them. However, they are humans that threaten the strength and purity of humanity’s bloodline. Arquette lists a range of defects present in the roaches, from higher susceptibility to diseases, to sexual deviancy and criminal tendencies. Arquette’s speech has all the cornerstones of eugenics and racism, and Trump’s comments on hispanics sadly mirror some of the ideas that criminality is ingrained in certain people.
In the aftermath of the war, one side went through great trouble to dehumanize the other. Cockroaches or “roaches” is what the Hutus called the Tutsis leading up to the Rwandan genocide, and even more recently used by a British politician to refer to refugees. I don’t think it’s a coincidence that the same term is used here. Dehumanization is a key part of genocide, birthed from propaganda that makes it easier for law-abiding civilians to engage in or support violence against the other. Civilians won’t even touch the food the roaches touched simply because they don’t want to get contaminated by a lesser breed.
“Men Against Fire” transitions from a war movie, to a piece that delves into the dark corner of the human psyche where prejudice reins supreme. As Stripe stands alone outside a dilapidated, graffiti-stained house, he sees a beautiful woman waiting to welcome him to their home. I couldn’t help but wonder, how many other soldiers in this army had their memories wiped after they found out the truth.
Picking a favourite episode of Black Mirror is a challenge. “The Waldo Moment” and “The National Anthem” aren’t contenders but there are plenty others, ranging from “Shut Up and Dance”, “Be Right Back”, to “The Entire History of You”. Among this list is “White Christmas”, which after careful consideration, I will have to say edges out the competition.
Like my post on “The Entire History of You“, I don’t want to focus on the plot itself. Black Mirror‘s central thesis is that technology can have corrosive effects on how humans interact with one another and I want to focus on how that is displayed here.
Matt Trent (Jon Hamm) is undoubtedly a highlight of the episode, a character who is both charming and repulsive at the same time. The more vile aspects of his character emerge as his story unfolds. His past-life as a wannabe dating guru seems somewhat harmless at first. As a lanky film geek, I’d probably be an easy target for his services. However, it only takes a few seconds to realize that his real-time coaching is a grave invasion of privacy. Aside from the simple act of watching, Trent’s technology (referred to as the Z-Eye) also provides him with face recognition software he can use to research anyone his clients come in contact with, allowing him to feed any pertinent information to a party crasher. It gets only worse when we realize all of the members of his class share in their peers’ experiences, including any luck they get with unsuspecting women. The date that lands Trent in legal trouble also reminds me of the few I’ve had: promising starts with catastrophic endings.
It was great to see Oona Chaplin in another role, after seeing her for the first time in Taboo. She was undoubtedly a weak link on Taboo but does a better job here, portraying Greta, a wealthy woman about to undergo surgery. Prior to her surgery, a digital copy or “cookie” of Greta is created.
This cookie is intended to control Greta’s smart house, serving the rest of its “life” performing functions such as regulating heat and displaying Greta’s schedule. As expected the cookie is reluctant to spend its life this way, but Matt’s job is to make it compliant. By manipulating the time settings in the cookie’s digital world, he is able to make the cookie “live” for months at a time, stuck in a white room with nothing but a control panel. The room itself is only a projection within the cookie, but it is Greta’s prison now.
One of the characters, “Joe” remarks that this is slavery, but Trent believes it isn’t since the cookie isn’t a real being. I have to agree with Joe on this. Any sci-fi story that deals with the issue of consciousness, with Ex-Machina being a recent example, raises the question of what makes a being conscious and the morality of keeping a conscious being captive.
Is Greta’s cookie a conscious being? Matt doesn’t think so, because she’s just a string of code. However, if we analyze consciousness the way it is analyzed in Ex-Machina, then we understand that the components of a being don’t define its eligibility for consciousness. In Ex-Machina, Caleb argues that one of the central tests for consciousness is the “chess” question. A chess computer knows the game of chess and can make good plays, but can it describe what chess is? Does it even know what chess is? Simulation vs consciousness.
This cookie, from what we understand, is mentally no different than the person it was spawned from. We see it panicking as it is extracted from Greta and Matt has to explain the nature of its creation and its assigned purpose. Essentially, a copy of Greta’s mind was grafted and planted into a different environment. Until Matt explained what she was, she thought she was a conscious human being. She may be just code, but consciousness isn’t about matter, it’s about thought.
Although the cookie is the most advanced technology we see in the episode, it is actually not what interests me most. We are probably all familiar with ghosting, the act of ending a relationship with someone by cutting off all communication without explanation. Ghosting is usually discussed in the context of romantic relationships, but can apply to anyone. Someone decides to end the relationship, but decides that they want to avoid the difficult decision, call or text required for that. Instead, they simply cut off the other person. Ghosting preceded technology such as phones and computers, and some may see it is just a new name for something old. However, I believe technology makes it easier to become disconnected from other people. We don’t have to move or shred letters, we can unfollow, delete or block with a click. Ghosting is convenient for people who have become accustomed to hiding behind screens when they interact. It is spineless and immature, and technology only makes it easier.
When “Joe” confronts his wife about her pregnancy, she is quick to block him. She doesn’t do this on her phone or some app, she blocks his entire body using the technology her world has to offer. She sees nothing but a grey silhouette where he stands and can only hear muffled static when he speaks. When Matt’s wife is confronted with the truth of his actions, she elects to do the same thing. The people who would have previously gone for a walk or tried to avoid their spouse, instead of contronting an issue, can now feel free to block someone’s entire body. The current level of cowardice that we see doesn’t prove effective if you’re likely to see someone again at work, school etc. With the capability to block someone as we see in “White Christmas”, the ghosted may be able to see you but they can’t interact with you. When Joe confronts his wife, after she blocks him, she only walks away and then proceeds to file a restraining order. Blocking becomes legally binding and the argument that you simply wanted to be able to confront someone directly doesn’t protect you. The authorities take the side of someone who decided to block her husband because he insisted on discussing their baby with her.
I have no doubt that authorities would defend this behaviour. Ghosting is already on the rise. Find any article online that discusses it, and allows comments. You will find plenty of people criticizing the practice, but you will also find many supporting it for one reason or another. All of the positive reasons boil down to “It’s easier for me (or both of us)”. Article after article will tell you that people who get ghosted may be able to deal with a relationship ending, but hate the way that their partner decided to do it. Blocking takes ghosting to an almost sadistic level.
Speaking of sadism, “White Christmas” gives us another twisted ending. Once Joe confesses that he murdered his ex-wife’s father, the authorities decide to tamper with the time settings. Each minute becomes 1000 years to Joe’s cookie, leaving him trapped in a projection of the cabin where he committed murder. We’re already living in a society where policemen have killed civilians for a thrill, I can definitely believe law enforcement officials would take a little glee in messing with someone they view as a lowly criminal. Even better, I can believe they would punish a sex offender with not being able to interact with anyone for the rest of his life.
|
{
"pile_set_name": "Pile-CC"
}
|
Q:
Android: Bundle.toString() and then create a Bundle from String
I'm trying to do the following:
// I have a Bundle and convert it to string
Bundle _bundle;
// Meanwhile I put intergers, booleans etc in _bundle
String _strBundle = _bundle.toString();
Later in my code I need to create a Bundle from _strBundle. How do I do that? So far I couldn't find any information on this. Of course I don't wish to parse _strBundle myself and hope that the fremawork already provides a String2Bundle sort of a functionality.
A:
As far as i know there is no way for the framework to know what is stored in your string. The same pattern could have possible interpretations (string, boolean, integer) and so i don't think that that actually even makes sense.
In fact i can't imagine why you would need to do it. You already have the bundle in the first place. I suggest you keep the original bundle and use it when you need it or make the parse of the string and create the bundle yourself (which won't be an easy task if you want to cover all the possibilities).
A:
If you want to pass data as String to another place, it's better to use JSONObject it's very simple to create JSONObject from String and vice versa. And it's too similar to Bundle class!
json = new JSONObject(str);
str = json.toString();
Also, You can pass it as String parameter with Intent or the other method as String.
|
{
"pile_set_name": "StackExchange"
}
|
1. Field of the Invention
The present invention relates to motion vector search apparatus and method that favorably search for motion vectors between frames of digital moving pictures.
2. Related Background Art
Conventionally, a block matching method has been frequently used as a motion vector search method in a motion compensation inter-frame prediction coding method.
The block matching method is a method in which a block in a reference frame in the same position as a motion search target block (N×N pixel area) is used as a center to calculate matching evaluation functions with blocks that shifted in units of pixels within a search range of ±M×±M pixels, the best matching block is searched, and the amount and direction of the shift to the matching block is used as the motion vector. As the matching evaluation function, a sum of absolute values of differences between pixel values calculated on a pixel to pixel basis for all pixels within the block (i.e., a difference evaluation value) may be used, for example.
The block matching method, however, has a problem in that searches must be conducted a great number of times, which requires an enormous amount of calculation when this system is realized. For this reason, various simplification techniques such as a method of searching with multiple steps, such as, for example, a 3-step search method have been suggested.
In the 3-step search method, a search is made at rough search-point intervals as the first step, and then the second search is made at search-point intervals each of which is a half of the interval for the first step around the best matching position as a center, instead of the all-pixel position search. In this manner, in the 3-step search method, the same process is repeated in a plurality of steps to narrow the coarse search-point intervals to close ones, thereby searching for a motion vector.
Accordingly, the amount of calculation can be significantly reduced with the 3-step search method than with the block matching method that performs the all-pixel position search described above. However, the 3-step search method entails a possibility of finding a motion vector completely different from the search direction sought if an erroneous search is made in the first step.
|
{
"pile_set_name": "USPTO Backgrounds"
}
|
package client // import "github.com/docker/docker/client"
import (
"context"
"encoding/json"
"net/url"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
)
// NetworkList returns the list of networks configured in the docker host.
func (cli *Client) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
query := url.Values{}
if options.Filters.Len() > 0 {
//lint:ignore SA1019 for old code
filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters)
if err != nil {
return nil, err
}
query.Set("filters", filterJSON)
}
var networkResources []types.NetworkResource
resp, err := cli.get(ctx, "/networks", query, nil)
defer ensureReaderClosed(resp)
if err != nil {
return networkResources, err
}
err = json.NewDecoder(resp.body).Decode(&networkResources)
return networkResources, err
}
|
{
"pile_set_name": "Github"
}
|
Matcha is a high-grade green tea ground into powdered form. The green tea powder is whisked into hot water, instead of steeped, to form a frothy drink. The meditative act of preparing, presenting, and sipping matcha is the backbone of the Japanese tea ceremony. While matcha’s origins are ceremonial, the green tea powder is widely popular around the world in beverages like tea lattes or boba tea, and as a cooking ingredient in everything from ice cream to salad dressing.
One study that was published in the February 2010 issue of the Journal of Agricultural and Food Chemistry investigated the effects of catechins on eye diseases and found that consuming more catechins may help protect the eyes from oxidative damage and vision loss. Scientists involved in the study found evidence that catechins can pass from the digestive tract of rodents to the tissues of their eyes and reduce oxidative stress for up to 20 hours after ingestion. (11) One of the primary reasons for the popularity and consumption of all kinds of tea by human civilizations is its stimulating effect. This effect, again, is due to the caffeine and tannins present in the tea leaves. Caffeine and tannins, despite their potentially adverse effects on health, in the long run, act as very powerful stimulants. That is why a cup of tea makes you feel fresh and highly energized. Tea is an easy and ideal solution to counter fatigue, laziness, sleepiness, and lack of energy, and to improve blood circulation. This is why it is so popular with a wide variety of people in various industries, including professionals, housewives, students, and anyone else who has ever felt a bit drowsy during the day!
According to science, matcha is something of a miracle supplement. For one, it makes you feel good. One recent study examined the effects of the phytochemicals in green tea on mood and cognition. The combo of caffeine (present in most green teas) and L-theanine, an amino acid found in some teas, were found to “improve performance in attention-switching tasks and alertness, but to a lesser extent than caffeine alone,” partly because of how L-theanine chills you out.
Green tea is considered one of the world's healthiest drinks and contains one of the highest amounts of antioxidants of any tea. Natural chemicals called polyphenols in tea are what are thought to provide its anti-inflammatory and anti-carcinogenic effects. Green tea is approximately 20-45 percent polyphenols by weight, of which 60-80 percent are catechins such as EGCG. Catechins are antioxidants that are said to help prevent cell damage.
Being a green tea, matcha does contain caffeine and in higher levels than other green teas. Because the entire leaf is used, matcha tea can contain nearly as much caffeine as a cup of coffee. However, caffeine release is believed to be slower because you are drinking the entire leaf. This slower release of caffeine reduces “caffeine jitters” that coffee or other teas can cause.
The first early harvest of tea, plucked before the first flush, is called shincha. Shincha is made from the youngest new growth leaves, and is plucked from early April to early May. Shincha typically refers to the early harvest of sencha, but can refer to any type of tea plucked early in the season, before the main harvest. Because of the limited quantities in which it is produced, shincha is highly prized and expensive to obtain.[66]
Zen Buddhism and the Chinese methods of preparing powdered tea were brought to Japan in 1191 by the monk Eisai. In Japan it became an important item at Zen monasteries and from the fourteenth through to the sixteenth centuries was highly appreciated by members of the upper echelons of society. Although powdered tea has not been popular in China for some time, there is now a global resurgence in the consumption of Matcha tea, including in China.
What are your thoughts on this topic? Chat with us on Twitter by mentioning @goodhealth and @CynthiaSass. Cynthia Sass is a nutritionist and registered dietitian with master’s degrees in both nutrition science and public health. Frequently seen on national TV, she’s Health’s contributing nutrition editor, and privately counsels clients in New York, Los Angeles, and long distance. Cynthia is currently the sports nutrition consultant to the New York Rangers NHL team and the New York Yankees MLB team, and is board certified as a specialist in sports dietetics. Cynthia is a three time New York Times best selling author, and her brand new book is Slim Down Now: Shed Pounds and Inches with Real Food, Real Fast. Connect with her on Facebook, Twitter and Pinterest.
Over a thousand years ago, matcha came to Japan as an aid to meditation practice. During long hours of sitting, monks would drink matcha to remain alert yet calm. Modern science has recently confirmed the lessons of centuries of tradition. Matcha is rich in L-Theanine, a rare amino acid that actually promotes a state of relaxation and well-being by acting upon the brains functioning. While stress can induce beta waves an excited, more agitated state, L-Theanine creates alpha waves, which lead to a state of relaxed alertness. And while L-Theanine is common in all tea, matcha may contain up to five times more of this amino acid than common black and green teas.
Beautiful Fall day here in Dallas 😎Getting ready for a walk with the Ellie Girl and my @teamiblends of course. Love taking my tumbler on-the-go. My Alive tea keeps me energized (so I exercise instead of nap! 😉) This is actually Sean’s tumbler but the black is so sleek I stole it for the day… Use my code CGFREE to get a free black tumbler with your purchase of $49.99 when you order #iloveteami #thankyouteami One of the primary reasons for the popularity and consumption of all kinds of tea by human civilizations is its stimulating effect. This effect, again, is due to the caffeine and tannins present in the tea leaves. Caffeine and tannins, despite their potentially adverse effects on health, in the long run, act as very powerful stimulants. That is why a cup of tea makes you feel fresh and highly energized. Tea is an easy and ideal solution to counter fatigue, laziness, sleepiness, and lack of energy, and to improve blood circulation. This is why it is so popular with a wide variety of people in various industries, including professionals, housewives, students, and anyone else who has ever felt a bit drowsy during the day! Cardiovascular diseases, which lump heart disease, stroke, and other diseases of the heart and blood vessels caused by atherosclerosis and hypertension (high blood pressure) into one category, are the most prevalent causes of death in the world. Studies show that green tea can improve some of the main risk factors for these diseases, which includes helping regulate total cholesterol, LDL cholesterol, and triglycerides. One method by which green tea might help: it significantly increases the antioxidant levels of your blood, protecting LDL cholesterol particles from oxidation—one of the causes of heart disease. This tea is a rich source of antispasmodic agents, which can ease severe stomach cramps and abdominal pains. This is mainly due to the activation of K+ (potassium) ions in the body without antagonizing the activities of calcium, according to a report published in the Basic & Clinical Pharmacology & Toxicology. This can reduce the presence of hyperactivity in the gastrointestinal tract, thus preventing diarrhea and other intestinal issues.
The Japanese tea ceremony, still called The Way of Tea, is a revered practice in Japan and is centered around the art of preparing and presenting matcha in an almost meditative fashion. It was originally developed as a spiritual practice and the principals of the practice—harmony, respect, purity, and tranquility—are still central to tea ceremony today.
We use cookies and similar technologies to improve your browsing experience, personalize content and offers, show targeted ads, analyze traffic, and better understand you. We may share your information with third-party partners for marketing purposes. To learn more and make choices about data use, visit our Advertising Policy and Privacy Policy. By clicking “Accept and Continue” below, (1) you consent to these activities unless and until you withdraw your consent using our rights request form, and (2) you consent to allow your data to be transferred, processed, and stored in the United States.
Green tea also seems to boost physical performance, increase exercise endurance, and decrease reaction time, and there are many, many such studies showing these effects from caffeine, although other ingredients in green tea may aid this effect. Caffeine, and green tea’s, ability to mobilize fatty acids in fat tissue to make them more easily available for use as energy also seems to aid physical performance. In one study, caffeine was shown to significantly increase physical performance (exercise endurance and exertion). The antioxidants in green tea may also help prevent tissue damage during physical exertion as well.
Japanese researchers published a study on green tea and its effect on the beta-amyloid protein plaques found in Alzheimer’s disease in the April 2008 issue of the Journal of Nutritional Biochemistry. The protein plaques associated with Alzheimer’s disease increase brain cell damage and death due to oxidative stress. The researchers found that green tea catechins reduced the level of damaging free radicals in the brains of rats. The green tea rodents showed much less plaque-induced deficits in memory compared to rodents that didn’t receive green tea and those that were infused with beta-amyloid proteins. (8)
Disclaimer: While we work to ensure that product information is correct, on occasion manufacturers may alter their ingredient lists. Actual product packaging and materials may contain more and/or different information than that shown on our Web site. We recommend that you do not solely rely on the information presented and that you always read labels, warnings, and directions before using or consuming a product. For additional information about a product, please contact the manufacturer. Content on this site is for reference purposes and is not intended to substitute for advice given by a physician, pharmacist, or other licensed health-care professional. You should not use this information as self-diagnosis or for treating a health problem or disease. Contact your health-care provider immediately if you suspect that you have a medical problem. Information and statements regarding dietary supplements have not been evaluated by the Food and Drug Administration and are not intended to diagnose, treat, cure, or prevent any disease or health condition. Amazon.com assumes no liability for inaccuracies or misstatements about products.
According to the National Cancer Institute, the polyphenols in tea have been shown to decrease tumor growth in both animal and laboratory studies. Researchers believe that it is the high level of polyphenols in tea that help kill cancerous cells and stop them from growing, although the exact mechanism by which tea inhibits and prevents cancerous cells is uncertain.
Dulloo, Abdul G., Claudette Duret, Dorothée Rohrer, Lucien Girardier, Nouri Mensi, Marc Fathi, Philippe Chantre, and Jacques Vandermander. “Efficacy of a green tea extract rich in catechin polyphenols and caffeine in increasing 24-h energy expenditure and fat oxidation in humans.” The American journal of clinical nutrition 70, no. 6 (1999): 1040-1045.
Along with caffeine, which gives green tea its characteristic taste, bitterness, and stimulating effect, green tea is also rich in a group of chemicals, called catechin polyphenols (commonly known as tannins, which contribute to bitter taste and astringency). These catechin polyphenols include catechin, epicatechin, epicatechin gallate (ECG), epigallocatechin gallate (EGCG), and various proanthocyanidins. They are also known as flavonoids and are very powerful antioxidants. Flavonoids, together with some amino acids like thiamine, are responsible for the potent flavor of green tea. In 2009, King’s College researchers found that epicatechin may protect brain cells through mechanisms unrelated to its antioxidant ability, as epicatechin is one of the few flavonoids that can cross the blood-brain barrier. The King’s College researchers reported that somehow epicatechin protects brain cells from the negative effects of beta-amyloid plaques, although the exact mechanism of how this works is still not entirely know. (9) Not sure about the weight loss end of the sales pitch however I can tell you this has a great detox or probiotic effect. I train 5 days a week and eat 90/10 clean. At times the amount of fiber in take in will cause issues with my ability to process and pass...anyhow this has helped with bloating and the above noted issue. It has a great light taste, not bitter, nor tasteless. I didn't add any sweetener and loved the taste on its own. Will buy again.
Asian countries like Japan and China are the biggest producers of green tea (they produce the best quality too) and are also its biggest consumers. Green tea available in other markets is found in far smaller quantities than black tea. Moreover, it is still gaining popularity, and you can get it at any modern shop. You can also order it from a local tea supplier, over the phone or on the internet. It is almost invariably imported from China (cheaper) and Japan (more expensive) and is packed in sealed packs of 200 grams, 250 grams, and 500 grams. Buy smaller quantities if possible, so that you get to make a fresh brew. Also, always check the date of manufacturing and packing before you buy.
One study that was published in the February 2010 issue of the Journal of Agricultural and Food Chemistry investigated the effects of catechins on eye diseases and found that consuming more catechins may help protect the eyes from oxidative damage and vision loss. Scientists involved in the study found evidence that catechins can pass from the digestive tract of rodents to the tissues of their eyes and reduce oxidative stress for up to 20 hours after ingestion. (11)
Generally, lower-quality green teas are steeped hotter and longer while higher-quality teas are steeped cooler and shorter, but usually multiple times (2-3 typically). Higher-quality teas like gyokuro use more tea leaves and are steeped multiple times for short durations. Steeping too hot or too long results in the release of excessive amounts of tannins, leading to a bitter, astringent brew, regardless of initial quality. The brew’s taste is also affected by the steeping technique; two important ones are to warm the steeping container beforehand to prevent the tea from immediately cooling down, and to leave the tea leaf in the pot and gradually add more hot water during consumption.[citation needed]
I’ve been taking these for a few days now and saw immediate results on the first day, my liver started hurting less and now it doesn’t hurt at all. I also noticed my face looked healthier and got that famous “glow” I only drink 1 cup a day because if I’m going to be completely honest, I’m not a big fan of the taste, but since it’s actually helping me, I don’t mind.
Day 1: So you’re supposed to drink your tea first thing in the morning (or before a workout), but I didn’t receive my package until after arriving home for the day (in the early evening). Since I am a slave to my own desire for instant gratification, I said “Screw the rules!” and made my first cup right then and there. Immediate observation: It’s actually pretty delicious. I don’t consider myself a tea connoisseur by any means, so I was pleasantly surprised. I didn’t think it needed the recommended addition of honey.
Rooibos or 'red bush' from South Africa is found to be a very potent variety of red tea prepared from the leaves of the herb Aspalathus linearis. Indigenous to the Cape of Good Hope region of South Africa, Rooibos is the only red tea that undergoes a fermentation process similar to black tea. Fermentation turns the green leaves into a garnet colour and lends a very sweet flavor. Rooibos endowed with a very high magnesium ('Nature's tranquilizer') component, acts as a natural adaptogen i.e., that which helps the body adapt to stress.
Flavan-3-ols, the type of flavonoids found in green tea and other teas, provide many of the anti-aging effects of green tea. Catechins in various types of teas are the polyphenols that seem to have the most potent antioxidant effects, according to Natural Standard, the leading and most respected reviewer of herbal compounds. Specific flavan-3-ols found in green tea include monomers (catechins) called: Just have a cup of hot green tea after some rigorous exercise and you will be ready for a few more sets in no time. Furthermore, it effectively counters muscular pain due to overexertion of muscles. Although green tea isn’t widely consumed due to the presence of energy drinks in the market, if you visit Japan and China, you will see that green tea is the premier beverage used by practitioners of martial arts and various other sports.
And not all the science has been favorable to tea. A report in the March 1 edition of The New England Journal of Medicine looking at green tea consumption in humans, found no effect on stomach cancers once adjustments were made for other factors that could affect risk. Those other factors included sex, age, history of stomach ulcer, use of tobacco or alcohol, and other dietary habits.
Ginger Root, the underground stem, or rhizome, of the plant Zingiber officinale, has been used in many herbal traditions since ancient times. In Ayurveda, Ginger is known as the wonder herb, and it's no wonder, since Ayurveda employs Ginger for a wide variety of health applications, including digestive support. Historically, Ginger Root was also one of the most respected herbs for supporting joint health. Additionally, Ginger Root has been traditionally used to support healthy peripheral circulation; and can aid in warming up cold hands and feet, and will also promote sweating when needed.
|
{
"pile_set_name": "Pile-CC"
}
|
IN THE UNITED STATES COURT OF APPEALS
FOR THE FIFTH CIRCUIT United States Court of Appeals
Fifth Circuit
FILED
August 18, 2009
No. 08-31062
Conference Calendar Charles R. Fulbruge III
Clerk
UNITED STATES OF AMERICA,
Plaintiff-Appellee
v.
VERNON CROSSLEY,
Defendant-Appellant
Appeal from the United States District Court
for the Eastern District of Louisiana
USDC No. 2:08-CR-43-1
Before HIGGINBOTHAM, DAVIS, and CLEMENT, Circuit Judges.
PER CURIAM:*
The Federal Public Defender appointed to represent Vernon Crossley has
moved for leave to withdraw and has filed a brief in accordance with Anders v.
California, 386 U.S. 738 (1967). Crossley has filed a response. The record is
insufficiently developed to allow consideration at this time of Crossley’s claims
of ineffective assistance of counsel; such claims generally “cannot be resolved on
direct appeal when [they have] not been raised before the district court since no
opportunity existed to develop the record on the merits of the allegations.”
*
Pursuant to 5TH CIR . R. 47.5, the court has determined that this opinion should not
be published and is not precedent except under the limited circumstances set forth in 5TH CIR .
R. 47.5.4.
No. 08-31062
United States v. Cantwell, 470 F.3d 1087, 1091 (5th Cir. 2006) (internal
quotation marks and citation omitted). Our independent review of the record,
counsel’s brief, and Crossley’s response discloses no nonfrivolous issue for
appeal. Accordingly, counsel’s motion for leave to withdraw is GRANTED,
counsel is excused from further responsibilities herein, and the APPEAL IS
DISMISSED. See 5 TH C IR. R. 42.2.
2
|
{
"pile_set_name": "FreeLaw"
}
|
Most popular
The other contenders are Chinese-Canadian family saga Do Not Say We Have Nothing by grand hotel and spa promo code Madeleine Thien; disturbing character study Eileen by American debut novelist Ottessa Moshfegh; and Graeme Macrae Burnets Scottish Highlands murder story His Bloody Project a rare
I dont think Im going to rebate under section 87a for fy 2017 18 get any answers about what the tumbler includes.Try that Pumpkin Spice Latte as a short drink!When a Green member collects 300 Stars, they achieve Gold Status and begin to gifted tv
Take control of your content, add music and HD videos, without any programming skills needed.It would be perfect to put more feeling and thrilling during csgo empire promo code your game session.Pay 8 less on audio-video items using this GearBest promotion code Save extra 8
Jimmy choo employee discount
This is why equal pay is so important: equality and empowerment go hand in hand.As the farm town gifts links fuel Chief Creative Officer and co-founder, my salary was less than comparable C-level positions.Analysts from Jefferies said the deal could help Michael Kors rebuild its brand name, though that would happen in the longer-term and not have an immediate impact on the company's stock.Watch more on Forbes: This was the elephant in the room of feminismwork as hard and accomplish as much as any man, but dont ask for something that someone doesnt want to give you.Our paychecks dont have our potential earnings on them with a 20 off discount applied.If you wait to be the most most person in the room, discount fine stationery youll never feel qualified.Its about getting what you want.Speak in ranges when you start, and ask if people in your community who work in your industry have any insight into comparable positions.Jimmy Choo employees with the job title Strategic Planning Manager make the most with an average annual salary of 103,361, while employees with the title Apprentice Plumber make the least with an average annual salary of 27,123.Back to Top, browse Other Categories, recent Blog Posts on Career News.Vogue to co-found a company with an East London cobbler named Jimmy Choo.Senior Online Marketing Manager 45,050 58,334 38K127K 20,776 15K32K 19,696 16K24K 30,440 22K40K 29,390 22K39K 45,050 34K58K, precise, estimated, jimmy Choo Job Listings, key Stats for Jimmy Choo.Thats why Im choosing to talk about.Negotiating your worth and compensation is not something that should live behind closed doors.Over the following 16 years, I built one of the most recognized luxury brands in the world and discovered exactly how often women need to negotiate.
Job, average, fashion Designer 58,334, aeronautical Engineer 20,776, marketing Assistant 19,696, personal Assistant 30,440, retail Manager 29,390.I believe that women are strong.And talking the talk is not the same thing as walking the walk.We carry our confidence and our ambitions proudly, but when it comes to negotiating salary or asking for a raise, we're less likely to succeed.Location (all)United States - 87 Atlanta, GA - 1 Aurora, IL - 1 Brea, CA - 1 Cabazon, CA - 1 Central Valley, NY - 1 Chandler, AZ - 1 Chicago, IL - 7 Dallas, TX - 1 Downey, CA - 1 Exton, PA - 1 Glendale, CA - 1 Honolulu, HI - 1 Houston, TX - 1 Jersey.I was told.Ive been in business for over 20 years, and I have learned, often the hard way, how being a feminist, a founder, a mother, a partner and a creative all interplay in the modern working world.Until our culture can embrace the simple fact that equal work is worth equal pay, women will always be asking for permission.There are many websites to compare pay, but compensation varies by location, experience and past paytheres no algorithm for that nuance, just awareness.Today is Equal Pay Day, and as a woman and an entrepreneur, I want to have an honest conversation about empowerment and equality.
|
{
"pile_set_name": "Pile-CC"
}
|
Metformin protects against carbon tetrachloride hepatotoxicity in mice.
In the present study, the hepatoprotective effect of metformin (Met), a dimethylbiguanide anti-hyperglycemic, was examined in a mouse model of liver damage induced by chronic repeated administration of carbon tetrachloride (CCl(4)) (5 microl/kg, twice a week for 12 weeks). Met, when given orally in drinking water at an estimated daily dose of 25 or 50 mg/kg for 10 weeks starting 2 weeks after CCl(4) challenge, protected against CCl(4) hepatotoxicity. The results indicate that the hepatoprotection afforded by Met treatment at a dose of 25 mg/kg against CCl(4) toxicity may at least in part be mediated by the enhancement of mitochondrial glutathione redox status.
|
{
"pile_set_name": "PubMed Abstracts"
}
|
Tyler, 7, sports a self-styled mohawk as he plays at his home in a Maryland suburb near Washington. (Nikki Kahn/The Washington Post)
He knew it at 2 years old. His parents suspected it at 4 and knew it at 5.
And now, as he turns 7, the courts know it, too.
The child born into a girl’s body with the middle name Kathryn, who insisted from toddlerhood that “I am a boy,” had a legal name change this year. Tyler is now his official middle name. (The Post is not using his first and last names to protect his privacy.)
It’s another milestone in the long and gut-wrenching path for an otherwise average Maryland family that decided to ignore conventional wisdom and let their child be who he says he is.
Two years ago, I wrote a profile of their struggle called “Transgender at Five” that shocked some readers and inspired others. Since then, Tyler’s parents, Jean and Stephen, have seen a massive change in the world around them.
Tyler swings in a hammock at his home. (Nikki Kahn/The Washington Post)
Earlier this year, D.C. Mayor Vincent C. Gray (D) directed health insurance companies to cover treatment — including gender-reassignment surgery — for city residents with a diagnosis of gender dysphoria.
Last week, Maryland Gov. Martin O’Malley (D) signed a measure prohibiting discrimination against transgender people in cases of housing, employment, credit and the use of public bathrooms.
Also last week, Defense Secretary Chuck Hagel said he was open to reviewing the Pentagon’s prohibition on transgender people in the military. And this month, Oxford University Press launched “Trans Bodies, Trans Selves,” an exhaustive, nearly 700-page health book for the transgender community.
“It’s already a different world, and it’s becoming a better world for my child,” said Tyler’s mother.
The one thing that hasn’t changed much? Tyler.
“Yes, he’s still a boy. It’s not a phase,” she said, weary, but patient with the constant inquiries — “So, how is it going?”
The family agreed to interviews because they know that their child is not alone and want to advocate on behalf of other children whose belief that they were born into the wrong gender — the clinical term for that is gender dysphoria — may be difficult to live with in a society that insists on rigid gender roles.
Most of their friends and neighbors and their children’s classmates know that Tyler was born as Kathryn, and the family doesn’t hesitate to discuss it with anyone who asks.
Tyler used to issue a blanket statement to friends about being transgender. But lately, he doesn’t want to talk much about it. Almost as if he’s forgotten that he’s different.
He may change his mind about being a boy when puberty hits, according to doctors who specialize in children with gender-identity issues. Or he may ask to get hormone injections to begin growing the biological characteristics of the opposite sex when he is 15 or 16 and fully transition with gender-reassignment surgery once he is an adult.
When Jean and her husband first began to educate themselves about transgender children, the support groups they found were mostly made up of adults or teenagers. They felt alone until they found one other family with a young transgender child. Then another. And another. Now, they have more than a dozen families who meet at their home once a month to talk about schools, bathrooms, siblings and legal battles.
“And we hear from at least one new family every month,” Jean said.
They are comfortable enough with changes in Maryland that they will enroll their child in a public school next year. That was unimaginable two years ago, so they went into deep debt paying for a private school that was gentle and understanding. Since then, they’ve seen changes in school training, policy and the public conversation.
One of their biggest legal hurdles this year was the name change. Tyler’s birth certificate, insurance card and everything else had the girl name. This became a problem when they visited a doctor, traveled or had any interactions with the official world.
But to change a name legally, the county courts require that a public notice about the name change be published in the local newspaper. That would create the paper trail they’ve been trying to avoid.
So they went to court in February, ready for a fight.
“I was so anxious for everything to go smoothly with the judge that I couldn’t eat,” said Tyler’s dad, Stephen.
But the judge remembered reading about Tyler in The Post. Tyler charmed everyone in court and the change was made under a sealed document.
Transgender at 7? Not too different from raising any other 7-year-old boy.
Twitter: @petulad
To read previous columns, go to washingtonpost.com/dvorak.
|
{
"pile_set_name": "OpenWebText2"
}
|
1. Field of the Invention
The present invention relates to a technology for reducing a starting time of the discharge lamp for high beam.
2. Background of the Invention
A known lighting circuit of a discharge lamp(e.g. a metal halide lamp)for a vehicle comprises a DC power circuit, a DC-to-AC converter, and a starting circuit (a starter circuit).
If a plurality of discharge lamps is used as a light source for a vehicle, a means for controlling the lamps is required. For example, when a discharge lamp is used as a front light of an automobile, and a high beam and a low beam are separately provided by an individual discharge lamp(so-called, four-lamp lighting), a pair of discharge lamps is required on the right and the left sides of the vehicle. Each pair of the discharge lamps requires a lighting circuit for controlling the lamp.
However, if a discharge lamp for high beam and a discharge lamp for low beam in a conventional device have the same power rating, meaning both discharge lamps are lighted with the same electrical power, the discharge lamp for high beam may not be able to attain a luminosity required for a condition that momentarily requires a certain amount of brightness. For example, the condition may be signaling to pass by turning the headlights on and off (on/off).
An object of the invention is to secure a quantity of illuminating light necessary for a vehicle by momentarily raising the luminous flux of the discharge lamp for high beam.
A discharge lamp device for a vehicle according to an implementation of the invention comprises a discharge lamp for high beam, a discharge lamp for low beam, both having the same power rating, and a lighting circuit for controlling those lamps. The lighting circuit controls the lamps in such a way that in lighting the lamps, the electrical power supplied for lighting the discharge lamp for high beam is made greater than the electrical power supplied for lighting the discharge lamp for low beam.
Therefore, according to an implementation of the invention, by controlling the electrical power for lighting the discharge lamp for high beam to be greater than the electrical power for lighting the discharge lamp for low beam, the implementation achieves to raise momentarily the luminous flux of the discharge lamp for high beam.
|
{
"pile_set_name": "USPTO Backgrounds"
}
|
Ask Joe: Washoe County Sheriff Hiring
James Hass called up after our recent interview with the Washoe County Sheriff's Office . They are looking to fill some positions in the near future and James wants to know why they're not re-hiring some of the deputies who might have been laid off in recent years ?
I checked back with Deputy Armando Avina about this. He says there have been no deputies who've been laid off due to budget cuts. Avina says for the past six years deputies have not received pay raises in an effort to avoid lay-offs during the recent budget crunch. There has also been a hiring freeze in place as well. So the sheriff's office has lost deputies due to retirement and attrition but not layoffs. In fact Undersheriff Todd Vinger says they've made about 21 million dollars in cuts in the past five years, again through retirement and attrition. They are expecting a wave of additional retirements in the near future, and that is why they are reaching out and looking to fill some positions by hiring new deputies. If you're interested you can check out the Washoe County Sheriff's Office website to find out more information and to see whether you might be qualified. We have a link to their site on mynews4.Com.
|
{
"pile_set_name": "Pile-CC"
}
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.silkframework.plugins.temporal.relation
import org.scalatest.{FlatSpec, Matchers}
/**
* Tests the After Metric.
* @author Panayiotis Smeros <psmeros@di.uoa.gr> (National and Kapodistrian University of Athens)
*/
class AfterMetricTest extends FlatSpec with Matchers {
val metric = new AfterMetric()
"AfterMetric" should "compare date time intervals" in {
metric.evaluate("[2000-01-01T00:00:02, 2000-01-01T00:00:03)", "[2000-01-01T00:00:00, 2000-01-01T00:00:01)") should equal(0.0)
}
"AfterMetric" should "compare date times" in {
metric.evaluate("2000-01-05T00:00:00", "2000-01-01T00:00:00") should equal(0.0)
metric.evaluate("2000-01-01T00:00:00", "2000-01-02T00:00:00") should equal(1.0)
metric.evaluate("2000-01-01T00:00:01", "2000-01-01T00:00:00") should equal(0.0)
metric.evaluate("2000-01-01T00:00:00", "2000-01-01T00:00:01") should equal(1.0)
}
"AfterMetric" should "compare dates" in {
metric.evaluate("2000-01-05", "2000-01-01") should equal(0.0)
metric.evaluate("2000-01-00", "2000-01-02") should equal(1.0)
}
}
|
{
"pile_set_name": "Github"
}
|
Q:
Переход между двумя view контроллерами через Navigation Controller
Здравствуйте. Я только начал изучать obj c и как первую программу я делаю переход между двумя вьюхами через Navigation Controller . Кнопки находятся в navigation bar.Вот что у меня в файлах:
UntitledAppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
RootViewController *rootViewController=[[RootViewController alloc] init];
UINavigationController *navigationController=[[UINavigationController alloc]
initWithRootViewController:rootViewController];
self.window.rootViewController=navigationController;
[view release];
[label release];
[button release];
[self.window makeKeyAndVisible];
return YES;
}
RootViewController.m
- (void)viewDidLoad {
[super viewDidLoad];
self.title=@"My View Controller";
self.navigationController.navigationBarHidden=NO;
UIBarButtonItem *item=[[UIBarButtonItem alloc]
initWithTitle:@"next view" style:UIBarButtonItemStylePlain
target:self action:@selector(secondPage:)];
self.navigationItem.rightBarButtonItem=item;
[item release];
}
-(void)secondPage:(id)sender
{
UIBarButtonItem *item=(UIBarButtonItem *)sender;
if(self.secondViewController==nil)
{
SecondViewController *secondView=[[SecondViewController alloc] init];
self.secondViewController=secondView;
}
[self.navigationController pushViewController:self.secondViewController animated:YES];
}
Cоответственно, есть файл SecondViewController.m,но пока он пустой
Выдает ошибку что request for member "secondViewController" in something not a structure or union
Все .h файлы я подсоединил. Может кто-нибудь подскажет, что здесь не так?
A:
Вы что, из прошлого? Поубирайте свои release. Уже 2 года, как они не используются.
-(void)secondPage:(id)sender {
if(!secondViewController) {
SecondViewController *secondViewController=[[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
}
[self.navigationController pushViewController: secondViewController animated:YES];
}
|
{
"pile_set_name": "StackExchange"
}
|
Go in for a drug raid, come out with stolen golf cart parts?
That appears to be the story in a bizarre case in The Villages, a Florida retirement community of more than 150,000 people (and famous for its abundance of golf courses).
Local deputies raided Wednesday a home in The Villages after numerous neighbor complaints about alleged drug sales from the residence, per the Orlando Sentinel.
Deputies found the suspected drugs in the raid, but that was not all. The raid also uncovered golf-cart parts – windshields, seat cushions and tires – making the home the site of an apparent illegal golf-cart chop shop as well.
“There have been some golf carts stolen in the neighborhood in The Villages here, and we’re trying to tie some of the parts to some of the stolen vehicles,” Sumter County Sheriff’s Office Lt. Robert Siemer said.
WFTV Channel 9 added that some of the five suspects arrested were indeed also suspects in these recent golf cart thefts.
As WFTV Channel 9 also notes, 43 golf carts in nearby counties have been stolen in the last few months. As of Thursday morning, investigators had not connected these golf cart parts to any recent thefts in the area.
The raided home belongs to an elderly man who did not appear to have any knowledge of the alleged drug and golf-cart chop shop operations going on in his home. The man’s niece, Kathleen Unrath, moved in, claiming to do so to take care of him, but allegedly ran both operations without his awareness.
Unrath was one of the five arrested Wednesday.
“It is sad that family would take advantage of the elderly like that,” neighbor Evelyn Feighner told WFTV Channel 9.
|
{
"pile_set_name": "OpenWebText2"
}
|
BlackRock has set up a working group to investigate ways the world’s largest asset manager can take advantage of the fast-growing cryptocurrency market despite its chief executive lambasting the bitcoin sector.
The $6.3tn investment powerhouse has created a team from different parts of the business to investigate cryptocurrencies and their underlying infrastructure, blockchain, according to two people familiar with the matter.
The...
|
{
"pile_set_name": "OpenWebText2"
}
|
Michelle Ring
Michelle Ring (born 28 November 1967) is a Canadian footballer who played as a defender for the Canada women's national soccer team. She was part of the team at the 1995 FIFA Women's World Cup. In 2005, she was inducted into the Canadian Soccer Hall of Fame.
References
External links
Category:1967 births
Category:Living people
Category:Canadian women's soccer players
Category:Canada women's international soccer players
Category:Place of birth missing (living people)
Category:1995 FIFA Women's World Cup players
Category:Women's association football defenders
Category:Canadian Soccer Hall of Fame inductees
|
{
"pile_set_name": "Wikipedia (en)"
}
|
Q:
Perl Regexp with an option
I am trying to parse this string and the number between /TN and ending forward /. Also, if there is a /REF I need to grab the REF # as well. So it could be an either or situation.
Example String:
my $acis_string = 'EL41X/TN 333-3333 /DES TAT 313 223-2388 OE508-1-12-13/ORD R1244850301 /CD 02-03-15 /ZKMA 8001 T1ZF PNTCMINEDC0 PNTCMISOH00/SCS DQKUX /TN 333-3330, 6540/RTI 581 /LSO 248 340/REF 28/TGP 581 /ORD C1244888657/CD 02-12-16';
He was my base regexp:
push @matches, [$2, $1] while $acis_string =~ /\/TN (.*?)\/.*?(\/REF (\w+)\/)?/g;
Desired Output:
$VAR1 = [
[
n/a,
'333-3333 '
],
[
28,
'333-3330, 6540'
]
];
Note:
There could be many /TN / and /REF in the string.
Thanks,
Kevin
A:
You can use the following regex:
\/TN\s+([^\/]+)(?:(?!\/TN|\/REF).)*(?:\/REF\s+([^\/]+))?
See RegEX DEMO
Explanation:
\/TN\s+([^\/]+) : Match characters other than / after /TN and put in capture group 1
(?:(?!\/TN|\/REF).)* : Logic to match characters making sure there is no /TN or /REF in them
(?:\/REF\s+([^\/]+))? : Optionally match characters other than / after /REF and put in capture group 2
|
{
"pile_set_name": "StackExchange"
}
|
# SPDX-License-Identifier: AGPL-3.0-or-later
@apps @minidlna
Feature: minidlna Simple Media Server
Run miniDLNA media server
Background:
Given I'm a logged in user
And the minidlna application is installed
Scenario: Enable minidlna application
Given the minidlna application is disabled
When I enable the minidlna application
Then the minidlna service should be running
Scenario: Disable minidlna application
Given the minidlna application is enabled
When I disable the minidlna application
Then the minidlna service should not be running
|
{
"pile_set_name": "Github"
}
|
Analytics Is Not a Strategy
I have been working in sports analytics for nearly 10 years, and still, virtually every time I tell someone what I do, they say some variation of “Oh, you do moneyball.” While my normal response is “yes, something like that,” the truth is that there is real difference between “sports analytics” and “moneyball.” As I’ve written elsewhere, sports analytics (or just plain old analytics) is a set of tools, while “moneyball” is the term coined by author Michael Lewis in his 2003 book to describe a strategy that employs the tools of analytics. The tools of analytics have advanced significantly since Michael Lewis’ book, yet the “moneyball” strategy is unchanged.
Analytics involves the tools of data gathering, data management, statistical analysis, data visualization and information systems to deliver better information, more efficiently, to decision makers within an organization. Clearly the technology behind these tools has advanced rapidly in the last ten years with tools such as Hadoop, R, Qlikview and the like all making the utilization of the mass amounts of data that are now available to organizations possible.
In sports, the most significant leap forward in technology is in data gathering, where companies such as Stats llc and Catapult Sports have utilized advances in technology to fundamentally change the size and scope of data available from practice and competitions. Stats llc utilizes cameras and optical tracking technology to capture the position of everything that moves on a basketball court 25 times a second, while Catapult Sports utilizes GPS, accelerometers and other wearable technology to track player movements and physical characteristics such as heart rate. Both technologies have shifted the type of data available in sports from the count of specific on court actions (attempted shots, for example) to the continuous movements of every element on the field of play.
Despite this massive increase in the availability of data, Moneyball remains unchanged, because Moneyball is a strategy for utilizing analytics. Moneyball is the value investing of building a successful sports franchise. The concept is to utilize data to identify undervalued players so that teams with lower payrolls can still compete at a high level. The Oakland As — and, to some extent, the Tampa Bay Rays — have followed this strategy successfully for 10+ years. But, just as there are a multitude of investment strategies, there are countless strategies for building successful sports teams. Moneyball can be effective, but that does not make it the best use of analytics for every franchise. Analytic systems can require a significant investment in tools and personnel, so it is the strategy for employing those systems within the organization that determine how successful the organization with their analytics.
The key to successfully employing analytics is not to simply invest in analytic systems and blindly apply the strategies that have been made famous through popular books and movies. The key instead is to understand the strengths and weaknesses of your organization and seek to find the areas that can best utilize analytics as you build them. The Dallas Mavericks and the San Antonio Spurs of the National Basketball Association, for example are both highly analytic teams, but they also have approached analytics differently, applying their analytic resources strategically to areas that make the most sense for the team.
The San Antonio Spurs were one of the first NBA teams to hire a statistical analyst and an applications developer. They employed these personnel assets along with any technological investments, at least initially, on assisting with player acquisitions. The general philosophy of the organization from a personnel side has been to buy low and sell high — acquiring players who fit the style of play of the organization well — typically through the draft — and then trading them for other assets once the rest of the league has seen the value that the Spurs did. This is similar to the Moneyball strategy employed by the As, and has produced a team that is currently in the Western Conference Finals, with only one player picked in the top 10 of the draft.
The Dallas Mavericks were pioneers in analytics in the NBA as well, but employed a very different strategy for maximizing their investment in analytics. The Mavericks hired the first statistician in the NBA to function as part of the coaching staff. Instead of focusing primarily on player acquisitions like the Spurs, the Mavericks focused first on in game decisions, believing that is where analytics would be most impactful in their organization. The guiding philosophy for the Mavericks was that since there are a lot more in game decisions made during an NBA season than personnel decisions, the benefit to them would be best realized focusing on that part of winning games. The Mavericks won the NBA title with statistician on the coaching staff and were in the playoffs for two of the three seasons since the hiring.
Most businesses, like most teams, have limited financial resources to spend on analytics. This constraint makes it vital for organizations to not just invest and “do analytics,” but to create a strategy for maximizing the return on their analytic investments. While there is no one strategy that works best for all organizations, any organization can be helped to make better decisions by having better information.
About Voices
Along with original content and posts from across the Dow Jones network, this section of AllThingsD includes Must-Reads From Other Websites — pieces we’ve read, discussions we’ve followed, stuff we like. Six posts from external sites are included here each weekday, but we only run the headlines. We link to the original sites for the rest. These posts are explicitly labeled, so it’s clear that the content comes from other websites, and for clarity’s sake, all outside posts run against a pink background.
We also solicit original full-length posts and accept some unsolicited submissions.
AllThingsD by Writer
AllThingsD.com is a Web site devoted to news, analysis and opinion on technology, the Internet and media. But it is different from other sites in this space. It is a fusion of different media styles, different topics, different formats and different sources. Read more »
|
{
"pile_set_name": "Pile-CC"
}
|
Da Boom Crew
Da Boom Crew is a Canadian/American children's television animated series, produced by Berliner Film Company in association with Jambalaya Studios in Los Angeles, California. The series was co-created by Bruce W. Smith, also the co-creator of Disney Channel's The Proud Family.
The series premiered on Kids' WB in September 2004. Unusual for an animated series, it was cancelled after only four episodes aired due to low ratings and negative viewer reception.
In the United Kingdom, all 13 episodes were broadcast on Cartoon Network UK in 2005.
A press release by Animation Magazine claimed a second season had been in production, though nothing else was ever said about it actually going into production or being animated.
Plot
After four young foster children create a video game about heroes attempting to defeat space alien terrorists in various planets, suddenly a portal appears and transports them into a dimension that is really similar to their game. This show also details their adventures in this parallel world as they embark on a quest to find their missing game cartridges and conquer the sadistic extraterrestrial emperor Zorch before he takes control of this galaxy.
Characters
Justin - The leader and general of the crew who wears elbow pads. His weapons are two laser pistols and an arm slingshot.
Nate - The gang's spaceship aviator, Justin's younger brother, and his right-hand man. The shortest and youngest in the group, he has short brown hair and wears a light blue top and blue jeans. He refers to himself as 'big daddy Nate' and has a fear of heights. His arsenal is a laser sword given to him as a reward by the yo-diggians for helping save commander Blurp.
Jubei - A hoverboard rider. He's Justin's friend who wears a visor cap armed with a laser shotgun, and is an accurate sharp shooter. However, when he misses a shot, he calls it the "kiki popo". He is apparently of Chinese descent.
Ricki - A whiz kid gadget creator, making her the gang's genius. She's a blonde girl who wears a red track jacket with matching jogging pants, grey hiking boots, a blue wristband on her left wrist, and has ginger hair up positioned in 2 pigtails. She is an expert with anything mechanical, uses a vast scientific knowledge when describing things, armed with a metal staff, has aquaphobia, and a crush on her superior Justin.
Dent - An automated robot which has been given to Ricki as a gift after she helped save commander Blurp. He resembles a flat screen computer with a hollow, metal, cylindrical body, has two robotic arms and moves around on a small set of wheels. He does not talk, but shows above-average human intelligence and uses a series of beeps to communicate. A digital face portraying his mood is shown on the screen.
"Great Commander" Blurp - Former War Commander of Yo-diggity in the war against Zorch. He declares himself a heroic commander, but is usually reversed.
Zorch - He wishes to conquer the galaxy by gathering the Boom Cards. This character was voiced by Morris Day.
Headlock - Cohort of Zorch. He wears a dome on his head because it is abnormally small. His assistant's name is Gerone.
Hetra - Headlock's evil older sister. She and Commander Blurp were trained by the same mentor.
Episodes
References
External links
Category:Kids' WB original programs
Category:2000s American animated television series
Category:2000s American black cartoons
Category:2004 American television series debuts
Category:2005 American television series endings
Category:2000s Canadian animated television series
Category:2000s Canadian black cartoons
Category:2004 Canadian television series debuts
Category:2005 Canadian television series endings
Category:American children's animated action television series
Category:Canadian children's animated action television series
Category:Television series by Hyperion Pictures
Category:Animated television series about children
|
{
"pile_set_name": "Wikipedia (en)"
}
|
1. Technical Field
The present invention relates in general to terminating choke, kill, and auxiliary lines for riser strings on an offshore drilling rig and, in particular, to an improved system, method, and apparatus for a line termination system that is radially-movable relative to the riser string.
2. Description of the Related Art
Offshore drilling rigs must compensate for many environmental hazards including tidal conditions, ocean swells, and weather conditions such as wind and severe weather. The forces generated by these hazards cause significant motion of the rig that must be compensated to maintain the continuity of the riser string that extends down from the rig and is fixed to the ocean floor. A slip joint is typically used near an upper end of the riser string to compensate for vertical motion of the rig. The slip joint compensates for motion with inner and outer barrels that move axially relative to each other. The various choke, kill, and auxiliary lines associated with riser strings also must be configured to compensate for motion. These lines are typically terminated adjacent the slip joint with a device such as a Karrot Top or KT ring assembly.
A conventional KT ring assembly 11 is shown in FIG. 1 and comprises a ring adapter 13 that is mounted to the outer barrel 15 of the slip joint 17. The ring adapter 13 lands on a shoulder 19 inside a large, solid ring body 21, which completely circumscribes the ring adapter 13 and slip joint 17. The ring body 21 includes numerous terminal blocks 23 for terminating the choke, kill, and auxiliary lines. The ring body 21 also typically incorporates a fluid bearing 25 and a tension ring 27 for supporting the overall assembly.
Although conventional KT rings provide numerous advantages they also have a few limitations. For example, because the ring body is solid, the entire riser string must be run through the KT ring assembly during construction of the riser string. The large size of the ring body makes it somewhat cumbersome to manipulate, and it consumes significant space between the floors of drilling rig. In addition, the ring body must first be secured to the bottom of the diverter housing. Thus, although conventional KT rings are workable, an improved design would be desirable.
|
{
"pile_set_name": "USPTO Backgrounds"
}
|
Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value.
Examples:
[2,3,4] , the median is 3
[2,3], the median is (2 + 3) / 2 = 2.5
Design a data structure that supports the following two operations:
void addNum(int num) - Add a integer number from the data stream to the data structure.
double findMedian() - Return the median of all elements so far.
For example:
add(1)
add(2)
findMedian() -> 1.5
add(3)
findMedian() -> 2
Credits:
Special thanks to @Louis1992 for adding this problem and creating all test cases.
Hide Company Tags Google
Show Tags
|
{
"pile_set_name": "Github"
}
|
package com.google.sitebricks;
import java.io.File;
public class FileTemplateSource implements TemplateSource {
private File templateFile;
public FileTemplateSource(File templateFile) {
this.templateFile = templateFile;
}
@Override
public String getLocation() {
return templateFile.getAbsolutePath();
}
}
|
{
"pile_set_name": "Github"
}
|
Yelkan Tedeyev
Yelkan Tedeyev (29 December 1938 – 3 October 1984) was a Soviet wrestler. He competed in the men's freestyle 63 kg at the 1968 Summer Olympics.
References
Category:1938 births
Category:1984 deaths
Category:Soviet male sport wrestlers
Category:Olympic wrestlers of the Soviet Union
Category:Wrestlers at the 1968 Summer Olympics
|
{
"pile_set_name": "Wikipedia (en)"
}
|
TSN released their annual Trade Bait List ahead of the March 1st deadline and three Jets players cracked the top 15. To no
one’s surprise, pending unrestricted free agent goaltender Ondrej Pavelec comes
in at number nine along with pending unrestricted winger Drew Stafford showing up at 15. Not
only are those two likely candidates to be moved, some will argue they both should be moved, if there are any takers. A somewhat surprising inclusion
on the list and extra surprising in his placement is Mathieu Perreault, who
shows up at number four.
But should it be surprising?
Back in July, the Jets signed Perreault to a four-year extension at an average annual value of $4.125 million. “Mathieu has found his place, found his home,” said Jets coach Paul
Maurice at the time. “He’s played the best hockey of his career here. He’s
excited he fits and he’s become a really versatile player for us on the wings
and at center ice. I think style of game too – when fans come and watch, and
the players on the bench really appreciate his tenacity. For not a big guy, he
plays with a big heart. We’re really fortunate, really pleased that he picked
us again.” His numbers had dipped last year, with only 9 goals in 71 games after have
scored 18 in each of the previous two seasons. And now his production seems to
have slipped even further, posting just four goals and nine assists in 33 games
this season.
Advertisement - Continue Reading Below
With the supposed forward depth that
the Jets have amongst their youngsters, perhaps now is the time to move
Perreault. There are many moving parts in all of this, but removing Perreault
from the equation might give the Jets some room to maneuver as the expansion draft approaches.
Perreault has all day to tie the game. Rough start for the Petry-Beaulieu pairing. pic.twitter.com/c6ZgYq7v6r — Marc Dumont (@MarcPDumont) January 12, 2017
Now, there’s no doubt that ‘Matty P’ has value on the roster, even when he’s
not producing at the highest levels, but in the current ‘draft and develop’
climate, Nic Petan is wasting away on the fourth line alongside Andrew Copp and Chris Thorburn. Looking onward, Petan could slide in nicely in Perreault’s role. Alike Perreault, Petan can play both wing or center and Petan has also
shown a lot of promise on the half wall of the power play.
When on his game, Mathieu Perreault is a very likeable player. He’s versatile, energetic, and not
afraid to speak his mind (see his comments from earlier in the season on Jacob Trouba’s holdout). His drop in production as of late can be traced back to the hit
he took from Daniel Carcillo of the Blackhawks in January of 2015 (a hit for
which Carcillo was suspended 6 games). Since that point, his production has been on the decline.
Advertisement - Continue Reading Below
TSN’s ‘Trade Bait’ lists aren’t put together in a vacuum; Mathieu
Perreault doesn’t show up at number four based on a hunch. It’s safe
to assume that these guys have some sort of insider information, perhaps that
the Jets are shopping him or perhaps other teams are making inquiries. Whatever the case is, with Petan needing ice
time to develop, the Jets needing to make expansion draft decisions, and
Perreault looking at a raise and a decline in production along with his increased propensity for injury, maybe now is the time
to let him go. If there was a way for the Jets to get some young defensive
talent in return, Perreault may be a good piece to move.
|
{
"pile_set_name": "OpenWebText2"
}
|
Article content
A Saskatoon construction company has been fined $70,000 after an employee was injured when a scissor lift overturned.
Wright Construction Western Inc. pleaded guilty on Aug. 22 in Saskatoon provincial court to one count under the Occupational Health and Safety regulations for failing to ensure safe working conditions.
We apologize, but this video has failed to load.
tap here to see other videos from our team. Try refreshing your browser, or Wright Construction Western Inc. fined after employee injured Back to video
The employee sustained a serious hip injury on Jan. 30, 2017, “after the scissor lift the worker was unloading from a flatbed trailer drove off the ramp and overturned,” according to a Saskatchewan government news release.
The company was fined $50,000 plus a surcharge of $20,000.
|
{
"pile_set_name": "OpenWebText2"
}
|
For Many, ‘Superstorm’ Sandy Could Take Toll on Mental Health
November 1, 2012 | By Health Editor
By Steven ReinbergHealthDay Reporter
THURSDAY, Nov. 1 (HealthDay News) — Some of the numbers are staggering: more than 75 Americans dead, thousands evacuated from their homes, millions left without power for days and billions of dollars in damage from “superstorm” Sandy.
Psychologists say the effect of all this sudden, violent loss on people’s psyches will be powerful.
Not only those who suffered the loss of a loved one or a beloved home, but also people who just watched the constant storm coverage may be scared and unsettled, experts say.
“Sandy, like all natural disasters, is considered a criterion ‘A1′ stressor in the diagnoses of Acute Stress Disorder in the first month after the event and Post-Traumatic Stress Disorder (PTSD), at least a month after the event,” said Simon Rego, director, of psychology training at Montefiore Medical Center/Albert Einstein College of Medicine in New York City.
“I’d expect many people to display symptoms of Acute Stress Disorder even if they did not directly experience effects of Sandy,” he added. That’s particularly true for people who had a loved one in danger or even just watched it on television, he said.
“This includes symptoms of anxiety, such as irritability, insomnia, restlessness, and dissociation such as feeling numb or detached from others, or feeling as if in a daze,” Rego said.
In addition, “re-experiencing” symptoms, such as flashbacks and intrusive images, might occur for some who were closest to the destruction. Others may display symptoms of avoidance — trying to avoid thinking or talking about the hurricane and avoiding certain people or places that remind them of the events.
Still, many of these effects are transient. “Fortunately, people are quite resilient and for many of these people, the symptoms will begin to abate on their own over time, as long as they have a healthy support system that enables them to talk about what happened and how they feel about it and do their best to return to as close to as normal routine as they can manage, under the circumstances,” Rego said.
Sara Rivero-Conil, a child psychologist at Children’s Hospital of Miami, also stressed that “events such as Sandy can be traumatic for children.”
For youngsters directly affected by the storm, reassurance from parents is crucial, she said. “Tell them they needn’t worry, there is a plan in place and these events don’t happen every day,” Rivero-Conil said.
Children are also very sensitive to their parents’ behavior, she added, and if parent is anxious or depressed kids will feel that tension and become anxious, too, she said.
“Parents are their children’s heroes,” she said, so it is important that parents try to keep a positive attitude and reassure their children.
Even for children who didn’t experience the storm directly, seeing images on the TV can be disturbing. “Parents shouldn’t let their children watch TV coverage of the storm,” she said. Moms and dads should also stress that events such as Sandy are rare, and not every storm should be a source of fear.
|
{
"pile_set_name": "Pile-CC"
}
|
# ADVSDK
ADVSDK是一款针对PaddlePaddle框架定制的轻量级SDK。目前支持学术届和工业界公认的基线测试算法,并且支持输出$L_0$、$L_2$和$L_(inf)$并可视化。
## 支持算法
- PGD
- FGSM
## 使用教程
全部教程使用jupter编写,方便使用和阅读。
- [攻击AlexNet](sdk_demo_alexnet.ipynb)
- [攻击ResNet](sdk_demo.ipynb)
## 模型文件地址
https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/image_classification
wget http://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_pretrained.tar
tar -xvf ResNet50_pretrained.tar
[更多模型](https://github.com/PaddlePaddle/models/tree/develop/PaddleCV)
## 初始化环境
pip install opencv-python
pip install paddlepaddle==1.5
|
{
"pile_set_name": "Github"
}
|
More information: Awesome realistic tattoo work of Wade and Lebron from Miami Heat, done by great realistic tattoo artist Steve Butcher from Auckland, New Zealand
DETAILS: photo Uploaded 2 years ago © Photos are copyrighted by artist and their owners.
Be always creative, be inspired, but never copied tattoos.
|
{
"pile_set_name": "OpenWebText2"
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.