text:
package cn.addapp.androidpickers;

import android.content.Intent;
import android.view.Gravity;
import android.view.View;
import android.widget.Toast;

import com.alibaba.fastjson.JSON;

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import cn.addapp.androidpicker.R;
import cn.addapp.pickers.common.LineConfig;
import cn.addapp.pickers.entity.City;
import cn.addapp.pickers.entity.County;
import cn.addapp.pickers.entity.Province;
import cn.addapp.pickers.listeners.OnItemPickListener;
import cn.addapp.pickers.listeners.OnLinkageListener;
import cn.addapp.pickers.listeners.OnMoreItemPickListener;
import cn.addapp.pickers.listeners.OnSingleWheelListener;
import cn.addapp.pickers.picker.AddressPicker;
import cn.addapp.pickers.picker.DatePicker;
import cn.addapp.pickers.picker.DateTimePicker;
import cn.addapp.pickers.picker.LinkagePicker;
import cn.addapp.pickers.picker.NumberPicker;
import cn.addapp.pickers.picker.SinglePicker;
import cn.addapp.pickers.picker.TimePicker;
import cn.addapp.pickers.util.ConvertUtils;
import cn.addapp.pickers.util.DateUtils;
import cn.addapp.pickers.util.LogUtils;
/**
 * @author matt
 * blog: addapp.cn
 */
public class MainActivity extends BaseActivity {

    @Override
    protected View getContentView() {
        return inflateView(R.layout.activity_main);
    }

    @Override
    protected void setContentViewAfter(View contentView) {

    }

    @Override
    public void onBackPressed() {
        AppManager.getInstance().exitApp();
    }

    private void showToast(String msg) {
        Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();
    }

    public void onNestView(View view) {
        startActivity(new Intent(this, NextActivity.class));
    }

    public void onAnimationStyle(View view) {
        NumberPicker picker = new NumberPicker(this);
        picker.setAnimationStyle(R.style.Animation_CustomPopup);
        picker.setCanLoop(false);
        picker.setOffset(2);//偏移量
        picker.setRange(10.5, 20, 1.5);//数字范围
        picker.setSelectedItem(18.0);
        picker.setLabel("℃");
        picker.setOnNumberPickListener(new NumberPicker.OnNumberPickListener() {
            @Override
            public void onNumberPicked(int index, Number item) {
                showToast("index=" + index + ", item=" + item.doubleValue());
            }
        });
        picker.show();
    }

    public void onAnimator(View view) {
        CustomPicker picker = new CustomPicker(this);
        picker.setOffset(1);//显示的条目的偏移量,条数为(offset*2+1)
        picker.setGravity(Gravity.CENTER);//居中
        picker.setOnItemPickListener(new OnItemPickListener<String>() {
            @Override
            public void onItemPicked(int position, String option) {
                showToast("index=" + position + ", item=" + option);
            }
        });
        picker.show();
    }

    public void onYearMonthDayPicker(View view) {
        final DatePicker picker = new DatePicker(this);
        picker.setCanLoop(false);
        picker.setWheelModeEnable(true);
        picker.setTopPadding(15);
        picker.setRangeStart(2016, 8, 29);
        picker.setRangeEnd(2111, 1, 11);
        picker.setSelectedItem(2050, 10, 14);
        picker.setWeightEnable(true);
        picker.setOnDatePickListener(new DatePicker.OnYearMonthDayPickListener() {
            @Override
            public void onDatePicked(String year, String month, String day) {
                showToast(year + "-" + month + "-" + day);
            }
        });
        picker.setOnWheelListener(new DatePicker.OnWheelListener() {
            @Override
            public void onYearWheeled(int index, String year) {
                picker.setTitleText(year + "-" + picker.getSelectedMonth() + "-" + picker.getSelectedDay());
            }

            @Override
            public void onMonthWheeled(int index, String month) {
                picker.setTitleText(picker.getSelectedYear() + "-" + month + "-" + picker.getSelectedDay());
            }

            @Override
            public void onDayWheeled(int index, String day) {
                picker.setTitleText(picker.getSelectedYear() + "-" + picker.getSelectedMonth() + "-" + day);
            }
        });
        picker.show();
    }

    public void onYearMonthDayTimePicker(View view) {
        DateTimePicker picker = new DateTimePicker(this, DateTimePicker.HOUR_24);
        picker.setDateRangeStart(2017, 1, 1);
        picker.setDateRangeEnd(2025, 11, 11);
        picker.setTimeRangeStart(9, 0);
        picker.setTimeRangeEnd(20, 30);
        picker.setWeightEnable(true);
        picker.setWheelModeEnable(true);
        picker.setOnDateTimePickListener(new DateTimePicker.OnYearMonthDayTimePickListener() {
            @Override
            public void onDateTimePicked(String year, String month, String day, String hour, String minute) {
                showToast(year + "-" + month + "-" + day + " " + hour + ":" + minute);
            }
        });
        picker.show();
    }

    public void onYearMonthPicker(View view) {
        DatePicker picker = new DatePicker(this, DatePicker.YEAR_MONTH);
        picker.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
        picker.setWidth((int) (picker.getScreenWidthPixels() * 0.6));
        picker.setRangeStart(2016, 10, 14);
        picker.setRangeEnd(2020, 11, 11);
        picker.setSelectedItem(2017, 9);
        picker.setWeightEnable(true);
        picker.setWheelModeEnable(true);
        picker.setOnDatePickListener(new DatePicker.OnYearMonthPickListener() {
            @Override
            public void onDatePicked(String year, String month) {
                showToast(year + "-" + month);
            }
        });
        picker.show();
    }

    public void onMonthDayPicker(View view) {
        DatePicker picker = new DatePicker(this, DatePicker.MONTH_DAY);
        picker.setGravity(Gravity.CENTER);//弹框居中
        picker.setWeightEnable(true);
        picker.setRangeStart(5, 1);
        picker.setRangeEnd(12, 31);
        picker.setSelectedItem(10, 14);
        picker.setWheelModeEnable(false);
        picker.setOnDatePickListener(new DatePicker.OnMonthDayPickListener() {
            @Override
            public void onDatePicked(String month, String day) {
                showToast(month + "-" + day);
            }
        });
        picker.show();
    }

    public void onTimePicker(View view) {
        TimePicker picker = new TimePicker(this, TimePicker.HOUR_24);
        picker.setRangeStart(9, 0);//09:00
        picker.setRangeEnd(18, 0);//18:30
        picker.setTopLineVisible(false);
        picker.setLineVisible(false);
        picker.setWheelModeEnable(false);
        picker.setOnTimePickListener(new TimePicker.OnTimePickListener() {
            @Override
            public void onTimePicked(String hour, String minute) {
                showToast(hour + ":" + minute);
            }
        });
        picker.show();
    }

    public void onOptionPicker(View view) {
        ArrayList<String> list = new ArrayList<>();
        for(int i = 0;i<60; i++){
            String s = "";
            if(i<10){
                s = "0"+i;
            }else{
                s = i+"";
            }
            list.add(s);
        }
//        String[] ss = (String[]) list.toArray();
        SinglePicker<String> picker = new SinglePicker<>(this, list);
        picker.setCanLoop(false);//不禁用循环
        picker.setLineVisible(true);
        picker.setShadowVisible(true);
        picker.setTextSize(18);
        picker.setSelectedIndex(1);
        picker.setWheelModeEnable(true);
        //启用权重 setWeightWidth 才起作用
        picker.setLabel("分");
        picker.setWeightEnable(true);
        picker.setWeightWidth(1);
        picker.setSelectedTextColor(0xFF279BAA);//前四位值是透明度
        picker.setUnSelectedTextColor(0xFF999999);
        picker.setOnSingleWheelListener(new OnSingleWheelListener() {
            @Override
            public void onWheeled(int index, String item) {
                showToast("index=" + index + ", item=" + item);
            }
        });
        picker.setOnItemPickListener(new OnItemPickListener<String>() {
            @Override
            public void onItemPicked(int index, String item) {
                showToast("index=" + index + ", item=" + item);
            }
        });
        picker.show();
    }

    public void onLinkagePicker(View view) {
        LinkagePicker.DataProvider provider = new LinkagePicker.DataProvider() {

            @Override
            public boolean isOnlyTwo() {
                return true;
            }

            @Override
            public List<String> provideFirstData() {
                ArrayList<String> firstList = new ArrayList<>();
                firstList.add("12");
                firstList.add("24");
                return firstList;
            }

            @Override
            public List<String> provideSecondData(int firstIndex) {
                ArrayList<String> secondList = new ArrayList<>();
                for (int i = 1; i <= (firstIndex == 0 ? 12 : 24); i++) {
                    String str = DateUtils.fillZero(i);
                    if (firstIndex == 0) {
                        str += "¥";
                    } else {
                        str += "$";
                    }
                    secondList.add(str);
                }
                return secondList;
            }

            @Override
            public List<String> provideThirdData(int firstIndex, int secondIndex) {
                return null;
            }

        };
        LinkagePicker picker = new LinkagePicker(this, provider);
        picker.setCanLoop(true);
        picker.setLabel("小时制", "点");
        picker.setSelectedIndex(0, 8);
        //picker.setSelectedItem("12", "9");
        picker.setOnMoreItemPickListener(new OnMoreItemPickListener<String>() {

            @Override
            public void onItemPicked(String first, String second, String third) {
                showToast(first + "-" + second + "-" + third);
            }
        });
        picker.show();
    }

