text:
package org.jruby.anno;

public enum FrameField {
    LASTLINE, BACKREF, VISIBILITY, BLOCK, SELF, METHODNAME, LINE, JUMPTARGET, CLASS, FILENAME;
}


text: Rails.application.config.session_store :cookie_store, key: '_tablesort_session'

redpajama_set_name: RedPajamaGithub


text:
package com.navercorp.pinpoint.agent.plugin.proxy.app;

import com.navercorp.pinpoint.profiler.context.recorder.proxy.ProxyRequestHeader;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

/**
 * @author jaehong.kim
 */
public class AppRequestParserTest {

    @Test
    public void parseApp() throws Exception {
        AppRequestParser parser = new AppRequestParser();
        final long currentTimeMillis = System.currentTimeMillis();
        String value = "t=" + currentTimeMillis;
        ProxyRequestHeader proxyHttpHeader = parser.parse(value);
        assertTrue(proxyHttpHeader.isValid());
        assertEquals(currentTimeMillis, proxyHttpHeader.getReceivedTimeMillis());
        assertEquals(-1, proxyHttpHeader.getDurationTimeMicroseconds());
        assertEquals(-1, proxyHttpHeader.getIdlePercent());
        assertEquals(-1, proxyHttpHeader.getBusyPercent());
    }

    @Test
    public void parseAppInvalid() throws Exception {
        AppRequestParser parser = new AppRequestParser();
        final long currentTimeMillis = System.currentTimeMillis();
        String value = "t=" + currentTimeMillis + "app=jndi:xxx";
        ProxyRequestHeader proxyHttpHeader = parser.parse(value);
        assertFalse(proxyHttpHeader.isValid());
    }
}


text:
<!DOCTYPE html>

<meta charset=utf-8 />
<link rel="stylesheet" type="text/css" href="../styles/style.css" />
<title>$ chunkwm - tiling wm</title>

chunkwm

tiling wm for macOS

Home

Docs

Screens

Contact

GitHub

Scripting addition

                chunkwm offer advanced functionality that is achieved by injecting code into the Dock process.

                This gives us elevated privileges, which allow for more control of other application's windows.

Installing the scripting addition allows for the following functionality:

ability to switch active desktop instantly, bypassing the animation (High Sierra and Mojave)

ability to create and destroy desktops (High Sierra and Mojave)

ability to move desktops (and its windows) to a different monitor (Mojave)

option to lower the opacity of inactive windows, through smooth alpha fading

make floating windows always stay on top

tag a window as "sticky", making it appear on all desktops

                The scripting addition injects code into Dock.app, which is a system application.

                Because of this you need to disable SIP to install or uninstall this extension.

                If you are running High Sierra or an earlier version, SIP can safely be reenabled after you have installed the scripting addition.

                To change the status of SIP, you need to reboot into recovery mode. On newer MBPs this can be done
                by restarting your mac and hold down "cmd + r" during boot, until you see a white progress bar.

                Once recovery mode has booted up, click the utilities menu in the menubar and open a Terminal.

                    # to disable SIP:
                    csrutil disable

                    # to enable SIP:
                    csrutil enable

                After you have disabled SIP, you can use the following commands to install / uninstall the scripting addition.

                    # to install scripting-addition
                    sudo chunkwm --install-sa

                    # to remove scripting-addition
                    sudo chunkwm --uninstall-sa

                When the scripting-addition has been installed, you can load it by running: chunkwm --load-sa

                chunkwm will automatically load the scripting addition at startup, or when the Dock is (re)launched.

                The scripting-addition is open source and can be found on my github: chunkwm-sa

© 2019 Åsmund Vikane


text:
<?php

namespace Hateoas\Factory;

use Hateoas\Configuration\RelationsRepository;
use Hateoas\Expression\ExpressionEvaluator;
use Hateoas\Model\Embedded;
use Hateoas\Serializer\ExclusionManager;
use JMS\Serializer\SerializationContext;

/**
 * @author Adrien Brault <adrien.brault@gmail.com>
 */
class EmbeddedsFactory
{
    /**
     * @var RelationsRepository
     */
    private $relationsRepository;

    /**
     * @var ExpressionEvaluator
     */
    private $expressionEvaluator;

    /**
     * @var ExclusionManager
     */
    private $exclusionManager;

    /**
     * @param RelationsRepository $relationsRepository
     * @param ExpressionEvaluator $expressionEvaluator
     * @param ExclusionManager    $exclusionManager
     */
    public function __construct(
        RelationsRepository $relationsRepository,
        ExpressionEvaluator $expressionEvaluator,
        ExclusionManager $exclusionManager
    ) {
        $this->relationsRepository = $relationsRepository;
        $this->expressionEvaluator = $expressionEvaluator;
        $this->exclusionManager    = $exclusionManager;
    }
    /**
     * @param  object               $object
     * @param  SerializationContext $context
     * @return Embedded[]
     */
    public function create($object, SerializationContext $context)
    {
        $embeddeds = array();
        foreach ($this->relationsRepository->getRelations($object) as $relation) {
            if ($this->exclusionManager->shouldSkipEmbedded($object, $relation, $context)) {
                continue;
            }

            $rel  = $this->expressionEvaluator->evaluate($relation->getName(), $object);
            $data = $this->expressionEvaluator->evaluate($relation->getEmbedded()->getContent(), $object);
            $xmlElementName = $this->expressionEvaluator->evaluate($relation->getEmbedded()->getXmlElementName(), $object);

            $embeddeds[] = new Embedded($rel, $data, $xmlElementName, $relation->getEmbedded()->getExclusion());
        }

        return $embeddeds;
    }
}


text:
package de.unifrankfurt.faststring.analysis.label;

import static de.unifrankfurt.faststring.analysis.test.util.TestUtilities.assertList;

import org.junit.Test;

import de.unifrankfurt.faststring.analysis.util.GraphUtil;
import de.unifrankfurt.faststring.utils.BaseAnalysisTest;

public class TestBaseTypeLabel extends BaseAnalysisTest {

	@Test
	public void testFindTypeUses() throws Exception {
		assertList(findTypeUses("phiLoop"), 8);
		assertList(findTypeUses("paramDef"), 2, 6);
		assertList(findTypeUses("simpleIfSubstring"), 4, 5);
		assertList(findTypeUses("returnOfUsed"), 4);

	}

	@Test
	public void testFindTypeUsesByLabelFromFile() throws Exception {
		assertList(findTypeUsesByLabelFromFile("phiLoop"), 8);
		assertList(findTypeUsesByLabelFromFile("paramDef"), 2, 6);
		assertList(findTypeUsesByLabelFromFile("simpleIfSubstring"), 4, 5);
		assertList(findTypeUsesByLabelFromFile("returnOfUsed"), 4);

	}

	private Iterable<Integer> findTypeUses(String method) {
		return GraphUtil.extractIntsFromStringReferences(
				new MockLabel().findTypeUses(getIRMethod("MethodAnalyzerTestClass", method)));

	}

	private Iterable<Integer> findTypeUsesByLabelFromFile(String method) {
		return GraphUtil.extractIntsFromStringReferences(
				SUBSTRING.findTypeUses(getIRMethod("MethodAnalyzerTestClass", method)));

	}

}


text:
from django import forms
from django.contrib.auth.models import User
from .CaptchaSecuredForm import CaptchaSecuredForm

class RegistrationForm(CaptchaSecuredForm):
    email = forms.EmailField(label='E-mail address')
    firstName = forms.CharField(label='First name')
    lastName = forms.CharField(label='Last name')
    password = forms.CharField(label=u'Password',
                               widget=forms.PasswordInput(render_value=False))
    retyped = forms.CharField(label=u'Confirm Password',
                              widget=forms.PasswordInput(render_value=False))

    def clean(self):
        cleaned_data = super(RegistrationForm, self).clean()

        password = cleaned_data.get('password')
        retyped = cleaned_data.get('retyped')

        if password and retyped:
            if password != retyped:
                self.errors['retyped'] = self.error_class(['The passwords do not match.'])

                # Remove invalid entries
                if password:
                    del cleaned_data['password']
                if retyped:
                    del cleaned_data['retyped']

        return cleaned_data

    def clean_email(self):
        user = None
        data = self.cleaned_data['email']

        try:
            user = User.objects.get(email=data)
        except User.DoesNotExist:
            pass

        if user is not None:
            raise forms.ValidationError('This email address is already registered.')

        return data


text:
Mailchimp api wrapper for v3 of the mailchimp api, with batch handling. Supports both promise and callback handling.

```javascript
var Mailchimp = require('mailchimp-api-v3')

var mailchimp = new Mailchimp(api_key);

//Callback style
mailchimp.get({
  path : '/lists/id1'
}, function (err, result) {
  ...
})

//Promise style
mailchimp.get({
  path : '/lists/id1'
})
.then(function (result) {
  ...
})
.catch(function (err) {
  ...
})
```

seamless batch calls, with polling and unpacking of results

```javascript
//Callback style
mailchimp.batch([
{
  method : 'get',
  path : '/lists/id1'
},
{
  method : 'get',
  path : '/lists/id2'
}], function (err, results) {
  //results[0] same as result in previous example
})

//Promise style
mailchimp.batch([
{
  method : 'get',
  path : '/lists/id1'
},
{
  method : 'get',
  path : '/lists/id2'
}])
.then(function (results) {
  //results[0] same as result in previous example
})
.catch(function (err) {
  ...
})
```

## Why
Version 3 of the mailchimp api is an excellent RESTful api. This library makes it easy to integrate mailchimp using their own api documentation.

This library also supports easy usage of the mailchimp batch operations, enabling them to be used just as the standard api calls.

## Installation

`$ npm install mailchimp-api-v3`

## Usage

