text:
[![Build Status](https://travis-ci.org/edaniszewski/pylint-quotes.svg?branch=master)](https://travis-ci.org/edaniszewski/pylint-quotes)
[![Coverage Status](https://coveralls.io/repos/github/edaniszewski/pylint-quotes/badge.svg?branch=master)](https://coveralls.io/github/edaniszewski/pylint-quotes?branch=master)
[![Latest Version](https://img.shields.io/pypi/v/pylint-quotes.svg)](https://pypi.python.org/pypi/pylint-quotes)
[![License](https://img.shields.io/github/license/edaniszewski/pylint-quotes.svg)](LICENSE)

A Pylint plugin for checking the consistency of string quotes.

## Example

### before
Below is an example python file that uses inconsistent string quotes.

`example.py`
```python
"""Example python file."""

def main(output="default"):
    '''Entrypoint to the example script which prints out the
    value in the 'output' variable.
    '''
    print(output)

if __name__ == "__main__":
    main('testing')
```
which would yield
```
➜ pylint --load-plugins pylint_quotes example.py

No config file found, using default configuration
************* Module example
C:  4, 0: Invalid string quote ", should be ' (invalid-string-quote)
C: 11, 0: Invalid string quote ", should be ' (invalid-string-quote)
C:  5, 0: Invalid docstring quote ''', should be """ (invalid-docstring-quote)

-----------------------------------
Your code has been rated at 2.50/10
```

### after
Fixing up the example above based on linting recommendations,

`example.py`
```python
"""Example python file."""

def main(output='default'):
    """Entrypoint to the example script which prints out the
    value in the 'output' variable.
    """
    print(output)

if __name__ == '__main__':
    main('testing')
```
which yields
```
➜ pylint --load-plugins pylint_quotes example.py

No config file found, using default configuration

-------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 2.50/10, +7.50)
```

### Example Package
An example package is found in the [`example/`](example) directory.

```
➜ pylint --load-plugins pylint_quotes example

************* Module foo.__init__
example/foo/__init__.py:3:0: C4001: Invalid string quote ", should be ' (invalid-string-quote)
************* Module foo
example/foo/__init__.py:1:0: C0102: Black listed name "foo" (blacklisted-name)
************* Module foo.other
example/foo/other.py:1:0: C4003: Invalid docstring quote ''', should be """ (invalid-docstring-quote)
example/foo/other.py:4:0: R0903: Too few public methods (1/2) (too-few-public-methods)
example/foo/other.py:10:0: C4002: Invalid triple quote """, should be ''' (invalid-triple-quote)
************* Module foo.utils
example/foo/utils.py:15:0: C4001: Invalid string quote ", should be ' (invalid-string-quote)
example/foo/utils.py:5:0: C4003: Invalid docstring quote ''', should be """ (invalid-docstring-quote)
example/foo/utils.py:10:0: C4003: Invalid docstring quote ''', should be """ (invalid-docstring-quote)

------------------------------------------------------------------
Your code has been rated at 1.11/10 (previous run: 1.11/10, +0.00)
```

## Installation

Installing with `pip`:
```
pip install pylint-quotes
```

Installing with `pipenev`:
```
pipenv install pylint-quotes
```

## Usage
To use pylint-quotes, it must loaded in as a plugin when running pylint
```
pylint --load-plugins pylint_quotes <module-or-package>
```

## Checks
pylint-quotes provides a single `StringQuoteChecker` that checks for consistency
between
 - single quote string literals
   ```python
   x = 'example'
   y = "example"
   ```
 - triple quote strings
   ```python
   """ single line block comments """
   '''
      multi-line block comments too
   '''

   x = '''example'''
   y = """
   example
   """
   ```
 - docstrings (module, class, function, async function)
   ```python
   def x():
       '''Example'''
       pass

   def y():
       """
           Multi-line example.
       """
       pass

   async def z():
       """Async example.
       """
       pass
   ```

## Configuration
The string quote type can be configured as either 'single' or 'double' in the configuration
file. For example, to check for single quote string literals, double quote triple quoted
string, and double quoted docstrings,
```ini
string-quote=single
triple-quote=double
docstring-quote=double
```

the default configuration is
```ini
string-quote=single
triple-quote=single
docstring-quote=double
```

Additionally the `string-quote` can be configured to avoid escaping: by default
it enforces one type but if using the other type would avoid some escaping then
it enforces the other one. To use those smart types the config is
'single-avoid-escape', and 'double-avoid-escape'.

## Developing
If you wish to develop the pylint-quotes project to fix a bug, add a feature, or
extend it for your own uses, the [Makefile](Makefile) provides a bunch of helpful
development targets. For a full list of the targets, see the Makefile, or you can
use `make help`.

For convenience, `pipenv` is used to manage development dependencies. Before starting
development, you should `make init` to install `pipenv` if you don't already have it and
create a virtualenv with the project development dependencies. From there, you can use:
- `make test` to run the unit tests
- `make coverage` to run unit tests and get a coverage report
- `make lint` to perform source code linting

## License
Pylint-quotes is licensed under an MIT license -- see [LICENSE](LICENSE) for more info.


text:
package io.evanwong.oss.hipchat.v2.rooms;

import io.evanwong.oss.hipchat.v2.commons.NoContent;
import io.evanwong.oss.hipchat.v2.commons.PostRequest;
import org.apache.http.client.HttpClient;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutorService;

public class SendRoomMessageRequest extends PostRequest<NoContent> {

    private String idOrName;
    private String message;

    SendRoomMessageRequest(String idOrName, String message, String accessToken, HttpClient httpClient, ExecutorService executorService) {
        super(accessToken, httpClient, executorService);
        this.idOrName = idOrName;
        this.message = message;
    }

    public String getIdOrName() {
        return idOrName;
    }

    public String getMessage() {
        return message;
    }

    @Override
    protected String getPath() {
        return "/room/" + idOrName + "/message";
    }

    @Override
    protected Map<String, Object> toQueryMap() {
        Map<String, Object> params = new HashMap<>();
        params.put("message", message);
        return params;
    }
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebSpider.Data.DatabaseConnection;
using WebSpider.Data.DatabaseManager;
using WebSpider.Objects.AdiExport;

namespace WebSpider.Data.AdiExport
{
    public class FinalTableManager : DataManager
    {
        #region [Constructror]
        public FinalTableManager(string ConnectionString)
        {
            // TODO: Complete member initialization
            this.ConnectionString = ConnectionString;
        }
        #endregion

        public void CreateSchema()
        {
            String Query = "CREATE TABLE Final_Table ("
                + "ID AUTOINCREMENT PRIMARY KEY, "
                + "UPC TEXT(255), "
                + "VDR_PART TEXT(255), "
                + "VDR_IT_DSC TEXT(255), "
                + "Image_Folder TEXT(255), "
                + "AID_SOURCE_ID TEXT(255), "
                + "AID_PART TEXT(255), "
                + "AID_COST DECIMAL, "
                + "AID_IMG1 TEXT(255), "
                + "AID_IMG2 TEXT(255), "
                + "AID_VENDOR TEXT(255), "
                + "AID_INV TEXT(255), "
                + "AID_ClearanceZone BIT"
                + "AID_HotDeals BIT"
                + "AID_OnlineSpecials BIT"
                + "AID_SaleCenter BIT"
                + "AID_InStock BIT"
                + "AID_LastUpdate TEXT(255), "
                + "AID_LeastCount INT, "
                + "AID_Priority BIT "
                + ")";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            oDm.RunActionQuery();
        }

        //public void AlterSchema()
        //{
        //    List<KeyValuePair<String, Type>> columns = new List<KeyValuePair<string,Type>>();

        //    String Query = "SELECT * FROM Final_Table_Test";
        //    OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
        //    var dt = oDm.GetTable();
        //    foreach (System.Data.DataColumn col in dt.Columns)
        //    {
        //        columns.Add(new KeyValuePair<string, Type>(col.ColumnName, col.DataType));

        //    }

        //    Query = "ALTER TABLE Final_Table_Test "
        //        + "ADD COLUMN ID AUTOINCREMENT PRIMARY KEY, "
        //        + "ADD COLUMN UPC TEXT(255), "
        //        + "ADD COLUMN VDR_PART TEXT(255), "
        //        + "ADD COLUMN VDR_IT_DSC TEXT(255), "
        //        + "ADD COLUMN Image_Folder TEXT(255), "
        //        + "ADD COLUMN AID_SOURCE_ID TEXT(255), "
        //        + "ADD COLUMN AID_PART TEXT(255), "
        //        + "ADD COLUMN AID_COST DECIMAL, "
        //        + "ADD COLUMN AID_IMG1 TEXT(255), "
        //        + "ADD COLUMN AID_IMG2 TEXT(255), "
        //        + "ADD COLUMN AID_VENDOR TEXT(255), "
        //        + "ADD COLUMN AID_INV TEXT(255), "
        //        + "ADD COLUMN AID_LastUpdate TEXT(255), "
        //        + "ADD COLUMN AID_LeastCount INT, "
        //        + "ADD COLUMN AID_Priority BIT "
        //        + ")";
        //    //oDm = new OleDbDataManager(ConnectionString, Query, true);
        //    //oDm.RunActionQuery();
        //}

        #region [ Get Data ]
        public List<FinalTable> GetData()
        {
            String Query = "SELECT * FROM Final_Table";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            return DataParser.ToList<FinalTable>(oDm.GetTable());
        }

        public List<FinalTable> GetDataByAdiPart(String AID_PART)
        {
            String Query = "SELECT * FROM Final_Table WHERE AID_PART = \"" + AID_PART + "\"";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            //oDm.AddVarcharPara("AID_PART", 4000, AID_PART);
            return DataParser.ToList<FinalTable>(oDm.GetTable());
        }

        #endregion

        #region [ Save ]
        public int SaveAdiPart(FinalTable finalTable)
        {
            return SaveAdiPart(finalTable.ID, finalTable.UPC, finalTable.VDR_PART, finalTable.VDR_IT_DSC
                , finalTable.Image_Folder, finalTable.ADI_SOURCE_ID, finalTable.ADI_PART, finalTable.ADI_COST == null ? 0 : (decimal) finalTable.ADI_COST
                , finalTable.ADI_IMG1, finalTable.ADI_IMG2, finalTable.ADI_VENDOR, finalTable.ADI_INV
                , finalTable.ADI_LastUpdate);
        }

        public int SaveAdiPart(Int64 ID, String UPC, String VDR_PART, String VDR_IT_DSC, String Image_Folder, String AID_SOURCE_ID, String AID_PART, decimal AID_COST, String AID_IMG1, String AID_IMG2, String AID_VENDOR, String AID_INV, String AID_LastUpdate)
        {
            var count = GetDataByAdiPart(AID_PART).Count();
            if (count == 1)
                return Update(ID, UPC, VDR_PART, VDR_IT_DSC, Image_Folder, AID_SOURCE_ID, AID_PART, AID_COST, AID_IMG1, AID_IMG2, AID_VENDOR, AID_INV, AID_LastUpdate);
            else
                return Insert(ID, UPC, VDR_PART, VDR_IT_DSC, Image_Folder, AID_SOURCE_ID, AID_PART, AID_COST, AID_IMG1, AID_IMG2, AID_VENDOR, AID_INV, AID_LastUpdate);
        }

        public int SaveAdiPart(Int64 ID, String UPC, String VDR_PART, String VDR_IT_DSC, String Image_Folder, String AID_SOURCE_ID,
            String AID_PART, decimal AID_COST, String AID_IMG1, String AID_IMG2, String AID_VENDOR, String AID_INV,
            Boolean AID_ClearanceZone, Boolean AID_HotDeals, Boolean AID_OnlineSpecials, Boolean AID_SaleCenter, Boolean AID_InStock, String AID_LastUpdate)
        {
            var count = GetDataByAdiPart(AID_PART).Count();
            if (count == 1)
                return Update(ID, UPC, VDR_PART, VDR_IT_DSC, Image_Folder, AID_SOURCE_ID, AID_PART, AID_COST, AID_IMG1, AID_IMG2, AID_VENDOR, AID_INV, AID_ClearanceZone, AID_HotDeals, AID_OnlineSpecials, AID_SaleCenter, AID_InStock, AID_LastUpdate);
            else
                return Insert(ID, UPC, VDR_PART, VDR_IT_DSC, Image_Folder, AID_SOURCE_ID, AID_PART, AID_COST, AID_IMG1, AID_IMG2, AID_VENDOR, AID_INV, AID_ClearanceZone, AID_HotDeals, AID_OnlineSpecials, AID_SaleCenter, AID_InStock, AID_LastUpdate);
        }
        #endregion

        #region [ Insert / Update ]

        public int Insert(Int64 ID, String UPC, String VDR_PART, String VDR_IT_DSC, String Image_Folder, String AID_SOURCE_ID, String AID_PART, decimal AID_COST, String AID_IMG1, String AID_IMG2, String AID_VENDOR, String AID_INV, String AID_LastUpdate)
        {
            //String Query = "INSERT INTO Final_Table (UPC, VDR_PART, VDR_IT_DSC, Image_Folder, AID_SOURCE_ID, AID_PART, AID_COST, AID_IMG1, AID_IMG2, AID_VENDOR, AID_INV, AID_LastUpdate, AID_LeastCount, AID_Priority)"
            //    + " VALUES (@UPC, @VDR_PART, @VDR_IT_DSC, @Image_Folder, @AID_SOURCE_ID, @AID_PART, @AID_COST, @AID_IMG1, @AID_IMG2, @AID_VENDOR, @AID_INV, @AID_LastUpdate, @AID_LeastCount, @AID_Priority)";

            String Query = "INSERT INTO Final_Table (UPC, VDR_PART, VDR_IT_DSC, Image_Folder, AID_SOURCE_ID, AID_PART, AID_COST, AID_IMG1, AID_IMG2, AID_VENDOR, AID_INV, AID_LastUpdate)"
                + " VALUES (@UPC, @VDR_PART, @VDR_IT_DSC, @Image_Folder, @AID_SOURCE_ID, @AID_PART, @AID_COST, @AID_IMG1, @AID_IMG2, @AID_VENDOR, @AID_INV, @AID_LastUpdate)";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            //oDm.AddIntegerBigPara("ID", ID);
            oDm.AddVarcharPara("UPC", 4000, UPC);
            oDm.AddVarcharPara("VDR_PART", 4000, VDR_PART);
            oDm.AddVarcharPara("VDR_IT_DSC", 4000, VDR_IT_DSC);
            oDm.AddVarcharPara("Image_Folder", 4000, Image_Folder);
            oDm.AddVarcharPara("AID_SOURCE_ID", 4000, AID_SOURCE_ID);
            oDm.AddVarcharPara("AID_PART", 4000, AID_PART);
            oDm.AddDecimalPara("AID_COST", 2, 10, AID_COST);
            oDm.AddVarcharPara("AID_IMG1", 4000, AID_IMG1);
            oDm.AddVarcharPara("AID_IMG2", 4000, AID_IMG2);
            oDm.AddVarcharPara("AID_VENDOR", 4000, AID_VENDOR);
            oDm.AddVarcharPara("AID_INV", 4000, AID_INV);
            oDm.AddVarcharPara("AID_LastUpdate", 4000, AID_LastUpdate);
            //oDm.AddIntegerPara("AID_LeastCount", AID_LeastCount);
            //oDm.AddBoolPara("AID_Priority", AID_Priority);
            return oDm.RunActionQuery();
        }

        public int Insert(Int64 ID, String UPC, String VDR_PART, String VDR_IT_DSC, String Image_Folder, String AID_SOURCE_ID,
            String AID_PART, decimal AID_COST, String AID_IMG1, String AID_IMG2, String AID_VENDOR, String AID_INV,
            Boolean AID_ClearanceZone, Boolean AID_HotDeals, Boolean AID_OnlineSpecials, Boolean AID_SaleCenter, Boolean AID_InStock, String AID_LastUpdate)
        {
            String Query = "INSERT INTO Final_Table (UPC, VDR_PART, VDR_IT_DSC, Image_Folder, AID_SOURCE_ID, AID_PART, AID_COST, AID_IMG1, AID_IMG2, AID_VENDOR, AID_INV, "
                + "AID_ClearanceZone, AID_HotDeals, AID_OnlineSpecials, AID_SaleCenter, AID_InStock, AID_LastUpdate)"
                + " VALUES (@UPC, @VDR_PART, @VDR_IT_DSC, @Image_Folder, @AID_SOURCE_ID, @AID_PART, @AID_COST, @AID_IMG1, @AID_IMG2, @AID_VENDOR, @AID_INV, "
                + "@AID_ClearanceZone, @AID_HotDeals, @AID_OnlineSpecials, @AID_SaleCenter, @AID_InStock, @AID_LastUpdate)";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            //oDm.AddIntegerBigPara("ID", ID);
            oDm.AddVarcharPara("UPC", 4000, UPC);
            oDm.AddVarcharPara("VDR_PART", 4000, VDR_PART);
            oDm.AddVarcharPara("VDR_IT_DSC", 4000, VDR_IT_DSC);
            oDm.AddVarcharPara("Image_Folder", 4000, Image_Folder);
            oDm.AddVarcharPara("AID_SOURCE_ID", 4000, AID_SOURCE_ID);
            oDm.AddVarcharPara("AID_PART", 4000, AID_PART);
            oDm.AddDecimalPara("AID_COST", 2, 10, AID_COST);
            oDm.AddVarcharPara("AID_IMG1", 4000, AID_IMG1);
            oDm.AddVarcharPara("AID_IMG2", 4000, AID_IMG2);
            oDm.AddVarcharPara("AID_VENDOR", 4000, AID_VENDOR);
            oDm.AddVarcharPara("AID_INV", 4000, AID_INV);
            oDm.AddBoolPara("AID_ClearanceZone", AID_ClearanceZone);
            oDm.AddBoolPara("AID_HotDeals", AID_HotDeals);
            oDm.AddBoolPara("AID_OnlineSpecials", AID_OnlineSpecials);
            oDm.AddBoolPara("AID_SaleCenter", AID_SaleCenter);
            oDm.AddBoolPara("AID_InStock", AID_InStock);
            oDm.AddVarcharPara("AID_LastUpdate", 4000, AID_LastUpdate);
            //oDm.AddIntegerPara("AID_LeastCount", AID_LeastCount);
            //oDm.AddBoolPara("AID_Priority", AID_Priority);
            return oDm.RunActionQuery();
        }

        public int Update(Int64 ID, String UPC, String VDR_PART, String VDR_IT_DSC, String Image_Folder, String AID_SOURCE_ID, String AID_PART, decimal AID_COST, String AID_IMG1, String AID_IMG2, String AID_VENDOR, String AID_INV, String AID_LastUpdate)
        {
            //String Query = "UPDATE Final_Table SET UPC = @UPC, VDR_PART = @VDR_PART, VDR_IT_DSC = @VDR_IT_DSC, Image_Folder = @Image_Folder, AID_SOURCE_ID = @AID_SOURCE_ID, AID_PART = @AID_PART, AID_COST = @AID_COST, AID_IMG1 = @AID_IMG1, AID_IMG2 = @AID_IMG2, AID_VENDOR = @AID_VENDOR, AID_INV = @AID_INV, AID_LastUpdate = @AID_LastUpdate, AID_LeastCount = @AID_LeastCount, AID_Priority = @AID_Priority"
            //    + " WHERE ID = @ID";

            String Query = "UPDATE Final_Table SET UPC = @UPC, VDR_PART = @VDR_PART, VDR_IT_DSC = @VDR_IT_DSC, Image_Folder = @Image_Folder, AID_SOURCE_ID = @AID_SOURCE_ID, AID_PART = @AID_PART, AID_COST = @AID_COST, AID_IMG1 = @AID_IMG1, AID_IMG2 = @AID_IMG2, AID_VENDOR = @AID_VENDOR, AID_INV = @AID_INV, AID_LastUpdate = @AID_LastUpdate"
                + " WHERE ID = " + ID.ToString();
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            //oDm.AddIntegerBigPara("ID", ID);
            oDm.AddVarcharPara("UPC", 4000, UPC);
            oDm.AddVarcharPara("VDR_PART", 4000, VDR_PART);
            oDm.AddVarcharPara("VDR_IT_DSC", 4000, VDR_IT_DSC);
            oDm.AddVarcharPara("Image_Folder", 4000, Image_Folder);
            oDm.AddVarcharPara("AID_SOURCE_ID", 4000, AID_SOURCE_ID);
            oDm.AddVarcharPara("AID_PART", 4000, AID_PART);
            oDm.AddDecimalPara("AID_COST", 2, 10, AID_COST);
            oDm.AddVarcharPara("AID_IMG1", 4000, AID_IMG1);
            oDm.AddVarcharPara("AID_IMG2", 4000, AID_IMG2);
            oDm.AddVarcharPara("AID_VENDOR", 4000, AID_VENDOR);
            oDm.AddVarcharPara("AID_INV", 4000, AID_INV);
            oDm.AddVarcharPara("AID_LastUpdate", 4000, AID_LastUpdate);
            ////oDm.AddIntegerPara("AID_LeastCount", AID_LeastCount);
            ////oDm.AddBoolPara("AID_Priority", AID_Priority);
            return oDm.RunActionQuery();
        }

        public int Update(Int64 ID, String UPC, String VDR_PART, String VDR_IT_DSC, String Image_Folder, String AID_SOURCE_ID, String AID_PART,
            decimal AID_COST, String AID_IMG1, String AID_IMG2, String AID_VENDOR, String AID_INV,
            Boolean AID_ClearanceZone, Boolean AID_HotDeals, Boolean AID_OnlineSpecials, Boolean AID_SaleCenter, Boolean AID_InStock, String AID_LastUpdate)
        {
            //String Query = "UPDATE Final_Table SET UPC = @UPC, VDR_PART = @VDR_PART, VDR_IT_DSC = @VDR_IT_DSC, Image_Folder = @Image_Folder, AID_SOURCE_ID = @AID_SOURCE_ID, AID_PART = @AID_PART, AID_COST = @AID_COST, AID_IMG1 = @AID_IMG1, AID_IMG2 = @AID_IMG2, AID_VENDOR = @AID_VENDOR, AID_INV = @AID_INV, AID_LastUpdate = @AID_LastUpdate, AID_LeastCount = @AID_LeastCount, AID_Priority = @AID_Priority"
            //    + " WHERE ID = @ID";

            String Query = "UPDATE Final_Table SET UPC = @UPC, VDR_PART = @VDR_PART, VDR_IT_DSC = @VDR_IT_DSC, Image_Folder = @Image_Folder"
                + ", AID_SOURCE_ID = @AID_SOURCE_ID, AID_PART = @AID_PART, AID_COST = @AID_COST, AID_IMG1 = @AID_IMG1, AID_IMG2 = @AID_IMG2"
                + ", AID_VENDOR = @AID_VENDOR, AID_INV = @AID_INV, AID_ClearanceZone = @AID_ClearanceZone, AID_HotDeals = @AID_HotDeals"
                + ", AID_OnlineSpecials= @AID_OnlineSpecials, AID_SaleCenter = @AID_SaleCenter, AID_InStock = @AID_InStock, AID_LastUpdate = @AID_LastUpdate"
                + " WHERE ID = " + ID.ToString();
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            //oDm.AddIntegerBigPara("ID", ID);
            oDm.AddVarcharPara("UPC", 4000, UPC);
            oDm.AddVarcharPara("VDR_PART", 4000, VDR_PART);
            oDm.AddVarcharPara("VDR_IT_DSC", 4000, VDR_IT_DSC);
            oDm.AddVarcharPara("Image_Folder", 4000, Image_Folder);
            oDm.AddVarcharPara("AID_SOURCE_ID", 4000, AID_SOURCE_ID);
            oDm.AddVarcharPara("AID_PART", 4000, AID_PART);
            oDm.AddDecimalPara("AID_COST", 2, 10, AID_COST);
            oDm.AddVarcharPara("AID_IMG1", 4000, AID_IMG1);
            oDm.AddVarcharPara("AID_IMG2", 4000, AID_IMG2);
            oDm.AddVarcharPara("AID_VENDOR", 4000, AID_VENDOR);
            oDm.AddVarcharPara("AID_INV", 4000, AID_INV);
            oDm.AddBoolPara("AID_ClearanceZone", AID_ClearanceZone);
            oDm.AddBoolPara("AID_HotDeals", AID_HotDeals);
            oDm.AddBoolPara("AID_OnlineSpecials", AID_OnlineSpecials);
            oDm.AddBoolPara("AID_SaleCenter", AID_SaleCenter);
            oDm.AddBoolPara("AID_InStock", AID_InStock);
            oDm.AddVarcharPara("AID_LastUpdate", 4000, AID_LastUpdate);
            ////oDm.AddIntegerPara("AID_LeastCount", AID_LeastCount);
            ////oDm.AddBoolPara("AID_Priority", AID_Priority);
            return oDm.RunActionQuery();
        }
        #endregion

        public int Delete(Int64 ID)
        {
            String Query = "DELETE FROM Final_Table SET WHERE ID = @ID";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            oDm.AddIntegerBigPara("ID", ID);
            //oDm.AddVarcharPara("UPC", 4000, UPC);
            //oDm.AddVarcharPara("VDR_PART", 4000, VDR_PART);
            //oDm.AddVarcharPara("VDR_IT_DSC", 4000, VDR_IT_DSC);
            //oDm.AddVarcharPara("Image_Folder", 4000, Image_Folder);
            //oDm.AddVarcharPara("AID_SOURCE_ID", 4000, AID_SOURCE_ID);
            //oDm.AddVarcharPara("AID_PART", 4000, AID_PART);
            //oDm.AddDecimalPara("AID_COST", 2, 10, AID_COST);
            //oDm.AddVarcharPara("AID_IMG1", 4000, AID_IMG1);
            //oDm.AddVarcharPara("AID_IMG2", 4000, AID_IMG2);
            //oDm.AddVarcharPara("AID_VENDOR", 4000, AID_VENDOR);
            //oDm.AddVarcharPara("AID_INV", 4000, AID_INV);
            //oDm.AddVarcharPara("AID_LastUpdate", 4000, AID_LastUpdate);
            return oDm.RunActionQuery();
        }

        public List<FinalTable> GetProductByPARTNO(String VDR_PART)
        {
            String Query = "SELECT * FROM Final_Table WHERE VDR_PART = @VDR_PART";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            oDm.AddVarcharPara("VDR_PART", 4000, VDR_PART);
            return DataParser.ToList<FinalTable>(oDm.GetTable());
        }

        public int UpdatePriceByPartNO(decimal? AID_COST, string VDR_PART)
        {
            String Query = "UPDATE Final_Table SET AID_COST = @AID_COST, AID_LastUpdate = @AID_LastUpdate WHERE VDR_PART = \"" + @VDR_PART + "\"";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            //oDm.AddVarcharPara("VDR_PART", 4000, VDR_PART);
            oDm.AddDecimalPara("AID_COST", 2, 10, AID_COST);
            oDm.AddVarcharPara("AID_LastUpdate", 4000, DateTime.Now.ToString());
            return oDm.RunActionQuery();
        }

        public int UpdateImageByPartNo(string Image_Folder, string AID_IMG1, string AID_IMG2, string VDR_PART)
        {
            String Query = "UPDATE Final_Table SET Image_Folder = @Image_Folder, AID_IMG1 = @AID_IMG1, AID_IMG2 = @AID_IMG2, AID_LastUpdate = @AID_LastUpdate"
                + " WHERE VDR_PART = \"" + @VDR_PART + "\"";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            //oDm.AddVarcharPara("VDR_PART", 4000, VDR_PART);
            oDm.AddVarcharPara("Image_Folder", 4000, Image_Folder);
            oDm.AddVarcharPara("AID_IMG1", 4000, AID_IMG1);
            oDm.AddVarcharPara("AID_IMG2", 4000, AID_IMG2);
            oDm.AddVarcharPara("AID_LastUpdate", 4000, DateTime.Now.ToString());
            return oDm.RunActionQuery();
        }

        public int ValidADIProduct(string VDR_PART)
        {
            String Query = "SELECT COUNT(1) FROM Final_Table WHERE VDR_PART = @VDR_PART";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            oDm.AddVarcharPara("VDR_PART", 4000, VDR_PART);
            return (int) oDm.GetTable().Rows[0][0];
        }

        public int UpdateInvBYPartNO(String AID_INV, String AID_LastUpdate, String VDR_PART)
        {
            String Query = "UPDATE Final_Table SET AID_INV = @AID_INV, AID_LastUpdate = @AID_LastUpdate"
                + " WHERE VDR_PART = \"" + @VDR_PART + "\"";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            //oDm.AddVarcharPara("VDR_PART", 4000, VDR_PART);
            oDm.AddVarcharPara("AID_INV", 4000, AID_INV);
            oDm.AddVarcharPara("AID_LastUpdate", 4000, AID_LastUpdate);
            return oDm.RunActionQuery();
        }

        public int UpdateFlagsByAdiProduct(String AID_PART, Boolean AID_ClearanceZone
            , Boolean AID_HotDeals, Boolean AID_OnlineSpecials, Boolean AID_SaleCenter, Boolean AID_InStock, String AID_LastUpdate)
        {
            String Query = "UPDATE Final_Table SET AID_ClearanceZone = @AID_ClearanceZone, "
                + "AID_HotDeals = @AID_HotDeals, AID_OnlineSpecials = @AID_OnlineSpecials, AID_SaleCenter = @AID_SaleCenter, "
                + "AID_InStock = @AID_InStock, AID_LastUpdate = @AID_LastUpdate"
                + " WHERE AID_PART = \"" + AID_PART + "\"";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            oDm.AddBoolPara("AID_ClearanceZone",  AID_ClearanceZone);
            oDm.AddBoolPara("AID_HotDeals", AID_HotDeals);
            oDm.AddBoolPara("AID_OnlineSpecials",  AID_OnlineSpecials);
            oDm.AddBoolPara("AID_SaleCenter",  AID_SaleCenter);
            oDm.AddBoolPara("AID_InStock",  AID_InStock);
            //oDm.AddVarcharPara("AID_PART", 4000, AID_PART);
            oDm.AddVarcharPara("AID_LastUpdate", 4000, AID_LastUpdate);
            return oDm.RunActionQuery();
        }

        public List<FinalTable> GetPriorityData(Boolean AID_Priority)
        {
            String Query = "SELECT * FROM Final_Table WHERE AID_Priority = \"" + AID_Priority + "\"";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            oDm.AddBoolPara("AID_Priority", AID_Priority);
            return DataParser.ToList<FinalTable>(oDm.GetTable());
        }

        public List<FinalTable> GetAllAdiProducts()
        {
            String Query = "SELECT * FROM Final_Table WHERE AID_PART IS NOT NULL";
            OleDbDataManager oDm = new OleDbDataManager(ConnectionString, Query, true);
            return DataParser.ToList<FinalTable>(oDm.GetTable());
        }
    }
}


text:
// File System.Threading.CancellationToken.cs
// Automatically generated contract file.
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Diagnostics.Contracts;
using System;

// Disable the "this variable is not used" warning as every field would imply it.
#pragma warning disable 0414
// Disable the "this variable is never assigned to".
#pragma warning disable 0067
// Disable the "this event is never assigned to".
#pragma warning disable 0649
// Disable the "this variable is never used".
#pragma warning disable 0169
// Disable the "new keyword not required" warning.
#pragma warning disable 0109
// Disable the "extern without DllImport" warning.
#pragma warning disable 0626
// Disable the "could hide other member" warning, can happen on certain properties.
#pragma warning disable 0108

namespace System.Threading
{
  public partial struct CancellationToken
  {
    #region Methods and constructors
    public static bool operator != (System.Threading.CancellationToken left, System.Threading.CancellationToken right)
    {
      return default(bool);
    }

    public static bool operator == (System.Threading.CancellationToken left, System.Threading.CancellationToken right)
    {
      return default(bool);
    }

    public CancellationToken(bool canceled)
    {
    }

    public override bool Equals(Object other)
    {
      return default(bool);
    }

    public bool Equals(System.Threading.CancellationToken other)
    {
      return default(bool);
    }

    public override int GetHashCode()
    {
      return default(int);
    }

    public CancellationTokenRegistration Register(Action<Object> callback, Object state, bool useSynchronizationContext)
    {
      return default(CancellationTokenRegistration);
    }

    public CancellationTokenRegistration Register(Action callback)
    {
      return default(CancellationTokenRegistration);
    }

    public CancellationTokenRegistration Register(Action<Object> callback, Object state)
    {
      return default(CancellationTokenRegistration);
    }

    public CancellationTokenRegistration Register(Action callback, bool useSynchronizationContext)
    {
      return default(CancellationTokenRegistration);
    }

    public void ThrowIfCancellationRequested()
    {
      Contract.Ensures(!this.IsCancellationRequested);
    }
    #endregion

    #region Properties and indexers
    public bool CanBeCanceled
    {
      get
      {
        return default(bool);
      }
    }

    public bool IsCancellationRequested
    {
      get
      {
        return default(bool);
      }
    }

    public static System.Threading.CancellationToken None
    {
      get
      {
        return default(System.Threading.CancellationToken);
      }
    }

    public WaitHandle WaitHandle
    {
      get
      {
        return default(WaitHandle);
      }
    }
    #endregion
  }
}


text:
local name = (...):gsub("%.init$", "")

require (name..'.flags')
require (name..'.io')
require (name..'.logging')
require (name..'.math')
require (name..'.misc')
require (name..'.string')
require (name..'.table')

if lfs then
	require (name..'.lfs')
end


text:
from itertools import chain
from dimagi.utils.couch.database import safe_delete
from dimagi.utils.parsing import json_format_datetime

from corehq.util.test_utils import unit_testing_only

def get_latest_case_export_schema(domain, case_type):
    from .models import CaseExportDataSchema

    key = [domain, 'CaseExportDataSchema', case_type]
    return _get_latest_export_schema(CaseExportDataSchema, key)

def get_latest_form_export_schema(domain, app_id, xmlns):
    from .models import FormExportDataSchema

    key = [domain, 'FormExportDataSchema', app_id, xmlns]
    return _get_latest_export_schema(FormExportDataSchema, key)

def _get_latest_export_schema(cls, key):
    result = cls.get_db().view(
        'schemas_by_xmlns_or_case_type/view',
        startkey=key + [{}],
        endkey=key,
        include_docs=True,
        limit=1,
        reduce=False,
        descending=True,
    ).first()
    return cls.wrap(result['doc']) if result else None

def get_case_inferred_schema(domain, case_type):
    from .models import CaseInferredSchema

    key = [domain, 'CaseInferredSchema', case_type]
    result = CaseInferredSchema.get_db().view(
        'schemas_by_xmlns_or_case_type/view',
        startkey=key + [{}],
        endkey=key,
        include_docs=True,
        limit=1,
        reduce=False,
        descending=True,
    ).first()
    return CaseInferredSchema.wrap(result['doc']) if result else None

def get_form_inferred_schema(domain, app_id, xmlns):
    from .models import FormInferredSchema

    key = [domain, 'FormInferredSchema', app_id, xmlns]
    result = FormInferredSchema.get_db().view(
        'schemas_by_xmlns_or_case_type/view',
        startkey=key + [{}],
        endkey=key,
        include_docs=True,
        limit=1,
        reduce=False,
        descending=True,
    ).first()
    return FormInferredSchema.wrap(result['doc']) if result else None

def get_case_exports_by_domain(domain):
    from .models import CaseExportInstance
    key = [domain, 'CaseExportInstance']
    return _get_export_instance(CaseExportInstance, key)

def get_form_exports_by_domain(domain):
    from .models import FormExportInstance
    key = [domain, 'FormExportInstance']
    return _get_export_instance(FormExportInstance, key)

def get_brief_exports(domain, form_or_case=None):
    from .models import ExportInstance
    if form_or_case == 'form':
        key = [domain, 'FormExportInstance']
    elif form_or_case == 'case':
        key = [domain, 'CaseExportInstance']
    else:
        key = [domain]
    return _get_export_instance(ExportInstance, key, include_docs=False)

def get_brief_deid_exports(domain, form_or_case=None):
    from .models import ExportInstance
    doc_types = [doc_type for doc_type in [
        'FormExportInstance' if form_or_case in ['form', None] else None,
        'CaseExportInstance' if form_or_case in ['case', None] else None,
    ] if doc_type is not None]
    results = ExportInstance.get_db().view(
        'export_instances_by_domain/view',
        keys=[[domain, doc_type, True] for doc_type in doc_types],
        include_docs=False,
        reduce=False,
    ).all()
    return [result['value'] for result in results]

def get_export_count_by_domain(domain):
    from .models import ExportInstance

    export_result = ExportInstance.get_db().view(
        'export_instances_by_domain/view',
        startkey=[domain],
        endkey=[domain, {}],
        include_docs=False,
        reduce=True,
    ).one()
    return 0 if export_result is None else export_result['value']

def get_deid_export_count(domain):
    from .models import ExportInstance
    return sum(res['value'] for res in ExportInstance.get_db().view(
        'export_instances_by_domain/view',
        keys=[[domain, 'FormExportInstance', True],
              [domain, 'CaseExportInstance', True]],
        include_docs=False,
        group=True,
    ).all())

def _get_export_instance(cls, key, include_docs=True):
    results = cls.get_db().view(
        'export_instances_by_domain/view',
        startkey=key,
        endkey=key + [{}],
        include_docs=include_docs,
        reduce=False,
    ).all()
    if include_docs:
        return [cls.wrap(result['doc']) for result in results]
    return [result['value'] for result in results]

def get_daily_saved_export_ids_for_auto_rebuild(accessed_after):
    """
    get all saved exports accessed after the timestamp
    :param accessed_after: datetime to get reports that have been accessed after this timestamp
    """
    from .models import ExportInstance
    # get exports that have not been accessed yet
    new_exports = ExportInstance.get_db().view(
        "export_instances_by_is_daily_saved/view",
        include_docs=False,
        key=[None],
        reduce=False,
    ).all()
    export_ids = [export['id'] for export in new_exports]

    # get exports that have last_accessed set after the cutoff requested
    accessed_reports = ExportInstance.get_db().view(
        "export_instances_by_is_daily_saved/view",
        include_docs=False,
        startkey=[json_format_datetime(accessed_after)],
        reduce=False,
    ).all()
    export_ids.extend([result['id'] for result in accessed_reports])
    return export_ids

def get_properly_wrapped_export_instance(doc_id):
    from .models import ExportInstance
    doc = ExportInstance.get_db().get(doc_id)
    return _properly_wrap_export_instance(doc)

def _properly_wrap_export_instance(doc):
    from .models import FormExportInstance
    from .models import CaseExportInstance
    from .models import ExportInstance
    class_ = {
        "FormExportInstance": FormExportInstance,
        "CaseExportInstance": CaseExportInstance,
    }.get(doc['doc_type'], ExportInstance)
    return class_.wrap(doc)

@unit_testing_only
def delete_all_export_data_schemas():
    from .models import ExportDataSchema

    db = ExportDataSchema.get_db()
    for row in db.view('schemas_by_xmlns_or_case_type/view', reduce=False):
        doc_id = row['id']
        safe_delete(db, doc_id)

@unit_testing_only
def delete_all_export_instances():
    from .models import ExportInstance

    db = ExportInstance.get_db()
    for row in db.view('export_instances_by_domain/view', reduce=False):
        doc_id = row['id']
        safe_delete(db, doc_id)

class ODataExportFetcher:
    def get_export_count(self, domain):
        return len(self._get_odata_exports(domain))

    def get_exports(self, domain):
        from .models import CaseExportInstance, FormExportInstance
        export_docs = self._get_odata_exports(domain)
        case_export_ids = [export['_id'] for export in export_docs
            if export['doc_type'] == CaseExportInstance.__name__]
        form_export_ids = [export['_id'] for export in export_docs
            if export['doc_type'] == FormExportInstance.__name__]

        case_exports = CaseExportInstance.view('_all_docs', keys=case_export_ids, include_docs=True)
        form_exports = FormExportInstance.view('_all_docs', keys=form_export_ids, include_docs=True)
        return list(chain(case_exports, form_exports))

    def _get_odata_exports(self, domain):
        all_domain_exports = get_brief_exports(domain)
        return [export for export in all_domain_exports if export['is_odata_config']]


text:
define(["marionette"], function(Marionette){
	var longMonth  = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
      shortDay   = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
		  longDay    = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
		  shortMonth = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
		  suffix     = ["st", "nd", "rd", "th"],
		  prefix     = "/images/camera/photo/";
	return Marionette.ItemView.extend({
		templateHelpers : {
			getLongMonth : function(num){
				return longMonth[num];
			},
			getShortMonth : function(num){
				return shortMonth[num];
			},
			getLongDay : function(num){
				return longDay[num];
			},
			getShortDay : function(num){
				return shortDay[num];
			},
			zeroPad : function(num){
				return num >= 10 ? num : '0' + num;
			},
			getDateSuffix : function(num){
				var value = Math.min(num % 10, 3);
				return suffix[value];
			},
			getMeridianHour : function(num){
				return (num % 12 == 0) ? 12 : num % 12;
			},
			getMeridianIcon : function(num){
				return (num >= 12) ? 'PM' : 'AM';
			},
			getImageUrl : function(name){
				return prefix + name;
			}
		},
	});
});


text:
<?php

namespace App\Exceptions;

use Exception;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;

class Handler extends ExceptionHandler
{
    /**
     * A list of the exception types that should not be reported.
     *
     * @var array
     */
    protected $dontReport = [
        AuthorizationException::class,
        HttpException::class,
        ModelNotFoundException::class,
        ValidationException::class,
    ];

    /**
     * Report or log an exception.
     *
     * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
     *
     * @param \Exception $e
     */
    public function report(Exception $e)
    {
        parent::report($e);
    }

    /**
     * Render an exception into an HTTP response.
     *
     * @param \Illuminate\Http\Request $request
     * @param \Exception               $e
     *
     * @return \Illuminate\Http\Response
     */
    public function render($request, Exception $e)
    {
        // 404 page when a model is not found
        if ($e instanceof ModelNotFoundException) {
            return response()->view('errors.404', [], 404);
        }
        if ($e instanceof FileNotFoundException) {
            return response()->view('errors.404', [], 404);
        }

        // Custom error 500 view on production
        if (app()->environment() == 'production') {
            return response()->view('errors.500', [], 500);
        }

        return parent::render($request, $e);
    }
}


text:
<?php

namespace Modules\FindResources;

use Hubzero\Module\Module;
use Components\Tags\Models\Tag;
use Component;

/**
 * Module class for displaying ways to find resources
 */
class Helper extends Module
{
	/**
	 * Generate module contents
	 *
	 * @return  void
	 */
	public function run()
	{
		require_once Component::path('com_tags') . '/models/cloud.php';
		require_once Component::path('com_resources') . '/models/type.php';

		$this->tags = Tag::all()
			->whereEquals('admin', 0)
			->limit((int)$this->params->get('limit', 25))
			->order('objects', 'desc')
			->rows();

		// Get major types
		$this->categories = \Components\Resources\Models\Type::getMajorTypes();

		require $this->getLayoutPath();
	}

	/**
	 * Display module contents
	 *
	 * @return  void
	 */
	public function display()
	{
		if ($content = $this->getCacheContent())
		{
			echo $content;
			return;
		}

		$this->run();
	}
}


text:
Kanboard
========

Kanboard is project management software that focuses on the Kanban methodology.

**This software is in maintenance mode**.
It doesn't mean it's abandoned, but there is no significant feature development.
Pull-requests are still accepted as long as the [guidelines](.github/pull_request_template.md) are followed.

- Official website: <https://kanboard.org/>
- [List of features](https://kanboard.org/#features)
- [Change Log](https://github.com/kanboard/kanboard/blob/main/ChangeLog)
- [Forum](https://kanboard.discourse.group/)
- Official documentation: <https://docs.kanboard.org/>
    - [Requirements](https://docs.kanboard.org/en/latest/admin_guide/requirements.html)
    - [Installation instructions](https://docs.kanboard.org/en/latest/admin_guide/installation.html)
    - [Upgrade to a new version](https://docs.kanboard.org/en/latest/admin_guide/upgrade.html)
    - [Use Kanboard with Docker](https://docs.kanboard.org/en/latest/admin_guide/docker.html)

Credits
-------

- Main developer: Frédéric Guillot
- [Contributors](https://github.com/kanboard/kanboard/graphs/contributors)
- Distributed under [MIT License](https://github.com/kanboard/kanboard/blob/main/LICENSE)


text:
// Unknown Author and License

namespace TeraPacketParser.TeraCommon.Sniffing.Crypt
{
    internal class CryptorKey
    {
        public uint[] Buffer;
        public int Key;
        public int MaxPos;
        public int Pos1;
        public int Pos2;
        public int Size;
        public uint Sum;

        public CryptorKey(int size, int maxPos)
        {
            Size = size;
            Pos2 = MaxPos = maxPos;

            Buffer = new uint[Size*4];
        }
    }
}


text:
namespace Scada.Web
{
    /// <summary>
    /// Data transfer object for WCF services
    /// <para>Объект для передачи данных WCF-сервисами</para>
    /// </summary>
    public class DataTransferObject
    {
        /// <summary>
        /// Конструктор
        /// </summary>
        public DataTransferObject()
            : this(true, "")
        {
        }

        /// <summary>
        /// Конструктор
        /// </summary>
        public DataTransferObject(object data)
            : this(true, "")
        {
            Data = data;
        }

        /// <summary>
        /// Конструктор
        /// </summary>
        public DataTransferObject(bool success, string errorMessage)
        {
            Success = success;
            ErrorMessage = errorMessage;
            Data = null;
        }

        /// <summary>
        /// Получить или установить признак, что объект получен успешно
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// Получить или установить сообщение об ошибке
        /// </summary>
        public string ErrorMessage { get; set; }

        /// <summary>
        /// Получить или установить данные, запрашиваемые клиентом
        /// </summary>
        public object Data { get; set; }
    }
}


text:
using System.Collections.Generic;
using System.Linq;
using Mono.Cecil;

public partial class ModuleWeaver
{
    public List<string> NamespaceFilters { get; private set; }

    public void ProcessFilterTypeAttributes()
    {
        ReadFilterTypeData(ModuleDefinition);
    }

    public void ReadFilterTypeData(ModuleDefinition moduleDefinition)
    {
        var filterTypeAttribute = moduleDefinition.Assembly.CustomAttributes.GetAttributes("PropertyChanged.FilterTypeAttribute");
        if (filterTypeAttribute == null)
        {
            return;
        }
        var customAttributeArguments = filterTypeAttribute.Select(x => x.ConstructorArguments).ToList();
        NamespaceFilters = customAttributeArguments.Select(x => (string)x[0].Value).ToList();
    }
}


text:
id: 167
title: Smartdata IT Solutions and Services PSD Template
date: 2020-09-11T15:17:41+00:00
author: admin
layout: post
guid: https://www.psdly.com/?p=27681
permalink: /2020/09/11/smartdata-it-solutions-and-services-psd-template/
tdc_dirty_content:
  - "1"
tdc_icon_fonts:
  - 'a:0:{}'
cyberseo_rss_source:
  - https://themoviesflix.co/feed/?paged=14
  - https://www.psdly.com/wp-theme/feed?paged=3
cyberseo_post_link:
  - https://themoviesflix.co/download-exodus-gods-and-kings-2014-hindi-480p-720p-1080p/
  - https://www.psdly.com/smartdata-it-solutions-and-services-psd-template
categories:
  - Uncategorized
---
Download Free Smartdata IT Solutions and Services PSD Template with high speed google drive and mega link. These awesome **ThemeForest Smartdata IT Solutions and Services PSD Template** made by **7oroof** and the last update Released On **11 September 20**.

## **Smartdata – IT Solutions and Services PSD Template** – Wp PSD Theme Free Download

Smartdata is a stunning, professional and flexible **IT Solutions, IT Business, and Services Company WordPress theme**. Smartdata based on in-depth research into IT Solutions, IT Services, IT Business, Consulting, SaaS & Software, Digital Solution, Technical Engineering, Technology, and Services Company, to deliver all needed layouts and blocks.<figure class="wp-block-image size-large">

![687474703a2f2f376f726f6f662e636f6d2f7468656d65666f726573742f736d617274646174612f736d61727464617461777030312e706e67](https://camo.envatousercontent.com/550d9b5361d194dbccaa38b59063ddf9abacb59f/687474703a2f2f376f726f6f662e636f6d2f7468656d65666f726573742f736d617274646174612f736d61727464617461777030312e706e67 "Smartdata IT Solutions and Services PSD Template 2") </figure>

## Smartdata – IT Solutions & Services WordPress Theme {#item-description__smartdata-it-solutions-amp-services-wordpress-theme}

**Smartdata** comes with most advanced live website builder on WordPress. Featuring the latest web technologies, enjoyable UX and the most beautiful design trends. Our theme provides a platform to simply drag&drop elements, choose styles and play around with the look and feel of your site with an instant preview, before your changes go live.

Build beautiful, intelligent websites with over 3+ Homepage Concepts ready to go or combine, build a layout has never been easier. There is a huge range of styled pages waiting for your customization, anything you can think of can be built with our theme. If you are searching for innovative, modern and clean IT Solutions, IT Services, Digital Solution and Services Company WordPress Theme, you must choose Smartdata.

## **Download Free Smartdata IT Solutions and Services PSD Template**

Smartdata is perfect for IT Solutions, IT Services, IT Business, Consulting, SaaS & Software, Digital Solution, Technical Engineering, Technology, and Services Company. Choose from Elementor Page Builder or our awesome Page Builder to craft your website with, both are included.

Smartdata has been optimized to give visitors the best experience in terms of UX/UI. We have designed specific corporate demos & pages ready for you to use and launch your new website easily with necessary features for IT Solutions, IT Services, Digital Solution and Services Company websites such as about pages, testimonials, clients, questions & answers, case studies and single case study layouts, solutions, services, industries, team members, careers, quote, pricing, and awesome blog pages. We also add unlimited colors, +5 header layouts, 5 Page Titles, and more than 90 Blocks and Options. This Theme can easily satisfy all of your needs.

## Smartdata Excellently works with these plugins {#item-description__smartdata-excellently-works-with-these-plugins}

We have built Smartdata to be as compatible as possible so that you can use it for any of your needs. IT Solutions, IT Services, IT Business, Consulting, SaaS & Software, Digital Solution, Technical Engineering, Technology, and Services Company. We want to make your life as easy as possible, so we included a bunch of premium features & plugins for FREE with each purchase.

  * Revolution slider (save $25)
  * Elementor Page Builder (Free!)
  * WPML (compatible with)

## Smartdata Theme Key Features {#item-description__smartdata-theme-key-features}

  * Tons of Layouts, Elements & UI Blocks
  * Infinite page layout possibilities
  * +3 Homepage layouts
  * +90 UI Blocks & Options
  * +59 Header layouts
  * Solutions Page templates
  * Industries Page templates
  * About Page templates
  * Team Page templates
  * Awesome Blog Layouts
  * Case Study Layouts
  * Unlimited Color Options
  * Clean & Modern Design
  * Beautiful design with an emphasis on readability
  * Unlimited Layouts
  * Cool CSS3 animations
  * Responsive and Retina ready
  * SEO optimised design
  * Masonry layouts
  * Carousel elements
  * Customizable Header Layout
  * Multiple header options
  * Multiple footer options
  * Social Sharing ready
  * Social Icon Ready areas
  * Section video background
  * Cross-Browser Compatibility: FireFox, Safari, Chrome, IE10+
  * Theme Options with Real-time WP Customizer
  * Powerful theme options panel
  * Hundreds of theme options available
  * One-click demo content import
  * Elementor Page Builder (Free!)
  * Revolution Slider included (save $25)
  * WPML localization support
  * Contact Form 7 plugin
  * Google Maps
  * Parallax and Video Background
  * 700+ Google Fonts
  * FontAwesome icons
  * Build with HTML5 & CSS3
  * Demo content included!
  * High Speed Performance
  * Enhanced User Experience
  * Powerful Elements
  * Rich Typography
  * Customizable Design & Code
  * Detailed Documentation Included
  * Five Star Support Team
  * More features coming soon

##### **Checkout Our More Theme**

## **Download Now Smartdata IT Solutions and Services PSD Template** {.has-text-align-center}

Thank you for Downloading **Smartdata IT Solutions and Services PSD Template**. If you face any kind of problem during download then kindly leave a comment. we will fix it as soon as possible.


text:
public class Person {
    private int age;

	public Person(int initialAge) {
        if(initialAge < 0){
            age = 0;
            System.out.println("Age is not valid, setting age to 0.");
        }
        else{
            age = initialAge;
        }
	}

	public void amIOld() {
        if(age < 13){
            System.out.println("You are young.");
        }
        else if(age >= 13 && age < 18){
            System.out.println("You are a teenager.");
        }
        else{
            System.out.println("You are old.");
        }
	}

	public void yearPasses() {
        age++;
	}


text:
import cookielib
import suds
from tools import cli, service_instance

# pyvmomi-to-suds.py
#
# Demonstrates how to move a session between the pyVmomi client and the
# generated SOAP suds client. We leverage the suds library's use of cookielib
# to manipulate its cookies to match the pyVmomi cookies. That causes vCenter
# to identify both clients as the same user.

parser = cli.Parser()
args = parser.get_args()

url = "https://%s/sdk/vimService.wsdl" % args.host

client = suds.client.Client(url, location=url)

def get_current_session(client):
    si = suds.sudsobject.Property("ServiceInstance")
    si._type = "ServiceInstance"
    sc = client.service.RetrieveServiceContent(si)
    property_filter_spec = client.factory.create('ns0:PropertyFilterSpec')
    property_spec = client.factory.create('ns0:PropertySpec')
    property_spec.pathSet = ['currentSession']
    property_spec.type = "SessionManager"
    property_filter_spec.propSet = [property_spec]
    object_spec = client.factory.create('ns0:ObjectSpec')
    object_spec.obj = sc.sessionManager
    object_spec.skip = False
    property_filter_spec.objectSet = [object_spec]
    options = client.factory.create('ns0:RetrieveOptions')
    options.maxObjects = 1
    results = client.service.RetrievePropertiesEx(sc.propertyCollector,
                                                  specSet=[
                                                      property_filter_spec],
                                                  options=options)

    def get_property(self, name):
        for obj in self.objects:
            if not hasattr(obj, 'propSet'):
                return None
            for prop in obj.propSet:
                if prop.name == name:
                    return prop.val

    results.__class__.get_property = get_property
    return results.get_property('currentSession')

print("pyVmomi login... ")

si = service_instance.connect(args)

print("current session id: %s" % si.content.sessionManager.currentSession.key)
pyvmomi_cookie = si._stub.cookie
print("current cookie contents: %s" % pyvmomi_cookie)

VMWARE_COOKIE_NAME = 'vmware_soap_session'

def inject_vmware_cookie_suds(client, cookie_value, domain):
    cookie = cookielib.Cookie(0,
                              VMWARE_COOKIE_NAME,
                              cookie_value,
                              None,
                              None,
                              domain,
                              None,
                              None,
                              "/",
                              None,
                              None,
                              None,
                              None,
                              None,
                              None,
                              None,
                              None,)
    client.options.transport.cookiejar.set_cookie(cookie)

client.__class__.set_vmware_cookie = inject_vmware_cookie_suds

print("=" * 80)
print("pyvmomi to suds")

si._stub.cookie = pyvmomi_cookie

# extracting the cookie value:
start_of_value = pyvmomi_cookie.index("=") + 1
end_of_value = pyvmomi_cookie.index(";")

cookie_value = pyvmomi_cookie[start_of_value:end_of_value]

session_id = si.content.sessionManager.currentSession.key
print("current pyVmomi session id: %s" % session_id)

# injecting the cookie value:
client.set_vmware_cookie(cookie_value, args.host)
soap_session_id = get_current_session(client).key
print("current suds session id:    %s" % soap_session_id)

assert session_id == soap_session_id


text:
package org.waveprotocol.wave.client.wavepanel.view;

/**
 * Represents an reply indicator associated with a Root Thread.
 */
public interface ReplyBoxView extends ThreadReplyIndicatorView, IntrinsicReplyBoxView {
  RootThreadView getParent();
}


text:
#!/usr/bin/env node
/*******************************************************************************
 * vim: tabstop=4:shiftwidth=4:expandtab:
 ******************************************************************************/
'use strict';

const _ = require('lodash');

const backupSources = () => {
    const cpToMoved = require('../utils/cp-to-moved.js');
    return cpToMoved('/etc/apt/sources.list');
};

const buildChoices = require('../utils/simple-choice-list.js');
const questionPPA = {
    'choices': buildChoices(
        require('../configs/aptget.ppa.js')
    ),
    'message': 'Select which PPA repo to add',
    'name': 'installPPA',
    'type': 'checkbox',
};

const handlePPA = (list) => {
    const aptPPA = require('../utils/apt-ppa.js');
    const aptUpdate = require('../utils/apt-update.js');

    return backupSources()
        .then(_.partial(aptPPA, list))
        .then(aptUpdate)
    ;

    //return u.flowPromise([
        //backupSources(),
        //aptPPA(list),
    //]);
};

_.assign(module.exports, {
    'questions': [ questionPPA ],
    'handlers': {
        'installPPA': handlePPA,
    },
});


text:
var wowhead = require('./lib/search');

module.exports = function() {
  return wowhead();
};


text:
package org.wildfly.security.auth.client;

import static org.wildfly.common.math.HashMath.multiHashUnordered;

import java.net.URI;

import org.wildfly.common.net.URIs;

/**
 * @author David M. Lloyd
 */
class MatchNoUserRule extends MatchRule {

    MatchNoUserRule(final MatchRule parent) {
        super(parent.without(MatchUserRule.class));
    }

    @Override
    public boolean matches(final URI uri, final String abstractType, final String abstractTypeAuthority) {
        String userInfo = URIs.getUserFromURI(uri);
        return userInfo == null && super.matches(uri, abstractType, abstractTypeAuthority);
    }

    @Override
    MatchRule reparent(final MatchRule newParent) {
        return new MatchNoUserRule(newParent);
    }

    @Override
    boolean halfEqual(final MatchRule other) {
        return other.getMatchUser() == null && parentHalfEqual(other);
    }

    @Override
    public int hashCode() {
        return multiHashUnordered(parentHashCode(), 3121, 0);
    }

    @Override
    StringBuilder asString(final StringBuilder b) {
        return parentAsString(b).append("no user,");
    }
}


text:
from django import forms

class GatewayForm(forms.Form):
    Ds_Signature = forms.CharField(max_length=256)
    Ds_MerchantParameters = forms.CharField(max_length=2048)
    Ds_SignatureVersion = forms.CharField(max_length=256)


text:
require 'rails_helper'

shared_examples_for :publishable do
  let(:model) { described_class }
  let(:klass) { model.to_s.underscore.to_sym }
  let(:instance) { build(klass) }

  describe 'scopes' do
    before(:each) do
      @a = create(klass, published_at: 3.days.from_now)
      @b = create(klass, published_at: 1.day.ago)
      @c = create(klass, published_at: 3.days.ago)
    end

    it(:published) { expect(model.published).to eq [@b, @c] }
    it(:not_published) { expect(model.not_published).to eq [@a] }
  end

  describe 'defaults' do
    it(:published_at) { expect(instance).not_to be_published }
  end

  it '#publish!' do
    instance.publish!
    expect(instance).to be_published
  end

  it '#unpublish!' do
    instance.published_at = Time.zone.now
    instance.unpublish!
    expect(instance).to be_unpublished
  end

  it '.respond_to?' do
    expect(model).to respond_to(:published, :not_published)
  end

  it '#respond_to?' do
    expect(model.new).to respond_to(:publish!, :unpublish!, :published?)
  end
end


text:
package com.google.cloud.speech.v1p1beta1.stub;

import static com.google.cloud.speech.v1p1beta1.AdaptationClient.ListCustomClassesPagedResponse;
import static com.google.cloud.speech.v1p1beta1.AdaptationClient.ListPhraseSetPagedResponse;

import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.speech.v1p1beta1.CreateCustomClassRequest;
import com.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest;
import com.google.cloud.speech.v1p1beta1.CustomClass;
import com.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest;
import com.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest;
import com.google.cloud.speech.v1p1beta1.GetCustomClassRequest;
import com.google.cloud.speech.v1p1beta1.GetPhraseSetRequest;
import com.google.cloud.speech.v1p1beta1.ListCustomClassesRequest;
import com.google.cloud.speech.v1p1beta1.ListCustomClassesResponse;
import com.google.cloud.speech.v1p1beta1.ListPhraseSetRequest;
import com.google.cloud.speech.v1p1beta1.ListPhraseSetResponse;
import com.google.cloud.speech.v1p1beta1.PhraseSet;
import com.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest;
import com.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest;
import com.google.common.collect.ImmutableMap;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * gRPC stub implementation for the Adaptation service API.
 *
 * <p>This class is for advanced usage and reflects the underlying API directly.
 */
@BetaApi
@Generated("by gapic-generator-java")
public class GrpcAdaptationStub extends AdaptationStub {
  private static final MethodDescriptor<CreatePhraseSetRequest, PhraseSet>
      createPhraseSetMethodDescriptor =
          MethodDescriptor.<CreatePhraseSetRequest, PhraseSet>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.speech.v1p1beta1.Adaptation/CreatePhraseSet")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(CreatePhraseSetRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(PhraseSet.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<GetPhraseSetRequest, PhraseSet>
      getPhraseSetMethodDescriptor =
          MethodDescriptor.<GetPhraseSetRequest, PhraseSet>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.speech.v1p1beta1.Adaptation/GetPhraseSet")
              .setRequestMarshaller(ProtoUtils.marshaller(GetPhraseSetRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(PhraseSet.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<ListPhraseSetRequest, ListPhraseSetResponse>
      listPhraseSetMethodDescriptor =
          MethodDescriptor.<ListPhraseSetRequest, ListPhraseSetResponse>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.speech.v1p1beta1.Adaptation/ListPhraseSet")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(ListPhraseSetRequest.getDefaultInstance()))
              .setResponseMarshaller(
                  ProtoUtils.marshaller(ListPhraseSetResponse.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<UpdatePhraseSetRequest, PhraseSet>
      updatePhraseSetMethodDescriptor =
          MethodDescriptor.<UpdatePhraseSetRequest, PhraseSet>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.speech.v1p1beta1.Adaptation/UpdatePhraseSet")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(UpdatePhraseSetRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(PhraseSet.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<DeletePhraseSetRequest, Empty>
      deletePhraseSetMethodDescriptor =
          MethodDescriptor.<DeletePhraseSetRequest, Empty>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.speech.v1p1beta1.Adaptation/DeletePhraseSet")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(DeletePhraseSetRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<CreateCustomClassRequest, CustomClass>
      createCustomClassMethodDescriptor =
          MethodDescriptor.<CreateCustomClassRequest, CustomClass>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.speech.v1p1beta1.Adaptation/CreateCustomClass")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(CreateCustomClassRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(CustomClass.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<GetCustomClassRequest, CustomClass>
      getCustomClassMethodDescriptor =
          MethodDescriptor.<GetCustomClassRequest, CustomClass>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.speech.v1p1beta1.Adaptation/GetCustomClass")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(GetCustomClassRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(CustomClass.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<ListCustomClassesRequest, ListCustomClassesResponse>
      listCustomClassesMethodDescriptor =
          MethodDescriptor.<ListCustomClassesRequest, ListCustomClassesResponse>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.speech.v1p1beta1.Adaptation/ListCustomClasses")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(ListCustomClassesRequest.getDefaultInstance()))
              .setResponseMarshaller(
                  ProtoUtils.marshaller(ListCustomClassesResponse.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<UpdateCustomClassRequest, CustomClass>
      updateCustomClassMethodDescriptor =
          MethodDescriptor.<UpdateCustomClassRequest, CustomClass>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.speech.v1p1beta1.Adaptation/UpdateCustomClass")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(UpdateCustomClassRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(CustomClass.getDefaultInstance()))
              .build();

  private static final MethodDescriptor<DeleteCustomClassRequest, Empty>
      deleteCustomClassMethodDescriptor =
          MethodDescriptor.<DeleteCustomClassRequest, Empty>newBuilder()
              .setType(MethodDescriptor.MethodType.UNARY)
              .setFullMethodName("google.cloud.speech.v1p1beta1.Adaptation/DeleteCustomClass")
              .setRequestMarshaller(
                  ProtoUtils.marshaller(DeleteCustomClassRequest.getDefaultInstance()))
              .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
              .build();

  private final UnaryCallable<CreatePhraseSetRequest, PhraseSet> createPhraseSetCallable;
  private final UnaryCallable<GetPhraseSetRequest, PhraseSet> getPhraseSetCallable;
  private final UnaryCallable<ListPhraseSetRequest, ListPhraseSetResponse> listPhraseSetCallable;
  private final UnaryCallable<ListPhraseSetRequest, ListPhraseSetPagedResponse>
      listPhraseSetPagedCallable;
  private final UnaryCallable<UpdatePhraseSetRequest, PhraseSet> updatePhraseSetCallable;
  private final UnaryCallable<DeletePhraseSetRequest, Empty> deletePhraseSetCallable;
  private final UnaryCallable<CreateCustomClassRequest, CustomClass> createCustomClassCallable;
  private final UnaryCallable<GetCustomClassRequest, CustomClass> getCustomClassCallable;
  private final UnaryCallable<ListCustomClassesRequest, ListCustomClassesResponse>
      listCustomClassesCallable;
  private final UnaryCallable<ListCustomClassesRequest, ListCustomClassesPagedResponse>
      listCustomClassesPagedCallable;
  private final UnaryCallable<UpdateCustomClassRequest, CustomClass> updateCustomClassCallable;
  private final UnaryCallable<DeleteCustomClassRequest, Empty> deleteCustomClassCallable;

  private final BackgroundResource backgroundResources;
  private final GrpcOperationsStub operationsStub;
  private final GrpcStubCallableFactory callableFactory;

  public static final GrpcAdaptationStub create(AdaptationStubSettings settings)
      throws IOException {
    return new GrpcAdaptationStub(settings, ClientContext.create(settings));
  }

  public static final GrpcAdaptationStub create(ClientContext clientContext) throws IOException {
    return new GrpcAdaptationStub(AdaptationStubSettings.newBuilder().build(), clientContext);
  }

  public static final GrpcAdaptationStub create(
      ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
    return new GrpcAdaptationStub(
        AdaptationStubSettings.newBuilder().build(), clientContext, callableFactory);
  }

  /**
   * Constructs an instance of GrpcAdaptationStub, using the given settings. This is protected so
   * that it is easy to make a subclass, but otherwise, the static factory methods should be
   * preferred.
   */
  protected GrpcAdaptationStub(AdaptationStubSettings settings, ClientContext clientContext)
      throws IOException {
    this(settings, clientContext, new GrpcAdaptationCallableFactory());
  }

  /**
   * Constructs an instance of GrpcAdaptationStub, using the given settings. This is protected so
   * that it is easy to make a subclass, but otherwise, the static factory methods should be
   * preferred.
   */
  protected GrpcAdaptationStub(
      AdaptationStubSettings settings,
      ClientContext clientContext,
      GrpcStubCallableFactory callableFactory)
      throws IOException {
    this.callableFactory = callableFactory;
    this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);

    GrpcCallSettings<CreatePhraseSetRequest, PhraseSet> createPhraseSetTransportSettings =
        GrpcCallSettings.<CreatePhraseSetRequest, PhraseSet>newBuilder()
            .setMethodDescriptor(createPhraseSetMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("parent", String.valueOf(request.getParent()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<GetPhraseSetRequest, PhraseSet> getPhraseSetTransportSettings =
        GrpcCallSettings.<GetPhraseSetRequest, PhraseSet>newBuilder()
            .setMethodDescriptor(getPhraseSetMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("name", String.valueOf(request.getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<ListPhraseSetRequest, ListPhraseSetResponse> listPhraseSetTransportSettings =
        GrpcCallSettings.<ListPhraseSetRequest, ListPhraseSetResponse>newBuilder()
            .setMethodDescriptor(listPhraseSetMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("parent", String.valueOf(request.getParent()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<UpdatePhraseSetRequest, PhraseSet> updatePhraseSetTransportSettings =
        GrpcCallSettings.<UpdatePhraseSetRequest, PhraseSet>newBuilder()
            .setMethodDescriptor(updatePhraseSetMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("phrase_set.name", String.valueOf(request.getPhraseSet().getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<DeletePhraseSetRequest, Empty> deletePhraseSetTransportSettings =
        GrpcCallSettings.<DeletePhraseSetRequest, Empty>newBuilder()
            .setMethodDescriptor(deletePhraseSetMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("name", String.valueOf(request.getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<CreateCustomClassRequest, CustomClass> createCustomClassTransportSettings =
        GrpcCallSettings.<CreateCustomClassRequest, CustomClass>newBuilder()
            .setMethodDescriptor(createCustomClassMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("parent", String.valueOf(request.getParent()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<GetCustomClassRequest, CustomClass> getCustomClassTransportSettings =
        GrpcCallSettings.<GetCustomClassRequest, CustomClass>newBuilder()
            .setMethodDescriptor(getCustomClassMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("name", String.valueOf(request.getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<ListCustomClassesRequest, ListCustomClassesResponse>
        listCustomClassesTransportSettings =
            GrpcCallSettings.<ListCustomClassesRequest, ListCustomClassesResponse>newBuilder()
                .setMethodDescriptor(listCustomClassesMethodDescriptor)
                .setParamsExtractor(
                    request -> {
                      ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                      params.put("parent", String.valueOf(request.getParent()));
                      return params.build();
                    })
                .build();
    GrpcCallSettings<UpdateCustomClassRequest, CustomClass> updateCustomClassTransportSettings =
        GrpcCallSettings.<UpdateCustomClassRequest, CustomClass>newBuilder()
            .setMethodDescriptor(updateCustomClassMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put(
                      "custom_class.name", String.valueOf(request.getCustomClass().getName()));
                  return params.build();
                })
            .build();
    GrpcCallSettings<DeleteCustomClassRequest, Empty> deleteCustomClassTransportSettings =
        GrpcCallSettings.<DeleteCustomClassRequest, Empty>newBuilder()
            .setMethodDescriptor(deleteCustomClassMethodDescriptor)
            .setParamsExtractor(
                request -> {
                  ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
                  params.put("name", String.valueOf(request.getName()));
                  return params.build();
                })
            .build();

    this.createPhraseSetCallable =
        callableFactory.createUnaryCallable(
            createPhraseSetTransportSettings, settings.createPhraseSetSettings(), clientContext);
    this.getPhraseSetCallable =
        callableFactory.createUnaryCallable(
            getPhraseSetTransportSettings, settings.getPhraseSetSettings(), clientContext);
    this.listPhraseSetCallable =
        callableFactory.createUnaryCallable(
            listPhraseSetTransportSettings, settings.listPhraseSetSettings(), clientContext);
    this.listPhraseSetPagedCallable =
        callableFactory.createPagedCallable(
            listPhraseSetTransportSettings, settings.listPhraseSetSettings(), clientContext);
    this.updatePhraseSetCallable =
        callableFactory.createUnaryCallable(
            updatePhraseSetTransportSettings, settings.updatePhraseSetSettings(), clientContext);
    this.deletePhraseSetCallable =
        callableFactory.createUnaryCallable(
            deletePhraseSetTransportSettings, settings.deletePhraseSetSettings(), clientContext);
    this.createCustomClassCallable =
        callableFactory.createUnaryCallable(
            createCustomClassTransportSettings,
            settings.createCustomClassSettings(),
            clientContext);
    this.getCustomClassCallable =
        callableFactory.createUnaryCallable(
            getCustomClassTransportSettings, settings.getCustomClassSettings(), clientContext);
    this.listCustomClassesCallable =
        callableFactory.createUnaryCallable(
            listCustomClassesTransportSettings,
            settings.listCustomClassesSettings(),
            clientContext);
    this.listCustomClassesPagedCallable =
        callableFactory.createPagedCallable(
            listCustomClassesTransportSettings,
            settings.listCustomClassesSettings(),
            clientContext);
    this.updateCustomClassCallable =
        callableFactory.createUnaryCallable(
            updateCustomClassTransportSettings,
            settings.updateCustomClassSettings(),
            clientContext);
    this.deleteCustomClassCallable =
        callableFactory.createUnaryCallable(
            deleteCustomClassTransportSettings,
            settings.deleteCustomClassSettings(),
            clientContext);

    this.backgroundResources =
        new BackgroundResourceAggregation(clientContext.getBackgroundResources());
  }

  public GrpcOperationsStub getOperationsStub() {
    return operationsStub;
  }

  @Override
  public UnaryCallable<CreatePhraseSetRequest, PhraseSet> createPhraseSetCallable() {
    return createPhraseSetCallable;
  }

  @Override
  public UnaryCallable<GetPhraseSetRequest, PhraseSet> getPhraseSetCallable() {
    return getPhraseSetCallable;
  }

  @Override
  public UnaryCallable<ListPhraseSetRequest, ListPhraseSetResponse> listPhraseSetCallable() {
    return listPhraseSetCallable;
  }

  @Override
  public UnaryCallable<ListPhraseSetRequest, ListPhraseSetPagedResponse>
      listPhraseSetPagedCallable() {
    return listPhraseSetPagedCallable;
  }

  @Override
  public UnaryCallable<UpdatePhraseSetRequest, PhraseSet> updatePhraseSetCallable() {
    return updatePhraseSetCallable;
  }

  @Override
  public UnaryCallable<DeletePhraseSetRequest, Empty> deletePhraseSetCallable() {
    return deletePhraseSetCallable;
  }

  @Override
  public UnaryCallable<CreateCustomClassRequest, CustomClass> createCustomClassCallable() {
    return createCustomClassCallable;
  }

  @Override
  public UnaryCallable<GetCustomClassRequest, CustomClass> getCustomClassCallable() {
    return getCustomClassCallable;
  }

  @Override
  public UnaryCallable<ListCustomClassesRequest, ListCustomClassesResponse>
      listCustomClassesCallable() {
    return listCustomClassesCallable;
  }

  @Override
  public UnaryCallable<ListCustomClassesRequest, ListCustomClassesPagedResponse>
      listCustomClassesPagedCallable() {
    return listCustomClassesPagedCallable;
  }

  @Override
  public UnaryCallable<UpdateCustomClassRequest, CustomClass> updateCustomClassCallable() {
    return updateCustomClassCallable;
  }

  @Override
  public UnaryCallable<DeleteCustomClassRequest, Empty> deleteCustomClassCallable() {
    return deleteCustomClassCallable;
  }

  @Override
  public final void close() {
    try {
      backgroundResources.close();
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new IllegalStateException("Failed to close resource", e);
    }
  }

  @Override
  public void shutdown() {
    backgroundResources.shutdown();
  }

  @Override
  public boolean isShutdown() {
    return backgroundResources.isShutdown();
  }

  @Override
  public boolean isTerminated() {
    return backgroundResources.isTerminated();
  }

  @Override
  public void shutdownNow() {
    backgroundResources.shutdownNow();
  }

  @Override
  public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
    return backgroundResources.awaitTermination(duration, unit);
  }
}


text:
using System;

namespace CSharp
{
    public sealed class ExceptionDo : ICommand
    {
        private string InnerFunction(string str)
        {
            if (str == null)
            {
                throw new Exception("argument is null");
            }

            return "right" + str;
        }

        public string ThrowAnException(string arg)
        {
            try
            {
                return InnerFunction(null);
            }
            catch(Exception ex)
            {
                throw new Exception($"[InnerExceptionMessage] {ex.Message} with [{arg}]");
            }
        }
        public void Run()
        {
            try
            {
                ThrowAnException("hello world");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
    }
}


text:
   Setup
   |
   Running linting/tests
   |
   Writing tests
   |
   Debugging code
   |
   Internals

----

# Contributing

Contributions are always welcome, no matter how large or small. Before
contributing, please read the
[code of conduct](https://github.com/babel/babel/blob/master/CODE_OF_CONDUCT.md).

## Not sure where to start?

- If you aren't just making a documentation change, you'll probably want to learn a bit about a few topics.
 - [ASTs](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (Abstract Syntax Tree): The Babel AST [spec](https://github.com/babel/babel/blob/master/packages/babylon/ast/spec.md) is a bit different from [ESTree](https://github.com/estree/estree). The differences are listed [here](https://github.com/babel/babel/tree/master/packages/babylon#output).
 - Check out [`/doc`](https://github.com/babel/babel/tree/master/doc) for information about Babel's internals
 - Check out [the Babel Plugin Handbook](https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babel-plugin-handbook) - core plugins are written the same way as any other plugin!
 - Check out [AST Explorer](http://astexplorer.net/#/scUfOmVOG5) to learn more about ASTs or make your own plugin in the browser
- When you feel ready to jump into the Babel source code, a good place to start is to look for issues tagged with [help wanted](https://github.com/babel/babel/labels/help%20wanted) and/or [good first issue](https://github.com/babel/babel/labels/good%20first%20issue).
- Follow along with what we are working on by joining our Slack, following our announcements on [Twitter](https://twitter.com/babeljs), and reading (or participating!) in our [meeting notes](https://github.com/babel/notes).
- Check out our [website](http://babeljs.io/) and the [repo](https://github.com/babel/website)

## Chat

Feel free to check out the `#discussion`/`#development` channels on our [Slack](https://slack.babeljs.io). Some of us are always online to chat!

## Developing

**Note:** Versions `< 5.1.10` can't be built.

Babel is built for Node 4 and up but we develop using Node 8 and yarn. You can check this with `node -v`.

Make sure that Yarn is installed with version >= `0.28.0`.
Installation instructions can be found here: https://yarnpkg.com/en/docs/install.

### Setup

```sh
$ git clone https://github.com/babel/babel
$ cd babel
$ make bootstrap
```

Then you can either run:

```sh
$ make build
```

to build Babel **once** or:

```sh
$ make watch
```

to have Babel build itself and incrementally build files on change.

You can access the built files for individual packages from `packages/<package-name>/lib`.

If you wish to build a copy of Babel for distribution, then run:

```sh
$ make build-dist
```

### Running linting/tests

You can run lint via:

```sh
# ~6 sec on a MacBook Pro (Mid 2015)
$ make lint
```

You can run eslint's autofix via:

```sh
$ make fix
```

You can run tests + lint for all packages (slow) via:

```sh
# ~46 sec on a MacBook Pro (Mid 2015)
$ make test
```

If you just want to run all tests:

```sh
# ~40 sec on a MacBook Pro (Mid 2015)
$ make test-only
```

Most likely you'll want to focus in on a specific issue.

To run tests for a specific package in [packages](https://github.com/babel/babel/tree/master/packages), you can use the `TEST_ONLY` environment variable:

```sh
$ TEST_ONLY=babel-cli make test
```

`TEST_ONLY` will also match substrings of the package name:

```sh
# Run tests for the @babel/plugin-transform-classes package.
$ TEST_ONLY=es2015-class make test
```

Use the `TEST_GREP` variable to run a subset of tests by name:

```sh
$ TEST_GREP=transformation make test
```

Substitute spaces for hyphens and forward slashes when targeting specific test names:

```sh
$ TEST_GREP="arrow functions destructuring parameters" make test
```

To enable the Node.js debugger added in v6.3.0, set the `TEST_DEBUG` environment variable:

```sh
$ TEST_DEBUG=true make test
```

You can combine `TEST_DEBUG` with `TEST_GREP` or `TEST_ONLY` to debug a subset of tests. If you plan to stay long in the debugger (which you'll likely do!), you may increase the test timeout by editing [test/mocha.opts](https://github.com/babel/babel/blob/master/test/mocha.opts).

To test the code coverage, use:

```sh
$ BABEL_ENV=cov make build
$ ./scripts/test-cov.sh
```

#### Troubleshooting Tests

In case you're not able to reproduce an error on CI locally, it may be due to

 - Node Version: Travis CI runs the tests against all major node versions. If your tests use JavaScript features unsupported by lower versions of node, then use [minNodeVersion option](#writing-tests) in options.json.
 - Timeout: Check the CI log and if the only errors are timeout errors and you are sure that it's not related to the changes you made, ask someone in the slack channel to trigger rebuild on the CI build and it might be resolved

In case you're locally getting errors which are not on the CI, it may be due to

 - Updates in Dependencies: Make sure you run `make bootstrap` before you run `make build` or `make watch` before you run the tests.

### Writing tests

Most packages in [`/packages`](https://github.com/babel/babel/tree/master/packages) have a `test` folder, however some tests might be in other packages or in [`/packages/babel-core`](https://github.com/babel/babel/tree/master/packages/babel-core/test/fixtures).

#### `@babel/plugin-x`

All the Babel plugins (and other packages) that have a `/test/fixtures` are written in a similar way.

For example, in [`@babel/plugin-transform-exponentiation-operator/test`](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-exponentiation-operator/test):

- There is an `index.js` file. It imports our [test helper](https://github.com/babel/babel/tree/master/packages/babel-helper-plugin-test-runner). (You don't have to worry about this).
- There can be multiple folders under [`/fixtures`](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures)
   - There is an [`options.json`](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/options.json) file whose function is similar to a `.babelrc` file, allowing you to pass in the plugins and settings you need for your tests.
   - For this test, we only need the relevant plugin, so it's just `{ "plugins": ["@babel/plugin-transform-exponentiation-operator"] }`.
   - If necessary, you can have an `options.json` with different options in each subfolder.

- In each subfolder, you can organize your directory structure by categories of tests. (Example: these folders can be named after the feature you are testing or can reference the issue number they fix)
- Generally, there are two kinds of tests for plugins
   - The first is a simple test of the input and output produced by running Babel on some code. We do this by creating an [`actual.js`](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/binary/actual.js) file and an [`expected.js`](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/binary/expected.js) file.
   - If you need to expect an error, you can ignore creating the `expected.js` file and pass a new `throws` key to the `options.json` that contains the error string that is created.
   - The second and preferred type is a test that actually evaluates the produced code and asserts that certain properties are true or false. We do this by creating an [`exec.js`](https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/comprehensive/exec.js) file.

In an actual/expected test, you simply write out the code you want transformed in `actual.js`.

```js
// actual.js
2 ** 2;
```

and the expected output after transforming it with your `options.json` in `expected.js`.

```js
// expected.js
Math.pow(2, 2);
```
In an `exec.js` test, we run or check that the code actually does what it's supposed to do rather than just check the static output.

```js
// exec.js
assert.equal(8, 2 ** 3);
assert.equal(24, 3 * 2 ** 3);
```

If you need to check for an error that is thrown you can add to the `options.json`

```js
// options.json example
{
  "plugins": [["@babel/plugin-proposal-object-rest-spread", { "useBuiltIns": "invalidOption" }]],
  "throws": "@babel/plugin-proposal-object-rest-spread currently only accepts a boolean option for useBuiltIns (defaults to false)"
}
```

If the test requires a minimum Node version, you can add `minNodeVersion` (must be in semver format).

```js
// options.json example
{
  "minNodeVersion": "5.0.0"
}
```

#### `babylon`

Writing tests for Babylon is very
similar to the other packages.
Inside the `packages/babylon/tests/fixtures` folder are categories/groupings of test fixtures (es2015, flow,
etc.). To add a test, create a folder under one of these groupings (or create a new one) with a
descriptive name, and add the following:

* Create an `actual.js` file that contains the code you want Babylon to parse.

* Add an `expected.json` file with the expected parser output. For added convenience, if there is no `expected.json` present, the test runner will generate one for you.

After writing tests for babylon, just build it by running:

```sh
$ make build-babylon
```

Then, to run the tests, use:

```sh
$ TEST_ONLY=babylon make test-only
```

#### Bootstrapping expected output

For both `@babel/plugin-x` and `babylon`, you can easily generate an `expected.js`/`expected.json` automatically by just providing `actual.js` and running the tests as you usually would.

```
// Example
- packages
  - babylon
    - test
      - fixtures
        - comments
          - basic
            - block-trailing-comment
              - actual.js
              - expected.json (will be generated if not created)
```

### Debugging code

A common approach to debugging JavaScript code is to walk through the code using the [Chrome DevTools](https://developers.google.com/web/tools/chrome-devtools/) debugger.
For illustration purposes, we are going to assume that we need to get a better understanding of [`Generator.generate()`](https://github.com/babel/babel/blob/b5246994b57f06af871be6a63dcc4c6fd41d94d6/packages/babel-generator/src/index.js#L32), which is responsible for generating code for a given AST.
To get a better understanding of what is actually going on for this particular piece of code, we are going to make use of breakpoints.

```diff
generate() {
+ debugger; // breakpoint
  return super.generate(this.ast);
}
```

To include the changes, we have to make sure to build Babel:

```bash
$ make build
```

Next, we need to execute `Generator.generate()`, which can be achieved by running a test case in the `@babel/generator` package.
For example, we can run the test case that tests the generation of class declarations:

```bash
$ TEST_DEBUG=true TEST_GREP=ClassDeclaration make test-only

./scripts/test.sh
Debugger listening on port 9229.
To start debugging, open the following URL in Chrome:
    chrome-devtools://devtools/remote/serve_file/@60cd6e859b9f557d2312f5bf532f6aec5f284980/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/3cdaebd2-be88-4e7b-a94b-432950ab72d0
```

To start the debugging in Chrome DevTools, open the given URL.
The debugger starts at the first executed line of code, which is Mocha's first line by default.
Click _Resume script execution_  to jump to the set breakpoint.
Note that the code shown in Chrome DevTools is compiled code and therefore differs.

## Creating a new plugin (`spec-new`)

> Example: https://github.com/babel/babylon/pull/541

- Create a new issue that describes the proposal (ex: [#538](https://github.com/babel/babylon/issues/538)). Include any relevant information like proposal repo/author, examples, parsing approaches, meeting notes, presentation slides, and more.
- The pull request should include:
  - [ ] An update to the [plugins](https://github.com/babel/babel/tree/master/packages/babylon#plugins) part of the readme. Add a new entry to that list for the new plugin flag (and link to the proposal)
  - [ ] If any new nodes or modifications need to be added to the AST, update [ast/spec.md](https://github.com/babel/babel/bloc/master/packages/babylon/ast/spec.md)
  - [ ] Make sure you use the `this.hasPlugin("plugin-name-here")` check in Babylon so that your new plugin code only runs when that flag is turned on (not default behavior)
  - [ ] Add failing/passing tests according to spec behavior
- Start working about the Babel transform itself!

## Internals
- AST spec ([babylon/ast/spec.md](https://github.com/babel/babel/blob/master/packages/babylon/ast/spec.md))
- Versioning ([doc/design/versioning.md](https://github.com/babel/babel/blob/master/doc/design/versioning.md))
- Monorepo ([doc/design/monorepo.md](https://github.com/babel/babel/blob/master/doc/design/monorepo.md))
- Compiler environment support ([doc/design/compiler-environment-support.md](https://github.com/babel/babel/blob/master/doc/design/compiler-environment-support.md))
- Compiler assumptions ([doc/design/compiler-assumptions.md](https://github.com/babel/babel/blob/master/doc/design/compiler-assumptions.md))