    public void onConstellationPicker(View view) {
        boolean isChinese = Locale.getDefault().getDisplayLanguage().contains("中文");
        SinglePicker<String> picker = new SinglePicker<>(this,
                isChinese ? new String[]{
                        "水瓶座", "双鱼座", "白羊座", "金牛座", "双子座", "巨蟹座",
                        "狮子座", "处女座", "天秤座", "天蝎座", "射手座", "摩羯座"
                } : new String[]{
                        "Aquarius", "Pisces", "Aries", "Taurus", "Gemini", "Cancer",
                        "Leo", "Virgo", "Libra", "Scorpio", "Sagittarius", "Capricorn"
                });
        picker.setCanLoop(false);//不禁用循环
        picker.setTopBackgroundColor(0xFFEEEEEE);
        picker.setTopHeight(50);
        picker.setTopLineColor(0xFF33B5E5);
        picker.setTopLineHeight(1);
        picker.setTitleText(isChinese ? "请选择" : "Please pick");
        picker.setTitleTextColor(0xFF999999);
        picker.setTitleTextSize(12);
        picker.setCancelTextColor(0xFF33B5E5);
        picker.setCancelTextSize(13);
        picker.setSubmitTextColor(0xFF33B5E5);
        picker.setSubmitTextSize(13);
        picker.setSelectedTextColor(0xFFEE0000);
        picker.setUnSelectedTextColor(0xFF999999);
        LineConfig config = new LineConfig();
        config.setColor(0xFFEE0000);//线颜色
        config.setAlpha(140);//线透明度
        config.setRatio((float) (1.0 / 8.0));//线比率
        picker.setLineConfig(config);
        picker.setItemWidth(200);
        picker.setBackgroundColor(0xFFE1E1E1);
        //picker.setSelectedItem(isChinese ? "处女座" : "Virgo");
        picker.setSelectedIndex(7);
        picker.setOnItemPickListener(new OnItemPickListener<String>() {
            @Override
            public void onItemPicked(int index, String item) {
                showToast("index=" + index + ", item=" + item);
            }
        });
        picker.show();
    }

    public void onNumberPicker(View view) {
        NumberPicker picker = new NumberPicker(this);
        picker.setWidth(picker.getScreenWidthPixels() / 2);
        picker.setCanLoop(false);
        picker.setLineVisible(false);
        picker.setWheelModeEnable(true);
        picker.setOffset(2);//偏移量
        picker.setRange(145, 200, 1);//数字范围
        picker.setSelectedItem(172);
        picker.setLabel("厘米");
        picker.setOnNumberPickListener(new NumberPicker.OnNumberPickListener() {
            @Override
            public void onNumberPicked(int index, Number item) {
                showToast("index=" + index + ", item=" + item.intValue());
            }
        });
        picker.show();
    }

    public void onAddressPicker(View view) {
        AddressPickTask task = new AddressPickTask(this);
        task.setHideProvince(false);
        task.setHideCounty(false);
        task.setCallback(new AddressPickTask.Callback() {
            @Override
            public void onAddressInitFailed() {
                showToast("数据初始化失败");
            }

            @Override
            public void onAddressPicked(Province province, City city, County county) {
                if (county == null) {
                    showToast(province.getAreaName() + city.getAreaName());
                } else {
                    showToast(province.getAreaName() + city.getAreaName() + county.getAreaName());
                }
            }
        });
        task.execute("贵州", "毕节", "纳雍");
    }

    public void onAddress2Picker(View view) {
        try {
            ArrayList<Province> data = new ArrayList<>();
            String json = ConvertUtils.toString(getAssets().open("city2.json"));
            data.addAll(JSON.parseArray(json, Province.class));
            AddressPicker picker = new AddressPicker(this, data);
            picker.setHideProvince(true);
            picker.setCanLoop(true);
            picker.setWheelModeEnable(true);
            picker.setSelectedItem("贵州", "贵阳", "花溪");
            picker.setOnLinkageListener(new OnLinkageListener() {
                @Override
                public void onAddressPicked(Province province, City city, County county) {
                    showToast("province : " + province + ", city: " + city + ", county: " + county);
                }
            });
            picker.show();
        } catch (Exception e) {
            showToast(LogUtils.toStackTraceString(e));
        }
    }

    public void onAddress3Picker(View view) {
        AddressPickTask task = new AddressPickTask(this);
        task.setHideCounty(true);
        task.setCallback(new AddressPickTask.Callback() {
            @Override
            public void onAddressInitFailed() {
                showToast("数据初始化失败");
            }

            @Override
            public void onAddressPicked(Province province, City city, County county) {
                showToast(province.getAreaName() + " " + city.getAreaName());
            }
        });
        task.execute("四川", "阿坝");
    }

}


text:
require File.expand_path("../../../../base", __FILE__)

require Vagrant.source_root.join("plugins/communicators/winssh/communicator")