For information on the possible calls, refer to the mailchimp api v3 documentation: [http://developer.mailchimp.com/documentation/mailchimp/reference/overview/](http://developer.mailchimp.com/documentation/mailchimp/reference/overview/)

### Promise support

In all calls you can omit the callback, and a promise will be returned instead.

### Initialization

```javascript
var Mailchimp = require('mailchimp-api-v3')

var mailchimp = new Mailchimp(api_key);
```

### Standard Calls

```javascript
mailchimp.request({
  method : 'get|post|put|patch|delete',
  path : 'path for the call, see mailchimp documentation for possible calls'
  path_params : {
    //path parameters, see mailchimp documentation for each call
  }
  body : {
    //body parameters, see mailchimp documentation for each call
  },
  query : {
    //query string parameters, see mailchimp documentation for each call
  }
}, callback)
```

`path` can be given either exactly as in the mailchimp documentation (`"/campaigns/{campaign_id}"`) and `path_params` specifying id values, or as a string with path parameters already substituted, and no `path_params`

For each request method, convenience calls exists to make common calls:

```javascript
mailchimp.get(path, [query], [callback])
mailchimp.post(path, [body], [callback])
mailchimp.put(path, [body], [callback])
mailchimp.patch(path, [body], [callback])
mailchimp.delete(path, [callback])
```

This allows shorthand forms like:

```javascript
mailchimp.get('/lists')
.then(function(results) {
  ...
})

mailchimp.post('/lists/id', {
  email : '...'
  ...
})
.then(function(results) {
  ...
})
```

### Batch Calls

```javascript
var calls = [
{
  method : 'post',
  path : '/lists/id1/members'
  body : {
    email_address : '1@example.com',
    status : 'subscribed'
  }
},
{
  method : 'post',
  path : '/lists/id1/members'
  body : {
    email_address : '2@example.com',
    status : 'subscribed'
  }
}]

mailchimp.batch(calls, callback, {
  wait : true,
  interval : 2000,
  unpack : true,
})
```

`batch` takes an array of call options, exactly as used in the standard call.

* `wait` whether or not to wait for the batch command to finish, defaults to `true`
* `interval` if `wait` is true, the interval to poll for the status of the batch call, defaults to 2000ms
* `unpack` if `wait` is true, whether or not to get and unpack the results of the batch operation, and return the response bodies.
* `verbose` if `wait` is true, whether or not to log progress to the console

#### BatchWait

```javascript
mailchimp.batchWait(batch_id, callback, {
  interval : 2000,
  unpack : true,
})
```

If you call `batch` with `wait : false`, you can use the returned batch id to resume pooling and unpacking the results at a later time.
This also allows you to "reconnect" to a batch operation after a crash or similar.

#### Single operation batch

If you pass a single operation, instaed of an array to `batch`, the result will be the same as if you ran the operation without batch.
This is very useful if you want to make calls without paging, where a normal call would take to long, and likely time out.

```javascript
mailchimp.batch({
  method : 'get',
  path : '/lists/id/members',
  query : {
    count  : 10000000000,
  }
}, function (err, result) {
  //result is the same as a normal .get request
})
```


text:
package domain.blog;

public class DraftPost extends Post {
}


text:
import { Flex, Text } from "palette"
import { TouchableOpacity } from "react-native"
import { EntityItem, EntityItemProps, Item } from "./Components/EntityItem"

interface EntityListProps {
  prefix: string
  list: ReadonlyArray<Item>
  displayedItems?: number
  count: number
  onItemSelected: EntityItemProps["onPress"]
  onViewAllPressed?: () => void
}

export const EntityList: React.FC<EntityListProps> = ({
  prefix,
  list,
  displayedItems = 1,
  count,
  onItemSelected,
  onViewAllPressed,
}) => {
  if (!list.length) {
    return null
  }

  const filteredList = list.slice(0, displayedItems)
  const shouldShowMore = count > displayedItems

  return (
    <Flex flexDirection="row" flexWrap="wrap">
      <Text variant="sm" lineHeight="19">
        {prefix + " "}
      </Text>
      {filteredList.map((item, i) => (
        <EntityItem
          key={item.href}
          item={item}
          isFirst={i === 0}
          isLast={i === filteredList.length - 1}
          onPress={onItemSelected}
        />
      ))}
      {!!shouldShowMore && (
        <>
          <Text variant="sm" lineHeight="19">
            {" and "}
          </Text>
          <TouchableOpacity onPress={() => onViewAllPressed && onViewAllPressed()}>
            <Text variant="sm" weight="medium" lineHeight="19">
              {count - displayedItems + " others"}
            </Text>
          </TouchableOpacity>
        </>
      )}
    </Flex>
  )
}


text:
import { BrowserWindow, ipcMain } from 'electron';

import {
  apiCmds,
  apiName,
  IApiArgs,
  INotificationData,
} from '../common/api-interface';
import { LocaleType } from '../common/i18n';
import { logger } from '../common/logger';
import { activityDetection } from './activity-detection';
import { analytics } from './analytics-handler';
import appStateHandler from './app-state-handler';
import { CloudConfigDataTypes, config, ICloudConfig } from './config-handler';
import { downloadHandler } from './download-handler';
import { memoryMonitor } from './memory-monitor';
import notificationHelper from './notifications/notification-helper';
import { protocolHandler } from './protocol-handler';
import { finalizeLogExports, registerLogRetriever } from './reports-handler';
import { screenSnippet } from './screen-snippet-handler';
import { activate, handleKeyPress } from './window-actions';
import { ICustomBrowserWindow, windowHandler } from './window-handler';
import {
  downloadManagerAction,
  isValidWindow,
  sanitize,
  setDataUrl,
  showBadgeCount,
  showPopupMenu,
  updateFeaturesForCloudConfig,
  updateLocale,
  windowExists,
} from './window-utils';

/**
 * Handle API related ipc messages from renderers. Only messages from windows
 * we have created are allowed.
 */
ipcMain.on(
  apiName.symphonyApi,
  async (event: Electron.IpcMainEvent, arg: IApiArgs) => {
    if (!isValidWindow(BrowserWindow.fromWebContents(event.sender))) {
      logger.error(
        `main-api-handler: invalid window try to perform action, ignoring action`,
        arg.cmd,
      );
      return;
    }

    if (!arg) {
      return;
    }

    switch (arg.cmd) {
      case apiCmds.isOnline:
        if (typeof arg.isOnline === 'boolean') {
          windowHandler.isOnline = arg.isOnline;
        }
        break;
      case apiCmds.setBadgeCount:
        if (typeof arg.count === 'number') {
          showBadgeCount(arg.count);
        }
        break;
      case apiCmds.registerProtocolHandler:
        protocolHandler.setPreloadWebContents(event.sender);
        // Since we register the prococol handler window upon login,
        // we make use of it and update the pod version info on SDA
        windowHandler.updateVersionInfo();

        // Set this to false once the SFE is completely loaded
        // so, we can prevent from showing error banners
        windowHandler.isWebPageLoading = false;
        windowHandler.isLoggedIn = true;
        break;
      case apiCmds.registerLogRetriever:
        registerLogRetriever(event.sender, arg.logName);
        break;
      case apiCmds.sendLogs:
        finalizeLogExports(arg.logs);
        break;
      case apiCmds.badgeDataUrl:
        if (typeof arg.dataUrl === 'string' && typeof arg.count === 'number') {
          setDataUrl(arg.dataUrl, arg.count);
        }
        break;
      case apiCmds.activate:
        if (typeof arg.windowName === 'string') {
          activate(arg.windowName);
        }
        break;
      case apiCmds.registerLogger:
        // renderer window that has a registered logger from JS.
        logger.setLoggerWindow(event.sender);
        break;
      case apiCmds.registerActivityDetection:
        if (typeof arg.period === 'number') {
          // renderer window that has a registered activity detection from JS.
          activityDetection.setWindowAndThreshold(event.sender, arg.period);
        }
        break;
      case apiCmds.registerDownloadHandler:
        downloadHandler.setWindow(event.sender);
        break;
      case apiCmds.showNotificationSettings:
        if (typeof arg.windowName === 'string') {
          const theme = arg.theme ? arg.theme : 'light';
          windowHandler.createNotificationSettingsWindow(arg.windowName, theme);
        }
        break;
      case apiCmds.sanitize:
        if (typeof arg.windowName === 'string') {
          sanitize(arg.windowName);
        }
        windowHandler.isWebPageLoading = true;
        break;
      case apiCmds.bringToFront:
        // validates the user bring to front config and activates the wrapper
        if (typeof arg.reason === 'string' && arg.reason === 'notification') {
          const { bringToFront } = config.getConfigFields(['bringToFront']);
          if (bringToFront === CloudConfigDataTypes.ENABLED) {
            activate(arg.windowName, false);
          }
        }
        break;
      case apiCmds.openScreenPickerWindow:
        if (Array.isArray(arg.sources) && typeof arg.id === 'number') {
          windowHandler.createScreenPickerWindow(
            event.sender,
            arg.sources,
            arg.id,
          );
        }
        break;
      case apiCmds.popupMenu: {
        const browserWin = BrowserWindow.fromWebContents(
          event.sender,
        ) as ICustomBrowserWindow;
        if (
          browserWin &&
          windowExists(browserWin) &&
          browserWin.winName === apiName.mainWindowName
        ) {
          showPopupMenu({ window: browserWin });
        }
        break;
      }
      case apiCmds.setLocale:
        if (typeof arg.locale === 'string') {
          updateLocale(arg.locale as LocaleType);
        }
        break;
      case apiCmds.keyPress:
        if (typeof arg.keyCode === 'number') {
          handleKeyPress(arg.keyCode);
        }
        break;
      case apiCmds.openScreenSnippet:
        screenSnippet.capture(event.sender);
        break;
      case apiCmds.closeScreenSnippet:
        screenSnippet.cancelCapture();
        break;
      case apiCmds.closeWindow:
        windowHandler.closeWindow(arg.windowType, arg.winKey);
        break;
      case apiCmds.openScreenSharingIndicator:
        const { displayId, id, streamId } = arg;
        if (typeof displayId === 'string' && typeof id === 'number') {
          windowHandler.createScreenSharingIndicatorWindow(
            event.sender,
            displayId,
            id,
            streamId,
          );
        }
        break;
      case apiCmds.downloadManagerAction:
        if (typeof arg.path === 'string') {
          downloadManagerAction(arg.type, arg.path);
        }
        break;
      case apiCmds.openDownloadedItem:
        if (typeof arg.id === 'string') {
          downloadHandler.openFile(arg.id);
        }
        break;
      case apiCmds.showDownloadedItem:
        if (typeof arg.id === 'string') {
          downloadHandler.showInFinder(arg.id);
        }
        break;
      case apiCmds.clearDownloadedItems:
        downloadHandler.clearDownloadedItems();
        break;
      case apiCmds.restartApp:
        appStateHandler.restart();
        break;
      case apiCmds.isMisspelled:
        if (typeof arg.word === 'string') {
          event.returnValue = windowHandler.spellchecker
            ? windowHandler.spellchecker.isMisspelled(arg.word)
            : false;
        }
        break;
      case apiCmds.setIsInMeeting:
        if (typeof arg.isInMeeting === 'boolean') {
          memoryMonitor.setMeetingStatus(arg.isInMeeting);
        }
        break;
      case apiCmds.memoryInfo:
        if (typeof arg.memoryInfo === 'object') {
          memoryMonitor.setMemoryInfo(arg.memoryInfo);
        }
        break;
      case apiCmds.getConfigUrl:
        const { url } = config.getGlobalConfigFields(['url']);
        event.returnValue = url;
        break;
      case apiCmds.registerAnalyticsHandler:
        analytics.registerPreloadWindow(event.sender);
        break;
      case apiCmds.setCloudConfig:
        const {
          podLevelEntitlements,
          acpFeatureLevelEntitlements,
          pmpEntitlements,
          ...rest
        } = arg.cloudConfig as ICloudConfig;
        if (
          podLevelEntitlements &&
          podLevelEntitlements.autoLaunchPath &&
          podLevelEntitlements.autoLaunchPath.match(/\\\\/g)
        ) {
          podLevelEntitlements.autoLaunchPath = podLevelEntitlements.autoLaunchPath.replace(
            /\\+/g,
            '\\',
          );
        }
        logger.info('main-api-handler: ignored other values from SFE', rest);
        await config.updateCloudConfig({
          podLevelEntitlements,
          acpFeatureLevelEntitlements,
          pmpEntitlements,
        });
        await updateFeaturesForCloudConfig();
        if (windowHandler.appMenu) {
          windowHandler.appMenu.buildMenu();
        }
        break;
      case apiCmds.setIsMana:
        if (typeof arg.isMana === 'boolean') {
          windowHandler.isMana = arg.isMana;
          // Update App Menu
          const appMenu = windowHandler.appMenu;
          if (appMenu && windowHandler.isMana) {
            appMenu.buildMenu();
          }
          logger.info('window-handler: isMana: ' + windowHandler.isMana);
        }
        break;
      case apiCmds.showNotification:
        if (typeof arg.notificationOpts === 'object') {
          const opts = arg.notificationOpts as INotificationData;
          notificationHelper.showNotification(opts);
        }
        break;
      case apiCmds.closeNotification:
        if (typeof arg.notificationId === 'number') {
          await notificationHelper.closeNotification(arg.notificationId);
        }
        break;
      default:
        break;
    }
  },
);


text:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data noupdate="1">

    <!-- SALES TAXES -->

    <!-- British Columbia PST -->

    <record id="gstpst_bc_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST + PST for sales (BC)</field>
        <field name="description">GSTPST_BC_SALE</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">1</field>
        <field name="type">percent</field>
        <field name="child_depend">1</field>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <record id="gstpst_sale_bc_gst_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST for sales - 5% (BC)</field>
        <field name="description">GST</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="sequence">1</field>
        <field name="account_collected_id" ref="chart2131_en"/>
        <field name="account_paid_id" ref="chart2131_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_gst_en"/>
        <field name="tax_code_id" ref="vat_code_payable_gst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_gst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_gst_en"/>
        <field name="parent_id" ref="gstpst_bc_sale_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <record id="pst_bc_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">PST for sales - 7% (BC)</field>
        <field name="description">PST</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.070000</field>
        <field name="type">percent</field>
        <field name="sequence">2</field>
        <field name="account_collected_id" ref="chart2132_en"/>
        <field name="account_paid_id" ref="chart2132_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_pst_en"/>
        <field name="tax_code_id" ref="vat_code_payable_pst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_pst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_pst_en"/>
        <field name="parent_id" ref="gstpst_bc_sale_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <!-- Manitoba PST -->

    <record id="gstpst_mb_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST + PST for sales (MB)</field>
        <field name="description">GSTPST_MB_SALE</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">1</field>
        <field name="type">percent</field>
        <field name="child_depend" eval="True"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <record id="gstpst_sale_mb_gst_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST for sales - 5% (MB)</field>
        <field name="description">GST</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="sequence">1</field>
        <field name="account_collected_id" ref="chart2131_en"/>
        <field name="account_paid_id" ref="chart2131_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_gst_en"/>
        <field name="tax_code_id" ref="vat_code_payable_gst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_gst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_gst_en"/>
        <field name="parent_id" ref="gstpst_mb_sale_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <record id="pst_mb_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">PST for sales - 8% (MB)</field>
        <field name="description">PST</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.080000</field>
        <field name="type">percent</field>
        <field name="sequence">2</field>
        <field name="account_collected_id" ref="chart2132_en"/>
        <field name="account_paid_id" ref="chart2132_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_pst_en"/>
        <field name="tax_code_id" ref="vat_code_payable_pst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_pst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_pst_en"/>
        <field name="parent_id" ref="gstpst_mb_sale_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <!-- Quebec PST -->

    <record id="gstqst_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST + QST for sales</field>
        <field name="description">GSTQST_SALE</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">1</field>
        <field name="type">percent</field>
        <field name="child_depend" eval="True"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <record id="gstqst_sale_gst_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST for sales - 5% (QC)</field>
        <field name="description">GST</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="sequence">1</field>
        <field name="account_collected_id" ref="chart2131_en"/>
        <field name="account_paid_id" ref="chart2131_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_gst_en"/>
        <field name="tax_code_id" ref="vat_code_payable_gst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_gst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_gst_en"/>
        <field name="parent_id" ref="gstqst_sale_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <record id="qst_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">QST for sales - 9.975%</field>
        <field name="description">QST</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.099750</field>
        <field name="type">percent</field>
        <field name="sequence">2</field>
        <field name="account_collected_id" ref="chart2132_en"/>
        <field name="account_paid_id" ref="chart2132_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_pst_en"/>
        <field name="tax_code_id" ref="vat_code_payable_pst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_pst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_pst_en"/>
        <field name="parent_id" ref="gstqst_sale_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <!-- Saskatchewan PST -->

    <record id="gstpst_sk_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST + PST for sales (SK)</field>
        <field name="description">GSTPST_SK_SALE</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">1</field>
        <field name="type">percent</field>
        <field name="child_depend" eval="True"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <record id="gstpst_sale_sk_gst_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST for sales - 5% (SK)</field>
        <field name="description">GST</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="sequence">1</field>
        <field name="account_collected_id" ref="chart2131_en"/>
        <field name="account_paid_id" ref="chart2131_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_gst_en"/>
        <field name="tax_code_id" ref="vat_code_payable_gst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_gst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_gst_en"/>
        <field name="parent_id" ref="gstpst_sk_sale_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <record id="pst_sk_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">PST for sales - 5% (SK)</field>
        <field name="description">PST</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="sequence">2</field>
        <field name="account_collected_id" ref="chart2132_en"/>
        <field name="account_paid_id" ref="chart2132_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_pst_en"/>
        <field name="tax_code_id" ref="vat_code_payable_pst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_pst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_pst_en"/>
        <field name="parent_id" ref="gstpst_sk_sale_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <!-- HST -->

    <record id="hst13_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">HST for sales - 13%</field>
        <field name="description">HST13_SALE</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.130000</field>
        <field name="type">percent</field>
        <field name="account_collected_id" ref="chart21331_en"/>
        <field name="account_paid_id" ref="chart21331_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_hst13_en"/>
        <field name="tax_code_id" ref="vat_code_payable_hst13_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_hst13_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_hst13_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <record id="hst14_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">HST for sales - 14%</field>
        <field name="description">HST14_SALE</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.14000</field>
        <field name="type">percent</field>
        <field name="account_collected_id" ref="chart21332_en"/>
        <field name="account_paid_id" ref="chart21332_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_hst14_en"/>
        <field name="tax_code_id" ref="vat_code_payable_hst14_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_hst14_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_hst14_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <record id="hst15_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">HST for sales - 15%</field>
        <field name="description">HST15_SALE</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.150000</field>
        <field name="type">percent</field>
        <field name="account_collected_id" ref="chart21333_en"/>
        <field name="account_paid_id" ref="chart21333_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_hst15_en"/>
        <field name="tax_code_id" ref="vat_code_payable_hst15_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_hst15_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_hst15_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <!-- GST -->

    <record id="gst_sale_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST for sales - 5%</field>
        <field name="description">GST_SALE</field>
        <field name="type_tax_use">sale</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="account_collected_id" ref="chart2131_en"/>
        <field name="account_paid_id" ref="chart2131_en"/>
        <field name="base_code_id" ref="vat_code_base_receivable_gst_en"/>
        <field name="tax_code_id" ref="vat_code_payable_gst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_receivable_gst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_payable_gst_en"/>
        <field name="ref_base_sign" eval="-1"/>
        <field name="ref_tax_sign" eval="-1"/>
    </record>

    <!-- PURCHASE TAXES -->

    <!-- British Columbia PST -->

    <record id="gstpst_bc_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST + PST for purchases (BC)</field>
        <field name="description">GSTPST_BC_PURC</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">1</field>
        <field name="type">percent</field>
        <field name="child_depend">1</field>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <record id="gstpst_purc_bc_gst_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST for purchases - 5% (BC)</field>
        <field name="description">GST</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="sequence">1</field>
        <field name="account_collected_id" ref="chart1181_en"/>
        <field name="account_paid_id" ref="chart1181_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_gst_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_gst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_gst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_gst_en"/>
        <field name="parent_id" ref="gstpst_bc_purc_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <record id="pst_bc_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">PST for purchases - 7% (BC)</field>
        <field name="description">PST</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.070000</field>
        <field name="type">percent</field>
        <field name="sequence">2</field>
        <field name="account_collected_id" ref="chart1182_en"/>
        <field name="account_paid_id" ref="chart1182_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_pst_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_pst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_pst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_pst_en"/>
        <field name="parent_id" ref="gstpst_bc_purc_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <!-- Manitoba PST -->

    <record id="gstpst_mb_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST + PST for purchases (MB)</field>
        <field name="description">GSTPST_MB_PURC</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">1</field>
        <field name="type">percent</field>
        <field name="child_depend" eval="True"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <record id="gstpst_purc_mb_gst_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST for purchases - 5% (MB)</field>
        <field name="description">GST</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="sequence">1</field>
        <field name="account_collected_id" ref="chart1181_en"/>
        <field name="account_paid_id" ref="chart1181_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_gst_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_gst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_gst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_gst_en"/>
        <field name="parent_id" ref="gstpst_mb_purc_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <record id="pst_mb_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">PST for purchases - 8% (MB)</field>
        <field name="description">PST</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.080000</field>
        <field name="type">percent</field>
        <field name="sequence">2</field>
        <field name="account_collected_id" ref="chart1182_en"/>
        <field name="account_paid_id" ref="chart1182_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_pst_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_pst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_pst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_pst_en"/>
        <field name="parent_id" ref="gstpst_mb_purc_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <!-- Quebec PST -->

    <record id="gstqst_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST + QST for purchases</field>
        <field name="description">GSTQST_PURC</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">1</field>
        <field name="type">percent</field>
        <field name="child_depend" eval="True"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <record id="gstqst_purc_gst_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST for purchases - 5% (QC)</field>
        <field name="description">GST</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="sequence">1</field>
        <field name="account_collected_id" ref="chart1181_en"/>
        <field name="account_paid_id" ref="chart1181_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_gst_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_gst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_gst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_gst_en"/>
        <field name="parent_id" ref="gstqst_purc_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <record id="qst_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">QST for purchases - 9.975%</field>
        <field name="description">QST</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.099750</field>
        <field name="type">percent</field>
        <field name="sequence">2</field>
        <field name="account_collected_id" ref="chart1182_en"/>
        <field name="account_paid_id" ref="chart1182_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_pst_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_pst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_pst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_pst_en"/>
        <field name="parent_id" ref="gstqst_purc_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <!-- Saskatchewan PST -->

    <record id="gstpst_sk_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST + PST for purchases (SK)</field>
        <field name="description">GSTPST_SK_PURC</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">1</field>
        <field name="type">percent</field>
        <field name="child_depend" eval="True"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <record id="gstpst_purc_sk_gst_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST for purchases - 5% (SK)</field>
        <field name="description">GST</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="sequence">1</field>
        <field name="account_collected_id" ref="chart1181_en"/>
        <field name="account_paid_id" ref="chart1181_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_gst_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_gst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_gst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_gst_en"/>
        <field name="parent_id" ref="gstpst_sk_purc_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <record id="pst_sk_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">PST for purchases - 5% (SK)</field>
        <field name="description">PST</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="sequence">2</field>
        <field name="account_collected_id" ref="chart1182_en"/>
        <field name="account_paid_id" ref="chart1182_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_pst_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_pst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_pst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_pst_en"/>
        <field name="parent_id" ref="gstpst_sk_purc_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <!-- HST -->

    <record id="hst13_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">HST for purchases - 13%</field>
        <field name="description">HST13_PURC</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.130000</field>
        <field name="type">percent</field>
        <field name="account_collected_id" ref="chart11831_en"/>
        <field name="account_paid_id" ref="chart11831_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_hst13_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_hst13_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_hst13_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_hst13_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <record id="hst14_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">HST for purchases - 14%</field>
        <field name="description">HST14_PURC</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.140000</field>
        <field name="type">percent</field>
        <field name="account_collected_id" ref="chart11832_en"/>
        <field name="account_paid_id" ref="chart11832_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_hst14_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_hst14_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_hst14_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_hst14_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <record id="hst15_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">HST for purchases - 15%</field>
        <field name="description">HST15_PURC</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.150000</field>
        <field name="type">percent</field>
        <field name="account_collected_id" ref="chart11833_en"/>
        <field name="account_paid_id" ref="chart11833_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_hst15_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_hst15_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_hst15_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_hst15_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    <!-- GST -->

    <record id="gst_purc_en" model="account.tax.template">
        <field name="chart_template_id" ref="ca_en_chart_template_en"/>
        <field name="name">GST for purchases - 5%</field>
        <field name="description">GST_PURC</field>
        <field name="type_tax_use">purchase</field>
        <field name="amount">0.050000</field>
        <field name="type">percent</field>
        <field name="account_collected_id" ref="chart1181_en"/>
        <field name="account_paid_id" ref="chart1181_en"/>
        <field name="base_code_id" ref="vat_code_base_payable_gst_en"/>
        <field name="tax_code_id" ref="vat_code_receivable_gst_en"/>
        <field name="ref_base_code_id" ref="vat_code_base_payable_gst_en"/>
        <field name="ref_tax_code_id" ref="vat_code_receivable_gst_en"/>
        <field name="base_sign" eval="-1"/>
        <field name="tax_sign" eval="-1"/>
    </record>

    </data>
</openerp>


text:
namespace util
{
	// only allows for insertions.
	// hopefully faster than FastVector.
	template <typename ValueType, size_t ChunkSize = 256>
	struct FastInsertVector
	{
		FastInsertVector()
		{
			this->length = 0;
		}

		FastInsertVector(const FastInsertVector& other)
		{
			for(auto c : other.chunks)
			{
				auto nc = static_cast<ValueType*>(mem::allocate_memory(sizeof(ValueType) * ChunkSize));
				memmove(nc, c, sizeof(ValueType) * ChunkSize);
				this->chunks.push_back(nc);
			}

			this->length = other.length;
		}

		FastInsertVector& operator = (const FastInsertVector& other)
		{
			auto copy = other;
			std::swap(copy, *this);
			return *this;
		}

		FastInsertVector(FastInsertVector&& other) noexcept
		{
			// move.
			this->chunks = std::move(other.chunks);
			this->length = other.length;

			other.length = 0;
		}

		FastInsertVector& operator = (FastInsertVector&& other) noexcept
		{
			if(this != &other)
			{
				for(auto p : this->chunks)
					mem::deallocate_memory(p, sizeof(ValueType) * ChunkSize);

				// move.
				this->chunks = std::move(other.chunks);
				this->length = other.length;

				other.length = 0;
			}

			return *this;
		}

		~FastInsertVector()
		{
			this->clear();
		}

		ValueType& operator [] (size_t index) const
		{
			size_t cind = index / ChunkSize;
			size_t offs = index % ChunkSize;

			assert(cind < this->chunks.size());
			return *(static_cast<ValueType*>(this->chunks[cind] + offs));
		}

		ValueType* getNextSlotAndIncrement()
		{
			size_t addr = this->length;
			if(addr >= (ChunkSize * this->chunks.size()))
				makeNewChunk();

			this->length++;
			auto ret = (chunks.back() + (addr % ChunkSize));

			return ret;
		}

		size_t size() const
		{
			return this->length;
		}

		void clear()
		{
			size_t i = 0;
			for(auto c : this->chunks)
			{
				for(size_t k = 0; k < ChunkSize && i < this->length; k++, i++)
					(c + k)->~ValueType();

				mem::deallocate_memory(c, sizeof(ValueType) * ChunkSize);
			}

			this->length = 0;
			this->chunks.clear();
		}

		private:
		void makeNewChunk()
		{
			this->chunks.push_back(static_cast<ValueType*>(mem::allocate_memory(sizeof(ValueType) * ChunkSize)));
		}

		// possibly use a faster implementation?? since we're just storing pointers idk if there's a point.
		size_t length;
		std::vector<ValueType*> chunks;
	};

	struct MemoryPool_base
	{
		virtual void clear() = 0;
		virtual ~MemoryPool_base() { }
	};

	template <typename ValueType, size_t ChunkSize = 256>
	struct MemoryPool : MemoryPool_base
	{
		MemoryPool() { }
		~MemoryPool() { this->storage.clear(); }

		MemoryPool(const MemoryPool& other)
		{
			this->storage = other.storage;
		}

		MemoryPool& operator = (const MemoryPool& other)
		{
			auto copy = other;
			std::swap(copy, *this);
			return *this;
		}

		MemoryPool(MemoryPool&& other) noexcept
		{
			this->storage = std::move(other.storage);
		}

		MemoryPool& operator = (MemoryPool&& other) noexcept
		{
			if(this != &other) this->storage = std::move(other.storage);
			return *this;
		}

		template <typename... Args>
		ValueType* operator () (Args&&... args)
		{
			return this->construct(std::forward<Args>(args)...);
		}

		template <typename... Args>
		ValueType* construct(Args&&... args)
		{
			return new (this->storage.getNextSlotAndIncrement()) ValueType(std::forward<Args>(args)...);
		}

		virtual void clear() override
		{
			this->storage.clear();
		}

		private:
		FastInsertVector<ValueType, ChunkSize> storage;
	};
}


text:
<left-side-bar-arabic></left-side-bar-arabic>

            وكلاء مبيعات

وكلاء المبيعات

  حفظ

                        <button class="btn" ui-sref="agentsa"> أغلق</button>

                          <button type="button" class="close" data-ng-click="switchBool('showSuccessAlert')">×</button>
                          Sales Agent added Sucessfully

                          <button type="button" class="close" data-ng-click="switchBool('showErrorAlert')">×</button>
                          {{errorText}}

فصل

 معلومات الوكيل

                                    First Name

                                        <input type="text" ng-model="addSalesAgent.firstName" class="form-control" id="inputName" placeholder="First Name" autocomplete="off">

                                     Last Name

                                        <input type="text" ng-model="addSalesAgent.lastName" class="form-control" id="inputName" placeholder="Last Name" autocomplete="off">

                                    Contact Number

                                        <input ng-model="addSalesAgent.Contact" type="tel" class="form-control" id="inputContact" placeholder="Phone" autocomplete="off">

                                    Address

                                        <input type="text" ng-model="addSalesAgent.Address" class="form-control" id="inputAddress" placeholder="Address" autocomplete="off">

                                    Email

                                        <input type="email" ng-model="addSalesAgent.Email" class="form-control" id="inputEmail" placeholder="Email Address" autocomplete="off">

                                    Company

                                        <select class="form-control" id="inputType" ng-model="addSalesAgent.companeSelected" ng-options="company.CompanyName for company in allCompanies" ng-change="onChangeCompany(addSalesAgent.companeSelected)">
                                        </select>

                                    Bank Detail

                                        <textarea rows="4" ng-model="addSalesAgent.BankDetails" class="form-control" id="inputBankDetail" placeholder="Bank Detail" autocomplete="off"></textarea>

                                    Commission

                                        <input type="text" class="form-control" ng-model="addSalesAgent.commRate" id="inputComCom" placeholder="Company Commission" autocomplete="off">

                                        <select class="form-control" id="inputComComType" ng-model="addSalesAgent.AgentCommission" ng-change="getComissionType(addSalesAgent.AgentCommission)">
                                            <option value="true">Percentage</option>
                                            <option value="false">Fixed Value</option>
                                        </select>

                                    Status

                                        <select class="form-control" id="inputStatus" ng-model="addSalesAgent.Status" ng-change="getStatus(addSalesAgent.Status)">
                                            <option value="true">Active</option>
                                            <option value="false">Inactive</option>
                                        </select>

                                    ERP Reference #

                                        <input type="text" ng-model="addSalesAgent.AgentErpReference" class="form-control" id="inputERPReference" placeholder="ERP Reference Number" autocomplete="off">


text:
using UnityEngine;

[RequireComponent(typeof(Collider))]
public class ClickOrTapToExplode : MonoBehaviour {

#if UNITY_EDITOR || (!UNITY_EDITOR && !(UNITY_IPHONE || UNITY_ANDROID))
	void OnMouseDown() {
		StartExplosion();
	}
#endif

	void Update() {
		foreach (var i in Input.touches) {
			if (i.phase != TouchPhase.Began) {
				continue;
			}

			// It's kinda wasteful to do this raycast repeatedly for every ClickToExplode in the
			// scene, but since this component is just for testing I don't think it's worth the
			// bother to figure out some shared static solution.
			RaycastHit hit;
			if (!Physics.Raycast(Camera.main.ScreenPointToRay(i.position), out hit)) {
				continue;
			}
			if (hit.collider != collider) {
				continue;
			}

			StartExplosion();
			return;
		}
	}

	void StartExplosion() {
		BroadcastMessage("Explode");
		GameObject.Destroy(gameObject);
	}

}


text:
backup_dir=/backup/postgresql/full
wal_dir=/backup/postgresql/wal_archive
today=$(date +%Y-%m-%d.%H:%M:%S)
lastOne=$(find $backup_dir -maxdepth 1 -type d -name "*" -exec basename {} \; | tail -n +2 | sort -rn | head -1)

psql -c "select pg_start_backup('$today', true);"
hostname=$(hostname)

if [ $? = 0 ]
then
    mkdir -p $backup_dir/$today
    tar cvj --one-file-system -f $backup_dir/$today/base.tar.bz2 /data/postgresql/data
    psql -c 'select pg_stop_backup();'

    cd $wal_dir
    # find the latest numerical *.backup file and extract the wal segment name it applies to
    breakpoint=`ls *.backup | sort -r | head -n1 | sed -e 's/\..*$//'`

    # get the linenumber of applicable wal segment in the directory listing, generate a list to
    # archive of all those that are in that first set of lines, including the backup wal segment
    arline=`ls | sort | sed -ne "/^$breakpoint$/ =" `
    archive=`ls | sort | head -n $arline`

    # get the line number of the wal segment immediately before the backup. generate the list to
    # remove of all those in that set of lines, excluding the backup wal segment
    rmline=`echo "$arline - 1" | bc`
    remove=`ls | sort | head -n $rmline`
    echo $remove
    tar cvjf $backup_dir/$lastOne/full-wal.tar.bz2 $archive
    rm $remove
    tar cvjf $backup_dir/$today/pit-wal.tar.bz2 $wal_dir

    cd $backup_dir
    # keep last 15
    ls -1d * | sort -rn | tail -n +15 | xargs rm -vr
    cd $OLDPWD
    echo "backup completed database on $today - $hostname" | mail -s "[$today] backup completed" cihangir@koding.com

else
    echo "could not backup database on $today - $hostname" | mail -s "[$today] backup failure  " cihangir@koding.com
fi


text:
ArcGIS Web App

Powered by AngularJS


text:
package dep

import "os"

type T struct {
	F *os.File
}


text:
All things prefixed with dot

# OSX bootstrap
/bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/mishok13/dotfiles/master/osx/bootstrap.sh)"


