package com.kunyao.message;

import com.kunyao.core.entity.base.Entity;

public class MessageEntity<T> implements Entity {

    private static final long serialVersionUID = -2708504431483704392L;
    /**
     * 用于分布式追踪
     */
    private String messageId;

    private T data;

    public MessageEntity(){

    }

    public MessageEntity(String messageId, T data) {
        this.messageId = messageId;
        this.data = data;
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "MessageEntity{" +
                "messageId='" + messageId + '\'' +
                ", data=" + data +
                '}';
    }

    @Override
    public String getTraceId() {
        return messageId;
    }
}


package jyh.test.android.ex_0528;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

public class SubActivity extends AppCompatActivity {

    TextView txt1, txt2, txt3, txt4;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sub);

        txt1 = findViewById(R.id.txt1);
        txt2 = findViewById(R.id.txt2);
        txt3 = findViewById(R.id.txt3);
        txt4 = findViewById(R.id.txt4);

        //MainActivity에서 전달한 intent를 SubActivity에서 받는다.
        Intent i = getIntent();
        Bundle bundle = i.getExtras();

        String name = bundle.getString("m_name");
        String age = bundle.getString("m_age");
        String phone = bundle.getString("m_phone");
        String birth = bundle.getString("m_birth");

//        String name = i.getStringExtra("my_name");
//        String age = i.getStringExtra("my_age");
//        String phone = i.getStringExtra("my_phone");

        txt1.setText( name );
        txt2.setText( age );
        txt3.setText( phone );
        txt4.setText( birth );

    }//onCreate()
}


package gui.buttonListeners;

import blogic.filetype.executor.Executable;
import gui.buttonListeners.controller.ListenerController;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import static util.Constants.Messages.*;

public class ClearAllDataButtonListener implements ActionListener {
    private final ListenerController listenerController;

    public ClearAllDataButtonListener(ListenerController listenerController) {
        this.listenerController = listenerController;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        String filename = listenerController.getFilename();
        Executable executable = listenerController.getExecutable();

        JLabel confirmLabel = new JLabel(CLEAR_FILE);
        int option = JOptionPane.showConfirmDialog(
                confirmLabel,
                String.format(CLEAR_WARNING, filename)
        );

        if (option == JOptionPane.YES_OPTION) {
            executable.clearAll(filename);
            listenerController.getTable().redrawTable();
        }
    }
}


package net.hus.core.client.ui.admin;

import org.gwtbootstrap3.client.ui.constants.IconType;
import org.gwtbootstrap3.client.ui.html.Paragraph;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Widget;

import net.hus.core.client.common.Callback;
import net.hus.core.client.common.UIObjectDisplay;
import net.hus.core.client.ui.common.AbstractView;
import net.hus.core.shared.model.UIObject_;

public class DefaultView extends AbstractView implements UIObjectDisplay
{
  private static final Binder BINDER = GWT.create(Binder.class);

  interface Binder extends UiBinder<Widget, DefaultView>
  {
  }

  @UiField
  Paragraph mName;

  @UiField
  ActionView mAction0;

  public DefaultView()
  {
  }

  public DefaultView(UIObject_ inUiObject)
  {
    initWidget(BINDER.createAndBindUi(this));
    mName.setText(inUiObject.getSimpleName());
  }

  @Override
  public void setCallback(Callback<IconType> inCallback)
  {
    mAction0.setCallback(inCallback);
  }
}


package com.macro.mall.tiny.service.impl;

import com.macro.mall.tiny.mbg.mapper.SysDeptMapper;
import com.macro.mall.tiny.mbg.model.SysDept;
import com.macro.mall.tiny.mbg.model.SysDeptExample;
import com.macro.mall.tiny.service.SysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SysDeptImpl implements SysDeptService {
    @Autowired
    private SysDeptMapper sysDeptMapper;
    @Override
    public int createDept(SysDept sysDept) {
        return sysDeptMapper.insertSelective(sysDept);
    }

    @Override
    public int updateDept(SysDept sysDept) {
        return sysDeptMapper.updateByExampleSelective(sysDept,new SysDeptExample());
    }

    @Override
    public int deleteDept(long deptId) {
        return sysDeptMapper.deleteByPrimaryKey(deptId);
    }

    @Override
    public SysDept getDeptById(long deptId) {
        return sysDeptMapper.selectByPrimaryKey(deptId);
    }

    @Override
    public List<SysDept> getDeptList(long parentId) {

        List<SysDept> list=sysDeptMapper.selectByParentId(parentId);
        return list;
    }

}


package org.pcsoft.framework.jcoding.jobject;

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

/**
 * Created by pfeifchr on 10.12.2015.
 */
public abstract class JExtensibleTypeDescriptor extends JTypeDescriptor<JStandardMethodDescriptor> {
    private final List<JInterfaceReferenceDescriptor> interfaceList = new ArrayList<>();
    private final List<JFieldDescriptor> fieldList = new ArrayList<>();

    JExtensibleTypeDescriptor() {
    }

    public JInterfaceReferenceDescriptor[] getInterfaces() {
        return interfaceList.toArray(new JInterfaceReferenceDescriptor[interfaceList.size()]);
    }

    public void addInterface(final JInterfaceReferenceDescriptor $interface) {
        interfaceList.add($interface);
    }

    public void removeInterface(final JInterfaceReferenceDescriptor $interface) {
        interfaceList.remove($interface);
    }

    public JFieldDescriptor[] getFields() {
        return fieldList.toArray(new JFieldDescriptor[fieldList.size()]);
    }

    public void addField(final JFieldDescriptor field) {
        fieldList.add(field);
    }

    public void removeField(final JFieldDescriptor field) {
        fieldList.remove(field);
    }
}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.wahsis.iot.model;

import java.io.IOException;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.log4j.Logger;

/**
 *
 * @author tamvh
 */
public class RootAreaModel {
    private static RootAreaModel _instance = null;
    private static final Lock createLock_ = new ReentrantLock();
    protected final Logger logger = Logger.getLogger(this.getClass());

    public static RootAreaModel getInstance() throws IOException {
        if (_instance == null) {
            createLock_.lock();
            try {
                if (_instance == null) {
                    _instance = new RootAreaModel();
                }
            } finally {
                createLock_.unlock();
            }
        }
        return _instance;
    }
}


package com.dia.multiclient.audio.dialogs;

import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;

import com.dia.multiclient.R;
import com.dia.multiclient.audio.activities.AudioActivity;
import com.dia.multiclient.audio.fragments.SongListFragment;

/**
 * Created by Ilya on 19.09.2016.
 */
public class SaveDialog extends DialogFragment {
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        String[] sorts = {getString(R.string.add_to_playlist), getString(R.string.remove)};

        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        builder.setTitle("").setItems(sorts, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                SongListFragment slf = AudioActivity.getSLF();
                if (which == 0) {
                    slf.saveSong();
                }
                if (which == 1) {
                    slf.deleteSong();
                }
            }
        });

        return builder.create();
    }
}


package cn.lm;

public class ResultObject {
	private String resultCode;
	private String resultMsg;
	private String resultCount;
	private Object resultData;

	public ResultObject() {
		super();
	}
	public ResultObject(String resultCode, String resultMsg, String resultCount, Object resultData) {
		super();
		this.resultCode = resultCode;
		this.resultMsg = resultMsg;
		this.resultCount = resultCount;
		this.resultData = resultData;
	}
	public ResultObject(String resultCode, String resultMsg) {
		super();
		this.resultCode = resultCode;
		this.resultMsg = resultMsg;
	}

	public String getResultCode() {
		return resultCode;
	}
	public void setResultCode(String resultCode) {
		this.resultCode = resultCode;
	}
	public String getResultMsg() {
		return resultMsg;
	}
	public void setResultMsg(String resultMsg) {
		this.resultMsg = resultMsg;
	}
	public String getResultCount() {
		return resultCount;
	}
	public void setResultCount(String resultCount) {
		this.resultCount = resultCount;
	}
	public Object getResultData() {
		return resultData;
	}
	public void setResultData(Object resultData) {
		this.resultData = resultData;
	}
}


package com.example.rmit_android_ass2.model;

import com.google.firebase.firestore.DocumentId;

import java.io.Serializable;

public class Report implements Serializable {
    @DocumentId
    private String id;
    private long follower;
    private String name;
    private double amount;

    public Report() {
    }

    public Report(String name, long follower, double amount) {
        this.follower = follower;
        this.name = name;
        this.amount = amount;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public long getFollower() {
        return follower;
    }

    public void setFollower(long follower) {
        this.follower = follower;
    }

    public String getName() {
        return name;
    }

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

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }
}


package com.example.Nazmus_Sakib_Ohee.digital_doctor;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class First_AidRsl extends AppCompatActivity {

    private Button cmn_dss,accidntl_fst;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_first__aid_rsl);

        cmn_dss = (Button)findViewById(R.id.cmn_dss);
        cmn_dss.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(First_AidRsl.this,Cmn_Diseases.class);
                startActivity(intent);
            }
        });

        accidntl_fst = (Button)findViewById(R.id.accdntal_fst);
        accidntl_fst.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(First_AidRsl.this,Accidental_Fst.class);
                startActivity(intent);
            }
        });

    }
}


package org.xander.info;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.logging.Logger;

public class InfoServer {

    static Logger logger = Logger.getLogger(InfoServer.class.getName());

    public void go (){

        try {
            ServerSocket serverSocket = new ServerSocket(4242);

            Info info = new Info();

            while(true){
                Socket sock = serverSocket.accept();

                ObjectOutputStream objectOutputStream = new ObjectOutputStream(new FileOutputStream("Info.ser"));
                objectOutputStream.writeObject(info);
            }
        } catch (FileNotFoundException e){
            System.out.println("Resource for inner usage was not found, please try again...");
            logger.severe("FileNotFoundException happens...");
            e.printStackTrace();

        } catch (IOException e){
            System.out.println("There was an error in input/output operations, please try again...");
            logger.severe("IOException happens...");
            e.printStackTrace();
        }
    }
}


