package com.fancoff.coffeemaker.bean.coffe;

import java.io.Serializable;

/**
 * Created by apple on 2018/2/1.
 */

/**

 */
public class ImageBean implements Serializable {
    String url;
    PositionBean position;

    public ImageBean(String url) {
        this.url = url;
    }

    public String getUrl() {
        return url;
    }

    Clickbean click;

    public void setUrl(String url) {
        this.url = url;
    }

    public PositionBean getPosition() {
        return position;
    }

    public void setPosition(PositionBean position) {
        this.position = position;
    }

    public Clickbean getClick() {
        return click;
    }

    public void setClick(Clickbean click) {
        this.click = click;
    }

    @Override
    public String toString() {
        return "ImageBean{" +
                "url='" + url + '\'' +
                ", position=" + position +
                ", click=" + click +
                '}';
    }
}


package com.company;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Semaphore;

public class Downloander extends Thread {
    private int speed = 100;
    private int size = 500;
    private Semaphore semaphore;
    private CountDownLatch cdlUp;

    public Downloander(String name, Semaphore semaphore, CountDownLatch cdlUp, CountDownLatch cdlDown) {
        super(name);
        this.semaphore = semaphore;
        this.cdlUp = cdlUp;
        this.cdlDown = cdlDown;
    }

    private CountDownLatch cdlDown;