text:
class UserPolicySigninServiceTest;
class SigninUIError;

namespace {

const char kTestEmail[] = "enterprise@example.com";
const char kTestRefreshToken[] =
    "test_refresh_token_for_enterprise@example.com";

// Dummy delegate forwarding all the calls the test fixture.
// Owned by the TurnSyncOnHelper.
class TestTurnSyncOnHelperDelegate : public TurnSyncOnHelper::Delegate {
 public:
  explicit TestTurnSyncOnHelperDelegate(
      UserPolicySigninServiceTest* test_fixture);
  ~TestTurnSyncOnHelperDelegate() override;

 private:
  // TurnSyncOnHelper::Delegate:
  void ShowLoginError(const SigninUIError& error) override;
  void ShowMergeSyncDataConfirmation(
      const std::string& previous_email,
      const std::string& new_email,
      TurnSyncOnHelper::SigninChoiceCallback callback) override;
  void ShowEnterpriseAccountConfirmation(
      const AccountInfo& account_info,
      TurnSyncOnHelper::SigninChoiceCallback callback) override;
  void ShowSyncConfirmation(
      base::OnceCallback<void(LoginUIService::SyncConfirmationUIClosedResult)>
          callback) override;
  void ShowSyncDisabledConfirmation(
      bool is_managed_account,
      base::OnceCallback<void(LoginUIService::SyncConfirmationUIClosedResult)>
          callback) override;
  void ShowSyncSettings() override;
  void SwitchToProfile(Profile* new_profile) override;

