text
stringlengths
8
5.77M
// Copyright (c) 2019 IoTeX Foundation // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the code is disclaimed. This source code is governed by Apache // License 2.0 that can be found in the LICENSE file. package action import ( "fmt" "math/big" "github.com/spf13/cobra" "github.com/iotexproject/iotex-core/ioctl/cmd/alias" "github.com/iotexproject/iotex-core/ioctl/config" "github.com/iotexproject/iotex-core/ioctl/output" ) // Multi-language support var ( xrc20AllowanceCmdUses = map[config.Language]string{ config.English: "allowance [-s SIGNER] (ALIAS|SPENDER_ADDRESS) -c ALIAS|CONTRACT_ADDRESS ", config.Chinese: "allowance [-s 签署人] (ALIAS|支出者地址) -c 别名|合约地址 ", } xrc20AllowanceCmdShorts = map[config.Language]string{ config.English: "the amount which spender is still allowed to withdraw from owner", config.Chinese: "仍然允许支出者从所有者中提取的金额", } ) // xrc20AllowanceCmd represents your signer limited amount on target address var xrc20AllowanceCmd = &cobra.Command{ Use: config.TranslateInLang(xrc20AllowanceCmdUses, config.UILanguage), Short: config.TranslateInLang(xrc20AllowanceCmdShorts, config.UILanguage), Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true err := allowance(args[0]) return output.PrintError(err) }, } func allowance(arg string) error { caller, err := Signer() if err != nil { return output.NewError(output.AddressError, "failed to get signer address", err) } owner, err := alias.EtherAddress(caller) if err != nil { return output.NewError(output.AddressError, "failed to get owner address", err) } spender, err := alias.EtherAddress(arg) if err != nil { return output.NewError(output.AddressError, "failed to get spender address", err) } contract, err := xrc20Contract() if err != nil { return output.NewError(output.AddressError, "failed to get contract address", err) } bytecode, err := xrc20ABI.Pack("allowance", owner, spender) if err != nil { return output.NewError(output.ConvertError, "cannot generate bytecode from given command", err) } result, err := Read(contract, big.NewInt(0), bytecode) if err != nil { return output.NewError(0, "failed to read contract", err) } decimal, _ := new(big.Int).SetString(result, 16) message := amountMessage{RawData: result, Decimal: decimal.String()} fmt.Println(message.String()) return err }
STUDENTS Middle School (Grades 6-8) Sunday Our desire is to see students experience authentic community through Life Groups. On Sunday mornings students gather at tables by grade and gender. They are taught core biblical truths through engaging and relevant instruction and led in small groups to process these truths so that they might live them out in their daily lives. Wednesday Students begin by building community with friends through hanging out and playing in our Family Life Center Gym and then move into The Loft for a time of worship and teaching. Our goal is to create an environment where students can connect with God and other students. High School (Grades 9-12) Sunday Serve | 9:30 & 11:00 AM We encourage our students to attend one hour of worship with their families on Sunday mornings and serve during the other hour. We have continental breakfast for all students serving in The Edge from 8:45-9:05 AM each week. For any students not serving or who happen to be off for a certain week, we have a devotional and breakout time in The Edge during the 9:30 AM worship hour. Life Groups Our desire is to see students experience authentic community through Life Groups. Groups meet in area host homes on Sunday evenings for Bible study, dinner and fellowship. For info or to sign up for a Life Group, click here.
1. Technical Field The present invention relates generally to digital image collections, and more particularly to identifying popular landmarks in large digital image collections. 2. Background Art With the increased use of digital images, increased digital storage capacity, and interconnectivity offered by digital media such as the Internet, ever larger corpora of digital images are accessible to an increasing number of people. Persons having a range of interests, from various locations spread throughout the world, take photographs of various subjects and make those photographs available for others to view, for instance, on the Internet. For example, digital photographs of various landmarks and tourist sites from across the world may be posted on the web by persons with different levels of skill in taking photographs. Such photographs may show the same landmark from different perspectives, under different conditions, and/or from different distances. The vast number of such images available can be useful as an indicator of, or guide to, popular landmarks. To leverage information contained in these large corpora of digital images, it is necessary that the corpora be organized. For example, at digital image web sites such as Picasa Web Albums (from Google Inc., Mountain View, Calif.), starting at a high level menu, one may drill down to a detailed listing of subjects for which photographs are available. Alternatively, one may be able to search one or more sites that have digital photographs. Some tourist information websites, for example, have downloaded images of landmarks associated with published lists of popular tourist sites. Most conventional digital photograph organizing systems rely on users to tag photographs. As numerous new photographs are added to these digital image collections, it may not be feasible for users to manually label the photographs in a complete and consistent manner that will increase the usefulness of those digital image collections. A system that can automatically extract information such as the most popular tourist destinations) from these large collections is described in U.S. patent application Ser. No. 12/119,359 titled “Automatic Discovery of Popular Landmarks,” also assigned to Google. Inc., California. The system described in application Ser. No. 12/119,359 uses a processing pipeline comprising a clustering stage based on geo-coding, and a clustering stage based on matching visual features of the images. What is needed, however, are other approaches to automatically discover landmarks and annotate images containing landmarks.
Best of ND 2015: What Could Have Been with Nintendo Land Poor Nintendo Land. It may have sold moderately well and was something of a high-quality party game, but it set never set Wii U on fire as did Wii Sports for Wii. While intended to show off what the GamePad could do, asymmetric gameplay just didn’t provide the hook motion controls did. But we can’t pin all of the Wii U’s problems on one title; indeed, Nintendo’s lack of success in communicating the Wii U GamePad’s appeal to audiences has been well-documented, not the least of which are clumsy E3 presentations and brand confusion. If anything, I perceive Nintendo Land as being Wii U’s unsung ideal. Confusing as it may be to the non-gaming masses, the game’s overall execution of integrating GamePad features into its host of games was fantastic. That Nintendo Land could stand on its own as a single-player venture despite being a minigame collection is to be commended; whereas the appeal of Wii Sports ran dry for me fast, the insane challenge of the gyro-operated Donkey Kong’s Crash Course and the touch-controlled Balloon Trip Breeze solo affairs always had me coming back for more. Of course, Mario Chase, Animal Crossing: Sweet Days, and Luigi’s Ghost Mansion remain the star attractions at Nintendo Land gaming parties, and for good reason. All three had players pitted against whoever controlled the GamePad, leading to hilariously innovative multiplayer sessions. Be it controlling two utensil-wielding guard dogs at once or stalking hapless Luigi Miis as a ghost, each led to new levels of teamwork and strategy unlike anything seen before. Animal Crossing: Sweet Days is probably my personal favorite for bringing my childhood Animal Crossing conspiracy theories to life (law enforcement carrying giant utensils of death? Hmm…), but my family’s fondness for the source material certainly propelled its local popularity. Perhaps I could fault Nintendo Land for its lack of online, as Nintendo’s irritating policy of putting local multiplayer first even reached its hands here. Indeed, I know several gamers who dropped interest in the launch title upon learning this sad fact. Their loss, I say, because the game’s hefty amount of unlockables and achievements always kept pushing me to achieve 100 percent completion. Indeed, Nintendo Land was constructed not as a mere tech demo, but a polished, full-fledged launch title. A game that could potentially not only pave the way for a revolutionary control experience, but to once again bring together family and friends, gamers and non-gamers all, into the living room as they played and watched at awe at the wonders of the special controller… And we never got that. The failure to prove the GamePad’s worth in Nintendo’s HD library is one of the top Wii U criticisms, and as much as I’ve enjoyed its offerings, that failure is key to why I feel Wii U is the most disappointing Nintendo console yet. While obviously not every game should’ve been retooled to match the GamePad, Captain Toad: Treasure Tracker and Kirby and the Rainbow Curse are the closest they’ve ever gotten to actually utilizing it. Good as they were, isn’t it more than a little troubling that budget titles that arrived two years after launch are the best effort Nintendo’s made? If anything, it only proves the GamePad is far too nebulous of a product to expand upon. In that sense, the GamePad amounts to little more than a big paper weight. And maybe that’s for the best. Remember how sick many gamers got of motion control by the time Microsoft and Sony hopped on the bandwagon? For all we know, the pervasive advent of asymmetrical gameplay and expensive screen-equipped controllers could’ve been met with the same scorn. I imagine the latter would’ve rustled gamers’ jimmies, and certainly even more so if, like the Wii U GamePad, they weren’t available at retail. …and yet whenever I return to Nintendo Land, I can’t help but dream. Despite the controller’s bumbling introduction, here’s a game that was on fire with it from the get-go, only to be drenched with droughts and same ol’, same ol’ soon afterward. And what a shame that is, when it delighted into reimagining Nintendo’s franchises all for the sake of a new control scheme. But what if that flame kept going? As unlikely as it would’ve been for Nintendo to catch lightning in a bottle twice, I can’t help but ask, “What if?” Had it not been for confusing presentations and console names, could Nintendo Land have carried Wii U into success? Perhaps not to the extent where the company would have accordingly shifted gears in their Mario and Donkey Kong projects, and definitely not to the stratospheric heights of the Wii, and certainly not in a way that’d win every gamer’s heart (or their wallet), but simply to the point where the system was relevant in the living room? Could it have captured that same Wii Sports magic? What if…what if…what if…. As of this writing, we know nothing of what will come from the NX. Maybe there’ll be another wacky control scheme, or maybe it’ll just return to the standard. All I’m asking is that whatever Nintendo does, keep the torch going. Much as I love showing off Nintendo Land to friends, it’s sobering to realize the groundwork it laid was never built upon.
3D Enantiomorphic Mg-Based Metal-Organic Frameworks as Chemical Sensor of Nitrobenzene and Efficient Catalyst for CO2 Cycloaddition. Two enantiomorphic MgII -based metal-organic frameworks, {MgL(H2 O)2 }n (1-D and 1-L) (where H2 L=2,2'-bipyridyl-4,4'-dicarboxylic acid) have been synthesized by solvothermal reaction without any chiral auxiliary. The single-crystal X-ray measurement and the structural analysis indicate that both 1-D and 1-L possess 2-fold interpenetrated frameworks with different left- and right-handed helical chains simultaneously, which serve as chiral source, thus transmitting chirality over the whole frameworks. The fluorescence measurements reveal that they exhibit a strong quenching response to nitrobenzene and could be potentially used as a chemical sensor. Owing to the accessible Lewis acidic sites in channels, they display high catalytic efficiency for cycloaddition reaction of CO2 with epoxides and could be reused five times without losing activity.
. 0.000024 What is -19306.05 rounded to the nearest one thousand? -19000 Round -656.171 to the nearest one thousand. -1000 Round -0.0000002075539 to 7 decimal places. -0.0000002 Round -128318.9 to the nearest ten. -128320 What is -6.5129 rounded to zero dps? -7 What is 0.001031234 rounded to 4 dps? 0.001 What is -0.02169705 rounded to 5 decimal places? -0.0217 What is -1123333 rounded to the nearest ten thousand? -1120000 Round 0.00354699 to four dps. 0.0035 Round 6.387157 to zero decimal places. 6 What is -0.000000417848 rounded to 7 decimal places? -0.0000004 What is 13.2518 rounded to zero dps? 13 What is -68296.404 rounded to the nearest ten? -68300 What is 17519220 rounded to the nearest 100000? 17500000 Round 0.0005861808 to four dps. 0.0006 What is 0.00418931 rounded to 4 dps? 0.0042 What is -2070675.8 rounded to the nearest ten thousand? -2070000 What is 0.00011569056 rounded to five decimal places? 0.00012 What is -0.0794292 rounded to 3 decimal places? -0.079 What is 810.526 rounded to the nearest 100? 800 Round 1.383438 to 2 decimal places. 1.38 What is 6779.26 rounded to the nearest one hundred? 6800 What is 3547110 rounded to the nearest 1000000? 4000000 What is 6.3452 rounded to two dps? 6.35 What is 0.007102676 rounded to 5 decimal places? 0.0071 Round 26448.7 to the nearest 100. 26400 What is -0.269341 rounded to two dps? -0.27 What is -0.05703108 rounded to four dps? -0.057 What is -0.003217181 rounded to two decimal places? 0 Round 0.02748057 to 3 dps. 0.027 What is 2.894163 rounded to three dps? 2.894 What is 0.000000603682 rounded to seven dps? 0.0000006 What is -2505.3 rounded to the nearest 100? -2500 Round 46.6269 to the nearest ten. 50 What is 1080.91538 rounded to the nearest integer? 1081 What is 57091480 rounded to the nearest 100000? 57100000 Round -10398.595 to the nearest 1000. -10000 What is 29444.48 rounded to the nearest one hundred? 29400 Round 527861460 to the nearest 100000. 527900000 Round 0.000226926 to six decimal places. 0.000227 What is -0.0074832374 rounded to three decimal places? -0.007 Round 77.0316 to 1 decimal place. 77 What is -60626 rounded to the nearest one thousand? -61000 Round -64721300 to the nearest 1000000. -65000000 What is -56376600 rounded to the nearest one million? -56000000 What is -0.2431909 rounded to 4 decimal places? -0.2432 Round 12.816074 to 1 decimal place. 12.8 What is -2.7922221 rounded to 1 decimal place? -2.8 Round -929379 to the nearest 100000. -900000 What is -5.691246 rounded to 1 decimal place? -5.7 Round 151745.3 to the nearest one thousand. 152000 Round 771670 to the nearest ten thousand. 770000 What is 217.799 rounded to the nearest integer? 218 What is -0.00100464 rounded to 3 decimal places? -0.001 What is 20.59491 rounded to two dps? 20.59 What is -0.000845529 rounded to six decimal places? -0.000846 What is -0.00011913964 rounded to five dps? -0.00012 What is -48373.3 rounded to the nearest 10000? -50000 Round -72634860 to the nearest one hundred thousand. -72600000 Round 0.01053843 to four dps. 0.0105 What is -0.573553 rounded to 2 decimal places? -0.57 Round 31.254826 to the nearest integer. 31 Round 191.09218 to the nearest integer. 191 Round 0.0000632515 to five dps. 0.00006 What is 1052757.2 rounded to the nearest 10000? 1050000 What is -1958376.9 rounded to the nearest one thousand? -1958000 Round 0.4955732 to three decimal places. 0.496 What is 0.059725 rounded to 4 decimal places? 0.0597 What is 899167500 rounded to the nearest one million? 899000000 Round -0.90254 to one dp. -0.9 What is -15592.77 rounded to the nearest one thousand? -16000 What is -87930.47 rounded to the nearest 1000? -88000 Round -1791119000 to the nearest 1000000. -1791000000 What is 3326.4 rounded to the nearest ten thousand? 0 What is -0.01171648 rounded to 5 decimal places? -0.01172 What is -0.00000630477 rounded to seven dps? -0.0000063 Round 123534.45 to the nearest 1000. 124000 Round 0.15061 to two dps. 0.15 What is 0.04204946 rounded to three dps? 0.042 What is -657708 rounded to the nearest 100000? -700000 What is -1.808263 rounded to 3 dps? -1.808 Round 509.75 to the nearest one thousand. 1000 What is 119935.3 rounded to the nearest 100? 119900 What is -917.033 rounded to the nearest ten? -920 Round 18902300 to the nearest ten thousand. 18900000 What is -0.000004301314 rounded to 7 decimal places? -0.0000043 What is 3712280000 rounded to the nearest 1000000? 3712000000 Round 0.00026950202 to 5 decimal places. 0.00027 Round -0.091941 to three decimal places. -0.092 Round -47375700 to the nearest 1000000. -47000000 Round 2179.065 to the nearest ten. 2180 Round 152.59961 to 0 decimal places. 153 Round -275.2 to the nearest ten. -280 Round -174.416 to the nearest ten. -170 Round -0.009616507 to 6 dps. -0.009617 What is 93805600 rounded to the nearest one hundred thousand? 93800000 What is 0.75891633 rounded to 3 dps? 0.759 Round 13765040 to the nearest 100000. 13800000 Round -664.717 to the nearest integer. -665 Round 85.4334 to zero decimal places. 85 Round 16962300 to the nearest 1000000. 17000000 What is -167866 rounded to the nearest one hundred thousand? -200000 What is 24295350 rounded to the nearest 10000? 24300000 What is -686166 rounded to the nearest 100000? -700000 Round -22.020016 to one dp. -22 Round 5689.49 to zero dps. 5689 What is 642252 rounded to the nearest one thousand? 642000 Round -0.00731728 to five dps. -0.00732 Round -0.0001765772 to 5 decimal places. -0.00018 What is 0.420498 rounded to 3 dps? 0.42 Round -265147.8 to the nearest ten thousand. -270000 Round -16.65736 to 1 dp. -16.7 What is 1676.603 rounded to the nearest 100? 1700 Round 74.706 to the nearest ten. 70 What is 0.0216197 rounded to four dps? 0.0216 What is -115.9109 rounded to the nearest integer? -116 What is -8.223067 rounded to the nearest integer? -8 What is -0.0000014026655 rounded to 7 decimal places? -0.0000014 Round -0.002096012 to five decimal places. -0.0021 What is 0.01916611 rounded to 5 decimal places? 0.01917 What is 0.0000748285 rounded to 7 decimal places? 0.0000748 Round 91250 to the nearest one hundred thousand. 100000 Round -1914.494 to the nearest ten. -1910 Round 163.141 to the nearest 10. 160 What is 0.007095758 rounded to five dps? 0.0071 Round -1067335.7 to the nearest one hundred thousand. -1100000 Round 3145962 to the nearest ten thousand. 3150000 What is 310.043 rounded to the nearest integer? 310 What is 0.001773156 rounded to four decimal places? 0.0018 What is -32.82886 rounded to 1 decimal place? -32.8 Round -2488.942 to the nearest one hundred. -2500 Round -0.000968139 to 6 dps. -0.000968 Round 1.72302 to 2 decimal places. 1.72 What is 0.0004088796 rounded to 7 dps? 0.0004089 What is -11.2668 rounded to two dps? -11.27 Round 0.140937 to 2 dps. 0.14 What is -0.00001450373 rounded to six dps? -0.000015 What is 0.000011341184 rounded to 6 decimal places? 0.000011 What is -48.594663 rounded to 1 decimal place? -48.6 What is 1545.515 rounded to the nearest 10? 1550 What is -0.00011950151 rounded to six decimal places? -0.00012 What is -0.000032789992 rounded to 6 decimal places? -0.000033 What is -25.99967 rounded to one dp? -26 Round 86.7098 to 1 decimal place. 86.7 Round -0.0902696 to three dps. -0.09 Round 383942.4 to the nearest 1000000. 0 Round 0.15345498 to 3 decimal places. 0.153 What is -7.1905 rounded to 1 dp? -7.2 What is 1736570 rounded to the nearest 10000? 1740000 What is -0.009414127 rounded to 3 dps? -0.009 What is 0.0647541 rounded to 2 dps? 0.06 What is 0.0003053769 rounded to six decimal places? 0.000305 Round -0.0004838656 to six decimal places. -0.000484 What is 10713.53 rounded to the nearest one hundred? 10700 Round -15042.1 to the nearest 100. -15000 What is 0.0007574 rounded to 3 decimal places? 0.001 Round -119.526 to the nearest integer. -120 Round -10599510 to the nearest one hundred thousand. -10600000 What is -119301.64 rounded to the nearest ten thousand? -120000 What is -2468670000 rounded to the nearest 1000000? -2469000000 What is -0.000000146482 rounded to 7 decimal places? -0.0000001 Round 74.6253 to 0 decimal places. 75 Round -0.010571629 to four dps. -0.0106 Round -39.8417 to the nearest integer. -40 What is -0.000000762
import copy import logging import warnings from ruamel.yaml import YAML from great_expectations.data_context.util import ( instantiate_class_from_config, load_class, verify_dynamic_loading_support, ) from great_expectations.exceptions import ClassInstantiationError from great_expectations.types import ClassConfig logger = logging.getLogger(__name__) yaml = YAML() yaml.default_flow_style = False class Datasource: """ A Datasource connects to a compute environment and one or more storage environments and produces batches of data that Great Expectations can validate in that compute environment. Each Datasource provides Batches connected to a specific compute environment, such as a SQL database, a Spark cluster, or a local in-memory Pandas DataFrame. Datasources use Batch Kwargs to specify instructions for how to access data from relevant sources such as an existing object from a DAG runner, a SQL database, S3 bucket, or local filesystem. To bridge the gap between those worlds, Datasources interact closely with *generators* which are aware of a source of data and can produce produce identifying information, called "batch_kwargs" that datasources can use to get individual batches of data. They add flexibility in how to obtain data such as with time-based partitioning, downsampling, or other techniques appropriate for the datasource. For example, a batch kwargs generator could produce a SQL query that logically represents "rows in the Events table with a timestamp on February 7, 2012," which a SqlAlchemyDatasource could use to materialize a SqlAlchemyDataset corresponding to that batch of data and ready for validation. Since opinionated DAG managers such as airflow, dbt, prefect.io, dagster can also act as datasources and/or batch kwargs generators for a more generic datasource. When adding custom expectations by subclassing an existing DataAsset type, use the data_asset_type parameter to configure the datasource to load and return DataAssets of the custom type. --ge-feature-maturity-info-- id: datasource_s3 title: Datasource - S3 icon: short_description: S3 description: Support for connecting to Amazon Web Services S3 as an external datasource. how_to_guide_url: https://docs.greatexpectations.io/en/latest/how_to_guides/configuring_datasources/how_to_configure_a_pandas_s3_datasource.html maturity: Production maturity_details: api_stability: medium implementation_completeness: Complete unit_test_coverage:: Complete integration_infrastructure_test_coverage: None documentation_completeness: Minimal/Spotty bug_risk: Low id: datasource_filesystem title: Datasource - Filesystem icon: short_description: File-based datsource description: Support for using a mounted filesystem as an external datasource. how_to_guide_url: https://docs.greatexpectations.io/en/latest/how_to_guides/configuring_datasources/how_to_configure_a_pandas_filesystem_datasource.html maturity: Production maturity_details: api_stability: Medium implementation_completeness: Complete unit_test_coverage: Complete integration_infrastructure_test_coverage: Partial documentation_completeness: Partial bug_risk: Low (Moderate for Windows users because of path issues) id: datasource_gcs title: Datasource - GCS icon: short_description: GCS description: Support for Google Cloud Storage as an external datasource how_to_guide_url: maturity: Experimental maturity_details: api_stability: Medium (supported via native ‘gs://' syntax in Pandas and Pyspark; medium because we expect configuration to evolve) implementation_completeness: Medium (works via passthrough, not via CLI) unit_test_coverage: Minimal integration_infrastructure_test_coverage: Minimal documentation_completeness: Minimal bug_risk: Moderate id: datasource_azure_blob_storage title: Datasource - Azure Blob Storage icon: short_description: Azure Blob Storage description: Support for Microsoft Azure Blob Storage as an external datasource how_to_guide_url: maturity: In Roadmap (Sub-Experimental - "Not Impossible") maturity_details: api_stability: N/A (Supported on Databricks Spark via ‘wasb://' / ‘wasps://' url; requires local download first for Pandas) implementation_completeness: Minimal unit_test_coverage: N/A integration_infrastructure_test_coverage: N/A documentation_completeness: Minimal bug_risk: Unknown --ge-feature-maturity-info-- """ recognized_batch_parameters = {"limit"} @classmethod def from_configuration(cls, **kwargs): """ Build a new datasource from a configuration dictionary. Args: **kwargs: configuration key-value pairs Returns: datasource (Datasource): the newly-created datasource """ return cls(**kwargs) @classmethod def build_configuration( cls, class_name, module_name="great_expectations.datasource", data_asset_type=None, batch_kwargs_generators=None, **kwargs ): """ Build a full configuration object for a datasource, potentially including batch kwargs generators with defaults. Args: class_name: The name of the class for which to build the config module_name: The name of the module in which the datasource class is located data_asset_type: A ClassConfig dictionary batch_kwargs_generators: BatchKwargGenerators configuration dictionary **kwargs: Additional kwargs to be part of the datasource constructor's initialization Returns: A complete datasource configuration. """ verify_dynamic_loading_support(module_name=module_name) class_ = load_class(class_name=class_name, module_name=module_name) configuration = class_.build_configuration( data_asset_type=data_asset_type, batch_kwargs_generators=batch_kwargs_generators, **kwargs ) return configuration def __init__( self, name, data_context=None, data_asset_type=None, batch_kwargs_generators=None, **kwargs ): """ Build a new datasource. Args: name: the name for the datasource data_context: data context to which to connect data_asset_type (ClassConfig): the type of DataAsset to produce batch_kwargs_generators: BatchKwargGenerators to add to the datasource """ self._data_context = data_context self._name = name if isinstance(data_asset_type, str): warnings.warn( "String-only configuration for data_asset_type is deprecated. Use module_name and class_name instead.", DeprecationWarning, ) self._data_asset_type = data_asset_type self._datasource_config = kwargs self._batch_kwargs_generators = {} self._datasource_config["data_asset_type"] = data_asset_type if batch_kwargs_generators is not None: self._datasource_config["batch_kwargs_generators"] = batch_kwargs_generators @property def name(self): """ Property for datasource name """ return self._name @property def config(self): return copy.deepcopy(self._datasource_config) @property def data_context(self): """ Property for attached DataContext """ return self._data_context def _build_generators(self): """ Build batch kwargs generator objects from the datasource configuration. Returns: None """ try: for generator in self._datasource_config["batch_kwargs_generators"].keys(): self.get_batch_kwargs_generator(generator) except KeyError: pass def add_batch_kwargs_generator(self, name, class_name, **kwargs): """Add a BatchKwargGenerator to the datasource. Args: name (str): the name of the new BatchKwargGenerator to add class_name: class of the BatchKwargGenerator to add kwargs: additional keyword arguments will be passed directly to the new BatchKwargGenerator's constructor Returns: BatchKwargGenerator (BatchKwargGenerator) """ kwargs["class_name"] = class_name generator = self._build_batch_kwargs_generator(**kwargs) if "batch_kwargs_generators" not in self._datasource_config: self._datasource_config["batch_kwargs_generators"] = dict() self._datasource_config["batch_kwargs_generators"][name] = kwargs return generator def _build_batch_kwargs_generator(self, **kwargs): """Build a BatchKwargGenerator using the provided configuration and return the newly-built generator.""" generator = instantiate_class_from_config( config=kwargs, runtime_environment={"datasource": self}, config_defaults={ "module_name": "great_expectations.datasource.batch_kwargs_generator" }, ) if not generator: raise ClassInstantiationError( module_name="great_expectations.datasource.batch_kwargs_generator", package_name=None, class_name=kwargs["class_name"], ) return generator def get_batch_kwargs_generator(self, name): """Get the (named) BatchKwargGenerator from a datasource) Args: name (str): name of BatchKwargGenerator (default value is 'default') Returns: BatchKwargGenerator (BatchKwargGenerator) """ if name in self._batch_kwargs_generators: return self._batch_kwargs_generators[name] elif ( "batch_kwargs_generators" in self._datasource_config and name in self._datasource_config["batch_kwargs_generators"] ): generator_config = copy.deepcopy( self._datasource_config["batch_kwargs_generators"][name] ) else: raise ValueError( "Unable to load batch kwargs generator %s -- no configuration found or invalid configuration." % name ) generator = self._build_batch_kwargs_generator(**generator_config) self._batch_kwargs_generators[name] = generator return generator def list_batch_kwargs_generators(self): """List currently-configured BatchKwargGenerator for this datasource. Returns: List(dict): each dictionary includes "name" and "type" keys """ generators = [] if "batch_kwargs_generators" in self._datasource_config: for key, value in self._datasource_config[ "batch_kwargs_generators" ].items(): generators.append({"name": key, "class_name": value["class_name"]}) return generators def process_batch_parameters(self, limit=None, dataset_options=None): """Use datasource-specific configuration to translate any batch parameters into batch kwargs at the datasource level. Args: limit (int): a parameter all datasources must accept to allow limiting a batch to a smaller number of rows. dataset_options (dict): a set of kwargs that will be passed to the constructor of a dataset built using these batch_kwargs Returns: batch_kwargs: Result will include both parameters passed via argument and configured parameters. """ batch_kwargs = self._datasource_config.get("batch_kwargs", {}) if limit is not None: batch_kwargs["limit"] = limit if dataset_options is not None: # Then update with any locally-specified reader options if not batch_kwargs.get("dataset_options"): batch_kwargs["dataset_options"] = dict() batch_kwargs["dataset_options"].update(dataset_options) return batch_kwargs def get_batch(self, batch_kwargs, batch_parameters=None): """Get a batch of data from the datasource. Args: batch_kwargs: the BatchKwargs to use to construct the batch batch_parameters: optional parameters to store as the reference description of the batch. They should reflect parameters that would provide the passed BatchKwargs. Returns: Batch """ raise NotImplementedError def get_available_data_asset_names(self, batch_kwargs_generator_names=None): """ Returns a dictionary of data_asset_names that the specified batch kwarg generator can provide. Note that some batch kwargs generators may not be capable of describing specific named data assets, and some (such as filesystem glob batch kwargs generators) require the user to configure data asset names. Args: batch_kwargs_generator_names: the BatchKwargGenerator for which to get available data asset names. Returns: dictionary consisting of sets of generator assets available for the specified generators: :: { generator_name: { names: [ (data_asset_1, data_asset_1_type), (data_asset_2, data_asset_2_type) ... ] } ... } """ available_data_asset_names = {} if batch_kwargs_generator_names is None: batch_kwargs_generator_names = [ generator["name"] for generator in self.list_batch_kwargs_generators() ] elif isinstance(batch_kwargs_generator_names, str): batch_kwargs_generator_names = [batch_kwargs_generator_names] for generator_name in batch_kwargs_generator_names: generator = self.get_batch_kwargs_generator(generator_name) available_data_asset_names[ generator_name ] = generator.get_available_data_asset_names() return available_data_asset_names def build_batch_kwargs( self, batch_kwargs_generator, data_asset_name=None, partition_id=None, **kwargs ): if kwargs.get("name"): if data_asset_name: raise ValueError( "Cannot provide both 'name' and 'data_asset_name'. Please use 'data_asset_name' only." ) warnings.warn( "name is being deprecated as a batch_parameter. Please use data_asset_name instead.", DeprecationWarning, ) data_asset_name = kwargs.pop("name") generator_obj = self.get_batch_kwargs_generator(batch_kwargs_generator) if partition_id is not None: kwargs["partition_id"] = partition_id return generator_obj.build_batch_kwargs( data_asset_name=data_asset_name, **kwargs )
/* * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.lang.invoke; import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.util.Preconditions; import jdk.internal.vm.annotation.ForceInline; import jdk.internal.vm.annotation.Stable; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.BiFunction; import java.util.function.Function; import static java.lang.invoke.MethodHandleStatics.UNSAFE; import static java.lang.invoke.MethodHandleStatics.newInternalError; /** * A VarHandle is a dynamically strongly typed reference to a variable, or to a * parametrically-defined family of variables, including static fields, * non-static fields, array elements, or components of an off-heap data * structure. Access to such variables is supported under various * <em>access modes</em>, including plain read/write access, volatile * read/write access, and compare-and-set. * * <p>VarHandles are immutable and have no visible state. VarHandles cannot be * subclassed by the user. * * <p>A VarHandle has: * <ul> * <li>a {@link #varType variable type} T, the type of every variable referenced * by this VarHandle; and * <li>a list of {@link #coordinateTypes coordinate types} * {@code CT1, CT2, ..., CTn}, the types of <em>coordinate expressions</em> that * jointly locate a variable referenced by this VarHandle. * </ul> * Variable and coordinate types may be primitive or reference, and are * represented by {@code Class} objects. The list of coordinate types may be * empty. * * <p>Factory methods that produce or {@link java.lang.invoke.MethodHandles.Lookup * lookup} VarHandle instances document the supported variable type and the list * of coordinate types. * * <p>Each access mode is associated with one <em>access mode method</em>, a * <a href="MethodHandle.html#sigpoly">signature polymorphic</a> method named * for the access mode. When an access mode method is invoked on a VarHandle * instance, the initial arguments to the invocation are coordinate expressions * that indicate in precisely which object the variable is to be accessed. * Trailing arguments to the invocation represent values of importance to the * access mode. For example, the various compare-and-set or compare-and-exchange * access modes require two trailing arguments for the variable's expected value * and new value. * * <p>The arity and types of arguments to the invocation of an access mode * method are not checked statically. Instead, each access mode method * specifies an {@link #accessModeType(AccessMode) access mode type}, * represented as an instance of {@link MethodType}, that serves as a kind of * method signature against which the arguments are checked dynamically. An * access mode type gives formal parameter types in terms of the coordinate * types of a VarHandle instance and the types for values of importance to the * access mode. An access mode type also gives a return type, often in terms of * the variable type of a VarHandle instance. When an access mode method is * invoked on a VarHandle instance, the symbolic type descriptor at the * call site, the run time types of arguments to the invocation, and the run * time type of the return value, must <a href="#invoke">match</a> the types * given in the access mode type. A runtime exception will be thrown if the * match fails. * * For example, the access mode method {@link #compareAndSet} specifies that if * its receiver is a VarHandle instance with coordinate types * {@code CT1, ..., CTn} and variable type {@code T}, then its access mode type * is {@code (CT1 c1, ..., CTn cn, T expectedValue, T newValue)boolean}. * Suppose that a VarHandle instance can access array elements, and that its * coordinate types are {@code String[]} and {@code int} while its variable type * is {@code String}. The access mode type for {@code compareAndSet} on this * VarHandle instance would be * {@code (String[] c1, int c2, String expectedValue, String newValue)boolean}. * Such a VarHandle instance may produced by the * {@link MethodHandles#arrayElementVarHandle(Class) array factory method} and * access array elements as follows: * <pre> {@code * String[] sa = ... * VarHandle avh = MethodHandles.arrayElementVarHandle(String[].class); * boolean r = avh.compareAndSet(sa, 10, "expected", "new"); * }</pre> * * <p>Access modes control atomicity and consistency properties. * <em>Plain</em> read ({@code get}) and write ({@code set}) * accesses are guaranteed to be bitwise atomic only for references * and for primitive values of at most 32 bits, and impose no observable * ordering constraints with respect to threads other than the * executing thread. <em>Opaque</em> operations are bitwise atomic and * coherently ordered with respect to accesses to the same variable. * In addition to obeying Opaque properties, <em>Acquire</em> mode * reads and their subsequent accesses are ordered after matching * <em>Release</em> mode writes and their previous accesses. In * addition to obeying Acquire and Release properties, all * <em>Volatile</em> operations are totally ordered with respect to * each other. * * <p>Access modes are grouped into the following categories: * <ul> * <li>read access modes that get the value of a variable under specified * memory ordering effects. * The set of corresponding access mode methods belonging to this group * consists of the methods * {@link #get get}, * {@link #getVolatile getVolatile}, * {@link #getAcquire getAcquire}, * {@link #getOpaque getOpaque}. * <li>write access modes that set the value of a variable under specified * memory ordering effects. * The set of corresponding access mode methods belonging to this group * consists of the methods * {@link #set set}, * {@link #setVolatile setVolatile}, * {@link #setRelease setRelease}, * {@link #setOpaque setOpaque}. * <li>atomic update access modes that, for example, atomically compare and set * the value of a variable under specified memory ordering effects. * The set of corresponding access mode methods belonging to this group * consists of the methods * {@link #compareAndSet compareAndSet}, * {@link #weakCompareAndSetPlain weakCompareAndSetPlain}, * {@link #weakCompareAndSet weakCompareAndSet}, * {@link #weakCompareAndSetAcquire weakCompareAndSetAcquire}, * {@link #weakCompareAndSetRelease weakCompareAndSetRelease}, * {@link #compareAndExchangeAcquire compareAndExchangeAcquire}, * {@link #compareAndExchange compareAndExchange}, * {@link #compareAndExchangeRelease compareAndExchangeRelease}, * {@link #getAndSet getAndSet}, * {@link #getAndSetAcquire getAndSetAcquire}, * {@link #getAndSetRelease getAndSetRelease}. * <li>numeric atomic update access modes that, for example, atomically get and * set with addition the value of a variable under specified memory ordering * effects. * The set of corresponding access mode methods belonging to this group * consists of the methods * {@link #getAndAdd getAndAdd}, * {@link #getAndAddAcquire getAndAddAcquire}, * {@link #getAndAddRelease getAndAddRelease}, * <li>bitwise atomic update access modes that, for example, atomically get and * bitwise OR the value of a variable under specified memory ordering * effects. * The set of corresponding access mode methods belonging to this group * consists of the methods * {@link #getAndBitwiseOr getAndBitwiseOr}, * {@link #getAndBitwiseOrAcquire getAndBitwiseOrAcquire}, * {@link #getAndBitwiseOrRelease getAndBitwiseOrRelease}, * {@link #getAndBitwiseAnd getAndBitwiseAnd}, * {@link #getAndBitwiseAndAcquire getAndBitwiseAndAcquire}, * {@link #getAndBitwiseAndRelease getAndBitwiseAndRelease}, * {@link #getAndBitwiseXor getAndBitwiseXor}, * {@link #getAndBitwiseXorAcquire getAndBitwiseXorAcquire}, * {@link #getAndBitwiseXorRelease getAndBitwiseXorRelease}. * </ul> * * <p>Factory methods that produce or {@link java.lang.invoke.MethodHandles.Lookup * lookup} VarHandle instances document the set of access modes that are * supported, which may also include documenting restrictions based on the * variable type and whether a variable is read-only. If an access mode is not * supported then the corresponding access mode method will on invocation throw * an {@code UnsupportedOperationException}. Factory methods should document * any additional undeclared exceptions that may be thrown by access mode * methods. * The {@link #get get} access mode is supported for all * VarHandle instances and the corresponding method never throws * {@code UnsupportedOperationException}. * If a VarHandle references a read-only variable (for example a {@code final} * field) then write, atomic update, numeric atomic update, and bitwise atomic * update access modes are not supported and corresponding methods throw * {@code UnsupportedOperationException}. * Read/write access modes (if supported), with the exception of * {@code get} and {@code set}, provide atomic access for * reference types and all primitive types. * Unless stated otherwise in the documentation of a factory method, the access * modes {@code get} and {@code set} (if supported) provide atomic access for * reference types and all primitives types, with the exception of {@code long} * and {@code double} on 32-bit platforms. * * <p>Access modes will override any memory ordering effects specified at * the declaration site of a variable. For example, a VarHandle accessing * a field using the {@code get} access mode will access the field as * specified <em>by its access mode</em> even if that field is declared * {@code volatile}. When mixed access is performed extreme care should be * taken since the Java Memory Model may permit surprising results. * * <p>In addition to supporting access to variables under various access modes, * a set of static methods, referred to as memory fence methods, is also * provided for fine-grained control of memory ordering. * * The Java Language Specification permits other threads to observe operations * as if they were executed in orders different than are apparent in program * source code, subject to constraints arising, for example, from the use of * locks, {@code volatile} fields or VarHandles. The static methods, * {@link #fullFence fullFence}, {@link #acquireFence acquireFence}, * {@link #releaseFence releaseFence}, {@link #loadLoadFence loadLoadFence} and * {@link #storeStoreFence storeStoreFence}, can also be used to impose * constraints. Their specifications, as is the case for certain access modes, * are phrased in terms of the lack of "reorderings" -- observable ordering * effects that might otherwise occur if the fence was not present. More * precise phrasing of the specification of access mode methods and memory fence * methods may accompany future updates of the Java Language Specification. * * <h1>Compiling invocation of access mode methods</h1> * A Java method call expression naming an access mode method can invoke a * VarHandle from Java source code. From the viewpoint of source code, these * methods can take any arguments and their polymorphic result (if expressed) * can be cast to any return type. Formally this is accomplished by giving the * access mode methods variable arity {@code Object} arguments and * {@code Object} return types (if the return type is polymorphic), but they * have an additional quality called <em>signature polymorphism</em> which * connects this freedom of invocation directly to the JVM execution stack. * <p> * As is usual with virtual methods, source-level calls to access mode methods * compile to an {@code invokevirtual} instruction. More unusually, the * compiler must record the actual argument types, and may not perform method * invocation conversions on the arguments. Instead, it must generate * instructions to push them on the stack according to their own unconverted * types. The VarHandle object itself will be pushed on the stack before the * arguments. The compiler then generates an {@code invokevirtual} instruction * that invokes the access mode method with a symbolic type descriptor which * describes the argument and return types. * <p> * To issue a complete symbolic type descriptor, the compiler must also * determine the return type (if polymorphic). This is based on a cast on the * method invocation expression, if there is one, or else {@code Object} if the * invocation is an expression, or else {@code void} if the invocation is a * statement. The cast may be to a primitive type (but not {@code void}). * <p> * As a corner case, an uncasted {@code null} argument is given a symbolic type * descriptor of {@code java.lang.Void}. The ambiguity with the type * {@code Void} is harmless, since there are no references of type {@code Void} * except the null reference. * * * <h1><a id="invoke">Performing invocation of access mode methods</a></h1> * The first time an {@code invokevirtual} instruction is executed it is linked * by symbolically resolving the names in the instruction and verifying that * the method call is statically legal. This also holds for calls to access mode * methods. In this case, the symbolic type descriptor emitted by the compiler * is checked for correct syntax, and names it contains are resolved. Thus, an * {@code invokevirtual} instruction which invokes an access mode method will * always link, as long as the symbolic type descriptor is syntactically * well-formed and the types exist. * <p> * When the {@code invokevirtual} is executed after linking, the receiving * VarHandle's access mode type is first checked by the JVM to ensure that it * matches the symbolic type descriptor. If the type * match fails, it means that the access mode method which the caller is * invoking is not present on the individual VarHandle being invoked. * * <p> * Invocation of an access mode method behaves as if an invocation of * {@link MethodHandle#invoke}, where the receiving method handle accepts the * VarHandle instance as the leading argument. More specifically, the * following, where {@code {access-mode}} corresponds to the access mode method * name: * <pre> {@code * VarHandle vh = .. * R r = (R) vh.{access-mode}(p1, p2, ..., pN); * }</pre> * behaves as if: * <pre> {@code * VarHandle vh = .. * VarHandle.AccessMode am = VarHandle.AccessMode.valueFromMethodName("{access-mode}"); * MethodHandle mh = MethodHandles.varHandleExactInvoker( * am, * vh.accessModeType(am)); * * R r = (R) mh.invoke(vh, p1, p2, ..., pN) * }</pre> * (modulo access mode methods do not declare throwing of {@code Throwable}). * This is equivalent to: * <pre> {@code * MethodHandle mh = MethodHandles.lookup().findVirtual( * VarHandle.class, * "{access-mode}", * MethodType.methodType(R, p1, p2, ..., pN)); * * R r = (R) mh.invokeExact(vh, p1, p2, ..., pN) * }</pre> * where the desired method type is the symbolic type descriptor and a * {@link MethodHandle#invokeExact} is performed, since before invocation of the * target, the handle will apply reference casts as necessary and box, unbox, or * widen primitive values, as if by {@link MethodHandle#asType asType} (see also * {@link MethodHandles#varHandleInvoker}). * * More concisely, such behaviour is equivalent to: * <pre> {@code * VarHandle vh = .. * VarHandle.AccessMode am = VarHandle.AccessMode.valueFromMethodName("{access-mode}"); * MethodHandle mh = vh.toMethodHandle(am); * * R r = (R) mh.invoke(p1, p2, ..., pN) * }</pre> * Where, in this case, the method handle is bound to the VarHandle instance. * * * <h1>Invocation checking</h1> * In typical programs, VarHandle access mode type matching will usually * succeed. But if a match fails, the JVM will throw a * {@link WrongMethodTypeException}. * <p> * Thus, an access mode type mismatch which might show up as a linkage error * in a statically typed program can show up as a dynamic * {@code WrongMethodTypeException} in a program which uses VarHandles. * <p> * Because access mode types contain "live" {@code Class} objects, method type * matching takes into account both type names and class loaders. * Thus, even if a VarHandle {@code VH} is created in one class loader * {@code L1} and used in another {@code L2}, VarHandle access mode method * calls are type-safe, because the caller's symbolic type descriptor, as * resolved in {@code L2}, is matched against the original callee method's * symbolic type descriptor, as resolved in {@code L1}. The resolution in * {@code L1} happens when {@code VH} is created and its access mode types are * assigned, while the resolution in {@code L2} happens when the * {@code invokevirtual} instruction is linked. * <p> * Apart from type descriptor checks, a VarHandles's capability to * access it's variables is unrestricted. * If a VarHandle is formed on a non-public variable by a class that has access * to that variable, the resulting VarHandle can be used in any place by any * caller who receives a reference to it. * <p> * Unlike with the Core Reflection API, where access is checked every time a * reflective method is invoked, VarHandle access checking is performed * <a href="MethodHandles.Lookup.html#access">when the VarHandle is * created</a>. * Thus, VarHandles to non-public variables, or to variables in non-public * classes, should generally be kept secret. They should not be passed to * untrusted code unless their use from the untrusted code would be harmless. * * * <h1>VarHandle creation</h1> * Java code can create a VarHandle that directly accesses any field that is * accessible to that code. This is done via a reflective, capability-based * API called {@link java.lang.invoke.MethodHandles.Lookup * MethodHandles.Lookup}. * For example, a VarHandle for a non-static field can be obtained * from {@link java.lang.invoke.MethodHandles.Lookup#findVarHandle * Lookup.findVarHandle}. * There is also a conversion method from Core Reflection API objects, * {@link java.lang.invoke.MethodHandles.Lookup#unreflectVarHandle * Lookup.unreflectVarHandle}. * <p> * Access to protected field members is restricted to receivers only of the * accessing class, or one of its subclasses, and the accessing class must in * turn be a subclass (or package sibling) of the protected member's defining * class. If a VarHandle refers to a protected non-static field of a declaring * class outside the current package, the receiver argument will be narrowed to * the type of the accessing class. * * <h1>Interoperation between VarHandles and the Core Reflection API</h1> * Using factory methods in the {@link java.lang.invoke.MethodHandles.Lookup * Lookup} API, any field represented by a Core Reflection API object * can be converted to a behaviorally equivalent VarHandle. * For example, a reflective {@link java.lang.reflect.Field Field} can * be converted to a VarHandle using * {@link java.lang.invoke.MethodHandles.Lookup#unreflectVarHandle * Lookup.unreflectVarHandle}. * The resulting VarHandles generally provide more direct and efficient * access to the underlying fields. * <p> * As a special case, when the Core Reflection API is used to view the * signature polymorphic access mode methods in this class, they appear as * ordinary non-polymorphic methods. Their reflective appearance, as viewed by * {@link java.lang.Class#getDeclaredMethod Class.getDeclaredMethod}, * is unaffected by their special status in this API. * For example, {@link java.lang.reflect.Method#getModifiers * Method.getModifiers} * will report exactly those modifier bits required for any similarly * declared method, including in this case {@code native} and {@code varargs} * bits. * <p> * As with any reflected method, these methods (when reflected) may be invoked * directly via {@link java.lang.reflect.Method#invoke java.lang.reflect.Method.invoke}, * via JNI, or indirectly via * {@link java.lang.invoke.MethodHandles.Lookup#unreflect Lookup.unreflect}. * However, such reflective calls do not result in access mode method * invocations. Such a call, if passed the required argument (a single one, of * type {@code Object[]}), will ignore the argument and will throw an * {@code UnsupportedOperationException}. * <p> * Since {@code invokevirtual} instructions can natively invoke VarHandle * access mode methods under any symbolic type descriptor, this reflective view * conflicts with the normal presentation of these methods via bytecodes. * Thus, these native methods, when reflectively viewed by * {@code Class.getDeclaredMethod}, may be regarded as placeholders only. * <p> * In order to obtain an invoker method for a particular access mode type, * use {@link java.lang.invoke.MethodHandles#varHandleExactInvoker} or * {@link java.lang.invoke.MethodHandles#varHandleInvoker}. The * {@link java.lang.invoke.MethodHandles.Lookup#findVirtual Lookup.findVirtual} * API is also able to return a method handle to call an access mode method for * any specified access mode type and is equivalent in behaviour to * {@link java.lang.invoke.MethodHandles#varHandleInvoker}. * * <h1>Interoperation between VarHandles and Java generics</h1> * A VarHandle can be obtained for a variable, such as a field, which is * declared with Java generic types. As with the Core Reflection API, the * VarHandle's variable type will be constructed from the erasure of the * source-level type. When a VarHandle access mode method is invoked, the * types * of its arguments or the return value cast type may be generic types or type * instances. If this occurs, the compiler will replace those types by their * erasures when it constructs the symbolic type descriptor for the * {@code invokevirtual} instruction. * * @see MethodHandle * @see MethodHandles * @see MethodType * @since 9 */ public abstract class VarHandle { final VarForm vform; VarHandle(VarForm vform) { this.vform = vform; } RuntimeException unsupported() { return new UnsupportedOperationException(); } // Plain accessors /** * Returns the value of a variable, with memory semantics of reading as * if the variable was declared non-{@code volatile}. Commonly referred to * as plain read access. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}. * * <p>The symbolic type descriptor at the call site of {@code get} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET)} on this VarHandle. * * <p>This access mode is supported by all VarHandle instances and never * throws {@code UnsupportedOperationException}. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn)} * , statically represented using varargs. * @return the signature-polymorphic result that is the value of the * variable * , statically represented using {@code Object}. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object get(Object... args); /** * Sets the value of a variable to the {@code newValue}, with memory * semantics of setting as if the variable was declared non-{@code volatile} * and non-{@code final}. Commonly referred to as plain write access. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void} * * <p>The symbolic type descriptor at the call site of {@code set} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.SET)} on this VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate void set(Object... args); // Volatile accessors /** * Returns the value of a variable, with memory semantics of reading as if * the variable was declared {@code volatile}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}. * * <p>The symbolic type descriptor at the call site of {@code getVolatile} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_VOLATILE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn)} * , statically represented using varargs. * @return the signature-polymorphic result that is the value of the * variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getVolatile(Object... args); /** * Sets the value of a variable to the {@code newValue}, with memory * semantics of setting as if the variable was declared {@code volatile}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void}. * * <p>The symbolic type descriptor at the call site of {@code setVolatile} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.SET_VOLATILE)} on this * VarHandle. * * @apiNote * Ignoring the many semantic differences from C and C++, this method has * memory ordering effects compatible with {@code memory_order_seq_cst}. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate void setVolatile(Object... args); /** * Returns the value of a variable, accessed in program order, but with no * assurance of memory ordering effects with respect to other threads. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}. * * <p>The symbolic type descriptor at the call site of {@code getOpaque} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_OPAQUE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn)} * , statically represented using varargs. * @return the signature-polymorphic result that is the value of the * variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getOpaque(Object... args); /** * Sets the value of a variable to the {@code newValue}, in program order, * but with no assurance of memory ordering effects with respect to other * threads. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void}. * * <p>The symbolic type descriptor at the call site of {@code setOpaque} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.SET_OPAQUE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate void setOpaque(Object... args); // Lazy accessors /** * Returns the value of a variable, and ensures that subsequent loads and * stores are not reordered before this access. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}. * * <p>The symbolic type descriptor at the call site of {@code getAcquire} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_ACQUIRE)} on this * VarHandle. * * @apiNote * Ignoring the many semantic differences from C and C++, this method has * memory ordering effects compatible with {@code memory_order_acquire} * ordering. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn)} * , statically represented using varargs. * @return the signature-polymorphic result that is the value of the * variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAcquire(Object... args); /** * Sets the value of a variable to the {@code newValue}, and ensures that * prior loads and stores are not reordered after this access. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void}. * * <p>The symbolic type descriptor at the call site of {@code setRelease} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.SET_RELEASE)} on this * VarHandle. * * @apiNote * Ignoring the many semantic differences from C and C++, this method has * memory ordering effects compatible with {@code memory_order_release} * ordering. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate void setRelease(Object... args); // Compare and set accessors /** * Atomically sets the value of a variable to the {@code newValue} with the * memory semantics of {@link #setVolatile} if the variable's current value, * referred to as the <em>witness value</em>, {@code ==} the * {@code expectedValue}, as accessed with the memory semantics of * {@link #getVolatile}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}. * * <p>The symbolic type descriptor at the call site of {@code * compareAndSet} must match the access mode type that is the result of * calling {@code accessModeType(VarHandle.AccessMode.COMPARE_AND_SET)} on * this VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return {@code true} if successful, otherwise {@code false} if the * witness value was not the same as the {@code expectedValue}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate boolean compareAndSet(Object... args); /** * Atomically sets the value of a variable to the {@code newValue} with the * memory semantics of {@link #setVolatile} if the variable's current value, * referred to as the <em>witness value</em>, {@code ==} the * {@code expectedValue}, as accessed with the memory semantics of * {@link #getVolatile}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)T}. * * <p>The symbolic type descriptor at the call site of {@code * compareAndExchange} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.COMPARE_AND_EXCHANGE)} * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the witness value, which * will be the same as the {@code expectedValue} if successful * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type is not * compatible with the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type is compatible with the * caller's symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object compareAndExchange(Object... args); /** * Atomically sets the value of a variable to the {@code newValue} with the * memory semantics of {@link #set} if the variable's current value, * referred to as the <em>witness value</em>, {@code ==} the * {@code expectedValue}, as accessed with the memory semantics of * {@link #getAcquire}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)T}. * * <p>The symbolic type descriptor at the call site of {@code * compareAndExchangeAcquire} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE)} on * this VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the witness value, which * will be the same as the {@code expectedValue} if successful * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #getAcquire(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object compareAndExchangeAcquire(Object... args); /** * Atomically sets the value of a variable to the {@code newValue} with the * memory semantics of {@link #setRelease} if the variable's current value, * referred to as the <em>witness value</em>, {@code ==} the * {@code expectedValue}, as accessed with the memory semantics of * {@link #get}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)T}. * * <p>The symbolic type descriptor at the call site of {@code * compareAndExchangeRelease} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE)} * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the witness value, which * will be the same as the {@code expectedValue} if successful * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setRelease(Object...) * @see #get(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object compareAndExchangeRelease(Object... args); // Weak (spurious failures allowed) /** * Possibly atomically sets the value of a variable to the {@code newValue} * with the semantics of {@link #set} if the variable's current value, * referred to as the <em>witness value</em>, {@code ==} the * {@code expectedValue}, as accessed with the memory semantics of * {@link #get}. * * <p>This operation may fail spuriously (typically, due to memory * contention) even if the witness value does match the expected value. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}. * * <p>The symbolic type descriptor at the call site of {@code * weakCompareAndSetPlain} must match the access mode type that is the result of * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN)} * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return {@code true} if successful, otherwise {@code false} if the * witness value was not the same as the {@code expectedValue} or if this * operation spuriously failed. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #get(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate boolean weakCompareAndSetPlain(Object... args); /** * Possibly atomically sets the value of a variable to the {@code newValue} * with the memory semantics of {@link #setVolatile} if the variable's * current value, referred to as the <em>witness value</em>, {@code ==} the * {@code expectedValue}, as accessed with the memory semantics of * {@link #getVolatile}. * * <p>This operation may fail spuriously (typically, due to memory * contention) even if the witness value does match the expected value. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}. * * <p>The symbolic type descriptor at the call site of {@code * weakCompareAndSet} must match the access mode type that is the * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)} * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return {@code true} if successful, otherwise {@code false} if the * witness value was not the same as the {@code expectedValue} or if this * operation spuriously failed. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate boolean weakCompareAndSet(Object... args); /** * Possibly atomically sets the value of a variable to the {@code newValue} * with the semantics of {@link #set} if the variable's current value, * referred to as the <em>witness value</em>, {@code ==} the * {@code expectedValue}, as accessed with the memory semantics of * {@link #getAcquire}. * * <p>This operation may fail spuriously (typically, due to memory * contention) even if the witness value does match the expected value. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}. * * <p>The symbolic type descriptor at the call site of {@code * weakCompareAndSetAcquire} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE)} * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return {@code true} if successful, otherwise {@code false} if the * witness value was not the same as the {@code expectedValue} or if this * operation spuriously failed. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #getAcquire(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate boolean weakCompareAndSetAcquire(Object... args); /** * Possibly atomically sets the value of a variable to the {@code newValue} * with the semantics of {@link #setRelease} if the variable's current * value, referred to as the <em>witness value</em>, {@code ==} the * {@code expectedValue}, as accessed with the memory semantics of * {@link #get}. * * <p>This operation may fail spuriously (typically, due to memory * contention) even if the witness value does match the expected value. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}. * * <p>The symbolic type descriptor at the call site of {@code * weakCompareAndSetRelease} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE)} * on this VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)} * , statically represented using varargs. * @return {@code true} if successful, otherwise {@code false} if the * witness value was not the same as the {@code expectedValue} or if this * operation spuriously failed. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setRelease(Object...) * @see #get(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate boolean weakCompareAndSetRelease(Object... args); /** * Atomically sets the value of a variable to the {@code newValue} with the * memory semantics of {@link #setVolatile} and returns the variable's * previous value, as accessed with the memory semantics of * {@link #getVolatile}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndSet} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndSet(Object... args); /** * Atomically sets the value of a variable to the {@code newValue} with the * memory semantics of {@link #set} and returns the variable's * previous value, as accessed with the memory semantics of * {@link #getAcquire}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndSetAcquire} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET_ACQUIRE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndSetAcquire(Object... args); /** * Atomically sets the value of a variable to the {@code newValue} with the * memory semantics of {@link #setRelease} and returns the variable's * previous value, as accessed with the memory semantics of * {@link #get}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndSetRelease} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET_RELEASE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T newValue)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndSetRelease(Object... args); // Primitive adders // Throw UnsupportedOperationException for refs /** * Atomically adds the {@code value} to the current value of a variable with * the memory semantics of {@link #setVolatile}, and returns the variable's * previous value, as accessed with the memory semantics of * {@link #getVolatile}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T value)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndAdd} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T value)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndAdd(Object... args); /** * Atomically adds the {@code value} to the current value of a variable with * the memory semantics of {@link #set}, and returns the variable's * previous value, as accessed with the memory semantics of * {@link #getAcquire}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T value)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndAddAcquire} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T value)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndAddAcquire(Object... args); /** * Atomically adds the {@code value} to the current value of a variable with * the memory semantics of {@link #setRelease}, and returns the variable's * previous value, as accessed with the memory semantics of * {@link #get}. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T value)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndAddRelease} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD_RELEASE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T value)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndAddRelease(Object... args); // Bitwise operations // Throw UnsupportedOperationException for refs /** * Atomically sets the value of a variable to the result of * bitwise OR between the variable's current value and the {@code mask} * with the memory semantics of {@link #setVolatile} and returns the * variable's previous value, as accessed with the memory semantics of * {@link #getVolatile}. * * <p>If the variable type is the non-integral {@code boolean} type then a * logical OR is performed instead of a bitwise OR. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOr} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndBitwiseOr(Object... args); /** * Atomically sets the value of a variable to the result of * bitwise OR between the variable's current value and the {@code mask} * with the memory semantics of {@link #set} and returns the * variable's previous value, as accessed with the memory semantics of * {@link #getAcquire}. * * <p>If the variable type is the non-integral {@code boolean} type then a * logical OR is performed instead of a bitwise OR. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrAcquire} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #getAcquire(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndBitwiseOrAcquire(Object... args); /** * Atomically sets the value of a variable to the result of * bitwise OR between the variable's current value and the {@code mask} * with the memory semantics of {@link #setRelease} and returns the * variable's previous value, as accessed with the memory semantics of * {@link #get}. * * <p>If the variable type is the non-integral {@code boolean} type then a * logical OR is performed instead of a bitwise OR. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrRelease} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setRelease(Object...) * @see #get(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndBitwiseOrRelease(Object... args); /** * Atomically sets the value of a variable to the result of * bitwise AND between the variable's current value and the {@code mask} * with the memory semantics of {@link #setVolatile} and returns the * variable's previous value, as accessed with the memory semantics of * {@link #getVolatile}. * * <p>If the variable type is the non-integral {@code boolean} type then a * logical AND is performed instead of a bitwise AND. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAnd} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndBitwiseAnd(Object... args); /** * Atomically sets the value of a variable to the result of * bitwise AND between the variable's current value and the {@code mask} * with the memory semantics of {@link #set} and returns the * variable's previous value, as accessed with the memory semantics of * {@link #getAcquire}. * * <p>If the variable type is the non-integral {@code boolean} type then a * logical AND is performed instead of a bitwise AND. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndAcquire} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #getAcquire(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndBitwiseAndAcquire(Object... args); /** * Atomically sets the value of a variable to the result of * bitwise AND between the variable's current value and the {@code mask} * with the memory semantics of {@link #setRelease} and returns the * variable's previous value, as accessed with the memory semantics of * {@link #get}. * * <p>If the variable type is the non-integral {@code boolean} type then a * logical AND is performed instead of a bitwise AND. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndRelease} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setRelease(Object...) * @see #get(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndBitwiseAndRelease(Object... args); /** * Atomically sets the value of a variable to the result of * bitwise XOR between the variable's current value and the {@code mask} * with the memory semantics of {@link #setVolatile} and returns the * variable's previous value, as accessed with the memory semantics of * {@link #getVolatile}. * * <p>If the variable type is the non-integral {@code boolean} type then a * logical XOR is performed instead of a bitwise XOR. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXor} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setVolatile(Object...) * @see #getVolatile(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndBitwiseXor(Object... args); /** * Atomically sets the value of a variable to the result of * bitwise XOR between the variable's current value and the {@code mask} * with the memory semantics of {@link #set} and returns the * variable's previous value, as accessed with the memory semantics of * {@link #getAcquire}. * * <p>If the variable type is the non-integral {@code boolean} type then a * logical XOR is performed instead of a bitwise XOR. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorAcquire} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #set(Object...) * @see #getAcquire(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndBitwiseXorAcquire(Object... args); /** * Atomically sets the value of a variable to the result of * bitwise XOR between the variable's current value and the {@code mask} * with the memory semantics of {@link #setRelease} and returns the * variable's previous value, as accessed with the memory semantics of * {@link #get}. * * <p>If the variable type is the non-integral {@code boolean} type then a * logical XOR is performed instead of a bitwise XOR. * * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}. * * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorRelease} * must match the access mode type that is the result of calling * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE)} on this * VarHandle. * * @param args the signature-polymorphic parameter list of the form * {@code (CT1 ct1, ..., CTn ctn, T mask)} * , statically represented using varargs. * @return the signature-polymorphic result that is the previous value of * the variable * , statically represented using {@code Object}. * @throws UnsupportedOperationException if the access mode is unsupported * for this VarHandle. * @throws WrongMethodTypeException if the access mode type does not * match the caller's symbolic type descriptor. * @throws ClassCastException if the access mode type matches the caller's * symbolic type descriptor, but a reference cast fails. * @see #setRelease(Object...) * @see #get(Object...) */ public final native @MethodHandle.PolymorphicSignature @HotSpotIntrinsicCandidate Object getAndBitwiseXorRelease(Object... args); enum AccessType { GET(Object.class), SET(void.class), COMPARE_AND_SET(boolean.class), COMPARE_AND_EXCHANGE(Object.class), GET_AND_UPDATE(Object.class); final Class<?> returnType; final boolean isMonomorphicInReturnType; AccessType(Class<?> returnType) { this.returnType = returnType; isMonomorphicInReturnType = returnType != Object.class; } MethodType accessModeType(Class<?> receiver, Class<?> value, Class<?>... intermediate) { Class<?>[] ps; int i; switch (this) { case GET: ps = allocateParameters(0, receiver, intermediate); fillParameters(ps, receiver, intermediate); return MethodType.methodType(value, ps); case SET: ps = allocateParameters(1, receiver, intermediate); i = fillParameters(ps, receiver, intermediate); ps[i] = value; return MethodType.methodType(void.class, ps); case COMPARE_AND_SET: ps = allocateParameters(2, receiver, intermediate); i = fillParameters(ps, receiver, intermediate); ps[i++] = value; ps[i] = value; return MethodType.methodType(boolean.class, ps); case COMPARE_AND_EXCHANGE: ps = allocateParameters(2, receiver, intermediate); i = fillParameters(ps, receiver, intermediate); ps[i++] = value; ps[i] = value; return MethodType.methodType(value, ps); case GET_AND_UPDATE: ps = allocateParameters(1, receiver, intermediate); i = fillParameters(ps, receiver, intermediate); ps[i] = value; return MethodType.methodType(value, ps); default: throw new InternalError("Unknown AccessType"); } } private static Class<?>[] allocateParameters(int values, Class<?> receiver, Class<?>... intermediate) { int size = ((receiver != null) ? 1 : 0) + intermediate.length + values; return new Class<?>[size]; } private static int fillParameters(Class<?>[] ps, Class<?> receiver, Class<?>... intermediate) { int i = 0; if (receiver != null) ps[i++] = receiver; for (int j = 0; j < intermediate.length; j++) ps[i++] = intermediate[j]; return i; } } /** * The set of access modes that specify how a variable, referenced by a * VarHandle, is accessed. */ public enum AccessMode { /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#get VarHandle.get} */ GET("get", AccessType.GET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#set VarHandle.set} */ SET("set", AccessType.SET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getVolatile VarHandle.getVolatile} */ GET_VOLATILE("getVolatile", AccessType.GET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#setVolatile VarHandle.setVolatile} */ SET_VOLATILE("setVolatile", AccessType.SET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAcquire VarHandle.getAcquire} */ GET_ACQUIRE("getAcquire", AccessType.GET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#setRelease VarHandle.setRelease} */ SET_RELEASE("setRelease", AccessType.SET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getOpaque VarHandle.getOpaque} */ GET_OPAQUE("getOpaque", AccessType.GET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#setOpaque VarHandle.setOpaque} */ SET_OPAQUE("setOpaque", AccessType.SET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#compareAndSet VarHandle.compareAndSet} */ COMPARE_AND_SET("compareAndSet", AccessType.COMPARE_AND_SET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#compareAndExchange VarHandle.compareAndExchange} */ COMPARE_AND_EXCHANGE("compareAndExchange", AccessType.COMPARE_AND_EXCHANGE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#compareAndExchangeAcquire VarHandle.compareAndExchangeAcquire} */ COMPARE_AND_EXCHANGE_ACQUIRE("compareAndExchangeAcquire", AccessType.COMPARE_AND_EXCHANGE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#compareAndExchangeRelease VarHandle.compareAndExchangeRelease} */ COMPARE_AND_EXCHANGE_RELEASE("compareAndExchangeRelease", AccessType.COMPARE_AND_EXCHANGE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#weakCompareAndSetPlain VarHandle.weakCompareAndSetPlain} */ WEAK_COMPARE_AND_SET_PLAIN("weakCompareAndSetPlain", AccessType.COMPARE_AND_SET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#weakCompareAndSet VarHandle.weakCompareAndSet} */ WEAK_COMPARE_AND_SET("weakCompareAndSet", AccessType.COMPARE_AND_SET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#weakCompareAndSetAcquire VarHandle.weakCompareAndSetAcquire} */ WEAK_COMPARE_AND_SET_ACQUIRE("weakCompareAndSetAcquire", AccessType.COMPARE_AND_SET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#weakCompareAndSetRelease VarHandle.weakCompareAndSetRelease} */ WEAK_COMPARE_AND_SET_RELEASE("weakCompareAndSetRelease", AccessType.COMPARE_AND_SET), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndSet VarHandle.getAndSet} */ GET_AND_SET("getAndSet", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndSetAcquire VarHandle.getAndSetAcquire} */ GET_AND_SET_ACQUIRE("getAndSetAcquire", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndSetRelease VarHandle.getAndSetRelease} */ GET_AND_SET_RELEASE("getAndSetRelease", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndAdd VarHandle.getAndAdd} */ GET_AND_ADD("getAndAdd", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndAddAcquire VarHandle.getAndAddAcquire} */ GET_AND_ADD_ACQUIRE("getAndAddAcquire", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndAddRelease VarHandle.getAndAddRelease} */ GET_AND_ADD_RELEASE("getAndAddRelease", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndBitwiseOr VarHandle.getAndBitwiseOr} */ GET_AND_BITWISE_OR("getAndBitwiseOr", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndBitwiseOrRelease VarHandle.getAndBitwiseOrRelease} */ GET_AND_BITWISE_OR_RELEASE("getAndBitwiseOrRelease", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndBitwiseOrAcquire VarHandle.getAndBitwiseOrAcquire} */ GET_AND_BITWISE_OR_ACQUIRE("getAndBitwiseOrAcquire", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndBitwiseAnd VarHandle.getAndBitwiseAnd} */ GET_AND_BITWISE_AND("getAndBitwiseAnd", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndBitwiseAndRelease VarHandle.getAndBitwiseAndRelease} */ GET_AND_BITWISE_AND_RELEASE("getAndBitwiseAndRelease", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndBitwiseAndAcquire VarHandle.getAndBitwiseAndAcquire} */ GET_AND_BITWISE_AND_ACQUIRE("getAndBitwiseAndAcquire", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndBitwiseXor VarHandle.getAndBitwiseXor} */ GET_AND_BITWISE_XOR("getAndBitwiseXor", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndBitwiseXorRelease VarHandle.getAndBitwiseXorRelease} */ GET_AND_BITWISE_XOR_RELEASE("getAndBitwiseXorRelease", AccessType.GET_AND_UPDATE), /** * The access mode whose access is specified by the corresponding * method * {@link VarHandle#getAndBitwiseXorAcquire VarHandle.getAndBitwiseXorAcquire} */ GET_AND_BITWISE_XOR_ACQUIRE("getAndBitwiseXorAcquire", AccessType.GET_AND_UPDATE), ; static final Map<String, AccessMode> methodNameToAccessMode; static { AccessMode[] values = AccessMode.values(); // Initial capacity of # values divided by the load factor is sufficient // to avoid resizes for the smallest table size (64) int initialCapacity = (int)(values.length / 0.75f) + 1; methodNameToAccessMode = new HashMap<>(initialCapacity); for (AccessMode am : values) { methodNameToAccessMode.put(am.methodName, am); } } final String methodName; final AccessType at; AccessMode(final String methodName, AccessType at) { this.methodName = methodName; this.at = at; } /** * Returns the {@code VarHandle} signature-polymorphic method name * associated with this {@code AccessMode} value. * * @return the signature-polymorphic method name * @see #valueFromMethodName */ public String methodName() { return methodName; } /** * Returns the {@code AccessMode} value associated with the specified * {@code VarHandle} signature-polymorphic method name. * * @param methodName the signature-polymorphic method name * @return the {@code AccessMode} value * @throws IllegalArgumentException if there is no {@code AccessMode} * value associated with method name (indicating the method * name does not correspond to a {@code VarHandle} * signature-polymorphic method name). * @see #methodName() */ public static AccessMode valueFromMethodName(String methodName) { AccessMode am = methodNameToAccessMode.get(methodName); if (am != null) return am; throw new IllegalArgumentException("No AccessMode value for method name " + methodName); } @ForceInline static MemberName getMemberName(int ordinal, VarForm vform) { return vform.memberName_table[ordinal]; } } static final class AccessDescriptor { final MethodType symbolicMethodTypeErased; final MethodType symbolicMethodTypeInvoker; final Class<?> returnType; final int type; final int mode; public AccessDescriptor(MethodType symbolicMethodType, int type, int mode) { this.symbolicMethodTypeErased = symbolicMethodType.erase(); this.symbolicMethodTypeInvoker = symbolicMethodType.insertParameterTypes(0, VarHandle.class); this.returnType = symbolicMethodType.returnType(); this.type = type; this.mode = mode; } } /** * Returns the variable type of variables referenced by this VarHandle. * * @return the variable type of variables referenced by this VarHandle */ public final Class<?> varType() { MethodType typeSet = accessModeType(AccessMode.SET); return typeSet.parameterType(typeSet.parameterCount() - 1); } /** * Returns the coordinate types for this VarHandle. * * @return the coordinate types for this VarHandle. The returned * list is unmodifiable */ public final List<Class<?>> coordinateTypes() { MethodType typeGet = accessModeType(AccessMode.GET); return typeGet.parameterList(); } /** * Obtains the access mode type for this VarHandle and a given access mode. * * <p>The access mode type's parameter types will consist of a prefix that * is the coordinate types of this VarHandle followed by further * types as defined by the access mode method. * The access mode type's return type is defined by the return type of the * access mode method. * * @param accessMode the access mode, corresponding to the * signature-polymorphic method of the same name * @return the access mode type for the given access mode */ public final MethodType accessModeType(AccessMode accessMode) { TypesAndInvokers tis = getTypesAndInvokers(); MethodType mt = tis.methodType_table[accessMode.at.ordinal()]; if (mt == null) { mt = tis.methodType_table[accessMode.at.ordinal()] = accessModeTypeUncached(accessMode); } return mt; } abstract MethodType accessModeTypeUncached(AccessMode accessMode); /** * Returns {@code true} if the given access mode is supported, otherwise * {@code false}. * * <p>The return of a {@code false} value for a given access mode indicates * that an {@code UnsupportedOperationException} is thrown on invocation * of the corresponding access mode method. * * @param accessMode the access mode, corresponding to the * signature-polymorphic method of the same name * @return {@code true} if the given access mode is supported, otherwise * {@code false}. */ public final boolean isAccessModeSupported(AccessMode accessMode) { return AccessMode.getMemberName(accessMode.ordinal(), vform) != null; } /** * Obtains a method handle bound to this VarHandle and the given access * mode. * * @apiNote This method, for a VarHandle {@code vh} and access mode * {@code {access-mode}}, returns a method handle that is equivalent to * method handle {@code bmh} in the following code (though it may be more * efficient): * <pre>{@code * MethodHandle mh = MethodHandles.varHandleExactInvoker( * vh.accessModeType(VarHandle.AccessMode.{access-mode})); * * MethodHandle bmh = mh.bindTo(vh); * }</pre> * * @param accessMode the access mode, corresponding to the * signature-polymorphic method of the same name * @return a method handle bound to this VarHandle and the given access mode */ public final MethodHandle toMethodHandle(AccessMode accessMode) { MemberName mn = AccessMode.getMemberName(accessMode.ordinal(), vform); if (mn != null) { MethodHandle mh = getMethodHandle(accessMode.ordinal()); return mh.bindTo(this); } else { // Ensure an UnsupportedOperationException is thrown return MethodHandles.varHandleInvoker(accessMode, accessModeType(accessMode)). bindTo(this); } } @Stable TypesAndInvokers typesAndInvokers; static class TypesAndInvokers { final @Stable MethodType[] methodType_table = new MethodType[VarHandle.AccessType.values().length]; final @Stable MethodHandle[] methodHandle_table = new MethodHandle[AccessMode.values().length]; } @ForceInline private final TypesAndInvokers getTypesAndInvokers() { TypesAndInvokers tis = typesAndInvokers; if (tis == null) { tis = typesAndInvokers = new TypesAndInvokers(); } return tis; } @ForceInline final MethodHandle getMethodHandle(int mode) { TypesAndInvokers tis = getTypesAndInvokers(); MethodHandle mh = tis.methodHandle_table[mode]; if (mh == null) { mh = tis.methodHandle_table[mode] = getMethodHandleUncached(mode); } return mh; } private final MethodHandle getMethodHandleUncached(int mode) { MethodType mt = accessModeType(AccessMode.values()[mode]). insertParameterTypes(0, VarHandle.class); MemberName mn = vform.getMemberName(mode); DirectMethodHandle dmh = DirectMethodHandle.make(mn); // Such a method handle must not be publically exposed directly // otherwise it can be cracked, it must be transformed or rebound // before exposure MethodHandle mh = dmh.copyWith(mt, dmh.form); assert mh.type().erase() == mn.getMethodType().erase(); return mh; } /*non-public*/ final void updateVarForm(VarForm newVForm) { if (vform == newVForm) return; UNSAFE.putObject(this, VFORM_OFFSET, newVForm); UNSAFE.fullFence(); } static final BiFunction<String, List<Integer>, ArrayIndexOutOfBoundsException> AIOOBE_SUPPLIER = Preconditions.outOfBoundsExceptionFormatter( new Function<String, ArrayIndexOutOfBoundsException>() { @Override public ArrayIndexOutOfBoundsException apply(String s) { return new ArrayIndexOutOfBoundsException(s); } }); private static final long VFORM_OFFSET; static { VFORM_OFFSET = UNSAFE.objectFieldOffset(VarHandle.class, "vform"); // The VarHandleGuards must be initialized to ensure correct // compilation of the guard methods UNSAFE.ensureClassInitialized(VarHandleGuards.class); } // Fence methods /** * Ensures that loads and stores before the fence will not be reordered * with * loads and stores after the fence. * * @apiNote Ignoring the many semantic differences from C and C++, this * method has memory ordering effects compatible with * {@code atomic_thread_fence(memory_order_seq_cst)} */ @ForceInline public static void fullFence() { UNSAFE.fullFence(); } /** * Ensures that loads before the fence will not be reordered with loads and * stores after the fence. * * @apiNote Ignoring the many semantic differences from C and C++, this * method has memory ordering effects compatible with * {@code atomic_thread_fence(memory_order_acquire)} */ @ForceInline public static void acquireFence() { UNSAFE.loadFence(); } /** * Ensures that loads and stores before the fence will not be * reordered with stores after the fence. * * @apiNote Ignoring the many semantic differences from C and C++, this * method has memory ordering effects compatible with * {@code atomic_thread_fence(memory_order_release)} */ @ForceInline public static void releaseFence() { UNSAFE.storeFence(); } /** * Ensures that loads before the fence will not be reordered with * loads after the fence. */ @ForceInline public static void loadLoadFence() { UNSAFE.loadLoadFence(); } /** * Ensures that stores before the fence will not be reordered with * stores after the fence. */ @ForceInline public static void storeStoreFence() { UNSAFE.storeStoreFence(); } }
By Brendan O'Neill Whenever the debate about sex offenders rears its ugly head, we are reminded of this incident and its cruel irony: how protesters targeted a paediatrician (a doctor who cares for children) because his or her job title sounded vaguely like paedophile (a sexual deviant attracted to children). Last month, when education secretary Ruth Kelly was under pressure to reveal how many individuals on the Sex Offenders Register work in our schools, various newspapers revisited the paediatrician/paedophile story. A columnist for the Independent criticised the tabloid attacks on Kelly, warning that we might once again end up with a "howling mob" consumed by a "paediatrician-bashing hysteria". The Glasgow Herald lamented the current "hysteria over alleged sex offenders", and reminded us of the "illiterate lynch mob" that attacked the home of a paediatrician the last time there was such hysteria. Who what where The paediatrician incident is mentioned endlessly, but rarely examined in detail. Commentators refer to it all of the time but don't explain where and when it took place, and what exactly happened. It was part of a wave of incidents sparked by Sarah Payne's murder In fact, it was a relatively minor incident, which has been exaggerated and distorted in the re-telling - and turned into a symbol of mass hysteria among the tabloid-reading sections of the population. If you search the web or back issues of newspapers to discover the truth of the paediatrician-bashing incident, expect to be confused. Some reports say a male paediatrician was attacked, others that it was a female paediatrician. There are clashing reports of where the incident took place. Some say it was in south Wales, others that it was in Portsmouth. In an article in 2001, the Daily Mail asked: "Who can forget the targeting of an innocent children's doctor in Portsmouth by a populace too ignorant and enraged to recognise the difference between paedophile and paediatrician?" An online magazine, The Register, also says that it was in Portsmouth that "dictionary-starved and enraged mobs attacked a paediatrician". Yet on a discussion board of a website that focuses on strange events, one contributor says the incident took place in London. Lynch mob There are conflicting reports as to what happened. A 2001 Guardian article says a female paediatrician was "hounded" from her home by her own "neighbours, who confused 'paediatrician' with 'paedophile'." Message on a balcony According to some accounts she was asleep in the house while the mob vandalised it; according to others she only discovered the vandalism upon returning from work. Some say it was far more serious than just offensive graffiti. In 2003, a Northern Irish newspaper recalled the time that "Portsmouth became famous when paedophile-hunting locals chased a paediatrician down the street" (there's that mention of Portsmouth again). This account suggests the paediatrician may have been in real physical danger. A student newspaper at the University of Essex described how "a group of people in Portsmouth... burned down a paediatrician's office in righteous anger." On one online discussion board it said that "a howling mob stoned [the paediatrician's] house and firebombed it". In the mainstream media, meanwhile, there are clashing reports over whether the paediatrician was attacked, hounded, chased or abused, but they all agree that it was an "hysterical mob" that did it. Police talk Just what is the truth? In August 2000, a female paediatrician consultant called Yvette Cloete was indeed labelled a "paedo" after a campaign by the News of the World to name and shame paedophiles in the community. The incident took place in Newport, Gwent, not in Portsmouth (where there had been anti-paedophile protests after eight-year-old Sarah Payne was murdered) or London. It looks as though it was just a question of confusing the job title for something else - I suppose I'm really a victim of ignorance Yvette Cloete, speaking in 2000 It was no doubt a very distressing incident for Ms Cloete, who decided to move home shortly afterwards. But there is no evidence that a mob was involved or of any threats or incidents of physical pressure or violence. "Why let the truth get in the way of a good story?" says Chief Inspector Andrew Adams, of Gwent Police, who was the liaison officer in charge when news of this incident broke six years ago. He remembers very well that stressful night, when he gave 18 live interviews to various media outlets. "There was no big mob," he says. "Nothing like that happened. I know because I was there and I was involved. The lady was not in her home when it happened. She came home from work to see her door daubed with anti-paedophile graffiti. "When we heard about it we set about dispelling the rumours that she or anyone else in that house was a paedophile. We explained to the local community the difference between paediatrician and paedophile." Who did the graffiti? Mr Adams says he still isn't sure. "We think it was youngsters, probably someone in the 12 to 17 age bracket." And the community was outraged by the incident and "supportive of the woman involved", he says. Nevertheless, the story has taken on a life of its own, transformed into a dire warning about hysterical mobs who threaten the fabric of our nation. The irony is that some in the media, in challenging the scaremongering over sex offenders, indulge in some scaremongering of their own. They raise fears about violent tabloid-reading protesters who will attack, hound and destroy a paediatrician - which seem to be just as unfounded as the fears about thousands of paedophiles stalking the land.
Q: How to Round Up Years in Joda-Time Is there an existing way in Joda-Time to round up years? Say you have a DateTime startDate = 10-18-2016 and an DateTime endDate = 12-18-2017. I would like that to round up to 2 years. Currently, when I do: Years yearsBetween = Years.yearsBetween(startDate, endDate); I get yearsBetween = 1. Is there a simple way to fix this using Joda Time or do I need to write a custom method to handle this? A: tl;dr Move the start date to first of its year. Move the end date to first of its following year. Half-Open Joda-Time uses the Half-Open approach to spans of time, where the beginning is inclusive and the ending is exclusive. So a year starts from the January 1 of the year in question and runs up to, but does not include, January 1 of the following year. So you want dates in 2016-2017 to be two years, move the starting date to the first day of the year, and move the ending date to the first year of its following year. We convert to LocalDate as we do not care about time-of-day for this calculation of years. LocalDate start = startDate.toLocalDate().withDayOfMonth( 1 ).withMonthOfYear( 1 ); // Move to first of same year. LocalDate stop = endDate.toLocalDate().withDayOfMonth( 1 ).withMonthOfYear( 1 ).plusYears(1); // Move to first of *following* year. Then perform your same calculation with Years. Years yearsBetween = Years.yearsBetween( start , stop ); // Half-Open, beginning is inclusive while ending is exclusive. int years = yearsBetween.getYears(); // Plain integer. Results in 2 for any dates in 2016 (moved to 2016-01-01) and 2017 (moved to 2018-01-01). java.time FYI, the Joda-Time project is now in maintenance mode, with the team advising migration to the java.time classes. This work is a bit simpler in java.time. The TemporalAdjuster interface provides for classes to manipulate date-time values. The TemporalAdjusters class (note the plural s) provides several implementations. These make provide for getting the first of the year and the first of the next year. By Zdt here, I refer to the ZonedDateTime objects you might have in hand. This class represents a moment on the timeline in a particular time zone (ZoneId) with a resolution of nanoseconds. From the ZonedDateTime object we convert to a LocalDate, and then apply a pair of TemporalAdjuster objects to move to first of the year and of the following year. LocalDate start = yourStartingZdt.toLocalDate().with( TemporalAdjusters.firstDayOfYear() ); LocalDate stop = yourEndingZdt.toLocalDate().with( TemporalAdjusters.firstDayOfNextYear() ); The java.time classes do not include the equivalent of the Joda-Time Years class. If desired, you can add the ThreeTen-Extra project to your app to extend java.time with additional classes that include a Years class. Alternatively, we can get the number of years via the Period class. Like Joda-Time, java.time classes including Period use the Half-Open approach to spans of time. I advise using Half-Open yourself consistently in all your date-time work as it will make your code over all simpler and less error-prone. Period p = Period.between( start , stop ); int years = p.getYears(); Results in 2 for any dates in 2016 (moved to 2016-01-01) and 2017 (moved to 2018-01-01). About java.time The java.time framework is built into Java 8 and later. These classes supplant the troublesome old legacy date-time classes such as java.util.Date, .Calendar, & java.text.SimpleDateFormat. The Joda-Time project, now in maintenance mode, advises migration to java.time. To learn more, see the Oracle Tutorial. And search Stack Overflow for many examples and explanations. Specification is JSR 310. Where to obtain the java.time classes? Java SE 8 and SE 9 and later Built-in. Part of the standard Java API with a bundled implementation. Java 9 adds some minor features and fixes. Java SE 6 and SE 7 Much of the java.time functionality is back-ported to Java 6 & 7 in ThreeTen-Backport. Android The ThreeTenABP project adapts ThreeTen-Backport (mentioned above) for Android specifically. See How to use…. The ThreeTen-Extra project extends java.time with additional classes. This project is a proving ground for possible future additions to java.time. You may find some useful classes here such as Interval, YearWeek, YearQuarter, and more.
Q: SQL - select distinct records in one field with highest records from another field In a scenario where I have a table like so: int id (PK) int staff_id int skill_id bit mainskill I want to select only ONE record for each staff member (represented by staff_id) listing their main skill as represented by a (1) in mainskill. If no main skill is present, I want to return any of the skill records for that staff member. For example: id staff_id skill_id mainskill 1 1 24 1 2 1 55 0 3 1 7 0 4 4 24 0 5 4 18 0 6 6 3 0 7 6 18 1 The query should return: id staff_id skill_id mainskill 1 1 24 1 4 4 24 0 7 6 18 1 I've tried various combinations of grouping, DISTINCT etc but can't get the output I'm after. Any help appreciated. A: SQL Server 2005+, Using CTE: WITH rows AS ( SELECT t.id, t.staff_id, t.skill_id, t.mainskill, ROW_NUMBER() OVER (PARTITION BY t.staff_id ORDER BY t.mainskill DESC) AS rank FROM TABLE t) SELECT r.id, r.staff_id, r.skill_id, r.mainskill FROM rows r WHERE r.rank = 1 ORDER BY r.staff_id SQL Server 2005+, Non-CTE Equivalent: SELECT r.id, r.staff_id, r.skill_id, r.mainskill FROM (SELECT t.id, t.staff_id, t.skill_id, t.mainskill, ROW_NUMBER() OVER (PARTITION BY t.staff_id ORDER BY t.mainskill DESC) AS rank FROM TABLE t) r WHERE r.rank = 1 ORDER BY r.staff_id Both use ROW_NUMBER, which is only available since SQL Server 2005.
Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings. Flash-flood watches and warnings were issued across seven states early Tuesday as an unprecedented downpour of torrential rain triggered "extremely dangerous and potentially life-threatening" conditions in Houston. More than 30 million Americans were told to brace for dangerous thunderstorms — including flooding, hail and possible tornadoes — as meteorologists warned the weather that has centered on Texas and Oklahoma since Saturday could expand to other areas. Michael Walter, a spokesman for Houston Emergency Management, confirmed three deaths Tuesday afternoon, raising the death toll to 11. At least 12 people were still missing, and countless more were evacuated amid the deluge that has inundated Texas and Oklahoma with record-breaking floods since Saturday. In Houston, more than 80,000 people were without power and the flood waters closed roads including Interstate 10 and Interstate 45. Houston was among 24 counties where Texas Gov. Greg Abbott declared a state of disaster on Monday. Flash #flood emergency thru 6a for part of Houston metro. ~11" rain SW Harris Co. #Houstonflood pic.twitter.com/URo7mISi5O -TWC Breaking (@TWCBreaking) May 26, 2015 530 AM: Here's a look at where some of the heaviest rain fell overnight for Southeast TX: #txwx #houwx #bcswx pic.twitter.com/r6TMJuaDRu — NWSHouston (@NWSHouston) May 26, 2015 Wow: When was the last time a flash flood emergency was issued for Houston? @NWSHouston: First time. Never been done before. #houstonflood — Justin Abraham (@jjabraham) May 26, 2015 Houston Intercontinental Airport smashed its all-time record for most rainfall in one day on Monday — its 4.34 inches almost doubling the previous milestone set in 1946. "The rain just kept coming, and coming, and coming," said Ashley Aivles, a 25-year-old call center worker who struggled to make it back to her home in a Houston suburb early Tuesday. "I lived here during Hurricane Ike [in 2008] and this was a close second. We've had really bad rain in the past but this was something else," said Aivles, who said many of her co-workers were still trapped in the office. Crazy flooding on I-45 N at North Main in #Houston. Cars stranded, flooded on interstate. #houstonflood pic.twitter.com/7iJ08nKR9w — Justin Abraham (@jjabraham) May 26, 2015 Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha This is not just friendly advice. Stay off the roads and avoid high water. This is not your typical rain storm. #HoustonFlood #houwx — TxDOT- HOU District (@TxDOTHoustonPIO) May 26, 2015 Around 200 basketball fans remained trapped inside the city's Toyota Center at 4 a.m. local time (5 a.m. ET), having watched the Houston Rockets' playoff win over the Golden State Warriors. Asif Noorani, a 22-year-old student, took his chances and left the stadium after the game despite a warning on the Jumbotron to wait until the storm passed. "We didn't realize it would be that bad," he said. "We were just about able to make it home." Lightning triggered blazes including two-alarm fire in the Memorial area of the city, officials said. LIVE NOW: Michael Walter of #Houston EMA says #lightning has sparked building fires in city; floods slowing response. pic.twitter.com/5uZiG4T8Ju — The Weather Channel (@weatherchannel) May 26, 2015 All Houston METRO rail and bus services were canceled until the flood waters receded and conditions were deemed safe by the city's Office of Emergency Management, the transportation service announced at 4:20 a.m. local time (5:20 a.m. ET). The Houston Independent School District also announced that classes would be delayed by two hours. Target employee Joshua Cooper said he and a dozen workers were stuck inside a store after become surrounded by the waters. "We are basically an island right now," the 24-year-old told NBC News. "There's no way for us to get out. The waters are so high that we have a bayou that's basically a lake and buses are getting stuck on the roads." Cooper added: "I've lived in Houston all my life and I've not seen flooding this bad in a very long time." An unknown number of people were also stranded in Houston's The Galleria mall, after parts of the building and the surrounding streets were drenched by the deluge. The Weather Channel warned of "extremely dangerous and potentially life-threatening flood situation" in Houston. #BREAKING: Harris County TX emergency mgmt says hundreds of homes are now flooded in western part of county. #flood pic.twitter.com/FTX9CL5Apx — The Weather Channel (@weatherchannel) May 26, 2015 11:30p CDT: White Oak Bayou has climbed 25 feet in 2 hours and will #flood I-10 just N of downtown #Houston shortly. pic.twitter.com/hEg0WcFygp — The Weather Channel (@weatherchannel) May 26, 2015 Around 32 million Americans in the Plains and South were at risk from dangerous thunderstorms Tuesday, meteorologists said. Flood watches and warnings were in effect at 6:30 a.m. ET in parts of Texas, Arkansas, Oklahoma, Kansas, Missouri, Louisiana, and Mississippi. There were also 19 reported tornadoes in Texas, Arkansas, Oklahoma and Mississippi on Monday — and another twister over the Mexico border that killed 13 people. And there appeared to be no let up in sight, with Weather Channel meteorologist Kevin Roth predicting the storm would likely refocus on central Texas, as well as branching out to the Ohio Valley and further north later on Tuesday. "There will be another round of thunderstorms developing in central Texas in the mid-afternoon today, which could then clip Houston and Dallas by the evening," he said. However, whereas a storm lingered over Houston on Monday night, Roth said Tuesday's round could pass over the city quicker and therefore not dump as much rain on the city. Severe thunderstorms were also possible throughout the day in the Ohio Valley and as far north as Chicago, Milwaukee and Green Bay, Roth said. "This is likely to mean wind, hail, and isolated tornadoes cannot be ruled out," he said. Today's early tornado probabilities include parts of the Midwest pic.twitter.com/HIWc2q2jql — Jim Cantore (@JimCantore) May 26, 2015 At least eight people were confirmed dead over the holiday weekend's storms and flooding, including a 14-year-old boy in Texas who was found inside a storm drain and believed to have drowned and a homecoming queen who was driving home from her prom. Four were confirmed dead in Oklahoma, including a Claremore firefighter who died during a water rescue, and a 33-year-old woman who died in a storm-related traffic accident in Tulsa. The 12 missing in the small town of Wimberley, Texas, between Austin and San Antonio, included members of two families who were vacationing together. The house they were staying in was swept away by flash floods on Sunday, relatives told NBC News.
最近,当我看到这个时是在裕廊坊走走消磨点时间。它说“我是一个聪明的垃圾桶”。 有一个词“大肚子”。 更多描述:紧凑多达7倍的垃圾。 拯救地球和节省劳动力。也很聪明,并会在需要清理的时候和地点发送警报。这减少了排放并帮助了地球。是的确挺聪明的。 My Referral Links to recent airdrops | 我最近参与的空投连接 I See👀. I Shoot📷. I Steemit♨️. Recently, I was at Jurong Point passing some time and walking around when I saw this. It said “I am a smart litter bin”. There is a word “Bigbelly”. More description: compact up to 7x more rubbish. saving earth and labour. also smart and will send alerts when and where need emptying. this cuts down emissions and helps the earth. Now, that’s smart.IMAGE LINK|图片链接: https://supload.com/SkIi-Wpa4 [//]:# (!steemitworldmap 1.340406 lat 103.706158 long Jurong Point d3scr)Please see my other posts: @ace108
Various rat strains were studied on different diets to check on the regulation of aldosterone at messenger levels. This study is linked to the clinical studies designed to evaluate the mechanisms underlying non- modulating hypertension with varying diets. CLINFO ONLY.
Related The story reads like a Kafkaesque nightmare, where the law seems to turn its back on someone in a way that would make Josef K. from The Trial say, Damn, I thought I had it bad. Marissa Alexander was a 31-year-old, 5-ft. 2-in. mother of three, her baby just 9 days old, living in Jacksonville, Fla., a “Stand your ground” state. Her 36-year-old husband Rico Gray was arrested in 2009 for attacking her and sending her to the hospital, after which she got a restraining order against him. In a 2010 deposition, Gray said, “We was staying together and I pushed her back and she fell in the bathtub and hit her head and that’s the time I went to jail.” In the same deposition, he admits that this was not his first incident of domestic violence against women, saying, “I got five baby mamas and I put my hand on every last one of them except one. The way I was with women, they was like they had to walk on eggshells around me. You know they never knew what I was thinking or what I might do. Hit them, push them.” He also admits that he and Alexander had “four or five” episodes of domestic violence leading up the August 2010 incident that landed Alexander in prison facing a 20-year sentence. On Aug. 1, 2010, Alexander and Gray began to fight in the home where Alexander lived. Given Gray’s history, it’s predictable that Alexander was scared. She described the fight through her ex-husband and spokesperson Lincoln Alexander: [Gray] assaulted me, shoving, strangling and holding me against my will, preventing me from fleeing all while I begged for him to leave. After a minute or two of trying to escape, I was able to make it to the garage where my truck was parked, but in my haste to leave I realized my keys were missing. I tried to open the garage but there was a mechanical failure. I was unable to leave, trapped in the dark with no way out. For protection against further assault I retrieved my weapon; which is registered and I have a concealed weapon permit. Trapped, no phone, I entered back into my home to either leave through another exit or obtain my cell phone. He and my two stepsons were supposed to be exiting the house thru the front door, but he didn’t leave. Instead he came into the kitchen that leads to the garage and realized I was unable to leave. Instead of leaving thru the front door where his vehicle was parked outside of the garage, he came into the kitchen by himself. I was terrified from the first encounter and feared he came to do as he had threatened. The weapon was in my right hand down by my side and he yelled, “Bitch, I will kill you!” and charged toward me. In fear and desperate attempt, I lifted my weapon up, turned away and discharged a single shot in the wall up in the ceiling. As I stood my ground it prevented him from doing what he threatened and he ran out of the home. Outside of the home, he contacted the police and falsely reported that I shot at him and his sons. The police arrived and I was taken into custody. Gray’s deposition tells a similar story of the incident (although he has since then publicly provided a conflicting account). According to the deposition, Gray and Alexander were in their bedroom, and she was showing him pictures of their new baby on her cell phone. When she left the room, Gray began to scroll through Alexander’s texts and noticed that she had been texting her ex-husband, Lincoln. This, he said, sent him into a rage. He threatened to have her beaten up by friends. He blocked her with his body while she hit him. She went to their garage and retrieved a gun that she was licensed to have. Gray said, “I knew that she couldn’t leave out the garage because the garage door was locked … because we was having problems with the garage and it wouldn’t go up.” Gray said Marissa Alexander returned, holding the gun with her hand down and told him to leave. He refused. He said, “She shot in the air one time,” and then he decided to leave. “She knew the relationships I been in and I put my hand on her before. I honestly think she just didn’t want me to put my hands on her anymore, so she did what she feel like she have to do to make sure she wouldn’t get hurt, you know.” He continued by saying, “The gun was never actually pointed at me. When she raised the gun down and raised it up, you know, the gun was never pointed at me.” After Marissa posted bond and agreed to have no contact with Gray, she was released from prison and, according to court documents, drove to Gray’s new home where she physically attacked him. She was arrested on new charges and her bond was revoked. Lincoln says Marissa went to Gray’s home to get his signature on health-insurance paperwork, without which they would lose coverage, and while at the home, she was assaulted (although these claims were unproved in court). Their story isn’t simple and clean. Lincoln told me that after Marissa filed for and received a restraining order against Gray in 2009, she learned she was pregnant and asked the court to amend the restraining order to remove the ban on her and Gray having contact, while maintaining the rest of the restraining order. This, Lincoln said, was because she wanted to be with Gray during her pregnancy. Why would she want a man who had beaten her in the past living with her again? This is why her defense had an expert on battered women testify at her trial — because domestic-violence victims often allow their abusers back into their lives. In May 2010 — while the restraining order was still in place — Marissa Alexander and Gray were married. Alexander gave birth to their baby in August 2010, but she didn’t stay in the marital home. For the last two months of her pregnancy, the motion to dismiss says that she lived with her mother, meaning that Alexander and Gray weren’t living in the same house when the incident occurred. Alexander rejected a plea deal, went to trial and was convicted of aggravated assault with a deadly weapon with no intent to harm. It seems to make sense that a woman who was in a physical fight in her home with an admitted habitual domestic abuser against whom she has legal protection should be entitled to stand her ground. Alexander told officers that she feared for her life. The “Stand your ground” law says, “A person who is not engaged in an unlawful activity and who is attacked in any other place where he or she has a right to be has no duty to retreat and has the right to stand his or her ground and meet force with force.” That would seem to describe Alexander’s situation. Yet a judge rejected Alexander’s motion to invoke “Stand your ground” because she could have exited the home. What happened to having no duty to retreat? The judge wrote there was “insufficient evidence she reasonably believed that deadly force was needed,” and that Alexander’s behavior was “inconsistent with a person who is in genuine fear for his or her life.” She is currently in prison awaiting sentencing. In Florida, the mandatory minimum for firing a gun while committing a crime is 20 years. It seems Alexander has been abandoned by battered-spouse laws, mandatory minimums and “Stand your ground”, which is turning our country into a confusing maze of shooters, some protected, some not. “Stand your ground” laws are haphazardly applied, shielding some and abandoning others, inconsistent about whether or not people have a duty to retreat when they fear for their life. This is unconscionable. When laws are not uniformly applied, civilization is on the verge of breaking down. Is Marissa Alexander a threat to society? Does the public benefit from her being in prison? Are we safer? Should a shot into the ceiling that hit no one and that was intended to help protect an embattled domestic-abuse victim who possessed the gun legally be punished with 20 years in prison? Should her children grow up without a mom? Is this the America you want to live in? Meanwhile, there is one last sliver of hope left for Alexander: the court will soon hear arguments for a retrial. NewsBall.com wants to expose the jurors on this case that took less then 15 minutes to deliberate on sending this mother away for 20 years. If you have the names or pictures of the 3 men and 3 women jurors, please send to [email protected] If you have any lead whatsoever as to who we should talk to so that we can track down any of the 6 jurors, please give us that persons contact info. We know it has been a few years, but we want to interview a juror or two - those that do not cooperate we will go ahead with our policy of anyone affecting anyone is subject to scrutiny and will publish any name or picture we find of any of them. If they want to interview though, we will allow that person to remain anonymous. Please spread the word. Those in the courtroom, even Marissa, can describe what the jurors looked like - their ages, etc - so we can begin to track them down. We recently took on the Skylar Neese murder case & exposed the killer Shelia Eddy. Numerous outlets then reported on our story, including RadarOnline & the Examiner. We are offering a $1,000 reward / researcher's fee for the names of the jurors & their pictures. We want answers from Marisa Alexander's jurors, & if they refuse to tell us why they carelessly convicted her under 15 minutes - their names & pictures will be published The open doors are less about the requirement to flee. She claimed that she was attempting to flee but the garage door was broken. She parked her vehicle in the garage, so the door worked prior to the incident. When the police investigated after the incident, they found that the door worked. So, she passed up two opportunities to flee and then became trapped by a mysteriously, coincidentally broken door and was unable to flee. @ColeBartiromo The fact is that volumes of mitigating and exculpatory evidence were withheld from the jury. Rico had tried to frame two different partners previously. Not admissible. Rico had beaten Marissa into the hospital previously. Not admissible. Rico had a long history of violence against women. Not admissible. Rico had a restraining order against him and if he had obeyed it none of this would have happened. Not admissible. Rico's testimony was purchased by the prosecution by not trying him for violating the restraining order Marissa had against him. Not admissible. All of the abuser turned accuser's prior baby mommas had lived in terror of his man. Not admissible. Marissa was an excellent shot and could have riddled him with bullets. Not introduced. Marissa most likely was suffering from post partum depression, traumatic brain injury, and or post traumatic stress disorder. Not introduced. No one can blame this jury. All of the blame lies with the prosecutor, the judge and their hero the abuser turned accuser. Lying about what happened will get you convicted every time. Of course, violating a restraining order and the terms of your bail and attacking the alleged victim while you're awaiting trial isn't really helpful either. @JohnInIndyIn @ColeBartiromo Marissa's the one who violated the restraining order -- she even went to his home without a police escort AFTER she was first charged! But you might have something regarding post partum depression. She was not released from the hospital but kept there for nine days along with her baby. That suggests that neither of them were in top shape.
Q: Can I make swf address be a real URL and not use a #? Is it possible to make swfaddress, or any script really, to allow flash to change the URL displayed(without actually switching to a new page) in the browser to anything I choose? I realize that swfaddress makes the url so that it will always refer back to an originating swf file, which is great, but a web template I'm working on will always load a swf, no matter what URL you visit on the site. The difference will be what content is immediately loaded. As you navigate through the flash to different articles, I want to be able to change the URL to be that of the article as if it was an html page, as I'm going to have matching html content for SEO purposes. This is going to be a large site and I want to optimize it for sharing and searchability. So as an example, rather than "site.com/#/news-just-in", I want a URL of "site.com/2011/3/news-just-in". Is this possible? A: You can do this, but only in browsers that support the new HTML5 History API. You would need to use ExternalInterface to cooperate with a JavaScript layer. The Flash side of things might look like this: package { import flash.display.Sprite; import flash.events.MouseEvent; import flash.external.ExternalInterface; import flash.text.TextField; import flash.text.TextFieldAutoSize; public class Test extends Sprite { protected var _text:TextField; function Test() { var b:Sprite = new Sprite; b.graphics.beginFill(0xff0000); b.graphics.drawRect(0, 0, 32, 32); b.graphics.endFill(); b.addEventListener(MouseEvent.MOUSE_DOWN, function(e:MouseEvent):void { pushState('/test/foo'); }); addChild(b); b = new Sprite; b.x = 64; b.graphics.beginFill(0x0000ff); b.graphics.drawRect(0, 0, 32, 32); b.graphics.endFill(); b.addEventListener(MouseEvent.MOUSE_DOWN, function(e:MouseEvent):void { pushState('/test/bar'); }); addChild(b); _text = new TextField(); _text.autoSize = TextFieldAutoSize.LEFT; _text.y = 64; addChild(_text); if (ExternalInterface.available) { ExternalInterface.addCallback('onPopState', onPopState); ExternalInterface.call('test.onReady'); } else { _text.text = 'external interface not available'; } } protected function onPopState(path:String):void { _text.appendText("flash onPopState: " + path + "\n"); } protected function pushState(path:String):void { _text.appendText("flash pushState: " + path + "\n"); ExternalInterface.call('history.pushState', null, null, path); } } } And the JavaScript side might look like this: <!DOCTYPE html> <html> <body> <script type="text/javascript"> if (!!(window.history && history.pushState)) { var test = { onPopState: function(event) { if (this.embed) { this.embed.onPopState(location.pathname); } }, onReady: function() { var embed = document.getElementById('flash'); this.embed = embed.getElementsByTagName('object')[0] || embed; this.embed.onPopState(location.pathname); } }; window.addEventListener('popstate', function(event) { test.onPopState(event); }, false); } else { alert('This browser does not support the history API'); } </script> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="flash" width="780" height="420"> <param name="movie" value="test.swf" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="test.swf" width="780" height="420"> <!--<![endif]--> <p>Flash is required</p> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </body> </html> In this example, onPopState is called whenever the path changes, and pushState is called to change the URL. You can click the red and blue boxes in the example to change the URL from Flash. If you wanted to do this and had to support older browsers, you would want to fallback on the hash tag when the history API is not supported. Ideally, you could abstract this in the JS layer, so that the Flash code doesn't have to know which is being used. I would recommend using a third party library like History.js for something like this, as it will handle the hash fallback for you.
>"Why she was so insistent becomes evident a few minutes later. She meets her mother, who gives the little girl a good beating for not having collected money. In the middle of the street, the mother hits the little child over and over again. Maybe four years old." I think in Roman (or Greek) times a mother gave her child a beating for not collecting money... and so the story continues on. I suspect the little girl will probably grow up to beat her children. This is the dark side of human history. >"The problem is that making drafts, outlines, and "taking points" has become a lost art. The ease with which spell checker "improve" your text hides the fact that more and more of the text you read is not well written." It is Wednesday 24th of March 2010, it is the 13th day of our vacation in Greece, and we have been two days in Nafplio on Peloponnese. The general plan is to continue south towards the End of the World. For some reason, in the morning, She complains of having pain in her back. Just as on the Second Day of Riding in Greece (for those who have been so outstanding nice as to stay with me for all these days). And just as on that second day, there is a thing that makes me happy: She complains of having pain in her back in the morning (and not in the evening). I guess the first signs of being old is the "Sorry Dear, not tonight - I have a headache"-things. Backache in the evening would turn things off in a similar manner, I guess. We conclude she has been laying in some awkward position. I leave it to your imagination to envision what I think when I solemnly tell her we should be more careful. But in the end the desire for breakfast overcomes even backache. Instead of finding a bar, then returning to the hotel to dress up and pack the bike, lwe do the bike first, and ride to find a bar. That saves at least half an hour. We have coffee on the piazza just where the new and old city meets. Her back is not good, but the "coffee" is as close to a coffee as it seems we can get here, and it helps. Across the street there is a (long) line of taxis. They are all new, they are all made by Mercedes. One is a new Mercedes S63 AMG. I notice that over at Auto.de you can pick up a used S63 for a mere 153.000 euro (about 200.000 USD). Say this to yourself: "A 153.000 euro taxi". Does it sound economically sound to you? I don't know anything about the taxi-business in Nafplio, but it is either vibrant beyond belief or screwed up beyond comprehension. She feels better (coffee to the rescue!), and we ride off. Up the street (dead end), turn, and back again. A lady is blocking the road for us. It turns out that she is the owner of the bar where we just had coffee. She is not pleased: We left the bar without paying our bill. What can I say? After that unpleasant, but completely self-inflicted intermezzo, we're off again. We ride south along the coast. But we haven't been on our way for more than about half an hour before we are hit by rain. Light rain, that is true, but still rain. We decided it is time for coffee (again). This time, however, we only find "coffee". In total 16 drops fell. Or less. We feel a little stupid as we take off again. As we continue along the coast we talk about how few cars there are. And no trucks are to be seen. We didn't see any signs of economic activity in the north, and we don't see any signs here in the south. [Note to the reader: This ride took place in March. At a time where Greek politicians were still denying that there were anything wrong with the Greek economy. Please forgive me for talking about things that I hope, by now, are evident to all.] We are in our typical vacation mode. We ride in the general direction of our vaguely laid out plans. We are in no hurry, as we have no appointments and no need to get to anywhere. If worst comes to worst, Athens is an hour or so away; we can ride there and find a place to stay. So we don't worry about a thing. Vacation as it should be: Riding my motorcycle in Greece, with Capa Superiore della Famiglia. We pass a sign. The text is similar in both colours. A dialect? The road turns into a narrow valley. I am sorry to admit that I forgot most of my intentions of always ride with great care. The road is excellent, and we really enjoy some high-speed riding on winding Greek roads. Probably not a wise things to do, but most pleasure is to be found just there: Slightly outside the sensible and utterly safe. As we come around a curve we spot a famous place. I have seen pictures of this monastery before. Cool project! Maybe you can see the ocean from up there? Some time on Google tells me it is named Penagias Elonis. Modern times: No info on Google means it does not exist. Here is a tip to my Greek friends: On the parking place just below the monastery, from where the picture was taken, some information about what we see would have been nice. Maybe there is a road to take me there? Maybe a museum where I can pay a fee to come in. Or a bar where I can sit down, let go of some money for a "coffee" and admire the view? OK, I don't want to be unreasonable - I know that "you" have more than your fare share of the world's heritage to take care of. I "we" are grateful that you do. But we still want more :-) The road continues up, up, up. Then, finally, the rain starts in earnest, and the temperature sinks down below 10C. The Captain, who has left to the First Officer to find a enjoyable road, she is not happy. Mr. Zumo isn't of much use as we (still) can not "tell" it anything. But we can see the map. It seems to be further back to the coast than over the mountain and down on the other side. We continue upwards, but She makes it crystal clear who decided to ride here. As if I have made any decision at all - I just enjoy the ride. Finally we reach the top, and find the village Kosmas. Kosmas sports a nice piazza with quite a few places to eat. All but one are closed. The one that is open has six tables. It looks like a private living room. Personal items are scattered all over. Two men sits at one table. One of the is drunk. The waiter is a short, old man. The skin of his face looks like leather. No English here, but it is obvious that we are cold and hungry. And then, at this remote place we get the best meal we got in all of Greece! The broth had been simmering for hours with vegetables. The meat did not come from some tasteless lamb, but from a sheep that had spent it's life in the mountains. So humble. So nice. So tasteful. It is cold outside, but the soup is warm. We are simple minds, and a good meal is all we need. Crisis, what crisis? We sit for a long time just enjoying sitting there. We ask for coffee. He fetches warm water from the tank placed on top of the oven. Needless to say, "warm" is considerable less warm than the "hot" you need to make good coffee. Even Greek "coffee" needs hot (not warm) water. The result is as you can expect. The waiter places a glass of water and a bowl of soup on a tray, and prepares to go outside with it. The drunk man on the next table comes to life. He starts to scold the old waiter. The drunk young man is shouting, waving his arms, and very agitated. It is obvious that the old man does something very wrong, or at least, something very stupid. He looks sad, takes the tray, and departs. The drunk talks a lot to his companion, and to us. We do as the companion: Look as if we most likely agree. We are ready to leave, but with no waiter, how can we pay. We wait. The waiter return a full half hour later. He is crying. He is sobbing, crying, and looking really, really miserable. The young man who had fallen silent, he get a another beer, and start scolding the old main again. It is surreal. The waiter sits in a corner crying for a while, but then comes to our table and tells a long story. We don't understand anything. Finally he shows us a photo of a young couple with a child. And he holds up two fingers, points at his legs and to his head, and sobs while he tells his story. All while the young man is shouting what sounds like insults from his table, and the other man watches the whole thing. It takes some time for the whole situation to settle. After another half hour we feel that we can ask for the bill. I ask if Capa might take a photo of both of us, and he seems to like that. He dries his tears, and holds me hard. I feel immensely strong next to him. But, probably, that is not correct. He seems as he has been hit by more hardship that I can imagine. And far more than I hope to ever encounter. But he is here. He endures. And that makes me very sad. Life can be hard, shit happens. And as if life itself doesn't wreck havoc on enough things, I can not forget the little girl that was beaten by her mother on the street yesterday. Just this: Life can be miserable, and you add to that by beating your own children. Or you find it necessary to walk up to a stranger at the Lion and tell the stranger how much you are filled with hate of Macedonia. I have a hard time coping with just knowing about these awful things - how would I deal with it if I had to face it? When I feel strong next to this man it is probably just because I am large. Faced with real Life, size doesn't matter. At least that's what they say. I thank him, and holds his hand firmly while I tell him in Norwegian that I hope he can solve some of his problems, that I feel really sorry for him, that we have eaten very well, and that we will send him positive energy in the future. He listens to me, sobs some more, and says something I don't understand. We go out in the rain. The drunk man emerges. He staggers over to the bike, points at the wet seat, at Capa, and indicated that she should not sit down on the wet seat. He "tells" us to wait while he fetches a rag to dry the seat. The he staggers across the piazza and into a house as fast as he can. We stand for a while. It is raining for God's sake; we just get on the bike, fire up, and ride off. The road from Kosmas down towards the sea is an excellent road for riding. Even though it is raining. I guess the young man crashed his car here. Maybe he had three small children, parents to take care of, and a pregnant wife. Life can be hard enough without evil people adding misery to it. Down by the sea we find the town Gytheio. We stop for coffee at a bar. The bar is part of a Hotel Saga. It is warm inside, it is raining outside. Let's call it a day. I get flashbacks from our early days. You know: A young couple stops for coffee, talks privately for a while, and then asks for a room. Notice the octopus hanging outside; there is obviously a seafood restaurant here. When we check in the host informs us it is holiday tomorrow. I ride off and find a gas station. For antipasti bread with some greasy pasta (mayonnaise?). Not to our liking (too greasy). But then s fish soup (to the right on the picture) and rice with camberetti (large shrimps). Both very nice indeed. In particular the rice! And when I ask for a grappa I get a grappa. Can a man ask for more? After dinner I surf over to ADVrider (surprise!) and in the "planning thread" I agree with Mr. Catrionhead that he reserves a room for us in Kalamata tomorrow. We're all set, and run off to our room. We rode no more than 165 km today. An interactive map with all the photos can be foundhere. Your report is extraodrinary, your ability to pass your view of the things to us amazing... Although I have visited all of the places you have passed (till this update of your report) I find reading your texts very interesting. You are not just describing a ride, your are presenting yourself to us and I believe everybody in here likes what he sees... I have some objections on few of the conclusions about things in Greece or Greeks themselves your way of thinking leads to, but I will state them after your report is over. Still thinking of how unfortunate it was that I didn't get a chance to meet you, as I learned too late that you were coming this way... I really like the way your own personality comes across, making your contributions somehow more than “just” ride reports. Having ridden down to the Peloponnese in September, I have vivid and fond memories of the experience, perhaps especially of the Mani peninsula. And after your disappointments with thin watery wines, I hope you managed to try some of the Mani’s outstanding Monemvasia reds? Like you, I also found Nafplion, and in particular San Gimigniano somewhat synthetic in their too-immaculate state of restoration and preservation. In San G. I had a close look at the sheer craftsmanship of the paving stones and gutters; a bit like the perfect hair-do that leaves you wondering if it’s really a wig... If we refrain from looking at the lady sleeping next to me in the bed, the best thing one can imagine looking at when waking up in the morning, that is a veranda and blue, Greek ocean. It is Thursday 25th of March on our 14th day of vacation in Greece. We are in Gythio. The plan for today is to ride to the End of the World, and then to Kalamata. In Kalamata we hope to meet Mr. Castrionhead from ADVrider. The table is waiting for me and a glass of water. Sitting there I can watch the ocean, and the people I can hear going about their lives out on the street. But then again, my woman is here. The bed is warm. The nagging needs of the body requires me to get up, regardless of how much I would like to remain under the sheets. Then a light breakfast where we meet a Swiss couple. They've seen our Italian bike, but are disappointed to hear that they can not improve their Italian by speaking to us. We let him improve his English instead :-) The host tells us is the Liberation Day today. But not the end of WW-II but rather liberation from the Turkish occupation (but I am sorry to admit I forgot to ask when that happened). We are also told that summer time will come in effect Saturday. But, if you recall, two weeks ago (Third day of Riding in Greece" a member of the crew stood looking at my morning-stiff private parts as I got out of bed. That happened because of summer time. Our host explains that Greece starts summer time two weeks after the rest of Europe. Oh - OK. So maybe the ferry to Igomenitza was on time, after all. When we arrived in Gythio yesterday it was raining. We didn't notice they have problems with a Napoli-style strike here too. We haven't seen anything like this anywhere so I assume it is a local problem. But notice, please, the building behind the orange machine. Just as southern Italy, Greece is full of half-finished and abandoned buildings. It is ugly, ugly, ugly. Here, as in Italy. I am willing to bet a above-average bottle of Chiantio Classico that capital that are left to rot like this, that capital comes from the black sector of society. Here, as in Italy. I can not envision how white money, already taxed, would be wasted to such a degree. But what do I know? Gythio is at the north-eastern end of Mani. Mani is a peninsula sticking out towards the south from Peloponnese. At the end of Mani, where the World as we know it ends, there is a temple. I haven't found anything on Google about it so it is a fair assumption that we will not meet any (other) tourists there. So, let's go there. The main road on Mani follows the west coast. That is why we are riding on the east coast. The road is of varying quality, but well paved. We like the ride along the sea. The terrain is barren, rocks and some grass, and then the blue sea. Notice abandoned building. We managed to roll from the hotel at nine thirty. It has rained all night but now there is some sun. The road is drying up fast. When we arrive at Kotronas it is time for coffee (even though we don't expect to get anything but "coffee"). There is only one "bar", and the old lady seems surprised that we prefer to sit outside. There is no-one inside, but a large TV on full blast. It is nice and warm and even if there is no sun right now, the ocean is calling for us to watch it. We have stopped talking about the "coffee". Instead I dream of smoking a cigarette. These quite mornings are dangerous. If She wasn't here I might not have been able to resist. It is very, very quiet. Kotronas is at the bottom of a deep bay --- dare I use the word fjord? --- the beach looks fantastic even though it is too cold now. If you're in Greece on a warm summer day, punch N36.61954 E22.49442 into your GPS and go there! After "coffee" we continue south. On our way out of the village we meet to donkeys (on their way home?). Donkeys? Let me tell you about the [TaSK]-indicator of agriculture. Based on empirical studies of the world as seen from my bike I conjecture that the profit you can make from agriculture, and thus the possibility of making a living from it without subsidizes, is inversely proportional to the number of donkeys you see. This accuracy of this economic indicator increases with gross national product. Where did I last see a donkey? In Sicilia. QED. There are countless villages. All on hills, a good distance away from the sea. Look at the two images above. One shows a village on Mani, the other a similar sized one in Norway. Two things are immediately evident: Even though the weather on Mani is much, much, much better, if you intended to live from fishing, Norway was a better place to live. No-one would have carried stone after stone all the way up on a hill unless it was really, really necessary. Or, if you like, life here was probably dangerous. Pirates and what-not would probably arrive and wreck havoc on your life. For no good reason other than greed. Then it is obvious that even far, far north the rain and generally bad weather "works". It is green. Lush green (as opposed to Mani, at least). We ride south on Mani and I think about the hardship. Living here, being tormented by pirates while you try to scrape food for you family from those barren rocks. There is no luxury here. Not a single house is painted or plastered. I feel lucky and privileged as I am able to ride and watch this on a motorcycle in the 21st century. On a different note: This is how I envisioned Greece: Dry and barren. Fortunately I have seen lots of mountains and forests to balance the image. If you again check out the image from Norway above, the water you see is not a lake but rather the ocean. In Norway, the word "coast" means a deep strip of land. That is, "the coast" starts far in land and continuous far into the sea. In Italy, and Greece most places, the coast is a beach. A line. On one side of the line there is land, on the other the ocean. In Norway, most places, when you first meet the salt water you are 100 km (or more!) away from the ocean. The fjords makes the sea and the land meet. Land changes gradually into sea. How nice it would have been to be here in summer, park the bike, walk down to that little beach just there, undress, take Capa's hand, and walk together into the blue-green water! Two more economic indicators. These two stood idle outside a half-finished and abandoned building. But there is something else strange here. We have ridden all the way from Gythio down on the east coast of Mani. Where are the bars? Where are the sources of income? Where do tourists stop and depart with their money? Is this a natural reserve? Finally we arrive at the End of the World. Temple on the left, bike on the right. As it should be. If you travel to the other end of the world, you end up at Nordkapp, Norway. There, in 1988, I had to pay 150 NOK (about 20 euro) to get in. In 1988. There is a large installation, a hotel (I think), a restaurant, an underground tunnel leading all the way to the cliff, and so on. Here, it is free. I don't know if I like it or not. Yes, I like that it is free. But I should have been required to pay something. Maybe no-one comes here? There is no space for parking so maybe no buses with tourists arrive here. How can you go to Greece and not visit the End of the World? Well, when I think about it, most of all those who visit Greece probably have other things on their mind than the End of the World. This is an "old place". By this I mean that people have been coming here for more than 2.000 years. The first thousand probably to talk to the oracle. The last thousand years to see the place itself. In contrast Nordkapp is a (very) modern place. People started to venture there only about 1900. As "a place" it is about hundred years old. Here is a suggestion for a book (named "From one end of the world to another"): A couple starts their vacation at Nordkapp (a new place). As they drive south towards Greece and Mani (an old place) they start to talk about more and more things in their past. We understand that, basically, they are (still) together because they are so used to it, and any line of thought in any other direction leads to unpleasantness. When they are at the New Place we get the impression that their problems are new and life just needs some adjustments to make it. As they slowly approach the Old Place we understand that the root is, well, older and probably not "fixable". At the very end, she leaves him and walks away. The ending, of course, is Ibsenique. The book needs to be written as a Ride Report where the unraveling of their life must be carefully woven into the report itself. Any takers? It is not true that there is nothing at the End of the World. There is a small trattoria and bar. It looks closed, but a lady sits in the yard working; making preparations for lunch, I guess. While the First Officer takes pictures of old things, the Captain talked to the lady and arranges for us to have a coffee and a piece of cake. There are, however, things that indicate She needs to work on her Greek. We get bread, "coffee" and freshly boiled cabbage. I take it the old lady has a amazing story to tell her family over lunch: There was this couple here in the morning. They insisted to have cabbage and coffee; I offered her cake but she insisted on cabbage! I will never understand those foreigners. After this little snack we start on our ride north. We're on our way to Kalamata. There we'll meet (yet) another ADVrider. There are many things to be said about meeting in Reality your Internet friends. But one thing is for sure: It is exiting! The west coast looks like the east coast: Barren with small villages as eagle crests on the peaks. We start to worry about lunch. Nothing is worse than worrying about lunch. Finally (finally!) we find a trattoria (taverna). It is ultra simple. To the right you see the daughter serving the grand children. The grand mother is cooking while the grand father is setting the tables. One table for the two grand children, one for us, and one for the adults in the family. That is all. As I sit at our window table I think about those who travel to, say, Creta. If you Google "hotel crete" you get 2.370.000 results (I'm not joking; try it!). Nothing wrong with Crete (I guess), but I prefer this. There is no menu, and if there was, we wouldn't be able to read it. After the cabbage an hour ago I am a little skeptical to let the Captain negotiate the terms here. But she does just fine. First we get fried chicken, then fried fish. This is the best fried chicken I have ever tasted. It is perfectly fried! Not greasy at all, but still cooked all the way through. With a lemon and herbs from the garden. Oh my, oh my. Then the fish: A large filét perfectly fried, served with potatoes potatoes and lemon. The tastes are full, natural, not too many, and distinct. The food hasn't been "designed" on the plate. No fancy artwork. Just food. Served without frills, fully confident that the food speaks for itself. No need for silverware or well groomed waiter. The best meal in Greece! By far! After having eaten the children run around and play. Obviously, talking to travelers is fun. The little one is getting ready for his after-lunch nap it seems. How nice it is to see children. In Italy you don't see children any more. Because there are (almost) none. It is an understatement to say that the current political leadership in Italy is not known for it's analytical abilities. Italy has outstanding highways, but almost no kindergartens. Good pensions, but no support for students. Not long ago I spoke with a young woman. She is a doctor. She told me that the statistics showing the number of children per woman, which is already alarmingly low, is utterly misleading. The point is, she said, that no-one under 30 years have children any longer. The age-curve for first birth is severely scewed, and it is getting worse. She said that less than 20% of all women under 30 have had their first child. "I", she said, "would love to have children". But then I must give up my dream of getting a fixed position here at the hospital. Tragic. having eaten such a good meal we don't want to end it with "coffee". We are approaching a big city so it might be possible to find coffee. And, lo and behold, after a few kilometers we find a trendy bar. With coffe (not "coffee") and a cake (not "cabbage" and not "cake"). Bliss. We approach Kalamata, and after some SMS-ing we meet the Honorable Mr. Castrionhead. He rides a mighty fine 1951 BMW. He even wears a helmet! That alone makes me happy. He even sports a beard, like me. We're probably the only two bearded men in Greece at this time. At least, we haven't seen anyone else. But then again, he wears a helmet so maybe he isn't Greek after all. He'll take us to the hotel where he has booked a room for us, and then we'll meet for dinner. On the way into town he occasionally points out some house or a piazza. I try to remember them, but after a while there are simply too many. When we pull up outside the hotel I tell him that if he want's to guide us to the city, riding in front and pointing at buildings isn't the way. "Pointing?" he says. "I was blinking". My bike is so old that I don't have indicators. We obtain some advice on what to do tomorrow. Talking to locals can be a pain: Some say "Everything is wonderful - you must see everything." He doesn't say that. He says "Go to Olympia. Easy to find, an UNESCO site, definitely worth it". So we decide to go. Even though this isn't a "museum and ruin"-tour. His non-emotional advice tips the scale. It shall turn out to be an excellent advice. The hotel offers WI-FI. But the guy in the reception doesn't know the access code. So no WI-FI. During dinner, which start with filled peppers (paprika) we get a sober presentation of the crisis. This time, Germany is not blamed. Not USA. Not EU. Only the Greeks themselves. He draws a much grimmer picture than I had previously understood. During the last decade, the Greek have had an increase in their standard of living that far surpassed the increase in Germany, for example. He points out two important factors: First that that this increase has been funded by loans, not production. Second, what is important is not how much money you have, but if you have more or less than yesterday. If you have more or less that people in Germany or Italy, well, that is mostly an academic observation. Or, in other words: Using less money in Greece will mean that the standard of living must go down. Not only the growth must stop, the standard must go down. And that is not a prospect of the future that will go well with people. Furthermore, anyone who is sober will understand how these things are connected. We are 12 million people and we have raked up a whopping 300 billion (milliardi) euro in debt. That is 25.000 euro per person. This means that first of all we must go down in our standard of living to a level that can be sustained by the economy, and then, to add humiliation to injury, we must each of pay back 25.000 euro that has been borrowed in our name. These two things at once! In this situation it is a real problem that the Greek speak English, and also other languages. You create a crisis in Italy, Spain or France and no one can leave. But here, youngsters can leave the mess behind and start some other place. We have a long tradition of emigration from Greece, but we really need all the brains and hands here now. He says he is very sorry that the word Macedonia is not kosher, and that nothing good will come the obsession many Greeks have with that. We eat mezdhes. In Italian it is called merenda and means "a tiny bit of food, outside of the time of a meal". We would not under any circumstances have been able to get hold of so much good food without his help. In the end, Castrionhead tells us that it is the birthday of his best friend today, and that he really should be there. Knowing that we are even more grateful for the time he has used on us. Thank you for your time, for talking to us about Greece, and advice and insight about many things. Your old BMW is indeed nice! Readers Be Aware: The above opinions are mine, and mine alone. Mr Castrionhead might have said something completely different, but this is what I recalled that he said. You can not hold anything you have read here against him! We rode 196 km today. An interactive map with the photos can be found here. Tomorrow, on our next to last day in Greece, we'll ride to Olympia. There we'll meet another ADVrider. just jumping in to wish a happy new year. hoping 2011 is another adventure another trip more places and different people. maybe 2011 will be the turning point and Bamsefar (correctly spelled?) will retire, maybe it will carry on for yet another year. time will tell, the future is unwritten and I'm grateful for that.
Chairman Clifford Taylor is chairman of the Board of Directors of the Mackinac Center for Public Policy. Taylor, former Chief Justice of the Michigan Supreme Court, received his B.A. from the University of Michigan and J.D. from George Washington University. He served as a Justice on the Michigan Supreme Court from 1997 to 2008 and twice served as Chief Justice. Before service on the Supreme Court he was a Judge on the Michigan Court of Appeals for five years. Prior to his judicial service, Taylor was a lawyer in Ingham County, where he practiced for 20 years with the final 16 as a partner in the firm of Denfield, Timmer and Taylor. In his professional career, Taylor served on the Michigan Board of Law Examiners, the Michigan Commission on the Courts in the 21st Century, and the Board of Directors of the National Conference of Chief Justices. He has served his community in many capacities including on the executive and financial committees for the Chief Okemos Council of the Boy Scouts and on the board of directors for the Michigan Dyslexia Institute.
from setuptools import setup setup( name='stanfordcorenlp', packages=['stanfordcorenlp'], version='3.9.1.1', description='Python wrapper for Stanford CoreNLP.', author='Lynten Guo', author_email='[email protected]', url='https://github.com/Lynten/stanford-corenlp', keywords=['NLP', 'CL', 'natural language processing', 'computational linguistics'], install_requires=['psutil', 'requests'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Intended Audience :: Education', 'Intended Audience :: Information Technology', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Topic :: Scientific/Engineering', 'Topic :: Scientific/Engineering :: Artificial Intelligence', 'Topic :: Scientific/Engineering :: Information Analysis', 'Topic :: Text Processing', 'Topic :: Text Processing :: Linguistic', ], license="MIT License", )
When wealthy people espouse left-wing causes, such as redistribution of wealth, those on the right often label them hypocrites. “If you are so concerned about equality, why don’t you give up some of your own income first?” is the usual retort. This response can have a powerful dampening effect. Most people do not like to think of themselves as hypocrites. So the wealthy are faced with a choice: either give away some of their assets and then campaign against inequality, or just keep quiet. Most prefer the second option. This is unfortunate, because global inequality is reaching intolerable levels. What’s more, wealth tends to remain in families over time. Inequality is becoming dynastic, with some people born rich and vast numbers who are poor from the moment they appear on Earth. The injustice of this is so grotesque that just thinking and talking about it should prompt us to demand corrective action. But by stopping the most influential segment of society from expressing dissent, the right has stymied the first step in this process. We now have plenty of statistical evidence of inequality, thanks to research by Thomas Piketty, François Bourguignon, Branko Milanović, Tony Atkinson, and others. For example, Oxfam’s latest annual report estimates that the 26 richest people on earth own the same wealth, or have the same net worth, as the 3.8 billion people who comprise the bottom half of the world’s wealth distribution. Moreover, according to Oxfam, the combined wealth of the world’s billionaires grew by $900 billion last year, or nearly $2.5 billion per day. Inequality within countries is also spiking. The World Inequality Report 2018 estimates that the sharpest increases in wealth concentration at the top are occurring in the United States, China, Russia, and India. Related Content Future Development Rethinking global poverty reduction in 2019 Future Development The future of inclusive growth Op-Ed The ethics of reducing inequality True, a certain amount of inequality is both inevitable and essential to drive the economy. But inequality today far exceeds this “Goldilocks” level. Regardless of the continuing debate about how exactly to measure wealth and income inequality, there can be little doubt that both are unconscionably high. Walking through big-city slums in developing countries, witnessing the squalor and misery of the poor and homeless in rich countries, and looking at the homes and lifestyles of the rich anywhere, the need to address the current situation becomes clear. Moreover, the right to call attention to that need must not be restricted to the poor. The right-wing response that silences rich people with left-leaning views may look reasonable at first, but it is a non-sequitur. You can be well-off, rich, or super-rich, and unwilling to give up your wealth unilaterally, yet still think the system that has allowed you to earn and accumulate so much is unfair. There is no contradiction or hypocrisy in such a stance. Some of the world’s finest thinkers concur. The British philosopher Bertrand Russell famously argued (clearly with himself in mind) that smoking good cigars should not debar one from being a socialist. And American economist Paul Samuelson made a similar point in “My Life Philosophy,” an essay he published in 1983. Samuelson became quite wealthy thanks to the phenomenal success of his textbook “Economics,” which was required reading for undergraduate students all over the world for decades. But he was clear about where he stood politically. “Mine is a simple ideology that favors the underdog and (other things equal) abhors inequality,” he wrote. At the same time, Samuelson admitted that when his “income came to rise above the median, no guilt attached to that.” And he wrote with striking frankness that, although he rejected giving up his wealth unilaterally, “I have generally voted against my own economic interests when questions of redistributive taxation have come up.” Arguably the most famous historical example of a rich person striving for greater equality was Friedrich Engels, whose father owned large textile factories in the greater Manchester area of England and elsewhere. Young Friedrich became radicalized seeing child labor and the suffering of the working classes. Later in life, Engels returned to work for his inherited business so that he could support the efforts of his friend, Karl Marx, to put an end to that kind of profit. No matter what one thinks of the desirability or viability of Marx’s precise proposal, the yearning to rectify gross social inequalities is surely admirable. There is hope today, too. Several of the super-rich, in the US and elsewhere, openly support the broad left and its objective of curbing extreme inequalities. They are willing to endure allegations of hypocrisy for this larger goal, which makes their cause morally powerful. Progressive individuals who willingly give up their own income advantage are admirable. But, whether or not they take that step, they cannot be silent on the need for collective action to tackle extreme inequality, one of the most pressing global issues of our time.
1. Field of the Invention The present invention relates to an improved method for joining tubes of a heat exchanger to an array of fins for the purpose of assembling a heat exchanger. More particularly, this invention relates to an improved method for mechanically joining tubes and fins, in which the tubes are deformed using an external expansion technique that does not involve intrusion into the tube, but instead entails the use of an expansion tool adapted to be inserted between tubes within the tube and fin assembly. 2. Description of the Prior Art Heat exchangers are widely used in various industries in the form of radiators for cooling motors and engines, condensers and evaporators for use in air conditioning systems, and heaters. In their most simple form, heat exchangers include one or more passages through which a fluid flows while exchanging heat with the environment surrounding the passage. In order to efficiently maximize the amount of surface area available for transferring heat between the environment and fluid, the design of a heat exchanger is typically of a tube-and-fin type containing a number of tubes which thermally communicate with high surface area fins. The fins enhance the ability of the heat exchanger to transfer heat from the fluid to the environment, or vice versa. Various heat exchanger designs are known in the prior art. Design variations include the manner in which the fluid passage is constructed and the type of fin used. For example, the passage may be composed of a single and integrally-formed ("continuous") serpentine tube that traverses the heat exchanger in a circuitous manner, or a number of discrete parallel tubes joined, typically brazed, to and between a pair of headers. An advantage with continuous serpentine tubes is avoiding the necessity to form numerous leak-proof joints between the tubes and headers and between the tubes and their interconnecting return bends (elbows) and connector tubes. The fins may be provided in the form of panels having apertures through which the tubes are inserted, or in the form of centers that can be positioned between adjacent pairs of tubes. Conventionally, heat exchangers are manufactured by joining the tubes and fins using a brazing operation or a mechanical expansion technique. Mechanical expansion techniques rely solely on the mechanical joining of the components of the heat exchanger to ensure the integrity of the heat exchanger. As a result, advantages of mechanical expansion assembly techniques include good mechanical strength and avoidance of joining operations that require a furnace operation. However, disadvantages of such techniques include inferior thermal performance due to inadequate contact between the tubes and fins, resulting in reduced heat transfer efficiency. Accordingly, improvements in mechanical expansion techniques have often been directed to ways in which the integrity of the tube-to-fin joint can be improved. Conventional mechanical expansion methods can generally be categorized as being external or internal operations. Internal expansion techniques typically entail forcing an expansion tool into the tubes to physically force the walls of the tubes outward and into engagement with the fins. In contrast, external expansion techniques have generally entailed deforming the tubes with an expansion tool that impacts or presses the tubes into engagement with the fins. While internal expansion methods tend to be characterized by enhanced joint strength and a lower resistance to heat transfer, the intrusion of a tool into the tubes is generally undesirable from the standpoint of the potential for introducing contaminants into the tubes, necessitating post-forming cleaning operations. Furthermore, deformation of the tube walls raises the potential for excessive wall thinning, and therefore reduced strength. Finally, internal expansion methods are not well suited for use with heat exchangers formed with a serpentine tube. From the above, it can be appreciated that it would be advantageous if an improved method were available for mechanically joining the tubes and fins of a heat exchanger. Such a method would preferably result in joint strength comparable to internal expansion methods, but rely entirely on an external expansion technique so as to avoid the disadvantages of internal expansion methods, including the potential for contamination and wall thinning. A preferred technique would also be well suited for use on heat exchanger designs incorporating a serpentine tube configuration.
Q: How do I set up a model validation test on update only if association exists? How do I set up a test that checks validations only on update if the model has an association? Below are the 2 classes and the test. user.rb class User < ActiveRecord::Base has_one :survey validates :first_name, presence: true, on: :update, if: :survey_completed? private def survey_completed? survey.present? end end survey.rb class Survey < ActiveRecord::Base belongs_to :user validates :user, presence: true end user_spec.rb describe "if survey is completed" do let(:user) {User.create(email: '[email protected]')} let(:survey) {Survey.create(user_id: user.id)} it "returns error if phone number has not been completed" do user.first_name = 'test' expect(user.reload.valid?).to be false end end The above test fails, it returns true. Having looked in the console, I can see that the test is failing because there is no survey for my user, so the validations aren't being run. I've tried variations with save!, using reload, and not using reload and the test always returns true. How do I set up the test so that there is a survey associated with the user? For simplicity, I've only shown the relevant code. A: In rspec let is lazy. It isn't evaluated until you use the variable in your code. Since your test does not have survey in it, the line let(:survey) {Survey.create(user_id: user.id)} is never run. For this test, I would explicitly create a survey on user (i.e. user.survey.create) so the validation will run properly.
Reducing the number and impact of outbreaks of nosocomial viral gastroenteritis: time-series analysis of a multidimensional quality improvement initiative. Nosocomial norovirus infections and their control measures disrupt patient care, increase staff workload and raise healthcare costs. To determine the impact on outbreaks of nosocomial viral gastroenteritis, staff and patients affected, and bed closures of a multidimensional quality improvement (QI) initiative focused on education; improved patient surveillance; early automated recognition and notification of infection of index patients; and proactive care and control measures. In a pragmatic, retrospective, observational study, we compared numbers of suspected/confirmed norovirus outbreaks at Portsmouth Hospitals National Health Service Trust (PHT) with regional and national data, before and after a multidimensional QI initiative. We also compared mean daily bed closures due to norovirus-like symptoms. At PHT only we recorded patient and staff numbers with norovirus-like symptoms, and days of disruption due to outbreaks. Annual outbreak numbers fell between 2009-2010 and 2010-2014 by 91% at PHT compared with 15% and 28% for Wessex and England, respectively. After April 2010, recorded outbreaks were 8 (PHT), 383 (Wessex) and 5063 (England). For the winter periods from 2010/2011 to 2013/2014, total bed closures due to norovirus were 38 (PHT; mean 0.5 per week), 3565 (Wessex hospitals; mean 48.8 per hospital per week) and 2730 (England; mean 37.4 per hospital per week). At PHT, patients affected by norovirus-like symptoms fell by 92%, affected staff by 81% and days of disruption by 88%. A multiyear QI programme, including use of real-time electronic identification of patients with norovirus-like symptoms, and an early robust response to suspected infection, resulted in virtual elimination of outbreaks. The ability to identify index cases of infection early facilitates prompt action to prevent ongoing transmission and appears to be a crucial intervention.
BYU Softball Having Another Strong Season BYU has consistently had a strong softball team, and this year is no different. After winning in New Mexico over the weekend, they are now at 26-14 on the season, and 3-0 in conference play. They feature a very potent offense that has been putting up big numbers all year. They have scored more than 10 runs nine different times, and are consistently scoring 7-9 runs. They also have a solid pitching staff, that has thrown 13 shutouts this year, and has only allowed more than five runs twice all season. The highlight of the year in pitching came March 28th when Christine Zinanti threw a no-hitter. Her only walk came against the first batter of the game, who was hit by a pitch. It is unfortunate that TCU doesn’t have a softball team because that means there is no way I will get to see them play. Having been a softball coach, I look forward to any opportunity to watch a quality team play, and that is exactly what BYU has this year.
Q: Importar tabla en línea separada con `;` Quiero importar una tabla de datos separados por ; que podría ver ahí. Lo reproduzco por parte aquí: Price Indices - EURO Currency Date ;Blue-Chip;Blue-Chip;Broad ; Broad ;Ex UK ;Ex Euro Zone;Blue-Chip; Broad ; Europe ;Euro-Zone;Europe ;Euro-Zone; ; ; Nordic ; Nordic ; SX5P ; SX5E ;SXXP ;SXXE ; SXXF ; SXXA ; DK5F ; DKXF 31.12.1986;775.00 ; 900.82 ; 82.76 ; 98.58 ; 98.06 ; 69.06 ; 645.26 ; 65.56 01.01.1987;775.00 ; 900.82 ; 82.76 ; 98.58 ; 98.06 ; 69.06 ; 645.26 ; 65.56 02.01.1987;770.89 ; 891.78 ; 82.57 ; 97.80 ; 97.43 ; 69.37 ; 647.62 ; 65.81 05.01.1987;771.89 ; 898.33 ; 82.82 ; 98.60 ; 98.19 ; 69.16 ; 649.94 ; 65.82 06.01.1987;775.92 ; 902.32 ; 83.28 ; 99.19 ; 98.83 ; 69.50 ; 652.49 ; 66.06 Intento obetenerla con fread pero me devuelva una error : mydat <- fread('https://www.stoxx.com/document/Indices/Current/HistoricalData/hbrbcpe.txt', sep = ";") % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 211k 0 211k 00 0 750k 0 --:-- --:--:-- --:--:-:-- --:--:-- 750k Error in fread("https://www.stoxx.com/document/Indices/Current/HistoricalData/hbrbcpe.txt", : Expecting 9 cols, but line 3887 contains text after processing all cols. It is very likely that this is due to one or more fields having embedded sep=';' and/or (unescaped) '\n' characters within unbalanced unescaped quotes. fread cannot handle such ambiguous cases and those lines may not have been read in as expected. Please read the section on quotes in ?fread. In addition: Warning messages: 1: In fread("https://www.stoxx.com/document/Indices/Current/HistoricalData/hbrbcpe.txt", : Starting data input on line 2 and discarding line 1 because it has too few or too many items to be column names or data: Price Indices - EURO Currency 2: In fread("https://www.stoxx.com/document/Indices/Current/HistoricalData/hbrbcpe.txt", : Unable to find 5 lines with expected number of columns (+ last) El objetivo es construir una cartera mensual reequilibrada de Contribución Igual al Riesgo (Iqual Risk Contribution) con R sobre el universo de inversión STOXX Europe 600 Index. En efecto me dice que la línea 3887 contiene texto después de procesar todas las columnas y que es muy probable que esto se deba a que uno o más campos tienen incrustado sep = ';' y / o (sin escape) '\ n' caracteres dentro de comillas no escapadas no balanceadas Actualización con la respuesta de Patricio Moracho Quería seguir usando fread, dado que es más rápida y hacerlo usando los mismo parámetros anteriores pero me dio las mismas errores aunque añadí skip = 4: > mydat <- fread('https://www.stoxx.com/document/Indices/Current/HistoricalData/hbrbcpe.txt', skip= 4, sep = ";") % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 100 211k 0 211k 0 0 0 0 106k 0 --:--:-- 0:00:01- 0:00:01 --:--:-- 119k Error in fread("https://www.stoxx.com/document/Indices/Current/HistoricalData/hbrbcpe.txt", : Expecting 9 cols, but line 3887 contains text after processing all cols. It is very likely that this is due to one or more fields having embedded sep=';' and/or (unescaped) '\n' characters within unbalanced unescaped quotes. fread cannot handle such ambiguous cases and those lines may not have been read in as expected. Please read the section on quotes in ?fread. In addition: Warning message: In fread("https://www.stoxx.com/document/Indices/Current/HistoricalData/hbrbcpe.txt", : Unable to find 5 lines with expected number of columns (+ last) La otra respuesta de Patricio Moracho funciona. Actualización con la respuesta de Hubert Ronald Parece que no puedo descargar pack (data.tables) porque que no exist. > if (!pack %in% installed.packages()) install.packages(pack) > library(pack) Error in library(pack) : there is no package called ‘pack’ Sin embargo parece que ya tengo el pack porque no lo descargo con la línea del if. A: Hay varios problemas con este archivo: Una primer fila que "rompe" la estructura Otras tres filas que son solo encabezados Una columna de fecha que hay que modificar para poder transformarla en una fecha. Podemos usar una función base como read.table() para leer el archivo en primer lugar: url <- 'https://www.stoxx.com/document/Indices/Current/HistoricalData/hbrbcpe.txt' df <- read.table(url, sep = ';', skip = 4, stringsAsFactors = FALSE) Podemos leer directamente desde la url, el separador es ; y le decimos que ignore las primeras 4 líneas (skip = 4) y no queremos que nos convierta las cadenas en factors mediante stringsAsFactors = FALSE. Lo que nos resta es darle nombres a las columnas, ya que es complicado leerlo directamente de este archivo simplemente hacemos: names(df) <- c('Date','SX5P','SX5E','SXXP','SXXE','SXXF','SXXA','DK5F','DKXF') Y por último, convertimos la cadena de fecha en un Date: df$Date <- as.Date(sub('(.{2}).(.{2}).(.{4})', "\\3-\\2-\\1", df$Date)) Resultado final: head(df) Date SX5P SX5E SXXP SXXE SXXF SXXA DK5F DKXF 1 1986-12-31 775.00 900.82 82.76 98.58 98.06 69.06 645.26 65.56 2 1987-01-01 775.00 900.82 82.76 98.58 98.06 69.06 645.26 65.56 3 1987-01-02 770.89 891.78 82.57 97.80 97.43 69.37 647.62 65.81 4 1987-01-05 771.89 898.33 82.82 98.60 98.19 69.16 649.94 65.82 5 1987-01-06 775.92 902.32 83.28 99.19 98.83 69.50 652.49 66.06 6 1987-01-07 781.21 899.15 83.78 98.96 98.62 70.59 651.97 66.20 Nota: si quieres seguir usando fread, (es más rápida que las funciones base) puedes hacerlo usando los mismo parámetros anteriores mydat <- fread('https://www.stoxx.com/document/Indices/Current/HistoricalData/hbrbcpe.txt', skip= 4, sep = ";")
When do infants begin to follow a point? Infants' understanding of a pointing gesture represents a major milestone in their communicative development. The current consensus is that infants are not capable of following a pointing gesture until 9-12 months of age. In this article, we present evidence from 4- and 6-month-old infants challenging this conclusion. Infants were tested with a spatial cueing paradigm in Experiment 1 (500-ms stimulus-target onset asynchrony [SOA]) and Experiment 2 (100-ms SOA). The results revealed that the younger infants shifted their attention in the cued direction when presented with a pointing gesture and with a foil (i.e., same size and shape as pointing gesture) at both SOAs. Older infants shifted their attention only in response to the pointing gesture at 100-ms SOA. Experiment 3 tested infants' preferences for the social stimulus (i.e., pointing gesture) relative to the foil and a non-social stimulus (i.e., an arrow). The results revealed that infants are biased to selectively attend to the pointing gesture. Taken together, these results suggest that 4- and 6-month-old infants are capable of preferentially selecting and following a pointing gesture. It is theorized that this early capacity assists infants in their developing understanding of triadic forms of communication.
package datadog.trace.agent.tooling import datadog.trace.util.test.DDSpecification class UtilsTest extends DDSpecification { def "getStackTraceAsString() returns the stack trace as a single new line separated string"() { setup: def stackTrace = Utils.stackTraceAsString expect: stackTrace.contains('datadog.trace.agent.tooling.Utils') stackTrace.contains(System.getProperty("line.separator")) } }
Homeless Man Says Couple Who Raised $400,000 For Him Online Have Spent It All A homeless man is suing a couple who ran an online fundraiser to help him off the streets. The fundraiser ended up surpassing anyone's wildest dreams, but after some initial spending the couple refused to release any more money to the man. They claimed that they were reluctant to give it to him because they were afraid he'd buy drugs with it, but now their lawyers have revealed that the money is gone. It all started when the homeless Philadelphia man performed a selfless act of kindness. Late one night Johnny Bobbitt stumbled upon a stranded motorist. The woman, Kate McClure, said she ran out of gas and didn't have any money on her. Bobbitt told her to wait in the car while he walked to a service station and spent his last $20 on gas. He then went back to McClure, filled up her tank and sent her on her way. McClure was so grateful to Bobbitt that she started visiting him at his camp on the streets. She would bring him items, and he would share them with other local homeless people. McClure and her boyfriend, Mark D'Amico, wanted to do even more for Bobbitt, so they started a GoFundMe campaign in hopes of raising a few thousand dollars. The campaign surpassed their expectations, with more than $400,000 pouring in for Bobbitt. McClure said they were getting him a house, a car, and would establish two trust funds so that he would be set for life. A year has passed, and now the couple has admitted through their lawyers that there is no money left. At first they purchased Bobbitt a mobile home, car and some other items, and gave him some cash. They claim he spent all his money on drugs, however, and refused to give him anymore. D’Amico said on ‘Good Morning America’ that they had put $25,000 in an account they opened for Bobbitt, but he burned through it in less than two weeks. He spent all the money on drugs, they claim. By that time, D'Amico and McClure said that after Bobbitt's spending and GoFundMe's cut, there was only about $150,000 left, and that they hadn’t touched it except for $500 Bobbitt loaned them at a casino. They claim they paid him back for that, and even let him keep his mobile home on their land. Bobbitt claimed that the couple were living beyond their means. They started taking vacations and even bought a BMW. The couple denied using Bobbitt’s money and said they spent their own money on all the things they bought. They insisted that the remainder of the money was sitting in their account and that they would be happy to have a forensic accountant go through their books so that the money could be put in a trust for Bobbitt and be out of their hands. A judge ordered the couple to have an accountant review how the money was spent by Friday, but they missed the deadline. On Tuesday morning, their attorney delivered the news that the money is gone. Now, the couple are being investigated for fraud. "It completely shocked me when I heard," said Chris Fallon, Bobbitt's attorney. "It came as a complete surprise to me."
DiDomenico v Kocur (2016 NY Slip Op 04171) DiDomenico v Kocur 2016 NY Slip Op 04171 Decided on June 1, 2016 Appellate Division, Second Department Published by New York State Law Reporting Bureau pursuant to Judiciary Law § 431. This opinion is uncorrected and subject to revision before publication in the Official Reports. Decided on June 1, 2016 SUPREME COURT OF THE STATE OF NEW YORK Appellate Division, Second Judicial Department WILLIAM F. MASTRO, J.P. REINALDO E. RIVERA LEONARD B. AUSTIN HECTOR D. LASALLE, JJ. 2015-05961 (Index No. 18767/12) [*1]Heather J. DiDomenico, appellant, vAnne Kocur, etc., respondent. Ogen & Sedaghati, P.C., New York, NY (Eitan Alexander Ogen of counsel), for appellant. DeSena & Sweeney, LLP, Bohemia, NY (Shawn P. O'Shaughnessy of counsel), for respondent. DECISION & ORDER In an action to recover damages for personal injuries, the plaintiff appeals from an order of the Supreme Court, Suffolk County (Rouse, J.), dated April 6, 2015, which granted the defendant's motion for summary judgment dismissing the complaint on the ground that the plaintiff did not sustain a serious injury within the meaning of Insurance Law § 5102(d) as a result of the subject accident. ORDERED that the order is reversed, on the law, with costs, and the defendant's motion for summary judgment dismissing the complaint is denied. The plaintiff's contention that the Supreme Court should not have considered the defendant's motion for summary judgment because it was untimely is without merit (see generally Miceli v State Farm Mut. Auto. Ins. Co., 3 NY3d 725, 727; Brill v City of New York, 2 NY3d 648, 652). However, we agree with the plaintiff's contention that the defendant failed to meet her prima facie burden of showing that the plaintiff did not sustain a serious injury within the meaning of Insurance Law § 5102(d) as a result of the subject accident (see Toure v Avis Rent A Car Sys., 98 NY2d 345; Gaddy v Eyler, 79 NY2d 955, 956-957). The papers submitted by the defendant failed to adequately address the plaintiff's claim, set forth in the bill of particulars, that she sustained a serious injury under the 90/180-day category of Insurance Law § 5102(d) (see Che Hong Kim v Kossoff, 90 AD3d 969; Rouach v Betts, 71 AD3d 977). In light of the defendant's failure to meet her prima facie burden, it is unnecessary to determine whether the papers submitted by the plaintiff in opposition were sufficient to raise a triable issue of fact (see Che Hong Kim v Kossoff, 90 AD3d at 969). Accordingly, the Supreme Court should have denied the defendant's motion for summary judgment dismissing the complaint. MASTRO, J.P., RIVERA, AUSTIN and LASALLE, JJ., concur. ENTER: Aprilanne Agostino Clerk of the Court
Thanks From: Ted Murphy 08/28/2000 01:36 PM To: John Arnold/HOU/ECT@ECT cc: John J Lavorato/Corp/Enron@Enron, Frank Hayden, Sunil Dalal/Corp/Enron@ENRON, Vladimir Gorny/HOU/ECT@ECT Subject: Re: John, Delainey asked Buy and Skilling to extend it for the next two weeks. Consider it extended thru 9/12/00. Ted
Q: When starting a system call, how are user-mode ss and esp saved, e.g. in linux? I know user-mode ss/esp should be saved into the kernel-mode stack for later restore. The question is that to locate kernel-mode stack, ss/esp have to be loaded with the corresponding kernel-mode values first. Now it seems to me that user-mode ss/esp have been flushed. Then how does the hardware/system retrieve the user-mode ss/esp? Are user-mode ss and esp saved in some temporary places? Or the operation is supported by x86 circuit? A: Think about what happens with the instruction pointer. Clearly there must be some hardware support in there somewhere. Putting aside modern "fast system call" techniques (I'll return to this later), note that a system call is requested by just issuing a specific software interrupt with certain processor registers set up appropriately. So what happens then is down to the interrupt hardware in the processor. When an interrupt occurs, the processor automatically pushes various registers and other information (things like the instruction pointer, and other stuff that could be modified even before the handler gets a chance to save them) onto the kernel stack. Additionally, if the processor is currently not in kernel mode, it pushes the stack pointer and stack segment register onto the kernel stack and transitions to kernel mode, executing the interrupt handler. Now if we look at "fast system calls" (the SYSENTER instruction), we note that it requires some machine state registers to be already set up, and it doesn't save state (this is part of what makes it faster than issuing an interrupt). The calling code is responsible for placing in the unclobbered registers the data that the kernel needs in order to execute the system call, and the data it needs to return to its original state.
Validation of a quantitative Eimeria spp. PCR for fresh droppings of broiler chickens. A quantitative Polymerase Chain Reaction (qPCR) for the seven chicken Eimeria spp. was modified and validated for direct use on fresh droppings. The analytical specificity of the qPCR on droppings was 100%. Its analytical sensitivity (non-sporulated oocysts/g droppings) was 41 for E. acervulina, ≤2900 for E. brunetti, 710 for E. praecox, 1500 for E. necatrix, 190 for E. tenella, 640 for E. maxima, and 1100 for E. mitis. Field validation of the qPCR was done using droppings with non-sporulated oocysts from 19 broiler flocks. To reduce the number of qPCR tests five grams of each pooled sample (consisting of ten fresh droppings) per time point were blended into one mixed sample. Comparison of the oocysts per gram (OPG)-counting method with the qPCR using pooled samples (n = 1180) yielded a Pearson's correlation coefficient of 0.78 (95% CI: 0.76-0.80) and a Pearson's correlation coefficient of 0.76 (95% CI: 0.70-0.81) using mixed samples (n = 236). Comparison of the average of the OPG-counts of the five pooled samples with the mixed sample per time point (n = 236) showed a Pearson's correlation coefficient (R) of 0.94 (95% CI: 0.92-0.95) for the OPG-counting method and 0.87 (95% CI: 0.84-0.90) for the qPCR. This indicates that mixed samples are practically equivalent to the mean of five pooled samples. The good correlation between the OPG-counting method and the qPCR was further confirmed by the visual agreement between the total oocyst/g shedding patterns measured with both techniques in the 19 broiler flocks using the mixed samples.
As with much of this highly atypical presidency, the Trump administration’s United Nations (UN) policy is still taking shape. But for the past six months, Ambassador Nikki R. Haley has been a vocal presence at the United Nations and has had one of the higher public profiles among Trump’s foreign policy team. How Haley fares will depend on her influence in a White House that remains deeply ideologically divided over America’s role in the world. President Trump came into office with scant regard for the United Nations and a general skepticism about multilateralism. But while he and some close advisers share a narrow “America First” conception of US global interests, other administration figures hold a more globalist outlook. On certain issues, including the importance of America’s global leadership[^1] and alliance networks, Haley is notably closer to the Republican mainstream than to Trump and the America firsters. Although Haley is not at the epicentre of foreign policy formation and her public profile does not correspond to significant access to Trump, the United States’ UN policy could evolve under her stewardship to focus on parts of the organisation that the Trump administration finds useful to advancing US interests. The White House has already recognised the UN Security Council’s (UNSC) convening power during the ongoing North Korea crisis, while also aware of its limits. And on some UN issues — such as the response to Russia’s actions in Ukraine and Crimea — there has been a fair amount of continuity with the Obama administration’s approach. Still, amidst competing worldviews, unclear policy guidance, and an erratic president, it is too early to tell how the administration’s UN policy will unfold. Canberra should prepare to manage potential divergences with Washington over UN engagement — including on human rights now that Australia is joining the UN Human Rights Council in 2018 — and over the broader merits of the United Nations and multilateralism. A surprise appointee Nikki Haley was one of President-elect Trump’s first cabinet picks, before James Mattis for Defense or Rex Tillerson for State. Her nomination was to some extent a surprise. Not only had Haley been a critic of Trump during the primary campaign, but — in a significant break with tradition — she was a foreign policy novice.[^2] The Trump transition team instead prized her reputation as a dexterous and media-savvy governor with links to mainstream Republicans.[^3] Her experience managing South Carolina’s budget and bureaucracy, and negotiating with its legislature, was viewed particularly favourably as standing her in good stead to push for UN reform.[^4] While message discipline has not been a priority for President Trump, it appears Nikki Haley got too far ahead of the White House and State Department on some policy positions. Before his inauguration, Trump labelled the United Nations as “a club for people to get together, talk and have a good time”.[^5] But he was not completely opposed to the organisation, and, notably, did not choose an ambassador who was ideologically at odds with its mandate. During her congressional testimony, Haley pointed to the United Nations’ successes, including its global health and food programs, and argued America’s interests would be better served by a reformed United Nations.[^6] Her appointment was something of a relief to many UN bureaucrats, diplomats, and US officials who believed that although Haley might shake up the organisation, she would not tear it down.[^7] While some diplomats were disconcerted by Haley’s public admonishments,[^8] in general they found her to be likeable and willing to negotiate if she could still achieve political wins. In an apparent sign of her prominence, Haley was dual-hatted as ambassador to the United Nations and member of cabinet. Holding a cabinet position is unusual for Republican UN ambassadors — though not for Democrats — and it is notable that she negotiated this with Trump. She was also given a seat on the National Security Council’s (NSC) top decision-making body, the Principal’s Committee. Haley accordingly felt a fair amount of latitude to put forth strong policy positions that differ, at times, from those of the president. Indeed, her criticism of Russia was useful for the White House as evidence of a strong stance on this issue.[^9] US Ambassador to the United Nations Nikki Haley Getty Images Haley’s profile has risen quickly despite her steep foreign policy learning curve. She has spoken openly in UNSC debates and press briefings against Russia’s actions in Ukraine, Crimea, and Syria.[^10] In contrast to President Trump and Secretary Tillerson — who have made it clear that promoting human rights would inhibit the advancement of US security and economic interests — Haley has embraced the issue of human rights. She has spoken passionately on the plight of Syrian refugees and Venezuelan protesters, for example, and convened the first UNSC debate on human rights during the United States’ Security Council presidency in April.[^11] Haley also threatened to withdraw the United States from the UN Human Rights Council after criticising its membership and anti-Israel stance. Humanitarian assistance became a focus for Haley as she visited Syrian refugee camps in Jordan and Turkey, and discussed combating famine (including in Yemen and Somalia) with Ivanka Trump. On these issues, Haley has adopted a front-footed media posture which appears all the more prominent in light of Tillerson’s more reticent approach. Many even presumed she had sights on higher office and was cultivating an audience beyond UN issues.[^12] Yet an outsized public image and some policy latitude do not necessarily equate to access and influence. While message discipline has not been a priority for President Trump, it appears Haley got too far ahead of the White House and State Department on some policy positions.[^13] Both have since made it clear she should more closely follow State Department guidance (when it exists), and seek approval for comments on high-profile issues such as North Korea and Syria. Moreover, Secretary Tillerson appears to have significantly more access to and influence with Trump than Haley. She is nonetheless in a reasonably good position to shape aspects of UN policy. Policymaking in the Trump administration A key determinant of Ambassador Haley’s influence — and the White House’s UN policy overall — will be the shifting balance of power between different ideological camps within the administration. Haley is closer to the Republican mainstream than many of Trump's advisers. She has a far more internationalist outlook than Steve Bannon, Stephen Miller and other America firsters, whose views lay behind Trump’s withdrawal from the Paris climate agreement and Trans-Pacific Partnership. Like Defense Secretary Mattis and National Security Advisor H.R. McMaster, Haley has stressed the strategic value of alliances and global engagement and expressed skepticism about Russia. Still, her focus on issues such as human rights and humanitarian assistance, combined with her use of the media and the UNSC’s bully pulpit, make her appear more of a standalone figure from the rest of Trump’s foreign policy team. Haley has a far more internationalist outlook than Steve Bannon, Stephen Miller and other America firsters, whose views lay behind Trump’s withdrawal from the Paris climate agreement and Trans-Pacific Partnership. A problematic national security policymaking process may have added to Haley’s profile as a more individual voice in the administration. For the first few months of the new administration, for example, the US Mission to the United Nations in New York, where Haley is based, appeared to operate largely independently of the State Department,[^14] with reporting lines apparently running through the NSC instead.[^15] While McMaster has sought to make interagency coordination between different parts of the foreign policy bureaucracy more orderly, it has been vulnerable to competing worldviews and Trump’s impulsiveness (though this might improve somewhat with new White House Chief of Staff John Kelly).[^16] These bureaucratic failings are compounded by a slew of unfilled positions in the national security apparatus. Self-inflicted scandal and the president’s message indiscipline have also slowed the policymaking process. As a result, notwithstanding some dramatic policy U-turns such as on trade and climate, there has thus far been a fair degree of continuity with the Obama administration’s foreign policy, including at the United Nations.[^17] Furthermore, the State Department itself is a low priority for the administration. It is the target of proposed budget reduction of approximately 30 per cent and remains denuded of critical personnel.[^18] Tillerson has prioritised other issues ahead of UN policy and he does not expect to make new personnel appointments until 2018, after his strategic review of State and its mission is complete.[^19] This has contributed to the lack of policy coordination between Ambassador Haley and the department on certain issues, such as human rights and Syria.[^20] The White House and State have sought to address this by adding a degree of oversight of Haley, though there are ongoing differences over UN priorities, including for the UN General Assembly in September.[^21] Haley and America’s UN policy Ambassador Haley’s efforts at the United Nations defy easy classification. She has differed from Trump on a number of issues central to the United Nations’ functioning and core mandate, including human rights and humanitarian relief.[^22] On some issues where initial White House or State Department guidance was lacking — like Russia’s actions in Crimea and Ukraine — she has continued similar policies to the Obama administration.[^23] But on other issues, Haley has embraced positions squarely in line with the views of the president, not least in her strong pro-Israel stance and focus on addressing what she deems to be the United Nations’ anti-Israel bias. Haley appears to have helped elevate the United Nations’ profile with the president to a small extent and has possibly moderated his UN skepticism slightly. It is notable Trump met with UN Secretary General Antonio Guterres and, separately, with the 14 UNSC ambassadors in Washington just a few months into his administration.[^24] The fact that Trump declared his belief in the United Nations’ potential as a conflict prevention and crisis management body, and suggested that budget reductions may be less pressing if broader objectives are achieved, may imply a slight softening of his UN skepticism. Ivanka Trump’s focus on combating global famine might also have helped shape the president’s views on the United Nations’ utility, and Haley’s discussions with Ivanka Trump are likewise notable. US Ambassador to the United Nations Nikki Haley Getty Images Accordingly, it is possible — though by no means certain — that the administration’s UN policy could evolve under Haley’s stewardship to focus on selective parts of the organisation which are deemed to be useful.[^25] Key officials have already recognised the United Nations’ convening power and diplomatic role it can play in the North Korean crisis. For example, Tillerson used his first appearance at the United Nations to chair a Security Council session on North Korea; while Haley used an emergency session to set out America’s position and press China and Russia to increase pressure on Pyongyang in the wake of its intercontinental ballistic missile test on 4 July. Haley is also working with UNSC counterparts to bolster sanctions and their implementation.[^26] An acute crisis in South Sudan or Syria, for instance, could force the administration to become even more aware of the United Nation’s usefulness as a crisis management framework within which resources can be pooled and US interests advanced.[^27] All of this is a long way from embracing the United Nations as an integral part of the post-1945 international order.[^28] Indeed, President Trump has demonstrated that he will blithely reject the multilateral conventions that lie at the heart of this order. While Haley mounted a powerful indictment at the UNSC against the Assad regime after its April chemical weapons attack, Trump ordered a retaliatory missile strike unilaterally and without recourse to the council (although this would likely have been vetoed). This suggests Haley might be able to use the United Nations to advance US interests on issues of importance to the president — working the organisation into the administration’s modus operandi — but will not fundamentally reshape the White House’s preference for unilateralism. Haley’s approach to UN reform A central issue on Haley’s agenda is UN reform, in light of the White House’s clear expectation that she will reduce American contributions to UN funding. In this task, Haley has signaled a preference for strategic rather than “slash and burn” reform,[^29] and she has so far not pushed too hard for draconian budget cuts.[^30] Washington is the United Nations’ largest donor, with total contributions to its core budget, peacekeeping, and key agencies like the World Food Program, UN High Commission for Refugees, and World Health Organization totaling around US$10 billion annually. The Trump administration’s 2018 budget proposal — which is the first step in a long negotiation between the administration and Congress — seeks steep reductions to UN funding, in particular by cutting the US contribution to peacekeeping from 28.5 per cent of the nearly US$8 billion peacekeeping budget to no more than 25 per cent.[^31] Peacekeeping is a key cost-cutting target because of its sizeable mission budgets,[^32] out-of-step mandates,[^33] and high level of American contributions. In April, Haley announced a review of the 16 current UN peacekeeping operations; and has since declared that the UN budget committee will reduce annual peacekeeping costs by more than half a billion dollars — which will see US contributions fall by around US$200 million.[34] Although this is below the Trump administration’s proposed US$1 billion overall reduction to UN peacekeeping, it has still enabled Haley to claim a win for Trump’s agenda and has demonstrated her capacity to make the United Nations more efficient through budget reform.[^35] A central issue on Haley’s agenda is UN reform, in light of the White House’s clear expectation that she will reduce American contributions to UN funding. In this task, Haley has signaled a preference for strategic rather than “slash and burn” reform. Haley also recognises the critical role Congress plays in America’s UN policy through its appropriations power. Congress negotiates with the White House during the months-long budgetary process that results in the United States’ funding allocation. Haley has therefore focused on leveraging her relationships with mainstream congressional Republicans as she crafts her UN reform strategy. There has been pronounced congressional pushback from members of both parties against the level of the White House’s proposed 2018 budgetary cuts, including from Senator Lindsey Graham, a member of the Senate Appropriations Committee (and, like Haley, a South Carolinian) and Senator Bob Corker, Chair of the Senate Foreign Relations Committee. Other congressional Republicans have also expressed concern that deep budget cuts would threaten US leadership at the United Nations and thus jeopardise US security interests.[^36] While the United Nations has less fervent support on the Hill than the State Department, some of its agencies such as the World Food Program (now headed by another former South Carolina Governor, David Beasley) and the UN Refugee Agency have a reasonable constituency in Congress.[^37] Haley has kept Congress apprised of her strategic approach to UN reform; and while there are some longstanding UN-skeptics in Congress,[^38] influential congressional members recognise the importance of US contributions to the United Nations and its agencies, and the humanitarian impact steep cuts would have. While Congress may scale back the size of US cuts to the United Nations, it is still likely to approve some reduction. How the relationship between Ambassador Haley and Secretary General Guterres evolves — and whether they will work together successfully on UN reform — is an important open question. Guterres — like Haley, a deft politician — recognises that the Trump administration’s emphasis on budget downsizing might be the sort of external shock that a resistant UN system needs to reform its bureaucracy and peacekeeping operations, and focus on conflict prevention.[^39] Haley, however, is juggling somewhat conflicting imperatives: talking tough on UN cuts to appease the White House and other domestic constituencies, while working with Guterres and fellow UN diplomats to achieve a degree of reform. Implications for Australia The Trump administration’s evolving approach to the United Nations and global engagement could run counter to Australia’s global interests. As an active supporter and significant donor to the United Nations, Canberra views multilateral institutions as important venues for middle powers like Australia to advance their interests.[^40] Canberra has won its bid for a 2018-2020 seat on the UN Human Rights Council and promoted Australia as a “principled, pragmatic advocate”[^41] on issues like gender equality, freedom of expression and good governance.[^42] There is wide acknowledgement that Australia’s 2013-14 UN Security Council seat significantly enhanced Australia’s diplomatic reputation as a pragmatic problem solver; and Canberra has launched another Security Council bid for 2029-30. Australia is generally supportive of UN reform and improving UN effectiveness on the ground.[^43] Washington should also be reminded that it is not in US or allied interests for the White House to cede influence to powers such as China or Russia by pulling back from the United Nations and other multilateral institutions. To ward against US policy that might conflict with Australia’s multilateral agenda, Canberra should continue to promote the benefits of the United Nations and multilateralism to this administration. Framing the United Nations as an integral component of the 70-year-old “rules-based order” will be less than compelling to Trump and his team. It is in Australia's interests to instead promote the United Nations as an instrument that can advance US and allied interests by complementing bilateral efforts to tackle pressing international challenges.[^44] Washington should also be reminded that it is not in US or allied interests for the White House to cede influence to powers such as China or Russia by pulling back from the United Nations and other multilateral institutions. Once Australia joins the Human Rights Council in 2018, a sharper divergence with the Trump administration could potentially open up. On human rights issues and the merits of global engagement more generally, Australia might find itself aligning more with European states — particularly if the United States retrenches from its global role. The challenge for Canberra will be to manage these possible divergences on policy while maintaining a robust Australia-US alliance, which remains critical to Australia’s security. Reports published by the United States Studies Centre are anonymously peer-reviewed by both internal and external experts. Endnotes Nikki Haley, Senate Foreign Relations Committee Hearing on the Nomination of Gov. Haley to be U.S. Ambassador to the United Nations, 18 January 2017 available at http://www.thisweekinimmigration.com/uploads/6/9/2/2/69228175/hearingtranscript_senateforeignrelationshaleyconfirmationhearing_2017-01-18.pdf Ambassador Haley’s Democratic predecessors Susan Rice and Samantha Power, for example, were both National Security Council and State Department veterans. Vice President Mike Pence helped bring Nikki Haley into the administration. See also Susan Chira, “Is this the way a woman will reach the White House?”, New York Times, 14 April 2017 And by members of the Senate Foreign Relations Committee. See Committee Chair Bob Corker’s statement on Haley’s confirmation, 24 January 2017, available at https://www.corker.senate.gov/public/index.cfm/2017/1/senate-foreign-relations-committee-approves-nomination-of-nikki-haley-to-be-u-s-ambassador-to-the-united-nations Denis Fitzgerald, “Trump could chair UN Security Council meeting in April”, UN Tribune, 4 January 2017, available at http://untribune.com/trump-could-chair-un-security-council-meeting-in-april/ Nikki Haley, Senate Foreign Relations Committee Hearing on the Nomination of Gov. Haley to be U.S. Ambassador to the United Nations, 18 January 2017 available at http://www.thisweekinimmigration.com/uploads/6/9/2/2/69228175/hearingtranscript_senateforeignrelationshaleyconfirmationhearing_2017-01-18.pdf Phone interview, former US United Nations official, March 2017. In particular, her remark of the UN at AIPAC: ‘I wear heels … because if I see something wrong, I’m gonna kick ‘em every single time.’ Quoted in Anne Gearan, “Trump’s UN Ambassador emerges as fierce but unnuanced voice on foreign policy”, Washington Post, 2 April 2017. Nikki Haley, Remarks at a UN Security Council Open Debate on Conflict in Europe, 21 February 2017; Nikki Haley, Remarks to the press after UN Security Council consultations on the use of chemical weapons in Syria, 24 February 2017. The Council has had previous human rights discussions on specific conflicts, however. See Somini Sengupta, ‘Nikki Haley presides over human rights discussion at UN Security Council’, New York Times, April 18 2017. Somini Sengupta, “State Department Seeks to Review Haley’s remarks”, New York Times, 28 April 2017. See also, for example, Nolan D. McCaskill, “Nine former ambassadors tell Congress to protect UN funding” Politico, 25 April 2017, which quotes Trump’s passing joke to UNSC members that if they didn’t like her, she ‘could easily be replaced’. Meeting in Washington, April 2017. Meeting in Washington, April 2017. See also Vivian Salama, “Haley remains boldly off message as ambassador to UN”, Associated Press, 1 May 2017. It is possible that interagency coordination may improve somewhat with new Chief of Staff John Kelly. Gardiner Harris, “Tillerson in no rush to fill nearly 200 State Department posts”, New York Times, 27 April 2017. Meeting in Washington, April 2017. See also Gardiner Harris, “Will cuts hurt US diplomacy? Tillerson tries to reassure Senate’s worries”, New York Times, 13 June 2017, available at https://www.nytimes.com/2017/06/13/world/rex-tillerson-senate-state-department.html?_r=0 See for example, Nikki Haley’s statement on the situation in Venezuela, 6 May 2017, available at https://usun.state.gov/remarks/7790, and Secretary Tillerson, Remarks to US Department of State Employees, 3 May 2017, available at https://www.state.gov/secretary/remarks/2017/05/270620.htm Richard Gowan, “Is Nikki Haley ready for war”, Politico, 28 February 2017. On possible UN reform, see Alexandra Novosseloff, “Can we make UN peacekeeping great again?”, NYU Center on International Cooperation’s Global Peace Operations, 9 May 2017; and Sarah Cliffe and Alexandra Novosseloff, “Restructuring the UN Secretariat to strengthen preventative diplomacy and peace operations”, NYU Center on International Cooperation, New York, February 2017. Somini Sengupta, “14 top diplomats to meet with Trump over lunch”, New York Times, 24 April 2017. The Security Council visit to Washington was organised by the USUN and NSC, not through State. See Vivian Salama, “Haley remains boldly off message as ambassador to UN”, Associated Press, 1 May 2017. See Ellen Laipson, “Why Trump’s bilateral approach to foreign policy is necessary but not sufficient”, World Politics Review, 28 February 2017; Richard Gowan, “Republicans have long wanted to punish the UN, but Trump might actually do it”, Politico, 28 December 2016. The George W. Bush administration, particularly in its first term, also did not feel bound by multilateral conventions. Nikki Haley, Senate Foreign Relations Committee Hearing on the Nomination of Gov. Haley to be U.S. Ambassador to the United Nations, 18 January 2017 available at http://www.thisweekinimmigration.com/uploads/6/9/2/2/69228175/hearingtranscript_senateforeignrelationshaleyconfirmationhearing_2017-01-18.pdf. See also Kambiz Foroohar and Terrence Dopp, “Republicans press Haley over ‘devastating’ cuts to UN budget”, Bloomberg, 27 June 2017, available at https://www.bloomberg.com/news/articles/2017-06-27/republicans-press-haley-over-devastating-cuts-to-un-budget US Office of Management and Budget, America First: A budget blueprint to make America great again, 16 March 2017, available at https://www.whitehouse.gov/sites/whitehouse.gov/files/omb/budget/fy2018/2018_blueprint.pdf. The United States currently spends more than China, Japan, and German, the next three highest contributors, combined. See Kambiz Foroohar, “US plans review of UN peacekeeping missions”, Bloomberg, 3 February 2017, available at https://www.bloomberg.com/politics/articles/2017-02-03/u-s-said-to-plan-review-of-un-peacekeeping-missions-on-costs. The administration has also withdrawn funding from the UN Population Fund, which provides reproductive and maternal programs. See Center on International Cooperation (NYU), Global Peace Operations graphic, available at http://peaceoperationsreview.org/featured-data#peaceops_contrib; Colum Lynch, “White House Seeks to cut billions in funding”, Foreign Policy, 13 March 2017. Some peacekeeping forces have failed to shield local populations from violence and some have even been involved in sexual exploitation. US Mission to the UN, Press Release, “Ambassador Haley announces over half a billion dollar budget cut in UN peacekeeping”, June 28 2017, available at https://usun.state.gov/remarks/7885 For example, House Committee on Foreign Affairs member Ileana Ros-Lehtinen. See Alexandra Novosseloff, “Can we make UN peacekeeping great again?”, NYU Center on International Cooperation’s Global Peace Operations, 9 May 2017; and Sarah Cliffe and Alexandra Novosseloff, “Restructuring the UN Secretariat to strengthen preventative diplomacy and peace operations”, NYU Center on International Cooperation, New York, February 2017. Permanent Mission of Australia to the United Nations, homepage, available at http://unny.mission.gov.au/ Department of Foreign Affairs and Trade, “Australia’s candidacy for the United Nations Human Rights Council”, available at http://dfat.gov.au/international-relations/international-organisations/pages/australias-candidacy-for-the-unhrc-2018-2020.aspx Department of Foreign Affairs and Trade, “United Nations (UN)”, available at http://dfat.gov.au/international-relations/international-organisations/un/pages/united-nations-un.aspx Elsina Wainwright is Adjunct Associate Professor at the US Studies Centre and a Non-Resident Senior Fellow of the Centre's Alliance 21 Program. Currently based in New York, she is also a Visiting Fellow at New York University's Center on International Cooperation (CIC).
importScripts('primes.js'); var primes = new Primes(); onmessage = function(event) { var p = event.data; if (p != parseInt(p)) throw 'invalid argument'; postMessage([p, primes.test(p)]); }
1 search hit In human neuroscientific research, there has been an increasing interest in how the brain computes the value of an anticipated outcome. However, evidence is still missing about which valuation related brain regions are modulated by the proximity to an expected goal and the previously invested effort to reach a goal. The aim of this dissertation is to investigate the effects of goal proximity and invested effort on valuation related regions in the human brain. We addressed this question in two fMRI studies by integrating a commonly used reward anticipation task in differential versions of a Multitrial Reward Schedule Paradigm. In both experiments, subjects had to perform consecutive reward anticipation tasks under two different reward contingencies: in the delayed condition, participants received a monetary reward only after successful completion of multiple consecutive trials. In the immediate condition, money was earned after every successful trial. In the first study, we could demonstrate that the rostral cingulate zone of the posterior medial frontal cortex signals action value contingent to goal proximity, thereby replicating neurophysiological findings about goal proximity signals in a homologous region in non-human primates. The findings of the second study imply that brain regions associated with general cognitive control processes are modulated by previous effort investment. Furthermore, we found the posterior lateral prefrontal cortex and the orbitofrontal cortex to be involved in coding for the effort-based context of a situation. In sum, these results extend the role of the human rostral cingulate zone in outcome evaluation to the continuous updating of action values over a course of action steps based on the proximity to the expected reward. Furthermore, we tentatively suggest that previous effort investment invokes processes under the control of the executive system, and that posterior lateral prefrontal cortex and the orbitofrontal cortex are involved in an effort-based context representation that can be used for outcome evaluation that is dependent on the characteristics of the current situation.
--- abstract: 'The concept of sums of nonnegative circuit polynomials (SONC) was recently introduced as a new certificate of nonnegativity especially for sparse polynomials. In this paper, we explore the relationship between nonnegative polynomials and SONC polynomials. As a first result, we provide sufficient conditions for nonnegative polynomials with general Newton polytopes to be SONC polynomials, which generalizes the previous result on nonnegative polynomials with simplex Newton polytopes. Secondly, we prove that every SONC polynomial admits a SONC decomposition with the same support. In other words, SONC decompositions can exactly preserve the sparsity of polynomials, which is dramatically different from the classical sum of squares (SOS) decompositions and is a key property to design efficient algorithms for sparse polynomial optimization based on SONC decompositions.' address: | Jie Wang\ School of Mathematical Sciences, Peking University author: - Jie Wang title: Nonnegative Polynomials and Circuit Polynomials --- [^1] Introduction ============ A real polynomial $f\in\R[\x]=\R[x_1,\ldots,x_n]$ is called a [*nonnegative polynomial*]{} if its evaluation on every real point is nonnegative. All of nonnegative polynomials form a convex cone, denoted by PSD. Certifying nonnegativity of polynomials is a central problem of real algebraic geometry and has a deep connection with polynomial optimization. A classical approach for handling this problem is sum of squares (SOS) decompositions. From the perspective of computation, checking whether a polynomial is a sum of squares boils down to a semidefinite programming (SDP) problem involving a positive semidefinite matrix of size $\binom{n+d}{d}$, where $n$ is the number of variables and $2d$ is the degree of the polynomial [@pa; @pa1]. Hence, the size of the corresponding SDP problem grows rapidly with $n,d$ increasing, which greatly limits the scalability of this approach. The concept of sums of nonnegative circuit polynomials recently introduced by Iliman and Wolff in [@iw] is a substitute of sums of squares of polynomials to represent nonnegative polynomials. A polynomial $f$ is called a [*circuit polynomial*]{} if it is of the form $$f(\x)=\sum_{i=1}^mc_i \x^{\a_i}-d\x^{\b},$$ where $\{\a_1,\ldots,\a_m\}\subseteq(2\N)^n$ comprises the vertices of a simplex, $\b$ is an interior point of the convex hull of $\{\a_1,\ldots,\a_m\}$ and $c_i>0$ for $i=1,\ldots,m$. For every circuit polynomial $f$, we associate it with the [*circuit number*]{} defined as $\Theta_f:=\prod_{i=1}^m(c_i/\lambda_i)^{\lambda_i}$, where the $\lambda_i$’s are uniquely given by the convex combination $\b=\sum_{i=1}^m\lambda_i\a_i \textrm{ with } \lambda_i>0 \textrm{ and } \sum_{i=1}^m\lambda_i=1$. Then the nonnegativity of $f$ is easy to decide: $f$ is nonnegative if and only if either $\b\in(2\N)^n$ and $d\le\Theta_f$ or $\b\notin(2\N)^n$ and $-\Theta_f\le d\le\Theta_f$. We say that a polynomial is a [*sum of nonnegative circuit polynomials (SONC)*]{}, if it can be written as a sum of nonnegative circuit polynomials. The set of SONC polynomials also forms a convex cone. Clearly, an explicit representation of a SONC polynomial as a sum of nonnegative circuit polynomials provides a certificate of its nonnegativity, which is called a [*SONC decomposition*]{}. By virtue of SONC decompositions, algorithms were proposed for polynomial optimization problems (see [@lw] for the unconstrained case and see [@dlw; @diw; @dkw] for the constrained case). Numerical experiments for unconstrained polynomial optimization problems in [@pap; @se] have demonstrated the advantage of the SONC-based methods compared to the SOS-based methods especially in the high-degree but fairly sparse case. A comparison with details between SONC and SOS can be found in [@se]. From the perspective of theory, it is natural to ask which types of nonnegative polynomials admit SONC decompositions and how big the gap between the PSD cone and the SONC cone is. In [@iw], it was proved that if the Newton polytope of a polynomial $f$ is a simplex and there exists a point such that all terms of $f$ except for those corresponding to the vertices of the Newton polytope have the negative sign on this point, then $f$ is nonnegative if and only if $f$ is a SONC polynomial (see Theorem \[nc-thm2\]). The first contribution of this paper is that we generalize this conclusion to polynomials with general Newton polytopes. Specifically, we provide sufficient conditions for nonnegative polynomials with general Newton polytopes to be SONC polynomials in terms of combinatorial structure of the supports (Theorem \[npgp-thm7\] and Theorem \[npmt-thm1\]). Moreover, we give a counter example that a nonnegative polynomial does not admit a SONC decomposition if one of these conditions fails. As the second contribution of this paper, we clarify an important fact that every SONC polynomial can decompose into a sum of nonnegative circuit polynomials by just using the support of the original polynomial (Theorem \[sec3-thm2\]). In other words, SONC decompositions can exactly preserve the sparsity of polynomials. It is dramatically different from the SOS decompositions of nonnegative polynomials, where extra monomials are needed in general. This key property of SONC decompositions explains the advantage of SONC decompositions for certifying nonnegativity of sparse polynomials compared to the classical SOS decompositions and is crucial to design efficient algorithms for sparse polynomial optimization based on SONC decompositions. The rest of this paper is organized as follows. In Section 2, we recall some basic facts on SONC polynomials. After that we consider the problem which types of nonnegative polynomials admit SONC decompositions. We deal with the case of nonnegative polynomials with one negative term in Section 3 and deal with the case of nonnegative polynomials with multiple negative terms in Section 4. In Section 5, we prove that every SONC polynomial decomposes into a sum of nonnegative circuit polynomials with the same support. What’s more, we prove that no cancellation is needed in this decomposition. Preliminaries ============= Notation and Nonnegative Polynomials ------------------------------------ Let $\R[\x]=\R[x_1,\ldots,x_n]$ be the ring of real $n$-variate polynomial, $\R^*=\R\backslash\{0\}$, and $\N^*=\N\backslash\{0\}$. Let $\R_+$ be the set of positive real numbers and $\R_{\ge0}$ the set of nonnegative real numbers. For a finite set $\A\subseteq\N^n$, we denote by $\Cone(\A)$ the conic hull of $\A$, by $\Conv(\A)$ the convex hull of $\A$, and by $V(\A)$ the vertices of the convex hull of $\A$. We also denote by $V(P)$ the vertex set of a polytope $P$. We consider polynomials $f\in\R[\x]$ supported on the finite set $\A\subseteq\N^n$, i.e. $f$ is of the form $f(\x)=\sum_{\a\in\A}c_{\a}\x^{\a}$ with $c_{\a}\in\R, \x^{\a}=x_1^{\alpha_1}\cdots x_n^{\alpha_n}$. The [*support*]{} of $f$ is $\supp(f):=\{\a\in \A\mid c_{\a}\ne0\}$ and the [*Newton polytope*]{} of $f$ is defined as $\New(f):=\Conv(\supp(f))$. For a polytope $P$, we use $P^{\circ}$ to denote the interior of $P$. For $m\in\N$, let $[m]:=\{1,\ldots,m\}$. A polynomial $f\in\R[\x]$ which is nonnegative over $\R^n$ is called a [*nonnegative polynomial*]{}. The class of nonnegative polynomials is denoted by PSD. A nonnegative polynomial must satisfy the following necessary conditions. ([@re1 Theorem 3.6])\[nc-prop2\] Let $\A\subseteq\N^n$ and $f=\sum_{\a\in \A}c_{\a}\x^{\a}\in\R[\x]$ with $\supp(f)=\A$. Then $f$ is nonnegative only if the followings hold: 1. $V(\A)\subseteq(2\N)^n$; 2. If $\a\in V(\A)$, then the corresponding coefficient $c_{\a}$ is positive. For the remainder of this paper, we assume for simplicity that the monomial factor of any polynomial $f$ is $1$, that is, if $f=\x^{\a'}(\sum c_{\a}\x^{\a})$ such that $\sum c_{\a}\x^{\a}\in\R[\x]$ and $\a'\in\N^n$, then $\x^{\a'}=1$. Otherwise, we can always factor out the monomial factor. Nonnegative Polynomials Supported on Circuits --------------------------------------------- A subset $\A\subseteq(2\N)^n$ is called a [*trellis*]{} if $\A$ comprises the vertices of a simplex. Let $\A$ be a trellis and $f\in\R[\x]$. Then $f$ is called a [*circuit polynomial*]{} if it is of the form $$\label{nc-eq} f(\x)=\sum_{\a\in\A}c_{\a}\x^{\a}-d\x^{\b},$$ with $c_{\a}>0$ and $\b\in\Conv(\A)^{\circ}$. Assume $$\b=\sum_{\a\in\A}\lambda_{\a}\a\textrm{ with } \lambda_{\a}>0 \textrm{ and } \sum_{\a\in\A}\lambda_{\a}=1.$$ For every circuit polynomial $f$, we define the corresponding [*circuit number*]{} as $\Theta_f:=\prod_{\a\in\A}(c_{\a}/\lambda_{\a})^{\lambda_{\a}}$. The nonnegativity of a circuit polynomial $f$ is decided by its circuit number alone. ([@iw Theorem 3.8])\[nc-thm1\] Let $f=\sum_{\a\in\A}c_{\a} \x^{\a}-d\x^{\b}\in\R[\x]$ be a circuit polynomial and $\Theta_f$ its circuit number. Then $f$ is nonnegative if and only if either $\b\in(2\N)^n$ and $d\le\Theta_f$ or $\b\notin(2\N)^n$ and $|d|\le\Theta_f$. For the concise of narrative, we also view a monomial square as a nonnegaive circuit polynomial. The following proposition characterizes the zeros of a circuit polynomial when the Newton polytope is full-dimensional. ([@iw Proposition 3.4 and Corollary 3.9])\[nc-prop1\] Let $f=\sum_{i=0}^nc_i \x^{\a_i}-\Theta_f\x^{\b}\in\R[\x]$ be a circuit polynomial, $\Theta_f$ the circuit number and $\b=\sum_{i=0}^n\lambda_i\a_i$ with $\lambda_i>0$ and $\sum_{i=0}^n\lambda_i=1$. Then $f$ has exactly one zero $\x_*$ in $\R_+^{n}$ which satisfies: $$\frac{c_0\x_*^{\a_0}}{\lambda_0}=\cdots=\frac{c_n\x_*^{\a_n}}{\lambda_n}=\Theta_f\x_*^{\b}.$$ Moreover, if $\x$ is any zero of $f$, then $|\x|=\x_*$, i.e. $|x_i|=(x_*)_{i}$ for $i=1,\ldots,n$. We shall say that a polynomial is a [*sum of nonnegative circuit polynomials (SONC)*]{}, if it can be written as a sum of nonnegative circuit polynomials. Clearly, an explicit representation of a SONC polynomial as a sum of nonnegative circuit polynomials provides a certificate of its nonnegativity, which is called a [*SONC decomposition*]{}. We denote by SONC the class of SONC polynomials. The following theorem gives a characterization for a nonnegative polynomial to be a SONC polynomial when the Newton polytope is a simplex. ([@iw Corollary 7.5])\[nc-thm2\] Let $f=\sum_{i=0}^n c_i \x^{\a_i}-\sum_{j=1}^l d_j\x^{\b_j}\in\R[\x]$ with $\a_i\in(2\N)^n, c_i>0, i=0,\ldots,n$ such that $\New(f)$ is a simplex and $\b_j\in\New(f)^{\circ}\cap\N^n$ for $j=1,\ldots,l$. If there exists a point $\bv=(v_j)\in(\R^*)^n$ such that $d_j\bv^{\b_j}>0$ for all $j$, then $f\in\PSD$ if and only if $f\in\SONC$. Nonnegative Polynomials with One Negative Term ============================================== Now we study which types of nonnegative polynomials with general Newton polytopes admit SONC decompositions. The well-known Hilbert’s classification on the coincidence of nonnegative polynomials and SOS polynomials is according to the number of variables and the degree of polynomials. As to the SONC case, it depends on the combinatorical structure of the support of polynomials. In this section, we deal with the case of nonnegative polynomials with one negative term, i.e., we assume that the polynomial is of the form $f_d=\sum_{i=1}^mc_i \x^{\a_i}-d\x^{\b}\in\R[\x]$ with $\a_i\in(2\N)^n,c_i>0,i=1,\ldots,m$ and $\b\notin V(\New(f_d))$. Let $\partial\New(f_d)$ denote the boundary of $\New(f_d)$. We first reduce the case of $\b\in\partial\New(f_d)$ to the case $\b\in\New(f_d)^{\circ}$ by the following lemma. \[sec3-lm\] Let $f_d=\sum_{i=1}^mc_i \x^{\a_i}-d\x^{\b}\in\R[\x]$ with $\a_i\in(2\N)^n,c_i>0,i=1,\ldots,m$ and $\b\in\partial\New(f_d)$. Furthermore, let $F$ be the face of $\New(f_d)$ containing $\b$. Then $f_d$ is nonnegative if and only if the restriction of $f_d$ to the face $F$ is nonnegative. The necessity follows from [@re1 Theorem 3.6]. For the sufficiency, note that the restriction to the face $F$ contains the term $-d\x^{\b}$ and this restriction is nonnegative. Moreover, all other terms in $f_d$ are monomial squares. Hence $f_d$ is nonnegative. Now we assume $\b\in\New(f_d)^{\circ}$. Without loss of generality, we further make the assumption that $\dim(\New(f_d))=n$. Otherwise, we can reduce to this case by applying an appropriate monomial transformation to $f_d$. It is easy to see that the set $\{d\in\R\mid f_d\in\PSD\}$ is nonempty and has upper bounds. So the supremum exists. Let $$\label{npgp-eq1} d^*\triangleq\sup\{d\in\R\mid f_d\in\PSD\}.$$ We need the following theorem. ([@mu Theorem 1.5])\[sec1-thm2\] Consider the following system of polynomial equations $$\label{sec1-eq2} \sum_{i=1}^m c_i\a_i\x^{\a_i}=\bb,$$ where $\a_i\in\R^n,c_i>0,i=1,\ldots,m$. Moreover, assume $\dim(\Conv(\{\a_1,\ldots,\a_m\}))=n$. Then for any $\bb\in\Cone(\{\a_1,\ldots,\a_m\})^{\circ}$, (\[sec1-eq2\]) has exactly one zero in $\R_+^{n}$. \[sec1-lm\] Consider the following system of polynomial equations on variables $(\x,d)$ $$\label{sec1-eq1} \begin{cases} \sum_{i=1}^m c_i\x^{\a_i}-d\x^{\b}=0\\ \sum_{i=1}^m c_i\a_i\x^{\a_i}-d\b\x^{\b}=\mathbf{0} \end{cases},$$ where $\a_i\in\R^n, c_i>0,i=1,\ldots,m$, $\b\in\Conv(\{\a_1,\ldots,\a_m\})^{\circ}$. Moreover, assume $\dim(\Conv(\{\a_1,\ldots,\a_m\}))=n$. Then has exactly one zero in $\R_+^{n+1}$. Eliminate $d$ from (\[sec1-eq1\]) and we obtain $$\label{sec1-eq3} \sum_{i=1}^m c_i(\a_i-\b)\x^{\a_i}=\mathbf{0}.$$ Divide (\[sec1-eq3\]) by $\x^{\b}$, and we have $$\label{sec1-eq4} \sum_{i=1}^m c_i(\a_i-\b)\x^{\a_i-\b}=\mathbf{0}.$$ Since $\b\in\Conv(\{\a_1,\ldots,\a_m\})^{\circ}$, we have $\mathbf{0}\in\Cone(\{\a_1-\b,\ldots,\a_m-\b\})^{\circ}$. Thus by Theorem \[sec1-thm2\], (\[sec1-eq4\]) and hence (\[sec1-eq3\]) have exactly one zero in $\R_+^{n}$, say $\x_*$. Substitute $\x_*$ into the first equation of (\[sec1-eq1\]), and we obtain $d=\sum_{i=1}^m c_i\x_*^{\a_i-\b}>0$. \[npgp-thm3\] Let $f_d=\sum_{i=1}^mc_i \x^{\a_i}-d\x^{\b}\in\R[\x]$ with $\a_i\in(2\N)^n,c_i>0,i=1,\ldots,m$ such that $\b\in\New(f_d)^{\circ}\cap\N^n$, $\dim(\New(f_d))=n$, and let $d^*$ be defined as (\[npgp-eq1\]). Then $f_d\in\PSD$ if and only if either $\b\in(2\N)^n$ and $d\le d^*$ or $\b\notin(2\N)^n$ and $|d|\le d^*$. Moreover, $f_{d^*}$ has exactly one zero in $\R_+^{n}$. First, if $\b\in(2\N)^n$ and $d\le0$, then obviously $f_d$ is nonnegative since it is a sum of monomial squares. If $\b\notin(2\N)^n$ and $d\le0$, then $f_d$ is nonnegative if and only if $f_{-d}$ is nonnegative. Thus without loss of generality, we can only consider the case of $d>0$. Since the only negative term in $f_d$ is $-d\x^{\b}$, $f_d$ is nonnegative over $\R^n$ if and only if $f_d$ is nonnegative over $\R_+^n$. Therefore, by the definition of $d^*$, $f_d\in\PSD$ if and only if $d\le d^*$. The zeros of $f_{d^*}$ are also the minimums of $f_{d^*}$. Then they coincide with the zeros of the system of equations $\{f_{d^*}(\x)=0,\nabla(f_{d^*}(\x))=\mathbf{0}\}$ ($\nabla$ denotes the gradient) which is equivalent to $$\label{sec1-eq5} \begin{cases} \sum_{i=1}^m c_i\x^{\a_i}-d^*\x^{\b}=0\\ \sum_{i=1}^m c_i\a_i\x^{\a_i}-d^*\b\x^{\b}=\mathbf{0} \end{cases}.$$ By Lemma \[sec1-lm\], (\[sec1-eq5\]) has exactly one zero in $\R_+^{n}$, and so does $f_{d^*}$. We need the following theorem from discrete geometry. \[npgp-thm5\] Let $X_1,\ldots,X_r$ be a finite collection of convex subsets of $\R^n$ with $r>n$. If the intersection of every $n+1$ of these sets is nonempty, then the whole collection has a nonempty intersection. \[npgp-cor1\] Let $X_1,\ldots,X_r$ be a finite collection of convex subsets of $\R^n$ with $r>n+1$. If the intersection of every $r-1$ of these sets is nonempty, then the whole collection has a nonempty intersection. Since $r>n+1$, the condition that the intersection of every $r-1$ of these sets is nonempty implies that the intersection of every $n+1$ of these sets is nonempty. So the corollary is immediate from Theorem \[npgp-thm5\]. \[npgp-lm1\] Let $A=(a_{ij})\in\R^{m\times r}$, $\bb=(b_j)\in\R^r$ and $\z=(z_1,\ldots,z_r)^T$ a set of variables. For each $j$, let $A_j$ be the submatrix by deleting all of the $i$-th rows with $a_{ij}\ne0$ and the $j$-th column from $A$. Assume that $A\z=\bb$ has a solution, $\rank(A)>1$ and $\rank(A_j)=\rank(A)-1$ for all $j$. Then $A\z=\bb$ has a nonnegative solution if and only if $A_j\bar{\z}_j=\bar{\bb}_j$ has a nonnegative solution for $j=1,\ldots,r$, where $\bar{\z}_j=\z\backslash z_j$, $\bar{\bb}_j=\bb\backslash b_j$. Let $t=\rank(A)>1$. Then the system of linear equations $A\z=\bb$ has $r-t$ free variables. Without loss of generality, let the $r-t$ free variables be $\{z_1,\ldots,z_{r-t}\}$. We can figure out $\{z_{r-t+1},\ldots,z_r\}$ from $A\z=\bb$ and assume $z_{j}=f_{j-r+t}(z_1,\ldots,z_{r-t})$ for $j=r-t+1,\ldots,r$. Then $A\z=\bb$ has a nonnegative solution if and only if $$\label{npgp-eq6} \{(z_1,\ldots,z_{r-t})\mid z_1\ge0,\ldots,z_{r-t}\ge0,z_{r-t+1}=f_{1}\ge0,\ldots,z_{r}=f_{t}\ge0\}$$ is nonempty. Since both $z_j\ge0$ for $1\le j\le r-t$ and $f_j\ge0$ for $1\le j\le t$ define convex subsets of $\R^{r-t}$, then by Corollary \[npgp-cor1\], (\[npgp-eq6\]) is nonempty if and only if $$\begin{aligned} \label{npgp-eq7} \begin{split} \{(z_1,\ldots,z_{r-t})\mid &z_1\ge0,\ldots,z_{j-1}\ge0,z_{j+1}\ge0,\ldots,z_{r-t}\ge0,\\ &z_{r-t+1}=f_{1}\ge0,\ldots,z_{r}=f_{t}\ge0\} \end{split}\end{aligned}$$ is nonempty for $j=1,\ldots,r-t$ and $$\begin{aligned} \label{npgp-eq8} \begin{split} \{(z_1,\ldots,z_{r-t})\mid &z_1\ge0,\ldots,z_{r-t}\ge0,z_{r-t+1}=f_{1}\ge0,\ldots,z_{j-1+r-t}=f_{j-1}\ge0,\\ &z_{j+1+r-t}=f_{j+1}\ge0,\ldots,z_{r}=f_{t}\ge0\} \end{split}\end{aligned}$$ is nonempty for $j=1,\ldots,t$. For $j\in[r-t]$, (\[npgp-eq7\]) is nonempty if and only if $A\z=\bb$ has a solution with $\bar{\z}_j\in\R_{\ge0}^{r-1}$ and $z_j\in\R$, which is equivalent to the condition that $A_j\bar{\z}_j=\bar{\bb}_j$ has a nonnegative solution since $\rank(A_j)=\rank(A)-1$. For $j\in[t]$, (\[npgp-eq8\]) is nonempty if and only if $\{f_{1}\ge0,\ldots,f_{j-1}\ge0,f_{j+1}\ge0,\ldots,f_{t}\ge0\}$ has a nonnegative solution, which is also equivalent to the condition that $A_{j+r-t}\bar{\z}_{j+r-t}=\bar{\bb}_{j+r-t}$ has a nonnegative solution since $\rank(A_{j+r-t})=\rank(A)-1$. Put all above together and we have that $A\z=\bb$ has a nonnegative solution if and only if $A_j\bar{\z}_j=\bar{\bb}_j$ has a nonnegative solution for $j=1,\ldots,r$ as desired. Lemma \[npgp-lm1\] needs the assumption that the solution set of $A\z=\bb$ is nonempty. We know that the system of linear equations $A\z=\bb$ has a solution if and only if $\bb$ belongs to the image of $A$. For the later use, we give a more concrete description for the condition that $A\z=\bb$ has a solution here. \[npgp-lm2\] Let $A=(a_{ij})\in\R^{m\times r}$, $\bb=(b_j)\in\R^r$, and $\z=(z_1,\ldots,z_r)^T$, $\y=(y_1,\ldots,y_r)^T$ be sets of variables. Let $\{\mathbf{a}_1,\ldots,\mathbf{a}_m\}$ be the set of row vectors of $A$ and let $I=(\mathbf{a}_1\z-y_1,\ldots,\mathbf{a}_m\z-y_m)\cap\R[y_1,\ldots,y_m]$. Assume that $\{\mathbf{c}_1\y,\ldots,\mathbf{c}_l\y\}$ is a set of generators of $I$ and let $C$ be the matrix whose row vectors are $\{\mathbf{c}_1,\ldots,\mathbf{c}_l\}$. Then $\rank(C)=m-\rank(A)$ and $A\z=\bb$ has a solution if and only if $C\bb=\mathbf{0}$. Observe that $\{\mathbf{c}_1,\ldots,\mathbf{c}_l\}$ generates the linear space of all linear relationships among $\{\mathbf{a}_1,\ldots,\mathbf{a}_m\}$. In other words, $\{\mathbf{c}_1^T,\ldots,\mathbf{c}_l^T\}$ generates the kernel space of $A^T$. Thus $\rank(C)=\rank(\ker(A^T))=m-\rank(A)$. If $C\bb=\mathbf{0}$, i.e. $\bb$ is a zero of the elimination ideal $I$, then by the Extension Theorem on p.125 of [@cls], we can extend $\bb$ to a zero of the ideal $(\mathbf{a}_1\z-y_1,\ldots,\mathbf{a}_m\z-y_m)$. Therefore, $A\z=\bb$ has a solution. The converse is easy. \[npgp-thm4\] Let $f_d=\sum_{i=1}^mc_i \x^{\a_i}-d\x^{\b}\in\R[\x]$ with $\a_i\in(2\N)^n,c_i>0,i=1,\ldots,m$ such that $\b\in\New(f_d)^{\circ}\cap\N^n$, $\dim(\New(f_d))=n$, and let $d^*$ be defined as (\[npgp-eq1\]). Then $f_{d^*}\in\SONC$. Without loss of generality, assume $m>n+1$. By Theorem \[npgp-thm3\], $f_{d^*}$ has exactly one zero in $\R_+^{n}$, which is denoted by $\x_*$. Let $$\{\Delta_1,\ldots,\Delta_r\}:=\{\Delta\mid\Delta\textrm{ is a simplex }, \b\in\Delta^{\circ}, V(\Delta)\subseteq\{\a_1,\ldots,\a_m\}\}$$ and $I_k:=\{i\in[m]\mid\a_i\in V(\Delta_k)\}$ for $k=1,\ldots,r$. Firstly, we assume $\dim(\Delta_k)=n$ for all $k$. Hence $|I_k|=n+1$ for all $k$. For each $\Delta_k$, since $\b\in\Delta_k^{\circ}$, we can write $\b=\sum_{i\in I_k}\lambda_{ik}\a_i$, where $\sum_{i\in I_k}\lambda_{ik}=1, \lambda_{ik}>0, i\in I_k$. Let us consider the following system of linear equations on variables $\{c_{ik}\}$ and $\{s_k\}$: $$\label{npgp-eq2} \begin{cases} \frac{c_{ik}\x_*^{\a_i}}{\lambda_{ik}}=s_k, &\textrm{for }i\in I_k,k=1,\ldots,r\\ \sum_{i\in I_k} c_{ik}=c_i, &\textrm{for }i=1,\ldots,m \end{cases}.$$ Eliminate $\{c_{ik}\}$ from (\[npgp-eq2\]) and we obtain: $$\label{npgp-eq3} \sum_{i\in I_k}\lambda_{ik}s_k=c_i\x_*^{\a_i}, \quad \textrm{for }i=1,\ldots,m.$$ [**Claim**]{}: The linear system (\[npgp-eq3\]) on variables $\{s_1,\ldots,s_r\}$ has a nonnegative solution. Denote the coefficient matrix of (\[npgp-eq3\]) by $A$. Add up all of the equations of (\[npgp-eq3\]) and we obtain: $$\label{npgp-eq9} \sum_{k=1}^rs_k=\sum_{i=1}^m\sum_{i\in I_k}\lambda_{ik}s_k=\sum_{i=1}^mc_i\x_*^{\a_i}.$$ Multiply the $i$-th equation of (\[npgp-eq3\]) by $\a_i$ and then add up all of them. We obtain: $$\label{npgp-eq10} \b\sum_{k=1}^rs_k=\sum_{i=1}^m\sum_{i\in I_k}\lambda_{ik}\a_is_k=\sum_{i=1}^mc_i\a_i\x_*^{\a_i}.$$ $(\ref{npgp-eq10})-(\ref{npgp-eq9})\times\b$ gives $$\label{npgp-eq11} \sum_{i=1}^mc_i(\a_i-\b)\x_*^{\a_i}=\mathbf{0}.$$ By (\[sec1-eq5\]) in the proof of Theorem \[npgp-thm3\], $\{c_i\x_*^{\a_i}\}_{i=1}^m$ satisfies (\[npgp-eq11\]). Thus by Lemma \[npgp-lm2\], (\[npgp-eq3\]) has a solution. Moreover, since $\b\in\New(f_d)^{\circ}$ and $\dim(\New(f_d))=n$, then $\rank(\{\a_i-\b\}_{i=1}^m)=n$. Thus $\rank(A)=m-n>1$. For each $j$, denote the coefficient matrix of $$\label{npgp-eq4} \{\sum_{i\in I_k}\lambda_{ik}s_k=c_i\x_*^{\a_i}\mid i\notin I_j\}$$ by $A_j$. Note that is obtained from by removing the equations involving the variable $s_j$. For every $i\notin I_j$, since $\b\in\Delta_j^{\circ}$, there exists a facet $F$ of $\Delta_j$ such that $\b\in\Conv(V(F)\cup\{\a_i\})^{\circ}$. Assume $\Conv(V(F)\cup\{\a_i\})=\Delta_{p_i}$. For every $k\notin\{j\}\cup\bigcup_{i\notin I_j}\{p_i\}$, let $s_k=0$ in (\[npgp-eq4\]) and we obtain: $$\label{npgp-eq5} \{\lambda_{ip_i}s_{p_i}=c_i\x_*^{\a_i}\mid i\notin I_j\}.$$ Thus $\rank(A_j)=m-|I_j|=m-(n+1)=\rank(A)-1$. Therefore by Lemma \[npgp-lm1\], in order to prove the claim, we only need to show that the linear system (\[npgp-eq4\]) on variables $\{s_1,\ldots,s_r\}\backslash\{s_j\}$ has a nonnegative solution for $j=1,\ldots,r$. Given $j\in[r]$, from (\[npgp-eq5\]) we have $s_{p_i}=c_i\x_*^{\a_i}/\lambda_{ip_i}$ for $i\notin I_j$ and hence $$\begin{cases} s_k=0, &\textrm{for }k\notin\{j\}\cup\bigcup_{i\notin I_j}\{p_i\}\\ s_{p_i}=c_i\x_*^{\a_i}/\lambda_{ip_i}, &\textrm{for }i\notin I_j \end{cases}$$ is a nonnegative solution for (\[npgp-eq4\]). Thus the claim is proved. Assume that $\{s_1^*,\ldots,s_r^*\}$ is a nonnegative solution for the system of equations (\[npgp-eq3\]). Substitute $\{s_1^*,\ldots,s_r^*\}$ into the system of equations (\[npgp-eq2\]), and we have $c_{ik}=\lambda_{ik}s_k^*/\x_*^{\a_i}$ for $i\in I_k,k=1,\ldots,r$. Let $d_k=s_k^*/\x_*^{\b}$ and $f_k=\sum_{i\in I_k}c_{ik}\x^{\a_i}-d_k\x^{\b}$ for $k=1,\ldots,r$. Then by (\[npgp-eq2\]) and by Proposition \[nc-prop1\], $d_{k}$ is the circuit number of $f_{k}$ and hence $f_k$ is a nonnegative circuit polynomial for all $k$. By (\[npgp-eq2\]), $\sum_{k=1}^rd_k\x_*^{\b}=\sum_{k=1}^r\sum_{i\in I_k}c_{ik}\x^{\a_i}_*=\sum_{i=1}^mc_i \x^{\a_i}_*=d^*\x_*^{\b}$. So we have $\sum_{k=1}^rd_k=d^*$. It follows $f_{d^*}=\sum_{k=1}^rf_k$ as desired. For the case that $\dim(\Delta_k)=n$ does not hold for all $k$, note that all results above remain valid for $\b\in\R^n$. We then give $\b$ a small perturbation, say $\dd$, such that $\dim(\Delta_k)=n$ holds for all $k$. Then the new linear system (\[npgp-eq3\]) for $\b+\dd$ has a nonnegative solution. Let $\dd\to\mathbf{0}$, we obtain that (\[npgp-eq3\]) also has a nonnegative solution for $\b$. Thus the theorem remains true in this case. \[npgp-thm7\] Let $f_d=\sum_{i=1}^mc_i \x^{\a_i}-d\x^{\b}\in\R[\x]$ with $\a_i\in(2\N)^n,c_i>0,i=1,\ldots,m$ such that $\b\in\New(f_d)^{\circ}\cap\N^n$, $\dim(\New(f_d))=n$. Then $f_d\in\PSD$ if and only if $f_d\in\SONC$. The sufficiency is obvious. Assume that $f_d$ is nonnegative. If $\b\in(2\N)^n$ and $d<0$, or $d=0$, then $f_d$ is a sum of monomial squares and obviously $f_d\in\SONC$. If $\b\notin(2\N)^n$ and $d<0$, through a variable transformation $x_j\mapsto -x_j$ for some odd number $\beta_j$, we can always assume $d>0$. Let $d^*$ be defined as (\[npgp-eq1\]). By Lemma \[npgp-thm4\], $f_{d^*}\in\SONC$. Suppose $f_{d^*}=\sum_{k=1}^r(\sum_{i\in I_k}c_{ik}\x^{\a_i}-d_k\x^{\b})$, where $\sum_{i\in I_k}c_{ik}\x^{\a_i}-d_k\x^{\b}$ is a circuit polynomial with $d_k$ the corresponding circuit number for all $k$. Since $f_d$ is nonnegative, then $d\le d^{*}$ by Theorem \[npgp-thm3\]. We have $f_d=\sum_{k=1}^r(\sum_{i\in I_k}c_{ik}\x^{\a_i}-\frac{d}{d^*}d_k\x^{\b})$, where $\sum_{i\in I_k}c_{ik}\x^{\a_i}-\frac{d}{d^*}d_k\x^{\b}$ is a nonnegative circuit polynomial for all $k$ by Theorem \[nc-thm1\]. Thus $f_d\in\SONC$. \[npgp-thm8\] Let $f=\sum_{i=1}^mc_i \x^{\a_i}-d\x^{\b}\in\R[\x]$ with $\a_i\in(2\N)^n,c_i>0,i=1,\ldots,m$. Then $f\in\PSD$ if and only if $f\in\SONC$. Moreover, let $$\mathscr{F}:=\{\Delta\mid\Delta\textrm{ is a simplex }, \b\in\Delta^{\circ}, V(\Delta)\subseteq\{\a_1,\ldots,\a_m\}\}.$$ If $f\in\PSD$, then $f$ admits a SONC decomposition as follows: $$f=\sum_{\Delta\in\mathscr{F}}f_{\Delta}+\sum_{i\in I}c_i\x^{\a_i},$$ where $f_{\Delta}$ is a nonnegative circuit polynomial supported on $V(\Delta)\cup\{\b\}$ for each $\Delta$ and $I=\{i\in[m]\mid\a_i\notin\cup_{\Delta\in\mathscr{F}}V(\Delta)\}$. It follows easily from Lemma \[sec3-lm\] and Theorem \[npgp-thm8\]. Nonnegative Polynomials with Multiple Negative Terms ==================================================== In this section, we deal with the case of nonnegative polynomials with multiple negative terms. Let $\Delta$ be a polytope of dimension $d$. For a vertex $\a$ of $\Delta$, we say that $\Delta$ is [*simple*]{} at $\a$ if $\a$ is the intersection of precisely $d$ edges. \[npmt-thm1\] Let $f=\sum_{i=1}^mc_i \x^{\a_i}-\sum_{j=1}^ld_j\x^{\b_j}\in\R[\x]$ with $\a_i\in(2\N)^n,c_i>0,i=1,\ldots,m$, $\b_j\in\New(f)^{\circ}\cap\N^n,j=1,\ldots,l$. Assume that $\New(f)$ is simple at some vertex, all of the $\b_j$’s lie in the same side of every hyperplane determined by points among $\{\a_1,\ldots,\a_m\}$ and there exists a point $\bv=(v_k)\in(\R^*)^n$ such that $d_j\bv^{\b_j}>0$ for all $j$. Then $f\in\PSD$ if and only if $f\in\SONC$. Without loss of generality, assume $\dim(\New(f))=n$ and $m>n+1$. The sufficiency is obvious. Suppose $f$ is nonnegative. After a variable transformation $x_k\mapsto -x_k$ for all $k$ with $v_k<0$, we can assume $d_j>0$ for all $j$. Let $$\label{npmt-eq9} d_l^*\triangleq\sup\{\tilde{d}_l\in\R\mid \tilde{f}=\sum_{i=1}^mc_i \x^{\a_i}-\sum_{j=1}^{l-1}d_j\x^{\b_j}-\tilde{d}_l\x^{\b_l}\in\PSD\}.$$ Note that $d_l^*$ is well-defined since the set in (\[npmt-eq9\]) is nonempty and has upper bounds. Let $f^*=\sum_{i=1}^mc_i \x^{\a_i}-\sum_{j=1}^{l-1}d_j\x^{\b_j}-d_l^*\x^{\b_l}$. Then $f^*=0$ has a zero in $\R_+^{n}$ ([@wang Lemma 4.6]), which is denoted by $\x_*$. The condition that all of the $\b_j$’s lie in the same side of every hyperplane determined by points among $\{\a_1,\ldots,\a_m\}$ implies if a simplex $\Delta$ with vertices coming from $\{\a_1,\ldots,\a_m\}$ contains some $\b_j$, then $\dim(\Delta)=n$ and it contains all $\b_j,j=1,\ldots,l$. Let $$\{\Delta_1,\ldots,\Delta_r\}:=\{\Delta\mid\Delta\textrm{ is a simplex }, \b_j\in\Delta^{\circ}, j\in[l], V(\Delta)\subseteq\{\a_1,\ldots,\a_m\}\}$$ and $I_k:=\{i\in[m]\mid\a_i\in V(\Delta_k)\}$ for $k=1,\ldots,r$. Then $\dim(\Delta_k)=n$ for all $k$. For every $\b_j$ and every $\Delta_k$, since $\b_j\in\Delta_k^{\circ}$, we can write $\b_j=\sum_{i\in I_k}\lambda_{ijk}\a_i$, where $\sum_{i\in I_k}\lambda_{ijk}=1, \lambda_{ijk}>0, i\in I_k$. Let us consider the following system of linear equations on variables $\{c_{ijk}\}$, $\{d_{jk}\}$ and $\{s_{jk}\}$: $$\label{npmt-eq1} \begin{cases} \frac{c_{ijk}\x_*^{\a_i}}{\lambda_{ijk}}=d_{jk}\x_*^{\b_j}=s_{jk}, &\textrm{for }i\in I_k,k=1,\ldots,r,j=1,\ldots,l\\ \sum_{k=1}^rd_{jk}=d_j, &\textrm{for }j=1,\ldots,l-1\\ \sum_{k=1}^rd_{lk}=d_l^*, \\ \sum_{j=1}^l\sum_{i\in I_k} c_{ijk}=c_i, &\textrm{for }i=1,\ldots,m \end{cases}.$$ Eliminate $\{c_{ijk}\}$ and $\{d_{jk}\}$ from (\[npmt-eq1\]) and we obtain: $$\label{npmt-eq2} \begin{cases} \sum_{j=1}^l\sum_{i\in I_k}\lambda_{ijk}s_{jk}=c_i\x_*^{\a_i}, &\textrm{for }i=1,\ldots,m\\ \sum_{k=1}^rs_{jk}=d_j\x_*^{\b_j}, &\textrm{for }j=1,\ldots,l-1\\ \sum_{k=1}^rs_{lk}=d_l^*\x_*^{\b_l}, \end{cases}.$$ [**Claim**]{}: The linear system (\[npmt-eq2\]) on variables $\{s_{jk}\}$ has a nonnegative solution. Denote the coefficient matrix of (\[npmt-eq2\]) by $A$. Add up all of the equations of the first part of (\[npmt-eq2\]), and we obtain: $$\label{npmt-eq6} \sum_{j=1}^l\sum_{k=1}^rs_{jk}=\sum_{i=1}^m\sum_{j=1}^l\sum_{i\in I_k}\lambda_{ijk}s_{jk}=\sum_{i=1}^mc_i\x_*^{\a_i}.$$ Multiply the $i$-th equation of the first part of (\[npmt-eq2\]) by $\a_i$ and then add up all of them. We obtain: $$\label{npmt-eq7} \sum_{j=1}^l\b_j\sum_{k=1}^rs_{jk}=\sum_{i=1}^m\sum_{j=1}^l\sum_{i\in I_k}\lambda_{ijk}\a_is_{jk}=\sum_{i=1}^mc_i\a_i\x_*^{\a_i}.$$ Substitute the second and the third part of (\[npmt-eq2\]) into (\[npmt-eq6\]) and (\[npmt-eq7\]), and we obtain: $$\label{npmt-eq8} \begin{cases} \sum_{j=1}^{l-1}d_j\x_*^{\b_j}+d_l^*\x_*^{\b_l}=\sum_{i=1}^mc_i\x_*^{\a_i}\\ \sum_{j=1}^{l-1}d_j\b_j\x_*^{\b_j}+d_l^*\b_l\x_*^{\b_l}=\sum_{i=1}^mc_i\a_i\x_*^{\a_i} \end{cases}.$$ The zero $\x_*$ of $f^*$ is also a minimizer of $f^*$. Then it must satisfy the equations $\{f^*(\x_*)=0,\nabla(f^*(\x_*))=\mathbf{0}\}$ which is actually equivalent to (\[npmt-eq8\]). Thus by Lemma \[npgp-lm2\], (\[npmt-eq2\]) has a solution on variables $\{s_{jk}\}$. Moreover, since $\dim(\Delta_1)=n$, the volume of $\Delta_1$, which equals $\frac{1}{n!}|\det(\{\begin{pmatrix}1\\ \a_i\end{pmatrix}\}_{i\in I_1})|$, is nonzero. It follows $$\rank(\{\begin{pmatrix}1\\ \a_1\end{pmatrix},\ldots,\begin{pmatrix}1\\ \a_m\end{pmatrix},\begin{pmatrix}-1\\ -\b_1\end{pmatrix},\ldots,\begin{pmatrix}-1\\ -\b_l\end{pmatrix}\})=n+1$$ and hence by Lemma \[npgp-lm2\], $\rank(A)=m+l-(n+1)>1$. For every $u\in[l]$ and every $v\in[r]$, denote the coefficient matrix of $$\label{npmt-eq3} \begin{cases} \sum_{i\in I_k}\lambda_{ijk}s_{jk}=c_i\x_*^{\a_i}, &\textrm{for }i\notin I_v\\ \sum_{k=1}^rs_{jk}=d_j\x_*^{\b_j},&\textrm{for }j\ne u,l\\ \sum_{k=1}^rs_{lk}=d_l^*\x_*^{\b_l},&\textrm{if }u\ne l \end{cases}$$ by $A_{uv}$. Note that is obtained from by removing the equations involving the variable $s_{uv}$. For every $i\notin I_v$, since $\b_u\in\Delta_v^{\circ}$, there exists a facet $F$ of $\Delta_v$ such that $\b_u\in\Conv(V(F)\cup\{\a_i\})^{\circ}$. Assume $\Conv(V(F)\cup\{\a_i\})=\Delta_{p_i}$. For $j=u,k\notin\cup_{i\notin I_v}\{p_i\}$ or $j\ne u,k\ne v$, let $s_{jk}=0$ in (\[npmt-eq3\]), and we obtain: $$\label{npmt-eq4} \begin{cases} \lambda_{iup_i}s_{up_i}=c_i\x_*^{\a_i}, &\textrm{for }i\notin I_v\\ s_{jv}=d_j\x_*^{\b_j}, &\textrm{for }j\ne u,l\\ s_{lv}=d_l^*\x_*^{\b_l},&\textrm{if }u\ne l \end{cases}.$$ Thus $\rank(A_{uv})=m-|I_v|+l-1=m-(n+1)+l-1=\rank(A)-1$. Therefore by Lemma \[npgp-lm1\], in order to prove the claim, we only need to show that the linear system (\[npmt-eq3\]) on variables $\{s_{jk}\}_{j,k}\backslash\{s_{uv}\}$ has a nonnegative solution for all $u\in[l]$ and all $v\in[r]$. Given $v\in[r]$, from (\[npmt-eq4\]) we have $s_{up_i}=c_i\x_*^{\a_i}/\lambda_{iup_i}$ for $i\notin I_v$, $s_{jv}=d_j\x_*^{\b_j}$ for $j\ne u,l$, and $s_{lv}=d_l^*\x_*^{\b_l}$. Hence $$\begin{cases} s_{jk}=0, &\textrm{for }j=u,k\notin\cup_{i\notin I_v}\{p_i\} \textrm{ or }j\ne u,k\ne v\\ s_{up_i}=c_i\x_*^{\a_i}/\lambda_{iup_i}, &\textrm{for }i\notin I_v\\ s_{jv}=d_j\x_*^{\b_j}, &\textrm{for }j\ne u,l\\ s_{lv}=d_l^*\x_*^{\b_l},&\textrm{if }u\ne l \end{cases}$$ is a nonnegative solution for (\[npmt-eq3\]). So the claim is proved. Assume that $\{s_{jk}^*\}_{j,k}$ is a nonnegative solution for the system of equations (\[npmt-eq2\]). Substitute $\{s_{jk}^*\}_{j,k}$ into the system of equations (\[npmt-eq1\]), and we have $c_{ijk}=\lambda_{ijk}s_{jk}^*/\x_*^{\a_i}$ for $i\in I_k, k=1,\ldots,r,j=1,\ldots,l$. Let $f_{jk}=\sum_{i\in I_k}c_{ijk}\x^{\a_i}-d_{jk}\x^{\b_j}$ for $k=1,\ldots,r,j=1,\ldots,l$. Then by (\[npmt-eq1\]) and by Proposition \[nc-prop1\], $d_{jk}$ is the circuit number of $f_{jk}$ and $f_{jk}$ is a nonnegative circuit polynomial for all $j,k$. By (\[npmt-eq1\]), we have $f=\sum_{j=1}^{l-1}\sum_{k=1}^rf_{jk}+\sum_{k=1}^r(\sum_{i\in I_k}c_{ilk}\x^{\a_i}-\frac{d_l}{d_l^*}d_{lk}\x^{\b_l})$. Since $d_l\le d_l^*$, $\sum_{i\in I_k}c_{ilk}\x^{\a_i}-\frac{d_l}{d_l^*}d_{lk}\x^{\b_l}$ is a nonnegative circuit polynomial for all $k$ by Theorem \[nc-thm1\]. Thus $f\in\SONC$. Let $d^*=\sup\{d\in\R_+\mid 1+x^6+y^6+x^6y^6-x^2y-dx^4y\in\PSD\}$ and $f=1+x^6+y^6+x^6y^6-x^2y-d^*x^4y$. We have $(2,1)=\frac{1}{6}(6,6)+\frac{1}{6}(6,0)+\frac{2}{3}(0,0)=\frac{1}{3}(6,0)+\frac{1}{6}(0,6)+\frac{1}{2}(0,0)$, and $(4,1)=\frac{1}{6}(6,6)+\frac{1}{2}(6,0)+\frac{1}{3}(0,0)=\frac{2}{3}(6,0)+\frac{1}{6}(0,6)+\frac{1}{6}(0,0)$. (0,0)–(0,3); (0,0)–(3,0); (3,0)–(3,3); (0,3)–(3,3); (0,0)–(3,3); (0,3)–(3,0); (0,0) circle (2pt); (1) at (0,0) [$1$]{}; (3,0) circle (2pt); (2) at (3,0) [$x^6$]{}; (0,3) circle (2pt); (3) at (0,3) [$y^6$]{}; (3,3) circle (2pt); (4) at (3,3) [$x^6y^6$]{}; (1,1/2) circle (2pt); (5) at (1,1/2) [$x^2y$]{}; (2,1/2) circle (2pt); (6) at (2,1/2) [$x^4y$]{}; The system of equations $\{f=0,\nabla(f)=\mathbf{0}\}$ has exactly one zero $(x_*\approx1.04521,y_*\approx0.764724,d^*\approx2.11373)$ in $\R_+^{n}$. The following linear system $$\label{npmt-eq12} \begin{cases} 1=\frac{2}{3}s_{11}+\frac{1}{2}s_{12}+\frac{1}{3}s_{21}+\frac{1}{6}s_{22}\\ x_*^6=\frac{1}{6}s_{11}+\frac{1}{3}s_{12}+\frac{1}{2}s_{21}+\frac{2}{3}s_{22}\\ y_*^6=\frac{1}{6}s_{12}+\frac{1}{6}s_{22}\\ x_*^6y_*^6=\frac{1}{6}s_{11}+\frac{1}{6}s_{21}\\ x_*^2y_*=s_{11}+s_{12}\\ d^*x_*^4y_*=s_{21}+s_{22} \end{cases}$$ on variables $\{s_{11},s_{12},s_{21},s_{22}\}$ has a nonnegative solution $(s_{11}\approx0.835429,s_{12}=0,s_{21}\approx0.729142,s_{22}=1.2)$. Thus from the proof of Theorem \[npmt-thm1\], we obtain a SONC decomposition of $f$ which is $f\approx(0.556953+0.106793x^6+0.533967x^6y^6-x^2y)+(0.243047+0.27962x^6+0.466033x^6y^6-0.798909x^4y)+(0.2+0.613587x^6+y^6-1.31482x^4y)$. \[npmt-cor1\] Let $f=\sum_{i=1}^mc_i \x^{\a_i}-\sum_{j=1}^ld_j\x^{\b_j}\in\R[\x]$ with $\a_i\in(2\N)^n,c_i>0,i=1,\ldots,m$, $\b_j\in\New(f)^{\circ}\cap\N^n,d_j>0,j=1,\ldots,l$ and $\dim(\New(f))=n$. Assume that $f$ is nonnegative and has a zero, $\New(f)$ is simple at some vertex, and all of the $\b_j$’s lie in the same side of every hyperplane determined by points among $\{\a_1,\ldots,\a_m\}$. Then $f$ has exactly one zero in $\R_+^{n}$. By Theorem \[npmt-thm1\], $f\in\SONC$. Suppose $f=\sum_{k=1}^rf_k$, where $f_k$ is a nonnegative circuit polynomial for all $k$. Let $\x$ be a zero of $f$. Then we have $f_k(\x)=0$ for all $k$. By Proposition \[nc-prop1\], $f_k(|\x|)=0$ and $|\x|$ is the only zero of $f_k$ in $\R_+^{n}$ for all $k$. Hence $|\x|$ is the only zero of $f$ in $\R_+^{n}$. SONC Decompositions Preserve Sparsity ===================================== For a polynomial $f\in\R[\x]$, let $\Lambda(f):=\{\a\in\supp(f)\mid\a\in(2\N)^n\textrm{ and }c_{\a}>0\}$ and $\Gamma(f):=\supp(f)\backslash\Lambda(f)$. Then we can write $f=\sum_{\a\in\Lambda(f)}c_{\a}\x^{\a}-\sum_{\b\in\Gamma(f)}d_{\b}\x^{\b}$ with $c_{\a}>0$. Assume $V(\New(f))\subseteq\Lambda(f)$. For every $\b\in\Gamma(f)$, let $$\mathscr{F}(\b):=\{\Delta\mid\Delta\textrm{ is a simplex, } \b\in\Delta^{\circ}, V(\Delta)\subseteq\Lambda(f)\}.$$ Consider the following SONC decomposition for a nonnegative polynomial $f$: $$\label{sec5-eq} f=\sum_{\b\in\Gamma(f)}\sum_{\Delta\in\mathscr{F}(\b)}f_{\b\Delta}+\sum_{\a\in\tilde{\A}}c_{\a}\x^{\a},$$ where $f_{\b\Delta}$ is a nonnegative circuit polynomial supported on $V(\Delta)\cup\{\b\}$ for each $\Delta$ and $\tilde{\A}=\{\a\in\Lambda(f)\mid\a\notin\cup_{\b\in\Gamma(f)}\cup_{\Delta\in\mathscr{F}(\b)}V(\Delta)\}$. If $f$ admits a SONC decomposition of the form , then we say that $f$ decomposes into a [*sum of nonnegative circuit polynomials with the same support*]{}. In Theorem \[npgp-thm7\] and Theorem \[npmt-thm1\], we have seen that nonnegative polynomials satisfying certain conditions decompose into sums of nonnegative circuit polynomials with the same support. We shall prove that actually every SONC polynomial decomposes into a sum of nonnegative circuit polynomials with the same support. For the proof, we first recall a connection between nonnegative circuit polynomials and sums of binomial squares (SBS). Nonnegative Circuit Polynomials and Sums of Binomial Squares ------------------------------------------------------------ We call a lattice point is [*even*]{} if it is in $(2\N)^n$. For a subset $M\subseteq\N^n$, define $\overline{A}(M):=\{\frac{1}{2}(\bu+\bv)\mid\bu\ne\bv,\bu,\bv\in M\cap(2\N)^n\}$ as the set of averages of distinct even points in $M$. For a trellis $\A$, we say that $M$ is an [*$\A$-mediated set*]{} if $\A\subseteq M\subseteq\overline{A}(M)\cup\A$ [@re1]. It turns out that the problem whether a nonnegative circuit polynomial is an SOS polynomial is closely related to $\A$-mediated sets. \[sec3-thm1\] Let $f=\sum_{\a\in\A} c_{\a}\x^{\a}-d\x^{\b}\in\R[\x], d\ne0$ be a nonnegative circuit polynomial with $\b\in\New(f)^{\circ}$. If $\b$ belongs to an $\A$-mediated set $M$, then $f$ is a sum of binomial squares, i.e., $f=\sum_{2\bu,2\bv\in M}(a_{\bu}\x^{\bu}-b_{\bv}\x^{\bv})^2$ for $a_{\bu},b_{\bv}\in\R$. The proof can be easily derived from Theorem 5.2 in [@iw] and Theorem 4.4 in [@re1]. Mediated sets were firstly studied by Reznick in [@re1]. For a trellis $\A$, there is a maximal $\A$-mediated set $\A^*$ satisfying $A(\A)\subseteq\A^*\subseteq\Conv(\A)\cap\N^n$ which contains every $\A$-mediated set. Following [@re1], a trellis $\A$ is called an [*$H$-trellis*]{} if $\A^*=\Conv(\A)\cap\N^n$. The following theorem states that every trellis is an $H$-trellis after multiplied by a sufficiently large number. ([@po Theorem 3.5])\[sec3-prop\] Let $\A\subseteq\N^n$ be a trellis. Then $k\A$ is an $H$-trellis for any integer $k\ge n$. From Theorem \[sec3-prop\] together with Theorem \[sec3-thm1\], we know that every $n$-variate nonnegative circuit polynomial supported on $k\A$ and a lattice point in the interior of $\Conv(k\A)$ is a sum of binomial squares for any trellis $\A$ and an integer $k\ge n$. \[sec4-lm1\] Suppose that $f(x_1,\ldots,x_n)\in\R[\x]$ is a SONC polynomial. Then $f(x_1^k,\ldots,x_n^k)$ is a sum of binomial squares for any integer $k\ge n$. Assume $f=\sum f_i$, where $f_i$’s are nonnegative circuit polynomials. For any integer $k\ge n$, since every $f_i(x_1^k,\ldots,x_n^k)$ is a sum of binomial squares, so is $f(x_1^k,\ldots,x_n^k)$. Supports of Sums of Nonnegative Circuit Polynomials --------------------------------------------------- Now we can prove: every SONC polynomial decomposes into a sum of nonnegative circuit polynomials with the same support. The proof will take use of the SBS decompositions for SONC polynomials. Hence we first apply the map $x_i\mapsto x_i^k$ to $f\in\R[\x]$. \[sec4-lm\] Let $f(x_1,\ldots,x_n)\in\R[\x]$ and $k$ an odd number. Then $f(x_1,\ldots,x_n)$ decomposes into a sum of nonnegative circuit polynomials with the same support if and only if $f(x_1^k,\ldots,x_n^k)$ decomposes into a sum of nonnegative circuit polynomials with the same support. It is immediate from the fact that a polynomial $g(x_1,\ldots,x_n)$ is a nonnegative circuit polynomial if and only if $g(x_1^k,\ldots,x_n^k)$ is a nonnegative circuit polynomial for an odd number $k$. If a polynomial $f\in\R[\x]$ has the form $\sum_{\a\in\Lambda(f)}c_{\a}\x^{\a}-d\x^{\b}$, where either $\b\in(2\N)^n$ and $d>0$, or $\b\notin(2\N)^n$, then we call $f$ a [*banana polynomial*]{}. By Theorem \[npgp-thm8\], a nonnegative banana polynomial decomposes into a sum of nonnegative circuit polynomials with the same support. If a polynomial $f$ can be written as $f=\sum_{\b\in\Gamma(f)}(\sum_{\a\in\Lambda(f)}c_{\b\a}\x^{\a}-d_{\b}\x^{\b})$ such that every $\sum_{\a\in\Lambda(f)}c_{\b\a}\x^{\a}-d_{\b}\x^{\b}$ is a nonnegative banana polynomial, then we say that $f$ decomposes into a [*sum of nonnegative banana polynomials with the same support*]{}. \[sec3-thm2\] Let $f=\sum_{\a\in\Lambda(f)}c_{\a}\x^{\a}-\sum_{\b\in\Gamma(f)}d_{\b}\x^{\b}\in\R[\x]$. If $f\in\SONC$, then $f$ decomposes into a sum of nonnegative circuit polynomials with the same support, i.e. $f$ admits a SONC decomposition of the form . By Lemma \[sec4-lm\], we only need to prove the theorem for $f(x_1^{2n+1},\ldots,x_n^{2n+1})$. By Theorem \[npgp-thm7\], we finish the proof by showing that $f(x_1^{2n+1},\ldots,x_n^{2n+1})$ is a sum of nonnegative banana polynomials with the same support. For simplicity, let $h=f(x_1^{2n+1},\ldots,x_n^{2n+1})$. By Theorem \[sec4-lm1\], we can write $h$ as a sum of binomial squares, i.e. $h=\sum_{i=1}^m(a_i\x^{\bu_i}-b_i\x^{\bv_i})^2$. Let us do induction on $m$. When $m=1$, $h=(a_1\x^{\bu_1}-b_1\x^{\bv_1})^2=a_1^2\x^{2\bu_1}+b_1^2\x^{2\bv_1}-2a_1b_1\x^{\bu_1+\bv_1}$ and the conclusion is obvious. Assume that the conclusion is correct for $m-1$. Now consider the case of $m$. Without loss of generality, assume $\bu_m+\bv_m\in\Gamma(h)$. Let $h'=\sum_{i=1}^{m-1}(a_i\x^{\bu_i}-b_i\x^{\bv_i})^2=\sum_{\a\in\Lambda(h')}c_{\a}'\x^{\a}-\sum_{\b\in\Gamma(h')}d_{\b}'\x^{\b}$. By the induction hypothesis, we can write $h'=\sum_{\b\in\Gamma(h')}(\sum_{\a\in\Lambda(h')}c_{\b\a}'\x^{\a}-d_{\b}'\x^{\b})$ as a sum of nonnegative banana polynomials with the same support. Then $$\label{sec3-eq10} h=\sum_{\b\in\Gamma(h')}(\sum_{\a\in\Lambda(h')}c_{\b\a}'\x^{\a}-d_{\b}'\x^{\b})+(a_m\x^{\bu_m}-b_m\x^{\bv_m})^2.$$ From $h=h'+(a_m\x^{\bu_m}-b_m\x^{\bv_m})^2$, it follows that $\supp(h)$ and $\supp(h')$ differ among three elements: $2\bu_m,2\bv_m,\bu_m+\bv_m$. We will obtain the expression $h=\sum_{\b\in\Gamma(h)}(\sum_{\a\in\Lambda(h)}c_{\b\a}\x^{\a}-d_{\b}\x^{\b})$ of $h$ as a sum of nonnegative banana polynomials with the same support from (\[sec3-eq10\]) by adjusting the terms involving $2\bu_m,2\bv_m,\bu_m+\bv_m$ in (\[sec3-eq10\]). First let us consider the terms involving $2\bu_m$. If $2\bu_m\notin\Gamma(h')$, then we have nothing to do. If $2\bu_m\in\Gamma(h')$ and $2\bu_m\in\Gamma(h)$, then we must have $d_{2\bu_m}'>a_m^2$. By the equality $\sum_{\a\in\Lambda(h')}c_{2\bu_m\a}'\x^{\a}-d_{2\bu_m}'\x^{2\bu_m}+a_m^2\x^{2\bu_m}+b_m^2\x^{2\bv_m}-2a_mb_m\x^{\bu_m+\bv_m}=(1-\frac{a_m^2}{d_{2\bu_m}'})(\sum_{\a\in\Lambda(h')}c_{2\bu_m\a}'\x^{\a} -d_{2\bu_m}'\x^{2\bu_m})+\sum_{\a\in\Lambda(h')}\frac{c_{2\bu_m\a}'a_m^2}{d_{2\bu_m}'}\x^{\a}+b_m^2\x^{2\bv_m}-2a_mb_m\x^{\bu_m+\bv_m}$, we obtain the expression $h=\sum_{\b\in\Gamma(h')\backslash\{2\bu_m\}}(\sum_{\a\in\Lambda(h')}c_{\b\a}'\x^{\a}-d_{\b}'\x^{\b})+(1-\frac{a_m^2}{d_{2\bu_m}'})(\sum_{\a\in\Lambda(h')}c_{2\bu_m\a}'\x^{\a} -d_{2\bu_m}'\x^{2\bu_m})+\sum_{\a\in\Lambda(h')}\frac{c_{2\bu_m\a}'a_m^2}{d_{2\bu_m}'}\x^{\a}+b_m^2\x^{2\bv_m}-2a_mb_m\x^{\bu_m+\bv_m}$ which is still a sum of nonnegative banana polynomials. If $2\bu_m\in\Gamma(h')$ and $2\bu_m\in\Lambda(h)$, then we must have $a_m^2>d_{2\bu_m}'$ and we can write $h$ as $h=\sum_{\b\in\Gamma(h')\backslash\{2\bu_m\}}(\sum_{\a\in\Lambda(h')}c_{\b\a}'\x^{\a}-d_{\b}'\x^{\b})+\sum_{\a\in\Lambda(h')}c_{2\bu_m\a}'\x^{\a} +(a_m^2-d_{2\bu_m}')\x^{2\bu_m}+b_m^2\x^{2\bv_m}-2a_mb_m\x^{\bu_m+\bv_m}$ which is still a sum of nonnegative banana polynomials. If $2\bu_m\in\Gamma(h')$ and $2\bu_m\notin\supp(h)$, then the terms $-d_{2\bu_m}'\x^{2\bu_m}$ and $a_m^2\x^{2\bu_m}$ must be cancelled in (\[sec3-eq10\]). Hence we obtain the expression of $h$ as $h=\sum_{\b\in\Gamma(h')\backslash\{2\bu_m\}}(\sum_{\a\in\Lambda(h')}c_{\b\a}'\x^{\a}-d_{\b}'\x^{\b})+\sum_{\a\in\Lambda(h')}c_{2\bu_m\a}'\x^{\a} +b_m^2\x^{2\bv_m}-2a_mb_m\x^{\bu_m+\bv_m}$ which is still a sum of nonnegative banana polynomials. Continue adjusting the terms involving $2\bv_m$ and $\bu_m+\bv_m$ in the expression of $h$ in a similar way. Eventually we can write $h$ as a sum of nonnegative banana polynomials with the same support as desired. Theorem \[sec3-thm2\] ensures that every SONC polynomial admits a SONC decomposition by only using the support from the original polynomial and with no cancellation. This is a very desired property (sparsity-preservation) to design efficient algorithms for sparse polynomial optimization based on SONC decompositions and is a distinguished difference from SOS decompositions. Although in the proof of Theorem \[sec3-thm2\], we use all simplices containing $\b$ as an interior point for each $\b\in\Gamma(f)$, it is possible to obtain a SONC decomposition for $f$ by using less simplices. Actually, by Theorem \[sec3-thm2\] together with Carathéodory’s theorem ([@ro Corollary 17.1.2]), we can write a SONC polynomial $f$ as a sum of at most $|\supp(f)|$ nonnegative circuit polynomials. Finally, we give an example to illustrate that the condition that all of the $\b_j$’s lie in the same side of every hyperplane determined by points among $\{\a_1,\ldots,\a_m\}$ in Theorem \[npmt-thm1\] cannot be dropped. Let $f=1+4x^2+x^4-3x-3x^3$. Then $f\in\PSD$, but $f\notin\SONC$. It is easy to verify that the minimum of $f$ is $0$ with the only minimizer $x_*=1$. We have $1=\frac{1}{2}\cdot0+\frac{1}{2}\cdot2=\frac{3}{4}\cdot0+\frac{1}{4}\cdot4$, and $3=\frac{1}{2}\cdot2+\frac{1}{2}\cdot4=\frac{1}{4}\cdot0+\frac{3}{4}\cdot4$. (0,0)–(4,0); (0,0) circle (2pt); (1) at (0,0) [$1$]{}; (1,0) circle (2pt); (2) at (1,0) [$x$]{}; (2,0) circle (2pt); (3) at (2,0) [$x^2$]{}; (3,0) circle (2pt); (4) at (3,0) [$x^3$]{}; (4,0) circle (2pt); (5) at (4,0) [$x^4$]{}; By Theorem \[sec3-thm2\] and from the proof of Theorem \[npmt-thm1\], we have that if $f\in\SONC$, then the following linear system $$\label{npmt-eq5} \begin{cases} 1=\frac{1}{2}s_1+\frac{3}{4}s_3+\frac{1}{4}s_4\\ 4x_*^2=\frac{1}{2}s_1+\frac{1}{2}s_3\\ x_*^4=\frac{1}{4}s_2+\frac{1}{2}s_3+\frac{3}{4}s_4\\ 3x_*=s_1+s_2\\ 3x_*^3=s_3+s_4 \end{cases}$$ on variables $\{s_1,s_2,s_3,s_4\}$ should have a nonnegative solution. However, (\[npmt-eq5\]) has no nonnegative solutions. This contradictory implies $f\notin\SONC$. [99]{} D. Cox, J. Little, D. O’Shea, [*Ideals, Varieties, and Algorithms*]{}, Springer, the fourth edition, 2015. L. Danzer, B. Grünbaum, V. Klee, [*Helly’s theorem and its relatives*]{}, Proc. Symp. Pure Math., 7(1963):101-180. M. Dressler, S. Iliman, T. de Wolff, [*A positivstellensatz for sums of nonnegative circuit polynomials*]{}, SIAM J. Appl. Algebra Geom., 1(2017):536-555. M. Dressler, S. Iliman, T. de Wolff, [*An Approach to Constrained Polynomial Optimization via Nonnegative Circuit Polynomials and Geometric Programming*]{}, J. Symbolic Comput., 91(2019):149-721. M. Dressler, A. Kurpisz, T. de Wolff, [*Optimization over the Boolean Hypercube via Sums of Nonnegative Circuit Polynomials*]{}, 2018, arXiv:1802.10004. S. Iliman, T. de Wolff, [*Amoebas, nonnegative polynomials and sums of squares supported on circuits*]{}, Res. Math. Sci., 3(2016), 3:9. S. Iliman, T. de Wolff, [*Lower Bounds for Polynomials with Simplex Newton Polytopes Based on Geometric Programming*]{}, SIAM J. Optim., 26(2)(2016):1128-1146. S. Müller, E. Feliu, et al., [*Sign Conditions for Injectivity of Generalized Polynomial Maps with Applications to Chemical Reaction Networks and Real Algebraic Geometry*]{}, Found. Comput. Math., 16.1(2016):69-97. D. Papp, [*Duality of sum of nonnegative circuit polynomials and optimal SONC bounds*]{}, 2019, arXiv preprint arXiv:1912.04718. P. A. Parrilo, [*Structured semidefinite programs and semialgebraic geometry methods in robustness and optimization*]{}, Ph.D. Thesis, California Institute of Technology, 2000. P. A. Parrilo, B. Sturmfels, [*Minimizing Polynomial Functions*]{}, Proceedings of the Dimacs Workshop on Algorithmic and Quantitative Aspects of Real Algebraic Geometry in Mathematics and Computer Science, 32(1)(2001):83-100. V. Powers, B. Reznick, [*A note on mediated simplices*]{}, 2019, arXiv preprint arXiv:1909.11008. B. Reznick, [*Forms derived from the arithmetic-geometric inequality*]{}, Math. Ann., 283(3)(1989):431-464. R. T. Rockafellar, [*Convex analysis*]{}, Princeton university press, 1970. H. Seidler, T. de Wolff, [*An experimental comparison of SONC and SOS certificates for unconstrained optimization*]{}, 2018, arXiv preprint arXiv:1808.08431. J. Wang, [*Systems of polynomials with at least one positive real zero*]{}, online in J. Algebra Appl., 2019. [^1]: This work was supported partly by NSFC under grants 61732001 and 61532019.
To become a good engineer of business major, a student must first study the all-important subjects of race and ethnicity — at least according to student government leaders at the University of Michigan, who are working to extend the liberal arts college’s race requirements to all colleges of the university. A proposal, drafted by members of the Central Student Government, aims to reform the requirement that all students in the College of Literature, Science and the Arts study race and ethnicity before graduation. Moving forward, all students–even those in the Colleges of Engineering and Business — would be forced to take a class with a racial component, if the proposal were approved by faculty. Sagar Lathia, president of the LSA Student Government, which is separate from CSG, supports the change. He told The Michigan Daily that students studying business and economics had just as much reason to take R&E classes as their peers in LSA. It would be helpful for economics students to study “poverty, inequality and labor through the scope of race,” he suggested. Activists hope that any proposal approved by the administration would assert identity-based themes — such as gender, sexuality, immigration status, religion and race — as a core focus of the curriculum at each of the university’s colleges. The proposal is support by the Black Student Union, a race-based activist group at UM that recently made news for presenting a list of demands to the university. Administrators immediately caved to group’s most costly demand: a $300,000 renovation of the campus’s multicultural center. (RELATED: UMich meets demands of black students who threatened ‘physical action’) BSU activist Shayla Scales said the proposal was all about creating more diversity. “I truly believe innovation lies in the crevices of diversity,” she said in a statement. “Making sure that we incorporate diversity in all of our thinking and the way that we see the world will only lead to innovation.” Follow Robby on Twitter
trigger: none pr: none resources: pipelines: - pipeline: images source: 'Azure-IoT-Edge-Core Build Images' branch: master - pipeline: packages source: 'Azure-IoT-Edge-Core Edgelet Packages' branch: master jobs: ################################################################################ - job: linux_amd64_nested_edge_l3 ################################################################################ displayName: Linux amd64 (Nested Edge L3) pool: name: $(pool.name) demands: - Agent.OS -equals Linux - Agent.OSArchitecture -equals X64 - Agent.Name -equals $(agent.name) - nested-edge -equals L3 # Agent name variable is only used by nested edge test condition: ne(variables['agent.name'], '') variables: os: linux arch: amd64 artifactName: iotedged-ubuntu16.04-amd64 steps: - template: templates/e2e-clean-directory.yaml - template: templates/e2e-setup.yaml - template: templates/e2e-clear-docker-cached-images.yaml - template: templates/e2e-run.yaml
Can Trump keep his big promises on steel jobs? David Holzman, center, sits with fellow laid off steel workers ahead of a union meeting in Granite City. In southwestern Illinois, the steel industry has been an anchor in the community for decades. - Kimberly Adams/Marketplace During a presidential campaign, candidates make a lot of promises. History shows us the winners often have trouble keeping them. Many supporters of President-elect Donald Trump are looking to him to keep many of his campaign promises about bringing back manufacturing jobs, especially in industrial towns that have borne the brunt of job losses in recent years. In southwestern Illinois, the steel industry has been an anchor in the community for decades. The mill feels like a city unto itself, with mountains of raw materials and weathered buildings that stretch for blocks. Usually, the parking lots around the U.S. Steel facilities are full of cars, but weeds are peeking through the cracks in the asphalt in some of those lots now. "Actually we have currently about 437 members working," said Simmons at the local union hall ahead of a meeting. "And for a brief time, those people weren't working and then you see tumbleweeds going through the plant." Michael Hicks, the director of the Center for Business and Economic Research at Ball State University, said because steel jobs tend to be concentrated in a few areas, "the impact that's felt by even a small disturbance in international trade is very heavy in those communities. But it goes almost unnoticed by the rest of the country." USW's Simmons said for every lost steel job in Granite City, seven other jobs are affected. That can mean the materials suppliers, the scrap yard, even the doughnut shop in a renovated gas station across from the mill. They’re all feeling the hit. And the laid off steel workers themselves are hard-pressed to find other jobs that pay even half of what their old jobs did. So many are hoping a new administration means things will change for the better. "I got hopes for Trump," said David Holzman, who lost his job in January after 26 years. "I hope he delivers on his promises." Holzman is skeptical, though. He voted for Hillary Clinton, the candidate backed by United Steel Workers nationally. But many of his co-workers latched on to Trump’s message. Some broke with the USW and supported the Republican candidate. David Holzman was laid off from his job at U.S. Steel in Granite City in January. Like his union, he supported Hillary Clinton in the election, but is hoping Donald Trump will keep promises to bring back steel jobs. - Kimberly Adams/Marketplace "He's already done something with the Carrier [deal] so things could be looking up in that respect," said 62-year-old Scott Nailor, who worked at the mill for 21 years before being laid off. "I'm kind of hoping maybe by the first of the year maybe things will turn around for the steel industry and hopefully I go back to work." Even so, Nailor isn't expected what happened in Indiana to necessarily be duplicated across every industry. "I look for it to be more of a policy change instead of him actually getting involved with it personally," he said. "He's not going to have the time to do that." Scott Nailor voted for Trump in the election, and was encouraged by the president-elect's deal with Carrier to preserve some jobs in Indiana. - Kimberly Adams/Marketplace Plus, other states may not be as willing to cut the same kind of deal as Indiana, which is giving Carrier millions in tax breaks to save fewer than half the jobs the company planned to outsource. Clinton supporter David Holzman was not impressed. "I think it was a publicity stunt," he said of the deal. "I'm glad it worked. But he's going to have to do it a whole bunch more times before I'm going to vote for [Trump] next time." According to the union's Simmons, steel workers like Holzman may end up getting their jobs back regardless of what Trump does. That’s thanks to an ongoing crackdown on international steel dumping. "We see the steel prices already increasing," said Simmons, "and along with that we see the demand starting to pick up a little bit. So the normal order of business and demand is going to get us back to work." In fact, just this week, U.S. Steel said will it bring back more than 200 jobs at the Granite City site by mid February. Michael Hicks at Ball State says the old days won’t be coming back with those jobs because while trade is part of the reason for the loss of steel jobs, other trends like automation and increased efficiency can't be rolled back. "You could see an uptick in steel jobs, but we're just not going to return to the 30,000 or 40,000-person steel towns of Gary, Indiana or Pittsburgh that we saw 50 or 60 years ago," said Hicks. "Those days have passed and there's no public policy that can bring them back."
"We had a new main garage door fitted earlier this year and it transpires that the dozy installer didn't tighten all the fittings properly. So, this morning, one of the locking bars didn't retract properly and I couldn't get in and all my tools were in there. The personnel door can't be opened because the previous owner lost the key. So, what to do - dive down to Screwfix and buy a demolition saw and saw through the bolts and brackets holding the personnel door frame to the wall. There was sufficient gap to get the saw blade between the frame and wall. Success! The saw did light work of cutting the fixings and I was in and rectifying the problem in no time. "I have recently replaced a number of old UPVC windows,and needed to cut the old frames down to size in order to dispose of them. The demolition saw enabled me to cut through both the plastic frame and the steel re-inforcing inserts in one fairly easy cut. Both the handle and the blade feel really solid and appear build to last. The coating on the blade soon wears off, but the addition of a quick shot of WD40 soon aids further cutting. If you need a demolition saw for only occasional light use this saw is very effective, and good value for money when compared to an electric saw of this type." "I've been cutting Foamglass insulation material with this saw. In the past anything used for this job looses its teeth in a fairly short time.Halfway through the job today I needed to cut a bit of softwood - this saw just flew through it.The Foamglass has removed all the paint and finish from the saw, but its still cutting straight and true." "I bought this saw because one of the reviewers said that it is very good for cutting through the cement tile backing board.Rubbish!!!I needed to cut a 45cm x 40cm piece of the Hardybacker board. By the end of the first cut it was already going very slow - the second cut took over 5 minutes of relentless sawing, and the thing was as blunt as a brick."
Q: Passing Class.forName through generic type class parameter I am trying to make universal TableView in JavaFx for all of my models in application: Class c = Class.forName(fullClassNames.get(itemNum)); table.getItems().clear(); Field[] fields = c.getDeclaredFields(); for (int i=0; i < fields.length; i++){ table.getColumns().add(new TableColumn(fields[i].getName())); ((TableColumn)table.getColumns().get(table.getColumns().size()-1)).setCellValueFactory(new PropertyValueFactory<???, ???>(fields[i].getName())); } and I don't know how can I pass "c" (that stores my model) and field type through PropertyValueFactory like generic parameter? For example it looks like: new PropertyValueFactory<Person,String>("lastName") A: Generics are largely a compile time feature. You don't have to specify the generic types at run time. You can create new PropertyValueFactory("lastName")
Q: How do I fix this child class' initializer list error? Parent class is Vehicle, child class is Car. Have to use initializer list for all constructors which is proving to be a challenge for me. I keep getting the following error for what I have currently: car.cpp:7:1: error: redefinition of 'Car::Car()' Car::Car() ^ In file included from car.cpp:3:0: car.h:12:5: note: 'Car::Car()' previously defined here Car() : Vehicle("NoID", -1, "NoMake", "NoModel", "NoColor") {} ^ As a novice I am mildly familiar with basic initialization lists but not when it comes to using them in child classes. In case it wasn't glaringly obvious this is for an assignment; I am just looking for help diagnosing the above error, not a full solution. vehicle.h #ifndef VEHICLE_H #define VEHICLE_H #include <iostream> #include <string> using namespace std; class Vehicle { protected: /* Each of these data item represent something any type of vehicle will have, so it makes sense these would be in the base class. */ // added a parent constructor so child classes can use // these variables in initializer list Vehicle(string id, int year, string make, string model, string color) : id(id), year(year), make(make), model(model), color(color) {} string id; int year; string make; string model; string color; public: Vehicle(); // Vehicle(string id, int year, string make, string model, string color); Vehicle(ifstream &infile); // virtual ~Vehicle(); string getID(); void setID(string ID); virtual void printInfo(ofstream &out); }; #endif car.h #ifndef CAR_H #define CAR_H #include <iostream> #include <string> #include "vehicle.h" using namespace std; class Car : public Vehicle { private: Car() : Vehicle("NoID", -1, "NoMake", "NoModel", "NoColor") {} int doors; string paymentType; public: // Car(); Car(string id, int year, string make, string model, string color, int doors, string paymentType); Car(ifstream &infile); int getDoors(); void setDoors(int numdoors); string getPaymentType(); void setPaymentType(string pt); void printInfo(ofstream &out); }; #endif car.cpp #include <iostream> #include <string> #include "car.h" #include "vehicle.h" using namespace std; Car::Car() { // default constructor initialization list? } Car::Car(string id, int year, string make, string model, string color, int doors, string paymentType) { // parameterized constructor } Car::Car(ifstream &infile) { // regular constructor i think } int Car::getDoors() { return doors; } void Car::setDoors(int numdoors) { doors = numdoors; } string Car::getPaymentType() { return paymentType; } void Car::setPaymentType(string pt) { paymentType = pt; } void Car::printInfo(ofstream &out) { // unfinished } A: You declared and defined your constructor here Car() : Vehicle("NoID", -1, "NoMake", "NoModel", "NoColor") {} therefore, the definition in the cpp file is a second definition, which is illegal Car::Car() { // default constructor initialization list? } If you'd like to move the implementation to the cpp file, then change the header to just have the declaration // car.h class Car : public Vehicle { Car(); ... }; // car.cpp Car::Car() : Vehicle("NoID", -1, "NoMake", "NoModel", "NoColor") { // default constructor initialization list? }
Automata Processor: It’s Not Just About Speed and Power Consumption At Supercomputing 13 (SC13), I participated in a discussion panel on the topic of reconfigurable computing. One recurring theme expressed by the audience was disappointment that the industry is not moving more quickly toward exascale-class performance despite the fact that we have some very powerful CPUs, GPUs, and reconfigurable logic engaged in this effort. Several panel members pointed to insufficient programmer productivity as the root of this problem. In other words, we have very powerful systems that we cannot fully exploit because it’s too difficult to do so. We know that scientists and engineers are demanding high levels of parallelism. Parallelism is viewed as a key capability in the march toward exascale-class computing. Unfortunately, achieving sufficient levels of parallelism can be very hard. Simply identifying the potential parallelism in complex computer algorithms is often one of the most difficult challenges. And if this potential for parallelism can be identified, implementing this parallelism on current parallel computer architectures becomes the next major challenge. The Automata Processing can address these challenges in parallel programming in a very unique way. While parallel automata-based computing may be unfamiliar to many, the actual concept is quite simple. Some large problems may require tens, hundreds, or even thousands of automata to operate in parallel. In conventional parallel architectures, these individual automata can be equated to threads—and synchronizing these threads, managing their access to system resources, and coordinating results become very difficult and time-consuming tasks. With the Automata Processor, each automaton is loaded into the processing fabric and essentially becomes an independently operating thread execution engine. Need another thread? Simply compile your automaton and load it into an empty area of the fabric. All of the automatons will operate in parallel against the input data stream. It’s clean, simple, and easy—and is sure to make the lives of parallel programmers a lot easier. This programming simplicity has not been lost on some analysts who have reviewed the Automata Processor architecture. In his SC13 blog series for Moor Insights & Strategy, Paul Tiech zeroed in on this compelling capability of the Automata Processor: the fact that the user can define hundreds or even thousands of unique machines and never have to think about how to make them work together in parallel. I was very happy to see someone “on the outside” make this important observation. Technologies with simple, easy-to-use interfaces and programming capabilities—like the Automata Processor—will play a key role in improving programmer productivity and helping the industry to scale computing performance to extraordinary levels. Stay tuned for more discussions and analysis of our Automata Processor launch…
The genius of Indian cartoonist Mario Miranda By Pamela D'Mello Goa Published duration 9 May 2016 India's western beachfront state Goa has been busy with celebrations to mark the 90th birth anniversary of one of the country's best-known cartoonists and illustrators, Mario Miranda. Mario's warm-hearted, often comic drawings of local characters and culture helped to popularise his native state, both across India and overseas. He died in 2011. The Mario Gallery and Museum has published Miranda's 1949 diaries, which depict his student life as a 22-year-old in the city of Mumbai. A free musical concert, and an exhibition of 74 of his original and print works are on display at an art gallery in Goa's capital Panjim, as part of the celebrations. Though born in Goa, Mario, as he was popularly known, (self-portrait, above) spent his youth shuttling between Mumbai and Goa. He worked as a cartoonist in newspapers like the now-defunct Current and later with the Illustrated Weekly of India magazine, besides Midday and later, Economic Times. The Afternoon Dispatch and Courier produced some of his best work on the city. That period also saw Mario create the endearing characters of his cartoons - the secretary Miss Fonseca, the minister Bundaldass, and Bollywood star Rajani Nimbupani (above). "Mumbai, seen through Mario Miranda's eyes, is at one level cosmopolitan, symbolising the good things in life, and at another level, a nightmare with its acute space crunch and sundry other civic woes" says Gerard da Cunha, curator of the artist's work. At the height of his creativity and popularity in the 1970s and 80s, Mario's work was ubiquitous - appearing in textbooks, calendars, murals and magazines. In 2005, Mr da Cunha began to work on a book on the artist, and tracked down some 13,000 drawings - just 30% of his work- from myriad sources, including Mario's friends, personal collections, publications, and the Mumbai murals that had survived. Mario travelled to 22 countries, where he was invited to visit and sketch. Mr da Cunha says Mario was a "versatile" artist. "Though the artists' community did not consider Mario to be one of them, it did not affect his creative urges, which found expressions in colour, pen-and-ink and charcoal." "His range of styles, and command over different mediums, made him a bit of an enigma. Ironically, it was the cartoonist/illustrator's tag that stuck, limiting people's appreciation to 'just a few laffs'." Mario consciously avoided political cartooning, but his role as a social cartoonist is unmistakable, points out Mr da Cunha. The diaries he maintained from the age of 10, are virtually the rarest of visual chronicles of colonial Portuguese Goa, capturing life in those changing times. Artwork from his travels are "a treasure trove of situations, cities and characters". Mr da Cunha believes though that though Mario gained huge popularity during his lifetime, his true genius is yet to be recognised.
Cutoff Point AAA | DEFINITION of 'Cutoff Point' The point at which an investor decides whether or not a particular security is worth purchasing. The cutoff point is very subjective and will be based on the personal characteristics of the individual investor. Some examples of personal characteristics that may determine the cutoff point include the investor's required rate of return and his or her risk aversion level. INVESTOPEDIA EXPLAINS 'Cutoff Point' Because cutoff points are largely subjective, they will vary widely among investors. For example, if an investor has a lower required rate of return, he or she will likely pay more for the same security than a person with a higher required rate of return. This translates into a higher cutoff point for the first investor. A cutoff point may also be considered a good "rule of thumb" when considering particular securities, as it may help the investor make more consistent investment decisions.
Arginine transport through system y(+)L in cultured human fibroblasts: normal phenotype of cells from LPI subjects. In lysinuric protein intolerance (LPI), impaired transport of cationic amino acids in kidney and intestine is due to mutations of the SLC7A7 gene. To assess the functional consequences of the LPI defect in nonepithelial cells, we have characterized cationic amino acid (CAA) transport in human fibroblasts obtained from LPI patients and a normal subject. In both cell types the bidirectional fluxes of arginine are due to the additive contributions of two Na(+)-independent, transstimulated transport systems. One of these mechanisms, inhibited by N-ethylmaleimide (NEM) and sensitive to the membrane potential, is identifiable with system y(+). The NEM- and potential-insensitive component, suppressed by L-leucine only in the presence of Na(+), is mostly due to the activity of system y(+)L. The inward and outward activities of the two systems are comparable in control and LPI fibroblasts. Both cell types express SLC7A1 (CAT1) and SLC7A2 (CAT2B and CAT2A) as well as SLC7A6 (y+LAT2) and SLC7A7 (y+LAT1). We conclude that LPI fibroblasts exhibit normal CAA transport through system y(+)L, probably referable to the activity of SLC7A6/y+LAT2.
[Spontaneous regression of a bronchial epidermoid cancer]. A spontaneous regression of epidermoid carcinoma of the bronchus is reported here for only the third time. This report concerns a 57 year old patient suffering from chronic airflow obstruction who had twice required artificial ventilation. Fibroptic bronchoscopy was performed on account of hilar asymetry and a small tumour on the carina of the middle lobe was discovered. The biopsy confirmed the existence of a moderately differentiated invasive epidermoid bronchial carcinoma. An examination performed four years later failed to reveal this tumour. Immunological studies showed only a notable rise in NK cells.
Expression of CD1d by astrocytes corresponds with relative activity in multiple sclerosis lesions. The CD1 protein family present lipid antigens to the immune system. CD1d has been observed in the CNS of MS patients, yet no studies have quantitatively characterized this expression and related it to inflammatory demyelinative activity in MS plaques. In this study, we set out to localize and quantify the presence of CD1d expression by astrocytes in MS brain tissue lesions. Formalin-fixed, paraffin-embedded MS and control brain tissues were examined. Lesions were classified as active, chronic active or chronic silent. Using immunofluorescence, the density of CD1d-positive cells was determined in active lesions, chronic active lesion edges and chronic active lesion centers. The percentage of CD1d-positive cells that were GFAP-positive was also determined in each of these regions. CD1d immunoreactivity was significantly increased in MS compared to control tissue, was significantly more prevalent in areas of active demyelination, and colocalized with GFAP-positive reactive astrocytes. Increases of CD1d immunoreactivity in the CNS of MS patients being greatest in areas of active demyelination and localized to GFAP-positive astrocytes lend support to the hypothesis of a lipid-targeted autoimmune process contributing to the pathogenesis of MS.
Q: ocamlbuild: build plugin with options I'm trying to write an ocamlbuild plugin (myocamlbuild.ml) that will use definitions from another file. I have a lot of definitions that I'd like to be used across several build plugins and I wanted put them in their own file. I tried running ocamlbuild twice, once with -no-plugin just to build the plugin, e.g. ocamlbuild -no-plugin myocamlbuild.cmo and then again afterwards ocamlbuild actual-targets.otarget but when I run the second one it tries to rebuild the plugin and complains that it can't find the included library (even though it exists in the _build directory). So, is there any way that I can convince ocamlbuild to include '-I _build _build/coq_paths.cmx' on the command line? From 'ocamlbuild -help' it looks like there is a '-plugin-option' flag, but I can't find any way to use it. Thanks. A: Since 4.01, ocamlbuild supports a new (experimental) option -plugin-tag that allows to specify (built-in) ocamlbuild tags to use when compiling myocamlbuild.ml. If you package "coq-paths" using findlib, you can then use ocamlbuild -use-ocamlfind -plugin-tag "package(coq-path)" ...
Dying girls message Collected by Merlin Mitchell Transcribed by Mary C. Parler Sung by Mrs. Ben Wages Fayetteville, Arkansas May 25, 1950 Reel 52, Item 3 The Dying Girl's Message Raise the curtains higher, Mother, Air can never harm me now, Let the breeze blow in upon me, It will cool my fevered brow. Soon this struggle will be over, Soon be still this aching heart, But I have a dying message, I must give thee 'fore we part. Lay my head upon your bosom, Hold me closer, Mother dear. Mother, there is one, you know him, Oh, I cannot speak his name, You remember how he sought me, How his loving words did gain. How he gained my youngest (?) blessing, Vowing in most tender tones That he would forever guide me Where my heart was his alone. You remember how I trusted, How my thoughts were all of him, Draw those curtains higher, Mother, For the light is growing dim. Need I tell you how he left me, Coldly turning me aside, How he wooed and won another, And'll claim her for his bride. Life has been a weary burden, Since that hour of deepest woe, run that way, They are well I know. Glad I obey the summons, Going to a better land, Where no hearts are won and broken, But all's band. The Dying Girl's Message (Cont.) Reel 52, Item 3 (Cont.) Take this ring from off my finger Where he placed it long ago, Give it to him with a blessing That in dying I bestow. Give it to him as a token Of forgiveness and of peace. Hark ! I hear his voice in passing, Will those watchings never cease? Hark ! I hear his footsteps coming, Note his ... Strange how my disordered fancy Caught his footsteps on the green (?) Do not chide him, Mother darling, Though you miss me from your side, I forgive him and I wish him Joy with her so soon his bride. Do not chide him, Mother darling, Though my form you see no more, Grieve not; think me only waiting For you on the other shore. I am cool now, close the window, Hold me closer, kiss me too, Joy ! what means that burst of music? Tis the Savior's voice I know! He is waiting to receive me, Oh, how great a bliss to die, Mother, meet your child in Heaven, One more kiss and then goodbye. Click tabs to swap between content that is broken into logical sections. Collected by Merlin Mitchell Transcribed by Mary C. Parler Sung by Mrs. Ben Wages Fayetteville, Arkansas May 25, 1950 Reel 52, Item 3 The Dying Girl's Message Raise the curtains higher, Mother, Air can never harm me now, Let the breeze blow in upon me, It will cool my fevered brow. Soon this struggle will be over, Soon be still this aching heart, But I have a dying message, I must give thee 'fore we part. Lay my head upon your bosom, Hold me closer, Mother dear. Mother, there is one, you know him, Oh, I cannot speak his name, You remember how he sought me, How his loving words did gain. How he gained my youngest (?) blessing, Vowing in most tender tones That he would forever guide me Where my heart was his alone. You remember how I trusted, How my thoughts were all of him, Draw those curtains higher, Mother, For the light is growing dim. Need I tell you how he left me, Coldly turning me aside, How he wooed and won another, And'll claim her for his bride. Life has been a weary burden, Since that hour of deepest woe, run that way, They are well I know. Glad I obey the summons, Going to a better land, Where no hearts are won and broken, But all's band. The Dying Girl's Message (Cont.) Reel 52, Item 3 (Cont.) Take this ring from off my finger Where he placed it long ago, Give it to him with a blessing That in dying I bestow. Give it to him as a token Of forgiveness and of peace. Hark ! I hear his voice in passing, Will those watchings never cease? Hark ! I hear his footsteps coming, Note his ... Strange how my disordered fancy Caught his footsteps on the green (?) Do not chide him, Mother darling, Though you miss me from your side, I forgive him and I wish him Joy with her so soon his bride. Do not chide him, Mother darling, Though my form you see no more, Grieve not; think me only waiting For you on the other shore. I am cool now, close the window, Hold me closer, kiss me too, Joy ! what means that burst of music? Tis the Savior's voice I know! He is waiting to receive me, Oh, how great a bliss to die, Mother, meet your child in Heaven, One more kiss and then goodbye.
The Agency has since 2010 established a scholarship scheme for Masters and Doctoral degree in relevant areas of Information Technology (IT) and ICT Law obtainable in Nigerian (Government and Private) Universities. Minimum requirements: PhD: Only University and Polytechnic Lecturers with MSc in any Information Technology related field are eligible to apply for sponsorship.MSc: Holders of First Class or Second Class (Upper) Honours Bachelor’s degree, in Information Technology related field and Law. Criteria The scholarship award is strictly based on merit and is evenly distributed between the six geo-political zones for the PhD, 36 States and FCT for MSc. Duration The sponsorship for the Masters programme will run for one year and the Doctorate programme for three years. A comprehensive Aptitude Test(s) will be conducted to determine successful candidates for the Award. Only candidates who are found eligible will be Shortliste EDITOR PICKS About OpportunitiesForAfricans.com OpportunitiesForAfricans.com is an online portal that connects Africans to the latest life changing opportunities around the globe such as Scholarships, Internships, Fellowships and Volunteering Opportunities. Facebook: http://www.facebook.com/opportunitiesforafricans.com Twitter: http://www.twitter.com/oppsforafricans E-Mail: [email protected]
Recent lessons in gene expression, cell cycle control, and cell biology from adenovirus. Adenovirus continues to be an important model system for investigating basic aspects of cell biology. Interactions of several cellular proteins with E1A conserved regions (CR) 1 and 2, and inhibition of apoptosis by E1B proteins are required for oncogenic transformation. CR2 binds RB family members, de-repressing E2F transcription factors, thus activating genes required for cell cycling. E1B-19K is a BCL2 homolog that binds and inactivates proapoptotic BAK and BAX. E1B-55K binds p53, inhibiting its transcriptional activation function. In productively infected cells, E1B-55K and E4orf6 assemble a ubiquitin ligase with cellular proteins Elongins B and C, Cullin 5 and RBX1 that polyubiquitinates p53 and one or more subunits of the MRN complex involved in DNA double-strand break repair, directing them to proteosomal degradation. E1A CR3 activates viral transcription by interacting with the MED23 Mediator subunit, stimulating preinitiation complex assembly on early viral promoters and probably also the rate at which they initiate transcription. The viral E1B-55K/E4orf6 ubiquitin ligase is also required for efficient viral late protein synthesis in many cell types, but the mechanism is not understood. E1A CR1 binds several chromatin-modifying complexes, but how this contributes to stimulation of cellular DNA synthesis and transformation is not clear. E1A CR4 binds the CtBP corepressor, but the mechanism by which this modulates the frequency of transformation remains to be determined. Clearly, adenovirus has much left to teach us about fundamental cellular processes.
The Beacon Light The Beacon Light is a painting by J. M. W. Turner. It was given to the National Museum of Wales by the Davies sisters (Gwendoline and Margaret). For some time it was regarded as a fake, but is now accepted as authentic. Provenance Beacon Light was among a number of works that were said to have been given by Turner to his mistress, Mrs Booth. It was sold at Christie's by her son, John Pound (her son by her first marriage). In 1922, it was sold as a genuine Turner and the Davies sisters (Gwendoline and Margaret) spent £2,625 to buy it. Following the death of Gwendoline Davies, it was among seven works by Turner that were donated to the National Museum of Wales. Doubts as to authenticity Shortly after the donation, doubts were raised about its authenticity and that of two other Turners donated by the sisters. Butlin and Joll dated the work to c. 1835-1840 and suggest that it is a fragment of a larger canvas 'which has certainly been worked on by a hand other than Turner's'. At that time, it was believed to depict the Needles on the Isle of Wight It was removed from display, but did appear in a 2007 exhibition. It returned to display in September 2012. Fake or Fortune? It was featured on the BBC TV programme Fake or Fortune? Scientific analysis showed that the paint used was consistent with Turner's known usage and that the same paint had been used for the whole of the picture. An X-ray showed that a lighthouse at the summit of the bluff had been painted over. Philip Mould and Bendor Grosvenor were able to establish that the scene was near Margate and not on the Isle of Wight as had been previously believed. The evidence for the painting's authenticity was presented to Martin Butlin, the co-author of the Turner catalogue raisonné, who accepted that the work was genuine. References Category:Paintings by J. M. W. Turner Category:Paintings of the National Museum Cardiff Category:Fake or Fortune? Category:Water in art
<?php // Pandora FMS - http://pandorafms.com // ================================================== // Copyright (c) 2005-2011 Artica Soluciones Tecnologicas // Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. if (! isset($config['id_user'])) { return; } use PandoraFMS\Dashboard\Manager; require_once 'include/functions_menu.php'; require_once $config['homedir'].'/include/functions_visual_map.php'; enterprise_include('operation/menu.php'); $menu_operation = []; $menu_operation['class'] = 'operation'; // Agent read, Server read. if (check_acl($config['id_user'], 0, 'AR')) { // View agents $menu_operation['estado']['text'] = __('Monitoring'); $menu_operation['estado']['sec2'] = 'operation/agentes/tactical'; $menu_operation['estado']['refr'] = 0; $menu_operation['estado']['id'] = 'oper-agents'; $sub = []; $sub['view']['text'] = __('Views'); $sub['view']['id'] = 'Views'; $sub['view']['type'] = 'direct'; $sub['view']['subtype'] = 'nolink'; $sub['view']['refr'] = 0; $sub2 = []; $sub2['operation/agentes/tactical']['text'] = __('Tactical view'); $sub2['operation/agentes/tactical']['refr'] = 0; $sub2['operation/agentes/group_view']['text'] = __('Group view'); $sub2['operation/agentes/group_view']['refr'] = 0; $sub2['operation/tree']['text'] = __('Tree view'); $sub2['operation/tree']['refr'] = 0; $sub2['operation/agentes/estado_agente']['text'] = __('Agent detail'); $sub2['operation/agentes/estado_agente']['refr'] = 0; $sub2['operation/agentes/estado_agente']['subsecs'] = ['operation/agentes/ver_agente']; $sub2['operation/agentes/status_monitor']['text'] = __('Monitor detail'); $sub2['operation/agentes/status_monitor']['refr'] = 0; enterprise_hook('tag_view_submenu'); $sub2['operation/agentes/alerts_status']['text'] = __('Alert detail'); $sub2['operation/agentes/alerts_status']['refr'] = 0; $sub['view']['sub2'] = $sub2; enterprise_hook('inventory_menu'); if ($config['activate_netflow'] || $config['activate_nta']) { $sub['network_traffic'] = [ 'text' => __('Network'), 'id' => 'Network', 'type' => 'direct', 'subtype' => 'nolink', 'refr' => 0, ]; // Initialize the submenu. $netflow_sub = []; if ($config['activate_netflow']) { $netflow_sub = array_merge( $netflow_sub, [ 'operation/netflow/netflow_explorer' => [ 'text' => __('Netflow explorer'), 'id' => 'Netflow explorer', ], 'operation/netflow/nf_live_view' => [ 'text' => __('Netflow Live View'), 'id' => 'Netflow Live View', ], ] ); } if ($config['activate_nta']) { $netflow_sub = array_merge( $netflow_sub, [ 'operation/network/network_explorer' => [ 'text' => __('Network explorer'), 'id' => 'Network explorer', ], ] ); } if ($config['activate_nta'] || $config['activate_netflow']) { $netflow_sub = array_merge( $netflow_sub, [ 'operation/network/network_usage_map' => [ 'text' => __('Network usage map'), 'id' => 'Network usage map', ], ] ); } $sub['network_traffic']['sub2'] = $netflow_sub; } if ($config['log_collector'] == 1) { enterprise_hook('log_collector_menu'); } // End of view agents. } // SNMP Console. $sub2 = []; if (check_acl($config['id_user'], 0, 'AR') || check_acl($config['id_user'], 0, 'AW')) { $sub2['operation/snmpconsole/snmp_view']['text'] = __('SNMP console'); $sub2['operation/snmpconsole/snmp_browser']['text'] = __('SNMP browser'); enterprise_hook('snmpconsole_submenu'); } if (check_acl($config['id_user'], 0, 'PM')) { $sub2['operation/snmpconsole/snmp_mib_uploader']['text'] = __('MIB uploader'); } if (check_acl($config['id_user'], 0, 'LW') || check_acl($config['id_user'], 0, 'LM')) { $sub2['godmode/snmpconsole/snmp_filters']['text'] = __('SNMP filters'); $sub2['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator'); } if (!empty($sub2)) { $sub['snmpconsole']['sub2'] = $sub2; $sub['snmpconsole']['text'] = __('SNMP'); $sub['snmpconsole']['id'] = 'SNMP'; $sub['snmpconsole']['refr'] = 0; $sub['snmpconsole']['type'] = 'direct'; $sub['snmpconsole']['subtype'] = 'nolink'; } enterprise_hook('cluster_menu'); enterprise_hook('aws_menu'); enterprise_hook('SAP_view'); if (!empty($sub)) { $menu_operation['estado']['text'] = __('Monitoring'); $menu_operation['estado']['sec2'] = 'operation/agentes/tactical'; $menu_operation['estado']['refr'] = 0; $menu_operation['estado']['id'] = 'oper-agents'; $menu_operation['estado']['sub'] = $sub; } // Start network view. $sub = []; if (check_acl($config['id_user'], 0, 'MR') || check_acl($config['id_user'], 0, 'MW') || check_acl($config['id_user'], 0, 'MM')) { // Network enterprise. $sub['operation/agentes/pandora_networkmap']['text'] = __('Network map'); $sub['operation/agentes/pandora_networkmap']['id'] = 'Network map'; $sub['operation/agentes/pandora_networkmap']['refr'] = 0; enterprise_hook('transmap_console'); } enterprise_hook('services_menu'); if (check_acl($config['id_user'], 0, 'VR') || check_acl($config['id_user'], 0, 'VW') || check_acl($config['id_user'], 0, 'VM')) { if (!isset($config['vc_favourite_view']) || $config['vc_favourite_view'] == 0) { // Visual console. $sub['godmode/reporting/map_builder']['text'] = __('Visual console'); $sub['godmode/reporting/map_builder']['id'] = 'Visual console'; } else { // Visual console favorite. $sub['godmode/reporting/visual_console_favorite']['text'] = __('Visual console'); $sub['godmode/reporting/visual_console_favorite']['id'] = 'Visual console'; } if ($config['vc_menu_items'] != 0) { // Set godomode path. if (!isset($config['vc_favourite_view']) || $config['vc_favourite_view'] == 0) { $sub['godmode/reporting/map_builder']['subsecs'] = [ 'godmode/reporting/map_builder', 'godmode/reporting/visual_console_builder', ]; } else { $sub['godmode/reporting/visual_console_favorite']['subsecs'] = [ 'godmode/reporting/map_builder', 'godmode/reporting/visual_console_builder', ]; } // $layouts = db_get_all_rows_in_table ('tlayout', 'name'); $own_info = get_user_info($config['id_user']); $returnAllGroups = 0; if ($own_info['is_admin']) { $returnAllGroups = 1; } $layouts = visual_map_get_user_layouts($config['id_user'], false, false, $returnAllGroups, true); $sub2 = []; if ($layouts === false) { $layouts = []; } else { $id = (int) get_parameter('id', -1); $break_max_console = false; $max = $config['vc_menu_items']; $i = 0; foreach ($layouts as $layout) { $i++; if ($i > $max) { $break_max_console = true; break; } $name = io_safe_output($layout['name']); $sub2['operation/visual_console/render_view&amp;id='.$layout['id']]['text'] = mb_substr($name, 0, 19); $sub2['operation/visual_console/render_view&amp;id='.$layout['id']]['id'] = mb_substr($name, 0, 19); $sub2['operation/visual_console/render_view&amp;id='.$layout['id']]['title'] = $name; if (!empty($config['vc_refr'])) { $sub2['operation/visual_console/render_view&amp;id='.$layout['id']]['refr'] = $config['vc_refr']; } else if (((int) get_parameter('refr', 0)) > 0) { $sub2['operation/visual_console/render_view&amp;id='.$layout['id']]['refr'] = (int) get_parameter('refr', 0); } else { $sub2['operation/visual_console/render_view&amp;id='.$layout['id']]['refr'] = 0; } } if ($break_max_console) { $sub2['godmode/reporting/visual_console_favorite']['text'] = __('Show more').' >'; $sub2['godmode/reporting/visual_console_favorite']['id'] = 'visual_favourite_console'; $sub2['godmode/reporting/visual_console_favorite']['title'] = 'show_more'; $sub2['godmode/reporting/visual_console_favorite']['refr'] = 0; } if (!empty($sub2)) { if (!isset($config['vc_favourite_view']) || $config['vc_favourite_view'] == 0) { $sub['godmode/reporting/map_builder']['sub2'] = $sub2; } else { $sub['godmode/reporting/visual_console_favorite']['sub2'] = $sub2; } } } } } if (check_acl($config['id_user'], 0, 'MR') || check_acl($config['id_user'], 0, 'MW') || check_acl($config['id_user'], 0, 'MM')) { // INI GIS Maps. if ($config['activate_gis']) { $sub['gismaps']['text'] = __('GIS Maps'); $sub['gismaps']['id'] = 'GIS Maps'; $sub['gismaps']['type'] = 'direct'; $sub['gismaps']['subtype'] = 'nolink'; $sub2 = []; $sub2['operation/gis_maps/gis_map']['text'] = __('List of Gis maps'); $sub2['operation/gis_maps/gis_map']['id'] = 'List of Gis maps'; $gisMaps = db_get_all_rows_in_table('tgis_map', 'map_name'); if ($gisMaps === false) { $gisMaps = []; } $id = (int) get_parameter('id', -1); $own_info = get_user_info($config['id_user']); if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) { $own_groups = array_keys(users_get_groups($config['id_user'], 'IR')); } else { $own_groups = array_keys(users_get_groups($config['id_user'], 'IR', false)); } foreach ($gisMaps as $gisMap) { $is_in_group = in_array($gisMap['group_id'], $own_groups); if (!$is_in_group) { continue; } if (! check_acl($config['id_user'], $gisMap['group_id'], 'IR')) { continue; } $sub2['operation/gis_maps/render_view&amp;map_id='.$gisMap['id_tgis_map']]['text'] = mb_substr(io_safe_output($gisMap['map_name']), 0, 15); $sub2['operation/gis_maps/render_view&amp;map_id='.$gisMap['id_tgis_map']]['id'] = mb_substr(io_safe_output($gisMap['map_name']), 0, 15); $sub2['operation/gis_maps/render_view&amp;map_id='.$gisMap['id_tgis_map']]['title'] = io_safe_output($gisMap['map_name']); $sub2['operation/gis_maps/render_view&amp;map_id='.$gisMap['id_tgis_map']]['refr'] = 0; } $sub['gismaps']['sub2'] = $sub2; } // END GIS Maps. } if (!empty($sub)) { $menu_operation['network']['text'] = __('Topology maps'); $menu_operation['network']['sec2'] = 'operation/agentes/networkmap_list'; $menu_operation['network']['refr'] = 0; $menu_operation['network']['id'] = 'oper-networkconsole'; $menu_operation['network']['sub'] = $sub; } // End networkview. // Reports read. if (check_acl($config['id_user'], 0, 'RR') || check_acl($config['id_user'], 0, 'RW') || check_acl($config['id_user'], 0, 'RM')) { // Reporting. $menu_operation['reporting']['text'] = __('Reporting'); $menu_operation['reporting']['sec2'] = 'godmode/reporting/reporting_builder'; $menu_operation['reporting']['id'] = 'oper-reporting'; $menu_operation['reporting']['refr'] = 300; $sub = []; $sub['godmode/reporting/reporting_builder']['text'] = __('Custom reporting'); $sub['godmode/reporting/reporting_builder']['id'] = 'Custom reporting'; // Set godomode path. $sub['godmode/reporting/reporting_builder']['subsecs'] = [ 'godmode/reporting/reporting_builder', 'operation/reporting/reporting_viewer', ]; $sub['godmode/reporting/graphs']['text'] = __('Custom graphs'); $sub['godmode/reporting/graphs']['id'] = 'Custom graphs'; // Set godomode path. $sub['godmode/reporting/graphs']['subsecs'] = [ 'operation/reporting/graph_viewer', 'godmode/reporting/graph_builder', ]; if (check_acl($config['id_user'], 0, 'RR') || check_acl($config['id_user'], 0, 'RW') || check_acl($config['id_user'], 0, 'RM') ) { $sub['operation/dashboard/dashboard']['text'] = __('Dashboard'); $sub['operation/dashboard/dashboard']['id'] = 'Dashboard'; $sub['operation/dashboard/dashboard']['refr'] = 0; $sub['operation/dashboard/dashboard']['subsecs'] = ['operation/dashboard/dashboard']; $dashboards = Manager::getDashboards(-1, -1, true); $sub2 = []; foreach ($dashboards as $dashboard) { $name = io_safe_output($dashboard['name']); $sub2['operation/dashboard/dashboard&dashboardId='.$dashboard['id']] = [ 'text' => mb_substr($name, 0, 19), 'title' => $name, ]; } if (empty($sub2) === false) { $sub['operation/dashboard/dashboard']['sub2'] = $sub2; } } enterprise_hook('reporting_godmenu'); $menu_operation['reporting']['sub'] = $sub; // End reporting. } // Events reading. if (check_acl($config['id_user'], 0, 'ER') || check_acl($config['id_user'], 0, 'EW') || check_acl($config['id_user'], 0, 'EM') ) { // Events. $menu_operation['eventos']['text'] = __('Events'); $menu_operation['eventos']['refr'] = 0; $menu_operation['eventos']['sec2'] = 'operation/events/events'; $menu_operation['eventos']['id'] = 'oper-events'; $sub = []; $sub['operation/events/events']['text'] = __('View events'); $sub['operation/events/events']['id'] = 'View events'; $sub['operation/events/events']['pages'] = ['godmode/events/events']; $sub['operation/events/event_statistics']['text'] = __('Statistics'); $sub['operation/events/event_statistics']['id'] = 'Statistics'; // If ip doesn't is in list of allowed IP, isn't show this options. include_once 'include/functions_api.php'; if (isInACL($_SERVER['REMOTE_ADDR'])) { $pss = get_user_info($config['id_user']); $hashup = md5($config['id_user'].$pss['password']); $user_filter = db_get_row_sql( sprintf( 'SELECT f.id_filter, f.id_name FROM tevent_filter f INNER JOIN tusuario u ON u.default_event_filter=f.id_filter WHERE u.id_user = "%s" ', $config['id_user'] ) ); if ($user_filter !== false) { $user_event_filter = events_get_event_filter($user_filter['id_filter']); } else { // Default. $user_event_filter = [ 'status' => EVENT_NO_VALIDATED, 'event_view_hr' => $config['event_view_hr'], 'group_rep' => 1, 'tag_with' => [], 'tag_without' => [], 'history' => false, ]; } $fb64 = base64_encode(json_encode($user_event_filter)); // RSS. $sub['operation/events/events_rss.php?user='.$config['id_user'].'&amp;hashup='.$hashup.'&fb64='.$fb64]['text'] = __('RSS'); $sub['operation/events/events_rss.php?user='.$config['id_user'].'&amp;hashup='.$hashup.'&fb64='.$fb64]['id'] = 'RSS'; $sub['operation/events/events_rss.php?user='.$config['id_user'].'&amp;hashup='.$hashup.'&fb64='.$fb64]['type'] = 'direct'; // Marquee. $sub['operation/events/events_marquee.php']['text'] = __('Marquee'); $sub['operation/events/events_marquee.php']['id'] = 'Marquee'; $sub['operation/events/events_marquee.php']['type'] = 'direct'; } // Sound Events. $javascript = "javascript: window.open('operation/events/sound_events.php');"; $javascript = 'javascript: alert(111);'; $javascript = 'javascript: openSoundEventWindow();'; $sub[$javascript]['text'] = __('Sound Events'); $sub[$javascript]['id'] = 'Sound Events'; $sub[$javascript]['type'] = 'direct'; ?> <script type="text/javascript"> function openSoundEventWindow() { url = '<?php echo ui_get_full_url('operation/events/sound_events.php'); ?>'; window.open( url, '<?php __('Sound Alerts'); ?>', 'width=600, height=450, resizable=no, toolbar=no, location=no, directories=no, status=no, menubar=no' ); } </script> <?php $menu_operation['eventos']['sub'] = $sub; } // Workspace. $menu_operation['workspace']['text'] = __('Workspace'); $menu_operation['workspace']['sec2'] = 'operation/users/user_edit'; $menu_operation['workspace']['id'] = 'oper-users'; // ANY user can view him/herself ! // Users. $sub = []; $sub['operation/users/user_edit']['text'] = __('Edit my user'); $sub['operation/users/user_edit']['id'] = 'Edit my user'; $sub['operation/users/user_edit']['refr'] = 0; // Users. $sub['operation/users/user_edit_notifications']['text'] = __('Configure user notifications'); $sub['operation/users/user_edit_notifications']['id'] = 'Configure user notifications'; $sub['operation/users/user_edit_notifications']['refr'] = 0; // Incidents. if (check_acl($config['id_user'], 0, 'IR') || check_acl($config['id_user'], 0, 'IW') || check_acl($config['id_user'], 0, 'IM') ) { $temp_sec2 = $sec2; $sec2 = 'incident'; $sec2sub = 'operation/incidents/incident_statistics'; $sub[$sec2]['text'] = __('Incidents'); $sub[$sec2]['id'] = 'Incidents'; $sub[$sec2]['type'] = 'direct'; $sub[$sec2]['subtype'] = 'nolink'; $sub[$sec2]['refr'] = 0; $sub[$sec2]['subsecs'] = [ 'operation/incidents/incident_detail', 'operation/integria_incidents', ]; $sub2 = []; $sub2['operation/incidents/incident']['text'] = __('List of Incidents'); $sub2[$sec2sub]['text'] = __('Statistics'); $sub2['operation/incidents/list_integriaims_incidents']['text'] = __('Integria IMS Tickets'); $sub[$sec2]['sub2'] = $sub2; $sec2 = $temp_sec2; } // Messages. $sub['message_list']['text'] = __('Messages'); $sub['message_list']['id'] = 'Messages'; $sub['message_list']['refr'] = 0; $sub['message_list']['type'] = 'direct'; $sub['message_list']['subtype'] = 'nolink'; $sub2 = []; $sub2['operation/messages/message_list']['text'] = __('Messages List'); $sub2['operation/messages/message_edit&amp;new_msg=1']['text'] = __('New message'); $sub['message_list']['sub2'] = $sub2; $menu_operation['workspace']['sub'] = $sub; // End Workspace // Rest of options, all with AR privilege (or should events be with incidents?) // ~ if (check_acl ($config['id_user'], 0, "AR")) { // Extensions menu additions. if (is_array($config['extensions'])) { $sub = []; $sub2 = []; if (check_acl($config['id_user'], 0, 'RR') || check_acl($config['id_user'], 0, 'RW') || check_acl($config['id_user'], 0, 'RM')) { $sub['operation/agentes/exportdata']['text'] = __('Export data'); $sub['operation/agentes/exportdata']['id'] = 'Export data'; $sub['operation/agentes/exportdata']['subsecs'] = ['operation/agentes/exportdata']; } if (check_acl($config['id_user'], 0, 'AR') || check_acl($config['id_user'], 0, 'AD') || check_acl($config['id_user'], 0, 'AW')) { $sub['godmode/agentes/planned_downtime.list']['text'] = __('Scheduled downtime'); $sub['godmode/agentes/planned_downtime.list']['id'] = 'Scheduled downtime'; } foreach ($config['extensions'] as $extension) { // If no operation_menu is a godmode extension. if ($extension['operation_menu'] == '') { continue; } // Check the ACL for this user. if (! check_acl($config['id_user'], 0, $extension['operation_menu']['acl'])) { continue; } $extension_menu = $extension['operation_menu']; if ($extension['operation_menu']['name'] == 'Matrix' && ( !check_acl($config['id_user'], 0, 'ER') || !check_acl($config['id_user'], 0, 'EW') || !check_acl($config['id_user'], 0, 'EM') ) ) { continue; } // Check if was displayed inside other menu. if ($extension['operation_menu']['fatherId'] == '') { if ($extension_menu['name'] == 'Update manager') { continue; } $sub[$extension_menu['sec2']]['text'] = $extension_menu['name']; $sub[$extension_menu['sec2']]['id'] = $extension_menu['name']; $sub[$extension_menu['sec2']]['refr'] = 0; } else { if (array_key_exists('fatherId', $extension_menu)) { // Check that extension father ID exists previously on the menu. if ((strlen($extension_menu['fatherId']) > 0)) { if (array_key_exists('subfatherId', $extension_menu)) { if ((strlen($extension_menu['subfatherId']) > 0)) { $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['text'] = __($extension_menu['name']); $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['id'] = $extension_menu['name']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['refr'] = 0; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['icon'] = $extension_menu['icon']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['sec'] = 'extensions'; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['extension'] = true; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['subfatherId']]['sub2'][$extension_menu['sec2']]['enterprise'] = $extension['enterprise']; $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; } else { $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['text'] = __($extension_menu['name']); $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['id'] = $extension_menu['name']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['refr'] = 0; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['icon'] = $extension_menu['icon']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['sec'] = 'extensions'; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['extension'] = true; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['enterprise'] = $extension['enterprise']; $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; } } else { $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['text'] = __($extension_menu['name']); $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['id'] = $extension_menu['name']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['refr'] = 0; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['icon'] = $extension_menu['icon']; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['sec'] = 'extensions'; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['extension'] = true; $menu_operation[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]['enterprise'] = $extension['enterprise']; $menu_operation[$extension_menu['fatherId']]['hasExtensions'] = true; } } } } } if (!empty($sub)) { $menu_operation['extensions']['text'] = __('Tools'); $menu_operation['extensions']['sec2'] = 'operation/extensions'; $menu_operation['extensions']['id'] = 'oper-extensions'; $menu_operation['extensions']['sub'] = $sub; } } // ~ } // Save operation menu array to use in operation/extensions.php view $operation_menu_array = $menu_operation; if (!$config['pure']) { menu_print_menu($menu_operation, true); }
Q: Erro ao realizar pedido com API do PagSeguro Ao tentar realizar a criação do pagamento, recebo o seguinte erro. Estou utilizando o seguinte pacote: https://www.nuget.org/packages/Uol.PagSeguro Additional information: Por motivo de segurança, o DTD é proibido neste documento XML. Para habilitar o processamento do DTD, defina a propriedade DtdProcessing em XmlReaderSettings como Parse e passe as configurações para o método XmlReader.Create. Estou utilizando um código de testes oferecido por Cigano neste tópico: A exceção é levantada na seguinte linha: var paymentRedirectUri = payment.Register(credentials); Também estou utilizando o ambiente sandbox do PagSeguro, e já verifiquei as credentials e o URL enviada (antes estava dando erro 401). Consigo contornar o erro descrito acima editando o código da API, no seguinte bloco de código: XmlReaderSettings settings = new XmlReaderSettings(); settings.ProhibitDtd = false; using (XmlReader reader = XmlReader.Create(response.GetResponseStream(), settings)) { //Codigo pagseguro } Contudo, ao realizar esta alteração, obtenho o seguinte erro quando a API realiza a leitura do XML Additional information: Caractere inválido na codificação fornecida. Linha 20, posição 48. A: Caractere inválido, isso soa como um XML que trabalha com ANSI (ou iso-8859-1/window-1252) porém acabam retornando dados com caracteres UTF-8, é só um teoria, mas talvez você deva verificar as codificações retornadas pelo XML. Para fazer está verificação tente analisar o conteudo de response.GetResponseStream(). Note que se o seu XML usa UTF-8 (ou outra codificação UNICODE) e o cabeçalho não possuir algo como <?xml charset="UTF-8" ?> será bem provável que este erro ocorra. Se o documento possuir caracteres equivalentes do latin1 e não houver charset definido para iso-8859-1 ou windows-1252, este erro também pode ocorrer. Analisando o código do usuário Cigano, eu não encontrei nada referente ao XmlReader que você citou, então irei presumir que isto é uma aplicação sua. Uma solução anternativa seria usar esta propriedade: public bool CheckCharacters { get; set; } Definindo como false o XmlReaderSettings.CheckCharacters você irá desligar a verificação dos caracteres. Segue documentação: http://msdn.microsoft.com/en-us/library/system.xml.xmlreadersettings.checkcharacters%28v=vs.110%29.aspx
.ceval { @extend %metal-bg; position: relative; display: flex; align-items: stretch; &.enabled { padding-top: 2px; height: 40px; } .switch { @extend %flex-center; flex: 0 0 40px; margin-right: 8px; } pearl { flex: 0 0 75px; line-height: 38px; font-size: 1.6em; text-align: center; font-weight: bold; } help, .engine { @extend %nowrap-hidden; flex: 1 1 auto; font-size: 12px; line-height: 16px; margin-top: 3px; color: $c-font-dim; } .engine { .cloud { @extend %roboto, %box-radius; margin-left: 4px; background: $c-secondary-dim; color: $c-secondary-over; padding: 1px 3px; text-transform: uppercase; font-size: 11px; } .info { display: block; white-space: nowrap; } .deeper { color: $c-primary; margin-left: 4px; } .deeper::before { vertical-align: -2px; } } .wasmx { margin-left: 5px; text-transform: uppercase; color: $c-good; } .asmjs, .wasm { margin-left: 5px; text-transform: uppercase; } .bar { position: absolute; width: 100%; height: 3px; top: 0px; } @keyframes bar-anim { from { background-position: 0 0; } to { background-position: 100000px 0; } } .bar span { display: block; height: 3px; width: 0; background: $c-good; transition: width 1s; &.threat { background: $c-bad; } } &.computing .bar span { background-image: img-url("bar-highlight.png"); animation: bar-anim 1000s linear infinite; } .show-threat { flex: 0 99 auto; line-height: 38px; color: $c-font-dim; font-size: .9em; padding-right: .5em; overflow: hidden; &:hover:not(.hidden), &.active { color: $c-red; } &.hidden { opacity: 0.3; cursor: default; } } }
Degrease pans. Simmer 1/4 inch water and 1/2 cup vinegar in a greasy pan for 10 minutes. Wash as usual. Open clogged drains. Depending on the severity you can do a couple of things. Light clogs pour 1/2 cup baking soda followed by 1/2 cup vinegar down the drain. Allow to work at least 5 minutes or up to 1 hour. Rinse with boiling water. For more serious clogs, add 1/2 cup salt to the baking soda/vinegar mixture from above. Allow to site for 1 hour before rinsing. Countertops may be wiped with vinegar. There are many more things that you can clean vinegar with. It’s a very safe cleanser for most surfaces. Some people dislike the smell, but in my experience this fades nicely once the vinegar has dried. 7 replies on “Alternative Uses for Vinegar in the Kitchen” Great tips! I’m finding that vinegar and baking soda take care of nearly every routine cleaning job. I’ve heard you have to be careful with using vinegar frequently on grout, however. The smell does fade quickly unless the vinegar is heated (i.e. run through the coffeemaker), but a spritz of citrus oil spray in the room can help. […] Natural cleansers for around the house are pretty easy to make in many cases. Vinegar and baking soda are two wonderful ingredients that can be used safely for a wide range of purposes around the house. They’re cheap and amazingly effective. […] Awesome ideas – thanks 🙂 One that I do as well is use vinegar to keep bread fresh longer: I make homemade bread and keep it in the fridge, and I clean the plastic tub I keep it in with vinegar between loaves. It’s amazing how long the bread stays fresh (vinegar inhibits the mold). I can’t imagine not having vinegar in the house – it’s so useful. Comments are closed. Green Stay at Home Mom is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.
2001 xlt 1200 pumpshoe replacement I am in the process of sealing the pump shoe. The felt on mine is hanging out and is unsalvageable. I also ordered a new shoe due to the fact that both bolts on mine are now stripped the old bolts twisted off. I drilled them out and retapped them and was considering returning the new shoe I bought. I filled the area where the felt would go with silicone and smoothed it out and let it cure. I thought the new shoe would have these "felts" but does not appear to have them. Do i need to purchase new felts and put on the new shoe if i decide to use it, or can i fill these areas with silicone? I am really considering using the old shoe since the new shoe doesnt have the felts already on it. Please advise what you would suggest. Everything i read on the seal kit says to make sure this felt is not damaged, but mine is and I dont have a replacement. Is it just as good to thicken the area with a silicone and let it cure? Then use fresh silicone in that area also when bolting the shoe back on. Seems to me this would seal it just as well. Any suggestions greatly appreciated. Thanks,
I’ve written a few blog posts in which I have argued that Dalmatians are not actually from Croatia. I’ve pointed out that a lot of the supposed depictions of Dalmatians were rather dubious, and genetically, Dalmatians fit with pointing gun dogs. Well, it turns out that there might be actually be something the Croatian origins of the Dalmatian after all. Some Croatian researchers, Bauer and Lemo, looked into the history of dogs in that part of Croatia. They found that a type of now likely extinct sight-hound was almost always black and white with some dappling, and some of them actually looked more like scent-hounds than sight-hounds. However, that is far from the best evidence. Lots of dogs have dappling, and the Dalmatian dappling is very distinct. The authors discuss two of these sight-hounds. The male was black and white, and the female was ocher and white and had a habit of vomiting for her puppies, which the authors believe doesn’t exist in “thoroughbred dogs.” (Which is news to me. I’ve seen golden retrievers vomit for puppies, and Miley even vomited for a visiting laika puppy.) I think the sight-hound discussion was pretty much a non-sequitur, because dapples and roaning are so common in many breeds that it cannot be used to determine any kind of relationship. However, the best evidence the authors provided is that a type of scent-hound that is still used in Croatia also shares an unusual metabolic trait with the Dalmatian. Unless they are part of that well-known outcross program that introduced normal uric acid levels through a single cross with a pointer, Dalmatians have high uric acid levels. Their livers lack an enzyme for metabolizing certain proteins, and this is actually pretty unusual in the dog world. The problem with this assertion is that it’s actually not “proteins” that Dalmatians have trouble metabolizing. It is something called a “purine.” Uric acid is a purine, and the liver in normal dogs converts uric acid to a water soluble substance called allantonin. Dalmatians can’t convert uric acid to allantonin, which the authors do recognize. It may just be a mistranslation on their part. The authors claim that only the Istrian hound, which does look like a lot like a red and white Dalmatian, shares this trait, but the authors apparently don’t realize is in the West, the other breed that gets these uric acid stones fairly often is the English bulldog. In bulldogs, it is caused by exactly the same purine metabolism issue, and the inheritance is the same in both breeds. So the claim that only the Istrian hounds have this trait is simply false. It is possible that the Dalmatian and Istrian hound share a common ancestor. Perhaps there was a black and white version of this hound that was spread to France and the Low Countries and then to England. This dog was then crossed with setters and pointers and bulldogs to make the modern Dalmatian breed. But this is idle speculation. Until someone does an actual DNA study on Dalmatians that uses a large enough sample of nuclear DNA from a variety of Croatian and non-Croatian breeds, including pointing gun dogs, the case that Dalmatian and the Istrian hound are derived from the same root stock in Balkans is still an extraordinary claim that needs extraordinary evidence. The best evidence that Bauer and Lemo provided is depiction of a dappled hound in eighteenth century painting in Dubrovnik. Maybe this dog actually is a Croatian Dalmatian or the Croatian proto-Dalmatian. I don’t know. But I do know that Croatia, like just about every country that was part of the former Yugoslavia, has had a resurgent nationalism for about the past 20 years. The dog called a Dalmatian is popular all over the world, and it makes sense that the Croatian nationalist zeitgeist would look to this breed as a symbol of something from Croatia that hit it big on the international scene. I think it is important for us to remain skeptical about claims about Dalmatians actually coming from Dalmatia. It simply doesn’t fit what we already know about this dog– many individuals readily point and long-coated individuals are not unknown– to make us assume that this name means anything.
That's cool. Now make it 10x faster and almost silent. That motor is loud and whiney. Also stepper motors work just fine with direct drive and this doesn't need to be CNC precision. First change out the threaded shaft for one with a bigger pitch. Then change out the motor for a better motor. Then you just need a cover/drain plate to hide the screw. The bottle dispensers are pretty nice though. A better touch would be if it was similar to just a pour spout and it had two solenoid valves (one top and bottom) with a filler section in between. Then you would only need to control the amount of volume in and out then release. Which is similar to your car lock actuator i suppose. If you really hated the threaded drive you could use a belt drive with the slide. Mount the belt over or next to the slide and have a mounting plate for the cup on top of the slide. This could have some downsides with cleaning if you somehow spill. Threaded + drain cover would be better. You could always go backwards too and make the bottle's simulate a hand pour and have a mechanism to push and pull it from the back. (think the drinking bird toy) Seems like it would have been a lot faster/easier if all the outputs of the bottles were funneled into a glass at a fixed location. Instead of a "serial drink protocol," a "parallel drink protocol" would be much more efficient. This is exactly the wrong idea. You have to move the liquids to the glass. It is far more effort to move the glass to the liquid, like this stupid machine. Just use plastic tubes from each bottle to the glass. You could use 6 different tubes, each pointing at the glass, each with a separate actuator (open/closed pour/not pour). You could probably fit dozens of separate tubes into one pour location. Bars have used this sort of gravity-fed auto-dispenser system for decades. Usually a row of taps is set up, and above it a rack of bottles attached to separate feed tubes. The bartender just pushes the glass against the tap and one measured shot is dispensed. Each liquor has a separate feed tube, rather than funneling them through one tube, so each liquor is not contaminated by another. So if you want to do this as INefficiently as possible, you'll set up a system like this, using a compressed gas feed driving liquids, and a noisy stepper motor to move a glass around. Jeez just listening to the sound of the motor on the video gave me a headache. Hmm, I would like to build one of these! A peristaltic pump could be used for exceedingly precise and perfect cocktails, and it would run clean water through the hoses to refresh between recipes. Like charlie don't surf, I would remove the need to ferry the glass about, but there would be just one hose to the glass with a bottle selector located behind the peristaltic pump. The conveyor system is neat to watch, I'm sure, but it means that each additional liquor requires that the conveyor get that much longer. An optional temporary receptacle that mixes the drink before dispensing would also be cool. This is exactly the wrong idea. You have to move the liquids to the glass. It is far more effort to move the glass to the liquid, like this stupid machine. Just use plastic tubes from each bottle to the glass. You could use 6 different tubes, each pointing at the glass, each with a separate actuator (open/closed pour/not pour). You could probably fit dozens of separate tubes into one pour location. Bars have used this sort of gravity-fed auto-dispenser system for decades. Usually a row of taps is set up, and above it a rack of bottles attached to separate feed tubes. The bartender just pushes the glass against the tap and one measured shot is dispensed. Each liquor has a separate feed tube, rather than funneling them through one tube, so each liquor is not contaminated by another. So if you want to do this as INefficiently as possible, you'll set up a system like this, using a compressed gas feed driving liquids, and a noisy stepper motor to move a glass around. Jeez just listening to the sound of the motor on the video gave me a headache. I don't believe he ever said anything about this being the best way to make an automated drink maker. He looked at a CNC lathe and wanted to move a glass around with it. Sure, we all know that there are many different ways that a drink dispenser can be designed. This is still an awesome piece of equipment. Maybe this technology has the potential to develop into a commercial product. Perhaps one day all we will need to do is walk into a liquor store, press a few buttons, and after waiting a minute or two, pick up a sealed bottle containing our very own customized cocktail. Just take it home and open it up. Seems like it would have been a lot faster/easier if all the outputs of the bottles were funneled into a glass at a fixed location. Instead of a "serial drink protocol," a "parallel drink protocol" would be much more efficient. This is the exact same thing I thought too while I watched that slow thing moving around. Solenoid valves at each bottle would add considerably to the cost and complexity. Tubes from each bottle to the position of the glass would have to be cleaned, adding to cost and complexity, and might result in cross-contamination from previous runs, degrading the quality of the product (spilling long island iced tea residue into your old-fashioned). Drink-mixing already has a lot of controls built-in. The spouts have a fixed flow rate, and recipes are optimized to be poured while counting time: one half ounce per second. So you can skip a lot of measuring and tubing and whatnot with this guy's design… just push the glass to the spout for a period of time to get a known volume of liquid. That's pretty clever. The chief enhancement, it seems to me, would be to put the bottle rack on an indexed rotating platform. There's one servo for the platform and one servo to raise the glass to the spout, thereby activating the spout. The program would consist of a bottle selector and a glass raiser. The only parts to clean would be the spouts on the bottles, which you can clean as part of the bottle-changing process. From there, we need a shaking stage, a stirring stage, and a garnishing stage. Hmm. I want to know how it makes a Manhattan? A proper Manhattan needs to be thoroughly shaken. Most mixed drinks should at least be 'stirred'. I didnt watch the whole video so sorry if it was addressed later in the video. I want to know how it makes a Manhattan? A proper Manhattan needs to be thoroughly shaken. Most mixed drinks should at least be 'stirred'. I didnt watch the whole video so sorry if it was addressed later in the video. I think it would just dump the shots into the mixer, they put their own ice in too so I imagine it's let the machine do the pouring, the stir and serve happens themselves The potential improvements though are limitless. Make the mixers with a small blending/stirring thing in the bottom and make the device a whole lot faster and you wouldn't have issues with nightclubs/bars having staff who can't make anything that isn't a spirit mixed with coke, it could do it all. Granted, as mentioned above, this is a bad way of doing it to start with (the glass should stay still) but it's still a fun little project that I wouldn't mind having at home. And completely aside, a proper Manhattan should be stirred. There's nothing in a Manhattan that doesn't mix well (the only time you should shake a drink) and all you're doing by shaking is losing control over how chilled and watered down it becomes (you want it chilled right and a little water added to take the edge of, shaking it will just water the crap out of it). This reminds me a bit of the automated soda dispenser McDonalds uses for drive through. Cool project but I think it's reinventing the wheel. There's already professional systems where the bartender punches a code on the beverage gun and it automatically dispenses all the components. The bartender then only has to give it a stir and it's ready. The difference with those systems and this one is the alcohol feeds into beverage pumps to the gun(s). I know there's massive installations at many Las Vegas casinos where they want to speed up service and control the pour volume. I want to know how it makes a Manhattan? A proper Manhattan needs to be thoroughly shaken. Most mixed drinks should at least be 'stirred'. And completely aside, a proper Manhattan should be stirred. There's nothing in a Manhattan that doesn't mix well (the only time you should shake a drink) and all you're doing by shaking is losing control over how chilled and watered down it becomes (you want it chilled right and a little water added to take the edge of, shaking it will just water the crap out of it). And make it cloudy. The only reason to shake a cocktail that contains only spirits (Manhattan, Martini, etc.) is to make it very cold and watery. This can be done, for instance, because the drinker doesn't like the taste of the spirits, as both the cold temperature and the extra water kill the taste. (So much for James Bond's sophistication...) Having said that, a very quick shake won't kill the cocktail and if you let it stand for a minute it will (mostly) clear up too. I want to know how it makes a Manhattan? A proper Manhattan needs to be thoroughly shaken. Most mixed drinks should at least be 'stirred'. And completely aside, a proper Manhattan should be stirred. There's nothing in a Manhattan that doesn't mix well (the only time you should shake a drink) and all you're doing by shaking is losing control over how chilled and watered down it becomes (you want it chilled right and a little water added to take the edge of, shaking it will just water the crap out of it). And make it cloudy. The only reason to shake a cocktail that contains only spirits (Manhattan, Martini, etc.) is to make it very cold and watery. This can be done, for instance, because the drinker doesn't like the taste of the spirits, as both the cold temperature and the extra water kill the taste. (So much for James Bond's sophistication...) Having said that, a very quick shake won't kill the cocktail and if you let it stand for a minute it will (mostly) clear up too. Thank you robrob and ws3! I was mistaken, but I also feel vindicated, for years Ive had to ask bartenders not to shake my Manhattans and theyve always acted like I was crazy! I want to know how it makes a Manhattan? A proper Manhattan needs to be thoroughly shaken. Most mixed drinks should at least be 'stirred'. And completely aside, a proper Manhattan should be stirred. There's nothing in a Manhattan that doesn't mix well (the only time you should shake a drink) and all you're doing by shaking is losing control over how chilled and watered down it becomes (you want it chilled right and a little water added to take the edge of, shaking it will just water the crap out of it). And make it cloudy. The only reason to shake a cocktail that contains only spirits (Manhattan, Martini, etc.) is to make it very cold and watery. This can be done, for instance, because the drinker doesn't like the taste of the spirits, as both the cold temperature and the extra water kill the taste. (So much for James Bond's sophistication...) Having said that, a very quick shake won't kill the cocktail and if you let it stand for a minute it will (mostly) clear up too. For years I've told everyone that James Bond is an uncultured prick who doesn't know how to serve a Martini and is a dick about it to everyone who knows better. Actually I enjoyed seeing the machine being built more than seeing the final product. The glass moved too slowly, and that whining... Sounds like the disease Richard Feynman was talking about: Quote: Well, Mr. Frankel, who started this program, began to suffer from the computer disease that anybody who works with computers now knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is you *play* with them. They are so wonderful. You have these switches - if it's an even number you do this, if it's an odd number you do that - and pretty soon you can do more and more elaborate things if you are clever enough, on one machine. After a while the whole system broke down. Frankel wasn't paying any attention; he wasn't supervising anybody. The system was going very, very slowly - while he was sitting in a room figuring out how to make one tabulator automatically print arc-tangent X, and then it would start and it would print columns and then bitsi, bitsi, bitsi, and calculate the arc-tangent automatically by integrating as it went along and make a whole table in one operation. Absolutely useless. We *had* tables of arc-tangents. But if you've ever worked with computers, you understand the disease - the *delight* in being able to see how much you can do. But he got the disease for the first time, the poor fellow who invented the thing. And make it cloudy. The only reason to shake a cocktail that contains only spirits (Manhattan, Martini, etc.) is to make it very cold and watery. This can be done, for instance, because the drinker doesn't like the taste of the spirits, as both the cold temperature and the extra water kill the taste. (So much for James Bond's sophistication...) Having said that, a very quick shake won't kill the cocktail and if you let it stand for a minute it will (mostly) clear up too. There's some thought that Fleming was having Bond drink watered down drinks on purpose. Perhaps to stay sharp or perhaps for liver problems (which many people think Fleming had in real life). You're spot on, many drinks really should just be stirred. But the biggest mistake when making a Manhattan is cheap Vermouth. Dolan is my favorite these days.
[Campylobacter pylori gastroduodenitis in children with juvenile rheumatoid arthritis]. Clinico-morphological study of the gastroduodenal system and also morphometric investigations of the degree of gastroduodenitis activity and the condition of the local immune system were made in 30 children aged from 4 to 15 years with juvenile rheumatoid arthritis (JRA). Microbiological, histological and electron microscopic methods for revealing Campylobacter pylori (CP) were used. Interrelationship between various clinical manifestations of JRA with the nature of gastroduodenal system affection and with the incidence of microbial colonization of SP was determined. All the patients with JRA had lesions in the gastric and duodenal mucosa, and some morphological features were revealed in them. SP was diagnosed in 86.7 per cent. There was a relation between the microbial clonization of SP and the degree of the rheumatoid process activity. It is suggested that SP does not play an etiological role in the development of gastroduodenitis in JRA but may serve as a pathogenetic factor in the development of an erosive-ulcerous lesion.
929 F.2d 500 59 USLW 2647 UNITED STATES of America, Plaintiff-Appellee,v.Jerry Paul LILLARD, Defendant-Appellant. No. 90-30202. United States Court of Appeals,Ninth Circuit. Argued and Submitted March 4, 1991.Decided March 29, 1991. Robert J. Larson, Eugene, Or., for defendant-appellant. Deborah J. Dealy-Browning, Thomas M. Coffin, Asst. U.S. Attys., Eugene, Or., for plaintiff-appellee. Appeal from the United States District Court for the District of Oregon. Before BROWNING, WRIGHT and FARRIS, Circuit Judges. EUGENE A. WRIGHT, Circuit Judge: 1 The defendant appeals the denial of his motion to suppress and his sentence. We affirm. 2 * State police had been investigating Jerry Paul Lillard for possible methamphetamine manufacturing and in November 1988 placed him under 24-hour surveillance. On November 17, three officers, in two separate cars, followed Lillard's van when it left his rented house. The van was traveling 70 to 75 m.p.h. down a two-lane country road where the speed limit was 55 m.p.h. The officers saw the van skid around a corner. 3 Detective Parnell stated that he stopped the van because Lillard was speeding and driving carelessly, and was suspected of manufacturing methamphetamine. Parnell approached the van with his gun drawn. When he reached the van, he recognized a distinct odor associated with methamphetamine manufacturing. 4 Lillard was arrested and advised of his Miranda rights, which he indicated he understood. He was questioned about the house and the drug lab. Later, after having been unhandcuffed and advised of his rights a second time, Lillard signed a consent form for the search of his van and rented house. 5 When the van and house were searched, police found codefendant Donald Lynn Holcomb, guns, quantities of drugs and chemicals, and a fully operational methampethamine lab. Pursuant to a search warrant supported by facts obtained in the November 1988 search, Lillard's Sutherlin, Oregon residence was searched on July 26, 1989. A second lab, guns and a variety of chemicals were found. 6 Lillard was arrested by federal agents in October. He entered a conditional guilty plea to manufacturing methamphetamine in July 1989 and to possession of unregistered machine guns in October 1989. He was sentenced to consecutive terms of 231 months and 24 months, to be followed by three years of supervised release. II 7 Lillard contends that the searches violated his Fourth Amendment rights and that all evidence obtained from them should be suppressed. We review de novo a denial of a motion to suppress. United States v. Miller, 812 F.2d 1206, 1208 (9th Cir.1987). 8 It is undisputed that Lillard was speeding carelessly in violation of Oregon law. The officer who stopped him testified that he knew about Lillard's suspected methamphetamine manufacturing but that he would have stopped him anyway because of his speeding and careless driving. Cf. United States v. Prim, 698 F.2d 972, 975 (9th Cir.1983) (warrant was a pretext because officers testified it was not the reason for their action). We reject Lillard's argument that the stop was a pretext. 9 As the officers approached the van, they smelled a distinct odor they knew was associated with making methamphetamine. This fact, coupled with the earlier suspicions that Lillard was making the drug, supports the conclusion that there was probable cause to arrest. See United States v. Greene, 783 F.2d 1364, 1368 (9th Cir.), cert. denied, 476 U.S. 1185, 106 S.Ct. 2923, 91 L.Ed.2d 551 (1986). 10 Lillard also contends he was threatened and did not voluntarily waive his rights when he consented to the search of his van and rented house. Whether consent was voluntary is a question of fact reviewed for clear error. United States v. George, 883 F.2d 1407, 1411 (9th Cir.1989). The district court's findings that the officer's and Lillard's versions of the conversation in question revealed a concern for safety and that Lillard's consent was voluntary were not clearly erroneous. We affirm the denial of his motion to suppress. III A. Leadership Role 11 Lillard argues that the two-level leadership role enhancement to his base offense level for the drug manufacturing charge was inappropriate because he was the only participant in the offense of conviction. See United States Sentencing Commission, Guidelines Manual Sec. 3B1.1(c) (Nov.1990) (U.S.S.G.)1 The government conceded that Holcomb, who was at the lab in November 1988, was not a participant in activities at the July 1989 lab to which Lillard pleaded guilty. 12 Lillard relies on United States v. Zweber, 913 F.2d 705 (9th Cir.1990) to assert that a court may enhance a sentence under Sec. 3B1.1 only for the role played in the offense of conviction, not collateral criminal conduct. For the purposes of Sec. 3B1.2 (Mitigating Role), Zweber defined "role in the offense" as the role played in the "offense of conviction." Id. at 708. While the Zweber court approved of the Seventh and D.C. Circuits' view that "offense" means "offense of conviction" for Sec. 3B1.1 as well, references in Zweber to Sec. 3B1.1 were dicta. See id. at 709. We must now address the issue directly and in light of new commentary. 13 The amended introductory commentary to Chapter 3, Part B clarifies the relationship between Sec. 1B1.3 (Relevant Conduct) and Secs. 3B1.1 and 3B1.2. "The determination of a defendant's role in the offense is to be made on the basis of all conduct within the scope of Sec. 1B1.3 ... and not solely on the basis of elements and acts cited in the count of conviction." U.S.S.G. Ch.3, Pt.B, intro. comment.; see United States v. Fells, 920 F.2d 1179, 1183-84 (4th Cir.1990); United States v. Mir, 919 F.2d 940, 945 (5th Cir.1990). Because of this change, we hold that Sec. 3B1.1 is not limited to the offense of conviction. 14 The new commentary, added after this court's decision in Zweber, is not inconsistent with that decision as to Sec. 3B1.2. The defendants in Zweber wanted the court to consider their mitigating roles in the context of a large drug conspiracy, rather than their aggravating roles in the one conviction count of drug distribution. Zweber, 913 F.2d at 708. The commentary follows Zweber: "where the defendant has received mitigation by virtue of being convicted of an offense significantly less serious than his actual criminal conduct, ... a further reduction in the offense level under Sec. 3B1.2 ... ordinarily is not warranted...." U.S.S.G. Ch. 3, Pt. B, intro. comment. 15 Our different treatment of "offense" in Sec. 3B1.1 furthers the goals of sentence uniformity and proportionality. A defendant, who is part of a large drug conspiracy but convicted only of possession, should not be rewarded for his participation in the conspiracy by receiving a lighter sentence than one who was convicted of possession but had no connections to a larger scheme. The Zweber rule assures that. Similarly, a defendant, who is a leader of a drug operation but is convicted only of possession, should receive a harsher sentence through Sec. 3B1.1 than his codefendant, the errand boy. 16 Here, the district court adopted the presentence report, which found specifically that Lillard operated two methamphetamine labs and that Holcomb was his employee. Evidence indicated that the labs were sophisticated and ongoing. The court's findings and conclusion that Lillard played a leadership role in the offense of manufacturing methamphetamine were not clearly erroneous. We hold that the district court properly considered Lillard's relevant November 1988 conduct in determining that he played a leadership role in the manufacturing offense. B. Criminal History 17 Lillard contends his criminal history calculation should not be enhanced under Sec. 4A1.1(d) for an unserved sentence. His Oregon conviction was affirmed on appeal in 1988, but by July 1989 he had yet to serve his sentence of six months in jail. 18 Two points are added to a defendant's criminal history calculation "if the defendant committed the instant offense while under any criminal justice sentence, including probation, parole, supervised release, imprisonment, work release, or escape status." U.S.S.G. Sec. 4A1.1(d). Lillard contends that, because he was not under direct state supervision or control in July 1989, Sec. 4A1.1(d) is inapplicable. Non-supervisory status does not exempt the sentence from inclusion under Sec. 4A1.1(d). See United States v. McCrudden, 894 F.2d 338, 339 (9th Cir.), cert. denied, --- U.S. ----, 110 S.Ct. 1534, 108 L.Ed.2d 773 (1990).2 19 If a defendant commits another crime after being sentenced, but before his sentence is served, the Sec. 4A1.1(d) enhancement is appropriate. United States v. Mackbee, 894 F.2d 1057, 1058 (9th Cir.), cert. denied, --- U.S. ----, 110 S.Ct. 2574, 109 L.Ed.2d 755 (1990). The district court did not err by enhancing Lillard's criminal history calculation by two points. C. Destruction of Evidence 20 According to Lillard, chemicals seized from his labs were destroyed before he or the government had a chance to weigh them. He argues for suppression of the testimony about the chemical quantities, claiming he was prejudiced per se and denied due process at sentencing because he had no way of disproving the amount the government claimed it found.3 21 When primary evidence is destroyed and secondary evidence is used, the latter's admissibility at trial turns on a balancing test aimed at insuring a fair trial. See United States v. Loud Hawk, 628 F.2d 1139, 1151 (9th Cir.1979) (en banc), cert. denied, 445 U.S. 917, 100 S.Ct. 1279, 63 L.Ed.2d 602 (1980). The court "must weigh the extent of the Government's culpability [for the lost evidence] and the degree of prejudice to the appellant." United States v. Kennedy, 714 F.2d 968, 975 (9th Cir.), cert. denied, 465 U.S. 1034, 104 S.Ct. 1305, 79 L.Ed.2d 704 (1983). 22 Because sentencing courts are not limited to evidence that would be admissible at trial when determining relevant facts, such as lab capacity, see United States v. Burns, 894 F.2d 334, 337 (9th Cir.1990), we are uncertain about whether the Loud Hawk evidentiary rule applies in the sentencing context. Assuming that it is applicable, we conclude the district court properly considered the evidence of the lab's capacity. There was no evidence of government misconduct, and Lillard failed to show prejudice. He had an opportunity at the sentencing hearing to present his own experts to refute the estimated capacity of the lab based on the physical characteristics and equipment and to cross-examine the government witnesses. See Kennedy, 714 F.2d at 976. 23 Lillard's due process argument is meritless. Destruction of evidence is a constitutional problem only under extreme conditions, which were not alleged here. See California v. Trombetta, 467 U.S. 479, 488-89, 104 S.Ct. 2528, 2533-34, 81 L.Ed.2d 413 (1984); United States v. Augenblick, 393 U.S. 348, 356, 89 S.Ct. 528, 533, 21 L.Ed.2d 537 (1969). D. Aggregating Lab Capacities 24 Lillard urges that the court erred by adding the drug and chemical quantities from the November lab to the July amounts in calculating his base offense level because the November lab was not "part of the same course of conduct or common scheme or plan as the offense of conviction." U.S.S.G. Sec. 1B1.3(a)(2). 25 Both labs were sophisticated and on-going, as evidenced by the equipment and chemicals recovered. It was not clear error for the district court to conclude implicitly that the November lab was part of the general scheme of manufacturing and thus could be included in offense level calculation. See United States v. Turner, 898 F.2d 705, 711 (9th Cir.), cert. denied, --- U.S. ----, 110 S.Ct. 2574, 109 L.Ed.2d 756 (1990). 26 Lillard asserts incorrectly that the court's calculation of lab capacity is limited by the quantity of the least abundant precursor chemical. The court properly calculated the capacity of each lab by looking at all chemicals found there. See United States v. Bertrand, 926 F.2d 838, 846 (9th Cir.1991). E. Eighth Amendment 27 We reject Lillard's argument that his sentence violates the Eighth Amendment because it is not proportional to the crime or to the sentence he would have received under Oregon law. The Eighth Amendment does not require harmonization among sentences imposed by different courts. United States v. Zavala-Serra, 853 F.2d 1512, 1518 (9th Cir.1988); United States v. Meyer, 802 F.2d 348, 353 (9th Cir.1986), cert. denied, 484 U.S. 817, 108 S.Ct. 71, 98 L.Ed.2d 35 (1987). 28 AFFIRMED. 1 Aggravating Role: Based on the defendant's role in the offense, increase the offense level as follows: (c) If the defendant was an organizer, leader, manager, or supervisor in any criminal activity other than described in (a) or (b), increase by 2 levels. U.S.S.G. Sec. 3B1.1(c). 2 We reject Lillard's reliance on United States v. Dillon, 905 F.2d 1034 (7th Cir.1990). The Dillon court was faced with a significantly different situation. See id. at 1037. Unlike Dillon's sentence of a year of supervised release, Lillard's six-month prison term could not be served simply by the passage of time 3 The chemicals were used to calculate the capacity of the methamphetamine labs, which determined Lillard's base offense level
Dr. Curtis Cripe Gives His Opinion On Behavioral Medicine Behavioral medicine is a promising field of learning in the recent times which combines behavioral, psychosocial, and biomedical practices and theories so as to prevent, diagnose, and take care of patients with mental diseases. The behavioral medicine primarily specializes on the relation between thought and behavior and how it can affect psychological and physical health. Dr. Curtis Cripe discusses the role of Behavioral medicine in treating mental diseases Behavioral medicine has been developed as a subordinate of psychological disease medication. The psychological therapists recognized that the majority medical disorder took place owing to behavioral issues. This judgment in turn assisted in the development of behavioral medicine. Behavioral medicine mainly focuses on human brain, brain activity, and neuron. In addition to this, Dr. Curtis Cripe has several years of experience in physiology, cells, structures and memories and has a varied background in neuroengineering, psychophysiology, aerospace engineering, psychology, software development and programming, addiction recovery, brain injury and child neurodevelopment. Dr. Cripe further stated that behavioral medicine is a response-based therapy which assists the patient to get new positive behaviors that either reduce the severity of or eradicate mental disorders such as addiction, anxiety, phobias and compulsive-neurotic disorder. Dr. Cripe has established the Crossroads Institute, which uses telemedicine brain training delivery systems to assist kids with learning and developmental disorders and offer programs for adults as well with an extensive range of psychological issues which include stressful brain injury and addiction. At present, Dr. Cripe is Science Research and Development Director of NTL Group and leads the team on brain repair and cognitive for head injury, developmental delays, and addiction. Dr. Curtis Cripe explains that the techniques and therapies involved in behavioral medicine are of advanced nature. Moreover in order to get the effective treatments of patients and their mental disorders the behavioral medicine therapies can assist to a great extent. The popularity of behavioral medicine and neuro-engineering is primarily because a large number of patients and their families have lost faith in the conventional medicine system where anti-depression or drugs are used to treat people suffering from psychological diseases or cognitive defects. At present, Dr. Cripe is a leading researcher at the NTL Group, where he explores the fields of neuroengineering and behavioral medicine. He is well-known for his leadership qualities and is also a renowned author of numerous peer-reviewed journals and a number of books. Additionally, he is also the member of the Golden Key International Honor Society for Academics and is also an INPP instructor for brain development.
#ifndef __LOCAL_PROTO_H__ #define __LOCAL_PROTO_H__ #include <grass/nviz.h> /* module flags and parameters */ struct GParams { struct Flag *mode_all; struct Flag *isosurf_toggle_norm_dir; struct Flag *draw_volume_box; struct Option /* surface */ *elev_map, *elev_const, *color_map, *color_const, *mask_map, *transp_map, *transp_const, *shine_map, *shine_const, *emit_map, *emit_const, /* surface draw mode */ *mode, *res_fine, *res_coarse, *style, *shade, *wire_color, *surface_pos, /* vector lines */ *vlines, *vline_width, *vline_color, *vline_mode, *vline_height, *vline_pos, *vline_layer, *vline_color_column, *vline_width_column, /* vector points */ *vpoints, *vpoint_size, *vpoint_mode, *vpoint_marker, *vpoint_color, *vpoint_width, *vpoint_pos, *vpoint_layer, *vpoint_size_column, *vpoint_marker_column, *vpoint_color_column, *vpoint_width_column, /* volumes */ *volume, *volume_mode, *volume_shade, *volume_pos, *volume_res, *isosurf_level, *isosurf_color_map, *isosurf_color_const, *isosurf_transp_map, *isosurf_transp_const, *isosurf_shine_map, *isosurf_shine_const, *slice_pos, *slice, *slice_transp, /* misc */ *exag, *bgcolor, /* cutting planes */ *cplane, *cplane_pos, *cplane_rot, *cplane_tilt, *cplane_shading, /* viewpoint */ *pos, *height, *persp, *twist, *focus, /* output */ *output, *format, *size, /* lighting */ *light_pos, *light_color, *light_bright, *light_ambient, /* fringe */ *fringe, *fringe_color, *fringe_elev, /* north arrow */ *north_arrow, *north_arrow_size, *north_arrow_color; }; /* args.c */ void parse_command(int, char **, struct GParams *); int color_from_cmd(const char *); int opt_get_num_answers(const struct Option *); void check_parameters(const struct GParams *); /* surface.c */ int load_rasters(const struct GParams *, nv_data *); void surface_set_draw_mode(const struct GParams *); /* vector.c */ int load_vlines(const struct GParams *, nv_data *); int load_vpoints(const struct GParams *, nv_data *); int vlines_set_attrb(const struct GParams *); int vpoints_set_attrb(const struct GParams *); int check_map(const struct GParams *, int, int, int *, int *); /* volume.c */ int load_rasters3d(const struct GParams *, nv_data *); int add_isosurfs(const struct GParams *, nv_data *); int add_slices(const struct GParams *, nv_data *); /* cutting planes */ void draw_cplane(const struct GParams *, nv_data *); /* write_img.c */ int write_img(const char *, int); #endif /* __LOCAL_PROTO_H__ */
Q: Error Sending Email using PHP, PEAR I installed Pear and then the Mail and SMTP components on my server. I then updated my php.ini file to "include_path = ".C:\wamp\bin\php\php5.4.3\pear" since that is where the Mail.php is. For some reason when I run this test script through a web browser I get the following errors. Warning: require_once(Mail.php): failed to open stream: No such file or directory in C:\wamp\www\email.php on line 3 and: Fatal error: require_once(): Failed opening required 'Mail.php' (include_path='.;C:\php\pear') in C:\wamp\www\email.php on line 3 I'm pretty new to PHP and before last week had never even heard of pear since I normally setup an exchange server. Any help would be appreciated. Below is the test Script. <?php require_once "Mail.php"; $from = "Ty Jacobs <FROM_EMAIL>"; $to = "Ty Jacobs <TO_EMAIL>"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $host = "ssl://smtp.bizmail.yahoo.com"; $port = "465"; $username = "MYUSERNAME"; $password = "MYPASSWORD"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?> PHP.INI file: ; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" ; ; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes" include_path=".;C:\wamp\bin\php\php5.4.3\pear" A: (include_path='.;C:\php\pear') According to this, your pear folder wasn't set up correctly in php.ini. Have you restarted your server? By the way, you forgot a semicolon in the include path string. It should be: .;C:\wamp\bin\php\php5.4.3\pear
Identification of the base substitution responsible for the Ag(x/y) polymorphism of apolipoprotein B-100. The identification of the base substitution responsible for Ag(x/y) completes the description of the antigen group polymorphisms associated with the apolipoprotein B polypeptide. Surprisingly, all five antigen group polymorphisms alter restriction endonuclease cleavage sites and have associated restriction fragment length polymorphisms, thereby providing a convenient alternative for antigen group phenotyping.
Russian journalists preparing an investigative report into Ankara’s alleged involvement in the oil trade with ISIS have been detained and deported from Turkey. Moscow strongly condemned the treatment of the Rossiya 1 TV crew, demanding explanations. “We strongly condemn the illegal actions of the Turkish authorities,” the Russian Foreign Ministry said. “Such an attitude towards the media is absolutely unacceptable.” On Monday, the press crew of the TV program ‘Special Correspondent’, headed by Alexander Buzaladze, were detained in southeastern Turkey by authorities in civilian clothes. The journalists were preparing an investigative report into the alleged smuggling of Islamic State (IS, formerly ISIS/ISIL) oil into Turkey. READ MORE: ISIS smuggles majority of oil through Turkey, says Iraqi PM The trouble for the Rossiya 1 TV crew started only once they arrived at the border, Buzaladze said after the deportation. He told Russian state-owned channel Vesti that while the crew worked in Istanbul and Ankara they had faced no opposition from the authorities. Read more But as soon as they and tried to film close to the Turkish-Syrian border the crew was “blocked [by] the Turkish security forces” leaving them no time to even “get the camera out.” The Russian crew was arrested in Hatay province bordering Syria as they were on their way to the neighboring province of Gaziantep. According to Buzaladze, there the journalists wanted to film “the border itself, military hardware, people that work at the border, and the border crossing.” Turkish authorities were first of all concerned “whether we had a camera,” Buzaladze says. “The first thing they wanted to know [was] if we had a camera. The camera was left in the luggage compartment, locked in a case. Despite this, they took our documents, we were taken to the police station, later we photographed, fingerprinted, brought to the doctor for a medical examination to confirm that we are in a sane state, and that we are alive and well,” the journalist said. The crew was later informed by the Turkish side that they were being deported. At the same time, authorities failed to explain the reason behind their move, Buzaladedze notes. The Russian journalists were escorted by police to the airport and put on a plane back to Russia. Map, images from Russian military show main routes of ISIS oil smuggling to Turkey https://t.co/3g1MQxzfNFpic.twitter.com/LSlBFUlgqc — RT (@RT_com) December 2, 2015 Throughout the entire incident the Turkish authorities refused to cooperate with Russian diplomats on the ground. The Russian Foreign Ministry wants to know the real reasons behind the detention of the Rossiya 1 crew, and remains curious as to what “rules” were violated by the Russian journalists. “The Turkish authorities refused to give explanations to representatives of the Russian Embassy in Turkey who got in touch with the crew shortly after its detention,” the Russian Foreign Ministry said. The group was deported apparently under the pretext of its members having violated laws for foreign journalists working in Turkey. Read more The lack of a clear explanation, forces the Ministry to speculate that the journalistic investigation might have uncovered something which Turkey would rather not share with the world in light of Turkish-Russian tensions following the shooting down of the Russian Su-24 bomber last month. “One gets the impression that Ankara is scared that correspondents of the Rossiya 1 TV channel may throw a spotlight on facts about the illegal activities carried out in the Turkish-Syrian border area [that] the Turkish government would prefer to keep in the shadow[s],” the Russian Foreign Ministry said. According to Rossiya 1 TV channel, the journalists arrived in Turkey on an assignment “to make a package on what is actually happening on the border between Turkey and Syria, and to clarify the situation with the traffic across the border of militants and illegal oil tank trucks.” The scandal over alleged oil profiteering on the part of Turkey follows the downing of the Russian Su-24 bomber by Turkey in Syrian airspace amid the ongoing campaign against ISIS oil infrastructure on the Syria-Turkey border. Russian President Vladimir Putin described the act as “a stab in the back” by terrorist supporters and accused Turkey of involvement in the illegal oil deals with IS. ‘Oxygen for jihadists’: #ISIS-smuggled oil flows through Turkey to intl markets – Iraqi MP https://t.co/k9dsXWnVDLpic.twitter.com/cSYWukNHMy — RT (@RT_com) November 29, 2015 Meanwhile, the Russian Foreign Ministry commissioner for human rights, Konstantin Dolgov, said via Twitter that the latest incident shows that the Turkish authorities are ignoring international obligations with respect to the protection of journalists. Dolgov also called for international condemnation of the incident, including by the OSCE. READ MORE: Turkey boosts arms supplies to Syria terrorists in exchange for oil & antiques – Damascus Overall, the latest incident, according to the ministry, is just part of the ongoing trend by the Turkish authorities to crack down on freedom of speech in the country. LISTEN MORE: “The international organizations, including the OSCE, have repeatedly drawn [the] attention of the world public to this. In this regard, the detention of the editor-in-chief of the Turkish daily newspaper Cumhuriyet Can Dundar and the newspaper’s Ankara bureau chief Erdem Gul in late November over a report about the involvement of the Turkish intelligence agencies in the supplies of weapons to militants in Syria is indicative in this respect,” the Russian Foreign Ministry said. “The journalists were charged with ‘espionage, disclosure of state secrets and terrorism.’ They are facing life in prison.”
Standing as a bulwark of liberty, the Oklahoma House of Representatives passed a bill protecting citizens of the Sooner State from the unconstitutional provisions of ObamaCare. By a vote of 72-20, the state House of Representatives passed House Bill 1021, a bill that if signed into law would stop the Patient Protection and Affordable Care Act (known as ObamaCare) at the borders of the sovereign state of Oklahoma. The bill’s primary proponent is State Representative Mike Ritze (R-Broken Arrow). A board-certified family practice physician and surgeon, he is particularly aware of the threat to liberty and good health care posed by ObamaCare. In an exclusive conversation with The New American, Dr. Ritze reported that the debate in the House was passionate and included testimony from a partially paralyzed colleague who stands to lose his medical coverage as a result of the mandates of ObamaCare. Ritze praised the speaker of the State House of Representatives, T.W. Shannon (R-Lawton), for resisting political pressure and placing the bill on the calendar, allowing it to be voted on by the body of the House. Apart from protecting citizens from the oppressive provisions of ObamaCare, Ritze said his bill will protect Oklahomans from becoming subjects to a tyrannical central government, determined to consolidate all power in Washington. Ritze recognizes ObamaCare for what it is: a federal attack on life, liberty, and property. “There is no provision in Article 1, Section 8 of the United States Constitution where the states delegated to Congress the authority to make a citizen purchase health care or pay a fine,” Ritze said. “The Patient Protection and Affordable Care Act is an example of federal overreach and my legislation will authorize the state via the will of the People to ignore it and ban the enforcement of it.” “They fail to understand how the country is supposed to operate,” Ritze added. “As Alexander Hamilton wrote in The Federalist, No. 33: ‘It expressly confines this supremacy to laws made pursuant to the Constitution.’ Alexander Hamilton got it right. Congress and the Supreme Court got it wrong. Ritze’s reading of the Constitution is the same as that of the Founding Fathers. The Supremacy Clause (as some wrongly call it) of Article VI does not declare that laws passed by the federal government are the supreme law of the land, period. What it says is that the “laws of the United States made in pursuance" of the Constitution are the supreme law of the land. In PURSUANCE thereof, not in VIOLATION thereof. None of the provisions of ObamaCare are permissible under any enumerated power given to Congress in the Constitution; therefore, they were not made in pursuance of the Constitution, and they are NOT the supreme law of the land. As Ritze indicated, Alexander Hamilton wrote in The Federalist, No. 33: If a number of political societies enter into a larger political society, the laws which the latter may enact, pursuant to the powers intrusted [sic] to it by its constitution, must necessarily be supreme over those societies and the individuals of whom they are composed.... But it will not follow from this doctrine that acts of the larger society which are not pursuant to its constitutional powers, but which are invasions of the residuary authorities of the smaller societies, will become the supreme law of the land. These will be merely acts of usurpation, and will deserve to be treated as such. [Emphasis in original.] Ritze understands that the states retain numerous rights under the Constitution, including the obligation to block unconstitutional federal usurpation of state sovereignty. “When the federal government exceeds its delegated authority, as it has done with the passage of Obamacare, it is the duty of every state representative to defend the unalienable rights of the people of the great State of Oklahoma. I and others in the House and Senate intend to do just that with this legislation,” declared Ritze. Dr. Ritze and his colleagues in the Oklahoma state legislature stand on firm constitutional and legal ground in their opposition to acts of the federal government that exceed its constitutional authority. The irrefutable truth is that not a single one of our Founding Fathers, not even the most ardent advocate of a powerful central government, would have remained a single day at the Philadelphia Convention if they had believed that the government they were creating would become the instrument of tyranny that it has become. All state legislatures have an obligation to liberty and to their citizens to follow Oklahoma’s example and through the exercise of the 10th Amendment and their natural right to rule as sovereign entities, stop ObamaCare at the state borders by enacting state statutes nullifying the healthcare law. The best defense of nullification is found in Thomas Jefferson’s Kentucky Resolution of 1798. In the Kentucky Resolution, Jefferson plainly points to the constitutional source of all federal power. Jefferson wrote, "That the several states who formed that instrument, being sovereign and independent, have the unquestionable right to judge of its infraction; and that a nullification, by those sovereignties, of all unauthorized acts done under colour [sic] of that instrument, is the rightful remedy." Nullification is a concept of constitutional law that recognizes the right of each state to nullify, or invalidate, any federal measure that exceeds the few and defined powers allowed the federal government as enumerated in the Constitution. This power is founded on the assertion that the sovereign states formed the union, and as creators of the compact, they hold ultimate authority as to the limits of the power of the central government to enact laws that are applicable to the states and the citizens thereof. In the wake of the Supreme Court’s ObamaCare decision, supporters of American federalism are encouraged to see state legislators boldly asserting their right to restrain the federal government through application of the very powerful and very constitutional principle of nullification. HB 1021 will now be presented to the state Senate where it is sponsored by State Senator Nathan Dahm (R-Tulsa). When asked by The New American about the prospect for passage of his bill in the state Senate, Dr. Ritze said there is a 50/50 chance the bill will make it to the governor’s desk. Joe A. Wolverton, II, J.D. is a correspondent for The New American and travels frequently nationwide speaking on topics of nullification, the NDAA, and the surveillance state. He can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it. .
Modular Design of Poly(norbornenes) for Organelle-Specific Imaging in Tumor Cells. Through modular ROMP (ring-opening metathesis polymerization) directly from monomeric norbornenes of bioactive peptides, rhodamine B chromophore, and PEG solubilizer, we designed and synthesized a series of water-soluble poly(norbornenes) with organelle-specific imaging capability in tumor cells. For the selection of FxrFxK, TAT, and SV40 peptide sequences, these fluorescence probes exhibited different targeting specificity toward mitochondria, lysosome, and nucleolus, respectively, based on the same poly(norbornene) backbonds. More importantly, the ROMP strategy enables selective combination from various monomers and allows programmable biofunctionalization via peptide sequence permutations, which would greatly extend the biomedical applications such as imaging, diagnosis, and therapy for these synthetic polymers.
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/download.PalEON.R \name{download.PalEON} \alias{download.PalEON} \title{download.PalEON} \usage{ download.PalEON( sitename, outfolder, start_date, end_date, overwrite = FALSE, ... ) } \arguments{ \item{end_date}{} } \description{ Download PalEON files } \author{ Betsy Cowdery }
Monday, 28 November 2011 Writable Paint turns Walls into Easy Dry-Erase Whiteboards Chalkboard wall paint has been around for a while now, but dealing with chalk dust gets old fast – the solution, of course, is to upgrade that paint just as schools have updated their own writable teaching surfaces. Young 20-something entrepreneur John Goscha dropped out of his banking job to design and market this material “for home, work or school” that may transform walls as we know now them. Titled IdeaPaint, it is available for half the price of an actual whiteboard and works just as well or better, leaving no marks behind when you wash down your work (and, without the rest of the infrastructure, it turns out to be greener, too).
Swiss army knife maker Victorinox has decided to take the sting out of ditching support for the security software in its range of USB-knife drives by offering customers a full refund. In a message posted to Facebook but not apparently anywhere else, the company said customers unhappy with the ending of the security features on the company's combined penknife/flash memory drives could send them back for a refund. "Ultimately, if you simply aren't happy with the product based on this development and would like to return it, we understand," read the announcement. The company announced the end of support for the security features a few days ago in an ambiguous Facebook post that failed to clarify that all of the drive's security features - including an encrypted partition, biometric authentication and secure password management - would cease functioning. However, the seriousness of the issues was underlined by the company setting 15 September as the date by which customers must back up all data on the encrypted section of the drives. Customers wanting to take advantage of the refund offer must do so by contacting the company by 31 December 2012 using an online form. A member of the support team would phone to confirm the process and issue a refund within two weeks, Victorinox said. Despite the simple refund process, the company will have won itself few friends by the sudden decision to withdraw security from a range of products it only started selling 18 months ago. This is a company whose corproate tag line is "companion for life." Many customers will have paid a hefty premium for the pocket knives on the basis that each came with a flip-out secure USB stick as a feature. The storage on the drives will still be usable after 15 September but without this element they look like desperately poor value compared to the alternatives. The drives are hugely expensive over buying a conventional Victorinox penknife without the secure store built in; a 16GB Victorinox Secure retails for £159 ($252) on Amazon. They remain on sale through a variety of outlets with the security features still mentioned as a selling point. Victorinox contact details: [email protected] or (for US customers) 800-442-2706. This story, "USB Swiss Army Drives Lose Security, Prompting Refund" was originally published by Techworld.com .
A number of potential problems are caused by the high circuit element density of today's integrated circuits. For example, densely packed field-effect transistors have relatively short channel lengths, resulting in increased potential for punchthrough effects. Also, the correspondingly shallow drain and source junction depths can result in junction spiking, in which metallization layers penetrate drain and source diffusions. The short channel lengths also result in higher electric field strengths, which in turn cause deleterious hot carrier effects. Reduced device geometries increase capacitive coupling between source/drain regions and the body of the transistor, resulting in degraded device performance and signal transmission characteristics. In the case of CMOS technology, parasitic thyristors and associated latchup effects arise. These and other fundamental problems must be addressed by the circuit designer and process engineer.
Kevin Youkilis, an infielder who won two World Series rings with the Boston Red Sox during a 10-year Major League Baseball career, wants to become known as much for his IPA as his OBP (on-base percentage). Advertisement With several partners, including former Oakland A’s infielder Nick Punto, Youkilis bought, refurbished and reopened the iconic Los Gatos Brewing Co. as the Loma Brewing Co. He is realizing a dream he had while playing ball to create and sell beers that are more tasty and creative than the offerings from Budweiser, Miller and Coors sold at ballparks in which he played. So far, so good. One year after Loma opened, it won 2017 California Commercial Beer Brewery of the Year at the state fair by virtue of two gold medals and a silver for three beers that it entered in competition. “I’m not going to lie to you,” Youkilis said. “It was up there with winning the World Series, just the high we had from that.” This is not a typical athlete-turned-restaurateur story. Most athletes who enter the business have little skin in the game and merely sell their name to the investors who run the joints. The athletes rarely appear, and when they do, their job is to shake hands with customers who come for the name and the gobs of memorabilia on the walls. Youkilis has done the opposite. He invested his own money into Loma and spends five days a week at the business, which brews about 600 barrels a year. He hopes to establish a career that will lead to commercial brewing and a life in the beer business for himself and his family for generations to come. Loma Brewing Co. is not a shrine to Youkilis or his more famous brother-in-law, New England Patriots quarterback Tom Brady. Customers are not wowed by photos of Youkilis leaping into his teammates’ arms when the Red Sox broke an 86-year World Series championship drought in 2004, his rookie season, or won again three years later. There are no photos on the walls. Youkilis did not affix his name to the establishment. “I’m not a Hall of Famer. My name doesn’t travel that much,” he said. “I felt it didn’t fit right. I wanted an establishment where the beer and food talk for themselves, and not having people come here just because they’re sports fans.” Nor does the Greek God of Walks specialize in Greek food at Loma, maybe because he is not Greek. He is Romanian on his father’s side and West Virginian on his mother’s side. Her family has ties to the Revolutionary War. Youkilis was nicknamed the Greek God of Walks by A’s general manager Billy Beane, who appreciated Youkilis’ rare patience at the plate as a minor-leaguer and high on-base percentage, which the A’s prize. Author Michael Lewis related the anecdote in his 2003 book, “Moneyball.” Youkilis ran with it. His Twitter handle is @GreekGodOfHops. That’s also the name of the brew pub’s double IPA, one of its five permanent offerings. The Cincinnati native retired from baseball after a season in Japan at age 34, largely because of a persistent foot injury, but also because his wife, Julie, was about to give birth to their third child. “Once you get a bunch of injuries, it becomes more of a job,” Youkilis said. “The grind of a baseball season can be enjoyable, but it also can take away from your life, and I wasn’t ready to take that stress again.” Youkilis settled in the Bay Area, whence his wife and the rest of the Brady family hail. He retired after asking the A’s and Giants whether they wanted to sign him as a utility player. Both said no. Youkilis became interested in craft brews while playing in Boston. Whenever the Red Sox went on the road, he dragged teammates to brew pubs to taste beer they could not buy in other cities. He decided early into retirement that he wanted to brew beer commercially and sought advice from friends he had made in the industry. They suggested he start small with a brew pub, teaming with his brother Scott to get one going. Scott Youkilis is a classically trained chef who landed in San Francisco independently of Kevin and opened Hog & Rocks oyster bar in the Mission. Kevin Youkilis moved to Los Gatos from the Peninsula and found that the owners of Los Gatos Brewing Co. wanted to sell. The Youkilises found their spot. They also found resistance from local residents who did not like the changes the new owners made to the interior of the restaurant and the menu. “I still have postcards from people who wrote nasty stuff,” Youkilis said. “Like I used to do in baseball, I used it like a chip on my shoulder to make me work harder and push forward in life. “It worked in my other job really well, to kind of take the hate and run with it, and use it to guide me to have more success down the road.” The Youkilis brothers had to hire a staff, most importantly a brewmaster, and picked Warren Billups. The Santa Cruz native was making beer commercially, wanted to switch to a brew pub and had no idea who Kevin Youkilis was before they met. “I’m not a baseball fan by any stretch of the imagination,” Billups said. Billups is partial to lagers and German brews, but the national palate has turned to hoppier beers like IPAs, which he said Loma needed to brew “to appease the masses and pay the bills.” The name Loma chose for theirs? Appeasement American IPA. Appeasement won a gold medal at the state fair. So did the Summer is Coming maibock. The No Oranges Allowed American pale wheat ale won silver. Billups and his assistant, a Scot named Brogan Hunter, seem to be doing something right. Beer sales doubled quarter over quarter in one year. Loma’s manager, Dan Reineke, was Youkilis’ roommate at the University of Cincinnati. The executive chef, Aubree Arndt, studied at Le Cordon Bleu in Arizona. Youkilis still has a hand in the game as a special assistant to Cubs president Theo Epstein, his former general manager in Boston. Youkilis could see himself diving back into baseball more once his three children are older. He also can see himself becoming a commercial brewer. Retired ballplayers often struggle to find a purpose once they leave the adrenaline rush of competition. So far, Youkilis has not. “I just know you can never replicate it,” he said. “I’m not the type of person who wants to replicate it. You hold that feeling in as much as possible and know you’re never going to get it again and accept it. It’s a hard thing, and a lot of guys turn to different vices.” Bad beer is a vice. Good beer, as the Greek God of Walks and Hops will attest, is a virtue.
New Cumberland Middle School teacher arrested, accused of dealing drugs from her home New Cumberland Middle School teacher arrested, accused of dealing drugs from her home HARRISBURG — Pennsylvania Attorney General Josh Shapiro announced Wednesday that a Cumberland County middle school teacher has been charged with several felonies after investigators seized cocaine, methamphetamine, and hundreds of prescription pills — including Adderall — during a search of her home. Lisa Marszalek, 47, of New Cumberland, is a science teacher at New Cumberland Middle School. She was arrested just hours before she was to chaperone a student field trip, Shapiro said in a press release announcing the charges. “I’m working to keep Pennsylvanians safe in their neighborhoods, and taking down illegal drug dealers – especially those in close contact with children like teachers and school staff – is a critical part of that mission,” Shapiro said. “Drug dealers push poison into our communities, putting us all at risk. I’m proud to partner with local law enforcement agencies, like the New Cumberland Police Department, Cumberland County Drug Task Force and Cumberland County District Attorney’s Office, doing this difficult work on the ground every single day in communities across the Commonwealth.” Earlier this month, investigators from the Office of the Attorney General began investigating Marszalek, and made two controlled buys of cocaine and Adderall from her home. Agents executed a search warrant of the home on Tuesday, so that they could intervene before she took students on an overnight field trip, which was scheduled for the coming days. Among the items seized from Marszalek’s home were 250 prescription Adderall pills, one ounce of cocaine, and seven grams of methamphetamine. The drugs had a street value of more than $7,000. Marszalek, of the 300 block of Carol Street, is charged with possession of a controlled substance, possession with intent to deliver, and possession of drug paraphernalia. She was arraigned, and bail is set at $50,000. A preliminary hearing is set for Nov. 21. The case will be prosecuted by District Attorney M.L. Ebert, Jr. The New Cumberland Police Department and the Cumberland County Drug Task Force assisted with this investigation. The West Shore School District, which employs Marszalek, issued the following statement: We are aware of the arrest of Lisa Marszalek and the charges that are filed against her. As a result, she was immediately placed on paid administrative leave, pending the outcome of further investigation or any legal proceedings. As this is a confidential, personnel related matter, we will have no further comment.
Books Keeping The Flag of Sikh Studies Flying High LOUIS E. FENECH I very much enjoy writing about Sikh history, religion, poetry, and culture far more than I like writing about myself. But there are moments, obviously, when the subjects have become intertwined and at least from my perspective have shaped each other. I hope therefore that you will indulge my reminisces of twenty-five years of keen interest in Sikh Studies. My own personal journey begins in a location which is now very well known within the Sikh world -- Toronto, Ontario, Canada. It was not so well known when I was a child, however. As a member of perhaps the only immigrant Maltese family residing within the predominantly Italian neighbourhood of Rexdale (Etobicoke) in the 1960s and 70s, my childhood encounters with the Sikhs were very few and far between. But I do vividly recall, as a child of eight or nine, seeing a young boy playing on his driveway, with what I later came to know as a patka on his head. It was only my good friend, an Anglo-Indian from Calcutta, who pointed out that this remarkable child was a Sikh. I still recall how intrigued I was by this young Sikh, an interest which undoubtedly alerted me to the presence of Sikhs, if not in my neighbourhood, then within the city itself. By the early 1980s I had again heard of these fascinating people: in this instance it regarded a dispute between Sikh families over contributions at the first gurdwara built in Toronto, on Pape Street near what is today known as Little India. Unfortunately the dispute turned deadly, a very unfortunate circumstance which in the early 1980s was often mentioned in Toronto in the context of events transpiring within the Punjab itself, of which I knew very little. By 1983 however these were distant concerns for me as I began my undergraduate studies at the University of Toronto. Here I was first introduced to the study of India through a course awkwardly titled “The History of the Third World“. In retrospect I was drawn to this course through a clearly cultivated romantic fascination with India (based perhaps on years of comic-book collecting). It was this which I spent the next few years exploring at the university (and critiquing and problematising) through a variety of courses. Fortunately, one of these courses was taught by A. L. Basham, the famous Indologist who is still noted for his important (though now clearly dated) text, “The Wonder That Was India“. Basham was no Sikhologist to be sure but during one cold winter’s morning he did fascinate us with a lecture on Sikhism in the context of India’s various bhakti movements (or now, ‘bhakti publics’), and when I claimed an interest in writing a term paper on the Sikhs, it was Basham who introduced me to this book by one of his former Ph.D. students, which he thought was quite good, “Guru Nanak and the Sikh Religion.” This was the week before the Torontonian equivalent of Spring Break (i.e., Reading Week) and so I packed the book along with my swimming gear and headed down to Florida to spend some serious study-at-the-beach time. I did just this, to the chagrin of my friends. At that point I can honestly say no academic book had inspired me so. I was, to put it bluntly (or sharply), hooked: the teachings of the Gurus, their extraordinary lives, and those of their martyrs, particularly Baba Deep Singh ji; and how Sikhs throughout the centuries have attempted to manifest those teachings, were rousing to say the least. The triumphalist narrative(s) of the Sikh Khalsa and their Guru, Guru Gobind Singh was amongst the most invigorating stories I had ever heard. The poetry amongst the most beautiful I had ever heard. Understanding, contextualising, and problematising these histories was an ambition I was determined to fulfill and a goal for which I would always strive. It may sound trite but I knew then, at about 20 years of age, that studying the Sikhs and their history was what I wanted to do for the rest of my life. My objectives it seems were rather easy to accomplish as I was, luckily, one of the few, very fortunate students who was in the right place at the right time. Even before the tragic events of 1984 and the subsequent destruction of Air India flight 182 -- the Kanishka which began its journey to India at the Toronto airport in 1985 and which was alleged to have been perpetrated by Sikh militants -- had placed the Sikhs centre-stage throughout Canada, the University of Toronto, through the tireless work of various scholars and local Sikh professionals, had decided to seriously experiment with offering a series of courses in the Sikh Religion, with the hope that this would be ultimately transformed into Canada’s (and, at that time, the diaspora’s) first Chair of Sikh Studies. Community funds were committed; Canada’s Department of Multiculturalism was ready to match community funds: all seemed bright. Things, however, as we all know, did not go as planned. Nevertheless it was the excitement engendered by these scholars and community leaders and by the university which allowed me to meet two of my future mentors, both of whom made me a better scholar and both of whom have made me a better person. I met Hew McLeod first at a lecture in 1986. Speaking about Hew now, after his death, is still difficult for me. I cherished every moment both within and outside of the classroom with him. He was an inspiration. It was obvious to all those with whom he had met that his commitment to the study of the Sikhs was born from a great (and indeed infectious) love for the Sikh people and Sikh culture. The second was not a professor, but a fellow graduate student, Pashaura Singh. I met Pashaura in January 1988 just as Professor J.S. Grewal came to the university to offer a series of courses on Sikh History. Sharing these classes with Pashaura was a joy and I learned as much from him as from the professor. One class I remember in particular as Pashaura and I were the only students in the class. I recall moments in this class when the professor and Pashaura spoke so beautifully (an eloquence only those who have taken their classes can know) that I was covered with goosebumps. It is to these two gentlemen and these early graduate classes that I trace my fascination with the life and Persian poetry of Bhai Nand Lal Goya, the subject of my first academic article and, afterwards, my second book. These were the best of days, just before the controversies which made Sikh Studies such a difficult subject to purse at the University of Toronto. Pashaura graduated in 1992 and Hew left for New Zealand very soon afterwards. The University of Toronto for various reasons to which I was not privy decided that a Chair of Sikh Studies was not in the school’s best interest and thus dramatically altered its intended Sikh Studies trajectory. Hew McLeod had nevertheless agreed to supervise the next few years of my doctoral dissertation gratis. An extraordinary gift, given the circumstances! During all of these years together, never did Hew impose his own ideas and views on me, always allowing me express myself as I saw fit and be my own person. While at the University of Toronto with Hew and Pashaura, I took a year off to spend it in India supplementing my study of Punjabi and Brajbhasha, thanks to a scholarship from the Shashtri Indo-Canadian Institute. My time in India was spent at Delhi University (with bi-weekly visits to the Punjab) under the tutelage of a phenomenal scholar, Prem Singh, of the Department of Linguistics. Trained as a Sanskritist/linguist, Prem’s knowledge of Indic languages, indeed of languages generally, was stunning. A Sikh whose family had been displaced during Partition, Prem Singh eventually found himself at Cornell and Harvard working under Daniel Ingalls. Although I studied both Punjabi and Brajbhasha with him, I recall our conversations in Persian and in Maltese (!), my mother tongue which is a dialect of Arabic. Prem Singh was a truly remarkable man who allowed me into his home many times during the Mandal Commission disturbances around the Delhi University campus in the late 1980s. Prem died in late 2008 while I was in the Punjab and preparing to visit him. He is sorely missed. Prem’s training and Hew’s supervision allowed me to finish my dissertation in late 1994, on the history and understandings of martyrdom within the Sikh tradition. It was ultimately published in India as “Martyrdom in the Sikh Tradition: Playing the Game of Love” (2000), an obvious allusion to Guru Nanak’s famous shlok which the subtitle paraphrases. This was later followed by my second book, “The Darbar of the Sikh Gurus: The Court of God in the World of Men” (2008), which examines among other things the life and works of Bhai Nand Lal Goya and the compositions of the Tenth Guru’s darbari kavis. At the moment I am writing my next book which continues my interest in Sikh Persian literature as it will focus mainly on the Persian epistle known as the Zafar-namah. Attributed to Guru Gobind Singh, the Zafar-namah today is an important part of the sacred Sikh inheritance, situated as it is close to the end of the Dasam Granth -- The Book of The Tenth Guru. This text is, like much of the material we find in today’s Dasam Granth, mired in controversy. ‘Are the Hikayats a part of the Zafar-namah?’, ‘Was the letter written by the Guru?’, and if so ‘How could the Guru contemplate something as base as revenge against the emperor?’ are questions I often hear and read in regard to this remarkable text. These are valid questions (although I have yet to find a desire for vengeance articulated within the text), and I hope that the partial answers which I will supply in my forthcoming work will spur more scholars to take up the challenges which the Zafar-namah poses, apt this as the Zafar-namah was according to tradition written as a challenge cast to the emperor Aurangzeb. For now, it seems clear to me that a fresh interpretation and understanding of the Zafar-namah is warranted, one which thoroughly examines the cultural context in which the Zafar-namah was written. Indeed, although the text has been effectively collapsed to one sole couplet or bait (Zafar-namah 22) today, this was not always the case. One portion of my work will therefore focus on the problematic and contested historiography of the Zafar-namah and how various Sikhs throughout the eighteenth, nineteenth, and twentieth centuries may have understood and interpreted this epistle. Another will aim to demonstrate that in order to understand the text and its context one need turn to its most significant intertextual source, the Iranian national epic of Abul Qasim Ferdausi, the Shah-namah (whose 1000th anniversary we celebrate this year), a direct reference to which we discover in Zafar-namah 80. Most scholarship on the epistle simply notes this one bait’s reference and moves on. My study posits however that the debt to the Shah-namah is a profound one, which merits the most serious study. The Tenth Guru, I believe (and will show), appropriates the Shah-namah and in this act of appropriation we see the metaphor for his admiration of Ferdausi’s epic text. The Guru has in other words tipped his arrow in Ferdausi’s direction. Thanks to Hew’s and Pashaura’s support, I was fortunate enough to find a job in Iowa (which, incidentally, in Arabic means ‘yes’) where I am still situated (yes!) and still in love (as there’s no other word) with the study of the Sikh tradition (yes!). Although the majority of my students are from rural Iowa itself (fields upon fields of corn which on certain hot summer days remind me of the Punjab countryside) and thus have very little experience with India in general and the Sikhs in particular, I have managed to encourage a few students to pursue graduate study in Indian history through my classes and my seminars on the Mughal empire and Sikh history. In fact, one of my undergraduate students is now in a Ph.D. programme with Pashaura Singh at UC Riverside and, through the Guru’s grace, is poised to do great things. I very much enjoy teaching at the University of Northern Iowa as one of its principal commitments is to prepare elementary and secondary school teachers. In this way the lessons about the Sikhi and the Sikhs which I pass on sometimes make it through to the K-12 generation of students, not just in Iowa but throughout the United States as our teachers are particularly well trained and thus very much prized. It’s not rare that a past student will send an email to let me know that they have reserved a section of their classes to the introduction of Sikhism. What future awaits them, particularly those interested in Sikh Studies? I have read with concern the postings of other scholars and community members (in a sense we are all community members, the Guru Granth Sahib and indeed the lives of the Gurus themselves are gifts to all of humanity) in regard to the preservation of Sikh heritage and the challenges we have all faced, and I second (and third, and fourth) their cautions. But let me add a caveat to this list of prescriptions. Let us never forget that we have overcome so many challenges in broadening the appeal of Sikh Studies. Things in the world of Sikh scholarship have changed so dramatically in both India and abroad since the time when I was a student. Today scholars interested in Sikhism and Sikh history have far more sources and resources to which to turn, and thanks to the work of scholars like Hew McLeod, Jerry Barrier, Mark Juergensmeyer, Pashaura Singh, and Gurinder Singh, and a host of others in North America and abroad, the study of Sikhism is taken as seriously as the study of any world religion, as too is the study of the Punjab and panjabiyyat. We now have, as we all know, a number of Sikh Studies Chairs throughout the United States and Canada; work in preserving manuscripts and other Sikh artifacts is readily underway with a number of such texts laminated and preserved in other ways at, for example, Guru Nanak University, Amritsar; Punjabi University, Patiala; and Panjab University, Chandigarh. True, there is a long way to go -- Dr Ganda Singh’s collection within Punjabi University’s archives seriously requires organization and as well the many manuscripts at the Punjab State Archives in Patiala are likewise in need of care -- and we must never rest on our laurels, but let us keep in mind how far we have come. Digital copies of many texts are now available through the near-indispensable work of the Punjab Digital Library and even Sikhs based in North America are taking a very serious interest in preserving Sikh heritage by digitizing manuscripts on their own dime. True all of these choices have agenda however benign and in this regard I must point out the tireless work of Joginder Singh Ahluwalia who has made available to the scholarly world alternative visions of the Sikhs and Sikh history which he beautifully titles the “chhota mel“, the younger acquaintances, if you will, younger offspring of the larger Sikh family. There are far more journals dealing with issues in Sikh Studies which clearly demonstrates what we have known all along, that the concerns in this field are overlapping with those in others and such overlap is bringing these studies to the attention of far more scholars than we find in Sikh Studies. There is finally the phenomenon of the World Wide Web which all of us, Sikhophiles, scholars, Sikhs, and many others have wholeheartedly embraced. Here we find YouTube (at which a dhadhi performance or the katha of as prolific a kathakar as the late Giani Sant Singh Maskin are no more than a click away), internetarchive.org (at which British Orientalist works on the Sikhs may be downloaded and read), apnaorg.com; Flickr, Creative Commons, the list goes on and on; all wonderful resources which are available for the most part free of charge. This abundance of riches leaves me positively brimming with chardi kala. How could it be otherwise? All these accomplishments and the glorious future we have in store as we move forward and meet these and future challenges together helps us all further fulfill that ambition onto which I and so many others have serendipitously fallen. All of us, scholars of Sikhism, Sikhs, friends of the Sikhs; those with whom we agree and those with whom we agree to disagree; all of us and all of these resources are here to help us all become not only better scholars of Sikh Studies but better citizens of Sikh Studies which ultimately allows us to become better people, a message which so resonates with the collective statements of the Sikh Gurus. To all of you who help keep the flag of Sikh Studies flying, I offer you this fateh. [First published by Sikh & Punjabi Language Studies in 2010. Since then, Prof Fenech's latest book on Guru Gobind Singh ji's Zafar-nama has been published.] Edited for sikhchic.com April 4, 2014 Conversation about this article Comment on "Keeping The Flag of Sikh Studies Flying High" * Your Name * Email * City / Country * Comments To help us distinguish between comments submitted by individuals and those automatically entered by software robots, please complete the following. Submit Please note: your email address will not be shown on the site, this is for contact and follow-up purposes only. All information will be handled in accordance with our Privacy Policy. Sikhchic reserves the right to edit or remove content at any time. read other articles in Books
--- title: CSS shortDesc: 'Do CSS URL hashes reflect subresources changes?' --- # Introduction CSS can reference other CSS stylesheets via `@import`, font files via `@font-face` and image files with `background-image`, `mask-image`, `border-image` et al. When the URL hashes for these resourcess are changed, the hashed URLs of any CSS files referring to them must also change. # The Test This test runs repeated builds of a CSS stylesheet referencing an image, both of which receive hashes in their URLs. The contents of the SVG image are changed causing it to have a different URL hash in the final build build, which should also update the stylesheet's URL hash. **styles.css** ```css body { background-image: url(bg.svg); } ``` In this example, when `bg.svg` changes, its hashed URL `bg.a1b2c.svg` will change. Since the built CSS has to be updated with the new image URL, its hashed URL `styles.9z8y7.css` should also change. If the content of `bg.svg` is changed between two builds, the hash of _both_ output files must change compared to the previous build.
This crazy giant catapult, probably built by Wile E. Coyote out of two construction cranes and ACME industrial-grade rubber bands, is designed to send a man into space with no security cables or net. As you will see in the video, after surviving the bazillion-G-force launch in one piece, he has to open a parachute to return safely to land. After seeing this 125 times today, I'm convinced this guy should have been the pilot of the X-Wing rocket. [LiveLeak] Advertisement
For those of you who have tried out Windows 7 latetely and to their astonishment have come to realise the network indicator is completely gone, you might want to read this. As much as I have come to rely on this nifty little system tray icon, I just couldn’t believe it wasn’t there in some lost corner of the control panel waiting to be activated. Luckily I wasn’t the only one 🙂
Xuebijing protects against lipopolysaccharide-induced lung injury in rabbits. Interleukin (IL)-23 has been identified as a member of the IL-12 cytokine family. It plays an important role in inflammation. To demonstrate the changes of IL-23 in acute lung injury (ALI) and investigate the protective effect of Xuebijing in ALI and the underlying molecular mechanism, ALI was induced by intravenous injection of lipopolysaccharide (LPS, 750 microg/kg). Japanese white rabbits challenged with or without LPS were treated with Xuebijing at the same time or saline. Before and after administration of LPS, arterial blood gas and lung weight gain were examined. Pathological changes of lung tissue were measured by light microscopy. IL-23 in serum was detected by enzyme-linked immunosorbent assay (ELISA). All animals demonstrated drops in arterial oxygen tension (Pao(2)) and oxygenation index (Pao(2)/Fio(2)) after LPS application, which were significantly reversed by Xuebijing treatment. Administration of Xuebijing reduced lung water gain. Histopathological study also indicated that Xuebijing treatment markedly attenuated lung histopathological changes, alveolar hemorrhage and inflammatory cells infiltration. Furthermore, IL-23 was higher than control group after LPS treatment, which could be blunted by Xuebijing. These findings confirmed significant protection by Xuebijing against LPS-induced lung vascular leak and inflammation and implicated inhibition of IL-23 expression a potential role for Xuebijing in the management of ALI.
Q: Nginx error with configuration wile reverse proxy shows "Welcome to nginx" when starting nginx This is my first time playing around with nginx. I have 2 express servers running in my localhost in port 3001 and 3002. Which is running perfectly. I am using ubuntu these are following steps I have taken for nginx. First I used sudo apt-get install nginx delete default file in sites-enabled and sites-available sudo rm -f default create default file in sites-available where I have these codes (just trying to run one server in port 3001 for now.) sudo vi default server { listen 80; location / { proxy_pass "http://192.168.100.5:3001"; } } symlink default from sites-available to sites-enabled : sudo ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default start nginx sudo /etc/init.d/nginx start All I get is Welcome to nginx If you see this page, the nginx web server is successfully installed and working. Further configuration is required. also I tried using this configuration in sites-enabled upstream project { server http://localhost:3001; } server { listen 80; } } but it yield to same result. Please any guidance will be helpful. Thank you. A: Try to to use proxy_pass with the local host and without quotes. Say you want the application on port 3001 as your website, you need to configure it like that: location / { proxy_pass http://localhost:3001/; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } This code needs to be in the server block of your default file. It will pass all traffic from the location / (your web root) to the port 3001. A complete example would look like this: server { listen 80 default_server; listen [::]:80 default_server; server_name example.com; location / { proxy_pass http://localhost:3001/; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } } Explanation: proxy_pass http://localhost:3001/; This will pass all traffic to the port 3001. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; This will pass informations such as the IP which made the call to the proxied server. proxy_set_header X-Forwarded-Proto $scheme; This will forward the used sheme/protocol information of the request.
Site Mobile Navigation The Real Plot Against America In retrospect, it worked out much better than planned. Who’d have thought a pariah nation, run by an authoritarian who makes his political opponents disappear, could so easily hijack a great democracy? It didn’t take much. A talented nerd can bring down a minnow of a nation. But this level of political crime requires more refined mechanics — you need everyone to play their assigned roles. You start with a stooge, a fugitive holed up in London, releasing stolen emails on the eve of the Democratic National Convention, in the name of “transparency.” Cyberburglars rely on a partner in crime to pick up stolen goods. And WikiLeaks has always been there for Russia, a nation with no transparency. The emails show office gossip — catty, sometimes crude back-and-forth by party operatives, and a bias for one candidate. Ho-hum. To make the plot work, reporters have to take the bait. On cue, they decry the fact that politics is going on inside a major political party. The horror — Democratic hacks saying nasty things about Senator Bernie Sanders. Next, lefty extremists have to act like lefty extremists — that is, myopic to the greater good, guided by a Trumpian sense that they alone know how to solve the world’s problems, and everyone else is a sellout. Angered at the contents of the cybertheft, they boo any mention of their party’s nominee. And told by Senator Sanders, the man who brought them there, that booing is too easy, they boo his call to unite to save their country from a monster. Photo Protesters at the Democratic National Convention.Credit Sam Hodgson for The New York Times But Russia still has to seal the deal. Some work remains. If enough angered lefties won’t go for the Democratic nominee, a longtime foe of Vladimir Putin, it will be just enough to put a Putin puppet in the White House. And it would also usher in the term that drove the right wing crazy when George H.W. Bush used it — a New World Order. What’s in it for Russia? Well, everything. Territory. Hegemony. Its takeover of the Crimean Peninsula has brought sanctions and condemnation from the West. What stands between Putin and further aggression in, say, the Baltic States, is a NATO pact that has kept Europe safe for nearly 70 years. And if you thought Trump stiffed the poor suckers who signed up for his “university,” wait till you see how he treats some of our oldest allies. Plus, Putin despises Hillary Clinton. Like Trump, his skin is rice-paper-thin, albeit a paler shade of orange; and, like Trump, he never forgets a slight. He still hasn’t gotten over Clinton’s comment on George W. Bush’s infamous look into Putin’s soul. As a former K.G.B agent, said Clinton, “he doesn’t have a soul.” What’s in it for Trump? Help at winning the ultimate throne of his gilded dreams. And maybe some investment money from Russian oligarchs close to Putin, one of many things Trump may be hiding in his tax returns. The two narcissists share a love of torture, authoritarian rule, and women on runways in bathing suits. But then, a wild card, something unplanned. Putin didn’t expect Trump to be so all-in with his collusion. He knows Trump is a fool, world class in only one thing — ignorance. He doesn’t need spies for that. He knows Trump is a man who will say anything, and deny in the same breath that he ever said it. The Talented Mr. Trump. Last November, before a national television audience, Trump said of Putin, “I got to know him very well.” And Wednesday, Trump said, “I never met Putin.” That was a standard Trump lie, on one end or the other. But even Putin couldn’t fathom that Trump really will say anything. So there was the Republican Party nominee for president inviting an American adversary to wage cyberwar against the country he wants to lead. If that wasn’t Trump’s shoot-somebody-on-Fifth-Avenue moment, nothing will be. What’s more, he was way too obvious about the role of the other pawns in the scheme. “I think you will probably be rewarded mightily by our press,” he said to Mother Russia. Also, he’s getting carried away with his dictator-philia. On Thursday, he said Putin was a better leader than President Obama. D’oh! In public, at least, you’re supposed to root for the home team. An error has occurred. Please try again later. You are already subscribed to this email. Trump misses the old days, back when you could “knock the crap out of” a demonstrator. Yeah, the old days. Back when it was disqualifying for an American politician to flirt with treason. This all seems too preposterous to be planned. Where are the conspiracy nut jobs when you really need them? Even fiction, Philip Roth’s “The Plot Against America,” about a fascist-lite president during World War II, does not have this level of absurdity. But it unfolds, still, if not according to Russia’s design, then according to Russia’s will. Trump is now a national security risk, actively rooting for a foreign adversary to tamper with an American election. And very soon, he will start receiving classified briefings on that adversary. Ehhhhhcellent!
Rick Gitelson Rick Gitelson (born in Washington, D.C.) is an American television and film producer and screenwriter. Gitelson's writing and producing credits include for TV: Corn & Peg, Recess, Goldie & Bear, Imagination Movers, Handy Manny, Rugrats, LazyTown, Dragon Tales, and Hey Arnold!; and for film: Whispers in the Dark, A Case for Murder, Becoming Dick and The Family Plan. He co-created Goldie & Bear with Jorge Aguirre. He won a 2002-2003 Emmy Award and a 1999 Humanitas Award for writing and producing the Nickelodeon television series Rugrats and the 2010 Writers Guild of America Award for Imagination Movers. He has also received a Vision Award from the National Association for Multi-Ethnicity in Communications, a Genesis Award from the Humane Society, an Imagen Award, and an Environmental Media Award, for his work on Handy Manny. References External links Interview with Gitelson from Wired Category:Living people Category:American television producers Category:Year of birth missing (living people) Category:People from Washington, D.C. Category:American film producers Category:Screenwriters from Washington, D.C.
Q: Method not supported in LINQ Store expression I am using LINQ to Entities for selecting data from SQL. Here is my statement var employee = from p in _context.employee select p; employee = employee.Where(p => Helper.RemoveSpecialCharacters(p.IdentificationNumber). Equals(Helper.RemoveSpecialCharacters(search.IdentificationNumber))); var Results = employee.ToList(); I am using RemoveSpecialCharacters method which I wrote to compare both sides of comparison without special characters. Here I Get error, "RemoveSpecialCharacters" Method is not supported by Linq->Entity and is not a valid Store Expression. I understand that it can't be translated as SQL. But how do I make such comparison using LINQ? RemoveSpecialCharacters Method public static string RemoveSpecialCharacters(string str) { char[] arr = str.Where(c => (char.IsLetterOrDigit(c))).ToArray(); str = new string(arr); return str; } If methodname be translated to LINQ store then maybe how can I put this in linq so that sql understands it. A: If you can express your RemoveSpecialCharacters in SQL, you could have a SQL view presenting your employees with a computed IdentificationNumberWithoutSpecialCharacters column, and then filter on it. You could also reuse your C# implementation of the method by creating a .NET assembly for SQL Server.
Q: How do I get all elements of a certain category, type and familiy in revit I have a function where I would like to get all elements belonging to a certain category, type and family. I have their names as strings and would like to obtain the actual elements that meet the criteria. I have tried a bit with the following: internal static void getElemetWithId(Document doc,string catName, string famname, string symbname) { Category category=null; foreach (var cat in doc.Settings.Categories){ if (((Category)cat).Name.Contains(catName)) { category = (Category)cat; break; } } HashSet<Element> elements = new HashSet<Element>(); elements.AddRange(GetFilteredElementCollector(doc, new ElementRetrievalOptions()) .OfCategory(category).WhereElementIsElementType(famname).ToElements()); } However this doesn't work as OfCategory does not accept a Category as a argument (it does work for a builtInCategory) and WhereElementIsElementType does not seem to accept any argument. A possible input for this function would be document, "Doors" , "M_Single-Flush" , "0915 x 2134mm" A: You should look at the Revit SDK, http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=16777469, and go through some of the sample code. You can also look at Jeremy's page: http://thebuildingcoder.typepad.com, and Harry's page: https://boostyourbim.wordpress.com for more sample code. You should use the FilteredElementCollector Class to find all the Elements you'd be looking for: FilteredElementCollector allInstances = new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)‌​).Where(q => (q as FamilyInstance).Symbol.Name == symbname);
Q: Timer looping in vba (Access) I'm trying to configure a timer to run every 3 minutes in VBA, to loop through my Access database table and validate data. I'm stuck at the point of starting the timer. I wrote this mini script to test the timer: Function JobNameValidate() MsgBox ("Hello") 'callAgain.OnTimer End Function Function callAgain() callAgain.TimerInterval = 300000 Forms("HiddenForm1").OnTimer JobNameValidate End Function It loops fine, however it loops instantly, regardless of the TimerInterval put in. I couldn't find any helpful documentation about this online. A: You can set your form's OnTimer property to a string which starts with = followed by your function name and a pair of parentheses. The units for TimerInterval are milliseconds. So 3 minutes is 180000 (3 * 60 * 1000). Function callAgain() Forms("HiddenForm1").OnTimer = "=JobNameValidate()" Forms("HiddenForm1").TimerInterval = 180000 End Function I'm not sure why you want to do this with VBA. You could set both those properties in the form's property sheet. But you can do it with VBA if needed.
mg.write("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n") mg.write([[<html> <head> <title>Lua SQLite database test</title> <style> table, th, td { border: 1px solid black; border-collapse: collapse; border-spacing: 5px; } th, td { padding: 5px; text-align: left; } </style> </head> <body> <p>This is Lua script example 1, served by the <a href="https://github.com/civetweb/civetweb">CivetWeb web server</a>, version ]] .. mg.version .. [[. </p><p> The following features are available: <ul> ]]) mg.write('<li><a href="http://www.lua.org/docs.html">' .. _VERSION .. "</a> server pages</li>") if sqlite3 then mg.write('<li><a href="http://lua.sqlite.org/index.cgi/doc/tip/doc/lsqlite3.wiki">sqlite3</a> binding</li>') end if lfs then mg.write('<li><a href="https://keplerproject.github.io/luafilesystem/manual.html">lua file system</a></li>') end mg.write("</ul></p>\r\n") mg.write("<p> Today is " .. os.date("%A") .. "</p>\r\n") mg.write("<p> URI is " .. mg.request_info.uri .. "</p>\r\n") mg.write("<p>\r\n<pre>\r\n") -- Open database local db, errcode, errmsg = sqlite3.open('requests.db') if db then -- Note that the data base is located in the current working directory -- of the process if no other path is given here. -- Setup a trace callback, to show SQL statements we'll be executing. -- db:trace(function(data, sql) mg.write('Executing: ', sql: '\n') end, nil) -- Create a table if it is not created already db:exec([[ CREATE TABLE IF NOT EXISTS requests ( id INTEGER PRIMARY KEY AUTOINCREMENT, timestamp NOT NULL, method NOT NULL, uri NOT NULL, addr, civetwebversion, luaversion, aux ); ]]) -- Add colums to table created with older version db:exec("ALTER TABLE requests ADD COLUMN civetwebversion;") db:exec("ALTER TABLE requests ADD COLUMN luaversion;") db:exec("ALTER TABLE requests ADD COLUMN aux;") -- Add entry about this request local stmt = db:prepare( 'INSERT INTO requests VALUES(NULL, datetime("now"), ?, ?, ?, ?, ?, ?);'); stmt:bind_values(mg.request_info.request_method, mg.request_info.uri, mg.request_info.remote_port, mg.version, _VERSION, "" ) stmt:step() stmt:finalize() -- Show all previous records mg.write('<table>\n') mg.write("<tr>\n") mg.write("<th>id</th>\n") mg.write("<th>timestamp</th>\n") mg.write("<th>method</th>\n") mg.write("<th>uri</th>\n") mg.write("<th>addr</th>\n") mg.write("<th>civetweb</th>\n") mg.write("<th>lua</th>\n") mg.write("<th>aux</th>\n") mg.write("</tr>\n") stmt = db:prepare('SELECT * FROM requests ORDER BY id DESC;') while stmt:step() == sqlite3.ROW do local v = stmt:get_values() mg.write("<tr>\n") local i = 1 while (v[i]) do mg.write("<td>" .. v[i] .. "</td>\n") i = i+1 end mg.write("</tr>\n") end mg.write("</table>\n") -- Close database db:close() else mg.write("DB error:\n") mg.write("code = " .. tostring(errcode) .. "\n") mg.write("msg = " .. tostring(msg) .. "\n") end mg.write([[ </pre> </p> </body> </html> ]])
"Previously on Web Therapy..." "I'm going to marry Gina." "But I want to tell you immediately that this will not affect our relationship at all." " So they're looking into what?" " It's about that hair and makeup account that you op... wanted and opened." "But it's not my account!" "What is this about, the campaign finances?" "Can you help me?" "Did you have access to the accounts?" "Well, of course I had access to the accounts, but I don't anymore." "[Jazz music]" "[Computer beeps]" "Hello, Gina." " Fiona, thank God." " [Laughs] Oh!" "Oh, my God." "I have my drink." "I'm ready for drinks." "Mocktail o'clock." "Cheers." "Mocktail o'clock, oh, that's..." "Cheers." "I'm so happy to see you." "I'm happy to see you too." "Oh, thank God for this drink." "It's the only thing I like." "'Cause it reminds you of better days, more fun days." "Yes, more fun days." "I hate my life." " Poor baby." " It sucks." "I know." "It's very hard, huh?" "Oh, my God." "I'm miserable." "My back is killing me." " Oh." "Oh!" " [Grunts]" "There's your belly button." "Oh, God." "Get it out of me." "I hate this thing." "I know." "I can't do that." "This is bullshit." "Well, how about you sit down?" " Okay." " And then it's easier, I think." " Mm-hmm." " You know?" "It's a lot of strain, up and down, right?" "Where are you going, anyway?" "I'm going to Paris to go shopping." "It's bullshit." "But most women would be thrilled to go to Paris to go shopping." "I hate Paris." "The women are mean, and they spit on me and call me a whore in the streets." " Really?" " Oh, it's awful." "Yeah, the Parisian women are the toughest." "Yeah, they don't like American women, I think." "Or maybe it's just me." "I don't know." "I don't know." "And they smoke everywhere." "And they bring their dogs into restaurants." "Right, it's allowed." "And they got mad at me for ordering coffee before a meal." "Well, they're not American, you know?" "They don't have that service-industry mindset." "You're so right about that." " Yes." " You're so right." "We're service-oriented, you and I." "Yes." "You definitely are." "[Laughs]" "Well, I mean, I just want to be planning my wedding." "Oh, yes." "That's what we're meant to be talking about, right?" " Yes." " Yeah, all right." "Um, so I know Austen feels very strongly about Scotland, which will be so romantic, on his estate, and it'll be really beautiful." "[Scoffs] I'm not having it in Scotland." "I want it to be classy, like the old Greeks." "Oh, "classic."" " Yes, classic." " The classics." "So I was thinking about asking him if we could have it in Rome." "For the Greek wedding, you want it in Rome?" " What do you think?" " I think it..." " I think it's very you." " Oh, my God." "We should have it in Vegas at Caesars Palace." "I love their salads." "I love their frickin' salad." "That would be so much fun." " And more Roman." " Oh, my God, so Roman." "Or you know what, in Caesars Palace, they have this lounge where it's actually, like, a giant ice locker where you can go in there, and you can drink vodka and just freeze to death," "and it's so much fun." "It's like, you get drunker than ever." "We have to go." "[Gasps]" "We could have the bachelorette party at the same time as the wedding." "And it could be women only." " Wouldn't that be fun?" " Well, you need a groom." "Austen needs to be there, dear." "But it's really about the bride." " What?" " It's about the bride." "It's my day." "It's my special day." "And I feel like for my special day, I want to be with you, and I want us to be in twin outfits and wear tiaras and have, you know, obelisk drinks." "Oh, that would be fun." "But it's..." "That's gonna be difficult to talk Austen into," "I just have to say, because..." "Well, then maybe I'm not gonna get married at all." "Well... what?" "Why does it have to..." "Yeah, I guess our work is done here, 'cause basically Caesars Palace or no wedding." "Oh, I haven't seen this..." "Well, I can talk to Austen." "Yeah, you should." " It's my special day." " Right." "It's my motherfucking special day." "Maybe don't need to get emotional." "I'll talk to Austen and make sure that it's at Caesars Palace, okay." "Yeah, you do that." "You do that." "All right." "I'll fix that." "Okay, so I mean, I'm going to Paris." "Maybe I should get you a maid-of-honor gift." "Oh, well, yes." "I mean, I would love an Hermès scarf or..." "What about an éclair?" "To eat..." "Well, the custard would go bad, dear, so..." " You don't want an éclair?" " Well, as long as you're gonna be in Hermès getting me the scarf, how about..." "Oh, you know what, an Hermès... a Birkin bag." "A big, black one, the biggest kind they have." " That would be nice." " I'm gonna get you the biggest, blackest Birkin bag and put an éclair in it." "All right." "Mm-hmm." "Yes, all right." "Well, I'll..." "I'll..." "Yes, I'll get the passwords." "I'll find out as much as I can." "And I am..." "I'm..." "I am being cooperative." "Let's say that I'm being cooperative." "I'm speaking with you, so..." "No, I would love to cooperate." "I would love to, if I had the opportuni..." "Didn't have the opportunity to cooperate before." "Hello?" "Hello?" "Oh." "I didn't hear him say good-bye." "[Line ringing]" "Fiona, hi." "Kip." "Oh, you..." "You answered my call." "You alw..." "You never do." "Well, I can't when Ben's in the room." "He's locked in the bedroom, watching the Heidi Klum channel." "I don't..." "There's something on there." "There's no Heidi Klum channel." "Well, it's... she's on the "Lifetime for Women" show." " Okay." " I don't know what it is." " Anyway, what is it?" " Project Runway?" "'Cause I don't have a lot of time." "Oh, because Ben might catch you talking to me?" " That's insane." " He gets very, very jealous." "I think he's jealous of me." " Kip..." " Right." "That investigation has really heated up." "They're really after me, and I think Ben's behind it." "Oh, don't be ridiculous." "You've done nothing wrong, and Ben is not behind anything." "It's getting serious." "Yeah, but you're innocent, so what's the problem?" "Just... just tell the truth." "You don't know anything about it." "And then there's nothing wrong." "No, but I need to address the actual account, but I can't get into any of the accounts." "I don't have the passwords." "Do you?" "Well, I don't remember the passwords." "Ben wrote them on a piece of paper and put them in my briefcase on the day we closed the office." "In your briefcase?" " Yeah, but I don't have that." " Okay." "No, no, so they were sent to the house, okay." "Yeah, there were some boxes sent to the house." "So just go through them and find the passwords, and I'm sure it'll all be fine." "I haven't seen any boxes." "All right, I'll look..." "I'll ask..." "Ben's, Ben's, Ben's..." " Hey." " Hi, Ben." "So, I'm just talking to Fiona about, uh, the..." " Oh, really?" " Yeah, she got some..." "They're doing some campaign financing investigation." "Yeah, they're investigating me." "Yeah, I know." "I brought that up to you." " Yeah." " No, no, but it's a real..." "It's not, "Oh, it's nothing," okay?" "Well, it was nothing when I left you with it, so I..." "You probably did something stupid." " I don't know." " Really?" "I did something stupid?" " She's done nothing wrong, Ben." " I don't know." "I didn't say wrong." "I said stupid, you know?" "Well, stupid is different." "No, he's gonna de..." "He's setting me up." " No, he's not setting you up." " No one's setting anyone up." "Okay, well, you know, you think of me as an uncooperative person?" "Just wait." "Well, speaking of which, I'd like to maybe..." "This is your divorce petition you'll be getting..." " Oh." " ...which me and Stefan and Stefan have been working on." "They're both named Stefan?" "It's "Steffen" and "Stefawn," all right?" "And one of them was a lawyer in Macedonia." "This is a..." "You picked a winner, Kip." "Fiona, this is not a competition." "Okay, do you hear that, Ben?" "It's not a competition." "No, it's not." "So you can stop trying to destroy me, okay?" "You know what, I'm not trying to destroy you." "That..." "Whatever is going on with that investigation is" " all on you, girlfriend." " Oh, okay." "He doesn't mean it." "Honey..." "I mean, Fiona." " Fiona, he doesn't mean it." " Honey?" "No, you know what, I call her honey sometimes." "Yes, we've been married for 19 years." "You can't just, poof, make that go away," " as much as you'd like to, Ben." " Well, you can, actually." "It's called a divorce decree." "And we are looking forward to the day, let me tell you." "Okay, you know what, let's just all take a deep breath." "Ahh." "Let the air in, let the air out." "Is this what you're learning in one of your Southwest classes?" "Yes, I'm taking a meditation class, just so I can be calm, because I'm not sleeping." "You're not sleeping?" "No, we barely sleep in our bed." "Ben, let's not talk about the private stuff." "Anyway, I'm gonna just finish packing, and this, you'll get in the mail." " Eh, whenever." " Just take your time, Fiona." " It's not urgent." " It's not urgent." " No." " That's what I thought." "Oh, it's urgent, all right." "And you will sign tout de suite, as they say in French Canada." " And in France." " And in Fran... also in France." "It's not just French Canada." " Okay." " All right?" "I got to go." "You know why?" "I got some ironing to do." "Look, Fiona, I..." "He's got a heart of gold." " He's setting me up." " But he's..." "No, he's not." "No, he is not setting you up." "I have no other explanation for how I am all of a sudden... under the spotlight of this." "His bark is worse than his bite." "Believe me, I know." "He's really got a heart of gold." "He really means well." "And his interests..." "his best interests are for me." "And he just wants me to be okay, and..." "God damn it, Kip, we got to go!" " Okay, okay." " I need to find your jeans, and I got to iron them!" "I got to go." "I got to go!" " Oh, hi, Dr. Wallice." " Oh, hi, Jerome." "What are..." "What?" "Why are you in my home in New York, why?" "Oh, no, I came to New York to visit Hayley." "Well, what is Hayley doing there?" " The musical is over." " Oh, I thought you..." "Did you get that email I sent you?" " I sent you an email..." " I don't read your emails." "That was about how Hayley is going to be staying here to help out and pick up packages when you're not here." "I have a doorman for that." "I told the doorman to give her the key." "So the doorman is unnecessary?" "I don't have to pay those fees anymore?" "No, Freddy loves the fact that there's someone in the building, and he and Hayley get along really, really well." " In fact, one time..." "Yeah." " Oh, good." "So we're really adding to the community... by making yours and Hayley's life so much easier at my expense." "No, no, no." "She's buying her own food." "I told her to make a shelf and label it "Hayley."" "I mean..." "I mean..." "You're abusing the privileges that come along with working" " for a person like myself..." " Right." "...who is very important and has all of these wonderful things." "She hasn't taken a thing from your..." "She has not taken a thing, and I've told her to replace toilet paper as well and, um, she's been very, very good at keeping everything" " very much like she found it." " Great, I don't want to see" " a trace of her once she's out." " Right." "And I don't want her living there when I'm not there." " Doesn't work for me." " Well, I had told her" "I was coming to visit, and she's not here, which is strange." "But some of..." "I guess some of Mr. Wallice's things are here," " 'cause I did find..." " No, Mr. Wallice's things, of course, should not be there." "Well, there's, like, a chrysler building thong and a bunch of boxer shorts and a few personal hygiene items that I was surprised to see, like, on the floor" " and on the way to the master..." " What?" "Those aren't yours?" "Well, of course they're not mine!" "Well, they can't be Hayley's," "I don't think." "The rubber sheets..." "Who is she entertain..." "The what?" "Well, there's rubber sheets on the master bedroom, and I just didn't think that they were..." "We have them at our house, but that..." " What?" " I don't think she would..." "Well, maybe she misses me." "And she really..." "It's..." "It's kind of a comfort from home." "I don't want rubber sheets on my bed." "I don't want anything happening on my bed that would require rubber sheets, either." " I don't think that's happening." " On my bed?" "Not even in the guest room?" " This is a lot of nerve, Jerome." " Right, yeah..." "Good note." "I'll tell Hay..." "You know, Hayley and I will talk." " Get her out." " Yeah, okay." " That makes sense." " But before you get her out... find out what she did, please, with the boxes of campaign things... that were sent to the house in Philadelphia." " Oh, yeah." " I can't find any of them." "It was all..." "Yeah, it was all one box." "She sold it in the yard sale." "And a guy, one guy, bought the whole lot." "It was a lot." "A lot..." "I know, it was a lot of stuff." "No, he bought it as a lot." " What?" " He bought it as a lot." "Yes, because it was a lot of stuff." " I'm speaking English." " Right, no, me too." "He sells a lot." "He sells a lot at a time." "Okay, well, I want him to take the many things, or a lot of things, that he bought from me and sold to someone else..." "I need it back." "Okay." "My guess is he sells it off on eBay, but I'll talk to Hayley about trying to track who that guy was, whether she gave him a receipt or not, but I..." " I want it." " Okay." "I need to know who it is." "End of story." "It's crucially important." " Okay..." "Oh!" " I need it." "I hear some..." "I think someone's here." " [Distant grunt]" " But the doorman didn't call up to announce anyone." " I know, but I heard a grunt." " [Distant grunting]" "They must be delivering something, 'cause someone..." " I'm coming, I'm coming." " Did you hear that?" "They're saying, "I'm coming." "I'm coming."" "Someone's obviously about to get here." " [Grunting]" " Let me..." " Ah, I'm coming." " Yeah, do you hear that?" " I'm coming." " It's getting louder." " I'm coming." " Now I do hear it." "I think they're about to get here." " I'd better open the door." " You'd better." " [Grunts] I'm coming." " Yeah, I'm right here." " [Grunts]" " Hello?" "[Grunts]" "So, see?" "Luckily, I was able to track down Kip's briefcase." "There it is, right?" "Yeah, all right." "So now vote for that one." "Okay, so vote higher then." "Well, they want a max bid right now, but I think I'm gonna snipe it." "I don't... all right, I don't know what that is." "Sniping." "I'm gonna put $1,000 in at the last second and then grab it." " That's too much, though." " No, it..." "You won't pay 1,000." "You'll wind up paying only, like, 150." "All right." "Do what you need to do." "Okay." "See, there's 30 seconds left." "So I'm gonna enter in $1,000, and at the last minute, I'll put enter." " That's sniping?" " That's sniping." "Okay." "Okay." "You know, there was a fly in here the other day." "I don't see it now." "I didn't..." "Oh, your CD came of the four tenors." " Oh!" " [Beep]" "What happened?" " "Auction over."" " Oh." " Did we get it?" " No." "Why not?" "What do you mean?" "We were outbid." "Someone else sniped it." "What..." "How did that..." "You were going to snipe it." "I know, but we got..." "You had to tell me about the fly." " Who is..." "Who got it?" " "Karen4Kip."" "Who's Karen4Kip?" "Hello." "Are you Karen Sharpe?" "I'm Fiona Wallice." "And I..." "Are you okay?" "[Laughs]" "Well, I know you're Fiona Wallice." "Oh, you do..." "Yes, I've become quite famous from my work in therapy." "I have a unique treatment modality." "I've been getting a lot of attention for that." "Are you calling me?" "I am..." "Yes." "This is really happening." "[Both laugh] Oh, my God!" "Oh, my God!" "Do you..." "Anyway." " This is... is this..." " Hi, Fiona." " Hello, Karen." " How are you?" "You have a lot of campaign and Kip memorabilia there." "Yes, I have a lot of campaign memorabilia." "It's in safe hands with me, Fiona." "Kip's..." "Kip's everything." "Just so you know, I've been policing the Internet and eBay and several other sites just to be sure that Kip's things are in safe keeping with me." " Uh-oh." " It's very nice" " to see you, honey." " You too." "Can I ask you, is this where you live?" "Or is this a warehouse?" "No, this is... this is... can you see... can you see your husband in the background?" "I see, yes, that's the..." "from the campaign." "Yes." "I don't want to be insensitive, but you're..." "so you're a hoarder?" "Huh?" "It seems that you're..." "Is this where you live?" " This is where I live." " And you've hoarded all of this?" "No, no, I've organized and safe... safekeeping and filed and, you know, everything is precision and in its perfect place." "I'm just a little indoorsy." "Oh, okay." "And uh-oh." " Fiona?" "Fiona?" " Yes?" "You're as beautiful on Skype as you are on television..." " Thank you." " And in the photographs with your husband on the campaign trail, and I'm so honored to be speaking to you right now." "Oh, I'm so happy to bestow that." "And I-I, um..." "Oh, that's a but..." "Oh, you've... [laughs] adorned one of the buttons." "[Laughs] Yes, I have." "I've been thinking about Kip so much." "You know, we haven't heard much of him in the last few months, and I've just been missing his presence a little bit on the computer, and..." "Yes." "No, he had to go away for a little bit after the big scandal, you know?" "It's nothing." "Those things come and go, as you know." "They do come and go." "And you two are so profoundly important to the culture as we know it and to politics and..." "and such wonderful examples of human beings." " Oh." " Um, anyway..." "Thank you." "I'm glad you..." "I am, anyway." "I don't know about Kip, but..." "Oh, I know about Kip." "Yeah." "So you didn't see any of the footage of Kip and Ben Tomlund?" "That must have been painful for you." "I understand that." "I didn't like it." "But, you know, it's a cruel world." "The Internet is... is a scourge." "It's a scourge." "I mean, the things that these kids can create now with these special effects." "That wasn't Kip's head in that zipper." "That was... somebody pasted the back of his head into that position." "And the other piece of..." "Well, you can't really call it footage." "But the other visual that we got was just Kip, like, reaching and reaching and, you know, reaching and not getting what he wanted." "[Stammers] Okay." "I mean, I beg to differ." "I think he got exactly what he wanted." "[Laughs] He's with him right now." "Well, I'm sure you two have a stronger bond than," " you know, any of this." " Got it." "I think it's probably best that I don't argue with you." " [Chuckles]" " Okay. [Laughs]" "You know, it's funny." "I just wanted to, um, let you know that I'm aware that you recently purchased something on eBay." " Um, Kip's briefcase." " [Stammers]" "Oh, yes." "I have that." "I have several other things of Kip's." "Would you like to see them..." "a few things?" "Sure, yes." " Okay." " I will see them." "Okay." "Just gonna go back here." " Okay." "I'm still here." " Okay." " First, I have a soil sample." " What?" "A soil sample from Kip's Altoona campaign." "This was between the flagstones on his walk..." "Oh, real soil." "Not night soil." "Okay." " Yes." " Yes, I have that." " Whew!" "[Laughs]" " I have a few items that I retrieved from..." "Well, it's a long story, but I have some... some of Kip's takeout..." " What?" " ...containers." " Really?" " Yes." "This is for sure Kip's, as you'll know, because the dressing, on the side." "That..." "Kip, dressing on the side, that's him." " Kip, nonfat." " Right." "On the campaign trail..." " Possessed." " What?" "Safe as can be with me." "Oh, thank you then." "Thank you." "I had to take a long, terrifying trip to Philadelphia, to the campaign headquarters." " Oh, you went there?" " Mm-hmm." "It's different outside these days." " There's a lot of coffee..." " Right." " Rest stops..." " Yes." "That third brake light." "The third brake light?" "Yes." "I don't..." "Also, this is Kip's favorite album." "Oh, yes." "Goodbye Yellow Brick Road, Elton John." "Yes, yes." "No, I knew that." "I'm sure your favorite album as well." "Of course." "I love her." "What's your favorite band, Bee Gees or Doobies?" "Bee Gees, of course." "I knew it!" " Oh, see." " I knew it!" "Wow, we're really in sync." " So... we're very in sync." " We're very in sync, so..." "So I have the briefcase as well." "Yes, and I would love to unburden you with it." "I know you spent over $100." "I'll give you $200 so that you're not at a loss, you know." "And then you can purchase maybe a few thousand other things of Kip's with that money." "How does that sound?" " [Laughs]" " I've, uh..." "I don't..." "I'm not gonna part with the briefcase." "I think it's probably safest here, as you..." " Safer than with his..." " Safe with me." "It's in a super secret, super safe..." " Right." " ...archive..." " Uh-huh." " ...here in a, um... not exactly in this room, but in, uh, two rooms over." "Can I ask, did you look inside of it?" " Was there anything inside?" " Beautifully crafted..." "Beautiful, tough, brown leather, very manly." " Beautiful." " Yes." "I picked it out, so..." " I'm sure you did." " Yeah." "Okay." " Well you know what..." " Can I ask you something else?" " Oh." " Just a little girl talk." " Yes, of course." " Okay." "How many times have you had the big sex?" " What?" "With..." " Before Kip, before Kip." "Before Kip?" "How many..." "Domestic." "Domestic tally only." "Okay." "Well, before Kip, I'd say none." "He was my first love." "[Laughs]" "I love that about you too." "Oh, yes." "And it's true." "Mm." "It's an inspiration, you know that." "I'm so happy that you saved yourself for Kip, because that's what I'm doing." "Good for you." "It... it'll..." "it'll be a long wait." "We'll see." "Right." "Can I ask you if he is a... [whispering] sensitive lover?" "If he's a what?" "A sensitive lover." "Oh, he's extremely sensitive." "Very sensitive." " I think, um..." " Is he considerate of you?" "He's very..." "yes, he's very considerate." "He doesn't want to make me feel uncomfortable, so his eyes are shut tight." "And sometimes, he even would put, you know, like, a cloth over my head." "Do you still have the cloth?" "Yes." "[Sighs] Oh, Fiona." "Can I get the cloth?" "You know what?" "I have something... because you're doing such a wonderful job as the custodian of Kip's world," "I have something I think you would love to have, and I'd be honored if you would accept it." "It's, um, Kip's running shorts." "And I haven't gotten around to washing them yet." " So it's Kip's sweat as well..." " Kip's sweat?" "...in the running shorts, and so I would love for you to have it." "[Laughs]" "Oh, I'm glad that makes you happy." " And you know they'll be safe with me." " They will be safe with you." " Now I don't trust the mail..." " Thank you, Fio 'cause I don't know what they're going to do to it." "They could lose it." "Someone else can touch it." "So I'd be honored to personally bring it to you, and then we can... we can even meet and say hello in person." "I look forward to it." "When do you suppose you'd be coming with Kip's sweat?" "I could be there tomorrow." " Tomorrow?" " Yes, I'll come in the morning." "It's lucky, because I just did a once-through, and I-I, um, you know..." "it's pinpoint precision here... [laughs] in your honor." "So I'll..." "I will see you tomorrow morning, all right?" " With the running shorts." " And the face cloth." " I had nothing to do with this." " Maybe I want a twat clause in my form against you." "Maybe I need notice." "Why don't we just have a mutual de-twatification?" "All right, stop saying that word!" " Oh, okay." " It's vulgar." "First of all, it's not a word." "No, it... actually, it is." "If a word can be formed, it can be said." "We..." "I know a bird that can say that word, at Pico Pete's." "[Laughs] [Laughs]" "[Laughs]" " [Snorts]" " It's tricky, isn't it?" "Oh." "[Rattles]" "There's ice in here." "Oh... oh!" "[Laughs]" " Wow, that is convenient." " That's me with props." "[Laughter] And cut." "Well, no, I know, but I don't think Rashi..." "Rashida." "Oh, my God, look at me." "I don't think that Hayley, um..." " I don't think..." " Go, "I know, I know, but."" " [Laughs]" " I know... [Laughs]" "So if I empty it, I'll bring you a fresh..." "Boink!" " What happened?" " [Laughter]" "I mean, he is interested in... in even the rich getting richer, Fiona." "Right." "That is important." "All right, good, good, good." "[Laughs] "Even the rich getting richer.""
Comparative Effectiveness of Radical Prostatectomy Versus External Beam Radiation Therapy Plus Brachytherapy in Patients with High-risk Localized Prostate Cancer. A previous study comparing external beam radiation therapy with/without brachytherapy (EBRT±BT) and radical prostatectomy (RP) for high-risk localized prostate cancer (PCa) did not find a difference in overall survival (OS) between the treatments. However, this study was limited by short follow-up and assessment of OS in patients of divergent age and comorbidities. We therefore compared OS of EBRT+BT versus RP in comparatively young (≤65yr) and healthy men (Charlson Comorbidity Index=0) with high-risk localized PCa in the National Cancer Database. Inverse probability of treatment weighting (IPTW) adjustment was used to balance baseline characteristics. Median follow-up was 92mo (interquartile range 78-108). Using IPTW-adjusted Cox regression analysis, EBRT+BT was associated with a higher risk of all-cause mortality compared with RP (hazard ratio=1.22, 95% confidence interval 1.05-1.43). In young and healthy men presenting with high-risk localized PCa, RP showed statistically significant OS benefit compared with EBRT+BT. PATIENT SUMMARY: In an analysis restricted to young and healthy men presenting with high-risk localized prostate cancer, initial radical prostatectomy is associated with an overall survival benefit compared with external beam radiation therapy plus brachytherapy.
Paradoxical migrating cyst: an unusual presentation of intraventricular neurocysticercosis with a coincidental pituitary adenoma. Intraventricular neurocysticercosis is an uncommon entity which may become symptomatic due to cerebrospinal fluid flow obstruction. Migration of intraventricular cysts through the ventricular spaces is a rare occurrence. This phenomenon is poorly understood but may be due to pressure changes within the ventricular cavities. We present a patient with intraventricular neurocysticercosis with paradoxical transaqueductal migration of the cyst from the cerebral aqueduct to the fourth ventricle shortly after ventricular drain placement for acute hydrocephalus. The patient also presented with a coincidental sellar and suprasellar mass, later pathologically proven to be a pituitary adenoma. The migration of this cyst resulted in spontaneous relief of obstruction at the cerebral aqueduct, thus restoring normal cerebrospinal fluid pathways and avoiding permanent shunting. We discuss the possible mechanisms and implications of cyst migration, and the diagnostic challenges of concomitant findings of a pituitary mass and neurocysticercosis. Although the presence of a sellar and suprasellar mass in a patient with known neurocysticercosis should raise clinical suspicion for the possibility of sellar neurocysticercosis, pituitary macroadenoma is a more common entity and a more likely etiology for a sellar lesion.
Professional Development Schools Looking for a fast-track entry to the teaching profession? Consider Marymount’s Professional Development School! A collaborative effort with Fairfax County Public Schools, this highly selective program combines coursework with a 9-month internship placement. Students complete the full program in one calendar year. By spending an academic year gaining hands-on experience in a variety of classroom settings, PDS graduates are well prepared for the challenges and opportunities of the teaching profession. Completion of the PDS program leads to a master’s degree in education (M. Ed.) and teaching licensure in the Commonwealth of Virginia. A master’s degree with licensure is available through the PDS in the following areas: Interns selected for the PDS program begin their coursework in May and their internship in August. It is a full-time, three semester program over the summer, fall, and spring semesters. Interns work in the PDS schools Monday through Thursday during school hours and have classes on Fridays or weekday evenings. All interns graduate and finish their M.Ed. program and internship in mid-May. Marymount's Professional Development School program offers you the opportunity to be immersed in multiple school settings for one school year a “real life” teacher preparation model that includes high-needs and diverse student populations the opportunity to learn and be guided by experienced, trained mentor teachers opportunities to put theory and learning from University courses into practice through a hands-on, minds-on internship
Correlation between tumor growth and hormonal therapy with MR signal characteristics of desmoid-type fibromatosis: A preliminary study. To evaluate the impact of hormonal therapy on MRI characteristics of desmoid-type fibromatosis on T1-weighted, T2-weighted fat-saturated and post-contrast sequences. Nineteen patients with histologically-proven desmoid-type fibromatosis were prospectively followed up on MR imaging. Eight patients underwent hormonal therapy and 11 were only surveyed. Change in tumor size during follow-up was analyzed according to RECIST. Signal intensity on T1-weighted, T2-weighted fat-saturated and T1-weighted fat-saturated post-contrast images was graded from 0 to 5 using adjacent normal muscle as reference. Findings were compared with tumor growth and treatment option. There were seven men and 12 women with a mean age of 42.2±16.4 (SD) years (range: 18 - 64 years) yielding twenty-six follow-up periods: eight of tumor progression and 18 of tumor stability/regression (some tumors exhibited more than one behavior type). Hormonal therapy was associated with tumor stability or regression (P=0.0207). There was a significant reduction in enhancement among treated patients with stable/regressing disease (P=0.049). The mean variation in enhancement grade was -1.3±1.2 in these patients. All successfully treated patients presented a reduction in enhancement. Lesions with marked low enhancement or very low signal on T2-weighted images were rare in progressing lesions (0% and 13%). Hormonal therapy has an impact on desmoid-type fibromatosis signal characteristics reducing lesion enhancement.
The ECHL’s Orlando Solar Bears and Florida Everblades broke out into a line brawl in the last minute of Game 4 of their divisional semifinals Saturday. The result was hectic and loud, like every facet of minor league hockey. The unrestrained violence, the stale arena music, a kid going wild in the stands: All of this draws people to emotionally invest in a league that’s otherwise a stepping stone for legitimate talent. (Or maybe they simply like seeing any guy on skates punch another guy for their entertainment.) Here’s video, from the Fort Wayne Journal Gazette: Five Everblades and five Solar Bears received game misconducts at 19:14 of the third period. That included Orlando goalie Ryan Massa, who was fired up about the fights until he realized he was getting ejected, just 46 seconds away from a 42-save shutout. The ECHL fined and suspended Florida’s Mitchell Heard for three games, keeping him out of the rest of the series. His teammate Jake Baker received a fine and one-game suspension. H/t to Ben
558 P.2d 517 (1976) EXBER, INC., a Nevada corporation, dba El Cortez Hotel, Appellant, v. SLETTEN CONSTRUCTION COMPANY, a Montana Corporation, et al., Respondents. No. 8236. Supreme Court of Nevada. December 22, 1976. *518 George Rudiak, Las Vegas, for appellant. W. Owen Nitz and Albright & McGimsey, Las Vegas, for respondents. OPINION MOWBRAY, Justice: This is an appeal from a summary judgment in favor of Respondents Sletten Construction Company (Sletten), Cheyenne Construction, Inc. (Cheyenne), and Garcia/Case, Inc. (Garcia), ordering Appellant Exber, Inc., dba El Cortez Hotel (Exber), to submit to arbitration a construction contract dispute with its general contractor, Sletten. This appeal is also taken from the district judge's postjudgment order denying Exber's motion under N.R.C.P. 52, wherein Exber asked that the summary judgment be amended by denying the oral motion for summary judgment made by Cheyenne and Garcia and by declaring that such summary judgment does not obligate Exber to arbitrate with the subcontractors, Cheyenne and Garcia, and by further declaring that Exber would not be bound by any arbitral award made in arbitration between Sletten and its subcontractors. 1. The Facts. So far as pertinent to this appeal, the following are the admitted facts. On October 9, 1972, Exber entered into a construction contract with Sletten as general contractor for the construction of an addition to the El Cortez Hotel in Las Vegas. The contract incorporates by reference American Institute of Architects Document A201, entitled "General Conditions of the Contract for Construction." Subparagraph 7.10.1 provides in part: "All claims, disputes and other matters in question arising out of, or relating to, this Contract or the breach thereof, ... shall be decided by arbitration in accordance with the Construction Industry Arbitration Rules of the American Arbitration Association ... This agreement to arbitrate shall be specifically enforceable under the prevailing arbitration law..."[1] *519 On October 12, 1972, Sletten entered into subcontracts with Cheyenne and Garcia. Article 8 of each of the subcontracts obligated the subcontractor "[t]o be bound to the Contractor by the terms of the general conditions of the specifications and addenda, and to conform to and comply with the drawings and specifications and addenda, and to assume toward the Contractor all the obligations and responsibilities that the Contractor assumes in and by the aforesaid documents toward the owner, in so far as they are applicable to this particular subcontract." And Article C of each of the subcontracts provided for arbitration as follows: "That where arbitration or [sic] disputes is granted the Contractor under the terms of his contract on the project covered by this agreement, such right of arbitration shall be extended to the Sub-Contractor." Hard rock, commonly known as "caliche", was encountered by Cheyenne soon after excavation of the building site was commenced. On February 13, 1973, Sletten presented to the architect a claim seeking compensation for extra work resulting from the encountering of the caliche, Cheyenne having previously made such a demand on Sletten, as provided in Subparagraphs 12.1.6[2] and 12.2.1[3] of the General Conditions. The architect denied the claim for additional compensation by letter dated April 27, 1973, which letter was received by Sletten on April 30, 1973; on that date, Sletten notified Cheyenne that the claim had been denied. Cheyenne, on May 29, 1973, made a written demand on Sletten that the claim be submitted for arbitration.[4] On June 4, 1973, Sletten made a demand for arbitration upon Exber. *520 The arbitration proceeding instituted by Cheyenne included Sletten and Exber; Garcia later joined therein. Consequently, the owner and the general contractor and its two subcontractors were all joined in a single arbitration proceeding before the American Arbitration Association. On August 4, 1973, Exber informed Sletten that it declined to participate in the arbitration for the reasons set forth in its letter of that date, which included the fact that Sletten had failed to make a timely demand for arbitration within 30 days after receiving the architect's written decision rejecting its request for additional compensation, as provided by Subparagraph 2.2.11 of the General Conditions.[5] Exber filed on September 14, 1973, its complaint for declaratory relief and to stay arbitration. Sletten subsequently filed a motion for summary judgment, on the ground that the district court was without jurisdiction to decide whether the demand for arbitration was timely. On April 2, 1974, Garcia, without objection, joined in the motion. On May 14, 1974, the district court filed a written decision holding among other things that "[h]ere, all the parties, including the subcontractors, Garcia/Case and Cheyenne Construction, were parties to an agreement to arbitrate" and ordering that arbitration proceed. Judgment to the same effect was entered on June 10, 1974. On June 24, 1974, Exber filed a Rule 52 motion to alter or amend the judgment, asking that summary judgment be denied as to Cheyenne and Garcia and that the court declare that Exber had no contractual duty to arbitrate with Cheyenne or Garcia and therefore would not be bound by any arbitral award rendered in arbitration between Sletten and its subcontractor. On January 28, 1975, an order was entered denying Exber's motion to alter or amend judgment. 2. The Issues. The issues to be determined fall into two categories: First, whether the district court erred in ruling that there had been substantial compliance by Sletten, the general contractor, with the condition precedent necessary to enable it to invoke the covenant to arbitrate contained in the construction contract between Exber and Sletten. Second, whether the district court erred in ordering a consolidated arbitration between Exber and both the general contractor, Sletten, and Sletten's subcontractors, Cheyenne and Garcia. A. Thirty-four days after Exber denied Sletten's claim for extra compensation, Sletten demanded arbitration. Exber contends that the delay violates the 30-day time limit prescribed in Subparagraph 2.2.11 of the General Condition, supra. Sletten urged, and the district court so found, that the 30-day period never began to run, because the architect's written denial did not state that it was "final but subject to appeal," as required by Subparagraph 2.2.11 of the General Conditions. Exber argued in the court below that the issue of timeliness constituted a condition precedent to the agreement to arbitrate and was therefore an issue to be decided by the district court. Sletten urged that this was a dispute arising under the contract and should be resolved by arbitration. We believe and so hold that the question of the timeliness of the demand for arbitration should have been resolved by arbitration *521 and that the court should not have entered the order staying arbitration. Both parties have cited the court to cases supporting their respective positions. An examination of these cases reflects a split of authority. Most of the cases discussing this issue have been collected in an A.L.R. annotation, "Waiver of, or Estoppel to Assert, Substantive Right or Right to Arbitrate as Question for Court or Arbitrator". Annot., 26 A.L.R.3d 604 (1969, Supp. 1975). However, the annotation describes the majority rule as vesting the arbitrator with jurisdiction to decide this question of the timeliness of the demand for arbitration. Id., at 617. The justification for the rule is based on the breadth of the language ordinarily utilized in arbitration agreements (such as in the instant case, where the parties have agreed to arbitrate all disputes arising under the contract), indicating that matters of procedural compliance are issues for arbitration. In M. Domke, "The Law and Practice of Commercial Arbitration," § 15.02, at 148 (1968), the author discusses contractual time limits for demanding arbitration and concludes that compliance with said limits is an issue to be resolved by arbitration: "The question here is not how the arbitrator will apply the time limits— both contractual and statutory—but whether the arbitrator should have the competence to do so. That should be answered in the affirmative." (Emphasis in original.) Exber, the owner, refused to arbitrate and sought to stay the arbitration proceeding, not because the arbitrability of the substantive issues was questioned, but rather because of a dispute as to whether the demand for arbitration had been timely made. The identical question has been resolved by the United States Supreme Court in a suit brought by a labor organization to compel arbitration under § 301 of the Labor Management Relations Act. In John Wiley & Sons, Inc. v. Livingston, 376 U.S. 543, 84 S.Ct. 909, 11 L.Ed.2d 898 (1964), the company alleged it had no duty to arbitrate a dispute found by the court to be arbitrable, because the union had failed to comply with certain of the procedural prerequisites to arbitration required by the governing collective bargaining agreement. There, the High Court said, at 556-557, 84 S.Ct. at 918: "We think that labor disputes of the kind involved here cannot be broken down so easily into their `substantive' and `procedural' aspects. Questions concerning the procedural prerequisites to arbitration do not arise in a vacuum; they develop in the context of an actual dispute about the rights of the parties to the contract or those covered by it... . "... It would be a curious role which required that intertwined issues of `substance' and `procedure' growing out of a single dispute and raising the same questions on the same facts had to be carved up between two different forums, one deciding after the other. Neither logic nor considerations of policy compel such a result. "Once it is determined, as we have, that the parties are obligated to submit the subject matter of a dispute to arbitration, `procedural' questions which grow out of the dispute and bear on its final disposition should be left to the arbitrator... ." While the principles enunciated in Wiley do not flow from an interpretation of the Uniform Arbitration Act, the Congressional policy on agreements to arbitrate, which led the Supreme Court to its resolution of this issue under § 301 of the Labor Management Relations Act, is parallel to the policies underlying the Uniform Arbitration Act. Under § 301, the function of the court is strictly confined to ascertaining whether the parties agreed to arbitrate the subject matter of the dispute. Similarly, NRS 38.045 (subsections 1 and 2) provides that, on application of a party showing an agreement to arbitrate, as described in NRS 38.035, and upon the opposing party's refusal to arbitrate, the court shall order the parties to proceed with arbitration; but if the opposing party denies the existence of the agreement to arbitrate, the *522 court shall proceed summarily to the determination of the issue so raised and shall order arbitration if found for the moving party. The court may stay an arbitration proceeding only on a showing that there is no agreement to arbitrate.[6] All doubts concerning the arbitrability of the subject matter of the dispute are to be resolved in favor of arbitration. Once it is determined that an arbitrable issue exists, the parties are not to be deprived by the courts of the benefits of arbitration, for which they bargained—speed in the resolution of the dispute, and the employment of the specialized knowledge and competence of the arbitrator. John Wiley & Sons, Inc. v. Livingston, supra, 376 U.S. at 557-558, 84 S.Ct. 909. In New Pueblo Constructors, Inc. v. Lake Patagonia Recreation Ass'n, 12 Ariz. App. 13, 467 P.2d 88 (1970), the Arizona court held that arbitration agreements are to be liberally construed in favor of arbitration of disputes and that the arbitrators have full power to decide all the "questions or controversies" arising out of the contract between the parties. The salient part of the agreement to arbitrate provided: "`... All questions or controversies which may arise between the Contractor and the Owner, under or in reference to this contract, shall be subject to the decision of some competent person to be agreed upon by the Owner and the Contractor, and his decision shall be final and conclusive upon both parties. Should the Owner and Contractor be unable to agree upon such person, a board of three arbitrators shall be chosen, one by the Owner, one by the Contractor, and the third by the two so chosen, and the decision of any two of said arbitrators shall be final and binding upon the parties... .'" Id., at 89. The Arizona statutes are almost identical with the Nevada statutes relating to arbitration.[7] The Arizona court said, at 91: "... [A]rbitration clauses should be construed liberally and any doubts as to whether or not the matter in question is subject to arbitration should be resolved in favor of arbitration. Metro Industrial Painting Corp. v. Terminal Construction Co., 287 F.2d 382 (2nd Cir.1961); United Steelworkers of America v. Warrior and Gulf Navigation Co., 363 U.S. 574, 80 S.Ct. 1347, 4 L.Ed.2d 1409 (1960); Robert Lawrence Co. v. Devonshire Fabrics, Inc., 271 F.2d 402 (2nd Cir.1959); Lundell v. Massey-Ferguson Services N.V., 277 F. Supp. 940 (N.D.Iowa 1967); Southern Bell Telephone & Telegraph Co. v. Louisiana Power and Light Co., 221 F. Supp. 364 (D.La. 1963); Firestone Tire & Rubber Co. v. United Rubber Workers of America, Local Union No. 100, AFL-CIO, 168 Cal. App.2d 444, 335 P.2d 990 (1959); Bewick v. Mecham, 26 Cal.2d 92, 156 P.2d 757 (1945)." The evils incident to bifurcating the adjudication process (procedural issues being judiciable, and substantive issues being arbitrable) are manifest, as in the present case. The parties, obviously aware of congestion and delay in our court system, sought to protect themselves by providing for a quick and ready forum for resolution *523 of any disputes that might arise between them. On June 4, 1973, such a dispute arose. Sletten made a demand for arbitration. Three and a half years later, because the court assumed jurisdiction to decide a question of procedural irregularity in presenting the demand, the dispute is still not resolved. For the reasons hereinabove expressed, we believe that the question of the timeliness of the demand to arbitrate should have been determined by an arbitrator rather than the district court. The decision of the district court is, however, so clearly correct that it is unnecessary to remand and further compound the delays already incurred by the parties. In determining a question under an arbitration agreement, an arbitrator enjoys a broad discretion, but that discretion is not without limits. He is confined to interpreting and applying the agreement, and his award need not be enforced if it is arbitrary, capricious, or unsupported by the agreement. United Steelworkers of America v. Enterprise Wheel and Car Corp., 363 U.S. 593, 80 S.Ct. 1358, 4 L.Ed.2d 1424 (1960); Dallas Typographical Union v. A.H. Belo Corp., 372 F.2d 577 (5th Cir.1967). The language in the instant agreement indicates unequivocally that a time limit is applicable only when the architect's written decisions state that they are "final but subject to appeal." Subparagraph 2.2.11, supra. For an arbitrator to have imposed a similar limitation with respect to a decision omitting such a statement would have been an abuse of discretion not entitled to enforcement by the district court. See Sollenberger v. AA Constr. Co., 481 P.2d 428 (Colo. App. 1971).[8] B. Next, we shall consider whether the district court erred in ordering a consolidated arbitration hearing between Exber and Sletten and Sletten's subcontractors, Cheyenne and Garcia. The Minnesota Supreme Court has held that, under the Uniform Arbitration Act, its courts have power to order consolidation pursuant to provisions which confer upon its courts power to order parties to proceed with arbitration and to enforce an award as any other judgment. Grover-Dimond Assocs. v. American Arbitration Ass'n, 297 Minn. 324, 211 N.W.2d 787 (1973). In Grover-Dimond Assocs., it was held that arbitration proceedings between the owners of a building and their contractor could be conducted jointly with an arbitration between the owners and their architect. The proceedings arose out of the construction of a building. The owners' contract with the architect contained an arbitration provision, as did the contractor's contract with the owners. The owners concluded that, in the course of construction, certain unauthorized expenses had been incurred by the architect and the contractor. The owners sought joint arbitration, in which the contractor concurred but the architect resisted. Affirming the trial court's decision denying the architect's motion to prohibit joint arbitration, the appellate court noted that nothing in the arbitration provisions in the contracts, or in the statute concerning arbitration, expressly deals with the question of joint arbitration. The court stated that it was clearly Minnesota's policy, as reflected by its arbitration statute, to encourage arbitration (as is reflected in Nevada's Arbitration Statute).[9] The court observed that the *524 parties would use the same arbitrators and that to require the arbitrators to hear the same evidence twice would be to ascribe to the parties an intention not expressed in their agreements. It was added that, whether the proceedings in the case were treated as concurrent, joint, or consolidated hearings, it was manifestly in the interest of justice that all of the issues raised be laid to rest in one proceeding. In the instant case, the same evidence, witnesses, and legal issues involved in the Exber-Sletten dispute will also be presented in the Sletten-Cheyenne-Garcia dispute. This is not a case of requiring a party to join in a proceeding against a stranger. There has been no showing of prejudice. We agree with the ruling of the district court that consolidation of the claims will make it possible to determine all the issues in one proceeding and avoid the possibility of conflicting awards, as well as the additional time and expense of separate proceedings. 3. The Summary Judgment in Favor of Cheyenne and Garcia. Exber finally contends that the district court erred in entering summary judgment in favor of Respondents Cheyenne and Garcia, because they failed to comply with the formal requirements of N.R.C.P. 56. At the hearing on Sletten's motion for summary judgment, all defendants appeared and argued through their attorneys. The proceeding was conducted as if it were a joint hearing on a consolidated motion for summary judgment. Garcia formally joined in the motion, whereas Cheyenne merely indicated that it joined in the arguments presented by Sletten's attorney. On June 10, 1974, the court entered summary judgment for all defendants, noting that Garcia and Cheyenne had orally joined in Sletten's formal Rule 56 motion. On June 24, 1974, Exber filed a Rule 59 motion to amend the judgment by denying the oral summary judgment motions advanced by Cheyenne and Garcia, and by seeking an order declaring that Exber was under no duty to arbitrate in a consolidated proceeding. The court found that Exber's objection was untimely. The court also refused to restore the injunction against Cheyenne and Garcia by staying consolidated arbitration. In doing so, the court considered whether it had authority to order consolidated arbitration. In arrogating to itself such power, the court adopted the more enlightened Grover-Dimond rationale discussed above. Although Rule 56 motions should ordinarily be in writing, the instant case presents a situation wherein codefendants have orally joined in a written motion submitted by another co-defendant. Appellant Exber made no objection to this procedure during argument on the motion. Failure to comply with the formal requirements of Rule 56 is subject to the harmless-error rule. See 6 Moore's Federal Practice, ¶ 56.14, at 56-357 (2d ed. 1948, 1975 Cum. Supp.), and cases cited therein. A court may enter a judgment on a cross-motion for summary judgment made orally at a hearing on the original Rule 56 motion as long as the opposing party is not prejudiced. Here, despite the trial court's refusal to amend the judgment on the procedural grounds raised in appellant's Rule 59 motion to amend, the court nevertheless considered Exber's contention that consolidated arbitration was unauthorized. The parties submitted points and authorities on the subject, and the court rendered a decision on the merits. "Rule 56 does not specify whether the court can enter summary judgment on its own in the absence of any request to do so. As is discussed more fully in the next section, the most common situation in which this question arises is when the court desires to enter judgment for a party opposing a summary judgment motion but no cross-motion has been made. It is well established that under these circumstances it is appropriate for the court to grant summary judgment... ." Wright & Miller, Federal Practice & Procedure, Civil § 2719, at 454 (1973). *525 The situation presented on this appeal is analogous to the one described above. The bases for permitting judgment on a cross-motion for summary judgment made orally at the original Rule 56 hearing are lack of any real prejudice visited on the party against whom the judgment was granted, and implementation of the policy underlying Rule 56 which is expediting the disposition of cases wherever possible. Wright & Miller, supra, at 454-455. The same reasons justify the judgment in the instant case, because (1) Exber failed to timely object, (2) the court already had before it a proper motion submitted by one of the codefendants and merely granted the motion as to all defendants, and (3) Exber was afforded an opportunity to present argument on the merits of consolidated arbitration, which issue was resolved against Exber. Accordingly, for lack of any prejudice, and because of failure to timely object, the judgment is affirmed. GUNDERSON, C.J., and BATJER, ZENOFF and THOMPSON, JJ., concur. NOTES [1] General Conditions of the Contract for Construction, Subparagraph 7.10.1: "All claims, disputes and other matters in question arising out of, or relating to, this Contract or the breach thereof, except as set forth in Subparagraph 2.2.9 with respect to the Architect's decisions on matters relating to artistic effect, and except for claims which have been waived by the making or acceptance of final payment as provided by Subparagraphs 9.7.5 and 9.7.6, shall be decided by arbitration in accordance with the Construction Industry Arbitration Rules of the American Arbitration Association then obtaining unless the parties mutually agree otherwise. This agreement to arbitrate shall be specifically enforceable under the prevailing arbitration law. The award rendered by the arbitrators shall be final, and judgment may be entered upon it in accordance with applicable law in any court having jurisdiction thereof." [2] Subparagraph 12.1.6: "Should concealed conditions encountered in the performance of the Work below the surface of the ground be at variance with the conditions indicated by the Contract Documents or should unknown physical conditions below the surface of the ground of an unusual nature, differing materially from those ordinarily encountered and generally recognized as inherent in work of the character provided for in this Contract, be encountered, the Contract Sum shall be equitably adjusted by Change Order upon claim by either party made within twenty days after the first observance of the conditions." [3] Subparagraph 12.2.1: "If the Contractor wishes to make a claim for an increase in the Contract Sum, he shall give the Architect written notice thereof within twenty days after the occurrence of the event giving rise to such claim. This notice shall be given by the Contractor before proceeding to execute the Work, except in an emergency endangering life or property in which case the Contractors shall proceed in accordance with Subparagraph 10.3.1. No such claim shall be valid unless so made. If the Owner and the Contractor cannot agree on the amount of the adjustment in the Contract Sum, it shall be determined by the Architect. Any change in the Contract Sum resulting from such claim shall be authorized by Change Order." [4] The demand for arbitration set forth the nature of the dispute and the claim sought as follows: "NATURE OF DISPUTE: "In doing the excavation work under the above mentioned contract additional expenses for equipment and labor were incurred due to the unusual and unforeseen hardness of the caliche encountered beneath the surface of the ground. This area beneath the surface was at a variance with the conditions indicated by the contract documents. Furthermore, the hardness and extent of the caliche was of an unusual nature and differed materially from that ordinarily encountered in the area. "CLAIM OR RELIEF SOUGHT (amount, if any) "Insurance $ 1,889.00 "Equipment cost beyond schedule 10,640.00 "Labor to help drill for blasting 895.27 "Breaking ball 503.75 "Sanders Construction—blasting 13,775.96 "Trigger Bryant Security Service 1,165.50 "Garcia Case Co. 11,035.41 ___________ $39,904.89" [5] Subparagraph 2.2.11: "If a decision of the Architect is made in writing and states that it is final but subject to appeal, no demand for arbitration of a claim, dispute or other matter covered by such decision may be made later than thirty days after the date on which the party making the demand received the decision. The failure to demand arbitration within said thirty days' period will result in the Architect's decision becoming final and binding upon the Owner and the Contractor. If the Architect renders a decision after arbitration proceedings have been initiated, such decision may be entered as evidence but will not supersede any arbitration proceedings unless the decision is acceptable to the parties concerned." (Emphasis added.) [6] NRS 38.045, subsections 1 and 2: "1. On application of a party showing an agreement described in NRS 38.035, and the opposing party's refusal to arbitrate, the court shall order the parties to proceed with arbitration, but if the opposing party denies the existence of the agreement to arbitrate, the court shall proceed summarily to the determination of the issue so raised and shall order arbitration if found for the moving party; otherwise, the application shall be denied. "2. On application, the court may stay an arbitration proceeding commenced or threatented on a showing that there is no agreement to arbitrate. Such an issue, when in substantial and bona fide dispute, shall be forthwith and summarily tried and the stay ordered if found for the moving party. If found for the opposing party, the court shall order the parties to proceed to arbitration." [7] Arizona has also adopted the Uniform Arbitation Act. See Ariz.Rev.Stat. 12-1501 (West Supp. 1975-1976). [8] Appellant Exber also complains that the district court did not address itself to (1) the question of whether filing a copy of the demand for arbitration with the architect was a condition precedent to arbitration or (2) whether failure to comply with the change order provisions of the contract was such a failure as to render the claim for extras unarbitrable. In accordance with the views expressed herein, we hold that these matters may be presented at the arbitration hearing. [9] See Lane-Tahoe, Inc. v. Kindred Constr. Co., 91 Nev. 385, 389, 536 P.2d 491, 493 (1975): "The whole tenor of the [Uniform Arbitration] Act favors arbitration when the parties have agreed to that method of settling disputes between them."
(Title Image: therecycler.com) Yesterday afternoon, AMs debated the “scathing” report from the Senedd’s Public Accounts Committee into IT services within the Welsh NHS (informatics)– a summary of which can be found here. Radical rethink required Chair of the Public Accounts Committee, Nick Ramsay AM (Con, Monmouth) pulled no punches. He described the report as “uncomfortable reading” and the Committee were seriously worried about the NHS’s inability to keep up with changes in technology, with around 1,000 fax machines still in use. “We do not see how this can be addressed without a radical rethink. In 2016, the total cost of developing and rolling out the new systems needed across all Welsh health boards was estimated at £484 million. But the committee could find little evidence of where the money would come from and whether it would be additional NHS funding or found within existing resources. The budget NWIS operates with is utilised predominately for keep the IT system going.” – Chair of the Public Accounts Committee, Nick Ramsay AM He told the chamber that digital transformation requires openness and transparency from the NHS informatics service (NWIS) but this hasn’t been forthcoming, with NWIS being overly optimistic in its reporting. Mohammad Asghar AM (Con, South Wales East) suggested there could be bigger problems lurking: “We had hoped that the pace of change would have increased since the auditor general’s report a year ago. However, this is not the case. In too many cases, the NHS still relies on outdated paper-based records. NWIS is frustrated at the lack of direction from the wider NHS, but we’ve found that the NHS still does not openly recognise the scale and the depth of the problem. This may be indicative of a wider potential problem, which may reveal further matters of concern that are not yet apparent.” – Mohammad Asghar AM Helen Mary Jones AM (Plaid, Mid & West Wales) returned to the lack of transparency and believe accounts of self-censorship and denial about the problems within NWIS was a “very, very serious charge”. There had to be a wholesale culture change and she welcomed a Welsh Government commitment to report back to the Committee every six months of progress made. A shared ambition The Welsh Government has accepted all of the Committee’s recommendations. The Health Minister, Vaughan Gething (Lab, Cardiff S. & Penarth), recognised concerns revolving around how quickly new IT systems were being delivered. He said an additional £50million will be invested in IT systems in the 2019-20 financial year. There have already been some improvements and innovation: “Our national systems allow professionals across health and care to access a single, up-to-date view of the patient’s care record and for images to be shared across Wales. The level of services is improved, time is saved and risk and cost reduced. Wales is one of the first countries to use a national test results service, meaning that test results are available where and when they’re needed, regardless of organisational boundaries.” – Health Minister, Vaughan Gething The Minister was pleased to confirm there’ve been no major issues with IT systems since September 2018 and investment in cybersecurity has been stepped up. A review of NHS informatics has been completed and is with the Welsh Government; the Minister said he’ll update AMs before Easter.
1. Introduction {#s0010} =============== Evidence based guidelines indicate school-aged youth should engage in ≥60 min of moderate-to-vigorous physical activity (MVPA) per day.[@bib0010], [@bib0015], [@bib0020], [@bib0025] Several government reports have underlined youth sport as a context through which children and adolescents may achieve these recommendations, advocating involvement in sport to encourage youth to lead more physically active lifestyles.[@bib0030], [@bib0035] Accordingly, the role of youth sport for preventing overweight and obesity amongst children and adolescents has also been argued.[@bib0030] However, recent studies have revealed that, whilst sport involvement may indeed offer a number of children and adolescents the opportunity to engage in substantial amounts of MVPA, participation in youth sport does not necessarily guarantee daily MVPA recommendations are met.[@bib0040], [@bib0045], [@bib0050] Moreover, research has demonstrated that 1 in 4 youth sport participants are overweight or obese, with 48% of obese youth report participation in sport.[@bib0055], [@bib0060], [@bib0065] Such findings point to the need to promote MVPA engagement even in this group of children and adolescents (i.e., youth sport participants) whom are traditionally thought to be amongst the most healthy and active in the population. In order to advance engagement in MVPA amongst children and adolescents active in the youth sport setting, we must first identify factors within this context that are related to habitual MVPA participation (i.e., daily MVPA). Self-determination theory (SDT)[@bib0070] and achievement goal theory (AGT)[@bib0075] are 2 contemporary theories of motivation successfully used to understand the correlates and determinants of behavioral outcomes (e.g., PA engagement) across diverse settings, including youth sport. Specifically, these theoretical frameworks have guided researchers in their attempts to understand the interaction between the PA environment and the motivational processes pertinent to PA engagement. 1.1. SDT {#s0015} -------- SDT considers the importance of variability in the reasons "why" individuals are motivated to engage in a particular behavior (e.g., sport, PA), and asserts that motivation can vary in the degree to which it is autonomous (i.e., more self-determined) or controlled (i.e., less self-determined),[@bib0070], [@bib0080] each holding different implications for cognitive, affective, and behavioral outcomes. Autonomous motivation refers to participation in a behavior for feelings of enjoyment and personal satisfaction that arise from participation in that activity (e.g., "I engage in sport because it is fun") and/or engagement to accomplish personally valued goals and outcomes (e.g., "I engage in sport because it is important to me"). Controlled motivation is thought to operate when a person\'s behavior is governed by external rewards, threats or punishment (e.g., "I play sport because I feel pressure from other people to play"), internal pressures and/or to enhance feelings of pride, and self-esteem (e.g., "I participate in sport because I would feel guilty if I did not").[@bib0085] SDT posits that where behavior is guided by autonomous motivation, more adaptive outcomes will likely ensue. In contrast, where controlled motivation is thought to be operating, deleterious consequences are frequently observed.[@bib0070], [@bib0090], [@bib0095] A central assumption of SDT is the notion that the social environment operating within a particular context is a prominent factor influencing motivational processes and related behavioral outcomes.[@bib0070] The social environment is also referred to as the "motivational climate", and is largely created by the interpersonal behaviors of significant others acting within contexts (e.g., teachers, coaches, parents, peers).[@bib0070], [@bib0080] Within the context of youth sport, the interpersonal behaviors of the coach are a prominent factor influencing the social environment[@bib0100] (i.e., the coach-created motivational climate). Studies conducted across youth PA settings have largely focused on the implications of an autonomy supportive climate for young people\'s motivation and associated emotional, cognitive and behavioral outcomes.[@bib0070], [@bib0100], [@bib0105], [@bib0110], [@bib0115], [@bib0120], [@bib0125] Autonomy support can be broadly conceptualised as providing a sense of choice and decision making, supporting self-initiative, considering individual perspectives, and providing a rationale to foster the consideration of personal relevance.[@bib0070] For example, an autonomy supportive youth sport coach would acknowledge athletes\' feelings and preferences, explain the rationale behind decisions made during training sessions and matches, and welcome players\' input into decision making.[@bib0100] More recently, SDT-informed studies have also begun to examine alternative features of the social environment in PA settings, including socially supportive interpersonal behaviors.[@bib0130] A socially supportive youth sport coach would ensure every athlete is cared for and feels valued both as a player and as a person.[@bib0100], [@bib0130] SDT posits that where the motivational climate created by significant others supports an individual\'s sense of autonomy and provides social support, more autonomous and less controlled motivation will be resulted.[@bib0070] In turn, more positive outcomes will likely follow (e.g., reduced stress and enhanced well-being).[@bib0070], [@bib0130] With regard to PA participation, research has reported perceptions of autonomy support and social support to hold positive implications for levels of PA engagement amongst youth.[@bib0105], [@bib0135], [@bib0140] 1.2. AGT {#s0020} -------- Whilst SDT considers a number of climate dimensions relevant to one\'s optimal functioning, alternative theories of motivation place emphasis on other aspects of the motivational climate not specifically considered within SDT. AGT[@bib0075] asserts 2 dimensions of the motivational climate to exist, centred on the degree to which motivational climates are task-involving (i.e., mastery focused) and ego-involving (i.e., centred on the demonstration of normative ability).[@bib0075], [@bib0145] Task-involving climates are considered to be more adaptive in nature, and refer to environments in which hard work, learning, skill development, and co-operation are valued.[@bib0130] Whilst relatively fewer studies have adopted an AGT lens to examine the relevance of the motivational climate for PA participation, the available data indicate perceptions of a task-involving motivational climate within physical education (PE) to be positively related to PA intentions amongst youth.[@bib0125], [@bib0130], [@bib0150] 1.3. Integrating SDT and AGT {#s0025} ---------------------------- Studies examining the relevance of the motivational climate created within a particular context (e.g., sport), for cognitive, affective and behavioral outcomes, have more recently begun to consider the empirical links between the fundamental concepts described by SDT and AGT.[@bib0130], [@bib0150], [@bib0155], [@bib0160] Specifically, this work has examined the value of simultaneously considering the climate dimensions offered by SDT and AGT, in order to understand the motivational processes underpinning optimal functioning within achievement related domains. The initiation of this theoretically integrated approach was primarily driven by research aiming to investigate the implications of both the SDT- and AGT-referenced features of the motivational climate for satisfaction of the "basic psychological needs",[@bib0080] and in turn, self-determined motivation.[@bib0155] Basic needs theory is a sub-theory of SDT which postulates conditions that support and individual\'s experience of competence (i.e., feeling efficacious), autonomy (i.e., a sense that behavior is guided by personal choice and volition) and relatedness (i.e., feeling connected to others) foster more self-determined motivation. Indeed, empirical studies have consistently demonstrated the satisfaction of these 3 "basic needs" is positively associated with autonomous motivation, and subsequently, more adaptive outcomes (e.g., enhanced, enjoyment, well-being, and performance).[@bib0095], [@bib0155], [@bib0165] Importantly, investigations seeking to integrate SDT and AGT have revealed that when considered in parallel, perceptions of autonomy supportive, socially supportive, and task involving climate dimensions vary in their relationships with the satisfaction of the basic psychological needs.[@bib0130], [@bib0160] Moreover, research demonstrates the climate dimensions proposed by SDT and AGT predict a unique amount of the variance in the basic psychological needs.[@bib0160] For example, Quested and Duda[@bib0160] reported that whilst dancers\' perceptions of a task-involving climate positively predicted satisfaction of all 3 psychological needs, the strongest association was observed for competence need satisfaction. Similarly, the strength of the relationship between dancer\'s perceptions of an autonomy supportive climate and autonomy and relatedness need satisfaction, was stronger than observed for a task-involving climate and autonomy and relatedness needs. As such, findings suggest each climate dimension is likely to hold distinct implications for self-determined motivation within any given context. Consequently, a fuller understanding of the potential impact of the motivational climate for self-determined motivation should emerge when the environmental factors emphasised in AGT and SDT are considered together (rather than taken into account in isolation from one another).[@bib0155], [@bib0160], [@bib0170] Recently, Duda[@bib0155] underlined the importance of jointly considering the dimensions of the motivational climate outlined by SDT and AGT, suggesting the motivational climate should be conceived as hierarchical and multidimensional in nature. Pulling from both theories of motivation, Duda[@bib0155] proposed the motivational climate could be more or less "empowering". Specifically, the lower order climate dimensions of autonomy support, social support, and task involvement are joined to represent a higher order "empowering" dimension. An empowering motivational climate would ensure that individuals feel cared for respected and connected to others, supports their sense of choice and personal volition, and encourages individuals to strive for, and achieve task-involved competence (e.g., emphasising goals such as increased effort and task mastery). Adopting this integrated conceptualisation of the motivational climate provides a useful framework through which the implications of the dimensions of the motivational climate proposed by SDT and AGT concurrently, with respect to the implications held for autonomous motivation, PA engagement, and other important outcomes could be examined. 1.4. SDT, AGT, and autonomous motivation for PA {#s0030} ----------------------------------------------- Studies to date have neglected to examine the consequences of empowering motivational climates for autonomous motivation and in turn, PA participation amongst youth. However, a cogent body of work has demonstrated empirical support for the hypothesised sequential associations with regard to the lower order dimension of autonomy support. Specifically, autonomy support (provided by the teacher) is reported to be positively related to more autonomous motivation towards PA, and in turn, higher levels of self-reported and pedometer assessed daily and leisure time PA engagement amongst youth.[@bib0115] Such associations have been coined as "trans-contextual" or described as "cross domain", and highlight the adaptive motivational processes through which autonomous motivation fostered by the motivational climate in one context (e.g., PE) may influence levels of PA engagement outside of that setting (e.g., leisure time or daily/habitual PA). SDT would postulate that the positive, trans-contextual association between autonomous motivation and PA engagement is likely to occur via enhanced enjoyment.[@bib0085], [@bib0175] Past research consistently reports a positive association to exist between autonomous motivation within the PE setting and enjoyment of PA.[@bib0110], [@bib0180], [@bib0185] Moreover, enjoyment of PA (in general and during PE) is demonstrated to be a key determinant of levels of daily and leisure time PA engagement amongst youth,[@bib0110], [@bib0190], [@bib0195], [@bib0200] with studies demonstrating autonomous motivation to be positively associated with PA engagement via the experience of enhanced enjoyment.[@bib0110] For example, Cox et al.[@bib0110] reported autonomous motivation in PE to be positively related to students\' enjoyment of PE, which in turn was related to self-reported MVPA engagement during leisure time. Certainly, where an individual enjoys participating in PA within a particular setting, this is likely to encourage the transfer of this behavior beyond this environment. However, the role of enjoyment in the trans-contextual association between autonomous motivation and PA engagement has not been explored beyond the PE context. Studies are also yet to investigate these sequential associations to include a consideration of the motivational climate as an antecedent to autonomous motivation, enjoyment and ensuing PA participation. Indeed, extant studies have only investigated the implications of the motivational climate for autonomous motivation and subsequent enjoyment amongst youth, neglecting to examine successive associations with levels of PA participation.[@bib0095], [@bib0110] Still, results from these studies have revealed the lower order climate dimensions of autonomy support and task involvement to be positively associated with PA related enjoyment, via promotion of more autonomous motivation.[@bib0095], [@bib0205], [@bib0210] Such findings further demonstrate the conceptual links between AGT and SDT with regard to the implications of the motivational climate for optimal functioning, and point to the value of integrating AGT and SDT when studying the motivational processes underpinning PA engagement amongst youth. A further overarching drawback of research seeking to examine the motivational processes underlying levels PA engagement amongst youth is a reliance on pedometers and self-report methods to assess PA participation.[@bib0115] The bias introduced by self-report and the inability of pedometers to determine intensity and duration of PA engagement, mean the implications of the motivational climate and associated motivational processes for participation in health enhancing PA (i.e., MVPA) are not well identified. Moreover, studies to date have been unable to determine the degree to which variability in MVPA, attributable to the motivational climate created within a particular setting, may hold meaningful implications for important health outcomes (e.g., well-being, adiposity). Indeed, if youth PA settings are considered to be effective avenues for obesity prevention,[@bib0030] research is required which seeks to elucidate factors within targeted PA contexts that may encourage MVPA engagement towards levels that may hold benefit for adiposity. Thus, studies which investigate whether motivational climate dimensions and associated psychological processes posited to underlie optimal functioning, are linked to variability in MVPA, and in turn, adiposity are warranted (i.e., the motivational climate → autonomous/controlled motivation → enjoyment → MVPA → adiposity). Results from such studies will inform the optimal design of youth PA contexts for promoting MVPA to the extent it may contribute to the prevention of overweight and obesity amongst youth. 1.5. The present study {#s0035} ---------------------- The primary aim of the present study was therefore to examine the implications of an empowering coach-created climate and ensuing motivational processes (i.e., autonomous and controlled motivation, enjoyment), for MVPA engagement and obesity related health, amongst males and females active in the youth sport context. Specifically, we sought to test the motivational sequence presented in [Fig. 1](#f0010){ref-type="fig"}, in which children\'s perceptions of an empowering coach-created motivational climate were related to autonomous and controlled motivation, which in turn predicts sport-related enjoyment. Finally, enjoyment is assumed to predict accelerometer assessed daily MVPA and adiposity. We hypothesised that a more empowering social environment would be related to higher levels of MVPA, which in turn, would be associated with lower levels of adiposity, via positive associations with autonomous motivation and enjoyment, and a negative association with controlled motivation ([Fig. 1](#f0010){ref-type="fig"}).Fig. 1The hierarchical and multidimensional conceptualisation of an empowering social environment: hypothesised associations with SDT referenced motivational processes, daily MVPA engagement, and adiposity status. Signs (+/−) indicate the direction of hypothesised associations. Lower order dimensions are modelled here for illustrative purposes. Only the higher order variable of perceptions of an empowering motivational climate was included in the hypothesised model. BF% = percent body fat; MVPA =  moderate-to-vigorous physical activity; SDT = self-determination theory.Fig. 1 2. Methods {#s0040} ========== 2.1. Recruitment {#s0045} ---------------- Male and female youth sport participants were recruited from football, netball, and hockey teams. Lead coaches (*n* = 149) at youth sport clubs were contacted by a member of the research team via phone call and/or email. Coaches interested in participating in the project (*n* = 47/149, 32%) were provided with study information which was passed on to parents and players. Following this, researchers visited training sessions in order to introduce the study, and willing participants and parents completed assent and consent forms, respectively. 2.2. Participants and protocol {#s0050} ------------------------------ Youth sport footballers were a subsample of English participants recruited to the Promoting Adolescent Physical Activity (PAPA) project (teams, *n* = 38; players, *n* = 149).[@bib0155] In addition to participating in the core PAPA protocol, these players also wore an accelerometer for 7 days and undertook measurements of body composition. Following completion of the PAPA project, additional female participants were recruited from netball and hockey teams in England (teams, *n* = 9; players, *n* = 57), in order to enable exploration of our primary research question as related to a more heterogeneous population of youth sport participants. All participants were aged between 9 and 16 years (age: 12.07 ± 2.58 years, mean ± SD) and were regularly participating (i.e., ≥1 session/week) in their respective sport at the grassroots level (i.e., players were not playing for/training with national, international, or professional teams). Data collection was carried out at least 6 weeks into the season in order to allow time for the coach-created motivational climate to be established. Study procedures were conducted by trained researchers during 2 youth sport sessions, 1 week apart. During the first visit, accelerometers and wear time log sheets were distributed to participants, and measurements of height, weight, and body composition were recorded. The second visit involved participants completing multi-section questionnaires examining the targeted psychological variables, and collection of accelerometers and wear time logs. The study was approved by West Midlands National Health Service Research Ethics Committee (No. 10/H1207/39). 2.3. Objective measures {#s0055} ----------------------- ### 2.3.1. Anthropometrics {#s0060} Height, weight, and body composition were measured at the start of training sessions where possible to reduce potential errors in measurement resulting from prior strenuous exercise, dehydration and over-drinking (i.e., to compensate for water lost during training sessions). Participants were barefoot and wearing light clothing (e.g., shorts and a T-shirt). Height was measured using a portable stadiometer (Leicester height measure; TANITA Europe, Amsterdam, The Netherlands) to the nearest 0.1 cm. Weight was assessed using bioelectrical impedance scales (Tanita SC330P; TANITA Europe) to the nearest 0.1 kg. Measurements were recorded in duplicate and average values calculated. Where the first 2 measures differed by more than 0.4 cm or 0.5 kg, a third measure was recorded and the average of the 2 closest values determined. Body composition was assessed using foot-to-foot bioelectrical impedance analysis (BIA) following entry of the participant\'s height and weight into the bioelectrical impedance scales. Percent body fat (BF%) was the outcome variable of interest in the present study. Body mass index (BMI, kg/m^2^) was also calculated for descriptive purposes. ### 2.3.2. MVPA {#s0065} MVPA was assessed using the ActiGraph GT3X accelerometer (ActiGraph, Pensacola, FL, USA). Accelerometers were initialised to measure PA in 15 s epochs. Verbal and written instructions were given by the researcher regarding how the accelerometer should be worn and a demonstration given. Participants were asked to wear accelerometer on the right hip for 7 days during all waking hours. Directions were given to remove the accelerometer only for showering/bathing or participation in water-based activities (e.g., swimming). 2.4. Social psychological measures {#s0070} ---------------------------------- ### 2.4.1. Perceptions of the coach-created motivational climate {#s0075} Participants\' perceptions of coach-created empowering youth sport environments were assessed using the Empowering and Disempowering Motivational Climate Questionnaire-Coach (EDMCQ-C).[@bib0170] The EDMCQ-C has been validated in the case of 2273 children and adolescents from sports teams in England and Wales.[@bib0170] Following the stem "So far this season...", players responded to 17 items assessing their perception of the coach-created motivational climate as autonomy supportive (5 items, e.g., "The coach encourages players to ask questions"), task involving (9 items, e.g., "My coach encourages players to try new skills"), and socially supportive (3 items, e.g., "My coach could really be counted on to care, no matter what happened"). Players responded to items on a 5-point scale (i.e., 1 = *strongly disagree*, 5 = *strongly agree*). ### 2.4.2. Motivation regulations {#s0080} Autonomous and controlled motivation towards sport participation were measured using the Behavioural Regulation in Sport Questionnaire (BRSQ) adapted for use with each specific sport.[@bib0215] Eight items each were used to assess autonomous motivation (e.g., "Because it teaches me self-discipline") and controlled motivation (e.g., "Because I would feel guilty if I did not, because people push me to play"). Following the stem "I participate in football/netball/hockey..." players were asked to rate their agreement with items on a 5-point scale (i.e., 1 = *not true at all*, 5 = *very true*). ### 2.4.3. Enjoyment {#s0085} The 4-item interest/enjoyment subscale of the Intrinsic Motivation Inventory (IMI)[@bib0220] was used to assess participants\' sport related enjoyment. Players rated the degree to which they had enjoyed their sport participation in the last 3--4 weeks via their responses to 4 items (e.g., "I found this sport interesting") on a 5-point scale (i.e., 1 = *strongly disagree*, 5 = *strongly agree*). Both the BRSQ and the enjoyment/interest subscale of the IMI have been validated for use with samples of youth sport participants.[@bib0225] 2.5. Data processing {#s0090} -------------------- Data were downloaded from the GT3X to a computer and analysed using the ActiLife software (Version 6.2; ActiGraph). Accelerometer data were checked for spurious values and periods of non-wear (\>30 min of consecutive zeros, allowing for 1 min of counts \<100[@bib0230]). Participants were excluded from analysis where they failed to meet minimum wear criteria for valid PA data (i.e., wear time, ≥8 h on ≥4 days, including a weekend day, *n* = 37),[@bib0230] or were missing ≥2 item responses per questionnaire subscale (*n* = 43). Where participants were missing = 1 item score per subscale (i.e., missing data ≤ 3%), missing data were computed using the expectation maximisation method in SPSS (Version 21.0; IBM Corp., Armonk, NY, USA). Time restrictions placed upon researchers at training sessions resulted in exclusion of a further participants (*n* = 14) due to missing body composition assessments. One-way analysis of variance (ANOVA) revealed excluded participants did not differ from those included in terms of age, height, weight, BMI, and BF% (all *p* ≥ 0.19). *χ*^2^ analysis demonstrated the males were more likely to be excluded from analysis on the basis of missing data than females (*χ*^2^(1) = 11.85, *p* ≥ 0.01). Following data reduction procedures, the final sample consisted of 112 youth sport participants (male, *n* = 70; female, *n* = 42; protocol compliance = 54.37%; teams, *n* = 47). For these participants, mean scores for targeted social psychological measures were computed from questionnaire responses, and average daily MVPA (min/day at ≥2296 counts/min) calculated (total MVPA/number of valid days).[@bib0235] 2.6. Statistical analysis {#s0095} ------------------------- Preliminary statistical analyses were conducted using SPSS (Version 21.0). Descriptive statistics were calculated and Pearson\'s correlations were computed to examine bivariate relationships between all measured variables. One-way ANOVA was conducted to determine significant differences between males and females for all variables included in the hypothesised model. Path analysis with maximum likelihood estimation was employed in conjunction with the bootstrapping procedure to test the hypothesised model using AMOS (SPSS AMOS Version 21.0; IBM Corp.) ([Fig. 1](#f0010){ref-type="fig"}). Bootstrapping is a nonparametric resampling procedure that does not impose the assumption of normality of the sampling distribution and is appropriate for use with small sample sizes.[@bib0240] Bootstrap-generated 95% bias corrected confidence intervals (CIs) were constructed for 5000 samples on the hypothesised model.[@bib0240] Model fit was evaluated using the *χ*^2^ statistic, comparative fit index (*CFI*), incremental fit indices (*IFI*), standardised root mean square residual (*SRMR*), and root square mean error of approximation (*RMSEA*) in the present study.[@bib0245] The *CFI* was used to assess model fit in this study due to the sample size available for analyses. Specifically, the *CFI* displays restricted random variation under various sample size conditions, relative to other incremental fit indices.[@bib0250] A non-significant *χ*^2^ (*p* ≤ 0.05), a *CFI* and *IFI*, \>0.95 and \>0.90 indicate good and adequate fit of the model to the data, respectively.[@bib0255], [@bib0260], [@bib0265] For the *RMSEA*, values below 0.05 would suggest a very good fit, and those below 0.10 would indicate a reasonable fit between model and data.[@bib0260], [@bib0270] Examination of the *p* of close fit (PCLOSE) statistic in conjunction with the *RMSEA* and the 90%CI allows comparison of the null hypothesis with the alternative hypothesis. Where the PCLOSE statistics is \>0.05, the null hypothesis cannot be rejected. Thus, the specified model is considered to have a close fit to the data.[@bib0260] In a well-fitting model, the lower value of the 90%CI for the *RMSEA* includes or is very near to 0, where the upper value is less than 0.08.[@bib0260] Where the value for *RMSEA* exceeds the lower bound of the 90%CI, the model is considered to have poor fit. A cutoff of \<0.10 and \<0.08 for the *SRMR* specify good and acceptable fit, respectively.[@bib0260], [@bib0275] This combination of fit indices and cut-off criteria were used in the present study to provide a balanced approach to testing model fit. It is emphasised that the cut-off criteria selected should be considered as guidelines, rather than golden rules.[@bib0280] Accordingly, the strength and direction of path coefficients were also considered in assessing the validity of the models.[@bib0280] Path coefficients corresponding to (*β*) 0.1, 0.3, and 0.5 were interpreted as small, medium, and large effect sizes, respectively. Squared multiple correlations (*R*^2^) were interpreted to determine the variance in MVPA (min/day) and adiposity which could be explained by the hypothesised model.[@bib0285] The phantom model approach was used to examine the presence of specific indirect effects.[@bib0290] Specifically, the size of the effect of each variable included in the model, on daily MVPA and adiposity, via the downstream-hypothesised motivational processes (i.e., the indirect effects) were examined. The significance of indirect effects was determined via examination of the bootstrap bias-corrected 95%CI. 3. Results {#s0100} ========== [Table 1](#t0010){ref-type="table"} reports descriptive statistics for all participants stratified by sex. The final sample was 78% Caucasian (Asian = 8%, Black = 8%, multi-ethnicity = 3%, missing = 3%). Mean scale scores for psychosocial variables indicated that in general, participants perceived high levels of coach-created empowering climates. In addition, participants reported high levels of autonomous motivation and enjoyment, and moderate levels of controlled motivation. One-way ANOVAs revealed significant differences between males and females for perceptions of an empowering coach-created motivational climate, controlled motivation, and also for daily MVPA and BF% (*p* \< 0.05). Specifically, males perceived the motivational climate to be less empowering (*F*(1, 110) = 5.91, *p* \< 0.05), reported higher levels of controlled motivation (*F*(1, 110) = 12.37, *p* \< 0.01), engaged in higher levels of MVPA (*F*(1, 106) = 76.87, *p* \< 0.01), and had lower BF% (*F*(1, 106) = 62.45, *p* \< 0.01), relative to females.Table 1Descriptive statistics for all participants stratified by sex (mean ± SD).Table 1Total (*n* = 112)Male (*n* = 70)Female (*n* = 42)**Physical characteristics**Age (year)12.07 ± 1.5811.67 ± 1.5212.74 ± 1.45Height (m)1.56 ± 0.121.54 ± 0.131.60 ± 0.08Weight (kg)47.53 ± 12.2645.15 ± 13.0051.49 ± 9.85BMI (kg/m^2^)19.17 ± 2.9318.73 ± 3.0819.90 ± 2.54BF%17.72 ± 6.2314.83 ± 4.71[\*\*](#tn0010){ref-type="fn"}22.53 ± 5.43**Psychosocial variables**Empowering climate4.18 ± 0.464.10 ± 0.46[\*](#tn0010){ref-type="table-fn"}4.31 ± 0.43Autonomous motivation4.39 ± 0.454.42 ± 0.454.33 ± 0.45Controlled motivation2.26 ± 0.892.53 ± 0.80[\*\*](#tn0010){ref-type="fn"}1.80 ± 0.78Enjoyment4.55 ± 0.484.61 ± 0.464.44 ± 0.51**Physical activity**Daily MVPA (min/day)64.48 ± 22.1975.45 ± 19.48[\*\*](#tn0010){ref-type="fn"}46.19 ± 12.06Valid day6.19 ± 1.036.19 ± 1.076.19 ± 0.97Valid hour (h/day)12.95 ± 0.9312.83 ± 0.7613.13 ± 1.14[^1][^2] 3.1. Pearson correlations {#s0105} ------------------------- Bivariate correlations are described in [Table 2](#t0015){ref-type="table"}. Analyses demonstrated participants\' perceptions of an empowering motivational climate to be significantly and positively associated with players\' autonomous motivation and sport-related enjoyment. Conversely, athletes\' perceptions of empowering climates were negatively related to their degree of controlled motivation. Autonomous motivation was also significantly and positively associated with sport-related enjoyment and daily MVPA. Controlled motivation was significantly positively correlated with daily MVPA, and significantly negatively related to BF%. Enjoyment demonstrated a significant and positive relationship with daily MVPA engagement. Finally, daily MVPA was significantly negatively associated with BF% and age, and age was significantly positively correlated with accelerometer wear time.Table 2Reliability analysis and bivariate correlations amongst variables included in the hypothesised model.Table 2Cronbach\'s *α*12345671. Empowering climate0.87---2. Autonomous motivation0.740.51[\*\*](#tn0020){ref-type="table-fn"}---3. Controlled motivation0.87−0.32[\*\*](#tn0020){ref-type="table-fn"}−0.18---4. Enjoyment0.800.36[\*\*](#tn0020){ref-type="table-fn"}0.62[\*\*](#tn0020){ref-type="table-fn"}−0.16---5. MVPA−0.090.19[\*](#tn0015){ref-type="table-fn"}0.29[\*\*](#tn0020){ref-type="table-fn"}0.30[\*\*](#tn0020){ref-type="table-fn"}---6. BF%0.09−0.08−0.23[\*](#tn0015){ref-type="table-fn"}−0.15−0.53[\*\*](#tn0020){ref-type="table-fn"}---7. Age−0.09−0.07−0.12−0.16−0.24[\*\*](#tn0020){ref-type="table-fn"}0.17---8. Accelerometer wear time0.100.03−0.150.02−0.15−0.020.25[\*\*](#tn0020){ref-type="table-fn"}[^3][^4][^5] 3.2. Path analyses {#s0110} ------------------ With specific reference to [Fig. 2](#f0015){ref-type="fig"}, the hypothesised model was first tested (i.e., model only adjusted for age, paths 1^a^--1^g^). Results revealed the hypothesised model demonstrated an adequate fit to the data (*χ*^2^(14) = 26.16, *p* = 0.03, *CFI* = 0.92, *IFI* = 0.93, *SRMR* = 0.10, *RMSEA* ≤ 0.09 (90%CI: 0.03--0.14, PCLOSE = 0.11) ([Fig. 2](#f0015){ref-type="fig"}). Perceptions of an empowering motivational climate were positively associated with players\' autonomous motivation towards their sport participation, and negatively related to controlled motivation. In turn, autonomous motivation positively predicted sport-related enjoyment, which was positively associated with daily MVPA (min/day). Variability in participants\' daily MVPA was also negatively associated with BF%. Controlled motivation towards sport was not associated with players\' reported enjoyment of their sport involvement. Squared multiple correlations revealed the model (including adjustment for age) account for 26% of the variance in daily MVPA (motivational processes = 19.3%, age = 6.7%) and 27.6% of the variance in adiposity (motivational processes and daily MVPA = 24.7%, age = 2.9%).Fig. 2Data fit to the hypothesised model. Results are reported for the hypothesised model adjusted for the significant associations between age and daily MVPA (1^a^--1^g^) as reported in previous youth sport research.[@bib0120] Values reported represent path coefficients (*β*). Yhe Dashed line indicates a non-significant relationship 1^d^). Dotted lines represent additional paths tested after adjustment for gender (2^a^--2^c^). \**p* \< 0.05, \*\**p* \< 0.01. BF% = percent body fat; MVPA = moderate-to-vigorous physical activity.Fig. 2 A second exploratory model was tested in order to examine whether the sequential associations reported may vary as a result of gender differences revealed in the present sample. This involved modelling gender as an observed variable, adding direct paths to all endogenous variables included in the model for which between-gender differences were revealed (i.e., controlled motivation, daily MVPA, and BF%, paths 2^a^--2^c^, [Fig. 2](#f0015){ref-type="fig"}). As with logistical regression analysis, males and females were considered nominal data (i.e., 1 male, 2 females). Individual path coefficients were then re-examined to determine whether the inclusion of gender would significantly impact upon the relationships reported. Results revealed that following adjustment for gender, all associations within the model remained significant and in the same direction. Significant negative associations were observed between gender and controlled motivation (*β* = −0.37, *p* ≤ 0.01) and gender and daily MVPA (*β* = −0.58, *p* ≤ 0.01). A significant positive association was demonstrated for gender and BF% (*β* = 0.46, *p* ≤ 0.01). Examination of squared multiple correlations indicated that the fully adjusted model (adjusted for age and gender) accounted for 45.5% of the variance in daily MVPA, and 39.6% of the variance in adiposity. Age and gender together accounted for 41.3% of the variance in daily MVPA (age = 6.7%, gender = 34.6%), with the unique variance explained by the hypothesised motivational processes observed as 4.1%. For adiposity, age and gender accounted for 36.3% of the variance (age = 2.9%, gender = 33.4%), with psychosocial predictors and MVPA together explaining 3.4% of the variance in this outcome. 3.3. Indirect effects {#s0115} --------------------- The indirect effects and bootstrap bias-corrected 95%CI are reported in [Table 3](#t0020){ref-type="table"}. Results are presented as per the model adjusted for both age and gender. This is to ensure that variability in daily MVPA and adiposity which may be attributable to these demographic factors is accounted for in the analyses. That is, this approach ensured the size of the associations with regard to the indirect effect(s) of the motivational climate, autonomous motivation, and enjoyment, on daily MVPA and adiposity, are not overestimated.Table 3Factor estimates of specific indirect effects following adjustment for gender.Table 3Factor*β*Bootstrap bias-corrected 95%CI (lower, upper)Empowering→enjoyment[b](#tn0030){ref-type="table-fn"}0.32[a](#tn0025){ref-type="table-fn"}0.19, 0.47Empowering→MVPA[b](#tn0030){ref-type="table-fn"}3.11[a](#tn0025){ref-type="table-fn"}0.79, 6.30Empowering→BF%[b](#tn0030){ref-type="table-fn"}−0.19[a](#tn0025){ref-type="table-fn"}−0.47, −0.05Empowering→enjoyment[c](#tn0035){ref-type="table-fn"}0.01−0.02, 0.05Empowering→MVPA[c](#tn0035){ref-type="table-fn"}0.12−0.15, 0.66Empowering→BF%[c](#tn0035){ref-type="table-fn"}−0.01−0.06, 0.01Autonomous motivation→MVPA6.23[a](#tn0025){ref-type="table-fn"}1.49, 11.69Autonomous motivation→BF%−0.49[a](#tn0025){ref-type="table-fn"}−0.91, −0.08Controlled motivation→MVPA−0.28−1.31, 0.42Controlled motivation→BF%0.02−0.02, 0.10Enjoyment→BF%−0.59[a](#tn0025){ref-type="table-fn"}−1.35, −0.12[^6][^7][^8][^9][^10] Results demonstrated perceptions of an empowering motivational climate to have a significant positive indirect effect on enjoyment, via autonomous motivation. A significant positive effect for perceptions of an empowering climate on daily MVPA, via autonomous motivation and enjoyment, was also observed. Perceptions of an empowering climate were also significantly and negatively related to BF%, via autonomous motivation, enjoyment, and daily MVPA. Analyses also revealed a significant positive indirect effect for autonomous motivation on daily MVPA via enjoyment, which then corresponded to a significant negative indirect effect on BF%. Finally, results revealed enjoyment to have a significant and negative indirect effect on BF% via daily MVPA. No significant indirect effects were observed for controlled motivation ([Table 3](#t0020){ref-type="table"}). 4. Discussion {#s0120} ============= Framed by Duda\'s[@bib0155] integrated approach to examining the motivational climate, the present study examined the motivational processes undergirding the association between perceptions of an empowering coach-created motivational climate and daily MVPA amongst male and female youth sport participants. Moreover, the current research aimed to examine the extent to which motivation (i.e., their level of autonomous and controlled motivation) and related enjoyment, were associated with adiposity status amongst this cohort. Results supported the theoretical propositions,[@bib0070], [@bib0075], [@bib0155] and revealed perceptions of an empowering motivational climate to be positively related to autonomous motivation, and in turn, participants\' sport related enjoyment. Findings also revealed enjoyment to have a negative indirect effect on players\' adiposity via the successive positive association with daily MVPA, which was also apparent after adjusting for gender related variability in MVPA and adiposity. Current public health recommendations suggest participation in youth sport represents an avenue through which the escalating obesity epidemic may be addressed.[@bib0030] However, with recent studies indicating that participation in youth sport is unlikely to guarantee MVPA guidelines are met,[@bib0040], [@bib0045] efforts to promote PA amongst children and adolescents active in this context are warranted. That is, if youth sport is considered to be a prominent setting for obesity prevention, it is not enough to assume participation alone will provide youth with sufficient MVPA to accrue benefits to health. Rather, there is a necessity to identify avenues through which this context can be further optimised for PA promotion towards levels likely to hold benefit for health. The present findings point to the relevance of the coach-created motivational climate in this regard, suggesting the creation of more empowering youth sport environments may hold implications for advancing habitual levels of MVPA engagement, and in turn, may be associated with the prevention of excess adiposity amongst children and adolescents active in this context. Namely, the extent to which the motivational climate is perceived as empowering may result in varied levels of engagement in MVPA and associated health consequences (e.g., adiposity) for those youth who participate. Results of the current study are in line with those of past research documenting the trans-context associations between autonomous motivation fostered in the PE setting and engagement in leisure time MVPA.[@bib0120], [@bib0295] Moreover, results support those of recent work demonstrating facets of an empowering motivational climate in the youth sport setting to be related to daily engagement in MVPA via autonomous motivation in sport.[@bib0120] Fenton et al.[@bib0120] revealed perceptions of an autonomy supportive coach-created motivational climate (which is one key facet of an empowering climate) to be positively related to autonomous motivation, and in turn, daily MVPA amongst youth sport footballers aged 9--16 years. The adoption of Duda\'s[@bib0155] hierarchical and multidimensional approach in the current study builds upon the findings of Fenton et al.[@bib0120] Specifically, demonstrating that perceptions of an empowering motivational climate (encompassing autonomy support, social support, and task involving dimensions) is relevant for levels of daily MVPA engagement amongst youth sport participants. Present results inform us that where youth sport coaches create an environment which champions effort and personal improvement, provides players with choices and options, and makes all players feel valued as individuals, more autonomous motivation may likely ensue. In turn, when one\'s sport participation is guided by the experience of fun, pleasure, and personal importance, athletes are more likely to enjoy their sport involvement and subsequently, demonstrate higher habitual MVPA engagement. Adding a further novel contribution to the literature, our results demonstrate autonomous motivation is positively related to accelerometer assessed daily MVPA amongst youth, via a positive association with sport-related enjoyment. Importantly, this relationship was observed independent of players\' experience of controlled motivation. Findings therefore suggest that emphasising autonomous motives for participation in sport are likely central to facilitating adaptive motivational processes (i.e., the experience of enjoyment) and related engagement in health enhancing PA. Moreover, the sequential associations observed between autonomous motivation, enjoyment, daily MVPA, and adiposity, were still present following adjustment for gender related differences in the targeted variables. As such, results further highlight the adaptive features of the motivational climate and associated motivational processes to be particularly salient when considering factors pertinent to PA engagement and associated health amongst both males and females active in the youth sport setting. Indeed, present results are consistent with past SDT and AGT grounded work, whereby perceptions of autonomy supportive and task involving motivational climates are linked to the experience of enjoyment in PA and sport contexts, via the promotion of more autonomous motivation.[@bib0095], [@bib0205], [@bib0210] The lack of an association between controlled motivation and daily MVPA at the multivariate level (i.e., via enjoyment) is in line with findings from previous studies that have examined this relationship amongst children and adolescents.[@bib0120], [@bib0295] Coupled with present findings, results suggest that there may be no immediate consequences of sport-related controlled motivation for a child\'s daily MVPA engagement. However, the longer term implications of this motivation regulation for MVPA behavior and associated health, are yet to be explored. Indeed, longitudinal studies have reported controlled motivation to be positively related to drop out amongst sport participants.[@bib0300] Given that maintained participation in youth sport during childhood is associated with higher levels of PA engagement and reduced risk of poor health during adulthood,[@bib0305], [@bib0310] minimising controlled motives for participation in youth sport may therefore still be of paramount importance when considering PA and health trajectories throughout the life course. Importantly, the higher levels of controlled motivation amongst boys in the present study suggest this may be particularly relevant to male youth. To our knowledge, the present study is the first to examine the extent to which variability in accelerometer assessed daily MVPA predicted by the SDT-referenced motivational processes operating within the youth sport setting, is associated with objectively assessed body composition (i.e., adiposity) amongst youth. Results demonstrated perceptions of an empowering social environment, autonomous motivation and enjoyment accounted for 4.1% of the variance in daily MVPA. In turn, these factors negatively predicted BF%. Translating this into quantifiable health benefit, results demonstrated that an increase in self-reported enjoyment of sport by one on the intrinsic motivation inventory (e.g., a participant changing their response to statements ("I had fun whilst playing football..."), from "*agree*" to "*strongly agree*", or from "*disagree*" to "*neutral*") would equate to approximately 12 min more MVPA per day. Analysis of indirect effects indicated that in turn, this degree of variability would correspond to 1.2% lower body fat amongst males and females in the present sample. This negative association is promising when we consider that youth PA interventions to date have largely reported limited success with regard to reducing overweight and obesity amongst youth.[@bib0315] Indeed, current findings demonstrate that a child\'s sport related enjoyment (fostered by perceptions of an empowering motivational climate), may be an important psychosocial factor influencing variability in engagement in MVPA to the extent that it may contribute towards the prevention of excess adiposity and maintenance of a healthy weight amongst youth. Still, it is important to note that the hypothesised model examined currently only accounted for 3.4% of the variance in adiposity (after adjustment for age and gender). Thus, adopting a more comprehensive approach towards identifying and targeting other modifiable contributors towards engagement in PA, both at the individual and policy level, is paramount. That is, whilst this is the first study to underscore the significance of the motivational climate for MVPA and associated adiposity amongst youth, it is important to acknowledge that the social environment created by the coach is only 1 factor to consider when developing strategies to promote healthful levels of MVPA engagement in children and adolescents. The present research addressed a number of limitations to previous work, namely, the application of accelerometers and bioelectrical impedance to assess MVPA and body composition within the context of SDT. This multidisciplinary study therefore enabled investigation of the relevance of empowering motivational climates for MVPA and obesity related health amongst youth sport participants. Moreover, past work examining the bivariate associations between daily MVPA and adiposity in youth sport participants has relied on using BMI as a proxy for weight status.[@bib0055], [@bib0120], [@bib0320] Research has questioned the value of using BMI to assess adiposity amongst this cohort, due to its inability to distinguish between muscle and fat.[@bib0055] Thus, the use of bioelectrical impendence to estimate adiposity in the present research may constitute a more valid exploration of the direction and strength of the association between MVPA and weight status in youth sport participants. Whilst this study has number of noteworthy strengths, it is not without its limitations. First, the cross-sectional nature of the research means that we cannot infer the causal direction of the reported associations. Still, there is a cogent body of SDT driven work which supports the direction of the relationships as explored presently. For example, experimental studies have shown that the creation of more autonomy supportive social environments and enhanced autonomous motivation are related to higher levels of MVPA during PE.[@bib0325] A further limitation to the current work is homogeneity of the sample with regard to the sport examined, particularly for males. Findings can therefore not be generalised across the broad spectrum of children who participate in grassroots sport. The study methodology also precludes examination of other pertinent factors which may have impacted upon the targeted motivational processes examined, and in turn, levels of MVPA engagement. For example, the peer-created motivational climate created within youth sport has been reported to hold implications for levels of autonomous motivation amongst sport participants.[@bib0330] Similarly, biological and environmental variables likely to impact directly upon MVPA engagement and adiposity (e.g., fitness, dietary behaviors) could not be adjusted for in analyses. The ability to adequately control for all factors likely to affect primary outcomes is an inherent difficulty associated with field-based research. Still, the results of the present study serve to act as a useful starting point towards which to focus subsequent work seeking to determine the salience of the motivational climate for levels of MVPA engagement and associated health amongst youth. Finally, whilst it would have also been of interest to conduct invariance testing to examine the tenability of the motivational processes across genders, the final sample size prohibited such analyses. In addition, we were unable to conduct a full measurement model to account for measurement error with regard to the psychosocial variables examined. However, the measures utilised presently have been validated for use amongst youth sport participants.[@bib0170], [@bib0225] We also acknowledge that sample size restrictions did not enable investigation of role of the basic psychological needs with respect to the motivational processes examined. Still, evidence of the relationships between the climate dimensions proposed by SDT and AGT, basic psychological need satisfaction, and subsequently, autonomous motivation is reported consistently within the literature. A reduced sample size may also hold implications for model fit as reported herein. Specifically, data fit to the hypothesised model may have been improved slightly with a larger sample size. For example, it is well regarded that a smaller sample size may result in an inflated *RMSEA* value due to increased probability of sampling error.[@bib0335] As a result, the *RMSEA* is reported to over-reject true-population models at small sample sizes.[@bib0245], [@bib0335] We also point out that the whilst the model fit criteria applied in this study is consistent with that used across the literature, emphasis has been placed on the need for researchers to employ their own subjective interpretations in conjunction with statistical measures when reaching decisions regarding model fit. That is, whilst recommended cut-offs offer a useful guideline, they do not necessarily reflect the plausibility of a model and should be interpreted with caution, rather than being considered as "golden rules".[@bib0255], [@bib0280], [@bib0335] 5. Conclusion {#s0125} ============= The conceptualisation of the motivational climate as hierarchical and multidimensional, with the inclusion of both SDT and AGT proffered autonomy supportive, socially supportive and task involving aspects of coach behavior (in this case, empowering[@bib0155]), may offer a useful approach towards examining the implications of motivational climate for PA engagement amongst youth. Current findings are the first to elucidate the implications of an empowering coach-created motivational climate for daily MVPA engagement and associated adiposity amongst males and females active in the youth sport context. Results indicate that the creation of more empowering youth sport environments and associated adaptive motivational processes, may hold value for advancing habitual levels of engagement in MVPA, and may also be relevant towards preventing excess adiposity amongst children and adolescents active in this setting. Findings may contribute towards informing the optimal design of youth sport settings for MVPA promotion and associated healthy weight maintenance amongst children and adolescents active in this context. Authors\' contributions {#s0130} ======================= JLD is the principle investigator on the RCT referred to in the manuscript (the PAPA study) and revised the manuscript; SAMF led the structuring and writing of the manuscript and organised the data collection; PRA and TGB were involved in the design of the study and manuscript revision throughout the writing process. All authors have read and approved the final version of the manuscript, and agree with the order of presentation of the authors. Competing interests {#s0135} =================== The authors declare that they have no competing interests. The authors would like to thank all of the coaches and players who gave their time to participate in this study. In addition, the authors would like to thank the members of the PAPA team who contributed to the conception and design of the PAPA protocol. This work was supported by the European Commission under the Seventh Framework Programme---Health (No. 223600) as part of the PAPA project ([www.projectpapa.org](http://www.projectpapa.org){#iw0010}). The work of Sally Fenton was supported by the Centre for Obesity Research (COR) at the University of Birmingham. Peer review under responsibility of Shanghai University of Sport. [^1]: Abbreviations: BF% = percent body fat; BMI = body mass index; MVPA =  moderate-to-vigorous physical activity. [^2]: *p* \< 0.05, \*\**p* \< 0.01, compared with female. [^3]: Abbreviations: BF% = percent body fat; MVPA = moderate-to-vigorous-physical activity. [^4]: *p* \< 0.05; [^5]: *p* \< 0.01. [^6]: Notes: The phantom model approach does not allow for estimation of standardised effects. Results are therefore presented in their unstandardised form. [^7]: Abbreviations: BF% =  percent body fat; CI = confidence interval; MVPA = moderate-to-vigorous physical activity. [^8]: Significance indicated via 95%CI. [^9]: Tested via autonomous motivation. [^10]: Tested via controlled motivation.
E-Office E-office aims to cater to the need for effectiveness and transparency in the Governmental processes and services delivery mechanisms. Overview E-Office, an app developed by NITB, is helping the Government departments to go paperless. It is aimed at improving internal efficiencies in an organization through electronic administration. The physical file movement of official files and documents consumes a lot of time and requires continuous monitoring from desk to the desk before the final decision is made by the senior officials. Consequently, many crucial decisions get delayed due to the slow movement of files and/or unavailability or absence of the senior officials in the government offices. In addition, the hazard of theft and missing of files is also common in most of the government offices. The immediate need in such a scenario is to have a system in place where an authorized employee could locate the required documents and/or files in the shortest possible time. E-Office is a step forward into an era of paperless administration in the government offices. It is a digital workplace solution that replaces the existing method of manual handling of files and documents with an efficient electronic system. The app can update and share files with other relevant users and eventually store them with proper references. The electronic system has its inherent advantages such as data stored digitally with audit trails for every transaction being done. Regular backups and Disaster Recovery systems (DRS) are in place which ensures that the Government files are not damaged in case of any mishap.
#include "musickwquerymovierequest.h" #include "musicsemaphoreloop.h" #include "musicnumberutils.h" #include "musiccoreutils.h" #include "qalg/qdeswrap.h" MusicKWQueryMovieRequest::MusicKWQueryMovieRequest(QObject *parent) : MusicQueryMovieRequest(parent) { m_queryServer = QUERY_KW_INTERFACE; m_pageSize = 40; } void MusicKWQueryMovieRequest::startToSearch(QueryType type, const QString &text) { if(!m_manager) { return; } TTK_LOGGER_INFO(QString("%1 startToSearch %2").arg(getClassName()).arg(text)); deleteAll(); const QUrl &musicUrl = MusicUtils::Algorithm::mdII(KW_SONG_SEARCH_URL, false).arg(text).arg(0).arg(m_pageSize); m_searchText = text.trimmed(); m_currentType = type; m_interrupt = true; QNetworkRequest request; request.setUrl(musicUrl); request.setRawHeader("User-Agent", MusicUtils::Algorithm::mdII(KW_UA_URL, ALG_UA_KEY, false).toUtf8()); MusicObject::setSslConfiguration(&request); m_reply = m_manager->get(request); connect(m_reply, SIGNAL(finished()), SLOT(downLoadFinished())); connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(replyError(QNetworkReply::NetworkError))); } void MusicKWQueryMovieRequest::startToPage(int offset) { if(!m_manager) { return; } TTK_LOGGER_INFO(QString("%1 startToSearch %2").arg(getClassName()).arg(offset)); deleteAll(); const QUrl &musicUrl = MusicUtils::Algorithm::mdII(KW_ARTIST_MOVIE_URL, false).arg(m_searchText).arg(m_pageSize).arg(offset); m_pageTotal = 0; m_pageSize = 20; m_interrupt = true; QNetworkRequest request; request.setUrl(musicUrl); request.setRawHeader("User-Agent", MusicUtils::Algorithm::mdII(KW_UA_URL, ALG_UA_KEY, false).toUtf8()); MusicObject::setSslConfiguration(&request); m_reply = m_manager->get(request); connect(m_reply, SIGNAL(finished()), SLOT(pageDownLoadFinished())); connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(replyError(QNetworkReply::NetworkError))); } void MusicKWQueryMovieRequest::startToSingleSearch(const QString &text) { if(!m_manager) { return; } TTK_LOGGER_INFO(QString("%1 startToSingleSearch %2").arg(getClassName()).arg(text)); m_searchText = text.trimmed(); m_interrupt = true; QTimer::singleShot(MT_MS, this, SLOT(singleDownLoadFinished())); } void MusicKWQueryMovieRequest::downLoadFinished() { if(!m_reply || !m_manager) { deleteAll(); return; } TTK_LOGGER_INFO(QString("%1 downLoadFinished").arg(getClassName())); Q_EMIT clearAllItems(); m_musicSongInfos.clear(); m_interrupt = false; if(m_reply->error() == QNetworkReply::NoError) { QByteArray bytes = m_reply->readAll();///Get all the data obtained by request QJson::Parser parser; bool ok; const QVariant &data = parser.parse(bytes.replace("'", "\""), &ok); if(ok) { QVariantMap value = data.toMap(); if(value.contains("abslist")) { const QVariantList &datas = value["abslist"].toList(); foreach(const QVariant &var, datas) { if(var.isNull()) { continue; } value = var.toMap(); MusicObject::MusicSongInformation musicInfo; musicInfo.m_singerName = MusicUtils::String::illegalCharactersReplaced(value["ARTIST"].toString()); musicInfo.m_songName = MusicUtils::String::illegalCharactersReplaced(value["SONGNAME"].toString()); musicInfo.m_timeLength = MusicTime::msecTime2LabelJustified(value["DURATION"].toInt()*1000); musicInfo.m_songId = value["MUSICRID"].toString().remove("MUSIC_"); if(m_interrupt || !m_manager || m_stateCode != MusicObject::NetworkQuery) return; readFromMusicMVAttribute(&musicInfo, value["FORMATS"].toString()); if(m_interrupt || !m_manager || m_stateCode != MusicObject::NetworkQuery) return; if(musicInfo.m_songAttrs.isEmpty()) { continue; } MusicSearchedItem item; item.m_songName = musicInfo.m_songName; item.m_singerName = musicInfo.m_singerName; item.m_time = musicInfo.m_timeLength; item.m_type = mapQueryServerString(); Q_EMIT createSearchedItem(item); m_musicSongInfos << musicInfo; } } } } Q_EMIT downLoadDataChanged(QString()); deleteAll(); } void MusicKWQueryMovieRequest::pageDownLoadFinished() { if(!m_reply || !m_manager) { deleteAll(); return; } TTK_LOGGER_INFO(QString("%1 pageDownLoadFinished").arg(getClassName())); m_interrupt = false; if(m_reply->error() == QNetworkReply::NoError) { QByteArray bytes = m_reply->readAll();///Get all the data obtained by request QJson::Parser parser; bool ok; const QVariant &data = parser.parse(bytes.replace("'", "\""), &ok); if(ok) { QVariantMap value = data.toMap(); m_pageTotal = value["total"].toString().toLongLong(); if(value.contains("mvlist")) { const QVariantList &datas = value["mvlist"].toList(); foreach(const QVariant &var, datas) { if(var.isNull()) { continue; } value = var.toMap(); if(m_interrupt) return; MusicResultsItem info; info.m_id = value["musicid"].toString(); info.m_coverUrl = value["pic"].toString(); if(!info.m_coverUrl.contains(TTK_HTTP) && !info.m_coverUrl.contains(COVER_URL_NULL)) { info.m_coverUrl = MusicUtils::Algorithm::mdII(KW_MOVIE_COVER_URL, false) + info.m_coverUrl; } info.m_name = value["name"].toString(); info.m_updateTime.clear(); Q_EMIT createMovieInfoItem(info); } } } } Q_EMIT downLoadDataChanged(QString()); deleteAll(); } void MusicKWQueryMovieRequest::singleDownLoadFinished() { TTK_LOGGER_INFO(QString("%1 singleDownLoadFinished").arg(getClassName())); Q_EMIT clearAllItems(); m_musicSongInfos.clear(); m_interrupt = false; MusicObject::MusicSongInformation musicInfo; musicInfo.m_songId = m_searchText; if(m_interrupt || !m_manager || m_stateCode != MusicObject::NetworkQuery) return; readFromMusicMVInfo(&musicInfo); if(m_interrupt || !m_manager || m_stateCode != MusicObject::NetworkQuery) return; readFromMusicMVAttribute(&musicInfo, QString("MP4UL|MP4L|MP4HV|MP4")); if(m_interrupt || !m_manager || m_stateCode != MusicObject::NetworkQuery) return; if(!musicInfo.m_songAttrs.isEmpty()) { MusicSearchedItem item; item.m_songName = musicInfo.m_songName; item.m_singerName = musicInfo.m_singerName; item.m_time = musicInfo.m_timeLength; item.m_type = mapQueryServerString(); Q_EMIT createSearchedItem(item); m_musicSongInfos << musicInfo; } Q_EMIT downLoadDataChanged(QString()); deleteAll(); } void MusicKWQueryMovieRequest::readFromMusicMVAttribute(MusicObject::MusicSongInformation *info, const QString &format) { if(info->m_songId.isEmpty() || !m_manager) { return; } foreach(const QString &v, format.split("|")) { if(v.contains("MP4L")) { readFromMusicMVAttribute(info, "MP4L", MB_250); } else if(v.contains("MP4HV")) { readFromMusicMVAttribute(info, "MP4HV", MB_750); } else if(v.contains("MP4UL")) { readFromMusicMVAttribute(info, "MP4UL", MB_1000); } else if(v.contains("MP4")) { readFromMusicMVAttribute(info, "MP4", MB_500); } } } void MusicKWQueryMovieRequest::readFromMusicMVAttribute(MusicObject::MusicSongInformation *info, const QString &format, int bitrate) { if(info->m_songId.isEmpty() || !m_manager) { return; } QDesWrap des; const QByteArray &parameter = des.encrypt(MusicUtils::Algorithm::mdII(KW_MOVIE_ATTR_URL, false).arg(info->m_songId).arg(format).toUtf8(), MusicUtils::Algorithm::mdII(_SIGN, ALG_UNIMP_KEY, false).toUtf8()); const QUrl &musicUrl = MusicUtils::Algorithm::mdII(KW_MOVIE_URL, false).arg(QString(parameter)); QNetworkRequest request; request.setUrl(musicUrl); request.setRawHeader("User-Agent", MusicUtils::Algorithm::mdII(KW_UA_URL, ALG_UA_KEY, false).toUtf8()); MusicObject::setSslConfiguration(&request); MusicSemaphoreLoop loop; QNetworkReply *reply = m_manager->get(request); QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit())); QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), &loop, SLOT(quit())); loop.exec(); if(!reply || reply->error() != QNetworkReply::NoError) { return; } const QByteArray &bytes = reply->readAll(); if(!bytes.isEmpty() && !bytes.contains("res not found")) { const QString text(bytes); QRegExp regx(".*url=(.*)\r\nsig="); if(text.indexOf(regx) != -1) { MusicObject::MusicSongAttribute attr; attr.m_url = regx.cap(1); attr.m_bitrate = bitrate; attr.m_format = "mp4"; if(attr.m_url.isEmpty() || info->m_songAttrs.contains(attr)) { return; } if(!findUrlFileSize(&attr)) return; info->m_songAttrs.append(attr); } } } void MusicKWQueryMovieRequest::readFromMusicMVInfo(MusicObject::MusicSongInformation *info) { if(info->m_songId.isEmpty() || !m_manager) { return; } const QUrl &musicUrl = MusicUtils::Algorithm::mdII(KW_MOVIE_HOME_URL, false).arg(info->m_songId); info->m_songName = "Not Found"; info->m_singerName = "Anonymous"; QNetworkRequest request; request.setUrl(musicUrl); request.setRawHeader("User-Agent", MusicUtils::Algorithm::mdII(KW_UA_URL, ALG_UA_KEY, false).toUtf8()); MusicObject::setSslConfiguration(&request); MusicSemaphoreLoop loop; QNetworkReply *reply = m_manager->get(request); QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit())); QObject::connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), &loop, SLOT(quit())); loop.exec(); if(!reply || reply->error() != QNetworkReply::NoError) { return; } const QString text(reply->readAll()); QRegExp regx("<h1 title=\"([^<]+)\">[^>]+>([^<]+)</span></h1>"); if(text.indexOf(regx) != -1) { info->m_songName = regx.cap(1); info->m_singerName = regx.cap(2); } }
Louisiana's 37th State Senate district Louisiana's 37th State Senate district is one of 39 districts in the Louisiana State Senate. It has been represented by Republican Senator Barrow Peacock since 2012. Geography District 37 is evenly split between Bossier and Caddo Parishes in Ark-La-Tex, including parts of southern Shreveport and Bossier City. The district is located entirely within U.S. congressional district 4, and overlaps with Louisiana House of Representatives districts 2, 5, 6, 8, and 9. Recent election results Louisiana uses a jungle primary system. If no candidate receives 50% in the first round of voting, when all candidates appear on the same ballot regardless of party, the top-two finishers advance to a runoff election. 2019 2015 2011 Federal and statewide results in District 37 References Category:Louisiana State Senate districts Category:Bossier Parish, Louisiana Category:Caddo Parish, Louisiana
<?php namespace DummyNamespace; use DummyFullModelClass; use Illuminate\Http\Request; use DummyRootNamespaceHttp\Controllers\Controller; use Symfony\Component\HttpFoundation\Response; use Illuminate\Routing\Controller; class DummyClass extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { return response(['data' => DummyModelClass::all()],200); } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show(DummyModelClass $DummyModelVariable) { return response(['data' => $DummyModelVariable], 200); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $DummyModelVariable = DummyModelClass::create($request->all()); return response(['data' => $DummyModelVariable], Response::HTTP_CREATED); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \DummyFullModelClass $DummyModelVariable * @return \Illuminate\Http\Response */ public function update(Request $request, DummyModelClass $DummyModelVariable) { $DummyModelVariable->update($request->all()); return response(['data' => $DummyModelVariable], Response::HTTP_ACCEPTED); } /** * Remove the specified resource from storage. * * @param \DummyFullModelClass $DummyModelVariable * @return \Illuminate\Http\Response */ public function destroy(DummyModelClass $DummyModelVariable) { $DummyModelVariable->delete(); return response(null, Response::HTTP_NO_CONTENT); } }