describe VagrantPlugins::CommunicatorWinSSH::Communicator do
  include_context "unit"

  let(:export_command_template){ 'export %ENV_KEY%="%ENV_VALUE%"' }

  let(:ssh) do
    double("ssh",
      timeout: 1,
      host: nil,
      port: 5986,
      guest_port: 5986,
      keep_alive: false
    )
  end

  # SSH configuration information mock
  let(:winssh) do
    double("winssh",
      insert_key: false,
      export_command_template: export_command_template,
      shell: 'cmd',
      upload_directory: "C:\\Windows\\Temp"
    )
  end
  # Configuration mock
  let(:config) { double("config", winssh: winssh, ssh: ssh) }
  # Provider mock
  let(:provider) { double("provider") }
  # UI mock
  let(:ui) { double("ui") }
  # Machine mock built with previously defined
  let(:machine) do
    double("machine",
      config: config,
      provider: provider,
      ui: ui
    )
  end
  # Subject instance to test
  let(:communicator){ @communicator ||= described_class.new(machine) }
  # Underlying net-ssh connection mock
  let(:connection) { double("connection") }
  # Base net-ssh connection channel mock
  let(:channel) { double("channel") }
  # net-ssh connection channel mock for running commands
  let(:command_channel) { double("command_channel") }
  # Default exit data for commands run
  let(:exit_data) { double("exit_data", read_long: 0) }
  # Marker used for flagging start of output
  let(:command_garbage_marker) { communicator.class.const_get(:CMD_GARBAGE_MARKER) }
  # Start marker output when PTY is enabled
  let(:pty_delim_start) { communicator.class.const_get(:PTY_DELIM_START) }
  # End marker output when PTY is enabled
  let(:pty_delim_end) { communicator.class.const_get(:PTY_DELIM_END) }
  # Command output returned on stdout
  let(:command_stdout_data) { '' }
  # Command output returned on stderr
  let(:command_stderr_data) { '' }
  # Mock for net-ssh scp
  let(:scp) { double("scp") }
  # Stub file to match commands
  let(:ssh_cmd_file){ double("ssh_cmd_file", path: "/dev/null/path") }

  # Setup for commands using the net-ssh connection. This can be reused where needed
  # by providing to `before`
  connection_setup = proc do
    allow(connection).to receive(:logger)
    allow(connection).to receive(:closed?).and_return false
    allow(connection).to receive(:open_channel).
      and_yield(channel).and_return(channel)
    allow(channel).to receive(:wait).and_return true
    allow(channel).to receive(:close)
    allow(command_channel).to receive(:send_data)
    allow(command_channel).to receive(:eof!)
    allow(command_channel).to receive(:on_data).
      and_yield(nil, command_stdout_data)
    allow(command_channel).to receive(:on_extended_data).
      and_yield(nil, nil, command_stderr_data)
    allow(machine).to receive(:ssh_info).and_return(host: '10.1.2.3', port: 22)
    allow(channel).to receive(:[]=).with(any_args).and_return(true)
    allow(channel).to receive(:on_close)
    allow(channel).to receive(:on_data)
    allow(channel).to receive(:on_extended_data)
    allow(channel).to receive(:on_request)
    allow(channel).to receive(:on_process)
    allow(channel).to receive(:exec).with(anything).
      and_yield(command_channel, '').and_return channel
    expect(command_channel).to receive(:on_request).with('exit-status').
      and_yield(nil, exit_data)
    # Return mocked net-ssh connection during setup
    allow(communicator).to receive(:retryable).and_return(connection)
    allow(Tempfile).to receive(:new).with(/vagrant-ssh/).and_return(ssh_cmd_file)
    allow(ssh_cmd_file).to receive(:puts)
    allow(ssh_cmd_file).to receive(:close)
    allow(ssh_cmd_file).to receive(:delete)
    allow(scp).to receive(:upload!)
    allow(communicator).to receive(:scp_connect).and_return(true)
  end

  describe ".wait_for_ready" do
    before(&connection_setup)
    context "with no static config (default scenario)" do
      before do
        allow(ui).to receive(:detail)
      end

      context "when ssh_info requires a multiple tries before it is ready" do
        before do
          expect(machine).to receive(:ssh_info).
            and_return(nil).ordered
          expect(machine).to receive(:ssh_info).
            and_return(host: '10.1.2.3', port: 22).ordered
        end

        it "retries ssh_info until ready" do
          # retries are every 0.5 so buffer the timeout just a hair over
          expect(communicator.wait_for_ready(0.6)).to eq(true)
        end
      end
    end
  end

  describe ".ready?" do
    before(&connection_setup)
    it "returns true if shell test is successful" do
      expect(communicator.ready?).to be_truthy
    end

    context "with an invalid shell test" do
      before do
        expect(exit_data).to receive(:read_long).and_return 1
      end

      it "returns raises SSHInvalidShell error" do
        expect{ communicator.ready? }.to raise_error Vagrant::Errors::SSHInvalidShell
      end
    end
  end

  describe ".execute" do
    before(&connection_setup)
    it "runs valid command and returns successful status code" do
      expect(ssh_cmd_file).to receive(:puts).with(/dir/)
      expect(communicator.execute("dir")).to eq(0)
    end

    it "prepends UUID output to command for garbage removal" do
      expect(ssh_cmd_file).to receive(:puts).
        with(/ECHO OFF\nECHO #{command_garbage_marker}\nECHO #{command_garbage_marker}.*/)
      expect(communicator.execute("dir")).to eq(0)
    end

    context "with command returning an error" do
      let(:exit_data) { double("exit_data", read_long: 1) }

      it "raises error when exit-code is non-zero" do
        expect(ssh_cmd_file).to receive(:puts).with(/dir/)
        expect{ communicator.execute("dir") }.to raise_error(Vagrant::Errors::VagrantError)
      end

      it "returns exit-code when exit-code is non-zero and error check is disabled" do
        expect(ssh_cmd_file).to receive(:puts).with(/dir/)
        expect(communicator.execute("dir", error_check: false)).to eq(1)
      end
    end

    context "with garbage content prepended to command output" do
      let(:command_stdout_data) do
        "Line of garbage\nMore garbage\n#{command_garbage_marker}Dir1\nDir2\n"
      end

      it "removes any garbage output prepended to command output" do
        stdout = ''
        expect(
          communicator.execute("dir") do |type, data|
            if type == :stdout
              stdout << data
            end
          end
        ).to eq(0)
        expect(stdout).to eq("Dir1\nDir2\n")
      end
    end

    context "with garbage content prepended to command stderr output" do
      let(:command_stderr_data) do
        "Line of garbage\nMore garbage\n#{command_garbage_marker}Dir1\nDir2\n"
      end

      it "removes any garbage output prepended to command stderr output" do
        stderr = ''
        expect(
          communicator.execute("dir") do |type, data|
            if type == :stderr
              stderr << data
            end
          end
        ).to eq(0)
        expect(stderr).to eq("Dir1\nDir2\n")
      end
    end
  end

  describe ".test" do
    before(&connection_setup)
    context "with exit code as zero" do
      it "returns true" do
        expect(communicator.test("dir")).to be_truthy
      end
    end

    context "with exit code as non-zero" do
      before do
        expect(exit_data).to receive(:read_long).and_return 1
      end

      it "returns false" do
        expect(communicator.test("false.exe")).to be_falsey
      end
    end
  end

  describe ".upload" do
    before do
      allow(communicator).to receive(:create_remote_directory)
      expect(communicator).to receive(:scp_connect).and_yield(scp)
    end

    it "uploads a directory if local path is a directory" do
      Dir.mktmpdir('vagrant-test') do |dir|
        FileUtils.touch(File.join(dir, "test-file"))
        expect(scp).to receive(:upload!).with(an_instance_of(File), /test-file/)
        communicator.upload(dir, 'C:\destination')
      end
    end

    it "uploads a file if local path is a file" do
      file = Tempfile.new('vagrant-test')
      begin
        expect(scp).to receive(:upload!).with(instance_of(File), 'C:\destination\file')
        communicator.upload(file.path, 'C:\destination\file')
      ensure
        file.delete
      end
    end

    it "raises custom error on permission errors" do
      file = Tempfile.new('vagrant-test')
      begin
        expect(scp).to receive(:upload!).with(instance_of(File), 'C:\destination\file').
          and_raise("Permission denied")
        expect{ communicator.upload(file.path, 'C:\destination\file') }.to(
          raise_error(Vagrant::Errors::SCPPermissionDenied)
        )
      ensure
        file.delete
      end
    end

    it "does not raise custom error on non-permission errors" do
      file = Tempfile.new('vagrant-test')
      begin
        expect(scp).to receive(:upload!).with(instance_of(File), 'C:\destination\file').
          and_raise("Some other error")
        expect{ communicator.upload(file.path, 'C:\destination\file') }.to raise_error(RuntimeError)
      ensure
        file.delete
      end
    end
  end

  describe ".download" do
    before do
      expect(communicator).to receive(:scp_connect).and_yield(scp)
    end

    it "calls scp to download file" do
      expect(scp).to receive(:download!).with('/path/from', 'C:\path\to')
      communicator.download('/path/from', 'C:\path\to')
    end
  end

  describe ".connect" do

    it "cannot be called directly" do
      expect{ communicator.connect }.to raise_error(NoMethodError)
    end

    context "with default configuration" do

      before do
        expect(machine).to receive(:ssh_info).and_return(
          host: nil,
          port: nil,
          private_key_path: nil,
          username: nil,
          password: nil,
          keys_only: true,
          verify_host_key: false
        )
      end

      it "has keys_only enabled" do
        expect(Net::SSH).to receive(:start).with(
          nil, nil, hash_including(
            keys_only: true
          )
        ).and_return(true)
        communicator.send(:connect)
      end

      it "has verify_host_key disabled" do
        expect(Net::SSH).to receive(:start).with(
          nil, nil, hash_including(
            verify_host_key: false
          )
        ).and_return(true)
        communicator.send(:connect)
      end

      it "does not include any private key paths" do
        expect(Net::SSH).to receive(:start).with(
          nil, nil, hash_excluding(
            keys: anything
          )
        ).and_return(true)
        communicator.send(:connect)
      end

      it "includes `none` and `hostbased` auth methods" do
        expect(Net::SSH).to receive(:start).with(
          nil, nil, hash_including(
            auth_methods: ["none", "hostbased"]
          )
        ).and_return(true)
        communicator.send(:connect)
      end
    end

    context "with keys_only disabled and verify_host_key enabled" do

      before do
        expect(machine).to receive(:ssh_info).and_return(
          host: nil,
          port: nil,
          private_key_path: nil,
          username: nil,
          password: nil,
          keys_only: false,
          verify_host_key: true
        )
      end

      it "has keys_only enabled" do
        expect(Net::SSH).to receive(:start).with(
          nil, nil, hash_including(
            keys_only: false
          )
        ).and_return(true)
        communicator.send(:connect)
      end

      it "has verify_host_key disabled" do
        expect(Net::SSH).to receive(:start).with(
          nil, nil, hash_including(
            verify_host_key: true
          )
        ).and_return(true)
        communicator.send(:connect)
      end
    end

    context "with host and port configured" do

      before do
        expect(machine).to receive(:ssh_info).and_return(
          host: '127.0.0.1',
          port: 2222,
          private_key_path: nil,
          username: nil,
          password: nil,
          keys_only: true,
          verify_host_key: false
        )
      end

      it "specifies configured host" do
        expect(Net::SSH).to receive(:start).with("127.0.0.1", anything, anything)
        communicator.send(:connect)
      end

      it "has port defined" do
        expect(Net::SSH).to receive(:start).with("127.0.0.1", anything, hash_including(port: 2222))
        communicator.send(:connect)
      end
    end

    context "with private_key_path configured" do
      before do
        expect(machine).to receive(:ssh_info).and_return(
          host: '127.0.0.1',
          port: 2222,
          private_key_path: ['/priv/key/path'],
          username: nil,
          password: nil,
          keys_only: true,
          verify_host_key: false
        )
      end

      it "includes private key paths" do
        expect(Net::SSH).to receive(:start).with(
          anything, anything, hash_including(
            keys: ["/priv/key/path"]
          )
        ).and_return(true)
        communicator.send(:connect)
      end

      it "includes `publickey` auth method" do
        expect(Net::SSH).to receive(:start).with(
          anything, anything, hash_including(
            auth_methods: ["none", "hostbased", "publickey"]
          )
        ).and_return(true)
        communicator.send(:connect)
      end
    end

    context "with username and password configured" do

      before do
        expect(machine).to receive(:ssh_info).and_return(
          host: '127.0.0.1',
          port: 2222,
          private_key_path: nil,
          username: 'vagrant',
          password: 'vagrant',
          keys_only: true,
          verify_host_key: false
        )
      end

      it "has username defined" do
        expect(Net::SSH).to receive(:start).with(anything, 'vagrant', anything).and_return(true)
        communicator.send(:connect)
      end

      it "has password defined" do
        expect(Net::SSH).to receive(:start).with(
          anything, anything, hash_including(
            password: 'vagrant'
          )
        ).and_return(true)
        communicator.send(:connect)
      end

      it "includes `password` auth method" do
        expect(Net::SSH).to receive(:start).with(
          anything, anything, hash_including(
            auth_methods: ["none", "hostbased", "password"]
          )
        ).and_return(true)
        communicator.send(:connect)
      end
    end

    context "with password and private_key_path configured" do

      before do
        expect(machine).to receive(:ssh_info).and_return(
          host: '127.0.0.1',
          port: 2222,
          private_key_path: ['/priv/key/path'],
          username: 'vagrant',
          password: 'vagrant',
          keys_only: true,
          verify_host_key: false
        )
      end

      it "has password defined" do
        expect(Net::SSH).to receive(:start).with(
          anything, anything, hash_including(
            password: 'vagrant'
          )
        ).and_return(true)
        communicator.send(:connect)
      end

      it "includes private key paths" do
        expect(Net::SSH).to receive(:start).with(
          anything, anything, hash_including(
            keys: ["/priv/key/path"]
          )
        ).and_return(true)
        communicator.send(:connect)
      end

      it "includes `publickey` and `password` auth methods" do
        expect(Net::SSH).to receive(:start).with(
          anything, anything, hash_including(
            auth_methods: ["none", "hostbased", "publickey", "password"]
          )
        ).and_return(true)
        communicator.send(:connect)
      end
    end
  end

  describe ".generate_environment_export" do
    it "should generate bourne shell compatible export" do
      expect(communicator.send(:generate_environment_export, "TEST", "value")).to eq("export TEST=\"value\"\n")
    end

    context "with custom template defined" do
      let(:export_command_template){ "setenv %ENV_KEY% %ENV_VALUE%" }

      it "should generate custom export based on template" do
        expect(communicator.send(:generate_environment_export, "TEST", "value")).to eq("setenv TEST value\n")
      end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
package com.eceris.store.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.eceris.store.domain.Form;
import com.eceris.store.domain.model.FormModel;
import com.eceris.store.repository.FormRepository;

public class FormServiceImpl implements FormService {

    @Autowired
    FormRepository formRepository;

    @Override
    @Transactional
    public Form createForm(FormModel model) {
        Form entity = new Form(model);
        return formRepository.save(entity);
    }

    @Override
    @Transactional
    public Form updateForm(FormModel model) {
        Form form = formRepository.findOne(model.getId());
        form.setType(model.getType());
        form.setContent(model.getContent());
        form.setDescription(model.getDescription());
        return formRepository.save(form);
    }

    @Override
    @Transactional
    public void deleteForm(Long id) {
        formRepository.delete(id);
    }

    @Override
    @Transactional(readOnly = true)
    public Form getForm(Long id) {
        return formRepository.findOne(id);
    }

    @Override
    @Transactional(readOnly = true)
    public List<Form> getForms() {
        return formRepository.findAll();
    }
}


text:
package org.mpisws.p2p.transport.table;

import java.nio.ByteBuffer;
import java.util.Map;

import org.mpisws.p2p.transport.TransportLayer;

import rice.Continuation;
import rice.p2p.commonapi.Cancellable;

/**
 * Keeps a store of information at each node, such that other nodes can query for the information.
 *
 * This is useful for example, for certificates.  The information in this table must be constant, and
 * must be able to propagate epidemically.
 *
 * @author Jeff Hoye
 *
 */
public interface TableTransportLayer<Identifier, Key, Value> extends TransportLayer<Identifier, ByteBuffer> {
  /**
   * Get a Value of the source.
   *
   * @param source
   * @param principal
   * @param c
   * @param options
   * @return UnknownValueException if the source doesn't value for the key
   */
  public Cancellable requestValue(Identifier source, Key key, Continuation<Value, Exception> c, Map<String, Object> options);

  public boolean hasKey(Key k);

}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Gard. Chron. ser. 3, 13:624. 1893

#### Original name
null

### Remarks
null


text:
<?php

class Complex
{
	private $_map;

	public function getMap(){ return $this->_map; }
	public function setMap(TMap $map){ $this->_map = $map; }
}

?>


text:
import {renderToString} from 'react-dom/server';
import {createMemoryHistory, match, RouterContext} from 'react-router';
import {syncHistoryWithStore} from 'react-router-redux';
import {StyleSheetServer} from 'aphrodite';
import routes from '../../routes';
import {ApolloProvider} from 'react-apollo';
import ApolloClientSingleton from '../../network/apollo-client-singleton';
import React from 'react';
import renderIndex from './render-index';
import Store from '../../store';
import wrap from '../wrap';
import fs from 'fs';
import path from 'path';

let assetMap = {
  'bundle.js': 'bundle.js'
};
if (process.env.NODE_ENV === 'production') {
  assetMap = JSON.parse(
    fs.readFileSync(
      path.join(process.env.ASSETS_DIR, process.env.ASSETS_MAP_FILE)
    )
  );
}

export default wrap(async (req, res) => {
  const memoryHistory = createMemoryHistory(req.url);
  const store = new Store(memoryHistory);
  const history = syncHistoryWithStore(memoryHistory, store.data);

  match(
    {
      history,
      routes,
      location: req.url
    },
    (error, redirectLocation, renderProps) => {
      if (error) {
        res.status(500).send(error.message);
      } else if (redirectLocation) {
        res.redirect(302, redirectLocation.pathname + redirectLocation.search);
      } else if (renderProps) {
        const {html, css} = StyleSheetServer.renderStatic(() =>
          renderToString(
            <ApolloProvider store={store.data} client={ApolloClientSingleton}>
              <RouterContext {...renderProps} />
            </ApolloProvider>
          )
        );

        res.send(renderIndex(html, css, assetMap, store.data));
      } else {
        res.status(404).send('Not found');
      }
    }
  );
});


text:
using System;
using System.Collections.Generic;
using NLog;
using OpenLawOffice.Common.Net;
using System.Net;

namespace OpenLawOffice.Word
{
    public class CommManager
    {
        public static Response<List<OpenLawOffice.Common.Models.Matters.Matter>> ListMatters(string contactFilter, string titleFilter,
            string caseNumberFilter, string jurisdictionFilter, bool activeFilter = true)
        {
            JsonWebClient web;
            OpenLawOffice.Common.Net.Response<List<OpenLawOffice.Common.Models.Matters.Matter>> response;

            web = new JsonWebClient();
            response = web.Request<List<OpenLawOffice.Common.Models.Matters.Matter>>(
                Globals.ThisAddIn.Settings.ServerUrl + "JsonInterface/Matters?contactFilter=" + contactFilter + "&titleFilter=" + titleFilter +
                "&caseNumberFilter=" + caseNumberFilter + "&jurisdictionFilter=" + jurisdictionFilter + "&activeFilter=" + activeFilter.ToString(), "GET");

            if (response != null && response.Successful)
                return new Response<List<Common.Models.Matters.Matter>>()
                {
                    Package = response.Package,
                    RequestReceived = response.RequestReceived,
                    ResponseSent = response.ResponseSent,
                    Error = response.Error,
                    Successful = response.Successful
                };

            if (Globals.ThisAddIn.CanLog)
                LogManager.GetCurrentClassLogger().Error("Error: " + response.Error);

            return null;
        }

        public static Response<List<OpenLawOffice.Common.Models.Forms.Form>> ListFormsForMatter(Guid matterId)
        {
            JsonWebClient web;
            OpenLawOffice.Common.Net.Response<List<OpenLawOffice.Common.Models.Forms.Form>> response;

            web = new JsonWebClient();
            response = web.Request<List<OpenLawOffice.Common.Models.Forms.Form>>(
                Globals.ThisAddIn.Settings.ServerUrl + "JsonInterface/ListFormsForMatter?matterId=" + matterId.ToString(), "GET");

            if (response != null && response.Successful)
                return new Response<List<Common.Models.Forms.Form>>()
                {
                    Package = response.Package,
                    RequestReceived = response.RequestReceived,
                    ResponseSent = response.ResponseSent,
                    Error = response.Error,
                    Successful = response.Successful
                };

            if (Globals.ThisAddIn.CanLog)
                LogManager.GetCurrentClassLogger().Error("Error: " + response.Error);

            return null;
        }

        public static Response<List<OpenLawOffice.Common.Models.Forms.FormFieldMatter>> GetFormDataForMatter(Guid matterId)
        {
            JsonWebClient web;
            OpenLawOffice.Common.Net.Response<List<OpenLawOffice.Common.Models.Forms.FormFieldMatter>> response;

            web = new JsonWebClient();
            response = web.Request<List<OpenLawOffice.Common.Models.Forms.FormFieldMatter>>(
                Globals.ThisAddIn.Settings.ServerUrl + "JsonInterface/GetFormDataForMatter/" + matterId.ToString(), "GET");

            if (response != null && response.Successful)
                return new Response<List<Common.Models.Forms.FormFieldMatter>>()
                {
                    Package = response.Package,
                    RequestReceived = response.RequestReceived,
                    ResponseSent = response.ResponseSent,
                    Error = response.Error,
                    Successful = response.Successful
                };

            if (Globals.ThisAddIn.CanLog)
                LogManager.GetCurrentClassLogger().Error("Error: " + response.Error);

            return null;
        }
    }
}


text:
const chai = require('chai');

const { TimexProperty, resolver, creator } = require('../index.js');

const assert = chai.assert;
const expect = chai.expect;
chai.should();

describe('No Network', () => {
    describe('Datatypes', () => {
        describe('Timex integrate resolution with constants and conversion', () => {
            describe('with constants', () => {
                const today = new Date(2017, 9, 5);
                it('day of week constrained by next week in the evening', () => {
                    const constraints = [ creator.weekFromToday(today), creator.evening ];
                    const resolutions = resolver.evaluate(['XXXX-WXX-3T04', 'XXXX-WXX-3T16'], constraints);
                    resolutions.map(t => t.timex).should.be.an('array').lengthOf(1).members(['2017-10-11T16']);
                    const text = resolutions[0].toNaturalLanguage(today);
                    text.should.equal('next Wednesday 4PM');
                });
            });
        });
        describe('Timex integrate resolution with incremental updates', () => {
            describe('date + year (daterange) + time (time)', () => {
                const today = new Date(2017, 9, 5);
                it('day of week constrained by next year and adding a specific time', () => {
                    const constraints = [ new TimexProperty('T17:00:00'), new TimexProperty('2018') ];
                    const resolutions = resolver.evaluate(['XXXX-03-15'], constraints);
                    resolutions.map(t => t.timex).should.be.an('array').lengthOf(1).members(['2018-03-15T17']);
                    const text = resolutions[0].toNaturalLanguage(today);
                    text.should.equal('15th March 2018 5PM');
                });
            });
        });
    });
});


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net;
using System.Reflection;
using System.Collections;
using System.Threading;
using System.Diagnostics;
using System.Net;
using System.IO;
using System.Configuration;
using MXit.Messaging;
using MiscUtil.Threading;

namespace MXitConnectionModule
{
    public class QueueHelper_OutgoingMessage
    {
        private static volatile QueueHelper_OutgoingMessage instance;
        private static readonly ILog logger = LogManager.GetLogger(typeof(QueueHelper_OutgoingMessage));

        private Queue<IMessageToSend> itemList = new Queue<IMessageToSend>();
        private CustomThreadPool workerThreadPool;
        private AutoResetEvent resourceLockOut = new AutoResetEvent(true);

        private QueueHelper_OutgoingMessage()
        {
        }

        public static QueueHelper_OutgoingMessage Instance
        {
            get
            {
                if (instance == null)
                {
                    if (instance == null)
                        instance = new QueueHelper_OutgoingMessage();
                }

                return instance;
            }
        }

        public delegate bool outgoingDelegate(IMessageToSend messageToSend);

        public void addRequestToWorkerPool(IMessageToSend item)
        {
            workerThreadPool.AddWorkItem(new outgoingDelegate(ConnectionManager.Instance.SendMessage), item);
        }

        private void QueueHandler()
        {
            logger.Debug(MethodBase.GetCurrentMethod().Name + "() - START");

            //this will receive a notification when there is a new HttpRequest in the thread.
            workerThreadPool = new CustomThreadPool();

            int minThreads = 1;
            int maxThreads = ConnectionConfig.QueueHelperMaxThreads_OutgoingMessage;

            workerThreadPool.SetMinMaxThreads(minThreads, maxThreads);

            logger.Info(MethodBase.GetCurrentMethod().Name + "() - queue handler thread started");

            while (true)
            {
                resourceLockOut.WaitOne();

                while (itemList.Count > 0 && !ConnectionManager.Instance.IsReconnecting)
                {
                    if ((itemList.Count > 100) && (itemList.Count % 1000 == 0))
                    {
                        logger.Info(MethodBase.GetCurrentMethod().Name + "() - queue size: " + itemList.Count);
                    }

                    IMessageToSend item = null;

                    lock (itemList)
                    {
                        try
                        {
                            //Fetch item from front of queue and request a thread from thread pool to process it
                            item = itemList.Dequeue();

                        }
                        catch (Exception e)
                        {
                            logger.Error(MethodBase.GetCurrentMethod().Name + "() - System Exception doing QUEUE Request: " + e.ToString());
                        }

                    }

                    if (item != null)
                        addRequestToWorkerPool(item);
                }
            }

            logger.Debug(MethodBase.GetCurrentMethod().Name + "() - END");
        }

        public void StartQueueHandlers()
        {
            logger.Debug(MethodBase.GetCurrentMethod().Name + "() - START");

            Console.Write(DateTime.Now.ToString() + " Starting Queue Handler [Outgoing Messages]...");

            ThreadStart job = new ThreadStart(QueueHandler);
            Thread thread = new Thread(job);
            thread.Start();

            Console.WriteLine(" OK");

            logger.Debug(MethodBase.GetCurrentMethod().Name + "() - END");
        }

        public bool EnqueueItem(IMessageToSend item)
        {
            logger.Debug(MethodBase.GetCurrentMethod().Name + "() - START");
            bool success = false;

            try
            {
                lock (itemList)
                {
                    itemList.Enqueue(item);
                }
                success = true;

                try
                {
                    resourceLockOut.Set();
                }
                catch (Exception e)
                {
                    logger.Error(MethodBase.GetCurrentMethod().Name + "() - ResourceLock exception (Out)", e);
                }
            }
            catch (Exception ex)
            {
                logger.Error(MethodBase.GetCurrentMethod().Name + "() - Enqueue exception: ", ex);
                success = false;
            }

            logger.Debug(MethodBase.GetCurrentMethod().Name + "() - END");
            return success;
        }

        public int getQueueSize()
        {
            return itemList.Count;
        }

        public int getWorkerPoolQueueSize()
        {
            return this.workerThreadPool.QueueLength;
        }

        public int getWorkerPoolThreadCount()
        {
            return this.workerThreadPool.TotalThreads;
        }

        public String getInfoString()
        {
            return
                (
                this.workerThreadPool.MinThreads + " | " +
                this.workerThreadPool.MaxThreads + " | " +
                this.workerThreadPool.WorkingThreads + " | " +
                this.workerThreadPool.TotalThreads + " | " +
                this.workerThreadPool.QueueLength
                );
        }
    }
}


text:
/* $Id$ */

package org.apache.fop.svg;

import org.apache.fop.pdf.PDFPage;

/**
 * Context class which holds state information which should remain in sync over multiple instances
 * of PDFDocumentGraphics2D.
 */
public class PDFContext {

    private PDFPage currentPage;

    /** number of pages generated */
    private int pagecount;

    /** @return true if a page is set up for painting. */
    public boolean isPagePending() {
        return this.currentPage != null;
    }

    /**
     * After this call, there's no current page.
     */
    public void clearCurrentPage() {
        currentPage = null;
    }

    /** @return the current page or null if there is none */
    public PDFPage getCurrentPage() {
        return this.currentPage;
    }

    /**
     * Sets the current page
     * @param page the page
     */
    public void setCurrentPage(PDFPage page) {
        this.currentPage = page;
    }

    /** Notifies the context to increase the page count. */
    public void increasePageCount() {
        this.pagecount++;
    }

}


text:
#ifndef _SDMMC_TYPES_H_
#define _SDMMC_TYPES_H_

#include <stdint.h>
#include <stddef.h>
#include "esp_err.h"

/**
 * Decoded values from SD card Card Specific Data register
 */
typedef struct {
    int csd_ver;                /*!< CSD structure format */
    int mmc_ver;                /*!< MMC version (for CID format) */
    int capacity;               /*!< total number of sectors */
    int sector_size;            /*!< sector size in bytes */
    int read_block_len;         /*!< block length for reads */
    int card_command_class;     /*!< Card Command Class for SD */
    int tr_speed;               /*!< Max transfer speed */
} sdmmc_csd_t;

/**
 * Decoded values from SD card Card IDentification register
 */
typedef struct {
    int mfg_id;     /*!< manufacturer identification number */
    int oem_id;     /*!< OEM/product identification number */
    char name[8];   /*!< product name (MMC v1 has the longest) */
    int revision;   /*!< product revision */
    int serial;     /*!< product serial number */
    int date;       /*!< manufacturing date */
} sdmmc_cid_t;

/**
 * Decoded values from SD Configuration Register
 */
typedef struct {
    int sd_spec;    /*!< SD Physical layer specification version, reported by card */
    int bus_width;  /*!< bus widths supported by card: BIT(0) — 1-bit bus, BIT(2) — 4-bit bus */
} sdmmc_scr_t;

/**
 * SD/MMC command response buffer
 */
typedef uint32_t sdmmc_response_t[4];

/**
 * SD SWITCH_FUNC response buffer
 */
typedef struct {
    uint32_t data[512 / 8 / sizeof(uint32_t)];  /*!< response data */
} sdmmc_switch_func_rsp_t;

/**
 * SD/MMC command information
 */
typedef struct {
        uint32_t opcode;            /*!< SD or MMC command index */
        uint32_t arg;               /*!< SD/MMC command argument */
        sdmmc_response_t response;  /*!< response buffer */
        void* data;                 /*!< buffer to send or read into */
        size_t datalen;             /*!< length of data buffer */
        size_t blklen;              /*!< block length */
        int flags;                  /*!< see below */
#define SCF_ITSDONE      0x0001     /*!< command is complete */
#define SCF_CMD(flags)   ((flags) & 0x00f0)
#define SCF_CMD_AC       0x0000
#define SCF_CMD_ADTC     0x0010
#define SCF_CMD_BC       0x0020
#define SCF_CMD_BCR      0x0030
#define SCF_CMD_READ     0x0040     /*!< read command (data expected) */
#define SCF_RSP_BSY      0x0100
#define SCF_RSP_136      0x0200
#define SCF_RSP_CRC      0x0400
#define SCF_RSP_IDX      0x0800
#define SCF_RSP_PRESENT  0x1000
/* response types */
#define SCF_RSP_R0       0 /*!< none */
#define SCF_RSP_R1       (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX)
#define SCF_RSP_R1B      (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX|SCF_RSP_BSY)
#define SCF_RSP_R2       (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_136)
#define SCF_RSP_R3       (SCF_RSP_PRESENT)
#define SCF_RSP_R4       (SCF_RSP_PRESENT)
#define SCF_RSP_R5       (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX)
#define SCF_RSP_R5B      (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX|SCF_RSP_BSY)
#define SCF_RSP_R6       (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX)
#define SCF_RSP_R7       (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX)
        esp_err_t error;            /*!< error returned from transfer */
        int timeout_ms;             /*!< response timeout, in milliseconds */
} sdmmc_command_t;

/**
 * SD/MMC Host description
 *
 * This structure defines properties of SD/MMC host and functions
 * of SD/MMC host which can be used by upper layers.
 */
typedef struct {
    uint32_t flags;             /*!< flags defining host properties */
#define SDMMC_HOST_FLAG_1BIT    BIT(0)      /*!< host supports 1-line SD and MMC protocol */
#define SDMMC_HOST_FLAG_4BIT    BIT(1)      /*!< host supports 4-line SD and MMC protocol */
#define SDMMC_HOST_FLAG_8BIT    BIT(2)      /*!< host supports 8-line MMC protocol */
#define SDMMC_HOST_FLAG_SPI     BIT(3)      /*!< host supports SPI protocol */
    int slot;                   /*!< slot number, to be passed to host functions */
    int max_freq_khz;           /*!< max frequency supported by the host */
#define SDMMC_FREQ_DEFAULT      20000       /*!< SD/MMC Default speed (limited by clock divider) */
#define SDMMC_FREQ_HIGHSPEED    40000       /*!< SD High speed (limited by clock divider) */
#define SDMMC_FREQ_PROBING      400         /*!< SD/MMC probing speed */
    float io_voltage;           /*!< I/O voltage used by the controller (voltage switching is not supported) */
    esp_err_t (*init)(void);    /*!< Host function to initialize the driver */
    esp_err_t (*set_bus_width)(int slot, size_t width);    /*!< host function to set bus width */
    size_t (*get_bus_width)(int slot); /*!< host function to get bus width */
    esp_err_t (*set_card_clk)(int slot, uint32_t freq_khz); /*!< host function to set card clock frequency */
    esp_err_t (*do_transaction)(int slot, sdmmc_command_t* cmdinfo);    /*!< host function to do a transaction */
    esp_err_t (*deinit)(void);  /*!< host function to deinitialize the driver */
    int command_timeout_ms;     /*!< timeout, in milliseconds, of a single command. Set to 0 to use the default value. */
} sdmmc_host_t;

/**
 * SD/MMC card information structure
 */
typedef struct {
    sdmmc_host_t host;          /*!< Host with which the card is associated */
    uint32_t ocr;               /*!< OCR (Operation Conditions Register) value */
    sdmmc_cid_t cid;            /*!< decoded CID (Card IDentification) register value */
    sdmmc_csd_t csd;            /*!< decoded CSD (Card-Specific Data) register value */
    sdmmc_scr_t scr;            /*!< decoded SCR (SD card Configuration Register) value */
    uint16_t rca;               /*!< RCA (Relative Card Address) */
} sdmmc_card_t;

#endif // _SDMMC_TYPES_H_


text: export {<%= classifiedModuleName %>} from './<%= dasherizedModuleName %>.directive';


text:
(function(){
    var typeOf = function(data) {
        return Object.prototype.toString.call(data)
                .replace("[object ", "")
                .replace("]", "");
    };

    Object.prototype.foreach = function(callback) {
        var self = this;
        for(var key in self) {
            if(self.hasOwnProperty(key)) {
                var value = self[key];
                callback.call(self, key, value, typeOf(value));
            }
        }
    };

    Array.prototype.foreach = function(callback) {
        var self = this;
        for(var i = 0; i < self.length; i++) {
            var value = self[i];
            callback.call(self, i, value, typeOf(value));
        }
    };
})();


text:
layout: page
title:
permalink: /about/
---
![Alt txt](https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQFUfpQSCGsPnG_JmBs_9dPY14G2wH8oytaRXRHteDv6eRFVuzYHQ)

My Name is Joel Hermida I am a Web Design/Graphic Design major out of Miami, FL . I am the CEO of HermidaDesigns where we specialize in Web design, logo design, print, and much more.

### More Information

At HermidaDesigns our number one vision is customer satisfaction. As long as the customer is happy with their designs we are happy and we wont stop working until you feel that way.

If your ever in need of a new web page, banner, logo, business cards, flyers you name it we can take care of it. Dont hesitate to call us.

### Contact me

Joel Hermida

(305) 299-8659

9am-9pm

SUN-MON

[joelhermida@ymail.com](mailto:joelhermida@ymail.com)


text:
using System;

namespace ProSecuritiesTrading.MOEX.FIX.Base.Field
{
    public class Symbol
    {
        public const int Tag = 55;
        public static readonly byte[] TagBytes;

        static Symbol()
        {
            TagBytes = new byte[2];
            TagBytes[0] = 53;
            TagBytes[1] = 53;
        }
    }
}


text:
<?php

namespace app\commands;

use yii\db\ActiveRecord;

/**
 * This is the model class for table "Worksinfo".
 *
 * @property string $makerid
 * @property string $id
 * @property string $image
 * @property string $title
 * @property string $tripe
 */
class Worksinfo extends ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'show_work';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['workid'], 'unique'],
            [['worktitle', 'workimg', 'worktag', 'worktripe', 'workimglist'], 'safe'],
            [['makerid'], 'integer'],
            [['makerphone', 'makername', 'makermask', 'makersex', 'makerbirthday'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'workid' => '作品',
        ];
    }
}