  raw_ptr<UserPolicySigninServiceTest> test_fixture_;
};

}  // namespace

class UserPolicySigninServiceTest : public InProcessBrowserTest {
 public:
  UserPolicySigninServiceTest()
      : embedded_test_server_(net::EmbeddedTestServer::TYPE_HTTPS) {
    // HandleUserInfoRequest must be registered first, to take priority over
    // FakeGaia.
    embedded_test_server_.RegisterRequestHandler(base::BindRepeating(
        &net::test_server::HandlePrefixedRequest, "/oauth2/v1/userinfo",
        base::BindRepeating(&UserPolicySigninServiceTest::HandleUserInfoRequest,
                            base::Unretained(this))));
    embedded_test_server_.RegisterRequestHandler(base::BindRepeating(
        &net::test_server::HandlePrefixedRequest, "/devicemanagement",
        base::BindRepeating(
            &UserPolicySigninServiceTest::HandleDeviceManagementRequest,
            base::Unretained(this))));
    embedded_test_server_.RegisterRequestHandler(base::BindRepeating(
        &FakeGaia::HandleRequest, base::Unretained(&fake_gaia_)));
  }

  ~UserPolicySigninServiceTest() override {
    // Ensure that no helper leaked.
    DCHECK_EQ(helper_created_count_, helper_created_count_);
  }

