text:
package com.etfdatadownload.main;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringReader;
import java.io.StringWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URLConnection;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.logging.Level;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.commons.io.IOUtils;

import yahoofinance.Stock;
import yahoofinance.Utils;
import yahoofinance.YahooFinance;
import yahoofinance.histquotes.HistoricalQuote;
import yahoofinance.histquotes.Interval;

public class YahooETFDataDownload implements IETFDataDownloader {

	// public static final String URL =
	// "http://chart.finance.yahoo.com/table.csv?s=%s&a=%d&b=%d&c=%d&d=%d&e=%d&f=%d&g=%s&ignore=.csv";
	// public static final String URL =
	// "http://ichart.yahoo.com/table.csv?s=%s&a=%d&b=%d&c=%d&d=%d&e=%d&f=%d&g=%s&ignore=.csv";

	public static final String URL1 = "https://uk.finance.yahoo.com/quote/%s/history";
	public static final String URL = "https://query1.finance.yahoo.com/v7/finance/download/%s?period1=728262000&period2=%d&interval=1d&events=history&crumb=%s";
	public static final String URL_DIV = "https://query1.finance.yahoo.com/v7/finance/download/%s?period1=728262000&period2=%d&interval=1d&events=div&crumb=%s";

	private static String cookie = null;
	private static String crumb = null;