text:
module EmberTokenAuth
  class SessionsController < ::ApplicationController

    before_filter :authenticate!, only: :token_refresh

    def token
      user = User.authenticate(params[:email], params[:password])
      if user
        set_current_user user
        render json: { token: generate_token(user)}, status: 200
      else
        render json: {errors: ["Unauthorized"]}, status: 401
      end
    end

    def token_refresh
      render json: { token: generate_token(@current_user)}, status: 200
    end

    private

    def generate_token(user)
      exp     = 30.days.from_now.to_i
      payload = { user: user.jwt_params, exp: exp }
      JWT.encode(payload, Rails.configuration.secret_token)
    end
  end
end


text:
import * as React from 'react';

declare const l18nMsg: {[key: string]: string};

export interface MsgProps {
    readonly msgKey: string;
    readonly params?: string[];
}

export class Msg extends React.Component<MsgProps> {

    public constructor(props: MsgProps) {
        super(props);
    }

    public render(): React.ReactNode {
        return (
            <React.Fragment>{Msg.localize(this.props.msgKey, this.props.params)}</React.Fragment>
        );
    }

    public static localize(msgKey: string, params?: string[]): string {
        let message: string = l18nMsg[this.processKey(msgKey)];
        if (message === undefined) message = msgKey;

        if ((params !== undefined) && (params.length > 0)) {
            params.forEach((value: string, index: number) => {
                value = this.processParam(value);
                message = message.replace('{{param_'+ index + '}}', value);
            })
        }

        return unescape(message);
    }