  Profile* profile() { return browser()->profile(); }

  const CoreAccountId& account_id() { return account_info_.account_id; }

  policy::PolicyService* GetPolicyService() {
    return profile()->GetProfilePolicyConnector()->policy_service();
  }

  TurnSyncOnHelper* CreateTurnSyncOnHelper() {
    // TurnSyncOnHelper deletes itself. At the end of the test, there is a check
    // that these objects did not leak.
    ++helper_created_count_;
    return new TurnSyncOnHelper(
        profile(), signin_metrics::AccessPoint::ACCESS_POINT_BOOKMARK_MANAGER,
        signin_metrics::PromoAction::PROMO_ACTION_WITH_DEFAULT,
        signin_metrics::Reason::kReauthentication, account_info_.account_id,
        TurnSyncOnHelper::SigninAbortedMode::REMOVE_ACCOUNT,
        std::make_unique<TestTurnSyncOnHelperDelegate>(this),
        base::DoNothing());
  }

  // This will never return if the Sync confirmation was already shown. Make
  // sure to call this before the sync confirmation.
  void WaitForSyncConfirmation() {
    base::RunLoop loop;
    sync_confirmation_shown_closure_ = loop.QuitClosure();
    loop.Run();
  }

  // This will never return if the policy request was already handled. Make sure
  // to call this before the policy request is made.
  void WaitForPolicyHanging() {
    base::RunLoop loop;
    policy_hanging_closure_ = loop.QuitClosure();
    loop.Run();
  }

  void ConfirmSync(
      LoginUIService::SyncConfirmationUIClosedResult confirmation_result) {
    std::move(sync_confirmation_callback_).Run(confirmation_result);
  }

  // TurnSyncOnHelperDelegate calls:
  void OnShowEnterpriseAccountConfirmation(
      const AccountInfo& account_info,
      TurnSyncOnHelper::SigninChoiceCallback callback) {
    std::move(callback).Run(TurnSyncOnHelper::SIGNIN_CHOICE_CONTINUE);
  }

  void OnShowSyncConfirmation(
      base::OnceCallback<void(LoginUIService::SyncConfirmationUIClosedResult)>
          callback) {
    sync_confirmation_callback_ = std::move(callback);
    if (sync_confirmation_shown_closure_)
      std::move(sync_confirmation_shown_closure_).Run();
  }