    @Override
    public void run() {
        try {
            cdlUp.await();
            semaphore.acquire();
            System.out.println(getName() + " Начал скачивать");
            sleep(size / speed);
            System.out.println(getName() + "Скачал");
            semaphore.release();
            cdlDown.countDown();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}


package be.valuya.comptoir.ws.rest.validation;

import be.valuya.comptoir.model.commercial.Sale;
import be.valuya.comptoir.model.stock.ItemStock;
import be.valuya.comptoir.model.stock.StockChangeType;

import javax.enterprise.context.ApplicationScoped;
import javax.ws.rs.BadRequestException;
import java.util.Arrays;
import java.util.List;

/**
 *
 * @author cghislai
 */
@ApplicationScoped
public class StockChangeChecker {

    public void checkStockChangeType(ItemStock itemStock, StockChangeType... expectedTypes) {
        StockChangeType stockChangeType = itemStock.getStockChangeType();
        if (stockChangeType == null) {
            throw new AssertionError("Stock change type expected");
        }
        List<StockChangeType> stockChangeTypes = Arrays.asList(expectedTypes);
        if (!stockChangeTypes.contains(stockChangeType)) {
            throw new AssertionError("Stock change type is not allowed : "+stockChangeType);
        }
    }

}


package com.queencastle.service.test.shop;

import org.junit.Test;

import com.queencastle.dao.model.shop.Customer;
import com.queencastle.dao.mybatis.IdTypeHandler;
import com.queencastle.service.test.BaseTest;

public class CustomerTester extends BaseTest {

	@Test
	// @Ignore
	public void getByIdTest() {
		String id = IdTypeHandler.encode(1l);
		Customer result = customerService.getById(id);
		if (result != null) {
			System.out.println("=========" + result.getId());
			System.out.println("=========" + result.getCustomerName());
			System.out.println("=========" + result.getCustomerSex());
			System.out.println("=========" + result.getCustomerTel());
		} else {
			System.out.println("=========");
		}
	}

	@Test
	// @Ignore
	public void CustomertTest() {

		Customer customer = new Customer();
		customer.setCustomerName("drgergeg");
		customer.setCustomerSex("男");
		customer.setCustomerTel("14567438796");
		customerService.insert(customer);
	}

}


package com.farazpardazan.cardmanagementsystem.web.dto.card;

import com.farazpardazan.cardmanagementsystem.validator.card.CardNumber;

import javax.validation.constraints.NotBlank;

/**
 * @author Hossein Baghshahi
 */
public class CardDto {

    @NotBlank(message = "{card.name.empty")
    private String name;

    @NotBlank(message = "{card.number.empty}")
    @CardNumber
    private String cardNumber;

    public CardDto() {
    }

    public CardDto(@NotBlank(message = "{card.name.empty") String name,
                   @NotBlank(message = "{card.number.empty}") String cardNumber) {
        this.name = name;
        this.cardNumber = cardNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }
}


package com.java.zhangjiayou.ui.explore.utils;

import android.content.Context;

import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;

public class WXRegister{
    // APP_ID 替换为你的应用从官方网站申请到的合法appID
    private static final String APP_ID = "wx88888888";

    // IWXAPI 是第三方app和微信通信的openApi接口
    public static IWXAPI regToWx(Context context) {
        // 通过WXAPIFactory工厂，获取IWXAPI的实例
        IWXAPI api = WXAPIFactory.createWXAPI(context, APP_ID, true);

        // 将应用的appId注册到微信
        api.registerApp(APP_ID);

        /*
        //建议动态监听微信启动广播进行注册到微信
        registerReceiver(new BroadcastReceiver() {
            @Override
            public void onReceive(Context context, Intent intent) {
                // 将该app注册到微信
                api.registerApp(APP_ID);
            }
        }, new IntentFilter(ConstantsAPI.ACTION_REFRESH_WXAPP));
        */
        return api;
    }
}


package com.paulorobertomartins.cleanarch.infra.web.controller.presenter;

import com.paulorobertomartins.cleanarch.core.usecases.responsemodel.InputStockResponse;
import com.paulorobertomartins.cleanarch.infra.web.controller.jsonresponse.CreateMovementJsonResponse;
import lombok.Getter;

import java.util.function.Consumer;

@Getter
public class InputStockResponsePresenter implements Consumer<InputStockResponse> {

    private CreateMovementJsonResponse jsonResponse;

    @Override
    public void accept(InputStockResponse response) {
        jsonResponse = CreateMovementJsonResponse.builder()
                .stockId(response.getStockId())
                .movementId(response.getMovementId())
                .addressFrom(null)
                .addressTo(response.getAddressLabel())
                .productEan(response.getProductEan())
                .quantity(response.getQuantity())
                .type("input")
                .build();
    }
}


package com.app.mana.a4321football.ui.screens.mainscreen.screenContents.favorite.teamdetails;

import android.content.Context;
import com.app.mana.a4321football.data.model.Matches;
import com.app.mana.a4321football.data.network.RetrofitServices;
import com.app.mana.a4321football.ui.base.BasePresenter;
import com.pnikosis.materialishprogress.ProgressWheel;
import io.reactivex.disposables.CompositeDisposable;

public class DetailPresenter extends BasePresenter {

  private DetailResponse resp;

  public DetailPresenter(Context context,
      CompositeDisposable disposable, DetailResponse resp) {
    super(context, disposable);
    this.resp = resp;
  }

  public void loadGames(ProgressWheel wheel, int id, String query) {
    services.getTeamPreviousGame(wheel, id, query);
  }

  @Override public void loadServiceData(Object model) {
    if (model instanceof Matches) {
      Matches matches = (Matches) model;
      resp.getDetaiGames(matches);
    }
  }
}


package com.ssafy.mogasup.service;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ssafy.mogasup.dao.NoticeDao;
import com.ssafy.mogasup.dto.Notice;

@Service
public class NoticeServiceImpl implements NoticeService {

	@Autowired
	NoticeDao dao;

	@Override
	public void insert(Notice notice) {
		dao.insert(notice);
	}

	@Override
	public void delete(int notice_id) {
		dao.delete(notice_id);
	}

	@Override
	public List<Notice> find(int family_id) {
		return dao.find(family_id);
	}

	@Override
	public void update(Notice notice) {
		dao.update(notice);
	}

	@Override
	public String getNickname(int user_id) {
		return dao.getNickname(user_id);
	}

	@Override
	public Notice read(int notice_id) {
		return dao.read(notice_id);
	}

	@Override
	public String getNoticeId(int family_id) {
		return dao.getNoticeId(family_id);
	}
}


package testowka;

import static junit.framework.Assert.assertTrue;

import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
public class Selenium1 {

	@Before

	public void before(){
		System.setProperty("webdriver.gecko.driver", "D:\\Danusia\\Testowanie\\geckodriver-v0.14.0-win64\\geckodriver.exe");
	}

	@Test

	public void driveIsTheKing(){

		WebDriver driver = new HtmlUnitDriver();

		driver.get("http://compendiumdev.co.uk/selenium");

		assertTrue(driver.getTitle().startsWith("Selenium Simplified"));

	}

	@Test

public void firefoxIsSupportedByWebdriver(){

		WebDriver driver = new FirefoxDriver();

		driver.get("http://compendiumdev.co.uk/selenium");

		assertTrue(driver.getTitle().startsWith("Selenium Simplified"));

		driver.quit();

	}
}


# Arduino-Bytebeat-Eurorack
this is based on stimmer's code from the arduino forums, based on Viznut's work
see viznut's blog http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line-of.html
and http://www.youtube.com/watch?v=GtQdIYUtAHg&feature=related

So all this does is take the original code, add an X and Y input with pots, and a "function" selector with a button.

It's compiled and it works on my Uno, but the pushbutton function selector functionality does not respond. I think it's something to do with the looping nature of the writing to the pin 10, but I'm new to Arduino coding.

The first function is obnoxious and terrible with the X and Y changing, but it proves the concept.

Once i've hashed out why I can't get it to change functions, I'll send the thing out into the world and hope for the best!

A planned feature is the ability to slow the velocity of the noise generated, but I'm not quite sure how to do it, yet.


package window;

import gui.KeyPressedEvent;
import gui.KeyReleasedEvent;
import org.lwjgl.glfw.GLFWKeyCallbackI;

import static org.lwjgl.glfw.GLFW.GLFW_PRESS;
import static org.lwjgl.glfw.GLFW.GLFW_RELEASE;

public class KeyCallBack implements GLFWKeyCallbackI {

    private Window mWindow;

    public KeyCallBack(Window window) {
        this.mWindow = window;
    }

    @Override
    public void invoke(long window, int key, int scancode, int action, int mods) {
        if (this.mWindow.getHandle() == window) {
            switch (action) {
                case GLFW_PRESS: {
                    this.mWindow.pushEvent(new KeyPressedEvent(key, scancode));
                    break;
                }
                case GLFW_RELEASE: {
                    this.mWindow.pushEvent(new KeyReleasedEvent(key, scancode));
                    break;
                }
                default:
                    break;
            }

        }

    }

}


package fr.k0bus.betterhalloween.event;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.inventory.ItemStack;

import fr.k0bus.betterhalloween.Main;
import fr.k0bus.betterhalloween.items.KeyItem;
import fr.k0bus.betterhalloween.items.KeyType;

public class ZombieKill implements Listener{
	@EventHandler(ignoreCancelled = true)
    public void onKill(EntityDeathEvent e)
    {
    	if(e.getEntity().getKiller() instanceof Player && e.getEntity().hasMetadata("herobrine"))
    	{
    		Player p = (Player) e.getEntity().getKiller();
    		Main.plugin.getServer().broadcastMessage(Main.tag + p.getDisplayName() + " a détruit un fragment d'âme d'Herobrine !");
    		ItemStack key = new KeyItem(KeyType.IRON, 1);
    		e.getDrops().clear();
    		e.getEntity().getWorld().dropItemNaturally(e.getEntity().getLocation(), key);
    	}
    }
}