    // if the message key has Freemarker syntax, remove it
    private static processKey(msgKey: string): string {
        if (!(msgKey.startsWith('${') && msgKey.endsWith('}'))) return msgKey;

        // remove Freemarker syntax
        return msgKey.substring(2, msgKey.length - 1);
    }

    // if the param has Freemarker syntax, try to look up its value
    private static processParam(param: string): string {
        if (!(param.startsWith('${') && param.endsWith('}'))) return param;

        // remove Freemarker syntax
        const key: string = param.substring(2, param.length - 1);

        let value: string = l18nMsg[key];
        if (value === undefined) return param;

        return value;
    }
}


text:
layout: default
modal-id: 3
date: 2014-10-01
img: klinkenwechsel.png
alt: image-alt
project-date: Oktober 2014
client: Camino Real GmbH
client_url: http://www.klinkenwechsel.de
package: de.klinkenwechsel.android.app
category: Android Entwicklung
description: Die Klinkenwechsel ist für Vermieter und Wohnungssuchende gedacht um Wohnungsbesichtigungstermine miteinander auszumachen. Dabei können Vermieter Immobilien mit Fotos, der Adresse und Terminen einstellen. Wohnungssuchende können sich mit ihrem Profil um Besichtigungstermine bewerben.

---


text:
<title>
Dobbs is a dead end for the Greens
</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>