  void OnShowSyncDisabledConfirmation(
      base::OnceCallback<void(LoginUIService::SyncConfirmationUIClosedResult)>
          callback) {
    sync_confirmation_callback_ = std::move(callback);
    if (sync_confirmation_shown_closure_)
      std::move(sync_confirmation_shown_closure_).Run();
  }

  void OnTurnSyncOnHelperDeleted() { ++helper_deleted_count_; }

  void set_policy_hanging(bool hanging) { policy_hanging_ = hanging; }

 private:
  // InProcessBrowserTest:
  void SetUp() override {
    ASSERT_TRUE(embedded_test_server_.InitializeAndListen());
    InProcessBrowserTest::SetUp();
  }

  void SetUpInProcessBrowserTestFixture() override {
    InProcessBrowserTest::SetUpInProcessBrowserTestFixture();
    // Configure policy server.
    ASSERT_NO_FATAL_FAILURE(SetUpPolicyServer());
    ASSERT_TRUE(policy_server_->Start());
    base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
    // Configure embedded test server.
    const GURL& base_url = embedded_test_server_.base_url();
    command_line->AppendSwitchASCII(
        policy::switches::kDeviceManagementUrl,
        base_url.Resolve("/devicemanagement").spec());
    command_line->AppendSwitchASCII(switches::kGaiaUrl, base_url.spec());
    command_line->AppendSwitchASCII(switches::kLsoUrl, base_url.spec());
    command_line->AppendSwitchASCII(switches::kGoogleApisUrl, base_url.spec());
    policy::ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting();
    fake_gaia_.Initialize();
    // Configure Sync server.
    command_line->AppendSwitch(syncer::kDisableSync);

    // Set retry delay to prevent timeouts.
    policy::DeviceManagementService::SetRetryDelayForTesting(0);
  }

  void SetUpOnMainThread() override {
    InProcessBrowserTest::SetUpOnMainThread();
    ASSERT_TRUE(PolicyServiceIsEmpty(g_browser_process->policy_service()))
        << "Pre-existing policies in this machine will make this test fail.";

    embedded_test_server_.StartAcceptingConnections();

    account_info_ = signin::MakeAccountAvailable(
        IdentityManagerFactory::GetForProfile(profile()), kTestEmail);
    signin::SetRefreshTokenForAccount(
        IdentityManagerFactory::GetForProfile(profile()),
        account_info_.account_id, kTestRefreshToken);
    SetupFakeGaiaResponses();
  }

  void SetUpPolicyServer() {
    policy_server_ = std::make_unique<policy::EmbeddedPolicyTestServer>();

    policy::PolicyStorage* policy_storage = policy_server_->policy_storage();
    em::CloudPolicySettings settings;
    settings.mutable_showhomebutton()->mutable_policy_options()->set_mode(
        em::PolicyOptions::MANDATORY);
    settings.mutable_showhomebutton()->set_value(true);
    policy_storage->SetPolicyPayload(policy::dm_protocol::kChromeUserPolicyType,
                                     settings.SerializeAsString());
    policy_storage->add_managed_user("*");
    policy_storage->set_policy_user(kTestEmail);
    policy_storage->signature_provider()->set_current_key_version(1);
    policy_storage->set_policy_invalidation_topic("test_policy_topic");
  }

  void SetupFakeGaiaResponses() {
    FakeGaia::AccessTokenInfo access_token_info;
    access_token_info.token = "test_access_token";
    access_token_info.any_scope = true;
    access_token_info.audience =
        GaiaUrls::GetInstance()->oauth2_chrome_client_id();
    access_token_info.email = kTestEmail;
    fake_gaia_.IssueOAuthToken(kTestRefreshToken, access_token_info);
  }

  std::unique_ptr<net::test_server::HttpResponse> HandleUserInfoRequest(
      const net::test_server::HttpRequest& r) {
    auto http_response =
        std::make_unique<net::test_server::BasicHttpResponse>();
    http_response->set_content(R"(
        {
          "email": "enterprise@example.com",
          "verified_email": true,
          "hd": "example.com"
        })");
    return http_response;
  }

  // This simply redirects to the policy server, unless |policy_hanging_| is
  // true.
  std::unique_ptr<net::test_server::HttpResponse> HandleDeviceManagementRequest(
      const net::test_server::HttpRequest& r) {
    std::string request_type;
    net::GetValueForKeyInQuery(r.GetURL(), policy::dm_protocol::kParamRequest,
                               &request_type);
    if (request_type == policy::dm_protocol::kValueRequestPolicy &&
        policy_hanging_) {
      if (policy_hanging_closure_)
        std::move(policy_hanging_closure_).Run();
      return std::make_unique<net::test_server::HungResponse>();
    }

    // Redirect to the policy server.
    GURL::Replacements replace_query;
    std::string query = r.GetURL().query();
    replace_query.SetQueryStr(query);
    std::string dest =
        policy_server_->GetServiceURL().ReplaceComponents(replace_query).spec();
    auto http_response =
        std::make_unique<net::test_server::BasicHttpResponse>();
    http_response->set_code(net::HTTP_TEMPORARY_REDIRECT);
    http_response->AddCustomHeader("Location", dest);
    return http_response;
  }

  net::EmbeddedTestServer embedded_test_server_;
  FakeGaia fake_gaia_;
  std::unique_ptr<policy::EmbeddedPolicyTestServer> policy_server_;
  CoreAccountInfo account_info_;
  base::OnceClosure sync_confirmation_shown_closure_;
  base::OnceClosure policy_hanging_closure_;
  base::OnceCallback<void(LoginUIService::SyncConfirmationUIClosedResult)>
      sync_confirmation_callback_;
  bool policy_hanging_ = false;
  int helper_created_count_ = 0;
  int helper_deleted_count_ = 0;
};

TestTurnSyncOnHelperDelegate::TestTurnSyncOnHelperDelegate(
    UserPolicySigninServiceTest* test_fixture)
    : test_fixture_(test_fixture) {}

TestTurnSyncOnHelperDelegate::~TestTurnSyncOnHelperDelegate() {
  test_fixture_->OnTurnSyncOnHelperDeleted();
}

void TestTurnSyncOnHelperDelegate::ShowLoginError(const SigninUIError& error) {
  NOTREACHED();
}

void TestTurnSyncOnHelperDelegate::ShowMergeSyncDataConfirmation(
    const std::string& previous_email,
    const std::string& new_email,
    TurnSyncOnHelper::SigninChoiceCallback callback) {
  NOTREACHED();
}

void TestTurnSyncOnHelperDelegate::ShowEnterpriseAccountConfirmation(
    const AccountInfo& account_info,
    TurnSyncOnHelper::SigninChoiceCallback callback) {
  test_fixture_->OnShowEnterpriseAccountConfirmation(account_info,
                                                     std::move(callback));
}

void TestTurnSyncOnHelperDelegate::ShowSyncConfirmation(
    base::OnceCallback<void(LoginUIService::SyncConfirmationUIClosedResult)>
        callback) {
  test_fixture_->OnShowSyncConfirmation(std::move(callback));
}

void TestTurnSyncOnHelperDelegate::ShowSyncDisabledConfirmation(
    bool is_managed_account,
    base::OnceCallback<void(LoginUIService::SyncConfirmationUIClosedResult)>
        callback) {
  test_fixture_->OnShowSyncDisabledConfirmation(std::move(callback));
}

void TestTurnSyncOnHelperDelegate::ShowSyncSettings() {
  NOTREACHED();
}

void TestTurnSyncOnHelperDelegate::SwitchToProfile(Profile* new_profile) {
  NOTREACHED();
}

IN_PROC_BROWSER_TEST_F(UserPolicySigninServiceTest, BasicSignin) {
  EXPECT_FALSE(profile()->GetPrefs()->GetBoolean(prefs::kShowHomeButton));

  // Signin and show sync confirmation dialog.
  CreateTurnSyncOnHelper();
  WaitForSyncConfirmation();

  // Policies are applied even before the user confirms.
  EXPECT_TRUE(
      IdentityManagerFactory::GetForProfile(profile())->HasPrimaryAccount(
          signin::ConsentLevel::kSync));
  WaitForPrefValue(profile()->GetPrefs(), prefs::kShowHomeButton,
                   base::Value(true));

  // Confirm the signin.
  ConfirmSync(LoginUIService::SYNC_WITH_DEFAULT_SETTINGS);
  // Policy is still applied.
  EXPECT_TRUE(profile()->GetPrefs()->GetBoolean(prefs::kShowHomeButton));
}

IN_PROC_BROWSER_TEST_F(UserPolicySigninServiceTest, UndoSignin) {
  EXPECT_FALSE(profile()->GetPrefs()->GetBoolean(prefs::kShowHomeButton));

  // Signin and show sync confirmation dialog.
  CreateTurnSyncOnHelper();
  WaitForSyncConfirmation();

  // Policies are applied even before the user confirms.
  EXPECT_TRUE(
      IdentityManagerFactory::GetForProfile(profile())->HasPrimaryAccount(
          signin::ConsentLevel::kSync));
  WaitForPrefValue(profile()->GetPrefs(), prefs::kShowHomeButton,
                   base::Value(true));

  // Cancel sync.
  ConfirmSync(LoginUIService::ABORT_SYNC);
  // Policy is reverted.
  WaitForPrefValue(profile()->GetPrefs(), prefs::kShowHomeButton,
                   base::Value(false));
}

