content_type stringclasses 8
values | main_lang stringclasses 7
values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Javascript | Javascript | improve message in net-connect-local-error | eeae3bd07145a770209e4899a9d40f67109d3d01 | <ide><path>test/parallel/test-net-connect-local-error.js
<ide> const client = net.connect({
<ide> });
<ide>
<ide> client.on('error', common.mustCall(function onError(err) {
<del> assert.strictEqual(err.localPort, common.PORT);
<del> assert.strictEqual(err.localAddress, common.localhostIPv4);
<add> assert.strictEqual(
<add> err.localPort,
<add> common.PORT,
<add> `${err.localPort} !== ${common.PORT} in ${err}`
<add> );
<add> assert.strictEqual(
<add> err.localAddress,
<add> common.localhostIPv4,
<add> `${err.localAddress} !== ${common.localhostIPv4} in ${err}`
<add> );
<ide> })); | 1 |
Javascript | Javascript | fix emberjs/website with unique header title | c3c283b6c031031cb7778a48ab88622365b52c59 | <ide><path>packages/ember-handlebars/lib/helpers/collection.js
<ide> var get = Ember.get, handlebarsGet = Ember.Handlebars.get, fmt = Ember.String.fm
<ide> </div>
<ide> ```
<ide>
<del> ### Blockless Use
<add> ### Blockless use in a collection
<ide>
<ide> If you provide an `itemViewClass` option that has its own `template` you can
<ide> omit the block. | 1 |
Ruby | Ruby | fix .keep file issue with actioncable | a859108c82cc96329fabf4f2488cec4ee77852df | <ide><path>railties/lib/rails/generators/rails/app/app_generator.rb
<ide> def app
<ide> directory 'app'
<ide>
<ide> keep_file 'app/assets/images'
<del> keep_file 'app/assets/javascripts/channels' unless options[:skip_action_cable]
<add> empty_directory_with_keep_file 'app/assets/javascripts/channels' unless options[:skip_action_cable]
<ide>
<ide> keep_file 'app/controllers/concerns'
<ide> keep_file 'app/models/concerns' | 1 |
Javascript | Javascript | move react native platform files back | fe395def652b65847de3912d64181b24f96f70fe | <ide><path>src/renderers/native/ReactIOS/YellowBox.js
<del>/**
<del> * Copyright (c) 2015-present, Facebook, Inc.
<del> * All rights reserved.
<del> *
<del> * This source code is licensed under the BSD-style license found in the
<del> * LICENSE file in the root directory of this source tree. An additional grant
<del> * of patent rights can be found in the PATENTS file in the same directory.
<del> *
<del> * @providesModule YellowBox
<del> * @flow
<del> */
<del>
<del>'use strict';
<del>
<del>const EventEmitter = require('EventEmitter');
<del>import type EmitterSubscription from 'EmitterSubscription';
<del>const Platform = require('Platform');
<del>const React = require('React');
<del>const StyleSheet = require('StyleSheet');
<del>
<del>const _warningEmitter = new EventEmitter();
<del>const _warningMap = new Map();
<del>
<del>/**
<del> * YellowBox renders warnings at the bottom of the app being developed.
<del> *
<del> * Warnings help guard against subtle yet significant issues that can impact the
<del> * quality of the app. This "in your face" style of warning allows developers to
<del> * notice and correct these issues as quickly as possible.
<del> *
<del> * By default, the warning box is enabled in `__DEV__`. Set the following flag
<del> * to disable it (and call `console.warn` to update any rendered <YellowBox>):
<del> *
<del> * console.disableYellowBox = true;
<del> * console.warn('YellowBox is disabled.');
<del> *
<del> * Warnings can be ignored programmatically by setting the array:
<del> *
<del> * console.ignoredYellowBox = ['Warning: ...'];
<del> *
<del> * Strings in `console.ignoredYellowBox` can be a prefix of the warning that
<del> * should be ignored.
<del> */
<del>
<del>if (__DEV__) {
<del> const {error, warn} = console;
<del> console.error = function() {
<del> error.apply(console, arguments);
<del> // Show yellow box for the `warning` module.
<del> if (typeof arguments[0] === 'string' &&
<del> arguments[0].startsWith('Warning: ')) {
<del> updateWarningMap.apply(null, arguments);
<del> }
<del> };
<del> console.warn = function() {
<del> warn.apply(console, arguments);
<del> updateWarningMap.apply(null, arguments);
<del> };
<del>}
<del>
<del>/**
<del> * Simple function for formatting strings.
<del> *
<del> * Replaces placeholders with values passed as extra arguments
<del> *
<del> * @param {string} format the base string
<del> * @param ...args the values to insert
<del> * @return {string} the replaced string
<del> */
<del>function sprintf(format, ...args) {
<del> var index = 0;
<del> return format.replace(/%s/g, match => args[index++]);
<del>}
<del>
<del>function updateWarningMap(format, ...args): void {
<del> const stringifySafe = require('stringifySafe');
<del>
<del> format = String(format);
<del> const argCount = (format.match(/%s/g) || []).length;
<del> const warning = [
<del> sprintf(format, ...args.slice(0, argCount)),
<del> ...args.slice(argCount).map(stringifySafe),
<del> ].join(' ');
<del>
<del> const count = _warningMap.has(warning) ? _warningMap.get(warning) : 0;
<del> _warningMap.set(warning, count + 1);
<del> _warningEmitter.emit('warning', _warningMap);
<del>}
<del>
<del>function isWarningIgnored(warning: string): boolean {
<del> return (
<del> Array.isArray(console.ignoredYellowBox) &&
<del> console.ignoredYellowBox.some(
<del> ignorePrefix => warning.startsWith(ignorePrefix)
<del> )
<del> );
<del>}
<del>
<del>const WarningRow = ({count, warning, onPress}) => {
<del> const Text = require('Text');
<del> const TouchableHighlight = require('TouchableHighlight');
<del> const View = require('View');
<del>
<del> const countText = count > 1 ?
<del> <Text style={styles.listRowCount}>{'(' + count + ') '}</Text> :
<del> null;
<del>
<del> return (
<del> <View style={styles.listRow}>
<del> <TouchableHighlight
<del> activeOpacity={0.5}
<del> onPress={onPress}
<del> style={styles.listRowContent}
<del> underlayColor="transparent">
<del> <Text style={styles.listRowText} numberOfLines={2}>
<del> {countText}
<del> {warning}
<del> </Text>
<del> </TouchableHighlight>
<del> </View>
<del> );
<del>};
<del>
<del>const WarningInspector = ({
<del> count,
<del> warning,
<del> onClose,
<del> onDismiss,
<del> onDismissAll,
<del>}) => {
<del> const ScrollView = require('ScrollView');
<del> const Text = require('Text');
<del> const TouchableHighlight = require('TouchableHighlight');
<del> const View = require('View');
<del>
<del> const countSentence =
<del> 'Warning encountered ' + count + ' time' + (count - 1 ? 's' : '') + '.';
<del>
<del> return (
<del> <TouchableHighlight
<del> activeOpacity={0.95}
<del> underlayColor={backgroundColor(0.8)}
<del> onPress={onClose}
<del> style={styles.inspector}>
<del> <View style={styles.inspectorContent}>
<del> <View style={styles.inspectorCount}>
<del> <Text style={styles.inspectorCountText}>{countSentence}</Text>
<del> </View>
<del> <ScrollView style={styles.inspectorWarning}>
<del> <Text style={styles.inspectorWarningText}>{warning}</Text>
<del> </ScrollView>
<del> <View style={styles.inspectorButtons}>
<del> <TouchableHighlight
<del> activeOpacity={0.5}
<del> onPress={onDismiss}
<del> style={styles.inspectorButton}
<del> underlayColor="transparent">
<del> <Text style={styles.inspectorButtonText}>
<del> Dismiss
<del> </Text>
<del> </TouchableHighlight>
<del> <TouchableHighlight
<del> activeOpacity={0.5}
<del> onPress={onDismissAll}
<del> style={styles.inspectorButton}
<del> underlayColor="transparent">
<del> <Text style={styles.inspectorButtonText}>
<del> Dismiss All
<del> </Text>
<del> </TouchableHighlight>
<del> </View>
<del> </View>
<del> </TouchableHighlight>
<del> );
<del>};
<del>
<del>class YellowBox extends React.Component {
<del> state: {
<del> inspecting: ?string;
<del> warningMap: Map;
<del> };
<del> _listener: ?EmitterSubscription;
<del>
<del> constructor(props: mixed, context: mixed) {
<del> super(props, context);
<del> this.state = {
<del> inspecting: null,
<del> warningMap: _warningMap,
<del> };
<del> this.dismissWarning = warning => {
<del> const {inspecting, warningMap} = this.state;
<del> if (warning) {
<del> warningMap.delete(warning);
<del> } else {
<del> warningMap.clear();
<del> }
<del> this.setState({
<del> inspecting: (warning && inspecting !== warning) ? inspecting : null,
<del> warningMap,
<del> });
<del> };
<del> }
<del>
<del> componentDidMount() {
<del> let scheduled = null;
<del> this._listener = _warningEmitter.addListener('warning', warningMap => {
<del> // Use `setImmediate` because warnings often happen during render, but
<del> // state cannot be set while rendering.
<del> scheduled = scheduled || setImmediate(() => {
<del> scheduled = null;
<del> this.setState({
<del> warningMap,
<del> });
<del> });
<del> });
<del> }
<del>
<del> componentWillUnmount() {
<del> if (this._listener) {
<del> this._listener.remove();
<del> }
<del> }
<del>
<del> render() {
<del> if (console.disableYellowBox || this.state.warningMap.size === 0) {
<del> return null;
<del> }
<del> const ScrollView = require('ScrollView');
<del> const View = require('View');
<del>
<del> const inspecting = this.state.inspecting;
<del> const inspector = inspecting !== null ?
<del> <WarningInspector
<del> count={this.state.warningMap.get(inspecting)}
<del> warning={inspecting}
<del> onClose={() => this.setState({inspecting: null})}
<del> onDismiss={() => this.dismissWarning(inspecting)}
<del> onDismissAll={() => this.dismissWarning(null)}
<del> /> :
<del> null;
<del>
<del> const rows = [];
<del> this.state.warningMap.forEach((count, warning) => {
<del> if (!isWarningIgnored(warning)) {
<del> rows.push(
<del> <WarningRow
<del> key={warning}
<del> count={count}
<del> warning={warning}
<del> onPress={() => this.setState({inspecting: warning})}
<del> onDismiss={() => this.dismissWarning(warning)}
<del> />
<del> );
<del> }
<del> });
<del>
<del> const listStyle = [
<del> styles.list,
<del> // Additional `0.4` so the 5th row can peek into view.
<del> {height: Math.min(rows.length, 4.4) * (rowGutter + rowHeight)},
<del> ];
<del> return (
<del> <View style={inspector ? styles.fullScreen : listStyle}>
<del> <ScrollView style={listStyle} scrollsToTop={false}>
<del> {rows}
<del> </ScrollView>
<del> {inspector}
<del> </View>
<del> );
<del> }
<del>}
<del>
<del>const backgroundColor = opacity => 'rgba(250, 186, 48, ' + opacity + ')';
<del>const textColor = 'white';
<del>const rowGutter = 1;
<del>const rowHeight = 46;
<del>
<del>var styles = StyleSheet.create({
<del> fullScreen: {
<del> backgroundColor: 'transparent',
<del> position: 'absolute',
<del> left: 0,
<del> right: 0,
<del> top: 0,
<del> bottom: 0,
<del> },
<del> inspector: {
<del> backgroundColor: backgroundColor(0.95),
<del> flex: 1,
<del> },
<del> inspectorContainer: {
<del> flex: 1,
<del> },
<del> inspectorButtons: {
<del> flexDirection: 'row',
<del> position: 'absolute',
<del> left: 0,
<del> right: 0,
<del> bottom: 0,
<del> },
<del> inspectorButton: {
<del> flex: 1,
<del> padding: 22,
<del> },
<del> inspectorButtonText: {
<del> color: textColor,
<del> fontSize: 14,
<del> opacity: 0.8,
<del> textAlign: 'center',
<del> },
<del> inspectorContent: {
<del> flex: 1,
<del> paddingTop: 5,
<del> },
<del> inspectorCount: {
<del> padding: 15,
<del> paddingBottom: 0,
<del> },
<del> inspectorCountText: {
<del> color: textColor,
<del> fontSize: 14,
<del> },
<del> inspectorWarning: {
<del> padding: 15,
<del> position: 'absolute',
<del> top: 39,
<del> bottom: 60,
<del> },
<del> inspectorWarningText: {
<del> color: textColor,
<del> fontSize: 16,
<del> fontWeight: '600',
<del> },
<del> list: {
<del> backgroundColor: 'transparent',
<del> position: 'absolute',
<del> left: 0,
<del> right: 0,
<del> bottom: 0,
<del> },
<del> listRow: {
<del> position: 'relative',
<del> backgroundColor: backgroundColor(0.95),
<del> flex: 1,
<del> height: rowHeight,
<del> marginTop: rowGutter,
<del> },
<del> listRowContent: {
<del> flex: 1,
<del> },
<del> listRowCount: {
<del> color: 'rgba(255, 255, 255, 0.5)',
<del> },
<del> listRowText: {
<del> color: textColor,
<del> position: 'absolute',
<del> left: 0,
<del> top: Platform.OS === 'android' ? 5 : 7,
<del> marginLeft: 15,
<del> marginRight: 15,
<del> },
<del>});
<del>
<del>module.exports = YellowBox;
<ide><path>src/renderers/native/ReactIOS/renderApplication.android.js
<del>/**
<del> * Copyright (c) 2015-present, Facebook, Inc.
<del> * All rights reserved.
<del> *
<del> * This source code is licensed under the BSD-style license found in the
<del> * LICENSE file in the root directory of this source tree. An additional grant
<del> * of patent rights can be found in the PATENTS file in the same directory.
<del> *
<del> * @providesModule renderApplication
<del> */
<del>
<del>'use strict';
<del>
<del>var Inspector = require('Inspector');
<del>var Portal = require('Portal');
<del>var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
<del>var React = require('React');
<del>var StyleSheet = require('StyleSheet');
<del>var Subscribable = require('Subscribable');
<del>var View = require('View');
<del>
<del>var invariant = require('fbjs/lib/invariant');
<del>
<del>var YellowBox = __DEV__ ? require('YellowBox') : null;
<del>
<del>// require BackAndroid so it sets the default handler that exits the app if no listeners respond
<del>require('BackAndroid');
<del>
<del>var AppContainer = React.createClass({
<del> mixins: [Subscribable.Mixin],
<del>
<del> getInitialState: function() {
<del> return {
<del> enabled: __DEV__,
<del> inspectorVisible: false,
<del> rootNodeHandle: null,
<del> rootImportanceForAccessibility: 'auto',
<del> };
<del> },
<del>
<del> toggleElementInspector: function() {
<del> this.setState({
<del> inspectorVisible: !this.state.inspectorVisible,
<del> rootNodeHandle: React.findNodeHandle(this.refs.main),
<del> });
<del> },
<del>
<del> componentDidMount: function() {
<del> this.addListenerOn(
<del> RCTDeviceEventEmitter,
<del> 'toggleElementInspector',
<del> this.toggleElementInspector
<del> );
<del>
<del> this._unmounted = false;
<del> },
<del>
<del> renderInspector: function() {
<del> return this.state.inspectorVisible ?
<del> <Inspector
<del> rootTag={this.props.rootTag}
<del> inspectedViewTag={this.state.rootNodeHandle}
<del> /> :
<del> null;
<del> },
<del>
<del> componentWillUnmount: function() {
<del> this._unmounted = true;
<del> },
<del>
<del> setRootAccessibility: function(modalVisible) {
<del> if (this._unmounted) {
<del> return;
<del> }
<del>
<del> this.setState({
<del> rootImportanceForAccessibility: modalVisible ? 'no-hide-descendants' : 'auto',
<del> });
<del> },
<del>
<del> render: function() {
<del> var RootComponent = this.props.rootComponent;
<del> var appView =
<del> <View
<del> ref="main"
<del> collapsable={!this.state.inspectorVisible}
<del> style={styles.appContainer}>
<del> <RootComponent
<del> {...this.props.initialProps}
<del> rootTag={this.props.rootTag}
<del> importantForAccessibility={this.state.rootImportanceForAccessibility}/>
<del> <Portal
<del> onModalVisibilityChanged={this.setRootAccessibility}/>
<del> </View>;
<del> let yellowBox = null;
<del> if (__DEV__) {
<del> yellowBox = <YellowBox />;
<del> }
<del> return this.state.enabled ?
<del> <View style={styles.appContainer}>
<del> {appView}
<del> {yellowBox}
<del> {this.renderInspector()}
<del> </View> :
<del> appView;
<del> }
<del>});
<del>
<del>function renderApplication<D, P, S>(
<del> RootComponent: ReactClass<P>,
<del> initialProps: P,
<del> rootTag: any
<del>) {
<del> invariant(
<del> rootTag,
<del> 'Expect to have a valid rootTag, instead got ', rootTag
<del> );
<del> React.render(
<del> <AppContainer
<del> rootComponent={RootComponent}
<del> initialProps={initialProps}
<del> rootTag={rootTag} />,
<del> rootTag
<del> );
<del>}
<del>
<del>var styles = StyleSheet.create({
<del> // This is needed so the application covers the whole screen
<del> // and therefore the contents of the Portal are not clipped.
<del> appContainer: {
<del> position: 'absolute',
<del> left: 0,
<del> top: 0,
<del> right: 0,
<del> bottom: 0,
<del> },
<del>});
<del>
<del>module.exports = renderApplication;
<ide><path>src/renderers/native/ReactIOS/renderApplication.ios.js
<del>/**
<del> * Copyright (c) 2015-present, Facebook, Inc.
<del> * All rights reserved.
<del> *
<del> * This source code is licensed under the BSD-style license found in the
<del> * LICENSE file in the root directory of this source tree. An additional grant
<del> * of patent rights can be found in the PATENTS file in the same directory.
<del> *
<del> * @providesModule renderApplication
<del> * @noflow
<del> */
<del>
<del>'use strict';
<del>
<del>var RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
<del>var React = require('React');
<del>var StyleSheet = require('StyleSheet');
<del>var Subscribable = require('Subscribable');
<del>var View = require('View');
<del>
<del>var invariant = require('fbjs/lib/invariant');
<del>
<del>var Inspector = __DEV__ ? require('Inspector') : null;
<del>var YellowBox = __DEV__ ? require('YellowBox') : null;
<del>
<del>var AppContainer = React.createClass({
<del> mixins: [Subscribable.Mixin],
<del>
<del> getInitialState: function() {
<del> return { inspector: null };
<del> },
<del>
<del> toggleElementInspector: function() {
<del> var inspector = !__DEV__ || this.state.inspector
<del> ? null
<del> : <Inspector
<del> rootTag={this.props.rootTag}
<del> inspectedViewTag={React.findNodeHandle(this.refs.main)}
<del> />;
<del> this.setState({inspector});
<del> },
<del>
<del> componentDidMount: function() {
<del> this.addListenerOn(
<del> RCTDeviceEventEmitter,
<del> 'toggleElementInspector',
<del> this.toggleElementInspector
<del> );
<del> },
<del>
<del> render: function() {
<del> let yellowBox = null;
<del> if (__DEV__) {
<del> yellowBox = <YellowBox />;
<del> }
<del> return (
<del> <View style={styles.appContainer}>
<del> <View collapsible={false} style={styles.appContainer} ref="main">
<del> {this.props.children}
<del> </View>
<del> {yellowBox}
<del> {this.state.inspector}
<del> </View>
<del> );
<del> }
<del>});
<del>
<del>function renderApplication<D, P, S>(
<del> RootComponent: ReactClass<P>,
<del> initialProps: P,
<del> rootTag: any
<del>) {
<del> invariant(
<del> rootTag,
<del> 'Expect to have a valid rootTag, instead got ', rootTag
<del> );
<del> /* eslint-disable jsx-no-undef-with-namespace */
<del> React.render(
<del> <AppContainer rootTag={rootTag}>
<del> <RootComponent
<del> {...initialProps}
<del> rootTag={rootTag}
<del> />
<del> </AppContainer>,
<del> rootTag
<del> );
<del> /* eslint-enable jsx-no-undef-with-namespace */
<del>}
<del>
<del>var styles = StyleSheet.create({
<del> appContainer: {
<del> flex: 1,
<del> },
<del>});
<del>
<del>module.exports = renderApplication;
<ide><path>src/renderers/native/ReactIOS/requireNativeComponent.js
<del>/**
<del> * Copyright (c) 2015-present, Facebook, Inc.
<del> * All rights reserved.
<del> *
<del> * This source code is licensed under the BSD-style license found in the
<del> * LICENSE file in the root directory of this source tree. An additional grant
<del> * of patent rights can be found in the PATENTS file in the same directory.
<del> *
<del> * @providesModule requireNativeComponent
<del> * @flow
<del> */
<del>'use strict';
<del>
<del>var ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
<del>var UIManager = require('UIManager');
<del>var UnimplementedView = require('UnimplementedView');
<del>
<del>var createReactNativeComponentClass = require('createReactNativeComponentClass');
<del>
<del>var insetsDiffer = require('insetsDiffer');
<del>var pointsDiffer = require('pointsDiffer');
<del>var matricesDiffer = require('matricesDiffer');
<del>var processColor = require('processColor');
<del>var resolveAssetSource = require('resolveAssetSource');
<del>var sizesDiffer = require('sizesDiffer');
<del>var verifyPropTypes = require('verifyPropTypes');
<del>var warning = require('fbjs/lib/warning');
<del>
<del>/**
<del> * Used to create React components that directly wrap native component
<del> * implementations. Config information is extracted from data exported from the
<del> * UIManager module. You should also wrap the native component in a
<del> * hand-written component with full propTypes definitions and other
<del> * documentation - pass the hand-written component in as `componentInterface` to
<del> * verify all the native props are documented via `propTypes`.
<del> *
<del> * If some native props shouldn't be exposed in the wrapper interface, you can
<del> * pass null for `componentInterface` and call `verifyPropTypes` directly
<del> * with `nativePropsToIgnore`;
<del> *
<del> * Common types are lined up with the appropriate prop differs with
<del> * `TypeToDifferMap`. Non-scalar types not in the map default to `deepDiffer`.
<del> */
<del>import type { ComponentInterface } from 'verifyPropTypes';
<del>
<del>function requireNativeComponent(
<del> viewName: string,
<del> componentInterface?: ?ComponentInterface,
<del> extraConfig?: ?{nativeOnly?: Object},
<del>): Function {
<del> var viewConfig = UIManager[viewName];
<del> if (!viewConfig || !viewConfig.NativeProps) {
<del> warning(false, 'Native component for "%s" does not exist', viewName);
<del> return UnimplementedView;
<del> }
<del> var nativeProps = {
<del> ...UIManager.RCTView.NativeProps,
<del> ...viewConfig.NativeProps,
<del> };
<del> viewConfig.uiViewClassName = viewName;
<del> viewConfig.validAttributes = {};
<del> viewConfig.propTypes = componentInterface && componentInterface.propTypes;
<del> for (var key in nativeProps) {
<del> var useAttribute = false;
<del> var attribute = {};
<del>
<del> var differ = TypeToDifferMap[nativeProps[key]];
<del> if (differ) {
<del> attribute.diff = differ;
<del> useAttribute = true;
<del> }
<del>
<del> var processor = TypeToProcessorMap[nativeProps[key]];
<del> if (processor) {
<del> attribute.process = processor;
<del> useAttribute = true;
<del> }
<del>
<del> viewConfig.validAttributes[key] = useAttribute ? attribute : true;
<del> }
<del>
<del> // Unfortunately, the current set up puts the style properties on the top
<del> // level props object. We also need to add the nested form for API
<del> // compatibility. This allows these props on both the top level and the
<del> // nested style level. TODO: Move these to nested declarations on the
<del> // native side.
<del> viewConfig.validAttributes.style = ReactNativeStyleAttributes;
<del>
<del> if (__DEV__) {
<del> componentInterface && verifyPropTypes(
<del> componentInterface,
<del> viewConfig,
<del> extraConfig && extraConfig.nativeOnly
<del> );
<del> }
<del> return createReactNativeComponentClass(viewConfig);
<del>}
<del>
<del>var TypeToDifferMap = {
<del> // iOS Types
<del> CATransform3D: matricesDiffer,
<del> CGPoint: pointsDiffer,
<del> CGSize: sizesDiffer,
<del> UIEdgeInsets: insetsDiffer,
<del> // Android Types
<del> // (not yet implemented)
<del>};
<del>
<del>function processColorArray(colors: []): [] {
<del> return colors && colors.map(processColor);
<del>}
<del>
<del>var TypeToProcessorMap = {
<del> // iOS Types
<del> CGColor: processColor,
<del> CGColorArray: processColorArray,
<del> UIColor: processColor,
<del> UIColorArray: processColorArray,
<del> CGImage: resolveAssetSource,
<del> UIImage: resolveAssetSource,
<del> RCTImageSource: resolveAssetSource,
<del> // Android Types
<del> Color: processColor,
<del> ColorArray: processColorArray,
<del>};
<del>
<del>module.exports = requireNativeComponent;
<ide><path>src/renderers/native/ReactIOS/verifyPropTypes.js
<del>/**
<del> * Copyright (c) 2015-present, Facebook, Inc.
<del> * All rights reserved.
<del> *
<del> * This source code is licensed under the BSD-style license found in the
<del> * LICENSE file in the root directory of this source tree. An additional grant
<del> * of patent rights can be found in the PATENTS file in the same directory.
<del> *
<del> * @providesModule verifyPropTypes
<del> * @flow
<del> */
<del>'use strict';
<del>
<del>var ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
<del>
<del>export type ComponentInterface = ReactClass<any> | {
<del> name?: string;
<del> displayName?: string;
<del> propTypes: Object;
<del>};
<del>
<del>function verifyPropTypes(
<del> componentInterface: ComponentInterface,
<del> viewConfig: Object,
<del> nativePropsToIgnore?: ?Object
<del>) {
<del> if (!viewConfig) {
<del> return; // This happens for UnimplementedView.
<del> }
<del> var componentName = componentInterface.name ||
<del> componentInterface.displayName ||
<del> 'unknown';
<del> if (!componentInterface.propTypes) {
<del> throw new Error(
<del> '`' + componentName + '` has no propTypes defined`'
<del> );
<del> }
<del>
<del> var nativeProps = viewConfig.NativeProps;
<del> for (var prop in nativeProps) {
<del> if (!componentInterface.propTypes[prop] &&
<del> !ReactNativeStyleAttributes[prop] &&
<del> (!nativePropsToIgnore || !nativePropsToIgnore[prop])) {
<del> var message;
<del> if (componentInterface.propTypes.hasOwnProperty(prop)) {
<del> message = '`' + componentName + '` has incorrectly defined propType for native prop `' +
<del> viewConfig.uiViewClassName + '.' + prop + '` of native type `' + nativeProps[prop];
<del> } else {
<del> message = '`' + componentName + '` has no propType for native prop `' +
<del> viewConfig.uiViewClassName + '.' + prop + '` of native type `' +
<del> nativeProps[prop] + '`';
<del> };
<del> message += '\nIf you haven\'t changed this prop yourself, this usually means that ' +
<del> 'your versions of the native code and JavaScript code are out of sync. Updating both ' +
<del> 'should make this error go away.';
<del> throw new Error(message);
<del> }
<del> }
<del>}
<del>
<del>module.exports = verifyPropTypes;
<ide><path>src/renderers/native/ReactNative/UIManagerStatTracker.js
<del>/**
<del> * Copyright (c) 2015-present, Facebook, Inc.
<del> * All rights reserved.
<del> *
<del> * This source code is licensed under the BSD-style license found in the
<del> * LICENSE file in the root directory of this source tree. An additional grant
<del> * of patent rights can be found in the PATENTS file in the same directory.
<del> *
<del> * @providesModule UIManagerStatTracker
<del> * @flow
<del> */
<del>'use strict';
<del>
<del>var UIManager = require('UIManager');
<del>
<del>var installed = false;
<del>var UIManagerStatTracker = {
<del> install: function() {
<del> if (installed) {
<del> return;
<del> }
<del> installed = true;
<del> var statLogHandle;
<del> var stats = {};
<del> function printStats() {
<del> console.log({UIManagerStatTracker: stats});
<del> statLogHandle = null;
<del> }
<del> function incStat(key: string, increment: number) {
<del> stats[key] = (stats[key] || 0) + increment;
<del> if (!statLogHandle) {
<del> statLogHandle = setImmediate(printStats);
<del> }
<del> }
<del> var createViewOrig = UIManager.createView;
<del> UIManager.createView = function(tag, className, rootTag, props) {
<del> incStat('createView', 1);
<del> incStat('setProp', Object.keys(props || []).length);
<del> createViewOrig(tag, className, rootTag, props);
<del> };
<del> var updateViewOrig = UIManager.updateView;
<del> UIManager.updateView = function(tag, className, props) {
<del> incStat('updateView', 1);
<del> incStat('setProp', Object.keys(props || []).length);
<del> updateViewOrig(tag, className, props);
<del> };
<del> var manageChildrenOrig = UIManager.manageChildren;
<del> UIManager.manageChildren = function(tag, moveFrom, moveTo, addTags, addIndices, remove) {
<del> incStat('manageChildren', 1);
<del> incStat('move', Object.keys(moveFrom || []).length);
<del> incStat('remove', Object.keys(remove || []).length);
<del> manageChildrenOrig(tag, moveFrom, moveTo, addTags, addIndices, remove);
<del> };
<del> },
<del>};
<del>
<del>module.exports = UIManagerStatTracker;
<ide><path>src/renderers/native/vendor/react/core/clamp.js
<del>/**
<del> * @generated SignedSource<<ec51291ea6059cf23faa74f8644d17b1>>
<del> *
<del> * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<del> * !! This file is a check-in of a static_upstream project! !!
<del> * !! !!
<del> * !! You should not modify this file directly. Instead: !!
<del> * !! 1) Use `fjs use-upstream` to temporarily replace this with !!
<del> * !! the latest version from upstream. !!
<del> * !! 2) Make your changes, test them, etc. !!
<del> * !! 3) Use `fjs push-upstream` to copy your changes back to !!
<del> * !! static_upstream. !!
<del> * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<del> *
<del> * @providesModule clamp
<del> * @typechecks
<del> */
<del>
<del> /**
<del> * @param {number} value
<del> * @param {number} min
<del> * @param {number} max
<del> * @return {number}
<del> */
<del>function clamp(min, value, max) {
<del> if (value < min) {
<del> return min;
<del> }
<del> if (value > max) {
<del> return max;
<del> }
<del> return value;
<del>}
<del>
<del>module.exports = clamp; | 7 |
Text | Text | translate ref 07 to korean | 547baf82b52e698896edb9d57dc6709d8807dddb | <ide><path>docs/docs/ref-07-special-non-dom-attributes.ko-KR.md
<add>---
<add>id: special-non-dom-attributes-ko-KR
<add>title: DOM이 아닌 특별한 어트리뷰트
<add>permalink: special-non-dom-attributes.ko-KR.html
<add>prev: dom-differences.ko-KR.html
<add>next: reconciliation.ko-KR.html
<add>---
<add>
<add>[DOM 차이점](/react/docs/dom-differences.html)처럼, React는 DOM에는 존재하지 않는 몇몇 어트리뷰트도 제공합니다.
<add>
<add>- `key`: 선택적인 고유 식별자. 컴포넌트가 `render` 과정에서 섞일 때, diff 알고리즘에 의해 파괴되고, 다시 생성될 수 있습니다. 컴포넌트에 영속적인(persists) 키를 할당하면 컴포넌트가 확실히 유지되게 할 수 있습니다. 더 자세한 것은 [여기](/react/docs/multiple-components.html#dynamic-children)에서 보세요.
<add>- `ref`: [여기](/react/docs/more-about-refs.html)를 보세요.
<add>- `dangerouslySetInnerHTML`: 생(raw) HTML을 넣을 수 있게 합니다. 주로 DOM 문자열 관리 라이브러리와의 협력하기 위해 사용합니다. 더 자세한 것은 [여기](/react/tips/dangerously-set-inner-html.html)를 보세요. | 1 |
Javascript | Javascript | fix linting issues | a31795e1f30c0a1f0a113d2b31c1b75f2cd0aaea | <ide><path>src/main-process/parse-command-line.js
<ide> module.exports = function parseCommandLine (processArgs) {
<ide> const base = path.dirname(pathToProjectFile)
<ide> pathsToOpen.push(path.dirname(projectSpecificationFile))
<ide> projectSpecification = {
<del> originPath: projectSpecificationFile,
<del> paths: contents.paths.map(curPath => path.resolve(base, curPath)),
<del> config: contents.config
<add> originPath: projectSpecificationFile,
<add> paths: contents.paths.map(curPath => path.resolve(base, curPath)),
<add> config: contents.config
<ide> }
<ide> }
<ide>
<ide> module.exports = function parseCommandLine (processArgs) {
<ide> }
<ide>
<ide> function readProjectSpecificationSync (filepath, executedFrom) {
<add> let contents
<ide> try {
<del> const contents = CSON.readFileSync(readPath)
<add> contents = CSON.readFileSync(filepath)
<ide> } catch (e) {
<ide> throw new Error('Unable to read supplied project specification file.')
<ide> }
<ide>
<ide> if (contents.paths == null) {
<del> contents.paths = [path.dirname(readPath)]
<add> contents.paths = [path.dirname(filepath)]
<ide> }
<ide> return (contents.config == null) ? {} : contents
<ide> } | 1 |
PHP | PHP | add options for ses’s sendrawemail | e21b17fd277b9a2424ea2b3f727325d1df65c713 | <ide><path>src/Illuminate/Mail/Transport/SesTransport.php
<ide> class SesTransport extends Transport
<ide> */
<ide> protected $ses;
<ide>
<add> /**
<add> * Transmission options.
<add> *
<add> * @var array
<add> */
<add> protected $options = [];
<add>
<ide> /**
<ide> * Create a new SES transport instance.
<ide> *
<ide> * @param \Aws\Ses\SesClient $ses
<add> * @param array $options
<ide> * @return void
<ide> */
<del> public function __construct(SesClient $ses)
<add> public function __construct(SesClient $ses, $options = [])
<ide> {
<ide> $this->ses = $ses;
<add> $this->options = $options;
<ide> }
<ide>
<ide> /**
<ide> public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nul
<ide> {
<ide> $this->beforeSendPerformed($message);
<ide>
<del> $headers = $message->getHeaders();
<add> $result = $this->ses->sendRawEmail(
<add> array_merge(
<add> $this->options,
<add> [
<add> 'Source' => key($message->getSender() ?: $message->getFrom()),
<add> 'RawMessage' => [
<add> 'Data' => $message->toString(),
<add> ],
<add> ]
<add> )
<add> );
<ide>
<del> $headers->addTextHeader('X-SES-Message-ID', $this->ses->sendRawEmail([
<del> 'Source' => key($message->getSender() ?: $message->getFrom()),
<del> 'RawMessage' => [
<del> 'Data' => $message->toString(),
<del> ],
<del> ])->get('MessageId'));
<add> $message->getHeaders()->addTextHeader('X-SES-Message-ID', $result->get('MessageId'));
<ide>
<ide> $this->sendPerformed($message);
<ide>
<ide> return $this->numberOfRecipients($message);
<ide> }
<add>
<add> /**
<add> * Get the transmission options being used by the transport.
<add> *
<add> * @return array
<add> */
<add> public function getOptions()
<add> {
<add> return $this->options;
<add> }
<add>
<add> /**
<add> * Set the transmission options being used by the transport.
<add> *
<add> * @param array $options
<add> * @return array
<add> */
<add> public function setOptions(array $options)
<add> {
<add> return $this->options = $options;
<add> }
<ide> } | 1 |
Javascript | Javascript | fix examples in action helper docs | 7d1d6a0c8d876f8899250ec5c8f7f2c27c1f7a58 | <ide><path>packages/ember-routing/lib/helpers/action.js
<ide> Ember.onLoad('Ember.Handlebars', function(Handlebars) {
<ide>
<ide> ```javascript
<ide> AController = Ember.Controller.extend({
<del> anActionName: function() {}
<add> actions: {
<add> anActionName: function() {}
<add> }
<ide> });
<ide>
<ide> AView = Ember.View.extend({
<ide> Ember.onLoad('Ember.Handlebars', function(Handlebars) {
<ide> </div>
<ide> ```
<ide>
<del> Clicking "click me" will trigger the `anActionName` method of the
<del> `AController`. In this case, no additional parameters will be passed.
<add> Clicking "click me" will trigger the `anActionName` method in the `actions
<add> hash of the `AController`. In this case, no additional parameters will be
<add> passed.
<ide>
<ide> If you provide additional parameters to the helper:
<ide> | 1 |
Java | Java | make reactmarker initialization one-shot | cc3d034460770e36e08477283215cc95dacaaa90 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarker.java
<ide> public interface MarkerListener {
<ide>
<ide> private static @Nullable MarkerListener sMarkerListener = null;
<ide>
<del> public static void setMarkerListener(MarkerListener listener) {
<del> SoftAssertions.assertCondition(
<del> sMarkerListener == null,
<del> "MarkerListener is being overwritten.");
<del> sMarkerListener = listener;
<add> public static void initialize(MarkerListener listener) {
<add> if (sMarkerListener == null) {
<add> sMarkerListener = listener;
<add> }
<ide> }
<ide>
<ide> @DoNotStrip | 1 |
PHP | PHP | add deprecation warnings for belongstomany | 7eaa9ef25eb9971c33bec403deddc9caccf2af75 | <ide><path>src/ORM/Association/BelongsToMany.php
<ide> public function getTargetForeignKey()
<ide> */
<ide> public function targetForeignKey($key = null)
<ide> {
<add> deprecationWarning(
<add> 'BelongToMany::targetForeignKey() is deprecated. ' .
<add> 'Use setTargetForeignKey()/getTargetForeignKey() instead.'
<add> );
<ide> if ($key !== null) {
<ide> $this->setTargetForeignKey($key);
<ide> }
<ide> public function getSort()
<ide> */
<ide> public function sort($sort = null)
<ide> {
<add> deprecationWarning(
<add> 'BelongToMany::sort() is deprecated. ' .
<add> 'Use setSort()/getSort() instead.'
<add> );
<ide> if ($sort !== null) {
<ide> $this->setSort($sort);
<ide> }
<ide> public function getSaveStrategy()
<ide> */
<ide> public function saveStrategy($strategy = null)
<ide> {
<add> deprecationWarning(
<add> 'BelongsToMany::saveStrategy() is deprecated. ' .
<add> 'Use setSaveStrategy()/getSaveStrategy() instead.'
<add> );
<ide> if ($strategy !== null) {
<ide> $this->setSaveStrategy($strategy);
<ide> }
<ide><path>src/ORM/Association/DependentDeleteTrait.php
<ide> trait DependentDeleteTrait
<ide> */
<ide> public function cascadeDelete(EntityInterface $entity, array $options = [])
<ide> {
<add> deprecationWarning(
<add> 'The DependentDeleteTrait is deprecated. ' .
<add> 'You should use Cake\ORM\Association\DependentDeleteHelper instead.'
<add> );
<ide> $helper = new DependentDeleteHelper();
<ide>
<ide> return $helper->cascadeDelete($this, $entity, $options);
<ide><path>tests/TestCase/ORM/Association/BelongsToManyTest.php
<ide> public function testCanBeJoined()
<ide> /**
<ide> * Tests sort() method
<ide> *
<add> * @group deprecated
<ide> * @return void
<ide> */
<ide> public function testSort()
<add> {
<add> $this->deprecated(function () {
<add> $assoc = new BelongsToMany('Test');
<add> $this->assertNull($assoc->sort());
<add> $assoc->sort(['id' => 'ASC']);
<add> $this->assertEquals(['id' => 'ASC'], $assoc->sort());
<add> });
<add> }
<add>
<add> /**
<add> * Tests setSort() method
<add> *
<add> * @return void
<add> */
<add> public function testSetSort()
<ide> {
<ide> $assoc = new BelongsToMany('Test');
<del> $this->assertNull($assoc->sort());
<del> $assoc->sort(['id' => 'ASC']);
<del> $this->assertEquals(['id' => 'ASC'], $assoc->sort());
<add> $this->assertNull($assoc->getSort());
<add> $assoc->setSort(['id' => 'ASC']);
<add> $this->assertEquals(['id' => 'ASC'], $assoc->getSort());
<ide> }
<ide>
<ide> /**
<ide> public function testJunctionWithDefaultTableName()
<ide> /**
<ide> * Tests saveStrategy
<ide> *
<add> * @group deprecated
<ide> * @return void
<ide> */
<ide> public function testSaveStrategy()
<add> {
<add> $this->deprecated(function () {
<add> $assoc = new BelongsToMany('Test');
<add> $this->assertEquals(BelongsToMany::SAVE_REPLACE, $assoc->saveStrategy());
<add> $assoc->saveStrategy(BelongsToMany::SAVE_APPEND);
<add> $this->assertEquals(BelongsToMany::SAVE_APPEND, $assoc->saveStrategy());
<add> $assoc->saveStrategy(BelongsToMany::SAVE_REPLACE);
<add> $this->assertEquals(BelongsToMany::SAVE_REPLACE, $assoc->saveStrategy());
<add> });
<add> }
<add>
<add> /**
<add> * Tests saveStrategy
<add> *
<add> * @return void
<add> */
<add> public function testSetSaveStrategy()
<ide> {
<ide> $assoc = new BelongsToMany('Test');
<del> $this->assertEquals(BelongsToMany::SAVE_REPLACE, $assoc->saveStrategy());
<del> $assoc->saveStrategy(BelongsToMany::SAVE_APPEND);
<del> $this->assertEquals(BelongsToMany::SAVE_APPEND, $assoc->saveStrategy());
<del> $assoc->saveStrategy(BelongsToMany::SAVE_REPLACE);
<del> $this->assertEquals(BelongsToMany::SAVE_REPLACE, $assoc->saveStrategy());
<add> $this->assertEquals(BelongsToMany::SAVE_REPLACE, $assoc->getSaveStrategy());
<add>
<add> $assoc->setSaveStrategy(BelongsToMany::SAVE_APPEND);
<add> $this->assertEquals(BelongsToMany::SAVE_APPEND, $assoc->getSaveStrategy());
<add>
<add> $assoc->setSaveStrategy(BelongsToMany::SAVE_REPLACE);
<add> $this->assertEquals(BelongsToMany::SAVE_REPLACE, $assoc->getSaveStrategy());
<ide> }
<ide>
<ide> /**
<ide> public function testSaveStrategy()
<ide> public function testSaveStrategyInOptions()
<ide> {
<ide> $assoc = new BelongsToMany('Test', ['saveStrategy' => BelongsToMany::SAVE_APPEND]);
<del> $this->assertEquals(BelongsToMany::SAVE_APPEND, $assoc->saveStrategy());
<add> $this->assertEquals(BelongsToMany::SAVE_APPEND, $assoc->getSaveStrategy());
<ide> }
<ide>
<ide> /**
<ide> public function testSaveAssociatedEmptySetSuccess($value)
<ide> 'tags' => $value,
<ide> ], ['markNew' => true]);
<ide>
<del> $assoc->saveStrategy(BelongsToMany::SAVE_REPLACE);
<add> $assoc->setSaveStrategy(BelongsToMany::SAVE_REPLACE);
<ide> $assoc->expects($this->never())
<ide> ->method('replaceLinks');
<ide> $assoc->expects($this->never())
<ide> public function testSaveAssociatedEmptySetUpdateSuccess($value)
<ide> 'tags' => $value,
<ide> ], ['markNew' => false]);
<ide>
<del> $assoc->saveStrategy(BelongsToMany::SAVE_REPLACE);
<add> $assoc->setSaveStrategy(BelongsToMany::SAVE_REPLACE);
<ide> $assoc->expects($this->once())
<ide> ->method('replaceLinks')
<ide> ->with($entity, [])
<ide> public function testSaveAssociatedWithReplace()
<ide> ]);
<ide>
<ide> $options = ['foo' => 'bar'];
<del> $assoc->saveStrategy(BelongsToMany::SAVE_REPLACE);
<add> $assoc->setSaveStrategy(BelongsToMany::SAVE_REPLACE);
<ide> $assoc->expects($this->once())->method('replaceLinks')
<ide> ->with($entity, $entity->tags, $options)
<ide> ->will($this->returnValue(true));
<ide> public function testSaveAssociatedWithReplaceReturnFalse()
<ide> ]);
<ide>
<ide> $options = ['foo' => 'bar'];
<del> $assoc->saveStrategy(BelongsToMany::SAVE_REPLACE);
<add> $assoc->setSaveStrategy(BelongsToMany::SAVE_REPLACE);
<ide> $assoc->expects($this->once())->method('replaceLinks')
<ide> ->with($entity, $entity->tags, $options)
<ide> ->will($this->returnValue(false));
<ide> public function testSaveAssociatedOnlyEntitiesAppend()
<ide> /**
<ide> * Tests that targetForeignKey() returns the correct configured value
<ide> *
<add> * @group deprecated
<ide> * @return void
<ide> */
<ide> public function testTargetForeignKey()
<add> {
<add> $this->deprecated(function () {
<add> $assoc = new BelongsToMany('Test', [
<add> 'sourceTable' => $this->article,
<add> 'targetTable' => $this->tag
<add> ]);
<add> $this->assertEquals('tag_id', $assoc->targetForeignKey());
<add> $this->assertEquals('another_key', $assoc->targetForeignKey('another_key'));
<add> $this->assertEquals('another_key', $assoc->targetForeignKey());
<add>
<add> $assoc = new BelongsToMany('Test', [
<add> 'sourceTable' => $this->article,
<add> 'targetTable' => $this->tag,
<add> 'targetForeignKey' => 'foo'
<add> ]);
<add> $this->assertEquals('foo', $assoc->targetForeignKey());
<add> });
<add> }
<add>
<add> /**
<add> * Tests that setTargetForeignKey() returns the correct configured value
<add> *
<add> * @return void
<add> */
<add> public function testSetTargetForeignKey()
<ide> {
<ide> $assoc = new BelongsToMany('Test', [
<ide> 'sourceTable' => $this->article,
<ide> 'targetTable' => $this->tag
<ide> ]);
<del> $this->assertEquals('tag_id', $assoc->targetForeignKey());
<del> $this->assertEquals('another_key', $assoc->targetForeignKey('another_key'));
<del> $this->assertEquals('another_key', $assoc->targetForeignKey());
<add> $this->assertEquals('tag_id', $assoc->getTargetForeignKey());
<add> $assoc->setTargetForeignKey('another_key');
<add> $this->assertEquals('another_key', $assoc->getTargetForeignKey());
<ide>
<ide> $assoc = new BelongsToMany('Test', [
<ide> 'sourceTable' => $this->article,
<ide> 'targetTable' => $this->tag,
<ide> 'targetForeignKey' => 'foo'
<ide> ]);
<del> $this->assertEquals('foo', $assoc->targetForeignKey());
<add> $this->assertEquals('foo', $assoc->getTargetForeignKey());
<ide> }
<ide>
<ide> /**
<ide> public function testJunctionWithCustomForeignKeys()
<ide> 'targetForeignKey' => 'Tag'
<ide> ]);
<ide> $junction = $assoc->junction();
<del> $this->assertEquals('Art', $junction->getAssociation('Articles')->foreignKey());
<del> $this->assertEquals('Tag', $junction->getAssociation('Tags')->foreignKey());
<add> $this->assertEquals('Art', $junction->getAssociation('Articles')->getForeignKey());
<add> $this->assertEquals('Tag', $junction->getAssociation('Tags')->getForeignKey());
<ide>
<ide> $inverseRelation = $this->tag->getAssociation('Articles');
<del> $this->assertEquals('Tag', $inverseRelation->foreignKey());
<del> $this->assertEquals('Art', $inverseRelation->targetForeignKey());
<add> $this->assertEquals('Tag', $inverseRelation->getForeignKey());
<add> $this->assertEquals('Art', $inverseRelation->getTargetForeignKey());
<ide> }
<ide>
<ide> /**
<ide> public function testPropertyOption()
<ide> {
<ide> $config = ['propertyName' => 'thing_placeholder'];
<ide> $association = new BelongsToMany('Thing', $config);
<del> $this->assertEquals('thing_placeholder', $association->property());
<add> $this->assertEquals('thing_placeholder', $association->getProperty());
<ide> }
<ide>
<ide> /**
<ide> public function testPropertyNoPlugin()
<ide> 'targetTable' => $mock,
<ide> ];
<ide> $association = new BelongsToMany('Contacts.Tags', $config);
<del> $this->assertEquals('tags', $association->property());
<add> $this->assertEquals('tags', $association->getProperty());
<ide> }
<ide>
<ide> /**
<ide> public function testGeneratedAssociations()
<ide>
<ide> $tagAssoc = $articles->getAssociation('Tags');
<ide> $this->assertNotEmpty($tagAssoc, 'btm should exist');
<del> $this->assertEquals($conditions, $tagAssoc->conditions());
<del> $this->assertEquals('target_foreign_key', $tagAssoc->targetForeignKey());
<del> $this->assertEquals('foreign_key', $tagAssoc->foreignKey());
<add> $this->assertEquals($conditions, $tagAssoc->getConditions());
<add> $this->assertEquals('target_foreign_key', $tagAssoc->getTargetForeignKey());
<add> $this->assertEquals('foreign_key', $tagAssoc->getForeignKey());
<ide>
<ide> $jointAssoc = $articles->getAssociation('SpecialTags');
<ide> $this->assertNotEmpty($jointAssoc, 'has many to junction should exist');
<ide> $this->assertInstanceOf('Cake\ORM\Association\HasMany', $jointAssoc);
<del> $this->assertEquals('foreign_key', $jointAssoc->foreignKey());
<add> $this->assertEquals('foreign_key', $jointAssoc->getForeignKey());
<ide>
<ide> $articleAssoc = $tags->getAssociation('Articles');
<ide> $this->assertNotEmpty($articleAssoc, 'reverse btm should exist');
<ide> $this->assertInstanceOf('Cake\ORM\Association\BelongsToMany', $articleAssoc);
<del> $this->assertEquals($conditions, $articleAssoc->conditions());
<del> $this->assertEquals('foreign_key', $articleAssoc->targetForeignKey(), 'keys should swap');
<del> $this->assertEquals('target_foreign_key', $articleAssoc->foreignKey(), 'keys should swap');
<add> $this->assertEquals($conditions, $articleAssoc->getConditions());
<add> $this->assertEquals('foreign_key', $articleAssoc->getTargetForeignKey(), 'keys should swap');
<add> $this->assertEquals('target_foreign_key', $articleAssoc->getForeignKey(), 'keys should swap');
<ide>
<ide> $jointAssoc = $tags->getAssociation('SpecialTags');
<ide> $this->assertNotEmpty($jointAssoc, 'has many to junction should exist');
<ide> $this->assertInstanceOf('Cake\ORM\Association\HasMany', $jointAssoc);
<del> $this->assertEquals('target_foreign_key', $jointAssoc->foreignKey());
<add> $this->assertEquals('target_foreign_key', $jointAssoc->getForeignKey());
<ide> }
<ide>
<ide> /** | 3 |
Ruby | Ruby | remove dead code | 79d21dddd6de11f4c2e7492167dbe0cb01a5335b | <ide><path>activerecord/test/cases/transactions_test.rb
<ide> def test_failing_on_exception
<ide> end
<ide>
<ide> def test_raising_exception_in_callback_rollbacks_in_save
<del> add_exception_raising_after_save_callback_to_topic
<del>
<del> begin
<del> @first.approved = true
<del> @first.save
<del> flunk
<del> rescue => e
<del> assert_equal "Make the transaction rollback", e.message
<del> assert !Topic.find(1).approved?
<del> ensure
<del> remove_exception_raising_after_save_callback_to_topic
<add> def @first.after_save_for_transaction
<add> raise 'Make the transaction rollback'
<ide> end
<add>
<add> @first.approved = true
<add> e = assert_raises(RuntimeError) { @first.save }
<add> assert_equal "Make the transaction rollback", e.message
<add> assert !Topic.find(1).approved?
<ide> end
<ide>
<ide> def test_update_attributes_should_rollback_on_failure
<ide> def test_cancellation_from_before_filters_rollbacks_in_save!
<ide> end
<ide>
<ide> def test_callback_rollback_in_create
<del> new_topic = Topic.new(
<del> :title => "A new topic",
<del> :author_name => "Ben",
<del> :author_email_address => "ben@example.com",
<del> :written_on => "2003-07-16t15:28:11.2233+01:00",
<del> :last_read => "2004-04-15",
<del> :bonus_time => "2005-01-30t15:28:00.00+01:00",
<del> :content => "Have a nice day",
<del> :approved => false)
<add> topic = Class.new(Topic) {
<add> def after_create_for_transaction
<add> raise 'Make the transaction rollback'
<add> end
<add> }
<add>
<add> new_topic = topic.new(:title => "A new topic",
<add> :author_name => "Ben",
<add> :author_email_address => "ben@example.com",
<add> :written_on => "2003-07-16t15:28:11.2233+01:00",
<add> :last_read => "2004-04-15",
<add> :bonus_time => "2005-01-30t15:28:00.00+01:00",
<add> :content => "Have a nice day",
<add> :approved => false)
<add>
<ide> new_record_snapshot = !new_topic.persisted?
<ide> id_present = new_topic.has_attribute?(Topic.primary_key)
<ide> id_snapshot = new_topic.id
<ide>
<ide> # Make sure the second save gets the after_create callback called.
<ide> 2.times do
<del> begin
<del> add_exception_raising_after_create_callback_to_topic
<del> new_topic.approved = true
<del> new_topic.save
<del> flunk
<del> rescue => e
<del> assert_equal "Make the transaction rollback", e.message
<del> assert_equal new_record_snapshot, !new_topic.persisted?, "The topic should have its old persisted value"
<del> assert_equal id_snapshot, new_topic.id, "The topic should have its old id"
<del> assert_equal id_present, new_topic.has_attribute?(Topic.primary_key)
<del> ensure
<del> remove_exception_raising_after_create_callback_to_topic
<del> end
<add> new_topic.approved = true
<add> e = assert_raises(RuntimeError) { new_topic.save }
<add> assert_equal "Make the transaction rollback", e.message
<add> assert_equal new_record_snapshot, !new_topic.persisted?, "The topic should have its old persisted value"
<add> assert_equal id_snapshot, new_topic.id, "The topic should have its old id"
<add> assert_equal id_present, new_topic.has_attribute?(Topic.primary_key)
<ide> end
<ide> end
<ide>
<ide> def test_callback_rollback_in_create_with_record_invalid_exception
<del> begin
<del> Topic.class_eval <<-eoruby, __FILE__, __LINE__ + 1
<del> remove_method(:after_create_for_transaction)
<del> def after_create_for_transaction
<del> raise ActiveRecord::RecordInvalid.new(Author.new)
<del> end
<del> eoruby
<add> topic = Class.new(Topic) {
<add> def after_create_for_transaction
<add> raise ActiveRecord::RecordInvalid.new(Author.new)
<add> end
<add> }
<ide>
<del> new_topic = Topic.create(:title => "A new topic")
<del> assert !new_topic.persisted?, "The topic should not be persisted"
<del> assert_nil new_topic.id, "The topic should not have an ID"
<del> ensure
<del> remove_exception_raising_after_create_callback_to_topic
<del> end
<add> new_topic = topic.create(:title => "A new topic")
<add> assert !new_topic.persisted?, "The topic should not be persisted"
<add> assert_nil new_topic.id, "The topic should not have an ID"
<ide> end
<ide>
<ide> def test_nested_explicit_transactions
<ide> def define_callback_method(callback_method)
<ide> end
<ide> end
<ide>
<del> def add_exception_raising_after_save_callback_to_topic
<del> Topic.class_eval <<-eoruby, __FILE__, __LINE__ + 1
<del> remove_method(:after_save_for_transaction)
<del> def after_save_for_transaction
<del> raise 'Make the transaction rollback'
<del> end
<del> eoruby
<del> end
<del>
<del> def remove_exception_raising_after_save_callback_to_topic
<del> Topic.class_eval <<-eoruby, __FILE__, __LINE__ + 1
<del> remove_method :after_save_for_transaction
<del> def after_save_for_transaction; end
<del> eoruby
<del> end
<del>
<del> def add_exception_raising_after_create_callback_to_topic
<del> Topic.class_eval <<-eoruby, __FILE__, __LINE__ + 1
<del> remove_method(:after_create_for_transaction)
<del> def after_create_for_transaction
<del> raise 'Make the transaction rollback'
<del> end
<del> eoruby
<del> end
<del>
<del> def remove_exception_raising_after_create_callback_to_topic
<del> Topic.class_eval <<-eoruby, __FILE__, __LINE__ + 1
<del> remove_method :after_create_for_transaction
<del> def after_create_for_transaction; end
<del> eoruby
<del> end
<del>
<ide> %w(validation save destroy).each do |filter|
<ide> define_method("add_cancelling_before_#{filter}_with_db_side_effect_to_topic") do
<ide> Topic.class_eval <<-eoruby, __FILE__, __LINE__ + 1 | 1 |
Python | Python | fix a possible typo in auto feature extraction | b10a3b3760eac3c3d201bfcad1d9ee1e3b26f3c0 | <ide><path>src/transformers/models/auto/feature_extraction_auto.py
<ide> ("swin", "ViTFeatureExtractor"),
<ide> ("swinv2", "ViTFeatureExtractor"),
<ide> ("van", "ConvNextFeatureExtractor"),
<del> ("videomae", "ViTFeatureExtractor"),
<add> ("videomae", "VideoMAEFeatureExtractor"),
<ide> ("vilt", "ViltFeatureExtractor"),
<ide> ("vit", "ViTFeatureExtractor"),
<ide> ("vit_mae", "ViTFeatureExtractor"), | 1 |
PHP | PHP | fix failing tests because of new validator | 9232df839d6a0375e143732919f4f9ddd7777f7b | <ide><path>lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php
<ide> public function testInteractiveFieldValidation() {
<ide> $this->Task->initValidations();
<ide> $this->Task->interactive = true;
<ide> $this->Task->expects($this->any())->method('in')
<del> ->will($this->onConsecutiveCalls('21', 'y', '17', 'n'));
<add> ->will($this->onConsecutiveCalls('22', 'y', '17', 'n'));
<ide>
<ide> $result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false));
<ide> $expected = array('notempty' => 'notempty', 'maxlength' => 'maxlength');
<ide> public function testInteractiveFieldValidationWithBogusResponse() {
<ide> $this->Task->interactive = true;
<ide>
<ide> $this->Task->expects($this->any())->method('in')
<del> ->will($this->onConsecutiveCalls('999999', '21', 'n'));
<add> ->will($this->onConsecutiveCalls('999999', '22', 'n'));
<ide>
<ide> $this->Task->expects($this->at(7))->method('out')
<ide> ->with($this->stringContains('make a valid')); | 1 |
Ruby | Ruby | move method to private section | 71003d63b6e217625450b0942a7afb8d7d1d14d9 | <ide><path>activerecord/lib/active_record/attribute_assignment.rb
<ide> module AttributeAssignment
<ide> extend ActiveSupport::Concern
<ide> include ActiveModel::AttributeAssignment
<ide>
<add> # Alias for `assign_attributes`. See +ActiveModel::AttributeAssignment+.
<add> def attributes=(attributes)
<add> assign_attributes(attributes)
<add> end
<add>
<add> private
<add>
<ide> def _assign_attributes(attributes) # :nodoc:
<ide> multi_parameter_attributes = {}
<ide> nested_parameter_attributes = {}
<ide> def _assign_attributes(attributes) # :nodoc:
<ide> assign_multiparameter_attributes(multi_parameter_attributes) unless multi_parameter_attributes.empty?
<ide> end
<ide>
<del> # Alias for `assign_attributes`. See +ActiveModel::AttributeAssignment+
<del> def attributes=(attributes)
<del> assign_attributes(attributes)
<del> end
<del>
<del> private
<del>
<ide> # Assign any deferred nested attributes after the base attributes have been set.
<ide> def assign_nested_parameter_attributes(pairs)
<ide> pairs.each { |k, v| _assign_attribute(k, v) } | 1 |
Text | Text | move andreasmadsen to emeritus | b7136827f5d9f4f65bd0a60e75c4a9531cf4312a | <ide><path>README.md
<ide> For information about the governance of the Node.js project, see
<ide> **Antoine du Hamel** <duhamelantoine1995@gmail.com> (he/him)
<ide> * [ak239](https://github.com/ak239) -
<ide> **Aleksei Koziatinskii** <ak239spb@gmail.com>
<del>* [AndreasMadsen](https://github.com/AndreasMadsen) -
<del>**Andreas Madsen** <amwebdk@gmail.com> (he/him)
<ide> * [antsmartian](https://github.com/antsmartian) -
<ide> **Anto Aravinth** <anto.aravinth.cse@gmail.com> (he/him)
<ide> * [apapirovski](https://github.com/apapirovski) -
<ide> For information about the governance of the Node.js project, see
<ide> **Andras** <andras@kinvey.com>
<ide> * [AnnaMag](https://github.com/AnnaMag) -
<ide> **Anna M. Kedzierska** <anna.m.kedzierska@gmail.com>
<add>* [AndreasMadsen](https://github.com/AndreasMadsen) -
<add>**Andreas Madsen** <amwebdk@gmail.com> (he/him)
<ide> * [aqrln](https://github.com/aqrln) -
<ide> **Alexey Orlenko** <eaglexrlnk@gmail.com> (he/him)
<ide> * [bnoordhuis](https://github.com/bnoordhuis) - | 1 |
Ruby | Ruby | avoid a subquery in updating counter cache | cbab69c2789ff49bd9e3580eba0ac273190c9dc7 | <ide><path>activerecord/lib/active_record/associations/builder/belongs_to.rb
<ide> def belongs_to_counter_cache_after_update(reflection)
<ide> private
<ide> def counter_cache_target(reflection, model, foreign_key)
<ide> primary_key = reflection.association_primary_key(model)
<del>
<del> if primary_key == model.primary_key
<del> foreign_key
<del> else
<del> model.unscoped.where!(primary_key => foreign_key)
<del> end
<add> model.unscoped.where!(primary_key => foreign_key)
<ide> end
<ide> end
<ide> end
<ide><path>activerecord/lib/active_record/counter_cache.rb
<ide> def update_counters(id, counters)
<ide> updates << sanitize_sql_for_assignment(touch_updates) unless touch_updates.empty?
<ide> end
<ide>
<del> unscoped.where(primary_key => id).update_all updates.join(", ")
<add> if id.is_a?(Relation) && self == id.klass
<add> relation = id
<add> else
<add> relation = unscoped.where!(primary_key => id)
<add> end
<add>
<add> relation.update_all updates.join(", ")
<ide> end
<ide>
<ide> # Increment a numeric field by one, via a direct SQL update. | 2 |
Javascript | Javascript | use proper selector when overriding the css | 2264413beb96e390ae20518bc79b35c51569acce | <ide><path>src/ng/directive/ngShowHide.js
<ide> var NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';
<ide> *
<ide> * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change
<ide> * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
<del> * class in CSS:
<add> * class CSS. Note that the selector that needs to be used is actually `.ng-hide:not(.ng-hide-animate)` to cope
<add> * with extra animation classes that can be added.
<ide> *
<ide> * ```css
<del> * .ng-hide {
<add> * .ng-hide:not(.ng-hide-animate) {
<ide> * /* this is just another form of hiding an element */
<ide> * display: block!important;
<ide> * position: absolute; | 1 |
Text | Text | add rename instruction | 0252b6ac4e41f54621da90991bb40a2500f39ac6 | <ide><path>guide/chinese/bash/bash-mv/index.md
<ide> mv source target
<ide>
<ide> 第一个参数是要移动的文件,第二个参数是将其移动到的位置。
<ide>
<add>**更改档名。**
<add>```
<add>mv old_name new_name
<add>```
<add>
<add>第一个参数是原来的名字,第二个参数是要改成的名字
<add>
<ide> 常用选项:
<ide>
<ide> * `-f`强制移动它们并覆盖文件而不用与用户核对。
<ide> * `-i`在覆盖文件之前提示确认。
<ide>
<ide> ### 更多信息:
<ide>
<del>* [维基百科](https://en.wikipedia.org/wiki/Mv)
<ide>\ No newline at end of file
<add>* [维基百科](https://en.wikipedia.org/wiki/Mv) | 1 |
Text | Text | replace first person point of view on guides | f52a13cdf457a4163de60c04801bc77954124a56 | <ide><path>guides/source/active_support_core_extensions.md
<ide> NOTE: Defined in `active_support/core_ext/module/aliasing.rb`.
<ide>
<ide> #### `alias_attribute`
<ide>
<del>Model attributes have a reader, a writer, and a predicate. You can alias a model attribute having the corresponding three methods defined for you in one shot. As in other aliasing methods, the new name is the first argument, and the old name is the second (my mnemonic is they go in the same order as if you did an assignment):
<add>Model attributes have a reader, a writer, and a predicate. You can alias a model attribute having the corresponding three methods defined for you in one shot. As in other aliasing methods, the new name is the first argument, and the old name is the second (one mnemonic is that they go in the same order as if you did an assignment):
<ide>
<ide> ```ruby
<ide> class User < ActiveRecord::Base
<del> # let me refer to the email column as "login",
<del> # possibly meaningful for authentication code
<add> # You can refer to the email column as "login".
<add> # This can be meaningful for authentication code.
<ide> alias_attribute :login, :email
<ide> end
<ide> ```
<ide><path>guides/source/security.md
<ide> After reading this guide, you will know:
<ide> Introduction
<ide> ------------
<ide>
<del>Web application frameworks are made to help developers build web applications. Some of them also help you with securing the web application. In fact one framework is not more secure than another: If you use it correctly, you will be able to build secure apps with many frameworks. Ruby on Rails has some clever helper methods, for example against SQL injection, so that this is hardly a problem. It's nice to see that all of the Rails applications I audited had a good level of security.
<add>Web application frameworks are made to help developers build web applications. Some of them also help you with securing the web application. In fact one framework is not more secure than another: If you use it correctly, you will be able to build secure apps with many frameworks. Ruby on Rails has some clever helper methods, for example against SQL injection, so that this is hardly a problem.
<ide>
<ide> In general there is no such thing as plug-n-play security. Security depends on the people using the framework, and sometimes on the development method. And it depends on all layers of a web application environment: The back-end storage, the web server and the web application itself (and possibly other layers or applications).
<ide>
<ide> The Gartner Group however estimates that 75% of attacks are at the web application layer, and found out "that out of 300 audited sites, 97% are vulnerable to attack". This is because web applications are relatively easy to attack, as they are simple to understand and manipulate, even by the lay person.
<ide>
<ide> The threats against web applications include user account hijacking, bypass of access control, reading or modifying sensitive data, or presenting fraudulent content. Or an attacker might be able to install a Trojan horse program or unsolicited e-mail sending software, aim at financial enrichment or cause brand name damage by modifying company resources. In order to prevent attacks, minimize their impact and remove points of attack, first of all, you have to fully understand the attack methods in order to find the correct countermeasures. That is what this guide aims at.
<ide>
<del>In order to develop secure web applications you have to keep up to date on all layers and know your enemies. To keep up to date subscribe to security mailing lists, read security blogs and make updating and security checks a habit (check the <a href="#additional-resources">Additional Resources</a> chapter). I do it manually because that's how you find the nasty logical security problems.
<add>In order to develop secure web applications you have to keep up to date on all layers and know your enemies. To keep up to date subscribe to security mailing lists, read security blogs and make updating and security checks a habit (check the <a href="#additional-resources">Additional Resources</a> chapter). It is done manually because that's how you find the nasty logical security problems.
<ide>
<ide> Sessions
<ide> --------
<ide> In the <a href="#sessions">session chapter</a> you have learned that most Rails
<ide>
<ide> It is important to notice that the actual crafted image or link doesn't necessarily have to be situated in the web application's domain, it can be anywhere - in a forum, blog post or email.
<ide>
<del>CSRF appears very rarely in CVE (Common Vulnerabilities and Exposures) - less than 0.1% in 2006 - but it really is a 'sleeping giant' [Grossman]. This is in stark contrast to the results in my (and others) security contract work - _CSRF is an important security issue_.
<add>CSRF appears very rarely in CVE (Common Vulnerabilities and Exposures) - less than 0.1% in 2006 - but it really is a 'sleeping giant' [Grossman]. This is in stark contrast to the results in many security contract works - _CSRF is an important security issue_.
<ide>
<ide> ### CSRF Countermeasures
<ide>
<ide> For _countermeasures against CSRF in administration interfaces and Intranet appl
<ide>
<ide> The common admin interface works like this: it's located at www.example.com/admin, may be accessed only if the admin flag is set in the User model, re-displays user input and allows the admin to delete/add/edit whatever data desired. Here are some thoughts about this:
<ide>
<del>* It is very important to _think about the worst case_: What if someone really got hold of my cookie or user credentials. You could _introduce roles_ for the admin interface to limit the possibilities of the attacker. Or how about _special login credentials_ for the admin interface, other than the ones used for the public part of the application. Or a _special password for very serious actions_?
<add>* It is very important to _think about the worst case_: What if someone really got hold of your cookies or user credentials. You could _introduce roles_ for the admin interface to limit the possibilities of the attacker. Or how about _special login credentials_ for the admin interface, other than the ones used for the public part of the application. Or a _special password for very serious actions_?
<ide>
<ide> * Does the admin really have to access the interface from everywhere in the world? Think about _limiting the login to a bunch of source IP addresses_. Examine request.remote_ip to find out about the user's IP address. This is not bullet-proof, but a great barrier. Remember that there might be a proxy in use, though.
<ide>
<ide> If the parameter was nil, the resulting SQL query will be
<ide> SELECT * FROM users WHERE (users.activation_code IS NULL) LIMIT 1
<ide> ```
<ide>
<del>And thus it found the first user in the database, returned it and logged them in. You can find out more about it in [my blog post](http://www.rorsecurity.info/2007/10/28/restful_authentication-login-security/). _It is advisable to update your plug-ins from time to time_. Moreover, you can review your application to find more flaws like this.
<add>And thus it found the first user in the database, returned it and logged them in. You can find out more about it in [this blog post](http://www.rorsecurity.info/2007/10/28/restful_authentication-login-security/). _It is advisable to update your plug-ins from time to time_. Moreover, you can review your application to find more flaws like this.
<ide>
<ide> ### Brute-Forcing Accounts
<ide>
<ide> Imagine a blacklist deletes "script" from the user input. Now the attacker injec
<ide> strip_tags("some<<b>script>alert('hello')<</b>/script>")
<ide> ```
<ide>
<del>This returned "some<script>alert('hello')</script>", which makes an attack work. That's why I vote for a whitelist approach, using the updated Rails 2 method sanitize():
<add>This returned "some<script>alert('hello')</script>", which makes an attack work. That's why a whitelist approach is better, using the updated Rails 2 method sanitize():
<ide>
<ide> ```ruby
<ide> tags = %w(a acronym b strong i em li ul ol h1 h2 h3 h4 h5 h6 blockquote br cite sub sup ins p)
<ide> The [moz-binding](http://www.securiteam.com/securitynews/5LP051FHPE.html) CSS pr
<ide>
<ide> #### Countermeasures
<ide>
<del>This example, again, showed that a blacklist filter is never complete. However, as custom CSS in web applications is a quite rare feature, I am not aware of a whitelist CSS filter. _If you want to allow custom colors or images, you can allow the user to choose them and build the CSS in the web application_. Use Rails' `sanitize()` method as a model for a whitelist CSS filter, if you really need one.
<add>This example, again, showed that a blacklist filter is never complete. However, as custom CSS in web applications is a quite rare feature, it may be hard to find a good whitelist CSS filter. _If you want to allow custom colors or images, you can allow the user to choose them and build the CSS in the web application_. Use Rails' `sanitize()` method as a model for a whitelist CSS filter, if you really need one.
<ide>
<ide> ### Textile Injection
<ide>
<ide><path>guides/source/testing.md
<ide> Unit Testing your Models
<ide>
<ide> In Rails, models tests are what you write to test your models.
<ide>
<del>For this guide we will be using Rails _scaffolding_. It will create the model, a migration, controller and views for the new resource in a single operation. It will also create a full test suite following Rails best practices. I will be using examples from this generated code and will be supplementing it with additional examples where necessary.
<add>For this guide we will be using Rails _scaffolding_. It will create the model, a migration, controller and views for the new resource in a single operation. It will also create a full test suite following Rails best practices. We will be using examples from this generated code and will be supplementing it with additional examples where necessary.
<ide>
<ide> NOTE: For more information on Rails <i>scaffolding</i>, refer to [Getting Started with Rails](getting_started.html)
<ide> | 3 |
Text | Text | add note about casing to getstaticpaths docs | 93cb635e9e15e0e9cac2b82b899b4da8c6614be0 | <ide><path>docs/api-reference/data-fetching/get-static-paths.md
<ide> The value for each `params` object must match the parameters used in the page na
<ide> - If the page name uses [catch-all routes](/docs/routing/dynamic-routes.md#catch-all-routes) like `pages/[...slug]`, then `params` should contain `slug` (which is an array). If this array is `['hello', 'world']`, then Next.js will statically generate the page at `/hello/world`.
<ide> - If the page uses an [optional catch-all route](/docs/routing/dynamic-routes.md#optional-catch-all-routes), use `null`, `[]`, `undefined` or `false` to render the root-most route. For example, if you supply `slug: false` for `pages/[[...slug]]`, Next.js will statically generate the page `/`.
<ide>
<add>The `params` strings are **case-sensitive** and ideally should be normalized to ensure the paths are generated correctly. For example, if `WoRLD` is returned for a param it will only match if `WoRLD` is the actual path visited, not `world` or `World`.
<add>
<ide> Separate of the `params` object a `locale` field can be returned when [i18n is configured](/docs/advanced-features/i18n-routing.md), which configures the locale for the path being generated.
<ide>
<ide> ### `fallback: false` | 1 |
Ruby | Ruby | deduplicate same clauses in `merge` | 5528a79dc787078b70240959c4905a53f985446c | <ide><path>activerecord/lib/active_record/relation/where_clause.rb
<ide> def merge(other, rewhere = nil)
<ide> predicates_unreferenced_by(other)
<ide> end
<ide>
<del> WhereClause.new(predicates + other.predicates)
<add> WhereClause.new(predicates | other.predicates)
<ide> end
<ide>
<ide> def except(*columns)
<ide><path>activerecord/test/cases/relation/merging_test.rb
<ide> def test_merge_not_in_clause
<ide> assert_equal [], Author.where(id: mary).merge(non_mary_and_bob)
<ide> end
<ide>
<add> def test_merge_doesnt_duplicate_same_clauses
<add> david, mary, bob = authors(:david, :mary, :bob)
<add>
<add> non_mary_and_bob = Author.where.not(id: [mary, bob])
<add>
<add> author_id = Author.connection.quote_table_name("authors.id")
<add> assert_sql(/WHERE #{Regexp.escape(author_id)} NOT IN \((\?|\W?\w?\d), \g<1>\)\z/) do
<add> assert_equal [david], non_mary_and_bob.merge(non_mary_and_bob)
<add> end
<add>
<add> only_david = Author.where("#{author_id} IN (?)", david)
<add>
<add> assert_sql(/WHERE \(#{Regexp.escape(author_id)} IN \(1\)\)\z/) do
<add> assert_equal [david], only_david.merge(only_david)
<add> end
<add> end
<add>
<ide> def test_relation_merging
<ide> devs = Developer.where("salary >= 80000").merge(Developer.limit(2)).merge(Developer.order("id ASC").where("id < 3"))
<ide> assert_equal [developers(:david), developers(:jamis)], devs.to_a | 2 |
PHP | PHP | allow custom queueing of commands and handlers | e33584db10fa3ca84bce135998a62e8c7529bff5 | <ide><path>src/Illuminate/Bus/Dispatcher.php
<ide> public function dispatchToQueue($command)
<ide> throw new \RuntimeException("Queue resolver did not return a Queue implementation.");
<ide> }
<ide>
<del> $queue->push($command);
<add> if (method_exists($command, 'queue'))
<add> {
<add> $command->queue($queue, $command);
<add> }
<add> else
<add> {
<add> $queue->push($command);
<add> }
<ide> }
<ide>
<ide> /**
<ide><path>src/Illuminate/Events/Dispatcher.php
<ide> protected function createQueuedHandlerCallable($class, $method)
<ide> {
<ide> return function() use ($class, $method)
<ide> {
<del> $this->resolveQueue()->push('Illuminate\Events\CallQueuedHandler@call', [
<del> 'class' => $class, 'method' => $method, 'data' => serialize(func_get_args()),
<del> ]);
<add> if (method_exists($class, 'queue'))
<add> {
<add> $this->callQueueMethodOnHandler($class, $method, func_get_args());
<add> }
<add> else
<add> {
<add> $this->resolveQueue()->push('Illuminate\Events\CallQueuedHandler@call', [
<add> 'class' => $class, 'method' => $method, 'data' => serialize(func_get_args()),
<add> ]);
<add> }
<ide> };
<ide> }
<ide>
<add> /**
<add> * Call the queue method on the handler class.
<add> *
<add> * @param string $class
<add> * @param string $method
<add> * @param array $arguments
<add> * @return void
<add> */
<add> protected function callQueueMethodOnHandler($class, $method, $arguments)
<add> {
<add> $handler = (new ReflectionClass($class))->newInstanceWithoutConstructor();
<add>
<add> $handler->queue($this->resolveQueue(), 'Illuminate\Events\CallQueuedHandler@call', [
<add> 'class' => $class, 'method' => $method, 'data' => serialize($arguments),
<add> ]);
<add> }
<add>
<ide> /**
<ide> * Remove a set of listeners from the dispatcher.
<ide> *
<ide><path>tests/Bus/BusDispatcherTest.php
<ide> public function testCommandsThatShouldBeQueuedAreQueued()
<ide> }
<ide>
<ide>
<add> public function testCommandsThatShouldBeQueuedAreQueuedUsingCustomHandler()
<add> {
<add> $container = new Container;
<add> $dispatcher = new Dispatcher($container, function() {
<add> $mock = m::mock('Illuminate\Contracts\Queue\Queue');
<add> $mock->shouldReceive('push')->once();
<add> return $mock;
<add> });
<add>
<add> $dispatcher->dispatch(new BusDispatcherTestCustomQueueCommand);
<add> }
<add>
<add>
<ide> public function testHandlersThatShouldBeQueuedAreQueued()
<ide> {
<ide> $container = new Container;
<ide> public function handle(BusDispatcherTestBasicCommand $command)
<ide> class BusDispatcherTestQueuedHandler implements Illuminate\Contracts\Queue\ShouldBeQueued {
<ide>
<ide> }
<add>
<add>
<add>class BusDispatcherTestCustomQueueCommand implements Illuminate\Contracts\Queue\ShouldBeQueued {
<add> public function queue($queue, $command)
<add> {
<add> $queue->push($command);
<add> }
<add>}
<ide><path>tests/Events/EventsDispatcherTest.php
<ide> public function testQueuedEventHandlersAreQueued()
<ide> $d->fire('some.event', ['foo', 'bar']);
<ide> }
<ide>
<add>
<add> public function testQueuedEventHandlersAreQueuedWithCustomHandlers()
<add> {
<add> $d = new Dispatcher;
<add> $queue = m::mock('Illuminate\Contracts\Queue\Queue');
<add> $queue->shouldReceive('push')->once()->with('Illuminate\Events\CallQueuedHandler@call', [
<add> 'class' => 'TestDispatcherQueuedHandlerCustomQueue',
<add> 'method' => 'someMethod',
<add> 'data' => serialize(['foo', 'bar']),
<add> ]);
<add> $d->setQueueResolver(function() use ($queue) { return $queue; });
<add>
<add> $d->listen('some.event', 'TestDispatcherQueuedHandlerCustomQueue@someMethod');
<add> $d->fire('some.event', ['foo', 'bar']);
<add> }
<add>
<ide> }
<ide>
<ide> class TestDispatcherQueuedHandler implements Illuminate\Contracts\Queue\ShouldBeQueued {
<ide> public function handle() {}
<ide> }
<add>
<add>class TestDispatcherQueuedHandlerCustomQueue implements Illuminate\Contracts\Queue\ShouldBeQueued {
<add> public function handle() {}
<add> public function queue($queue, $handler, array $payload)
<add> {
<add> $queue->push($handler, $payload);
<add> }
<add>} | 4 |
PHP | PHP | check data with isset() before accessing it | d7d8fc00d1834b2ec00ecca16c23d6913f8b8c4c | <ide><path>lib/Cake/Model/Model.php
<ide> protected function _saveMulti($joined, $id, $db) {
<ide> * @return void
<ide> */
<ide> public function updateCounterCache($keys = array(), $created = false) {
<del> $keys = empty($keys) ? $this->data[$this->alias] : $keys;
<add> if (empty($keys) && isset($this->data[$this->alias])) {
<add> $keys = $this->data[$this->alias];
<add> }
<ide> $keys['old'] = isset($keys['old']) ? $keys['old'] : array();
<ide>
<ide> foreach ($this->belongsTo as $parent => $assoc) { | 1 |
PHP | PHP | throw exception on cookie session driver | 378a4bff5f38f670a0c1a5978be523d70b00e0e3 | <ide><path>src/Illuminate/Session/SessionManager.php
<ide> <?php namespace Illuminate\Session;
<ide>
<add>use InvalidArgumentException;
<ide> use Illuminate\Support\Manager;
<ide> use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler;
<ide>
<ide> protected function createArrayDriver()
<ide> */
<ide> protected function createCookieDriver()
<ide> {
<del> $lifetime = $this->app['config']['session.lifetime'];
<del>
<del> return $this->buildSession(new CookieSessionHandler($this->app['cookie'], $lifetime));
<add> throw new InvalidArgumentException(
<add> "The cookie session driver has been removed. Please use an alternative driver."
<add> );
<ide> }
<ide>
<ide> /** | 1 |
Java | Java | improve annotation methods in typedescriptor | e543ffdfd7070a4b559d724ba4ffa37c58b66bb4 | <ide><path>spring-context/src/main/java/org/springframework/format/support/FormattingConversionService.java
<ide> /*
<del> * Copyright 2002-2011 the original author or authors.
<add> * Copyright 2002-2012 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this file except in compliance with the License.
<ide> public Set<ConvertiblePair> getConvertibleTypes() {
<ide> }
<ide>
<ide> public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
<del> return sourceType.getAnnotation(annotationType) != null;
<add> return sourceType.hasAnnotation(annotationType);
<ide> }
<ide>
<ide> public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
<ide> public Set<ConvertiblePair> getConvertibleTypes() {
<ide> }
<ide>
<ide> public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
<del> return targetType.getAnnotation(annotationType) != null;
<add> return targetType.hasAnnotation(annotationType);
<ide> }
<ide>
<ide> public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
<ide><path>spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
<ide> public Annotation[] getAnnotations() {
<ide> return this.annotations;
<ide> }
<ide>
<add> /**
<add> * Determine if this type descriptor has the specified annotation.
<add> * @param annotationType the annotation type
<add> * @return <tt>true</tt> if the annotation is present
<add> */
<add> public boolean hasAnnotation(Class<? extends Annotation> annotationType) {
<add> return getAnnotation(annotationType) != null;
<add> }
<add>
<ide> /**
<ide> * Obtain the annotation associated with this type descriptor of the specified type.
<ide> * @param annotationType the annotation type
<ide> * @return the annotation, or null if no such annotation exists on this type descriptor
<ide> */
<del> public Annotation getAnnotation(Class<? extends Annotation> annotationType) {
<add> @SuppressWarnings("unchecked")
<add> public <T extends Annotation> T getAnnotation(Class<T> annotationType) {
<ide> for (Annotation annotation : getAnnotations()) {
<ide> if (annotation.annotationType().equals(annotationType)) {
<del> return annotation;
<add> return (T) annotation;
<ide> }
<ide> }
<ide> return null;
<ide><path>spring-core/src/test/java/org/springframework/core/convert/TypeDescriptorTests.java
<ide> /*
<del> * Copyright 2002-2011 the original author or authors.
<add> * Copyright 2002-2012 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this file except in compliance with the License.
<ide> public void parameterAnnotated() throws Exception {
<ide> assertEquals(String.class, t1.getType());
<ide> assertEquals(1, t1.getAnnotations().length);
<ide> assertNotNull(t1.getAnnotation(ParameterAnnotation.class));
<add> assertTrue(t1.hasAnnotation(ParameterAnnotation.class));
<add> assertEquals(123, t1.getAnnotation(ParameterAnnotation.class).value());
<ide> }
<ide>
<ide> @Target({ElementType.PARAMETER})
<ide> @Retention(RetentionPolicy.RUNTIME)
<ide> public @interface ParameterAnnotation {
<del>
<add> int value();
<ide> }
<ide>
<del> public void testAnnotatedMethod(@ParameterAnnotation String parameter) {
<add> public void testAnnotatedMethod(@ParameterAnnotation(123) String parameter) {
<ide>
<ide> }
<ide>
<ide> public void propertyGenericClassList() throws Exception {
<ide> assertEquals(List.class, desc.getType());
<ide> assertEquals(Integer.class, desc.getElementTypeDescriptor().getType());
<ide> assertNotNull(desc.getAnnotation(MethodAnnotation1.class));
<add> assertTrue(desc.hasAnnotation(MethodAnnotation1.class));
<ide> }
<ide>
<ide> public static class GenericClass<T> { | 3 |
Ruby | Ruby | use sqlite3 adapter in examples | 15720df1808b249bae91e5600d6f0676990a7de0 | <ide><path>activerecord/lib/active_record/connection_handling.rb
<ide> module ConnectionHandling
<ide> # Example for SQLite database:
<ide> #
<ide> # ActiveRecord::Base.establish_connection(
<del> # adapter: "sqlite",
<add> # adapter: "sqlite3",
<ide> # database: "path/to/dbfile"
<ide> # )
<ide> #
<ide> # Also accepts keys as strings (for parsing from YAML for example):
<ide> #
<ide> # ActiveRecord::Base.establish_connection(
<del> # "adapter" => "sqlite",
<add> # "adapter" => "sqlite3",
<ide> # "database" => "path/to/dbfile"
<ide> # )
<ide> # | 1 |
Text | Text | fix broken links in docs index.md | 4063f96bb5581123959fd17c10f666bf2bf17ebd | <ide><path>docs/index.md
<ide> There are two categories of docs: [Guides](./guides/) and [API docs](./api/). Gu
<ide> * [Removing Players](./guides/removing-players.md) - Helpful for using VideoJS in single page apps.
<ide>
<ide> ## API Docs
<del>- The most relevant API doc is the [player API doc](./api/vjs.Player.md).
<del>- [Full list of API Docs](./api/)
<add>- The most relevant API doc is the [player API doc](http://docs.videojs.com/docs/api/player.html)
<add>- [Full list of API Docs](http://docs.videojs.com/docs/api/index.html) | 1 |
Java | Java | add support for instant in @datetimeformat | 110e0f7f2b0a07699a96bf6410299d95635b2f63 | <ide><path>spring-context/src/main/java/org/springframework/format/datetime/standard/Jsr310DateTimeFormatAnnotationFormatterFactory.java
<ide>
<ide> package org.springframework.format.datetime.standard;
<ide>
<add>import java.time.Instant;
<ide> import java.time.LocalDate;
<ide> import java.time.LocalDateTime;
<ide> import java.time.LocalTime;
<ide> public class Jsr310DateTimeFormatAnnotationFormatterFactory extends EmbeddedValu
<ide> static {
<ide> // Create the set of field types that may be annotated with @DateTimeFormat.
<ide> Set<Class<?>> fieldTypes = new HashSet<>(8);
<add> fieldTypes.add(Instant.class);
<ide> fieldTypes.add(LocalDate.class);
<ide> fieldTypes.add(LocalTime.class);
<ide> fieldTypes.add(LocalDateTime.class);
<ide><path>spring-context/src/main/java/org/springframework/format/datetime/standard/TemporalAccessorParser.java
<ide> package org.springframework.format.datetime.standard;
<ide>
<ide> import java.text.ParseException;
<add>import java.time.Instant;
<ide> import java.time.LocalDate;
<ide> import java.time.LocalDateTime;
<ide> import java.time.LocalTime;
<ide> public TemporalAccessor parse(String text, Locale locale) throws ParseException
<ide>
<ide> private TemporalAccessor doParse(String text, Locale locale, DateTimeFormatter formatter) throws DateTimeParseException {
<ide> DateTimeFormatter formatterToUse = DateTimeContextHolder.getFormatter(formatter, locale);
<del> if (LocalDate.class == this.temporalAccessorType) {
<add> if (Instant.class == this.temporalAccessorType) {
<add> return formatterToUse.parse(text, Instant::from);
<add> }
<add> else if (LocalDate.class == this.temporalAccessorType) {
<ide> return LocalDate.parse(text, formatterToUse);
<ide> }
<ide> else if (LocalTime.class == this.temporalAccessorType) {
<ide><path>spring-context/src/test/java/org/springframework/format/datetime/standard/DateTimeFormattingTests.java
<ide> void testBindInstant() {
<ide> assertThat(binder.getBindingResult().getFieldValue("instant").toString().startsWith("2009-10-31T12:00")).isTrue();
<ide> }
<ide>
<add> @Test
<add> void testBindInstantAnnotated() {
<add> MutablePropertyValues propertyValues = new MutablePropertyValues();
<add> propertyValues.add("styleInstant", "2017-02-21T13:00");
<add> binder.bind(propertyValues);
<add> assertThat(binder.getBindingResult().getErrorCount()).isEqualTo(0);
<add> assertThat(binder.getBindingResult().getFieldValue("styleInstant")).isEqualTo("2017-02-21T13:00");
<add> }
<add>
<ide> @Test
<ide> @SuppressWarnings("deprecation")
<ide> void testBindInstantFromJavaUtilDate() {
<ide> public static class DateTimeBean {
<ide>
<ide> private Instant instant;
<ide>
<add> @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm")
<add> private Instant styleInstant;
<add>
<ide> private Period period;
<ide>
<ide> private Duration duration;
<ide> public void setInstant(Instant instant) {
<ide> this.instant = instant;
<ide> }
<ide>
<add> public Instant getStyleInstant() {
<add> return this.styleInstant;
<add> }
<add>
<add> public void setStyleInstant(Instant styleInstant) {
<add> this.styleInstant = styleInstant;
<add> }
<add>
<ide> public Period getPeriod() {
<ide> return this.period;
<ide> } | 3 |
Python | Python | use proper default airflow_constraints_reference | f74a2236f42fbaa83c1ad8bf4fe9bce045f67571 | <ide><path>dev/breeze/src/airflow_breeze/params/build_ci_params.py
<ide> from pathlib import Path
<ide> from typing import List
<ide>
<add>from airflow_breeze.branch_defaults import DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
<ide> from airflow_breeze.global_constants import get_airflow_version
<ide> from airflow_breeze.params.common_build_params import CommonBuildParams
<ide> from airflow_breeze.utils.path_utils import BUILD_CACHE_DIR
<ide> class BuildCiParams(CommonBuildParams):
<ide> """
<ide>
<ide> airflow_constraints_mode: str = "constraints-source-providers"
<del> airflow_constraints_reference: str = ""
<add> airflow_constraints_reference: str = DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
<ide> airflow_extras: str = "devel_ci"
<ide> airflow_pre_cached_pip_packages: bool = True
<ide> force_build: bool = False
<ide><path>dev/breeze/src/airflow_breeze/params/build_prod_params.py
<ide> from dataclasses import dataclass
<ide> from typing import List
<ide>
<del>from airflow_breeze.branch_defaults import AIRFLOW_BRANCH
<add>from airflow_breeze.branch_defaults import AIRFLOW_BRANCH, DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
<ide> from airflow_breeze.global_constants import (
<ide> AIRFLOW_SOURCES_FROM,
<ide> AIRFLOW_SOURCES_TO,
<ide> class BuildProdParams(CommonBuildParams):
<ide> additional_runtime_apt_deps: str = ""
<ide> additional_runtime_apt_env: str = ""
<ide> airflow_constraints_mode: str = "constraints"
<del> airflow_constraints_reference: str = ""
<add> airflow_constraints_reference: str = DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH
<ide> cleanup_context: bool = False
<ide> airflow_extras: str = get_airflow_extras()
<ide> disable_airflow_repo_cache: bool = False | 2 |
PHP | PHP | add test for php7's error | 18e53502ab8cbf5103af588fa3dc72258150472e | <ide><path>tests/TestCase/Error/Middleware/ErrorHandlerMiddlewareTest.php
<ide> public function testHandleException()
<ide> $this->assertContains('was not found', '' . $result->getBody());
<ide> }
<ide>
<add> /**
<add> * Test handling PHP 7's Error instance.
<add> *
<add> * @return void
<add> */
<add> public function testHandlePHP7Error()
<add> {
<add> $this->skipIf(version_compare(PHP_VERSION, '7.0.0', '<'), 'Error class only exists since PHP 7.');
<add>
<add> $middleware = new ErrorHandlerMiddleware();
<add> $request = ServerRequestFactory::fromGlobals();
<add> $response = new Response();
<add> $error = new Error();
<add>
<add> $result = $middleware->handleException($error, $request, $response);
<add> $this->assertInstanceOf(Response::class, $result);
<add> }
<add>
<ide> /**
<ide> * Test rendering an error page logs errors
<ide> * | 1 |
Mixed | Javascript | add createrequire method | 411063c6f5750f4a2243ef5154c589109d9b807c | <ide><path>doc/api/deprecations.md
<ide> The `_channel` property of child process objects returned by `spawn()` and
<ide> similar functions is not intended for public use. Use `ChildProcess.channel`
<ide> instead.
<ide>
<add><a id="DEP0130"></a>
<add>### DEP00XX: Module.createRequireFromPath()
<add><!-- YAML
<add>changes:
<add> - version: REPLACEME
<add> pr-url: https://github.com/nodejs/node/pull/27405
<add> description: Documentation-only.
<add>-->
<add>
<add>Type: Documentation-only
<add>
<add>Module.createRequireFromPath() is deprecated. Please use [`module.createRequire()`][] instead.
<add>
<ide> [`--pending-deprecation`]: cli.html#cli_pending_deprecation
<ide> [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
<ide> [`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
<ide> instead.
<ide> [`http.request()`]: http.html#http_http_request_options_callback
<ide> [`https.get()`]: https.html#https_https_get_options_callback
<ide> [`https.request()`]: https.html#https_https_request_options_callback
<add>[`module.createRequire()`]: modules.html#modules_module_createrequire_filename
<ide> [`os.networkInterfaces()`]: os.html#os_os_networkinterfaces
<ide> [`os.tmpdir()`]: os.html#os_os_tmpdir
<ide> [`process.env`]: process.html#process_process_env
<ide><path>doc/api/modules.md
<ide> by the [module wrapper][]. To access it, require the `Module` module:
<ide> const builtin = require('module').builtinModules;
<ide> ```
<ide>
<add>### module.createRequire(filename)
<add><!-- YAML
<add>added: REPLACEME
<add>-->
<add>
<add>* `filename` {string|URL} Filename to be used to construct the require
<add> function. Must be a file URL object, file URL string, or absolute path
<add> string.
<add>* Returns: {require} Require function
<add>
<add>```js
<add>const { createRequire } = require('module');
<add>const requireUtil = createRequire(require.resolve('../src/utils/'));
<add>
<add>// Require `../src/utils/some-tool`
<add>requireUtil('./some-tool');
<add>```
<add>
<ide> ### module.createRequireFromPath(filename)
<ide> <!-- YAML
<ide> added: v10.12.0
<add>deprecated: REPLACEME
<ide> -->
<ide>
<ide> * `filename` {string} Filename to be used to construct the relative require
<ide> function.
<ide> * Returns: {require} Require function
<ide>
<add>> Stability: 0 - Deprecated: Please use [`createRequire()`][] instead.
<add>
<ide> ```js
<ide> const { createRequireFromPath } = require('module');
<ide> const requireUtil = createRequireFromPath('../src/utils/');
<ide> requireUtil('./some-tool');
<ide> [`Error`]: errors.html#errors_class_error
<ide> [`__dirname`]: #modules_dirname
<ide> [`__filename`]: #modules_filename
<add>[`createRequire()`]: #modules_module_createrequire_filename
<ide> [`module` object]: #modules_the_module_object
<ide> [`path.dirname()`]: path.html#path_path_dirname_path
<ide> [exports shortcut]: #modules_exports_shortcut
<ide><path>lib/internal/modules/cjs/loader.js
<ide> const { JSON, Object, Reflect } = primordials;
<ide>
<ide> const { NativeModule } = require('internal/bootstrap/loaders');
<del>const { pathToFileURL } = require('internal/url');
<add>const { pathToFileURL, fileURLToPath, URL } = require('internal/url');
<ide> const { deprecate } = require('internal/util');
<ide> const vm = require('vm');
<ide> const assert = require('internal/assert');
<ide> Module.runMain = function() {
<ide> Module._load(process.argv[1], null, true);
<ide> };
<ide>
<del>Module.createRequireFromPath = (filename) => {
<add>function createRequireFromPath(filename) {
<ide> // Allow a directory to be passed as the filename
<ide> const trailingSlash =
<ide> filename.endsWith(path.sep) || path.sep !== '/' && filename.endsWith('\\');
<ide> Module.createRequireFromPath = (filename) => {
<ide>
<ide> m.paths = Module._nodeModulePaths(m.path);
<ide> return makeRequireFunction(m);
<del>};
<add>}
<add>
<add>Module.createRequireFromPath = createRequireFromPath;
<add>
<add>const createRequireError = 'must be a file URL object, file URL string, or' +
<add> 'absolute path string';
<add>
<add>function createRequire(filename) {
<add> let filepath;
<add> if (typeof filename === 'object' && !(filename instanceof URL)) {
<add> throw new ERR_INVALID_ARG_VALUE('filename', filename, createRequireError);
<add> } else if (typeof filename === 'object' ||
<add> typeof filename === 'string' && !path.isAbsolute(filename)) {
<add> try {
<add> filepath = fileURLToPath(filename);
<add> } catch {
<add> throw new ERR_INVALID_ARG_VALUE('filename', filename,
<add> createRequireError);
<add> }
<add> } else if (typeof filename !== 'string') {
<add> throw new ERR_INVALID_ARG_VALUE('filename', filename, createRequireError);
<add> } else {
<add> filepath = filename;
<add> }
<add> return createRequireFromPath(filepath);
<add>}
<add>
<add>Module.createRequire = createRequire;
<ide>
<ide> Module._initPaths = function() {
<ide> var homeDir;
<ide><path>test/parallel/test-module-create-require.js
<ide> require('../common');
<ide> const assert = require('assert');
<ide> const path = require('path');
<ide>
<del>const { createRequireFromPath } = require('module');
<add>const { createRequire, createRequireFromPath } = require('module');
<ide>
<ide> const p = path.resolve(__dirname, '..', 'fixtures', 'fake.js');
<add>const u = new URL(`file://${p}`);
<ide>
<ide> const req = createRequireFromPath(p);
<ide> assert.strictEqual(req('./baz'), 'perhaps I work');
<add>
<add>const reqToo = createRequire(u);
<add>assert.deepStrictEqual(reqToo('./experimental'), { ofLife: 42 });
<add>
<add>assert.throws(() => {
<add> createRequire('https://github.com/nodejs/node/pull/27405/');
<add>}, {
<add> code: 'ERR_INVALID_ARG_VALUE'
<add>});
<add>
<add>assert.throws(() => {
<add> createRequire('../');
<add>}, {
<add> code: 'ERR_INVALID_ARG_VALUE'
<add>});
<add>
<add>assert.throws(() => {
<add> createRequire({});
<add>}, {
<add> code: 'ERR_INVALID_ARG_VALUE'
<add>}); | 4 |
Python | Python | fix import of symbols (now nested one level lower) | 9b0de9fb43fc5fccaeb3115c5b24c123b45e89ab | <ide><path>spacy/lang/ga/tokenizer_exceptions.py
<ide> # encoding: utf8
<ide> from __future__ import unicode_literals
<ide>
<del>from ..symbols import ORTH, LEMMA, NORM, POS
<add>from ...symbols import ORTH, LEMMA, NORM, POS
<ide>
<ide>
<ide> _exc = { | 1 |
PHP | PHP | add additional test coverage | 9d3b5e63cc8ed75a5abdf8ebd683d48176f3bc9f | <ide><path>tests/TestCase/View/Form/EntityContextTest.php
<ide> public function testOperationsNoTableArg() {
<ide>
<ide> $result = $context->error('title');
<ide> $this->assertEquals($row->errors('title'), $result);
<add> $this->assertTrue($context->hasError('title'));
<ide> }
<ide>
<ide> /** | 1 |
Python | Python | fix broken migration for sqlite3 | 44031bf72b4c9dd9a71a16dc2743081403f9d28b | <ide><path>airflow/migrations/versions/98271e7606e2_add_scheduling_decision_to_dagrun_and_.py
<ide> def upgrade():
<ide> """Apply Add scheduling_decision to DagRun and DAG"""
<ide> conn = op.get_bind() # pylint: disable=no-member
<ide> is_mysql = bool(conn.dialect.name == "mysql")
<add> is_sqlite = bool(conn.dialect.name == "sqlite")
<ide> timestamp = sa.TIMESTAMP(timezone=True) if not is_mysql else mysql.TIMESTAMP(fsp=6, timezone=True)
<ide>
<ide> with op.batch_alter_table('dag_run', schema=None) as batch_op:
<ide> def upgrade():
<ide> # Set it to true here as it makes us take the slow/more complete path, and when it's next parsed by the
<ide> # DagParser it will get set to correct value.
<ide> op.execute(
<del> "UPDATE dag SET concurrency={}, has_task_concurrency_limits=true where concurrency IS NULL".format(
<del> concurrency
<add> "UPDATE dag SET concurrency={}, has_task_concurrency_limits={} where concurrency IS NULL".format(
<add> concurrency, 1 if is_sqlite else sa.true()
<ide> )
<ide> )
<ide> with op.batch_alter_table('dag', schema=None) as batch_op: | 1 |
Ruby | Ruby | increase tests timeout | 2bdf0d60683111c96cb96d7cccfee4cf8ae8b372 | <ide><path>Library/Homebrew/test/cmd/reinstall_spec.rb
<ide> it_behaves_like "parseable arguments"
<ide> end
<ide>
<del>describe "brew reinstall", :integration_test, timeout: 120 do
<add>describe "brew reinstall", :integration_test do
<ide> it "reinstalls a Formula" do
<ide> install_test_formula "testball"
<ide> foo_dir = HOMEBREW_CELLAR/"testball/0.1/bin"
<ide><path>Library/Homebrew/test/dev-cmd/test_spec.rb
<ide> end
<ide>
<ide> # randomly segfaults on Linux with portable-ruby.
<del>describe "brew test", :integration_test, :needs_macos, timeout: 120 do
<add>describe "brew test", :integration_test, :needs_macos do
<ide> it "tests a given Formula" do
<ide> install_test_formula "testball", <<~'RUBY'
<ide> test do
<ide><path>Library/Homebrew/test/spec_helper.rb
<ide> def find_files
<ide> end
<ide>
<ide> begin
<del> timeout = example.metadata.fetch(:timeout, 60)
<add> timeout = example.metadata.fetch(:timeout, 120)
<ide> inner_timeout = nil
<ide> Timeout.timeout(timeout) do
<ide> example.run | 3 |
Javascript | Javascript | add common.pipe, pipe name for tests | bff96029665ea430afff60aa481c09a5897168ed | <ide><path>test/common.js
<ide> exports.libDir = path.join(exports.testDir, '../lib');
<ide> exports.tmpDir = path.join(exports.testDir, 'tmp');
<ide> exports.PORT = 12346;
<ide>
<add>if (process.platform == 'win32') {
<add> exports.PIPE = '\\.\pipe\libuv-test';
<add>} else {
<add> exports.PIPE = exports.tmpDir + '/test.sock';
<add>}
<add>
<ide> var util = require('util');
<ide> for (var i in util) exports[i] = util[i];
<ide> //for (var i in exports) global[i] = exports[i]; | 1 |
PHP | PHP | move files to cake\auth | de1d35430ac93815305b8e7f9df15924adacf5aa | <add><path>src/Auth/AbstractPasswordHasher.php
<del><path>src/Controller/Component/Auth/AbstractPasswordHasher.php
<ide> * @since 2.4.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<ide> use Cake\Core\InstanceConfigTrait;
<ide>
<add><path>src/Auth/BaseAuthenticate.php
<del><path>src/Controller/Component/Auth/BaseAuthenticate.php
<ide> * @link http://cakephp.org CakePHP(tm) Project
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<add>use Cake\Auth\AbstractPasswordHasher;
<add>use Cake\Auth\PasswordHasherFactory;
<ide> use Cake\Controller\ComponentRegistry;
<del>use Cake\Controller\Component\Auth\PasswordHasherFactory;
<ide> use Cake\Core\App;
<ide> use Cake\Core\InstanceConfigTrait;
<ide> use Cake\Error;
<add><path>src/Auth/BaseAuthorize.php
<del><path>src/Controller/Component/Auth/BaseAuthorize.php
<ide> * @since 2.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<ide> use Cake\Controller\ComponentRegistry;
<ide> use Cake\Controller\Controller;
<add><path>src/Auth/BasicAuthenticate.php
<del><path>src/Controller/Component/Auth/BasicAuthenticate.php
<ide> * @since 2.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<ide> use Cake\Controller\ComponentRegistry;
<ide> use Cake\Error;
<add><path>src/Auth/ControllerAuthorize.php
<del><path>src/Controller/Component/Auth/ControllerAuthorize.php
<ide> * @since 2.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<ide> use Cake\Controller\ComponentRegistry;
<ide> use Cake\Controller\Controller;
<add><path>src/Auth/DigestAuthenticate.php
<del><path>src/Controller/Component/Auth/DigestAuthenticate.php
<ide> * @since 2.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<add>use Cake\Auth\BasicAuthenticate;
<ide> use Cake\Controller\ComponentRegistry;
<del>use Cake\Controller\Component\Auth\BasicAuthenticate;
<ide> use Cake\Network\Request;
<ide> use Cake\Network\Response;
<ide>
<add><path>src/Auth/FallbackPasswordHasher.php
<del><path>src/Controller/Component/Auth/FallbackPasswordHasher.php
<ide> * @since 3.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<del>use Cake\Controller\Component\Auth\AbstractPasswordHasher;
<add>use Cake\Auth\AbstractPasswordHasher;
<ide>
<ide> /**
<ide> * A password hasher that can use multiple different hashes where only
<add><path>src/Auth/FormAuthenticate.php
<del><path>src/Controller/Component/Auth/FormAuthenticate.php
<ide> * @since 2.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<ide> use Cake\Controller\ComponentRegistry;
<ide> use Cake\Network\Request;
<add><path>src/Auth/PasswordHasherFactory.php
<del><path>src/Controller/Component/Auth/PasswordHasherFactory.php
<ide> * @since 3.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<ide> use Cake\Core\App;
<ide>
<ide> public static function build($passwordHasher) {
<ide> }
<ide>
<ide> list($plugin, $class) = pluginSplit($class, true);
<del> $className = App::className($class, 'Controller/Component/Auth', 'PasswordHasher');
<add> $className = App::className($class, 'Auth', 'PasswordHasher');
<ide> if (!class_exists($className)) {
<ide> throw new \RuntimeException(sprintf('Password hasher class "%s" was not found.', $class));
<ide> }
<add><path>src/Auth/SimplePasswordHasher.php
<del><path>src/Controller/Component/Auth/SimplePasswordHasher.php
<ide> * @since 2.4.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<del>use Cake\Controller\Component\Auth\AbstractPasswordHasher;
<add>use Cake\Auth\AbstractPasswordHasher;
<ide> use Cake\Utility\Security;
<ide>
<ide> /**
<add><path>src/Auth/WeakPasswordHasher.php
<del><path>src/Controller/Component/Auth/WeakPasswordHasher.php
<ide> * @since 3.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Controller\Component\Auth;
<add>namespace Cake\Auth;
<ide>
<del>use Cake\Controller\Component\Auth\AbstractPasswordHasher;
<add>use Cake\Auth\AbstractPasswordHasher;
<ide> use Cake\Utility\Security;
<ide>
<ide> /**
<ide><path>src/Controller/Component/AuthComponent.php
<ide> public function constructAuthorize() {
<ide> unset($authorize[AuthComponent::ALL]);
<ide> }
<ide> foreach ($authorize as $class => $config) {
<del> $className = App::className($class, 'Controller/Component/Auth', 'Authorize');
<add> $className = App::className($class, 'Auth', 'Authorize');
<ide> if (!class_exists($className)) {
<ide> throw new Error\Exception(sprintf('Authorization adapter "%s" was not found.', $class));
<ide> }
<ide> public function constructAuthenticate() {
<ide> $class = $config['className'];
<ide> unset($config['className']);
<ide> }
<del> $className = App::className($class, 'Controller/Component/Auth', 'Authenticate');
<add> $className = App::className($class, 'Auth', 'Authenticate');
<ide> if (!class_exists($className)) {
<ide> throw new Error\Exception(sprintf('Authentication adapter "%s" was not found.', $class));
<ide> }
<add><path>tests/TestCase/Auth/BasicAuthenticateTest.php
<del><path>tests/TestCase/Controller/Component/Auth/BasicAuthenticateTest.php
<ide> * @since 2.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Test\TestCase\Controller\Component\Auth;
<add>namespace Cake\Test\TestCase\Auth;
<ide>
<del>use Cake\Controller\Component\Auth\BasicAuthenticate;
<add>use Cake\Auth\BasicAuthenticate;
<ide> use Cake\Error;
<ide> use Cake\Network\Request;
<ide> use Cake\ORM\Entity;
<add><path>tests/TestCase/Auth/ControllerAuthorizeTest.php
<del><path>tests/TestCase/Controller/Component/Auth/ControllerAuthorizeTest.php
<ide> * @since 2.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Test\TestCase\Controller\Component\Auth;
<add>namespace Cake\Test\TestCase\Auth;
<ide>
<del>use Cake\Controller\Component\Auth\ControllerAuthorize;
<add>use Cake\Auth\ControllerAuthorize;
<ide> use Cake\Controller\Controller;
<ide> use Cake\Network\Request;
<ide> use Cake\TestSuite\TestCase;
<add><path>tests/TestCase/Auth/DigestAuthenticateTest.php
<del><path>tests/TestCase/Controller/Component/Auth/DigestAuthenticateTest.php
<ide> * @since 2.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Test\TestCase\Controller\Component\Auth;
<add>namespace Cake\Test\TestCase\Auth;
<ide>
<del>use Cake\Controller\Component\Auth\DigestAuthenticate;
<add>use Cake\Auth\DigestAuthenticate;
<ide> use Cake\Error;
<ide> use Cake\Network\Request;
<ide> use Cake\ORM\Entity;
<add><path>tests/TestCase/Auth/FallbackPasswordHasherTest.php
<del><path>tests/TestCase/Controller/Component/Auth/FallbackPasswordHasherTest.php
<ide> * @since 3.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Test\TestCase\Controller\Component\Auth;
<add>namespace Cake\Test\TestCase\Auth;
<ide>
<del>use Cake\Controller\Component\Auth\FallbackPasswordHasher;
<del>use Cake\Controller\Component\Auth\SimplePasswordHasher;
<del>use Cake\Controller\Component\Auth\WeakPasswordHasher;
<add>use Cake\Auth\FallbackPasswordHasher;
<add>use Cake\Auth\SimplePasswordHasher;
<add>use Cake\Auth\WeakPasswordHasher;
<ide> use Cake\TestSuite\TestCase;
<ide>
<ide> /**
<add><path>tests/TestCase/Auth/FormAuthenticateTest.php
<del><path>tests/TestCase/Controller/Component/Auth/FormAuthenticateTest.php
<ide> * @since 2.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Test\TestCase\Controller\Component\Auth;
<add>namespace Cake\Test\TestCase\Auth;
<ide>
<add>use Cake\Auth\FormAuthenticate;
<ide> use Cake\Cache\Cache;
<del>use Cake\Controller\Component\Auth\FormAuthenticate;
<ide> use Cake\Core\App;
<ide> use Cake\Core\Configure;
<ide> use Cake\Core\Plugin;
<ide> public function testAuthenticatePasswordIsEmptyString() {
<ide> ];
<ide>
<ide> $this->auth = $this->getMock(
<del> 'Cake\Controller\Component\Auth\FormAuthenticate',
<add> 'Cake\Auth\FormAuthenticate',
<ide> ['_checkFields'],
<ide> [
<ide> $this->Collection,
<add><path>tests/TestCase/Auth/SimplePasswordHasherTest.php
<del><path>tests/TestCase/Controller/Component/Auth/SimplePasswordHasherTest.php
<ide> * @since 3.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Test\TestCase\Controller\Component\Auth;
<add>namespace Cake\Test\TestCase\Auth;
<ide>
<del>use Cake\Controller\Component\Auth\SimplePasswordHasher;
<add>use Cake\Auth\SimplePasswordHasher;
<ide> use Cake\TestSuite\TestCase;
<ide>
<ide> /**
<add><path>tests/TestCase/Auth/WeakPasswordHasherTest.php
<del><path>tests/TestCase/Controller/Component/Auth/WeakPasswordHasherTest.php
<ide> * @since 3.0.0
<ide> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<ide> */
<del>namespace Cake\Test\TestCase\Controller\Component\Auth;
<add>namespace Cake\Test\TestCase\Auth;
<ide>
<del>use Cake\Controller\Component\Auth\WeakPasswordHasher;
<add>use Cake\Auth\WeakPasswordHasher;
<ide> use Cake\TestSuite\TestCase;
<ide>
<ide> /**
<ide><path>tests/TestCase/Controller/Component/AuthComponentTest.php
<ide> public function testLoadAuthenticateNoFile() {
<ide> public function testAllConfigWithAuthorize() {
<ide> $this->Controller->Auth->config('authorize', [
<ide> AuthComponent::ALL => array('actionPath' => 'controllers/'),
<del> 'Actions'
<add> 'Controller',
<ide> ]);
<ide> $objects = $this->Controller->Auth->constructAuthorize();
<ide> $result = $objects[0];
<ide> public function testSameAuthenticateWithDifferentHashers() {
<ide> $objects = $this->Controller->Auth->constructAuthenticate();
<ide> $this->assertEquals(2, count($objects));
<ide>
<del> $this->assertInstanceOf('Cake\Controller\Component\Auth\FormAuthenticate', $objects[0]);
<del> $this->assertInstanceOf('Cake\Controller\Component\Auth\FormAuthenticate', $objects[1]);
<add> $this->assertInstanceOf('Cake\Auth\FormAuthenticate', $objects[0]);
<add> $this->assertInstanceOf('Cake\Auth\FormAuthenticate', $objects[1]);
<ide>
<del> $this->assertInstanceOf('Cake\Controller\Component\Auth\SimplePasswordHasher', $objects[0]->passwordHasher());
<del> $this->assertInstanceOf('Cake\Controller\Component\Auth\FallbackPasswordHasher', $objects[1]->passwordHasher());
<add> $this->assertInstanceOf('Cake\Auth\SimplePasswordHasher', $objects[0]->passwordHasher());
<add> $this->assertInstanceOf('Cake\Auth\FallbackPasswordHasher', $objects[1]->passwordHasher());
<ide> }
<ide>
<ide> /** | 20 |
Javascript | Javascript | add test case for tiny polygon area | b9bf5302b4f4bd6724ba57df397865c68ecfe955 | <ide><path>test/geo/area-test.js
<ide> suite.addBatch({
<ide> assert.equal(area({type: "MultiLineString", coordinates: [[[0, 1], [2, 3]], [[4, 5], [6, 7]]]}), 0);
<ide> },
<ide> "Polygon": {
<add> "tiny": function(area) {
<add> assert.inDelta(area({type: "Polygon", coordinates: [[
<add> [-64.66070178517852, 18.33986913231323],
<add> [-64.66079715091509, 18.33994007490749],
<add> [-64.66074946804680, 18.33994007490749],
<add> [-64.66070178517852, 18.33986913231323]
<add> ]]}), 4.890516e-13, 1e-13);
<add> },
<ide> "semilune": function(area) {
<ide> assert.inDelta(area({type: "Polygon", coordinates: [[[0, 0], [0, 90], [90, 0], [0, 0]]]}), π / 2, 1e-6);
<ide> }, | 1 |
Java | Java | make subscriptions of swingobservable thread-safe | 7babfaf1dcf8f20d02e0404c2f13f47c46a55391 | <ide><path>rxjava-contrib/rxjava-swing/src/main/java/rx/observables/SwingObservable.java
<ide> import java.util.Set;
<ide>
<ide> import javax.swing.AbstractButton;
<add>import javax.swing.SwingUtilities;
<ide>
<ide> import rx.Observable;
<ide> import rx.functions.Func1;
<ide> public static Observable<ComponentEvent> fromComponentEvents(Component component
<ide> public static Observable<Dimension> fromResizing(Component component) {
<ide> return ComponentEventSource.fromResizing(component);
<ide> }
<add>
<add> /**
<add> * Check if the current thead is the event dispatch thread.
<add> *
<add> * @throws IllegalStateException if the current thread is not the event dispatch thread.
<add> */
<add> public static void assertEventDispatchThread() {
<add> if (!SwingUtilities.isEventDispatchThread()) {
<add> throw new IllegalStateException("Need to run in the event dispatch thread, but was " + Thread.currentThread());
<add> }
<add> }
<ide> }
<ide><path>rxjava-contrib/rxjava-swing/src/main/java/rx/subscriptions/SwingSubscriptions.java
<add>/**
<add> * Copyright 2013 Netflix, Inc.
<add> *
<add> * Licensed under the Apache License, Version 2.0 (the "License");
<add> * you may not use this file except in compliance with the License.
<add> * You may obtain a copy of the License at
<add> *
<add> * http://www.apache.org/licenses/LICENSE-2.0
<add> *
<add> * Unless required by applicable law or agreed to in writing, software
<add> * distributed under the License is distributed on an "AS IS" BASIS,
<add> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<add> * See the License for the specific language governing permissions and
<add> * limitations under the License.
<add> */
<add>package rx.subscriptions;
<add>
<add>import javax.swing.SwingUtilities;
<add>
<add>import rx.Scheduler.Inner;
<add>import rx.Subscription;
<add>import rx.schedulers.SwingScheduler;
<add>import rx.functions.Action0;
<add>import rx.functions.Action1;
<add>
<add>public final class SwingSubscriptions {
<add>
<add> private SwingSubscriptions() {
<add> // no instance
<add> }
<add>
<add> /**
<add> * Create an Subscription that always runs <code>unsubscribe</code> in the event dispatch thread.
<add> *
<add> * @param unsubscribe
<add> * @return an Subscription that always runs <code>unsubscribe</code> in the event dispatch thread.
<add> */
<add> public static Subscription unsubscribeInEventDispatchThread(final Action0 unsubscribe) {
<add> return Subscriptions.create(new Action0() {
<add> @Override
<add> public void call() {
<add> if (SwingUtilities.isEventDispatchThread()) {
<add> unsubscribe.call();
<add> } else {
<add> SwingScheduler.getInstance().schedule(new Action1<Inner>() {
<add> @Override
<add> public void call(Inner inner) {
<add> unsubscribe.call();
<add> }
<add> });
<add> }
<add> }
<add> });
<add> }
<add>}
<ide><path>rxjava-contrib/rxjava-swing/src/main/java/rx/swing/sources/AbstractButtonSource.java
<ide> */
<ide> package rx.swing.sources;
<ide>
<del>import static org.mockito.Mockito.*;
<add>import static org.mockito.Mockito.mock;
<add>import static org.mockito.Mockito.never;
<add>import static org.mockito.Mockito.times;
<add>import static org.mockito.Mockito.verify;
<ide>
<ide> import java.awt.event.ActionEvent;
<ide> import java.awt.event.ActionListener;
<ide> import org.mockito.Matchers;
<ide>
<ide> import rx.Observable;
<del>import rx.Observable.OnSubscribeFunc;
<del>import rx.Observer;
<add>import rx.Observable.OnSubscribe;
<add>import rx.Subscriber;
<ide> import rx.Subscription;
<ide> import rx.functions.Action0;
<ide> import rx.functions.Action1;
<del>import rx.subscriptions.Subscriptions;
<add>import rx.observables.SwingObservable;
<add>import rx.subscriptions.SwingSubscriptions;
<ide>
<ide> public enum AbstractButtonSource { ; // no instances
<ide>
<ide> /**
<ide> * @see rx.observables.SwingObservable#fromButtonAction
<ide> */
<ide> public static Observable<ActionEvent> fromActionOf(final AbstractButton button) {
<del> return Observable.create(new OnSubscribeFunc<ActionEvent>() {
<add> return Observable.create(new OnSubscribe<ActionEvent>() {
<ide> @Override
<del> public Subscription onSubscribe(final Observer<? super ActionEvent> observer) {
<add> public void call(final Subscriber<? super ActionEvent> subscriber) {
<add> SwingObservable.assertEventDispatchThread();
<ide> final ActionListener listener = new ActionListener() {
<ide> @Override
<ide> public void actionPerformed(ActionEvent e) {
<del> observer.onNext(e);
<add> subscriber.onNext(e);
<ide> }
<ide> };
<ide> button.addActionListener(listener);
<del>
<del> return Subscriptions.create(new Action0() {
<add> subscriber.add(SwingSubscriptions.unsubscribeInEventDispatchThread(new Action0() {
<ide> @Override
<ide> public void call() {
<ide> button.removeActionListener(listener);
<ide> }
<del> });
<add> }));
<ide> }
<ide> });
<ide> }
<ide>
<ide> public static class UnitTest {
<ide> @Test
<del> public void testObservingActionEvents() {
<del> @SuppressWarnings("unchecked")
<del> Action1<ActionEvent> action = mock(Action1.class);
<del> @SuppressWarnings("unchecked")
<del> Action1<Throwable> error = mock(Action1.class);
<del> Action0 complete = mock(Action0.class);
<del>
<del> final ActionEvent event = new ActionEvent(this, 1, "command");
<del>
<del> @SuppressWarnings("serial")
<del> class TestButton extends AbstractButton {
<del> void testAction() {
<del> fireActionPerformed(event);
<add> public void testObservingActionEvents() throws Throwable {
<add> SwingTestHelper.create().runInEventDispatchThread(new Action0() {
<add>
<add> @Override
<add> public void call() {
<add> @SuppressWarnings("unchecked")
<add> Action1<ActionEvent> action = mock(Action1.class);
<add> @SuppressWarnings("unchecked")
<add> Action1<Throwable> error = mock(Action1.class);
<add> Action0 complete = mock(Action0.class);
<add>
<add> final ActionEvent event = new ActionEvent(this, 1, "command");
<add>
<add> @SuppressWarnings("serial")
<add> class TestButton extends AbstractButton {
<add> void testAction() {
<add> fireActionPerformed(event);
<add> }
<add> }
<add>
<add> TestButton button = new TestButton();
<add> Subscription sub = fromActionOf(button).subscribe(action, error, complete);
<add>
<add> verify(action, never()).call(Matchers.<ActionEvent> any());
<add> verify(error, never()).call(Matchers.<Throwable> any());
<add> verify(complete, never()).call();
<add>
<add> button.testAction();
<add> verify(action, times(1)).call(Matchers.<ActionEvent> any());
<add>
<add> button.testAction();
<add> verify(action, times(2)).call(Matchers.<ActionEvent> any());
<add>
<add> sub.unsubscribe();
<add> button.testAction();
<add> verify(action, times(2)).call(Matchers.<ActionEvent> any());
<add> verify(error, never()).call(Matchers.<Throwable> any());
<add> verify(complete, never()).call();
<ide> }
<del> }
<del>
<del> TestButton button = new TestButton();
<del> Subscription sub = fromActionOf(button).subscribe(action, error, complete);
<del>
<del> verify(action, never()).call(Matchers.<ActionEvent>any());
<del> verify(error, never()).call(Matchers.<Throwable>any());
<del> verify(complete, never()).call();
<del>
<del> button.testAction();
<del> verify(action, times(1)).call(Matchers.<ActionEvent>any());
<del>
<del> button.testAction();
<del> verify(action, times(2)).call(Matchers.<ActionEvent>any());
<del>
<del> sub.unsubscribe();
<del> button.testAction();
<del> verify(action, times(2)).call(Matchers.<ActionEvent>any());
<del> verify(error, never()).call(Matchers.<Throwable>any());
<del> verify(complete, never()).call();
<add>
<add> }).awaitTerminal();
<ide> }
<ide> }
<ide> }
<ide><path>rxjava-contrib/rxjava-swing/src/main/java/rx/swing/sources/ComponentEventSource.java
<ide> */
<ide> package rx.swing.sources;
<ide>
<del>import static rx.swing.sources.ComponentEventSource.Predicate.*;
<add>import static rx.swing.sources.ComponentEventSource.Predicate.RESIZED;
<ide>
<ide> import java.awt.Component;
<ide> import java.awt.Dimension;
<ide> import java.awt.event.ComponentEvent;
<ide> import java.awt.event.ComponentListener;
<ide>
<ide> import rx.Observable;
<del>import rx.Observable.OnSubscribeFunc;
<del>import rx.Observer;
<del>import rx.Subscription;
<add>import rx.Observable.OnSubscribe;
<add>import rx.Subscriber;
<ide> import rx.functions.Action0;
<ide> import rx.functions.Func1;
<ide> import rx.observables.SwingObservable;
<del>import rx.subscriptions.Subscriptions;
<add>import rx.subscriptions.SwingSubscriptions;
<ide>
<ide> public enum ComponentEventSource { ; // no instances
<ide>
<ide> /**
<ide> * @see rx.observables.SwingObservable#fromComponentEvents
<ide> */
<ide> public static Observable<ComponentEvent> fromComponentEventsOf(final Component component) {
<del> return Observable.create(new OnSubscribeFunc<ComponentEvent>() {
<add> return Observable.create(new OnSubscribe<ComponentEvent>() {
<ide> @Override
<del> public Subscription onSubscribe(final Observer<? super ComponentEvent> observer) {
<add> public void call(final Subscriber<? super ComponentEvent> subscriber) {
<add> SwingObservable.assertEventDispatchThread();
<ide> final ComponentListener listener = new ComponentListener() {
<ide> @Override
<ide> public void componentHidden(ComponentEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide>
<ide> @Override
<ide> public void componentMoved(ComponentEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide>
<ide> @Override
<ide> public void componentResized(ComponentEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide>
<ide> @Override
<ide> public void componentShown(ComponentEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide> };
<ide> component.addComponentListener(listener);
<del>
<del> return Subscriptions.create(new Action0() {
<add> subscriber.add(SwingSubscriptions.unsubscribeInEventDispatchThread(new Action0() {
<ide> @Override
<ide> public void call() {
<ide> component.removeComponentListener(listener);
<ide> }
<del> });
<add> }));
<ide> }
<ide> });
<ide> }
<ide><path>rxjava-contrib/rxjava-swing/src/main/java/rx/swing/sources/KeyEventSource.java
<ide> */
<ide> package rx.swing.sources;
<ide>
<del>import static java.util.Arrays.*;
<del>import static org.mockito.Mockito.*;
<add>import static java.util.Arrays.asList;
<add>import static org.mockito.Mockito.inOrder;
<add>import static org.mockito.Mockito.mock;
<add>import static org.mockito.Mockito.never;
<add>import static org.mockito.Mockito.times;
<add>import static org.mockito.Mockito.verify;
<ide>
<ide> import java.awt.Component;
<ide> import java.awt.event.KeyEvent;
<ide> import org.mockito.Matchers;
<ide>
<ide> import rx.Observable;
<del>import rx.Observable.OnSubscribeFunc;
<del>import rx.Observer;
<add>import rx.Observable.OnSubscribe;
<add>import rx.Subscriber;
<ide> import rx.Subscription;
<ide> import rx.functions.Action0;
<ide> import rx.functions.Action1;
<ide> import rx.functions.Func1;
<ide> import rx.functions.Func2;
<del>import rx.subscriptions.Subscriptions;
<add>import rx.observables.SwingObservable;
<add>import rx.subscriptions.SwingSubscriptions;
<ide>
<ide> public enum KeyEventSource { ; // no instances
<ide>
<ide> /**
<ide> * @see rx.observables.SwingObservable#fromKeyEvents(Component)
<ide> */
<ide> public static Observable<KeyEvent> fromKeyEventsOf(final Component component) {
<del> return Observable.create(new OnSubscribeFunc<KeyEvent>() {
<add> return Observable.create(new OnSubscribe<KeyEvent>() {
<ide> @Override
<del> public Subscription onSubscribe(final Observer<? super KeyEvent> observer) {
<add> public void call(final Subscriber<? super KeyEvent> subscriber) {
<add> SwingObservable.assertEventDispatchThread();
<ide> final KeyListener listener = new KeyListener() {
<ide> @Override
<ide> public void keyPressed(KeyEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<del>
<add>
<ide> @Override
<ide> public void keyReleased(KeyEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<del>
<add>
<ide> @Override
<ide> public void keyTyped(KeyEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide> };
<ide> component.addKeyListener(listener);
<del>
<del> return Subscriptions.create(new Action0() {
<add>
<add> subscriber.add(SwingSubscriptions.unsubscribeInEventDispatchThread(new Action0() {
<ide> @Override
<ide> public void call() {
<ide> component.removeKeyListener(listener);
<ide> }
<del> });
<add> }));
<ide> }
<ide> });
<ide> }
<ide> public static class UnitTest {
<ide> private Component comp = new JPanel();
<ide>
<ide> @Test
<del> public void testObservingKeyEvents() {
<del> @SuppressWarnings("unchecked")
<del> Action1<KeyEvent> action = mock(Action1.class);
<del> @SuppressWarnings("unchecked")
<del> Action1<Throwable> error = mock(Action1.class);
<del> Action0 complete = mock(Action0.class);
<del>
<del> final KeyEvent event = mock(KeyEvent.class);
<del>
<del> Subscription sub = fromKeyEventsOf(comp).subscribe(action, error, complete);
<del>
<del> verify(action, never()).call(Matchers.<KeyEvent>any());
<del> verify(error, never()).call(Matchers.<Throwable>any());
<del> verify(complete, never()).call();
<del>
<del> fireKeyEvent(event);
<del> verify(action, times(1)).call(Matchers.<KeyEvent>any());
<del>
<del> fireKeyEvent(event);
<del> verify(action, times(2)).call(Matchers.<KeyEvent>any());
<del>
<del> sub.unsubscribe();
<del> fireKeyEvent(event);
<del> verify(action, times(2)).call(Matchers.<KeyEvent>any());
<del> verify(error, never()).call(Matchers.<Throwable>any());
<del> verify(complete, never()).call();
<add> public void testObservingKeyEvents() throws Throwable {
<add> SwingTestHelper.create().runInEventDispatchThread(new Action0(){
<add>
<add> @Override
<add> public void call() {
<add> @SuppressWarnings("unchecked")
<add> Action1<KeyEvent> action = mock(Action1.class);
<add> @SuppressWarnings("unchecked")
<add> Action1<Throwable> error = mock(Action1.class);
<add> Action0 complete = mock(Action0.class);
<add>
<add> final KeyEvent event = mock(KeyEvent.class);
<add>
<add> Subscription sub = fromKeyEventsOf(comp).subscribe(action, error, complete);
<add>
<add> verify(action, never()).call(Matchers.<KeyEvent> any());
<add> verify(error, never()).call(Matchers.<Throwable> any());
<add> verify(complete, never()).call();
<add>
<add> fireKeyEvent(event);
<add> verify(action, times(1)).call(Matchers.<KeyEvent> any());
<add>
<add> fireKeyEvent(event);
<add> verify(action, times(2)).call(Matchers.<KeyEvent> any());
<add>
<add> sub.unsubscribe();
<add> fireKeyEvent(event);
<add> verify(action, times(2)).call(Matchers.<KeyEvent> any());
<add> verify(error, never()).call(Matchers.<Throwable> any());
<add> verify(complete, never()).call();
<add> }
<add>
<add> }).awaitTerminal();
<ide> }
<del>
<add>
<ide> @Test
<del> public void testObservingPressedKeys() {
<del> @SuppressWarnings("unchecked")
<del> Action1<Set<Integer>> action = mock(Action1.class);
<del> @SuppressWarnings("unchecked")
<del> Action1<Throwable> error = mock(Action1.class);
<del> Action0 complete = mock(Action0.class);
<del>
<del> Subscription sub = currentlyPressedKeysOf(comp).subscribe(action, error, complete);
<del>
<del> InOrder inOrder = inOrder(action);
<del> inOrder.verify(action, times(1)).call(Collections.<Integer>emptySet());
<del> verify(error, never()).call(Matchers.<Throwable>any());
<del> verify(complete, never()).call();
<del>
<del> fireKeyEvent(keyEvent(1, KeyEvent.KEY_PRESSED));
<del> inOrder.verify(action, times(1)).call(new HashSet<Integer>(asList(1)));
<del> verify(error, never()).call(Matchers.<Throwable>any());
<del> verify(complete, never()).call();
<del>
<del> fireKeyEvent(keyEvent(2, KeyEvent.KEY_PRESSED));
<del> fireKeyEvent(keyEvent(KeyEvent.VK_UNDEFINED, KeyEvent.KEY_TYPED));
<del> inOrder.verify(action, times(1)).call(new HashSet<Integer>(asList(1, 2)));
<del>
<del> fireKeyEvent(keyEvent(2, KeyEvent.KEY_RELEASED));
<del> inOrder.verify(action, times(1)).call(new HashSet<Integer>(asList(1)));
<del>
<del> fireKeyEvent(keyEvent(3, KeyEvent.KEY_RELEASED));
<del> inOrder.verify(action, times(1)).call(new HashSet<Integer>(asList(1)));
<del>
<del> fireKeyEvent(keyEvent(1, KeyEvent.KEY_RELEASED));
<del> inOrder.verify(action, times(1)).call(Collections.<Integer>emptySet());
<del>
<del> sub.unsubscribe();
<del>
<del> fireKeyEvent(keyEvent(1, KeyEvent.KEY_PRESSED));
<del> inOrder.verify(action, never()).call(Matchers.<Set<Integer>>any());
<del> verify(error, never()).call(Matchers.<Throwable>any());
<del> verify(complete, never()).call();
<add> public void testObservingPressedKeys() throws Throwable {
<add> SwingTestHelper.create().runInEventDispatchThread(new Action0() {
<add>
<add> @Override
<add> public void call() {
<add> @SuppressWarnings("unchecked")
<add> Action1<Set<Integer>> action = mock(Action1.class);
<add> @SuppressWarnings("unchecked")
<add> Action1<Throwable> error = mock(Action1.class);
<add> Action0 complete = mock(Action0.class);
<add>
<add> Subscription sub = currentlyPressedKeysOf(comp).subscribe(action, error, complete);
<add>
<add> InOrder inOrder = inOrder(action);
<add> inOrder.verify(action, times(1)).call(Collections.<Integer> emptySet());
<add> verify(error, never()).call(Matchers.<Throwable> any());
<add> verify(complete, never()).call();
<add>
<add> fireKeyEvent(keyEvent(1, KeyEvent.KEY_PRESSED));
<add> inOrder.verify(action, times(1)).call(new HashSet<Integer>(asList(1)));
<add> verify(error, never()).call(Matchers.<Throwable> any());
<add> verify(complete, never()).call();
<add>
<add> fireKeyEvent(keyEvent(2, KeyEvent.KEY_PRESSED));
<add> fireKeyEvent(keyEvent(KeyEvent.VK_UNDEFINED, KeyEvent.KEY_TYPED));
<add> inOrder.verify(action, times(1)).call(new HashSet<Integer>(asList(1, 2)));
<add>
<add> fireKeyEvent(keyEvent(2, KeyEvent.KEY_RELEASED));
<add> inOrder.verify(action, times(1)).call(new HashSet<Integer>(asList(1)));
<add>
<add> fireKeyEvent(keyEvent(3, KeyEvent.KEY_RELEASED));
<add> inOrder.verify(action, times(1)).call(new HashSet<Integer>(asList(1)));
<add>
<add> fireKeyEvent(keyEvent(1, KeyEvent.KEY_RELEASED));
<add> inOrder.verify(action, times(1)).call(Collections.<Integer> emptySet());
<add>
<add> sub.unsubscribe();
<add>
<add> fireKeyEvent(keyEvent(1, KeyEvent.KEY_PRESSED));
<add> inOrder.verify(action, never()).call(Matchers.<Set<Integer>> any());
<add> verify(error, never()).call(Matchers.<Throwable> any());
<add> verify(complete, never()).call();
<add> }
<add>
<add> }).awaitTerminal();
<ide> }
<ide>
<ide> private KeyEvent keyEvent(int keyCode, int id) {
<ide><path>rxjava-contrib/rxjava-swing/src/main/java/rx/swing/sources/MouseEventSource.java
<ide> */
<ide> package rx.swing.sources;
<ide>
<del>import static org.mockito.Mockito.*;
<add>import static org.mockito.Mockito.inOrder;
<add>import static org.mockito.Mockito.mock;
<add>import static org.mockito.Mockito.never;
<add>import static org.mockito.Mockito.times;
<add>import static org.mockito.Mockito.verify;
<ide>
<ide> import java.awt.Component;
<ide> import java.awt.Point;
<ide> import org.mockito.Matchers;
<ide>
<ide> import rx.Observable;
<del>import rx.Observable.OnSubscribeFunc;
<del>import rx.Observer;
<add>import rx.Observable.OnSubscribe;
<add>import rx.Subscriber;
<ide> import rx.Subscription;
<ide> import rx.functions.Action0;
<ide> import rx.functions.Action1;
<del>import rx.functions.Func1;
<ide> import rx.functions.Func2;
<del>import rx.subscriptions.Subscriptions;
<add>import rx.observables.SwingObservable;
<add>import rx.subscriptions.SwingSubscriptions;
<ide>
<del>public enum MouseEventSource { ; // no instances
<add>public enum MouseEventSource {
<add> ; // no instances
<ide>
<ide> /**
<ide> * @see rx.observables.SwingObservable#fromMouseEvents
<ide> */
<ide> public static Observable<MouseEvent> fromMouseEventsOf(final Component component) {
<del> return Observable.create(new OnSubscribeFunc<MouseEvent>() {
<add> return Observable.create(new OnSubscribe<MouseEvent>() {
<ide> @Override
<del> public Subscription onSubscribe(final Observer<? super MouseEvent> observer) {
<add> public void call(final Subscriber<? super MouseEvent> subscriber) {
<add> SwingObservable.assertEventDispatchThread();
<ide> final MouseListener listener = new MouseListener() {
<ide> @Override
<ide> public void mouseClicked(MouseEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide>
<ide> @Override
<ide> public void mousePressed(MouseEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide>
<ide> @Override
<ide> public void mouseReleased(MouseEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide>
<ide> @Override
<ide> public void mouseEntered(MouseEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide>
<ide> @Override
<ide> public void mouseExited(MouseEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide> };
<ide> component.addMouseListener(listener);
<del>
<del> return Subscriptions.create(new Action0() {
<add>
<add> subscriber.add(SwingSubscriptions.unsubscribeInEventDispatchThread(new Action0() {
<ide> @Override
<ide> public void call() {
<ide> component.removeMouseListener(listener);
<ide> }
<del> });
<add> }));
<ide> }
<ide> });
<ide> }
<del>
<add>
<ide> /**
<ide> * @see rx.observables.SwingObservable#fromMouseMotionEvents
<ide> */
<ide> public static Observable<MouseEvent> fromMouseMotionEventsOf(final Component component) {
<del> return Observable.create(new OnSubscribeFunc<MouseEvent>() {
<add> return Observable.create(new OnSubscribe<MouseEvent>() {
<ide> @Override
<del> public Subscription onSubscribe(final Observer<? super MouseEvent> observer) {
<add> public void call(final Subscriber<? super MouseEvent> subscriber) {
<add> SwingObservable.assertEventDispatchThread();
<ide> final MouseMotionListener listener = new MouseMotionListener() {
<ide> @Override
<ide> public void mouseDragged(MouseEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide>
<ide> @Override
<ide> public void mouseMoved(MouseEvent event) {
<del> observer.onNext(event);
<add> subscriber.onNext(event);
<ide> }
<ide> };
<ide> component.addMouseMotionListener(listener);
<del>
<del> return Subscriptions.create(new Action0() {
<add>
<add> subscriber.add(SwingSubscriptions.unsubscribeInEventDispatchThread(new Action0() {
<ide> @Override
<ide> public void call() {
<ide> component.removeMouseMotionListener(listener);
<ide> }
<del> });
<add> }));
<ide> }
<ide> });
<ide> }
<del>
<add>
<ide> /**
<ide> * @see rx.observables.SwingObservable#fromRelativeMouseMotion
<ide> */
<ide> public Point call(MouseEvent ev1, MouseEvent ev2) {
<ide> }
<ide> });
<ide> }
<del>
<add>
<ide> public static class UnitTest {
<ide> private Component comp = new JPanel();
<del>
<add>
<ide> @Test
<del> public void testRelativeMouseMotion() {
<del> @SuppressWarnings("unchecked")
<del> Action1<Point> action = mock(Action1.class);
<del> @SuppressWarnings("unchecked")
<del> Action1<Throwable> error = mock(Action1.class);
<del> Action0 complete = mock(Action0.class);
<del>
<del> Subscription sub = fromRelativeMouseMotion(comp).subscribe(action, error, complete);
<del>
<del> InOrder inOrder = inOrder(action);
<del>
<del> verify(action, never()).call(Matchers.<Point>any());
<del> verify(error, never()).call(Matchers.<Exception>any());
<del> verify(complete, never()).call();
<del>
<del> fireMouseEvent(mouseEvent(0, 0));
<del> verify(action, never()).call(Matchers.<Point>any());
<del>
<del> fireMouseEvent(mouseEvent(10, -5));
<del> inOrder.verify(action, times(1)).call(new Point(10, -5));
<del>
<del> fireMouseEvent(mouseEvent(6, 10));
<del> inOrder.verify(action, times(1)).call(new Point(-4, 15));
<del>
<del> sub.unsubscribe();
<del> fireMouseEvent(mouseEvent(0, 0));
<del> inOrder.verify(action, never()).call(Matchers.<Point>any());
<del> verify(error, never()).call(Matchers.<Exception>any());
<del> verify(complete, never()).call();
<add> public void testRelativeMouseMotion() throws Throwable {
<add> SwingTestHelper.create().runInEventDispatchThread(new Action0() {
<add>
<add> @Override
<add> public void call() {
<add> @SuppressWarnings("unchecked")
<add> Action1<Point> action = mock(Action1.class);
<add> @SuppressWarnings("unchecked")
<add> Action1<Throwable> error = mock(Action1.class);
<add> Action0 complete = mock(Action0.class);
<add>
<add> Subscription sub = fromRelativeMouseMotion(comp).subscribe(action, error, complete);
<add>
<add> InOrder inOrder = inOrder(action);
<add>
<add> verify(action, never()).call(Matchers.<Point> any());
<add> verify(error, never()).call(Matchers.<Exception> any());
<add> verify(complete, never()).call();
<add>
<add> fireMouseEvent(mouseEvent(0, 0));
<add> verify(action, never()).call(Matchers.<Point> any());
<add>
<add> fireMouseEvent(mouseEvent(10, -5));
<add> inOrder.verify(action, times(1)).call(new Point(10, -5));
<add>
<add> fireMouseEvent(mouseEvent(6, 10));
<add> inOrder.verify(action, times(1)).call(new Point(-4, 15));
<add>
<add> sub.unsubscribe();
<add> fireMouseEvent(mouseEvent(0, 0));
<add> inOrder.verify(action, never()).call(Matchers.<Point> any());
<add> verify(error, never()).call(Matchers.<Exception> any());
<add> verify(complete, never()).call();
<add> }
<add>
<add> }).awaitTerminal();
<ide> }
<del>
<add>
<ide> private MouseEvent mouseEvent(int x, int y) {
<ide> return new MouseEvent(comp, MouseEvent.MOUSE_MOVED, 1L, 0, x, y, 0, false);
<ide> }
<del>
<add>
<ide> private void fireMouseEvent(MouseEvent event) {
<del> for (MouseMotionListener listener: comp.getMouseMotionListeners()) {
<add> for (MouseMotionListener listener : comp.getMouseMotionListeners()) {
<ide> listener.mouseMoved(event);
<ide> }
<ide> }
<ide><path>rxjava-contrib/rxjava-swing/src/main/java/rx/swing/sources/SwingTestHelper.java
<add>/**
<add> * Copyright 2013 Netflix, Inc.
<add> *
<add> * Licensed under the Apache License, Version 2.0 (the "License");
<add> * you may not use this file except in compliance with the License.
<add> * You may obtain a copy of the License at
<add> *
<add> * http://www.apache.org/licenses/LICENSE-2.0
<add> *
<add> * Unless required by applicable law or agreed to in writing, software
<add> * distributed under the License is distributed on an "AS IS" BASIS,
<add> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<add> * See the License for the specific language governing permissions and
<add> * limitations under the License.
<add> */
<add>package rx.swing.sources;
<add>
<add>import java.util.concurrent.CountDownLatch;
<add>import java.util.concurrent.TimeUnit;
<add>
<add>import rx.Scheduler.Inner;
<add>import rx.schedulers.SwingScheduler;
<add>import rx.functions.Action0;
<add>import rx.functions.Action1;
<add>
<add>/* package-private */ final class SwingTestHelper { // only for test
<add>
<add> private final CountDownLatch latch = new CountDownLatch(1);
<add> private volatile Throwable error;
<add>
<add> private SwingTestHelper() {
<add> }
<add>
<add> public static SwingTestHelper create() {
<add> return new SwingTestHelper();
<add> }
<add>
<add> public SwingTestHelper runInEventDispatchThread(final Action0 action) {
<add> SwingScheduler.getInstance().schedule(new Action1<Inner>() {
<add>
<add> @Override
<add> public void call(Inner inner) {
<add> try {
<add> action.call();
<add> } catch (Throwable e) {
<add> error = e;
<add> }
<add> latch.countDown();
<add> }
<add> });
<add> return this;
<add> }
<add>
<add> public void awaitTerminal() throws Throwable {
<add> latch.await();
<add> if (error != null) {
<add> throw error;
<add> }
<add> }
<add>
<add> public void awaitTerminal(long timeout, TimeUnit unit) throws Throwable {
<add> latch.await(timeout, unit);
<add> if (error != null) {
<add> throw error;
<add> }
<add> }
<add>
<add>} | 7 |
Python | Python | adjust variable names for consistency | a9790fe223a15419c68aa1dd6ee6ab45ad4b96c8 | <ide><path>numpy/polynomial/chebyshev.py
<ide> def _zseries_div(z1, z2):
<ide> """
<ide> z1 = z1.copy()
<ide> z2 = z2.copy()
<del> len1 = len(z1)
<del> len2 = len(z2)
<del> if len2 == 1:
<add> lc1 = len(z1)
<add> lc2 = len(z2)
<add> if lc2 == 1:
<ide> z1 /= z2
<ide> return z1, z1[:1]*0
<del> elif len1 < len2:
<add> elif lc1 < lc2:
<ide> return z1[:1]*0, z1
<ide> else:
<del> dlen = len1 - len2
<add> dlen = lc1 - lc2
<ide> scl = z2[0]
<ide> z2 /= scl
<ide> quo = np.empty(dlen + 1, dtype=z1.dtype)
<ide> def _zseries_div(z1, z2):
<ide> quo[i] = z1[i]
<ide> quo[dlen - i] = r
<ide> tmp = r*z2
<del> z1[i:i+len2] -= tmp
<del> z1[j:j+len2] -= tmp
<add> z1[i:i+lc2] -= tmp
<add> z1[j:j+lc2] -= tmp
<ide> i += 1
<ide> j -= 1
<ide> r = z1[i]
<ide> quo[i] = r
<ide> tmp = r*z2
<del> z1[i:i+len2] -= tmp
<add> z1[i:i+lc2] -= tmp
<ide> quo /= scl
<del> rem = z1[i+1:i-1+len2].copy()
<add> rem = z1[i+1:i-1+lc2].copy()
<ide> return quo, rem
<ide>
<ide>
<ide><path>numpy/polynomial/polynomial.py
<ide> def polydiv(c1, c2):
<ide> if c2[-1] == 0:
<ide> raise ZeroDivisionError()
<ide>
<del> len1 = len(c1)
<del> len2 = len(c2)
<del> if len2 == 1:
<del> return c1/c2[-1], c1[:1]*0
<del> elif len1 < len2:
<add> lc1 = len(c1)
<add> lc2 = len(c2)
<add> if lc1 < lc2:
<ide> return c1[:1]*0, c1
<add> elif lc2 == 1:
<add> return c1/c2[-1], c1[:1]*0
<ide> else:
<del> dlen = len1 - len2
<add> dlen = lc1 - lc2
<ide> scl = c2[-1]
<ide> c2 = c2[:-1]/scl
<ide> i = dlen
<del> j = len1 - 1
<add> j = lc1 - 1
<ide> while i >= 0:
<ide> c1[i:j] -= c2*c1[j]
<ide> i -= 1 | 2 |
Javascript | Javascript | fix animated lint warnings | 4373aa68228054916d55c0956ede6eeacd40241a | <ide><path>Libraries/Animated/src/Easing.js
<ide> class Easing {
<ide> static elastic(bounciness: number = 1): (t: number) => number {
<ide> var p = bounciness * Math.PI;
<ide> return (t) => 1 - Math.pow(Math.cos(t * Math.PI / 2), 3) * Math.cos(t * p);
<del> };
<add> }
<ide>
<ide> static back(s: number): (t: number) => number {
<ide> if (s === undefined) {
<ide> s = 1.70158;
<ide> }
<ide> return (t) => t * t * ((s + 1) * t - s);
<del> };
<add> }
<ide>
<ide> static bounce(t: number): number {
<ide> if (t < 1 / 2.75) {
<ide> class Easing {
<ide>
<ide> t -= 2.625 / 2.75;
<ide> return 7.5625 * t * t + 0.984375;
<del> };
<add> }
<ide>
<ide> static bezier(
<ide> x1: number,
<ide><path>Libraries/Animated/src/bezier.js
<ide> module.exports = function(x1, y1, x2, y2, epsilon){
<ide>
<ide> var derivativeCurveX = function(t){
<ide> var v = 1 - t;
<del> return 3 * (2 * (t - 1) * t + v * v) * x1 + 3 * (- t * t * t + 2 * v * t) * x2;
<add> return 3 * (2 * (t - 1) * t + v * v) * x1 + 3 * (-t * t * t + 2 * v * t) * x2;
<ide> };
<ide>
<ide> return function(t){
<ide> module.exports = function(x1, y1, x2, y2, epsilon){
<ide> // First try a few iterations of Newton's method -- normally very fast.
<ide> for (t2 = x, i = 0; i < 8; i++){
<ide> x2 = curveX(t2) - x;
<del> if (Math.abs(x2) < epsilon) return curveY(t2);
<add> if (Math.abs(x2) < epsilon) { return curveY(t2); }
<ide> d2 = derivativeCurveX(t2);
<del> if (Math.abs(d2) < 1e-6) break;
<add> if (Math.abs(d2) < 1e-6) { break; }
<ide> t2 = t2 - x2 / d2;
<ide> }
<ide>
<del> t0 = 0, t1 = 1, t2 = x;
<add> t0 = 0;
<add> t1 = 1;
<add> t2 = x;
<ide>
<del> if (t2 < t0) return curveY(t0);
<del> if (t2 > t1) return curveY(t1);
<add> if (t2 < t0) { return curveY(t0); }
<add> if (t2 > t1) { return curveY(t1); }
<ide>
<ide> // Fallback to the bisection method for reliability.
<ide> while (t0 < t1){
<ide> x2 = curveX(t2);
<del> if (Math.abs(x2 - x) < epsilon) return curveY(t2);
<del> if (x > x2) t0 = t2;
<del> else t1 = t2;
<del> t2 = (t1 - t0) * .5 + t0;
<add> if (Math.abs(x2 - x) < epsilon) { return curveY(t2); }
<add> if (x > x2) { t0 = t2; }
<add> else { t1 = t2; }
<add> t2 = (t1 - t0) * 0.5 + t0;
<ide> }
<ide>
<ide> // Failure | 2 |
PHP | PHP | fix zrangebyscore syntax for phpredis | 20950646e0b8108599c1f87607d030af4152992e | <ide><path>src/Illuminate/Redis/Connections/PhpRedisConnection.php
<ide> public function disconnect()
<ide> */
<ide> public function __call($method, $parameters)
<ide> {
<add> $method = strtolower($method);
<add>
<ide> if ($method == 'eval') {
<ide> return $this->proxyToEval($parameters);
<ide> }
<ide>
<add> if ($method == 'zrangebyscore' || $method == 'zrevrangebyscore') {
<add> $parameters = array_map(function ($parameter) {
<add> return is_array($parameter) ? array_change_key_case($parameter) : $parameter;
<add> }, $parameters);
<add> }
<add>
<ide> return parent::__call($method, $parameters);
<ide> }
<ide> } | 1 |
Python | Python | factorize backend tests | 632d811f2f65bce1806559bf3eede37e517afb6d | <ide><path>tests/keras/backend/backend_test.py
<ide> def test_repeat_elements(self):
<ide> x = K.placeholder(shape=shape)
<ide> y = K.repeat_elements(x, reps, axis=rep_axis)
<ide> assert y._keras_shape == tuple(shape)
<del> if K.backend() == 'tensorflow':
<del> assert y._keras_shape == tuple(y.get_shape().as_list())
<add> assert y._keras_shape == K.int_shape(y)
<ide>
<ide> def test_tile(self):
<ide> shape = (3, 4)
<ide> def test_tile(self):
<ide> if K.backend() == 'theano':
<ide> x = K.placeholder(shape=(None, 4))
<ide> n = 2
<del> y = KTH.tile(x, n)
<add> y = K.tile(x, n)
<ide> assert y._keras_shape == (None, 8)
<ide> n = (4, 3)
<ide> y = K.tile(x, n)
<ide> def test_rnn(self):
<ide> W_o_val = np.random.random((output_dim, output_dim)).astype(np.float32)
<ide> np_mask = np.random.randint(2, size=(num_samples, timesteps))
<ide>
<del> def rnn_step_fn(input_dim, output_dim, k):
<add> def rnn_step_fn(k):
<ide> W_i = k.variable(W_i_val)
<ide> W_o = k.variable(W_o_val)
<ide>
<ide> def step_function(x, states):
<ide> state_list = [[], [], [], [], [], []]
<ide>
<ide> for k in BACKENDS:
<del> rnn_fn = rnn_step_fn(input_dim, output_dim, k)
<add> rnn_fn = rnn_step_fn(k)
<ide> inputs = k.variable(input_val)
<ide> initial_states = [k.variable(init_state_val)]
<ide> mask = k.variable(np_mask)
<ide> def step_function(x, states):
<ide> assert_allclose(b_s, b_u_s, atol=1e-04)
<ide>
<ide> for m_l, u_m_l, k in zip(last_output_list[4], last_output_list[5], BACKENDS):
<del> # skip this compare on tensorflow
<del> if k != KTF:
<del> assert_allclose(m_l, u_m_l, atol=1e-04)
<add> if k == KTF:
<add> m_l = m_l * np.expand_dims(np_mask[:, -1], -1)
<add> u_m_l = u_m_l * np.expand_dims(np_mask[:, -1], -1)
<add> assert_allclose(m_l, u_m_l, atol=1e-04)
<ide>
<ide> for m_o, u_m_o, k in zip(outputs_list[4], outputs_list[5], BACKENDS):
<del> # skip this compare on tensorflow
<del> if k != KTF:
<del> assert_allclose(m_o, u_m_o, atol=1e-04)
<add> if k == KTF:
<add> m_o = m_o * np.expand_dims(np_mask, -1)
<add> u_m_o = u_m_o * np.expand_dims(np_mask, -1)
<add> assert_allclose(m_o, u_m_o, atol=1e-04)
<ide>
<ide> for m_s, u_m_s, k in zip(state_list[4], state_list[5], BACKENDS):
<del> if k != KTF:
<del> assert_allclose(m_s, u_m_s, atol=1e-04)
<add> assert_allclose(m_s, u_m_s, atol=1e-04)
<ide>
<ide> def test_rnn_no_states(self):
<ide> # implement a simple RNN without states
<ide> def test_rnn_no_states(self):
<ide> input_val = np.random.random((32, timesteps, input_dim))
<ide> W_i_val = np.random.random((input_dim, output_dim))
<ide>
<del> def rnn_step_fn(input_dim, output_dim, K):
<del> W_i = K.variable(W_i_val)
<add> def rnn_step_fn(k):
<add> W_i = k.variable(W_i_val)
<ide>
<ide> def step_function(x, states):
<ide> assert len(states) == 0
<del> output = K.dot(x, W_i)
<add> output = k.dot(x, W_i)
<ide> return output, []
<ide>
<ide> return step_function
<ide> def step_function(x, states):
<ide> outputs_list = []
<ide>
<ide> for k in BACKENDS:
<del> rnn_fn = rnn_step_fn(input_dim, output_dim, k)
<add> rnn_fn = rnn_step_fn(k)
<ide> inputs = k.variable(input_val)
<ide> initial_states = []
<ide> last_output, outputs, new_states = k.rnn(rnn_fn, inputs,
<ide> def test_batchnorm(self):
<ide> assert zth.shape == ztf.shape
<ide> assert zth.shape == zc.shape
<ide>
<del> def test_ctc(self):
<add> # the Theano and TensorFlow CTC code use different methods to ensure
<add> # numerical stability. The Theano code subtracts out the max
<add> # before the final log, so the results are different but scale
<add> # identically and still train properly
<add> @pytest.mark.parametrize('k,ref', [
<add> (KTF, [3.34211, 5.42262]),
<add> (KTH, [1.73308, 3.81351]),
<add> ], ids=['TensorFlow', 'Theano'])
<add> def test_ctc(self, k, ref):
<ide> # simplified version of TensorFlow's test
<ide>
<ide> label_lens = np.expand_dims(np.asarray([5, 4]), 1)
<ide> input_lens = np.expand_dims(np.asarray([5, 5]), 1) # number of timesteps
<ide>
<del> # the Theano and TensorFlow CTC code use different methods to ensure
<del> # numerical stability. The Theano code subtracts out the max
<del> # before the final log, so the results are different but scale
<del> # identically and still train properly
<del> loss_log_probs_tf = [3.34211, 5.42262]
<del> loss_log_probs_th = [1.73308, 3.81351]
<del>
<ide> # dimensions are batch x time x categories
<ide> labels = np.asarray([[0, 1, 2, 1, 0], [0, 1, 1, 0, -1]])
<ide> inputs = np.asarray(
<ide> def test_ctc(self):
<ide> [0.423286, 0.315517, 0.0338439, 0.0393744, 0.0339315, 0.154046]]],
<ide> dtype=np.float32)
<ide>
<del> labels_tf = KTF.variable(labels, dtype="int32")
<del> inputs_tf = KTF.variable(inputs, dtype="float32")
<del> input_lens_tf = KTF.variable(input_lens, dtype="int32")
<del> label_lens_tf = KTF.variable(label_lens, dtype="int32")
<del> res = KTF.eval(KTF.ctc_batch_cost(labels_tf, inputs_tf, input_lens_tf, label_lens_tf))
<del> assert_allclose(res[:, 0], loss_log_probs_tf, atol=1e-05)
<del>
<del> labels_th = KTH.variable(labels, dtype="int32")
<del> inputs_th = KTH.variable(inputs, dtype="float32")
<del> input_lens_th = KTH.variable(input_lens, dtype="int32")
<del> label_lens_th = KTH.variable(label_lens, dtype="int32")
<del> res = KTH.eval(KTH.ctc_batch_cost(labels_th, inputs_th, input_lens_th, label_lens_th))
<del> assert_allclose(res[0, :], loss_log_probs_th, atol=1e-05)
<add> k_labels = k.variable(labels, dtype="int32")
<add> k_inputs = k.variable(inputs, dtype="float32")
<add> k_input_lens = k.variable(input_lens, dtype="int32")
<add> k_label_lens = k.variable(label_lens, dtype="int32")
<add> res = k.eval(k.ctc_batch_cost(k_labels, k_inputs, k_input_lens, k_label_lens))
<add> assert_allclose(res[:, 0] if k == KTF else res[0, :], ref, atol=1e-05)
<ide>
<ide> '''only tensorflow tested, need special handle'''
<ide>
<ide> def test_sparse_dot(self):
<ide> # Theano has some dependency issues for sparse
<ide> backends.append(KTH)
<ide>
<del> for K in backends:
<del> t_W = K.variable(W)
<del> k_s = K.eval(K.dot(K.variable(x_sparse), t_W))
<del> k_d = K.eval(K.dot(K.variable(x_dense), t_W))
<add> for k in backends:
<add> t_W = k.variable(W)
<add> k_s = k.eval(k.dot(k.variable(x_sparse), t_W))
<add> k_d = k.eval(k.dot(k.variable(x_dense), t_W))
<ide>
<ide> assert k_s.shape == k_d.shape
<ide> assert_allclose(k_s, k_d, atol=1e-05)
<ide> def test_sparse_concat(self):
<ide> # Theano has some dependency issues for sparse
<ide> backends.append(KTH)
<ide>
<del> for K in backends:
<del> k_s = K.concatenate([K.variable(x_sparse_1), K.variable(x_sparse_2)])
<del> assert K.is_sparse(k_s)
<add> for k in backends:
<add> k_s = k.concatenate([k.variable(x_sparse_1), k.variable(x_sparse_2)])
<add> assert k.is_sparse(k_s)
<ide>
<del> k_s_d = K.eval(k_s)
<add> k_s_d = k.eval(k_s)
<ide>
<del> k_d = K.eval(K.concatenate([K.variable(x_dense_1), K.variable(x_dense_2)]))
<add> k_d = k.eval(k.concatenate([k.variable(x_dense_1), k.variable(x_dense_2)]))
<ide>
<ide> assert k_s_d.shape == k_d.shape
<ide> assert_allclose(k_s_d, k_d, atol=1e-05)
<ide> def test_arange(self):
<ide> assert np.array_equal(a_list[i], a_list[i + 1])
<ide>
<ide> for dtype in ('int32', 'int64', 'float32', 'float64'):
<del> for backend in [KTH, KTF]:
<del> t = backend.arange(10, dtype=dtype)
<del> assert backend.dtype(t) == dtype
<del>
<del> for backend in [KTH, KTF]:
<del> start = backend.constant(1, dtype='int32')
<del> t = backend.arange(start)
<del> assert len(backend.eval(t)) == 1
<del>
<del> start = backend.constant(-1, dtype='int32')
<del> t = backend.arange(start)
<del> assert len(backend.eval(t)) == 0
<add> for k in [KTH, KTF]:
<add> t = k.arange(10, dtype=dtype)
<add> assert k.dtype(t) == dtype
<add>
<add> for k in [KTH, KTF]:
<add> start = k.constant(1, dtype='int32')
<add> t = k.arange(start)
<add> assert len(k.eval(t)) == 1
<add>
<add> start = k.constant(-1, dtype='int32')
<add> t = k.arange(start)
<add> assert len(k.eval(t)) == 0
<ide>
<ide> def test_in_train_phase(self):
<ide> for training in [True, False]: | 1 |
PHP | PHP | use str class | 361a6b71da52d9d3ad6d200b22eb8c2d939da729 | <ide><path>config/session.php
<ide> <?php
<ide>
<add>use Illuminate\Support\Str;
<add>
<ide> return [
<ide>
<ide> /*
<ide>
<ide> 'cookie' => env(
<ide> 'SESSION_COOKIE',
<del> str_slug(env('APP_NAME', 'laravel'), '_').'_session'
<add> Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
<ide> ),
<ide>
<ide> /* | 1 |
Python | Python | remove use of int as boolean | 2d66d07330486ebfec287c01f6b57f0d37433c2d | <ide><path>numpy/linalg/linalg.py
<ide> def eigh(a, UPLO='L'):
<ide>
<ide> # Singular value decomposition
<ide>
<del>def svd(a, full_matrices=1, compute_uv=1):
<add>def svd(a, full_matrices=True, compute_uv=True):
<ide> """
<ide> Singular Value Decomposition.
<ide>
<ide> def pinv(a, rcond=1e-15 ):
<ide> res = empty(a.shape[:-2] + (a.shape[-1], a.shape[-2]), dtype=a.dtype)
<ide> return wrap(res)
<ide> a = a.conjugate()
<del> u, s, vt = svd(a, 0)
<add> u, s, vt = svd(a, full_matrices=False)
<ide> m = u.shape[0]
<ide> n = vt.shape[1]
<ide> cutoff = rcond*maximum.reduce(s) | 1 |
Javascript | Javascript | add headers.content-type to openfileineditor call | 43cf78d99ea016a4487f6855886a09f67d928b3d | <ide><path>Libraries/Core/Devtools/openFileInEditor.js
<ide> const getDevServer = require('./getDevServer');
<ide> function openFileInEditor(file: string, lineNumber: number) {
<ide> fetch(getDevServer().url + 'open-stack-frame', {
<ide> method: 'POST',
<add> headers: {
<add> 'Content-Type': 'application/json',
<add> },
<ide> body: JSON.stringify({file, lineNumber}),
<ide> });
<ide> } | 1 |
Text | Text | move the period outside of the code block | 11e2ad1231696f108449171f6e2a8e613778311b | <ide><path>curriculum/challenges/english/14-responsive-web-design-22/learn-css-animation-by-building-a-ferris-wheel/6169b284950e171d8d0bb16a.md
<ide> dashedName: step-29
<ide>
<ide> # --description--
<ide>
<del>Finally, create a new `75%` selector between your `50%` and `100%` selectors. Give this new selector a `background-color` property set to `yellow.`
<add>Finally, create a new `75%` selector between your `50%` and `100%` selectors. Give this new selector a `background-color` property set to `yellow`.
<ide>
<ide> With that, your animation is much smoother and your Ferris wheel is complete.
<ide> | 1 |
PHP | PHP | update filesystemadapter.php | 452d7e0afb5740d204b6e078a24a14fb7270c4f3 | <ide><path>src/Illuminate/Filesystem/FilesystemAdapter.php
<ide> public function put($path, $contents, $options = [])
<ide> * Store the uploaded file on the disk.
<ide> *
<ide> * @param string $path
<del> * @param \Illuminate\Http\UploadedFile $file
<add> * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file
<ide> * @param array $options
<ide> * @return string|false
<ide> */ | 1 |
Javascript | Javascript | use connect instead of connector in examples | c1b8acd3ccb84b5536aa54a4d2f11aec4e3c8ecc | <ide><path>examples/counter/containers/CounterApp.js
<ide> class CounterApp extends Component {
<ide> }
<ide> }
<ide>
<del>export default connect(state => ({
<del> counter: state.counter
<del>}))(CounterApp);
<add>function select(state) {
<add> return {
<add> counter: state.counter
<add> };
<add>}
<add>
<add>export default connect(select)(CounterApp);
<ide><path>examples/todomvc/containers/TodoApp.js
<ide> import React, { Component } from 'react';
<ide> import { bindActionCreators } from 'redux';
<del>import { Connector } from 'react-redux';
<add>import { connect } from 'react-redux';
<ide> import Header from '../components/Header';
<ide> import MainSection from '../components/MainSection';
<ide> import * as TodoActions from '../actions/TodoActions';
<ide>
<del>export default class TodoApp extends Component {
<add>class TodoApp extends Component {
<ide> render() {
<del> return (
<del> <Connector select={state => ({ todos: state.todos })}>
<del> {this.renderChild}
<del> </Connector>
<del> );
<del> }
<del>
<del> renderChild({ todos, dispatch }) {
<add> const { todos, dispatch } = this.props;
<ide> const actions = bindActionCreators(TodoActions, dispatch);
<add>
<ide> return (
<ide> <div>
<ide> <Header addTodo={actions.addTodo} />
<ide> export default class TodoApp extends Component {
<ide> );
<ide> }
<ide> }
<add>
<add>function select(state) {
<add> return {
<add> todos: state.todos
<add> };
<add>}
<add>
<add>export default connect(select)(TodoApp); | 2 |
Mixed | Python | add export savedmodel to wide_deep | db778817305c786ccf0a57d5537da5af09dfe65a | <ide><path>official/mnist/mnist.py
<ide> def __init__(self):
<ide> super(MNISTArgParser, self).__init__(parents=[
<ide> parsers.BaseParser(),
<ide> parsers.ImageModelParser(),
<del> parsers.ExportParser(),
<ide> ])
<ide>
<ide> self.set_defaults(
<ide><path>official/resnet/resnet_run_loop.py
<ide> def __init__(self, resnet_size_choices=None):
<ide> parsers.BaseParser(),
<ide> parsers.PerformanceParser(),
<ide> parsers.ImageModelParser(),
<del> parsers.ExportParser(),
<ide> parsers.BenchmarkParser(),
<ide> ])
<ide>
<ide><path>official/utils/arg_parsers/parsers.py
<ide> class BaseParser(argparse.ArgumentParser):
<ide> batch_size: Create a flag to specify the batch size.
<ide> multi_gpu: Create a flag to allow the use of all available GPUs.
<ide> hooks: Create a flag to specify hooks for logging.
<add> export_dir: Create a flag to specify where a SavedModel should be exported.
<ide> """
<ide>
<ide> def __init__(self, add_help=False, data_dir=True, model_dir=True,
<ide> train_epochs=True, epochs_between_evals=True,
<ide> stop_threshold=True, batch_size=True, multi_gpu=True,
<del> hooks=True):
<add> hooks=True, export_dir=True):
<ide> super(BaseParser, self).__init__(add_help=add_help)
<ide>
<ide> if data_dir:
<ide> def __init__(self, add_help=False, data_dir=True, model_dir=True,
<ide> metavar="<HK>"
<ide> )
<ide>
<add> if export_dir:
<add> self.add_argument(
<add> "--export_dir", "-ed",
<add> help="[default: %(default)s] If set, a SavedModel serialization of "
<add> "the model will be exported to this directory at the end of "
<add> "training. See the README for more details and relevant links.",
<add> metavar="<ED>"
<add> )
<add>
<ide>
<ide> class PerformanceParser(argparse.ArgumentParser):
<ide> """Default parser for specifying performance tuning arguments.
<ide> def __init__(self, add_help=False, data_format=True):
<ide> )
<ide>
<ide>
<del>class ExportParser(argparse.ArgumentParser):
<del> """Parsing options for exporting saved models or other graph defs.
<del>
<del> This is a separate parser for now, but should be made part of BaseParser
<del> once all models are brought up to speed.
<del>
<del> Args:
<del> add_help: Create the "--help" flag. False if class instance is a parent.
<del> export_dir: Create a flag to specify where a SavedModel should be exported.
<del> """
<del>
<del> def __init__(self, add_help=False, export_dir=True):
<del> super(ExportParser, self).__init__(add_help=add_help)
<del> if export_dir:
<del> self.add_argument(
<del> "--export_dir", "-ed",
<del> help="[default: %(default)s] If set, a SavedModel serialization of "
<del> "the model will be exported to this directory at the end of "
<del> "training. See the README for more details and relevant links.",
<del> metavar="<ED>"
<del> )
<del>
<del>
<ide> class BenchmarkParser(argparse.ArgumentParser):
<ide> """Default parser for benchmark logging.
<ide>
<ide><path>official/wide_deep/README.md
<ide> Run TensorBoard to inspect the details about the graph and training progression.
<ide> tensorboard --logdir=/tmp/census_model
<ide> ```
<ide>
<add>## Inference with SavedModel
<add>You can export the model into Tensorflow [SavedModel](https://www.tensorflow.org/programmers_guide/saved_model) format by using the argument `--export_dir`:
<add>
<add>```
<add>python wide_deep.py --export_dir /tmp/wide_deep_saved_model
<add>```
<add>
<add>After the model finishes training, use [`saved_model_cli`](https://www.tensorflow.org/programmers_guide/saved_model#cli_to_inspect_and_execute_savedmodel) to inspect and execute the SavedModel.
<add>
<add>Try the following commands to inspect the SavedModel:
<add>
<add>**Replace `${TIMESTAMP}` with the folder produced (e.g. 1524249124)**
<add>```
<add># List possible tag_sets. Only one metagraph is saved, so there will be one option.
<add>saved_model_cli show --dir /tmp/wide_deep_saved_model/${TIMESTAMP}/
<add>
<add># Show SignatureDefs for tag_set=serve. SignatureDefs define the outputs to show.
<add>saved_model_cli show --dir /tmp/wide_deep_saved_model/${TIMESTAMP}/ \
<add> --tag_set serve --all
<add>```
<add>
<add>### Inference
<add>Let's use the model to predict the income group of two examples:
<add>```
<add>saved_model_cli run --dir /tmp/wide_deep_saved_model/${TIMESTAMP}/ \
<add>--tag_set serve --signature_def="predict" \
<add>--input_examples='examples=[{"age":[46.], "education_num":[10.], "capital_gain":[7688.], "capital_loss":[0.], "hours_per_week":[38.]}, {"age":[24.], "education_num":[13.], "capital_gain":[0.], "capital_loss":[0.], "hours_per_week":[50.]}]'
<add>```
<add>
<add>This will print out the predicted classes and class probabilities. Class 0 is the <=50k group and 1 is the >50k group.
<add>
<ide> ## Additional Links
<ide>
<ide> If you are interested in distributed training, take a look at [Distributed TensorFlow](https://www.tensorflow.org/deploy/distributed).
<ide><path>official/wide_deep/wide_deep.py
<ide> def parse_csv(value):
<ide> return dataset
<ide>
<ide>
<add>def export_model(model, model_type, export_dir):
<add> """Export to SavedModel format.
<add>
<add> Args:
<add> model: Estimator object
<add> model_type: string indicating model type. "wide", "deep" or "wide_deep"
<add> export_dir: directory to export the model.
<add> """
<add> wide_columns, deep_columns = build_model_columns()
<add> if model_type == 'wide':
<add> columns = wide_columns
<add> elif model_type == 'deep':
<add> columns = deep_columns
<add> else:
<add> columns = wide_columns + deep_columns
<add> feature_spec = tf.feature_column.make_parse_example_spec(columns)
<add> example_input_fn = (
<add> tf.estimator.export.build_parsing_serving_input_receiver_fn(feature_spec))
<add> model.export_savedmodel(export_dir, example_input_fn)
<add>
<add>
<ide> def main(argv):
<ide> parser = WideDeepArgParser()
<ide> flags = parser.parse_args(args=argv[1:])
<ide> def eval_input_fn():
<ide> flags.stop_threshold, results['accuracy']):
<ide> break
<ide>
<add> # Export the model
<add> if flags.export_dir is not None:
<add> export_model(model, flags.model_type, flags.export_dir)
<add>
<ide>
<ide> class WideDeepArgParser(argparse.ArgumentParser):
<ide> """Argument parser for running the wide deep model.""" | 5 |
Mixed | Javascript | add cookie secrets to env | 72fe9c2463cd58ce31dba65e8a8440ce2d947eef | <ide><path>README.md
<ide> Edit your .env file with the following API keys accordingly (if you only use ema
<ide> ```
<ide>
<ide> MONGOHQ_URL='mongodb://localhost:27017/freecodecamp'
<del>BLOGGER_KEY=stuff
<add>
<ide> FACEBOOK_ID=stuff
<ide> FACEBOOK_SECRET=stuff
<add>
<ide> GITHUB_ID=stuff
<ide> GITHUB_SECRET=stuff
<add>
<ide> GOOGLE_ID=stuff
<ide> GOOGLE_SECRET=stuff
<add>
<ide> LINKEDIN_ID=stuff
<ide> LINKEDIN_SECRET=stuff
<add>
<ide> MANDRILL_PASSWORD=stuff
<ide> MANDRILL_USER=stuff
<del>SESSION_SECRET=secretstuff
<add>
<ide> TRELLO_KEY=stuff
<ide> TRELLO_SECRET=stuff
<add>
<ide> TWITTER_KEY=stuff
<ide> TWITTER_SECRET=stuff
<ide> TWITTER_TOKEN=stuff
<ide> TWITTER_TOKEN_SECRET=stuff
<add>
<add>BLOGGER_KEY=stuff
<ide> SLACK_WEBHOOK=stuff
<add>
<add>SESSION_SECRET=secretstuff
<add>COOKIE_SECRET='this is a secret'
<add>
<ide> PEER=stuff
<ide> DEBUG=true
<ide>
<ide><path>config/secrets.js
<ide> module.exports = {
<ide> },
<ide>
<ide> twitter: {
<del> consumerKey: process.env.TWITTER_KEY,
<del> consumerSecret: process.env.TWITTER_SECRET,
<del> token: process.env.TWITTER_TOKEN,
<del> tokenSecret: process.env.TWITTER_TOKEN_SECRET,
<add> consumerKey: process.env.TWITTER_KEY,
<add> consumerSecret: process.env.TWITTER_SECRET,
<add> token: process.env.TWITTER_TOKEN,
<add> tokenSecret: process.env.TWITTER_TOKEN_SECRET,
<ide> callbackURL: '/auth/twitter/callback',
<ide> passReqToCallback: true
<ide> },
<ide> module.exports = {
<ide> passReqToCallback: true
<ide> },
<ide> slackHook: process.env.SLACK_WEBHOOK,
<add>
<add> cookieSecret: process.env.COOKIE_SECRET
<ide> };
<ide><path>server/server.js
<ide> app.use(expressValidator({
<ide> }
<ide> }));
<ide> app.use(methodOverride());
<del>app.use(cookieParser());
<add>app.use(cookieParser(secrets.cookieSecret));
<ide> app.use(session({
<ide> resave: true,
<ide> saveUninitialized: true, | 3 |
Javascript | Javascript | add zstddecoder, add zstd support to ktx2loader | 2e2d7e41a10c36ff72b87cf556f3e4a0ad36d5fa | <ide><path>examples/jsm/libs/zstddec.module.js
<add>/**
<add> * @author Don McCurdy / https://www.donmccurdy.com
<add> */
<add>
<add>let init, instance, heap;
<add>
<add>const importObject = {
<add>
<add> env: {
<add>
<add> emscripten_notify_memory_growth: function ( index ) {
<add>
<add> heap = new Uint8Array( instance.exports.memory.buffer );
<add>
<add> }
<add>
<add> }
<add>
<add>}
<add>
<add>/**
<add> * ZSTD (Zstandard) decoder.
<add> *
<add> * Compiled from https://github.com/facebook/zstd/tree/dev/contrib/single_file_libs, with the
<add> * following steps:
<add> *
<add> * ```
<add> * ./combine.sh -r ../../lib -o zstddeclib.c zstddeclib-in.c
<add> * emcc zstddeclib.c -O2 -s EXPORTED_FUNCTIONS="['_ZSTD_decompress', '_ZSTD_findDecompressedSize', '_ZSTD_isError']" -s ALLOW_MEMORY_GROWTH=1 -o zstddec.wasm
<add> * base64 zstddec.wasm > zstddec.txt
<add> * ```
<add> *
<add> * The base64 string written to `zstddec.txt` is embedded as the `wasm` variable at the bottom
<add> * of this file. The rest of this file is written by hand, in order to avoid an additional JS
<add> * wrapper generated by Emscripten.
<add> */
<add>export class ZSTDDecoder {
<add>
<add> init () {
<add>
<add> if ( ! init ) {
<add>
<add> init = fetch( 'data:application/wasm;base64,' + wasm )
<add> .then( ( response ) => response.arrayBuffer() )
<add> .then( ( arrayBuffer ) => WebAssembly.instantiate( arrayBuffer, importObject ) )
<add> .then( ( result ) => {
<add>
<add> instance = result.instance;
<add>
<add> importObject.env.emscripten_notify_memory_growth( 0 ); // initialize heap.
<add>
<add> });
<add>
<add> }
<add>
<add> return init;
<add>
<add> }
<add>
<add> decode ( array, uncompressedSize = 0 ) {
<add>
<add> // Write compressed data into WASM memory.
<add> const compressedSize = array.byteLength;
<add> const compressedPtr = instance.exports.malloc( compressedSize );
<add> heap.set( array, compressedPtr );
<add>
<add> // Decompress into WASM memory.
<add> uncompressedSize = uncompressedSize || Number( instance.exports.ZSTD_findDecompressedSize( compressedPtr, compressedSize ) );
<add> const uncompressedPtr = instance.exports.malloc( uncompressedSize );
<add> const actualSize = instance.exports.ZSTD_decompress( uncompressedPtr, uncompressedSize, compressedPtr, compressedSize );
<add>
<add> // Read decompressed data and free WASM memory.
<add> const dec = heap.slice( uncompressedPtr, uncompressedPtr + actualSize );
<add> instance.exports.free( compressedPtr );
<add> instance.exports.free( uncompressedPtr );
<add>
<add> return dec;
<add>
<add> }
<add>
<add>}
<add>
<add>/**
<add> * BSD License
<add> *
<add> * For Zstandard software
<add> *
<add> * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. All rights reserved.
<add> *
<add> * Redistribution and use in source and binary forms, with or without modification,
<add> * are permitted provided that the following conditions are met:
<add> *
<add> * * Redistributions of source code must retain the above copyright notice, this
<add> * list of conditions and the following disclaimer.
<add> *
<add> * * Redistributions in binary form must reproduce the above copyright notice,
<add> * this list of conditions and the following disclaimer in the documentation
<add> * and/or other materials provided with the distribution.
<add> *
<add> * * Neither the name Facebook nor the names of its contributors may be used to
<add> * endorse or promote products derived from this software without specific
<add> * prior written permission.
<add> *
<add> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
<add> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
<add> * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<add> * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
<add> * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
<add> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
<add> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
<add> * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
<add> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
<add> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<add> */
<add>const wasm = 'AGFzbQEAAAABbw9gAn9/AGAFf39/f38Bf2ABfwF/YAN/f38Bf2AEf39/fwF/YAF/AGADf39/AGAGf39/f39/AX9gAAF/YAAAYAZ/f39/f38AYAh/f39/f39/fwF/YA1/f39/f39/f39/f39/AX9gAX8BfmACf38BfgInAQNlbnYfZW1zY3JpcHRlbl9ub3RpZnlfbWVtb3J5X2dyb3d0aAAFAy0sCQEHBAQCBAEBAQEBBwMFBA4GBwMBBg0BBAMECwoMCAIFAgMDAwYCAAgCBQIEBQFwAQICBQQBAIACBg8CfwFBgKPAAgt/AEH8IgsHxgEOBm1lbW9yeQIABm1hbGxvYwAgBGZyZWUAIQxaU1REX2lzRXJyb3IABhlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplABEPWlNURF9kZWNvbXByZXNzABkGX3N0YXJ0AAEQX19lcnJub19sb2NhdGlvbgAfCHNldFRocmV3ACgKX19kYXRhX2VuZAMBCXN0YWNrU2F2ZQApCnN0YWNrQWxsb2MAKgxzdGFja1Jlc3RvcmUAKxBfX2dyb3dXYXNtTWVtb3J5ACwJBwEAQQELAQEK2NQCLAMAAQv2BQEMfyMAQRBrIgskAAJAIARBA00EQCALQQA2AgwgC0EMaiADIAQQIxpBbCAAIAEgAiALQQxqQQQQAiIAIAAgBEsbIAAgAEGJf0kbIQcMAQsgAEEAIAEoAgBBAXRBAmoQJCEOQVQhByADKAAAIglBD3EiAEEKSw0AIAIgAEEFajYCACADIARqIgRBfGohDSAEQXlqIQ8gBEF7aiEQQQQhAiAJQQR2IQQgAEEGaiEJQSAgAHQiB0EBciEKIAEoAgAhDCADIQUDQAJAAkAgCEUEQCAGIQAMAQsgBiEAIARB//8DcUH//wNGBEADQAJAIAUgEEkEQCAFKAACIAJ2IQQgBUECaiEFDAELIAJBEGohAiAEQRB2IQQL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iBEGMgIDgADYCACAAQQFBBSAAKALs4QEbNgLI4AEgACAENgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgAgAEGs0AFqQeASKQIANwIAIABBtNABakHoEigCADYCAAJAIAFFDQAgAkUNACACQQdNBEAgACABNgLA4AEgAEEANgLE4AEgACABNgK84AEgACABIAJqNgK44AFBAA8LIAEoAABBt8jC4X5HBEAgACABNgLA4AEgAEEANgLE4AEgACABNgK84AEgACABIAJqNgK44AFBAA8LIAAgASgABDYCmOIBQWIhAyAAQRBqIAEgAhAOIgRBiH9LDQAgAEKBgICAEDcDiOEBIAAoArjgASEDIAAgASACajYCuOABIAAgAzYCxOABIAAoArzgASECIAAgASAEaiIBNgK84AEgACABIAIgA2tqNgLA4AFBACEDCyADC5VRAh9/Bn4jAEHgAWsiBSQAIABB2OABaikDAEKAgIAQViEXQbh/IQcCQCAEQf//B0sNACAAIAMgBBAaIgdBiH9LDQAgACgCnOIBIQogACAFQTRqIAMgB2ogAyAHQYl/SSIWGyIDIAQgB0EAIBYbayIIEBsiBEGIf0sEQCAEIQcMAQsgBSgCNCEWIAFFBEBBun8hByAWQQBKDQELIAggBGshCSADIARqIQgCQAJAAkAgCgRAIABBADYCnOIBDAELIBZBBUgNASAAQdjgAWopAwBCgICACFgEQAwCCyAAKAIIIgRBCGohAyAEKAIEIQZBACEHQQAhBANAIAcgAyAEQQN0ai0AAkEWS2ohByAEQQFqIgQgBnZFDQALIABBADYCnOIBIAdBCCAGa3RBFEkNAgsgBSAAKALw4QEiBDYCzAEgASACaiEZIAQgACgCgOIBaiEbIAEhAyAWBEAgACgCxOABIRMgACgCwOABIR0gACgCvOABIQogAEEBNgKM4QEgBSAAQbTQAWooAgA2AmwgBSAAQazQAWoiICkCADcCZCAFIBM2AnQgBSAKNgJwIAUgASAKayIYNgJ4IAlFBEAgBUEANgJIIAVBQGtCADcDACAFQgA3AzhBbCEHDAQLIAUgCDYCRCAFIAhBBGo2AkgCQAJAIAlBBE8E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A8LIAAgAmohAwJAIAAgAXNBA3FFBEACQCACQQFIBEAgACECDAELIABBA3FFBEAgACECDAELIAAhAgNAIAIgAS0AADoAACABQQFqIQEgAkEBaiICIANPDQEgAkEDcQ0ACwsCQCADQXxxIgRBwABJDQAgAiAEQUBqIgVLDQADQCACIAEoAgA2AgAgAiABKAIENgIEIAIgASgCCDYCCCACIAEoAgw2AgwgAiABKAIQNgIQIAIgASgCFDYCFCACIAEoAhg2AhggAiABKAIcNgIcIAIgASgCIDYCICACIAEoAiQ2AiQgAiABKAIoNgIoIAIgASgCLDYCLCACIAEoAjA2AjAgAiABKAI0NgI0IAIgASgCODYCOCACIAEoAjw2AjwgAUFAayEBIAJBQGsiAiAFTQ0ACwsgAiAETw0BA0AgAiABKAIANgIAIAFBBGohASACQQRqIgIgBEkNAAsMAQsgA0EESQRAIAAhAgwBCyADQXxqIgQgAEkEQCAAIQIMAQsgACECA0AgAiABLQAAOgAAIAIgAS0AAToAASACIAEtAAI6AAIgAiABLQADOgADIAFBBGohASACQQRqIgIgBE0NAAsLIAIgA0kEQANAIAIgAS0AADoAACABQQFqIQEgAkEBaiICIANHDQALCyAAC/MCAgJ/AX4CQCACRQ0AIAAgAmoiA0F/aiABOgAAIAAgAToAACACQQNJDQAgA0F+aiABOgAAIAAgAToAASADQX1qIAE6AAAgACABOgACIAJBB0kNACADQXxqIAE6AAAgACABOgADIAJBCUkNACAAQQAgAGtBA3EiBGoiAyABQf8BcUGBgoQIbCIBNgIAIAMgAiAEa0F8cSIEaiICQXxqIAE2AgAgBEEJSQ0AIAMgATYCCCADIAE2AgQgAkF4aiABNgIAIAJBdGogATYCACAEQRlJDQAgAyABNgIYIAMgATYCFCADIAE2AhAgAyABNgIMIAJBcGogATYCACACQWxqIAE2AgAgAkFoaiABNgIAIAJBZGogATYCACAEIANBBHFBGHIiBGsiAkEgSQ0AIAGtIgVCIIYgBYQhBSADIARqIQEDQCABIAU3AxggASAFNwMQIAEgBTcDCCABIAU3AwAgAUEga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/jsm/loaders/KTX2Loader.js
<ide> import {
<ide> sRGBEncoding,
<ide> } from '../../../build/three.module.js';
<ide>
<add>import { ZSTDDecoder } from '../libs/zstddec.module.js';
<add>
<ide> // Data Format Descriptor (DFD) constants.
<ide>
<ide> const DFDModel = {
<ide> class KTX2Container {
<ide> this.basisModule = basisModule;
<ide> this.arrayBuffer = arrayBuffer;
<ide>
<add> this.zstd = new ZSTDDecoder();
<add> this.zstd.init();
<add>
<ide> this.mipmaps = null;
<ide> this.transcodedFormat = null;
<ide>
<ide> class KTX2Container {
<ide>
<ide> }
<ide>
<del> initMipmaps( transcoder, config ) {
<add> async initMipmaps( transcoder, config ) {
<add>
<add> await this.zstd.init();
<ide>
<ide> var TranscodeTarget = this.basisModule.TranscodeTarget;
<ide> var TextureFormat = this.basisModule.TextureFormat;
<ide> class KTX2Container {
<ide> var numImagesInLevel = 1; // TODO(donmccurdy): Support cubemaps, arrays and 3D.
<ide> var imageOffsetInLevel = 0;
<ide> var imageInfo = new ImageInfo( texFormat, levelWidth, levelHeight, level );
<del> var levelImageByteLength = imageInfo.numBlocksX * imageInfo.numBlocksY * this.dfd.bytesPlane0;
<add> var levelByteLength = this.levels[ level ].byteLength;
<add> var levelUncompressedByteLength = this.levels[ level ].uncompressedByteLength;
<ide>
<ide> for ( var imageIndex = 0; imageIndex < numImagesInLevel; imageIndex ++ ) {
<ide>
<ide> class KTX2Container {
<ide>
<ide> imageInfo.flags = 0;
<ide> imageInfo.rgbByteOffset = 0;
<del> imageInfo.rgbByteLength = levelImageByteLength;
<add> imageInfo.rgbByteLength = levelUncompressedByteLength;
<ide> imageInfo.alphaByteOffset = 0;
<ide> imageInfo.alphaByteLength = 0;
<ide>
<del> encodedData = new Uint8Array( this.arrayBuffer, this.levels[ level ].byteOffset + imageOffsetInLevel, levelImageByteLength );
<add> encodedData = new Uint8Array( this.arrayBuffer, this.levels[ level ].byteOffset + imageOffsetInLevel, levelByteLength );
<add>
<add> if ( this.header.supercompressionScheme === 2 /* ZSTD */ ) {
<add>
<add> encodedData = this.zstd.decode( encodedData, levelUncompressedByteLength );
<add>
<add> }
<ide>
<ide> result = transcoder.transcodeImage( targetFormat, encodedData, imageInfo, 0, hasAlpha, isVideo );
<ide>
<ide> class KTX2Container {
<ide> result.transcodedImage.delete();
<ide>
<ide> mipmaps.push( { data: levelData, width: levelWidth, height: levelHeight } );
<del> imageOffsetInLevel += levelImageByteLength;
<add> imageOffsetInLevel += levelByteLength;
<ide>
<ide> }
<ide>
<ide> }
<ide>
<del> return new Promise( function ( resolve, reject ) {
<del>
<del> scope.mipmaps = mipmaps;
<del>
<del> resolve();
<del>
<del> } );
<add> scope.mipmaps = mipmaps;
<ide>
<ide> }
<ide> | 2 |
Ruby | Ruby | ask the formula if it can be cleaned up once | 338a08d8d6f10596593bfdf5ebc80e83c390069f | <ide><path>Library/Homebrew/cmd/cleanup.rb
<ide> def cleanup_cellar
<ide> def cleanup_formula f
<ide> if f.installed?
<ide> eligible_kegs = f.rack.subdirs.map { |d| Keg.new(d) }.select { |k| f.pkg_version > k.version }
<del> eligible_kegs.each do |keg|
<del> if f.can_cleanup?
<del> cleanup_keg(keg)
<del> else
<del> opoo "Skipping (old) keg-only: #{keg}"
<del> end
<add> if eligible_kegs.any? && f.can_cleanup?
<add> eligible_kegs.each { |keg| cleanup_keg(keg) }
<add> else
<add> eligible_kegs.each { |keg| opoo "Skipping (old) keg-only: #{keg}" }
<ide> end
<ide> elsif f.rack.subdirs.length > 1
<ide> # If the cellar only has one version installed, don't complain | 1 |
Javascript | Javascript | remove the need to install grunt globally | b2bbaa36d4d37bd48f954ed3cdbd50d3461a523d | <ide><path>build/release.js
<ide> module.exports = function( Release ) {
<ide> * @param {Function} callback
<ide> */
<ide> generateArtifacts: function( callback ) {
<del> Release.exec( "grunt", "Grunt command failed" );
<add> Release.exec( "npx grunt", "Grunt command failed" );
<ide> Release.exec(
<del> "grunt custom:slim --filename=jquery.slim.js && " +
<del> "grunt remove_map_comment --filename=jquery.slim.js",
<add> "npx grunt custom:slim --filename=jquery.slim.js && " +
<add> "npx grunt remove_map_comment --filename=jquery.slim.js",
<ide> "Grunt custom failed"
<ide> );
<ide> cdn.makeReleaseCopies( Release ); | 1 |
Text | Text | add description of when clause | 7ea5810a8acc055c42b0b05e6d09c917487e94bc | <ide><path>guide/english/csharp/switch-case/index.md
<ide> switch(myColor) {
<ide> ```
<ide> This will execute the same lines of code if myColor is either Red or Blue.
<ide>
<add>## When clause
<add>
<add>Starting with C# 7.0 you can use `when` clause to specify additional condition that must be satisfied. When clause is optional and is used right after specific case.
<add>
<add>```csharp
<add>Dog dog = new Dog
<add>{
<add> Name = "Charlie",
<add> Breed = "Affenpinscher",
<add> Age = 3
<add>};
<add>
<add>switch (dog)
<add>{
<add> case Dog d when d.Breed == "Affenpinscher" && d.Age >= 6:
<add> Console.WriteLine($"{dog.Name} is considered a senior dog.");
<add> break;
<add> case Dog d when d.Breed == "Affenpinscher" && d.Age >= 2:
<add> Console.WriteLine($"{dog.Name} is considered an adult dog.");
<add> break;
<add> case Dog d when d.Breed == "Affenpinscher":
<add> Console.WriteLine($"{dog.Name} is considered a puppy.");
<add> break;
<add> case Dog d when d.Breed == "Chihuahua" && d.Age >= 4:
<add> Console.WriteLine($"{dog.Name} is considered a senior dog.");
<add> break;
<add> case Dog d when d.Breed == "Chihuahua" && d.Age >= 2:
<add> Console.WriteLine($"{dog.Name} is considered an adult dog.");
<add> break;
<add> case Dog d when d.Breed == "Chihuahua":
<add> Console.WriteLine($"{dog.Name} is considered a puppy.");
<add> break;
<add> default:
<add> Console.WriteLine($"We have no information according {dog.Breed} breed.");
<add> break;
<add>}
<add>```
<add>As you see in the above example after `when` keyword you should specify logical condition (an instruction that returns bool value).
<add>
<ide> ### Sources:
<ide> - 1 https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/switch | 1 |
Javascript | Javascript | extract feature detection as an utilitiy module | 06388891a3441900d9eb04de23dcf00c55a65406 | <ide><path>Libraries/Core/setUpTimers.js
<ide> 'use strict';
<ide>
<ide> const {polyfillGlobal} = require('../Utilities/PolyfillFunctions');
<add>const {isNativeFunction} = require('../Utilities/FeatureDetection');
<ide>
<ide> if (__DEV__) {
<ide> if (typeof global.Promise !== 'function') {
<ide> const hasHermesPromiseQueuedToJSVM =
<ide> global?.HermesInternal?.hasPromise?.() &&
<ide> global?.HermesInternal?.useEngineQueue?.();
<ide>
<del>// An util function to tell whether a function is provided natively by calling
<del>// the `toString` and check if the result includes `[native code]` in it.
<del>// N.B. a polyfill can fake this behavior but they usually won't. Hence this
<del>// is usually good enough for our purpose.
<del>const isNativeFunction = f =>
<del> typeof f === 'function' && f.toString().indexOf('[native code]') > -1;
<ide> const hasNativePromise = isNativeFunction(Promise);
<del>
<ide> const hasPromiseQueuedToJSVM = hasNativePromise || hasHermesPromiseQueuedToJSVM;
<ide>
<ide> // In bridgeless mode, timers are host functions installed from cpp.
<ide><path>Libraries/Utilities/FeatureDetection.js
<add>/**
<add> * Copyright (c) Facebook, Inc. and its affiliates.
<add> *
<add> * This source code is licensed under the MIT license found in the
<add> * LICENSE file in the root directory of this source tree.
<add> *
<add> * @flow
<add> * @format
<add> */
<add>
<add>/**
<add> * @return whether or not a @param {function} f is provided natively by calling
<add> * `toString` and check if the result includes `[native code]` in it.
<add> *
<add> * Note that a polyfill can technically fake this behavior but few does it.
<add> * Therefore, this is usually good enough for our purpose.
<add> */
<add>function isNativeFunction(f: Function): boolean {
<add> return typeof f === 'function' && f.toString().indexOf('[native code]') > -1;
<add>}
<add>
<add>module.exports = {isNativeFunction}; | 2 |
Javascript | Javascript | return error from cat_promise in node.fs.cat | 389c80aece99f95c30662332af31fd113511dce3 | <ide><path>src/file.js
<ide> node.fs.cat = function (path, encoding) {
<ide>
<ide> encoding = encoding || "utf8";
<ide>
<del> open_promise.addErrback(function () { cat_promise.emitError(); });
<add> open_promise.addErrback(function () {
<add> cat_promise.emitError(new Error("Could not open " + path));
<add> });
<ide> open_promise.addCallback(function (fd) {
<ide> var content = (encoding === "raw" ? [] : "");
<ide> var pos = 0; | 1 |
Go | Go | use tmp dir in driver home | 6669c86fdf1ae07b66a6e178e269d797f6397bca | <ide><path>aufs/aufs.go
<ide> func (a *AufsDriver) Remove(id string) error {
<ide>
<ide> // Remove the dirs atomically
<ide> for _, p := range tmpDirs {
<del> tmp := path.Join(os.TempDir(), p, id)
<add> // We need to use a temp dir in the same dir as the driver so Rename
<add> // does not fall back to the slow copy if /tmp and the driver dir
<add> // are on different devices
<add> tmp := path.Join(a.rootPath(), "tmp", p, id)
<ide> if err := os.MkdirAll(tmp, 0755); err != nil {
<ide> return err
<ide> } | 1 |
PHP | PHP | add task discovery to bakeshell | ee3003e2b8f24f33e503c4a9be1e87c6507be64f | <ide><path>src/Console/Command/BakeShell.php
<ide> protected function _findTasks($tasks, $path, $namespace, $prefix = false) {
<ide> if (!is_dir($path)) {
<ide> return $tasks;
<ide> }
<add> $candidates = $this->_findClassFiles($path, $namespace);
<add> $classes = $this->_findTaskClasses($candidates);
<add> foreach ($classes as $class) {
<add> list($ns, $name) = namespaceSplit($class);
<add> $name = substr($name, 0, -4);
<add> $fullName = ($prefix ? $prefix . '.' : '') . $name;
<add> $tasks[$name] = $fullName;
<add> }
<add> return $tasks;
<add> }
<add>
<add>/**
<add> * Find task classes in a given path.
<add> *
<add> * @param string $path The path to scan.
<add> * @return array An array of files that may contain bake tasks.
<add> */
<add> protected function _findClassFiles($path, $namespace) {
<ide> $iterator = new \DirectoryIterator($path);
<ide> $candidates = [];
<ide> foreach ($iterator as $item) {
<ide> protected function _findTasks($tasks, $path, $namespace, $prefix = false) {
<ide> $name = $item->getBasename('.php');
<ide> $candidates[] = $namespace . '\Console\Command\Task\\' . $name;
<ide> }
<add> return $candidates;
<add> }
<add>
<add>/**
<add> * Find bake tasks in a given set of files.
<add> *
<add> * @param array $files The array of files.
<add> * @return array An array of matching classes.
<add> */
<add> protected function _findTaskClasses($files) {
<ide> $classes = [];
<del> foreach ($candidates as $classname) {
<add> foreach ($files as $classname) {
<ide> if (!class_exists($classname)) {
<ide> continue;
<ide> }
<ide> protected function _findTasks($tasks, $path, $namespace, $prefix = false) {
<ide> }
<ide> $classes[] = $classname;
<ide> }
<del> foreach ($classes as $class) {
<del> list($ns, $name) = namespaceSplit($class);
<del> $name = substr($name, 0, -4);
<del> $fullName = ($prefix ? $prefix . '.' : '') . $name;
<del> $tasks[$name] = $fullName;
<del> }
<del> return $tasks;
<add> return $classes;
<ide> }
<ide>
<ide> /**
<ide><path>tests/TestCase/Console/Command/BakeShellTest.php
<ide> use Cake\Controller\Controller;
<ide> use Cake\Core\App;
<ide> use Cake\Core\Configure;
<add>use Cake\Core\Plugin;
<ide> use Cake\TestSuite\TestCase;
<ide>
<ide> class BakeShellTest extends TestCase {
<ide> public function testMain() {
<ide> }
<ide>
<ide> /**
<del> * Test loading tasks from core and app directories.
<add> * Test loading tasks from core directories.
<ide> *
<ide> * @return void
<ide> */
<del> public function testLoadTasks() {
<add> public function testLoadTasksCoreAndApp() {
<ide> $this->Shell->loadTasks();
<ide> $expected = [
<ide> 'Behavior',
<ide> public function testLoadTasks() {
<ide> 'Plugin',
<ide> 'Project',
<ide> 'Test',
<del> 'View'
<add> 'View',
<add> 'Zerg',
<ide> ];
<ide> $this->assertEquals($expected, $this->Shell->tasks);
<ide> }
<ide> public function testLoadTasks() {
<ide> * @return void
<ide> */
<ide> public function testLoadTasksPlugin() {
<add> Plugin::load('TestPlugin');
<add> $this->Shell->loadTasks();
<add> $this->assertContains('TestPlugin.Widget', $this->Shell->tasks);
<add> $this->assertContains('TestPlugin.Zerg', $this->Shell->tasks);
<ide> }
<ide>
<ide> }
<ide><path>tests/test_app/Plugin/TestPlugin/Console/Command/Task/WidgetTask.php
<add><?php
<add>/**
<add> * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
<add> * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
<add> *
<add> * Licensed under The MIT License
<add> * For full copyright and license information, please see the LICENSE.txt
<add> * Redistributions of files must retain the above copyright notice.
<add> *
<add> * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
<add> * @link http://cakephp.org CakePHP(tm) Project
<add> * @since 3.0.0
<add> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<add> */
<add>namespace TestPlugin\Console\Command\Task;
<add>
<add>use Cake\Console\Command\Task\BakeTask;
<add>
<add>/**
<add> * Test stub for BakeShell.
<add> */
<add>class WidgetTask extends BakeTask {
<add>
<add>}
<ide><path>tests/test_app/Plugin/TestPlugin/Console/Command/Task/ZergTask.php
<add><?php
<add>/**
<add> * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
<add> * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
<add> *
<add> * Licensed under The MIT License
<add> * For full copyright and license information, please see the LICENSE.txt
<add> * Redistributions of files must retain the above copyright notice.
<add> *
<add> * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
<add> * @link http://cakephp.org CakePHP(tm) Project
<add> * @since 3.0.0
<add> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<add> */
<add>namespace TestPlugin\Console\Command\Task;
<add>
<add>use Cake\Console\Command\Task\BakeTask;
<add>
<add>/**
<add> * Test stub for BakeShell.
<add> */
<add>class ZergTask extends BakeTask {
<add>
<add>}
<ide><path>tests/test_app/TestApp/Console/Command/Task/ZergTask.php
<add><?php
<add>/**
<add> * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
<add> * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
<add> *
<add> * Licensed under The MIT License
<add> * For full copyright and license information, please see the LICENSE.txt
<add> * Redistributions of files must retain the above copyright notice.
<add> *
<add> * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
<add> * @link http://cakephp.org CakePHP(tm) Project
<add> * @since 3.0.0
<add> * @license http://www.opensource.org/licenses/mit-license.php MIT License
<add> */
<add>namespace TestApp\Console\Command\Task;
<add>
<add>use Cake\Console\Command\Task\BakeTask;
<add>
<add>/**
<add> * Test stub for BakeShell.
<add> */
<add>class ZergTask extends BakeTask {
<add>
<add>} | 5 |
Python | Python | improve exception type | c8b0c1e551ed7f19ce2cfa3d4f84eddb2c371d5c | <ide><path>src/transformers/commands/serving.py
<ide> def __init__(self, pipeline: Pipeline, host: str, port: int):
<ide> self._host = host
<ide> self._port = port
<ide> if not _serve_dependancies_installed:
<del> raise ImportError(
<add> raise RuntimeError(
<ide> "Using serve command requires FastAPI and unicorn. "
<ide> "Please install transformers with [serving]: pip install transformers[serving]."
<ide> "Or install FastAPI and unicorn separatly."
<ide><path>src/transformers/commands/train.py
<ide>
<ide>
<ide> if not is_tf_available() and not is_torch_available():
<del> raise ImportError("At least one of PyTorch or TensorFlow 2.0+ should be installed to use CLI training")
<add> raise RuntimeError("At least one of PyTorch or TensorFlow 2.0+ should be installed to use CLI training")
<ide>
<ide> # TF training parameters
<ide> USE_XLA = False
<ide><path>src/transformers/data/processors/squad.py
<ide> def squad_convert_examples_to_features(
<ide> del new_features
<ide> if return_dataset == "pt":
<ide> if not is_torch_available():
<del> raise ImportError("Pytorch must be installed to return a pytorch dataset.")
<add> raise RuntimeError("PyTorch must be installed to return a PyTorch dataset.")
<ide>
<ide> # Convert to Tensors and build dataset
<ide> all_input_ids = torch.tensor([f.input_ids for f in features], dtype=torch.long)
<ide> def squad_convert_examples_to_features(
<ide> return features, dataset
<ide> elif return_dataset == "tf":
<ide> if not is_tf_available():
<del> raise ImportError("TensorFlow must be installed to return a TensorFlow dataset.")
<add> raise RuntimeError("TensorFlow must be installed to return a TensorFlow dataset.")
<ide>
<ide> def gen():
<ide> for ex in features:
<ide><path>src/transformers/data/processors/utils.py
<ide> def get_features(
<ide> return features
<ide> elif return_tensors == "tf":
<ide> if not is_tf_available():
<del> raise ImportError("return_tensors set to 'tf' but TensorFlow 2.0 can't be imported")
<add> raise RuntimeError("return_tensors set to 'tf' but TensorFlow 2.0 can't be imported")
<ide> import tensorflow as tf
<ide>
<ide> def gen():
<ide> def gen():
<ide> return dataset
<ide> elif return_tensors == "pt":
<ide> if not is_torch_available():
<del> raise ImportError("return_tensors set to 'pt' but PyTorch can't be imported")
<add> raise RuntimeError("return_tensors set to 'pt' but PyTorch can't be imported")
<ide> import torch
<ide> from torch.utils.data import TensorDataset
<ide>
<ide><path>src/transformers/pipelines.py
<ide> def get_framework(model=None):
<ide> # Try to guess which framework to use from the model classname
<ide> framework = "tf" if model.__class__.__name__.startswith("TF") else "pt"
<ide> elif not is_tf_available() and not is_torch_available():
<del> raise ImportError(
<add> raise RuntimeError(
<ide> "At least one of TensorFlow 2.0 or PyTorch should be installed. "
<ide> "To install TensorFlow 2.0, read the instructions at https://www.tensorflow.org/install/ "
<ide> "To install PyTorch, read the instructions at https://pytorch.org/." | 5 |
Python | Python | fix history callback | 1e73e1bc54a051db4a8215243a6caae61584b9b8 | <ide><path>keras/callbacks.py
<ide> def on_batch_end(self, batch, logs={}):
<ide> def on_epoch_end(self, epoch, logs={}):
<ide> self.epoch.append(epoch)
<ide> for k, v in self.totals.items():
<del> self.history[k] = v / self.seen
<add> if k not in self.history:
<add> self.history[k] = []
<add> self.history[k].append(v / self.seen)
<ide>
<ide> for k, v in logs.items():
<del> self.history[k] = v
<add> if k not in self.history:
<add> self.history[k] = []
<add> self.history[k].append(v)
<ide>
<ide>
<ide> class ModelCheckpoint(Callback): | 1 |
Python | Python | add test for list_locations | 661edc23e3f770550eeafb96af94923ae22ffa76 | <ide><path>test/__init__.py
<ide> def test_list_images_response(self):
<ide> for image in images:
<ide> self.assertTrue(isinstance(image, NodeImage))
<ide>
<add>
<add> def test_list_images_response(self):
<add> locations = self.driver.list_locations()
<add> self.assertTrue(isinstance(locations, list))
<add> for dc in locations:
<add> self.assertTrue(isinstance(dc, NodeLocation))
<add>
<ide> def test_create_node_response(self):
<ide> # should return a node object
<ide> size = self.driver.list_sizes()[0] | 1 |
Go | Go | add check for non-systemd fd use case | 3c69d340ebe35dc3adb56cd2345cbac3c1dd5fb8 | <ide><path>docker/listeners/listeners_unix.go
<ide> func listenFD(addr string, tlsConfig *tls.Config) ([]net.Listener, error) {
<ide> }
<ide>
<ide> if len(listeners) == 0 {
<del> return nil, fmt.Errorf("No sockets found")
<add> return nil, fmt.Errorf("No sockets found. Make sure the docker daemon was started by systemd.")
<ide> }
<ide>
<ide> // default to all fds just like unix:// and tcp:// | 1 |
Python | Python | fix issue with sequential deserialization | 8f8e4574dc1d807fe98553369499da892077f3d7 | <ide><path>keras/models.py
<ide> def get_config(self):
<ide> return copy.deepcopy(config)
<ide>
<ide> @classmethod
<del> def from_config(cls, config, layer_cache={}):
<add> def from_config(cls, config, layer_cache=None):
<ide> '''Supports legacy formats
<ide> '''
<ide> from keras.utils.layer_utils import layer_from_config
<ide> from keras.layers import Merge
<ide> assert type(config) is list
<ide>
<add> if not layer_cache:
<add> layer_cache = {}
<add>
<ide> def normalize_legacy_config(conf):
<ide> if 'class_name' not in conf:
<ide> class_name = conf['name'] | 1 |
Javascript | Javascript | avoid garbage collector as all costs per @gero3 | 67fdeb97b935925df82b3a265ff4d383bf981337 | <ide><path>src/core/Box2.js
<ide> THREE.Box2.prototype = {
<ide>
<ide> setFromCenterAndSize: function ( center, size ) {
<ide>
<del> var halfSize = new THREE.Vector2().copy( size ).multiplyScalar( 0.5 );
<add> var halfSize = THREE.Box2.__v1.copy( size ).multiplyScalar( 0.5 );
<ide> this.min.copy( center ).subSelf( halfSize );
<ide> this.max.copy( center ).addSelf( halfSize );
<ide>
<ide> THREE.Box2.prototype = {
<ide> return this;
<ide> }
<ide>
<del>};
<ide>\ No newline at end of file
<add>};
<add>
<add>THREE.Box2.__v1 = new THREE.Vector2();
<ide>\ No newline at end of file
<ide><path>src/core/Box3.js
<ide> THREE.Box3.prototype = {
<ide>
<ide> setFromCenterAndSize: function ( center, size ) {
<ide>
<del> var halfSize = new THREE.Vector3().copy( size ).multiplyScalar( 0.5 );
<add> var halfSize = THREE.Box3.__v1.copy( size ).multiplyScalar( 0.5 );
<ide> this.min.copy( center ).subSelf( halfSize );
<ide> this.max.copy( center ).addSelf( halfSize );
<ide>
<ide> THREE.Box3.prototype = {
<ide> return this;
<ide> }
<ide>
<del>};
<ide>\ No newline at end of file
<add>};
<add>
<add>THREE.Box3.__v1 = new THREE.Vector3();
<ide>\ No newline at end of file | 2 |
Javascript | Javascript | replace clazz by classnames | f35176a32e1e39bdbe0e1fcb6968345419cc6f7a | <ide><path>src/core/xfa/template.js
<ide> class Draw extends XFAObject {
<ide> "borderMarginPadding"
<ide> );
<ide>
<del> const clazz = ["xfaDraw"];
<add> const classNames = ["xfaDraw"];
<ide> if (this.font) {
<del> clazz.push("xfaFont");
<add> classNames.push("xfaFont");
<ide> }
<ide>
<ide> const attributes = {
<ide> style,
<ide> id: this[$uid],
<del> class: clazz.join(" "),
<add> class: classNames.join(" "),
<ide> };
<ide>
<ide> if (this.name) {
<ide> class ExclGroup extends XFAObject {
<ide> "borderMarginPadding",
<ide> "hAlign"
<ide> );
<del> const clazz = ["xfaExclgroup"];
<add> const classNames = ["xfaExclgroup"];
<ide> const cl = layoutClass(this);
<ide> if (cl) {
<del> clazz.push(cl);
<add> classNames.push(cl);
<ide> }
<ide>
<ide> attributes.style = style;
<del> attributes.class = clazz.join(" ");
<add> attributes.class = classNames.join(" ");
<ide>
<ide> if (this.name) {
<ide> attributes.xfaName = this.name;
<ide> class Field extends XFAObject {
<ide> "hAlign"
<ide> );
<ide>
<del> const clazz = ["xfaField"];
<add> const classNames = ["xfaField"];
<ide> // If no font, font properties are inherited.
<ide> if (this.font) {
<del> clazz.push("xfaFont");
<add> classNames.push("xfaFont");
<ide> }
<ide>
<ide> const attributes = {
<ide> style,
<ide> id: this[$uid],
<del> class: clazz.join(" "),
<add> class: classNames.join(" "),
<ide> };
<ide>
<ide> if (this.name) {
<ide> class Subform extends XFAObject {
<ide> "borderMarginPadding",
<ide> "hAlign"
<ide> );
<del> const clazz = ["xfaSubform"];
<add> const classNames = ["xfaSubform"];
<ide> const cl = layoutClass(this);
<ide> if (cl) {
<del> clazz.push(cl);
<add> classNames.push(cl);
<ide> }
<ide>
<ide> attributes.style = style;
<del> attributes.class = clazz.join(" ");
<add> attributes.class = classNames.join(" ");
<ide>
<ide> if (this.name) {
<ide> attributes.xfaName = this.name; | 1 |
PHP | PHP | add better documentation to composers.php | 5b75546e7e5d253476e22862e23c0ca1f85e717c | <ide><path>application/composers.php
<ide> |--------------------------------------------------------------------------
<ide> |
<ide> | Named views give you beautiful syntax when working with your views.
<del> | After you have defined a name for a view, you can create an instance of
<del> | that view using the expressive View::of dynamic method:
<ide> |
<del> | return View::of_layout();
<add> | Here's how to define a named view:
<add> |
<add> | 'home.index' => array('name' => 'home')
<add> |
<add> | Now, you can create an instance of that view using the expressive View::of
<add> | dynamic method. Take a look at this example:
<ide> |
<del> | For more information, check out: http://laravel.com/docs/start/views#named-views
<add> | return View::of_layout();
<ide> |
<ide> | View composers provide a convenient way to add common elements to a view
<ide> | each time it is created. For example, you may wish to bind a header and
<ide> | footer partial each time the view is created.
<ide> |
<ide> | The composer will receive an instance of the view being created, and is
<del> | free to modify the view however you wish.
<add> | free to modify the view however you wish. Here is how to define one:
<add> |
<add> | 'home.index' => function($view)
<add> | {
<add> | //
<add> | }
<add> |
<add> | Of course, you may define a view name and a composer for a single view:
<ide> |
<del> | For more information, check out: http://laravel.com/docs/start/views#composers
<add> | 'home.index' => array('name' => 'home', function($view)
<add> | {
<add> | //
<add> | })
<ide> |
<ide> */
<ide> | 1 |
Ruby | Ruby | add default value for `create_table_definition` | 84859c45a7411151c84b23c490a62b7e7f09b8e9 | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
<ide> def rename_column_indexes(table_name, column_name, new_column_name)
<ide> end
<ide>
<ide> private
<del> def create_table_definition(name, temporary, options, as = nil)
<add> def create_table_definition(name, temporary = false, options = nil, as = nil)
<ide> TableDefinition.new native_database_types, name, temporary, options, as
<ide> end
<ide>
<ide> def create_alter_table(name)
<del> AlterTable.new create_table_definition(name, false, {})
<add> AlterTable.new create_table_definition(name)
<ide> end
<ide>
<ide> def foreign_key_name(table_name, options) # :nodoc:
<ide><path>activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
<ide> def translate_exception(exception, message)
<ide> end
<ide>
<ide> def add_column_sql(table_name, column_name, type, options = {})
<del> td = create_table_definition table_name, options[:temporary], options[:options]
<add> td = create_table_definition(table_name)
<ide> cd = td.new_column_definition(column_name, type, options)
<ide> schema_creation.visit_AddColumn cd
<ide> end
<ide> def extract_foreign_key_action(structure, name, action) # :nodoc:
<ide> end
<ide> end
<ide>
<del> def create_table_definition(name, temporary, options, as = nil) # :nodoc:
<add> def create_table_definition(name, temporary = false, options = nil, as = nil) # :nodoc:
<ide> TableDefinition.new(native_database_types, name, temporary, options, as)
<ide> end
<ide>
<ide><path>activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
<ide> def extract_table_ref_from_insert_sql(sql) # :nodoc:
<ide> $1.strip if $1
<ide> end
<ide>
<del> def create_table_definition(name, temporary, options, as = nil) # :nodoc:
<add> def create_table_definition(name, temporary = false, options = nil, as = nil) # :nodoc:
<ide> PostgreSQL::TableDefinition.new native_database_types, name, temporary, options, as
<ide> end
<ide> end | 3 |
Ruby | Ruby | enforce requirements in #find_versions | f8ded0a435700d1969a779d7b75047fbd2176d7a | <ide><path>Library/Homebrew/livecheck/livecheck.rb
<ide> def latest_version(
<ide> end
<ide>
<ide> if livecheck_strategy.present?
<del> if livecheck_strategy == :page_match && (livecheck_regex.blank? && livecheck_strategy_block.blank?)
<del> odebug "#{strategy_name} strategy requires a regex or block"
<del> next
<del> elsif livecheck_url.blank?
<add> if livecheck_url.blank?
<ide> odebug "#{strategy_name} strategy requires a URL"
<ide> next
<del> elsif strategies.exclude?(strategy)
<add> elsif livecheck_strategy != :page_match && strategies.exclude?(strategy)
<ide> odebug "#{strategy_name} strategy does not apply to this URL"
<ide> next
<ide> end
<ide><path>Library/Homebrew/livecheck/strategy/page_match.rb
<ide> def self.versions_from_content(content, regex, &block)
<ide> ).returns(T::Hash[Symbol, T.untyped])
<ide> }
<ide> def self.find_versions(url:, regex: nil, provided_content: nil, **_unused, &block)
<add> if regex.blank? && block.blank?
<add> raise ArgumentError, "#{T.must(name).demodulize} requires a regex or `strategy` block"
<add> end
<add>
<ide> match_data = { matches: {}, regex: regex, url: url }
<ide> return match_data if url.blank? || (regex.blank? && block.blank?)
<ide> | 2 |
PHP | PHP | fix query string support | ac87e5c082195d6b4e9190f33a4777a10ad69bc5 | <ide><path>lib/Cake/Core/Object.php
<ide> public function requestAction($url, $extra = array()) {
<ide> $extra['autoRender'] = 1;
<ide> unset($extra[$index]);
<ide> }
<del> $extra = array_merge(array('autoRender' => 0, 'return' => 1, 'bare' => 1, 'requested' => 1), $extra);
<del> $data = isset($extra['post']) ? $extra['post'] : null;
<del> unset($extra['post']);
<add> $extra = array_merge(
<add> ['autoRender' => 0, 'return' => 1, 'bare' => 1, 'requested' => 1],
<add> $extra
<add> );
<add> $post = $query = [];
<add> if (isset($extra['post'])) {
<add> $post = $extra['post'];
<add> }
<add> if (isset($extra['query'])) {
<add> $query = $extra['query'];
<add> }
<add> unset($extra['post'], $extra['query']);
<ide>
<ide> if (is_string($url) && strpos($url, FULL_BASE_URL) === 0) {
<ide> $url = Router::normalize(str_replace(FULL_BASE_URL, '', $url));
<ide> public function requestAction($url, $extra = array()) {
<ide> 'url' => $url
<ide> );
<ide> } elseif (is_array($url)) {
<del> $url += array('pass' => array(), 'base' => false);
<del> $params = array(
<add> $params = array_merge($url, [
<add> 'pass' => [],
<add> 'base' => false,
<ide> 'url' => Router::reverse($url)
<del> );
<add> ]);
<add> }
<add> if (!empty($post)) {
<add> $params['post'] = $post;
<ide> }
<del> if (isset($data)) {
<del> $params['post'] = $data;
<add> if (!empty($query)) {
<add> $params['query'] = $query;
<ide> }
<ide> $request = new Request($params);
<ide> $dispatcher = new Dispatcher();
<ide><path>lib/Cake/Routing/Dispatcher.php
<ide> public function parseParams($event) {
<ide> $this->_loadRoutes();
<ide> }
<ide>
<del> $params = Router::parse($request->url);
<del> $request->addParams($params);
<add> if (empty($request->params['controller'])) {
<add> $params = Router::parse($request->url);
<add> $request->addParams($params);
<add> }
<ide>
<ide> if (!empty($event->data['additionalParams'])) {
<ide> $request->addParams($event->data['additionalParams']);
<ide><path>lib/Cake/Test/TestApp/Controller/RequestActionController.php
<ide> public function post_pass() {
<ide> return $this->request->data;
<ide> }
<ide>
<add>/**
<add> * query pass, testing query passing
<add> *
<add> * @return array
<add> */
<add> public function query_pass() {
<add> return $this->request->query;
<add> }
<add>
<ide> /**
<ide> * test param passing and parsing.
<ide> *
<ide><path>lib/Cake/Test/TestCase/Core/ObjectTest.php
<ide> public function testRequestActionNoPostPassing() {
<ide> $this->assertEquals($expected, $result);
<ide> }
<ide>
<add>/**
<add> * test that requestAction() can get query data from the query string and
<add> * query option.
<add> *
<add> * @return void
<add> */
<add> public function testRequestActionWithQueryString() {
<add> Router::reload();
<add> require CAKE . 'Config' . DS . 'routes.php';
<add> $query = ['page' => 1, 'sort' => 'title'];
<add> $result = $this->object->requestAction(
<add> ['controller' => 'request_action', 'action' => 'query_pass'],
<add> ['query' => $query]
<add> );
<add> $this->assertEquals($query, $result);
<add>
<add> $result = $this->object->requestAction(
<add> '/request_action/query_pass?page=3&sort=body'
<add> );
<add> $expected = ['page' => 3, 'sort' => 'body'];
<add> $this->assertEquals($expected, $result);
<add> }
<add>
<ide> /**
<ide> * Test requestAction with post data.
<ide> * | 4 |
Java | Java | require undertow 1.3 byte buffer pool | fb5a096ca259e9e623f09c70a40a618ab104fb12 | <ide><path>spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java
<ide> /*
<del> * Copyright 2002-2015 the original author or authors.
<add> * Copyright 2002-2016 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this file except in compliance with the License.
<ide>
<ide> import java.io.ByteArrayOutputStream;
<ide> import java.io.IOException;
<del>import java.lang.reflect.Method;
<ide> import java.net.URI;
<ide> import java.nio.ByteBuffer;
<ide> import java.util.List;
<ide> import io.undertow.util.StringReadChannelListener;
<ide> import org.xnio.ChannelListener;
<ide> import org.xnio.ChannelListeners;
<del>import org.xnio.IoFuture;
<ide> import org.xnio.IoUtils;
<ide> import org.xnio.OptionMap;
<ide> import org.xnio.Options;
<del>import org.xnio.Pool;
<ide> import org.xnio.Xnio;
<ide> import org.xnio.XnioWorker;
<ide> import org.xnio.channels.StreamSinkChannel;
<ide> import org.springframework.http.HttpStatus;
<ide> import org.springframework.http.ResponseEntity;
<ide> import org.springframework.util.Assert;
<del>import org.springframework.util.ClassUtils;
<del>import org.springframework.util.ReflectionUtils;
<ide> import org.springframework.util.concurrent.SettableListenableFuture;
<ide> import org.springframework.web.client.HttpServerErrorException;
<ide> import org.springframework.web.socket.CloseStatus;
<ide>
<ide> /**
<ide> * An XHR transport based on Undertow's {@link io.undertow.client.UndertowClient}.
<del> * Compatible with Undertow 1.0 to 1.3, as of Spring Framework 4.2.2.
<add> * Requires Undertow 1.3 or higher, as of Spring Framework 5.0.
<ide> *
<ide> * <p>When used for testing purposes (e.g. load testing) or for specific use cases
<ide> * (like HTTPS configuration), a custom OptionMap should be provided:
<ide> public class UndertowXhrTransport extends AbstractXhrTransport {
<ide>
<ide> private static final AttachmentKey<String> RESPONSE_BODY = AttachmentKey.create(String.class);
<ide>
<del> private static final boolean undertow13Present = ClassUtils.isPresent(
<del> "io.undertow.connector.ByteBufferPool", UndertowXhrTransport.class.getClassLoader());
<del>
<ide>
<ide> private final OptionMap optionMap;
<ide>
<ide> private final UndertowClient httpClient;
<ide>
<ide> private final XnioWorker worker;
<ide>
<del> private final UndertowBufferSupport undertowBufferSupport;
<add> private final ByteBufferPool bufferPool;
<ide>
<ide>
<ide> public UndertowXhrTransport() throws IOException {
<ide> public UndertowXhrTransport(OptionMap optionMap) throws IOException {
<ide> this.optionMap = optionMap;
<ide> this.httpClient = UndertowClient.getInstance();
<ide> this.worker = Xnio.getInstance().createWorker(optionMap);
<del> this.undertowBufferSupport =
<del> (undertow13Present ? new Undertow13BufferSupport() : new UndertowXnioBufferSupport());
<add> this.bufferPool = new DefaultByteBufferPool(false, 1024, -1, 2);
<ide> }
<ide>
<ide>
<ide> public void failed(IOException ex) {
<ide> }
<ide> };
<ide>
<del> this.undertowBufferSupport.httpClientConnect(this.httpClient, clientCallback, url, worker, this.optionMap);
<add> this.httpClient.connect(clientCallback, url, this.worker, this.bufferPool, this.optionMap);
<ide> }
<ide>
<ide> private static void addHttpHeaders(ClientRequest request, HttpHeaders headers) {
<ide> protected ResponseEntity<String> executeRequest(URI url, HttpString method, Http
<ide> List<ClientResponse> responses = new CopyOnWriteArrayList<ClientResponse>();
<ide>
<ide> try {
<del> ClientConnection connection = this.undertowBufferSupport
<del> .httpClientConnect(this.httpClient, url, this.worker, this.optionMap).get();
<add> ClientConnection connection =
<add> this.httpClient.connect(url, this.worker, this.bufferPool, this.optionMap).get();
<ide> try {
<ide> ClientRequest request = new ClientRequest().setMethod(method).setPath(url.getPath());
<ide> request.getRequestHeaders().add(HttpString.tryFromString(HttpHeaders.HOST), url.getHost());
<ide> private ClientCallback<ClientExchange> createRequestCallback(final String body,
<ide> public void completed(ClientExchange result) {
<ide> result.setResponseListener(new ClientCallback<ClientExchange>() {
<ide> @Override
<del> @SuppressWarnings("deprecation")
<ide> public void completed(final ClientExchange result) {
<ide> responses.add(result.getResponse());
<ide> new StringReadChannelListener(result.getConnection().getBufferPool()) {
<ide> protected void stringDone(String string) {
<ide> result.getResponse().putAttachment(RESPONSE_BODY, string);
<ide> latch.countDown();
<ide> }
<del>
<ide> @Override
<ide> protected void error(IOException ex) {
<ide> onFailure(latch, ex);
<ide> }
<ide> }.setup(result.getResponseChannel());
<ide> }
<del>
<ide> @Override
<ide> public void failed(IOException ex) {
<ide> onFailure(latch, ex);
<ide> public void handleEvent(StreamSourceChannel channel) {
<ide> throw new SockJsException("Session closed.", this.session.getId(), null);
<ide> }
<ide>
<del> Object pooled = undertowBufferSupport.allocatePooledResource();
<add> PooledByteBuffer pooled = bufferPool.allocate();
<ide> try {
<ide> int r;
<ide> do {
<del> ByteBuffer buffer = undertowBufferSupport.getByteBuffer(pooled);
<add> ByteBuffer buffer = pooled.getBuffer();
<ide> buffer.clear();
<ide> r = channel.read(buffer);
<ide> buffer.flip();
<ide> else if (r == -1) {
<ide> onFailure(exc);
<ide> }
<ide> finally {
<del> undertowBufferSupport.closePooledResource(pooled);
<add> pooled.close();
<ide> }
<ide> }
<ide>
<ide> public void onFailure(Throwable failure) {
<ide> }
<ide> }
<ide>
<del>
<del> private interface UndertowBufferSupport {
<del>
<del> Object allocatePooledResource();
<del>
<del> ByteBuffer getByteBuffer(Object pooled);
<del>
<del> void closePooledResource(Object pooled);
<del>
<del> void httpClientConnect(UndertowClient httpClient, final ClientCallback<ClientConnection> listener,
<del> final URI uri, final XnioWorker worker, OptionMap options);
<del>
<del> IoFuture<ClientConnection> httpClientConnect(UndertowClient httpClient, final URI uri,
<del> final XnioWorker worker, OptionMap options);
<del> }
<del>
<del>
<del> private class UndertowXnioBufferSupport implements UndertowBufferSupport {
<del>
<del> private final org.xnio.Pool<ByteBuffer> xnioBufferPool;
<del>
<del> private final Method httpClientConnectCallbackMethod;
<del>
<del> private final Method httpClientConnectMethod;
<del>
<del> public UndertowXnioBufferSupport() {
<del> this.xnioBufferPool = new org.xnio.ByteBufferSlicePool(1048, 1048);
<del> this.httpClientConnectCallbackMethod = ReflectionUtils.findMethod(UndertowClient.class, "connect",
<del> ClientCallback.class, URI.class, XnioWorker.class, Pool.class, OptionMap.class);
<del> this.httpClientConnectMethod = ReflectionUtils.findMethod(UndertowClient.class, "connect",
<del> URI.class, XnioWorker.class, Pool.class, OptionMap.class);
<del> }
<del>
<del> @Override
<del> public Object allocatePooledResource() {
<del> return this.xnioBufferPool.allocate();
<del> }
<del>
<del> @Override
<del> @SuppressWarnings("unchecked")
<del> public ByteBuffer getByteBuffer(Object pooled) {
<del> return ((org.xnio.Pooled<ByteBuffer>) pooled).getResource();
<del> }
<del>
<del> @Override
<del> @SuppressWarnings("unchecked")
<del> public void closePooledResource(Object pooled) {
<del> ((org.xnio.Pooled<ByteBuffer>) pooled).close();
<del> }
<del>
<del> @Override
<del> public void httpClientConnect(UndertowClient httpClient, ClientCallback<ClientConnection> listener, URI uri,
<del> XnioWorker worker, OptionMap options) {
<del> ReflectionUtils.invokeMethod(httpClientConnectCallbackMethod, httpClient, listener, uri, worker,
<del> this.xnioBufferPool, options);
<del> }
<del>
<del> @Override
<del> @SuppressWarnings("unchecked")
<del> public IoFuture<ClientConnection> httpClientConnect(UndertowClient httpClient, URI uri,
<del> XnioWorker worker, OptionMap options) {
<del> return (IoFuture<ClientConnection>) ReflectionUtils.invokeMethod(httpClientConnectMethod, httpClient, uri,
<del> worker, this.xnioBufferPool, options);
<del> }
<del> }
<del>
<del>
<del> private class Undertow13BufferSupport implements UndertowBufferSupport {
<del>
<del> private final ByteBufferPool undertowBufferPool;
<del>
<del> private final Method httpClientConnectCallbackMethod;
<del>
<del> private final Method httpClientConnectMethod;
<del>
<del> public Undertow13BufferSupport() {
<del> this.undertowBufferPool = new DefaultByteBufferPool(false, 1024, -1, 2);
<del> this.httpClientConnectCallbackMethod = ReflectionUtils.findMethod(UndertowClient.class, "connect",
<del> ClientCallback.class, URI.class, XnioWorker.class, ByteBufferPool.class, OptionMap.class);
<del> this.httpClientConnectMethod = ReflectionUtils.findMethod(UndertowClient.class, "connect",
<del> URI.class, XnioWorker.class, ByteBufferPool.class, OptionMap.class);
<del> }
<del>
<del> @Override
<del> public Object allocatePooledResource() {
<del> return this.undertowBufferPool.allocate();
<del> }
<del>
<del> @Override
<del> public ByteBuffer getByteBuffer(Object pooled) {
<del> return ((PooledByteBuffer) pooled).getBuffer();
<del> }
<del>
<del> @Override
<del> public void closePooledResource(Object pooled) {
<del> ((PooledByteBuffer) pooled).close();
<del> }
<del>
<del> @Override
<del> public void httpClientConnect(UndertowClient httpClient, ClientCallback<ClientConnection> listener, URI uri,
<del> XnioWorker worker, OptionMap options) {
<del> ReflectionUtils.invokeMethod(httpClientConnectCallbackMethod, httpClient, listener, uri,
<del> worker, this.undertowBufferPool, options);
<del> }
<del>
<del> @Override
<del> @SuppressWarnings("unchecked")
<del> public IoFuture<ClientConnection> httpClientConnect(UndertowClient httpClient, URI uri,
<del> XnioWorker worker, OptionMap options) {
<del> return (IoFuture<ClientConnection>) ReflectionUtils.invokeMethod(httpClientConnectMethod, httpClient, uri,
<del> worker, this.undertowBufferPool, options);
<del> }
<del> }
<del>
<ide> } | 1 |
Ruby | Ruby | revert a change made to the example in 1ac4525 | cd2d3664e3b434d15b6c19e652befb386187642f | <ide><path>activesupport/lib/active_support/core_ext/object/try.rb
<ide> class NilClass
<ide> # @person && @person.children.any? && @person.children.first.name
<ide> #
<ide> # With +try+
<del> # @person.try(:children).first.try(:name)
<add> # @person.try(:children).try(:first).try(:name)
<ide> def try(*args)
<ide> nil
<ide> end | 1 |
Text | Text | remove repl.it links russian challenge articles | ee952dee4298aa26f128f8631c9db23c2109cbb5 | <ide><path>guide/russian/certifications/coding-interview-prep/algorithms/find-the-symmetric-difference/index.md
<ide> A = {1, 2, 3}
<ide>
<ide> ```](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)
<ide>
<del> [](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce) [Код запуска](https://repl.it/C4II/0)
<del>
<add>
<ide> ### Код Объяснение:
<ide>
<ide> * `push()` используется для разбиения объекта _аргументов_ на массив, _args_ .
<ide> A = {1, 2, 3}
<ide> sym([1, 2, 3], [5, 2, 1, 4]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLoc/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> A = {1, 2, 3}
<ide> sym([1, 2, 3], [5, 2, 1, 4]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/@ashenm/Symmetric-Difference)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/algorithms/implement-bubble-sort/index.md
<ide> function swap(a, b, arr){
<ide>
<ide> `js function bubbleSort(array) { for (let i = 0; i < array.length; i++){ for (let j = 0; j < array.length-1-i; j++){ if (array[j] > array[j+1]) [array[j], array[j+1]] = [array[j+1], array[j]]; // Using ES6 array destructuring to swap } } return array; }`
<ide>
<del>* [Код запуска](https://repl.it/@ezioda004/Bubble-Sort)
<ide>
<ide> ### Рекомендации:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/algorithms/implement-insertion-sort/index.md
<ide> function insertionSort(array) {
<ide> }
<ide> ```
<ide>
<del>* [Код запуска](https://repl.it/@ezioda004/Insertion-Sort)
<ide>
<ide> ### Рекомендации:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/algorithms/implement-merge-sort/index.md
<ide> localeTitle: Реализация Merge Sort
<ide> }
<ide> ```
<ide>
<del>* [Код запуска](https://repl.it/@ezioda004/Merge-Sort)
<ide>
<ide> ### Рекомендации:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/algorithms/implement-quick-sort/index.md
<ide> localeTitle: Внедрить Quick Sort
<ide> }
<ide> ```
<ide>
<del>* [Код запуска](https://repl.it/@ezioda004/Quick-Sort)
<ide>
<ide> ### Справка:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/algorithms/inventory-update/index.md
<ide> localeTitle: Обновление инвентаря
<ide> updateInventory(curInv, newInv);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLok/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Обновление инвентаря
<ide> updateInventory(curInv, newInv);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLol/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Обновление инвентаря
<ide> updateInventory(curInv, newInv);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/MQvv/latest)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/algorithms/no-repeats-please/index.md
<ide> function permAlone(str) {
<ide> permAlone('aab');
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLop/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5/index.md
<ide> function multiplesOf3and5(number) {
<ide> }
<ide> ```
<ide>
<del>* [Код запуска](https://repl.it/@ezioda004/Project-Euler-Problem-1-Multiples-of-3-and-5)
<ide>
<ide> ### Справка:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers/index.md
<ide> function fiboEvenSum(n) {
<ide> }
<ide> ```
<ide>
<del>* [Код запуска](https://repl.it/@ezioda004/Project-Euler-Problem-2-Even-Fibonacci-Numbers)
<ide>
<ide> ### Рекомендации:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/project-euler/problem-3-largest-prime-factor/index.md
<ide> function largestPrimeFactor(number) {
<ide> }
<ide> ```
<ide>
<del>* [Код запуска](https://repl.it/@ezioda004/Problem-3-Largest-prime-factor)
<ide>
<ide> ### Ресурсы:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/project-euler/problem-4-largest-palindrome-product/index.md
<ide> function largestPalindromeProduct(n) {
<ide> }
<ide> ```
<ide>
<del>* [Код запуска](https://repl.it/@ezioda004/Problem-4-Largest-palindrome-product)
<ide>
<ide> ### Рекомендации:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/project-euler/problem-5-smallest-multiple/index.md
<ide> localeTitle: Наименьшее количество
<ide> }
<ide> ```
<ide>
<del>* [Код запуска](https://repl.it/@ezioda004/Problem-5-Smallest-multiple)
<ide>
<ide> ### Рекомендации:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/project-euler/problem-6-sum-square-difference/index.md
<ide> function sumSquareDifference(n) {
<ide> }
<ide> ```
<ide>
<del>* [Код запуска](https://repl.it/@ezioda004/Problem-6-Sum-square-difference)
<ide>
<ide> ### Рекомендации:
<ide>
<ide><path>guide/russian/certifications/coding-interview-prep/project-euler/problem-7-10001st-prime/index.md
<ide> function nthPrime(n) {
<ide> }
<ide> ```
<ide>
<del>\- [Код запуска](https://repl.it/@ezioda004/Project-Euler-Problem-7-10001st-prime)
<ide>
<ide> ### Рекомендации:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/boo-who/index.md
<ide> localeTitle: Boo Who
<ide> booWho(null);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnK/0)
<ide>
<ide> # Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/chunky-monkey/index.md
<ide> localeTitle: Короткая обезьяна
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/24)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Короткая обезьяна
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/Cj9x/3)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Короткая обезьяна
<ide> chunkArrayInGroups(["a", "b", "c", "d"], 2);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/26)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Короткая обезьяна
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/579)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Короткая обезьяна
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/579)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/confirm-the-ending/index.md
<ide> function confirmEnding(str, target) {
<ide> confirmEnding("He has to give me a new name", "name");
<ide> ```
<ide>
<del>#### 🚀 [Код запуска](https://repl.it/repls/SardonicRoundAfkgaming)
<del>
<ide> # Код Объяснение:
<ide>
<ide> * Сначала мы используем метод `slice` копирования строки.
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/factorialize-a-number/index.md
<ide> function factorialize(num) {
<ide> factorialize(5);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/1)
<ide>
<ide> ## Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/falsy-bouncer/index.md
<ide> function bouncer(arr) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/32)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/find-the-longest-word-in-a-string/index.md
<ide> function findLongestWordLength(str) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/5)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function findLongestWordLength(s) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/6)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function findLongestWordLength(str) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/7)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/mutations/index.md
<ide> function mutation(arr) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/30)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function mutation(arr) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/31)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/repeat-a-string-repeat-a-string/index.md
<ide> function repeatStringNumTimes(str, num) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/19)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function repeatStringNumTimes(str, num) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/21)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function repeatStringNumTimes(str, num) {
<ide> repeatStringNumTimes("abc", 3);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/85)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/return-largest-numbers-in-arrays/index.md
<ide> function largestOfFour(arr) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/734)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function largestOfFour(arr) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/733)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function largestOfFour(arr) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/17)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/reverse-a-string/index.md
<ide> function reverseString(str) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/slice-and-splice/index.md
<ide> function frankenSplice(arr1, arr2, n) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/title-case-a-sentence/index.md
<ide> String.prototype.replaceAt = function(index, character) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/8)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function titleCase(str) {
<ide> titleCase("I'm a little tea pot");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/9)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function titleCase(str) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/14)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/truncate-a-string/index.md
<ide> function truncateString(str, num) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/55)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function truncateString(str, num) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/54)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/where-do-i-belong/index.md
<ide> function getIndexToIns(arr, num) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/36)
<ide>
<ide> ## Код Объяснение:
<ide>
<ide> function getIndexToIns(arr, num) {
<ide> getIndexToIns([40, 60], 50);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/2547)
<ide>
<ide> ## Код Объяснение:
<ide>
<ide> function getIndexToIns(arr, num) {
<ide> getIndexToIns([40, 60], 50);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/4135)
<ide>
<ide> ## Код Объяснение:
<ide>
<ide> function getIndexToIns(arr, num) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/EB10/1)
<ide>
<ide> ## Код Объяснение:
<ide>
<ide> function getIndexToIns(arr, num) {
<ide> getIndexToIns([40, 60], 500);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/63)
<ide>
<ide> ## Код Объяснение:
<ide>
<ide> function getIndexToIns(arr, num) {
<ide> getIndexToIns([1,3,4],2);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/IUJE/0)
<ide>
<ide> ## Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/chaining-if-else-statements/index.md
<ide> function testSize(num) {
<ide> }
<ide> ```
<ide>
<del>· Запустить код в [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Chaining-ifelse-statements)
<ide>
<ide> ### Обозначение кода
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator/index.md
<ide> function testEqual(val) {
<ide> testEqual(10);
<ide> ```
<ide>
<del>· [Запустить код в repl.it](https://repl.it/@AdrianSkar/Basic-JS-Equality-operator)
<ide>
<ide> ### Обозначение кода
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/comparisons-with-the-logical-and-operator/index.md
<ide> function testLogicalAnd(val) {
<ide> testLogicalAnd(10);
<ide> ```
<ide>
<del>· [Запустить код в repl.it](https://repl.it/@AdrianSkar/Basic-JS-Comparison-with-the-and-operator)
<ide>
<ide> ### Обозначение кода
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/counting-cards/index.md
<ide> function cc(card) {
<ide> }
<ide> ```
<ide>
<del>· Запустить код в [repl.it.](https://repl.it/@AdrianSkar/Basic-JS-Counting-cards)
<ide>
<ide> ### Обозначение кода
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/golf-code/index.md
<ide> var names = ["Hole-in-one!", "Eagle", "Birdie", "Par", "Bogey", "Double Bogey",
<ide> golfScore(5, 4);
<ide> ```
<ide>
<del>· Запустить на [repl.it](https://repl.it/@AdrianSkar/Basic-JS-Golf-code)
<ide>
<ide> \## Обозначение кода Поскольку у нас уже есть массив, определенный в `names` переменных, мы можем воспользоваться им и использовать его для наших операторов return, используя индексы (например: `names[0] is the first one` ). Таким образом, если вам когда-либо понадобится изменить определенный результат, вам не нужно будет искать его внутри функции, это будет в начале в вашем массиве.
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/introducing-else-if-statements/index.md
<ide> function testElseIf(val) {
<ide> testElseIf(7);
<ide> ```
<ide>
<del>: ракета: [код запуска](https://repl.it/@RyanPisuena/GoldenWorriedRuntime) ## Обозначение кода Структура **логического потока else-if** является исходным оператором `if` , еще одним оператором `if-else` и одним заключительным заявлением `else` .
<add>## Обозначение кода Структура **логического потока else-if** является исходным оператором `if` , еще одним оператором `if-else` и одним заключительным заявлением `else` .
<ide>
<ide> ### Ресурсы
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/introducing-else-statements/index.md
<ide> function testElse(val) {
<ide> testElse(4);
<ide> ```
<ide>
<del>· [Запустить код в repl.it](https://repl.it/@AdrianSkar/Introducing-else-statements)
<ide>
<ide> ### Обозначение кода
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements/index.md
<ide> function sequentialSizes(val) {
<ide> sequentialSizes(1);
<ide> ```
<ide>
<del>· Запустить код в [repl.it.](https://repl.it/@AdrianSkar/Basic-JS-Multiple-opts-in-switch)
<ide>
<ide> ### Обозначение кода
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/record-collection/index.md
<ide> function updateRecords(id, prop, value) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/C2AZ/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions/index.md
<ide> function isLess(a, b) {
<ide> isLess(10, 15);
<ide> ```
<ide>
<del>Выполнить код на [repl.it.](https://repl.it/@AdrianSkar/Basic-Js-Returning-boolean-from-function)
<ide>
<ide> ### Ресурсы
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements/index.md
<ide> function caseInSwitch(val) {
<ide> caseInSwitch(1);
<ide> ```
<ide>
<del>· Запустить код в [repl.it.](https://repl.it/@AdrianSkar/Basic-JS-Switch-statements)
<ide>
<ide> ### Обозначение кода
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups/index.md
<ide> function phoneticLookup(val) {
<ide>
<ide> Javascript result = lookup \[val\]; \`\` \`
<ide>
<del>· Запустить код в [repl.it.](https://repl.it/@AdrianSkar/Using-objects-for-lookups)
<ide>
<ide> ### Ресурсы
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/es6/set-default-parameters-for-your-functions/index.md
<ide> const increment = (function() {
<ide> console.log(increment(5)); // returns NaN
<ide> ```
<ide>
<del>: ракета: [Код запуска](https://repl.it/@RyanPisuena/PleasingFumblingThings)
<ide>
<ide> ## Обозначение кода
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional/index.md
<ide> localeTitle: Аргументы Дополнительно
<ide> addTogether(2,3);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnz/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Аргументы Дополнительно
<ide> addTogether(2,3);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLoA/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Аргументы Дополнительно
<ide> addTogether(2,3);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLoB/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/binary-agents/index.md
<ide> localeTitle: Двоичные агенты
<ide> binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnm/0)
<ide>
<ide> # Код Объяснение:
<ide>
<ide> localeTitle: Двоичные агенты
<ide> binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLno/0)
<ide>
<ide> # Обозначение кода
<ide>
<ide> localeTitle: Двоичные агенты
<ide> binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnp/0)
<ide>
<ide> # Обозначение кода
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/convert-html-entities/index.md
<ide> localeTitle: Преобразование HTML-объектов
<ide> * [arr.join ()](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/join)
<ide> * [инструкция switch](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/switch)
<ide>
<del> [Код запуска](https://repl.it/CLnP/0)
<ide>
<ide> ##  Решение промежуточного кода:
<ide> ```
<ide> function convertHTML(str) {
<ide> convertHTML("Dolce & Gabbana");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnQ/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function convertHTML(str) {
<ide> convertHTML("Dolce & Gabbana");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnR/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays/index.md
<ide> localeTitle: Diff Два массива
<ide> diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLme/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Diff Два массива
<ide> diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CNYb/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function diffArray(arr1, arr2) {
<ide> diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CNYU/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/dna-pairing/index.md
<ide> localeTitle: Dna Pairing
<ide> pairElement("GCG");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmz/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Dna Pairing
<ide> pairElement("GCG");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/repls/ThoroughSphericalComputeranimation)
<ide>
<ide> ## Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it/index.md
<ide> function dropElements(arr, func) {
<ide> dropElements([1, 2, 3, 4], function(n) {return n >= 3;})
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLna/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function dropElements(arr, func) {
<ide> dropElements([1, 2, 3, 4], function(n) {return n >= 3;});
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnc/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function dropElements(arr, func) {
<ide> dropElements([1, 2, 3, 4], function(n) {return n >= 3;});
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnf/0)
<ide>
<ide> ### Обозначение кода
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/everything-be-true/index.md
<ide> function truthCheck(collection, pre) {
<ide> truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnw/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function truthCheck(collection, pre) {
<ide> truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLny/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function truthCheck(collection, pre) {
<ide> truthCheck([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy", "sex": "male"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/E2u6/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person/index.md
<ide> var Person = function(firstAndLast) {
<ide> bob.getFullName();
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLov/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/map-the-debris/index.md
<ide> function orbitalPeriod(arr) {
<ide> orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLow/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function orbitalPeriod(arr) {
<ide> orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLoy/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function orbitalPeriod(arr) {
<ide> orbitalPeriod([{name : "sputnik", avgAlt : 35873.5553}]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLoz/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters/index.md
<ide> function fearNotLetter(str) {
<ide> fearNotLetter("abce");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnD/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function fearNotLetter(str) {
<ide> fearNotLetter("abce");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnE/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function fearNotLetter(str) {
<ide> fearNotLetter("abce");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnG/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin/index.md
<ide> function translatePigLatin(str) {
<ide> translatePigLatin("consonant");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmt/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function translatePigLatin(str) {
<ide> translatePigLatin("consonant");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmw/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function translatePigLatin(str) {
<ide> translatePigLatin("consonant");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmv/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace/index.md
<ide> function myReplace(str, before, after) {
<ide> myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmo/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function myReplace(str, before, after) {
<ide> myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmp/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function myReplace(str, before, after) {
<ide> myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmq/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function myReplace(str, before, after) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/@kr3at0/SearchAndReplace)
<ide>
<ide> ##  Advanced Code Solution Альтернатива 2:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy/index.md
<ide> function destroyer(arr) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/95)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function destroyer(arr) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/Ck2m/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple/index.md
<ide> function smallestCommons(arr) {
<ide> smallestCommons([1,5]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLn2/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function smallestCommons(arr) {
<ide> smallestCommons([1,5]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLn4/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function smallestCommons(arr) {
<ide> smallestCommons([1,5]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/MR9P/latest)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union/index.md
<ide> function uniteUnique(arr1, arr2, arr3) {
<ide> uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnM/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function uniteUnique(arr1, arr2, arr3) {
<ide> uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnO/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function uniteUnique() {
<ide> uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnN/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function uniteUnique() {
<ide> uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CcWk/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/spinal-tap-case/index.md
<ide> function spinalCase(str) {
<ide> spinalCase('This Is Spinal Tap');
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnS/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function spinalCase(str) {
<ide> spinalCase('This Is Spinal Tap');
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnT/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function spinalCase(str) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/EUZV)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller/index.md
<ide> function steamrollArray(arr) {
<ide> steamrollArray([1, [2], [3, [[4]]]]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnh/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function steamrollArray(arr) {
<ide> flattenArray([1, [2], [3, [[4]]]]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLni/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function steamrollArray(arr) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CpDy/4)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-numbers-in-a-range/index.md
<ide> function sumAll(arr) {
<ide> sumAll([1, 4]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLm6/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function sumAll(arr) {
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLm7/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function sumAll(arr) {
<ide> sumAll([1, 4]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLm8/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers/index.md
<ide> function sumFibs(num) {
<ide> sumFibs(4);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnV/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function sumFibs(num) {
<ide> sumFibs(4);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/repls/ImpassionedFineConnection)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes/index.md
<ide> function sumPrimes(num) {
<ide> sumPrimes(10);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLnZ/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function sumPrimes(num) {
<ide> sumPrimes(10);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLn0/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function sumPrimes(num) {
<ide> sumPrimes(977);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/DoOo/3)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/wherefore-art-thou/index.md
<ide> function whatIsInAName(collection, source) {
<ide> whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmh/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function whatIsInAName(collection, source) {
<ide> whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmi/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function whatIsInAName(collection, source) {
<ide> whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmj/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher/index.md
<ide> localeTitle: Цезарский шифр
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/38)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> ALPHA KEY BASE ROTATED ROT13
<ide> * [Regex](https://forum.freecodecamp.com/t/regular-expressions-resources/15931)
<ide> * [Regex.test](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)
<ide>
<del> [Код запуска](https://repl.it/CLjU/39)
<ide>
<ide> ##  Расширенное решение для кода:
<ide> ```
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/cash-register/index.md
<ide> localeTitle: Кассовый аппарат
<ide> checkCashRegister(19.50, 20.00, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.10], ["QUARTER", 4.25], ["ONE", 90.00], ["FIVE", 55.00], ["TEN", 20.00], ["TWENTY", 60.00], ["ONE HUNDRED", 100.00]]);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/@scissorsneedfoo/cash-register-example)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker/index.md
<ide> localeTitle: Palindrome Checker
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/2)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Palindrome Checker
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/3)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> localeTitle: Palindrome Checker
<ide> }
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLjU/4)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter/index.md
<ide> var convertToRoman = function(num) {
<ide> convertToRoman(36);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLmf/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function convertToRoman(num) {
<ide> convertToRoman(97);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/C1YV)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function convertToRoman(num) {
<ide> convertToRoman(36);
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/C1YV)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide><path>guide/russian/certifications/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator/index.md
<ide> function telephoneCheck(str) {
<ide> telephoneCheck("555-555-5555");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLo9/0)
<ide>
<ide> ### Код Объяснение:
<ide>
<ide> function telephoneCheck(str) {
<ide> telephoneCheck("555-555-5555");
<ide> ```
<ide>
<del> [Код запуска](https://repl.it/CLoa/0)
<ide>
<ide> ### Код Объяснение:
<ide> | 67 |
Ruby | Ruby | apply patches and use formula options | 5790935b1267bbd8dac3fd2564b3dd9c46b5dae9 | <ide><path>Library/Contributions/examples/brew-unpack.rb
<ide> require 'formula'
<ide>
<add>require 'stringio'
<add>module ScriptDataReader
<add> # This module contains a method for extracting the contents of DATA from a
<add> # Ruby file other than the script containing the currently executing
<add> # function. Many thanks to Glenn Jackman's Stackoverflow answer which
<add> # provided this code:
<add> #
<add> # http://stackoverflow.com/questions/2156629/can-i-access-the-data-from-a-required-script-in-ruby/2157556#2157556
<add> def self.load(filename)
<add> data = StringIO.new
<add> File.open(filename) do |f|
<add> begin
<add> line = f.gets
<add> end until line.nil? or line.match(/^__END__$/)
<add> while line = f.gets
<add> data << line
<add> end
<add> end
<add> data.rewind
<add> data
<add> end
<add>end
<add>
<add># Need to tweak the Formula class slightly so that patching is option and `DATA`
<add># patches work correctly.
<add>class Formula
<add> # Create a reference to the original Formula.patch method and then override
<add> # so that paching only happens if the user asks.
<add> alias do_patch patch
<add> def patch
<add> if ARGV.include? '--patch'
<add> # Yes Ruby, we are about to redefine a constant. Just breathe.
<add> orig_v = $VERBOSE; $VERBOSE = nil
<add> Formula.const_set 'DATA', ScriptDataReader.load(path)
<add> $VERBOSE = orig_v
<add>
<add> do_patch
<add> end
<add> end
<add>end
<add>
<ide> module Homebrew extend self
<ide> def unpack
<ide> unpack_usage = <<-EOS
<del>Usage: brew unpack [--destdir=path/to/extract/in] <formulae ...>
<add>Usage: brew unpack [--patch] [--destdir=path/to/extract/in] <formulae ...>
<ide>
<ide> Unpack formulae source code for inspection.
<ide>
<ide> Formulae archives will be extracted to subfolders inside the current working
<del>directory or a directory specified by `--destdir`.
<add>directory or a directory specified by `--destdir`. If the `--patch` option is
<add>supplied, patches will also be downloaded and applied.
<ide> EOS
<ide>
<ide> if ARGV.empty?
<ide> puts unpack_usage
<ide> exit 0
<ide> end
<ide>
<del> formulae = ARGV.named
<add> formulae = ARGV.formulae
<ide> raise FormulaUnspecifiedError if formulae.empty?
<ide>
<ide> unpack_dir = ARGV.options_only.select {|o| o.start_with? "--destdir="}
<ide> def unpack
<ide> unpack_dir = Pathname.new(unpack_dir.first.split('=')[1]).realpath
<ide> unpack_dir.mkpath unless unpack_dir.exist?
<ide> end
<add>
<ide> raise "Cannot write to #{unpack_dir}" unless unpack_dir.writable?
<ide>
<ide> formulae.each do |f|
<del> f = Formula.factory(f)
<add> # Create a nice name for the stage folder.
<add> stage_dir = unpack_dir + [f.name, f.version].join('-')
<add> raise "Destination #{stage_dir} allready exists!" if stage_dir.exist?
<ide>
<del> unless f.downloader.kind_of? CurlDownloadStrategy
<del> stage_dir = unpack_dir + [f.name, f.version].join('-')
<del> stage_dir.mkpath unless stage_dir.exist?
<del> else
<del> stage_dir = unpack_dir
<add> f.brew do
<add> oh1 "Unpacking #{f.name} to: #{stage_dir}"
<add> cp_r Dir.getwd, stage_dir
<ide> end
<del>
<del> # Can't use a do block here without DownloadStrategy do blocks throwing:
<del> # warning: conflicting chdir during another chdir block
<del> Dir.chdir stage_dir
<del> f.downloader.fetch
<del> f.downloader.stage
<del> Dir.chdir unpack_dir
<ide> end
<ide> end
<ide> end | 1 |
Mixed | Python | update run_xnli.py to use datasets library | 8dcfaea08dcd71f8850513d65e8a871b932c7374 | <ide><path>examples/text-classification/README.md
<ide> Based on the script [`run_xnli.py`](https://github.com/huggingface/transformers/
<ide>
<ide> #### Fine-tuning on XNLI
<ide>
<del>This example code fine-tunes mBERT (multi-lingual BERT) on the XNLI dataset. It runs in 106 mins
<del>on a single tesla V100 16GB. The data for XNLI can be downloaded with the following links and should be both saved (and un-zipped) in a
<del>`$XNLI_DIR` directory.
<del>
<del>* [XNLI 1.0](https://cims.nyu.edu/~sbowman/xnli/XNLI-1.0.zip)
<del>* [XNLI-MT 1.0](https://dl.fbaipublicfiles.com/XNLI/XNLI-MT-1.0.zip)
<add>This example code fine-tunes mBERT (multi-lingual BERT) on the XNLI dataset. It runs in 106 mins on a single tesla V100 16GB.
<ide>
<ide> ```bash
<del>export XNLI_DIR=/path/to/XNLI
<del>
<ide> python run_xnli.py \
<ide> --model_name_or_path bert-base-multilingual-cased \
<ide> --language de \
<ide> --train_language en \
<ide> --do_train \
<ide> --do_eval \
<del> --data_dir $XNLI_DIR \
<ide> --per_device_train_batch_size 32 \
<ide> --learning_rate 5e-5 \
<ide> --num_train_epochs 2.0 \
<ide><path>examples/text-classification/run_xnli.py
<ide> """ Finetuning multi-lingual models on XNLI (e.g. Bert, DistilBERT, XLM).
<ide> Adapted from `examples/text-classification/run_glue.py`"""
<ide>
<del>
<del>import argparse
<del>import glob
<ide> import logging
<ide> import os
<ide> import random
<add>import sys
<add>from dataclasses import dataclass, field
<add>from typing import Optional
<ide>
<ide> import numpy as np
<del>import torch
<del>from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset
<del>from torch.utils.data.distributed import DistributedSampler
<del>from tqdm import tqdm, trange
<add>from datasets import load_dataset, load_metric
<ide>
<ide> import transformers
<ide> from transformers import (
<del> WEIGHTS_NAME,
<del> AdamW,
<ide> AutoConfig,
<ide> AutoModelForSequenceClassification,
<ide> AutoTokenizer,
<del> get_linear_schedule_with_warmup,
<add> DataCollatorWithPadding,
<add> EvalPrediction,
<add> HfArgumentParser,
<add> Trainer,
<add> TrainingArguments,
<add> default_data_collator,
<add> set_seed,
<ide> )
<del>from transformers import glue_convert_examples_to_features as convert_examples_to_features
<del>from transformers import xnli_compute_metrics as compute_metrics
<del>from transformers import xnli_output_modes as output_modes
<del>from transformers import xnli_processors as processors
<del>from transformers.trainer_utils import is_main_process
<del>
<del>
<del>try:
<del> from torch.utils.tensorboard import SummaryWriter
<del>except ImportError:
<del> from tensorboardX import SummaryWriter
<add>from transformers.trainer_utils import get_last_checkpoint, is_main_process
<ide>
<ide>
<ide> logger = logging.getLogger(__name__)
<ide>
<ide>
<del>def set_seed(args):
<del> random.seed(args.seed)
<del> np.random.seed(args.seed)
<del> torch.manual_seed(args.seed)
<del> if args.n_gpu > 0:
<del> torch.cuda.manual_seed_all(args.seed)
<del>
<add>@dataclass
<add>class DataTrainingArguments:
<add> """
<add> Arguments pertaining to what data we are going to input our model for training and eval.
<ide>
<del>def train(args, train_dataset, model, tokenizer):
<del> """ Train the model """
<del> if args.local_rank in [-1, 0]:
<del> tb_writer = SummaryWriter()
<add> Using `HfArgumentParser` we can turn this class
<add> into argparse arguments to be able to specify them on
<add> the command line.
<add> """
<ide>
<del> args.train_batch_size = args.per_gpu_train_batch_size * max(1, args.n_gpu)
<del> train_sampler = RandomSampler(train_dataset) if args.local_rank == -1 else DistributedSampler(train_dataset)
<del> train_dataloader = DataLoader(train_dataset, sampler=train_sampler, batch_size=args.train_batch_size)
<del>
<del> if args.max_steps > 0:
<del> t_total = args.max_steps
<del> args.num_train_epochs = args.max_steps // (len(train_dataloader) // args.gradient_accumulation_steps) + 1
<del> else:
<del> t_total = len(train_dataloader) // args.gradient_accumulation_steps * args.num_train_epochs
<del>
<del> # Prepare optimizer and schedule (linear warmup and decay)
<del> no_decay = ["bias", "LayerNorm.weight"]
<del> optimizer_grouped_parameters = [
<del> {
<del> "params": [p for n, p in model.named_parameters() if not any(nd in n for nd in no_decay)],
<del> "weight_decay": args.weight_decay,
<add> max_seq_length: Optional[int] = field(
<add> default=128,
<add> metadata={
<add> "help": "The maximum total input sequence length after tokenization. Sequences longer "
<add> "than this will be truncated, sequences shorter will be padded."
<ide> },
<del> {"params": [p for n, p in model.named_parameters() if any(nd in n for nd in no_decay)], "weight_decay": 0.0},
<del> ]
<del> optimizer = AdamW(optimizer_grouped_parameters, lr=args.learning_rate, eps=args.adam_epsilon)
<del> scheduler = get_linear_schedule_with_warmup(
<del> optimizer, num_warmup_steps=args.warmup_steps, num_training_steps=t_total
<ide> )
<del>
<del> # Check if saved optimizer or scheduler states exist
<del> if os.path.isfile(os.path.join(args.model_name_or_path, "optimizer.pt")) and os.path.isfile(
<del> os.path.join(args.model_name_or_path, "scheduler.pt")
<del> ):
<del> # Load in optimizer and scheduler states
<del> optimizer.load_state_dict(torch.load(os.path.join(args.model_name_or_path, "optimizer.pt")))
<del> scheduler.load_state_dict(torch.load(os.path.join(args.model_name_or_path, "scheduler.pt")))
<del>
<del> if args.fp16:
<del> try:
<del> from apex import amp
<del> except ImportError:
<del> raise ImportError("Please install apex from https://www.github.com/nvidia/apex to use fp16 training.")
<del> model, optimizer = amp.initialize(model, optimizer, opt_level=args.fp16_opt_level)
<del>
<del> # multi-gpu training (should be after apex fp16 initialization)
<del> if args.n_gpu > 1:
<del> model = torch.nn.DataParallel(model)
<del>
<del> # Distributed training (should be after apex fp16 initialization)
<del> if args.local_rank != -1:
<del> model = torch.nn.parallel.DistributedDataParallel(
<del> model, device_ids=[args.local_rank], output_device=args.local_rank, find_unused_parameters=True
<del> )
<del>
<del> # Train!
<del> logger.info("***** Running training *****")
<del> logger.info(" Num examples = %d", len(train_dataset))
<del> logger.info(" Num Epochs = %d", args.num_train_epochs)
<del> logger.info(" Instantaneous batch size per GPU = %d", args.per_gpu_train_batch_size)
<del> logger.info(
<del> " Total train batch size (w. parallel, distributed & accumulation) = %d",
<del> args.train_batch_size
<del> * args.gradient_accumulation_steps
<del> * (torch.distributed.get_world_size() if args.local_rank != -1 else 1),
<add> overwrite_cache: bool = field(
<add> default=False, metadata={"help": "Overwrite the cached preprocessed datasets or not."}
<ide> )
<del> logger.info(" Gradient Accumulation steps = %d", args.gradient_accumulation_steps)
<del> logger.info(" Total optimization steps = %d", t_total)
<del>
<del> global_step = 0
<del> epochs_trained = 0
<del> steps_trained_in_current_epoch = 0
<del> # Check if continuing training from a checkpoint
<del> if os.path.exists(args.model_name_or_path):
<del> # set global_step to gobal_step of last saved checkpoint from model path
<del> global_step = int(args.model_name_or_path.split("-")[-1].split("/")[0])
<del> epochs_trained = global_step // (len(train_dataloader) // args.gradient_accumulation_steps)
<del> steps_trained_in_current_epoch = global_step % (len(train_dataloader) // args.gradient_accumulation_steps)
<del>
<del> logger.info(" Continuing training from checkpoint, will skip to saved global_step")
<del> logger.info(" Continuing training from epoch %d", epochs_trained)
<del> logger.info(" Continuing training from global step %d", global_step)
<del> logger.info(" Will skip the first %d steps in the first epoch", steps_trained_in_current_epoch)
<del>
<del> tr_loss, logging_loss = 0.0, 0.0
<del> model.zero_grad()
<del> train_iterator = trange(
<del> epochs_trained, int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0]
<del> )
<del> set_seed(args) # Added here for reproductibility
<del> for _ in train_iterator:
<del> epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
<del> for step, batch in enumerate(epoch_iterator):
<del> # Skip past any already trained steps if resuming training
<del> if steps_trained_in_current_epoch > 0:
<del> steps_trained_in_current_epoch -= 1
<del> continue
<del>
<del> model.train()
<del> batch = tuple(t.to(args.device) for t in batch)
<del> inputs = {"input_ids": batch[0], "attention_mask": batch[1], "labels": batch[3]}
<del> if args.model_type != "distilbert":
<del> inputs["token_type_ids"] = (
<del> batch[2] if args.model_type in ["bert"] else None
<del> ) # XLM and DistilBERT don't use segment_ids
<del> outputs = model(**inputs)
<del> loss = outputs[0] # model outputs are always tuple in transformers (see doc)
<del>
<del> if args.n_gpu > 1:
<del> loss = loss.mean() # mean() to average on multi-gpu parallel training
<del> if args.gradient_accumulation_steps > 1:
<del> loss = loss / args.gradient_accumulation_steps
<del>
<del> if args.fp16:
<del> with amp.scale_loss(loss, optimizer) as scaled_loss:
<del> scaled_loss.backward()
<del> else:
<del> loss.backward()
<del>
<del> tr_loss += loss.item()
<del> if (step + 1) % args.gradient_accumulation_steps == 0:
<del> if args.fp16:
<del> torch.nn.utils.clip_grad_norm_(amp.master_params(optimizer), args.max_grad_norm)
<del> else:
<del> torch.nn.utils.clip_grad_norm_(model.parameters(), args.max_grad_norm)
<del>
<del> optimizer.step()
<del> scheduler.step() # Update learning rate schedule
<del> model.zero_grad()
<del> global_step += 1
<del>
<del> if args.local_rank in [-1, 0] and args.logging_steps > 0 and global_step % args.logging_steps == 0:
<del> # Log metrics
<del> if (
<del> args.local_rank == -1 and args.evaluate_during_training
<del> ): # Only evaluate when single GPU otherwise metrics may not average well
<del> results = evaluate(args, model, tokenizer)
<del> for key, value in results.items():
<del> tb_writer.add_scalar("eval_{}".format(key), value, global_step)
<del> tb_writer.add_scalar("lr", scheduler.get_lr()[0], global_step)
<del> tb_writer.add_scalar("loss", (tr_loss - logging_loss) / args.logging_steps, global_step)
<del> logging_loss = tr_loss
<del>
<del> if args.local_rank in [-1, 0] and args.save_steps > 0 and global_step % args.save_steps == 0:
<del> # Save model checkpoint
<del> output_dir = os.path.join(args.output_dir, "checkpoint-{}".format(global_step))
<del> if not os.path.exists(output_dir):
<del> os.makedirs(output_dir)
<del> model_to_save = (
<del> model.module if hasattr(model, "module") else model
<del> ) # Take care of distributed/parallel training
<del> model_to_save.save_pretrained(output_dir)
<del> tokenizer.save_pretrained(output_dir)
<del>
<del> torch.save(args, os.path.join(output_dir, "training_args.bin"))
<del> logger.info("Saving model checkpoint to %s", output_dir)
<del>
<del> torch.save(optimizer.state_dict(), os.path.join(output_dir, "optimizer.pt"))
<del> torch.save(scheduler.state_dict(), os.path.join(output_dir, "scheduler.pt"))
<del> logger.info("Saving optimizer and scheduler states to %s", output_dir)
<del>
<del> if args.max_steps > 0 and global_step > args.max_steps:
<del> epoch_iterator.close()
<del> break
<del> if args.max_steps > 0 and global_step > args.max_steps:
<del> train_iterator.close()
<del> break
<del>
<del> if args.local_rank in [-1, 0]:
<del> tb_writer.close()
<del>
<del> return global_step, tr_loss / global_step
<del>
<del>
<del>def evaluate(args, model, tokenizer, prefix=""):
<del> eval_task_names = (args.task_name,)
<del> eval_outputs_dirs = (args.output_dir,)
<del>
<del> results = {}
<del> for eval_task, eval_output_dir in zip(eval_task_names, eval_outputs_dirs):
<del> eval_dataset = load_and_cache_examples(args, eval_task, tokenizer, evaluate=True)
<del>
<del> if not os.path.exists(eval_output_dir) and args.local_rank in [-1, 0]:
<del> os.makedirs(eval_output_dir)
<del>
<del> args.eval_batch_size = args.per_gpu_eval_batch_size * max(1, args.n_gpu)
<del> # Note that DistributedSampler samples randomly
<del> eval_sampler = SequentialSampler(eval_dataset)
<del> eval_dataloader = DataLoader(eval_dataset, sampler=eval_sampler, batch_size=args.eval_batch_size)
<del>
<del> # multi-gpu eval
<del> if args.n_gpu > 1 and not isinstance(model, torch.nn.DataParallel):
<del> model = torch.nn.DataParallel(model)
<del>
<del> # Eval!
<del> logger.info("***** Running evaluation {} *****".format(prefix))
<del> logger.info(" Num examples = %d", len(eval_dataset))
<del> logger.info(" Batch size = %d", args.eval_batch_size)
<del> eval_loss = 0.0
<del> nb_eval_steps = 0
<del> preds = None
<del> out_label_ids = None
<del> for batch in tqdm(eval_dataloader, desc="Evaluating"):
<del> model.eval()
<del> batch = tuple(t.to(args.device) for t in batch)
<del>
<del> with torch.no_grad():
<del> inputs = {"input_ids": batch[0], "attention_mask": batch[1], "labels": batch[3]}
<del> if args.model_type != "distilbert":
<del> inputs["token_type_ids"] = (
<del> batch[2] if args.model_type in ["bert"] else None
<del> ) # XLM and DistilBERT don't use segment_ids
<del> outputs = model(**inputs)
<del> tmp_eval_loss, logits = outputs[:2]
<del>
<del> eval_loss += tmp_eval_loss.mean().item()
<del> nb_eval_steps += 1
<del> if preds is None:
<del> preds = logits.detach().cpu().numpy()
<del> out_label_ids = inputs["labels"].detach().cpu().numpy()
<del> else:
<del> preds = np.append(preds, logits.detach().cpu().numpy(), axis=0)
<del> out_label_ids = np.append(out_label_ids, inputs["labels"].detach().cpu().numpy(), axis=0)
<del>
<del> eval_loss = eval_loss / nb_eval_steps
<del> if args.output_mode == "classification":
<del> preds = np.argmax(preds, axis=1)
<del> else:
<del> raise ValueError("No other `output_mode` for XNLI.")
<del> result = compute_metrics(eval_task, preds, out_label_ids)
<del> results.update(result)
<del>
<del> output_eval_file = os.path.join(eval_output_dir, prefix, "eval_results.txt")
<del> with open(output_eval_file, "w") as writer:
<del> logger.info("***** Eval results {} *****".format(prefix))
<del> for key in sorted(result.keys()):
<del> logger.info(" %s = %s", key, str(result[key]))
<del> writer.write("%s = %s\n" % (key, str(result[key])))
<del>
<del> return results
<del>
<del>
<del>def load_and_cache_examples(args, task, tokenizer, evaluate=False):
<del> if args.local_rank not in [-1, 0] and not evaluate:
<del> torch.distributed.barrier() # Make sure only the first process in distributed training process the dataset, and the others will use the cache
<del>
<del> processor = processors[task](language=args.language, train_language=args.train_language)
<del> output_mode = output_modes[task]
<del> # Load data features from cache or dataset file
<del> cached_features_file = os.path.join(
<del> args.data_dir,
<del> "cached_{}_{}_{}_{}_{}".format(
<del> "test" if evaluate else "train",
<del> list(filter(None, args.model_name_or_path.split("/"))).pop(),
<del> str(args.max_seq_length),
<del> str(task),
<del> str(args.train_language if (not evaluate and args.train_language is not None) else args.language),
<del> ),
<add> pad_to_max_length: bool = field(
<add> default=True,
<add> metadata={
<add> "help": "Whether to pad all samples to `max_seq_length`. "
<add> "If False, will pad the samples dynamically when batching to the maximum length in the batch."
<add> },
<ide> )
<del> if os.path.exists(cached_features_file) and not args.overwrite_cache:
<del> logger.info("Loading features from cached file %s", cached_features_file)
<del> features = torch.load(cached_features_file)
<del> else:
<del> logger.info("Creating features from dataset file at %s", args.data_dir)
<del> label_list = processor.get_labels()
<del> examples = (
<del> processor.get_test_examples(args.data_dir) if evaluate else processor.get_train_examples(args.data_dir)
<del> )
<del> features = convert_examples_to_features(
<del> examples,
<del> tokenizer,
<del> max_length=args.max_seq_length,
<del> label_list=label_list,
<del> output_mode=output_mode,
<del> )
<del> if args.local_rank in [-1, 0]:
<del> logger.info("Saving features into cached file %s", cached_features_file)
<del> torch.save(features, cached_features_file)
<del>
<del> if args.local_rank == 0 and not evaluate:
<del> torch.distributed.barrier() # Make sure only the first process in distributed training process the dataset, and the others will use the cache
<del>
<del> # Convert to Tensors and build dataset
<del> all_input_ids = torch.tensor([f.input_ids for f in features], dtype=torch.long)
<del> all_attention_mask = torch.tensor([f.attention_mask for f in features], dtype=torch.long)
<del> all_token_type_ids = torch.tensor([f.token_type_ids for f in features], dtype=torch.long)
<del> if output_mode == "classification":
<del> all_labels = torch.tensor([f.label for f in features], dtype=torch.long)
<del> else:
<del> raise ValueError("No other `output_mode` for XNLI.")
<add> server_ip: Optional[str] = field(default=None, metadata={"help": "For distant debugging."})
<add> server_port: Optional[str] = field(default=None, metadata={"help": "For distant debugging."})
<ide>
<del> dataset = TensorDataset(all_input_ids, all_attention_mask, all_token_type_ids, all_labels)
<del> return dataset
<ide>
<add>@dataclass
<add>class ModelArguments:
<add> """
<add> Arguments pertaining to which model/config/tokenizer we are going to fine-tune from.
<add> """
<ide>
<del>def main():
<del> parser = argparse.ArgumentParser()
<del>
<del> # Required parameters
<del> parser.add_argument(
<del> "--data_dir",
<del> default=None,
<del> type=str,
<del> required=True,
<del> help="The input data dir. Should contain the .tsv files (or other data files) for the task.",
<add> model_name_or_path: str = field(
<add> default=None, metadata={"help": "Path to pretrained model or model identifier from huggingface.co/models"}
<ide> )
<del> parser.add_argument(
<del> "--model_name_or_path",
<del> default=None,
<del> type=str,
<del> required=True,
<del> help="Path to pretrained model or model identifier from huggingface.co/models",
<add> language: str = field(
<add> default=None, metadata={"help": "Evaluation language. Also train language if `train_language` is set to None."}
<ide> )
<del> parser.add_argument(
<del> "--language",
<del> default=None,
<del> type=str,
<del> required=True,
<del> help="Evaluation language. Also train language if `train_language` is set to None.",
<add> train_language: Optional[str] = field(
<add> default=None, metadata={"help": "Train language if it is different from the evaluation language."}
<ide> )
<del> parser.add_argument(
<del> "--train_language", default=None, type=str, help="Train language if is different of the evaluation language."
<add> config_name: Optional[str] = field(
<add> default=None, metadata={"help": "Pretrained config name or path if not the same as model_name"}
<ide> )
<del> parser.add_argument(
<del> "--output_dir",
<del> default=None,
<del> type=str,
<del> required=True,
<del> help="The output directory where the model predictions and checkpoints will be written.",
<add> tokenizer_name: Optional[str] = field(
<add> default=None, metadata={"help": "Pretrained tokenizer name or path if not the same as model_name"}
<ide> )
<del>
<del> # Other parameters
<del> parser.add_argument(
<del> "--config_name", default="", type=str, help="Pretrained config name or path if not the same as model_name"
<del> )
<del> parser.add_argument(
<del> "--tokenizer_name",
<del> default="",
<del> type=str,
<del> help="Pretrained tokenizer name or path if not the same as model_name",
<del> )
<del> parser.add_argument(
<del> "--cache_dir",
<add> cache_dir: Optional[str] = field(
<ide> default=None,
<del> type=str,
<del> help="Where do you want to store the pre-trained models downloaded from huggingface.co",
<add> metadata={"help": "Where do you want to store the pretrained models downloaded from huggingface.co"},
<ide> )
<del> parser.add_argument(
<del> "--max_seq_length",
<del> default=128,
<del> type=int,
<del> help="The maximum total input sequence length after tokenization. Sequences longer "
<del> "than this will be truncated, sequences shorter will be padded.",
<add> do_lower_case: Optional[bool] = field(
<add> default=False,
<add> metadata={"help": "arg to indicate if tokenizer should do lower case in AutoTokenizer.from_pretrained()"},
<ide> )
<del> parser.add_argument("--do_train", action="store_true", help="Whether to run training.")
<del> parser.add_argument("--do_eval", action="store_true", help="Whether to run eval on the test set.")
<del> parser.add_argument(
<del> "--evaluate_during_training", action="store_true", help="Rul evaluation during training at each logging step."
<del> )
<del> parser.add_argument(
<del> "--do_lower_case", action="store_true", help="Set this flag if you are using an uncased model."
<del> )
<del>
<del> parser.add_argument("--per_gpu_train_batch_size", default=8, type=int, help="Batch size per GPU/CPU for training.")
<del> parser.add_argument(
<del> "--per_gpu_eval_batch_size", default=8, type=int, help="Batch size per GPU/CPU for evaluation."
<add> use_fast_tokenizer: bool = field(
<add> default=True,
<add> metadata={"help": "Whether to use one of the fast tokenizer (backed by the tokenizers library) or not."},
<ide> )
<del> parser.add_argument(
<del> "--gradient_accumulation_steps",
<del> type=int,
<del> default=1,
<del> help="Number of updates steps to accumulate before performing a backward/update pass.",
<add> model_revision: str = field(
<add> default="main",
<add> metadata={"help": "The specific model version to use (can be a branch name, tag name or commit id)."},
<ide> )
<del> parser.add_argument("--learning_rate", default=5e-5, type=float, help="The initial learning rate for Adam.")
<del> parser.add_argument("--weight_decay", default=0.0, type=float, help="Weight decay if we apply some.")
<del> parser.add_argument("--adam_epsilon", default=1e-8, type=float, help="Epsilon for Adam optimizer.")
<del> parser.add_argument("--max_grad_norm", default=1.0, type=float, help="Max gradient norm.")
<del> parser.add_argument(
<del> "--num_train_epochs", default=3.0, type=float, help="Total number of training epochs to perform."
<del> )
<del> parser.add_argument(
<del> "--max_steps",
<del> default=-1,
<del> type=int,
<del> help="If > 0: set total number of training steps to perform. Override num_train_epochs.",
<del> )
<del> parser.add_argument("--warmup_steps", default=0, type=int, help="Linear warmup over warmup_steps.")
<del>
<del> parser.add_argument("--logging_steps", type=int, default=500, help="Log every X updates steps.")
<del> parser.add_argument("--save_steps", type=int, default=500, help="Save checkpoint every X updates steps.")
<del> parser.add_argument(
<del> "--eval_all_checkpoints",
<del> action="store_true",
<del> help="Evaluate all checkpoints starting with the same prefix as model_name ending and ending with step number",
<del> )
<del> parser.add_argument("--no_cuda", action="store_true", help="Avoid using CUDA when available")
<del> parser.add_argument(
<del> "--overwrite_output_dir", action="store_true", help="Overwrite the content of the output directory"
<del> )
<del> parser.add_argument(
<del> "--overwrite_cache", action="store_true", help="Overwrite the cached training and evaluation sets"
<add> use_auth_token: bool = field(
<add> default=False,
<add> metadata={
<add> "help": "Will use the token generated when running `transformers-cli login` (necessary to use this script "
<add> "with private models)."
<add> },
<ide> )
<del> parser.add_argument("--seed", type=int, default=42, help="random seed for initialization")
<ide>
<del> parser.add_argument(
<del> "--fp16",
<del> action="store_true",
<del> help="Whether to use 16-bit (mixed) precision (through NVIDIA apex) instead of 32-bit",
<del> )
<del> parser.add_argument(
<del> "--fp16_opt_level",
<del> type=str,
<del> default="O1",
<del> help="For fp16: Apex AMP optimization level selected in ['O0', 'O1', 'O2', and 'O3']."
<del> "See details at https://nvidia.github.io/apex/amp.html",
<del> )
<del> parser.add_argument("--local_rank", type=int, default=-1, help="For distributed training: local_rank")
<del> parser.add_argument("--server_ip", type=str, default="", help="For distant debugging.")
<del> parser.add_argument("--server_port", type=str, default="", help="For distant debugging.")
<del> args = parser.parse_args()
<del>
<del> if (
<del> os.path.exists(args.output_dir)
<del> and os.listdir(args.output_dir)
<del> and args.do_train
<del> and not args.overwrite_output_dir
<del> ):
<del> raise ValueError(
<del> "Output directory ({}) already exists and is not empty. Use --overwrite_output_dir to overcome.".format(
<del> args.output_dir
<add>
<add>def main():
<add> # See all possible arguments in src/transformers/training_args.py
<add> # or by passing the --help flag to this script.
<add> # We now keep distinct sets of args, for a cleaner separation of concerns.
<add>
<add> parser = HfArgumentParser((ModelArguments, DataTrainingArguments, TrainingArguments))
<add> model_args, data_args, training_args = parser.parse_args_into_dataclasses()
<add>
<add> # Detecting last checkpoint.
<add> last_checkpoint = None
<add> if os.path.isdir(training_args.output_dir) and training_args.do_train and not training_args.overwrite_output_dir:
<add> last_checkpoint = get_last_checkpoint(training_args.output_dir)
<add> if last_checkpoint is None and len(os.listdir(training_args.output_dir)) > 0:
<add> raise ValueError(
<add> f"Output directory ({training_args.output_dir}) already exists and is not empty. "
<add> "Use --overwrite_output_dir to overcome."
<add> )
<add> elif last_checkpoint is not None:
<add> logger.info(
<add> f"Checkpoint detected, resuming training at {last_checkpoint}. To avoid this behavior, change "
<add> "the `--output_dir` or add `--overwrite_output_dir` to train from scratch."
<ide> )
<del> )
<ide>
<ide> # Setup distant debugging if needed
<del> if args.server_ip and args.server_port:
<add> if data_args.server_ip and data_args.server_port:
<ide> # Distant debugging - see https://code.visualstudio.com/docs/python/debugging#_attach-to-a-local-script
<ide> import ptvsd
<ide>
<ide> print("Waiting for debugger attach")
<del> ptvsd.enable_attach(address=(args.server_ip, args.server_port), redirect_output=True)
<add> ptvsd.enable_attach(address=(data_args.server_ip, data_args.server_port), redirect_output=True)
<ide> ptvsd.wait_for_attach()
<ide>
<del> # Setup CUDA, GPU & distributed training
<del> if args.local_rank == -1 or args.no_cuda:
<del> device = torch.device("cuda" if torch.cuda.is_available() and not args.no_cuda else "cpu")
<del> args.n_gpu = 0 if args.no_cuda else torch.cuda.device_count()
<del> else: # Initializes the distributed backend which will take care of sychronizing nodes/GPUs
<del> torch.cuda.set_device(args.local_rank)
<del> device = torch.device("cuda", args.local_rank)
<del> torch.distributed.init_process_group(backend="nccl")
<del> args.n_gpu = 1
<del> args.device = device
<del>
<ide> # Setup logging
<ide> logging.basicConfig(
<ide> format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
<ide> datefmt="%m/%d/%Y %H:%M:%S",
<del> level=logging.INFO if args.local_rank in [-1, 0] else logging.WARN,
<add> handlers=[logging.StreamHandler(sys.stdout)],
<ide> )
<add> logger.setLevel(logging.INFO if is_main_process(training_args.local_rank) else logging.WARN)
<add>
<add> # Log on each process the small summary:
<ide> logger.warning(
<del> "Process rank: %s, device: %s, n_gpu: %s, distributed training: %s, 16-bits training: %s",
<del> args.local_rank,
<del> device,
<del> args.n_gpu,
<del> bool(args.local_rank != -1),
<del> args.fp16,
<add> f"Process rank: {training_args.local_rank}, device: {training_args.device}, n_gpu: {training_args.n_gpu}"
<add> + f"distributed training: {bool(training_args.local_rank != -1)}, 16-bits training: {training_args.fp16}"
<ide> )
<add>
<ide> # Set the verbosity to info of the Transformers logger (on main process only):
<del> if is_main_process(args.local_rank):
<add> if is_main_process(training_args.local_rank):
<ide> transformers.utils.logging.set_verbosity_info()
<ide> transformers.utils.logging.enable_default_handler()
<ide> transformers.utils.logging.enable_explicit_format()
<del> # Set seed
<del> set_seed(args)
<del>
<del> # Prepare XNLI task
<del> args.task_name = "xnli"
<del> if args.task_name not in processors:
<del> raise ValueError("Task not found: %s" % (args.task_name))
<del> processor = processors[args.task_name](language=args.language, train_language=args.train_language)
<del> args.output_mode = output_modes[args.task_name]
<del> label_list = processor.get_labels()
<add> logger.info(f"Training/evaluation parameters {training_args}")
<add>
<add> # Set seed before initializing model.
<add> set_seed(training_args.seed)
<add>
<add> # In distributed training, the load_dataset function guarantees that only one local process can concurrently
<add> # download the dataset.
<add> # Downloading and loading xnli dataset from the hub.
<add> if model_args.train_language is None:
<add> train_dataset = load_dataset("xnli", model_args.language, split="train")
<add> else:
<add> train_dataset = load_dataset("xnli", model_args.train_language, split="train")
<add>
<add> eval_dataset = load_dataset("xnli", model_args.language, split="validation")
<add> # Labels
<add> label_list = train_dataset.features["label"].names
<ide> num_labels = len(label_list)
<ide>
<ide> # Load pretrained model and tokenizer
<del> if args.local_rank not in [-1, 0]:
<del> torch.distributed.barrier() # Make sure only the first process in distributed training will download model & vocab
<del>
<add> # In distributed training, the .from_pretrained methods guarantee that only one local process can concurrently
<add> # download model & vocab.
<ide> config = AutoConfig.from_pretrained(
<del> args.config_name if args.config_name else args.model_name_or_path,
<add> model_args.config_name if model_args.config_name else model_args.model_name_or_path,
<ide> num_labels=num_labels,
<del> finetuning_task=args.task_name,
<del> cache_dir=args.cache_dir,
<add> finetuning_task="xnli",
<add> cache_dir=model_args.cache_dir,
<add> revision=model_args.model_revision,
<add> use_auth_token=True if model_args.use_auth_token else None,
<ide> )
<del> args.model_type = config.model_type
<ide> tokenizer = AutoTokenizer.from_pretrained(
<del> args.tokenizer_name if args.tokenizer_name else args.model_name_or_path,
<del> do_lower_case=args.do_lower_case,
<del> cache_dir=args.cache_dir,
<add> model_args.tokenizer_name if model_args.tokenizer_name else model_args.model_name_or_path,
<add> do_lower_case=model_args.do_lower_case,
<add> cache_dir=model_args.cache_dir,
<add> use_fast=model_args.use_fast_tokenizer,
<add> revision=model_args.model_revision,
<add> use_auth_token=True if model_args.use_auth_token else None,
<ide> )
<ide> model = AutoModelForSequenceClassification.from_pretrained(
<del> args.model_name_or_path,
<del> from_tf=bool(".ckpt" in args.model_name_or_path),
<add> model_args.model_name_or_path,
<add> from_tf=bool(".ckpt" in model_args.model_name_or_path),
<ide> config=config,
<del> cache_dir=args.cache_dir,
<add> cache_dir=model_args.cache_dir,
<add> revision=model_args.model_revision,
<add> use_auth_token=True if model_args.use_auth_token else None,
<ide> )
<ide>
<del> if args.local_rank == 0:
<del> torch.distributed.barrier() # Make sure only the first process in distributed training will download model & vocab
<add> # Preprocessing the datasets
<add> # Padding strategy
<add> if data_args.pad_to_max_length:
<add> padding = "max_length"
<add> else:
<add> # We will pad later, dynamically at batch creation, to the max sequence length in each batch
<add> padding = False
<add>
<add> def preprocess_function(examples):
<add> # Tokenize the texts
<add> return tokenizer(
<add> examples["premise"],
<add> examples["hypothesis"],
<add> padding=padding,
<add> max_length=data_args.max_seq_length,
<add> truncation=True,
<add> )
<ide>
<del> model.to(args.device)
<add> train_dataset = train_dataset.map(
<add> preprocess_function, batched=True, load_from_cache_file=not data_args.overwrite_cache
<add> )
<add> eval_dataset = eval_dataset.map(
<add> preprocess_function, batched=True, load_from_cache_file=not data_args.overwrite_cache
<add> )
<ide>
<del> logger.info("Training/evaluation parameters %s", args)
<add> # Log a few random samples from the training set:
<add> for index in random.sample(range(len(train_dataset)), 3):
<add> logger.info(f"Sample {index} of the training set: {train_dataset[index]}.")
<add>
<add> # Get the metric function
<add> metric = load_metric("xnli")
<add>
<add> # You can define your custom compute_metrics function. It takes an `EvalPrediction` object (a namedtuple with a
<add> # predictions and label_ids field) and has to return a dictionary string to float.
<add> def compute_metrics(p: EvalPrediction):
<add> preds = p.predictions[0] if isinstance(p.predictions, tuple) else p.predictions
<add> preds = np.argmax(preds, axis=1)
<add> return metric.compute(predictions=preds, references=p.label_ids)
<add>
<add> # Data collator will default to DataCollatorWithPadding, so we change it if we already did the padding.
<add> if data_args.pad_to_max_length:
<add> data_collator = default_data_collator
<add> elif training_args.fp16:
<add> data_collator = DataCollatorWithPadding(tokenizer, pad_to_multiple_of=8)
<add> else:
<add> data_collator = None
<add>
<add> # Initialize our Trainer
<add> trainer = Trainer(
<add> model=model,
<add> args=training_args,
<add> train_dataset=train_dataset,
<add> eval_dataset=eval_dataset if training_args.do_eval else None,
<add> compute_metrics=compute_metrics,
<add> tokenizer=tokenizer,
<add> data_collator=data_collator,
<add> )
<ide>
<ide> # Training
<del> if args.do_train:
<del> train_dataset = load_and_cache_examples(args, args.task_name, tokenizer, evaluate=False)
<del> global_step, tr_loss = train(args, train_dataset, model, tokenizer)
<del> logger.info(" global_step = %s, average loss = %s", global_step, tr_loss)
<del>
<del> # Saving best-practices: if you use defaults names for the model, you can reload it using from_pretrained()
<del> if args.do_train and (args.local_rank == -1 or torch.distributed.get_rank() == 0):
<del> logger.info("Saving model checkpoint to %s", args.output_dir)
<del> # Save a trained model, configuration and tokenizer using `save_pretrained()`.
<del> # They can then be reloaded using `from_pretrained()`
<del> model_to_save = (
<del> model.module if hasattr(model, "module") else model
<del> ) # Take care of distributed/parallel training
<del> model_to_save.save_pretrained(args.output_dir)
<del> tokenizer.save_pretrained(args.output_dir)
<del>
<del> # Good practice: save your training arguments together with the trained model
<del> torch.save(args, os.path.join(args.output_dir, "training_args.bin"))
<del>
<del> # Load a trained model and vocabulary that you have fine-tuned
<del> model = AutoModelForSequenceClassification.from_pretrained(args.output_dir)
<del> tokenizer = AutoTokenizer.from_pretrained(args.output_dir)
<del> model.to(args.device)
<add> if training_args.do_train:
<add> if last_checkpoint is not None:
<add> model_path = last_checkpoint
<add> elif os.path.isdir(model_args.model_name_or_path):
<add> model_path = model_args.model_name_or_path
<add> else:
<add> model_path = None
<add> train_result = trainer.train(model_path=model_path)
<add> metrics = train_result.metrics
<ide>
<del> # Evaluation
<del> results = {}
<del> if args.do_eval and args.local_rank in [-1, 0]:
<del> checkpoints = [args.output_dir]
<del> if args.eval_all_checkpoints:
<del> checkpoints = list(
<del> os.path.dirname(c) for c in sorted(glob.glob(args.output_dir + "/**/" + WEIGHTS_NAME, recursive=True))
<del> )
<add> trainer.save_model() # Saves the tokenizer too for easy upload
<ide>
<del> logger.info("Evaluate the following checkpoints: %s", checkpoints)
<del> for checkpoint in checkpoints:
<del> global_step = checkpoint.split("-")[-1] if len(checkpoints) > 1 else ""
<del> prefix = checkpoint.split("/")[-1] if checkpoint.find("checkpoint") != -1 else ""
<add> output_train_file = os.path.join(training_args.output_dir, "train_results.txt")
<add> if trainer.is_world_process_zero():
<add> with open(output_train_file, "w") as writer:
<add> logger.info("***** Train results *****")
<add> for key, value in sorted(metrics.items()):
<add> logger.info(f" {key} = {value}")
<add> writer.write(f"{key} = {value}\n")
<ide>
<del> model = AutoModelForSequenceClassification.from_pretrained(checkpoint)
<del> model.to(args.device)
<del> result = evaluate(args, model, tokenizer, prefix=prefix)
<del> result = dict((k + "_{}".format(global_step), v) for k, v in result.items())
<del> results.update(result)
<add> # Need to save the state, since Trainer.save_model saves only the tokenizer with the model
<add> trainer.state.save_to_json(os.path.join(training_args.output_dir, "trainer_state.json"))
<ide>
<del> return results
<add> # Evaluation
<add> eval_results = {}
<add> if training_args.do_eval:
<add> logger.info("*** Evaluate ***")
<add>
<add> eval_result = trainer.evaluate(eval_dataset=eval_dataset)
<add> output_eval_file = os.path.join(training_args.output_dir, "eval_results_xnli.txt")
<add>
<add> if trainer.is_world_process_zero():
<add> with open(output_eval_file, "w") as writer:
<add> logger.info("***** Eval results xnli *****")
<add> for key, value in sorted(eval_result.items()):
<add> logger.info(f" {key} = {value}")
<add> writer.write(f"{key} = {value}\n")
<add>
<add> eval_results.update(eval_result)
<add> return eval_results
<ide>
<ide>
<ide> if __name__ == "__main__": | 2 |
Text | Text | fix code container in chapter 5.2 [ci-skip] | 713f1382586b68ba70fdac76164da76a516585e0 | <ide><path>guides/source/getting_started.md
<ide> Edit the `form_for` line inside `app/views/posts/new.html.erb` to look like this
<ide> In this example, the `posts_path` helper is passed to the `:url` option.
<ide> To see what Rails will do with this, we look back at the output of
<ide> `rake routes`:
<add>
<ide> ```bash
<ide> $ rake routes
<ide> Prefix Verb URI Pattern Controller#Action
<ide> edit_post GET /posts/:id/edit(.:format) posts#edit
<ide> DELETE /posts/:id(.:format) posts#destroy
<ide> root / welcome#index
<ide> ```
<add>
<ide> The `posts_path` helper tells Rails to point the form
<ide> to the URI Pattern associated with the `posts` prefix; and
<ide> the form will (by default) send a `POST` request | 1 |
Javascript | Javascript | trim html string in jqlite constructor | 36d37c0e3880c774d20c014ade60d2331beefa15 | <ide><path>src/jqLite.js
<ide> function JQLite(element) {
<ide> if (element instanceof JQLite) {
<ide> return element;
<ide> }
<add> if (isString(element)) {
<add> element = trim(element);
<add> }
<ide> if (!(this instanceof JQLite)) {
<ide> if (isString(element) && element.charAt(0) != '<') {
<ide> throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');
<ide><path>test/jqLiteSpec.js
<ide> describe('jqLite', function() {
<ide> });
<ide>
<ide>
<add> it('should allow construction of html with leading whitespace', function() {
<add> var nodes = jqLite(' \n\r \r\n<div>1</div><span>2</span>');
<add> expect(nodes[0].parentNode).toBeDefined();
<add> expect(nodes[0].parentNode.nodeType).toBe(11); /** Document Fragment **/;
<add> expect(nodes[0].parentNode).toBe(nodes[1].parentNode);
<add> expect(nodes.length).toBe(2);
<add> expect(nodes[0].innerHTML).toBe('1');
<add> expect(nodes[1].innerHTML).toBe('2');
<add> });
<add>
<add>
<ide> it('should allow creation of comment tags', function() {
<ide> var nodes = jqLite('<!-- foo -->');
<ide> expect(nodes.length).toBe(1); | 2 |
Javascript | Javascript | replace arrow function | b7b911b964713ba092fe3ad7b43b039f7f3b4893 | <ide><path>src/lib/duration/constructor.js
<ide> export function Duration (duration) {
<ide> var normalizedInput = normalizeObjectUnits(duration);
<ide>
<ide> this._isValid = isDurationValid(normalizedInput);
<del> this.isValid = () => this._isValid;
<add> this.isValid = function () {
<add> return this._isValid;
<add> };
<ide>
<ide> var years = this._isValid && normalizedInput.year || 0,
<ide> quarters = this._isValid && normalizedInput.quarter || 0, | 1 |
Javascript | Javascript | fix typo in datepickerandroidtypes.js | 11ac06fda4870f5fdf3e2e8deab32f2b778026a0 | <ide><path>Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js
<ide> export type Options = $ReadOnly<{|
<ide> date?: ?(Date | number),
<ide> minDate?: ?(Date | number),
<ide> maxDate?: ?(Date | number),
<del> mode?: ?('calender' | 'spinner' | 'default'),
<add> mode?: ?('calendar' | 'spinner' | 'default'),
<ide> |}>;
<ide>
<ide> export type DatePickerOpenAction = | 1 |
Javascript | Javascript | preserve process.env in forked child_process | 47198af55a384788cda34c430531d928e24ae261 | <ide><path>test/simple/test-child-process-fork-exec-path.js
<ide> else {
<ide> fs.writeFileSync(copyPath, fs.readFileSync(nodePath));
<ide> fs.chmodSync(copyPath, '0755');
<ide>
<add> // slow but simple
<add> var envCopy = JSON.parse(JSON.stringify(process.env));
<add> envCopy.FORK = 'true';
<ide> var child = require('child_process').fork(__filename, {
<ide> execPath: copyPath,
<del> env: { FORK: 'true' }
<add> env: envCopy
<ide> });
<ide> child.on('message', common.mustCall(function(recv) {
<ide> assert.deepEqual(msg, recv); | 1 |
Text | Text | copy changes from to package-level readme | 4316d3884e1ab7c4cec94c21e4b4928d33eeb079 | <ide><path>packages/create-next-app/README.md
<ide>
<ide> The easiest way to get started with Next.js is by using `create-next-app`. This CLI tool enables you to quickly start building a new Next.js application, with everything set up for you. You can create a new app using the default Next.js template, or by using one of the [official Next.js examples](https://github.com/vercel/next.js/tree/canary/examples). To get started, use the following command:
<ide>
<add>### Interactive
<add>
<add>You can create a new project interactively by running:
<add>
<ide> ```bash
<ide> npx create-next-app@latest
<ide> # or
<ide> yarn create next-app
<ide> pnpm create next-app
<ide> ```
<ide>
<del>Or, for a [TypeScript project](https://github.com/vercel/next.js/blob/canary/docs/basic-features/typescript.md):
<add>You will be asked for the name of your project, and then whether you want to
<add>create a TypeScript project:
<ide>
<ide> ```bash
<del>npx create-next-app@latest --typescript
<del># or
<del>yarn create next-app --typescript
<del># or
<del>pnpm create next-app --typescript
<add>✔ Would you like to use TypeScript with this project? … No / Yes
<ide> ```
<ide>
<del>To create a new app in a specific folder, you can send a name as an argument. For example, the following command will create a new Next.js app called `blog-app` in a folder with the same name:
<add>Select **Yes** to install the necessary types/dependencies and create a new TS project.
<add>
<add>### Non-interactive
<add>
<add>You can also pass command line arguments to set up a new project
<add>non-interactively. See `create-next-app --help`:
<ide>
<ide> ```bash
<del>npx create-next-app@latest blog-app
<del># or
<del>yarn create next-app blog-app
<del># or
<del>pnpm create next-app blog-app
<del>```
<add>create-next-app <project-directory> [options]
<add>
<add>Options:
<add> -V, --version output the version number
<add> --ts, --typescript
<ide>
<del>## Options
<add> Initialize as a TypeScript project. (default)
<ide>
<del>`create-next-app` comes with the following options:
<add> --js, --javascript
<ide>
<del>- **--ts, --typescript** - Initialize as a TypeScript project.
<del>- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/canary/examples) or a GitHub URL. The URL can use any branch and/or subdirectory.
<del>- **--example-path <path-to-example>** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar`
<del>- **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend to run `yarn create next-app`
<del>- **--use-pnpm** - Explicitly tell the CLI to bootstrap the app using pnpm. To bootstrap using pnpm we recommend running `pnpm create next-app`
<add> Initialize as a JavaScript project.
<add>
<add> --use-npm
<add>
<add> Explicitly tell the CLI to bootstrap the app using npm
<add>
<add> --use-pnpm
<add>
<add> Explicitly tell the CLI to bootstrap the app using pnpm
<add>
<add> -e, --example [name]|[github-url]
<add>
<add> An example to bootstrap the app with. You can use an example name
<add> from the official Next.js repo or a GitHub URL. The URL can use
<add> any branch and/or subdirectory
<add>
<add> --example-path <path-to-example>
<add>
<add> In a rare case, your GitHub URL might contain a branch name with
<add> a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar).
<add> In this case, you must specify the path to the example separately:
<add> --example-path foo/bar
<add>```
<ide>
<del>## Why use Create Next App?
<add>### Why use Create Next App?
<ide>
<ide> `create-next-app` allows you to create a new Next.js app within seconds. It is officially maintained by the creators of Next.js, and includes a number of benefits:
<ide>
<del>- **Interactive Experience**: Running `npx create-next-app` (with no arguments) launches an interactive experience that guides you through setting up a project.
<add>- **Interactive Experience**: Running `npx create-next-app@latest` (with no arguments) launches an interactive experience that guides you through setting up a project.
<ide> - **Zero Dependencies**: Initializing a project is as quick as one second. Create Next App has zero dependencies.
<ide> - **Offline Support**: Create Next App will automatically detect if you're offline and bootstrap your project using your local package cache.
<ide> - **Support for Examples**: Create Next App can bootstrap your application using an example from the Next.js examples collection (e.g. `npx create-next-app --example api-routes`). | 1 |
Python | Python | remove macro auc per type from textcat defaults | f1e024345043cdc986e70308a09a7ca383b60dd0 | <ide><path>spacy/pipeline/textcat.py
<ide> "cats_macro_f": None,
<ide> "cats_macro_auc": None,
<ide> "cats_f_per_type": None,
<del> "cats_macro_auc_per_type": None,
<ide> },
<ide> )
<ide> def make_textcat(
<ide><path>spacy/pipeline/textcat_multilabel.py
<ide> "cats_macro_f": None,
<ide> "cats_macro_auc": None,
<ide> "cats_f_per_type": None,
<del> "cats_macro_auc_per_type": None,
<ide> },
<ide> )
<ide> def make_multilabel_textcat( | 2 |
Text | Text | add @buildpulse link and logo | 48e69ea3474edde6b7a1d6cb6a16ec4f2e3ee748 | <ide><path>README.md
<ide> Secure password storage and syncing is provided by [1Password for Teams](https:/
<ide>
<ide> [](https://1password.com)
<ide>
<add>Flaky test detection and tracking is provided by [BuildPulse](https://buildpulse.io/).
<add>
<add>[](https://buildpulse.io)
<add>
<ide> Homebrew is a member of the [Software Freedom Conservancy](https://sfconservancy.org).
<ide>
<ide> [](https://sfconservancy.org) | 1 |
PHP | PHP | fix $groups param type | e9632af218c3e3d263526f4a19bcf6af4987a7fb | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> protected function addDynamic($segment, $connector, $parameters, $index)
<ide> /**
<ide> * Add a "group by" clause to the query.
<ide> *
<del> * @param array ...$groups
<add> * @param array|string ...$groups
<ide> * @return $this
<ide> */
<ide> public function groupBy(...$groups) | 1 |
Javascript | Javascript | use a fresh input for the value-lossage check | e1dcf96b526a7fd9b323cdf7b4f68be1e72f0d6c | <ide><path>src/support.js
<ide> jQuery.support = (function() {
<ide> }
<ide>
<ide> // Check if an input maintains its value after becoming a radio
<add> input = document.createElement("input");
<ide> input.value = "t";
<ide> input.setAttribute( "type", "radio" );
<ide> support.radioValue = input.value === "t"; | 1 |
Mixed | Ruby | remove nodoc from eachvalidator [ci-skip] | 79bb7d0a2b8e1a443b323adbb05d764879d0216e | <ide><path>activemodel/lib/active_model/validator.rb
<ide> def validate(record)
<ide> # record, attribute and value.
<ide> #
<ide> # All \Active \Model validations are built on top of this validator.
<del> class EachValidator < Validator #:nodoc:
<add> class EachValidator < Validator
<ide> attr_reader :attributes
<ide>
<ide> # Returns a new validator instance. All options will be available via the
<ide><path>guides/source/active_record_validations.md
<ide> end
<ide> ```
<ide>
<ide> The easiest way to add custom validators for validating individual attributes
<del>is with the convenient `ActiveModel::EachValidator`. In this case, the custom
<add>is with the convenient [`ActiveModel::EachValidator`][]. In this case, the custom
<ide> validator class must implement a `validate_each` method which takes three
<ide> arguments: record, attribute, and value. These correspond to the instance, the
<ide> attribute to be validated, and the value of the attribute in the passed
<ide> end
<ide> As shown in the example, you can also combine standard validations with your
<ide> own custom validators.
<ide>
<add>[`ActiveModel::EachValidator`]: https://api.rubyonrails.org/classes/ActiveModel/EachValidator.html
<ide> [`ActiveModel::Validator`]: https://api.rubyonrails.org/classes/ActiveModel/Validator.html
<ide>
<ide> ### Custom Methods | 2 |
Java | Java | fix headersadapters implementations | ab8310b5f37df0e1e86595acec05aff402c8f574 | <ide><path>spring-web/src/main/java/org/springframework/http/server/reactive/JettyHeadersAdapter.java
<ide> public boolean containsValue(Object value) {
<ide> @Nullable
<ide> @Override
<ide> public List<String> get(Object key) {
<del> if (key instanceof String) {
<add> if (containsKey(key)) {
<ide> return this.headers.getValuesList((String) key);
<ide> }
<ide> return null;
<ide><path>spring-web/src/main/java/org/springframework/http/server/reactive/NettyHeadersAdapter.java
<ide> public Map<String, String> toSingleValueMap() {
<ide>
<ide> @Override
<ide> public int size() {
<del> return this.headers.size();
<add> return this.headers.names().size();
<ide> }
<ide>
<ide> @Override
<ide> public boolean containsValue(Object value) {
<ide> @Override
<ide> @Nullable
<ide> public List<String> get(Object key) {
<del> if (key instanceof String) {
<add> if (containsKey(key)) {
<ide> return this.headers.getAll((String) key);
<ide> }
<ide> return null;
<ide><path>spring-web/src/main/java/org/springframework/http/server/reactive/TomcatHeadersAdapter.java
<ide> public boolean containsValue(Object value) {
<ide> @Override
<ide> @Nullable
<ide> public List<String> get(Object key) {
<del> if (key instanceof String) {
<add> if (containsKey(key)) {
<ide> return Collections.list(this.headers.values((String) key));
<ide> }
<ide> return null;
<ide><path>spring-web/src/test/java/org/springframework/http/server/reactive/HeadersAdaptersTests.java
<add>/*
<add> * Copyright 2002-2018 the original author or authors.
<add> *
<add> * Licensed under the Apache License, Version 2.0 (the "License");
<add> * you may not use this file except in compliance with the License.
<add> * You may obtain a copy of the License at
<add> *
<add> * http://www.apache.org/licenses/LICENSE-2.0
<add> *
<add> * Unless required by applicable law or agreed to in writing, software
<add> * distributed under the License is distributed on an "AS IS" BASIS,
<add> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<add> * See the License for the specific language governing permissions and
<add> * limitations under the License.
<add> */
<add>
<add>package org.springframework.http.server.reactive;
<add>
<add>import java.util.Locale;
<add>
<add>import io.netty.handler.codec.http.DefaultHttpHeaders;
<add>import io.undertow.util.HeaderMap;
<add>import org.apache.tomcat.util.http.MimeHeaders;
<add>import org.eclipse.jetty.http.HttpFields;
<add>import org.junit.Test;
<add>import org.junit.runner.RunWith;
<add>import org.junit.runners.Parameterized;
<add>
<add>import org.springframework.util.CollectionUtils;
<add>import org.springframework.util.LinkedCaseInsensitiveMap;
<add>import org.springframework.util.MultiValueMap;
<add>
<add>import static org.junit.Assert.assertEquals;
<add>import static org.junit.Assert.assertNull;
<add>import static org.junit.Assert.assertTrue;
<add>
<add>/**
<add> * Unit tests for {@code HeadersAdapters} {@code MultiValueMap} implementations.
<add> *
<add> * @author Brian Clozel
<add> */
<add>@RunWith(Parameterized.class)
<add>public class HeadersAdaptersTests {
<add>
<add> @Parameterized.Parameter(0)
<add> public MultiValueMap<String, String> headers;
<add>
<add> @Parameterized.Parameters(name = "headers [{0}]")
<add> public static Object[][] arguments() {
<add> return new Object[][] {
<add> {CollectionUtils.toMultiValueMap(
<add> new LinkedCaseInsensitiveMap<>(8, Locale.ENGLISH))},
<add> {new NettyHeadersAdapter(new DefaultHttpHeaders())},
<add> {new TomcatHeadersAdapter(new MimeHeaders())},
<add> {new UndertowHeadersAdapter(new HeaderMap())},
<add> {new JettyHeadersAdapter(new HttpFields())}
<add> };
<add> }
<add>
<add> @Test
<add> public void getWithUnknownHeaderShouldReturnNull() {
<add> assertNull(this.headers.get("Unknown"));
<add> }
<add>
<add> @Test
<add> public void getFirstWithUnknownHeaderShouldReturnNull() {
<add> assertNull(this.headers.getFirst("Unknown"));
<add> }
<add>
<add> @Test
<add> public void sizeWithMultipleValuesForHeaderShouldCountHeaders() {
<add> this.headers.add("TestHeader", "first");
<add> this.headers.add("TestHeader", "second");
<add> assertEquals(1, this.headers.size());
<add> }
<add>
<add> @Test
<add> public void keySetShouldNotDuplicateHeaderNames() {
<add> this.headers.add("TestHeader", "first");
<add> this.headers.add("OtherHeader", "test");
<add> this.headers.add("TestHeader", "second");
<add> assertEquals(2, this.headers.keySet().size());
<add> }
<add>
<add> @Test
<add> public void containsKeyShouldBeCaseInsensitive() {
<add> this.headers.add("TestHeader", "first");
<add> assertTrue(this.headers.containsKey("testheader"));
<add> }
<add>
<add> @Test
<add> public void addShouldKeepOrdering() {
<add> this.headers.add("TestHeader", "first");
<add> this.headers.add("TestHeader", "second");
<add> assertEquals("first", this.headers.getFirst("TestHeader"));
<add> assertEquals("first", this.headers.get("TestHeader").get(0));
<add> }
<add>
<add>} | 4 |
PHP | PHP | make empty array as default | 080d36af36189f54669c48a71cb6279e19808eb0 | <ide><path>src/Illuminate/Support/Collection.php
<ide> public function __construct($items = [])
<ide> * @param mixed $items
<ide> * @return static
<ide> */
<del> public static function make($items = null)
<add> public static function make($items = [])
<ide> {
<ide> return new static($items);
<ide> } | 1 |
Python | Python | update systemd doc | b7ac674b35c9e6592804a191e4499924569f44f6 | <ide><path>glances/amps/glances_nginx.py
<ide> Waiting – keep-alive connections, actually it is active – (reading + writing).
<ide> This value depends on keepalive-timeout. Do not confuse non-zero waiting value for poor
<ide> performance. It can be ignored.
<del>Source (https://easyengine.io/tutorials/nginx/status-page/)
<add>
<add>Source reference: https://easyengine.io/tutorials/nginx/status-page/
<ide>
<ide> Configuration file example
<ide> --------------------------
<ide><path>glances/amps/glances_systemd.py
<ide> Systemd AMP
<ide> ===========
<ide>
<del>Monitor the Systemd.
<add>Monitor the state of the systemd system and service (unit) manager.
<ide>
<ide> How to read the stats
<ide> ---------------------
<ide>
<del>...
<add>active: Number of active units. This is usually a fairly basic way to tell if the
<add>unit has started successfully or not.
<add>loaded: Number of loaded units (unit's configuration has been parsed by systemd).
<add>failed: Number of units with an active failed status.
<add>
<add>Source reference: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units
<ide>
<ide> Configuration file example
<ide> --------------------------
<ide> class Amp(GlancesAmp):
<ide>
<ide> NAME = 'Systemd'
<ide> VERSION = '1.0'
<del> DESCRIPTION = 'Get daemon list from systemctl (systemd)'
<add> DESCRIPTION = 'Get services list from systemctl (systemd)'
<ide> AUTHOR = 'Nicolargo'
<ide> EMAIL = 'contact@nicolargo.com'
<ide> | 2 |
Javascript | Javascript | move other branches out of the bail out | 26c82cea7244c333ee671a02ef976b87faa1d0a5 | <ide><path>src/renderers/shared/fiber/ReactFiberBeginWork.js
<ide> module.exports = function<T, P, I, TI, C, CX>(
<ide> workInProgress.effectTag |= Update;
<ide> }
<ide> }
<add>
<add> // Don't forget to push the context before returning.
<add> if (isContextProvider(workInProgress)) {
<add> pushContextProvider(workInProgress, false);
<add> }
<ide> return bailoutOnAlreadyFinishedWork(current, workInProgress);
<ide> }
<ide>
<ide> module.exports = function<T, P, I, TI, C, CX>(
<ide>
<ide> cloneChildFibers(current, workInProgress);
<ide> markChildAsProgressed(current, workInProgress, priorityLevel);
<del>
<del> switch (workInProgress.tag) {
<del> case ClassComponent:
<del> if (isContextProvider(workInProgress)) {
<del> pushContextProvider(workInProgress, false);
<del> }
<del> break;
<del> case HostRoot:
<del> case HostPortal:
<del> pushHostContainer(workInProgress.stateNode.containerInfo);
<del> break;
<del> }
<del>
<del> // TODO: this is annoyingly duplicating non-jump codepaths.
<del>
<ide> return workInProgress.child;
<ide> }
<ide> | 1 |
Javascript | Javascript | use a cache to minimize the number of name objects | fdb7c218daa2e372f20215fe67c022f991a02761 | <ide><path>src/core/crypto.js
<ide> var CipherTransformFactory = (function CipherTransformFactoryClosure() {
<ide> return userPassword;
<ide> }
<ide>
<del> var identityName = new Name('Identity');
<add> var identityName = Name.get('Identity');
<ide>
<ide> function CipherTransformFactory(dict, fileId, password) {
<ide> var filter = dict.get('Filter');
<ide><path>src/core/evaluator.js
<ide> var PartialEvaluator = (function PartialEvaluatorClosure() {
<ide> // FontDescriptor is only required for Type3 fonts when the document
<ide> // is a tagged pdf. Create a barbebones one to get by.
<ide> descriptor = new Dict();
<del> descriptor.set('FontName', new Name(type.name));
<add> descriptor.set('FontName', Name.get(type.name));
<ide> } else {
<ide> // Before PDF 1.5 if the font was one of the base 14 fonts, having a
<ide> // FontDescriptor was not required.
<ide> var PartialEvaluator = (function PartialEvaluatorClosure() {
<ide> var baseFont = dict.get('BaseFont');
<ide> // Some bad pdf's have a string as the font name.
<ide> if (isString(fontName)) {
<del> fontName = new Name(fontName);
<add> fontName = Name.get(fontName);
<ide> }
<ide> if (isString(baseFont)) {
<del> baseFont = new Name(baseFont);
<add> baseFont = Name.get(baseFont);
<ide> }
<ide>
<ide> if (type.name !== 'Type3') {
<ide><path>src/core/image.js
<ide> var PDFImage = (function PDFImageClosure() {
<ide> var colorSpace = dict.get('ColorSpace', 'CS');
<ide> if (!colorSpace) {
<ide> warn('JPX images (which don"t require color spaces');
<del> colorSpace = new Name('DeviceRGB');
<add> colorSpace = Name.get('DeviceRGB');
<ide> }
<ide> this.colorSpace = ColorSpace.parse(colorSpace, xref, res);
<ide> this.numComps = this.colorSpace.numComps;
<ide><path>src/core/obj.js
<ide> var Name = (function NameClosure() {
<ide>
<ide> Name.prototype = {};
<ide>
<add> var nameCache = {};
<add>
<add> Name.get = function Name_get(name) {
<add> var nameValue = nameCache[name];
<add> return nameValue ? nameValue : (nameCache[name] = new Name(name));
<add> };
<add>
<ide> return Name;
<ide> })();
<ide>
<ide> var Cmd = (function CmdClosure() {
<ide>
<ide> Cmd.get = function Cmd_get(cmd) {
<ide> var cmdValue = cmdCache[cmd];
<del> if (cmdValue)
<del> return cmdValue;
<del>
<del> return cmdCache[cmd] = new Cmd(cmd);
<add> return cmdValue ? cmdValue : (cmdCache[cmd] = new Cmd(cmd));
<ide> };
<ide>
<ide> return Cmd;
<ide><path>src/core/parser.js
<ide> var Lexer = (function LexerClosure() {
<ide> error('Warning: name token is longer than allowed by the spec: ' +
<ide> strBuf.length);
<ide> }
<del> return new Name(strBuf.join(''));
<add> return Name.get(strBuf.join(''));
<ide> },
<ide> getHexString: function Lexer_getHexString() {
<ide> var strBuf = this.strBuf;
<ide><path>test/unit/crypto_spec.js
<ide> describe('CipherTransformFactory', function() {
<ide> };
<ide>
<ide> var map1 = {
<del> Filter: new Name('Standard'),
<add> Filter: Name.get('Standard'),
<ide> V: 2,
<ide> Length: 128,
<ide> O: unescape('%80%C3%04%96%91o%20sl%3A%E6%1B%13T%91%F2%0DV%12%E3%FF%5E%BB%' +
<ide> describe('CipherTransformFactory', function() {
<ide> var fileID1 = unescape('%F6%C6%AF%17%F3rR%8DRM%9A%80%D1%EF%DF%18');
<ide>
<ide> var map2 = {
<del> Filter: new Name('Standard'),
<add> Filter: Name.get('Standard'),
<ide> V: 4,
<ide> Length: 128,
<ide> O: unescape('sF%14v.y5%27%DB%97%0A5%22%B3%E1%D4%AD%BD%9B%3C%B4%A5%89u%15%' +
<ide><path>test/unit/obj_spec.js
<ide> describe('obj', function() {
<ide> describe('Name', function() {
<ide> it('should retain the given name', function() {
<ide> var givenName = 'Font';
<del> var name = new Name(givenName);
<add> var name = Name.get(givenName);
<ide> expect(name.name).toEqual(givenName);
<ide> });
<ide> });
<ide><path>test/unit/util_spec.js
<ide> describe('util', function() {
<ide>
<ide> it('handles dictionaries with type check', function() {
<ide> var dict = new Dict();
<del> dict.set('Type', new Name('Page'));
<add> dict.set('Type', Name.get('Page'));
<ide> expect(isDict(dict, 'Page')).toEqual(true);
<ide> });
<ide> }); | 8 |
Java | Java | extend reactshadownode api to expose flex props | 6570f7887b8824705ae09b5653d631428e17bc5f | <ide><path>ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java
<ide>
<ide> YogaValue getStyleHeight();
<ide>
<add> float getFlex();
<add>
<ide> void setStyleHeight(float heightPx);
<ide>
<ide> void setStyleHeightPercent(float percent);
<ide><path>ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java
<ide> public void setStyleMaxHeightPercent(float percent) {
<ide> mYogaNode.setMaxHeightPercent(percent);
<ide> }
<ide>
<add> @Override
<add> public float getFlex() {
<add> return mYogaNode.getFlex();
<add> }
<add>
<ide> @Override
<ide> public void setFlex(float flex) {
<ide> mYogaNode.setFlex(flex); | 2 |
Ruby | Ruby | convert tap test to spec | 3dcbb84fb5fd1601e669ea15c9ddb1056c839325 | <ide><path>Library/Homebrew/test/tap_spec.rb
<add>RSpec::Matchers.alias_matcher :have_formula_file, :be_formula_file
<add>RSpec::Matchers.alias_matcher :have_custom_remote, :be_custom_remote
<add>
<add>describe Tap do
<add> include FileUtils
<add>
<add> subject { Tap.new("Homebrew", "foo") }
<add> let(:path) { Tap::TAP_DIRECTORY/"homebrew/homebrew-foo" }
<add> let(:formula_file) { path/"Formula/foo.rb" }
<add> let(:alias_file) { path/"Aliases/bar" }
<add> let(:cmd_file) { path/"cmd/brew-tap-cmd.rb" }
<add> let(:manpage_file) { path/"manpages/brew-tap-cmd.1" }
<add> let(:bash_completion_file) { path/"completions/bash/brew-tap-cmd" }
<add> let(:zsh_completion_file) { path/"completions/zsh/_brew-tap-cmd" }
<add> let(:fish_completion_file) { path/"completions/fish/brew-tap-cmd.fish" }
<add>
<add> before(:each) do
<add> path.mkpath
<add> end
<add>
<add> def setup_tap_files
<add> formula_file.write <<-EOS.undent
<add> class Foo < Formula
<add> url "https://example.com/foo-1.0.tar.gz"
<add> end
<add> EOS
<add>
<add> alias_file.parent.mkpath
<add> ln_s formula_file, alias_file
<add>
<add> (path/"formula_renames.json").write <<-EOS.undent
<add> { "oldname": "foo" }
<add> EOS
<add>
<add> (path/"tap_migrations.json").write <<-EOS.undent
<add> { "removed-formula": "homebrew/foo" }
<add> EOS
<add>
<add> [
<add> cmd_file,
<add> manpage_file,
<add> bash_completion_file,
<add> zsh_completion_file,
<add> fish_completion_file,
<add> ].each do |f|
<add> f.parent.mkpath
<add> touch f
<add> end
<add>
<add> chmod 0755, cmd_file
<add> end
<add>
<add> def setup_git_repo
<add> path.cd do
<add> shutup do
<add> system "git", "init"
<add> system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-foo"
<add> system "git", "add", "--all"
<add> system "git", "commit", "-m", "init"
<add> end
<add> end
<add> end
<add>
<add> specify "::fetch" do
<add> begin
<add> expect(described_class.fetch("Homebrew", "homebrew")).to be_kind_of(CoreTap)
<add> tap = described_class.fetch("Homebrew", "foo")
<add> expect(tap).to be_kind_of(Tap)
<add> expect(tap.name).to eq("homebrew/foo")
<add>
<add> expect {
<add> described_class.fetch("foo")
<add> }.to raise_error(/Invalid tap name/)
<add>
<add> expect {
<add> described_class.fetch("homebrew/homebrew/bar")
<add> }.to raise_error(/Invalid tap name/)
<add>
<add> expect {
<add> described_class.fetch("homebrew", "homebrew/baz")
<add> }.to raise_error(/Invalid tap name/)
<add> ensure
<add> described_class.clear_cache
<add> end
<add> end
<add>
<add> specify "#names" do
<add> expect(described_class.names.sort).to eq(["homebrew/core", "homebrew/foo"])
<add> end
<add>
<add> specify "attributes" do
<add> expect(subject.user).to eq("Homebrew")
<add> expect(subject.repo).to eq("foo")
<add> expect(subject.name).to eq("homebrew/foo")
<add> expect(subject.path).to eq(path)
<add> expect(subject).to be_installed
<add> expect(subject).to be_official
<add> expect(subject).not_to be_a_core_tap
<add> end
<add>
<add> specify "#issues_url" do
<add> begin
<add> t = described_class.new("someone", "foo")
<add> path = Tap::TAP_DIRECTORY/"someone/homebrew-foo"
<add> path.mkpath
<add> cd path do
<add> shutup { system "git", "init" }
<add> system "git", "remote", "add", "origin",
<add> "https://github.com/someone/homebrew-foo"
<add> end
<add> expect(t.issues_url).to eq("https://github.com/someone/homebrew-foo/issues")
<add> expect(subject.issues_url).to eq("https://github.com/Homebrew/homebrew-foo/issues")
<add>
<add> (Tap::TAP_DIRECTORY/"someone/homebrew-no-git").mkpath
<add> expect(described_class.new("someone", "no-git").issues_url).to be nil
<add> ensure
<add> path.parent.rmtree
<add> end
<add> end
<add>
<add> specify "files" do
<add> setup_tap_files
<add>
<add> expect(subject.formula_files).to eq([formula_file])
<add> expect(subject.formula_names).to eq(["homebrew/foo/foo"])
<add> expect(subject.alias_files).to eq([alias_file])
<add> expect(subject.aliases).to eq(["homebrew/foo/bar"])
<add> expect(subject.alias_table).to eq("homebrew/foo/bar" => "homebrew/foo/foo")
<add> expect(subject.alias_reverse_table).to eq("homebrew/foo/foo" => ["homebrew/foo/bar"])
<add> expect(subject.formula_renames).to eq("oldname" => "foo")
<add> expect(subject.tap_migrations).to eq("removed-formula" => "homebrew/foo")
<add> expect(subject.command_files).to eq([cmd_file])
<add> expect(subject.to_hash).to be_kind_of(Hash)
<add> expect(subject).to have_formula_file(formula_file)
<add> expect(subject).to have_formula_file("Formula/foo.rb")
<add> expect(subject).not_to have_formula_file("bar.rb")
<add> expect(subject).not_to have_formula_file("Formula/baz.sh")
<add> end
<add>
<add> describe "#remote" do
<add> it "returns the remote URL" do
<add> setup_git_repo
<add>
<add> expect(subject.remote).to eq("https://github.com/Homebrew/homebrew-foo")
<add> expect { described_class.new("Homebrew", "bar").remote }.to raise_error(TapUnavailableError)
<add> expect(subject).not_to have_custom_remote
<add>
<add> services_tap = described_class.new("Homebrew", "services")
<add> services_tap.path.mkpath
<add> services_tap.path.cd do
<add> shutup do
<add> system "git", "init"
<add> system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-services"
<add> end
<add> end
<add> expect(services_tap).not_to be_private
<add> end
<add>
<add> it "returns nil if the Tap is not a Git repo" do
<add> expect(subject.remote).to be nil
<add> end
<add>
<add> it "returns nil if Git is not available" do
<add> setup_git_repo
<add> allow(Utils).to receive(:git_available?).and_return(false)
<add> expect(subject.remote).to be nil
<add> end
<add> end
<add>
<add> specify "Git variant" do
<add> touch path/"README"
<add> setup_git_repo
<add>
<add> expect(subject.git_head).to eq("0453e16c8e3fac73104da50927a86221ca0740c2")
<add> expect(subject.git_short_head).to eq("0453")
<add> expect(subject.git_last_commit).to match(/\A\d+ .+ ago\Z/)
<add> expect(subject.git_last_commit_date).to eq("2017-01-22")
<add> end
<add>
<add> specify "#private?" do
<add> skip "HOMEBREW_GITHUB_API_TOKEN is required" unless GitHub.api_credentials
<add> expect(subject).to be_private
<add> end
<add>
<add> describe "#install" do
<add> it "raises an error when the Tap is already tapped" do
<add> setup_git_repo
<add> already_tapped_tap = described_class.new("Homebrew", "foo")
<add> expect(already_tapped_tap).to be_installed
<add> expect { already_tapped_tap.install }.to raise_error(TapAlreadyTappedError)
<add> end
<add>
<add> it "raises an error when the Tap is already tapped with the right remote" do
<add> setup_git_repo
<add> already_tapped_tap = described_class.new("Homebrew", "foo")
<add> expect(already_tapped_tap).to be_installed
<add> right_remote = subject.remote
<add> expect { already_tapped_tap.install clone_target: right_remote }.to raise_error(TapAlreadyTappedError)
<add> end
<add>
<add> it "raises an error when the remote doesn't match" do
<add> setup_git_repo
<add> already_tapped_tap = described_class.new("Homebrew", "foo")
<add> touch subject.path/".git/shallow"
<add> expect(already_tapped_tap).to be_installed
<add> wrong_remote = "#{subject.remote}-oops"
<add> expect { already_tapped_tap.install clone_target: wrong_remote, full_clone: true }.to raise_error(TapRemoteMismatchError)
<add> end
<add>
<add> it "raises an error when the Tap is already unshallow" do
<add> setup_git_repo
<add> already_tapped_tap = described_class.new("Homebrew", "foo")
<add> expect { already_tapped_tap.install full_clone: true }.to raise_error(TapAlreadyUnshallowError)
<add> end
<add>
<add> specify "Git error" do
<add> tap = described_class.new("user", "repo")
<add>
<add> expect {
<add> shutup { tap.install clone_target: "file:///not/existed/remote/url" }
<add> }.to raise_error(ErrorDuringExecution)
<add>
<add> expect(tap).not_to be_installed
<add> expect(Tap::TAP_DIRECTORY/"user").not_to exist
<add> end
<add> end
<add>
<add> describe "#uninstall" do
<add> it "raises an error if the Tap is not available" do
<add> tap = described_class.new("Homebrew", "bar")
<add> expect { tap.uninstall }.to raise_error(TapUnavailableError)
<add> end
<add> end
<add>
<add> specify "#install and #uninstall" do
<add> begin
<add> setup_tap_files
<add> setup_git_repo
<add>
<add> tap = Tap.new("Homebrew", "bar")
<add> shutup do
<add> tap.install clone_target: subject.path/".git"
<add> end
<add> expect(tap).to be_installed
<add> expect(HOMEBREW_PREFIX/"share/man/man1/brew-tap-cmd.1").to be_a_file
<add> expect(HOMEBREW_PREFIX/"etc/bash_completion.d/brew-tap-cmd").to be_a_file
<add> expect(HOMEBREW_PREFIX/"share/zsh/site-functions/_brew-tap-cmd").to be_a_file
<add> expect(HOMEBREW_PREFIX/"share/fish/vendor_completions.d/brew-tap-cmd.fish").to be_a_file
<add> shutup do
<add> tap.uninstall
<add> end
<add> expect(tap).not_to be_installed
<add> expect(HOMEBREW_PREFIX/"share/man/man1/brew-tap-cmd.1").not_to exist
<add> expect(HOMEBREW_PREFIX/"share/man/man1").not_to exist
<add> expect(HOMEBREW_PREFIX/"etc/bash_completion.d/brew-tap-cmd").not_to exist
<add> expect(HOMEBREW_PREFIX/"share/zsh/site-functions/_brew-tap-cmd").not_to exist
<add> expect(HOMEBREW_PREFIX/"share/fish/vendor_completions.d/brew-tap-cmd.fish").not_to exist
<add> ensure
<add> (HOMEBREW_PREFIX/"etc").rmtree if (HOMEBREW_PREFIX/"etc").exist?
<add> (HOMEBREW_PREFIX/"share").rmtree if (HOMEBREW_PREFIX/"share").exist?
<add> end
<add> end
<add>
<add> specify "#link_completions_and_manpages" do
<add> begin
<add> setup_tap_files
<add> setup_git_repo
<add> tap = Tap.new("Homebrew", "baz")
<add> shutup { tap.install clone_target: subject.path/".git" }
<add> (HOMEBREW_PREFIX/"share/man/man1/brew-tap-cmd.1").delete
<add> (HOMEBREW_PREFIX/"etc/bash_completion.d/brew-tap-cmd").delete
<add> (HOMEBREW_PREFIX/"share/zsh/site-functions/_brew-tap-cmd").delete
<add> (HOMEBREW_PREFIX/"share/fish/vendor_completions.d/brew-tap-cmd.fish").delete
<add> shutup { tap.link_completions_and_manpages }
<add> expect(HOMEBREW_PREFIX/"share/man/man1/brew-tap-cmd.1").to be_a_file
<add> expect(HOMEBREW_PREFIX/"etc/bash_completion.d/brew-tap-cmd").to be_a_file
<add> expect(HOMEBREW_PREFIX/"share/zsh/site-functions/_brew-tap-cmd").to be_a_file
<add> expect(HOMEBREW_PREFIX/"share/fish/vendor_completions.d/brew-tap-cmd.fish").to be_a_file
<add> shutup { tap.uninstall }
<add> ensure
<add> (HOMEBREW_PREFIX/"etc").rmtree if (HOMEBREW_PREFIX/"etc").exist?
<add> (HOMEBREW_PREFIX/"share").rmtree if (HOMEBREW_PREFIX/"share").exist?
<add> end
<add> end
<add>
<add> specify "#pin and #unpin" do
<add> expect(subject).not_to be_pinned
<add> expect { subject.unpin }.to raise_error(TapPinStatusError)
<add> subject.pin
<add> expect(subject).to be_pinned
<add> expect { subject.pin }.to raise_error(TapPinStatusError)
<add> subject.unpin
<add> expect(subject).not_to be_pinned
<add> end
<add>
<add> specify "#config" do
<add> setup_git_repo
<add>
<add> expect(subject.config["foo"]).to be nil
<add> subject.config["foo"] = "bar"
<add> expect(subject.config["foo"]).to eq("bar")
<add> subject.config["foo"] = nil
<add> expect(subject.config["foo"]).to be nil
<add> end
<add>end
<add>
<add>describe CoreTap do
<add> include FileUtils
<add>
<add> specify "attributes" do
<add> expect(subject.user).to eq("Homebrew")
<add> expect(subject.repo).to eq("core")
<add> expect(subject.name).to eq("homebrew/core")
<add> expect(subject.command_files).to eq([])
<add> expect(subject).to be_installed
<add> expect(subject).not_to be_pinned
<add> expect(subject).to be_official
<add> expect(subject).to be_a_core_tap
<add> end
<add>
<add> specify "forbidden operations" do
<add> expect { subject.uninstall }.to raise_error(RuntimeError)
<add> expect { subject.pin }.to raise_error(RuntimeError)
<add> expect { subject.unpin }.to raise_error(RuntimeError)
<add> end
<add>
<add> specify "files" do
<add> formula_file = subject.formula_dir/"foo.rb"
<add> formula_file.write <<-EOS.undent
<add> class Foo < Formula
<add> url "https://example.com/foo-1.0.tar.gz"
<add> end
<add> EOS
<add>
<add> alias_file = subject.alias_dir/"bar"
<add> alias_file.parent.mkpath
<add> ln_s formula_file, alias_file
<add>
<add> expect(subject.formula_files).to eq([formula_file])
<add> expect(subject.formula_names).to eq(["foo"])
<add> expect(subject.alias_files).to eq([alias_file])
<add> expect(subject.aliases).to eq(["bar"])
<add> expect(subject.alias_table).to eq("bar" => "foo")
<add> expect(subject.alias_reverse_table).to eq("foo" => ["bar"])
<add> end
<add>end
<ide><path>Library/Homebrew/test/tap_test.rb
<del>require "testing_env"
<del>
<del>class TapTest < Homebrew::TestCase
<del> include FileUtils
<del>
<del> def setup
<del> super
<del> @path = Tap::TAP_DIRECTORY/"homebrew/homebrew-foo"
<del> @path.mkpath
<del> @tap = Tap.new("Homebrew", "foo")
<del> end
<del>
<del> def setup_tap_files
<del> @formula_file = @path/"Formula/foo.rb"
<del> @formula_file.write <<-EOS.undent
<del> class Foo < Formula
<del> url "https://example.com/foo-1.0.tar.gz"
<del> end
<del> EOS
<del> @alias_file = @path/"Aliases/bar"
<del> @alias_file.parent.mkpath
<del> ln_s @formula_file, @alias_file
<del> (@path/"formula_renames.json").write <<-EOS.undent
<del> { "oldname": "foo" }
<del> EOS
<del> (@path/"tap_migrations.json").write <<-EOS.undent
<del> { "removed-formula": "homebrew/foo" }
<del> EOS
<del> @cmd_file = @path/"cmd/brew-tap-cmd.rb"
<del> @cmd_file.parent.mkpath
<del> touch @cmd_file
<del> chmod 0755, @cmd_file
<del> @manpage_file = @path/"manpages/brew-tap-cmd.1"
<del> @manpage_file.parent.mkpath
<del> touch @manpage_file
<del> @bash_completion_file = @path/"completions/bash/brew-tap-cmd"
<del> @bash_completion_file.parent.mkpath
<del> touch @bash_completion_file
<del> @zsh_completion_file = @path/"completions/zsh/_brew-tap-cmd"
<del> @zsh_completion_file.parent.mkpath
<del> touch @zsh_completion_file
<del> @fish_completion_file = @path/"completions/fish/brew-tap-cmd.fish"
<del> @fish_completion_file.parent.mkpath
<del> touch @fish_completion_file
<del> end
<del>
<del> def setup_git_repo
<del> @path.cd do
<del> shutup do
<del> system "git", "init"
<del> system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-foo"
<del> system "git", "add", "--all"
<del> system "git", "commit", "-m", "init"
<del> end
<del> end
<del> end
<del>
<del> def test_fetch
<del> assert_kind_of CoreTap, Tap.fetch("Homebrew", "homebrew")
<del> tap = Tap.fetch("Homebrew", "foo")
<del> assert_kind_of Tap, tap
<del> assert_equal "homebrew/foo", tap.name
<del>
<del> assert_match "Invalid tap name",
<del> assert_raises { Tap.fetch("foo") }.message
<del> assert_match "Invalid tap name",
<del> assert_raises { Tap.fetch("homebrew/homebrew/bar") }.message
<del> assert_match "Invalid tap name",
<del> assert_raises { Tap.fetch("homebrew", "homebrew/baz") }.message
<del> ensure
<del> Tap.clear_cache
<del> end
<del>
<del> def test_names
<del> assert_equal ["homebrew/core", "homebrew/foo"], Tap.names.sort
<del> end
<del>
<del> def test_attributes
<del> assert_equal "Homebrew", @tap.user
<del> assert_equal "foo", @tap.repo
<del> assert_equal "homebrew/foo", @tap.name
<del> assert_equal @path, @tap.path
<del> assert_predicate @tap, :installed?
<del> assert_predicate @tap, :official?
<del> refute_predicate @tap, :core_tap?
<del> end
<del>
<del> def test_issues_url
<del> t = Tap.new("someone", "foo")
<del> path = Tap::TAP_DIRECTORY/"someone/homebrew-foo"
<del> path.mkpath
<del> cd path do
<del> shutup { system "git", "init" }
<del> system "git", "remote", "add", "origin",
<del> "https://github.com/someone/homebrew-foo"
<del> end
<del> assert_equal "https://github.com/someone/homebrew-foo/issues", t.issues_url
<del> assert_equal "https://github.com/Homebrew/homebrew-foo/issues", @tap.issues_url
<del>
<del> (Tap::TAP_DIRECTORY/"someone/homebrew-no-git").mkpath
<del> assert_nil Tap.new("someone", "no-git").issues_url
<del> ensure
<del> path.parent.rmtree
<del> end
<del>
<del> def test_files
<del> setup_tap_files
<del>
<del> assert_equal [@formula_file], @tap.formula_files
<del> assert_equal ["homebrew/foo/foo"], @tap.formula_names
<del> assert_equal [@alias_file], @tap.alias_files
<del> assert_equal ["homebrew/foo/bar"], @tap.aliases
<del> assert_equal @tap.alias_table, "homebrew/foo/bar" => "homebrew/foo/foo"
<del> assert_equal @tap.alias_reverse_table, "homebrew/foo/foo" => ["homebrew/foo/bar"]
<del> assert_equal @tap.formula_renames, "oldname" => "foo"
<del> assert_equal @tap.tap_migrations, "removed-formula" => "homebrew/foo"
<del> assert_equal [@cmd_file], @tap.command_files
<del> assert_kind_of Hash, @tap.to_hash
<del> assert_equal true, @tap.formula_file?(@formula_file)
<del> assert_equal true, @tap.formula_file?("Formula/foo.rb")
<del> assert_equal false, @tap.formula_file?("bar.rb")
<del> assert_equal false, @tap.formula_file?("Formula/baz.sh")
<del> end
<del>
<del> def test_remote
<del> setup_git_repo
<del>
<del> assert_equal "https://github.com/Homebrew/homebrew-foo", @tap.remote
<del> assert_raises(TapUnavailableError) { Tap.new("Homebrew", "bar").remote }
<del> refute_predicate @tap, :custom_remote?
<del>
<del> services_tap = Tap.new("Homebrew", "services")
<del> services_tap.path.mkpath
<del> services_tap.path.cd do
<del> shutup do
<del> system "git", "init"
<del> system "git", "remote", "add", "origin", "https://github.com/Homebrew/homebrew-services"
<del> end
<del> end
<del> refute_predicate services_tap, :private?
<del> end
<del>
<del> def test_remote_not_git_repo
<del> assert_nil @tap.remote
<del> end
<del>
<del> def test_remote_git_not_available
<del> setup_git_repo
<del> Utils.stubs(:git_available?).returns(false)
<del> assert_nil @tap.remote
<del> end
<del>
<del> def test_git_variant
<del> touch @path/"README"
<del> setup_git_repo
<del>
<del> assert_equal "0453e16c8e3fac73104da50927a86221ca0740c2", @tap.git_head
<del> assert_equal "0453", @tap.git_short_head
<del> assert_match(/\A\d+ .+ ago\Z/, @tap.git_last_commit)
<del> assert_equal "2017-01-22", @tap.git_last_commit_date
<del> end
<del>
<del> def test_private_remote
<del> skip "HOMEBREW_GITHUB_API_TOKEN is required" unless GitHub.api_credentials
<del> assert_predicate @tap, :private?
<del> end
<del>
<del> def test_install_tap_already_tapped_error
<del> setup_git_repo
<del> already_tapped_tap = Tap.new("Homebrew", "foo")
<del> assert_equal true, already_tapped_tap.installed?
<del> assert_raises(TapAlreadyTappedError) { already_tapped_tap.install }
<del> end
<del>
<del> def test_install_tap_remote_match_already_tapped_error
<del> setup_git_repo
<del> already_tapped_tap = Tap.new("Homebrew", "foo")
<del> assert_equal true, already_tapped_tap.installed?
<del> right_remote = @tap.remote
<del> assert_raises(TapAlreadyTappedError) { already_tapped_tap.install clone_target: right_remote }
<del> end
<del>
<del> def test_install_tap_remote_mismatch_error
<del> setup_git_repo
<del> already_tapped_tap = Tap.new("Homebrew", "foo")
<del> touch @tap.path/".git/shallow"
<del> assert_equal true, already_tapped_tap.installed?
<del> wrong_remote = "#{@tap.remote}-oops"
<del> assert_raises(TapRemoteMismatchError) { already_tapped_tap.install clone_target: wrong_remote, full_clone: true }
<del> end
<del>
<del> def test_install_tap_already_unshallow_error
<del> setup_git_repo
<del> already_tapped_tap = Tap.new("Homebrew", "foo")
<del> assert_raises(TapAlreadyUnshallowError) { already_tapped_tap.install full_clone: true }
<del> end
<del>
<del> def test_uninstall_tap_unavailable_error
<del> tap = Tap.new("Homebrew", "bar")
<del> assert_raises(TapUnavailableError) { tap.uninstall }
<del> end
<del>
<del> def test_install_git_error
<del> tap = Tap.new("user", "repo")
<del> assert_raises(ErrorDuringExecution) do
<del> shutup { tap.install clone_target: "file:///not/existed/remote/url" }
<del> end
<del> refute_predicate tap, :installed?
<del> refute_predicate Tap::TAP_DIRECTORY/"user", :exist?
<del> end
<del>
<del> def test_install_and_uninstall
<del> setup_tap_files
<del> setup_git_repo
<del>
<del> tap = Tap.new("Homebrew", "bar")
<del> shutup { tap.install clone_target: @tap.path/".git" }
<del> assert_predicate tap, :installed?
<del> assert_predicate HOMEBREW_PREFIX/"share/man/man1/brew-tap-cmd.1", :file?
<del> assert_predicate HOMEBREW_PREFIX/"etc/bash_completion.d/brew-tap-cmd", :file?
<del> assert_predicate HOMEBREW_PREFIX/"share/zsh/site-functions/_brew-tap-cmd", :file?
<del> assert_predicate HOMEBREW_PREFIX/"share/fish/vendor_completions.d/brew-tap-cmd.fish", :file?
<del> shutup { tap.uninstall }
<del> refute_predicate tap, :installed?
<del> refute_predicate HOMEBREW_PREFIX/"share/man/man1/brew-tap-cmd.1", :exist?
<del> refute_predicate HOMEBREW_PREFIX/"share/man/man1", :exist?
<del> refute_predicate HOMEBREW_PREFIX/"etc/bash_completion.d/brew-tap-cmd", :exist?
<del> refute_predicate HOMEBREW_PREFIX/"share/zsh/site-functions/_brew-tap-cmd", :exist?
<del> refute_predicate HOMEBREW_PREFIX/"share/fish/vendor_completions.d/brew-tap-cmd.fish", :exist?
<del> ensure
<del> (HOMEBREW_PREFIX/"etc").rmtree if (HOMEBREW_PREFIX/"etc").exist?
<del> (HOMEBREW_PREFIX/"share").rmtree if (HOMEBREW_PREFIX/"share").exist?
<del> end
<del>
<del> def test_link_completions_and_manpages
<del> setup_tap_files
<del> setup_git_repo
<del> tap = Tap.new("Homebrew", "baz")
<del> shutup { tap.install clone_target: @tap.path/".git" }
<del> (HOMEBREW_PREFIX/"share/man/man1/brew-tap-cmd.1").delete
<del> (HOMEBREW_PREFIX/"etc/bash_completion.d/brew-tap-cmd").delete
<del> (HOMEBREW_PREFIX/"share/zsh/site-functions/_brew-tap-cmd").delete
<del> (HOMEBREW_PREFIX/"share/fish/vendor_completions.d/brew-tap-cmd.fish").delete
<del> shutup { tap.link_completions_and_manpages }
<del> assert_predicate HOMEBREW_PREFIX/"share/man/man1/brew-tap-cmd.1", :file?
<del> assert_predicate HOMEBREW_PREFIX/"etc/bash_completion.d/brew-tap-cmd", :file?
<del> assert_predicate HOMEBREW_PREFIX/"share/zsh/site-functions/_brew-tap-cmd", :file?
<del> assert_predicate HOMEBREW_PREFIX/"share/fish/vendor_completions.d/brew-tap-cmd.fish", :file?
<del> shutup { tap.uninstall }
<del> ensure
<del> (HOMEBREW_PREFIX/"etc").rmtree if (HOMEBREW_PREFIX/"etc").exist?
<del> (HOMEBREW_PREFIX/"share").rmtree if (HOMEBREW_PREFIX/"share").exist?
<del> end
<del>
<del> def test_pin_and_unpin
<del> refute_predicate @tap, :pinned?
<del> assert_raises(TapPinStatusError) { @tap.unpin }
<del> @tap.pin
<del> assert_predicate @tap, :pinned?
<del> assert_raises(TapPinStatusError) { @tap.pin }
<del> @tap.unpin
<del> refute_predicate @tap, :pinned?
<del> end
<del>
<del> def test_config
<del> setup_git_repo
<del>
<del> assert_nil @tap.config["foo"]
<del> @tap.config["foo"] = "bar"
<del> assert_equal "bar", @tap.config["foo"]
<del> @tap.config["foo"] = nil
<del> assert_nil @tap.config["foo"]
<del> end
<del>end
<del>
<del>class CoreTapTest < Homebrew::TestCase
<del> include FileUtils
<del>
<del> def setup
<del> super
<del> @repo = CoreTap.new
<del> end
<del>
<del> def test_attributes
<del> assert_equal "Homebrew", @repo.user
<del> assert_equal "core", @repo.repo
<del> assert_equal "homebrew/core", @repo.name
<del> assert_equal [], @repo.command_files
<del> assert_predicate @repo, :installed?
<del> refute_predicate @repo, :pinned?
<del> assert_predicate @repo, :official?
<del> assert_predicate @repo, :core_tap?
<del> end
<del>
<del> def test_forbidden_operations
<del> assert_raises(RuntimeError) { @repo.uninstall }
<del> assert_raises(RuntimeError) { @repo.pin }
<del> assert_raises(RuntimeError) { @repo.unpin }
<del> end
<del>
<del> def test_files
<del> @formula_file = @repo.formula_dir/"foo.rb"
<del> @formula_file.write <<-EOS.undent
<del> class Foo < Formula
<del> url "https://example.com/foo-1.0.tar.gz"
<del> end
<del> EOS
<del> @alias_file = @repo.alias_dir/"bar"
<del> @alias_file.parent.mkpath
<del> ln_s @formula_file, @alias_file
<del>
<del> assert_equal [@formula_file], @repo.formula_files
<del> assert_equal ["foo"], @repo.formula_names
<del> assert_equal [@alias_file], @repo.alias_files
<del> assert_equal ["bar"], @repo.aliases
<del> assert_equal @repo.alias_table, "bar" => "foo"
<del> assert_equal @repo.alias_reverse_table, "foo" => ["bar"]
<del> end
<del>end | 2 |
Javascript | Javascript | fix romanian plural names | e5bb720882a81de84ecba88f45eea961ff6d2f72 | <ide><path>lang/ro.js
<ide> factory(window.moment); // Browser global
<ide> }
<ide> }(function (moment) {
<add> function relativeTimeWithPlural(number, withoutSuffix, key) {
<add> var format = {
<add> 'mm': 'minute',
<add> 'hh': 'ore',
<add> 'dd': 'zile',
<add> 'MM': 'luni',
<add> 'yy': 'ani'
<add> },
<add> separator = ' ';
<add> if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
<add> separator = ' de ';
<add> }
<add>
<add> return number + separator + format[key];
<add> }
<add>
<ide> return moment.lang('ro', {
<ide> months : "ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),
<ide> monthsShort : "ian_feb_mar_apr_mai_iun_iul_aug_sep_oct_noi_dec".split("_"),
<ide> past : "%s în urmă",
<ide> s : "câteva secunde",
<ide> m : "un minut",
<del> mm : "%d minute",
<add> mm : relativeTimeWithPlural,
<ide> h : "o oră",
<del> hh : "%d ore",
<add> hh : relativeTimeWithPlural,
<ide> d : "o zi",
<del> dd : "%d zile",
<add> dd : relativeTimeWithPlural,
<ide> M : "o lună",
<del> MM : "%d luni",
<add> MM : relativeTimeWithPlural,
<ide> y : "un an",
<del> yy : "%d ani"
<add> yy : relativeTimeWithPlural
<ide> },
<ide> week : {
<ide> dow : 1, // Monday is the first day of the week.
<ide><path>test/lang/ro.js
<ide> exports["lang:ro"] = {
<ide> },
<ide>
<ide> "from" : function (test) {
<del> test.expect(30);
<add> test.expect(38);
<ide>
<ide> var start = moment([2007, 1, 28]);
<ide> test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "câteva secunde", "44 secunde = câteva secunde");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "un minut", "45 secunde = un minut");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "un minut", "89 secunde = un minut");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minute", "90 secunde = 2 minute");
<del> test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minute", "44 minute = 44 minute");
<add> test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 de minute", "44 minute = 44 minute");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "o oră", "45 minute = o oră");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "o oră", "89 minute = o oră");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 ore", "90 minute = 2 ore");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 ore", "5 ore = 5 ore");
<del> test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 ore", "21 ore = 21 ore");
<add> test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 de ore", "21 ore = 21 ore");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "o zi", "22 ore = o zi");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "o zi", "35 ore = o zi");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 zile", "36 ore = 2 zile");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "o zi", "1 zi = o zi");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 zile", "5 zile = 5 zile");
<del> test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 zile", "25 zile = 25 zile");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 de zile", "25 zile = 25 zile");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "o lună", "26 zile = o lună");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "o lună", "30 zile = o lună");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "o lună", "45 zile = o lună");
<ide> exports["lang:ro"] = {
<ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 ani", "548 zile = 2 ani");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "un an", "1 an = un an");
<ide> test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 ani", "5 ani = 5 ani");
<add> test.equal(start.from(moment([2007, 1, 28]).add({y: 19}), true), "19 ani", "19 ani = 19 ani");
<add> test.equal(start.from(moment([2007, 1, 28]).add({y: 20}), true), "20 de ani", "20 ani = 20 ani");
<add> test.equal(start.from(moment([2007, 1, 28]).add({y: 100}), true), "100 de ani", "100 ani = 100 ani");
<add> test.equal(start.from(moment([2007, 1, 28]).add({y: 101}), true), "101 ani", "101 ani = 101 ani");
<add> test.equal(start.from(moment([2007, 1, 28]).add({y: 119}), true), "119 ani", "119 ani = 119 ani");
<add> test.equal(start.from(moment([2007, 1, 28]).add({y: 120}), true), "120 de ani", "120 ani = 120 ani");
<add> test.equal(start.from(moment([2007, 1, 28]).add({y: 219}), true), "219 ani", "219 ani = 219 ani");
<add> test.equal(start.from(moment([2007, 1, 28]).add({y: 220}), true), "220 de ani", "220 ani = 220 ani");
<ide> test.done();
<ide> },
<ide> | 2 |
Javascript | Javascript | fix doc for react native mountcomponent | 85dcbf83c5c0c9165dfe7fc440faf9e019ba8642 | <ide><path>src/renderers/dom/shared/ReactDOMComponent.js
<ide> ReactDOMComponent.Mixin = {
<ide> *
<ide> * @internal
<ide> * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
<del> * @param {?ReactDOMComponent} the containing DOM component instance
<add> * @param {?ReactDOMComponent} the parent component instance
<ide> * @param {?object} info about the host container
<ide> * @param {object} context
<ide> * @return {string} The computed markup.
<ide><path>src/renderers/native/ReactNativeBaseComponent.js
<ide> ReactNativeBaseComponent.Mixin = {
<ide> },
<ide>
<ide> /**
<del> * @param {string} rootID Root ID of this subtree.
<del> * @param {Transaction} transaction For creating/updating.
<add> * @param {ReactNativeReconcileTransaction} transaction
<add> * @param {?ReactNativeBaseComponent} the parent component instance
<add> * @param {?object} info about the host container
<add> * @param {object} context
<ide> * @return {string} Unique iOS view tag.
<ide> */
<ide> mountComponent: function(transaction, hostParent, hostContainerInfo, context) { | 2 |
PHP | PHP | return cookie factory instance if name is null | 7074b9bdf341ab3136caa7afab019111edd9323a | <ide><path>src/Illuminate/Foundation/helpers.php
<ide> function config($key, $default = null)
<ide> * @param bool $httpOnly
<ide> * @return \Symfony\Component\HttpFoundation\Cookie
<ide> */
<del> function cookie($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true)
<add> function cookie($name = null, $value = null, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true)
<ide> {
<del> return app('Illuminate\Contracts\Cookie\Factory')->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly);
<add> $cookie = app('Illuminate\Contracts\Cookie\Factory');
<add>
<add> if (is_null($name))
<add> {
<add> return $cookie;
<add> }
<add> else
<add> {
<add> return $cookie->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly);
<add> }
<ide> }
<ide> }
<ide> | 1 |
PHP | PHP | update code to create and save entity | 162d8b392d65b9e28443e3e5e2af0970e29aa922 | <ide><path>src/ORM/Table.php
<ide> public function get($primaryKey, $options = []) {
<ide> *
<ide> * Using the attributes defined in $search a find() will be done to locate
<ide> * an existing record. If that record exists it will be returned. If it does
<del> * not exist, a new entity will be created. In both cases, the $additional properties
<del> * will be patched into the entity.
<add> * not exist, a new entity will be created with the $search properties, and
<add> * the $defaults. When a new entity is created, it will be saved.
<ide> *
<ide> * @param array $search The criteria to find existing records by.
<del> * @param array $additional The array of additional attributes to patch into
<del> * the new or existing entity.
<add> * @param array $defaults The array of defaults to patch into
<add> * the new entity if it is created.
<ide> * @return \Cake\Datasource\EntityInterface An entity.
<ide> */
<del> public function findOrNew($search, $additional = []) {
<add> public function findOrCreate($search, $defaults = []) {
<ide> $query = $this->find()->where($search);
<ide> $row = $query->first();
<ide> if ($row) {
<del> return $this->patchEntity($row, $additional);
<add> return $row;
<ide> }
<del> return $this->newEntity($search + $additional);
<add> $entity = $this->newEntity($search + $defaults);
<add> return $this->save($entity);
<ide> }
<ide>
<ide> /**
<ide><path>tests/TestCase/ORM/TableTest.php
<ide> public function testDebugInfo() {
<ide> */
<ide> public function testFindOrNew() {
<ide> $articles = TableRegistry::get('Articles');
<del> $article = $articles->findOrNew(['title' => 'Not there'], ['body' => 'New body']);
<add> $article = $articles->findOrCreate(['title' => 'Not there'], ['body' => 'New body']);
<ide>
<del> $this->assertTrue($article->isNew());
<del> $this->assertNull($article->id);
<add> $this->assertFalse($article->isNew());
<add> $this->assertNotNull($article->id);
<ide> $this->assertEquals('Not there', $article->title);
<ide> $this->assertEquals('New body', $article->body);
<ide>
<del> $article = $articles->findOrNew(['title' => 'First Article'], ['body' => 'New body']);
<add> $article = $articles->findOrCreate(['title' => 'First Article'], ['body' => 'New body']);
<ide>
<ide> $this->assertFalse($article->isNew());
<ide> $this->assertNotNull($article->id);
<ide> $this->assertEquals('First Article', $article->title);
<del> $this->assertEquals('New body', $article->body);
<add> $this->assertNotEquals('New body', $article->body);
<ide>
<del> $article = $articles->findOrNew(
<add> $article = $articles->findOrCreate(
<ide> ['author_id' => 2, 'title' => 'First Article'],
<ide> ['published' => 'N', 'body' => 'New body']
<ide> );
<del> $this->assertTrue($article->isNew());
<del> $this->assertNull($article->id);
<add> $this->assertFalse($article->isNew());
<add> $this->assertNotNull($article->id);
<ide> $this->assertEquals('First Article', $article->title);
<ide> $this->assertEquals('New body', $article->body);
<ide> $this->assertEquals('N', $article->published); | 2 |
PHP | PHP | fix cs error | 5b359de172fd412a18e7994fdc43944bb3ef54bc | <ide><path>src/View/Helper/PaginatorHelper.php
<ide> public function sort(string $key, $title = null, array $options = []): string
<ide> * in non-standard contexts (i.e. JavaScript)
<ide> * @link https://book.cakephp.org/3.0/en/views/helpers/paginator.html#generating-pagination-urls
<ide> */
<del> public function generateUrl(array $options = [], ?string $model = null, array $url = [], array $urlOptions = []): string
<del> {
<add> public function generateUrl(
<add> array $options = [],
<add> ?string $model = null,
<add> array $url = [],
<add> array $urlOptions = []
<add> ): string {
<ide> $urlOptions += [
<ide> 'escape' => true,
<ide> 'fullBase' => false, | 1 |
Javascript | Javascript | add support for evaluating +xx | a3a4c1b9b1eb2f4de1a962495e060bd71c5d1724 | <ide><path>lib/JavascriptParser.js
<ide> class JavascriptParser {
<ide> res.setNumber(~argument.number);
<ide> res.setRange(expr.range);
<ide> return res;
<add> } else if (expr.operator === "+") {
<add> const argument = this.evaluateExpression(expr.argument);
<add> if (!argument) return;
<add> if (argument.isNumber()) {
<add> const res = new BasicEvaluatedExpression();
<add> res.setNumber(+argument.number);
<add> res.setRange(expr.range);
<add> return res;
<add> } else if (argument.isString()) {
<add> const res = new BasicEvaluatedExpression();
<add> res.setNumber(+argument.string);
<add> res.setRange(expr.range);
<add> return res;
<add> }
<ide> }
<ide> });
<ide> this.hooks.evaluateTypeof.for("undefined").tap("JavascriptParser", expr => { | 1 |
Javascript | Javascript | update polyfill for helio 0.98 | 46620b4f03b395558328deea349e31971b10ea75 | <ide><path>examples/js/vr/HelioWebXRPolyfill.js
<ide> * @author mvilledieu / http://github.com/mvilledieu
<ide> */
<ide>
<del>if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator && 'isSessionSupported' in navigator.xr === false) {
<add>if ( /(Helio)/g.test( navigator.userAgent ) && "xr" in navigator) {
<add> console.log( "Helio WebXR Polyfill (Lumin 0.98.0)" );
<ide>
<del> console.log( "Helio WebXR Polyfill (Lumin 0.97.0)" );
<add> if ('isSessionSupported' in navigator.xr) {
<ide>
<del> const isHelio96 = navigator.userAgent.includes( "Chrome/73" );
<add> const tempIsSessionSupported = navigator.xr.isSessionSupported.bind( navigator.xr );
<ide>
<del> // WebXRManager - XR.supportSession() Polyfill - WebVR.js line 147
<del>
<del> if (
<del> "supportsSession" in navigator.xr === false &&
<del> "supportsSessionMode" in navigator.xr
<del> ) {
<del>
<del> navigator.xr.supportsSession = function ( /*sessionType*/ ) {
<add> navigator.xr.isSessionSupported = function ( /*sessionType*/ ) {
<ide>
<ide> // Force using immersive-ar
<del> return navigator.xr.supportsSessionMode( 'immersive-ar' );
<add> return tempIsSessionSupported( 'immersive-ar' );
<ide>
<ide> };
<ide>
<ide> }
<ide>
<del> if ( "requestSession" in navigator.xr ) {
<add> if ('isSessionSupported' in navigator.xr && "requestSession" in navigator.xr) {
<ide>
<ide> const tempRequestSession = navigator.xr.requestSession.bind( navigator.xr );
<ide>
<ide> navigator.xr.requestSession = function ( /*sessionType*/ ) {
<ide>
<ide> return new Promise( function ( resolve, reject ) {
<ide>
<del> const sessionType = ( isHelio96 ? {
<del> mode: 'immersive-ar' // Force using immersive-ar
<del> } : 'immersive-ar' );
<del>
<del> tempRequestSession( sessionType )
<del> .then( function ( session ) {
<del>
<del> // WebXRManager - xrFrame.getPose() Polyfill - line 279
<del>
<del> const tempRequestAnimationFrame = session.requestAnimationFrame.bind(
<del> session
<del> );
<del>
<del> session.requestAnimationFrame = function ( callback ) {
<del>
<del> return tempRequestAnimationFrame( function ( time, frame ) {
<del>
<del> // WebXRManager - xrFrame.getViewerPose() Polyfill - line 279
<del> // Transforms view.viewMatrix to view.transform.inverse.matrix
<del>
<del> const tempGetViewerPose = frame.getViewerPose.bind( frame );
<del>
<del> frame.getViewerPose = function ( referenceSpace ) {
<del>
<del> const pose = tempGetViewerPose( referenceSpace );
<del>
<del> pose.views.forEach( function ( view ) {
<del>
<del> view.transform = {
<del> inverse: {
<del> matrix: view.viewMatrix
<del> }
<del> };
<del>
<del> } );
<del>
<del> return pose;
<del>
<del> };
<del>
<del> // WebXRManager - xrFrame.getPose() Polyfill - line 259
<del>
<del> const tempGetPose = ( isHelio96 ? null : frame.getPose.bind( frame ) );
<del>
<del> frame.getPose = function ( targetRaySpace, referenceSpace ) {
<del>
<del> if ( isHelio96 ) {
<del>
<del> const inputPose = frame.getInputPose(
<del> targetRaySpace,
<del> referenceSpace
<del> );
<del>
<del> inputPose.transform = {
<del> matrix: inputPose.targetRay.transformMatrix
<del> };
<del>
<del> return inputPose;
<del>
<del> } else {
<del>
<del> return tempGetPose( targetRaySpace.gripSpace, referenceSpace );
<del>
<del> }
<del>
<del> };
<del>
<del> callback( time, frame );
<add> var sessionInit = { optionalFeatures: [ 'local-floor', 'bounded-floor' ] };
<ide>
<del> } );
<add> tempRequestSession( 'immersive-ar', sessionInit).then(function ( session ) {
<ide>
<del> };
<add> resolve( session );
<ide>
<del> // WebXRManager - xrFrame.getPose( inputSource.targetRaySpace, referenceSpace) Polyfill - line 279
<add> }).catch( function ( error ) {
<ide>
<del> const tempGetInputSources = session.getInputSources.bind( session );
<add> return reject( error );
<ide>
<del> session.getInputSources = function () {
<add> });
<ide>
<del> const res = tempGetInputSources();
<add> });
<ide>
<del> res.forEach( function ( xrInputSource ) {
<del>
<del> Object.defineProperty( xrInputSource, "targetRaySpace", {
<del> get: function () {
<del>
<del> return xrInputSource;
<del>
<del> }
<del> } );
<del>
<del> } );
<del>
<del> return res;
<del>
<del> };
<del>
<del> // WebXRManager - xrSession.getInputSources() Polyfill Line 132 - 136
<del>
<del> session.inputSources = Object.defineProperty(
<del> session,
<del> "inputSources",
<del> {
<del> get: session.getInputSources
<del> }
<del> );
<del>
<del> // WebXRManager - xrSession.updateRenderState() Polyfill Line 129
<del>
<del> if ( isHelio96 ) {
<del>
<del> session.updateRenderState = function ( { baseLayer } ) {
<del>
<del> session.baseLayer = baseLayer;
<del>
<del> // WebXRManager - xrSession.renderState.baseLayer Polyfill Line 219
<del>
<del> session.renderState = {
<del> baseLayer: baseLayer
<del> };
<del>
<del> };
<del>
<del> }
<del>
<del> // WebXRManager - xrSession.requestReferenceSpace() Polyfill Line 130
<del>
<del> const tempRequestReferenceSpace = session.requestReferenceSpace.bind(
<del> session
<del> );
<del>
<del> session.requestReferenceSpace = function () {
<del>
<del> return tempRequestReferenceSpace( {
<del> type: "stationary",
<del> subtype: "floor-level"
<del> } );
<del>
<del> };
<del>
<del> resolve( session );
<del>
<del> } )
<del> .catch( function ( error ) {
<del>
<del> return reject( error );
<del>
<del> } );
<del>
<del> } );
<del>
<del> };
<add> }
<ide>
<ide> }
<ide> | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.