package be.suyo.toastoolkit.ccbi2ccb.structs.propvalues;

import com.dd.plist.NSArray;
import com.dd.plist.NSNumber;
import com.dd.plist.NSObject;
import com.dd.plist.NSString;

import be.suyo.toastoolkit.ccbi2ccb.structs.PropertyValue;
import be.suyo.toastoolkit.ccbi2ccb.structs.TargetType;

public class BlockCcControl extends PropertyValue {
    private String selectorName;
    private TargetType selectorTarget;
    private long controlEvents;

    public BlockCcControl(String selectorName, long selectorTargetId, long controlEvents) {
        this.selectorName = selectorName;
        this.selectorTarget = TargetType.values()[(int) selectorTargetId];
        this.controlEvents = controlEvents;
    }

    @Override
    public String toString() {
        return "BlockCcControl[" + selectorName + "," + selectorTarget + "," + controlEvents + "]";
    }

    @Override
    public NSObject toPlist() {
        NSArray arr = new NSArray(3);
        arr.setValue(0, new NSString(selectorName));
        arr.setValue(1, new NSNumber(selectorTarget.ordinal()));
        arr.setValue(2, new NSNumber(controlEvents));
        return arr;
    }

}


package a15s.android.datamatiker.mini_projekt1;

import android.content.Context;
import android.database.Cursor;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CursorAdapter;
import android.widget.TextView;

/**
 * Created by Marcus on 02-10-2017.
 */

public class TopLevelListAdapter extends CursorAdapter {
    private LayoutInflater cursorInflater;
    private View.OnClickListener listener;

    public TopLevelListAdapter(Context context, Cursor cursor, int flags){
        super(context, cursor, flags);
        cursorInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

    }

    @Override
    public View newView(Context context, Cursor cursor, ViewGroup parent) {
        return cursorInflater.inflate(R.layout.list_template, parent, false);
    }

    @Override
    public void bindView(View view, Context context, Cursor cursor) {
        TextView txtName = (TextView)view.findViewById(R.id.txtListName);
        txtName.setText(cursor.getString(1));
    }
}


package com.soco.SoCoClient.events._ref;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.Log;

@Deprecated
public class SingleActivityTabsPagerAdapter extends FragmentPagerAdapter {

    String tag = "SingleProjectTabsPagerAdapter";

    public SingleActivityTabsPagerAdapter(FragmentManager fm) {
        super(fm);
        Log.i(tag, "membersAdapter init");
    }
//
    @Override
    public Fragment getItem(int index) {
        Log.d(tag, "get item from index " + index);
//        switch (index) {
//            case 0:
//                return new ActivityDetailsFragment();
//            case 1:
//                return new ActivityUpdatesFragment();
//            case 2:
//                return new ActivityMembersFragment();
//            case 3:
//                return new ActivityResourcesFragment();
//        }

        return null;
    }
//
    @Override
    public int getCount() {
        // get item count - equal to number of tabs
        return 4;
    }

}


package com.zhangyongsic.study.design.single;

/**
 * @program: study
 * @description: 懒汉模式 ，线程不安全，将代码块加上锁，
 * 但是发生指令重排时也会出现问题
 * @author: zhang yong
 * @create: 2020/02/18
 */
public class Singleton6 {

    /**
     *  加上 volatile 防止指令重排 ，以及对所有线程可见
     */
    private static volatile Singleton6 singleton;

    private Singleton6(){}

    public static Singleton6 getInstance(){
        if (singleton == null){
            //当几个程序都执行到此处，都重新创建
            synchronized (Singleton6.class){
                //此处再次判断下 保证只创建一个
                if (singleton == null){
                    singleton = new Singleton6();
                }
            }
        }
        return singleton;
    }