// Regression test for https://crbug.com/1061459
// Start a new signing flow while the existing one is hanging on a policy
// request.
IN_PROC_BROWSER_TEST_F(UserPolicySigninServiceTest, ConcurrentSignin) {
  EXPECT_FALSE(profile()->GetPrefs()->GetBoolean(prefs::kShowHomeButton));

  set_policy_hanging(true);
  CreateTurnSyncOnHelper();
  WaitForPolicyHanging();

  // User is not signed in, policy is not applied.
  EXPECT_FALSE(
      IdentityManagerFactory::GetForProfile(profile())->HasPrimaryAccount(
          signin::ConsentLevel::kSync));
  EXPECT_FALSE(profile()->GetPrefs()->GetBoolean(prefs::kShowHomeButton));

  // Restart a new signin flow and allow it to complete.
  CreateTurnSyncOnHelper();
  set_policy_hanging(false);
  WaitForSyncConfirmation();

  // Policies are applied even before the user confirms.
  EXPECT_TRUE(
      IdentityManagerFactory::GetForProfile(profile())->HasPrimaryAccount(
          signin::ConsentLevel::kSync));
  WaitForPrefValue(profile()->GetPrefs(), prefs::kShowHomeButton,
                   base::Value(true));

  // Confirm the signin.
  ConfirmSync(LoginUIService::SYNC_WITH_DEFAULT_SETTINGS);
  // Policy is still applied.
  EXPECT_TRUE(profile()->GetPrefs()->GetBoolean(prefs::kShowHomeButton));
}

// crbug.com/1230268 not working on Lacros.
// TODO(crbug.com/1254962): flaky on Mac builders
#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_MAC)
#define MAYBE_AcceptManagementDeclineSync DISABLED_AcceptManagementDeclineSync
#else
#define MAYBE_AcceptManagementDeclineSync AcceptManagementDeclineSync
#endif
IN_PROC_BROWSER_TEST_F(UserPolicySigninServiceTest,
                       MAYBE_AcceptManagementDeclineSync) {
  TurnSyncOnHelper::SetShowSyncEnabledUiForTesting(true);
  EXPECT_FALSE(profile()->GetPrefs()->GetBoolean(prefs::kShowHomeButton));

  // Signin and show sync confirmation dialog.
  CreateTurnSyncOnHelper();
  WaitForSyncConfirmation();

  // Policies are applied even before the user confirms.
  EXPECT_TRUE(
      IdentityManagerFactory::GetForProfile(profile())->HasPrimaryAccount(
          signin::ConsentLevel::kSync));
  WaitForPrefValue(profile()->GetPrefs(), prefs::kShowHomeButton,
                   base::Value(true));

  // Cancel sync.
  ConfirmSync(LoginUIService::ABORT_SYNC);

  EXPECT_TRUE(
      IdentityManagerFactory::GetForProfile(profile())->HasPrimaryAccount(
          signin::ConsentLevel::kSignin));
  EXPECT_FALSE(
      IdentityManagerFactory::GetForProfile(profile())->HasPrimaryAccount(
          signin::ConsentLevel::kSync));
  EXPECT_TRUE(
      chrome::enterprise_util::UserAcceptedAccountManagement(profile()));
  EXPECT_TRUE(chrome::enterprise_util::ProfileCanBeManaged(profile()));
  // Policy is still applied.
  EXPECT_TRUE(profile()->GetPrefs()->GetBoolean(prefs::kShowHomeButton));

  // Signout
  auto* accounts_mutator =
      IdentityManagerFactory::GetForProfile(profile())->GetAccountsMutator();
  accounts_mutator->RemoveAccount(
      account_id(), signin_metrics::SourceForRefreshTokenOperation::
                        kDiceResponseHandler_Signout);
  EXPECT_FALSE(
      IdentityManagerFactory::GetForProfile(profile())->HasPrimaryAccount(
          signin::ConsentLevel::kSignin));
  EXPECT_FALSE(
      chrome::enterprise_util::UserAcceptedAccountManagement(profile()));
  EXPECT_FALSE(chrome::enterprise_util::ProfileCanBeManaged(profile()));
  TurnSyncOnHelper::SetShowSyncEnabledUiForTesting(false);
}


text:
package uk.co.certait.htmlexporter.ss;

public interface CellRangeResolver {
	public String getRangeString(CellRange range);
}


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _reactDom = require('react-dom');

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

var _Icon = require('./Icon');

var _Icon2 = _interopRequireDefault(_Icon);

var _mdlUpgrade = require('./utils/mdlUpgrade');

var _mdlUpgrade2 = _interopRequireDefault(_mdlUpgrade);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var propTypes = {
    checked: _react.PropTypes.bool,
    className: _react.PropTypes.string,
    disabled: _react.PropTypes.bool,
    name: _react.PropTypes.string.isRequired,
    onChange: _react.PropTypes.func,
    ripple: _react.PropTypes.bool
};

var IconToggle = function (_React$Component) {
    _inherits(IconToggle, _React$Component);

    function IconToggle() {
        _classCallCheck(this, IconToggle);

        return _possibleConstructorReturn(this, (IconToggle.__proto__ || Object.getPrototypeOf(IconToggle)).apply(this, arguments));
    }

    _createClass(IconToggle, [{
        key: 'componentDidUpdate',
        value: function componentDidUpdate(prevProps) {
            if (this.props.disabled !== prevProps.disabled) {
                var fnName = this.props.disabled ? 'disable' : 'enable';
                (0, _reactDom.findDOMNode)(this).MaterialIconToggle[fnName]();
            }
            if (this.props.checked !== prevProps.checked) {
                var _fnName = this.props.checked ? 'check' : 'uncheck';
                (0, _reactDom.findDOMNode)(this).MaterialIconToggle[_fnName]();
            }
        }
    }, {
        key: 'render',
        value: function render() {
            var _props = this.props,
                className = _props.className,
                name = _props.name,
                ripple = _props.ripple,
                inputProps = _objectWithoutProperties(_props, ['className', 'name', 'ripple']);

            var classes = (0, _classnames2.default)('mdl-icon-toggle mdl-js-icon-toggle', {
                'mdl-js-ripple-effect': ripple
            }, className);

            return _react2.default.createElement(
                'label',
                { className: classes },
                _react2.default.createElement('input', _extends({
                    type: 'checkbox',
                    className: 'mdl-icon-toggle__input'
                }, inputProps)),
                _react2.default.createElement(_Icon2.default, { className: 'mdl-icon-toggle__label', name: name })
            );
        }
    }]);

    return IconToggle;
}(_react2.default.Component);

IconToggle.propTypes = propTypes;

exports.default = (0, _mdlUpgrade2.default)(IconToggle, true);


text:
<project name="BarCode4JTask Demo" default="run" basedir=".">

  <!-- set global properties for this build -->
  <property name="message" value="http://barcode4j.sourceforge.net"/>
  <property name="number" value="123456789012"/>
  <property name="pathPrefix" value="generated/img"/>
  <property name="dpi" value="600"/>
  <property name="format" value="png"/>

  <property name="barcode4j-root" value="{$basedir}/../../../"/>

  <path id="task.classpath">
    <pathelement location="${barcode4j-root}/build/barcode4j.jar"/>
    <pathelement location="${barcode4j-root}/lib/avalon-framework-4.2.0.jar"/>
  </path>

  <taskdef name="barcode" classname="org.krysalis.barcode4j.ant.BarcodeTask"
    classpathref="task.classpath"/>

  <macrodef name="bc">
    <attribute name="symbol"/>
    <attribute name="message"/>
    <sequential>
      <barcode output="${pathPrefix}.@{symbol}.${format}" symbol="@{symbol}" format="${format}"
        dpi="${dpi}" message="@{message}"/>
    </sequential>
  </macrodef>

  <target name="init">
    <mkdir dir="generated"/>
  </target>

  <target name="withmacro" depends="init">
    <bc symbol="pdf417" message="${message}"/>
    <bc symbol="datamatrix" message="${message}"/>

    <bc symbol="codabar" message="${number}"/>
    <bc symbol="intl2of5" message="${number}"/>
    <bc symbol="code39" message="${number}"/>
    <bc symbol="code128" message="${number}"/>

    <bc symbol="ean13" message="${number}"/>
    <bc symbol="ean128" message="${number}"/>
    <bc symbol="ean8" message="1234567"/>

    <bc symbol="postnet" message="${number}"/>
    <bc symbol="royal-mail-cbc" message="${number}"/>
  </target>

  <target name="withoutmacro" depends="init">
    <barcode output="${pathPrefix}.pdf417.${format}" symbol="pdf417" format="${format}" dpi="${dpi}"
      message="${message}"/>
    <barcode output="${pathPrefix}.datamatrix.${format}" symbol="datamatrix" format="${format}"
      dpi="${dpi}" message="${message}"/>
    <barcode output="${pathPrefix}.postnet.${format}" symbol="postnet" format="${format}"
      dpi="${dpi}" message="${number}"/>
    <barcode output="${pathPrefix}.ean13.${format}" symbol="ean13" format="${format}" dpi="${dpi}"
      message="${number}"/>

    <barcode output="${pathPrefix}.upca.svg" symbol="upce" format="svg">1234567</barcode>

  </target>

  <target name="run" depends="withmacro, withoutmacro"/>

  <target name="clean">
    <delete dir="generated"/>
  </target>
</project>


text:
======
Docker
======

Unless you have a MySql instance at hand, this_ Ubuntu based image will spawn a Mariadb instance. This instance will be the one used by both the logreader and the ui. Check the IP of your docker setup and update the zipnish.cfg accordingly.

The image relies on two extra files: ``database.sql`` and ``init-db.sh``. Both these files are available in the ``/docker`` folder within the zipnish source code. The two extra files are responsible for the creation and initialisation of an user and db tables that Zipnish will use further down the line. Browse to this folder and run the following commands:

.. _this: https://hub.docker.com/r/mariusm/ubuntu-mariadb/

.. code-block:: sh

  $ docker pull mariusm/ubuntu-mariadb
  $ docker run -d -p 3306:3306 mariusm/ubuntu-mariadb

A database and db user with the following credentials will be available, if you're going to use this db instance, make sure that zipnish.cfg reflects these settings:

  **user** = zipnish

  **pass** = secret

  **db_name** = microservice

To quickly check that the container is up and running, you can connect to it directly with a Mysql client.
Retrieve the IP of your docker setup and connect to the mariadb instance as follows:

.. code-block:: sh

  $ mysql -u zipnish -h "your docker ip" --paswword=secret

On a MacOs machine you can simply run the following command:

.. code-block:: sh

  $ mysql -u zipnish -h $(boot2docker ip) --password=secret


text:
package jezuk.mango;

import java.util.Iterator;
import java.util.List;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;