<?php include "../../legacy-includes/TopLogo.htmlf" ?>

<?php include "../../legacy-includes/TopAd.htmlf" ?>

<?php include "../../legacy-includes/LeftButtons.htmlf" ?>

<?php include "../../legacy-includes/BodyInsert.htmlf" ?>

VIEWS AND VOICES

Dobbs is a dead end for the Greens

November 10, 2006 | Page 8

IT IS a shame that Scott McLarty doesn't offer much more than condescending sarcasm in his defense of the national Green Party's recent decision to encourage members to reach out to right-wing xenophobe Lou Dobbs, because there are plenty of more political things that could be said about the strategy. ("Right to reach out to Dobbs," November 3)

It's also unfortunate that Scott misrepresents the character of the October 11 call. It did not simply encourage members to try to get on Lou Dobbs' show in order to get broader public exposure for Green issues and candidates. As I tried to demonstrate by quoting the e-mail, it was a glowing endorsement of Dobbs' attack on the two-party system, which encouraged Greens to watch his show and called for them to let Dobbs know that the Green Party is the party for him and his viewers.

I'm sure Scott can see how this is quite different from Todd Chretien's appearance on the O'Reilly Factor, to take his example. Did Todd tell Bill O'Reilly that he really appreciated the great work Bill was doing exposing the ills of our society, or that he hoped Bill would let his viewers know about the Green alternative? No. He called out Bill O'Reilly as the racist, right-wing hack that he is, and challenged him to come to San Francisco to debate the war.