    public static void main(String[] args) {

        Runnable runnable = new Runnable() {
            public void run() {
                try {
                    Thread.sleep(1000);
                    System.out.println(Singleton6.getInstance().hashCode());
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        };
        for (int i=0; i<1000; i++){
            new Thread(runnable).start();
        }
    }
}


# Dota2TextToSpeech
Reads DOTA2 All and Teamchat aloud, so now I can hear the insults in the voice of a middle-aged British woman.

Idea came from: https://github.com/patriksletmo/Dota2Translator

* I took his Dota2ChatDLL and modified it a bit.

* I removed translation. I disagree with the way this was done.

* I edited DOTA_TV chat.     ....it sometimes works.

Please give all credit to patriksletmo.

To build:

1. Make sure that Dota2TextToSpeech is the startup project.

    This can be changed by right-clicking the project and selecting "Set as Startup Project".

    If you downloaded the 2012 version of Visual Studio you have to change the platform toolset of the project Dota2ChatDLL.

2. Right-click on each project, navigate to properties and change "Platform Toolset" to "Visual Studio 2012 (v11.0)

    While this enables you to build the project without installing Visual Studio 2010, it will result in end users having to        download the Visual C++ 2012 Redistributable instead of the 2010 version.

3. Make sure to build the project for Release and x86.

    The projects have not been configured for building in any other mode and will most likely not succeed.


package com.mrtro.mretrofittemplet.model.login;

import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class GetAccount {

    @SerializedName("status_code")
    @Expose
    private String statusCode;
    @SerializedName("status_message")
    @Expose
    private String statusMessage;
    @SerializedName("total_balance")
    @Expose
    private String totalBalance;
    @SerializedName("accounts")
    @Expose
    private List<Account> accounts = null;

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public String getStatusMessage() {
        return statusMessage;
    }

    public void setStatusMessage(String statusMessage) {
        this.statusMessage = statusMessage;
    }

    public String getTotalBalance() {
        return totalBalance;
    }

    public void setTotalBalance(String totalBalance) {
        this.totalBalance = totalBalance;
    }

    public List<Account> getAccounts() {
        return accounts;
    }

    public void setAccounts(List<Account> accounts) {
        this.accounts = accounts;
    }

}


package com.pa165.ddtroops.api.dto;

import java.io.Serializable;

/**
 * @author Martin Jelínek
 *
 * Admin transfer object for D&D troops.
 */
public class AdminDTO implements Serializable {

    private long id;
    private String name;

    public AdminDTO() {
    }

    public long getId() {
        return id;
    }

    public void setId(long val) {
        this.id = val;
    }

    public String getName() {
        return name;
    }

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

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 73 * hash + (int) (this.id ^ (this.id >>> 32));
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final AdminDTO other = (AdminDTO) obj;
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

}


package com.appyhome.appyproduct.mvvm.utils.helper;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

import com.appyhome.appyproduct.mvvm.R;
import com.crashlytics.android.Crashlytics;

public final class AppUtils {

    private AppUtils() {
        // This class is not publicly instantiable
    }

    public static void openPlayStoreForApp(Context context) {
        final String appPackageName = context.getPackageName();
        try {
            context.startActivity(new Intent(Intent.ACTION_VIEW,
                    Uri.parse(context
                            .getResources()
                            .getString(R.string.app_market_link) + appPackageName)));
        } catch (android.content.ActivityNotFoundException e) {
            Crashlytics.logException(e);
            context.startActivity(new Intent(Intent.ACTION_VIEW,
                    Uri.parse(context
                            .getResources()
                            .getString(R.string.app_google_play_store_link) + appPackageName)));
        }
    }
}


package it.flayart.flow.objects;

import com.google.common.collect.Lists;
import it.flayart.flow.callback.Callback;
import it.flayart.flow.commands.Command;
import lombok.Data;
import org.telegram.telegrambots.meta.api.objects.Update;
import java.util.List;

@Data
public class TelegramMap {
    private final List<Command> commandList = Lists.newArrayList();
    private final List<Callback> callbackList = Lists.newArrayList();

    public void executeCommand(Update update) {
        if(!update.hasMessage() && !update.getMessage().hasText()) return;

        for(Command command : this.commandList) {
            if(!update.getMessage().getText().startsWith(command.getCommand())) continue;
            command.execute(update, update.getMessage(), update.getMessage().getFrom());
        }
    }

    public void executeCallback(Update update) {
        if(!update.hasCallbackQuery()) return;

        for(Callback callback : this.callbackList) {
            if(!callback.getCallback().equals(update.getCallbackQuery().getId())) continue;
            callback.execute(update, update.getMessage(), update.getCallbackQuery().getFrom());
        }
    }
}


package com.daneking.websocket.command;

import org.springframework.context.ApplicationEventPublisher;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
import org.springframework.messaging.simp.annotation.SendToUser;
import org.springframework.stereotype.Controller;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Controller
public class CommandController {
    private ApplicationEventPublisher applicationEventPublisher;

    public CommandController(ApplicationEventPublisher applicationEventPublisher) {
        this.applicationEventPublisher = applicationEventPublisher;
    }

    @MessageMapping("/command")
    @SendToUser("/queue/request")
    public OutputMessage commandRequest(SimpMessageHeaderAccessor sha, Message message) {
        String time = LocalDateTime.now().format(DateTimeFormatter.ofPattern("HH:mm"));
        this.applicationEventPublisher.publishEvent(new CommandEvent(this, sha.getUser().getName()));
        return new OutputMessage(message.getFrom(), "Received:" + message.getText() + ",to:" + sha.getSessionId(), time);
    }

}


# test_hotdoc

This is a test project for [hotdoc](https://github.com/hotdoc/hotdoc).
Its purpose is to exercise as many of hotdoc's capabilities in as little
code as possible.

The reference output is visible at <https://people.collabora.com/~meh/test_hotdoc/index.html>

## Building it

### System-wide dependencies

On Fedora:

```
dnf install graphviz-devel python-devel libxml2-devel libxslt-devel cmake libyaml-devel meson clang-devel llvm-devel flex
```

And on Ubuntu / Debian:

```
apt-get install libgraphviz-dev python-dev libxml2-dev libxslt1-dev cmake libyaml-dev meson libclang-dev llvm-dev flex
```

### Python dependencies

```
pip2 install virtualenv
virtualenv --python=python2.7 hotdoc_env
. hotdoc_env/bin/activate
pip install -r requirements.txt
```

### Actual build

```
mkdir build
cd build
meson ..
ninja-build || ninja
hotdoc run --conf-file ../hotdoc.json
```

### Rebuilding from scratch

```
touch ../hotdoc.json && hotdoc run --conf-file ../hotdoc.json
```

### Rebuilding with lots of logs

```
touch ../hotdoc.json && hotdoc run --conf-file ../hotdoc.json -vv
```

### Licensing

test_hotdoc is licensed under the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE , see `COPYING` for more details.


package hska.iwi.eShopMaster.model.database.dataobjects;

import javax.persistence.*;

/**
 * This class contains details about roles.
 */
@Entity
@Table(name = "role")
public class Role implements java.io.Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	private int id;

	@Column(name = "type")
	private String typ;

	@Column(name = "level1")
	private int level;

	public Role() {
	}

	public Role(String typ, int level) {
		this.typ = typ;
		this.level = level;
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTyp() {
		return this.typ;
	}

	public void setTyp(String typ) {
		this.typ = typ;
	}

	public int getLevel() {
		return this.level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

}


package eu.dasish;

import java.util.Properties;

import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

public class Email {
	private static final String from = "web@gmail.com";
	private static final String host = "localhost";
	private static final String smtp = "mail.smtp.host";

	public static void send(String to, String subject, String body) {
		Properties properties = System.getProperties();
		properties.setProperty(smtp, host);
		Session session = Session.getDefaultInstance(properties);
		try {
			MimeMessage message = new MimeMessage(session);
			message.setFrom(new InternetAddress(from));
			message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
			message.setSubject(subject);
			message.setText(body);
			Transport.send(message);
		} catch (MessagingException mex) {
			mex.printStackTrace();
		}
	}
}


package br.ufpr.model;

/**
 *
 * @author Giovanni
 */
public enum Marca {

    VW(1, "Volkswagen"),
    GM(2, "General Motors"),
    FIAT(3, "Fiat"),
    HONDA(4, "Honda"),
    MERCEDES(5, "Mercedes"),
    VOLVO(6, "Volvo"),
    AUDI(7, "Audi"),
    FORD(8, "Ford"),
    KIA(9, "KIA"),
    TOYOTA(10, "Toyota"),
    LAND_ROVER(11, "Land Rover"),
    DODGE(12, "Dodge"),
    JAGUAR(13, "Jaguar"),
    PORSCHE(14, "Porsche");

    private Integer idMarca;
    private String descricao;

    private Marca(Integer idMarca, String descricao) {
        this.idMarca = idMarca;
        this.descricao = descricao;
    }

    public static Marca fromValue(Integer idMarca) {
        for (Marca marca : Marca.values()) {
            if (marca.getIdMarca() == idMarca) {
                return marca;
            }
        }
        return null;
    }

    public Integer getIdMarca() {
        return idMarca;
    }

    public String getDescricao() {
        return descricao;
    }

    @Override
    public String toString() {
        return getDescricao();
    }
}


package model;

import java.sql.PreparedStatement;
import java.sql.SQLException;

public class Firma extends Zakaznik {
    private String ico;
    private String nazov;

    public Firma(String id, String kontakt, String ico, String nazov) {
        super(id, kontakt);
        this.ico = ico;
        this.nazov = nazov;
    }

    public String getIco() {
        return ico;
    }

    public void setIco(String ico) {
        this.ico = ico;
    }

    public String getNazov() {
        return nazov;
    }

    public void setNazov(String nazov) {
        this.nazov = nazov;
    }

    public PreparedStatement insertStatement(PreparedStatement ps) throws SQLException {
        ps.setString(1, ico);
        ps.setString(2, nazov);
        return ps;
    }

    @Override
    public String toString() {
        return "Firma{" +
                "ico='" + ico + '\'' +
                ", nazov='" + nazov + '\'' +
                ", kontakt=" + super.getKontakt() +
                '}';
    }
}


package org.cyetstar.clover.entity;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

import com.google.common.collect.Lists;

@Entity
@Table(name = "tb_movie_language")
public class MovieLanguage extends IdEntity {

	private String value;

	private List<Movie> movies = Lists.newArrayList();

	public MovieLanguage() {
	}

	public MovieLanguage(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "tb_movie_relations_movie_language", joinColumns = { @JoinColumn(name = "language_id") }, inverseJoinColumns = { @JoinColumn(name = "movie_id") })
	public List<Movie> getMovies() {
		return movies;
	}

	public void setMovies(List<Movie> movies) {
		this.movies = movies;
	}

}


# Project Blog
![](https://github.com/Lackshan/blog/workflows/Build%20and%20deploy%20Jekyll%20site%20to%20GitHub%20Pages/badge.svg)

This blog showcases my various projects.

## Prerequisites
First follow the instructions [here](https://jekyllrb.com/docs/installation/) to install Jekyll.

## Build
### Serve site locally for testing
To host the site locally run:
```bash
cd jekyll_site
JEKYLL_ENV="production" bundle exec jekyll serve
```

### Generate static files for hosting
```bash
cd jekyll_site
JEKYLL_ENV="production" bundle exec jekyll build
```
## Deploy
### Automated deployment using GitHub Actions
After every commit, the action defined in ```.github/workflows/github-pages.yml``` will build the site and copy the contents of the resulting ```_site``` folder to the ```gh-pages``` branch.

[Source](https://jekyllrb.com/docs/continuous-integration/github-actions/)
[Also helpful](https://github.com/MichaelCurrin/jekyll-actions-quickstart)

### Accessing site
The site is hosted on [blog.lackshan.dev](https://blog.lackshan.dev)

## Credits
This blog uses the sudo theme which can be found [here](https://github.com/oneohthree/sudo-jekyll).


package moviez.mnf.com.movie.DataSet.CastMovieTv;

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

public class CastMovie {

    private List<Cast> cast = new ArrayList<Cast>();
    private List<Crew> crew = new ArrayList<Crew>();
    private Integer id;

    /**
     *
     * @return
     *     The cast
     */
    public List<Cast> getCast() {
        return cast;
    }

    /**
     *
     * @param cast
     *     The cast
     */
    public void setCast(List<Cast> cast) {
        this.cast = cast;
    }

    /**
     *
     * @return
     *     The crew
     */
    public List<Crew> getCrew() {
        return crew;
    }

    /**
     *
     * @param crew
     *     The crew
     */
    public void setCrew(List<Crew> crew) {
        this.crew = crew;
    }

    /**
     *
     * @return
     *     The id
     */
    public Integer getId() {
        return id;
    }

    /**
     *
     * @param id
     *     The id
     */
    public void setId(Integer id) {
        this.id = id;
    }

}


package shiro.spring.service.factorybean;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.config.BeanPostProcessor;
import shiro.spring.dao.po.mapper.UserMapper;
import shiro.spring.service.NormalService;

/**
 * @author chenzhi.xu
 * @date 2021/09/15
 */
public class NormalServiceFactoryBean implements FactoryBean<NormalService>, BeanPostProcessor {
    private final NormalService instance;

    public NormalServiceFactoryBean(UserMapper userMapper) {
        this.instance = new NormalService(userMapper);
    }

    @Override
    public NormalService getObject() throws Exception {
        return instance;
    }

    @Override
    public Class<?> getObjectType() {
        return NormalService.class;
    }

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

    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        return bean;
    }
}


/*
 * Autosleep
 * Copyright (C) 2016 Orange
 * Authors: Benjamin Einaudi   benjamin.einaudi@orange.com
 *          Arnaud Ruffin      arnaud.ruffin@orange.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.cloudfoundry.autosleep.ui.servicebroker.service;

import lombok.Getter;
import org.springframework.http.converter.HttpMessageNotReadableException;

@Getter
public class InvalidParameterException extends HttpMessageNotReadableException {

    private String parameterName;

    public InvalidParameterException(String parameterName, String error) {
        super("'" + parameterName + "': " + error);
        this.parameterName = parameterName;
    }

}


package models;

import io.ebean.Model;
import io.ebean.annotation.Index;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "drafts")
public class Draft extends Model {
    @Id
    public Long id;

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "from_email", referencedColumnName = "email")
    @Index
    public User fromEmail;

    public String toEmails;

    public String subject;

    @Lob
    public String body;

    @Temporal(TemporalType.TIMESTAMP)
    public Date updatedAt;

    @Temporal(TemporalType.TIMESTAMP)
    public Date createdAt;

    public Draft(User from, String toEmails, String subject, String body) {
        this.fromEmail = from;
        this.toEmails = toEmails;
        this.subject = subject;
        this.body = body;
    }

    @PrePersist
    public void onPrePersist(){
        this.createdAt = new Date();
        this.updatedAt = createdAt;
    }

    @PreUpdate
    public void onPreUpdate(){
        this.updatedAt = new Date();
    }
}


package MA2;

import java.io.BufferedReader;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

import com.opencsv.CSVReader;

public class MA2 {

	 public static void main(String[] args)throws FileNotFoundException, IOException{
		 String pathToCsv = "D:\\EDX\\MA2\\flights.csv";

		 String row;
		 int counter = 0;

		 CSVReader csvReader = new CSVReader (new InputStreamReader(csvFile.getInputStream()));
		 while ((record = csvReader.readNext()) != null) {
		     // do something
		 }

		 BufferedReader csvReader = new BufferedReader(new FileReader(pathToCsv));
//		 row = "aa";
//		 System.out.println(row.contentEquals("aa"));
		 while ((row = csvReader.readLine()) != null) {
		     String[] data = row.split(",");
		     System.out.println(data[13]);
		     if(data[13].equals("EWR")) {
		    	 counter++;
		     }
		     System.out.println(counter);
		 }
		 System.out.println(counter);
		 csvReader.close();

	 }

}


package com.therdl.shared.events;

import com.google.gwt.event.shared.GwtEvent;
import com.google.web.bindery.autobean.shared.AutoBean;
import com.therdl.shared.beans.CurrentUserBean;

/**
 * Simple  log-in ok event no payload required
 * handlers use this event to update the status of the menu
 * for a log in successfully authorisation flow
 */
public class LogInOkEvent extends GwtEvent<LogInOkEventEventHandler> {

	private AutoBean<CurrentUserBean> currentUserBean;

	public LogInOkEvent(AutoBean<CurrentUserBean> currentUserBean) {
		this.currentUserBean = currentUserBean;
	}

	public AutoBean<CurrentUserBean> getCurrentUserBean() {
		return currentUserBean;
	}

	public static Type<LogInOkEventEventHandler> TYPE = new Type<LogInOkEventEventHandler>();

	@Override
	public Type<LogInOkEventEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(LogInOkEventEventHandler logInOkEventEventHandler) {
		logInOkEventEventHandler.onLogInOkEvent(this);
	}
}


package com.cms.dao.maoyi.enterprise.impl;

import java.util.List;

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

import com.cms.dao.maoyi.enterprise.StorageServiceDao;
import com.cms.mapper.maoyi.StorageServiceMapper;
import com.cms.model.maoyi.StorageService;

@Repository
public class StorageServiceDaoImpl implements StorageServiceDao {

	@Autowired
	private StorageServiceMapper   storageServiceMapper;

	public List<StorageService> getAllStorage(Long id) {
		return storageServiceMapper.getAllStorage(id);
	}

	public void addStorage(StorageService storageService) {
       storageServiceMapper.addStorage(storageService);
	}

	//删除对应企业id的所有仓库信息
	public void deleteAllStorage(Long id) {
		storageServiceMapper.deleteAllStorage(id);
	}
	 //删除某一个仓库信息
	public void deleteStorage(Long id) {
		storageServiceMapper.deleteStorage(id);
	}
	//修改某一个仓库
	public void updateStorage(StorageService storageService) {
		storageServiceMapper.updateStorage(storageService);
	}
    //拿到某一个仓库信息
	public StorageService getStorage(Long id) {
        return storageServiceMapper.getStorage(id);
	}

}


package eventus;

import static eventus.DBconnect.resultSet;
import java.io.IOException;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import java.sql.*;
import javafx.stage.StageStyle;
/**
 *
 * @author Hussein Lenovo
 */
public class Eventus extends Application {

    @Override
    public void start(Stage stage) throws Exception {

        try{
        Parent root = FXMLLoader.load(getClass().getResource("Register.fxml"));
        Scene scene = new Scene(root);
        stage.initStyle(StageStyle.TRANSPARENT);
        stage.setScene(scene);
        stage.show();
        }catch(IOException e){
            System.err.print(e);
        }

    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

       /* DBconnect db = new DBconnect();

        DBconnect.connect("eventos");
        */
        launch(args);
    }

}


package com.ysg.resource;

import com.ysg.data.UserCityId;
import com.ysg.service.UserCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * Created by Thaslim on 22/04/17.
 */

@RestController
@RequestMapping("/userCity")
public class UserCityResource {

    @Autowired
    public UserCityService userCityService;

    @RequestMapping(method = RequestMethod.GET, produces = "application/json")
    @ResponseBody
    public ResponseEntity findAll() {
        return ResponseEntity.ok().body(userCityService.findAll());
    }

    @RequestMapping(method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ResponseEntity insert(@RequestBody UserCityId userCityId) {
        return ResponseEntity.ok().body(userCityService.insert(userCityId));
    }

    @RequestMapping(value = "/delete", method = RequestMethod.POST, produces = "application/json")
    @ResponseBody
    public ResponseEntity delete(@RequestBody UserCityId userCityId) {
        return ResponseEntity.ok().body(userCityService.delete(userCityId));
    }

}


```
  |   |        _)   ___|  |             |    |
  |   |  __ \   |  |      __ \    _` |  __|  |
  |   |  |   |  |  |      | | |  (   |  |   _|
 \___/  _|  _| _| \____| _| |_| \__,_| \__| _)
```
This is a demo for a chatting service called “UniChat” made by \_iPhoenix\_.

```
   ___|                |         _)  |             |
  |       _ \   __ \   __|   __|  |  __ \   |   |  __|   _ \    __|  __|
  |      (   |  |   |  |    |     |  |   |  |   |  |    (   |  |   \__ \
 \____| \___/  _|  _| \__| _|    _| _.__/  \__,_| \__| \___/  _|   ____/
```

**\_iPhoenix\_** for making most of UniChat.

**MrDKKing** for styling help.

**LAX18 (Nicholas Pease)** for edits, awesomeness, favicon, header image, navigation bar, and the UniChat chrome extension.

**jcgter777** for the UniChat header image (old one) and the new UniChat navigation bar icon.

**mets11rap** for the UniChat emotes.

**Christopher Mitchell (KermM) of the Cemetech programming community** for some parts of the link detection in UniChat (used in SAX)

**Stack Overflow and the MDN, especially their active contributors** for some good bits of code that have been modified for my needs. (Great sites for programming help)


package de.life.commands;

import de.life.GlobalVariables;
import de.life.classes.EmbedMessageBuilder;
import de.life.interfaces.ServerCommand;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.MessageChannel;

public class ListGuildsCommand implements ServerCommand {

	@Override
	public void performCommand(Member m, MessageChannel channel, Message message) {
		if (m.getUser().getIdLong() != GlobalVariables.userIDFelix
				&& m.getUser().getIdLong() != GlobalVariables.userIDLinus)
			return;

		String s = "";
		int i = m.getJDA().getGuilds().size();
		for (Guild g : m.getJDA().getGuilds()) {
			s = s.concat(g.getName() + " | Members: " + g.getMemberCount() + " | " + g.getIdLong() + "\n");
			i--;
			if (s.length() > 1600) {
				s.concat("Und weitere " + i + " Guilds");
				break;
			}
		}
		EmbedMessageBuilder.sendMessage("Guilds", s, channel);
	}
}


package com.cheng.cc.customcontrols.activity;

import android.os.Bundle;

import com.cheng.cc.customcontrols.AppActivityManager;
import com.cheng.cc.customcontrols.BaseActivity;
import com.cheng.cc.customcontrols.R;
import com.cheng.cc.customcontrols.views.Lightning_Text;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author Created by cc on 17/6/2.
 * @fileName TextLightning_Activity
 * @githublink https://github.com/cc0819
 * @csdnlink http://blog.csdn.net/qq_25404567
 */

public class TextLightning_Activity extends BaseActivity {
    @BindView(R.id.lightning)
    Lightning_Text lightning;

    @Override
    public void initView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_lightning);
        ButterKnife.bind(this);
        AppActivityManager.getAppManager().addActivity(this);

    }

    @Override
    public void initInstall() {
        lightning.setText("LIGHTNING TEXTVIEW");
        lightning.setTextSize(50);
    }

    @Override
    public void initData() {

    }

    @Override
    public void evenControl() {

    }

}


package com.irdeto.domain.control.cws;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

@XmlType(propOrder = {"userCredential", "operation"})
public class BaseMessage {
	private Credential userCredential;
	private String operation;

	public BaseMessage(){
	}
	public BaseMessage(Credential userCredential, String operation) {
		super();
		this.userCredential = userCredential;
		this.operation = operation;
	}
    @XmlElement(name = "UserCredential", required = true, namespace = "http://schemas.datacontract.org/2004/07/ConsoleService")
	public Credential getUserCredential() {
		return userCredential;
	}
	public void setUserCredential(Credential userCredential) {
		this.userCredential = userCredential;
	}
    @XmlElement(name = "Operation", required = true, namespace = "http://schemas.datacontract.org/2004/07/ConsoleService")
	public String getOperation() {
		return operation;
	}
	public void setOperation(String operation) {
		this.operation = operation;
	}

}


package com.stockmanagementsystem.server.models;

import com.stockmanagementsystem.server.models.common.AbstractEntity;
import lombok.*;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * @Created 12/07/2021 - 09:06
 * @Package com.stockmanagementsystem.server.models
 * @Project stockmanagementsystemserver
 * @User LegendDZ
 * @Author Abdelaaziz Ouakala
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "Lignes_ventes",schema = "public")
public class LigneVente extends AbstractEntity {

    @Column(name = "quantite")
    private BigDecimal quantite;

    @Column(name = "prix_unitaire")
    private BigDecimal prixUnitaire;

    @Column(name = "entreprise_id")
    private Long entrepriseId;

    @ManyToOne(fetch = FetchType.EAGER,cascade = CascadeType.ALL)
    @JoinColumn(name = "ventes_id")
    private Ventes ventes;

    @ManyToOne(fetch = FetchType.EAGER,cascade = CascadeType.ALL)
    @JoinColumn(name = "article_id")
    private Article article;
}


package nl.knaw.huygens.cat.commands;

import nl.knaw.huygens.cat.HuygensCommand;
import nl.knaw.huygens.cat.RestFixture;
import org.concordion.api.CommandCall;
import org.concordion.api.Element;
import org.concordion.api.Evaluator;
import org.concordion.api.ResultRecorder;
import org.concordion.internal.listener.AssertResultRenderer;

@HuygensCommand(name = "success", htmlTag = "span")
public class ExpectedSuccessCommand extends AbstractHuygensCommand {

  public ExpectedSuccessCommand() {
    addListener(new AssertResultRenderer());
  }

  @Override
  public void verify(CommandCall commandCall, Evaluator evaluator, ResultRecorder resultRecorder) {
    final Element element = commandCall.getElement();
    final String expectedStatus = element.getText();

    final RestFixture fixture = getFixture(evaluator);
    final String actualStatus = fixture.status();

    if (fixture.wasSuccessful()) {
      succeed(resultRecorder, element);
    } else {
      fail(resultRecorder, element, actualStatus, expectedStatus);
    }
  }
}


package kafka;

import java.util.Properties;

import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerRecord;

public class Producer
{
    private final KafkaProducer<String, String> producer;
    private final String topic;

    public Producer(String topic, String host, String port)
    {
        Properties props = new Properties();
        props.put("bootstrap.servers", host+":"+port);
        props.put("client.id", "ComfoxProducer");
        props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
        props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
        producer = new KafkaProducer<String, String>(props);
        this.topic = topic;
    }

    public Producer(String topic)
    {
        this(topic, "localhost", "9092");
    }

    public void send(String messageId, String message) {
        long startTime = System.currentTimeMillis();

        producer.send(new ProducerRecord<String, String>(topic,
                messageId,
                message), new CallBackImpl(startTime, messageId, message));

        producer.flush();
    }
}


package ie.turfclub.main.pojos.directives.input;

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

import ie.turfclub.main.pojos.directives.Directive;
import ie.turfclub.main.pojos.directives.DirectiveTypes;
import ie.turfclub.main.pojos.directives.subclasses.ImageUrlWithTextAndKey;

public class SelectEnumImageDirective implements Directive{

	private String placeHolder;
	private String key;

	private List<ImageUrlWithTextAndKey> imageUrls = new ArrayList<>();

private DirectiveTypes directiveType = DirectiveTypes.SELECTENUMIMAGE;

	public DirectiveTypes getDirectiveType() {
		return directiveType;
	}
	public void setDirectiveType(DirectiveTypes directiveType) {
		this.directiveType = directiveType;
	}

	public String getPlaceHolder() {
		return placeHolder;
	}
	public void setPlaceHolder(String placeHolder) {
		this.placeHolder = placeHolder;
	}

	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public List<ImageUrlWithTextAndKey> getImageUrls() {
		return imageUrls;
	}
	public void setImageUrls(List<ImageUrlWithTextAndKey> imageUrls) {
		this.imageUrls = imageUrls;
	}

}


package com.white.bihudaily.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Author White
 * Date 2016/8/13
 * Time 12:59
 */
public class StartImg implements Parcelable {

    private String img;
    private String text;

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.img);
        dest.writeString(this.text);
    }

    public StartImg() {
    }

    protected StartImg(Parcel in) {
        this.img = in.readString();
        this.text = in.readString();
    }

    public static final Parcelable.Creator<StartImg> CREATOR = new Parcelable.Creator<StartImg>() {
        @Override
        public StartImg createFromParcel(Parcel source) {
            return new StartImg(source);
        }

        @Override
        public StartImg[] newArray(int size) {
            return new StartImg[size];
        }
    };
}


package com.antonio.service;

import java.util.List;

import javax.transaction.Transactional;

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

import com.antonio.dao.ProductDAO;
import com.antonio.model.Product;

@Service
public class ProductServiceImpl implements ProductService {

	@Autowired
	private ProductDAO productDAO;

	@Override
	@Transactional
	public void insertProduct(Product product) {
		productDAO.insertProduct(product);
	}

	@Override
	@Transactional
	public void deleteProduct(int idProduct) {
		productDAO.deleteProduct(idProduct);
	}

	@Override
	@Transactional
	public Product getProduct(int idProduct) {
		return productDAO.getProduct(idProduct);
	}

	@Override
	@Transactional
	public List<Product> listProduct() {
		return productDAO.listProduct();
	}

	@Override
	@Transactional
	public List<Product> listMyProductById(int idUser) {
		return productDAO.listMyProductById(idUser);
	}

}


# HPThemeKit

[![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg?style=flat)](https://travis-ci.org/hapiii/HPThemeKit)
[![Pod](https://img.shields.io/badge/Pod-0.0.3-pink.svg?style=flat)](https://www.apple.com/nl/ios/)
[![Support](https://img.shields.io/badge/Support-iOS%208%2B-blue.svg?style=flat)](https://www.apple.com/nl/ios/)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

* DKThemeVersion
* SSZipArchive

## Installation

HPThemeKit is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'HPThemeKit'
```

## Author

hapiii, 869932084@qq.com

## License

HPThemeKit is available under the MIT license. See the LICENSE file for more info.

## Effect
![image](https://github.com/hapiii/HPThemeKit/blob/master/imgs/img1.gif)
可以滑动的折线图
![image](https://github.com/hapiii/HPThemeKit/blob/master/imgs/line.gif)

#### 目前的问题：
* 网络和下载部分做的比较糙，用AFN更好一点
* 类扩展不全一些用到的可能需要再添加
* 不支持富文本

## Version description

Version | Description
-----|------
0.0.3   | 删除功能，TabbarItem支持


package com.demo.utilities.user_interface;

import com.aventstack.extentreports.Status;
import com.demo.config.BasicTestConfig;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import static com.demo.config.ReporterConfig.*;

public class AlertHandling extends BasicTestConfig {

    public static void checkForAlert() {
        try {
            Alert alert = driver.switchTo().alert();
            String alertMessage = driver.switchTo().alert().getText();
            test.warning(" Alert message " + alertMessage + " detected");
        } catch (Exception e) {
            e.getMessage();
        }
    }

    public static void acceptAlert() {
        // Accept alert
        try {
            Alert alert = driver.switchTo().alert();
            String alertMessage = driver.switchTo().alert().getText();
            alert.accept();
            test.pass("" + alertMessage + " was accepted successfully");
        } catch (Exception e) {
        }
    }
}


package ekol.orders.transportOrder.repository;

import ekol.hibernate5.domain.repository.LookupRepository;
import ekol.hibernate5.test.LookupRepositoryIntegrationTest;
import ekol.orders.transportOrder.domain.TransportType;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
@ActiveProfiles("integration")
public class TransportTypeRepositoryIntegrationTest extends LookupRepositoryIntegrationTest<TransportType> {

    @Autowired
    private TransportTypeRepository transportTypeRepository;

    @Override
    public Class<TransportType> getType() {
        return TransportType.class;
    }

    @Override
    public LookupRepository<TransportType> getRepository() {
        return transportTypeRepository;
    }
}


package com.example.pents.archery;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public abstract class MainActivity extends AppCompatActivity {
Button Archery;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Archery=(Button)findViewById(R.id.Link);
        //see tegevus võimaldab sul nuppule vajutamsiel avada veebileht
        Archery.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String url = "http://en.Wikipedia.org/wiki/Archery";

                Intent intent = new Intent(Intent.ACTION_VIEW);
                Intent.setData(Uri.parse(url));
                startActivity(intent);
            }
        });
    }
    //see tegevus võimaldab sul liikuda edasi uue activity peale/ lehele kus on näha pildid
    public void Pildid(View view){
        Intent intent =new Intent (MainActivity.this, PildidActivity.class);
    }


**_Warning project is a WIP in pre-alpha state :wink:_**
# State of project
**_Project is now a WIP in pre-alpha stage as of 4th of November 2017_**. :mask:

It is only as for now a simple experimental `electron` app used as a sandbox.
### Version
  * [`@cljstron/cljstron@0.0.6`](https://www.npmjs.com/package/@cljstron/cljstron).
  * GitHub repository: https://github.com/cljstron/cljstron. No release for now.
### Changes & ToDo's
You can find history of changes @ [`CHANGES.md`](CHANGES.md) from 4 nov 2017.

You can find the todo's @ [`TODO.md`](TODO.md) for currect state.
## Dependencies (as for now)
### NPM
  * [`shadow-cljs@2.0.117`](https://github.com/thheller/shadow-cljs) The compiler for now, but this will be in a module afterward
(compiler agnostic). Root compilation will be a raw `lein` project.
  * [`electron@1.7.10`](https://electronjs.org/docs) `electron` library.
### Clojars
  * [`[camel-snake-kebab "0.4.0"]`](https://github.com/qerub/camel-snake-kebab) It's used to manage `snake-case`d and `camelCase`d keys.
  * [`[cljs-node-io "0.5.0"]`]() To have slurp and spit, and other standard I/O functions of Clojure in node ClojureScript.
  * [`[org.clojure/tools.reader "1.1.0"]`]() To read EDN files.


package com.xm.dao;

import com.xm.entity.SuccessKilled;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

import static org.junit.Assert.*;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:config/applicationContext.xml")
public class SuccessKilledDaoTest {

    @Resource
    private SuccessKilledDao successKilledDao;

    @Test
    public void testInsertSuccessKilled() throws Exception {
        int insertCount = successKilledDao.insertSuccessKilled(1001L, 13166222286L);
        System.out.println("insertCount=" + insertCount);
    }

    @Test
    public void testQueryByIdWithSeckill() throws Exception {
        SuccessKilled successKilled = successKilledDao.queryByIdWithSeckill(1001L,13166222286L);
        System.out.println(successKilled);
        System.out.println(successKilled.getSeckill());
    }
}


package agh.cs.constituition;

import java.util.LinkedList;
import java.util.List;
import static java.lang.System.out;

public class Paragraph {
    private String num;
    private List<String> text = new LinkedList<>();
    private List<Subparagraph> subp = new LinkedList <>();

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public List <String> getText() {
        return text;
    }

    public void setText( String s) {
        this.text.add(s);
    }

    public List <Subparagraph> getSubp() {
        return subp;
    }

    public void setSubp (Subparagraph subparagraph) {
        this.subp.add(subparagraph);
    }

    public void print () {
        for (String s: this.text) out.println(s);
        for (Subparagraph sp: this.subp) sp.print();
    }

    public  Subparagraph findSubParagraph (String num) {
        for (Subparagraph sp: this.subp) {
            if (num.equals(sp.getNum())) return sp;
        }
        return null;
    }
}


package com.example.game;

import android.animation.Animator;
import android.app.Activity;
import android.os.Bundle;

public class MainActivity extends Activity {
    private GameView game;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        game=new GameView(this);
        setContentView(R.layout.activity_game);
        setContentView(game);
    }

    @Override
    protected void onStart() {
        super.onStart();
    }
    @Override
    protected void onResume() {
        super.onResume();
    }
    @Override
    protected void onPause() {
        game.pause();
        super.onPause();
    }
    @Override
    protected void onStop() {
        super.onStop();
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

    /*public void onClickPersonSettings(View view) {
        Intent intent = new Intent(MainActivity.this, PersonSettings.class);
        startActivity(intent);
    }
    public void onClickStartGame(View view) {
        Intent intent = new Intent(MainActivity.this, Levels.class);
        startActivity(intent);
    }*/

}


package com.example.recyclerview;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

import java.util.ArrayList;

public class MainActivity extends AppCompatActivity {
    private RecyclerView conRecv;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        conRecv =findViewById(R.id.conrec);

        ArrayList<contact> contact=new ArrayList<>();

        contact.add(new contact("email","email.com","r.jpg"));
        contact.add(new contact("email","email.com","r.jpg"));
        contact.add(new contact("email","email.com","r.jpg"));
        contact.add(new contact("email","email.com","r.jpg"));

        contactRecvAdapter adapter=new contactRecvAdapter();
        adapter.setContacts(contact);
        conRecv.setAdapter(adapter);
        conRecv.setLayoutManager(new LinearLayoutManager(this));

    }
}


package com.juno.controller;

import com.juno.main.entity.User;
import com.juno.main.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.NoSuchElementException;

@RestController
@RequestMapping("/api/users")
public class UserController {

    @Autowired
    private UserRepository userRepository;

    @GetMapping
    public List<User> getAllUsers() {
        return userRepository.findAll();
    }
    @GetMapping("/{id}")
    public ResponseEntity<User> getUserById(@PathVariable(value = "id") Long userId){

        User user = userRepository.findById(userId)
                .orElseThrow(() -> new NoSuchElementException("User not available for Id :"+userId));

        return ResponseEntity.ok().body(user);
    }

}


package com.entity;

import java.util.List;

public class Parking {
	private int id;
	private String parkingName;
	private int area;
	private int slot;

	private List<CheckIn> checkIn;

	public Parking() {
		super();
	}

	public Parking(String parkingName, int area, int slot) {
		super();
		this.parkingName = parkingName;
		this.area = area;
		this.slot = slot;
	}

	public Parking(int id, String parkingName, int area, int slot) {
		super();
		this.id = id;
		this.parkingName = parkingName;
		this.area = area;
		this.slot = slot;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getParkingName() {
		return parkingName;
	}

	public void setParkingName(String parkingName) {
		this.parkingName = parkingName;
	}

	public int getArea() {
		return area;
	}

	public void setArea(int area) {
		this.area = area;
	}

	public int getSlot() {
		return slot;
	}

	public void setSlot(int slot) {
		this.slot = slot;
	}

	public List<CheckIn> getCheckIn() {
		return checkIn;
	}

	public void setCheckIn(List<CheckIn> checkIn) {
		this.checkIn = checkIn;
	}
}


/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.javaee.controller;

import com.javaee.facade.ShiftFacade;
import com.javaee.model.Shift;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;

import javax.faces.bean.RequestScoped;

/**
 *
 * @author Oguzhan
 */
@ManagedBean(name = "shiftController")
@RequestScoped
public class ShiftController {

    @EJB
    private ShiftFacade shiftFacade;

    private List<Shift> shifts;
    private Shift shift;

    public ShiftController() {
    }

    @PostConstruct
    public void ShiftController(){
        this.setShifts(shiftFacade.findAll());
                }

    public List<Shift> getShifts() {
        return shifts;
    }

    public void setShifts(List<Shift> shifts) {
        this.shifts = shifts;
    }

    public Shift getShift() {
        return shift;
    }

    public void setShift(Shift shift) {
        this.shift = shift;
    }

}


package ru.itprogram.model.domain;

import java.util.Objects;

public class Experience {
    private long id;
    private short professionTime;

    public Experience() {
    }

    public Experience(long id, short professionTime) {
        this.id = id;
        this.professionTime = professionTime;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public short getProfessionTime() {
        return professionTime;
    }

    public void setProfessionTime(short professionTime) {
        this.professionTime = professionTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Experience that = (Experience) o;
        return id == that.id &&
                professionTime == that.professionTime;
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, professionTime);
    }

    @Override
    public String toString() {
        return "Experience{" +
                "id=" + id +
                ", professionTime=" + professionTime +
                '}';
    }
}


/*******************************************************************************
 * Copyright (C) 2016. Tripint Information Technology Co., Ltd. All rights reserved. *
 * Authors:lirichen
 * File:NetworkStatusInterceptor.java
 * This software, including documentation, is protected by copyright controlled
 * by Tripint Information Technology Co., Ltd. All rights are reserved.
 ******************************************************************************/

package com.chris.pss.data.interceptor;

import android.content.Context;

import com.chris.pss.utils.NetworkUtils;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

public class NetworkStatusInterceptor implements Interceptor {

    private Context context;

    public NetworkStatusInterceptor(Context context) {
        this.context = context;
    }

    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();

        if (NetworkUtils.isAvailable(context) && NetworkUtils.isConnected(context)) {
            return chain.proceed(chain.request());
        } else {
            throw new NetworkConnectionException("无网络");
        }
    }

}


[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

  Official repo for the lorraine team at hackatown 2020

3rd place overall and winning project for "AI and Data Science" category at hackatown2020 ! Bsafe gives you a safe routes between point A and B.

It takes a bunch of information into consideration to give you the safest way to get to a destination. The app shows the user the sectors where crimes happened with red circles to give him/her a good idea of what sector they want to avoid. It also shows the places that are enlightened and has cameras for a better feeling of safety. These sectors are shown with green circles.

The app automatically gives the user the road they might want to take to be safe, but also alternatives if they don't mind about the risks. In fact, in the settings, the user can decide his/her degree of tolerance to danger and our algorithm will consider that.

### running the project

    cd hackatown2020
    ionic serve


package com.wws.mysqlclient.protocol.packet;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.Unpooled;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * mysql报文
 *
 * @author wws
 * @version 1.0.0
 * @date 2019-09-09 16:42
 **/
@Data
@NoArgsConstructor
public class MysqlPacket implements BaseSeriablizablePacket {

    /**
     * 3
     */
    private Integer payloadLength;

    /**
     * 1
     */
    private byte sequenceId;

    private ByteBuf payload;

    public MysqlPacket(byte sequenceId, ByteBuf payload){
        this.sequenceId = sequenceId;
        this.payload = payload;
        this.payloadLength = payload.readableBytes();
    }

    @Override
    public void read(ByteBuf byteBuf) {
        this.setPayloadLength(byteBuf.readMediumLE());
        this.setSequenceId(byteBuf.readByte());
        this.setPayload(byteBuf.readBytes(payloadLength));
    }

    @Override
    public ByteBuf write(){
        ByteBuf header = ByteBufAllocator.DEFAULT.buffer(4);
        header.writeMediumLE(payloadLength);
        header.writeByte(sequenceId);
        return Unpooled.wrappedBuffer(header, payload);
    }

}


package com.aethercoder.core.entity.social;

import com.aethercoder.core.entity.BaseEntity;

import javax.persistence.*;

/**
 * @auther Guo Feiyan
 * @date 2018/1/3 下午2:34
 */
@Entity
@Table(name = "group_tags", schema = "qbao_schema")
public class GroupTags extends BaseEntity{
    private static final long serialVersionUID = -1L;

    @Basic
    @Column(name = "name")
    private String name;

    @Basic
    @Column(name = "sequence")
    private Integer sequence = 0 ;

    @Basic
    @Column(name = "is_delete")
    private Boolean isDelete = false;

    @Transient
    private Integer groupCounts;

    public Integer getGroupCounts() {
        return groupCounts;
    }

    public void setGroupCounts(Integer groupCounts) {
        this.groupCounts = groupCounts;
    }

    public String getName() {
        return name;
    }

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

    public Integer getSequence() {
        return sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    public Boolean getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Boolean isDelete) {
       this.isDelete = isDelete;
    }
}


package controller.fromDateWindow;

import controller.mainWindow.MainController;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

/**
 * Created by Slavian on 4/17/2017.
 */
public class fromDate extends Application {
    static private Stage thisStage;
    public static MainController fDmainController;
    public static boolean isChange;

    public fromDate(MainController mainController, boolean isChange){
        fDmainController=mainController;
        this.isChange=isChange;
    }

    @Override
    public void start(Stage newStage) throws Exception{
        thisStage=newStage;
        Parent root = FXMLLoader.load(getClass().getResource("../../view/fromDate.fxml"));
        newStage.setTitle("Начало семестра");
        newStage.setScene(new Scene(root, 439, 333));
        newStage.setResizable(false);
        newStage.show();
    }

    public static void closeFromWindow(){
        try {
            thisStage.close();
        }catch(Exception e){}
    }
}


# brahms120
Repository for files related to encodings of Brahms opus 120 Sonatas

## Brahms, Sonata for Clarinet (or Viola) and Piano, Opus 120

The Brahms sonatas are core literature for clarinetists and violists.  These computer engravings attempt to reproduce very closely the engraving of one of the early editions of the sonata, but allows the work to be altered, re-arranged, transposed, or otherwise used by people in the future.  The printouts in the PDFs are also clearer than the early prints (which have been reprinted and rescanned many times).

Different files have different licenses.  As the main computer engraving strove to reproduce as exactly as possible without creative adjustments an out-of-copyright source, it too should be considered Public Domain (or if not possible, released as a CC-0 license, which is nearly the same).

Other arrangments that may appear here in the future retain copyright protection and are released under a CC-SA-BY license.  The license in any file supercedes the "LICENSE" documentation given here.

Only Sonata no. 1 is complete at this time.


package org.cytoscape.rest.internal.model;

import javax.xml.bind.annotation.XmlRootElement;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(value="Cytoscape and CyREST API Versions")
@XmlRootElement
public class CytoscapeVersionModel {
	private String apiVersion;
	public void setApiVersion(String apiVersion) {
		this.apiVersion = apiVersion;
	}

	public void setCytoscapeVersion(String cytoscapeVersion) {
		this.cytoscapeVersion = cytoscapeVersion;
	}

	private String cytoscapeVersion;

	public CytoscapeVersionModel()
	{

	}

	public CytoscapeVersionModel(final String apiVersion, final String cytoscapeVersion) {
		this.apiVersion = apiVersion;
		this.cytoscapeVersion = cytoscapeVersion;
	}

	/**
	 * @return the apiVersion
	 */
	@ApiModelProperty(value="CyREST API Version")
	public String getApiVersion() {
		return apiVersion;
	}

	/**
	 * @return the cytoscapeVersion
	 */
	@ApiModelProperty(value="Cytoscape Version")
	public String getCytoscapeVersion() {
		return cytoscapeVersion;
	}

}


package com.jumook.syouhui.network.callback;

import com.jstudio.utils.JLog;
import com.jumook.syouhui.network.ResponseResult;
import com.lzy.okgo.callback.StringCallback;

import org.json.JSONObject;

import okhttp3.Call;
import okhttp3.Response;

/**
 * Created by jumook on 2016/11/10.
 */

public abstract class JsonStringBack extends StringCallback {

    public abstract void onJsonSuccess(JSONObject data);
    public abstract void onJsonError(String errorMsg);

    @Override
    public void onSuccess(String s, Call call, Response response) {
        JLog.d("JsonStringBack", s);
        ResponseResult responseResult = new ResponseResult(s);
        if (responseResult.isReqSuccess()) {
            onJsonSuccess(responseResult.getData());
        } else {
            onJsonError(responseResult.getErrorMsg());
        }
    }

    @Override
    public void onError(Call call, Response response, Exception e) {
        JLog.e("JsonStringBack", e.toString());
        onJsonError(e.toString());
    }

}


package com.uttara.mvc;

public class RegBean {

	private String uname,email,pass,rpass;

	public String validate()
	{
		String msg = "";
		if (uname==null || uname.trim().equals(""))
			msg = "Enter maadi your name please";
		if (email==null || email.trim().equals(""))
			msg = msg + "
 " + " Email is mandatory. Enter maadi.";
		if(pass!=null && rpass!=null && !pass.equals(rpass))
		{
			msg = msg + "
" + " Boss your pass is not equal to repeat pass. Correct it now!";
		}
		if (msg.equals(""))
			return Constants.SUCCESS;
		else
			return msg;
	}

	public RegBean() {
		System.out.println("inside RegBean constr");
	}

	public String getUname() {
		return uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
		System.out.println("inside setUname "+uname);
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
		System.out.println("inside setEmail "+email);
	}

	public String getPass() {
		return pass;
	}

	public void setPass(String pass) {
		this.pass = pass;
	}

	public String getRpass() {
		return rpass;
	}

	public void setRpass(String rpass) {
		this.rpass = rpass;
	}

}


package com.softserve.itacademy.kek.rest.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;

public class SseEmitter {

    @ApiModelProperty(value = "")
    private Long timeout = null;

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private static String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

    /**
     * Get timeout
     *
     * @return timeout
     **/
    @JsonProperty("timeout")
    public Long getTimeout() {
        return timeout;
    }

    public void setTimeout(Long timeout) {
        this.timeout = timeout;
    }

    public SseEmitter timeout(Long timeout) {
        this.timeout = timeout;
        return this;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class SseEmitter {\n");

        sb.append("    timeout: ").append(toIndentedString(timeout)).append("\n");
        sb.append("}");
        return sb.toString();
    }
}


package com.synchronized_test.block;

/**
 * 测试取钱
 *
 * @date:2019/9/22 15:59
 * @author: Anthony
 */
public class DrawThread extends Thread {
    private Account account;
    private double drawAmount;

    public DrawThread(String name, Account account, double drawAmount) {
        super(name);
        this.account = account;
        this.drawAmount = drawAmount;
    }
    public void run(){
        synchronized (account){
            if(account.getBalance()>=drawAmount){
                System.out.println(getName() + "取钱成功，吐出钞票： " + drawAmount);
                try{
                    Thread.sleep(1);
                }catch(InterruptedException ex){
                    ex.getStackTrace();
                }
                account.setBalance(account.getBalance()-drawAmount);
                System.out.println("\t余额为："+account.getBalance());
            }else{
                System.out.println(getName()+"取钱失败，余额不足");
            }
        }
    }
}


package azimut.service.mapper;

import azimut.domain.*;
import azimut.service.dto.FormationDTO;

import org.mapstruct.*;

/**
 * Mapper for the entity {@link Formation} and its DTO {@link FormationDTO}.
 */
@Mapper(componentModel = "spring", uses = {RapportMapper.class, InscriptionMapper.class})
public interface FormationMapper extends EntityMapper<FormationDTO, Formation> {

    @Mapping(source = "rapport.id", target = "rapportId")
    @Mapping(source = "inscription.id", target = "inscriptionId")
    FormationDTO toDto(Formation formation);

    @Mapping(source = "rapportId", target = "rapport")
    @Mapping(target = "modules", ignore = true)
    @Mapping(target = "removeModule", ignore = true)
    @Mapping(source = "inscriptionId", target = "inscription")
    Formation toEntity(FormationDTO formationDTO);

    default Formation fromId(Long id) {
        if (id == null) {
            return null;
        }
        Formation formation = new Formation();
        formation.setId(id);
        return formation;
    }
}


package com.borzdykooa.service;

import com.borzdykooa.dao.repository.ClientDao;
import com.borzdykooa.entity.Client;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ClientService {

    private final ClientDao clientDao;

    @Autowired
    public ClientService(ClientDao clientDao) {
        this.clientDao = clientDao;
    }

    public Client find(Long id) {
        return clientDao.find(id);
    }

    public List<Client> findAll() {
        return clientDao.findAll();
    }

    public Long save(Client client) {
        return clientDao.save(client);
    }

    public void delete(Client client) {
        clientDao.delete(client);
    }

    public void update(Client client) {
        clientDao.update(client);
    }

    public Client findByLogin(String login) {
        return clientDao.findByLogin(login);
    }
}


package com.chikaho.service;

import com.chikaho.mapper.BooksMapper;
import com.chikaho.pojo.Books;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BooksServiceImpl implements BooksService{

    //service调用dao(mapper)
    @Autowired
    private static BooksMapper booksMapper;

    public BooksMapper getBooksMapper() {
        return booksMapper;
    }

    public void setBooksMapper(BooksMapper booksMapper) {
        this.booksMapper = booksMapper;
    }

    public int addBooks(Books books) {
        return booksMapper.addBooks(books);
    }

    public int deleteBooksById(int id) {
        return booksMapper.deleteBooksById(id);
    }

    public List<Books> queryAllBook() {
        return booksMapper.queryAllBook();
    }

    public int updateBooks(Books books) {
        return booksMapper.updateBooks(books);
    }

    public Books queryBook(int books_id) {
        return booksMapper.queryBook(books_id);
    }

    public Books queryBookByName(String books_name) {
        return booksMapper.queryBookByName(books_name);
    }
}


package com.thinking.machines.tcp.server;
import java.io.*;
import com.thinking.machines.tcp.server.event.*;
import com.thinking.machines.tcp.server.pojo.*;
import java.net.*;
import java.util.*;

public class TCPServer implements ProcessListener
{
private ServerSocket serverSocket;
private int portNumber;
private TCPListener tcpListener;
private HashMap<String,Processor> processors=new HashMap<>();
public TCPServer(int portNumber)
{
this.serverSocket=null;
this.portNumber=portNumber;
}
public void start(TCPListener tcpListener) throws IOException
{
this.tcpListener=tcpListener;
this.serverSocket=new ServerSocket(this.portNumber);
this.startAccepting();
}
private void startAccepting() throws IOException
{
Socket socket;
Processor processor;
String processorId;
while(true)
{
socket=serverSocket.accept();
processorId=java.util.UUID.randomUUID().toString();
processor=new Processor(socket,this,tcpListener,processorId);
processors.put(processorId,processor);

processor.start();
}
}

public void onCompleted(Processor processor)
{
processors.remove(processor.getId());
}

}


package com.cs.springboot.sample.jersey;

import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Priority;
import javax.ws.rs.HttpMethod;
import javax.ws.rs.Priorities;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.container.PreMatching;
import java.io.IOException;

/**
 * Created by admin on 2016/11/2.
 */

@PreMatching
@Priority(Priorities.USER)
public class PreMatchFilter implements ContainerRequestFilter {

	private final static Logger log = LoggerFactory.getLogger(PreMatchFilter.class);

	@Override
	public void filter(ContainerRequestContext requestContext) throws IOException {
		log.info("PreMatchFilter...");

		String redirectMethod = requestContext.getHeaderString("redirectMethod");

		if(StringUtils.isNotBlank(redirectMethod)){
			log.info(String.format("redirect url:%s [%s-->%s]", requestContext.getUriInfo().getPath(),requestContext.getMethod(), redirectMethod));

			requestContext.setMethod(redirectMethod);
		}

	}
}


package com.android.meetup.Model;

public class Users {
    private String id;
    private String username;
    private String interest;
    private String imageURL;

    public Users() {
    }

    public Users(Users user){
        this.id=user.getId();
        this.username=user.getUsername();
        this.interest=user.getInterest();
        this.imageURL=user.getImageURL();
    }
    public Users(String id, String username, String interest, String imageURL) {
        this.id = id;
        this.username = username;
        this.interest = interest;
        this.imageURL = imageURL;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getInterest() {
        return interest;
    }

    public void setInterest(String interest) {
        this.interest = interest;
    }

    public String getImageURL() {
        return imageURL;
    }

    public void setImageURL(String imageURL) {
        this.imageURL = imageURL;
    }
}


package com.todoapp.todo.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;

@Getter
@Setter
@ToString
@Table(name = "user", uniqueConstraints = @UniqueConstraint(columnNames = "id"))
@Entity(name = "JoinTableTodoEntity")
public class UserEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id", nullable = false)
    private String id;

    @Column(name = "name", nullable = false)
    private String name;

    @Column(name = "email", nullable = false)
    private String email;

    @Column(name = "password", nullable = false)
    private String password;

    @OneToMany(cascade = CascadeType.ALL)
    @JoinTable(
            name = "todo_user",
            joinColumns = @JoinColumn(name = "user_id", referencedColumnName = "id"),
            inverseJoinColumns = @JoinColumn(name = "todo_id", referencedColumnName = "id")
    )
    private List<TodoEntity> todos;

    @LastModifiedDate
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "last_update", nullable = false)
    private Timestamp lastUpdate;
}


package samson.jersey;

import java.lang.reflect.Type;

import javax.ws.rs.core.Context;

import com.sun.jersey.core.spi.component.ComponentContext;
import com.sun.jersey.core.spi.component.ComponentScope;
import com.sun.jersey.spi.inject.ConstrainedTo;
import com.sun.jersey.spi.inject.Injectable;
import com.sun.jersey.spi.inject.InjectableProvider;
import com.sun.jersey.spi.inject.ServerSide;

@ConstrainedTo(ServerSide.class)
public class MetadataCacheInjectableProvider implements InjectableProvider<Context, Type> {

    private final MetadataCache cache;

    public MetadataCacheInjectableProvider() {
        this.cache = new MetadataCache();
    }

    @Override
    public ComponentScope getScope() {
        return ComponentScope.Singleton;
    }

    @Override
    public Injectable<MetadataCache> getInjectable(ComponentContext componentContext, Context annotation, Type type) {
        if (MetadataCache.class != type) {
            return null;
        }

        return new Injectable<MetadataCache>() {

            @Override
            public MetadataCache getValue() {
                return cache;
            }
        };
    }

}


package com.example.demo.service.impl;

import cn.hutool.http.HttpUtil;
import com.example.demo.mapper.RippleAddressMapper;
import com.example.demo.service.RippleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @author tangwenbo
 **/
@Service
public class RipplerServiceImpl implements RippleService {

    @Resource
    private RippleAddressMapper rippleAddress;

    /**
     * 生成ripple地址，秘钥
     ***/
    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    @Override
    public int creatAddress(String address, String secret) {
        return rippleAddress.insert(address, secret);
    }

    /**
     * 查询对应地址的秘钥
     **/
    @Override
    public String getSecretKey(String address) {
        return rippleAddress.findByAddress(address);
    }

    /***
     * 发送币到冷钱包
     * */
    public String sendToColdWallet() {
        return HttpUtil.get("");

    }

}


package ar.com.datos.test.serializer.mock;

import ar.com.datos.buffer.InputBuffer;
import ar.com.datos.buffer.OutputBuffer;
import ar.com.datos.util.ArraysUtils;

/**
 * Implementacion de {@link OutputBuffer} para poder realizar los tests.
 *
 * @author fvalido
 */
public class OutputBufferTest implements OutputBuffer {
	private byte[] data;
	private int pos;

	public OutputBufferTest() {
		this.data = new byte[10];
		this.pos = 0;
	}

	public InputBuffer getAsInputBuffer() {
		byte[] currentData = new byte[pos];
		System.arraycopy(data, 0, currentData, 0, pos);
		return new InputBufferTest(currentData);
	}

	public void write(byte[] data) {
		this.data = ArraysUtils.ensureCapacity(this.data, this.pos + data.length);
		System.arraycopy(data, 0, this.data, this.pos, data.length);
		this.pos += data.length;
	}

	public void write(byte data) {
		this.data = ArraysUtils.ensureCapacity(this.data, this.pos + 1);
		this.data[pos] = data;
		this.pos++;
	}

}


package com.example.visitas;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentTransaction;
import androidx.preference.PreferenceFragmentCompat;

import android.os.Bundle;

public class SettingsActivity extends AppCompatActivity {

    private ActionBar toolBar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_settings);

        toolBar = getSupportActionBar();
        toolBar.setTitle("Settings");

        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
        ft.replace(android.R.id.content, new MyPreference());
        ft.commit();
    }

    public static class MyPreference extends PreferenceFragmentCompat { //needs implementation of 'androidx.preference:preference:1.1.0'in the gradle
        @Override
        public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
            setPreferencesFromResource(R.xml.settings_preference,rootKey);
        }
    }
}


package bumler.droneforensics;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

/**
 * Created by d10 on 7/7/2016.
 */
public class location_launch_Activity extends Activity{

    private int boundaries = 0;
    private ImageButton setLoc;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.location_launch);

        setLocation();
    }

    private void setLocation(){
        setLoc = (ImageButton) findViewById(R.id.button);
        setLoc.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                boundaries++;
                if (boundaries >= 5) {
                    Intent i = new Intent(location_launch_Activity.this, altitude_launch_Activity.class);
                    startActivity(i);
                }
            }
        });
    }
}


package cope.servlet.client;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cope.beans.client.ClientDao;
import cope.beans.client.ClientDto;

@WebServlet(urlPatterns = "/client/join.kh")
public class JoinServlet extends HttpServlet{
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		try {

			req.setCharacterEncoding("UTF-8");
			ClientDto clientDto = new ClientDto();
			clientDto.setClientId(req.getParameter("clientId"));
			clientDto.setClientPw(req.getParameter("clientPw"));
			clientDto.setClientEmail(req.getParameter("clientEmail"));
			clientDto.setClientNick(req.getParameter("clientNick"));
			clientDto.setClientBirthYear(Short.parseShort(req.getParameter("clientBirthYear")));

			ClientDao clientDao = new ClientDao();
			clientDao.regist(clientDto);

			resp.sendRedirect("joinSuccess.jsp");
		}
		catch(Exception e) {
			e.printStackTrace();
			resp.sendError(500);
		}
	}
}


package com.accenture.demo.inheritance;

public class Car {

	private int numberOfWheels;
	private String engineType;
	private String color;
	private String model;

	public Car(int numberOfWheels, String engineType, String color, String model) {
		super();
		this.numberOfWheels = numberOfWheels;
		this.engineType = engineType;
		this.color = color;
		this.model = model;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public Car(int numberOfWheels, String engineType, String color) {
		super();
		this.numberOfWheels = numberOfWheels;
		this.engineType = engineType;
		this.color = color;
	}

	public Car() {
		super();
	}

	public int getNumberOfWheels() {
		return numberOfWheels;
	}

	public void setNumberOfWheels(int numberOfWheels) {
		this.numberOfWheels = numberOfWheels;
	}

	public String getEngineType() {
		return engineType;
	}

	public void setEngineType(String engineType) {
		this.engineType = engineType;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public void accelerate(){
		System.out.println(model + " is moving.");
	}

}


package com.spring.SpringdataJPA;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

@Entity(name = "Course")
@Table(name = "course")
public class Course {

    @Id
    @SequenceGenerator(name = "course_id_sequence",sequenceName = "course_id_sequence",allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE,generator = "course_id_sequence")
    private Long id;
    @Column(name = "name",columnDefinition = "TEXT",nullable = false)
    private String name;
    @Column(name = "department",columnDefinition = "TEXT",nullable = false)
    private String department;

    @ManyToMany(mappedBy = "courses")
    private Set<Student> students = new HashSet<>();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

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

    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }
}


Hey guys,

      This is just some stuff I am doing (Summer 2016) pertaining to scraping Twitter data.
I am using the R programming language, and have used somebody else's Github package for API calls
to Twitter their profile <- https://github.com/joyofdata/RTwitterAPI . Install their package for good API calls!!

You can look at some of my code to see how I implemented things with the data frames.I know, I did a poor job of documentation
and what not. If you have any questions please email me at tuf22191 (at) Temple (dot) edu !!!

      Alicode.R was written by a fellow worker of mine who knows R more than I do. At the time I was very much new to the R
programming language and I still am. I have not used any of the statistical tools, just the data acquisition of Twitter Data.
So, the stuff you see here is VERY MUCH A COLLECTIVE EFFORT AND NOT JUST MY OWN WORK! Like all of the code I wrote is based
off of the Alicode.R file that my fellow worker wrote for me!

-Ali


package com.example.naviIT;

public class Post {

	private String postId;
	private String username;
	private String userId;
	private String timestamp;
	private String room;
	private String content;
	private String regionId;

	public Post(String postId, String userId, String username, String timestamp, String room, String content, String regionId) {
		super();
		this.postId = postId;
		this.userId = userId;
		this.username = username;
		this.room = room;
		this.timestamp = timestamp;
		this.content = content;
		this.regionId = regionId;
	}

	public String getUserId(){
		return userId;
	}

	public String getPostId() {
		return postId;
	}

	public String getUsername() {
		return username;
	}

	public String getroom() {
		return room;
	}

	public String getTimeStamp() {
		return timestamp;
	}

	public String getContent() {
		return content;
	}

	public String getRegionId() {
		return regionId;
	}

	@Override
	public String toString() {
		return "Post [postId=" + postId +", userId=" + userId + ", username=" + username + ", room=" + room + ", timestamp=" + timestamp +", content =" + content  +", regionId =" + regionId +"]";
	}

}


package com.sliide.news.network;

import com.jakewharton.retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory;

import dagger.Module;
import dagger.Provides;
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

@Module
public class ApiModule {
    public static String BASE_URL = "http://bit.ly/";
    @Provides
    public OkHttpClient provideClient() {
        HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
        interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
        return new OkHttpClient.Builder().addInterceptor(interceptor).build();
    }

    @Provides
    public Retrofit provideRetrofit (OkHttpClient client){
        return new Retrofit.Builder()
                .baseUrl(BASE_URL)
                .client(client)
                .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }

    @Provides
    public ApiInterface provideApiService(){
        return provideRetrofit(provideClient()).create(ApiInterface.class);
    }
}