abstract class MangoRangeBase<T> implements MangoRange<T> {
  public abstract T next();
  public abstract boolean hasNext();

  public void remove() { throw new UnsupportedOperationException(); }

  public MangoRange<T> where(final Predicate<T> pred) {
    return new WhereRange<T>(this, pred);
  } // where
  public <U> MangoRange<U> select(final Function<T, U> fn) {
    return new SelectRange<T, U>(this, fn);
  } // where
  public MangoRange<T> distinct() {
    return new WhereRange<T>(this, new Predicate<T>() {
      private Set<T> seen = new HashSet<T>();
      public boolean test(T value) {
        return seen.add(value);
      }
    });
  } // distinct
  public MangoRange<T> first() {
    return take(1);
  } // first
  public MangoRange<T> firstWhere(final Predicate<T> pred) {
    return where(pred).take(1);
  } // where
  public MangoRange<T> last() {
    if (!hasNext())
      return Mango.empty();

    T l = next();
    while (hasNext())
      l = next();
    return Mango.from(l);
  } // last
  public MangoRange<T> lastWhere(final Predicate<T> pred) {
    return where(pred).last();
  } // lastWhere

  public MangoRange<T> take(final int count) {
    return takeWhile(Predicates.<T>Counter(count));
  } // take
  public MangoRange<T> takeWhile(final Predicate<T> pred) {
    return new TakeRange<T>(this, pred);
  } // takeWhile
  public MangoRange<T> takeUntil(final Predicate<T> pred) {
    return takeWhile(Predicates.Not(pred));
  } // takeUntil

  public MangoRange<T> drop(final int count) {
    return dropWhile(Predicates.<T>Counter(count));
  } // drop
  public MangoRange<T> dropWhile(final Predicate<T> pred) {
    return new DropRange<T>(this, pred);
  } // dropWhile
  public MangoRange<T> dropUntil(final Predicate<T> pred) {
    return dropWhile(Predicates.Not(pred));
  } // dropUntil

  public MangoRange<T> concat(final Iterator<T> iterator) {
    return Mango.concat(this, Mango.from(iterator));
  } // concat
  public MangoRange<T> concat(final Iterable<T> iterable) {
    return Mango.concat(this, Mango.from(iterable));
  } // concat
  public MangoRange<T> concat(final MangoRange<T> range) {
    return Mango.concat(this, range);
  } // concat

  public T accumulate(final BinaryOperation<T> accumulator) {
    if (!hasNext())
      return null;
    return accumulate(next(), accumulator);
  } // accumulate
  public T accumulate(final T initial, final BinaryOperation<T> accumulator) {
    T acc = initial;
    while (hasNext())
      acc = accumulator.execute(acc, next());
    return acc;
  } // accumulate

  public long count() {
    long c = 0;
    while (hasNext()) {
      ++c;
      next();
    } // while
    return c;
  } // count

  public boolean allMatch(final Predicate<T> pred) {
    if (!hasNext())
      return false;

    while (hasNext())
      if (!pred.test(next()))
        return false;

    return true;
  } // allMatch

  public boolean anyMatch(final Predicate<T> pred) {
    if (!hasNext())
      return false;

    while (hasNext())
      if (pred.test(next()))
        return true;

    return false;
  } // anyMatch

  public boolean noneMatch(final Predicate<T> pred) {
    if (!hasNext())
      return true;

    while (hasNext())
      if (pred.test(next()))
        return false;

    return true;
  } // noneMatch

  public List<T> toList() { return to(new ArrayList<T>()); }
  public List<T> to(final List<T> list) {
    to(Mango.<T>to(list));
    return list;
  } // to
  public void to(final Sink<T> sink) {
    while (hasNext())
      sink.put(next());
  } // to
} // class MangoRange


text:
module Azure::TimeSeriesInsights::Mgmt::V2018_08_15_preview
  module Models
    #
    # Parameters supplied to the Update Event Source operation to update an
    # IoTHub event source.
    #
    class IoTHubEventSourceUpdateParameters < EventSourceUpdateParameters

      include MsRestAzure

      # @return [String] The event property that will be used as the event
      # source's timestamp. If a value isn't specified for
      # timestampPropertyName, or if null or empty-string is specified, the
      # event creation time will be used.
      attr_accessor :timestamp_property_name

      # @return [LocalTimestamp] An object that represents the local timestamp
      # property. It contains the format of local timestamp that needs to be
      # used and the corresponding timezone offset information. If a value
      # isn't specified for localTimestamp, or if null, then the local
      # timestamp will not be ingressed with the events.
      attr_accessor :local_timestamp

      # @return [String] The value of the shared access key that grants the
      # Time Series Insights service read access to the iot hub. This property
      # is not shown in event source responses.
      attr_accessor :shared_access_key

      #
      # Mapper for IoTHubEventSourceUpdateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'IoTHubEventSourceUpdateParameters',
          type: {
            name: 'Composite',
            class_name: 'IoTHubEventSourceUpdateParameters',
            model_properties: {
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              timestamp_property_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.timestampPropertyName',
                type: {
                  name: 'String'
                }
              },
              local_timestamp: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.localTimestamp',
                type: {
                  name: 'Composite',
                  class_name: 'LocalTimestamp'
                }
              },
              shared_access_key: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.sharedAccessKey',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
BitSend Core version 0.18.1 is now available from:

  <https://bitsendcore.org/bin/bitsend-core-0.18.1/>

This is a new minor version release, including new features, various bug
fixes and performance improvements, as well as updated translations.

Please report bugs using the issue tracker at GitHub:

  <https://github.com/bitsend/bitsend/issues>

To receive security and update notifications, please subscribe to:

  <https://bitsendcore.org/en/list/announcements/join/>

How to Upgrade
==============

If you are running an older version, shut it down. Wait until it has
completely shut down (which might take a few minutes for older
versions), then run the installer (on Windows) or just copy over
`/Applications/BitSend-Qt` (on Mac) or `bitsendd`/`bitsend-qt` (on
Linux).

The first time you run version 0.15.0 or newer, your chainstate database
will be converted to a new format, which will take anywhere from a few
minutes to half an hour, depending on the speed of your machine.

Note that the block database format also changed in version 0.8.0 and
there is no automatic upgrade code from before version 0.8 to version
0.15.0 or later. Upgrading directly from 0.7.x and earlier without
redownloading the blockchain is not supported.  However, as usual, old
wallet versions are still supported.

Compatibility
==============

BitSend Core is supported and extensively tested on operating systems
using the Linux kernel, macOS 10.10+, and Windows 7 and newer. It is not
recommended to use BitSend Core on unsupported systems.

BitSend Core should also work on most other Unix-like systems but is not
as frequently tested on them.

From 0.17.0 onwards, macOS <10.10 is no longer supported. 0.17.0 is
built using Qt 5.9.x, which doesn't support versions of macOS older than
10.10. Additionally, BitSend Core does not yet change appearance when
macOS "dark mode" is activated.

Known issues
============

Wallet GUI
----------

For advanced users who have both (1) enabled coin control features, and
(2) are using multiple wallets loaded at the same time: The coin control
input selection dialog can erroneously retain wrong-wallet state when
switching wallets using the dropdown menu. For now, it is recommended
not to use coin control features with multiple wallets loaded.

0.18.1 change log
=================

### P2P protocol and network code
- #15990 Add tests and documentation for blocksonly (MarcoFalke)
- #16021 Avoid logging transaction decode errors to stderr (MarcoFalke)
- #16405 fix: tor: Call `event_base_loopbreak` from the event's callback (promag)
- #16412 Make poll in InterruptibleRecv only filter for POLLIN events (tecnovert)

### Wallet
- #15913 Add -ignorepartialspends to list of ignored wallet options (luke-jr)

### RPC and other APIs
- #15991 Bugfix: fix pruneblockchain returned prune height (jonasschnelli)
- #15899 Document iswitness flag and fix bug in converttopsbt (MarcoFalke)
- #16026 Ensure that uncompressed public keys in a multisig always returns a legacy address (achow101)
- #14039 Disallow extended encoding for non-witness transactions (sipa)
- #16210 add 2nd arg to signrawtransactionwithkey examples (dooglus)
- #16250 signrawtransactionwithkey: report error when missing redeemScript/witnessScript (ajtowns)

### GUI
- #16044 fix the bug of OPEN CONFIGURATION FILE on Mac (shannon1916)
- #15957 Show "No wallets available" in open menu instead of nothing (meshcollider)
- #16118 Enable open wallet menu on setWalletController (promag)
- #16135 Set progressDialog to nullptr (promag)
- #16231 Fix open wallet menu initialization order (promag)
- #16254 Set `AA_EnableHighDpiScaling` attribute early (hebasto)
- #16122 Enable console line edit on setClientModel (promag)
- #16348 Assert QMetaObject::invokeMethod result (promag)

### Build system
- #15985 Add test for GCC bug 90348 (sipa)
- #15947 Install bitsend-wallet manpage (domob1812)
- #15983 build with -fstack-reuse=none (MarcoFalke)

### Tests and QA
- #15826 Pure python EC (sipa)
- #15893 Add test for superfluous witness record in deserialization (instagibbs)
- #14818 Bugfix: test/functional/rpc_psbt: Remove check for specific error message that depends on uncertain assumptions (luke-jr)
- #15831 Add test that addmultisigaddress fails for watchonly addresses (MarcoFalke)

### Documentation
- #15890 Remove text about txes always relayed from -whitelist (harding)

### Miscellaneous
- #16095 Catch by reference not value in wallettool (kristapsk)
- #16205 Replace fprintf with tfm::format (MarcoFalke)

Credits
=======

Thanks to everyone who directly contributed to this release:

- Andrew Chow
- Anthony Towns
- Chris Moore
- Daniel Kraft
- David A. Harding
- fanquake
- Gregory Sanders
- Hennadii Stepanov
- John Newbery
- Jonas Schnelli
- João Barbosa
- Kristaps Kaupe
- Luke Dashjr
- MarcoFalke
- Michele Federici
- Pieter Wuille
- Samuel Dobson
- shannon1916
- tecnovert
- Wladimir J. van der Laan

As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitsend/).