	@Override
	public String download(ETFDownloadParams params) throws Exception {

		StringBuilder builder = new StringBuilder();

		Calendar calendarFrom = Calendar.getInstance();
		calendarFrom.setTime(params.from);

		Calendar calendarTo = Calendar.getInstance();
		calendarTo.setTime(params.to);

		if (cookie == null)
			loadCookie(params);
		if (cookie == null || crumb == null) {
			throw new Exception("Failed to retrieve cookie!");
		}

		String url = String.format(URL, params.ticket, params.to.getTime(), crumb);
		String url_div = String.format(URL_DIV, params.ticket, params.to.getTime(), crumb);

		try {
			System.out.println(url);
			java.net.URL theUrl = new java.net.URL(url);
			URLConnection con = theUrl.openConnection();
			con.setRequestProperty("Cookie", cookie);
			String redirect = con.getHeaderField("Location");
			if (redirect != null) {
				con = new java.net.URL(redirect).openConnection();
			}

			InputStream iss = con.getInputStream();
			if (con instanceof HttpURLConnection) {
				HttpURLConnection httpCon = (HttpURLConnection) con;
				if (httpCon.getResponseCode() != 200) {
					throw new Exception(httpCon.getResponseMessage());
				}
			}

			InputStreamReader is = new InputStreamReader(iss);
			BufferedReader br = new BufferedReader(is);
			br.readLine(); // skip the first line
			// Parse CSV
			float last = 0.0f;
			for (String line = br.readLine(); line != null; line = br.readLine()) {
				String[] data = line.split(YahooFinance.QUOTES_CSV_DELIMITER);
				String nav = data[1];
				if (nav != null && !"null".equals(nav)) {
					last = Float.valueOf(nav);
					builder.append(data[0] + "," + nav + "\r\n");
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
			return Main.EMPTY_DATA;
		}

		return builder.toString();
	}

	@Override
	public String downloadDiv(ETFDownloadParams params) throws Exception {

		StringBuilder builder = new StringBuilder();

		Calendar calendarFrom = Calendar.getInstance();
		calendarFrom.setTime(params.from);

		Calendar calendarTo = Calendar.getInstance();
		calendarTo.setTime(params.to);

		if (cookie == null)
			loadCookie(params);
		if (cookie == null || crumb == null) {
			throw new Exception("Failed to retrieve cookie!");
		}

		String url = String.format(URL_DIV, params.ticket, params.to.getTime(), crumb);

		try {
			System.out.println(url);
			java.net.URL theUrl = new java.net.URL(url);
			URLConnection con = theUrl.openConnection();
			con.setRequestProperty("Cookie", cookie);
			String redirect = con.getHeaderField("Location");
			if (redirect != null) {
				con = new java.net.URL(redirect).openConnection();
			}

			InputStream iss = con.getInputStream();
			if (con instanceof HttpURLConnection) {
				HttpURLConnection httpCon = (HttpURLConnection) con;
				if (httpCon.getResponseCode() != 200) {
					throw new Exception(httpCon.getResponseMessage());
				}
			}

			InputStreamReader is = new InputStreamReader(iss);
			BufferedReader br = new BufferedReader(is);
			br.readLine(); // skip the first line
			// Parse CSV
			for (String line = br.readLine(); line != null; line = br.readLine()) {
				String[] data = line.split(YahooFinance.QUOTES_CSV_DELIMITER);
				String nav = data[1];
				if (nav != null && !"null".equals(nav)) {
					builder.append(data[0] + "," + nav + "\r\n");
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
			return Main.EMPTY_DATA;
		}

		return builder.toString();
	}

	private void loadCookie(ETFDownloadParams params) throws MalformedURLException, IOException, Exception {
		String url1 = String.format(URL1, params.ticket);
		System.out.println(url1);
		java.net.URL theUrl = new java.net.URL(url1);
		URLConnection con = theUrl.openConnection();
		String redirect = con.getHeaderField("Location");
		if (redirect != null) {
			con = new java.net.URL(redirect).openConnection();
		}
		InputStream iss = con.getInputStream();
		if (con instanceof HttpURLConnection) {
			HttpURLConnection httpCon = (HttpURLConnection) con;
			if (httpCon.getResponseCode() != 200) {
				throw new Exception(httpCon.getResponseMessage());
			}
		}

		InputStreamReader is = new InputStreamReader(iss);
		String theString = IOUtils.toString(is);

		List<String> cookies = con.getHeaderFields().get("Set-Cookie");
		if(cookies == null){
			cookies = con.getHeaderFields().get("set-cookie");
		}
		if(cookies == null){
			cookies = new ArrayList<>();
		}
		for (String string : cookies) {
			if (string.startsWith("B")) {
				cookie = string;
				System.out.println("FOUND: " + cookie);
				break;
			}
		}

		Pattern p = Pattern.compile("\"CrumbStore\":\\{\"crumb\":\"(?<crumb>\\w+)\"\\}");
		Matcher m = p.matcher(theString);
		if (m.find()) {
			crumb = theString.substring(m.start(), m.end());
			String[] crumbSplit = crumb.split(":");
			crumb = crumbSplit[2].replaceAll("\\}", "").replaceAll("\"", "");
			System.out.println("FOUND: " + crumb);
		}

	}

	private Interval ziskajInterval(String freq) {
		if ("m" == freq) {
			return Interval.MONTHLY;
		}

		if ("w" == freq) {
			return Interval.DAILY;
		}

		return Interval.DAILY;
	}

	public static int JGREG = 15 + 31 * (10 + 12 * 1582);
	public static double HALFSECOND = 0.5;

	public static double toJulian(int[] ymd) {
		int year = ymd[0];
		int month = ymd[1]; // jan=1, feb=2,...
		int day = ymd[2];
		int julianYear = year;
		if (year < 0)
			julianYear++;
		int julianMonth = month;
		if (month > 2) {
			julianMonth++;
		} else {
			julianYear--;
			julianMonth += 13;
		}

		double julian = (java.lang.Math.floor(365.25 * julianYear) + java.lang.Math.floor(30.6001 * julianMonth) + day
				+ 1720995.0);
		if (day + 31 * (month + 12 * year) >= JGREG) {
			// change over to Gregorian calendar
			int ja = (int) (0.01 * julianYear);
			julian += 2 - ja + (0.25 * ja);
		}
		return java.lang.Math.floor(julian);
	}

}


text:
import { IRect } from 'cd-interfaces';

export interface IRectElem extends IRect {
  id: string;
}

export interface IElement extends IRectElem {
  childIds: string[];
  parentId?: string;
  level: number;
  allowChildren: boolean;
}

redpajama_set_name: RedPajamaGithub


text:
@interface yhltest : NSObject<WCSessionDelegate>

@property (strong, nonatomic) WCSession *session;

+(instancetype)shareSession;
-(void)startSession;

@end


text:
package pt.up.fe.ssin.pexplorer.actions;

import java.io.IOException;

import pt.up.fe.ssin.pexplorer.R;
import pt.up.fe.ssin.pexplorer.app.PermissionAction;
import android.content.Context;
import android.widget.Toast;

public class RebootAction extends PermissionAction {

    public RebootAction() {
        super(R.string.reboot_label, R.string.reboot_desc,
                PermissionAction.WARN);
    }

    @Override
    protected void doAction(Context context) {
        try {
            Runtime.getRuntime().exec(new String[] { "su", "-c", "reboot" });
        } catch (IOException e) {
            Toast.makeText(context, R.string.no_root, Toast.LENGTH_SHORT).show();
            return;
        }
    }
}


text:
CKey DecodeSecret(const std::string& str);
std::string EncodeSecret(const CKey& key);

CExtKey DecodeExtKey(const std::string& str);
std::string EncodeExtKey(const CExtKey& extkey);
CExtPubKey DecodeExtPubKey(const std::string& str);
std::string EncodeExtPubKey(const CExtPubKey& extpubkey);

std::string EncodeDestination(const CTxDestination& dest);
CTxDestination DecodeDestination(const std::string& str);
bool IsValidDestinationString(const std::string& str);
bool IsValidDestinationString(const std::string& str, const CChainParams& params);

std::string EncodePaymentAddress(const libzcash::PaymentAddress& zaddr);
libzcash::PaymentAddress DecodePaymentAddress(const std::string& str);
bool IsValidPaymentAddressString(const std::string& str);

std::string EncodeViewingKey(const libzcash::ViewingKey& vk);
libzcash::ViewingKey DecodeViewingKey(const std::string& str);

std::string EncodeSpendingKey(const libzcash::SpendingKey& zkey);
libzcash::SpendingKey DecodeSpendingKey(const std::string& str);

#endif // BITCOIN_KEYIO_H


text:
@interface PodsDummy_RSKKeyboardAnimationObserver : NSObject
@end
@implementation PodsDummy_RSKKeyboardAnimationObserver
@end


text:
class Profile;

namespace base {
class DictionaryValue;
}

namespace chromeos {

// This class is responsible for managing the various wake-on-wifi related bits
// of functionality in chrome.  It is responsible for communicating the user's
// preferences to shill as well as listening for connections to the Google GCM
// servers and sending that connection information down to shill.  This class is
// owned by ChromeBrowserMainPartsChromeos.  This class is also NOT thread-safe
// and should only be called on the UI thread.
class WakeOnWifiManager : public content::NotificationObserver {
 public:
  enum WakeOnWifiFeature {
    WAKE_ON_NONE            = 0x00,
    WAKE_ON_PACKET          = 0x01,
    WAKE_ON_SSID            = 0x02,
    WAKE_ON_PACKET_AND_SSID = 0x03,
    NOT_SUPPORTED           = 0x04,
    INVALID                 = 0x08,
  };

  static WakeOnWifiManager* Get();

  WakeOnWifiManager();
  ~WakeOnWifiManager() override;

  // Should be called whenever the primary user changes their preference for the
  // wake-on-wifi features that should be enabled.
  void OnPreferenceChanged(WakeOnWifiFeature feature);

  // Returns true if wake-on-wifi features are supported. Returns false if we
  // have not yet determined whether wake-on-wifi features are supported.
  bool WakeOnWifiSupported();

  // Callback for getting the Wi-Fi device properties.
  void GetDevicePropertiesCallback(const std::string& device_path,
                                   const base::DictionaryValue& properties);

  // content::NotificationObserver override.
  void Observe(int type,
               const content::NotificationSource& source,
               const content::NotificationDetails& details) override;

 private:
  void OnProfileAdded(Profile* profile);
  void OnProfileDestroyed(Profile* profile);

  WakeOnWifiFeature current_feature_;

  class WakeOnPacketConnectionObserver;
  base::ScopedPtrHashMap<Profile*, WakeOnPacketConnectionObserver>
      connection_observers_;

  content::NotificationRegistrar registrar_;

  base::WeakPtrFactory<WakeOnWifiManager> weak_ptr_factory_;

  DISALLOW_COPY_AND_ASSIGN(WakeOnWifiManager);
};

}  // namespace chromeos

#endif  // CHROME_BROWSER_CHROMEOS_NET_WAKE_ON_WIFI_MANAGER_H_


text:
package goja.el.opt.bit;

import goja.el.opt.TwoTernary;

/**
 * 或
 * @author juqkai(juqkai@gmail.com)
 *
 */
public class BitOr extends TwoTernary {
    public int fetchPriority() {
        return 10;
    }
    public Object calculate() {
        Integer lval = (Integer) calculateItem(left);
        Integer rval = (Integer) calculateItem(right);
        return lval | rval;
    }
    public String fetchSelf() {
        return "|";
    }
}


text:
require 'prism_qa'

RSpec.describe PrismQA::Target, "#init" do
  context "when initialized and populated" do
    it "retains values" do
      target = PrismQA::Target.new
      expect(target.name).to eq nil
      expect(target.attribute).to eq nil
      target.name = "my_name"
      target.attribute = "my attribute"
      expect(target.name).to eq "my_name"
      expect(target.attribute).to eq "my attribute"
    end
  end
end


text:
package com.amazonaws.services.kms.model;

import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 */
public class ListKeyPoliciesRequest extends AmazonWebServiceRequest implements
        Serializable, Cloneable {

    /**
     *

     * A unique identifier for the customer master key. This value can be a
     * globally unique identifier, a fully specified ARN to either an alias or a
     * key, or an alias name prefixed by "alias/".
     *

     *
Key ARN Example -
     * arn:aws:kms:us-east-1:123456789012:key/12345678-1234
     * -1234-1234-123456789012

     *
Alias ARN Example -
     * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

     *
Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
     *

     *
Alias Name Example - alias/MyAliasName

     *

     *

     */
    private String keyId;
    /**
     *

     * When paginating results, specify the maximum number of items to return in
     * the response. If additional items exist beyond the number you specify,
     * the Truncated element in the response is set to true.
     *

     *

     * This value is optional. If you include a value, it must be between 1 and
     * 1000, inclusive. If you do not include a value, it defaults to 100.
     *

     *

     * Currently only 1 policy can be attached to a key.
     *

     */
    private Integer limit;
    /**
     *

     * Use this parameter only when paginating results and only in a subsequent
     * request after you receive a response with truncated results. Set it to
     * the value of NextMarker from the response you just received.
     *

     */
    private String marker;

    /**
     *

     * A unique identifier for the customer master key. This value can be a
     * globally unique identifier, a fully specified ARN to either an alias or a
     * key, or an alias name prefixed by "alias/".
     *

     *
Key ARN Example -
     * arn:aws:kms:us-east-1:123456789012:key/12345678-1234
     * -1234-1234-123456789012

     *
Alias ARN Example -
     * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

     *
Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
     *

     *
Alias Name Example - alias/MyAliasName

     *

     *

     *
     * @param keyId
     *        A unique identifier for the customer master key. This value can be
     *        a globally unique identifier, a fully specified ARN to either an
     *        alias or a key, or an alias name prefixed by "alias/".
     *

     *
Key ARN Example -
     *        arn:aws:kms:us-east-1:123456789012:key/12345678
     *        -1234-1234-1234-123456789012

     *
Alias ARN Example -
     *        arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

     *
Globally Unique Key ID Example -
     *        12345678-1234-1234-1234-123456789012

     *
Alias Name Example - alias/MyAliasName

     *

     */
    public void setKeyId(String keyId) {
        this.keyId = keyId;
    }

    /**
     *

     * A unique identifier for the customer master key. This value can be a
     * globally unique identifier, a fully specified ARN to either an alias or a
     * key, or an alias name prefixed by "alias/".
     *

     *
Key ARN Example -
     * arn:aws:kms:us-east-1:123456789012:key/12345678-1234
     * -1234-1234-123456789012

     *
Alias ARN Example -
     * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

     *
Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
     *

     *
Alias Name Example - alias/MyAliasName

     *

     *

     *
     * @return A unique identifier for the customer master key. This value can
     *         be a globally unique identifier, a fully specified ARN to either
     *         an alias or a key, or an alias name prefixed by "alias/".
     *

     *
Key ARN Example -
     *         arn:aws:kms:us-east-1:123456789012:key/12345678
     *         -1234-1234-1234-123456789012

     *
Alias ARN Example -
     *         arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

     *
Globally Unique Key ID Example -
     *         12345678-1234-1234-1234-123456789012

     *
Alias Name Example - alias/MyAliasName

     *

     */
    public String getKeyId() {
        return this.keyId;
    }

    /**
     *

     * A unique identifier for the customer master key. This value can be a
     * globally unique identifier, a fully specified ARN to either an alias or a
     * key, or an alias name prefixed by "alias/".
     *

     *
Key ARN Example -
     * arn:aws:kms:us-east-1:123456789012:key/12345678-1234
     * -1234-1234-123456789012

     *
Alias ARN Example -
     * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

     *
Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012
     *

     *
Alias Name Example - alias/MyAliasName

     *

     *

     *
     * @param keyId
     *        A unique identifier for the customer master key. This value can be
     *        a globally unique identifier, a fully specified ARN to either an
     *        alias or a key, or an alias name prefixed by "alias/".
     *

     *
Key ARN Example -
     *        arn:aws:kms:us-east-1:123456789012:key/12345678
     *        -1234-1234-1234-123456789012

     *
Alias ARN Example -
     *        arn:aws:kms:us-east-1:123456789012:alias/MyAliasName

     *
Globally Unique Key ID Example -
     *        12345678-1234-1234-1234-123456789012

     *
Alias Name Example - alias/MyAliasName

     *

     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public ListKeyPoliciesRequest withKeyId(String keyId) {
        setKeyId(keyId);
        return this;
    }

    /**
     *

     * When paginating results, specify the maximum number of items to return in
     * the response. If additional items exist beyond the number you specify,
     * the Truncated element in the response is set to true.
     *

     *

     * This value is optional. If you include a value, it must be between 1 and
     * 1000, inclusive. If you do not include a value, it defaults to 100.
     *

     *

     * Currently only 1 policy can be attached to a key.
     *

     *
     * @param limit
     *        When paginating results, specify the maximum number of items to
     *        return in the response. If additional items exist beyond the
     *        number you specify, the Truncated element in the
     *        response is set to true.

     *

     *        This value is optional. If you include a value, it must be between
     *        1 and 1000, inclusive. If you do not include a value, it defaults
     *        to 100.
     *

     *

     *        Currently only 1 policy can be attached to a key.
     */
    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    /**
     *

     * When paginating results, specify the maximum number of items to return in
     * the response. If additional items exist beyond the number you specify,
     * the Truncated element in the response is set to true.
     *

     *

     * This value is optional. If you include a value, it must be between 1 and
     * 1000, inclusive. If you do not include a value, it defaults to 100.
     *

     *

     * Currently only 1 policy can be attached to a key.
     *

     *
     * @return When paginating results, specify the maximum number of items to
     *         return in the response. If additional items exist beyond the
     *         number you specify, the Truncated element in the
     *         response is set to true.

     *

     *         This value is optional. If you include a value, it must be
     *         between 1 and 1000, inclusive. If you do not include a value, it
     *         defaults to 100.
     *

     *

     *         Currently only 1 policy can be attached to a key.
     */
    public Integer getLimit() {
        return this.limit;
    }

    /**
     *

     * When paginating results, specify the maximum number of items to return in
     * the response. If additional items exist beyond the number you specify,
     * the Truncated element in the response is set to true.
     *

     *

     * This value is optional. If you include a value, it must be between 1 and
     * 1000, inclusive. If you do not include a value, it defaults to 100.
     *

     *

     * Currently only 1 policy can be attached to a key.
     *

     *
     * @param limit
     *        When paginating results, specify the maximum number of items to
     *        return in the response. If additional items exist beyond the
     *        number you specify, the Truncated element in the
     *        response is set to true.

     *

     *        This value is optional. If you include a value, it must be between
     *        1 and 1000, inclusive. If you do not include a value, it defaults
     *        to 100.
     *

     *

     *        Currently only 1 policy can be attached to a key.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public ListKeyPoliciesRequest withLimit(Integer limit) {
        setLimit(limit);
        return this;
    }

    /**
     *

     * Use this parameter only when paginating results and only in a subsequent
     * request after you receive a response with truncated results. Set it to
     * the value of NextMarker from the response you just received.
     *

     *
     * @param marker
     *        Use this parameter only when paginating results and only in a
     *        subsequent request after you receive a response with truncated
     *        results. Set it to the value of NextMarker from the
     *        response you just received.
     */
    public void setMarker(String marker) {
        this.marker = marker;
    }

    /**
     *

     * Use this parameter only when paginating results and only in a subsequent
     * request after you receive a response with truncated results. Set it to
     * the value of NextMarker from the response you just received.
     *

     *
     * @return Use this parameter only when paginating results and only in a
     *         subsequent request after you receive a response with truncated
     *         results. Set it to the value of NextMarker from the
     *         response you just received.
     */
    public String getMarker() {
        return this.marker;
    }

    /**
     *

     * Use this parameter only when paginating results and only in a subsequent
     * request after you receive a response with truncated results. Set it to
     * the value of NextMarker from the response you just received.
     *

     *
     * @param marker
     *        Use this parameter only when paginating results and only in a
     *        subsequent request after you receive a response with truncated
     *        results. Set it to the value of NextMarker from the
     *        response you just received.
     * @return Returns a reference to this object so that method calls can be
     *         chained together.
     */
    public ListKeyPoliciesRequest withMarker(String marker) {
        setMarker(marker);
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getKeyId() != null)
            sb.append("KeyId: " + getKeyId() + ",");
        if (getLimit() != null)
            sb.append("Limit: " + getLimit() + ",");
        if (getMarker() != null)
            sb.append("Marker: " + getMarker());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof ListKeyPoliciesRequest == false)
            return false;
        ListKeyPoliciesRequest other = (ListKeyPoliciesRequest) obj;
        if (other.getKeyId() == null ^ this.getKeyId() == null)
            return false;
        if (other.getKeyId() != null
                && other.getKeyId().equals(this.getKeyId()) == false)
            return false;
        if (other.getLimit() == null ^ this.getLimit() == null)
            return false;
        if (other.getLimit() != null
                && other.getLimit().equals(this.getLimit()) == false)
            return false;
        if (other.getMarker() == null ^ this.getMarker() == null)
            return false;
        if (other.getMarker() != null
                && other.getMarker().equals(this.getMarker()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode
                + ((getKeyId() == null) ? 0 : getKeyId().hashCode());
        hashCode = prime * hashCode
                + ((getLimit() == null) ? 0 : getLimit().hashCode());
        hashCode = prime * hashCode
                + ((getMarker() == null) ? 0 : getMarker().hashCode());
        return hashCode;
    }

    @Override
    public ListKeyPoliciesRequest clone() {
        return (ListKeyPoliciesRequest) super.clone();
    }
}


text:
extern id<DDDuoduoProtocol> duoduo;

void setSharedDuoduo(id<DDDuoduoProtocol> shared);


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.curso.spring.ciclovida;

import org.springframework.beans.factory.DisposableBean;

/**
 *
 * @author user
 */
public class DestruccionBean implements DisposableBean {

    @Override
    public void destroy() throws Exception {
        System.out.println("Destrucción de este bean");
    }
}


text:
namespace Folke.Elm.Visitor
{
    public class Where : IVisitable
    {
        private readonly IVisitable list;
        private readonly IVisitable expression;

        public Where(IVisitable list, IVisitable expression)
        {
            this.list = list;
            this.expression = expression;
        }

        public void Accept(IVisitor visitor)
        {
            list.Accept(visitor);
            visitor.BeforeWhere();
            expression.Accept(visitor);
        }
    }
}


text:
![Build status][travis-ci]

Hoep is a Python binding for the [Hoedown][hoedown] Markdown library.

## Install

Hoep is available on PyPI so installation is only a quick `pip` away.

    $ pip install hoep

## Unicode

Hoep only accepts and returns `unicode` objects in Python 2 and `str` objects in Python 3. This goes for custom renderers as well. All callbacks receive and must return `unicode` or `str` objects, respective to the Python version.

## Basic Usage

Using Hoep is pretty straightforward. You can either use the `render` module function or the `Hoep` module class. The latter is more efficient if you are rendering multiple documents in a single go.

```python
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import hoep as h

extensions = h.EXT_STRIKETHROUGH
render_flags = h.HTML_SMARTYPANTS

# Method form.
html = h.render('Some ~~bold~~ __"strong"__ text.', extensions, render_flags)

# Class form.
md = h.Hoep(extensions, render_flags)

html = md.render('Some ~~bold~~ __"strong"__ text.')
```

### Extensions

You can enable multiple extensions by bitwise ORing them.

+ `EXT_AUTOLINK`: Automatically parse URLs into links.
+ `EXT_DISABLE_INDENTED_CODE`: Disables indented code blocks.
+ `EXT_FENCED_CODE`: Enables fenced code blocks.
+ `EXT_FOOTNOTES`: Enables [Markdown Extra style footnotes][syntax-footnotes].
+ `EXT_HIGHLIGHT`: Enables ==marking== text.
+ `EXT_NO_INTRA_EMPHASIS`: Disables emphasis_between_words.
+ `EXT_QUOTE`: "Quotes" are translated into `<q>` tags.
+ `EXT_SPACE_HEADERS`: ATX style headers require a space after the opening number sign(s).
+ `EXT_STRIKETHROUGH`: Enables \~~striking~~ text.
+ `EXT_SUPERSCRIPT`: Enables super\^script.
+ `EXT_TABLES`: Enables [Markdown Extra style tables][syntax-tables].
+ `EXT_UNDERLINE`: Translates `<em>` tags into `<u>` tags.
+ `EXT_MATH`: Parse TeX $$math$$ syntax, Kramdown style.
+ `EXT_MATH_EXPLICIT`: Instead of guessing by context, parse $inline math$ and $$always block math$$ (requires --math).

### Render flags

You can enable multiple render flags by bitwise ORing them.

+ `HTML_ESCAPE`: All HTML is escaped.
+ `HTML_HARD_WRAP`: Line breaks are translated into `<br>` tags.
+ `HTML_SKIP_HTML`: All HTML tags are stripped.
+ `HTML_SMARTYPANTS`: Enables SmartyPants.
+ `HTML_USE_XHTML`: Renders XHTML instead of HTML.

## Custom renderer

By subclassing the `Hoep` class, you can create a custom renderer overriding various callbacks.

```python
# -*- coding: utf-8 -*-

from __future__ import unicode_literals

import hoep as h

class MyRenderer(h.Hoep):
    def __init__(self, extensions = 0, render_flags = 0):
        # If you override the `__init__` function, you must call
        # the parent class's or bad things will happen.
        super(MyRenderer, self).__init__(extensions, render_flags)

        self.replace = '[redacted]'

    def strikethrough(self, text):
        return self.replace

md = MyRenderer(h.EXT_STRIKETHROUGH)

html = md.render('Some ~~bold~~ __"strong"__ text.')
```

### Callbacks

#### Document level

+ `preprocess(str markdown)`
+ `doc_header()`
+ `doc_footer()`
+ `postprocess(str html)`

#### Block level

+ `block_code(str text, str language)`
+ `block_html(str text)`
+ `block_quote(str text)`
+ `footnotes(str text)`
+ `footnote_def(str text, int number)`
+ `header(str text, int level)`
+ `hrule()`
+ `list(str text, bool ordered)`
+ `list_item(str text, bool ordered)`
+ `paragraph(str text)`
+ `table(str header, str body)`
+ `table_row(str text)`
+ `table_cell(str text, int flags)`

#### Span level

+ `autolink(str link, bool is_email)`
+ `codespan(str text)`
+ `double_emphasis(str text)`
+ `emphasis(str text)`
+ `footnote_ref(int number)`
+ `highlight(str text)`
+ `image(str link, mixed title, str alt)`
+ `line_break()`
+ `link(str link, mixed title, str content)`
+ `quote(str text)`
+ `raw_html_tag(str tag)`
+ `strikethrough(str text)`
+ `superscript(str text)`
+ `triple_emphasis(str text)`
+ `underline(str text)`

#### Low-level

+ `entity(str entity)`
+ `normal_text(str text)`

## Support

If you run into any issues or have any questions, either open an [issue][github-issues] or hop in [#mynt][irc-webchat] on irc.freenode.net.

[github-issues]: https://github.com/Anomareh/Hoep/issues
[hoedown]: https://github.com/hoedown/hoedown
[irc-webchat]: http://webchat.freenode.net/?channels=mynt
[syntax-footnotes]: http://michelf.ca/projects/php-markdown/extra/#footnotes
[syntax-tables]: http://michelf.ca/projects/php-markdown/extra/#table

[travis-ci]: https://api.travis-ci.org/repositories/Anomareh/Hoep.png?branch=master


text:
using System;
using System.Linq;

namespace CliParse
{
    static internal class Helper
    {
        public static object GetObjectAttribute(Parsable parsable, Type type)
        {
            var parsableType = parsable.GetType();
            return parsableType.GetCustomAttributes(true).FirstOrDefault(x => x.GetType() == type);
        }
    }
}


text:
'''This module provides a class for authentication related calls to the CC API'''

from currencycloud.http import Http

class Auth(Http):
    '''This class provides an interface to the Authentication endpoints of the CC API'''

    def authenticate(self):
        '''Exchange Login ID and Api Key for a temporary Auth Token'''
        return self.post('/v2/authenticate/api', {
            'login_id': self.config.login_id,
            'api_key': self.config.api_key
        }, authenticated=False, retry=False)

    def close_session(self):
        '''Invalidate the Auth Token'''
        return self.post('/v2/authenticate/close_session', {})


text:
<?php

namespace Magento\Review\Model\ResourceModel\Rating;

/**
 * Rating collection resource model
 *
 * @author      Magento Core Team <core@magentocommerce.com>
 */
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $_storeManager;

    /**
     * @var \Magento\Review\Model\ResourceModel\Rating\Option\CollectionFactory
     */
    protected $_ratingCollectionF;

    /**
     * Add store data flag
     * @var bool
     */
    protected $_addStoreDataFlag = false;

    /**
     * @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
     * @param \Psr\Log\LoggerInterface $logger
     * @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
     * @param \Magento\Framework\Event\ManagerInterface $eventManager
     * @param \Magento\Store\Model\StoreManagerInterface $storeManager
     * @param \Magento\Review\Model\ResourceModel\Rating\Option\CollectionFactory $ratingCollectionF
     * @param mixed $connection
     * @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
     */
    public function __construct(
        \Magento\Framework\Data\Collection\EntityFactory $entityFactory,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
        \Magento\Framework\Event\ManagerInterface $eventManager,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Review\Model\ResourceModel\Rating\Option\CollectionFactory $ratingCollectionF,
        \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
        \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
    ) {
        $this->_storeManager = $storeManager;
        $this->_ratingCollectionF = $ratingCollectionF;
        parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
    }

    /**
     * @var bool
     */
    protected $_isStoreJoined = false;

    /**
     * Resource initialization
     *
     * @return void
     */
    protected function _construct()
    {
        $this->_init('Magento\Review\Model\Rating', 'Magento\Review\Model\ResourceModel\Rating');
    }

    /**
     * Add entity filter
     *
     * @param   int|string $entity
     * @return  $this
     */
    public function addEntityFilter($entity)
    {
        $connection = $this->getConnection();

        $this->getSelect()->join(
            $this->getTable('rating_entity'),
            'main_table.entity_id=' . $this->getTable('rating_entity') . '.entity_id',
            ['entity_code']
        );

        if (is_numeric($entity)) {
            $this->addFilter(
                'entity',
                $connection->quoteInto($this->getTable('rating_entity') . '.entity_id=?', $entity),
                'string'
            );
        } elseif (is_string($entity)) {
            $this->addFilter(
                'entity',
                $connection->quoteInto($this->getTable('rating_entity') . '.entity_code=?', $entity),
                'string'
            );
        }
        return $this;
    }

    /**
     * Set order by position field
     *
     * @param   string $dir
     * @return  $this
     */
    public function setPositionOrder($dir = 'ASC')
    {
        $this->setOrder('main_table.position', $dir);
        return $this;
    }

    /**
     * Set store filter
     *
     * @param int $storeId
     * @return $this
     */
    public function setStoreFilter($storeId)
    {
        if ($this->_storeManager->isSingleStoreMode()) {
            return $this;
        }
        $connection = $this->getConnection();
        if (!is_array($storeId)) {
            $storeId = [$storeId === null ? -1 : $storeId];
        }
        if (empty($storeId)) {
            return $this;
        }
        if (!$this->_isStoreJoined) {
            $this->getSelect()->distinct(
                true
            )->join(
                ['store' => $this->getTable('rating_store')],
                'main_table.rating_id = store.rating_id',
                []
            );
            //        ->group('main_table.rating_id')
            $this->_isStoreJoined = true;
        }
        $inCondition = $connection->prepareSqlCondition('store.store_id', ['in' => $storeId]);
        $this->getSelect()->where($inCondition);
        $this->setPositionOrder();
        return $this;
    }

    /**
     * Add options to ratings in collection
     *
     * @return $this
     */
    public function addOptionToItems()
    {
        $arrRatingId = $this->getColumnValues('rating_id');

        if (!empty($arrRatingId)) {
            /** @var \Magento\Review\Model\ResourceModel\Rating\Option\Collection $collection */
            $collection = $this->_ratingCollectionF->create()->addRatingFilter(
                $arrRatingId
            )->setPositionOrder()->load();

            foreach ($this as $rating) {
                $rating->setOptions($collection->getItemsByColumnValue('rating_id', $rating->getId()));
            }
        }

        return $this;
    }

    /**
     * Add entity summary to item
     *
     * @param int $entityPkValue
     * @param int $storeId
     * @return $this
     */
    public function addEntitySummaryToItem($entityPkValue, $storeId)
    {
        $arrRatingId = $this->getColumnValues('rating_id');
        if (count($arrRatingId) == 0) {
            return $this;
        }

        $connection = $this->getConnection();

        $inCond = $connection->prepareSqlCondition('rating_option_vote.rating_id', ['in' => $arrRatingId]);
        $sumCond = new \Zend_Db_Expr("SUM(rating_option_vote.{$connection->quoteIdentifier('percent')})");
        $countCond = new \Zend_Db_Expr('COUNT(*)');
        $select = $connection->select()->from(
            ['rating_option_vote' => $this->getTable('rating_option_vote')],
            ['rating_id' => 'rating_option_vote.rating_id', 'sum' => $sumCond, 'count' => $countCond]
        )->join(
            ['review_store' => $this->getTable('review_store')],
            'rating_option_vote.review_id=review_store.review_id AND review_store.store_id = :store_id',
            []
        );
        if (!$this->_storeManager->isSingleStoreMode()) {
            $select->join(
                ['rst' => $this->getTable('rating_store')],
                'rst.rating_id = rating_option_vote.rating_id AND rst.store_id = :rst_store_id',
                []
            );
        }
        $select->join(
            ['review' => $this->getTable('review')],
            'review_store.review_id=review.review_id AND review.status_id=1',
            []
        )->where(
            $inCond
        )->where(
            'rating_option_vote.entity_pk_value=:pk_value'
        )->group(
            'rating_option_vote.rating_id'
        );
        $bind = [':store_id' => (int)$storeId, ':pk_value' => $entityPkValue];
        if (!$this->_storeManager->isSingleStoreMode()) {
            $bind[':rst_store_id'] = (int)$storeId;
        }

        $data = $this->getConnection()->fetchAll($select, $bind);

        foreach ($data as $item) {
            $rating = $this->getItemById($item['rating_id']);
            if ($rating && $item['count'] > 0) {
                $rating->setSummary($item['sum'] / $item['count']);
            }
        }
        return $this;
    }

    /**
     * Add rating store name
     *
     * @param int $storeId
     * @return $this
     */
    public function addRatingPerStoreName($storeId)
    {
        $connection = $this->getConnection();
        $ratingCodeCond = $connection->getIfNullSql('title.value', 'main_table.rating_code');
        $this->getSelect()->joinLeft(
            ['title' => $this->getTable('rating_title')],
            $connection->quoteInto('main_table.rating_id=title.rating_id AND title.store_id = ?', (int)$storeId),
            ['rating_code' => $ratingCodeCond]
        );
        return $this;
    }

    /**
     * Add stores data to collection
     *
     * @return $this
     */
    public function addStoreData()
    {
        if (!$this->_storeManager->isSingleStoreMode()) {
            if (!$this->_isCollectionLoaded) {
                $this->_addStoreDataFlag = true;
            } elseif (!$this->_addStoreDataFlag) {
                $this->_addStoreData();
            }
        }

        return $this;
    }

    /**
     * Load data
     *
     * @param bool $printQuery
     * @param bool $logQuery
     * @return $this
     */
    public function load($printQuery = false, $logQuery = false)
    {
        if ($this->isLoaded()) {
            return $this;
        }
        $this->_eventManager->dispatch('rating_rating_collection_load_before', ['collection' => $this]);
        parent::load($printQuery, $logQuery);
        if ($this->_addStoreDataFlag) {
            $this->_addStoreData();
        }
        return $this;
    }

    /**
     * Add store data
     *
     * @return $this
     */
    protected function _addStoreData()
    {
        $ratingIds = [];
        foreach ($this as $item) {
            $ratingIds[] = $item->getId();
            $item->setStores([]);
        }
        if (!$ratingIds) {
            return $this;
        }
        $connection = $this->getConnection();

        $inCondition = $connection->prepareSqlCondition('rating_id', ['in' => $ratingIds]);

        $this->_select = $connection->select()->from($this->getTable('rating_store'))->where($inCondition);

        $data = $connection->fetchAll($this->_select);
        if (is_array($data) && count($data) > 0) {
            foreach ($data as $row) {
                $item = $this->getItemById($row['rating_id']);
                $item->setStores(array_merge($item->getStores(), [$row['store_id']]));
            }
        }
        return $this;
    }

    /**
     * Set Active Filter
     *
     * @param bool $isActive
     * @return $this
     */
    public function setActiveFilter($isActive = true)
    {
        $this->getSelect()->where('main_table.is_active=?', $isActive);
        return $this;
    }
}


text:
#ifndef QmlMitkDatamanger_h
#define QmlMitkDatamanger_h

#include "MitkQmlItemsExports.h"

#include <mitkDataStorage.h>
#include <QmitkDataStorageListModel.h>

#include <QQuickItem>

class MITKQMLITEMS_EXPORT QmlMitkDatamanager : public QQuickItem
{
    Q_OBJECT
    Q_PROPERTY(int index READ getIndex WRITE setIndex NOTIFY indexChanged);

private:
    int m_index;
    static QmitkDataStorageListModel* model;
    static mitk::DataStorage::Pointer storage;

public:
    static QmlMitkDatamanager* instance;

    int getIndex();
    void setIndex(int index);

    QmlMitkDatamanager();
    ~QmlMitkDatamanager();

    static void create(QQmlEngine &engine, mitk::DataStorage::Pointer storage);

public slots:
    void toggleVisibility(bool checked);
    void reinitNode();
    void globalReinit();
    void deleteNode();

signals:
    void indexChanged();
};

#endif


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http.OData.Query;
using Adxstudio.Xrm.Resources;
using Adxstudio.Xrm.Services.Query;
using Microsoft.Data.Edm;
using Microsoft.Data.Edm.Library;
using Microsoft.Data.OData;
using Microsoft.Data.OData.Query;
using Microsoft.Data.OData.Query.SemanticAst;
using Microsoft.Xrm.Sdk.Query;

namespace Adxstudio.Xrm.Web.Http.OData.FetchXml
{
	/// <summary>
	/// Provides operations to translate <see cref="System.Web.Http.OData.Query.ODataQueryOptions"/> <see cref="System.Web.Http.OData.Query.FilterQueryOption"/> to equivalent filters in FetchXml.
	/// </summary>
	public class FetchFilterBinder
	{
		private static bool _applyLogicalNegation;
		/// <summary>
		/// Bind the <see cref="FilterQueryOption"/> to a FetchXml Filter
		/// </summary>
		/// <param name="filterQueryOption"><see cref="FilterQueryOption"/></param>
		/// <returns><see cref="Filter"/></returns>
		public static Filter BindFilterQueryOption(FilterQueryOption filterQueryOption)
		{
			_applyLogicalNegation = false;
			return BindFilterClause(filterQueryOption.FilterClause);
		}

		protected static Filter BindFilterClause(FilterClause filterClause)
		{
			return Bind(filterClause.Expression);
		}

		protected static Filter Bind(QueryNode node)
		{
			var singleValueNode = node as SingleValueNode;

			if (singleValueNode != null)
			{
				switch (node.Kind)
				{
					case QueryNodeKind.BinaryOperator:
						return BindBinaryOperatorNode(node as BinaryOperatorNode);

					case QueryNodeKind.Convert:
						return BindConvertNode(node as ConvertNode);

					case QueryNodeKind.EntityRangeVariableReference:
						return null;

					case QueryNodeKind.NonentityRangeVariableReference:
						return null;

					case QueryNodeKind.UnaryOperator:
						return BindUnaryOperatorNode(node as UnaryOperatorNode);

					case QueryNodeKind.SingleValueFunctionCall:
						var condition = BindSingleValueFunctionCallNode(node as SingleValueFunctionCallNode);
						return new Filter { Conditions = new List<Condition> { condition } };
				}
			}

			throw new NotSupportedException(string.Format("Query Nodes of type {0} aren't supported.", node.Kind));
		}

		private static Condition BindSingleValueFunctionCallNode(SingleValueFunctionCallNode singleValueFunctionCallNode)
		{
			switch (singleValueFunctionCallNode.Name)
			{
				case "startswith":
					return BindStartsWith(singleValueFunctionCallNode);
				case "endswith":
					return BindEndsWith(singleValueFunctionCallNode);
				case "substringof":
					return BindSubstringof(singleValueFunctionCallNode);
				default:
					throw new NotSupportedException(string.Format("Function call {0} isn't supported.", singleValueFunctionCallNode.Name));
			}
		}

		private static Condition BindStartsWith(SingleValueFunctionCallNode singleValueFunctionCallNode)
		{
			var arguments = singleValueFunctionCallNode.Arguments.ToList();
			if (arguments.Count != 2)
			{
				throw new ODataException(string.Format("Invalid {0} function call. The 2 required parameters have not been specified.", singleValueFunctionCallNode.Name));
			}
			var condition = new Condition { Operator = _applyLogicalNegation ? ConditionOperator.NotLike : ConditionOperator.Like };
			var singleValuePropertyAccessNode = arguments[0] as SingleValuePropertyAccessNode;
			if (singleValuePropertyAccessNode == null)
			{
				throw new ODataException(string.Format("Invalid {0} function call. A valid property name must be specified as the {1} parameter.", singleValueFunctionCallNode.Name, "first"));
			}
			condition.Attribute = BindPropertyAccessQueryNode(singleValuePropertyAccessNode);
			var constantNode = arguments[1] as ConstantNode;
			if (constantNode == null)
			{
				throw new ODataException(string.Format("Invalid {0} function call. A valid string value must be specified as the {1} parameter.", singleValueFunctionCallNode.Name, "second"));
			}
			var value = BindConstantNode(constantNode);
			if (value == null)
			{
				throw new ODataException(string.Format("Invalid {0} function call. Null constant not applicable.", singleValueFunctionCallNode.Name));
			}
			condition.Value = string.Format("{0}%", value);
			return condition;
		}

		private static Condition BindEndsWith(SingleValueFunctionCallNode singleValueFunctionCallNode)
		{
			var arguments = singleValueFunctionCallNode.Arguments.ToList();
			if (arguments.Count != 2)
			{
				throw new ODataException(string.Format("Invalid {0} function call. The 2 required parameters have not been specified.", singleValueFunctionCallNode.Name));
			}
			var condition = new Condition { Operator = _applyLogicalNegation ? ConditionOperator.NotLike : ConditionOperator.Like };
			var singleValuePropertyAccessNode = arguments[0] as SingleValuePropertyAccessNode;
			if (singleValuePropertyAccessNode == null)
			{
				throw new ODataException(string.Format("Invalid {0} function call. A valid property name must be specified as the {1} parameter.", singleValueFunctionCallNode.Name, "first"));
			}
			condition.Attribute = BindPropertyAccessQueryNode(singleValuePropertyAccessNode);
			var constantNode = arguments[1] as ConstantNode;
			if (constantNode == null)
			{
				throw new ODataException(string.Format("Invalid {0} function call. A valid string value must be specified as the {1} parameter.", singleValueFunctionCallNode.Name, "second"));
			}
			var value = BindConstantNode(constantNode);
			if (value == null)
			{
				throw new ODataException(string.Format("Invalid {0} function call. Null constant not applicable.", singleValueFunctionCallNode.Name));
			}
			condition.Value = string.Format("%{0}", value);
			return condition;
		}

		private static Condition BindSubstringof(SingleValueFunctionCallNode singleValueFunctionCallNode)
		{
			var arguments = singleValueFunctionCallNode.Arguments.ToList();
			if (arguments.Count != 2)
			{
				throw new ODataException(string.Format("Invalid {0} function call. The 2 required parameters have not been specified.", singleValueFunctionCallNode.Name));
			}
			var condition = new Condition { Operator = _applyLogicalNegation ? ConditionOperator.NotLike : ConditionOperator.Like };
			var singleValuePropertyAccessNode = arguments[1] as SingleValuePropertyAccessNode;
			if (singleValuePropertyAccessNode == null)
			{
				throw new ODataException(string.Format("Invalid {0} function call. A valid property name must be specified as the {1} parameter.", singleValueFunctionCallNode.Name, "second"));
			}
			condition.Attribute = BindPropertyAccessQueryNode(singleValuePropertyAccessNode);
			var constantNode = arguments[0] as ConstantNode;
			if (constantNode == null)
			{
				throw new ODataException(string.Format("Invalid {0} function call. A valid string value must be specified as the {1} parameter.", singleValueFunctionCallNode.Name, "first"));
			}
			var value = BindConstantNode(constantNode);
			if (value == null)
			{
				throw new ODataException(string.Format("Invalid {0} function call. Null constant not applicable.", singleValueFunctionCallNode.Name));
			}
			condition.Value = string.Format("%{0}%", value);
			return condition;
		}

		private static Filter BindUnaryOperatorNode(UnaryOperatorNode unaryOperatorNode)
		{
			switch (unaryOperatorNode.OperatorKind)
			{
				case UnaryOperatorKind.Negate:
					throw new NotSupportedException("The Negate arithmetic operator isn't supported.");
				case UnaryOperatorKind.Not:
					_applyLogicalNegation = true;
					break;
				default:
					throw new NotSupportedException("Unknown UnaryOperatorKind.");
			}

			return Bind(unaryOperatorNode.Operand);
		}

		private static string BindPropertyAccessQueryNode(SingleValuePropertyAccessNode singleValuePropertyAccessNode)
		{
			if (singleValuePropertyAccessNode.Source.TypeReference.Definition.TypeKind == EdmTypeKind.Complex)
			{
				var type = singleValuePropertyAccessNode.Source.TypeReference.Definition as EdmComplexType;

				if (type == null)
				{
					return singleValuePropertyAccessNode.Property.Name;
				}

				switch (type.Name)
				{
					case "OptionSet":
					case "EntityReference":
						if (singleValuePropertyAccessNode.Property.Name == "Name")
						{
							throw new ODataException(string.Format("Equality comparison on Complex type {0} property {1} isn't supported.", type.Name, singleValuePropertyAccessNode.Property.Name));
						}
						var sourceSingleValuePropertyAccessNode = singleValuePropertyAccessNode.Source as SingleValuePropertyAccessNode;
						if (sourceSingleValuePropertyAccessNode != null)
						{
							return sourceSingleValuePropertyAccessNode.Property.Name;
						}
						break;
				}
			}

			return singleValuePropertyAccessNode.Property.Name;
		}

		private static object BindConstantNode(ConstantNode constantNode)
		{
			return constantNode.Value;
		}

		private static Filter BindConvertNode(ConvertNode convertNode)
		{
			return Bind(convertNode.Source);
		}

		private static Filter BindBinaryOperatorNode(BinaryOperatorNode binaryOperatorNode)
		{
			var filter = new Filter();

			switch (binaryOperatorNode.OperatorKind)
			{
				case BinaryOperatorKind.And:
					filter.Type = !_applyLogicalNegation ? LogicalOperator.And : LogicalOperator.Or;
					break;
				case BinaryOperatorKind.Or:
					filter.Type = !_applyLogicalNegation ? LogicalOperator.Or : LogicalOperator.And;
					break;
				default:
					filter.Type = !_applyLogicalNegation ? LogicalOperator.And : LogicalOperator.Or;
					break;
			}

			if (binaryOperatorNode.Left is SingleValuePropertyAccessNode)
			{
				filter.Conditions = new List<Condition> { CreateBinaryCondition(binaryOperatorNode) };
			}
			else
			{
				var left = Bind(binaryOperatorNode.Left);
				var right = Bind(binaryOperatorNode.Right);

				if (filter.Filters == null)
				{
					filter.Filters = new List<Filter> { left, right };
				}
				else
				{
					filter.Filters.Add(left);
					filter.Filters.Add(right);
				}
			}

			return filter;
		}

		private static Condition CreateBinaryCondition(BinaryOperatorNode binaryOperatorNode)
		{
			if (binaryOperatorNode.OperatorKind == BinaryOperatorKind.And || binaryOperatorNode.OperatorKind == BinaryOperatorKind.Or)
			{
				throw new ODataException(string.Format("A binary condition cannot be created when OperatorKind is of type {0}", binaryOperatorNode.OperatorKind));
			}
			var condition = new Condition();
			var singleValuePropertyAccessNode = binaryOperatorNode.Left as SingleValuePropertyAccessNode;
			condition.Attribute = BindPropertyAccessQueryNode(singleValuePropertyAccessNode);
			object value;
			if (binaryOperatorNode.Right is ConvertNode)
			{
				var convertNode = binaryOperatorNode.Right as ConvertNode;
				var constantNode = convertNode.Source;
				value = BindConstantNode(constantNode as ConstantNode);
			}
			else
			{
				value = BindConstantNode(binaryOperatorNode.Right as ConstantNode);
			}
			if (value == null)
			{
				// OData has a null literal for equality comparison, FetchXml requires either that the Null or NotNull operator is specified without a value parameter on the condition
				switch (binaryOperatorNode.OperatorKind)
				{
					case BinaryOperatorKind.Equal:
						condition.Operator = !_applyLogicalNegation ? ConditionOperator.Null : ConditionOperator.NotNull;
						break;
					case BinaryOperatorKind.NotEqual:
						condition.Operator = !_applyLogicalNegation ? ConditionOperator.NotNull : ConditionOperator.Null;
						break;
					default:
						throw new ODataException(string.Format("The operator {0} isn't supported for the null literal. Only equality checks are supported.", binaryOperatorNode.OperatorKind));
				}
			}
			else
			{
				condition.Operator = ToConditionOperator(binaryOperatorNode.OperatorKind);
				condition.Value = value;
			}
			return condition;
		}

		private static ConditionOperator ToConditionOperator(BinaryOperatorKind binaryOperator)
		{
			switch (binaryOperator)
			{
				case BinaryOperatorKind.Equal:
					return !_applyLogicalNegation ? ConditionOperator.Equal : ConditionOperator.NotEqual;
				case BinaryOperatorKind.NotEqual:
					return !_applyLogicalNegation ? ConditionOperator.NotEqual : ConditionOperator.Equal;
				case BinaryOperatorKind.GreaterThan:
					return !_applyLogicalNegation ? ConditionOperator.GreaterThan : ConditionOperator.LessEqual;
				case BinaryOperatorKind.GreaterThanOrEqual:
					return !_applyLogicalNegation ? ConditionOperator.GreaterEqual : ConditionOperator.LessThan;
				case BinaryOperatorKind.LessThan:
					return !_applyLogicalNegation ? ConditionOperator.LessThan : ConditionOperator.GreaterEqual;
				case BinaryOperatorKind.LessThanOrEqual:
					return !_applyLogicalNegation ? ConditionOperator.LessEqual : ConditionOperator.GreaterThan;
				case BinaryOperatorKind.Add:
				case BinaryOperatorKind.Subtract:
				case BinaryOperatorKind.Multiply:
				case BinaryOperatorKind.Divide:
				case BinaryOperatorKind.Modulo:
					throw new NotSupportedException("Arithmetic operators aren't supported.");
				case BinaryOperatorKind.And:
					throw new ODataException("The And operator isn't an applicable equality comparison operator.");
				case BinaryOperatorKind.Or:
					throw new ODataException("The OR operator isn't an applicable equality comparison operator.");
				default:
					throw new NotSupportedException("Unknown operator.");
			}
		}
	}
}


text:
package io.hops.security;

import com.google.common.annotations.VisibleForTesting;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.util.ReflectionUtils;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;

/**
 * Factory for SecurityActions.
 * Depending on the client it will create a *single* instance of FsSecurityActions
 * or RMAppSecurityActions
 */
public final class HopsSecurityActionsFactory<ACTOR extends AbstractSecurityActions> {

  private static final Log LOG = LogFactory.getLog(HopsSecurityActionsFactory.class.getName());

  private static volatile HopsSecurityActionsFactory _INSTANCE;
  private final Map<String, ACTOR> actors;

  private HopsSecurityActionsFactory() {
    actors = new ConcurrentHashMap<>(2);
  }

  public static HopsSecurityActionsFactory getInstance() {
    if (_INSTANCE == null) {
      synchronized (HopsSecurityActionsFactory.class) {
        if (_INSTANCE == null) {
          _INSTANCE = new HopsSecurityActionsFactory();
        }
      }
    }
    return _INSTANCE;
  }

  public ACTOR getActor(final Configuration conf, final String actorClass) throws Exception {
    ACTOR actor = actors.computeIfAbsent(actorClass, new Function<String, ACTOR>() {
      @Override
      public ACTOR apply(String s) {
        LOG.debug("Creating new actor for: " + actorClass);
        return createActor(conf, s);
      }
    });
    if (actor != null) {
      return actor;
    }
    throw new RuntimeException("Could not load class " + actorClass);
  }

  private ACTOR createActor(Configuration conf, String actorClass) {
    try {
      Class<?> clazz = conf.getClassByName(actorClass);
      if (clazz != null && !AbstractSecurityActions.class.isAssignableFrom(clazz)) {
        throw new RuntimeException(clazz + " is not " + AbstractSecurityActions.class);
      }
      ACTOR actor = (ACTOR) ReflectionUtils.newInstance(clazz, conf);
      actor.init(conf);
      actor.start();
      return actor;
    } catch (ClassNotFoundException ex) {
      return null;
    }
  }

  @VisibleForTesting
  public synchronized void clear(String actorClass) {
    ACTOR actor = actors.remove(actorClass);
    if (actor != null) {
      LOG.debug("Removing and stopping actor: " + actorClass);
      actor.stop();
    }
  }

  @VisibleForTesting
  public void register(String actorClass, ACTOR actor) {
    actors.put(actorClass, actor);
  }
}


text:
import styled from 'styled-components';

const List = styled.ul`
  padding-left: 1.75em;
`;

export default List;


text:
function DirectoryWalker(fs, path) {
  this.fs = fs;
  this.path = path;
}

DirectoryWalker.prototype.walk = function(baseDirectory, callback) {
  var absoluteBaseDirectory = this.path.resolve(baseDirectory);
  var isDirectory = this.fs.statSync(absoluteBaseDirectory).isDirectory();

  if (!isDirectory) {
    throw new Error("Path \"" + baseDirectory + "\"is not a directory.")
  }

  this.recursiveWalk(absoluteBaseDirectory, absoluteBaseDirectory, function(fileInfo) {
    callback({
      baseDirectory: baseDirectory,
      relativePath: fileInfo.relativePath,
      absolutePath: fileInfo.absolutePath,
      isDirectory: fileInfo.isDirectory
    });
  });
};

DirectoryWalker.prototype.recursiveWalk = function(baseDirectory, currentDirectory, callback) {

  var children = this.fs.readdirSync(currentDirectory);

  for (var index in children) {
    var childFileName = children[index];

    var absoluteChildPath = this.path.join(currentDirectory, childFileName);
    var isChildDirectory = this.fs.statSync(absoluteChildPath).isDirectory();

    var relativeChildPath = this.path.relative(baseDirectory, absoluteChildPath);

    callback({
      baseDirectory: baseDirectory,
      relativePath: relativeChildPath,
      absolutePath: absoluteChildPath,
      isDirectory: isChildDirectory
    });

    if (isChildDirectory) {
      this.recursiveWalk(baseDirectory, absoluteChildPath, callback);
    }
  }
}

/* exports */
module.exports = DirectoryWalker;


text:
var Duplex = require('stream').Duplex
var inherits = require('inherits')

module.exports = function(pulsesize) {
  var self = this
  Duplex.call(self)
  this.pulsesize = pulsesize
}

inherits(module.exports, Duplex)

module.exports.prototype._write = function(chunk, enc, next) {

  if(enc != 'buffer') {
    next(new Error("Unencoded strings are not currently supported"))
    return;
  }

  //Add to internal buffer
  if(Buffer.isBuffer(this.queued)) {
    this.queued = Buffer.concat([this.queued, chunk])
  }
  else {
    this.queued = chunk
  }
  next()
}

module.exports.prototype.pulse = function() {
  if(this.queued === null) {
    this.push(null)
    return;
  }
  if(this.queued)
  {
    if(this.pulsesize) {
      if(Buffer.isBuffer(this.ready))
        this.ready = Buffer.concat([this.ready, this.queued.slice(0, this.pulsesize)])
      else
        this.ready = this.queued.slice(0, this.pulsesize)
      this.queued = this.queued.slice(this.pulsesize)
    }
    else {
      //Prepare all pushed data
      if(Buffer.isBuffer(this.ready))
        this.ready = Buffer.concat([this.ready, this.queued])
      else
        this.ready = this.queued
      this.queued = undefined
    }
    //If we're currently being read from, push data
    if(this.reading)
    {
      this.reading = this.push(this.ready)
      this.ready = null
    }
  }
}

module.exports.prototype._read = function(size) {
  this.reading = true
}


text:
<?php

return array(
	'Select' => 'Seleccionar',
	'Deselect_All' => 'Deselect All',
	'Select_All' => 'Select All',
	'Erase' => 'Eliminar',
	'Open' => 'Obrir',
	'Confirm_del' => 'Segur que desitges eliminar aquest arxiu?',
	'All' => 'Tots',
	'Files' => 'Arxius',
	'Images' => 'Imatges',
	'Archives' => 'Fitxers',
	'Error_Upload' => 'L\'arxiu que intenta pujar excedeix el màxim permès.',
	'Error_extension' => 'L\'extensió de l\'arxiu no està permesa.',
	'Upload_file' => 'Pujar',
	'Filters' => 'Filtres',
	'Videos' => 'Vídeos',
	'Music' => 'Musica',
	'New_Folder' => 'Nova carpeta',
	'Folder_Created' => 'La carpeta ha estat creada exitosament.',
	'Existing_Folder' => 'Carpeta existent',
	'Confirm_Folder_del' => 'Segur que desitges eliminar la carpeta i tots els elements que conté?',
	'Return_Files_List' => 'Tornar a la llista d\'arxius',
	'Preview' => 'Vista prèvia',
	'Download' => 'Descarregar',
	'Insert_Folder_Name' => 'Nom de la carpeta:',
	'Root' => 'Arrel',
	'Rename' => 'Renombrar',
	'Back' => 'Tornar',
	'View' => 'Vista',
	'View_list' => 'Vista de llista',
	'View_columns_list' => 'Vista de columnes',
	'View_boxes' => 'Vista de miniatures',
	'Toolbar' => 'Barra d\'eines',
	'Actions' => 'Accions',
	'Rename_existing_file' => 'L\'arxiu ja existeix',
	'Rename_existing_folder' => 'La carpeta ja existeix',
	'Empty_name' => 'El nom es troba buit',
	'Text_filter' => 'filtre de text',
	'Swipe_help' => 'Deslize el nom de l\'arxiu/carpeta per mostrar les opcions',
	'Upload_base' => 'Pujada d\'arxius SIMPLE',
	'Upload_java' => 'Pujada d\'arxius JAVA (para arxius pesats)',
	'Upload_url' => 'URL',
	'Upload_java_help' => "Si el applet no carrega: 1. Assegura't de tenir Java instal·lat; sinó descarrega-ho i instal·la-ho des d'aquí 2. Assegura't que el teu firewall no estigui bloquejant res.",
	'Upload_base_help' => "Arrossega i deixa anar els arxius dins d'aquesta àrea o faci clic en ella (per a navegadors moderns) en cas contrari, seleccioni l'arxiu i faci clic en el botó. Quan finalitzi la pujada, faci clic en el botó superior per tornar.",
	'Type_dir' => 'Carpeta',
	'Type' => 'Tipus',
	'Dimension' => 'Dimensions',
	'Size' => 'Pes',
	'Date' => 'Data',
	'Filename' => 'Nom',
	'Operations' => 'Operacions',
	'Date_type' => 'd-m-y',
	'OK' => 'OK',
	'Cancel' => 'Cancel·lar',
	'Sorting' => 'Ordenar',
	'Show_url' => 'Mostrar URL',
	'Extract' => 'Extreure aquí',
	'File_info' => 'Informació',
	'Edit_image' => 'Editar imatge',
	'Duplicate' => 'Duplicar',
	'Folders' => 'Carpetes',
	'Copy' => 'Copiar',
	'Cut' => 'Tallar',
	'Paste' => 'Enganxar',
	'CB' => 'CB', // clipboard
	'Paste_Here' => 'Enganxar en aquest directori',
	'Paste_Confirm' => 'Esteu segur que voleu enganxar en aquest directori? Això sobreescriurà arxius/carpetes existents si es troba cap igual.',
	'Paste_Failed' => 'No s'ha pogut enganxar els fitxers.',
	'Clear_Clipboard' => 'Netejar portapapers',
	'Clear_Clipboard_Confirm' => 'Esteu segur que voleu esborrar el portapapers?',
	'Files_ON_Clipboard' => 'Hi ha arxius al Portapapers.',
	'Copy_Cut_Size_Limit' => 'Els arxius/carpetes seleccionades són massa grans per %s. Limit: %d MB/operació', // %s = cut or copy
	'Copy_Cut_Count_Limit' => 'Heu seleccionat massa fitxers/carpetes a %s. Limit: %d arxiu/operació', // %s = cut or copy
	'Copy_Cut_Not_Allowed' => 'No te permisos per %s els arxius.', // %s(1) = cut or copy, %s(2) = files or folders
	'Aviary_No_Save' => 'No s'ha pogut desar la imatge.',
	'Zip_No_Extract' => 'No es pot extreure. L'Arxiu podria estar corrupte.',
	'Zip_Invalid' => 'Aquesta extensió no és suportada. Vàlid: zip, gz, tar.',
	'Dir_No_Write' => 'El directori seleccionat no te permisos d'escriptura.',
	'Function_Disabled' => 'La funció de %s no esta disponible al servidor.', // %s = cut or copy
	'File_Permission' => 'Permisos d'arxiu',
	'File_Permission_Not_Allowed' => 'La modificació dels permisos de %s no es permès.', // %s = files or folders
	'File_Permission_Recursive' => 'Aplicar recursivament?',
	'File_Permission_Wrong_Mode' => "El mode de permís subministrat és incorrecte..",
	'User' => 'Usuari',
	'Group' => 'Grup',
	'Yes' => 'Si',
	'No' => 'No',
	'Lang_Not_Found' => 'No es pot trobar l\'idioma.',
	'Lang_Change' => 'Modificar idioma',
	'File_Not_Found' => 'No s\'ha pogut trobar l\'arxiu.',
	'File_Open_Edit_Not_Allowed' => 'No tens permisos per obrir %s l\'arxiu.', // %s = open or edit
	'Edit' => 'Modificar',
	'Edit_File' => "Editar el contingut de l\'arxiu.",
	'File_Save_OK' => "Arxiu desat correctament.",
	'File_Save_Error' => "Hi ha hagut un error mentre es desava l\'arxiu.",
	'New_File' => 'Nou arxiu',
	'No_Extension' => 'Ha d\'afegir una extensió d\'arxiu.',
	'Valid_Extensions' => 'Extensions valides: %s', // %s = txt,log etc.
	'Upload_message' => "Arrossega arxiu aquí per carregar.",

	'SERVER ERROR' => "SERVER ERROR",
	'forbiden' => "Forbiden",
	'wrong path' => "Wrong path",
	'wrong name' => "Wrong name",
	'wrong extension' => "Wrong extension",
	'wrong option' => "Wrong option",
	'wrong data' => "Wrong data",
	'wrong action' => "Wrong action",
	'wrong sub-action' => "Wrong sub-actio",
	'no action passed' => "No action passed",
	'no path' => "No path",
	'no file' => "No file",
	'view type number missing' => "View type number missing",
	'Not enought Memory' => "Not enought Memory",
	'max_size_reached' => "Your image folder has reach its maximale size of %d MB.", //%d = max overall size
	'B' => "B",
	'KB' => "KB",
	'MB' => "MB",
	'GB' => "GB",
	'TB' => "TB",
	'total size' => "Total size",
);


text:
/*
 * Created on 21 Nov 2006
 */
package org.sakaiproject.lessonbuildertool.util;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;

import org.sakaiproject.rsf.copies.Web;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.web.context.WebApplicationContext;

import uk.org.ponder.rsf.viewstate.BaseURLProvider;
import uk.org.ponder.rsf.viewstate.support.StaticBaseURLProvider;
import uk.org.ponder.servletutil.ServletUtil;

public class SakaiBaseURLProviderFactory implements ApplicationContextAware, FactoryBean {
  private HttpServletRequest request;

  private WebApplicationContext wac;

  public void setApplicationContext(ApplicationContext applicationContext) {
    wac = (WebApplicationContext) applicationContext;
  }

  public void setHttpServletRequest(HttpServletRequest request) {
    this.request = request;
  }

  private String resourceurlbase;

  // Sakai is a very poor URL environment, where the return from
  // req.getRequestURL() may not actually be valid to access this server.
  // This method adjusts the  protocol and port from a "correctly" computed
  // URL to be closer to reality, via the hackery from Sakai "Web" utils.
  public static String fixSakaiURL(HttpServletRequest req, String computed) {
    String serverURL = Web.serverUrl(req);
    int endprotpos = computed.indexOf("://");
    int slashpos = computed.indexOf('/', endprotpos + 3);
    return serverURL + computed.substring(slashpos);
  }

  public StaticBaseURLProvider computeBaseURLProvider(HttpServletRequest request) {
    ServletContext servletcontext = wac.getServletContext();
    // yes, these two fields are not request-scope, but not worth creating
    // a whole new class and bean file for them.
    resourceurlbase = servletcontext.getInitParameter("resourceurlbase");
    if (resourceurlbase == null) {
      resourceurlbase = ServletUtil.computeContextName(servletcontext);
    }

    // compute the baseURLprovider.
    StaticBaseURLProvider sbup = new StaticBaseURLProvider();
    String baseurl = fixSakaiURL(request, ServletUtil.getBaseURL2(request));
    String requestURL = request.getRequestURL().toString();
    int i = requestURL.indexOf("/tool/");
    if (i >= 0) {
	i = requestURL.indexOf("/", i+6);
	if (i >= 0)
	    baseurl = fixSakaiURL(request, requestURL.substring(0, i+1));
	else
	    baseurl = fixSakaiURL(request, requestURL + "/");
    }
    //    baseurl = fixSakaiURL(request, "http://heidelberg.rutgers.edu:8081/portal/pda/c6aff0ca-08fc-4f31-905c-ac1019e814cf/tool/54f34afe-b6f8-4218-a1f5-182edff331de/");
    sbup.setResourceBaseURL(computeResourceURLBase(baseurl));
//    baseurl += SakaiEarlyRequestParser.FACES_PATH + "/";
    sbup.setBaseURL(baseurl);
    return sbup;
  }

  // The argument to this is what Sakai "claims" is our base URL. The true
  // resource URL will be somewhat unrelated in that it will share (at most)
  // the host name and port of this URL.
  private String computeResourceURLBase(String baseurl) {
    if (resourceurlbase.charAt(0) == '/') {
      int endprotpos = baseurl.indexOf("://");
      int firstslashpos = baseurl.indexOf('/', endprotpos + 3);
      return baseurl.substring(0, firstslashpos) + resourceurlbase;
    }
    else { // it is an absolute URL
      return resourceurlbase;
    }
  }

  public Object getObject() throws Exception {
    return computeBaseURLProvider(request);
  }

  public Class getObjectType() {
    return BaseURLProvider.class;
  }

  public boolean isSingleton() {
    return true;
  }

}


text:
Complete the steps described in the [Drive V3 Python Quickstart](
https://developers.google.com/drive/v3/web/quickstart/python), and in
about five minutes you'll have a simple Python command-line application that
makes requests to the Drive V3 API.

## Prerequisites
- Python
- Create a project
- Activate the Drive API in the Google API Console([the detail page](https://developers.google.com/workspace/guides/create-project))
- Create a OAuth client ID credential and download the json file ([the detail page](https://developers.google.com/workspace/guides/create-credentials))
- Rename the json file

## Install

```shell
pip install -r requirements.txt
```

## Run

```shell
python quickstart.py
```


text:
using System;
using System.Runtime.InteropServices;
using Codeer.Friendly;
using Codeer.Friendly.Inside.Protocol;
using Codeer.Friendly.Inside;
using Codeer.Friendly.Store.Core;

namespace Codeer.Friendly.Store.Core.CopyDataProtocol
{
	/// <summary>
	/// Windowメッセージ通信。
	/// </summary>
	public static class CopyDataProtocolTalker
	{
		/// <summary>
		/// 送受信。
		/// </summary>
		/// <param name="targetWindowHandle">送信対象ウィンドウハンドル。</param>
		/// <param name="data">送信データ。</param>
		/// <returns>受信データ。</returns>
        public static object SendAndRecieve(IntPtr targetWindowHandle, object data)
		{
			using(ReceiveAfterSend recieveWindow = new ReceiveAfterSend())
            {
				return SendAndRecieve(targetWindowHandle, data, recieveWindow);
			}
		}

		/// <summary>
		/// 送受信。
		/// </summary>
		/// <param name="targetWindowHandle">送信対象ウィンドウハンドル。</param>
		/// <param name="data">送信データ。</param>
		/// <param name="recieveWindow">受信ウィンドウ。</param>
		/// <returns>受信データ。</returns>
        public static object SendAndRecieve(IntPtr targetWindowHandle, object data, ReceiveAfterSend recieveWindow)
		{
            //通信番号生成
            int communicationNo = 0;
            if (!recieveWindow.UniqueNoManager.CreateNo(out communicationNo))
            {
                throw new InformationException(ResourcesLocal.Instance.OutOfCommunicationNo);
            }

            //使用可能なスレッドであるかチェック
            if (!recieveWindow.CanUseThread)
            {
                throw new FriendlyOperationException(ResourcesLocal.Instance.ErrorInvalidThreadCall);
            }

            //送受信
            IntPtr globalData = IntPtr.Zero;
            try
			{
				//通信データ作成
				CopyDataProtocolInfo communicationData = new CopyDataProtocolInfo(recieveWindow.Handle, data);

				//シリアライズ
				byte[] bin = communicationData.Serialize();

				//WM_COPYDATAでの送信用構造体に移し替え
				NativeMethods.COPYDATASTRUCT copyData = new NativeMethods.COPYDATASTRUCT();
				copyData.dwData = IntPtr.Zero;
				copyData.cbData = (uint)bin.Length;
				copyData.lpData = globalData = Marshal.AllocHGlobal(bin.Length);
				Marshal.Copy(bin, 0, copyData.lpData, bin.Length);

				//送信
				IntPtr sendRet = NativeMethods.SendMessage(targetWindowHandle, NativeMethods.WM_COPYDATA, new IntPtr(communicationNo), ref copyData);
				if (sendRet != ReceiveForm.SendCopyDataSuccess)
				{
					throw new FriendlyOperationException(ResourcesLocal.Instance.ErrorAppCommunication);
				}

				//受信データ取得
                object receiveData;
                if (!recieveWindow.GetReceiveData(communicationNo, out receiveData))
                {
                    throw new FriendlyOperationException(ResourcesLocal.Instance.ErrorAppCommunication);
                }
                return receiveData;
			}
			finally
			{
				//グローバルメモリ解放
				if (globalData != IntPtr.Zero)
				{
					Marshal.FreeHGlobal(globalData);
				}
                recieveWindow.UniqueNoManager.FreeNo(communicationNo);
			}
		}
	}
}


text:
<?php

namespace yii\helpers;

use yii\base\InvalidConfigException;

/**
 * Object that represents the replacement of array value while performing [[ArrayHelper::merge()]].
 *
 * Usage example:
 *
 * ```php
 * $array1 = [
 *     'ids' => [
 *         1,
 *     ],
 *     'validDomains' => [
 *         'example.com',
 *         'www.example.com',
 *     ],
 * ];
 *
 * $array2 = [
 *     'ids' => [
 *         2,
 *     ],
 *     'validDomains' => new \yii\helpers\ReplaceArrayValue([
 *         'yiiframework.com',
 *         'www.yiiframework.com',
 *     ]),
 * ];
 *
 * $result = \yii\helpers\ArrayHelper::merge($array1, $array2);
 * ```
 *
 * The result will be
 *
 * ```php
 * [
 *     'ids' => [
 *         1,
 *         2,
 *     ],
 *     'validDomains' => [
 *         'yiiframework.com',
 *         'www.yiiframework.com',
 *     ],
 * ]
 * ```
 *
 * @author Robert Korulczyk <robert@korulczyk.pl>
 * @since 2.0.10
 */
class ReplaceArrayValue
{
    /**
     * @var mixed value used as replacement.
     */
    public $value;

    /**
     * Constructor.
     * @param mixed $value value used as replacement.
     */
    public function __construct($value)
    {
        $this->value = $value;
    }

    /**
     * Restores class state after using `var_export()`.
     *
     * @param array $state
     * @return ReplaceArrayValue
     * @throws InvalidConfigException when $state property does not contain `value` parameter
     * @see https://www.php.net/manual/en/function.var-export.php
     * @since 2.0.16
     */
    public static function __set_state($state)
    {
        if (!isset($state['value'])) {
            throw new InvalidConfigException('Failed to instantiate class "ReplaceArrayValue". Required parameter "value" is missing');
        }

        return new self($state['value']);
    }
}