Or take, for another example, what Green Party member and immigrant rights activist Nativo López told Lou Dobbs when he (temporarily) forced Dobbs to stop using the term "illegal alien" during his appearance on Lou Dobbs Tonight in April. "You're using language that's offensive to me and offensive to my people," López said. "You pollute the air every day, Dobbs. You are absolutely wrong. That language is offensive, it's derogatory, it's denigrating, and don't use that terminology to me again, referring to my people."

And now, Nativo is supposed to turn around and be a cheerleader for Dobbs' unremarkable critique of corporate influence in politics?

I think this debate is not about a media strategy, but the nature--and future--of the Green Party itself. Is the Green Party a left-wing alternative to the Democrats, or is it a tent big enough for those from "across the political spectrum" who are fed up with the status quo? Are Green candidates running to get as many votes as possible, from whomever will vote for them, or are they running in order to present progressive ideas to wider layers of people? I think that ultimately the party will have to be one or the other.

This does not make me an elitist. I agree that the left needs to reach out and convince broader sections of the population of our ideas. However, I believe the most effective way to do this is to tell the truth.

We should challenge racists like Lou Dobbs and expose their attempts to divide us among ourselves--not welcome the demagogues of CNN and their racist supporters into our movement with open arms.

Ben Dalbey, Baltimore, Md.

<?php include "../../legacy-includes/BottomNavLinks.htmlf" ?>

<?php include "../../legacy-includes/RightAdFolder.htmlf" ?>


text:
/**
 */
package at.fhj.gaar.androidapp.appDsl;

import org.eclipse.emf.ecore.EObject;

/**
 *
 * A representation of the model object 'Layout Element Click Action'.
 *
 *
 *
 * @see at.fhj.gaar.androidapp.appDsl.AppDslPackage#getLayoutElementClickAction()
 * @model
 * @generated
 */
public interface LayoutElementClickAction extends EObject
{
} // LayoutElementClickAction


text:
<?php

namespace Flarum\User\Command;

use Flarum\User\User;

class RegisterUser
{
    /**
     * The user performing the action.
     *
     * @var User
     */
    public $actor;

    /**
     * The attributes of the new user.
     *
     * @var array
     */
    public $data;

    /**
     * @param User $actor The user performing the action.
     * @param array $data The attributes of the new user.
     */
    public function __construct(User $actor, array $data)
    {
        $this->actor = $actor;
        $this->data = $data;
    }
}


text:
.class final Lcom/android/server/power/PowerManagerService$WakeLock;
.super Ljava/lang/Object;
.source "PowerManagerService.java"

# interfaces
.implements Landroid/os/IBinder$DeathRecipient;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/server/power/PowerManagerService;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x12
    name = "WakeLock"
.end annotation

# instance fields
.field public mFlags:I

.field public final mLock:Landroid/os/IBinder;

.field public mNotifiedAcquired:Z

.field public final mOwnerPid:I

.field public final mOwnerUid:I

.field public final mPackageName:Ljava/lang/String;

.field public mTag:Ljava/lang/String;

.field public mWorkSource:Landroid/os/WorkSource;

.field final synthetic this$0:Lcom/android/server/power/PowerManagerService;

# direct methods
.method public constructor <init>(Lcom/android/server/power/PowerManagerService;Landroid/os/IBinder;ILjava/lang/String;Ljava/lang/String;Landroid/os/WorkSource;II)V
    .registers 10
    .param p2    # Landroid/os/IBinder;
    .param p3    # I
    .param p4    # Ljava/lang/String;
    .param p5    # Ljava/lang/String;
    .param p6    # Landroid/os/WorkSource;
    .param p7    # I
    .param p8    # I

    iput-object p1, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->this$0:Lcom/android/server/power/PowerManagerService;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p2, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mLock:Landroid/os/IBinder;

    iput p3, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mFlags:I

    iput-object p4, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mTag:Ljava/lang/String;

    iput-object p5, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mPackageName:Ljava/lang/String;

    # invokes: Lcom/android/server/power/PowerManagerService;->copyWorkSource(Landroid/os/WorkSource;)Landroid/os/WorkSource;
    invoke-static {p6}, Lcom/android/server/power/PowerManagerService;->access$2200(Landroid/os/WorkSource;)Landroid/os/WorkSource;

    move-result-object v0

    iput-object v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mWorkSource:Landroid/os/WorkSource;

    iput p7, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mOwnerUid:I

    iput p8, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mOwnerPid:I

    return-void
.end method

.method private getLockFlagsString()Ljava/lang/String;
    .registers 4

    const-string v0, ""

    iget v1, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mFlags:I

    const/high16 v2, 0x10000000

    and-int/2addr v1, v2

    if-eqz v1, :cond_1c

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " ACQUIRE_CAUSES_WAKEUP"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    :cond_1c
    iget v1, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mFlags:I

    const/high16 v2, 0x20000000

    and-int/2addr v1, v2

    if-eqz v1, :cond_36

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " ON_AFTER_RELEASE"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    :cond_36
    return-object v0
