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
|
---|---|---|---|---|---|
Java | Java | fix regression in httpputformcontentfilter | af83d2332a0011d83a4a775d57e2d28b9eb53bee | <ide><path>spring-web/src/main/java/org/springframework/web/filter/HttpPutFormContentFilter.java
<ide> public InputStream getBody() throws IOException {
<ide> }
<ide> };
<ide> MultiValueMap<String, String> formParameters = this.formConverter.read(null, inputMessage);
<del> HttpServletRequest wrapper = new HttpPutFormContentRequestWrapper(request, formParameters);
<del> filterChain.doFilter(wrapper, response);
<del> }
<del> else {
<del> filterChain.doFilter(request, response);
<add> if (!formParameters.isEmpty()) {
<add> HttpServletRequest wrapper = new HttpPutFormContentRequestWrapper(request, formParameters);
<add> filterChain.doFilter(wrapper, response);
<add> return;
<add> }
<ide> }
<add>
<add> filterChain.doFilter(request, response);
<ide> }
<ide>
<ide> private boolean isFormContentType(HttpServletRequest request) {
<ide> public Enumeration<String> getParameterNames() {
<ide> @Override
<ide> @Nullable
<ide> public String[] getParameterValues(String name) {
<del> String[] queryParam = (super.getQueryString() != null ? super.getParameterValues(name) : null);
<add> String[] parameterValues = super.getParameterValues(name);
<ide> List<String> formParam = this.formParameters.get(name);
<ide> if (formParam == null) {
<del> return queryParam;
<add> return parameterValues;
<ide> }
<del> else if (queryParam == null) {
<add> if (parameterValues == null || getQueryString() == null) {
<ide> return formParam.toArray(new String[formParam.size()]);
<ide> }
<ide> else {
<del> List<String> result = new ArrayList<>(queryParam.length + formParam.size());
<del> result.addAll(Arrays.asList(queryParam));
<add> List<String> result = new ArrayList<>(parameterValues.length + formParam.size());
<add> result.addAll(Arrays.asList(parameterValues));
<ide> result.addAll(formParam);
<ide> return result.toArray(new String[result.size()]);
<ide> }
<ide><path>spring-web/src/test/java/org/springframework/web/filter/HttpPutFormContentFilterTests.java
<ide> public void setup() {
<ide>
<ide> @Test
<ide> public void wrapPutAndPatchOnly() throws Exception {
<del> request.setContent("".getBytes("ISO-8859-1"));
<add> request.setContent("foo=bar".getBytes("ISO-8859-1"));
<ide> for (HttpMethod method : HttpMethod.values()) {
<ide> request.setMethod(method.name());
<ide> filterChain = new MockFilterChain();
<ide> public void getParameterMap() throws Exception {
<ide> assertArrayEquals(new String[] {"value4"}, parameters.get("name4"));
<ide> }
<ide>
<add> @Test // SPR-15835
<add> public void hiddenHttpMethodFilterFollowedByHttpPutFormContentFilter() throws Exception {
<add> request.addParameter("_method", "PUT");
<add> request.addParameter("hiddenField", "testHidden");
<add> filter.doFilter(request, response, filterChain);
<add>
<add> assertArrayEquals(new String[]{"testHidden"}, filterChain.getRequest().getParameterValues("hiddenField"));
<add> }
<add>
<ide> } | 2 |
Javascript | Javascript | fix false positive hydration warnings | f468816ef1000b2fe0086feabc0115b86f299cad | <ide><path>packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
<ide> describe('ReactDOMFizzServer', () => {
<ide> );
<ide> });
<ide>
<add> // @gate experimental
<add> it('#23331: does not warn about hydration mismatches if something suspended in an earlier sibling', async () => {
<add> const makeApp = () => {
<add> let resolve;
<add> const imports = new Promise(r => {
<add> resolve = () => r({default: () => <span id="async">async</span>});
<add> });
<add> const Lazy = React.lazy(() => imports);
<add>
<add> const App = () => (
<add> <div>
<add> <Suspense fallback={<span>Loading...</span>}>
<add> <Lazy />
<add> <span id="after">after</span>
<add> </Suspense>
<add> </div>
<add> );
<add>
<add> return [App, resolve];
<add> };
<add>
<add> // Server-side
<add> const [App, resolve] = makeApp();
<add> await act(async () => {
<add> const {pipe} = ReactDOMFizzServer.renderToPipeableStream(<App />);
<add> pipe(writable);
<add> });
<add> expect(getVisibleChildren(container)).toEqual(
<add> <div>
<add> <span>Loading...</span>
<add> </div>,
<add> );
<add> await act(async () => {
<add> resolve();
<add> });
<add> expect(getVisibleChildren(container)).toEqual(
<add> <div>
<add> <span id="async">async</span>
<add> <span id="after">after</span>
<add> </div>,
<add> );
<add>
<add> // Client-side
<add> const [HydrateApp, hydrateResolve] = makeApp();
<add> await act(async () => {
<add> ReactDOM.hydrateRoot(container, <HydrateApp />);
<add> });
<add>
<add> expect(getVisibleChildren(container)).toEqual(
<add> <div>
<add> <span id="async">async</span>
<add> <span id="after">after</span>
<add> </div>,
<add> );
<add>
<add> await act(async () => {
<add> hydrateResolve();
<add> });
<add> expect(getVisibleChildren(container)).toEqual(
<add> <div>
<add> <span id="async">async</span>
<add> <span id="after">after</span>
<add> </div>,
<add> );
<add> });
<add>
<ide> // @gate experimental
<ide> it('should support nonce scripts', async () => {
<ide> CSPnonce = 'R4nd0m';
<ide><path>packages/react-dom/src/client/ReactDOMComponent.js
<ide> export function checkForUnmatchedText(
<ide> serverText: string,
<ide> clientText: string | number,
<ide> isConcurrentMode: boolean,
<add> shouldWarnDev: boolean,
<ide> ) {
<ide> const normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
<ide> const normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
<ide> if (normalizedServerText === normalizedClientText) {
<ide> return;
<ide> }
<ide>
<del> if (__DEV__) {
<del> if (!didWarnInvalidHydration) {
<del> didWarnInvalidHydration = true;
<del> console.error(
<del> 'Text content did not match. Server: "%s" Client: "%s"',
<del> normalizedServerText,
<del> normalizedClientText,
<del> );
<add> if (shouldWarnDev) {
<add> if (__DEV__) {
<add> if (!didWarnInvalidHydration) {
<add> didWarnInvalidHydration = true;
<add> console.error(
<add> 'Text content did not match. Server: "%s" Client: "%s"',
<add> normalizedServerText,
<add> normalizedClientText,
<add> );
<add> }
<ide> }
<ide> }
<ide>
<ide> export function diffHydratedProperties(
<ide> parentNamespace: string,
<ide> rootContainerElement: Element | Document,
<ide> isConcurrentMode: boolean,
<add> shouldWarnDev: boolean,
<ide> ): null | Array<mixed> {
<ide> let isCustomComponentTag;
<ide> let extraAttributeNames: Set<string>;
<ide> export function diffHydratedProperties(
<ide> domElement.textContent,
<ide> nextProp,
<ide> isConcurrentMode,
<add> shouldWarnDev,
<ide> );
<ide> }
<ide> updatePayload = [CHILDREN, nextProp];
<ide> export function diffHydratedProperties(
<ide> domElement.textContent,
<ide> nextProp,
<ide> isConcurrentMode,
<add> shouldWarnDev,
<ide> );
<ide> }
<ide> updatePayload = [CHILDREN, '' + nextProp];
<ide> export function diffHydratedProperties(
<ide> }
<ide> }
<ide> } else if (
<add> shouldWarnDev &&
<ide> __DEV__ &&
<ide> // Convince Flow we've calculated it (it's DEV-only in this method.)
<ide> typeof isCustomComponentTag === 'boolean'
<ide> export function diffHydratedProperties(
<ide> }
<ide>
<ide> if (__DEV__) {
<del> // $FlowFixMe - Should be inferred as not undefined.
<del> if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
<add> if (shouldWarnDev) {
<ide> // $FlowFixMe - Should be inferred as not undefined.
<del> warnForExtraAttributes(extraAttributeNames);
<add> if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
<add> // $FlowFixMe - Should be inferred as not undefined.
<add> warnForExtraAttributes(extraAttributeNames);
<add> }
<ide> }
<ide> }
<ide>
<ide><path>packages/react-dom/src/client/ReactDOMHostConfig.js
<ide> export function hydrateInstance(
<ide> rootContainerInstance: Container,
<ide> hostContext: HostContext,
<ide> internalInstanceHandle: Object,
<add> shouldWarnDev: boolean,
<ide> ): null | Array<mixed> {
<ide> precacheFiberNode(internalInstanceHandle, instance);
<ide> // TODO: Possibly defer this until the commit phase where all the events
<ide> export function hydrateInstance(
<ide> parentNamespace,
<ide> rootContainerInstance,
<ide> isConcurrentMode,
<add> shouldWarnDev,
<ide> );
<ide> }
<ide>
<ide> export function hydrateTextInstance(
<ide> textInstance: TextInstance,
<ide> text: string,
<ide> internalInstanceHandle: Object,
<add> shouldWarnDev: boolean,
<ide> ): boolean {
<ide> precacheFiberNode(internalInstanceHandle, textInstance);
<ide>
<ide> export function didNotMatchHydratedContainerTextInstance(
<ide> text: string,
<ide> isConcurrentMode: boolean,
<ide> ) {
<del> checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode);
<add> const shouldWarnDev = true;
<add> checkForUnmatchedText(
<add> textInstance.nodeValue,
<add> text,
<add> isConcurrentMode,
<add> shouldWarnDev,
<add> );
<ide> }
<ide>
<ide> export function didNotMatchHydratedTextInstance(
<ide> export function didNotMatchHydratedTextInstance(
<ide> isConcurrentMode: boolean,
<ide> ) {
<ide> if (parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
<del> checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode);
<add> const shouldWarnDev = true;
<add> checkForUnmatchedText(
<add> textInstance.nodeValue,
<add> text,
<add> isConcurrentMode,
<add> shouldWarnDev,
<add> );
<ide> }
<ide> }
<ide>
<ide><path>packages/react-reconciler/src/ReactFiberHydrationContext.new.js
<ide> import {queueRecoverableErrors} from './ReactFiberWorkLoop.new';
<ide> let hydrationParentFiber: null | Fiber = null;
<ide> let nextHydratableInstance: null | HydratableInstance = null;
<ide> let isHydrating: boolean = false;
<add>let didSuspend: boolean = false;
<ide>
<ide> // Hydration errors that were thrown inside this boundary
<ide> let hydrationErrors: Array<mixed> | null = null;
<ide> function warnIfHydrating() {
<ide> }
<ide> }
<ide>
<add>export function markDidSuspendWhileHydratingDEV() {
<add> if (__DEV__) {
<add> didSuspend = true;
<add> }
<add>}
<add>
<ide> function enterHydrationState(fiber: Fiber): boolean {
<ide> if (!supportsHydration) {
<ide> return false;
<ide> function enterHydrationState(fiber: Fiber): boolean {
<ide> hydrationParentFiber = fiber;
<ide> isHydrating = true;
<ide> hydrationErrors = null;
<add> didSuspend = false;
<ide> return true;
<ide> }
<ide>
<ide> function reenterHydrationStateFromDehydratedSuspenseInstance(
<ide> hydrationParentFiber = fiber;
<ide> isHydrating = true;
<ide> hydrationErrors = null;
<add> didSuspend = false;
<ide> if (treeContext !== null) {
<ide> restoreSuspendedTreeContext(fiber, treeContext);
<ide> }
<ide> function deleteHydratableInstance(
<ide>
<ide> function warnNonhydratedInstance(returnFiber: Fiber, fiber: Fiber) {
<ide> if (__DEV__) {
<add> if (didSuspend) {
<add> // Inside a boundary that already suspended. We're currently rendering the
<add> // siblings of a suspended node. The mismatch may be due to the missing
<add> // data, so it's probably a false positive.
<add> return;
<add> }
<add>
<ide> switch (returnFiber.tag) {
<ide> case HostRoot: {
<ide> const parentContainer = returnFiber.stateNode.containerInfo;
<ide> function prepareToHydrateHostInstance(
<ide> }
<ide>
<ide> const instance: Instance = fiber.stateNode;
<add> const shouldWarnIfMismatchDev = !didSuspend;
<ide> const updatePayload = hydrateInstance(
<ide> instance,
<ide> fiber.type,
<ide> fiber.memoizedProps,
<ide> rootContainerInstance,
<ide> hostContext,
<ide> fiber,
<add> shouldWarnIfMismatchDev,
<ide> );
<ide> // TODO: Type this specific to this type of component.
<ide> fiber.updateQueue = (updatePayload: any);
<ide> function prepareToHydrateHostTextInstance(fiber: Fiber): boolean {
<ide>
<ide> const textInstance: TextInstance = fiber.stateNode;
<ide> const textContent: string = fiber.memoizedProps;
<del> const shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
<add> const shouldWarnIfMismatchDev = !didSuspend;
<add> const shouldUpdate = hydrateTextInstance(
<add> textInstance,
<add> textContent,
<add> fiber,
<add> shouldWarnIfMismatchDev,
<add> );
<ide> if (shouldUpdate) {
<ide> // We assume that prepareToHydrateHostTextInstance is called in a context where the
<ide> // hydration parent is the parent host component of this host text.
<ide> function resetHydrationState(): void {
<ide> hydrationParentFiber = null;
<ide> nextHydratableInstance = null;
<ide> isHydrating = false;
<add> didSuspend = false;
<ide> }
<ide>
<ide> export function upgradeHydrationErrorsToRecoverable(): void {
<ide><path>packages/react-reconciler/src/ReactFiberHydrationContext.old.js
<ide> import {queueRecoverableErrors} from './ReactFiberWorkLoop.old';
<ide> let hydrationParentFiber: null | Fiber = null;
<ide> let nextHydratableInstance: null | HydratableInstance = null;
<ide> let isHydrating: boolean = false;
<add>let didSuspend: boolean = false;
<ide>
<ide> // Hydration errors that were thrown inside this boundary
<ide> let hydrationErrors: Array<mixed> | null = null;
<ide> function warnIfHydrating() {
<ide> }
<ide> }
<ide>
<add>export function markDidSuspendWhileHydratingDEV() {
<add> if (__DEV__) {
<add> didSuspend = true;
<add> }
<add>}
<add>
<ide> function enterHydrationState(fiber: Fiber): boolean {
<ide> if (!supportsHydration) {
<ide> return false;
<ide> function enterHydrationState(fiber: Fiber): boolean {
<ide> hydrationParentFiber = fiber;
<ide> isHydrating = true;
<ide> hydrationErrors = null;
<add> didSuspend = false;
<ide> return true;
<ide> }
<ide>
<ide> function reenterHydrationStateFromDehydratedSuspenseInstance(
<ide> hydrationParentFiber = fiber;
<ide> isHydrating = true;
<ide> hydrationErrors = null;
<add> didSuspend = false;
<ide> if (treeContext !== null) {
<ide> restoreSuspendedTreeContext(fiber, treeContext);
<ide> }
<ide> function deleteHydratableInstance(
<ide>
<ide> function warnNonhydratedInstance(returnFiber: Fiber, fiber: Fiber) {
<ide> if (__DEV__) {
<add> if (didSuspend) {
<add> // Inside a boundary that already suspended. We're currently rendering the
<add> // siblings of a suspended node. The mismatch may be due to the missing
<add> // data, so it's probably a false positive.
<add> return;
<add> }
<add>
<ide> switch (returnFiber.tag) {
<ide> case HostRoot: {
<ide> const parentContainer = returnFiber.stateNode.containerInfo;
<ide> function prepareToHydrateHostInstance(
<ide> }
<ide>
<ide> const instance: Instance = fiber.stateNode;
<add> const shouldWarnIfMismatchDev = !didSuspend;
<ide> const updatePayload = hydrateInstance(
<ide> instance,
<ide> fiber.type,
<ide> fiber.memoizedProps,
<ide> rootContainerInstance,
<ide> hostContext,
<ide> fiber,
<add> shouldWarnIfMismatchDev,
<ide> );
<ide> // TODO: Type this specific to this type of component.
<ide> fiber.updateQueue = (updatePayload: any);
<ide> function prepareToHydrateHostTextInstance(fiber: Fiber): boolean {
<ide>
<ide> const textInstance: TextInstance = fiber.stateNode;
<ide> const textContent: string = fiber.memoizedProps;
<del> const shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
<add> const shouldWarnIfMismatchDev = !didSuspend;
<add> const shouldUpdate = hydrateTextInstance(
<add> textInstance,
<add> textContent,
<add> fiber,
<add> shouldWarnIfMismatchDev,
<add> );
<ide> if (shouldUpdate) {
<ide> // We assume that prepareToHydrateHostTextInstance is called in a context where the
<ide> // hydration parent is the parent host component of this host text.
<ide> function resetHydrationState(): void {
<ide> hydrationParentFiber = null;
<ide> nextHydratableInstance = null;
<ide> isHydrating = false;
<add> didSuspend = false;
<ide> }
<ide>
<ide> export function upgradeHydrationErrorsToRecoverable(): void {
<ide><path>packages/react-reconciler/src/ReactFiberThrow.new.js
<ide> import {
<ide> } from './ReactFiberLane.new';
<ide> import {
<ide> getIsHydrating,
<add> markDidSuspendWhileHydratingDEV,
<ide> queueHydrationError,
<ide> } from './ReactFiberHydrationContext.new';
<ide>
<ide> function throwException(
<ide> } else {
<ide> // This is a regular error, not a Suspense wakeable.
<ide> if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {
<add> markDidSuspendWhileHydratingDEV();
<add>
<ide> const suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);
<ide> // If the error was thrown during hydration, we may be able to recover by
<ide> // discarding the dehydrated content and switching to a client render.
<ide><path>packages/react-reconciler/src/ReactFiberThrow.old.js
<ide> import {
<ide> } from './ReactFiberLane.old';
<ide> import {
<ide> getIsHydrating,
<add> markDidSuspendWhileHydratingDEV,
<ide> queueHydrationError,
<ide> } from './ReactFiberHydrationContext.old';
<ide>
<ide> function throwException(
<ide> } else {
<ide> // This is a regular error, not a Suspense wakeable.
<ide> if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {
<add> markDidSuspendWhileHydratingDEV();
<add>
<ide> const suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);
<ide> // If the error was thrown during hydration, we may be able to recover by
<ide> // discarding the dehydrated content and switching to a client render. | 7 |
Javascript | Javascript | remove code duplication | 62a1474db5d7a654c707dc4f2ffdf09c50748a39 | <ide><path>lib/ExportsInfo.js
<ide> class ExportsInfo {
<ide> case UsageState.NoInfo:
<ide> return null;
<ide> case UsageState.Unknown:
<del> return true;
<ide> case UsageState.OnlyPropertiesUsed:
<ide> case UsageState.Used:
<ide> return true; | 1 |
Javascript | Javascript | add `caseinsensitivematch` option for url matching | 5e18a15fb01d2e81adda68503754289fa9655082 | <ide><path>src/ng/route.js
<ide> function $RouteProvider(){
<ide> * If the option is set to `false` and url in the browser changes, then
<ide> * `$routeUpdate` event is broadcasted on the root scope.
<ide> *
<add> * - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive
<add> *
<add> * If the option is set to `true`, then the particular route can be matched without being
<add> * case sensitive
<add> *
<ide> * @returns {Object} self
<ide> *
<ide> * @description
<ide> * Adds a new route definition to the `$route` service.
<ide> */
<ide> this.when = function(path, route) {
<del> routes[path] = extend({reloadOnSearch: true}, route);
<add> routes[path] = extend({reloadOnSearch: true, caseInsensitiveMatch: false}, route);
<ide>
<ide> // create redirection for trailing slashes
<ide> if (path) {
<ide> function $RouteProvider(){
<ide> /**
<ide> * @param on {string} current url
<ide> * @param when {string} route when template to match the url against
<add> * @param whenProperties {Object} properties to define when's matching behavior
<ide> * @return {?Object}
<ide> */
<del> function switchRouteMatcher(on, when) {
<add> function switchRouteMatcher(on, when, whenProperties) {
<ide> // TODO(i): this code is convoluted and inefficient, we should construct the route matching
<ide> // regex only once and then reuse it
<ide>
<ide> // Escape regexp special characters.
<ide> when = '^' + when.replace(/[-\/\\^$:*+?.()|[\]{}]/g, "\\$&") + '$';
<add>
<ide> var regex = '',
<ide> params = [],
<ide> dst = {};
<ide> function $RouteProvider(){
<ide> // Append trailing path part.
<ide> regex += when.substr(lastMatchedIndex);
<ide>
<del> var match = on.match(new RegExp(regex));
<add> var match = on.match(new RegExp(regex, whenProperties.caseInsensitiveMatch ? 'i' : ''));
<ide> if (match) {
<ide> forEach(params, function(name, index) {
<ide> dst[name] = match[index + 1];
<ide> function $RouteProvider(){
<ide> // Match a route
<ide> var params, match;
<ide> forEach(routes, function(route, path) {
<del> if (!match && (params = switchRouteMatcher($location.path(), path))) {
<add> if (!match && (params = switchRouteMatcher($location.path(), path, route))) {
<ide> match = inherit(route, {
<ide> params: extend({}, $location.search(), params),
<ide> pathParams: params});
<ide><path>test/ng/routeSpec.js
<ide> describe('$route', function() {
<ide> });
<ide> });
<ide>
<add>
<add> it('should route and fire change event correctly whenever the case insensitive flag is utilized', function() {
<add> var log = '',
<add> lastRoute,
<add> nextRoute;
<add>
<add> module(function($routeProvider) {
<add> $routeProvider.when('/Book1/:book/Chapter/:chapter/*highlight/edit',
<add> {controller: noop, templateUrl: 'Chapter.html', caseInsensitiveMatch: true});
<add> $routeProvider.when('/Book2/:book/*highlight/Chapter/:chapter',
<add> {controller: noop, templateUrl: 'Chapter.html'});
<add> $routeProvider.when('/Blank', {});
<add> });
<add> inject(function($route, $location, $rootScope) {
<add> $rootScope.$on('$routeChangeStart', function(event, next, current) {
<add> log += 'before();';
<add> expect(current).toBe($route.current);
<add> lastRoute = current;
<add> nextRoute = next;
<add> });
<add> $rootScope.$on('$routeChangeSuccess', function(event, current, last) {
<add> log += 'after();';
<add> expect(current).toBe($route.current);
<add> expect(lastRoute).toBe(last);
<add> expect(nextRoute).toBe(current);
<add> });
<add>
<add> $location.path('/Book1/Moby/Chapter/Intro/one/edit').search('p=123');
<add> $rootScope.$digest();
<add> $httpBackend.flush();
<add> expect(log).toEqual('before();after();');
<add> expect($route.current.params).toEqual({book:'Moby', chapter:'Intro', highlight:'one', p:'123'});
<add>
<add> log = '';
<add> $location.path('/BOOK1/Moby/CHAPTER/Intro/one/EDIT').search('p=123');
<add> $rootScope.$digest();
<add> expect(log).toEqual('before();after();');
<add> expect($route.current.params).toEqual({book:'Moby', chapter:'Intro', highlight:'one', p:'123'});
<add>
<add> log = '';
<add> $location.path('/Blank').search('ignore');
<add> $rootScope.$digest();
<add> expect(log).toEqual('before();after();');
<add> expect($route.current.params).toEqual({ignore:true});
<add>
<add> log = '';
<add> $location.path('/BLANK');
<add> $rootScope.$digest();
<add> expect(log).toEqual('before();after();');
<add> expect($route.current).toEqual(null);
<add>
<add> log = '';
<add> $location.path('/Book2/Moby/one/two/Chapter/Intro').search('p=123');
<add> $rootScope.$digest();
<add> expect(log).toEqual('before();after();');
<add> expect($route.current.params).toEqual({book:'Moby', chapter:'Intro', highlight:'one/two', p:'123'});
<add>
<add> log = '';
<add> $location.path('/BOOK2/Moby/one/two/CHAPTER/Intro').search('p=123');
<add> $rootScope.$digest();
<add> expect(log).toEqual('before();after();');
<add> expect($route.current).toEqual(null);
<add> });
<add> });
<add>
<add>
<ide> it('should not change route when location is canceled', function() {
<ide> module(function($routeProvider) {
<ide> $routeProvider.when('/somePath', {template: 'some path'}); | 2 |
Text | Text | add more information about defaultvalue | 95a810ac013db23c6d1be039ad4443358c454a50 | <ide><path>docs/docs/07-forms.md
<ide> An `<input>` that does not supply a `value` (or sets it to `null`) is an *uncont
<ide>
<ide> This will render an input that starts off with an empty value. Any user input will be immediately reflected by the rendered element. If you wanted to listen to updates to the value, you could use the `onChange` event just like you can with controlled components.
<ide>
<add>###Default Value
<add>
<ide> If you want to initialize the component with a non-empty value, you can supply a `defaultValue` prop. For example:
<ide>
<ide> ```javascript
<ide> If you want to initialize the component with a non-empty value, you can supply a
<ide> }
<ide> ```
<ide>
<del>This example will function much like the **Controlled Components** example above.
<add>This example will function much like the **Controlled Components** example above. *Note:* the `defaultValue` prop is only applied when the component mounts for the first time. If you need to programatically set the initial value of an input as a result of an asynchronous function call, for example, you will have to pass in that initial value with the `value` prop instead.
<ide>
<ide> Likewise, `<input>` supports `defaultChecked` and `<select>` supports `defaultValue`.
<ide> | 1 |
PHP | PHP | replace simple cases with a simple regex | 1d97a7ff1cde8d9bdf50caef93555a6e65aa5bb1 | <ide><path>src/Database/SqlDialectTrait.php
<ide> public function quoteIdentifier($identifier) {
<ide> return '*';
<ide> }
<ide>
<add> if ($identifier === '') {
<add> return '';
<add> }
<add>
<add> // string
<add> if (preg_match('/^[\w-]+$/', $identifier)) {
<add> return $this->_startQuote . $identifier . $this->_endQuote;
<add> }
<add>
<ide> if (preg_match('/^[\w-]+(?:\.[^ \*]*)*$/', $identifier)) { // string.string
<ide> $items = explode('.', $identifier);
<ide> return $this->_startQuote . implode($this->_endQuote . '.' . $this->_startQuote, $items) . $this->_endQuote; | 1 |
PHP | PHP | remove unused var | f3b216dfe26a90b23afccc17787bc5458492f3a1 | <ide><path>lib/Cake/Console/Command/UpgradeShell.php
<ide> public function basics() {
<ide> * @return void
<ide> */
<ide> public function request() {
<del> $core = App::core();
<ide> $views = array_diff(App::path('views'), App::core('views'));
<ide> $controllers = array_diff(App::path('controllers'), App::core('controllers'), array(APP));
<ide> $components = array_diff(App::path('components'), App::core('components')); | 1 |
Text | Text | fix wrong link for the notebook file | 3bedfd334763cb5676c2fe92705390ac57d8de5f | <ide><path>notebooks/README.md
<ide> Pull Request and we'll review it so it can be included here.
<ide> | [Getting Started Transformers](02-transformers.ipynb) | How to easily start using transformers | [](https://colab.research.google.com/github/huggingface/transformers/blob/master/notebooks/02-transformers.ipynb) |
<ide> | [How to use Pipelines](03-pipelines.ipynb) | Simple and efficient way to use State-of-the-Art models on downstream tasks through transformers | [](https://colab.research.google.com/github/huggingface/transformers/blob/master/notebooks/03-pipelines.ipynb) |
<ide> | [How to train a language model](https://github.com/huggingface/blog/blob/master/notebooks/01_how_to_train.ipynb)| Highlight all the steps to effectively train Transformer model on custom data | [](https://colab.research.google.com/github/huggingface/blog/blob/master/notebooks/01_how_to_train.ipynb)|
<del>| [How to generate text](https://github.com/huggingface/blog/blob/master/notebooks/01_how_to_train.ipynb)| How to use different decoding methods for language generation with transformers | [](https://colab.research.google.com/github/huggingface/blog/blob/master/notebooks/02_how_to_generate.ipynb)|
<add>| [How to generate text](https://github.com/huggingface/blog/blob/master/notebooks/02_how_to_generate.ipynb)| How to use different decoding methods for language generation with transformers | [](https://colab.research.google.com/github/huggingface/blog/blob/master/notebooks/02_how_to_generate.ipynb)| | 1 |
Ruby | Ruby | update usage notes to verify | 939017487d6fb3ad255f98079deadcef1e4054b0 | <ide><path>actionpack/lib/action_controller/verification.rb
<ide> def self.included(base) #:nodoc:
<ide> # :add_flash => { "alert" => "Failed to create your message" },
<ide> # :redirect_to => :category_url
<ide> #
<add> # Note that these prerequisites are not business rules. They do not examine
<add> # the content of the session or the parameters. That level of validation should
<add> # be encapsulated by your domain model or helper methods in the controller.
<ide> module ClassMethods
<ide> # Verify the given actions so that if certain prerequisites are not met,
<ide> # the user is redirected to a different action. The +options+ parameter | 1 |
Javascript | Javascript | fix nav state persistence | 7ac1cc744cac061acbbb90a25562a19acb1ef400 | <ide><path>Examples/UIExplorer/js/UIExplorerApp.ios.js
<ide> const AsyncStorage = require('AsyncStorage');
<ide> const Linking = require('Linking');
<ide> const React = require('react');
<ide> const ReactNative = require('react-native');
<del>const UIExplorerList = require('./UIExplorerList.ios');
<ide> const UIExplorerExampleContainer = require('./UIExplorerExampleContainer');
<ide> const UIExplorerExampleList = require('./UIExplorerExampleList');
<add>const UIExplorerList = require('./UIExplorerList.ios');
<ide> const UIExplorerNavigationReducer = require('./UIExplorerNavigationReducer');
<ide> const UIExplorerStateTitleMap = require('./UIExplorerStateTitleMap');
<ide> const URIActionMap = require('./URIActionMap');
<ide> class UIExplorerApp extends React.Component {
<ide> }
<ide> const newState = UIExplorerNavigationReducer(this.state, action);
<ide> if (this.state !== newState) {
<del> this.setState(newState);
<del> AsyncStorage.setItem(APP_STATE_KEY, JSON.stringify(this.state));
<add> this.setState(
<add> newState,
<add> () => AsyncStorage.setItem(APP_STATE_KEY, JSON.stringify(this.state))
<add> );
<ide> }
<ide> }
<ide> | 1 |
Ruby | Ruby | clarify test cases | d967523339275ca461ee98d2fbb936ba0b38c316 | <ide><path>activerecord/test/cases/tasks/mysql_rake_test.rb
<ide> def test_create_when_database_exists_outputs_info_to_stderr
<ide> private
<ide>
<ide> def with_stubbed_connection_establish_connection
<del> ActiveRecord::Base.stub(:establish_connection, true) do
<add> ActiveRecord::Base.stub(:establish_connection, nil) do
<ide> ActiveRecord::Base.stub(:connection, @connection) do
<ide> yield
<ide> end
<ide> def teardown
<ide> end
<ide>
<ide> def test_raises_error
<del> ActiveRecord::Base.stub(:connection, @connection) do
<del> ActiveRecord::Base.stub(:establish_connection, -> * { raise @error }) do
<del> assert_raises(Mysql2::Error, "Invalid permissions") do
<del> ActiveRecord::Tasks::DatabaseTasks.create @configuration
<del> end
<add> ActiveRecord::Base.stub(:establish_connection, -> * { raise @error }) do
<add> assert_raises(Mysql2::Error, "Invalid permissions") do
<add> ActiveRecord::Tasks::DatabaseTasks.create @configuration
<ide> end
<ide> end
<ide> end
<ide> def test_when_database_dropped_successfully_outputs_info_to_stdout
<ide> private
<ide>
<ide> def with_stubbed_connection_establish_connection
<del> ActiveRecord::Base.stub(:establish_connection, true) do
<add> ActiveRecord::Base.stub(:establish_connection, nil) do
<ide> ActiveRecord::Base.stub(:connection, @connection) do
<ide> yield
<ide> end
<ide> def test_recreates_database_with_the_given_options
<ide> private
<ide>
<ide> def with_stubbed_connection_establish_connection
<del> ActiveRecord::Base.stub(:establish_connection, true) do
<add> ActiveRecord::Base.stub(:establish_connection, nil) do
<ide> ActiveRecord::Base.stub(:connection, @connection) do
<ide> yield
<ide> end
<ide><path>activerecord/test/cases/tasks/postgresql_rake_test.rb
<ide> def test_drops_database
<ide>
<ide> def test_creates_database
<ide> with_stubbed_connection do
<del> ActiveRecord::Base.stub(:establish_connection, true) do
<add> ActiveRecord::Base.stub(:establish_connection, nil) do
<ide> @connection.expects(:create_database).
<ide> with("my-app-db", @configuration.merge("encoding" => "utf8"))
<ide>
<ide><path>activerecord/test/cases/tasks/sqlite_rake_test.rb
<ide> def teardown
<ide> end
<ide>
<ide> def test_db_checks_database_exists
<del> ActiveRecord::Base.stub(:establish_connection, true) do
<add> ActiveRecord::Base.stub(:establish_connection, nil) do
<ide> assert_called_with(File, :exist?, [@database], returns: false) do
<ide> ActiveRecord::Tasks::DatabaseTasks.create @configuration, "/rails/root"
<ide> end
<ide> end
<ide> end
<ide>
<ide> def test_when_db_created_successfully_outputs_info_to_stdout
<del> ActiveRecord::Base.stub(:establish_connection, true) do
<add> ActiveRecord::Base.stub(:establish_connection, nil) do
<ide> ActiveRecord::Tasks::DatabaseTasks.create @configuration, "/rails/root"
<ide>
<ide> assert_equal "Created database '#{@database}'\n", $stdout.string
<ide> def test_db_create_with_file_does_nothing
<ide> end
<ide>
<ide> def test_db_create_establishes_a_connection
<del> File.stub(:exist?, false) do
<del> assert_called_with(ActiveRecord::Base, :establish_connection, [@configuration]) do
<del> ActiveRecord::Tasks::DatabaseTasks.create @configuration, "/rails/root"
<del> end
<add> assert_called_with(ActiveRecord::Base, :establish_connection, [@configuration]) do
<add> ActiveRecord::Tasks::DatabaseTasks.create @configuration, "/rails/root"
<ide> end
<ide> end
<ide> | 3 |
PHP | PHP | fix possible unwanted loading of boolean operator | 9857193607b53373c078eb591771779d9f3812d8 | <ide><path>src/Illuminate/Database/Query/Builder.php
<ide> public function leftJoin($table, $first, $operator = null, $second = null)
<ide> */
<ide> public function where($column, $operator = null, $value = null, $boolean = 'and')
<ide> {
<add> if ($this->invalidOperatorAndValue($operator, $value))
<add> {
<add> throw new \InvalidArgumentException("Value must be provided.");
<add> }
<add>
<ide> // If the columns is actually a Closure instance, we will assume the developer
<ide> // wants to begin a nested where statement which is wrapped in parenthesis.
<ide> // We'll add that Closure to the query then return back out immediately.
<ide> public function orWhere($column, $operator = null, $value = null)
<ide> return $this->where($column, $operator, $value, 'or');
<ide> }
<ide>
<add> /**
<add> * Determine if the given operator and value combination is legal.
<add> *
<add> * @param string $operator
<add> * @param mxied $value
<add> * @return bool
<add> */
<add> protected function invalidOperatorAndValue($operator, $value)
<add> {
<add> $isOperator = in_array($operator, $this->operators);
<add>
<add> return ($isOperator and $operator != '=' and is_null($value));
<add> }
<add>
<ide> /**
<ide> * Add a raw where clause to the query.
<ide> * | 1 |
Mixed | Javascript | add signal support to spawn | 738cd60418ee1fc6b696d6f10d7604d667f01a23 | <ide><path>doc/api/child_process.md
<ide> changes:
<ide> `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different
<ide> shell can be specified as a string. See [Shell requirements][] and
<ide> [Default Windows shell][]. **Default:** `false` (no shell).
<del> * `signal` {AbortSignal} allows aborting the execFile using an AbortSignal
<add> * `signal` {AbortSignal} allows aborting the execFile using an AbortSignal.
<ide> * `callback` {Function} Called with the output when process terminates.
<ide> * `error` {Error}
<ide> * `stdout` {string|Buffer}
<ide> const { signal } = controller;
<ide> const child = execFile('node', ['--version'], { signal }, (error) => {
<ide> console.log(error); // an AbortError
<ide> });
<del>signal.abort();
<add>controller.abort();
<ide> ```
<ide>
<ide> ### `child_process.fork(modulePath[, args][, options])`
<ide> The `shell` option available in [`child_process.spawn()`][] is not supported by
<ide> <!-- YAML
<ide> added: v0.1.90
<ide> changes:
<add> - version: REPLACEME
<add> pr-url: https://github.com/nodejs/node/pull/36432
<add> description: AbortSignal support was added.
<ide> - version:
<ide> - v13.2.0
<ide> - v12.16.0
<ide> changes:
<ide> when `shell` is specified and is CMD. **Default:** `false`.
<ide> * `windowsHide` {boolean} Hide the subprocess console window that would
<ide> normally be created on Windows systems. **Default:** `false`.
<add> * `signal` {AbortSignal} allows aborting the execFile using an AbortSignal.
<add>
<ide> * Returns: {ChildProcess}
<ide>
<ide> The `child_process.spawn()` method spawns a new process using the given
<ide> Node.js currently overwrites `argv[0]` with `process.execPath` on startup, so
<ide> parameter passed to `spawn` from the parent, retrieve it with the
<ide> `process.argv0` property instead.
<ide>
<add>If the `signal` option is enabled, calling `.abort()` on the corresponding
<add>`AbortController` is similar to calling `.kill()` on the child process except
<add>the error passed to the callback will be an `AbortError`:
<add>
<add>```js
<add>const controller = new AbortController();
<add>const { signal } = controller;
<add>const grep = spawn('grep', ['ssh'], { signal });
<add>grep.on('error', (err) => {
<add> // This will be called with err being an AbortError if the controller aborts
<add>});
<add>controller.abort(); // stops the process
<add>```
<add>
<ide> #### `options.detached`
<ide> <!-- YAML
<ide> added: v0.7.10
<ide><path>lib/child_process.js
<ide> function sanitizeKillSignal(killSignal) {
<ide> }
<ide> }
<ide>
<add>// This level of indirection is here because the other child_process methods
<add>// call spawn internally but should use different cancellation logic.
<add>function spawnWithSignal(file, args, options) {
<add> const child = spawn(file, args, options);
<add>
<add> if (options && options.signal) {
<add> // Validate signal, if present
<add> validateAbortSignal(options.signal, 'options.signal');
<add> function kill() {
<add> if (child._handle) {
<add> child._handle.kill('SIGTERM');
<add> child.emit('error', new AbortError());
<add> }
<add> }
<add> if (options.signal.aborted) {
<add> process.nextTick(kill);
<add> } else {
<add> options.signal.addEventListener('abort', kill);
<add> const remove = () => options.signal.removeEventListener('abort', kill);
<add> child.once('close', remove);
<add> }
<add> }
<add> return child;
<add>}
<ide> module.exports = {
<ide> _forkChild,
<ide> ChildProcess,
<ide> module.exports = {
<ide> execFileSync,
<ide> execSync,
<ide> fork,
<del> spawn,
<add> spawn: spawnWithSignal,
<ide> spawnSync
<ide> };
<ide><path>test/parallel/test-child-process-spawn-controller.js
<add>'use strict';
<add>
<add>const common = require('../common');
<add>const assert = require('assert');
<add>const cp = require('child_process');
<add>
<add>// Verify that passing an AbortSignal works
<add>const controller = new AbortController();
<add>const { signal } = controller;
<add>
<add>const echo = cp.spawn('echo', ['fun'], {
<add> encoding: 'utf8',
<add> shell: true,
<add> signal
<add>});
<add>
<add>echo.on('error', common.mustCall((e) => {
<add> assert.strictEqual(e.name, 'AbortError');
<add>}));
<add>
<add>controller.abort(); | 3 |
Python | Python | fix python3 compatibility | 5964848bdfb6dd6848148e7c86fda5d2d458e52d | <ide><path>keras/layers/core.py
<ide> def __init__(self, layers, mode='sum', concat_axis=-1, dot_axes=-1):
<ide> raise Exception("Invalid type for dot_axes - should be a list.")
<ide> if len(dot_axes) != 2:
<ide> raise Exception("Invalid format for dot_axes - should contain two elements.")
<del> if type(dot_axes[0]) not in [list, tuple] or type(dot_axes[1]) not in [list, tuple]:
<add> if type(dot_axes[0]) not in [list, tuple, range] or type(dot_axes[1]) not in [list, tuple, range]:
<ide> raise Exception("Invalid format for dot_axes - list elements should have type 'list' or 'tuple'.")
<ide> for i in range(len(dot_axes[0])):
<ide> if shape1[dot_axes[0][i]] != shape2[dot_axes[1][i]]:
<ide><path>tests/auto/test_sequential_model.py
<ide> def test_merge_sum(self):
<ide> nloss = model.evaluate([X_train, X_train], y_train, verbose=0)
<ide> print(nloss)
<ide> assert(loss == nloss)
<del>
<add>
<ide> def test_merge_dot1(self):
<ide> print('Test merge: dot')
<ide> left = Sequential()
<ide> def test_merge_dot1(self):
<ide> model.add(Activation('softmax'))
<ide>
<ide> model.compile(loss='categorical_crossentropy', optimizer='rmsprop')
<del>
<add>
<ide> def test_merge_dot2(self):
<ide> print('Test merge: dot')
<ide> left = Sequential()
<ide> def test_merge_dot2(self):
<ide> right.add(Activation('relu'))
<ide>
<ide> model = Sequential()
<del> model.add(Merge([left, right], mode='dot', dot_axes=([1],[1])))
<add> model.add(Merge([left, right], mode='dot', dot_axes=([1], [1])))
<ide>
<ide> model.add(Dense(nb_class))
<ide> model.add(Activation('softmax'))
<ide>
<ide> model.compile(loss='categorical_crossentropy', optimizer='rmsprop')
<add>
<ide> def test_merge_concat(self):
<ide> print('Test merge: concat')
<ide> left = Sequential() | 2 |
PHP | PHP | fix bug with pushmiddleware | 1054fd2523913e59e980553b5411a22f16ecf817 | <ide><path>src/Illuminate/Routing/Router.php
<ide> public function prependMiddlewareToGroup($group, $middleware)
<ide> */
<ide> public function pushMiddlewareToGroup($group, $middleware)
<ide> {
<del> if (isset($this->middlewareGroups[$group]) && ! in_array($middleware, $this->middlewareGroups[$group])) {
<add> if (! array_key_exists($group, $this->middlewareGroups)) {
<add> $this->middlewareGroups[$group] = [];
<add> }
<add>
<add> if ( ! in_array($middleware, $this->middlewareGroups[$group])) {
<ide> $this->middlewareGroups[$group][] = $middleware;
<ide> }
<ide> | 1 |
Python | Python | add show statements to hql filtering | 5248b94d745981371d454fc804ad945c10088da2 | <ide><path>airflow/hooks/hive_hooks.py
<ide> def _get_results(self, hql, schema='default', fetch_size=None, hive_conf=None):
<ide> lowered_statement = statement.lower().strip()
<ide> if (lowered_statement.startswith('select') or
<ide> lowered_statement.startswith('with') or
<add> lowered_statement.startswith('show') or
<ide> (lowered_statement.startswith('set') and
<ide> '=' not in lowered_statement)):
<ide> description = [c for c in cur.description] | 1 |
Ruby | Ruby | add uuid type support to postgresql adapter | 12e9a75f227ea7bcc23e2717e9ff5a72ec64e1f1 | <ide><path>activerecord/lib/active_record/connection_adapters/postgresql/oid.rb
<ide> def self.registered_type?(name)
<ide> alias_type 'bit', 'text'
<ide> alias_type 'varbit', 'text'
<ide> alias_type 'macaddr', 'text'
<add> alias_type 'uuid', 'text'
<ide>
<ide> # FIXME: I don't think this is correct. We should probably be returning a parsed date,
<ide> # but the tests pass with a string returned.
<ide><path>activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
<ide> def string_to_cidr(string)
<ide> else
<ide> string
<ide> end
<del>
<ide> end
<ide>
<ide> def cidr_to_string(object)
<ide> def simplified_type(field_type)
<ide> :integer
<ide> # UUID type
<ide> when 'uuid'
<del> :string
<add> :uuid
<ide> # Small and big integer types
<ide> when /^(?:small|big)int$/
<ide> :integer
<ide> def cidr(name, options = {})
<ide> def macaddr(name, options = {})
<ide> column(name, 'macaddr', options)
<ide> end
<add>
<add> def uuid(name, options = {})
<add> column(name, 'uuid', options)
<add> end
<ide> end
<ide>
<ide> ADAPTER_NAME = 'PostgreSQL'
<ide> def macaddr(name, options = {})
<ide> :hstore => { :name => "hstore" },
<ide> :inet => { :name => "inet" },
<ide> :cidr => { :name => "cidr" },
<del> :macaddr => { :name => "macaddr" }
<add> :macaddr => { :name => "macaddr" },
<add> :uuid => { :name => "uuid" }
<ide> }
<ide>
<ide> # Returns 'PostgreSQL' as adapter name for identification purposes.
<ide><path>activerecord/test/cases/adapters/postgresql/datatype_test.rb
<ide> class PostgresqlOid < ActiveRecord::Base
<ide> class PostgresqlTimestampWithZone < ActiveRecord::Base
<ide> end
<ide>
<add>class PostgresqlUUID < ActiveRecord::Base
<add>end
<add>
<ide> class PostgresqlDataTypeTest < ActiveRecord::TestCase
<ide> self.use_transactional_fixtures = false
<ide>
<ide> def setup
<ide> @first_oid = PostgresqlOid.find(1)
<ide>
<ide> @connection.execute("INSERT INTO postgresql_timestamp_with_zones (time) VALUES ('2010-01-01 10:00:00-1')")
<add>
<add> @connection.execute("INSERT INTO postgresql_uuids (guid, compact_guid) VALUES('d96c3da0-96c1-012f-1316-64ce8f32c6d8', 'f06c715096c1012f131764ce8f32c6d8')")
<add> @first_uuid = PostgresqlUUID.find(1)
<ide> end
<ide>
<ide> def test_data_type_of_array_types
<ide> def test_data_type_of_oid_types
<ide> assert_equal :integer, @first_oid.column_for_attribute(:obj_id).type
<ide> end
<ide>
<add> def test_data_type_of_uuid_types
<add> assert_equal :uuid, @first_uuid.column_for_attribute(:guid).type
<add> end
<add>
<ide> def test_array_values
<ide> assert_equal '{35000,21000,18000,17000}', @first_array.commission_by_quarter
<ide> assert_equal '{foo,bar,baz}', @first_array.nicknames
<ide> def test_network_address_values_ipaddr
<ide> assert_equal '01:23:45:67:89:0a', @first_network_address.mac_address
<ide> end
<ide>
<add> def test_uuid_values
<add> assert_equal 'd96c3da0-96c1-012f-1316-64ce8f32c6d8', @first_uuid.guid
<add> assert_equal 'f06c7150-96c1-012f-1317-64ce8f32c6d8', @first_uuid.compact_guid
<add> end
<add>
<ide> def test_bit_string_values
<ide> assert_equal '00010101', @first_bit_string.bit_string
<ide> assert_equal '00010101', @first_bit_string.bit_string_varying
<ide><path>activerecord/test/cases/column_definition_test.rb
<ide> def test_smallint_column_should_map_to_integer
<ide> smallint_column = PostgreSQLColumn.new('number', nil, oid, "smallint")
<ide> assert_equal :integer, smallint_column.type
<ide> end
<del>
<del> def test_uuid_column_should_map_to_string
<del> oid = PostgreSQLAdapter::OID::Identity.new
<del> uuid_column = PostgreSQLColumn.new('unique_id', nil, oid, "uuid")
<del> assert_equal :string, uuid_column.type
<del> end
<ide> end
<ide> end
<ide> end
<ide><path>activerecord/test/cases/schema_dumper_test.rb
<ide> def test_schema_dump_includes_macaddr_shorthand_definition
<ide> end
<ide> end
<ide>
<add> def test_schema_dump_includes_uuid_shorthand_definition
<add> output = standard_dump
<add> if %r{create_table "poistgresql_uuids"} =~ output
<add> assert_match %r{t.uuid "guid"}, output
<add> end
<add> end
<add>
<ide> def test_schema_dump_includes_hstores_shorthand_definition
<ide> output = standard_dump
<ide> if %r{create_table "postgresql_hstores"} =~ output
<ide><path>activerecord/test/schema/postgresql_specific_schema.rb
<ide> ActiveRecord::Schema.define do
<ide>
<del> %w(postgresql_tsvectors postgresql_hstores postgresql_arrays postgresql_moneys postgresql_numbers postgresql_times postgresql_network_addresses postgresql_bit_strings
<add> %w(postgresql_tsvectors postgresql_hstores postgresql_arrays postgresql_moneys postgresql_numbers postgresql_times postgresql_network_addresses postgresql_bit_strings postgresql_uuids
<ide> postgresql_oids postgresql_xml_data_type defaults geometrics postgresql_timestamp_with_zones postgresql_partitioned_table postgresql_partitioned_table_parent).each do |table_name|
<ide> execute "DROP TABLE IF EXISTS #{quote_table_name table_name}"
<ide> end
<ide> );
<ide> _SQL
<ide>
<add> execute <<_SQL
<add> CREATE TABLE postgresql_uuids (
<add> id SERIAL PRIMARY KEY,
<add> guid uuid,
<add> compact_guid uuid
<add> );
<add>_SQL
<add>
<ide> execute <<_SQL
<ide> CREATE TABLE postgresql_tsvectors (
<ide> id SERIAL PRIMARY KEY, | 6 |
Javascript | Javascript | avoid jsx in reactcsstransitiongroup code | ec54dcbd8ff666801ac2ad2a36f2eb632e23a379 | <ide><path>src/addons/transitions/ReactCSSTransitionGroup.js
<ide> *
<ide> * @typechecks
<ide> * @providesModule ReactCSSTransitionGroup
<del> * @jsx React.DOM
<ide> */
<ide>
<ide> "use strict";
<ide> var ReactCSSTransitionGroup = React.createClass({
<ide> // We need to provide this childFactory so that
<ide> // ReactCSSTransitionGroupChild can receive updates to name, enter, and
<ide> // leave while it is leaving.
<del> return (
<del> <ReactCSSTransitionGroupChild
<del> name={this.props.transitionName}
<del> enter={this.props.transitionEnter}
<del> leave={this.props.transitionLeave}>
<del> {child}
<del> </ReactCSSTransitionGroupChild>
<add> return ReactCSSTransitionGroupChild(
<add> {
<add> name: this.props.transitionName,
<add> enter: this.props.transitionEnter,
<add> leave: this.props.transitionLeave
<add> },
<add> child
<ide> );
<ide> },
<ide>
<ide> render: function() {
<ide> return this.transferPropsTo(
<del> <ReactTransitionGroup childFactory={this._wrapChild}>
<del> {this.props.children}
<del> </ReactTransitionGroup>
<add> ReactTransitionGroup(
<add> {childFactory: this._wrapChild},
<add> this.props.children
<add> )
<ide> );
<ide> }
<ide> }); | 1 |
Javascript | Javascript | remove unnecessary skipifworker() | 91ef9c4c3f7d8acc21ad934dd520071b8bdfcab8 | <ide><path>test/sequential/test-inspector-port-cluster.js
<ide> const common = require('../common');
<ide>
<ide> common.skipIfInspectorDisabled();
<del>common.skipIfWorker();
<ide>
<ide> const assert = require('assert');
<ide> const cluster = require('cluster'); | 1 |
PHP | PHP | remove more php5 mentions | 5e315091165e066f8e1f9123643484fb08ef84b1 | <ide><path>src/Error/ErrorHandler.php
<ide> protected function _clearOutput(): void
<ide> }
<ide>
<ide> /**
<del> * Logs both PHP5 and PHP7 errors.
<del> *
<del> * The PHP5 part will be removed with 4.0.
<add> * Log internal errors.
<ide> *
<ide> * @param \Throwable $exception Exception.
<ide> * @return void | 1 |
Python | Python | add a test on the output dimensions | f08f59075261bd6c9ba10a5be665e1d242ea6874 | <ide><path>tests/auto/keras/layers/test_recurrent.py
<ide> def _runner(layer_class):
<ide>
<ide> for train in [True, False]:
<ide> out = layer.get_output(train).eval()
<add> if ret_seq:
<add> assert(out.shape == (nb_samples, timesteps, output_dim))
<add> else:
<add> assert(out.shape == (nb_samples, output_dim))
<add>
<ide> mask = layer.get_output_mask(train)
<ide>
<ide> | 1 |
Ruby | Ruby | fix filename reference | 44b8ac48e36672a0b63b225ec19eacc8d64e7e09 | <ide><path>lib/active_file/blob.rb
<ide> class ActiveFile::Blob < ActiveRecord::Base
<ide> class << self
<ide> def build_after_upload(io:, filename:, content_type: nil, metadata: nil)
<ide> new.tap do |blob|
<del> blob.filename = name
<ide> blob.content_type = content_type # Marcel::MimeType.for(data, name: name, declared_type: content_type)
<add> blob.filename = filename
<ide> blob.upload io
<ide> end
<ide> end | 1 |
Javascript | Javascript | fix race condition setting suicide prop | 9571be12f6e6ebdd097c8a032a872bada9972d56 | <ide><path>lib/cluster.js
<ide> function masterInit() {
<ide> else if (message.act === 'listening')
<ide> listening(worker, message);
<ide> else if (message.act === 'suicide')
<del> worker.suicide = true;
<add> suicide(worker, message);
<ide> else if (message.act === 'close')
<ide> close(worker, message);
<ide> }
<ide> function masterInit() {
<ide> cluster.emit('online', worker);
<ide> }
<ide>
<add> function suicide(worker, message) {
<add> worker.suicide = true;
<add> send(worker, { ack: message.seq });
<add> }
<add>
<ide> function queryServer(worker, message) {
<ide> // Stop processing if worker already disconnecting
<ide> if (worker.suicide)
<ide> function workerInit() {
<ide> if (message.act === 'newconn')
<ide> onconnection(message, handle);
<ide> else if (message.act === 'disconnect')
<del> worker.disconnect();
<add> _disconnect.call(worker, true);
<ide> }
<ide> };
<ide>
<ide> function workerInit() {
<ide> }
<ide>
<ide> Worker.prototype.disconnect = function() {
<add> _disconnect.call(this);
<add> };
<add>
<add> Worker.prototype.destroy = function() {
<add> this.suicide = true;
<add> if (!this.isConnected()) process.exit(0);
<add> var exit = process.exit.bind(null, 0);
<add> send({ act: 'suicide' }, () => process.disconnect());
<add> process.once('disconnect', exit);
<add> };
<add>
<add> function send(message, cb) {
<add> sendHelper(process, message, null, cb);
<add> }
<add>
<add> function _disconnect(masterInitiated) {
<ide> this.suicide = true;
<ide> let waitingCount = 1;
<ide>
<ide> function checkWaitingCount() {
<ide> waitingCount--;
<ide> if (waitingCount === 0) {
<del> send({ act: 'suicide' });
<del> process.disconnect();
<add> // If disconnect is worker initiated, wait for ack to be sure suicide
<add> // is properly set in the master, otherwise, if it's master initiated
<add> // there's no need to send the suicide message
<add> if (masterInitiated) {
<add> process.disconnect();
<add> } else {
<add> send({ act: 'suicide' }, () => process.disconnect());
<add> }
<ide> }
<ide> }
<ide>
<ide> function workerInit() {
<ide> }
<ide>
<ide> checkWaitingCount();
<del> };
<del>
<del> Worker.prototype.destroy = function() {
<del> this.suicide = true;
<del> if (!this.isConnected()) process.exit(0);
<del> var exit = process.exit.bind(null, 0);
<del> send({ act: 'suicide' }, exit);
<del> process.once('disconnect', exit);
<del> process.disconnect();
<del> };
<del>
<del> function send(message, cb) {
<del> sendHelper(process, message, null, cb);
<ide> }
<ide> }
<ide>
<ide><path>test/parallel/test-regress-GH-3238.js
<ide> const assert = require('assert');
<ide> const cluster = require('cluster');
<ide>
<ide> if (cluster.isMaster) {
<del> const worker = cluster.fork();
<del> let disconnected = false;
<add> function forkWorker(action) {
<add> const worker = cluster.fork({ action });
<add> worker.on('disconnect', common.mustCall(() => {
<add> assert.strictEqual(worker.suicide, true);
<add> }));
<ide>
<del> worker.on('disconnect', common.mustCall(function() {
<del> assert.strictEqual(worker.suicide, true);
<del> disconnected = true;
<del> }));
<add> worker.on('exit', common.mustCall(() => {
<add> assert.strictEqual(worker.suicide, true);
<add> }));
<add> }
<ide>
<del> worker.on('exit', common.mustCall(function() {
<del> assert.strictEqual(worker.suicide, true);
<del> assert.strictEqual(disconnected, true);
<del> }));
<add> forkWorker('disconnect');
<add> forkWorker('kill');
<ide> } else {
<del> cluster.worker.disconnect();
<add> cluster.worker[process.env.action]();
<ide> }
<ide><path>test/sequential/test-cluster-disconnect-suicide-race.js
<add>'use strict';
<add>const common = require('../common');
<add>const assert = require('assert');
<add>const cluster = require('cluster');
<add>const os = require('os');
<add>
<add>if (cluster.isMaster) {
<add> function forkWorker(action) {
<add> const worker = cluster.fork({ action });
<add> worker.on('disconnect', common.mustCall(() => {
<add> assert.strictEqual(worker.suicide, true);
<add> }));
<add>
<add> worker.on('exit', common.mustCall(() => {
<add> assert.strictEqual(worker.suicide, true);
<add> }));
<add> }
<add>
<add> const cpus = os.cpus().length;
<add> const tries = cpus > 8 ? 64 : cpus * 8;
<add>
<add> cluster.on('exit', common.mustCall((worker, code) => {
<add> assert.strictEqual(code, 0, 'worker exited with error');
<add> }, tries * 2));
<add>
<add> for (let i = 0; i < tries; ++i) {
<add> forkWorker('disconnect');
<add> forkWorker('kill');
<add> }
<add>} else {
<add> cluster.worker[process.env.action]();
<add>} | 3 |
PHP | PHP | remove old matcher methods | 2f01b93c9e918dc83532aa19a8960a3c810c0357 | <ide><path>src/Illuminate/View/Compilers/BladeCompiler.php
<ide> public function extend(callable $compiler)
<ide> $this->extensions[] = $compiler;
<ide> }
<ide>
<del> /**
<del> * Get the regular expression for a generic Blade function.
<del> *
<del> * @param string $function
<del> * @return string
<del> */
<del> public function createMatcher($function)
<del> {
<del> return '/(?<!\w)(\s*)@'.$function.'(\s*\(.*\))/';
<del> }
<del>
<del> /**
<del> * Get the regular expression for a generic Blade function.
<del> *
<del> * @param string $function
<del> * @return string
<del> */
<del> public function createOpenMatcher($function)
<del> {
<del> return '/(?<!\w)(\s*)@'.$function.'(\s*\(.*)\)/';
<del> }
<del>
<del> /**
<del> * Create a plain Blade matcher.
<del> *
<del> * @param string $function
<del> * @return string
<del> */
<del> public function createPlainMatcher($function)
<del> {
<del> return '/(?<!\w)(\s*)@'.$function.'(\s*)/';
<del> }
<del>
<ide> /**
<ide> * Sets the raw tags used for the compiler.
<ide> *
<ide><path>tests/View/ViewBladeCompilerTest.php
<ide> public function testCustomExtensionsAreCompiled()
<ide> }
<ide>
<ide>
<del> public function testCreateMatcher()
<del> {
<del> $compiler = new BladeCompiler($this->getFiles(), __DIR__);
<del> $compiler->extend(
<del> function($view, BladeCompiler $compiler)
<del> {
<del> $pattern = $compiler->createMatcher('customControl');
<del> $replace = '<?php echo custom_control$2; ?>';
<del> return preg_replace($pattern, '$1'.$replace, $view);
<del> }
<del> );
<del>
<del> $string = '@if($foo)
<del>@customControl(10, $foo, \'bar\')
<del>@endif';
<del> $expected = '<?php if($foo): ?>
<del><?php echo custom_control(10, $foo, \'bar\'); ?>
<del><?php endif; ?>';
<del> $this->assertEquals($expected, $compiler->compileString($string));
<del> }
<del>
<del>
<del> public function testCreatePlainMatcher()
<del> {
<del> $compiler = new BladeCompiler($this->getFiles(), __DIR__);
<del> $compiler->extend(
<del> function($view, BladeCompiler $compiler)
<del> {
<del> $pattern = $compiler->createPlainMatcher('customControl');
<del> $replace = '<?php echo custom_control; ?>';
<del> return preg_replace($pattern, '$1'.$replace.'$2', $view);
<del> }
<del> );
<del>
<del> $string = '@if($foo)
<del>@customControl
<del>@endif';
<del> $expected = '<?php if($foo): ?>
<del><?php echo custom_control; ?>
<del><?php endif; ?>';
<del> $this->assertEquals($expected, $compiler->compileString($string));
<del> }
<del>
<del>
<ide> public function testConfiguringContentTags()
<ide> {
<ide> $compiler = new BladeCompiler($this->getFiles(), __DIR__); | 2 |
Text | Text | update react version to rc in react-18 doc | 0ad4ad6dcd018973a04efa87174acb7d35d2cccc | <ide><path>docs/advanced-features/react-18.md
<ide>
<ide> [React 18](https://reactjs.org/blog/2021/06/08/the-plan-for-react-18.html) adds new features including, Suspense, automatic batching of updates, APIs like `startTransition`, and a new streaming API for server rendering with support for `React.lazy`.
<ide>
<del>React 18 is still in beta. Read more about React 18's [release plan](https://github.com/reactwg/react-18/discussions) and discussions from the [working group](https://github.com/reactwg/react-18/discussions).
<add>React 18 is in RC now. Read more about React 18's [release plan](https://github.com/reactwg/react-18/discussions) and discussions from the [working group](https://github.com/reactwg/react-18/discussions).
<ide>
<ide> ### React 18 Usage in Next.js
<ide>
<del>Ensure you have the `beta` version of React installed:
<add>Ensure you have the `rc` npm tag of React installed:
<ide>
<ide> ```jsx
<del>npm install next@latest react@beta react-dom@beta
<add>npm install next@latest react@rc react-dom@rc
<ide> ```
<ide>
<ide> ### Enable SSR Streaming (Alpha) | 1 |
Go | Go | add support for multiple level cli commands | e1b968f1981f21470a67ed617c36f1c6802bd0a7 | <ide><path>api/client/cli.go
<ide> var funcMap = template.FuncMap{
<ide> },
<ide> }
<ide>
<del>func (cli *DockerCli) getMethod(name string) (func(...string) error, bool) {
<del> if len(name) == 0 {
<del> return nil, false
<add>func (cli *DockerCli) getMethod(args ...string) (func(...string) error, bool) {
<add> camelArgs := make([]string, len(args))
<add> for i, s := range args {
<add> if len(s) == 0 {
<add> return nil, false
<add> }
<add> camelArgs[i] = strings.ToUpper(s[:1]) + strings.ToLower(s[1:])
<ide> }
<del> methodName := "Cmd" + strings.ToUpper(name[:1]) + strings.ToLower(name[1:])
<add> methodName := "Cmd" + strings.Join(camelArgs, "")
<ide> method := reflect.ValueOf(cli).MethodByName(methodName)
<ide> if !method.IsValid() {
<ide> return nil, false
<ide> func (cli *DockerCli) getMethod(name string) (func(...string) error, bool) {
<ide>
<ide> // Cmd executes the specified command
<ide> func (cli *DockerCli) Cmd(args ...string) error {
<add> if len(args) > 1 {
<add> method, exists := cli.getMethod(args[:2]...)
<add> if exists {
<add> return method(args[2:]...)
<add> }
<add> }
<ide> if len(args) > 0 {
<ide> method, exists := cli.getMethod(args[0])
<ide> if !exists {
<ide><path>api/client/commands.go
<ide> const (
<ide> )
<ide>
<ide> func (cli *DockerCli) CmdHelp(args ...string) error {
<add> if len(args) > 1 {
<add> method, exists := cli.getMethod(args[:2]...)
<add> if exists {
<add> method("--help")
<add> return nil
<add> }
<add> }
<ide> if len(args) > 0 {
<ide> method, exists := cli.getMethod(args[0])
<ide> if !exists { | 2 |
Javascript | Javascript | require standard class stringification | 602fa698a54ea82628617561aab30099b6cf93ef | <ide><path>src/auto/injector.js
<ide> function createInjector(modulesToLoad, strictDi) {
<ide> }
<ide> var result = func.$$ngIsClass;
<ide> if (!isBoolean(result)) {
<del> // Support: Edge 12-13 only
<del> // See: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6156135/
<del> result = func.$$ngIsClass = /^(?:class\b|constructor\()/.test(stringifyFn(func));
<add> result = func.$$ngIsClass = /^class\b/.test(stringifyFn(func));
<ide> }
<ide> return result;
<ide> } | 1 |
Text | Text | update contrib docs for gocheck | a09ab40f0d980b2a6d6656db638f1fc5d73f5b8b | <ide><path>docs/sources/project/test-and-docs.md
<ide> Most test targets require that you build these precursor targets first:
<ide>
<ide> ## Running individual or multiple named tests
<ide>
<add>We use [gocheck](https://labix.org/gocheck) for our integration-cli tests.
<ide> You can use the `TESTFLAGS` environment variable to run a single test. The
<ide> flag's value is passed as arguments to the `go test` command. For example, from
<ide> your local host you can run the `TestBuild` test with this command:
<ide>
<del> $ TESTFLAGS='-test.run ^TestBuild$' make test
<add> $ TESTFLAGS='-check.f DockerSuite.TestBuild*' make test
<ide>
<ide> To run the same test inside your Docker development container, you do this:
<ide>
<del> root@5f8630b873fe:/go/src/github.com/docker/docker# TESTFLAGS='-run ^TestBuild$' hack/make.sh
<add> root@5f8630b873fe:/go/src/github.com/docker/docker# TESTFLAGS='-check.f TestBuild*' hack/make.sh
<ide>
<ide> ## If tests under Boot2Docker fail due to disk space errors
<ide> | 1 |
Ruby | Ruby | remove anchor from mapping | e38a456faf6d4ab90c1ea7a3f9310ea47af35049 | <ide><path>actionpack/lib/action_dispatch/routing/mapper.rb
<ide> class Mapping #:nodoc:
<ide> ANCHOR_CHARACTERS_REGEX = %r{\A(\\A|\^)|(\\Z|\\z|\$)\Z}
<ide>
<ide> attr_reader :requirements, :conditions, :defaults
<del> attr_reader :to, :default_controller, :default_action, :as, :anchor
<add> attr_reader :to, :default_controller, :default_action, :as
<ide>
<del> def self.build(scope, set, path, as, controller, default_action, to, via, formatted, anchor, options)
<add> def self.build(scope, set, path, as, controller, default_action, to, via, formatted, options)
<ide> options = scope[:options].merge(options) if scope[:options]
<ide>
<ide> defaults = (scope[:defaults] || {}).dup
<ide> scope_constraints = scope[:constraints] || {}
<ide>
<del> new set, path, defaults, as, controller, default_action, scope[:module], to, formatted, scope_constraints, scope[:blocks] || [], via, anchor, options
<add> new set, path, defaults, as, controller, default_action, scope[:module], to, formatted, scope_constraints, scope[:blocks] || [], via, options
<ide> end
<ide>
<ide> def self.check_via(via)
<ide> def self.check_via(via)
<ide> via
<ide> end
<ide>
<del> def initialize(set, path, defaults, as, controller, default_action, modyoule, to, formatted, scope_constraints, blocks, via, anchor, options)
<add> def initialize(set, path, defaults, as, controller, default_action, modyoule, to, formatted, scope_constraints, blocks, via, options)
<ide> @defaults = defaults
<ide> @set = set
<ide>
<ide> @to = to
<ide> @default_controller = controller
<ide> @default_action = default_action
<ide> @as = as
<del> @anchor = anchor
<ide>
<ide> options_constraints = options.delete(:constraints) || {}
<ide>
<ide> def initialize(set, path, defaults, as, controller, default_action, modyoule, to
<ide> end
<ide>
<ide> def to_route
<del> [ app(@blocks), conditions, requirements, defaults, as, anchor ]
<add> [ app(@blocks), conditions, requirements, defaults, as ]
<ide> end
<ide>
<ide> private
<ide> def add_route(action, controller, options, _path, to, via, formatted, anchor) #
<ide> name_for_action(options.delete(:as), action)
<ide> end
<ide>
<del> mapping = Mapping.build(@scope, @set, URI.parser.escape(path), as, controller, default_action, to, via, formatted, anchor, options)
<del> app, conditions, requirements, defaults, as, anchor = mapping.to_route
<add> mapping = Mapping.build(@scope, @set, URI.parser.escape(path), as, controller, default_action, to, via, formatted, options)
<add> app, conditions, requirements, defaults, as = mapping.to_route
<ide> @set.add_route(app, conditions, requirements, defaults, as, anchor)
<ide> end
<ide>
<ide><path>actionpack/test/dispatch/mapper_test.rb
<ide> def test_random_keys
<ide> def test_mapping_requirements
<ide> options = { }
<ide> scope = Mapper::Scope.new({})
<del> m = Mapper::Mapping.build(scope, FakeSet.new, '/store/:name(*rest)', nil, 'foo', 'bar', nil, [:get], nil, nil, options)
<add> m = Mapper::Mapping.build(scope, FakeSet.new, '/store/:name(*rest)', nil, 'foo', 'bar', nil, [:get], nil, options)
<ide> _, _, requirements, _ = m.to_route
<ide> assert_equal(/.+?/, requirements[:rest])
<ide> end | 2 |
Mixed | Javascript | change isaix to isaix | fb37922cf350f56a3da6e4b083951241750d380f | <ide><path>test/common/README.md
<ide> the number of calls.
<ide>
<ide> Checks whether free BSD Jail is true or false.
<ide>
<del>### isAix
<add>### isAIX
<ide> * return [<Boolean>]
<ide>
<ide> Platform check for Advanced Interactive eXecutive (AIX).
<ide><path>test/common/index.js
<ide> exports.PORT = +process.env.NODE_COMMON_PORT || 12346;
<ide> exports.isWindows = process.platform === 'win32';
<ide> exports.isWOW64 = exports.isWindows &&
<ide> (process.env.PROCESSOR_ARCHITEW6432 !== undefined);
<del>exports.isAix = process.platform === 'aix';
<add>exports.isAIX = process.platform === 'aix';
<ide> exports.isLinuxPPCBE = (process.platform === 'linux') &&
<ide> (process.arch === 'ppc64') &&
<ide> (os.endianness() === 'BE');
<ide> exports.platformTimeout = function(ms) {
<ide> if (global.__coverage__)
<ide> ms = 4 * ms;
<ide>
<del> if (exports.isAix)
<add> if (exports.isAIX)
<ide> return 2 * ms; // default localhost speed is slower on AIX
<ide>
<ide> if (process.arch !== 'arm')
<ide><path>test/known_issues/test-cwd-enoent-file.js
<ide> const common = require('../common');
<ide> const assert = require('assert');
<ide>
<del>if (common.isSunOS || common.isWindows || common.isAix) {
<add>if (common.isSunOS || common.isWindows || common.isAIX) {
<ide> // The current working directory cannot be removed on these platforms.
<ide> // Change this to common.skip() when this is no longer a known issue test.
<ide> assert.fail('cannot rmdir current working directory');
<ide><path>test/parallel/test-cwd-enoent-preload.js
<ide> 'use strict';
<ide> const common = require('../common');
<ide> // Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX.
<del>if (common.isSunOS || common.isWindows || common.isAix)
<add>if (common.isSunOS || common.isWindows || common.isAIX)
<ide> common.skip('cannot rmdir current working directory');
<ide>
<ide> const assert = require('assert');
<ide><path>test/parallel/test-cwd-enoent-repl.js
<ide> 'use strict';
<ide> const common = require('../common');
<ide> // Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX.
<del>if (common.isSunOS || common.isWindows || common.isAix)
<add>if (common.isSunOS || common.isWindows || common.isAIX)
<ide> common.skip('cannot rmdir current working directory');
<ide>
<ide> const assert = require('assert');
<ide><path>test/parallel/test-cwd-enoent.js
<ide> 'use strict';
<ide> const common = require('../common');
<ide> // Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX.
<del>if (common.isSunOS || common.isWindows || common.isAix)
<add>if (common.isSunOS || common.isWindows || common.isAIX)
<ide> common.skip('cannot rmdir current working directory');
<ide>
<ide> const assert = require('assert');
<ide><path>test/parallel/test-fs-readfile-pipe-large.js
<ide> const common = require('../common');
<ide>
<ide> // simulate `cat readfile.js | node readfile.js`
<ide>
<del>if (common.isWindows || common.isAix)
<add>if (common.isWindows || common.isAIX)
<ide> common.skip(`No /dev/stdin on ${process.platform}.`);
<ide>
<ide> const assert = require('assert');
<ide><path>test/parallel/test-fs-readfile-pipe.js
<ide> const common = require('../common');
<ide>
<ide> // simulate `cat readfile.js | node readfile.js`
<ide>
<del>if (common.isWindows || common.isAix)
<add>if (common.isWindows || common.isAIX)
<ide> common.skip(`No /dev/stdin on ${process.platform}.`);
<ide>
<ide> const assert = require('assert');
<ide><path>test/parallel/test-fs-readfilesync-pipe-large.js
<ide> const common = require('../common');
<ide>
<ide> // simulate `cat readfile.js | node readfile.js`
<ide>
<del>if (common.isWindows || common.isAix)
<add>if (common.isWindows || common.isAIX)
<ide> common.skip(`No /dev/stdin on ${process.platform}.`);
<ide>
<ide> const assert = require('assert');
<ide><path>test/parallel/test-fs-realpath-pipe.js
<ide>
<ide> const common = require('../common');
<ide>
<del>if (common.isWindows || common.isAix)
<add>if (common.isWindows || common.isAIX)
<ide> common.skip(`No /dev/stdin on ${process.platform}.`);
<ide>
<ide> const assert = require('assert');
<ide><path>test/parallel/test-fs-watch-encoding.js
<ide> const common = require('../common');
<ide> // The testcase makes use of folder watching, and causes
<ide> // hang. This behavior is documented. Skip this for AIX.
<ide>
<del>if (common.isAix)
<add>if (common.isAIX)
<ide> common.skip('folder watch capability is limited in AIX.');
<ide>
<ide> const fs = require('fs');
<ide><path>test/parallel/test-fs-watch.js
<ide> class WatchTestCase {
<ide> const cases = [
<ide> // Watch on a directory should callback with a filename on supported systems
<ide> new WatchTestCase(
<del> common.isLinux || common.isOSX || common.isWindows || common.isAix,
<add> common.isLinux || common.isOSX || common.isWindows || common.isAIX,
<ide> 'watch1',
<ide> 'foo',
<ide> 'filePath'
<ide><path>test/parallel/test-os.js
<ide> const release = os.release();
<ide> is.string(release);
<ide> assert.ok(release.length > 0);
<ide> //TODO: Check format on more than just AIX
<del>if (common.isAix)
<add>if (common.isAIX)
<ide> assert.ok(/^\d+\.\d+$/.test(release));
<ide>
<ide> const platform = os.platform();
<ide><path>test/pseudo-tty/no_dropped_stdio.js
<ide> out += `${'o'.repeat(24)}O`;
<ide> setTimeout(function() {
<ide> process.stdout.write(out);
<ide> process.exit(0);
<del>}, common.isAix ? 200 : 0);
<add>}, common.isAIX ? 200 : 0);
<ide><path>test/pseudo-tty/no_interleaved_stdio.js
<ide> const err = '__This is some stderr__';
<ide> setTimeout(function() {
<ide> process.stdout.write(out);
<ide> process.stderr.write(err);
<del>}, common.isAix ? 200 : 0);
<add>}, common.isAIX ? 200 : 0);
<ide><path>test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js
<ide> process.stdout._refreshSize = wrap(originalRefreshSizeStdout,
<ide> // can setup the readloop. Provide a reasonable delay.
<ide> setTimeout(function() {
<ide> process.emit('SIGWINCH');
<del>}, common.isAix ? 200 : 0);
<add>}, common.isAIX ? 200 : 0);
<ide><path>test/sequential/test-fs-watch.js
<ide> const fs = require('fs');
<ide> const expectFilePath = common.isWindows ||
<ide> common.isLinux ||
<ide> common.isOSX ||
<del> common.isAix;
<add> common.isAIX;
<ide>
<ide> let watchSeenOne = 0;
<ide> let watchSeenTwo = 0;
<ide> const filepathThree = path.join(testsubdir, filenameThree);
<ide> assert.doesNotThrow(
<ide> function() {
<ide> const watcher = fs.watch(testsubdir, function(event, filename) {
<del> const renameEv = common.isSunOS || common.isAix ? 'change' : 'rename';
<add> const renameEv = common.isSunOS || common.isAIX ? 'change' : 'rename';
<ide> assert.strictEqual(event, renameEv);
<ide> if (expectFilePath) {
<ide> assert.strictEqual(filename, 'newfile.txt');
<ide><path>test/tick-processor/test-tick-processor-builtin.js
<ide> if (!common.enoughTestCpu)
<ide>
<ide> if (common.isWindows ||
<ide> common.isSunOS ||
<del> common.isAix ||
<add> common.isAIX ||
<ide> common.isLinuxPPCBE ||
<ide> common.isFreeBSD)
<ide> common.skip('C++ symbols are not mapped for this os.');
<ide><path>test/tick-processor/test-tick-processor-cpp-core.js
<ide> if (!common.enoughTestCpu)
<ide>
<ide> if (common.isWindows ||
<ide> common.isSunOS ||
<del> common.isAix ||
<add> common.isAIX ||
<ide> common.isLinuxPPCBE ||
<ide> common.isFreeBSD)
<ide> common.skip('C++ symbols are not mapped for this os.');
<ide><path>test/tick-processor/test-tick-processor-unknown.js
<ide> const common = require('../common');
<ide> // the full 64 bits and the result is that it does not process the
<ide> // addresses correctly and runs out of memory
<ide> // Disabling until we get a fix upstreamed into V8
<del>if (common.isAix)
<add>if (common.isAIX)
<ide> common.skip('AIX address range too big for scripts.');
<ide>
<ide> if (!common.enoughTestCpu) | 20 |
PHP | PHP | fix tests to work with 3.7 | 1cb44d4ba4675332248bc53af2729c5083529374 | <ide><path>src/View/Helper/PaginatorHelper.php
<ide> public function generateUrlParams(array $options = [], $model = null)
<ide> $paging += ['page' => null, 'sort' => null, 'direction' => null, 'limit' => null];
<ide>
<ide> if (!empty($paging['sort']) && !empty($options['sort']) && strpos($options['sort'], '.') === false) {
<del> $paging['sort'] = $this->_removeAlias($paging['sort'], $model = null);
<add> $paging['sort'] = $this->_removeAlias($paging['sort'], null);
<ide> }
<ide> if (!empty($paging['sortDefault']) && !empty($options['sort']) && strpos($options['sort'], '.') === false) {
<ide> $paging['sortDefault'] = $this->_removeAlias($paging['sortDefault'], $model);
<ide><path>tests/TestCase/View/Helper/PaginatorHelperTest.php
<ide> public function testDefaultSortRemovedFromUrlWithAliases()
<ide> Router::setRequestInfo($request);
<ide>
<ide> $this->Paginator->options(['model' => 'Articles']);
<del> $this->Paginator->request = $this->Paginator->request->withParam('paging', [
<add> $request = $this->View->getRequest()->withParam('paging', [
<ide> 'Articles' => [
<ide> 'page' => 1, 'current' => 3, 'count' => 13,
<ide> 'prevPage' => false, 'nextPage' => true, 'pageCount' => 8,
<ide> 'sort' => 'Articles.title', 'direction' => 'asc',
<ide> 'sortDefault' => 'Articles.title', 'directionDefault' => 'desc',
<ide> ],
<ide> ]);
<add> $this->View->setRequest($request);
<ide>
<ide> $result = $this->Paginator->sort('title');
<ide> $expected = [ | 2 |
Javascript | Javascript | use #index instead of #openindex | 14afb4967694f90497823568869e39c74054d35f | <ide><path>src/git-repository-async.js
<ide> export default class GitRepositoryAsync {
<ide> .then(relativePath => {
<ide> return this.repoPool.enqueue(() => {
<ide> return this.getRepo()
<del> .then(repo => repo.openIndex())
<add> .then(repo => repo.index())
<ide> .then(index => {
<ide> const entry = index.getByPath(relativePath)
<ide> if (!entry) return false | 1 |
Ruby | Ruby | require ruby-vips before downloading blob | c5133f00108140cd59a85d7c38417c53705d2c80 | <ide><path>activestorage/lib/active_storage/analyzer/image_analyzer/vips.rb
<ide> def self.accept?(blob)
<ide>
<ide> private
<ide> def read_image
<del> download_blob_to_tempfile do |file|
<add> begin
<ide> require "ruby-vips"
<add> rescue LoadError
<add> logger.info "Skipping image analysis because the ruby-vips gem isn't installed"
<add> return {}
<add> end
<ide>
<add> download_blob_to_tempfile do |file|
<ide> image = instrument("vips") do
<ide> ::Vips::Image.new_from_file(file.path, access: :sequential)
<ide> end
<ide> def read_image
<ide> logger.info "Skipping image analysis because Vips doesn't support the file"
<ide> {}
<ide> end
<add> rescue ::Vips::Error => error
<add> logger.error "Skipping image analysis due to an Vips error: #{error.message}"
<add> {}
<ide> end
<del> rescue LoadError
<del> logger.info "Skipping image analysis because the ruby-vips gem isn't installed"
<del> {}
<del> rescue ::Vips::Error => error
<del> logger.error "Skipping image analysis due to an Vips error: #{error.message}"
<del> {}
<ide> end
<ide>
<ide> ROTATIONS = /Right-top|Left-bottom|Top-right|Bottom-left/ | 1 |
Text | Text | add v5.5.10 release notes | c5e231f953b02c605ab8c29f1f0b3fe9d9ebc26c | <ide><path>CHANGELOG-5.5.md
<ide> # Release Notes for 5.5.x
<ide>
<add>## v5.5.10 (2017-09-21)
<add>
<add>### Added
<add>- Added `Route::respondWithRoute($name)` method ([#21299](https://github.com/laravel/framework/pull/21299), [66c5e46](https://github.com/laravel/framework/commit/66c5e462dbdb9d0c9d23114da3a3dc1b6e9fa0a1))
<add>- Added `$strict` parameter to `TestResponse::assertJson()` ([#21301](https://github.com/laravel/framework/pull/21301))
<add>
<add>### Changed
<add>- Added "firmware" as an uncountable word ([#21306](https://github.com/laravel/framework/pull/21306))
<add>- Allow `MorphTo::associate()` accept `null` ([#21318](https://github.com/laravel/framework/pull/21318))
<add>- Changed `__()` signature to match `Translation::trans()` ([10c013c](https://github.com/laravel/framework/commit/10c013c564b7e518640e42e97d9178f9e05ec7d9))
<add>
<add>### Fixed
<add>- Add missing `driver` parameter to doctrine connection ([#21297](https://github.com/laravel/framework/pull/21297))
<add>
<add>### Security
<add>- Perform constant-time token comparison in `DatabaseUserProvider` ([#21320](https://github.com/laravel/framework/pull/21320))
<add>
<add>
<ide> ## v5.5.9 (2017-09-20)
<ide>
<ide> ### Changed | 1 |
PHP | PHP | change comment wording | 658d1dfb2af301f6c8b02dfd3b6b9dec6e5bee12 | <ide><path>src/Illuminate/Foundation/Http/FormRequest.php
<ide> protected function getValidatorInstance()
<ide> }
<ide>
<ide> /**
<del> * Get validation data from request.
<add> * Get data to be validated from the request.
<ide> *
<ide> * @return array
<ide> */ | 1 |
Javascript | Javascript | fix crazy grammar | 0d62733f3089fe35ecbfb497320116d2372e9ef6 | <ide><path>packages/ember-application/lib/system/resolver.js
<ide> Ember.DefaultResolver = Ember.Object.extend({
<ide> factory = get(parsedName.root, className);
<ide> if (factory) { return factory; }
<ide> },
<add>
<ide> /**
<ide> Returns a human-readable description for a fullName. Used by the
<del> Application namespace in assertions to assertions to describe the
<add> Application namespace in assertions to describe the
<ide> precise name of the class that Ember is looking for, rather than
<ide> container keys.
<ide> | 1 |
Text | Text | fix typo in part-8-rtk-query-advanced.md | 26be7242f12f061621075ffd256c392635f0eb95 | <ide><path>docs/tutorials/essentials/part-8-rtk-query-advanced.md
<ide> Uh-oh. The entire `<PostsList>` component was grayed out, because we just refetc
<ide>
<ide> ### Implementing Optimistic Updates
<ide>
<del>For a small update like adding a reaction, we probably don't need to re-fetch the entire list of posts. Instead, we could try just updating the already-cached data on the client to match what we expect to have happen on the server. Also, if we update the cache immediately, the user gets instant feedback when the click the button instead of having to wait for the response to come back. **This approach of updating client state right away is called an "optimistic update"**, and it's a common pattern in web apps.
<add>For a small update like adding a reaction, we probably don't need to re-fetch the entire list of posts. Instead, we could try just updating the already-cached data on the client to match what we expect to have happen on the server. Also, if we update the cache immediately, the user gets instant feedback when they click the button instead of having to wait for the response to come back. **This approach of updating client state right away is called an "optimistic update"**, and it's a common pattern in web apps.
<ide>
<ide> **RTK Query lets you implement optimistic updates by modifying the client-side cache based on "request lifecycle" handlers**. Endpoints can define an `onQueryStarted` function that will be called when a request starts, and we can run additional logic in that handler.
<ide> | 1 |
Go | Go | remove the open from cmdbuild | ebb59c1125d194716f26b8cc53863fa9910c4b3f | <ide><path>commands.go
<ide> import (
<ide> "log"
<ide> "net/http"
<ide> "net/url"
<del> "os"
<del> "path/filepath"
<ide> "runtime"
<ide> "strconv"
<ide> "strings" | 1 |
Javascript | Javascript | fix setnativeselectedposition native command | 078e386024474edc9b464f6c0fd8a1429e922289 | <ide><path>Libraries/Components/Picker/PickerAndroid.android.js
<ide> function PickerAndroid(props: Props): React.Node {
<ide> props.mode === 'dropdown'
<ide> ? AndroidDropdownPickerCommands
<ide> : AndroidDialogPickerCommands;
<del> Commands.setNativeSelectedPosition(current, selected);
<add> Commands.setNativeSelectedPosition(current, position);
<ide> }
<ide> },
<ide> [ | 1 |
Ruby | Ruby | remove rack cors initializer when updating | 5a9cc012a0b2c8bc059abb8f5663f0c66258583c | <ide><path>railties/lib/rails/generators/rails/app/app_generator.rb
<ide> def config_when_updating
<ide> active_record_belongs_to_required_by_default_config_exist = File.exist?('config/initializers/active_record_belongs_to_required_by_default.rb')
<ide> action_cable_config_exist = File.exist?('config/cable.yml')
<ide> ssl_options_exist = File.exist?('config/initializers/ssl_options.rb')
<add> rack_cors_config_exist = File.exist?('config/initializers/cors.rb')
<ide>
<ide> config
<ide>
<ide> def config_when_updating
<ide> unless ssl_options_exist
<ide> remove_file 'config/initializers/ssl_options.rb'
<ide> end
<add>
<add> unless rack_cors_config_exist
<add> remove_file 'config/initializers/cors.rb'
<add> end
<ide> end
<ide>
<ide> def database_yml
<ide><path>railties/test/generators/app_generator_test.rb
<ide> def test_rails_update_does_not_remove_ssl_options_if_already_present
<ide> end
<ide> end
<ide>
<add> def test_rails_update_does_not_create_rack_cors
<add> app_root = File.join(destination_root, 'myapp')
<add> run_generator [app_root]
<add>
<add> stub_rails_application(app_root) do
<add> generator = Rails::Generators::AppGenerator.new ["rails"], { with_dispatchers: true }, destination_root: app_root, shell: @shell
<add> generator.send(:app_const)
<add> quietly { generator.send(:update_config_files) }
<add> assert_no_file "#{app_root}/config/initializers/cors.rb"
<add> end
<add> end
<add>
<add> def test_rails_update_does_not_remove_rack_cors_if_already_present
<add> app_root = File.join(destination_root, 'myapp')
<add> run_generator [app_root]
<add>
<add> FileUtils.touch("#{app_root}/config/initializers/cors.rb")
<add>
<add> stub_rails_application(app_root) do
<add> generator = Rails::Generators::AppGenerator.new ["rails"], { with_dispatchers: true }, destination_root: app_root, shell: @shell
<add> generator.send(:app_const)
<add> quietly { generator.send(:update_config_files) }
<add> assert_file "#{app_root}/config/initializers/cors.rb"
<add> end
<add> end
<add>
<ide> def test_application_names_are_not_singularized
<ide> run_generator [File.join(destination_root, "hats")]
<ide> assert_file "hats/config/environment.rb", /Rails\.application\.initialize!/ | 2 |
Ruby | Ruby | shuffle a few things in aid of easier debugging | 41ae432f492bfedadc6977012c8d38665bda3ae2 | <ide><path>activejob/test/support/integration/adapters/sidekiq.rb
<ide> def clear_jobs
<ide> end
<ide>
<ide> def start_workers
<del> fork do
<del> logfile = Rails.root.join("log/sidekiq.log").to_s
<del> pidfile = Rails.root.join("tmp/sidekiq.pid").to_s
<del> ::Process.daemon(true, true)
<del> [$stdout, $stderr].each do |io|
<del> File.open(logfile, 'ab') do |f|
<del> io.reopen(f)
<del> end
<del> io.sync = true
<del> end
<add> continue_read, continue_write = IO.pipe
<add> death_read, death_write = IO.pipe
<add>
<add> @pid = fork do
<add> continue_read.close
<add> death_write.close
<add>
<add> # Celluloid & Sidekiq are not warning-clean :(
<add> $VERBOSE = false
<add>
<ide> $stdin.reopen('/dev/null')
<add> $stdout.sync = true
<add> $stderr.sync = true
<add>
<add> logfile = Rails.root.join("log/sidekiq.log").to_s
<ide> Sidekiq::Logging.initialize_logger(logfile)
<del> File.open(File.expand_path(pidfile), 'w') do |f|
<del> f.puts ::Process.pid
<del> end
<ide>
<ide> self_read, self_write = IO.pipe
<ide> trap "TERM" do
<ide> self_write.puts("TERM")
<ide> end
<ide>
<add> Thread.new do
<add> begin
<add> death_read.read
<add> rescue Exception
<add> end
<add> self_write.puts("TERM")
<add> end
<add>
<ide> require 'celluloid'
<add> Celluloid.logger = nil
<ide> require 'sidekiq/launcher'
<ide> sidekiq = Sidekiq::Launcher.new({queues: ["integration_tests"],
<ide> environment: "test",
<ide> def start_workers
<ide> Sidekiq::Scheduled.const_set :INITIAL_WAIT, 1
<ide> begin
<ide> sidekiq.run
<add> continue_write.puts "started"
<ide> while readable_io = IO.select([self_read])
<ide> signal = readable_io.first[0].gets.strip
<ide> raise Interrupt if signal == "TERM"
<ide> end
<ide> rescue Interrupt
<del> sidekiq.stop
<del> exit(0)
<ide> end
<add>
<add> sidekiq.stop
<add> exit!
<ide> end
<del> sleep 1
<add> continue_write.close
<add> death_read.close
<add> @worker_lifeline = death_write
<add>
<add> raise "Failed to start worker" unless continue_read.gets == "started\n"
<ide> end
<ide>
<ide> def stop_workers
<del> pidfile = Rails.root.join("tmp/sidekiq.pid").to_s
<del> Process.kill 'TERM', File.open(pidfile).read.to_i
<del> FileUtils.rm_f pidfile
<del> rescue
<add> if @pid
<add> Process.kill 'TERM', @pid
<add> Process.wait @pid
<add> end
<ide> end
<ide>
<ide> def can_run? | 1 |
Python | Python | fix static checks after pre-commit upgrades | a5d7f9b3220621d7e2d5f0f31370baf03bb1c752 | <ide><path>airflow/sensors/base.py
<ide> def _get_next_poke_interval(self, started_at: Any, run_duration: Callable[[], in
<ide> min_backoff = int(self.poke_interval * (2 ** (try_number - 2)))
<ide>
<ide> run_hash = int(
<del> hashlib.sha1(
<del> f"{self.dag_id}#{self.task_id}#{started_at}#{try_number}".encode("utf-8")
<del> ).hexdigest(),
<add> hashlib.sha1(f"{self.dag_id}#{self.task_id}#{started_at}#{try_number}".encode()).hexdigest(),
<ide> 16,
<ide> )
<ide> modded_hash = min_backoff + run_hash % min_backoff
<ide><path>tests/providers/google/cloud/hooks/test_pubsub.py
<ide> def _generate_messages(self, count) -> List[ReceivedMessage]:
<ide> ReceivedMessage(
<ide> ack_id=str(i),
<ide> message={
<del> "data": f'Message {i}'.encode('utf8'),
<add> "data": f'Message {i}'.encode(),
<ide> "attributes": {"type": "generated message"},
<ide> },
<ide> )
<ide><path>tests/providers/google/cloud/operators/test_pubsub.py
<ide> def _generate_messages(self, count):
<ide> ReceivedMessage(
<ide> ack_id=f"{i}",
<ide> message={
<del> "data": f'Message {i}'.encode('utf8'),
<add> "data": f'Message {i}'.encode(),
<ide> "attributes": {"type": "generated message"},
<ide> },
<ide> )
<ide><path>tests/providers/google/cloud/sensors/test_pubsub.py
<ide> def _generate_messages(self, count):
<ide> ReceivedMessage(
<ide> ack_id=f"{i}",
<ide> message={
<del> "data": f'Message {i}'.encode('utf8'),
<add> "data": f'Message {i}'.encode(),
<ide> "attributes": {"type": "generated message"},
<ide> },
<ide> ) | 4 |
Ruby | Ruby | fix ruby_has_encoding call regression | 61ffa47fd9dc179ddff792db1dc6f55464f6c16b | <ide><path>Library/Homebrew/dev-cmd/test-bot.rb
<ide> def run
<ide> verbose = ARGV.verbose?
<ide> # Step may produce arbitrary output and we read it bytewise, so must
<ide> # buffer it as binary and convert to UTF-8 once complete
<del> output = Homebrew.ruby_has_encoding? ? "".encode!("BINARY") : ""
<add> output = ruby_has_encoding? ? "".encode!("BINARY") : ""
<ide> working_dir = Pathname.new(@command.first == "git" ? @repository : Dir.pwd)
<ide> read, write = IO.pipe
<ide> | 1 |
PHP | PHP | improve comments in route\parser | c55b4c5b7b46b6fdc8567fa858237b30b517ff15 | <ide><path>system/route/parser.php
<ide> class Parser {
<ide> */
<ide> public static function parameters($uri, $route)
<ide> {
<del> // --------------------------------------------------------------
<del> // Split the request URI into segments.
<del> // --------------------------------------------------------------
<del> $uri_segments = explode('/', $uri);
<add> $parameters = array();
<ide>
<del> // --------------------------------------------------------------
<del> // Split the route URI into segments.
<del> // --------------------------------------------------------------
<add> $uri_segments = explode('/', $uri);
<ide> $route_segments = explode('/', $route);
<ide>
<ide> // --------------------------------------------------------------
<del> // Initialize the array of parameters.
<del> // --------------------------------------------------------------
<del> $parameters = array();
<del>
<del> // --------------------------------------------------------------
<del> // Extract all of the parameters out of the URI.
<del> //
<del> // Any segment wrapped in parentheses is considered a parameter.
<add> // Extract all of the parameters out of the URI. Any route
<add> // segment wrapped in parentheses is considered a parameter.
<ide> // --------------------------------------------------------------
<ide> for ($i = 0; $i < count($route_segments); $i++)
<ide> { | 1 |
Text | Text | clarify wsl support | d8debd8448a1d325a564c42e5639655973b7641b | <ide><path>BUILDING.md
<ide> note1 - The gcc4.8-libs package needs to be installed, because node
<ide> In "Git bash" if you call the node shell alias (`node` without the `.exe`
<ide> extension), `winpty` is used automatically.
<ide>
<add>The Windows Subsystem for Linux (WSL) is not directly supported, but the
<add>GNU/Linux build process and binaries should work. The community will only
<add>address issues that reproduce on native GNU/Linux systems. Issues that only
<add>reproduce on WSL should be reported in the
<add>[WSL issue tracker](https://github.com/Microsoft/WSL/issues). Running the
<add>Windows binary (`node.exe`) in WSL is not recommended, and will not work
<add>without adjustment (such as stdio redirection).
<add>
<ide> ### Supported toolchains
<ide>
<ide> Depending on host platform, the selection of toolchains may vary. | 1 |
Text | Text | add php tag + update coding style | 063257939b148091ab10da0dccbb0cbdb4e46a7a | <ide><path>guide/english/php/class/index.md
<ide> class Lab { // class keyword is mandatory identifier for class creation, after c
<ide> return $this->name;
<ide> }
<ide>
<del> public function say_my_name() {
<add> public function sayMyName() {
<ide> $name = $this->getName();
<ide> return $name;
<ide> }
<ide>
<ide> }
<del>$breaking_bad = 'Heisenberg';
<del>$lab = new Lab(); // keyword new creates instance of Lab class, variable $lab points to that instance
<del>$lab->setName($breaking_bad); // $lab variable that points to Lab instance calls setter function setName with $breaking_bad as parameter
<del>echo "My Name is " . $lab->say_my_name(). "!";
<add>$breakingBad = 'Heisenberg';
<add>$lab = new Lab();
<add>$lab->setName($breakingBad);
<add>echo "My Name is " . $lab->sayMyName(). "!";
<ide> ```
<ide>
<ide> | 1 |
Text | Text | remove note about yarn 2 support. | 232209b51330414f8dc002eb533e90ba2ac00cc9 | <ide><path>docs/getting-started.md
<ide> npm install next react react-dom
<ide> yarn add next react react-dom
<ide> ```
<ide>
<del>> **Note**: [Yarn 2](https://yarnpkg.com/getting-started/install) is supported as best-effort within Next.js. For best results, use NPM or Yarn 1.
<del>
<ide> Open `package.json` and add the following `scripts`:
<ide>
<ide> ```json | 1 |
Javascript | Javascript | allow _ in hostnames | ddfc6b78cc15202789e58b9220c1897e9d9aa525 | <ide><path>lib/url.js
<ide> var protocolPattern = /^([a-z0-9]+:)/i,
<ide> .concat(unwise).concat(autoEscape),
<ide> nonAuthChars = ['/', '@', '?', '#'].concat(delims),
<ide> hostnameMaxLen = 255,
<del> hostnamePartPattern = /^[a-zA-Z0-9][a-z0-9A-Z-]{0,62}$/,
<del> hostnamePartStart = /^([a-zA-Z0-9][a-z0-9A-Z-]{0,62})(.*)$/,
<add> hostnamePartPattern = /^[a-zA-Z0-9][a-z0-9A-Z_-]{0,62}$/,
<add> hostnamePartStart = /^([a-zA-Z0-9][a-z0-9A-Z_-]{0,62})(.*)$/,
<ide> // protocols that can allow "unsafe" and "unwise" chars.
<ide> unsafeProtocol = {
<ide> 'javascript': true,
<ide><path>test/simple/test-url.js
<ide> var parseTests = {
<ide> 'search' : '?search=foo',
<ide> 'query' : 'search=foo',
<ide> 'hash' : '#bar'
<add> },
<add> 'http://bucket_name.s3.amazonaws.com/image.jpg': {
<add> protocol: 'http:',
<add> slashes: true,
<add> host: 'bucket_name.s3.amazonaws.com',
<add> hostname: 'bucket_name.s3.amazonaws.com',
<add> pathname: '/image.jpg',
<add> href: 'http://bucket_name.s3.amazonaws.com/image.jpg'
<ide> }
<ide> };
<add>
<ide> for (var u in parseTests) {
<ide> var actual = url.parse(u),
<ide> expected = parseTests[u]; | 2 |
Javascript | Javascript | read jshint version from package.json | 25299904da20d857468af2daf8b2fd73c7ec5fc0 | <ide><path>make.js
<ide> target.lint = function() {
<ide> var jshintPath = path.normalize('./node_modules/.bin/jshint');
<ide> if (!test('-f', jshintPath)) {
<ide> echo('jshint is not installed -- installing...');
<del> exec('npm install [email protected]'); // TODO read version from package.json
<add> // Read the jshint version to be installed from package.json.
<add> try {
<add> var rawConfiguration = fs.readFileSync('package.json', 'utf8');
<add> var configuration = JSON.parse(rawConfiguration);
<add> exec('npm install jshint@' + configuration.devDependencies.jshint);
<add> } catch (e) {
<add> echo('package.json does not exist -- aborting...');
<add> return;
<add> }
<ide> }
<ide> // Lint the Firefox specific *.jsm files.
<ide> var options = '--extra-ext .jsm'; | 1 |
Text | Text | add links to the issue id | 9a7b0755eb3332d73874246e38b12738ffa3f568 | <ide><path>docs/topics/release-notes.md
<ide> You can determine your currently installed version using `pip freeze`:
<ide>
<ide> **Date**: [December 2014][3.0.1-milestone]
<ide>
<del>* More helpful error message when the default Serializer `create()` fails (#2013)
<del>* Raise error when attempting to save serializer if data is not valid. (#2098)
<del>* Fix `FileUploadParser` breaks with empty file names and multiple upload handlers (#2109)
<del>* Improve BindingDict` to support standard dict-functions (#2135, #2163)
<del>* Add `validate()` to `ListSerializer` (#2168, #2225, #2232)
<del>* Fix JSONP renderer failing to escape some characters (#2169, #2195)
<del>* Add missing default style for `FileField` (#2172)
<del>* Actions are required when calling `ViewSet.as_view()` (#2175)
<del>* Add `allow_blank` to `ChoiceField (#2184, #2239)
<del>* Cosmetic fixes in the HTML renderer (#2187)
<del>* Raise error if `fields` on serializer is not a list of strings. (#2193, #2213)
<del>* Improve checks for nested creates and updates. (#2194, #2196)
<del>* `validated_attrs` argument renamed to `validated_data` in `Serializer` `create()`/`update()` (#2197)
<del>* Remove deprecated code to reflect the droped Django versions (#2200)
<del>* Better serializer errors for nested writes. (#2202, #2215)
<del>* Fix pagination and custom permissions incompatibility (#2205)
<del>* Raise error if `fields` on serializer is not a list of strings. (#2213)
<del>* Add missing translation markers for relational fields. (#2231)
<del>* Improve field lookup behavior for dicts/mappings. (#2244, #2243)
<del>* Optimized hyperlinked PK (#2242)
<add>* More helpful error message when the default Serializer `create()` fails ([#2013](https://github.com/tomchristie/django-rest-framework/issues/2013))
<add>* Raise error when attempting to save serializer if data is not valid. ([#2098](https://github.com/tomchristie/django-rest-framework/issues/2098))
<add>* Fix `FileUploadParser` breaks with empty file names and multiple upload handlers ([#2109](https://github.com/tomchristie/django-rest-framework/issues/2109))
<add>* Improve BindingDict` to support standard dict-functions ([#2135](https://github.com/tomchristie/django-rest-framework/issues/2135), [#2163](https://github.com/tomchristie/django-rest-framework/issues/2163))
<add>* Add `validate()` to `ListSerializer` ([#2168](https://github.com/tomchristie/django-rest-framework/issues/2168), [#2225](https://github.com/tomchristie/django-rest-framework/issues/2225), [#2232](https://github.com/tomchristie/django-rest-framework/issues/2232))
<add>* Fix JSONP renderer failing to escape some characters ([#2169](https://github.com/tomchristie/django-rest-framework/issues/2169), [#2195](https://github.com/tomchristie/django-rest-framework/issues/2195))
<add>* Add missing default style for `FileField` ([#2172](https://github.com/tomchristie/django-rest-framework/issues/2172))
<add>* Actions are required when calling `ViewSet.as_view()` ([#2175](https://github.com/tomchristie/django-rest-framework/issues/2175))
<add>* Add `allow_blank` to `ChoiceField ([#2184](https://github.com/tomchristie/django-rest-framework/issues/2184), [#2239](https://github.com/tomchristie/django-rest-framework/issues/2239))
<add>* Cosmetic fixes in the HTML renderer ([#2187](https://github.com/tomchristie/django-rest-framework/issues/2187))
<add>* Raise error if `fields` on serializer is not a list of strings. ([#2193](https://github.com/tomchristie/django-rest-framework/issues/2193), [#2213](https://github.com/tomchristie/django-rest-framework/issues/2213))
<add>* Improve checks for nested creates and updates. ([#2194](https://github.com/tomchristie/django-rest-framework/issues/2194), [#2196](https://github.com/tomchristie/django-rest-framework/issues/2196))
<add>* `validated_attrs` argument renamed to `validated_data` in `Serializer` `create()`/`update()` ([#2197](https://github.com/tomchristie/django-rest-framework/issues/2197))
<add>* Remove deprecated code to reflect the droped Django versions ([#2200](https://github.com/tomchristie/django-rest-framework/issues/2200))
<add>* Better serializer errors for nested writes. ([#2202](https://github.com/tomchristie/django-rest-framework/issues/2202), [#2215](https://github.com/tomchristie/django-rest-framework/issues/2215))
<add>* Fix pagination and custom permissions incompatibility ([#2205](https://github.com/tomchristie/django-rest-framework/issues/2205))
<add>* Raise error if `fields` on serializer is not a list of strings. ([#2213](https://github.com/tomchristie/django-rest-framework/issues/2213))
<add>* Add missing translation markers for relational fields. ([#2231](https://github.com/tomchristie/django-rest-framework/issues/2231))
<add>* Improve field lookup behavior for dicts/mappings. ([#2244](https://github.com/tomchristie/django-rest-framework/issues/2244), [#2243](https://github.com/tomchristie/django-rest-framework/issues/2243))
<add>* Optimized hyperlinked PK ([#2242](https://github.com/tomchristie/django-rest-framework/issues/2242))
<ide>
<ide> ### 3.0.0
<ide> | 1 |
Python | Python | add tests for german noun chunker | 7825b7554813c83e0423cec48ba293959d006840 | <ide><path>spacy/tests/unit/test_parser.py
<ide> def ex3_en(self, EN):
<ide> ], dtype='int32'))
<ide> return example
<ide>
<del> def test_standard_chunk(self, ex1_en):
<add> # @pytest.fixture(score="class")
<add> # def ex1_de(self, DE):
<add> # example = EN.tokenizer.tokens_from_list('Eine Tasse steht auf dem Tisch .'.split(' '))
<add> # EN.tagger.tag_from_strings(example, 'ART NN VVFIN APPR ART NN $.'.split(' '))
<add> # example.from_array([HEAD, DEP],
<add> # numpy.asarray(
<add> # [
<add> # [1, det],
<add> # [4, nsubj],
<add> # [-1, prep],
<add> # [1, det],
<add> # [-2, pobj],
<add> # [0, root],
<add> # [-1, punct]
<add> # ], dtype='int32'))
<add> # return example
<add>
<add> def test_en_standard_chunk(self, ex1_en):
<ide> chunks = list(ex1_en.noun_chunks)
<ide> assert len(chunks) == 1
<ide> assert chunks[0].string == 'A base phrase '
<ide>
<del> def test_coordinated_chunks(self, ex2_en):
<add> def test_en_coordinated_chunks(self, ex2_en):
<ide> chunks = list(ex2_en.noun_chunks)
<ide> assert len(chunks) == 2
<ide> assert chunks[0].string == 'A base phrase '
<ide> assert chunks[1].string == 'a good phrase '
<ide>
<del> def test_pp_chunks(self, ex3_en):
<add> def test_en_pp_chunks(self, ex3_en):
<ide> chunks = list(ex3_en.noun_chunks)
<ide> assert len(chunks) == 2
<ide> assert chunks[0].string == 'A phrase ' | 1 |
Java | Java | simplify context creation (android) | 739651afa1c0b90bf0fb75d9c09047645ff55388 | <ide><path>ReactAndroid/src/main/java/com/facebook/react/HeadlessJsTaskService.java
<ide> public void onReactContextInitialized(ReactContext reactContext) {
<ide> reactInstanceManager.removeReactInstanceEventListener(this);
<ide> }
<ide> });
<del> if (!reactInstanceManager.hasStartedCreatingInitialContext()) {
<del> reactInstanceManager.createReactContextInBackground();
<del> }
<add> reactInstanceManager.createReactContextInBackground();
<ide> } else {
<ide> invokeStartTask(reactContext, taskConfig);
<ide> }
<ide><path>ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java
<ide> private static void initializeSoLoaderIfNecessary(Context applicationContext) {
<ide> /**
<ide> * Trigger react context initialization asynchronously in a background async task. This enables
<ide> * applications to pre-load the application JS, and execute global code before
<del> * {@link ReactRootView} is available and measured. This should only be called the first time the
<del> * application is set up, which is enforced to keep developers from accidentally creating their
<del> * application multiple times without realizing it.
<add> * {@link ReactRootView} is available and measured.
<ide> *
<ide> * Called from UI thread.
<ide> */
<ide> @ThreadConfined(UI)
<ide> public void createReactContextInBackground() {
<ide> Log.d(ReactConstants.TAG, "ReactInstanceManager.createReactContextInBackground()");
<del> Assertions.assertCondition(
<del> !mHasStartedCreatingInitialContext,
<del> "createReactContextInBackground should only be called when creating the react " +
<del> "application for the first time. When reloading JS, e.g. from a new file, explicitly" +
<del> "use recreateReactContextInBackground");
<del>
<del> mHasStartedCreatingInitialContext = true;
<del> recreateReactContextInBackgroundInner();
<add> if (!mHasStartedCreatingInitialContext) {
<add> mHasStartedCreatingInitialContext = true;
<add> recreateReactContextInBackgroundInner();
<add> }
<ide> }
<ide>
<ide> /**
<ide><path>ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java
<ide> public void startReactApplication(
<ide> // TODO initialize surface here
<ide> }
<ide>
<del> if (!mReactInstanceManager.hasStartedCreatingInitialContext()) {
<del> mReactInstanceManager.createReactContextInBackground();
<del> }
<add> mReactInstanceManager.createReactContextInBackground();
<ide>
<ide> attachToReactInstanceManager();
<ide> | 3 |
Javascript | Javascript | fix issue with nonprofit show views not loading | 7b85031a8ae32f8d9d53113b0782f7816ae92ead | <ide><path>server/boot/nonprofits.js
<ide> module.exports = function(app) {
<ide> return res.redirect('../nonprofit/' + dashedNameFull);
<ide> }
<ide>
<del> var buttonActive = false;
<del> if (
<del> req.user &&
<del> req.user.uncompletedBonfires.length === 0 &&
<del> req.user.completedCoursewares.length > 63
<del> ) {
<del> var hasShownInterest =
<del> nonprofit.interestedCampers.filter(function(user) {
<del> return user.username === req.user.username;
<del> });
<del>
<del> if (hasShownInterest.length === 0) {
<del> buttonActive = true;
<del> }
<del> }
<add> //We need to create logic that verifies completion. Defaulting to false for now.
<add> //var buttonActive = false;
<add> //if (
<add> // req.user &&
<add> // req.user.completedCoursewares.length > 63
<add> //) {
<add> // var hasShownInterest =
<add> // nonprofit.interestedCampers.filter(function(user) {
<add> // return user.username === req.user.username;
<add> // });
<add> //
<add> // if (hasShownInterest.length === 0) {
<add> // buttonActive = true;
<add> // }
<add> //}
<ide>
<ide> res.render('nonprofits/show', {
<ide> dashedName: dashedNameFull,
<ide> module.exports = function(app) {
<ide> whatDoesNonprofitDo: nonprofit.whatDoesNonprofitDo,
<ide> interestedCampers: nonprofit.interestedCampers,
<ide> assignedCampers: nonprofit.assignedCampers,
<del> buttonActive: buttonActive,
<add> buttonActive: false,
<ide> moneySaved: nonprofit.moneySaved,
<ide> currentStatus: nonprofit.currentStatus
<ide> }); | 1 |
Text | Text | remove reference to therubyracer from readme.md | 778f5a069a4027a85ab659645edca592d857732b | <ide><path>README.md
<ide> NOTE: Due to the rename, these instructions may be in flux
<ide> builds of Ember.js
<ide>
<ide> If you are building under Linux, you will need a JavaScript runtime for
<del>minification. You can either install nodejs or `gem install
<del>therubyracer`.
<add>minification, for which we recommend installing nodejs. Alternatively
<add>you may have luck with another of the runtimes supported by
<add>[execjs](https://github.com/sstephenson/execjs).
<ide>
<ide> # How to Run Unit Tests
<ide> | 1 |
Java | Java | simplify lambda expression | 58a5138f26fd4a2f9a769ea34a0b3017909e4723 | <ide><path>spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpResponse.java
<ide> public HttpStatus getStatusCode() {
<ide> public MultiValueMap<String, ResponseCookie> getCookies() {
<ide> MultiValueMap<String, ResponseCookie> result = new LinkedMultiValueMap<>();
<ide> this.response.cookies().values().stream().flatMap(Collection::stream)
<del> .forEach(cookie -> {
<del> ResponseCookie responseCookie = ResponseCookie.from(cookie.name(), cookie.value())
<add> .forEach(cookie ->
<add> result.add(cookie.name(), ResponseCookie.from(cookie.name(), cookie.value())
<ide> .domain(cookie.domain())
<ide> .path(cookie.path())
<ide> .maxAge(cookie.maxAge())
<ide> .secure(cookie.isSecure())
<ide> .httpOnly(cookie.isHttpOnly())
<del> .build();
<del> result.add(cookie.name(), responseCookie);
<del> });
<add> .build()));
<ide> return CollectionUtils.unmodifiableMultiValueMap(result);
<ide> }
<ide> | 1 |
Text | Text | document the ready event for http2stream | f98a441bf75f2b0b698a0f9dace218f56386ec4a | <ide><path>doc/api/http2.md
<ide> argument identifying the frame type, and an integer argument identifying the
<ide> error code. The `Http2Stream` instance will be destroyed immediately after the
<ide> `'frameError'` event is emitted.
<ide>
<add>#### Event: `'ready'`
<add><!-- YAML
<add>added: v8.4.0
<add>-->
<add>
<add>The `'ready'` event is emitted when the `Http2Stream` has been opened, has
<add>been assigned an `id`, and can be used. The listener does not expect any
<add>arguments.
<add>
<ide> #### Event: `'timeout'`
<ide> <!-- YAML
<ide> added: v8.4.0 | 1 |
Ruby | Ruby | move code out to active_record_deprecated_finders | d961f490ff1624b7c24a69d546a613768906f05c | <ide><path>activerecord/lib/active_record/relation/batches.rb
<ide> def find_each(options = {})
<ide> # group.each { |person| person.party_all_night! }
<ide> # end
<ide> def find_in_batches(options = {})
<add> options.assert_valid_keys(:start, :batch_size)
<add>
<ide> relation = self
<ide>
<ide> unless arel.orders.blank? && arel.taken.blank?
<ide> ActiveRecord::Base.logger.warn("Scoped order and limit are ignored, it's forced to be batch order and batch size")
<ide> end
<ide>
<del> if (finder_options = options.except(:start, :batch_size)).present?
<del> raise "You can't specify an order, it's forced to be #{batch_order}" if options[:order].present?
<del> raise "You can't specify a limit, it's forced to be the batch_size" if options[:limit].present?
<del>
<del> relation = apply_finder_options(finder_options)
<del> end
<del>
<ide> start = options.delete(:start).to_i
<ide> batch_size = options.delete(:batch_size) || 1000
<ide> | 1 |
Javascript | Javascript | explain meaning of elements in secondary_toolbar | 838802c2d3fcd1a2fd048c74ffb3a4b124d567b6 | <ide><path>web/secondary_toolbar.js
<ide> var SecondaryToolbar = {
<ide>
<ide> // Attach the event listeners.
<ide> var elements = [
<add> // Button to toggle the visibility of the secondary toolbar:
<ide> { element: this.toggleButton, handler: this.toggle },
<add> // All items within the secondary toolbar
<add> // (except for toggleHandTool, hand_tool.js is responsible for it):
<ide> { element: this.presentationModeButton,
<ide> handler: this.presentationModeClick },
<ide> { element: this.openFile, handler: this.openFileClick }, | 1 |
Text | Text | add link to references in net.socket | 42766a818338150f2d5001c451b7e3314362fb27 | <ide><path>doc/api/net.md
<ide> Construct a new socket object.
<ide> `fd` allows you to specify the existing file descriptor of socket.
<ide> Set `readable` and/or `writable` to `true` to allow reads and/or writes on this
<ide> socket (NOTE: Works only when `fd` is passed).
<del>About `allowHalfOpen`, refer to `createServer()` and `'end'` event.
<add>About `allowHalfOpen`, refer to [`net.createServer()`][] and [`'end'`][] event.
<ide>
<ide> `net.Socket` instances are [`EventEmitter`][] with the following events:
<ide>
<ide> Returns true if input is a version 6 IP address, otherwise returns false.
<ide> [`dns.lookup()` hints]: dns.html#dns_supported_getaddrinfo_flags
<ide> [`end()`]: #net_socket_end_data_encoding
<ide> [`EventEmitter`]: events.html#events_class_eventemitter
<add>[`net.createServer()`]: #net_net_createserver_options_connectionlistener
<ide> [`net.Socket`]: #net_class_net_socket
<ide> [`pause()`]: #net_socket_pause
<ide> [`resume()`]: #net_socket_resume | 1 |
PHP | PHP | return null if no referrer is found | ee48b20d1e96a1533b417f3b977d448f8ab38b51 | <ide><path>src/Http/ServerRequest.php
<ide> public function getTrustedProxies(): array
<ide> *
<ide> * @param bool $local Attempt to return a local address.
<ide> * Local addresses do not contain hostnames.
<del> * @return string The referring address for this request.
<add> * @return string|null The referring address for this request or null.
<ide> */
<del> public function referer(bool $local = false): string
<add> public function referer(bool $local = false): ?string
<ide> {
<ide> $ref = $this->getEnv('HTTP_REFERER');
<ide>
<ide> public function referer(bool $local = false): string
<ide> }
<ide> }
<ide>
<del> return '/';
<add> return null;
<ide> }
<ide>
<ide> /**
<ide><path>tests/TestCase/Http/ServerRequestTest.php
<ide> public function testReferer()
<ide>
<ide> $request = $request->withEnv('HTTP_REFERER', '');
<ide> $result = $request->referer(true);
<del> $this->assertSame('/', $result);
<add> $this->assertNull($result);
<ide>
<ide> $result = $request->referer();
<del> $this->assertSame('/', $result);
<add> $this->assertNull($result);
<ide>
<ide> $request = $request->withEnv('HTTP_REFERER', Configure::read('App.fullBaseUrl') . '/some/path');
<ide> $result = $request->referer(true); | 2 |
Javascript | Javascript | fetch existing package details as json | be2eea05cffef91a6670f512f0f2e3a34dab21ed | <ide><path>script/lib/upload-linux-packages.js
<ide> module.exports = async function (packageRepoName, apiToken, version, artifacts)
<ide> const existingPackageDetails =
<ide> await request({
<ide> uri: `https://${apiToken}:@packagecloud.io/api/v1/repos/AtomEditor/${packageRepoName}/package/${type}/${distroName}/${distroVersion}/atom${releaseSuffix || ''}/${arch}/${versionJsonPath}.json`,
<del> method: 'get'
<add> method: 'get',
<add> json: true
<ide> })
<ide>
<ide> if (existingPackageDetails && existingPackageDetails.destroy_url) { | 1 |
Go | Go | remove comment that is no longer relevant | 7b277f62cce939fca8fec4edb8c4b719e492dbeb | <ide><path>daemon/images/service.go
<ide> func (i *ImageService) CreateLayer(container *container.Container, initFunc laye
<ide> StorageOpt: container.HostConfig.StorageOpt,
<ide> }
<ide>
<del> // Indexing by OS is safe here as validation of OS has already been performed in create() (the only
<del> // caller), and guaranteed non-nil
<ide> return i.layerStore.CreateRWLayer(container.ID, layerID, rwLayerOpts)
<ide> }
<ide> | 1 |
Python | Python | add command option --executable | 21b86d3e9ee73a84d5ff458c8520314efe2138a8 | <ide><path>celery/bin/base.py
<ide>
<ide> Optional directory to change to after detaching.
<ide>
<add>.. cmdoption:: --executable
<add>
<add> Executable to use for the detached process.
<add>
<ide> """
<ide> from __future__ import absolute_import, print_function, unicode_literals
<ide>
<ide> def daemon_options(default_pidfile=None, default_logfile=None):
<ide> Option('--uid', default=None),
<ide> Option('--gid', default=None),
<ide> Option('--umask', default=None),
<add> Option('--executable', default=None),
<ide> )
<ide><path>celery/bin/celeryd_detach.py
<ide>
<ide>
<ide> def detach(path, argv, logfile=None, pidfile=None, uid=None,
<del> gid=None, umask=None, working_directory=None, fake=False, app=None):
<add> gid=None, umask=None, working_directory=None, fake=False, app=None,
<add> executable=None):
<ide> fake = 1 if C_FAKEFORK else fake
<ide> with detached(logfile, pidfile, uid, gid, umask, working_directory, fake,
<ide> after_forkers=False):
<ide> try:
<add> if executable is not None:
<add> path = executable
<ide> os.execv(path, [path] + argv)
<ide> except Exception:
<ide> if app is None:
<ide><path>celery/bin/multi.py
<ide> def start(self, argv, cmd):
<ide> self.note('> Starting nodes...')
<ide> for node in multi_args(p, cmd):
<ide> self.note('\t> {0}: '.format(node.name), newline=False)
<del> retcode = self.waitexec(node.argv)
<add> retcode = self.waitexec(node.argv, path=p.options['--executable'])
<ide> self.note(retcode and self.FAILED or self.OK)
<ide> retcodes.append(retcode)
<ide> self.retcode = int(any(retcodes))
<ide> def with_detacher_default_options(self, p):
<ide> '--cmd',
<ide> '-m {0}'.format(celery_exe('worker', '--detach')),
<ide> )
<add> _setdefaultopt(p.options, ['--executable'], sys.executable)
<ide>
<ide> def signal_node(self, nodename, pid, sig):
<ide> try:
<ide> def restart(self, argv, cmd):
<ide> def on_node_shutdown(nodename, argv, pid):
<ide> self.note(self.colored.blue(
<ide> '> Restarting node {0}: '.format(nodename)), newline=False)
<del> retval = self.waitexec(argv)
<add> retval = self.waitexec(argv, path=p.options['--executable'])
<ide> self.note(retval and self.FAILED or self.OK)
<ide> retvals.append(retval)
<ide> | 3 |
Text | Text | add note of caution about non-conforming streams | d67c37725adebfbdee6cb78ea4261833448ddf4c | <ide><path>doc/api/stream.md
<ide> of a stream that are intended for use by consumers (as described in the
<ide> [API for Stream Consumers][] section). Doing so may lead to adverse side effects
<ide> in application code consuming the stream.
<ide>
<add>Avoid overriding public methods such as `write()`, `end()`, `cork()`,
<add>`uncork()`, `read()` and `destroy()`, or emitting internal events such
<add>as `'error'`, `'data'`, `'end'`, `'finish'` and `'close'` through `.emit()`.
<add>Doing so can break current and future stream invariants leading to behavior
<add>and/or compatibility issues with other streams, stream utilities, and user
<add>expectations.
<add>
<ide> ### Simplified Construction
<ide> <!-- YAML
<ide> added: v1.2.0 | 1 |
Text | Text | add the title "more information " to the article | 77246a193d40fde1c3ec3fb436797e826403b527 | <ide><path>guide/english/c/conditional-statements/index.md
<del>---
<del>title: Conditional Statements
<del>---
<del># Conditional Statements in C
<del>Conditional Statements are also known as Branching Statements. They are so called because the program chooses to follow one branch or another.
<del>
<del>## 1. if statement
<del>This is the most simple form of the conditional statements. It consists of a Boolean expression followed by one or more statements. If the Boolean expression evaluates to **true**, then the block of code inside the 'if' statement will be executed. If the Boolean expression evaluates to **false**, then the first set of code after the end of the 'if' statement (after the closing curly brace) will be executed.
<del>
<del>C programming language **_assumes any non-zero and non-null values as true_** and if it is **_either zero or null, then it is assumed as false_** value.
<del>
<del>#### Syntax
<del>```C
<del>if(boolean_expression)
<del>{
<del> //Block of Statements executed when boolean_expression is true
<del>}
<del>```
<del>#### Example
<del>```C
<del>int a = 100;
<del>if(a < 200)
<del>{
<del> printf("a is less than 200\n" );
<del>}
<del>```
<del>#### Result
<del>
<del>`a is less than 200`
<del>
<del>
<del>## 2. if...else statement
<del>If the Boolean expression evaluates to **true**, then the if block will be executed, otherwise, the else block will be executed.
<del>#### Syntax
<del>```C
<del>if(boolean_expression)
<del>{
<del> //Block of Statements executed when boolean_expression is true
<del>}
<del>else
<del>{
<del> //Block of Statements executed when boolean_expression is false
<del>}
<del>```
<del>#### Example
<del>```C
<del>int a = 300;
<del>if(a < 200)
<del>{
<del> printf("a is less than 200\n");
<del>}
<del>else
<del>{
<del> printf("a is more than 200\n");
<del>}
<del>```
<del>#### Result
<del>
<del>`a is more than 200`
<del>
<del>## 3. if...else if...else statement
<del>When using if...else if..else statements, there are few points to keep in mind -
<del>- An **if** can have **zero or one else**'s and it **must come after any else if**'s.
<del>- An **if** can have **zero to many else if**'s and they **must come before the else**.
<del>- Once an **else if** succeeds, none of the remaining else if's or else's will be tested.
<del>
<del>#### Syntax
<del>```C
<del>if(boolean_expression_1)
<del>{
<del> //Block of Statements executed when boolean_expression_1 is true
<del>}
<del>else if(boolean_expression_2)
<del>{
<del> //Block of Statements executed when boolean_expression_1 is false and boolean_expression_2 is true
<del>}
<del>else if(boolean_expression_3)
<del>{
<del> //Block of Statements executed when both boolean_expression_1 and boolean_expression_2 are false and boolean_expression_3 is true
<del>}
<del>else
<del>{
<del> //Block of Statements executed when all boolean_expression_1, boolean_expression_2 and boolean_expression_3 are false
<del>}
<del>```
<del>#### Example
<del>```C
<del>int a = 300;
<del>if(a == 100)
<del>{
<del> printf("a is equal to 100\n");
<del>}
<del>else if(a == 200)
<del>{
<del> printf("a is equal to 200\n");
<del>}
<del>else if(a == 300)
<del>{
<del> printf("a is equal to 300\n");
<del>}
<del>else
<del>{
<del> printf("a is more than 300\n");
<del>}
<del>```
<del>#### Result
<del>
<del>`a is equal to 300`
<del>
<del>## 4. Nested if statement
<del>It is always legal in C programming to nest if-else statements, which means you can use one if or else if statement inside another if or else if statement(s).
<del>#### Syntax
<del>```C
<del>if(boolean_expression_1)
<del>{
<del> //Executed when boolean_expression_1 is true
<del> if(boolean_expression_2)
<del> {
<del> //Executed when both boolean_expression_1 and boolean_expression_2 are true
<del> }
<del>}
<del>
<del>```
<del>#### Example
<del>```C
<del>int a = 100;
<del>int b = 200;
<del>if(a == 100)
<del>{
<del> printf("a is equal to 100\n" );
<del> if(b == 200)
<del> {
<del> printf("b is equal to 200\n");
<del> }
<del>}
<del>
<del>```
<del>#### Result
<del>
<del>```bash
<del>a is equal to 100
<del>b is equal to 200
<del>```
<del>## 5. Switch Case Statement
<del>The switch statement is often faster than nested if...else (not always). Also, the syntax of switch statement is cleaner and easy to understand.
<del>
<del>### Syntax of switch case
<del>```
<del>switch (n)
<del>{
<del> case constant1:
<del> // code to be executed if n is equal to constant1;
<del> break;
<del>
<del> case constant2:
<del> // code to be executed if n is equal to constant2;
<del> break;
<del> .
<del> .
<del> .
<del> default:
<del> // code to be executed if n doesn't match any constant
<del>}
<del>```
<del>When a case constant is found that matches the switch expression, control of the program passes to the block of code associated with that case.
<del>
<del>In the above pseudocode, suppose the value of n is equal to constant2. The compiler will execute the block of code associate with the case statement until the end of switch block, or until the break statement is encountered.
<del>
<del>The break statement is used to prevent the code running into the next case.
<del>
<del>### Example:
<del>```C
<del>// Program to create a simple calculator
<del>// Performs addition, subtraction, multiplication or division depending the input from user
<del>
<del># include <stdio.h>
<del>
<del>int main()
<del>{
<del>
<del> char operator;
<del> double firstNumber,secondNumber;
<del>
<del> printf("Enter an operator (+, -, *, /): ");
<del> scanf("%c", &operator);
<del>
<del> printf("Enter two operands: ");
<del> scanf("%lf %lf",&firstNumber, &secondNumber);
<del>
<del> switch(operator)
<del> {
<del> case '+':
<del> printf("%.1lf + %.1lf = %.1lf",firstNumber, secondNumber, firstNumber+secondNumber);
<del> break;
<del>
<del> case '-':
<del> printf("%.1lf - %.1lf = %.1lf",firstNumber, secondNumber, firstNumber-secondNumber);
<del> break;
<del>
<del> case '*':
<del> printf("%.1lf * %.1lf = %.1lf",firstNumber, secondNumber, firstNumber*secondNumber);
<del> break;
<del>
<del> case '/':
<del> if(secondNumber==0){
<del> printf("division with zero is not allowed\n");
<del> break;
<del> //Avoid runtime error of division with zero
<del> }
<del> printf("%.1lf / %.1lf = %.1lf",firstNumber, secondNumber, firstNumber/secondNumber);
<del> break;
<del>
<del> // operator is doesn't match any case constant (+, -, *, /)
<del> default:
<del> printf("Error! operator is not correct");
<del> }
<del>
<del> return 0;
<del>}
<del>```
<del>### Output
<del>```
<del>Enter an operator (+, -, *,): -
<del>Enter two operands: 32.5
<del>12.4
<del>32.5 - 12.4 = 20.1
<del>```
<del>The '-' operator entered by the user is stored in operator variable. And, two operands 32.5 and 12.4 are stored in variables firstNumber and secondNumber respectively.
<del>
<del>Then, control of the program jumps to
<del>```
<del>printf("%.1lf / %.1lf = %.1lf",firstNumber, secondNumber, firstNumber/firstNumber);
<del>```
<del>Finally, the break statement ends the switch statement.
<del>
<del>If break statement is not used, all cases after the correct case is executed.
<del>
<del>## finding the Bigger among two numbers using if else statement.
<del>```C
<del>int a,b;
<del>printf("Enter the first number: \n");
<del>scanf("%d",&a);
<del>printf("Enter the second number: \n");
<del>scanf("%d",&b);
<del>//comparing the numbers
<del>if(a>b)
<del>{
<del> printf("A is the Bigger number");
<del>}
<del>else
<del>{
<del> printf("B is the bigger number");
<del>}
<del>```
<del>## 6. Ternary operation
<del>
<del>The ternary operator (AKA conditional operator) is an operator that takes three arguments. The first argument is a comparison argument, the second is the result upon a true comparison , and the third is the result upon a flase comparison .It can be thought of as a shortened way of writing an if-else statement. It is often used to to assign variables based on the result of a comparison.
<del>
<del>#### Syntax
<del>```C
<del>v = (conditional_statement) ? value_if_true : value_if_false
<del>
<del>```
<del>#### Example
<del>```C
<del>int a, b = 10, c = 100;
<del>a = (b > c) ? 1 : 2;
<del>printf("%d", a);
<del>```
<del>
<del>#### Result
<del>
<del>`2`
<ide>\ No newline at end of file
<add>---
<add>title: Conditional Statements
<add>---
<add># Conditional Statements in C
<add>Conditional Statements are also known as Branching Statements. They are so called because the program chooses to follow one branch or another.
<add>
<add>## 1. if statement
<add>This is the most simple form of the conditional statements. It consists of a Boolean expression followed by one or more statements. If the Boolean expression evaluates to **true**, then the block of code inside the 'if' statement will be executed. If the Boolean expression evaluates to **false**, then the first set of code after the end of the 'if' statement (after the closing curly brace) will be executed.
<add>
<add>C programming language **_assumes any non-zero and non-null values as true_** and if it is **_either zero or null, then it is assumed as false_** value.
<add>
<add>#### Syntax
<add>```C
<add>if(boolean_expression)
<add>{
<add> //Block of Statements executed when boolean_expression is true
<add>}
<add>```
<add>
<add>#### Example
<add>```C
<add>int a = 100;
<add>if(a < 200)
<add>{
<add> printf("a is less than 200\n" );
<add>}
<add>```
<add>
<add>#### Result
<add>`a is less than 200`
<add>
<add>## 2. if...else statement
<add>If the Boolean expression evaluates to **true**, then the if block will be executed, otherwise, the else block will be executed.
<add>
<add>#### Syntax
<add>```C
<add>if(boolean_expression)
<add>{
<add> //Block of Statements executed when boolean_expression is true
<add>}
<add>else
<add>{
<add> //Block of Statements executed when boolean_expression is false
<add>}
<add>```
<add>
<add>#### Example
<add>```C
<add>int a = 300;
<add>if(a < 200)
<add>{
<add> printf("a is less than 200\n");
<add>}
<add>else
<add>{
<add> printf("a is more than 200\n");
<add>}
<add>```
<add>
<add>#### Result
<add>`a is more than 200`
<add>
<add>## 3. if...else if...else statement
<add>When using if...else if..else statements, there are few points to keep in mind -
<add>- An **if** can have **zero or one else**'s and it **must come after any else if**'s.
<add>- An **if** can have **zero to many else if**'s and they **must come before the else**.
<add>- Once an **else if** succeeds, none of the remaining else if's or else's will be tested.
<add>
<add>#### Syntax
<add>```C
<add>if(boolean_expression_1)
<add>{
<add> //Block of Statements executed when boolean_expression_1 is true
<add>}
<add>else if(boolean_expression_2)
<add>{
<add> //Block of Statements executed when boolean_expression_1 is false and boolean_expression_2 is true
<add>}
<add>else if(boolean_expression_3)
<add>{
<add> //Block of Statements executed when both boolean_expression_1 and boolean_expression_2 are false and boolean_expression_3 is true
<add>}
<add>else
<add>{
<add> //Block of Statements executed when all boolean_expression_1, boolean_expression_2 and boolean_expression_3 are false
<add>}
<add>```
<add>
<add>#### Example
<add>```C
<add>int a = 300;
<add>if(a == 100)
<add>{
<add> printf("a is equal to 100\n");
<add>}
<add>else if(a == 200)
<add>{
<add> printf("a is equal to 200\n");
<add>}
<add>else if(a == 300)
<add>{
<add> printf("a is equal to 300\n");
<add>}
<add>else
<add>{
<add> printf("a is more than 300\n");
<add>}
<add>```
<add>
<add>#### Result
<add>`a is equal to 300`
<add>
<add>## 4. Nested if statement
<add>It is always legal in C programming to nest if-else statements, which means you can use one if or else if statement inside another if or else if statement(s).
<add>
<add>#### Syntax
<add>```C
<add>if(boolean_expression_1)
<add>{
<add> //Executed when boolean_expression_1 is true
<add> if(boolean_expression_2)
<add> {
<add> //Executed when both boolean_expression_1 and boolean_expression_2 are true
<add> }
<add>}
<add>
<add>```
<add>#### Example
<add>```C
<add>int a = 100;
<add>int b = 200;
<add>if(a == 100)
<add>{
<add> printf("a is equal to 100\n" );
<add> if(b == 200)
<add> {
<add> printf("b is equal to 200\n");
<add> }
<add>}
<add>
<add>```
<add>#### Result
<add>```bash
<add>a is equal to 100
<add>b is equal to 200
<add>```
<add>
<add>## 5. Switch Case Statement
<add>The switch statement is often faster than nested if...else (not always). Also, the syntax of switch statement is cleaner and easy to understand.
<add>
<add>### Syntax of switch case
<add>```
<add>switch (n)
<add>{
<add> case constant1:
<add> // code to be executed if n is equal to constant1;
<add> break;
<add>
<add> case constant2:
<add> // code to be executed if n is equal to constant2;
<add> break;
<add> .
<add> .
<add> .
<add> default:
<add> // code to be executed if n doesn't match any constant
<add>}
<add>```
<add>
<add>When a case constant is found that matches the switch expression, control of the program passes to the block of code associated with that case.
<add>
<add>In the above pseudocode, suppose the value of n is equal to constant2. The compiler will execute the block of code associate with the case statement until the end of switch block, or until the break statement is encountered.
<add>
<add>The break statement is used to prevent the code running into the next case.
<add>
<add>### Example:
<add>```
<add>// Program to create a simple calculator
<add>// Performs addition, subtraction, multiplication or division depending the input from user
<add>
<add># include <stdio.h>
<add>
<add>int main()
<add>{
<add>
<add> char operator;
<add> double firstNumber,secondNumber;
<add>
<add> printf("Enter an operator (+, -, *, /): ");
<add> scanf("%c", &operator);
<add>
<add> printf("Enter two operands: ");
<add> scanf("%lf %lf",&firstNumber, &secondNumber);
<add>
<add> switch(operator)
<add> {
<add> case '+':
<add> printf("%.1lf + %.1lf = %.1lf",firstNumber, secondNumber, firstNumber+secondNumber);
<add> break;
<add>
<add> case '-':
<add> printf("%.1lf - %.1lf = %.1lf",firstNumber, secondNumber, firstNumber-secondNumber);
<add> break;
<add>
<add> case '*':
<add> printf("%.1lf * %.1lf = %.1lf",firstNumber, secondNumber, firstNumber*secondNumber);
<add> break;
<add>
<add> case '/':
<add> printf("%.1lf / %.1lf = %.1lf",firstNumber, secondNumber, firstNumber/secondNumber);
<add> break;
<add>
<add> // operator is doesn't match any case constant (+, -, *, /)
<add> default:
<add> printf("Error! operator is not correct");
<add> }
<add>
<add> return 0;
<add>}
<add>```
<add>
<add>### Output
<add>```
<add>Enter an operator (+, -, *,): -
<add>Enter two operands: 32.5
<add>12.4
<add>32.5 - 12.4 = 20.1
<add>```
<add>The '-' operator entered by the user is stored in operator variable. And, two operands 32.5 and 12.4 are stored in variables firstNumber and secondNumber respectively.
<add>
<add>Then, control of the program jumps to
<add>```
<add>printf("%.1lf / %.1lf = %.1lf",firstNumber, secondNumber, firstNumber/firstNumber);
<add>```
<add>Finally, the break statement ends the switch statement.
<add>
<add>If break statement is not used, all cases after the correct case is executed.
<add>
<add>## 6. Ternary operation
<add>The ternary operator (AKA conditional operator) is an operator that takes three arguments. The first argument is a comparison argument, the second is the result upon a true comparison , and the third is the result upon a flase comparison .It can be thought of as a shortened way of writing an if-else statement. It is often used to to assign variables based on the result of a comparison.
<add>
<add>#### Syntax
<add>```C
<add>v = (conditional_statement) ? value_if_true : value_if_false
<add>```
<add>
<add>#### Example
<add>```C
<add>int a, b = 10, c = 100;
<add>a = (b > c) ? 1 : 2;
<add>printf("%d", a);
<add>```
<add>
<add>#### Result
<add>`2`
<add>
<add>### More Information
<add>https://www.dotnettricks.com/learn/c/conditional-statements-if-else-switch-ladder
<add>https://www.programiz.com/c-programming/c-if-else-statement
<add>http://www.tutorialspoint.com/ansi_c/c_control_statements.htm
<add>
<add> | 1 |
Go | Go | fix flaky test `testgetcontainerstatsrmrunning` | 9a9ce80a0f5214011ddf68f93894b1c046435a8d | <ide><path>integration-cli/docker_api_containers_test.go
<ide> func (s *DockerSuite) TestGetContainerStatsRmRunning(c *check.C) {
<ide>
<ide> buf := &integration.ChannelBuffer{make(chan []byte, 1)}
<ide> defer buf.Close()
<del> chErr := make(chan error)
<add> chErr := make(chan error, 1)
<ide> go func() {
<ide> _, body, err := sockRequestRaw("GET", "/containers/"+id+"/stats?stream=1", nil, "application/json")
<ide> if err != nil {
<ide> func (s *DockerSuite) TestGetContainerStatsRmRunning(c *check.C) {
<ide> chErr <- err
<ide> }()
<ide> defer func() {
<del> c.Assert(<-chErr, checker.IsNil)
<add> select {
<add> case err := <-chErr:
<add> c.Assert(err, checker.IsNil)
<add> default:
<add> return
<add> }
<ide> }()
<ide>
<ide> b := make([]byte, 32)
<ide> func (s *DockerSuite) TestGetContainerStatsRmRunning(c *check.C) {
<ide> c.Assert(err, checker.Not(checker.IsNil), check.Commentf("rm should have failed but didn't"))
<ide> _, err = buf.ReadTimeout(b, 2*time.Second)
<ide> c.Assert(err, checker.IsNil)
<del> dockerCmd(c, "rm", "-f", id)
<ide>
<del> _, err = buf.ReadTimeout(b, 2*time.Second)
<del> c.Assert(err, checker.Not(checker.IsNil))
<add> dockerCmd(c, "kill", id)
<ide> }
<ide>
<ide> // regression test for gh13421 | 1 |
Ruby | Ruby | add master key to `gitignore` on `rails new` | f27319a72a4ccfbffc575b752e4d91136f23725e | <ide><path>railties/lib/rails/generators/rails/app/app_generator.rb
<ide> def master_key
<ide> return if options[:pretend] || options[:dummy_app]
<ide>
<ide> require "rails/generators/rails/master_key/master_key_generator"
<del> Rails::Generators::MasterKeyGenerator.new([], quiet: options[:quiet]).add_master_key_file_silently
<add> master_key_generator = Rails::Generators::MasterKeyGenerator.new([], quiet: options[:quiet])
<add> master_key_generator.add_master_key_file_silently
<add> master_key_generator.ignore_master_key_file_silently
<ide> end
<ide>
<ide> def credentials
<ide><path>railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb
<ide> def ignore_key_file(key_path, ignore: key_ignore(key_path))
<ide> end
<ide> end
<ide>
<add> def ignore_key_file_silently(key_path, ignore: key_ignore(key_path))
<add> append_to_file ".gitignore", ignore if File.exist?(".gitignore")
<add> end
<add>
<ide> private
<ide> def key_ignore(key_path)
<ide> [ "", "/#{key_path}", "" ].join("\n")
<ide><path>railties/lib/rails/generators/rails/master_key/master_key_generator.rb
<ide> def ignore_master_key_file
<ide> key_file_generator.ignore_key_file(MASTER_KEY_PATH, ignore: key_ignore)
<ide> end
<ide>
<add> def ignore_master_key_file_silently
<add> key_file_generator.ignore_key_file_silently(MASTER_KEY_PATH, ignore: key_ignore)
<add> end
<add>
<ide> private
<ide> def key_file_generator
<ide> EncryptionKeyFileGenerator.new([], options)
<ide><path>railties/test/generators/app_generator_test.rb
<ide> def test_after_bundle_callback
<ide> assert_equal 5, @sequence_step
<ide> end
<ide>
<add> def test_gitignore
<add> run_generator
<add>
<add> assert_file ".gitignore" do |content|
<add> assert_match(/config\/master\.key/, content)
<add> end
<add> end
<add>
<ide> def test_system_tests_directory_generated
<ide> run_generator
<ide> | 4 |
Ruby | Ruby | fix the doc on the `indexdefinition` [ci skip] | ee8beaa41bbe6ed47d40be45ce37abb3fb1b79be | <ide><path>activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
<ide> module ActiveRecord
<ide> module ConnectionAdapters #:nodoc:
<ide> # Abstract representation of an index definition on a table. Instances of
<ide> # this type are typically created and returned by methods in database
<del> # adapters. e.g. ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter#indexes
<add> # adapters. e.g. ActiveRecord::ConnectionAdapters::MySQL::SchemaStatements#indexes
<ide> class IndexDefinition # :nodoc:
<ide> attr_reader :table, :name, :unique, :columns, :lengths, :orders, :where, :type, :using, :comment
<ide> | 1 |
PHP | PHP | simplify authentication. remove service | d5f285ba8b36e4533b4b9b228285dd2c941866cc | <ide><path>app/Http/Controllers/Auth/AuthController.php
<del><?php namespace App\Http\Controllers\Auth;
<del>
<del>use App\Http\Controllers\Controller;
<del>use Illuminate\Contracts\Auth\Guard;
<del>use Illuminate\Contracts\Auth\Registrar;
<del>use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
<del>
<del>class AuthController extends Controller {
<del>
<del> /*
<del> |--------------------------------------------------------------------------
<del> | Registration & Login Controller
<del> |--------------------------------------------------------------------------
<del> |
<del> | This controller handles the registration of new users, as well as the
<del> | authentication of existing users. By default, this controller uses
<del> | a simple trait to add these behaviors. Why don't you explore it?
<del> |
<del> */
<del>
<del> use AuthenticatesAndRegistersUsers;
<del>
<del> /**
<del> * Create a new authentication controller instance.
<del> *
<del> * @param \Illuminate\Contracts\Auth\Guard $auth
<del> * @param \Illuminate\Contracts\Auth\Registrar $registrar
<del> * @return void
<del> */
<del> public function __construct(Guard $auth, Registrar $registrar)
<del> {
<del> $this->auth = $auth;
<del> $this->registrar = $registrar;
<del>
<del> $this->middleware('guest', ['except' => 'getLogout']);
<del> }
<del>
<del>}
<ide><path>app/Providers/AppServiceProvider.php
<ide> public function boot()
<ide> /**
<ide> * Register any application services.
<ide> *
<del> * This service provider is a great spot to register your various container
<del> * bindings with the application. As you can see, we are registering our
<del> * "Registrar" implementation here. You can add your own bindings too!
<del> *
<ide> * @return void
<ide> */
<ide> public function register()
<ide> {
<del> $this->app->bind(
<del> 'Illuminate\Contracts\Auth\Registrar',
<del> 'App\Services\Registrar'
<del> );
<add> //
<ide> }
<ide>
<ide> }
<ide><path>app/Services/Registrar.php
<del><?php namespace App\Services;
<del>
<del>use App\User;
<del>use Validator;
<del>use Illuminate\Contracts\Auth\Registrar as RegistrarContract;
<del>
<del>class Registrar implements RegistrarContract {
<del>
<del> /**
<del> * Get a validator for an incoming registration request.
<del> *
<del> * @param array $data
<del> * @return \Illuminate\Contracts\Validation\Validator
<del> */
<del> public function validator(array $data)
<del> {
<del> return Validator::make($data, [
<del> 'name' => 'required|max:255',
<del> 'email' => 'required|email|max:255|unique:users',
<del> 'password' => 'required|confirmed|min:6',
<del> ]);
<del> }
<del>
<del> /**
<del> * Create a new user instance after a valid registration.
<del> *
<del> * @param array $data
<del> * @return User
<del> */
<del> public function create(array $data)
<del> {
<del> return User::create([
<del> 'name' => $data['name'],
<del> 'email' => $data['email'],
<del> 'password' => bcrypt($data['password']),
<del> ]);
<del> }
<del>
<del>} | 3 |
Go | Go | add a getprefixandslashfromdaemonplatform … | 382c96ee7b02f393e7515e4cc4882738398b86a6 | <ide><path>integration-cli/docker_api_volumes_test.go
<ide> import (
<ide> )
<ide>
<ide> func (s *DockerSuite) TestVolumesApiList(c *check.C) {
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide> dockerCmd(c, "run", "-d", "-v", prefix+"/foo", "busybox")
<ide>
<ide> status, b, err := sockRequest("GET", "/volumes", nil)
<ide> func (s *DockerSuite) TestVolumesApiCreate(c *check.C) {
<ide> }
<ide>
<ide> func (s *DockerSuite) TestVolumesApiRemove(c *check.C) {
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide> dockerCmd(c, "run", "-d", "-v", prefix+"/foo", "--name=test", "busybox")
<ide>
<ide> status, b, err := sockRequest("GET", "/volumes", nil)
<ide><path>integration-cli/docker_cli_create_test.go
<ide> func (s *DockerSuite) TestCreateWithWorkdir(c *check.C) {
<ide> c.Skip("Fails on Windows CI")
<ide> }
<ide> name := "foo"
<del> slash := "/"
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> slash = `/`
<del> }
<add>
<add> prefix, slash := getPrefixAndSlashFromDaemonPlatform()
<ide> dir := prefix + slash + "home" + slash + "foo" + slash + "bar"
<ide>
<ide> dockerCmd(c, "create", "--name", name, "-w", dir, "busybox")
<ide><path>integration-cli/docker_cli_rm_test.go
<ide> import (
<ide> func (s *DockerSuite) TestRmContainerWithRemovedVolume(c *check.C) {
<ide> testRequires(c, SameHostDaemon)
<ide>
<del> prefix := ""
<del> slash := "/"
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> slash = `\`
<del> }
<add> prefix, slash := getPrefixAndSlashFromDaemonPlatform()
<ide>
<ide> tempDir, err := ioutil.TempDir("", "test-rm-container-with-removed-volume-")
<ide> if err != nil {
<ide> func (s *DockerSuite) TestRmContainerWithRemovedVolume(c *check.C) {
<ide> }
<ide>
<ide> func (s *DockerSuite) TestRmContainerWithVolume(c *check.C) {
<del> prefix := ""
<del> slash := "/"
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> slash = `\`
<del> }
<add> prefix, slash := getPrefixAndSlashFromDaemonPlatform()
<ide>
<ide> dockerCmd(c, "run", "--name", "foo", "-v", prefix+slash+"srv", "busybox", "true")
<ide>
<ide><path>integration-cli/docker_cli_run_test.go
<ide> func (s *DockerSuite) TestRunAllocatePortInReservedRange(c *check.C) {
<ide> func (s *DockerSuite) TestRunMountOrdering(c *check.C) {
<ide> // TODO Windows: Post TP4. Updated, but Windows does not support nested mounts currently.
<ide> testRequires(c, SameHostDaemon, DaemonIsLinux, NotUserNamespace)
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide>
<ide> tmpDir, err := ioutil.TempDir("", "docker_nested_mount_test")
<ide> if err != nil {
<ide> func (s *DockerSuite) TestRunMountOrdering(c *check.C) {
<ide> func (s *DockerSuite) TestRunReuseBindVolumeThatIsSymlink(c *check.C) {
<ide> // Not applicable on Windows as Windows does not support volumes
<ide> testRequires(c, SameHostDaemon, DaemonIsLinux, NotUserNamespace)
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide>
<ide> tmpDir, err := ioutil.TempDir(os.TempDir(), "testlink")
<ide> if err != nil {
<ide> func (s *DockerSuite) TestRunNoOutputFromPullInStdout(c *check.C) {
<ide>
<ide> func (s *DockerSuite) TestRunVolumesCleanPaths(c *check.C) {
<ide> testRequires(c, SameHostDaemon)
<del> prefix := ""
<del> slash := `/`
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> slash = `\`
<del> }
<add> prefix, slash := getPrefixAndSlashFromDaemonPlatform()
<ide> if _, err := buildImage("run_volumes_clean_paths",
<ide> `FROM busybox
<ide> VOLUME `+prefix+`/foo/`,
<ide> func (s *DockerSuite) TestRunContainerWithReadonlyRootfsWithAddHostFlag(c *check
<ide> }
<ide>
<ide> func (s *DockerSuite) TestRunVolumesFromRestartAfterRemoved(c *check.C) {
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide> dockerCmd(c, "run", "-d", "--name", "voltest", "-v", prefix+"/foo", "busybox", "sleep", "60")
<ide> dockerCmd(c, "run", "-d", "--name", "restarter", "--volumes-from", "voltest", "busybox", "sleep", "60")
<ide>
<ide> func (s *DockerSuite) TestRunCapAddCHOWN(c *check.C) {
<ide> func (s *DockerSuite) TestVolumeFromMixedRWOptions(c *check.C) {
<ide> // TODO Windows post TP4. Enable the read-only bits once they are
<ide> // supported on the platform.
<del> prefix := ""
<del> slash := `/`
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> slash = `\`
<del> }
<add> prefix, slash := getPrefixAndSlashFromDaemonPlatform()
<ide>
<ide> dockerCmd(c, "run", "--name", "parent", "-v", prefix+"/test", "busybox", "true")
<ide> if daemonPlatform != "windows" {
<ide> func (s *DockerSuite) TestRunCreateContainerFailedCleanUp(c *check.C) {
<ide> }
<ide>
<ide> func (s *DockerSuite) TestRunNamedVolume(c *check.C) {
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide> testRequires(c, DaemonIsLinux)
<ide> dockerCmd(c, "run", "--name=test", "-v", "testing:"+prefix+"/foo", "busybox", "sh", "-c", "echo hello > "+prefix+"/foo/bar")
<ide>
<ide> func (s *DockerSuite) TestRunNamedVolumeCopyImageData(c *check.C) {
<ide> }
<ide>
<ide> func (s *DockerSuite) TestRunNamedVolumeNotRemoved(c *check.C) {
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide>
<ide> dockerCmd(c, "volume", "create", "--name", "test")
<ide>
<ide> func (s *DockerSuite) TestRunNamedVolumeNotRemoved(c *check.C) {
<ide> }
<ide>
<ide> func (s *DockerSuite) TestRunNamedVolumesFromNotRemoved(c *check.C) {
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide>
<ide> dockerCmd(c, "volume", "create", "--name", "test")
<ide> dockerCmd(c, "run", "--name=parent", "-v", "test:"+prefix+"/foo", "-v", prefix+"/bar", "busybox", "true")
<ide><path>integration-cli/docker_cli_volume_test.go
<ide> func (s *DockerSuite) TestVolumeCliInspectMulti(c *check.C) {
<ide> }
<ide>
<ide> func (s *DockerSuite) TestVolumeCliLs(c *check.C) {
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide> out, _ := dockerCmd(c, "volume", "create")
<ide> id := strings.TrimSpace(out)
<ide>
<ide> func (s *DockerSuite) TestVolumeCliLs(c *check.C) {
<ide> }
<ide>
<ide> func (s *DockerSuite) TestVolumeCliLsFilterDangling(c *check.C) {
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide> dockerCmd(c, "volume", "create", "--name", "testnotinuse1")
<ide> dockerCmd(c, "volume", "create", "--name", "testisinuse1")
<ide> dockerCmd(c, "volume", "create", "--name", "testisinuse2")
<ide> func (s *DockerSuite) TestVolumeCliLsWithIncorrectFilterValue(c *check.C) {
<ide> }
<ide>
<ide> func (s *DockerSuite) TestVolumeCliRm(c *check.C) {
<del> prefix := ""
<del> if daemonPlatform == "windows" {
<del> prefix = "c:"
<del> }
<add> prefix, _ := getPrefixAndSlashFromDaemonPlatform()
<ide> out, _ := dockerCmd(c, "volume", "create")
<ide> id := strings.TrimSpace(out)
<ide>
<ide><path>integration-cli/utils.go
<ide> import (
<ide> "github.com/docker/docker/pkg/integration"
<ide> )
<ide>
<add>func getPrefixAndSlashFromDaemonPlatform() (prefix, slash string) {
<add> if daemonPlatform == "windows" {
<add> return "c:", `\`
<add> }
<add> return "", "/"
<add>}
<add>
<ide> func getExitCode(err error) (int, error) {
<ide> return integration.GetExitCode(err)
<ide> } | 6 |
Text | Text | use sentence case in issues.md headers | ad6ea3cf1e116742ff7fda33cc5c9346e5a9b38c | <ide><path>doc/guides/contributing/issues.md
<ide> # Issues
<ide>
<del>* [Asking for General Help](#asking-for-general-help)
<add>* [Asking for general help](#asking-for-general-help)
<ide> * [Discussing non-technical topics](#discussing-non-technical-topics)
<del>* [Submitting a Bug Report](#submitting-a-bug-report)
<del>* [Triaging a Bug Report](#triaging-a-bug-report)
<add>* [Submitting a bug report](#submitting-a-bug-report)
<add>* [Triaging a bug report](#triaging-a-bug-report)
<ide>
<del>## Asking for General Help
<add>## Asking for general help
<ide>
<ide> Because the level of activity in the `nodejs/node` repository is so high,
<ide> questions or requests for general help using Node.js should be directed at
<ide> the [Node.js help repository][].
<ide> Discussion of non-technical topics (such as intellectual property and trademark)
<ide> should be directed to the [Technical Steering Committee (TSC) repository][].
<ide>
<del>## Submitting a Bug Report
<add>## Submitting a bug report
<ide>
<ide> When opening a new issue in the `nodejs/node` issue tracker, users will be
<ide> presented with a choice of issue templates. If you believe that you have
<ide> Node.js changed that broke the module.
<ide>
<ide> See [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve).
<ide>
<del>## Triaging a Bug Report
<add>## Triaging a bug report
<ide>
<ide> Once an issue has been opened, it is common for there to be discussion
<ide> around it. Some contributors may have differing opinions about the issue, | 1 |
Javascript | Javascript | ensure default name for record in tostring | d7e63459b952a1c2a1c0a181e44c892c6bf08aa5 | <ide><path>dist/immutable.js
<ide> }
<ide>
<ide> function recordName(record) {
<del> return record._name || record.constructor.name;
<add> return record._name || record.constructor.name || 'Record';
<ide> }
<ide>
<ide> function deepEqual(a, b) {
<ide><path>dist/immutable.min.js
<ide> * LICENSE file in the root directory of this source tree. An additional grant
<ide> * of patent rights can be found in the PATENTS file in the same directory.
<ide> */
<del>!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Immutable=e()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return t.value=!1,t}function r(t){t&&(t.value=!0)}function n(){}function i(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function o(t){return void 0===t.size&&(t.size=t.__iterate(s)),t.size}function u(t,e){return e>=0?+e:o(t)+ +e}function s(){return!0}function a(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function h(t,e){return c(t,e,0)}function f(t,e){return c(t,e,e)}function c(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function _(t){return y(t)?t:O(t)}function p(t){return d(t)?t:x(t)}function v(t){return m(t)?t:k(t)}function l(t){return y(t)&&!g(t)?t:A(t)}function y(t){return!(!t||!t[_r])}function d(t){return!(!t||!t[pr])}function m(t){return!(!t||!t[vr])}function g(t){return d(t)||m(t)}function w(t){return!(!t||!t[lr])}function S(t){this.next=t}function z(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function I(){return{value:void 0,done:!0}}function b(t){return!!M(t)}function q(t){return t&&"function"==typeof t.next}function D(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(gr&&t[gr]||t[wr]);return"function"==typeof e?e:void 0}function E(t){return t&&"number"==typeof t.length}function O(t){return null===t||void 0===t?T():y(t)?t.toSeq():C(t)}function x(t){return null===t||void 0===t?T().toKeyedSeq():y(t)?d(t)?t.toSeq():t.fromEntrySeq():W(t)}function k(t){return null===t||void 0===t?T():y(t)?d(t)?t.entrySeq():t.toIndexedSeq():B(t)}function A(t){return(null===t||void 0===t?T():y(t)?d(t)?t.entrySeq():t:B(t)).toSetSeq()}function j(t){this._array=t,this.size=t.length}function U(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function K(t){this._iterable=t,this.size=t.length||t.size;
<add>!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Immutable=e()}(this,function(){"use strict";function t(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function e(t){return t.value=!1,t}function r(t){t&&(t.value=!0)}function n(){}function i(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=Array(r),i=0;r>i;i++)n[i]=t[i+e];return n}function o(t){return void 0===t.size&&(t.size=t.__iterate(s)),t.size}function u(t,e){return e>=0?+e:o(t)+ +e}function s(){return!0}function a(t,e,r){return(0===t||void 0!==r&&-r>=t)&&(void 0===e||void 0!==r&&e>=r)}function h(t,e){return c(t,e,0)}function f(t,e){return c(t,e,e)}function c(t,e,r){return void 0===t?r:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function _(t){return y(t)?t:O(t)}function p(t){return d(t)?t:x(t)}function v(t){return m(t)?t:k(t)}function l(t){return y(t)&&!g(t)?t:A(t)}function y(t){return!(!t||!t[_r])}function d(t){return!(!t||!t[pr])}function m(t){return!(!t||!t[vr])}function g(t){return d(t)||m(t)}function w(t){return!(!t||!t[lr])}function S(t){this.next=t}function z(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function I(){return{value:void 0,done:!0}}function b(t){return!!M(t)}function q(t){return t&&"function"==typeof t.next}function D(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(gr&&t[gr]||t[wr]);return"function"==typeof e?e:void 0}function E(t){return t&&"number"==typeof t.length}function O(t){return null===t||void 0===t?T():y(t)?t.toSeq():C(t)}function x(t){return null===t||void 0===t?T().toKeyedSeq():y(t)?d(t)?t.toSeq():t.fromEntrySeq():W(t)}function k(t){return null===t||void 0===t?T():y(t)?d(t)?t.entrySeq():t.toIndexedSeq():B(t)}function A(t){return(null===t||void 0===t?T():y(t)?d(t)?t.entrySeq():t:B(t)).toSetSeq()}function j(t){this._array=t,this.size=t.length}function R(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function U(t){this._iterable=t,this.size=t.length||t.size;
<ide>
<del>}function R(t){this._iterator=t,this._iteratorCache=[]}function L(t){return!(!t||!t[zr])}function T(){return Ir||(Ir=new j([]))}function W(t){var e=Array.isArray(t)?new j(t).fromEntrySeq():q(t)?new R(t).fromEntrySeq():b(t)?new K(t).fromEntrySeq():"object"==typeof t?new U(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function B(t){var e=J(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function C(t){var e=J(t)||"object"==typeof t&&new U(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function J(t){return E(t)?new j(t):q(t)?new R(t):b(t)?new K(t):void 0}function P(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var s=i[r?o-u:u];if(e(s[1],n?s[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,r)}function H(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new S(function(){var t=i[r?o-u:u];return u++>o?I():z(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function N(){throw TypeError("Abstract")}function V(){}function Y(){}function Q(){}function X(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function F(t,e){return e?G(e,t,"",{"":t}):Z(t)}function G(t,e,r,n){return Array.isArray(e)?t.call(n,r,k(e).map(function(r,n){return G(t,r,n,e)})):$(e)?t.call(n,r,x(e).map(function(r,n){return G(t,r,n,e)})):e}function Z(t){return Array.isArray(t)?k(t).map(Z).toList():$(t)?x(t).map(Z).toMap():t}function $(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;
<add>}function K(t){this._iterator=t,this._iteratorCache=[]}function L(t){return!(!t||!t[zr])}function T(){return Ir||(Ir=new j([]))}function W(t){var e=Array.isArray(t)?new j(t).fromEntrySeq():q(t)?new K(t).fromEntrySeq():b(t)?new U(t).fromEntrySeq():"object"==typeof t?new R(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function B(t){var e=J(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function C(t){var e=J(t)||"object"==typeof t&&new R(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function J(t){return E(t)?new j(t):q(t)?new K(t):b(t)?new U(t):void 0}function P(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,u=0;o>=u;u++){var s=i[r?o-u:u];if(e(s[1],n?s[0]:u,t)===!1)return u+1}return u}return t.__iterateUncached(e,r)}function H(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,u=0;return new S(function(){var t=i[r?o-u:u];return u++>o?I():z(e,n?t[0]:u-1,t[1])})}return t.__iteratorUncached(e,r)}function N(){throw TypeError("Abstract")}function V(){}function Y(){}function Q(){}function X(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return"function"==typeof t.equals&&"function"==typeof e.equals&&t.equals(e)?!0:!1}function F(t,e){return e?G(e,t,"",{"":t}):Z(t)}function G(t,e,r,n){return Array.isArray(e)?t.call(n,r,k(e).map(function(r,n){return G(t,r,n,e)})):$(e)?t.call(n,r,x(e).map(function(r,n){return G(t,r,n,e)})):e}function Z(t){return Array.isArray(t)?k(t).map(Z).toList():$(t)?x(t).map(Z).toMap():t}function $(t){return t&&(t.constructor===Object||void 0===t.constructor)}function tt(t){return t>>>1&1073741824|3221225471&t}function et(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;
<ide>
<del>if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return tt(r)}return"string"===e?t.length>kr?rt(t):nt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function rt(t){var e=Ur[t];return void 0===e&&(e=nt(t),jr===Ar&&(jr=0,Ur={}),jr++,Ur[t]=e),e}function nt(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)|0;return tt(e)}function it(t){var e;if(Er&&(e=br.get(t),void 0!==e))return e;if(e=t[xr],void 0!==e)return e;if(!Mr){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[xr],void 0!==e)return e;if(e=ot(t),void 0!==e)return e}if(e=++Or,1073741824&Or&&(Or=0),Er)br.set(t,e);else{if(void 0!==Dr&&Dr(t)===!1)throw Error("Non-extensible objects are not allowed as keys.");if(Mr)Object.defineProperty(t,xr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[xr]=e;else{if(void 0===t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[xr]=e}}return e}function ot(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw Error(e)}function st(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function at(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ht(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function _t(t){var e=jt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.contains(e)},e.contains=function(e){return t.has(e)},e.cacheResult=Ut,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===mr){
<del>var n=t.__iterator(e,r);return new S(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===dr?yr:dr,r)},e}function pt(t,e,r){var n=jt(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,hr);return o===hr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(mr,i);return new S(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return z(n,s,e.call(r,u[1],s,t),i)})},n}function vt(t,e){var r=jt(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=_t(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.contains=function(e){return t.contains(e)},r.cacheResult=Ut,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function lt(t,e,r,n){var i=jt(t);return n&&(i.has=function(n){var i=t.get(n,hr);return i!==hr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,hr);return o!==hr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate(function(t,o,a){return e.call(r,t,o,a)?(s++,i(t,n?o:s-1,u)):void 0},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(mr,o),s=0;return new S(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,h=a[0],f=a[1];if(e.call(r,f,h,t))return z(i,n?h:s++,f,o)}})},i}function yt(t,e,r){var n=Lt().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function dt(t,e,r){var n=d(t),i=(w(t)?Ie():Lt()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=At(t);return i.map(function(e){return Ot(t,o(e))})}function mt(t,e,r,n){var i=t.size;if(a(e,r,i))return t;
<add>if("number"===e){var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)t/=4294967295,r^=t;return tt(r)}return"string"===e?t.length>kr?rt(t):nt(t):"function"==typeof t.hashCode?t.hashCode():it(t)}function rt(t){var e=Rr[t];return void 0===e&&(e=nt(t),jr===Ar&&(jr=0,Rr={}),jr++,Rr[t]=e),e}function nt(t){for(var e=0,r=0;t.length>r;r++)e=31*e+t.charCodeAt(r)|0;return tt(e)}function it(t){var e;if(Er&&(e=br.get(t),void 0!==e))return e;if(e=t[xr],void 0!==e)return e;if(!Mr){if(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[xr],void 0!==e)return e;if(e=ot(t),void 0!==e)return e}if(e=++Or,1073741824&Or&&(Or=0),Er)br.set(t,e);else{if(void 0!==Dr&&Dr(t)===!1)throw Error("Non-extensible objects are not allowed as keys.");if(Mr)Object.defineProperty(t,xr,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[xr]=e;else{if(void 0===t.nodeType)throw Error("Unable to set a non-enumerable property on object.");t[xr]=e}}return e}function ot(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function ut(t,e){if(!t)throw Error(e)}function st(t){ut(t!==1/0,"Cannot perform this action with an infinite size.")}function at(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ht(t){this._iter=t,this.size=t.size}function ft(t){this._iter=t,this.size=t.size}function ct(t){this._iter=t,this.size=t.size}function _t(t){var e=jt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.contains(e)},e.contains=function(e){return t.has(e)},e.cacheResult=Rt,e.__iterateUncached=function(e,r){var n=this;return t.__iterate(function(t,r){return e(r,t,n)!==!1},r)},e.__iteratorUncached=function(e,r){if(e===mr){
<add>var n=t.__iterator(e,r);return new S(function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===dr?yr:dr,r)},e}function pt(t,e,r){var n=jt(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,hr);return o===hr?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate(function(t,i,u){return n(e.call(r,t,i,u),i,o)!==!1},i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(mr,i);return new S(function(){var i=o.next();if(i.done)return i;var u=i.value,s=u[0];return z(n,s,e.call(r,u[1],s,t),i)})},n}function vt(t,e){var r=jt(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=_t(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.contains=function(e){return t.contains(e)},r.cacheResult=Rt,r.__iterate=function(e,r){var n=this;return t.__iterate(function(t,r){return e(t,r,n)},!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function lt(t,e,r,n){var i=jt(t);return n&&(i.has=function(n){var i=t.get(n,hr);return i!==hr&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,hr);return o!==hr&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var u=this,s=0;return t.__iterate(function(t,o,a){return e.call(r,t,o,a)?(s++,i(t,n?o:s-1,u)):void 0},o),s},i.__iteratorUncached=function(i,o){var u=t.__iterator(mr,o),s=0;return new S(function(){for(;;){var o=u.next();if(o.done)return o;var a=o.value,h=a[0],f=a[1];if(e.call(r,f,h,t))return z(i,n?h:s++,f,o)}})},i}function yt(t,e,r){var n=Lt().asMutable();return t.__iterate(function(i,o){n.update(e.call(r,i,o,t),0,function(t){return t+1})}),n.asImmutable()}function dt(t,e,r){var n=d(t),i=(w(t)?Ie():Lt()).asMutable();t.__iterate(function(o,u){i.update(e.call(r,o,u,t),function(t){return t=t||[],t.push(n?[u,o]:o),t})});var o=At(t);return i.map(function(e){return Ot(t,o(e))})}function mt(t,e,r,n){var i=t.size;if(a(e,r,i))return t;
<ide>
<ide> var o=h(e,i),s=f(r,i);if(o!==o||s!==s)return mt(t.toSeq().cacheResult(),e,r,n);var c=s-o;0>c&&(c=0);var _=jt(t);return _.size=0===c?c:t.size&&c||void 0,!n&&L(t)&&c>=0&&(_.get=function(e,r){return e=u(this,e),e>=0&&c>e?t.get(e+o,r):r}),_.__iterateUncached=function(e,r){var i=this;if(0===c)return 0;if(r)return this.cacheResult().__iterate(e,r);var u=0,s=!0,a=0;return t.__iterate(function(t,r){return s&&(s=u++<o)?void 0:(a++,e(t,n?r:a-1,i)!==!1&&a!==c)}),a},_.__iteratorUncached=function(e,r){if(c&&r)return this.cacheResult().__iterator(e,r);var i=c&&t.__iterator(e,r),u=0,s=0;return new S(function(){for(;u++<o;)i.next();if(++s>c)return I();var t=i.next();return n||e===dr?t:e===yr?z(e,s-1,void 0,t):z(e,s-1,t.value[1],t)})},_}function gt(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var u=0;return t.__iterate(function(t,i,s){return e.call(r,t,i,s)&&++u&&n(t,i,o)}),u},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var u=t.__iterator(mr,i),s=!0;return new S(function(){if(!s)return I();var t=u.next();if(t.done)return t;var i=t.value,a=i[0],h=i[1];return e.call(r,h,a,o)?n===mr?t:z(n,a,h,t):(s=!1,I())})},n}function wt(t,e,r,n){var i=jt(t);return i.__iterateUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,a=0;return t.__iterate(function(t,o,h){return s&&(s=e.call(r,t,o,h))?void 0:(a++,i(t,n?o:a-1,u))}),a},i.__iteratorUncached=function(i,o){var u=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(mr,o),a=!0,h=0;return new S(function(){var t,o,f;do{if(t=s.next(),t.done)return n||i===dr?t:i===yr?z(i,h++,void 0,t):z(i,h++,t.value[1],t);var c=t.value;o=c[0],f=c[1],a&&(a=e.call(r,f,o,u))}while(a);return i===mr?t:z(i,o,f,t)})},i}function St(t,e){var r=d(t),n=[t].concat(e).map(function(t){return y(t)?r&&(t=p(t)):t=r?W(t):B(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&d(i)||m(t)&&m(i))return i;
<ide>
<del>}var o=new j(n);return r?o=o.toKeyedSeq():m(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),o}function zt(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){function o(t,a){var h=this;t.__iterate(function(t,i){return(!e||e>a)&&y(t)?o(t,a+1):n(t,r?i:u++,h)===!1&&(s=!0),!s},i)}var u=0,s=!1;return o(t,0),u},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),u=[],s=0;return new S(function(){for(;o;){var t=o.next();if(t.done===!1){var a=t.value;if(n===mr&&(a=a[1]),e&&!(e>u.length)||!y(a))return r?t:z(n,s++,a,t);u.push(o),o=a.__iterator(n,i)}else o=u.pop()}return I()})},n}function It(t,e,r){var n=At(t);return t.toSeq().map(function(i,o){return n(e.call(r,i,o,t))}).flatten(!0)}function bt(t,e){var r=jt(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate(function(t){return(!o||r(e,o++,i)!==!1)&&r(t,o++,i)!==!1},n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(dr,n),u=0;return new S(function(){return(!i||u%2)&&(i=o.next(),i.done)?i:u%2?z(r,u++,e):z(r,u++,i.value,i)})},r}function qt(t,e,r){e||(e=Kt);var n=d(t),i=0,o=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).toArray();return o.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?x(o):m(t)?k(o):A(o)}function Dt(t,e,r){if(e||(e=Kt),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return Mt(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return Mt(e,t,r)?r:t})}function Mt(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!==r)||n>0}function Et(t,e,r){var n=jt(t);return n.size=new j(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(dr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=_(t),D(n?t.reverse():t)}),o=0,u=!1;return new S(function(){var r;return u||(r=i.map(function(t){
<del>return t.next()}),u=r.some(function(t){return t.done})),u?I():z(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function Ot(t,e){return L(t)?e:t.constructor(e)}function xt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function kt(t){return st(t.size),o(t)}function At(t){return d(t)?p:m(t)?v:l}function jt(t){return Object.create((d(t)?x:m(t)?k:A).prototype)}function Ut(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Kt(t,e){return t>e?1:e>t?-1:0}function Rt(t){var e=D(t);if(!e){if(!E(t))throw new TypeError("Expected iterable or array-like: "+t);e=D(_(t))}return e}function Lt(t){return null===t||void 0===t?Qt():Tt(t)?t:Qt().withMutations(function(e){var r=p(t);st(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function Tt(t){return!(!t||!t[Kr])}function Wt(t,e){this.ownerID=t,this.entries=e}function Bt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function Ct(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function Jt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function Pt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function Ht(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Vt(t._root)}function Nt(t,e){return z(t,e[0],e[1])}function Vt(t,e){return{node:t,index:0,__prev:e}}function Yt(t,e,r,n){var i=Object.create(Rr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Qt(){return Lr||(Lr=Yt(0))}function Xt(t,r,n){var i,o;if(t._root){var u=e(fr),s=e(cr);if(i=Ft(t._root,t.__ownerID,0,void 0,r,n,u,s),!s.value)return t;o=t.size+(u.value?n===hr?-1:1:0)}else{if(n===hr)return t;o=1,i=new Wt(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Yt(o,i):Qt()}function Ft(t,e,n,i,o,u,s,a){return t?t.update(e,n,i,o,u,s,a):u===hr?t:(r(a),r(s),new Pt(e,i,[o,u]))}function Gt(t){return t.constructor===Pt||t.constructor===Jt}function Zt(t,e,r,n,i){if(t.keyHash===n)return new Jt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&ar,s=(0===r?n:n>>>r)&ar,a=u===s?[Zt(t,e,r+ur,n,i)]:(o=new Pt(e,n,i),
<add>}var o=new j(n);return r?o=o.toKeyedSeq():m(t)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=n.reduce(function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}},0),o}function zt(t,e,r){var n=jt(t);return n.__iterateUncached=function(n,i){function o(t,a){var h=this;t.__iterate(function(t,i){return(!e||e>a)&&y(t)?o(t,a+1):n(t,r?i:u++,h)===!1&&(s=!0),!s},i)}var u=0,s=!1;return o(t,0),u},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),u=[],s=0;return new S(function(){for(;o;){var t=o.next();if(t.done===!1){var a=t.value;if(n===mr&&(a=a[1]),e&&!(e>u.length)||!y(a))return r?t:z(n,s++,a,t);u.push(o),o=a.__iterator(n,i)}else o=u.pop()}return I()})},n}function It(t,e,r){var n=At(t);return t.toSeq().map(function(i,o){return n(e.call(r,i,o,t))}).flatten(!0)}function bt(t,e){var r=jt(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate(function(t){return(!o||r(e,o++,i)!==!1)&&r(t,o++,i)!==!1},n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(dr,n),u=0;return new S(function(){return(!i||u%2)&&(i=o.next(),i.done)?i:u%2?z(r,u++,e):z(r,u++,i.value,i)})},r}function qt(t,e,r){e||(e=Ut);var n=d(t),i=0,o=t.toSeq().map(function(e,n){return[n,e,i++,r?r(e,n,t):e]}).toArray();return o.sort(function(t,r){return e(t[3],r[3])||t[2]-r[2]}).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?x(o):m(t)?k(o):A(o)}function Dt(t,e,r){if(e||(e=Ut),r){var n=t.toSeq().map(function(e,n){return[e,r(e,n,t)]}).reduce(function(t,r){return Mt(e,t[1],r[1])?r:t});return n&&n[0]}return t.reduce(function(t,r){return Mt(e,t,r)?r:t})}function Mt(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(void 0===r||null===r||r!==r)||n>0}function Et(t,e,r){var n=jt(t);return n.size=new j(r).map(function(t){return t.size}).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(dr,e),i=0;!(r=n.next()).done&&t(r.value,i++,this)!==!1;);return i},n.__iteratorUncached=function(t,n){var i=r.map(function(t){return t=_(t),D(n?t.reverse():t)}),o=0,u=!1;return new S(function(){var r;return u||(r=i.map(function(t){
<add>return t.next()}),u=r.some(function(t){return t.done})),u?I():z(t,o++,e.apply(null,r.map(function(t){return t.value})))})},n}function Ot(t,e){return L(t)?e:t.constructor(e)}function xt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function kt(t){return st(t.size),o(t)}function At(t){return d(t)?p:m(t)?v:l}function jt(t){return Object.create((d(t)?x:m(t)?k:A).prototype)}function Rt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Ut(t,e){return t>e?1:e>t?-1:0}function Kt(t){var e=D(t);if(!e){if(!E(t))throw new TypeError("Expected iterable or array-like: "+t);e=D(_(t))}return e}function Lt(t){return null===t||void 0===t?Qt():Tt(t)?t:Qt().withMutations(function(e){var r=p(t);st(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function Tt(t){return!(!t||!t[Ur])}function Wt(t,e){this.ownerID=t,this.entries=e}function Bt(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function Ct(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function Jt(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function Pt(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function Ht(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Vt(t._root)}function Nt(t,e){return z(t,e[0],e[1])}function Vt(t,e){return{node:t,index:0,__prev:e}}function Yt(t,e,r,n){var i=Object.create(Kr);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Qt(){return Lr||(Lr=Yt(0))}function Xt(t,r,n){var i,o;if(t._root){var u=e(fr),s=e(cr);if(i=Ft(t._root,t.__ownerID,0,void 0,r,n,u,s),!s.value)return t;o=t.size+(u.value?n===hr?-1:1:0)}else{if(n===hr)return t;o=1,i=new Wt(t.__ownerID,[[r,n]])}return t.__ownerID?(t.size=o,t._root=i,t.__hash=void 0,t.__altered=!0,t):i?Yt(o,i):Qt()}function Ft(t,e,n,i,o,u,s,a){return t?t.update(e,n,i,o,u,s,a):u===hr?t:(r(a),r(s),new Pt(e,i,[o,u]))}function Gt(t){return t.constructor===Pt||t.constructor===Jt}function Zt(t,e,r,n,i){if(t.keyHash===n)return new Jt(e,n,[t.entry,i]);var o,u=(0===r?t.keyHash:t.keyHash>>>r)&ar,s=(0===r?n:n>>>r)&ar,a=u===s?[Zt(t,e,r+ur,n,i)]:(o=new Pt(e,n,i),
<ide> s>u?[t,o]:[o,t]);return new Bt(e,1<<u|1<<s,a)}function $t(t,e,r,i){t||(t=new n);for(var o=new Pt(t,et(r),[r,i]),u=0;e.length>u;u++){var s=e[u];o=o.update(t,0,void 0,s[0],s[1])}return o}function te(t,e,r,n){for(var i=0,o=0,u=Array(r),s=0,a=1,h=e.length;h>s;s++,a<<=1){var f=e[s];void 0!==f&&s!==n&&(i|=a,u[o++]=f)}return new Bt(t,i,u)}function ee(t,e,r,n,i){for(var o=0,u=Array(sr),s=0;0!==r;s++,r>>>=1)u[s]=1&r?e[o++]:void 0;return u[n]=i,new Ct(t,o+1,u)}function re(t,e,r){for(var n=[],i=0;r.length>i;i++){var o=r[i],u=p(o);y(o)||(u=u.map(function(t){return F(t)})),n.push(u)}return ie(t,e,n)}function ne(t){return function(e,r){return e&&e.mergeDeepWith&&y(r)?e.mergeDeepWith(t,r):t?t(e,r):r}}function ie(t,e,r){return r=r.filter(function(t){return 0!==t.size}),0===r.length?t:0===t.size&&1===r.length?t.constructor(r[0]):t.withMutations(function(t){for(var n=e?function(r,n){t.update(n,hr,function(t){return t===hr?r:e(t,r)})}:function(e,r){t.set(r,e)},i=0;r.length>i;i++)r[i].forEach(n)})}function oe(t,e,r,n){var i=t===hr,o=e.next();if(o.done){var u=i?r:t,s=n(u);return s===u?t:s}ut(i||t&&t.set,"invalid keyPath");var a=o.value,h=i?hr:t.get(a,hr),f=oe(h,e,r,n);return f===h?t:f===hr?t.remove(a):(i?Qt():t).set(a,f)}function ue(t){return t-=t>>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function se(t,e,r,n){var o=n?t:i(t);return o[e]=r,o}function ae(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=Array(i),u=0,s=0;i>s;s++)s===e?(o[s]=r,u=-1):o[s]=t[s+u];return o}function he(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=Array(n),o=0,u=0;n>u;u++)u===e&&(o=1),i[u]=t[u+o];return i}function fe(t){var e=le();if(null===t||void 0===t)return e;if(ce(t))return t;var r=v(t),n=r.size;return 0===n?e:(st(n),n>0&&sr>n?ve(0,n,ur,null,new _e(r.toArray())):e.withMutations(function(t){t.setSize(n),r.forEach(function(e,r){return t.set(r,e)})}))}function ce(t){return!(!t||!t[Cr])}function _e(t,e){this.array=t,this.ownerID=e}function pe(t,e){function r(t,e,r){return 0===e?n(t,r):i(t,e,r);
<ide>
<ide> }function n(t,r){var n=r===s?a&&a.array:t&&t.array,i=r>o?0:o-r,h=u-r;return h>sr&&(h=sr),function(){if(i===h)return Hr;var t=e?--h:i++;return n&&n[t]}}function i(t,n,i){var s,a=t&&t.array,h=i>o?0:o-i>>n,f=(u-i>>n)+1;return f>sr&&(f=sr),function(){for(;;){if(s){var t=s();if(t!==Hr)return t;s=null}if(h===f)return Hr;var o=e?--f:h++;s=r(a&&a[o],n-ur,i+(o<<n))}}}var o=t._origin,u=t._capacity,s=ze(u),a=t._tail;return r(t._root,t._level,0)}function ve(t,e,r,n,i,o,u){var s=Object.create(Jr);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=u,s.__altered=!1,s}function le(){return Pr||(Pr=ve(0,0,ur))}function ye(t,r,n){if(r=u(t,r),r>=t.size||0>r)return t.withMutations(function(t){0>r?we(t,r).set(0,n):we(t,0,r+1).set(r,n)});r+=t._origin;var i=t._tail,o=t._root,s=e(cr);return r>=ze(t._capacity)?i=de(i,t.__ownerID,0,r,n,s):o=de(o,t.__ownerID,t._level,r,n,s),s.value?t.__ownerID?(t._root=o,t._tail=i,t.__hash=void 0,t.__altered=!0,t):ve(t._origin,t._capacity,t._level,o,i):t}function de(t,e,n,i,o,u){var s=i>>>n&ar,a=t&&t.array.length>s;if(!a&&void 0===o)return t;var h;if(n>0){var f=t&&t.array[s],c=de(f,e,n-ur,i,o,u);return c===f?t:(h=me(t,e),h.array[s]=c,h)}return a&&t.array[s]===o?t:(r(u),h=me(t,e),void 0===o&&s===h.array.length-1?h.array.pop():h.array[s]=o,h)}function me(t,e){return e&&t&&e===t.ownerID?t:new _e(t?t.array.slice():[],e)}function ge(t,e){if(e>=ze(t._capacity))return t._tail;if(1<<t._level+ur>e){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&ar],n-=ur;return r}}function we(t,e,r){var i=t.__ownerID||new n,o=t._origin,u=t._capacity,s=o+e,a=void 0===r?u:0>r?u+r:o+r;if(s===o&&a===u)return t;if(s>=a)return t.clear();for(var h=t._level,f=t._root,c=0;0>s+c;)f=new _e(f&&f.array.length?[void 0,f]:[],i),h+=ur,c+=1<<h;c&&(s+=c,o+=c,a+=c,u+=c);for(var _=ze(u),p=ze(a);p>=1<<h+ur;)f=new _e(f&&f.array.length?[f]:[],i),h+=ur;var v=t._tail,l=_>p?ge(t,a-1):p>_?new _e([],i):v;if(v&&p>_&&u>s&&v.array.length){f=me(f,i);for(var y=f,d=h;d>ur;d-=ur){var m=_>>>d&ar;y=y.array[m]=me(y.array[m],i);
<ide>
<del>}y.array[_>>>ur&ar]=v}if(u>a&&(l=l&&l.removeAfter(i,0,a)),s>=p)s-=p,a-=p,h=ur,f=null,l=l&&l.removeBefore(i,0,s);else if(s>o||_>p){for(c=0;f;){var g=s>>>h&ar;if(g!==p>>>h&ar)break;g&&(c+=(1<<h)*g),h-=ur,f=f.array[g]}f&&s>o&&(f=f.removeBefore(i,h,s-c)),f&&_>p&&(f=f.removeAfter(i,h,p-c)),c&&(s-=c,a-=c)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=h,t._root=f,t._tail=l,t.__hash=void 0,t.__altered=!0,t):ve(s,a,h,f,l)}function Se(t,e,r){for(var n=[],i=0,o=0;r.length>o;o++){var u=r[o],s=v(u);s.size>i&&(i=s.size),y(u)||(s=s.map(function(t){return F(t)})),n.push(s)}return i>t.size&&(t=t.setSize(i)),ie(t,e,n)}function ze(t){return sr>t?0:t-1>>>ur<<ur}function Ie(t){return null===t||void 0===t?De():be(t)?t:De().withMutations(function(e){var r=p(t);st(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function be(t){return Tt(t)&&w(t)}function qe(t,e,r,n){var i=Object.create(Ie.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function De(){return Nr||(Nr=qe(Qt(),le()))}function Me(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===hr){if(!a)return t;u.size>=sr&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&s!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):qe(n,i)}function Ee(t){return null===t||void 0===t?ke():Oe(t)?t:ke().unshiftAll(t)}function Oe(t){return!(!t||!t[Vr])}function xe(t,e,r,n){var i=Object.create(Yr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function ke(){return Qr||(Qr=xe(0))}function Ae(t){return null===t||void 0===t?Re():je(t)?t:Re().withMutations(function(e){var r=l(t);st(r.size),r.forEach(function(t){return e.add(t)})})}function je(t){return!(!t||!t[Xr])}function Ue(t,e){return t.__ownerID?(t.size=e.size,
<del>t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Ke(t,e){var r=Object.create(Fr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Re(){return Gr||(Gr=Ke(Qt()))}function Le(t){return null===t||void 0===t?Be():Te(t)?t:Be().withMutations(function(e){var r=l(t);st(r.size),r.forEach(function(t){return e.add(t)})})}function Te(t){return je(t)&&w(t)}function We(t,e){var r=Object.create(Zr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Be(){return $r||($r=We(De()))}function Ce(t,e){var r=function(t){return this instanceof r?void(this._map=Lt(t)):new r(t)},n=Object.keys(t),i=r.prototype=Object.create(tn);i.constructor=r,e&&(i._name=e),i._defaultValues=t,i._keys=n,i.size=n.length;try{n.forEach(function(t){Object.defineProperty(r.prototype,t,{get:function(){return this.get(t)},set:function(e){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})})}catch(o){}return r}function Je(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Pe(t){return t._name||t.constructor.name}function He(t,e){if(t===e)return!0;if(!y(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||d(t)!==d(e)||m(t)!==m(e)||w(t)!==w(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!g(t);if(w(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&X(i[1],t)&&(r||X(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,s=e.__iterate(function(e,n){return(r?t.has(e):i?X(e,t.get(n,hr)):X(t.get(n,hr),e))?void 0:(u=!1,!1)});return u&&t.size===s}function Ne(t,e,r){if(!(this instanceof Ne))return new Ne(t,e,r);if(ut(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(en)return en;en=this}}function Ve(t,e){if(!(this instanceof Ve))return new Ve(t,e);
<add>}y.array[_>>>ur&ar]=v}if(u>a&&(l=l&&l.removeAfter(i,0,a)),s>=p)s-=p,a-=p,h=ur,f=null,l=l&&l.removeBefore(i,0,s);else if(s>o||_>p){for(c=0;f;){var g=s>>>h&ar;if(g!==p>>>h&ar)break;g&&(c+=(1<<h)*g),h-=ur,f=f.array[g]}f&&s>o&&(f=f.removeBefore(i,h,s-c)),f&&_>p&&(f=f.removeAfter(i,h,p-c)),c&&(s-=c,a-=c)}return t.__ownerID?(t.size=a-s,t._origin=s,t._capacity=a,t._level=h,t._root=f,t._tail=l,t.__hash=void 0,t.__altered=!0,t):ve(s,a,h,f,l)}function Se(t,e,r){for(var n=[],i=0,o=0;r.length>o;o++){var u=r[o],s=v(u);s.size>i&&(i=s.size),y(u)||(s=s.map(function(t){return F(t)})),n.push(s)}return i>t.size&&(t=t.setSize(i)),ie(t,e,n)}function ze(t){return sr>t?0:t-1>>>ur<<ur}function Ie(t){return null===t||void 0===t?De():be(t)?t:De().withMutations(function(e){var r=p(t);st(r.size),r.forEach(function(t,r){return e.set(r,t)})})}function be(t){return Tt(t)&&w(t)}function qe(t,e,r,n){var i=Object.create(Ie.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function De(){return Nr||(Nr=qe(Qt(),le()))}function Me(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===hr){if(!a)return t;u.size>=sr&&u.size>=2*o.size?(i=u.filter(function(t,e){return void 0!==t&&s!==e}),n=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):qe(n,i)}function Ee(t){return null===t||void 0===t?ke():Oe(t)?t:ke().unshiftAll(t)}function Oe(t){return!(!t||!t[Vr])}function xe(t,e,r,n){var i=Object.create(Yr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function ke(){return Qr||(Qr=xe(0))}function Ae(t){return null===t||void 0===t?Ke():je(t)?t:Ke().withMutations(function(e){var r=l(t);st(r.size),r.forEach(function(t){return e.add(t)})})}function je(t){return!(!t||!t[Xr])}function Re(t,e){return t.__ownerID?(t.size=e.size,
<add>t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Ue(t,e){var r=Object.create(Fr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ke(){return Gr||(Gr=Ue(Qt()))}function Le(t){return null===t||void 0===t?Be():Te(t)?t:Be().withMutations(function(e){var r=l(t);st(r.size),r.forEach(function(t){return e.add(t)})})}function Te(t){return je(t)&&w(t)}function We(t,e){var r=Object.create(Zr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Be(){return $r||($r=We(De()))}function Ce(t,e){var r=function(t){return this instanceof r?void(this._map=Lt(t)):new r(t)},n=Object.keys(t),i=r.prototype=Object.create(tn);i.constructor=r,e&&(i._name=e),i._defaultValues=t,i._keys=n,i.size=n.length;try{n.forEach(function(t){Object.defineProperty(r.prototype,t,{get:function(){return this.get(t)},set:function(e){ut(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})})}catch(o){}return r}function Je(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function Pe(t){return t._name||t.constructor.name||"Record"}function He(t,e){if(t===e)return!0;if(!y(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||d(t)!==d(e)||m(t)!==m(e)||w(t)!==w(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!g(t);if(w(t)){var n=t.entries();return e.every(function(t,e){var i=n.next().value;return i&&X(i[1],t)&&(r||X(i[0],e))})&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var u=!0,s=e.__iterate(function(e,n){return(r?t.has(e):i?X(e,t.get(n,hr)):X(t.get(n,hr),e))?void 0:(u=!1,!1)});return u&&t.size===s}function Ne(t,e,r){if(!(this instanceof Ne))return new Ne(t,e,r);if(ut(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(en)return en;en=this}}function Ve(t,e){if(!(this instanceof Ve))return new Ve(t,e);
<ide>
<ide> if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(rn)return rn;rn=this}}function Ye(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Qe(t,e){return e}function Xe(t,e){return[e,t]}function Fe(t){return function(){return!t.apply(this,arguments)}}function Ge(t){return function(){return-t.apply(this,arguments)}}function Ze(t){return"string"==typeof t?JSON.stringify(t):t}function $e(){return i(arguments)}function tr(t,e){return e>t?1:t>e?-1:0}function er(t){if(t.size===1/0)return 0;var e=w(t),r=d(t),n=e?1:0,i=t.__iterate(r?e?function(t,e){n=31*n+nr(et(t),et(e))|0}:function(t,e){n=n+nr(et(t),et(e))|0}:e?function(t){n=31*n+et(t)|0}:function(t){n=n+et(t)|0});return rr(i,n)}function rr(t,e){return e=qr(e,3432918353),e=qr(e<<15|e>>>-15,461845907),e=qr(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=qr(e^e>>>16,2246822507),e=qr(e^e>>>13,3266489909),e=tt(e^e>>>16)}function nr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var ir=Array.prototype.slice,or="delete",ur=5,sr=1<<ur,ar=sr-1,hr={},fr={value:!1},cr={value:!1};t(p,_),t(v,_),t(l,_),_.isIterable=y,_.isKeyed=d,_.isIndexed=m,_.isAssociative=g,_.isOrdered=w,_.Keyed=p,_.Indexed=v,_.Set=l;var _r="",pr="",vr="",lr="",yr=0,dr=1,mr=2,gr="function"==typeof Symbol&&Symbol.iterator,wr="@@iterator",Sr=gr||wr;S.prototype.toString=function(){return"[Iterator]"},S.KEYS=yr,S.VALUES=dr,S.ENTRIES=mr,S.prototype.inspect=S.prototype.toSource=function(){return""+this},S.prototype[Sr]=function(){return this},t(O,_),O.of=function(){return O(arguments)},O.prototype.toSeq=function(){return this},O.prototype.toString=function(){return this.__toString("Seq {","}")},O.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},O.prototype.__iterate=function(t,e){return P(this,t,e,!0)},O.prototype.__iterator=function(t,e){
<del>return H(this,t,e,!0)},t(x,O),x.prototype.toKeyedSeq=function(){return this},t(k,O),k.of=function(){return k(arguments)},k.prototype.toIndexedSeq=function(){return this},k.prototype.toString=function(){return this.__toString("Seq [","]")},k.prototype.__iterate=function(t,e){return P(this,t,e,!1)},k.prototype.__iterator=function(t,e){return H(this,t,e,!1)},t(A,O),A.of=function(){return A(arguments)},A.prototype.toSetSeq=function(){return this},O.isSeq=L,O.Keyed=x,O.Set=A,O.Indexed=k;var zr="";O.prototype[zr]=!0,t(j,k),j.prototype.get=function(t,e){return this.has(t)?this._array[u(this,t)]:e},j.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},j.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new S(function(){return i>n?I():z(t,i,r[e?n-i++:i++])})},t(U,x),U.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},U.prototype.has=function(t){return this._object.hasOwnProperty(t)},U.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;i>=o;o++){var u=n[e?i-o:o];if(t(r[u],u,this)===!1)return o+1}return o},U.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new S(function(){var u=n[e?i-o:o];return o++>i?I():z(t,u,r[u])})},U.prototype[lr]=!0,t(K,k),K.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=D(r),i=0;if(q(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},K.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=D(r);if(!q(n))return new S(I);var i=0;return new S(function(){var e=n.next();return e.done?e:z(t,i++,e.value)})},t(R,k),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var o;!(o=r.next()).done;){var u=o.value;
<add>return H(this,t,e,!0)},t(x,O),x.prototype.toKeyedSeq=function(){return this},t(k,O),k.of=function(){return k(arguments)},k.prototype.toIndexedSeq=function(){return this},k.prototype.toString=function(){return this.__toString("Seq [","]")},k.prototype.__iterate=function(t,e){return P(this,t,e,!1)},k.prototype.__iterator=function(t,e){return H(this,t,e,!1)},t(A,O),A.of=function(){return A(arguments)},A.prototype.toSetSeq=function(){return this},O.isSeq=L,O.Keyed=x,O.Set=A,O.Indexed=k;var zr="";O.prototype[zr]=!0,t(j,k),j.prototype.get=function(t,e){return this.has(t)?this._array[u(this,t)]:e},j.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},j.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new S(function(){return i>n?I():z(t,i,r[e?n-i++:i++])})},t(R,x),R.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},R.prototype.has=function(t){return this._object.hasOwnProperty(t)},R.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;i>=o;o++){var u=n[e?i-o:o];if(t(r[u],u,this)===!1)return o+1}return o},R.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new S(function(){var u=n[e?i-o:o];return o++>i?I():z(t,u,r[u])})},R.prototype[lr]=!0,t(U,k),U.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=D(r),i=0;if(q(n))for(var o;!(o=n.next()).done&&t(o.value,i++,this)!==!1;);return i},U.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=D(r);if(!q(n))return new S(I);var i=0;return new S(function(){var e=n.next();return e.done?e:z(t,i++,e.value)})},t(K,k),K.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var o;!(o=r.next()).done;){var u=o.value;
<ide>
<del>if(n[i]=u,t(u,i++,this)===!1)break}return i},R.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new S(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return z(t,i,n[i++])})};var Ir;t(N,_),t(V,N),t(Y,N),t(Q,N),N.Keyed=V,N.Indexed=Y,N.Set=Q;var br,qr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},Dr=Object.isExtensible,Mr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Er="function"==typeof WeakMap;Er&&(br=new WeakMap);var Or=0,xr="__immutablehash__";"function"==typeof Symbol&&(xr=Symbol(xr));var kr=16,Ar=255,jr=0,Ur={};t(at,x),at.prototype.get=function(t,e){return this._iter.get(t,e)},at.prototype.has=function(t){return this._iter.has(t)},at.prototype.valueSeq=function(){return this._iter.valueSeq()},at.prototype.reverse=function(){var t=this,e=vt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},at.prototype.map=function(t,e){var r=this,n=pt(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},at.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?kt(this):0,function(i){return t(i,e?--r:r++,n)}),e)},at.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(dr,e),n=e?kt(this):0;return new S(function(){var i=r.next();return i.done?i:z(t,e?--n:n++,i.value,i)})},at.prototype[lr]=!0,t(ht,k),ht.prototype.contains=function(t){return this._iter.contains(t)},ht.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ht.prototype.__iterator=function(t,e){var r=this._iter.__iterator(dr,e),n=0;return new S(function(){var e=r.next();return e.done?e:z(t,n++,e.value,e)})},t(ft,A),ft.prototype.has=function(t){
<del>return this._iter.contains(t)},ft.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ft.prototype.__iterator=function(t,e){var r=this._iter.__iterator(dr,e);return new S(function(){var e=r.next();return e.done?e:z(t,e.value,e.value,e)})},t(ct,x),ct.prototype.entrySeq=function(){return this._iter.toSeq()},ct.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){xt(e);var n=y(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ct.prototype.__iterator=function(t,e){var r=this._iter.__iterator(dr,e);return new S(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){xt(n);var i=y(n);return z(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ht.prototype.cacheResult=at.prototype.cacheResult=ft.prototype.cacheResult=ct.prototype.cacheResult=Ut,t(Lt,V),Lt.prototype.toString=function(){return this.__toString("Map {","}")},Lt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Lt.prototype.set=function(t,e){return Xt(this,t,e)},Lt.prototype.setIn=function(t,e){return this.updateIn(t,hr,function(){return e})},Lt.prototype.remove=function(t){return Xt(this,t,hr)},Lt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hr})},Lt.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Lt.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,Rt(t),e,r);return n===hr?void 0:n},Lt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Qt()},Lt.prototype.merge=function(){return re(this,void 0,arguments)},Lt.prototype.mergeWith=function(t){var e=ir.call(arguments,1);return re(this,t,e)},Lt.prototype.mergeIn=function(t){var e=ir.call(arguments,1);return this.updateIn(t,Qt(),function(t){return t.merge.apply(t,e)})},Lt.prototype.mergeDeep=function(){return re(this,ne(void 0),arguments)},Lt.prototype.mergeDeepWith=function(t){var e=ir.call(arguments,1);return re(this,ne(t),e);
<add>if(n[i]=u,t(u,i++,this)===!1)break}return i},K.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new S(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return z(t,i,n[i++])})};var Ir;t(N,_),t(V,N),t(Y,N),t(Q,N),N.Keyed=V,N.Indexed=Y,N.Set=Q;var br,qr="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var r=65535&t,n=65535&e;return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0},Dr=Object.isExtensible,Mr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),Er="function"==typeof WeakMap;Er&&(br=new WeakMap);var Or=0,xr="__immutablehash__";"function"==typeof Symbol&&(xr=Symbol(xr));var kr=16,Ar=255,jr=0,Rr={};t(at,x),at.prototype.get=function(t,e){return this._iter.get(t,e)},at.prototype.has=function(t){return this._iter.has(t)},at.prototype.valueSeq=function(){return this._iter.valueSeq()},at.prototype.reverse=function(){var t=this,e=vt(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},at.prototype.map=function(t,e){var r=this,n=pt(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},at.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?kt(this):0,function(i){return t(i,e?--r:r++,n)}),e)},at.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(dr,e),n=e?kt(this):0;return new S(function(){var i=r.next();return i.done?i:z(t,e?--n:n++,i.value,i)})},at.prototype[lr]=!0,t(ht,k),ht.prototype.contains=function(t){return this._iter.contains(t)},ht.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate(function(e){return t(e,n++,r)},e)},ht.prototype.__iterator=function(t,e){var r=this._iter.__iterator(dr,e),n=0;return new S(function(){var e=r.next();return e.done?e:z(t,n++,e.value,e)})},t(ft,A),ft.prototype.has=function(t){
<add>return this._iter.contains(t)},ft.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){return t(e,e,r)},e)},ft.prototype.__iterator=function(t,e){var r=this._iter.__iterator(dr,e);return new S(function(){var e=r.next();return e.done?e:z(t,e.value,e.value,e)})},t(ct,x),ct.prototype.entrySeq=function(){return this._iter.toSeq()},ct.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate(function(e){if(e){xt(e);var n=y(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}},e)},ct.prototype.__iterator=function(t,e){var r=this._iter.__iterator(dr,e);return new S(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){xt(n);var i=y(n);return z(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}})},ht.prototype.cacheResult=at.prototype.cacheResult=ft.prototype.cacheResult=ct.prototype.cacheResult=Rt,t(Lt,V),Lt.prototype.toString=function(){return this.__toString("Map {","}")},Lt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Lt.prototype.set=function(t,e){return Xt(this,t,e)},Lt.prototype.setIn=function(t,e){return this.updateIn(t,hr,function(){return e})},Lt.prototype.remove=function(t){return Xt(this,t,hr)},Lt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return hr})},Lt.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Lt.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=oe(this,Kt(t),e,r);return n===hr?void 0:n},Lt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Qt()},Lt.prototype.merge=function(){return re(this,void 0,arguments)},Lt.prototype.mergeWith=function(t){var e=ir.call(arguments,1);return re(this,t,e)},Lt.prototype.mergeIn=function(t){var e=ir.call(arguments,1);return this.updateIn(t,Qt(),function(t){return t.merge.apply(t,e)})},Lt.prototype.mergeDeep=function(){return re(this,ne(void 0),arguments)},Lt.prototype.mergeDeepWith=function(t){var e=ir.call(arguments,1);return re(this,ne(t),e);
<ide>
<del>},Lt.prototype.mergeDeepIn=function(t){var e=ir.call(arguments,1);return this.updateIn(t,Qt(),function(t){return t.mergeDeep.apply(t,e)})},Lt.prototype.sort=function(t){return Ie(qt(this,t))},Lt.prototype.sortBy=function(t,e){return Ie(qt(this,e,t))},Lt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Lt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},Lt.prototype.asImmutable=function(){return this.__ensureOwner()},Lt.prototype.wasAltered=function(){return this.__altered},Lt.prototype.__iterator=function(t,e){return new Ht(this,t,e)},Lt.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},Lt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Yt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Lt.isMap=Tt;var Kr="",Rr=Lt.prototype;Rr[Kr]=!0,Rr[or]=Rr.remove,Rr.removeIn=Rr.deleteIn,Wt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},Wt.prototype.update=function(t,e,n,o,u,s,a){for(var h=u===hr,f=this.entries,c=0,_=f.length;_>c&&!X(o,f[c][0]);c++);var p=_>c;if(p?f[c][1]===u:h)return this;if(r(a),(h||!p)&&r(s),!h||1!==f.length){if(!p&&!h&&f.length>=Tr)return $t(t,f,o,u);var v=t&&t===this.ownerID,l=v?f:i(f);return p?h?c===_-1?l.pop():l[c]=l.pop():l[c]=[o,u]:l.push([o,u]),v?(this.entries=l,this):new Wt(t,l)}},Bt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=1<<((0===t?e:e>>>t)&ar),o=this.bitmap;return 0===(o&i)?n:this.nodes[ue(o&i-1)].get(t+ur,e,r,n)},Bt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&ar,a=1<<s,h=this.bitmap,f=0!==(h&a);if(!f&&i===hr)return this;var c=ue(h&a-1),_=this.nodes,p=f?_[c]:void 0,v=Ft(p,t,e+ur,r,n,i,o,u);if(v===p)return this;if(!f&&v&&_.length>=Wr)return ee(t,_,h,s,v);if(f&&!v&&2===_.length&&Gt(_[1^c]))return _[1^c];if(f&&v&&1===_.length&&Gt(v))return v;
<add>},Lt.prototype.mergeDeepIn=function(t){var e=ir.call(arguments,1);return this.updateIn(t,Qt(),function(t){return t.mergeDeep.apply(t,e)})},Lt.prototype.sort=function(t){return Ie(qt(this,t))},Lt.prototype.sortBy=function(t,e){return Ie(qt(this,e,t))},Lt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Lt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new n)},Lt.prototype.asImmutable=function(){return this.__ensureOwner()},Lt.prototype.wasAltered=function(){return this.__altered},Lt.prototype.__iterator=function(t,e){return new Ht(this,t,e)},Lt.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate(function(e){return n++,t(e[1],e[0],r)},e),n},Lt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Yt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Lt.isMap=Tt;var Ur="",Kr=Lt.prototype;Kr[Ur]=!0,Kr[or]=Kr.remove,Kr.removeIn=Kr.deleteIn,Wt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},Wt.prototype.update=function(t,e,n,o,u,s,a){for(var h=u===hr,f=this.entries,c=0,_=f.length;_>c&&!X(o,f[c][0]);c++);var p=_>c;if(p?f[c][1]===u:h)return this;if(r(a),(h||!p)&&r(s),!h||1!==f.length){if(!p&&!h&&f.length>=Tr)return $t(t,f,o,u);var v=t&&t===this.ownerID,l=v?f:i(f);return p?h?c===_-1?l.pop():l[c]=l.pop():l[c]=[o,u]:l.push([o,u]),v?(this.entries=l,this):new Wt(t,l)}},Bt.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=1<<((0===t?e:e>>>t)&ar),o=this.bitmap;return 0===(o&i)?n:this.nodes[ue(o&i-1)].get(t+ur,e,r,n)},Bt.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&ar,a=1<<s,h=this.bitmap,f=0!==(h&a);if(!f&&i===hr)return this;var c=ue(h&a-1),_=this.nodes,p=f?_[c]:void 0,v=Ft(p,t,e+ur,r,n,i,o,u);if(v===p)return this;if(!f&&v&&_.length>=Wr)return ee(t,_,h,s,v);if(f&&!v&&2===_.length&&Gt(_[1^c]))return _[1^c];if(f&&v&&1===_.length&&Gt(v))return v;
<ide>
<ide> var l=t&&t===this.ownerID,y=f?v?h:h^a:h|a,d=f?v?se(_,c,v,l):he(_,c,l):ae(_,c,v,l);return l?(this.bitmap=y,this.nodes=d,this):new Bt(t,y,d)},Ct.prototype.get=function(t,e,r,n){void 0===e&&(e=et(r));var i=(0===t?e:e>>>t)&ar,o=this.nodes[i];return o?o.get(t+ur,e,r,n):n},Ct.prototype.update=function(t,e,r,n,i,o,u){void 0===r&&(r=et(n));var s=(0===e?r:r>>>e)&ar,a=i===hr,h=this.nodes,f=h[s];if(a&&!f)return this;var c=Ft(f,t,e+ur,r,n,i,o,u);if(c===f)return this;var _=this.count;if(f){if(!c&&(_--,Br>_))return te(t,h,_,s)}else _++;var p=t&&t===this.ownerID,v=se(h,s,c,p);return p?(this.count=_,this.nodes=v,this):new Ct(t,_,v)},Jt.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,u=i.length;u>o;o++)if(X(r,i[o][0]))return i[o][1];return n},Jt.prototype.update=function(t,e,n,o,u,s,a){void 0===n&&(n=et(o));var h=u===hr;if(n!==this.keyHash)return h?this:(r(a),r(s),Zt(this,t,e,n,[o,u]));for(var f=this.entries,c=0,_=f.length;_>c&&!X(o,f[c][0]);c++);var p=_>c;if(p?f[c][1]===u:h)return this;if(r(a),(h||!p)&&r(s),h&&2===_)return new Pt(t,this.keyHash,f[1^c]);var v=t&&t===this.ownerID,l=v?f:i(f);return p?h?c===_-1?l.pop():l[c]=l.pop():l[c]=[o,u]:l.push([o,u]),v?(this.entries=l,this):new Jt(t,this.keyHash,l)},Pt.prototype.get=function(t,e,r,n){return X(r,this.entry[0])?this.entry[1]:n},Pt.prototype.update=function(t,e,n,i,o,u,s){var a=o===hr,h=X(i,this.entry[0]);return(h?o===this.entry[1]:a)?this:(r(s),a?void r(u):h?t&&t===this.ownerID?(this.entry[1]=o,this):new Pt(t,this.keyHash,[i,o]):(r(u),Zt(this,t,e,et(i),[i,o])))},Wt.prototype.iterate=Jt.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;i>=n;n++)if(t(r[e?i-n:n])===!1)return!1},Bt.prototype.iterate=Ct.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;i>=n;n++){var o=r[e?i-n:n];if(o&&o.iterate(t,e)===!1)return!1}},Pt.prototype.iterate=function(t){return t(this.entry)},t(Ht,S),Ht.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return Nt(t,n.entry)}else if(n.entries){if(r=n.entries.length-1,
<ide> r>=i)return Nt(t,n.entries[this._reverse?r-i:i])}else if(r=n.nodes.length-1,r>=i){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return Nt(t,o.entry);e=this._stack=Vt(o,e)}continue}e=this._stack=this._stack.__prev}return I()};var Lr,Tr=sr/4,Wr=sr/2,Br=sr/4;t(fe,Y),fe.of=function(){return this(arguments)},fe.prototype.toString=function(){return this.__toString("List [","]")},fe.prototype.get=function(t,e){if(t=u(this,t),0>t||t>=this.size)return e;t+=this._origin;var r=ge(this,t);return r&&r.array[t&ar]},fe.prototype.set=function(t,e){return ye(this,t,e)},fe.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},fe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=ur,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):le()},fe.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(r){we(r,0,e+t.length);for(var n=0;t.length>n;n++)r.set(e+n,t[n])})},fe.prototype.pop=function(){return we(this,0,-1)},fe.prototype.unshift=function(){var t=arguments;return this.withMutations(function(e){we(e,-t.length);for(var r=0;t.length>r;r++)e.set(r,t[r])})},fe.prototype.shift=function(){return we(this,1)},fe.prototype.merge=function(){return Se(this,void 0,arguments)},fe.prototype.mergeWith=function(t){var e=ir.call(arguments,1);return Se(this,t,e)},fe.prototype.mergeDeep=function(){return Se(this,ne(void 0),arguments)},fe.prototype.mergeDeepWith=function(t){var e=ir.call(arguments,1);return Se(this,ne(t),e)},fe.prototype.setSize=function(t){return we(this,0,t)},fe.prototype.slice=function(t,e){var r=this.size;return a(t,e,r)?this:we(this,h(t,r),f(e,r))},fe.prototype.__iterator=function(t,e){var r=0,n=pe(this,e);return new S(function(){var e=n();return e===Hr?I():z(t,r++,e)})},fe.prototype.__iterate=function(t,e){for(var r,n=0,i=pe(this,e);(r=i())!==Hr&&t(r,n++,this)!==!1;);return n},fe.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?ve(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,
<del>this)},fe.isList=ce;var Cr="",Jr=fe.prototype;Jr[Cr]=!0,Jr[or]=Jr.remove,Jr.setIn=Rr.setIn,Jr.deleteIn=Jr.removeIn=Rr.removeIn,Jr.update=Rr.update,Jr.updateIn=Rr.updateIn,Jr.mergeIn=Rr.mergeIn,Jr.mergeDeepIn=Rr.mergeDeepIn,Jr.withMutations=Rr.withMutations,Jr.asMutable=Rr.asMutable,Jr.asImmutable=Rr.asImmutable,Jr.wasAltered=Rr.wasAltered,_e.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&ar;if(n>=this.array.length)return new _e([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-ur,r),i===u&&o)return this}if(o&&!i)return this;var s=me(this,t);if(!o)for(var a=0;n>a;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},_e.prototype.removeAfter=function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r-1>>>e&ar;if(n>=this.array.length)return this;var i,o=n===this.array.length-1;if(e>0){var u=this.array[n];if(i=u&&u.removeAfter(t,e-ur,r),i===u&&o)return this}if(o&&!i)return this;var s=me(this,t);return o||s.array.pop(),i&&(s.array[n]=i),s};var Pr,Hr={};t(Ie,Lt),Ie.of=function(){return this(arguments)},Ie.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ie.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},Ie.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):De()},Ie.prototype.set=function(t,e){return Me(this,t,e)},Ie.prototype.remove=function(t){return Me(this,t,hr)},Ie.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ie.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},Ie.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Ie.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?qe(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this);
<add>this)},fe.isList=ce;var Cr="",Jr=fe.prototype;Jr[Cr]=!0,Jr[or]=Jr.remove,Jr.setIn=Kr.setIn,Jr.deleteIn=Jr.removeIn=Kr.removeIn,Jr.update=Kr.update,Jr.updateIn=Kr.updateIn,Jr.mergeIn=Kr.mergeIn,Jr.mergeDeepIn=Kr.mergeDeepIn,Jr.withMutations=Kr.withMutations,Jr.asMutable=Kr.asMutable,Jr.asImmutable=Kr.asImmutable,Jr.wasAltered=Kr.wasAltered,_e.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r>>>e&ar;if(n>=this.array.length)return new _e([],t);var i,o=0===n;if(e>0){var u=this.array[n];if(i=u&&u.removeBefore(t,e-ur,r),i===u&&o)return this}if(o&&!i)return this;var s=me(this,t);if(!o)for(var a=0;n>a;a++)s.array[a]=void 0;return i&&(s.array[n]=i),s},_e.prototype.removeAfter=function(t,e,r){if(r===e?1<<e:0||0===this.array.length)return this;var n=r-1>>>e&ar;if(n>=this.array.length)return this;var i,o=n===this.array.length-1;if(e>0){var u=this.array[n];if(i=u&&u.removeAfter(t,e-ur,r),i===u&&o)return this}if(o&&!i)return this;var s=me(this,t);return o||s.array.pop(),i&&(s.array[n]=i),s};var Pr,Hr={};t(Ie,Lt),Ie.of=function(){return this(arguments)},Ie.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ie.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},Ie.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):De()},Ie.prototype.set=function(t,e){return Me(this,t,e)},Ie.prototype.remove=function(t){return Me(this,t,hr)},Ie.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ie.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},Ie.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Ie.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?qe(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this);
<ide>
<ide> },Ie.isOrderedMap=be,Ie.prototype[lr]=!0,Ie.prototype[or]=Ie.prototype.remove;var Nr;t(Ee,Y),Ee.of=function(){return this(arguments)},Ee.prototype.toString=function(){return this.__toString("Stack [","]")},Ee.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},Ee.prototype.peek=function(){return this._head&&this._head.value},Ee.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):xe(t,e)},Ee.prototype.pushAll=function(t){if(t=v(t),0===t.size)return this;st(t.size);var e=this.size,r=this._head;return t.reverse().forEach(function(t){e++,r={value:t,next:r}}),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):xe(e,r)},Ee.prototype.pop=function(){return this.slice(1)},Ee.prototype.unshift=function(){return this.push.apply(this,arguments)},Ee.prototype.unshiftAll=function(t){return this.pushAll(t)},Ee.prototype.shift=function(){return this.pop.apply(this,arguments)},Ee.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):ke()},Ee.prototype.slice=function(t,e){if(a(t,e,this.size))return this;var r=h(t,this.size),n=f(e,this.size);if(n!==this.size)return Y.prototype.slice.call(this,t,e);for(var i=this.size-r,o=this._head;r--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):xe(i,o)},Ee.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?xe(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ee.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&t(n.value,r++,this)!==!1;)n=n.next;return r},Ee.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new S(function(){
<del>if(n){var e=n.value;return n=n.next,z(t,r++,e)}return I()})},Ee.isStack=Oe;var Vr="",Yr=Ee.prototype;Yr[Vr]=!0,Yr.withMutations=Rr.withMutations,Yr.asMutable=Rr.asMutable,Yr.asImmutable=Rr.asImmutable,Yr.wasAltered=Rr.wasAltered;var Qr;t(Ae,Q),Ae.of=function(){return this(arguments)},Ae.fromKeys=function(t){return this(p(t).keySeq())},Ae.prototype.toString=function(){return this.__toString("Set {","}")},Ae.prototype.has=function(t){return this._map.has(t)},Ae.prototype.add=function(t){return Ue(this,this._map.set(t,!0))},Ae.prototype.remove=function(t){return Ue(this,this._map.remove(t))},Ae.prototype.clear=function(){return Ue(this,this._map.clear())},Ae.prototype.union=function(){var t=ir.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0===this.size&&1===t.length?this.constructor(t[0]):this.withMutations(function(e){for(var r=0;t.length>r;r++)l(t[r]).forEach(function(t){return e.add(t)})})},Ae.prototype.intersect=function(){var t=ir.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return l(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.every(function(t){return t.contains(e)})||r.remove(e)})})},Ae.prototype.subtract=function(){var t=ir.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return l(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.some(function(t){return t.contains(e)})&&r.remove(e)})})},Ae.prototype.merge=function(){return this.union.apply(this,arguments)},Ae.prototype.mergeWith=function(){var t=ir.call(arguments,1);return this.union.apply(this,t)},Ae.prototype.sort=function(t){return Le(qt(this,t))},Ae.prototype.sortBy=function(t,e){return Le(qt(this,e,t))},Ae.prototype.wasAltered=function(){return this._map.wasAltered()},Ae.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},Ae.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},Ae.prototype.__ensureOwner=function(t){
<del>if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},Ae.isSet=je;var Xr="",Fr=Ae.prototype;Fr[Xr]=!0,Fr[or]=Fr.remove,Fr.mergeDeep=Fr.merge,Fr.mergeDeepWith=Fr.mergeWith,Fr.withMutations=Rr.withMutations,Fr.asMutable=Rr.asMutable,Fr.asImmutable=Rr.asImmutable,Fr.__empty=Re,Fr.__make=Ke;var Gr;t(Le,Ae),Le.of=function(){return this(arguments)},Le.fromKeys=function(t){return this(p(t).keySeq())},Le.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Le.isOrderedSet=Te;var Zr=Le.prototype;Zr[lr]=!0,Zr.__empty=Be,Zr.__make=We;var $r;t(Ce,V),Ce.prototype.toString=function(){return this.__toString(Pe(this)+" {","}")},Ce.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Ce.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},Ce.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=Object.getPrototypeOf(this).constructor;return t._empty||(t._empty=Je(this,Qt()))},Ce.prototype.set=function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+Pe(this));var r=this._map&&this._map.set(t,e);return this.__ownerID||r===this._map?this:Je(this,r)},Ce.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Je(this,e)},Ce.prototype.wasAltered=function(){return this._map.wasAltered()},Ce.prototype.__iterator=function(t,e){var r=this;return p(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},Ce.prototype.__iterate=function(t,e){var r=this;return p(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},Ce.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Je(this,e,t):(this.__ownerID=t,this._map=e,this)};var tn=Ce.prototype;tn[or]=tn.remove,tn.deleteIn=tn.removeIn=Rr.removeIn,tn.merge=Rr.merge,
<del>tn.mergeWith=Rr.mergeWith,tn.mergeIn=Rr.mergeIn,tn.mergeDeep=Rr.mergeDeep,tn.mergeDeepWith=Rr.mergeDeepWith,tn.mergeDeepIn=Rr.mergeDeepIn,tn.setIn=Rr.setIn,tn.update=Rr.update,tn.updateIn=Rr.updateIn,tn.withMutations=Rr.withMutations,tn.asMutable=Rr.asMutable,tn.asImmutable=Rr.asImmutable,t(Ne,k),Ne.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},Ne.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Ne.prototype.contains=function(t){var e=(t-this._start)/this._step;return e>=0&&this.size>e&&e===Math.floor(e)},Ne.prototype.slice=function(t,e){return a(t,e,this.size)?this:(t=h(t,this.size),e=f(e,this.size),t>=e?new Ne(0,0):new Ne(this.get(t,this._end),this.get(e,this._end),this._step))},Ne.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.size>r)return r}return-1},Ne.prototype.lastIndexOf=function(t){return this.indexOf(t)},Ne.prototype.__iterate=function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;r>=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Ne.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new S(function(){var u=i;return i+=e?-n:n,o>r?I():z(t,o++,u)})},Ne.prototype.equals=function(t){return t instanceof Ne?this._start===t._start&&this._end===t._end&&this._step===t._step:He(this,t)};var en;t(Ve,k),Ve.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Ve.prototype.get=function(t,e){return this.has(t)?this._value:e},Ve.prototype.contains=function(t){return X(this._value,t)},Ve.prototype.slice=function(t,e){var r=this.size;return a(t,e,r)?this:new Ve(this._value,f(e,r)-h(t,r))},Ve.prototype.reverse=function(){return this},Ve.prototype.indexOf=function(t){return X(this._value,t)?0:-1},Ve.prototype.lastIndexOf=function(t){return X(this._value,t)?this.size:-1},Ve.prototype.__iterate=function(t){
<add>if(n){var e=n.value;return n=n.next,z(t,r++,e)}return I()})},Ee.isStack=Oe;var Vr="",Yr=Ee.prototype;Yr[Vr]=!0,Yr.withMutations=Kr.withMutations,Yr.asMutable=Kr.asMutable,Yr.asImmutable=Kr.asImmutable,Yr.wasAltered=Kr.wasAltered;var Qr;t(Ae,Q),Ae.of=function(){return this(arguments)},Ae.fromKeys=function(t){return this(p(t).keySeq())},Ae.prototype.toString=function(){return this.__toString("Set {","}")},Ae.prototype.has=function(t){return this._map.has(t)},Ae.prototype.add=function(t){return Re(this,this._map.set(t,!0))},Ae.prototype.remove=function(t){return Re(this,this._map.remove(t))},Ae.prototype.clear=function(){return Re(this,this._map.clear())},Ae.prototype.union=function(){var t=ir.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0===this.size&&1===t.length?this.constructor(t[0]):this.withMutations(function(e){for(var r=0;t.length>r;r++)l(t[r]).forEach(function(t){return e.add(t)})})},Ae.prototype.intersect=function(){var t=ir.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return l(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.every(function(t){return t.contains(e)})||r.remove(e)})})},Ae.prototype.subtract=function(){var t=ir.call(arguments,0);if(0===t.length)return this;t=t.map(function(t){return l(t)});var e=this;return this.withMutations(function(r){e.forEach(function(e){t.some(function(t){return t.contains(e)})&&r.remove(e)})})},Ae.prototype.merge=function(){return this.union.apply(this,arguments)},Ae.prototype.mergeWith=function(){var t=ir.call(arguments,1);return this.union.apply(this,t)},Ae.prototype.sort=function(t){return Le(qt(this,t))},Ae.prototype.sortBy=function(t,e){return Le(qt(this,e,t))},Ae.prototype.wasAltered=function(){return this._map.wasAltered()},Ae.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate(function(e,n){return t(n,n,r)},e)},Ae.prototype.__iterator=function(t,e){return this._map.map(function(t,e){return e}).__iterator(t,e)},Ae.prototype.__ensureOwner=function(t){
<add>if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},Ae.isSet=je;var Xr="",Fr=Ae.prototype;Fr[Xr]=!0,Fr[or]=Fr.remove,Fr.mergeDeep=Fr.merge,Fr.mergeDeepWith=Fr.mergeWith,Fr.withMutations=Kr.withMutations,Fr.asMutable=Kr.asMutable,Fr.asImmutable=Kr.asImmutable,Fr.__empty=Ke,Fr.__make=Ue;var Gr;t(Le,Ae),Le.of=function(){return this(arguments)},Le.fromKeys=function(t){return this(p(t).keySeq())},Le.prototype.toString=function(){return this.__toString("OrderedSet {","}")},Le.isOrderedSet=Te;var Zr=Le.prototype;Zr[lr]=!0,Zr.__empty=Be,Zr.__make=We;var $r;t(Ce,V),Ce.prototype.toString=function(){return this.__toString(Pe(this)+" {","}")},Ce.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Ce.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},Ce.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=Object.getPrototypeOf(this).constructor;return t._empty||(t._empty=Je(this,Qt()))},Ce.prototype.set=function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+Pe(this));var r=this._map&&this._map.set(t,e);return this.__ownerID||r===this._map?this:Je(this,r)},Ce.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Je(this,e)},Ce.prototype.wasAltered=function(){return this._map.wasAltered()},Ce.prototype.__iterator=function(t,e){var r=this;return p(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},Ce.prototype.__iterate=function(t,e){var r=this;return p(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},Ce.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Je(this,e,t):(this.__ownerID=t,this._map=e,this)};var tn=Ce.prototype;tn[or]=tn.remove,tn.deleteIn=tn.removeIn=Kr.removeIn,tn.merge=Kr.merge,
<add>tn.mergeWith=Kr.mergeWith,tn.mergeIn=Kr.mergeIn,tn.mergeDeep=Kr.mergeDeep,tn.mergeDeepWith=Kr.mergeDeepWith,tn.mergeDeepIn=Kr.mergeDeepIn,tn.setIn=Kr.setIn,tn.update=Kr.update,tn.updateIn=Kr.updateIn,tn.withMutations=Kr.withMutations,tn.asMutable=Kr.asMutable,tn.asImmutable=Kr.asImmutable,t(Ne,k),Ne.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},Ne.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},Ne.prototype.contains=function(t){var e=(t-this._start)/this._step;return e>=0&&this.size>e&&e===Math.floor(e)},Ne.prototype.slice=function(t,e){return a(t,e,this.size)?this:(t=h(t,this.size),e=f(e,this.size),t>=e?new Ne(0,0):new Ne(this.get(t,this._end),this.get(e,this._end),this._step))},Ne.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.size>r)return r}return-1},Ne.prototype.lastIndexOf=function(t){return this.indexOf(t)},Ne.prototype.__iterate=function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;r>=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-n:n}return o},Ne.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new S(function(){var u=i;return i+=e?-n:n,o>r?I():z(t,o++,u)})},Ne.prototype.equals=function(t){return t instanceof Ne?this._start===t._start&&this._end===t._end&&this._step===t._step:He(this,t)};var en;t(Ve,k),Ve.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Ve.prototype.get=function(t,e){return this.has(t)?this._value:e},Ve.prototype.contains=function(t){return X(this._value,t)},Ve.prototype.slice=function(t,e){var r=this.size;return a(t,e,r)?this:new Ve(this._value,f(e,r)-h(t,r))},Ve.prototype.reverse=function(){return this},Ve.prototype.indexOf=function(t){return X(this._value,t)?0:-1},Ve.prototype.lastIndexOf=function(t){return X(this._value,t)?this.size:-1},Ve.prototype.__iterate=function(t){
<ide> for(var e=0;this.size>e;e++)if(t(this._value,e,this)===!1)return e+1;return e},Ve.prototype.__iterator=function(t){var e=this,r=0;return new S(function(){return e.size>r?z(t,r++,e._value):I()})},Ve.prototype.equals=function(t){return t instanceof Ve?X(this._value,t._value):He(t)};var rn;_.Iterator=S,Ye(_,{toArray:function(){st(this.size);var t=Array(this.size||0);return this.valueSeq().__iterate(function(e,r){t[r]=e}),t},toIndexedSeq:function(){return new ht(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new at(this,!0)},toMap:function(){return Lt(this.toKeyedSeq())},toObject:function(){st(this.size);var t={};return this.__iterate(function(e,r){t[r]=e}),t},toOrderedMap:function(){return Ie(this.toKeyedSeq())},toOrderedSet:function(){return Le(d(this)?this.valueSeq():this)},toSet:function(){return Ae(d(this)?this.valueSeq():this)},toSetSeq:function(){return new ft(this)},toSeq:function(){return m(this)?this.toIndexedSeq():d(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ee(d(this)?this.valueSeq():this)},toList:function(){return fe(d(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=ir.call(arguments,0);return Ot(this,St(this,t))},contains:function(t){return this.some(function(e){return X(e,t)})},entries:function(){return this.__iterator(mr)},every:function(t,e){st(this.size);var r=!0;return this.__iterate(function(n,i,o){return t.call(e,n,i,o)?void 0:(r=!1,!1)}),r},filter:function(t,e){return Ot(this,lt(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},findEntry:function(t,e){var r;return this.__iterate(function(n,i,o){return t.call(e,n,i,o)?(r=[i,n],!1):void 0}),r},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e);
<ide>
<del>},forEach:function(t,e){return st(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){st(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?""+n:""}),e},keys:function(){return this.__iterator(yr)},map:function(t,e){return Ot(this,pt(this,t,e))},reduce:function(t,e,r){st(this.size);var n,i;return arguments.length<2?i=!0:n=e,this.__iterate(function(e,o,u){i?(i=!1,n=e):n=t.call(r,n,e,o,u)}),n},reduceRight:function(){var t=this.toKeyedSeq().reverse();return t.reduce.apply(t,arguments)},reverse:function(){return Ot(this,vt(this,!0))},slice:function(t,e){return Ot(this,mt(this,t,e,!0))},some:function(t,e){return!this.every(Fe(t),e)},sort:function(t){return Ot(this,qt(this,t))},values:function(){return this.__iterator(dr)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return o(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return yt(this,t,e)},equals:function(t){return He(this,t)},entrySeq:function(){var t=this;if(t._cache)return new j(t._cache);var e=t.toSeq().map(Xe).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Fe(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(s)},flatMap:function(t,e){return Ot(this,It(this,t,e))},flatten:function(t){return Ot(this,zt(this,t,!0))},fromEntrySeq:function(){return new ct(this)},get:function(t,e){return this.find(function(e,r){return X(r,t)},void 0,e)},getIn:function(t,e){for(var r,n=this,i=Rt(t);!(r=i.next()).done;){var o=r.value;if(n=n&&n.get?n.get(o,hr):hr,n===hr)return e}return n},groupBy:function(t,e){return dt(this,t,e)},has:function(t){return this.get(t,hr)!==hr},hasIn:function(t){return this.getIn(t,hr)!==hr},isSubset:function(t){return t="function"==typeof t.contains?t:_(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){return t.isSubset(this);
<add>},forEach:function(t,e){return st(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){st(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate(function(n){r?r=!1:e+=t,e+=null!==n&&void 0!==n?""+n:""}),e},keys:function(){return this.__iterator(yr)},map:function(t,e){return Ot(this,pt(this,t,e))},reduce:function(t,e,r){st(this.size);var n,i;return arguments.length<2?i=!0:n=e,this.__iterate(function(e,o,u){i?(i=!1,n=e):n=t.call(r,n,e,o,u)}),n},reduceRight:function(){var t=this.toKeyedSeq().reverse();return t.reduce.apply(t,arguments)},reverse:function(){return Ot(this,vt(this,!0))},slice:function(t,e){return Ot(this,mt(this,t,e,!0))},some:function(t,e){return!this.every(Fe(t),e)},sort:function(t){return Ot(this,qt(this,t))},values:function(){return this.__iterator(dr)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return o(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return yt(this,t,e)},equals:function(t){return He(this,t)},entrySeq:function(){var t=this;if(t._cache)return new j(t._cache);var e=t.toSeq().map(Xe).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Fe(t),e)},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},first:function(){return this.find(s)},flatMap:function(t,e){return Ot(this,It(this,t,e))},flatten:function(t){return Ot(this,zt(this,t,!0))},fromEntrySeq:function(){return new ct(this)},get:function(t,e){return this.find(function(e,r){return X(r,t)},void 0,e)},getIn:function(t,e){for(var r,n=this,i=Kt(t);!(r=i.next()).done;){var o=r.value;if(n=n&&n.get?n.get(o,hr):hr,n===hr)return e}return n},groupBy:function(t,e){return dt(this,t,e)},has:function(t){return this.get(t,hr)!==hr},hasIn:function(t){return this.getIn(t,hr)!==hr},isSubset:function(t){return t="function"==typeof t.contains?t:_(t),this.every(function(e){return t.contains(e)})},isSuperset:function(t){return t.isSubset(this);
<ide>
<ide> },keySeq:function(){return this.toSeq().map(Qe).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return Dt(this,t)},maxBy:function(t,e){return Dt(this,e,t)},min:function(t){return Dt(this,t?Ge(t):tr)},minBy:function(t,e){return Dt(this,e?Ge(e):tr,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Ot(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Ot(this,wt(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Fe(t),e)},sortBy:function(t,e){return Ot(this,qt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Ot(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Ot(this,gt(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Fe(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=er(this))}});var nn=_.prototype;nn[_r]=!0,nn[Sr]=nn.values,nn.__toJS=nn.toArray,nn.__toStringMapper=Ze,nn.inspect=nn.toSource=function(){return""+this},nn.chain=nn.flatMap,function(){try{Object.defineProperty(nn,"length",{get:function(){if(!_.noLengthWarning){var t;try{throw Error()}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),Ye(p,{flip:function(){return Ot(this,_t(this))},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return X(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return X(e,t)})},mapEntries:function(t,e){var r=this,n=0;return Ot(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],n++,r)}).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Ot(this,this.toSeq().flip().map(function(n,i){
<ide> return t.call(e,n,i,r)}).flip())}});var on=p.prototype;on[pr]=!0,on[Sr]=nn.entries,on.__toJS=nn.toObject,on.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Ze(t)},Ye(v,{toKeyedSeq:function(){return new at(this,!1)},filter:function(t,e){return Ot(this,lt(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){return this.toSeq().reverse().indexOf(t)},reverse:function(){return Ot(this,vt(this,!1))},slice:function(t,e){return Ot(this,mt(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=h(t,this.size);var n=this.slice(0,t);return Ot(this,1===r?n:n.concat(i(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.toKeyedSeq().findLastKey(t,e);return void 0===r?-1:r},first:function(){return this.get(0)},flatten:function(t){return Ot(this,zt(this,t,!1))},get:function(t,e){return t=u(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,r){return r===t},void 0,e)},has:function(t){return t=u(this,t),t>=0&&(void 0!==this.size?this.size===1/0||this.size>t:-1!==this.indexOf(t))},interpose:function(t){return Ot(this,bt(this,t))},interleave:function(){var t=[this].concat(i(arguments)),e=Et(this.toSeq(),k.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Ot(this,r)},last:function(){return this.get(-1)},skipWhile:function(t,e){return Ot(this,wt(this,t,e,!1))},zip:function(){var t=[this].concat(i(arguments));return Ot(this,Et(this,$e,t))},zipWith:function(t){var e=i(arguments);return e[0]=this,Ot(this,Et(this,t,e))}}),v.prototype[vr]=!0,v.prototype[lr]=!0,Ye(l,{get:function(t,e){return this.has(t)?t:e},contains:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),l.prototype.has=nn.contains,Ye(x,p.prototype),Ye(k,v.prototype),Ye(A,l.prototype),Ye(V,p.prototype),Ye(Y,v.prototype),Ye(Q,l.prototype);var un={Iterable:_,Seq:O,Collection:N,Map:Lt,OrderedMap:Ie,
<ide><path>src/Record.js
<ide> function makeRecord(likeRecord, map, ownerID) {
<ide> }
<ide>
<ide> function recordName(record) {
<del> return record._name || record.constructor.name;
<add> return record._name || record.constructor.name || 'Record';
<ide> } | 3 |
Javascript | Javascript | fix comments for ember.view.context | 0a3adbe6ad46a9bf8a9592d210055a7d0065e48a | <ide><path>packages/ember-views/lib/views/view.js
<ide> Ember.View = Ember.Object.extend(Ember.Evented,
<ide>
<ide> The context of a view is looked up as follows:
<ide>
<del> 1. Specified controller
<del> 2. Supplied context (usually by Handlebars)
<add> 1. Supplied context (usually by Handlebars)
<add> 2. Specified controller
<ide> 3. `parentView`'s context (for a child of a ContainerView)
<ide>
<ide> The code in Handlebars that overrides the `_context` property first | 1 |
Java | Java | delete unused imports in spring-context-indexer | 1af2fbfbbb68fda04797df666e56c1eb7dbe9da5 | <ide><path>spring-context-indexer/src/main/java/org/springframework/context/index/IndexedStereotypesProvider.java
<ide> import javax.lang.model.element.AnnotationMirror;
<ide> import javax.lang.model.element.Element;
<ide> import javax.lang.model.element.ElementKind;
<del>import javax.lang.model.type.DeclaredType;
<del>import javax.lang.model.type.TypeMirror;
<ide>
<ide> /**
<ide> * A {@link StereotypesProvider} implementation that extracts the stereotypes
<ide><path>spring-context-indexer/src/test/java/org/springframework/context/index/CandidateComponentsIndexerTests.java
<ide> import org.springframework.context.index.sample.type.SpecializedRepo;
<ide> import org.springframework.context.index.test.TestCompiler;
<ide> import org.springframework.stereotype.Component;
<del>import org.springframework.stereotype.Repository;
<ide>
<ide> import static org.hamcrest.Matchers.*;
<ide> import static org.junit.Assert.*; | 2 |
Javascript | Javascript | remove function wrappers in domselection | 9a13393ce367a06258f0ee2b155b02493632d472 | <ide><path>src/browser/ui/ReactDOMSelection.js
<ide> var ReactDOMSelection = {
<ide> /**
<ide> * @param {DOMElement} node
<ide> */
<del> getOffsets: function(node) {
<del> var getOffsets = document.selection ? getIEOffsets : getModernOffsets;
<del> return getOffsets(node);
<del> },
<add> getOffsets: document.selection ? getIEOffsets : getModernOffsets,
<ide>
<ide> /**
<ide> * @param {DOMElement|DOMTextNode} node
<ide> * @param {object} offsets
<ide> */
<del> setOffsets: function(node, offsets) {
<del> var setOffsets = document.selection ? setIEOffsets : setModernOffsets;
<del> setOffsets(node, offsets);
<del> }
<add> setOffsets: document.selection ? setIEOffsets : setModernOffsets
<ide> };
<ide>
<ide> module.exports = ReactDOMSelection; | 1 |
Javascript | Javascript | correct typo in optionalfeatures warning | c445e04b6add358e92a42f311b8ed6e9f6cb6134 | <ide><path>lib/index.js
<ide> module.exports = {
<ide> }
<ide> } else {
<ide> this.ui.writeWarnLine(
<del> 'The Ember Classic edition has been deprecated. Speciying "classic" in your package.json, or not specifying a value at all, will no longer be supported. You must explicitly set the "ember.edition" property to "octane". This warning will become an error in Ember 4.0.0.\n\nFor more information, see the deprecation guide: https://deprecations.emberjs.com/v3.x/#toc_editions-classic'
<add> 'The Ember Classic edition has been deprecated. Specifying "classic" in your package.json, or not specifying a value at all, will no longer be supported. You must explicitly set the "ember.edition" property to "octane". This warning will become an error in Ember 4.0.0.\n\nFor more information, see the deprecation guide: https://deprecations.emberjs.com/v3.x/#toc_editions-classic'
<ide> );
<ide>
<ide> if ( | 1 |
Javascript | Javascript | remove odd construct in normalizetuples | 9250abaf5e12084cd12ee62a7d1e335a5ee7c5f1 | <ide><path>packages/ember-metal/lib/accessors.js
<ide> Ember.normalizeTuple = function(target, path) {
<ide> return normalizeTuple(target, path);
<ide> };
<ide>
<del>Ember.normalizeTuple.primitive = normalizeTuple;
<del>
<ide> Ember.getWithDefault = function(root, key, defaultValue) {
<ide> var value = get(root, key);
<ide>
<ide> if (Ember.config.overrideAccessors) {
<ide> Ember.config.overrideAccessors();
<ide> get = Ember.get;
<ide> set = Ember.set;
<del>}
<ide>\ No newline at end of file
<add>}
<ide><path>packages/ember-metal/lib/watching.js
<ide> var guidFor = Ember.guidFor, // utils.js
<ide> metaFor = Ember.meta, // utils.js
<ide> get = Ember.get, // accessors.js
<ide> set = Ember.set, // accessors.js
<del> normalizeTuple = Ember.normalizeTuple.primitive, // accessors.js
<add> normalizeTuple = Ember.normalizeTuple, // accessors.js
<ide> GUID_KEY = Ember.GUID_KEY, // utils.js
<ide> META_KEY = Ember.META_KEY, // utils.js
<ide> // circular reference observer depends on Ember.watch | 2 |
Ruby | Ruby | remove intermediate assignments | 4b87854e541a47a485bb3b34dc6d090a48b8cc9c | <ide><path>activerecord/lib/active_record/associations/builder/association.rb
<ide> def initialize(name, scope, options)
<ide>
<ide> validate_options
<ide>
<del> if @scope && @scope.arity == 0
<del> prev_scope = @scope
<del> @scope = proc { instance_exec(&prev_scope) }
<add> if scope && scope.arity == 0
<add> @scope = proc { instance_exec(&scope) }
<ide> end
<ide> end
<ide>
<ide><path>activerecord/lib/active_record/associations/builder/collection_association.rb
<ide> def #{name.to_s.singularize}_ids=(ids)
<ide> private
<ide>
<ide> def wrap_scope(scope, mod)
<del> prev_scope = scope
<del>
<del> if prev_scope
<del> proc { |owner| instance_exec(owner, &prev_scope).extending(mod) }
<add> if scope
<add> proc { |owner| instance_exec(owner, &scope).extending(mod) }
<ide> else
<ide> proc { extending(mod) }
<ide> end | 2 |
Text | Text | fix text to follow language's syntax | aea570b498692bbeb3784cd1781dcd24d7cf51f2 | <ide><path>curriculum/challenges/portuguese/01-responsive-web-design/css-flexbox/add-flex-superpowers-to-the-tweet-embed.portuguese.md
<ide> localeTitle: Adicione Superpotências Flex ao Tweet Incorporado
<ide> ---
<ide>
<ide> ## Description
<del><section id="description"> À direita está o tweet incorporado que será usado como exemplo prático. Alguns dos elementos ficariam melhores com um layout diferente. O último desafio demonstrou a <code>display: flex</code> . Aqui você adicionará a vários componentes no tweet incorporado para começar a ajustar seu posicionamento. </section>
<add><section id="description"> À direita está o tweet incorporado que será usado como exemplo prático. Alguns dos elementos ficariam melhores com um layout diferente. O último desafio demonstrou a <code>display: flex</code> . Aqui você a adicionará a vários componentes no tweet incorporado para começar a ajustar seu posicionamento. </section>
<ide>
<ide> ## Instructions
<del><section id="instructions"> Adicione a <code>display: flex</code> propriedade CSS <code>display: flex</code> para todos os itens a seguir - observe que os seletores já estão configurados no <code>header</code> CSS <code>.follow-btn</code> o cabeçalho <code>.profile-name</code> , o cabeçalho <code>.follow-btn</code> , o cabeçalho <code>h3</code> e <code>h4</code> , o <code>footer</code> e as <code>.stats</code> do rodapé. </section>
<add><section id="instructions"> Adicione a propriedade CSS <code>display: flex</code> para todos os itens a seguir - observe que os seletores já estão configurados no CSS:
<add><code>header</code>, <code>.profile-name</code> do cabeçalho, <code>.follow-btn</code> do cabeçalho, <code>h3</code> e <code>h4</code> do cabeçalho, <code>footer</code>, e <code>.stats</code> do rodapé. </section>
<ide>
<ide> ## Tests
<ide> <section id='tests'> | 1 |
Javascript | Javascript | fix slovenian locale (redo ) | 6fb5fde5a501a62372b4f25299e6889a7371c7ef | <ide><path>src/locale/sl.js
<ide>
<ide> import moment from '../moment';
<ide>
<del>function translate(number, withoutSuffix, key) {
<add>function processRelativeTime(number, withoutSuffix, key, isFuture) {
<ide> var result = number + ' ';
<ide> switch (key) {
<add> case 's':
<add> return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
<ide> case 'm':
<ide> return withoutSuffix ? 'ena minuta' : 'eno minuto';
<ide> case 'mm':
<ide> if (number === 1) {
<del> result += 'minuta';
<add> result += withoutSuffix ? 'minuta' : 'minuto';
<ide> } else if (number === 2) {
<del> result += 'minuti';
<del> } else if (number === 3 || number === 4) {
<del> result += 'minute';
<add> result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
<add> } else if (number < 5) {
<add> result += withoutSuffix || isFuture ? 'minute' : 'minutami';
<ide> } else {
<del> result += 'minut';
<add> result += withoutSuffix || isFuture ? 'minut' : 'minutami';
<ide> }
<ide> return result;
<ide> case 'h':
<ide> return withoutSuffix ? 'ena ura' : 'eno uro';
<ide> case 'hh':
<ide> if (number === 1) {
<del> result += 'ura';
<add> result += withoutSuffix ? 'ura' : 'uro';
<ide> } else if (number === 2) {
<del> result += 'uri';
<del> } else if (number === 3 || number === 4) {
<del> result += 'ure';
<add> result += withoutSuffix || isFuture ? 'uri' : 'urama';
<add> } else if (number < 5) {
<add> result += withoutSuffix || isFuture ? 'ure' : 'urami';
<ide> } else {
<del> result += 'ur';
<add> result += withoutSuffix || isFuture ? 'ur' : 'urami';
<ide> }
<ide> return result;
<add> case 'd':
<add> return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
<ide> case 'dd':
<ide> if (number === 1) {
<del> result += 'dan';
<add> result += withoutSuffix || isFuture ? 'dan' : 'dnem';
<add> } else if (number === 2) {
<add> result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
<ide> } else {
<del> result += 'dni';
<add> result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
<ide> }
<ide> return result;
<add> case 'M':
<add> return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
<ide> case 'MM':
<ide> if (number === 1) {
<del> result += 'mesec';
<add> result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
<ide> } else if (number === 2) {
<del> result += 'meseca';
<del> } else if (number === 3 || number === 4) {
<del> result += 'mesece';
<add> result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
<add> } else if (number < 5) {
<add> result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
<ide> } else {
<del> result += 'mesecev';
<add> result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
<ide> }
<ide> return result;
<add> case 'y':
<add> return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
<ide> case 'yy':
<ide> if (number === 1) {
<del> result += 'leto';
<add> result += withoutSuffix || isFuture ? 'leto' : 'letom';
<ide> } else if (number === 2) {
<del> result += 'leti';
<del> } else if (number === 3 || number === 4) {
<del> result += 'leta';
<add> result += withoutSuffix || isFuture ? 'leti' : 'letoma';
<add> } else if (number < 5) {
<add> result += withoutSuffix || isFuture ? 'leta' : 'leti';
<ide> } else {
<del> result += 'let';
<add> result += withoutSuffix || isFuture ? 'let' : 'leti';
<ide> }
<ide> return result;
<ide> }
<ide> export default moment.defineLocale('sl', {
<ide> calendar : {
<ide> sameDay : '[danes ob] LT',
<ide> nextDay : '[jutri ob] LT',
<add>
<ide> nextWeek : function () {
<ide> switch (this.day()) {
<ide> case 0:
<ide> export default moment.defineLocale('sl', {
<ide> lastWeek : function () {
<ide> switch (this.day()) {
<ide> case 0:
<add> return '[prejšnjo] [nedeljo] [ob] LT';
<ide> case 3:
<add> return '[prejšnjo] [sredo] [ob] LT';
<ide> case 6:
<del> return '[prejšnja] dddd [ob] LT';
<add> return '[prejšnjo] [soboto] [ob] LT';
<ide> case 1:
<ide> case 2:
<ide> case 4:
<ide> export default moment.defineLocale('sl', {
<ide> },
<ide> relativeTime : {
<ide> future : 'čez %s',
<del> past : '%s nazaj',
<del> s : 'nekaj sekund',
<del> m : translate,
<del> mm : translate,
<del> h : translate,
<del> hh : translate,
<del> d : 'en dan',
<del> dd : translate,
<del> M : 'en mesec',
<del> MM : translate,
<del> y : 'eno leto',
<del> yy : translate
<add> past : 'pred %s',
<add> s : processRelativeTime,
<add> m : processRelativeTime,
<add> mm : processRelativeTime,
<add> h : processRelativeTime,
<add> hh : processRelativeTime,
<add> d : processRelativeTime,
<add> dd : processRelativeTime,
<add> M : processRelativeTime,
<add> MM : processRelativeTime,
<add> y : processRelativeTime,
<add> yy : processRelativeTime
<ide> },
<ide> ordinalParse: /\d{1,2}\./,
<ide> ordinal : '%d.',
<ide> export default moment.defineLocale('sl', {
<ide> doy : 7 // The week that contains Jan 1st is the first week of the year.
<ide> }
<ide> });
<del>
<ide><path>src/test/locale/sl.js
<ide> test('from', function (assert) {
<ide> assert.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), '2 leti', '548 days = 2 years');
<ide> assert.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), 'eno leto', '1 year = a year');
<ide> assert.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), '5 let', '5 years = 5 years');
<add>
<add> assert.equal(start.from(moment([2007, 1, 28]).add({m: 1}), true), 'ena minuta', 'a minute');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({m: 2}), true), '2 minuti', '2 minutes');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({m: 3}), true), '3 minute', '3 minutes');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({m: 4}), true), '4 minute', '4 minutes');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({m: 5}), true), '5 minut', '5 minutes');
<add>
<add> assert.equal(start.from(moment([2007, 1, 28]).add({h: 1}), true), 'ena ura', 'an hour');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({h: 2}), true), '2 uri', '2 hours');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({h: 3}), true), '3 ure', '3 hours');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({h: 4}), true), '4 ure', '4 hours');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), '5 ur', '5 hours');
<add>
<add> assert.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), 'en dan', 'a day');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({d: 2}), true), '2 dni', '2 days');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({d: 3}), true), '3 dni', '3 days');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({d: 4}), true), '4 dni', '4 days');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), '5 dni', '5 days');
<add>
<add> assert.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), 'en mesec', 'a month');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({M: 2}), true), '2 meseca', '2 months');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({M: 3}), true), '3 mesece', '3 months');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({M: 4}), true), '4 mesece', '4 months');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), '5 mesecev', '5 months');
<add>
<add> assert.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), 'eno leto', 'a year');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({y: 2}), true), '2 leti', '2 years');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({y: 3}), true), '3 leta', '3 years');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({y: 4}), true), '4 leta', '4 years');
<add> assert.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), '5 let', '5 years');
<ide> });
<ide>
<ide> test('suffix', function (assert) {
<ide> assert.equal(moment(30000).from(0), 'čez nekaj sekund', 'prefix');
<del> assert.equal(moment(0).from(30000), 'nekaj sekund nazaj', 'suffix');
<add> assert.equal(moment(0).from(30000), 'pred nekaj sekundami', 'suffix');
<ide> });
<ide>
<ide> test('now from now', function (assert) {
<del> assert.equal(moment().fromNow(), 'nekaj sekund nazaj', 'now from now should display as in the past');
<add> assert.equal(moment().fromNow(), 'pred nekaj sekundami', 'now from now should display as in the past');
<ide> });
<ide>
<del>test('fromNow', function (assert) {
<add>test('fromNow (future)', function (assert) {
<ide> assert.equal(moment().add({s: 30}).fromNow(), 'čez nekaj sekund', 'in a few seconds');
<del> assert.equal(moment().add({d: 5}).fromNow(), 'čez 5 dni', 'in 5 days');
<add> assert.equal(moment().add({m: 1}).fromNow(), 'čez eno minuto', 'in a minute');
<add> assert.equal(moment().add({m: 2}).fromNow(), 'čez 2 minuti', 'in 2 minutes');
<add> assert.equal(moment().add({m: 3}).fromNow(), 'čez 3 minute', 'in 3 minutes');
<add> assert.equal(moment().add({m: 4}).fromNow(), 'čez 4 minute', 'in 4 minutes');
<add> assert.equal(moment().add({m: 5}).fromNow(), 'čez 5 minut', 'in 5 minutes');
<add>
<add> assert.equal(moment().add({h: 1}).fromNow(), 'čez eno uro', 'in an hour');
<add> assert.equal(moment().add({h: 2}).fromNow(), 'čez 2 uri', 'in 2 hours');
<add> assert.equal(moment().add({h: 3}).fromNow(), 'čez 3 ure', 'in 3 hours');
<add> assert.equal(moment().add({h: 4}).fromNow(), 'čez 4 ure', 'in 4 hours');
<add> assert.equal(moment().add({h: 5}).fromNow(), 'čez 5 ur', 'in 5 hours');
<add>
<add> assert.equal(moment().add({d: 1}).fromNow(), 'čez en dan', 'in a day');
<add> assert.equal(moment().add({d: 2}).fromNow(), 'čez 2 dni', 'in 2 days');
<add> assert.equal(moment().add({d: 3}).fromNow(), 'čez 3 dni', 'in 3 days');
<add> assert.equal(moment().add({d: 4}).fromNow(), 'čez 4 dni', 'in 4 days');
<add> assert.equal(moment().add({d: 5}).fromNow(), 'čez 5 dni', 'in 5 days');
<add>
<add> assert.equal(moment().add({M: 1}).fromNow(), 'čez en mesec', 'in a month');
<add> assert.equal(moment().add({M: 2}).fromNow(), 'čez 2 meseca', 'in 2 months');
<add> assert.equal(moment().add({M: 3}).fromNow(), 'čez 3 mesece', 'in 3 months');
<add> assert.equal(moment().add({M: 4}).fromNow(), 'čez 4 mesece', 'in 4 months');
<add> assert.equal(moment().add({M: 5}).fromNow(), 'čez 5 mesecev', 'in 5 months');
<add>
<add> assert.equal(moment().add({y: 1}).fromNow(), 'čez eno leto', 'in a year');
<add> assert.equal(moment().add({y: 2}).fromNow(), 'čez 2 leti', 'in 2 years');
<add> assert.equal(moment().add({y: 3}).fromNow(), 'čez 3 leta', 'in 3 years');
<add> assert.equal(moment().add({y: 4}).fromNow(), 'čez 4 leta', 'in 4 years');
<add> assert.equal(moment().add({y: 5}).fromNow(), 'čez 5 let', 'in 5 years');
<add>
<add> assert.equal(moment().subtract({s: 30}).fromNow(), 'pred nekaj sekundami', 'a few seconds ago');
<add>
<add> assert.equal(moment().subtract({m: 1}).fromNow(), 'pred eno minuto', 'a minute ago');
<add> assert.equal(moment().subtract({m: 2}).fromNow(), 'pred 2 minutama', '2 minutes ago');
<add> assert.equal(moment().subtract({m: 3}).fromNow(), 'pred 3 minutami', '3 minutes ago');
<add> assert.equal(moment().subtract({m: 4}).fromNow(), 'pred 4 minutami', '4 minutes ago');
<add> assert.equal(moment().subtract({m: 5}).fromNow(), 'pred 5 minutami', '5 minutes ago');
<add>
<add> assert.equal(moment().subtract({h: 1}).fromNow(), 'pred eno uro', 'an hour ago');
<add> assert.equal(moment().subtract({h: 2}).fromNow(), 'pred 2 urama', '2 hours ago');
<add> assert.equal(moment().subtract({h: 3}).fromNow(), 'pred 3 urami', '3 hours ago');
<add> assert.equal(moment().subtract({h: 4}).fromNow(), 'pred 4 urami', '4 hours ago');
<add> assert.equal(moment().subtract({h: 5}).fromNow(), 'pred 5 urami', '5 hours ago');
<add>
<add> assert.equal(moment().subtract({d: 1}).fromNow(), 'pred enim dnem', 'a day ago');
<add> assert.equal(moment().subtract({d: 2}).fromNow(), 'pred 2 dnevoma', '2 days ago');
<add> assert.equal(moment().subtract({d: 3}).fromNow(), 'pred 3 dnevi', '3 days ago');
<add> assert.equal(moment().subtract({d: 4}).fromNow(), 'pred 4 dnevi', '4 days ago');
<add> assert.equal(moment().subtract({d: 5}).fromNow(), 'pred 5 dnevi', '5 days ago');
<add>
<add> assert.equal(moment().subtract({M: 1}).fromNow(), 'pred enim mesecem', 'a month ago');
<add> assert.equal(moment().subtract({M: 2}).fromNow(), 'pred 2 mesecema', '2 months ago');
<add> assert.equal(moment().subtract({M: 3}).fromNow(), 'pred 3 meseci', '3 months ago');
<add> assert.equal(moment().subtract({M: 4}).fromNow(), 'pred 4 meseci', '4 months ago');
<add> assert.equal(moment().subtract({M: 5}).fromNow(), 'pred 5 meseci', '5 months ago');
<add>
<add> assert.equal(moment().subtract({y: 1}).fromNow(), 'pred enim letom', 'a year ago');
<add> assert.equal(moment().subtract({y: 2}).fromNow(), 'pred 2 letoma', '2 years ago');
<add> assert.equal(moment().subtract({y: 3}).fromNow(), 'pred 3 leti', '3 years ago');
<add> assert.equal(moment().subtract({y: 4}).fromNow(), 'pred 4 leti', '4 years ago');
<add> assert.equal(moment().subtract({y: 5}).fromNow(), 'pred 5 leti', '5 years ago');
<ide> });
<ide>
<ide> test('calendar day', function (assert) {
<ide> test('calendar last week', function (assert) {
<ide> function makeFormat(d) {
<ide> switch (d.day()) {
<ide> case 0:
<add> return '[prejšnjo] [nedeljo] [ob] LT';
<ide> case 3:
<add> return '[prejšnjo] [sredo] [ob] LT';
<ide> case 6:
<del> return '[prejšnja] dddd [ob] LT';
<add> return '[prejšnjo] [soboto] [ob] LT';
<ide> case 1:
<ide> case 2:
<ide> case 4: | 2 |
Text | Text | fix a typo in api/process.md | 27f4c9407f1b052512e2bbd8262a627ab785fa20 | <ide><path>doc/api/process.md
<ide> too many listeners have been added to an event
<ide>
<ide> ```txt
<ide> $ node
<del>> event.defaultMaxListeners = 1;
<add>> events.defaultMaxListeners = 1;
<ide> > process.on('foo', () => {});
<ide> > process.on('foo', () => {});
<ide> > (node:38638) Warning: Possible EventEmitter memory leak detected. 2 foo
<ide> adds a custom handler to the `'warning'` event:
<ide> ```txt
<ide> $ node --no-warnings
<ide> > var p = process.on('warning', (warning) => console.warn('Do not do that!'));
<del>> event.defaultMaxListeners = 1;
<add>> events.defaultMaxListeners = 1;
<ide> > process.on('foo', () => {});
<ide> > process.on('foo', () => {});
<ide> > Do not do that! | 1 |
Ruby | Ruby | tap tapdependency recursively | ac713863731b792e45776e990131f8774f5a7f65 | <ide><path>Library/Homebrew/cmd/test-bot.rb
<ide> def formula(formula_name)
<ide> reqs |= formula.devel.requirements.to_a
<ide> end
<ide>
<add> begin
<add> formula.recursive_dependencies
<add> rescue TapFormulaUnavailableError => e
<add> raise if e.tap.installed?
<add> safe_system "brew", "tap", e.tap.name
<add> retry
<add> end
<add>
<ide> begin
<ide> deps.each do |dep|
<del> if dep.is_a?(TapDependency) && dep.tap
<del> tap_dir = Homebrew.homebrew_git_repo dep.tap
<del> test "brew", "tap", dep.tap unless tap_dir.directory?
<del> end
<ide> CompilerSelector.select_for(dep.to_formula)
<ide> end
<ide> CompilerSelector.select_for(formula) | 1 |
Text | Text | move eljefedelrodeodeljefe to emeritus | 822101f570478ffa15e4ed0e00cd0d67b9cc789e | <ide><path>README.md
<ide> For information about the governance of the Node.js project, see
<ide> **Hitesh Kanwathirtha** <[email protected]> (he/him)
<ide> * [edsadr](https://github.com/edsadr) -
<ide> **Adrian Estrada** <[email protected]> (he/him)
<del>* [eljefedelrodeodeljefe](https://github.com/eljefedelrodeodeljefe) -
<del>**Robert Jefe Lindstaedt** <[email protected]>
<ide> * [eugeneo](https://github.com/eugeneo) -
<ide> **Eugene Ostroukhov** <[email protected]>
<ide> * [evanlucas](https://github.com/evanlucas) -
<ide> For information about the governance of the Node.js project, see
<ide> **Chris Dickinson** <[email protected]>
<ide> * [DavidCai1993](https://github.com/DavidCai1993) -
<ide> **David Cai** <[email protected]> (he/him)
<add>* [eljefedelrodeodeljefe](https://github.com/eljefedelrodeodeljefe) -
<add>**Robert Jefe Lindstaedt** <[email protected]>
<ide> * [estliberitas](https://github.com/estliberitas) -
<ide> **Alexander Makarenko** <[email protected]>
<ide> * [firedfox](https://github.com/firedfox) - | 1 |
PHP | PHP | fix merge conflicts | 539750de5499f58cce061b431ab61f79257614f9 | <ide><path>src/Illuminate/Database/Eloquent/Relations/Pivot.php
<ide> public function __construct(Model $parent, $attributes, $table, $exists = false)
<ide> // The pivot model is a "dynamic" model since we will set the tables dynamically
<ide> // for the instance. This allows it work for any intermediate tables for the
<ide> // many to many relationship that are defined by this developer's classes.
<del> $this->setRawAttributes($attributes, true);
<add> $this->forceFill($attributes);
<add>
<add> $this->syncOriginal();
<ide>
<ide> $this->setTable($table);
<ide>
<ide><path>src/Illuminate/Foundation/helpers.php
<ide> function abort($code, $message = '', array $headers = array())
<ide> *
<ide> * @param string $name
<ide> * @param array $parameters
<add> * @param bool $absolute
<ide> * @return string
<ide> */
<del> function action($name, $parameters = array())
<add> function action($name, $parameters = array(), $absolute = true)
<ide> {
<del> return app('url')->action($name, $parameters);
<add> return app('url')->action($name, $parameters, $absolute);
<ide> }
<ide> }
<ide>
<ide><path>src/Illuminate/Queue/Console/FailedTableCommand.php
<ide> public function fire()
<ide> {
<ide> $fullPath = $this->createBaseMigration();
<ide>
<del> $this->files->put($fullPath, $this->files->get(__DIR__.'/stubs/failed_jobs.stub'));
<add> $table = $this->laravel['config']['queue.failed.table'];
<add>
<add> $stub = str_replace(
<add> '{{table}}', $table, $this->files->get(__DIR__.'/stubs/failed_jobs.stub')
<add> );
<add>
<add> $this->files->put($fullPath, $stub);
<ide>
<ide> $this->info('Migration created successfully!');
<ide>
<ide><path>src/Illuminate/Queue/Console/TableCommand.php
<ide> public function fire()
<ide> {
<ide> $fullPath = $this->createBaseMigration();
<ide>
<del> $this->files->put($fullPath, $this->files->get(__DIR__.'/stubs/jobs.stub'));
<add> $table = $this->laravel['config']['queue.connections.database.table'];
<add>
<add> $stub = str_replace(
<add> '{{table}}', $table, $this->files->get(__DIR__.'/stubs/jobs.stub')
<add> );
<add>
<add> $this->files->put($fullPath, $stub);
<ide>
<ide> $this->info('Migration created successfully!');
<ide>
<ide><path>tests/Database/DatabaseEloquentPivotTest.php
<ide> public function testPropertiesAreSetCorrectly()
<ide> $this->assertTrue($pivot->exists);
<ide> }
<ide>
<add> public function testMutatorsAreCalledFromConstructor() {
<add> $parent = m::mock('Illuminate\Database\Eloquent\Model[getConnectionName]');
<add> $parent->shouldReceive('getConnectionName')->once()->andReturn('connection');
<add>
<add> $pivot = new DatabaseEloquentPivotTestMutatorStub($parent, array('foo' => 'bar'), 'table', true);
<add>
<add> $this->assertTrue($pivot->getMutatorCalled());
<add> }
<add>
<ide>
<ide> public function testPropertiesUnchangedAreNotDirty()
<ide> {
<ide> public function getDates()
<ide> return array();
<ide> }
<ide> }
<add>
<add>class DatabaseEloquentPivotTestMutatorStub extends Illuminate\Database\Eloquent\Relations\Pivot {
<add> private $mutatorCalled = false;
<add>
<add> public function setFooAttribute($value) {
<add> $this->mutatorCalled = true;
<add> return $value;
<add> }
<add>
<add> public function getMutatorCalled() {
<add> return $this->mutatorCalled;
<add> }
<add>}
<ide><path>tests/Queue/QueueFailedTableCommandTest.php
<del><?php
<del>
<del>use Illuminate\Queue\Console\FailedTableCommand as QueueFailedTableCommand;
<del>use Illuminate\Foundation\Application;
<del>use Mockery as m;
<del>
<del>class QueueFailedTableCommandTest extends PHPUnit_Framework_TestCase {
<del>
<del> public function tearDown()
<del> {
<del> m::close();
<del> }
<del>
<del>
<del> public function testCreateMakesMigration()
<del> {
<del> $command = new QueueFailedTableCommandTestStub(
<del> $files = m::mock('Illuminate\Filesystem\Filesystem'),
<del> $composer = m::mock('Illuminate\Foundation\Composer')
<del> );
<del> $creator = m::mock('Illuminate\Database\Migrations\MigrationCreator')->shouldIgnoreMissing();
<del>
<del> $app = new Application();
<del> $app->useDatabasePath(__DIR__);
<del> $app['migration.creator'] = $creator;
<del> $command->setLaravel($app);
<del> $path = __DIR__ . '/migrations';
<del> $creator->shouldReceive('create')->once()->with('create_failed_jobs_table', $path)->andReturn($path);
<del> $files->shouldReceive('get')->once()->andReturn('foo');
<del> $files->shouldReceive('put')->once()->with($path, 'foo');
<del> $composer->shouldReceive('dumpAutoloads')->once();
<del>
<del> $this->runCommand($command);
<del> }
<del>
<del>
<del> protected function runCommand($command, $input = array())
<del> {
<del> return $command->run(new Symfony\Component\Console\Input\ArrayInput($input), new Symfony\Component\Console\Output\NullOutput);
<del> }
<del>
<del>}
<del>
<del>class QueueFailedTableCommandTestStub extends QueueFailedTableCommand {
<del>
<del> public function call($command, array $arguments = array())
<del> {
<del> //
<del> }
<del>
<del>}
<ide><path>tests/Queue/QueueTableCommandTest.php
<del><?php
<del>
<del>use Illuminate\Queue\Console\TableCommand as QueueTableCommand;
<del>use Illuminate\Foundation\Application;
<del>use Mockery as m;
<del>
<del>class QueueTableCommandTest extends PHPUnit_Framework_TestCase {
<del>
<del> public function tearDown()
<del> {
<del> m::close();
<del> }
<del>
<del>
<del> public function testCreateMakesMigration()
<del> {
<del> $command = new QueueTableCommandTestStub(
<del> $files = m::mock('Illuminate\Filesystem\Filesystem'),
<del> $composer = m::mock('Illuminate\Foundation\Composer')
<del> );
<del> $creator = m::mock('Illuminate\Database\Migrations\MigrationCreator')->shouldIgnoreMissing();
<del>
<del> $app = new Application();
<del> $app->useDatabasePath(__DIR__);
<del> $app['migration.creator'] = $creator;
<del> $command->setLaravel($app);
<del> $path = __DIR__ . '/migrations';
<del> $creator->shouldReceive('create')->once()->with('create_jobs_table', $path)->andReturn($path);
<del> $files->shouldReceive('get')->once()->andReturn('foo');
<del> $files->shouldReceive('put')->once()->with($path, 'foo');
<del> $composer->shouldReceive('dumpAutoloads')->once();
<del>
<del> $this->runCommand($command);
<del> }
<del>
<del>
<del> protected function runCommand($command, $input = array())
<del> {
<del> return $command->run(new Symfony\Component\Console\Input\ArrayInput($input), new Symfony\Component\Console\Output\NullOutput);
<del> }
<del>
<del>}
<del>
<del>class QueueTableCommandTestStub extends QueueTableCommand {
<del>
<del> public function call($command, array $arguments = array())
<del> {
<del> //
<del> }
<del>
<del>} | 7 |
Mixed | Ruby | add a source attribute | c9a2bc284c3c3ef11839fa0a0222339f0fd7c2c0 | <ide><path>activesupport/CHANGELOG.md
<add>* `ActiveSupport::ErrorReporter` now accepts and forward a `source:` parameter.
<add>
<add> This allow libraries to signal the origin of the errors, and reporters
<add> to easily ignore some sources.
<add>
<add> *Jean Boussier*
<add>
<ide> * Fix and add protections for XSS in `ActionView::Helpers` and `ERB::Util`.
<ide>
<ide> Add the method `ERB::Util.xml_name_escape` to escape dangerous characters
<ide><path>activesupport/lib/active_support/cache/mem_cache_store.rb
<ide> def deserialize_entry(payload, raw: false, **)
<ide> def rescue_error_with(fallback)
<ide> yield
<ide> rescue Dalli::DalliError => error
<del> ActiveSupport.error_reporter&.report(error, handled: true, severity: :warning)
<ide> logger.error("DalliError (#{error}): #{error.message}") if logger
<add> ActiveSupport.error_reporter&.report(
<add> error,
<add> severity: :warning,
<add> source: "mem_cache_store.active_support",
<add> )
<ide> fallback
<ide> end
<ide> end
<ide><path>activesupport/lib/active_support/cache/redis_cache_store.rb
<ide> class RedisCacheStore < Store
<ide> if logger
<ide> logger.error { "RedisCacheStore: #{method} failed, returned #{returning.inspect}: #{exception.class}: #{exception.message}" }
<ide> end
<add> ActiveSupport.error_reporter&.report(
<add> exception,
<add> severity: :warning,
<add> source: "redis_cache_store.active_support",
<add> )
<ide> end
<ide>
<ide> # The maximum number of entries to receive per SCAN call.
<ide> def serialize_entries(entries, **options)
<ide> def failsafe(method, returning: nil)
<ide> yield
<ide> rescue ::Redis::BaseError => error
<del> ActiveSupport.error_reporter&.report(error, handled: true, severity: :warning)
<ide> @error_handler&.call(method: method, exception: error, returning: returning)
<ide> returning
<ide> end
<ide><path>activesupport/lib/active_support/error_reporter.rb
<ide> module ActiveSupport
<ide> # end
<ide> class ErrorReporter
<ide> SEVERITIES = %i(error warning info)
<add> DEFAULT_SOURCE = "application"
<ide>
<ide> attr_accessor :logger
<ide>
<ide> def initialize(*subscribers, logger: nil)
<ide> # 1 + '1'
<ide> # end
<ide> #
<del> def handle(error_class = StandardError, severity: :warning, context: {}, fallback: nil)
<add> def handle(error_class = StandardError, severity: :warning, context: {}, fallback: nil, source: DEFAULT_SOURCE)
<ide> yield
<ide> rescue error_class => error
<del> report(error, handled: true, severity: severity, context: context)
<add> report(error, handled: true, severity: severity, context: context, source: source)
<ide> fallback.call if fallback
<ide> end
<ide>
<del> def record(error_class = StandardError, severity: :error, context: {})
<add> def record(error_class = StandardError, severity: :error, context: {}, source: DEFAULT_SOURCE)
<ide> yield
<ide> rescue error_class => error
<del> report(error, handled: false, severity: severity, context: context)
<add> report(error, handled: false, severity: severity, context: context, source: source)
<ide> raise
<ide> end
<ide>
<ide> def set_context(...)
<ide> # When the block based +handle+ and +record+ methods are not suitable, you can directly use +report+
<ide> #
<ide> # Rails.error.report(error)
<del> def report(error, handled: true, severity: handled ? :warning : :error, context: {})
<add> def report(error, handled: true, severity: handled ? :warning : :error, context: {}, source: DEFAULT_SOURCE)
<ide> unless SEVERITIES.include?(severity)
<ide> raise ArgumentError, "severity must be one of #{SEVERITIES.map(&:inspect).join(", ")}, got: #{severity.inspect}"
<ide> end
<ide> def report(error, handled: true, severity: handled ? :warning : :error, context:
<ide> disabled_subscribers = ActiveSupport::IsolatedExecutionState[self]
<ide> @subscribers.each do |subscriber|
<ide> unless disabled_subscribers&.any? { |s| s === subscriber }
<del> subscriber.report(error, handled: handled, severity: severity, context: full_context)
<add> subscriber.report(error, handled: handled, severity: severity, context: full_context, source: source)
<ide> end
<ide> rescue => subscriber_error
<ide> if logger
<ide><path>activesupport/lib/active_support/execution_wrapper.rb
<ide> def self.wrap
<ide> begin
<ide> yield
<ide> rescue => error
<del> error_reporter.report(error, handled: false)
<add> error_reporter.report(error, handled: false, source: "unhandled_error.active_support")
<ide> raise
<ide> ensure
<ide> instance.complete!
<ide><path>activesupport/test/error_reporter_test.rb
<ide> def initialize
<ide> @events = []
<ide> end
<ide>
<del> def report(error, handled:, severity:, context:)
<del> @events << [error, handled, severity, context]
<add> def report(error, handled:, severity:, source:, context:)
<add> @events << [error, handled, severity, source, context]
<ide> end
<ide> end
<ide>
<ide> def report(error, handled:, severity:, context:)
<ide> @reporter.set_context(section: "admin")
<ide> error = ArgumentError.new("Oops")
<ide> @reporter.report(error, handled: true)
<del> assert_equal [[error, true, :warning, { section: "admin" }]], @subscriber.events
<add> assert_equal [[error, true, :warning, "application", { section: "admin" }]], @subscriber.events
<ide> end
<ide>
<ide> test "passed context has priority over the execution context" do
<ide> @reporter.set_context(section: "admin")
<ide> error = ArgumentError.new("Oops")
<ide> @reporter.report(error, handled: true, context: { section: "public" })
<del> assert_equal [[error, true, :warning, { section: "public" }]], @subscriber.events
<add> assert_equal [[error, true, :warning, "application", { section: "public" }]], @subscriber.events
<add> end
<add>
<add> test "passed source is forwarded" do
<add> error = ArgumentError.new("Oops")
<add> @reporter.report(error, handled: true, source: "my_gem")
<add> assert_equal [[error, true, :warning, "my_gem", {}]], @subscriber.events
<ide> end
<ide>
<ide> test "#disable allow to skip a subscriber" do
<ide> def report(error, handled:, severity:, context:)
<ide> @reporter.handle do
<ide> raise error
<ide> end
<del> assert_equal [[error, true, :warning, {}]], @subscriber.events
<add> assert_equal [[error, true, :warning, "application", {}]], @subscriber.events
<ide> end
<ide>
<ide> test "#handle can be scoped to an exception class" do
<ide> def report(error, handled:, severity:, context:)
<ide> raise error
<ide> end
<ide> end
<del> assert_equal [[error, false, :error, {}]], @subscriber.events
<add> assert_equal [[error, false, :error, "application", {}]], @subscriber.events
<ide> end
<ide>
<ide> test "#record can be scoped to an exception class" do
<ide> def initialize(error)
<ide> @error = error
<ide> end
<ide>
<del> def report(_error, handled:, severity:, context:)
<add> def report(_error, handled:, severity:, context:, source:)
<ide> raise @error
<ide> end
<ide> end
<ide><path>activesupport/test/executor_test.rb
<ide> def initialize
<ide> @events = []
<ide> end
<ide>
<del> def report(error, handled:, severity:, context:)
<del> @events << [error, handled, severity, context]
<add> def report(error, handled:, severity:, source:, context:)
<add> @events << [error, handled, severity, source, context]
<ide> end
<ide> end
<ide>
<ide> def test_wrap_report_errors
<ide> raise error
<ide> end
<ide> end
<del> assert_equal [[error, false, :error, {}]], subscriber.events
<add> assert_equal [[error, false, :error, "unhandled_error.active_support", {}]], subscriber.events
<ide> end
<ide>
<ide> def test_wrap_invokes_callbacks | 7 |
Python | Python | remove superfluous parenthesis | cd77205cf921845d5615805562a28924e8724199 | <ide><path>glances/plugins/glances_sensors.py
<ide> def msg_curse(self, args=None):
<ide>
<ide> for i in self.stats:
<ide> # Do not display anything if no battery are detected
<del> if (i['type'] == 'battery' and i['value'] == []):
<add> if i['type'] == 'battery' and i['value'] == []:
<ide> continue
<ide> # New line
<ide> ret.append(self.curse_new_line()) | 1 |
Javascript | Javascript | fix missed version bump | 56583406394d44c8f9e0c1ac2c9a8a227852c26c | <ide><path>packages/ember-metal/lib/core.js
<ide> Ember.toString = function() { return "Ember"; };
<ide> /**
<ide> @property VERSION
<ide> @type String
<del> @default '1.0.0-rc.6'
<add> @default '1.0.0-rc.6.1'
<ide> @final
<ide> */
<del>Ember.VERSION = '1.0.0-rc.6';
<add>Ember.VERSION = '1.0.0-rc.6.1';
<ide>
<ide> /**
<ide> Standard environmental variables. You can define these in a global `ENV` | 1 |
Ruby | Ruby | convert string concatenations to substitutions | 4a1e2c32532ee0f6ee08563d7970c9220d9e2773 | <ide><path>activerecord/lib/active_record/schema_dumper.rb
<ide> def indexes(table, stream)
<ide> if (indexes = @connection.indexes(table)).any?
<ide> add_index_statements = indexes.map do |index|
<ide> statement_parts = [
<del> ('add_index ' + remove_prefix_and_suffix(index.table).inspect),
<add> "add_index #{remove_prefix_and_suffix(index.table).inspect}",
<ide> index.columns.inspect,
<del> ('name: ' + index.name.inspect),
<add> "name: #{index.name.inspect}",
<ide> ]
<ide> statement_parts << 'unique: true' if index.unique
<ide>
<ide> index_lengths = (index.lengths || []).compact
<del> statement_parts << ('length: ' + Hash[index.columns.zip(index.lengths)].inspect) unless index_lengths.empty?
<add> statement_parts << "length: #{Hash[index.columns.zip(index.lengths)].inspect}" unless index_lengths.empty?
<ide>
<ide> index_orders = (index.orders || {})
<del> statement_parts << ('order: ' + index.orders.inspect) unless index_orders.empty?
<add> statement_parts << "order: #{index.orders.inspect}" unless index_orders.empty?
<ide>
<del> statement_parts << ('where: ' + index.where.inspect) if index.where
<add> statement_parts << "where: #{index.where.inspect}" if index.where
<ide>
<del> statement_parts << ('using: ' + index.using.inspect) if index.using
<add> statement_parts << "using: #{index.using.inspect}" if index.using
<ide>
<del> statement_parts << ('type: ' + index.type.inspect) if index.type
<add> statement_parts << "type: #{index.type.inspect}" if index.type
<ide>
<del> ' ' + statement_parts.join(', ')
<add> " #{statement_parts.join(', ')}"
<ide> end
<ide>
<ide> stream.puts add_index_statements.sort.join("\n")
<ide> def foreign_keys(table, stream)
<ide> if (foreign_keys = @connection.foreign_keys(table)).any?
<ide> add_foreign_key_statements = foreign_keys.map do |foreign_key|
<ide> parts = [
<del> 'add_foreign_key ' + remove_prefix_and_suffix(foreign_key.from_table).inspect,
<add> "add_foreign_key #{remove_prefix_and_suffix(foreign_key.from_table).inspect}",
<ide> remove_prefix_and_suffix(foreign_key.to_table).inspect,
<ide> ]
<ide>
<ide> if foreign_key.column != @connection.foreign_key_column_for(foreign_key.to_table)
<del> parts << ('column: ' + foreign_key.column.inspect)
<add> parts << "column: #{foreign_key.column.inspect}"
<ide> end
<ide>
<ide> if foreign_key.custom_primary_key?
<del> parts << ('primary_key: ' + foreign_key.primary_key.inspect)
<add> parts << "primary_key: #{foreign_key.primary_key.inspect}"
<ide> end
<ide>
<ide> if foreign_key.name !~ /^fk_rails_[0-9a-f]{10}$/
<del> parts << ('name: ' + foreign_key.name.inspect)
<add> parts << "name: #{foreign_key.name.inspect}"
<ide> end
<ide>
<del> parts << ('on_update: ' + foreign_key.on_update.inspect) if foreign_key.on_update
<del> parts << ('on_delete: ' + foreign_key.on_delete.inspect) if foreign_key.on_delete
<add> parts << "on_update: #{foreign_key.on_update.inspect}" if foreign_key.on_update
<add> parts << "on_delete: #{foreign_key.on_delete.inspect}" if foreign_key.on_delete
<ide>
<del> ' ' + parts.join(', ')
<add> " #{parts.join(', ')}"
<ide> end
<ide>
<ide> stream.puts add_foreign_key_statements.sort.join("\n") | 1 |
Javascript | Javascript | remove special case try/catch in isplainobject | 3dccf62c81b5fbecc3a0431a8927ed1d30806fc6 | <ide><path>src/core.js
<ide> jQuery.extend({
<ide> return false;
<ide> }
<ide>
<del> // Support: Firefox <20
<del> // The try/catch suppresses exceptions thrown when attempting to access
<del> // the "constructor" property of certain host objects, ie. |window.location|
<del> // https://bugzilla.mozilla.org/show_bug.cgi?id=814622
<del> try {
<del> if ( obj.constructor &&
<del> !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
<del> return false;
<del> }
<del> } catch ( e ) {
<add> if ( obj.constructor &&
<add> !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
<ide> return false;
<ide> }
<ide> | 1 |
Javascript | Javascript | fix bad require | 725e3eba6e0fd3d5d08c4b9e7febcd1b09e5e954 | <ide><path>private-cli/src/dependencies/dependencies.js
<ide> const fs = require('fs');
<ide> const log = require('../util/log').out('dependencies');
<ide> const parseCommandLine = require('../../../packager/parseCommandLine');
<ide> const path = require('path');
<del>const Promise = require('Promise');
<add>const Promise = require('promise');
<ide> const ReactPackager = require('../../../packager/react-packager');
<ide>
<ide> /** | 1 |
PHP | PHP | fix strict warnings on php 5.4 | 7e5f326300c19d701b576c53304e0b473285d166 | <ide><path>lib/Cake/Model/Datasource/DataSource.php
<ide> public function create(Model $model, $fields = null, $values = null) {
<ide> *
<ide> * @param Model $model The model being read.
<ide> * @param array $queryData An array of query data used to find the data you want
<add> * @param integer $recursive Number of levels of association
<ide> * @return mixed
<ide> */
<del> public function read(Model $model, $queryData = array()) {
<add> public function read(Model $model, $queryData = array(), $recursive = null) {
<ide> return false;
<ide> }
<ide>
<ide> public function read(Model $model, $queryData = array()) {
<ide> * @param Model $model Instance of the model class being updated
<ide> * @param array $fields Array of fields to be updated
<ide> * @param array $values Array of values to be update $fields to.
<add> * @param mixed $conditions
<ide> * @return boolean Success
<ide> */
<del> public function update(Model $model, $fields = null, $values = null) {
<add> public function update(Model $model, $fields = null, $values = null, $conditions = null) {
<ide> return false;
<ide> }
<ide> | 1 |
Go | Go | fix a race in maintaining the journald reader list | 4d200cd6938c1416e34bf43576b0d528b73e8ba3 | <ide><path>daemon/logger/journald/read.go
<ide> drain:
<ide> }
<ide>
<ide> func (s *journald) followJournal(logWatcher *logger.LogWatcher, config logger.ReadConfig, j *C.sd_journal, pfd [2]C.int, cursor string) {
<add> s.readers.mu.Lock()
<add> s.readers.readers[logWatcher] = logWatcher
<add> s.readers.mu.Unlock()
<ide> go func() {
<ide> // Keep copying journal data out until we're notified to stop.
<ide> for C.wait_for_data_or_close(j, pfd[0]) == 1 {
<ide> func (s *journald) followJournal(logWatcher *logger.LogWatcher, config logger.Re
<ide> delete(s.readers.readers, logWatcher)
<ide> s.readers.mu.Unlock()
<ide> }()
<del> s.readers.mu.Lock()
<del> s.readers.readers[logWatcher] = logWatcher
<del> s.readers.mu.Unlock()
<ide> // Wait until we're told to stop.
<ide> select {
<ide> case <-logWatcher.WatchClose(): | 1 |
Ruby | Ruby | ignore dependencies of build-time-dependency | 6d0c6d0604f4e93920491851479776c9a8f5516e | <ide><path>Library/Homebrew/dependency.rb
<ide> def expand(dependent, deps = dependent.deps, cache_key: nil, ignore_missing: fal
<ide> expanded_deps << dep
<ide> else
<ide> next if @expand_stack.include? dep.name
<add> next if dep.tags.include?(:build)
<ide>
<ide> expanded_deps.concat(expand(dep.to_formula, cache_key: cache_key, ignore_missing: ignore_missing, &block))
<ide> expanded_deps << dep | 1 |
Text | Text | update changelog for database_resolver_context | 4295aaf758838fc4d3eb7d41ac26dde26a5d61db | <ide><path>activerecord/CHANGELOG.md
<ide> ```
<ide> config.active_record.database_selector = { delay: 2.seconds }
<ide> config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
<del> config.active_record.database_operations = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
<add> config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
<ide> ```
<ide>
<ide> To change the database selection strategy, pass a custom class to the
<ide> ```
<ide> config.active_record.database_selector = { delay: 10.seconds }
<ide> config.active_record.database_resolver = MyResolver
<del> config.active_record.database_operations = MyResolver::MyCookies
<add> config.active_record.database_resolver_context = MyResolver::MyCookies
<ide> ```
<ide>
<ide> *Eileen M. Uchitelle* | 1 |
Text | Text | add changes for 1.3.0-rc.1 and 1.2.24 | c54990ca6e1edfa02a6d1e08819ec8c3ef8fc11e | <ide><path>CHANGELOG.md
<add><a name="1.3.0-rc.1"></a>
<add># 1.3.0-rc.1 backyard-atomicity (2014-09-09)
<add>
<add>
<add>## Bug Fixes
<add>
<add>- **$compile:** render nested transclusion at the root of a template
<add> ([6d1e7cdc](https://github.com/angular/angular.js/commit/6d1e7cdc51c074139639e870b66997fb0df4523f),
<add> [#8914](https://github.com/angular/angular.js/issues/8914), [#8925](https://github.com/angular/angular.js/issues/8925))
<add>- **$location:**
<add> - don't call toString on null values
<add> ([c3a58a9f](https://github.com/angular/angular.js/commit/c3a58a9f34919f121587540e03ecbd51b25198d4))
<add> - remove an unused parameter of $location.url
<add> ([99d95f16](https://github.com/angular/angular.js/commit/99d95f1639b64c39231448d77209676b54e6f0be))
<add> - allow numeric location setter arguments
<add> ([adb5c6d6](https://github.com/angular/angular.js/commit/adb5c6d6cc76b928436743707727ab0974d6810b),
<add> [#7054](https://github.com/angular/angular.js/issues/7054))
<add> - set `baseHref` in mock browser to `/`
<add> ([fc706d13](https://github.com/angular/angular.js/commit/fc706d13d80bb40eb3dade58ea4b92dca33ce4e7),
<add> [#8866](https://github.com/angular/angular.js/issues/8866), [#8889](https://github.com/angular/angular.js/issues/8889))
<add>- **$parse:** disallow passing Function to Array.sort
<add> ([bd8ad0fb](https://github.com/angular/angular.js/commit/bd8ad0fbe81f6c280baa26a596d78e58fc7842e6))
<add>- **input:** check `scope.$$phase` only on `$rootScope`
<add> ([bf59d727](https://github.com/angular/angular.js/commit/bf59d7274f4a667c5b19e6d4ba5ed2730ca2fe42))
<add>- **ngAnimate:** support removing classes from SVG elements when using jQuery
<add> ([b3b67213](https://github.com/angular/angular.js/commit/b3b672130d4d1c6f13bdf7e58be76b2aafea2497),
<add> [#8872](https://github.com/angular/angular.js/issues/8872), [#8893](https://github.com/angular/angular.js/issues/8893))
<add>- **ngEventDirs:** check `scope.$$phase` only on `$rootScope`
<add> ([203ea10f](https://github.com/angular/angular.js/commit/203ea10f9ea49d7e29569a4232d3b2a666307cd8),
<add> [#8891](https://github.com/angular/angular.js/issues/8891))
<add>- **ngForm:** don't clear validity of whole form when removing control
<add> ([953ee22f](https://github.com/angular/angular.js/commit/953ee22f76f8c1137949ed07f36fafc5bbfeb7fe),
<add> [#8863](https://github.com/angular/angular.js/issues/8863))
<add>- **ngInclude:** correctly add svg-namespaced template content
<add> ([6639ca9d](https://github.com/angular/angular.js/commit/6639ca9d6bc00a6e3a31e54c50474361ae3561c6),
<add> [#7538](https://github.com/angular/angular.js/issues/7538), [#8981](https://github.com/angular/angular.js/issues/8981), [#8997](https://github.com/angular/angular.js/issues/8997))
<add>- **ngModel:**
<add> - update model value with async validators correctly
<add> ([64c3b745](https://github.com/angular/angular.js/commit/64c3b745fba0792166f30e057f9251f263d80dac))
<add> - render immediately also with async validators
<add> ([f94d5515](https://github.com/angular/angular.js/commit/f94d551529b7c970c38b29e3073cec4e7f6b0e00))
<add> - properly parse min/max date values as strings for date inputs
<add> ([088545c1](https://github.com/angular/angular.js/commit/088545c1856ce1c3ec3416965dff65077a6e0523),
<add> [#6755](https://github.com/angular/angular.js/issues/6755))
<add> - revalidate the model when min/max expression values change for date inputs
<add> ([b3502835](https://github.com/angular/angular.js/commit/b3502835039178296b730b7526e5666b66ba9156),
<add> [#6755](https://github.com/angular/angular.js/issues/6755))
<add> - consider ngMin/ngMax values when validating number input types
<add> ([25541c1f](https://github.com/angular/angular.js/commit/25541c1f876a16c892d71faae11727bec7bba98c))
<add> - revalidate the model when min/max expression values change for number inputs
<add> ([7b273a2c](https://github.com/angular/angular.js/commit/7b273a2c978d5f5ef374f5335afab0ca7d8cfd4d),
<add> [#2404](https://github.com/angular/angular.js/issues/2404))
<add>- **ngModelOptions:** do not trigger digest on `setViewValue` if debouncing
<add> ([e322cd9b](https://github.com/angular/angular.js/commit/e322cd9b3b8b47b95c9de3edf631bb46f919c492),
<add> [#8814](https://github.com/angular/angular.js/issues/8814), [#8850](https://github.com/angular/angular.js/issues/8850), [#8911](https://github.com/angular/angular.js/issues/8911))
<add>- **ngRepeat:** preserve original position of elements that are being animated away
<add> ([ed637330](https://github.com/angular/angular.js/commit/ed6373300028deda9a0878b3975699d183c1f75c),
<add> [#8918](https://github.com/angular/angular.js/issues/8918), [#8994](https://github.com/angular/angular.js/issues/8994))
<add>- **ngSwitch:** ensure correct iterator is passed to async function
<add> ([712299c2](https://github.com/angular/angular.js/commit/712299c2a24390e74cd5c20f51cb1d78f0233b6f),
<add> [#8833](https://github.com/angular/angular.js/issues/8833))
<add>- **numberFilter:** format numbers that round to zero as nonnegative
<add> ([ae952fbf](https://github.com/angular/angular.js/commit/ae952fbf0be925a48743d1c925ffe4e31a42c280),
<add> [#8489](https://github.com/angular/angular.js/issues/8489))
<add>- **orderBy:** allow arrayLike objects to be ordered
<add> ([cbdaabfb](https://github.com/angular/angular.js/commit/cbdaabfb59bf3348588d5b581f2754e0f9f034a4),
<add> [#8944](https://github.com/angular/angular.js/issues/8944))
<add>
<add>
<add>## Features
<add>
<add>- **angular.forEach:** add the array/object as the 3rd param like the native array forEach
<add> ([df9e60c8](https://github.com/angular/angular.js/commit/df9e60c8e7453cdca2cb5a4fa48f3981ecc23a7d),
<add> [#7902](https://github.com/angular/angular.js/issues/7902))
<add>- **ngModelOptions:** add allowInvalid option
<add> ([3c538c1d](https://github.com/angular/angular.js/commit/3c538c1d21c43422c7b4cd9b69cb67981bce2b87),
<add> [#8290](https://github.com/angular/angular.js/issues/8290), [#8313](https://github.com/angular/angular.js/issues/8313))
<add>
<add>
<add>## Performance Improvements
<add>
<add>- **$parse:**
<add> - remove getterFn wrapper for internal use
<add> ([b3b476db](https://github.com/angular/angular.js/commit/b3b476db7d34bc2f8b099ab5b993b1e899b9cffd),
<add> [#8901](https://github.com/angular/angular.js/issues/8901))
<add> - removing references to Parser/Lexer from parsed expressions
<add> ([43c67ccd](https://github.com/angular/angular.js/commit/43c67ccd167aecc3549e1b7f7d100956204e3ed4))
<add> - calculate array lengths once at start of loop
<add> ([907b8c16](https://github.com/angular/angular.js/commit/907b8c1675865ac38dd055f3f304272e68b233d0))
<add>- **extend:** remove use of forEach to remove calls/closures/passing arguments
<add> ([9bedeb33](https://github.com/angular/angular.js/commit/9bedeb3353969fba631ad9164edea3c38059fbda),
<add> [#8898](https://github.com/angular/angular.js/issues/8898))
<add>- **jQuery:** only trigger $destroy if a handler exists
<add> ([f6aa1c55](https://github.com/angular/angular.js/commit/f6aa1c55616b34215f562e0445e436210860ef04),
<add> [#8859](https://github.com/angular/angular.js/issues/8859))
<add>
<add>
<add>## Breaking Changes
<add>
<add>- **ngModelController,formController:** due to [6046e14b](https://github.com/angular/angular.js/commit/6046e14bd22491168116e61ffdf5fd3fed5f135c),
<add>
<add>- `ctrl.$error` does no more contain entries for validators that were
<add> successful.
<add>- `ctrl.$setValidity` now differentiates between `true`, `false`,
<add> `undefined` and `null`, instead of previously only truthy vs falsy.
<add>
<add>Closes #8941- **ngSwitch:** due to [0f806d96](https://github.com/angular/angular.js/commit/0f806d9659b5b89a4bd9493364bc36398677e939),
<add>
<add>
<add>Ever since 0df93fd, tagged in v1.0.0rc1, the ngSwitch directive has had an undocumented `change`
<add>attribute, used for evaluating a scope expression when the switch value changes.
<add>
<add>While it's unlikely, applications which may be using this feature should work around the removal
<add>by adding a custom directive which will perform the eval instead. Directive controllers are
<add>re-instantiated when being transcluded, so by putting the attribute on each item that you want
<add>to be notified of a change to, you can more or less emulate the old behaviour.
<add>
<add>Example:
<add>
<add>```js
<add>angular.module("switchChangeWorkaround", []).
<add> directive("onSwitchChanged", function() {
<add> return {
<add> linke: function($scope, $attrs) {
<add> $scope.$parent.$eval($attrs.change);
<add> }
<add> };
<add> });
<add>```
<add>
<add>```html
<add><div ng-switch="switcher">
<add> <div ng-switch-when="a" on-switch-changed="doSomethingInParentScope()"></div>
<add> <div ng-switch-when="b" on-switch-changed="doSomethingInParentScope()"></div>
<add></div>
<add>```
<add>
<add>Closes #8858
<add>Closes #8822
<add>
<add>
<add><a name="1.2.24"></a>
<add># 1.2.24 static-levitation (2014-09-09)
<add>
<add>
<add>## Bug Fixes
<add>
<add>- **$browser:** detect changes to the browser url that happened in sync
<add> ([2ece4d03](https://github.com/angular/angular.js/commit/2ece4d0347a8a18d4d35993bb882ed6b5b24266c),
<add> [#6976](https://github.com/angular/angular.js/issues/6976))
<add>- **$compile:**
<add> - render nested transclusion at the root of a template
<add> ([9d9cdfb5](https://github.com/angular/angular.js/commit/9d9cdfb575b89e96ae957c986734a49995e2b511),
<add> [#8914](https://github.com/angular/angular.js/issues/8914), [#8925](https://github.com/angular/angular.js/issues/8925))
<add> - render nested transclusion at the root of a template
<add> ([466320f6](https://github.com/angular/angular.js/commit/466320f6911698048bae5406e341d25af7efafa0),
<add> [#8914](https://github.com/angular/angular.js/issues/8914), [#8925](https://github.com/angular/angular.js/issues/8925))
<add>- **$location:**
<add> - don't call toString on null values
<add> ([c12e8d46](https://github.com/angular/angular.js/commit/c12e8d4665b635ba6b09d12802efb88d38b7ad5c))
<add> - remove an unused parameter of $location.url
<add> ([c65796d4](https://github.com/angular/angular.js/commit/c65796d496038554861e70da8012f9d0e2521e6d))
<add> - allow numeric location setter arguments
<add> ([68a09ba7](https://github.com/angular/angular.js/commit/68a09ba74d10a1490feca1d248f85b0023aa399b),
<add> [#7054](https://github.com/angular/angular.js/issues/7054))
<add>- **$parse:** disallow passing Function to Array.sort
<add> ([b39e1d47](https://github.com/angular/angular.js/commit/b39e1d47b9a1b39a9fe34c847a81f589fba522f8))
<add>- **form:** ensure concurrent animations use setClass
<add> ([d7548fdf](https://github.com/angular/angular.js/commit/d7548fdf1ce6f543bf55d330985a83ef09d0cb83),
<add> [#8166](https://github.com/angular/angular.js/issues/8166))
<add>- **input:** check `scope.$$phase` only on `$rootScope`
<add> ([36e6de1d](https://github.com/angular/angular.js/commit/36e6de1d91937d73e900ac115ae366fbefcdf6da))
<add>- **ngEventDirs:**
<add> - check `scope.$$phase` only on `$rootScope`
<add> ([2712c2f1](https://github.com/angular/angular.js/commit/2712c2f1979db23eeb53be8a519b9f79bd75e217),
<add> [#8891](https://github.com/angular/angular.js/issues/8891))
<add> - execute `blur` and `focus` expression using `scope.$evalAsync`
<add> ([54f0bc0f](https://github.com/angular/angular.js/commit/54f0bc0fe0c6b6d974d23f2c5ef07359dd93eb99),
<add> [#4979](https://github.com/angular/angular.js/issues/4979), [#5945](https://github.com/angular/angular.js/issues/5945), [#8803](https://github.com/angular/angular.js/issues/8803), [#6910](https://github.com/angular/angular.js/issues/6910), [#5402](https://github.com/angular/angular.js/issues/5402))
<add>- **ngRepeat:** improve errors for duplicate items
<add> ([1812af58](https://github.com/angular/angular.js/commit/1812af58c2d470d586c2a543c9a7db3f0baca04f))
<add>- **numberFilter:** format numbers that round to zero as nonnegative
<add> ([7e02fa07](https://github.com/angular/angular.js/commit/7e02fa07eb5b02e75b1db0058d638af3d1074942),
<add> [#8489](https://github.com/angular/angular.js/issues/8489))
<add>- **orderBy:** allow arrayLike objects to be ordered
<add> ([94b0f2d3](https://github.com/angular/angular.js/commit/94b0f2d35de601ded3d93ea4fa78a4d9b139c0a0),
<add> [#8944](https://github.com/angular/angular.js/issues/8944))
<add>
<add>
<add>## Breaking Changes
<add>
<add>- **ngEventDirs:** due to [54f0bc0f](https://github.com/angular/angular.js/commit/54f0bc0fe0c6b6d974d23f2c5ef07359dd93eb99),
<add>
<add>The `blur` and `focus` event fire synchronously, also during DOM operations
<add>that remove elements. This lead to errors as the Angular model was not
<add>in a consistent state. See this [fiddle](http://jsfiddle.net/fq1dq5yb/) for a demo.
<add>
<add>This change executes the expression of those events using
<add>`scope.$evalAsync` if an `$apply` is in progress, otherwise
<add>keeps the old behavior.
<add>
<add>Fixes #4979
<add>Fixes #5945
<add>Closes #8803
<add>Closes #6910
<add>Closes #5402
<add>
<add>
<add>
<add>
<ide> <a name="1.3.0-RC.0"></a>
<ide> # 1.3.0-RC.0 sonic-boltification (2014-08-29)
<ide> | 1 |
Python | Python | remove autograph verbosity in the test | fa479cf5f6931e2284e9625bd9954c36e4aa83a3 | <ide><path>keras/engine/training_test.py
<ide> def metrics(self):
<ide>
<ide> @keras_parameterized.run_all_keras_modes(always_skip_v1=True)
<ide> def test_ema_overwrite(self):
<del> tf.autograph.set_verbosity(10)
<add>
<ide> model = sequential.Sequential()
<ide> model.add(input_layer.Input(shape=(4,)))
<ide> model.add(layers_module.Dense(1, activation='relu')) | 1 |
Ruby | Ruby | fix error with formulae without taps | 8ab9465ad2ac9b8d4b2d72180d6000b755478a9d | <ide><path>Library/Homebrew/formula_auditor.rb
<ide> def self.aliases
<ide> SYNCED_VERSIONS_FORMULAE_FILE = "synced_versions_formulae.json"
<ide>
<ide> def audit_synced_versions_formulae
<add> return unless formula.tap
<add>
<ide> synced_versions_formulae_file = formula.tap.path/SYNCED_VERSIONS_FORMULAE_FILE
<ide> return unless synced_versions_formulae_file.file?
<ide> | 1 |
Text | Text | fix grammatical errors in redux actions document | c013738c70eab78f878f6976e2d3ac20e37987bb | <ide><path>guide/english/redux/redux-actions/index.md
<ide> title: Redux Actions
<ide> ## Redux Actions
<ide>
<ide> Redux action is a simple object that describes what sort of event has happened in your application. They can even contain
<del>data that needs to be send from the application to the Redux store. Action can contain anything but it must have a mandatory
<del>type property which describes the event taking place. A good practice is to use constants while describing the action.
<add>data that needs to be sent from the application to the Redux store. An action can contain anything but it must have a mandatory type property which describes the event taking place. A good practice is to use constants while describing the action.
<ide>
<ide> For example
<ide>
<ide> We can send these actions to the store by using
<ide> ```javascript
<ide> store.dispatch()
<ide> ```
<del>An application can have different sorts of events happening at a time and these actions helps describe these events. Without these actions there is no way to change the state of the application.
<add>An application can have different sorts of events happening at a time and these actions help describe these events. Without these actions there is no way to change the state of the application.
<ide>
<ide> You might try [redux-actions](https://github.com/redux-utilities/redux-actions) project that reduces lot of boilerplate making writing your actions way faster.
<ide> | 1 |
Python | Python | fix django 3.0 deprecations | 95d4843abeecea96754a147f4f2cca33e620ad09 | <ide><path>rest_framework/fields.py
<ide> parse_date, parse_datetime, parse_duration, parse_time
<ide> )
<ide> from django.utils.duration import duration_string
<del>from django.utils.encoding import is_protected_type, smart_text
<add>from django.utils.encoding import is_protected_type, smart_str
<ide> from django.utils.formats import localize_input, sanitize_separators
<ide> from django.utils.ipv6 import clean_ipv6_address
<ide> from django.utils.timezone import utc
<ide> def to_internal_value(self, data):
<ide> instance.
<ide> """
<ide>
<del> data = smart_text(data).strip()
<add> data = smart_str(data).strip()
<ide>
<ide> if self.localize:
<ide> data = sanitize_separators(data)
<ide><path>rest_framework/relations.py
<ide> from django.db.models import Manager
<ide> from django.db.models.query import QuerySet
<ide> from django.urls import NoReverseMatch, Resolver404, get_script_prefix, resolve
<del>from django.utils.encoding import smart_text, uri_to_iri
<add>from django.utils.encoding import smart_str, uri_to_iri
<ide> from django.utils.translation import gettext_lazy as _
<ide>
<ide> from rest_framework.fields import (
<ide> def to_internal_value(self, data):
<ide> try:
<ide> return self.get_queryset().get(**{self.slug_field: data})
<ide> except ObjectDoesNotExist:
<del> self.fail('does_not_exist', slug_name=self.slug_field, value=smart_text(data))
<add> self.fail('does_not_exist', slug_name=self.slug_field, value=smart_str(data))
<ide> except (TypeError, ValueError):
<ide> self.fail('invalid')
<ide>
<ide><path>rest_framework/schemas/inspectors.py
<ide> import re
<ide> from weakref import WeakKeyDictionary
<ide>
<del>from django.utils.encoding import smart_text
<add>from django.utils.encoding import smart_str
<ide>
<ide> from rest_framework.settings import api_settings
<ide> from rest_framework.utils import formatting
<ide> def get_description(self, path, method):
<ide> method_docstring = getattr(view, method_name, None).__doc__
<ide> if method_docstring:
<ide> # An explicit docstring on the method or action.
<del> return self._get_description_section(view, method.lower(), formatting.dedent(smart_text(method_docstring)))
<add> return self._get_description_section(view, method.lower(), formatting.dedent(smart_str(method_docstring)))
<ide> else:
<ide> return self._get_description_section(view, getattr(view, 'action', method.lower()),
<ide> view.get_view_description())
<ide><path>rest_framework/schemas/utils.py
<ide> See schemas.__init__.py for package overview.
<ide> """
<ide> from django.db import models
<del>from django.utils.translation import ugettext_lazy as _
<add>from django.utils.translation import gettext_lazy as _
<ide>
<ide> from rest_framework.mixins import RetrieveModelMixin
<ide>
<ide><path>rest_framework/views.py
<ide> from django.http import Http404
<ide> from django.http.response import HttpResponseBase
<ide> from django.utils.cache import cc_delim_re, patch_vary_headers
<del>from django.utils.encoding import smart_text
<add>from django.utils.encoding import smart_str
<ide> from django.views.decorators.csrf import csrf_exempt
<ide> from django.views.generic import View
<ide>
<ide> def get_view_description(view, html=False):
<ide> if description is None:
<ide> description = view.__class__.__doc__ or ''
<ide>
<del> description = formatting.dedent(smart_text(description))
<add> description = formatting.dedent(smart_str(description))
<ide> if html:
<ide> return formatting.markup_description(description)
<ide> return description | 5 |
Ruby | Ruby | escape multibyte line terminators in json encoding | 9b8ee8e006db581eb34dc0fa1d230653b7a1c956 | <ide><path>activesupport/lib/active_support/json/encoding.rb
<ide> def check_for_circular_references(value)
<ide> "\010" => '\b',
<ide> "\f" => '\f',
<ide> "\n" => '\n',
<add> "\xe2\x80\xa8" => '\u2028',
<add> "\xe2\x80\xa9" => '\u2029',
<ide> "\r" => '\r',
<ide> "\t" => '\t',
<ide> '"' => '\"',
<ide> class << self
<ide> def escape_html_entities_in_json=(value)
<ide> self.escape_regex = \
<ide> if @escape_html_entities_in_json = value
<del> /[\x00-\x1F"\\><&]/
<add> /\xe2\x80(\xa8|\xa9)|[\x00-\x1F"\\><&]/
<ide> else
<del> /[\x00-\x1F"\\]/
<add> /\xe2\x80(\xa8|\xa9)|[\x00-\x1F"\\]/
<ide> end
<ide> end
<ide> | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.