.end method

.method private getLockLevelString()Ljava/lang/String;
    .registers 3

    iget v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mFlags:I

    const v1, 0xffff

    and-int/2addr v0, v1

    sparse-switch v0, :sswitch_data_1c

    const-string v0, "???                           "

    :goto_b
    return-object v0

    :sswitch_c
    const-string v0, "FULL_WAKE_LOCK                "

    goto :goto_b

    :sswitch_f
    const-string v0, "SCREEN_BRIGHT_WAKE_LOCK       "

    goto :goto_b

    :sswitch_12
    const-string v0, "SCREEN_DIM_WAKE_LOCK          "

    goto :goto_b

    :sswitch_15
    const-string v0, "PARTIAL_WAKE_LOCK             "

    goto :goto_b

    :sswitch_18
    const-string v0, "PROXIMITY_SCREEN_OFF_WAKE_LOCK"

    goto :goto_b

    nop

    :sswitch_data_1c
    .sparse-switch
        0x1 -> :sswitch_15
        0x6 -> :sswitch_12
        0xa -> :sswitch_f
        0x1a -> :sswitch_c
        0x20 -> :sswitch_18
    .end sparse-switch
.end method

# virtual methods
.method public binderDied()V
    .registers 2

    iget-object v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->this$0:Lcom/android/server/power/PowerManagerService;

    # invokes: Lcom/android/server/power/PowerManagerService;->handleWakeLockDeath(Lcom/android/server/power/PowerManagerService$WakeLock;)V
    invoke-static {v0, p0}, Lcom/android/server/power/PowerManagerService;->access$2300(Lcom/android/server/power/PowerManagerService;Lcom/android/server/power/PowerManagerService$WakeLock;)V

    return-void
.end method

.method public hasSameProperties(ILjava/lang/String;Landroid/os/WorkSource;II)Z
    .registers 7
    .param p1    # I
    .param p2    # Ljava/lang/String;
    .param p3    # Landroid/os/WorkSource;
    .param p4    # I
    .param p5    # I

    iget v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mFlags:I

    if-ne v0, p1, :cond_1c

    iget-object v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mTag:Ljava/lang/String;

    invoke-virtual {v0, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1c

    invoke-virtual {p0, p3}, Lcom/android/server/power/PowerManagerService$WakeLock;->hasSameWorkSource(Landroid/os/WorkSource;)Z

    move-result v0

    if-eqz v0, :cond_1c

    iget v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mOwnerUid:I

    if-ne v0, p4, :cond_1c

    iget v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mOwnerPid:I

    if-ne v0, p5, :cond_1c

    const/4 v0, 0x1

    :goto_1b
    return v0

    :cond_1c
    const/4 v0, 0x0

    goto :goto_1b
.end method

.method public hasSameWorkSource(Landroid/os/WorkSource;)Z
    .registers 3
    .param p1    # Landroid/os/WorkSource;

    iget-object v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mWorkSource:Landroid/os/WorkSource;

    invoke-static {v0, p1}, Llibcore/util/Objects;->equal(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public toString()Ljava/lang/String;
    .registers 3

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-direct {p0}, Lcom/android/server/power/PowerManagerService$WakeLock;->getLockLevelString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " \'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mTag:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\'"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-direct {p0}, Lcom/android/server/power/PowerManagerService$WakeLock;->getLockFlagsString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " (uid="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mOwnerUid:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ", pid="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mOwnerPid:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ", ws="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mWorkSource:Landroid/os/WorkSource;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ")"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public updateProperties(ILjava/lang/String;Ljava/lang/String;Landroid/os/WorkSource;II)V
    .registers 10
    .param p1    # I
    .param p2    # Ljava/lang/String;
    .param p3    # Ljava/lang/String;
    .param p4    # Landroid/os/WorkSource;
    .param p5    # I
    .param p6    # I

    iget-object v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mPackageName:Ljava/lang/String;

    invoke-virtual {v0, p3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_2d

    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Existing wake lock package name changed: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mPackageName:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " to "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_2d
    iget v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mOwnerUid:I

    if-eq v0, p5, :cond_56

    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Existing wake lock uid changed: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mOwnerUid:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " to "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_56
    iget v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mOwnerPid:I

    if-eq v0, p6, :cond_7f

    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Existing wake lock pid changed: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget v2, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mOwnerPid:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " to "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_7f
    iput p1, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mFlags:I

    iput-object p2, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mTag:Ljava/lang/String;

    invoke-virtual {p0, p4}, Lcom/android/server/power/PowerManagerService$WakeLock;->updateWorkSource(Landroid/os/WorkSource;)V

    return-void
.end method

.method public updateWorkSource(Landroid/os/WorkSource;)V
    .registers 3
    .param p1    # Landroid/os/WorkSource;

    # invokes: Lcom/android/server/power/PowerManagerService;->copyWorkSource(Landroid/os/WorkSource;)Landroid/os/WorkSource;
    invoke-static {p1}, Lcom/android/server/power/PowerManagerService;->access$2200(Landroid/os/WorkSource;)Landroid/os/WorkSource;

    move-result-object v0

    iput-object v0, p0, Lcom/android/server/power/PowerManagerService$WakeLock;->mWorkSource:Landroid/os/WorkSource;

    return-void
.end method


text:
<resources>
    <string name="app_name">MaterialEditText</string>
    <string name="action_settings">Settings</string>
</resources>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.dropwizard</groupId>
        <artifactId>dropwizard-parent</artifactId>
        <version>2.0.0-rc11-SNAPSHOT</version>
        <relativePath>../dropwizard-parent</relativePath>
    </parent>

    <artifactId>dropwizard-jdbi3</artifactId>
    <name>Dropwizard JDBI3 Support</name>

    <dependencies>
        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-db</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jdbi</groupId>
            <artifactId>jdbi3-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jdbi</groupId>
            <artifactId>jdbi3-sqlobject</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jdbi</groupId>
            <artifactId>jdbi3-jodatime2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jdbi</groupId>
            <artifactId>jdbi3-guava</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-jdbi3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>


text:
CREATE TABLE WORKCAL_RULE(
        ID BIGINT NOT NULL,
	YEAR INT,
        WEEK INT,
	NAME VARCHAR(50),
	WORK_DATE TIMESTAMP NULL,
	STATUS INT,
	TYPE_ID BIGINT,
        CONSTRAINT PK_WORKCAL_RULE PRIMARY KEY(ID),
	CONSTRAINT FK_WORKCAL_RULE_TYPE FOREIGN KEY(TYPE_ID) REFERENCES WORKCAL_TYPE(ID)
);


text:
define(['src/views/homeView'], function(homeView) {

    'use strict';

    var expect = {};
    var homeview = {};

    describe('Homeview Test', function() {

        before(function() {
            expect = chai.expect;
            homeview = new homeView();
        });

        describe("Object existence", function() {

            it("Is homeview instance exist", function() {
                expect(homeview).exist;
            });

            it("Is instance of", function() {
                expect(homeview).to.be.instanceOf(homeView);
            });

            it("Is beforeRender exist", function() {
                expect(homeview.beforeRender).exist;
            });

            it("Is afterRender exist", function() {
                expect(homeview.afterRender).exist;
            });

            it("Is eventsHash exist", function() {
                expect(homeview.eventsHash).exist;
            });

        });

        after(function() {
            expect = homeview = {};
        });
    });

});


text:
%!TEX root = ../TMA4120-summary.tex
\section{Fouries analysis}

\subsection{Fourier series}
For a function to be represented by a fourier series it must be
periodic.

\paragraph{Euler formulas}
\paragraph{Even function} $f(x) = f(-x)$ . Even functions reduce to a Fourier cosine series.
\paragraph{Odd function}  $f(x) = - f(-x)$ Odd functions reduce to
Fourier sine series.
% include Fourier coefficient formula for even and odd function.
\\

If $f(x)$ i given for $0 \leq x \leq L$ only, $f(x)$ has two half
range expansions of period $2L$, namely, a cosine and sine series.

\subsection{Fourier integral}
%We let $l -> \infinity$ in a Fourier series to obtain a Fourier integral.
\paragraph{Fourier sine \& cosine integral}

\subsection{Fourier transform}

\paragraph{Fourier transform}
\paragraph{Inverse Fourier transform}
\paragraph{Derivative}
\paragraph{Convolution}

\paragraph{Parseval's identity}

\subsection{DFT and FFT}
Discrete Fourier Transform(DFT) and Fast Fourier Transform(FFT).

\subsection{Table of Fourier transforms}


text:
import * as React from 'react';
import { IconBaseProps } from 'react-icon-base';
export default class IoAndroidAddCircle extends React.Component<IconBaseProps> { }