blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 410 | content_id stringlengths 40 40 | detected_licenses listlengths 0 51 | license_type stringclasses 2 values | repo_name stringlengths 5 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 80 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 132 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 9.45M | extension stringclasses 28 values | content stringlengths 3 9.45M | authors listlengths 1 1 | author_id stringlengths 0 352 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6b4f1be7c5165826f928d118e23b82707353f032 | 9111891f3a294d6d59bc2fdee2d0700bcbeb9144 | /Mamma_code/android/Model/ReviewComment.java | 873f9fc02b0f6a4883f4a4a2f589dd9057128ef0 | [] | no_license | DongramO/Mamma_android | 2ba53326ec5cc02f7dab1b42d34cdef71e03dd38 | e93ac98342e33ef8404928d4dbcfa5e8c043d66c | refs/heads/master | 2021-08-05T13:26:40.690371 | 2017-10-31T05:09:24 | 2017-10-31T05:09:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 142 | java | package momma_beta.momma_bv.Model;
/**
* Created by idongsu on 2017. 5. 16..
*/
public class ReviewComment
{
public String comment;
}
| [
"30032dongsu@gmail.com"
] | 30032dongsu@gmail.com |
5e9e430d29c163959f3fd811b1b01f46a7a5d028 | 04bd85b33041a43095860d1cd9f5e43dc4b278e8 | /lib/src/main/java/Factory/Example1/Araba.java | f5d5e8845b75a17bd6e412fbe7e94f2269ae1235 | [] | no_license | otabakoglu/JavaDesignPatterns | 5c163422d83816a64c78535848ee257a457a96ee | 6a4a4071ab1b4ff600058b07a5e74394b98301f1 | refs/heads/master | 2021-01-20T02:28:28.237406 | 2017-04-28T00:13:57 | 2017-04-28T00:13:57 | 89,409,155 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 792 | java | package Factory.Example1;
/**
* Created by Rubi on 27.04.2017.
*/
public abstract class Araba {
private String marka = null;
private String model = null;
private int beygirGucu = 0;
public Araba ( String marka, String model, int beygirGucu ){
setMarka( marka );
setModel( model );
setBeygirGucu( beygirGucu );
}
public void setMarka(String marka) {
this.marka = marka;
}
public void setModel(String model) {
this.model = model;
}
public void setBeygirGucu(int beygirGucu) {
this.beygirGucu = beygirGucu;
}
public String getMarka(){
return marka;
}
public String getModel(){
return model;
}
public int getBeygirGucu(){
return beygirGucu;
}
}
| [
"otabakoglu@gmail.com"
] | otabakoglu@gmail.com |
6f1351458de5964c453524e4c7e50f96b2fbc761 | e1303a844c8e4c9da0604baf9c85b67f35b19a47 | /app/src/main/java/com/openclassrooms/entrevoisins/ui/neighbour_list/ListNeighbourPagerAdapter.java | e090d1431fdb6618cbb5a2c831a58c5772411519 | [] | no_license | salihayoubi23/EntreVoisins_P3 | 9118aec6c7f5fb8983983add8bcca8e798036a5b | 4806114ebb16d2ada5fb98b9ce506837b46a77d8 | refs/heads/master | 2020-08-28T22:57:22.763345 | 2019-10-27T18:07:17 | 2019-10-27T18:07:17 | 217,845,826 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 735 | java | package com.openclassrooms.entrevoisins.ui.neighbour_list;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
public class ListNeighbourPagerAdapter extends FragmentPagerAdapter {
public ListNeighbourPagerAdapter(FragmentManager fm) {
super(fm);
}
/**
* getItem is called to instantiate the fragment for the given page.
* @param position
* @return
*/
@Override
public Fragment getItem(int position) {
return NeighbourFragment.newInstance(position);
}
/**
* get the number of pages
* @return
*/
@Override
public int getCount() {
return 2;
}
} | [
"salihayoubi23@outlook.com"
] | salihayoubi23@outlook.com |
592f918c8c5a4abff22d1dd0a00725fc3205e55d | e7f6ec52678d4c68017a576e8f57241f0a9fc948 | /app/src/main/java/com/lvqingyang/emptyhand/Picture/DetailActivity.java | a99af925d3587d7f331069add9b2bbfa9ca2c89a | [] | no_license | biloba123/EmptyHand | 5d71c85ddc5164f65f46a7f0203b87c2366d9c5f | d7c4a691a19a77c588b777d39d3f4abb000a55d1 | refs/heads/master | 2021-01-23T03:20:39.691100 | 2018-01-20T13:07:09 | 2018-01-20T13:07:09 | 86,065,951 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 9,002 | java | package com.lvqingyang.emptyhand.Picture;
import android.animation.AnimatorSet;
import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.CoordinatorLayout;
import android.support.v7.widget.AppCompatImageView;
import android.support.v7.widget.CardView;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.drawable.GlideDrawable;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.GlideDrawableImageViewTarget;
import com.lvqingyang.emptyhand.Base.BaseActivity;
import com.lvqingyang.emptyhand.R;
import com.lvqingyang.emptyhand.Tools.MyOkHttp;
import com.lvqingyang.emptyhand.Tools.MySweetAlertDialog;
import com.lvqingyang.emptyhand.Tools.TypefaceUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import rx.Observable;
import rx.Observer;
import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import static com.lvqingyang.emptyhand.Picture.AppConstants.drawableToBitmap;
public class DetailActivity extends BaseActivity {
//View
private ImageView mImageView;
private TextView mDayTv;
private TextView mMonthTv;
private TextView mTitleTv;
private TextView mPhotoerTv;
private TextView mContentTv;
private CoordinatorLayout mCoordinatorLayout;
private CardView mCardView;
//Data
private String mImgUrl,mTitle;
private static final String KEY_URL = "URL";
private static final String TAG = "DetailActivity";
public static void start(Context context, String url) {
Intent starter = new Intent(context, DetailActivity.class);
starter.putExtra(KEY_URL, url);
context.startActivity(starter);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);
initeView();
final MySweetAlertDialog dialog=new MySweetAlertDialog(this);
dialog.loading(null);
Observable.create(new Observable.OnSubscribe<String>() {
@Override
public void call(Subscriber<? super String> subscriber) {
try {
String responce = MyOkHttp.getInstance()
.run(getIntent().getStringExtra(KEY_URL));
subscriber.onNext(responce);
subscriber.onCompleted();
} catch (Exception e) {
e.printStackTrace();
subscriber.onError(e);
}
}
})
.subscribeOn(Schedulers.io()) // 指定 subscribe() 发生在 IO 线程
.observeOn(AndroidSchedulers.mainThread()) // 指定 Subscriber 的回调发生在主线程
.subscribe(new Observer<String>() {
@Override
public void onNext(String responce) {
Log.d(TAG, "onNext: " + responce);
if (responce != null) {
Document doc = Jsoup.parse(responce);
Element detailMain = doc.getElementsByClass("detail_text_main").first();
mTitle= detailMain.select("h2").text().substring(5);
setText(mTitleTv,mTitle);
StringBuffer sb = new StringBuffer();
String date = sb.append(detailMain.select("li.r_float").text()).delete(0, 5).toString();
String[] ymd = date.split("-");
setText(mMonthTv,ymd[1]);
setText(mDayTv,ymd[2]);
Element detail=detailMain.select("div.detail_text").first();
setText(mPhotoerTv,detailMain.select("div").last().text().replace(",你来掌镜",""));
Log.d(TAG, "onNext: "+detail.select("div")+"\n-------------------------"+
detail.select("div").first()+"\n----------------------------"+detail.select("div").get(0));
String content=detail.select("div").get(0).text();
setText(mContentTv,content.substring(0,content.indexOf("摄影:")));
mImgUrl=detail.select("img").attr("abs:src");
Log.d(TAG, "onNext: "+mImgUrl);
Glide.with(DetailActivity.this)
.load(mImgUrl)
.into(new GlideDrawableImageViewTarget(mImageView) {
@Override
public void onResourceReady(GlideDrawable resource, GlideAnimation<? super GlideDrawable> animation) {
super.onResourceReady(resource, animation);
mCardView.setVisibility(View.VISIBLE);
ColorArt colorArt = new ColorArt(drawableToBitmap(mImageView.getDrawable()));
ObjectAnimator objectAnimator = ObjectAnimator.ofInt(mCoordinatorLayout, "backgroundColor"
, colorArt.getBackgroundColor());
objectAnimator.setEvaluator(new ArgbEvaluator());
ObjectAnimator objectAnimator1 = ObjectAnimator.ofInt(mTitleTv, "textColor"
, colorArt.getDetailColor());
objectAnimator1.setEvaluator(new ArgbEvaluator());
ObjectAnimator objectAnimator2 = ObjectAnimator.ofInt(mMonthTv, "textColor"
, colorArt.getPrimaryColor());
objectAnimator2.setEvaluator(new ArgbEvaluator());
ObjectAnimator objectAnimator3 = ObjectAnimator.ofInt(mDayTv, "textColor"
, colorArt.getSecondaryColor());
objectAnimator3.setEvaluator(new ArgbEvaluator());
AnimatorSet set = new AnimatorSet();
set.play(objectAnimator)
.with(objectAnimator1)
.with(objectAnimator2)
.with(objectAnimator3);
set.setDuration(1000);
set.start();
}
});
}
}
@Override
public void onCompleted() {
dialog.complete();
}
@Override
public void onError(Throwable e) {
Log.e(TAG, "onError: " + e);
dialog.error();
e.printStackTrace();
}
});
}
private void initeView() {
// initToolbar();
mImageView = (AppCompatImageView) findViewById(R.id.img);
mTitleTv = (TextView) findViewById(R.id.titlt);
mMonthTv = (TextView) findViewById(R.id.month);
mDayTv = (TextView) findViewById(R.id.day);
mPhotoerTv = (TextView) findViewById(R.id.photoer);
mContentTv = (TextView) findViewById(R.id.content);
mCoordinatorLayout = (CoordinatorLayout) findViewById(R.id.fristLayout);
mCardView = (CardView) findViewById(R.id.td_header);
mCardView.setVisibility(View.GONE);
findViewById(R.id.ll)
.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(DetailActivity.this, getString(R.string.long_click), Toast.LENGTH_SHORT).show();
}
});
mImageView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
download(mImgUrl);
return true;
}
});
}
private void setText(TextView textView,String text){
textView.setText(text);
TypefaceUtils.setTypeface(textView);
}
}
| [
"2373880422@qq.com"
] | 2373880422@qq.com |
6ae31219fcbc06a26df27eb0163bda20648ce47d | 7fe1b440c00d4c87a80fdd3bd2d00f23fc3cc15c | /LeetCode/src/lzq/leetcode/initial/normal/TwoKeysKeyboard.java | effb946df5767f93fa89e7f69525ec5764a51132 | [] | no_license | luzheqi1987/LeetCode | e24b2b8d90d4d65225e48d2edcb9741efd46b6b9 | c72463d9276433d7abde3af17209693071cc1cbf | refs/heads/master | 2023-01-23T22:30:01.510969 | 2022-12-29T12:45:29 | 2022-12-29T12:45:29 | 13,192,716 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,321 | java | package lzq.leetcode.initial.normal;
public class TwoKeysKeyboard {
public int minSteps(int n) {
int steps = 0;
int tmp = n;
int divided = n / 2;
while(divided > 1){
if(tmp % divided == 0){
steps += tmp / divided;
tmp = divided;
divided = divided / 2;
}else{
divided--;
}
}
steps += tmp > 1 ? tmp : 0;
return steps;
}
public static void main(String[] args) {
System.out.println((new TwoKeysKeyboard()).minSteps(1));
System.out.println((new TwoKeysKeyboard()).minSteps(2));
System.out.println((new TwoKeysKeyboard()).minSteps(3));
System.out.println((new TwoKeysKeyboard()).minSteps(4));
System.out.println((new TwoKeysKeyboard()).minSteps(5));
System.out.println((new TwoKeysKeyboard()).minSteps(6));
System.out.println((new TwoKeysKeyboard()).minSteps(7));
System.out.println((new TwoKeysKeyboard()).minSteps(8));
System.out.println((new TwoKeysKeyboard()).minSteps(9));
System.out.println((new TwoKeysKeyboard()).minSteps(10));
System.out.println((new TwoKeysKeyboard()).minSteps(11));
System.out.println((new TwoKeysKeyboard()).minSteps(12));
}
}
| [
"luzheqi@luzheqideMacBook-Pro.local"
] | luzheqi@luzheqideMacBook-Pro.local |
d3b2bac2ad0b8bf564b0008505f99af1e6a7413f | ac5ccef81c3111deada74dfe22ca69dbfeba71cb | /src/DAO/DAOCidadeEstado.java | 9a331ddabb7aa0091db78b444f82622bc568bcb9 | [] | no_license | EdivanFranca/vegasys | 92f4700d3d28fe209d33343f15498266b4011cef | 73c7d966f207eb5175d9de928fbb08b05222c195 | refs/heads/master | 2021-05-11T20:15:58.378893 | 2018-01-14T14:09:54 | 2018-01-14T14:09:54 | 117,436,606 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,181 | java | package DAO;
import model.ModelCidadeEstado;
import conexoes.ConexaoMySql;
import java.util.ArrayList;
import model.ModelCidade;
import model.ModelEstado;
/**
*
* @author BLSoft Desenvolvimento de Sistemas
*/
public class DAOCidadeEstado extends ConexaoMySql {
/**
* recupera uma lista de CidadeEstado return ArrayList
*/
public ArrayList<ModelCidadeEstado> getListaCidadeEstadoDAO() {
ArrayList<ModelCidadeEstado> listamodelCidadeEstado = new ArrayList();
ModelCidadeEstado modelCidadeEstado = new ModelCidadeEstado();
ModelCidade modelCidade = new ModelCidade();
ModelEstado modelEstado = new ModelEstado();
try {
this.conectar();
this.executarSQL(
"SELECT "
+ "cidade.codigo,"
+ "cidade.nome,"
+ "cidade.fk_cod_estado,"
+ "estado.codigo,"
+ "estado.uf,"
+ "estado.nome "
+ " FROM"
+ " cidade inner join estado on estado.codigo = cidade.fk_cod_estado"
+ ";"
);
while (this.getResultSet().next()) {
modelCidade = new ModelCidade();
modelEstado = new ModelEstado();
modelCidadeEstado = new ModelCidadeEstado();
modelCidade.setCodigo(this.getResultSet().getInt(1));
modelCidade.setNome(this.getResultSet().getString(2));
modelCidade.setFk_cod_estado(this.getResultSet().getInt(3));
modelEstado.setCodigo(this.getResultSet().getInt(4));
modelEstado.setUf(this.getResultSet().getString(5));
modelEstado.setNome(this.getResultSet().getString(6));
modelCidadeEstado.setModelCidade(modelCidade);
modelCidadeEstado.setModelEstado(modelEstado);
listamodelCidadeEstado.add(modelCidadeEstado);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
this.fecharConexao();
}
return listamodelCidadeEstado;
}
}
| [
"C@C-PC"
] | C@C-PC |
cbf28bc19ecb99dea860dc577fc75a0818c018ad | 393fa81e7f00680858f4a487047fd17d7af4d900 | /app/src/main/java/simone/russo/tesidilaurea/view/LoginActivity.java | 7cc0fd1a53a375fcd05385a09d4c07bd31f72cd1 | [] | no_license | simonerusso97/TesiDiLaureaTriennale | 6f41757fe5959ff9a049c1180f3b023b5c541c72 | ea6cd9dab6df3e789a79bdab0206f34b16d19c99 | refs/heads/main | 2023-08-30T09:16:00.874663 | 2021-11-04T11:45:12 | 2021-11-04T11:45:12 | 424,572,194 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 72 | java | package simone.russo.tesidilaurea.view;
public class LoginActivity {
}
| [
"34507615+simonerusso97@users.noreply.github.com"
] | 34507615+simonerusso97@users.noreply.github.com |
b5834e54d6b6390febeec25f8e393a4131abd0f9 | d54150bd7f67f70fec4c763516e2c0dd5266fe71 | /teahouse-core/src/main/java/cn/com/shopec/quartz/utils/ThemeOrderNoPayDealQuartz.java | 52593d8056dc953a5d9400f832a2338a68398d92 | [] | no_license | melonw123/xzproject | 7c44fd1c7e2dacc121cf42c081eb3f8897f54a37 | 4309ea9c0905532d793ee18a996e4e2070f86a6a | refs/heads/master | 2023-03-18T10:48:10.440207 | 2018-06-05T10:06:10 | 2018-06-05T10:06:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,215 | java | package cn.com.shopec.quartz.utils;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import cn.com.shopec.common.ResultInfo;
import cn.com.shopec.common.constants.Constant;
import cn.com.shopec.common.sendmsg.MsgConstant;
import cn.com.shopec.common.sendmsg.SendMsgCommonInterfaceService;
import cn.com.shopec.common.utils.ECDateUtils;
import cn.com.shopec.core.common.PageFinder;
import cn.com.shopec.core.common.Query;
import cn.com.shopec.core.member.dao.MemberDao;
import cn.com.shopec.core.member.model.Member;
import cn.com.shopec.core.order.common.OrderConstant;
import cn.com.shopec.core.order.model.ThemeOrder;
import cn.com.shopec.core.order.service.ThemeOrderService;
import cn.com.shopec.core.themepavilion.model.ArrayCourse;
import cn.com.shopec.core.themepavilion.model.Course;
import cn.com.shopec.core.themepavilion.service.ArrayCourseService;
import cn.com.shopec.core.themepavilion.service.CourseService;
/**
* 主题馆订单未支付定时任务处理 每30分钟执行一次
*
* @author LiHuan Date 2018年1月8日 上午11:39:56
*/
public class ThemeOrderNoPayDealQuartz {
private Log log = LogFactory.getLog(ThemeOrderNoPayDealQuartz.class);
@Resource
private MemberDao memberDao;
@Resource
private ArrayCourseService arrayCourseService;
@Resource
private ThemeOrderService themeOrderService;
@Resource
private CourseService courseService;
@Resource
private SendMsgCommonInterfaceService sendMsgCommonInterfaceService;
public void quartzStart() throws Exception {
Member member = new Member();
member.setIsBlacklist(0);// 非黑名单
List<Member> listMember = memberDao.queryMemberList(new Query(member));
if (listMember != null && listMember.size() > 0) {
for (Member memberBean : listMember) {
ThemeOrder themeOrder = new ThemeOrder();
themeOrder.setMemberNo(memberBean.getMemberNo());
themeOrder.setPayStatus(0);//未支付
List<ThemeOrder> listThemeOrder = themeOrderService.getThemeOrderList(new Query(themeOrder));
if(listThemeOrder != null && listThemeOrder.size() >0){
for (ThemeOrder theme : listThemeOrder) {
if(theme.getOrderStatus() == null){
ThemeOrder order = new ThemeOrder();
order.setThemeOrderNo(theme.getThemeOrderNo());
order.setOrderStatus(Integer.parseInt(OrderConstant.yqxOrder_code));
ResultInfo<ThemeOrder> result = themeOrderService.updateThemeOrder(order, null);
if(result.getCode().equals(Constant.SECCUESS)){
//更新订单后修改排课表
ArrayCourse arrayCourse = arrayCourseService.getArrayCourse(theme.getArrangeNo());
if(arrayCourse != null){
if(arrayCourse.getPeopleNumber() == arrayCourse.getReservation()){
ArrayCourse course = new ArrayCourse();
course.setArrayCourseNo(arrayCourse.getArrayCourseNo());
if(arrayCourse.getLineUp() >= theme.getPeopleNumber()){
course.setLineUp(arrayCourse.getLineUp() - theme.getPeopleNumber());
}
arrayCourseService.updateArrayCourse(course, null);
}else{
ArrayCourse course = new ArrayCourse();
course.setArrayCourseNo(arrayCourse.getArrayCourseNo());
if(arrayCourse.getReservation() >= theme.getPeopleNumber()){
course.setReservation(arrayCourse.getReservation() - theme.getPeopleNumber());
}
ResultInfo<ArrayCourse> resultCourse = arrayCourseService.updateArrayCourse(course, null);
//更新排课表成功之后,查询有没有排队中的订单,若有直接更新此订单为已预约
if(resultCourse.getCode().equals(Constant.SECCUESS)){
ThemeOrder themeBean = new ThemeOrder();
themeBean.setArrangeNo(theme.getArrangeNo());
themeBean.setOrderStatus(Integer.parseInt(OrderConstant.pdzOrder_code));
int pageNo = 1;
int pageSize = theme.getPeopleNumber();
PageFinder<ThemeOrder> pageLineOrder = themeOrderService.queryLineThemeOrder(new Query(pageNo, pageSize, themeBean));
if(pageLineOrder != null && pageLineOrder.getData() != null && pageLineOrder.getData().size()>0){
for (ThemeOrder to : pageLineOrder.getData()) {
//更新排队订单
ThemeOrder lineOrder = new ThemeOrder();
lineOrder.setThemeOrderNo(to.getThemeOrderNo());
lineOrder.setOrderStatus(Integer.parseInt(OrderConstant.yuyueOrder_code));
ResultInfo<ThemeOrder> themeResult = themeOrderService.updateThemeOrder(lineOrder, null);
if(themeResult.getCode().equals(OrderConstant.success_code)){
//执行短信发送
String classDate = ECDateUtils.formatDate(to.getPaymentTime(), "yyyy年MM月dd日 HH:mm:ss");
String courseName = "";
Course courseBean = courseService.getCourse(to.getCourseNo());
if(courseBean != null){
courseName = courseBean.getChineseName();
}
String msgType = MsgConstant.LINEUPTYPE;
String content = classDate+"预约成功的"+courseName+"课程";
boolean flag = false;
flag = sendMsgCommonInterfaceService.sendMsgPost(to.getMobilePhone(), content, msgType);
log.info("发送内容为:==========================》"+flag);
}else{
log.info("更新排队中的订单数据失败!");
}
}
}
}else{
log.info("更新排课表数据失败!");
}
}
}
}else{
log.info("更新未支付的主题订单失败!");
}
}
}
}
}
}
}
protected void execute(String arg0) throws Exception {
try {
log.info("--------主题馆未支付订单修改,开始时间:" + new Date());
// 执行业务方法
quartzStart();
log.info("--------主题馆未支付订单修改定时任务完成...");
} catch (Exception e) {
log.error("--------主题馆未支付订单修改,错误信息:" + e.getMessage(), e);
}
}
} | [
"benpaodebaxi@sina.com"
] | benpaodebaxi@sina.com |
140a3de1521cb2afe4f96642ba09a7b605d7061d | c4cbe1b11807e1c34c9d5006743e54d51df9ed59 | /src/main/java/org/usfirst/frc/team2855/robot/commands/ArmOut.java | f0e69b0f3c4dc13fb5dd4192e14b589f634cea12 | [] | no_license | BEASTBot2855/Robot2019 | afa8300c134a6d2ada095b3bf06503735d1dc08c | 90d6ac88ec697c52aaa43ba61dda0efd8410c502 | refs/heads/master | 2020-04-23T07:47:34.533610 | 2019-03-19T19:52:04 | 2019-03-19T19:52:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,541 | java | package org.usfirst.frc.team2855.robot.commands;
import org.usfirst.frc.team2855.robot.Robot;
import org.usfirst.frc.team2855.robot.RobotMap;
import org.usfirst.frc.team2855.robot.subsystems.HPanelArm;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
/**
* tells arm solenoid to push gear arm out
*/
public class ArmOut extends Command {
private static DigitalInput hatchLimitSwitch0 = RobotMap.hatchLimitSwitch0;
public ArmOut() {
// Use requires() here to declare subsystem dependencies
// eg. requires(chassis);
requires(Robot.hPanelArm);
}
// Called just before this Command runs the first time
protected void initialize() {
SmartDashboard.putString("Panel Arm Status", "Going Out");
}
// Called repeatedly when this Command is scheduled to run
protected void execute() {
Robot.hPanelArm.HPanelUp();
}
// Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() {
if(!hatchLimitSwitch0.get()) {
HPanelArm.wasLastIn = false;
return true;
} else
return false;
}
// Called once after isFinished returns true
protected void end() {
Robot.hPanelArm.HPanelStop();
}
// Called when another command which requires one or more of the same
// subsystems is scheduled to run
protected void interrupted() {
end();
}
}
| [
"epicpkmn11@outlook.com"
] | epicpkmn11@outlook.com |
c2d1ea5a7ca9a9e19dfee9b5cec9b4b74cbb450e | ddef8d0a07c23ef4d89a2a5d476a1ff5ef873e0b | /DYN-IDM/springJdbcTest/src/main/java/spring/jdbc/UserDAO.java | c3929a196cc2a8ab887bc9916a99f2f57888efa0 | [] | no_license | parlovich/test | 784e5384661dc4b0398bbae2e44083bc70c7168d | 762ac16348f880b7cade8ef5acec032926968392 | refs/heads/master | 2021-01-10T19:59:29.349981 | 2014-06-18T09:14:40 | 2014-06-18T09:14:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 364 | java | package spring.jdbc;
import java.util.List;
import javax.sql.DataSource;
public interface UserDAO {
public void setDataSource(DataSource ds);
public void create(User user);
public User getUser(int id);
public User getUser(String login);
public List<User> listUsers();
public void delete(int id);
public void update(User user);
} | [
"Pavel_Arlovich@epam.com"
] | Pavel_Arlovich@epam.com |
ce7729b36bf43c11e3cdba7d8683f73cb1639308 | 8fec61ea0e8b40dba17635accbf1f4e4fa8db90e | /ssm_crud_idea/src/main/java/com/ysw/crud/dao/EmployeeMapper.java | c8802fd1c92dd2bee94f2e456b926cac04ceaea3 | [] | no_license | y1s2w3/ssm_crud_idea | 48a31eb719d33e33dd0db4c0018ba102eb0bd8b7 | 26939f7acaa90ac854365f3f1c70211a62bd149d | refs/heads/master | 2023-05-06T15:19:08.347025 | 2021-05-26T04:23:34 | 2021-05-26T04:23:34 | 370,904,270 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,090 | java | package com.ysw.crud.dao;
import com.ysw.crud.bean.Employee;
import com.ysw.crud.bean.EmployeeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface EmployeeMapper {
long countByExample(EmployeeExample example);
int deleteByExample(EmployeeExample example);
int deleteByPrimaryKey(Integer empId);
int insert(Employee record);
int insertSelective(Employee record);
List<Employee> selectByExample(EmployeeExample example);
Employee selectByPrimaryKey(Integer empId);
// 查询带部门名称的员工信息
List<Employee> selectByExampleWithDept(EmployeeExample example);
// 根据主键,查询带部门名称的员工信息
Employee selectByPrimaryKeyWithDept(Integer empId);
int updateByExampleSelective(@Param("record") Employee record, @Param("example") EmployeeExample example);
int updateByExample(@Param("record") Employee record, @Param("example") EmployeeExample example);
int updateByPrimaryKeySelective(Employee record);
int updateByPrimaryKey(Employee record);
} | [
"13186031563@163.com"
] | 13186031563@163.com |
fe9411d7dd9790f47536751d9e4ed32569c0c193 | 69dda3a38a040806a6263fd6eb7b01bbcfc7641c | /src/main/java/com/bowling/model/BowlingScoreFrameNormal.java | a20d2a975af21eb5ad046066b276b9c89394f266 | [] | no_license | smeerkahoven/bowling-problem | 18a0c76444acf4a897569bfd1d740cb13a1a80e6 | 2e6811f7c0b72f1cecb60efec88c4532e319c41e | refs/heads/master | 2021-06-20T22:24:50.044426 | 2019-09-24T03:39:04 | 2019-09-24T03:39:04 | 210,061,610 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 158 | java | package com.bowling.model;
public class BowlingScoreFrameNormal extends BowlingScoreFrame {
public BowlingScoreFrameNormal() {
super();
}
}
| [
"smeerkahoven@gmail.com"
] | smeerkahoven@gmail.com |
26a657d49ecd05710e27ccfb4afd7a1792390d36 | 2bc2eadc9b0f70d6d1286ef474902466988a880f | /tags/3.0.0-M2-20091130/transports/cxf/src/main/java/org/mule/transport/cxf/CxfMessageDispatcher.java | 9dfb292d46c05648b7e44e3053ac4c85022dfb90 | [] | no_license | OrgSmells/codehaus-mule-git | 085434a4b7781a5def2b9b4e37396081eaeba394 | f8584627c7acb13efdf3276396015439ea6a0721 | refs/heads/master | 2022-12-24T07:33:30.190368 | 2020-02-27T19:10:29 | 2020-02-27T19:10:29 | 243,593,543 | 0 | 0 | null | 2022-12-15T23:30:00 | 2020-02-27T18:56:48 | null | UTF-8 | Java | false | false | 10,868 | java | /*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.transport.cxf;
import org.mule.DefaultMuleMessage;
import org.mule.api.MuleEvent;
import org.mule.api.MuleMessage;
import org.mule.api.config.MuleProperties;
import org.mule.api.endpoint.EndpointURI;
import org.mule.api.endpoint.OutboundEndpoint;
import org.mule.api.transformer.TransformerException;
import org.mule.transport.AbstractMessageDispatcher;
import org.mule.transport.NullPayload;
import org.mule.transport.cxf.security.WebServiceSecurityException;
import org.mule.transport.soap.SoapConstants;
import org.mule.util.TemplateParser;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
import javax.activation.DataHandler;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Holder;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.ClientImpl;
import org.apache.cxf.service.model.BindingOperationInfo;
/**
* The CxfMessageDispatcher is used for making Soap client requests to remote
* services.
*/
public class CxfMessageDispatcher extends AbstractMessageDispatcher
{
private static final String URI_REGEX = "cxf:\\[(.+?)\\]:(.+?)/\\[(.+?)\\]:(.+?)";
Pattern URI_PATTERN = Pattern.compile(URI_REGEX);
protected final CxfConnector connector;
protected ClientWrapper wrapper;
private final TemplateParser soapActionTemplateParser = TemplateParser.createMuleStyleParser();
public CxfMessageDispatcher(OutboundEndpoint endpoint)
{
super(endpoint);
this.connector = (CxfConnector) endpoint.getConnector();
}
/*
We need a way to associate an endpoint with a specific CXF service and operation, and the most sensible way to
accomplish that is to overload URI syntax:
cxf:[service_URI]:service_localname/[ep_URI]:ep_localname
And the map method to operation
*/
@Override
protected void doConnect() throws Exception
{
wrapper = new ClientWrapper(connector.getCxfBus(), endpoint);
}
@Override
protected void doDisconnect() throws Exception
{
// nothing to do
}
@Override
protected void doDispose()
{
// nothing to do
}
protected Object[] getArgs(MuleEvent event) throws TransformerException
{
Object payload;
if (wrapper.isApplyTransformersToProtocol())
{
payload = event.getMessage().getPayload();
}
else
{
payload = event.transformMessage();
}
if (wrapper.isProxy())
{
return new Object[] { event.getMessage() };
}
Object[] args;
if (payload instanceof Object[])
{
args = (Object[])payload;
}
else
{
args = new Object[]{payload};
}
MuleMessage message = event.getMessage();
Set<?> attachmentNames = message.getAttachmentNames();
if (attachmentNames != null && !attachmentNames.isEmpty())
{
List<DataHandler> attachments = new ArrayList<DataHandler>();
for (Iterator<?> i = attachmentNames.iterator(); i.hasNext();)
{
attachments.add(message.getAttachment((String)i.next()));
}
List<Object> temp = new ArrayList<Object>(Arrays.asList(args));
temp.add(attachments.toArray(new DataHandler[0]));
args = temp.toArray();
}
if (args.length == 0)
{
return null;
}
return args;
}
protected MuleMessage doSend(MuleEvent event) throws Exception
{
((ClientImpl)wrapper.getClient()).setSynchronousTimeout(event.getTimeout());
MuleMessage res;
if (!wrapper.isClientProxyAvailable())
{
res = doSendWithClient(event);
}
else
{
res = doSendWithProxy(event);
}
return res;
}
protected MuleMessage doSendWithProxy(MuleEvent event) throws Exception
{
Method method = wrapper.getMethod(event);
Map<String, Object> props = getInovcationProperties(event);
Holder<MuleMessage> holder = new Holder<MuleMessage>();
props.put("holder", holder);
// Set custom soap action if set on the event or endpoint
String soapAction = (String)event.getMessage().getProperty(SoapConstants.SOAP_ACTION_PROPERTY);
if (soapAction != null)
{
soapAction = parseSoapAction(soapAction, new QName(method.getName()), event);
props.put(org.apache.cxf.binding.soap.SoapBindingConstants.SOAP_ACTION, soapAction);
}
BindingProvider bp = wrapper.getClientProxy();
bp.getRequestContext().putAll(props);
Object response;
try
{
response = method.invoke(wrapper.getClientProxy(), getArgs(event));
}
catch (InvocationTargetException e)
{
Throwable ex = ((InvocationTargetException) e).getTargetException();
if (ex != null && ex.getMessage().contains("Security"))
{
throw new WebServiceSecurityException(event, e);
}
else
{
throw e;
}
}
// TODO: handle holders
MuleMessage muleRes = holder.value;
return buildResponseMessage(muleRes, new Object[] { response });
}
protected MuleMessage doSendWithClient(MuleEvent event) throws Exception
{
BindingOperationInfo bop = wrapper.getOperation(event);
Map<String, Object> props = getInovcationProperties(event);
// Holds the response from the transport
Holder<MuleMessage> holder = new Holder<MuleMessage>();
props.put("holder", holder);
// Set custom soap action if set on the event or endpoint
String soapAction = (String)event.getMessage().getProperty(SoapConstants.SOAP_ACTION_PROPERTY);
if (soapAction != null)
{
soapAction = parseSoapAction(soapAction, bop.getName(), event);
props.put(org.apache.cxf.binding.soap.SoapBindingConstants.SOAP_ACTION, soapAction);
event.getMessage().setProperty(SoapConstants.SOAP_ACTION_PROPERTY, soapAction);
}
Map<String, Object> ctx = new HashMap<String, Object>();
ctx.put(Client.REQUEST_CONTEXT, props);
ctx.put(Client.RESPONSE_CONTEXT, props);
// Set Custom Headers on the client
Object[] arr = event.getMessage().getPropertyNames().toArray();
String head;
for (int i = 0; i < arr.length; i++)
{
head = (String) arr[i];
if ((head != null) && (!head.startsWith("MULE")))
{
props.put((String) arr[i], event.getMessage().getProperty((String) arr[i]));
}
}
Object[] response = wrapper.getClient().invoke(bop, getArgs(event), ctx);
MuleMessage muleRes = holder.value;
return buildResponseMessage(muleRes, response);
}
private Map<String, Object> getInovcationProperties(MuleEvent event)
{
Map<String, Object> props = new HashMap<String, Object>();
props.put(MuleProperties.MULE_EVENT_PROPERTY, event);
EndpointURI uri = endpoint.getEndpointURI();
if (uri.getUser() != null)
{
props.put(BindingProvider.USERNAME_PROPERTY, uri.getUser());
props.put(BindingProvider.PASSWORD_PROPERTY, uri.getPassword());
}
return props;
}
protected MuleMessage buildResponseMessage(MuleMessage transportResponse, Object[] response)
{
// One way dispatches over an async transport result in this
if (transportResponse == null)
{
return new DefaultMuleMessage(NullPayload.getInstance(), connector.getMuleContext());
}
// Otherwise we may have a response!
MuleMessage result = null;
if (response != null && response.length <= 1)
{
if (response.length == 1)
{
result = new DefaultMuleMessage(response[0], transportResponse, connector.getMuleContext());
}
}
else
{
result = new DefaultMuleMessage(response, transportResponse, connector.getMuleContext());
}
return result;
}
protected void doDispatch(MuleEvent event) throws Exception
{
doSend(event);
}
public String parseSoapAction(String soapAction, QName method, MuleEvent event)
{
EndpointURI endpointURI = event.getEndpoint().getEndpointURI();
Map<String, String> properties = new HashMap<String, String>();
MuleMessage msg = event.getMessage();
for (Iterator<?> iterator = msg.getPropertyNames().iterator(); iterator.hasNext();)
{
String propertyKey = (String)iterator.next();
properties.put(propertyKey, msg.getProperty(propertyKey).toString());
}
properties.put(MuleProperties.MULE_METHOD_PROPERTY, method.getLocalPart());
properties.put("methodNamespace", method.getNamespaceURI());
properties.put("address", endpointURI.getAddress());
properties.put("scheme", endpointURI.getScheme());
properties.put("host", endpointURI.getHost());
properties.put("port", String.valueOf(endpointURI.getPort()));
properties.put("path", endpointURI.getPath());
properties.put("hostInfo", endpointURI.getScheme()
+ "://"
+ endpointURI.getHost()
+ (endpointURI.getPort() > -1
? ":" + String.valueOf(endpointURI.getPort()) : ""));
if (event.getService() != null)
{
properties.put("serviceName", event.getService().getName());
}
soapAction = soapActionTemplateParser.parse(properties, soapAction);
if (logger.isDebugEnabled())
{
logger.debug("SoapAction for this call is: " + soapAction);
}
return soapAction;
}
}
| [
"rossmason@bf997673-6b11-0410-b953-e057580c5b09"
] | rossmason@bf997673-6b11-0410-b953-e057580c5b09 |
9b65080675a83573d097e1959415b961e97f89fa | 5abf744be7f5251075c98a5b11fcef5235848a93 | /primat/src/main/java/dbs/pprl/toolbox/data_owner/preprocessing/preprocessors/fieldnormalizer/DigitRemover.java | 61bbf66f7547d5dbdb1e37f93688c244809e8b52 | [
"Apache-2.0"
] | permissive | gen-too/primat | eb4bd2f1cbfaacd3beafbd7ac20c16f838519a6e | cd8c7dcb5c5e89598f33776179c6983694d16ae1 | refs/heads/master | 2022-01-29T00:18:01.644622 | 2022-01-12T12:55:20 | 2022-01-12T12:55:20 | 174,561,483 | 6 | 0 | Apache-2.0 | 2020-08-27T07:17:44 | 2019-03-08T15:28:33 | Java | UTF-8 | Java | false | false | 292 | java | package dbs.pprl.toolbox.data_owner.preprocessing.preprocessors.fieldnormalizer;
/**
* Remove any number.
*
* @author mfranke
*
*/
public final class DigitRemover extends RegexReplacer{
private static final String REGEX = "[0-9]";
public DigitRemover() {
super(REGEX, "");
}
} | [
"franke@informatik.uni-leipzig.de"
] | franke@informatik.uni-leipzig.de |
698d1fcd9d5208e6492f5cdbc0fa27a2aad6ccca | 730dafc8d7ee9522782fe47b05d279e88ce6cb44 | /exercicios de poo/src/exercicios_metodos_atributos/Patinete.java | 191df0fff12bbda00762505d32becd35f2dfc35d | [] | no_license | samilathalyta/GenerationBrasil | 0123c144262b53f18cd11edd2780ac70eb715456 | a53dfb118ef94f51c7c9c75b1d288dea17b5cf4a | refs/heads/main | 2023-08-22T19:39:00.912320 | 2021-10-25T16:33:01 | 2021-10-25T16:33:01 | 402,181,130 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 1,236 | java | /*Crie uma classe patinete e apresente os atributos e métodos referentes
esta classe, em seguida crie um objeto patinete, defina as instancias deste
objeto e apresente as informações deste objeto no console.
*/
package exercicios;
import java.text.NumberFormat;
public class Patinete {
private String cor;
private String carac;
private float preco;
public Patinete (String cor, String carac, float preco) {
this.cor = cor;
this.carac = carac;
this.preco = preco;
}
public String getCor() {
return cor;
}
public void setCor(String cor) {
this.cor = cor;
}
public String getCarac() {
return carac;
}
public void setCarac(String carac) {
this.carac = carac;
}
public float getPreco() {
return preco;
}
public void setPreco(float preco) {
this.preco = preco;
}
public void imprimir() {
System.out.println("\nCor do patine: " + cor + "\nCaracteristica: " + carac + "\nPreço: " + preco);
}
public String formatarNum() {
NumberFormat nf = NumberFormat.getCurrencyInstance(); //formata na moeda do pais
nf.setMinimumFractionDigits(2); // indica a quantidade de digitos dpos da virgula
String formatoMoeda = nf.format(preco); // formatação de saída
return formatoMoeda;
}
}
| [
"samila.thalytaa@gmail.com"
] | samila.thalytaa@gmail.com |
83d3979a7f18bad8b9ef8e774dea81db9675e08f | 4315d17092fced341b323751af7b03886a9c5cdc | /20180925/温宗儒-161220133/src/backstage/creature/Audience/Snake.java | b8dfa9a26e83e7a1f17a1f47824ad61f5560bebf | [] | no_license | TianChenjiang/java-2018f-homework | d62eb85148a3a3a41fae7d9d2da09c759c315aad | bbacb26264cc0e4555f8b2c6f581c85a17fca1ed | refs/heads/master | 2020-03-28T13:46:59.758231 | 2018-12-31T09:40:52 | 2018-12-31T09:40:52 | 148,428,329 | 3 | 0 | null | 2018-12-31T09:40:53 | 2018-09-12T05:51:46 | Java | UTF-8 | Java | false | false | 324 | java | package backstage.creature.Audience;
import backstage.creature.Creature;
public class Snake extends Creature {
public Snake(){
name = "蛇精";
imageUrl = "/common/images/audience/snake.jpg";
}
public void cheer(){
System.out.println("蛇精助威:“小的们加油!”");
}
}
| [
"392207009@qq.com"
] | 392207009@qq.com |
68556813ca6b33a97df6643a7f1c710c1e287d11 | fe7a91bc5cec069cfc5904467e2440ecc3ea38bd | /library/src/main/java/me/zhanghai/android/materialprogressbar/internal/ObjectAnimatorCompatBase.java | b97df122b7e3092686a5ac5a28958ee8ad5476cd | [
"Apache-2.0"
] | permissive | h6ah4i/MaterialProgressBar | 6aaffdacfe5b8a7cc5b2429f35e307445b213584 | e23cecf7205649a910b87d38e297f00778e15a5e | refs/heads/master | 2021-01-17T21:20:51.969680 | 2015-06-10T08:35:53 | 2015-06-10T08:35:53 | 37,072,021 | 1 | 0 | null | 2015-06-08T14:31:12 | 2015-06-08T14:31:12 | null | UTF-8 | Java | false | false | 4,654 | java | /*
* Copyright (c) 2015 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com>
* All Rights Reserved.
*/
package me.zhanghai.android.materialprogressbar.internal;
import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.support.annotation.Size;
import android.util.Property;
class ObjectAnimatorCompatBase {
private static final int NUM_POINTS = 500;
private ObjectAnimatorCompatBase() {}
public static ObjectAnimator ofArgb(Object target, String propertyName, int... values) {
ObjectAnimator animator = ObjectAnimator.ofInt(target, propertyName, values);
animator.setEvaluator(new ArgbEvaluator());
return animator;
}
public static <T> ObjectAnimator ofArgb(T target, Property<T, Integer> property,
int... values) {
ObjectAnimator animator = ObjectAnimator.ofInt(target, property, values);
animator.setEvaluator(new ArgbEvaluator());
return animator;
}
public static ObjectAnimator ofFloat(Object target, String xPropertyName, String yPropertyName,
Path path) {
float[] xValues = new float[NUM_POINTS];
float[] yValues = new float[NUM_POINTS];
calculateXYValues(path, xValues, yValues);
PropertyValuesHolder xPvh = PropertyValuesHolder.ofFloat(xPropertyName, xValues);
PropertyValuesHolder yPvh = PropertyValuesHolder.ofFloat(yPropertyName, yValues);
return ObjectAnimator.ofPropertyValuesHolder(target, xPvh, yPvh);
}
public static <T> ObjectAnimator ofFloat(T target, Property<T, Float> xProperty,
Property<T, Float> yProperty, Path path) {
float[] xValues = new float[NUM_POINTS];
float[] yValues = new float[NUM_POINTS];
calculateXYValues(path, xValues, yValues);
PropertyValuesHolder xPvh = PropertyValuesHolder.ofFloat(xProperty, xValues);
PropertyValuesHolder yPvh = PropertyValuesHolder.ofFloat(yProperty, yValues);
return ObjectAnimator.ofPropertyValuesHolder(target, xPvh, yPvh);
}
public static ObjectAnimator ofInt(Object target, String xPropertyName, String yPropertyName,
Path path) {
int[] xValues = new int[NUM_POINTS];
int[] yValues = new int[NUM_POINTS];
calculateXYValues(path, xValues, yValues);
PropertyValuesHolder xPvh = PropertyValuesHolder.ofInt(xPropertyName, xValues);
PropertyValuesHolder yPvh = PropertyValuesHolder.ofInt(yPropertyName, yValues);
return ObjectAnimator.ofPropertyValuesHolder(target, xPvh, yPvh);
}
public static <T> ObjectAnimator ofInt(T target, Property<T, Integer> xProperty,
Property<T, Integer> yProperty, Path path) {
int[] xValues = new int[NUM_POINTS];
int[] yValues = new int[NUM_POINTS];
calculateXYValues(path, xValues, yValues);
PropertyValuesHolder xPvh = PropertyValuesHolder.ofInt(xProperty, xValues);
PropertyValuesHolder yPvh = PropertyValuesHolder.ofInt(yProperty, yValues);
return ObjectAnimator.ofPropertyValuesHolder(target, xPvh, yPvh);
}
private static void calculateXYValues(Path path, @Size(NUM_POINTS) float[] xValues,
@Size(NUM_POINTS) float[] yValues) {
PathMeasure pathMeasure = new PathMeasure(path, false /* forceClosed */);
float pathLength = pathMeasure.getLength();
float[] position = new float[2];
for (int i = 0; i < NUM_POINTS; ++i) {
float distance = (i * pathLength) / (NUM_POINTS - 1);
pathMeasure.getPosTan(distance, position, null /* tangent */);
xValues[i] = position[0];
yValues[i] = position[1];
}
}
private static void calculateXYValues(Path path, @Size(NUM_POINTS) int[] xValues,
@Size(NUM_POINTS) int[] yValues) {
PathMeasure pathMeasure = new PathMeasure(path, false /* forceClosed */);
float pathLength = pathMeasure.getLength();
float[] position = new float[2];
for (int i = 0; i < NUM_POINTS; ++i) {
float distance = (i * pathLength) / (NUM_POINTS - 1);
pathMeasure.getPosTan(distance, position, null /* tangent */);
xValues[i] = Math.round(position[0]);
yValues[i] = Math.round(position[1]);
}
}
}
| [
"dreaming.in.code.zh@gmail.com"
] | dreaming.in.code.zh@gmail.com |
887fe5f60623845e37a0cbed220f03ef50a3e930 | b3418633bf03a546a5254ea422e40de17489980c | /src/main/java/com/fhd/process/web/controller/ProcessPointControl.java | 9d45af5ca5d8fc273327a50a6dcdfc2c133ea21a | [] | no_license | vincent-dixin/Financial-Street-ERMIS | d819fd319293e55578e3067c9a5de0cd33c56a93 | 87d6bc6a4ddc52abca2c341eb476c1ea283d70e7 | refs/heads/master | 2016-09-06T13:56:46.197326 | 2015-03-30T02:47:46 | 2015-03-30T02:47:46 | 33,099,786 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,688 | java | package com.fhd.process.web.controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.fhd.core.dao.Page;
import com.fhd.fdc.utils.UserContext;
import com.fhd.process.business.ProcessPointBO;
import com.fhd.process.entity.ProcessPoint;
import com.fhd.process.web.form.ProcessPointForm;
import com.fhd.sys.web.form.dic.DictEntryForm;
/**
* 流程节点维护
*
* @author 宋佳
* @version
* @since Ver 1.1
* @Date 2013 3-13
*/
@Controller
public class ProcessPointControl {
@Autowired
private ProcessPointBO o_ProcessPointBO;
/**
*
* @author 宋佳
* @param processEditID
* @return
* @since fhd Ver 1.1
*/
@ResponseBody
@RequestMapping("/ProcessPoint/ProcessPoint/editProcessPoint.f")
public Map<String,Object> findProcessPointForm(String processEditID,String processId){
Map<String,Object> ProcessPointMap=o_ProcessPointBO.findProcessPointForm(processEditID,processId);
return ProcessPointMap;
}
/**
*
* @author 宋佳
* @param processEditID
* @return
* @since fhd Ver 1.1
*/
@ResponseBody
@RequestMapping("/ProcessPoint/ProcessPoint/editProcessPointforview.f")
public Map<String,Object> findProcessPointFormForView(String processEditID){
Map<String,Object> ProcessPointMap=o_ProcessPointBO.findProcessPointFormForView(processEditID);
return ProcessPointMap;
}
/**
*
* 删除流程节点
*
*
* @author 宋佳
* @param ProcessPointID
* @since fhd Ver 1.1
*/
@ResponseBody
@RequestMapping("/ProcessPoint/ProcessPoint/removeProcessPoint.f")
public void removeProcessPointByID(String ProcessPointID,HttpServletResponse response) throws IOException{
PrintWriter out = response.getWriter();
try {
if(StringUtils.isNotBlank(ProcessPointID)){
o_ProcessPointBO.removeProcessPointByID(ProcessPointID);
}
out.print("true");
} catch (Exception e) {
e.printStackTrace();
out.print("false");
} finally{
if(null != out){
out.close();
}
}
}
/**
*
* 删除父亲节点
*
*
* @author 宋佳
* @param ProcessPointID
* @since fhd Ver 1.1
*/
@ResponseBody
@RequestMapping("/processpoint/removeparentpointbyid.f")
public void removeParentPointById(String ids,HttpServletResponse response) throws IOException{
PrintWriter out = response.getWriter();
try {
if(StringUtils.isNotBlank(ids)){
o_ProcessPointBO.removeParentPointByID(ids);
}
out.print("true");
} catch (Exception e) {
e.printStackTrace();
out.print("false");
} finally{
if(null != out){
out.close();
}
}
}
/**
*
* 保存流程节点
*
* @author 宋佳
* @param ProcessPointForm
* @param parentId
* @return
* @since fhd Ver 1.1
*/
@ResponseBody
@RequestMapping("/processpoint/processpoint/saveprocesspoint.f")
public Map<String,Object> saveProcessPoint(ProcessPointForm processPointForm){
Map<String,Object> result=new HashMap<String,Object>();
o_ProcessPointBO.saveProcessPoint(processPointForm);
result.put("success", true);
return result;
}
/**
*
*自动生成编号
*
*
* @author 李克东
* @param ProcessPointEditID
* @param parentId
* @return
* @since fhd Ver 1.1
*/
@ResponseBody
@RequestMapping("/ProcessPoint/ProcessPoint/ProcessPointCode.f")
public Map<String,Object> findProcessPointCode(String processPointId,String processId){
Map<String,Object> processPointMap=o_ProcessPointBO.findProcessPointCode(processPointId, processId);
return processPointMap;
}
/**
* 根据流程ID 找到流程下所有节点
* @author 宋佳
* @param processId
* @return
*/
@ResponseBody
@RequestMapping("/process/findprocesspointlistbypage.f")
public Map<String,Object> findProcessPointListByPage(int limit, int start, String query,String processId){
Map<String,Object> resultMap;
Page<ProcessPoint> page = new Page<ProcessPoint>();
page.setPageNo((limit == 0 ? 0 : start / limit) + 1);
page.setPageSize(limit);
String companyId = UserContext.getUser().getCompanyid();
resultMap=o_ProcessPointBO.findProcessPointListByPage(page, query, processId,companyId);
return resultMap;
}
/**
* 根据节点ID 找到上级节点和节点进入条件
* @author 宋佳
* @param processId
* @return
*/
@ResponseBody
@RequestMapping("/process/findParentListByPointId.f")
public Map<String,Object> findParentListByPointId(String processPointId){
Map<String,Object> resultMap;
String companyId = UserContext.getUser().getCompanyid();
resultMap=o_ProcessPointBO.findParentListByPointId(processPointId,companyId);
return resultMap;
}
/**
* 查询出流程中所包含所有的节点,作为数据字典展示
* @param typeId
* @author 宋佳
* @return
*/
@ResponseBody
@RequestMapping("/processpoint/findallprocesspointbyprocessid.f")
public List<Map<String,String>> findAllProcessPointByProcessId(String processId,String processPointId){
List<DictEntryForm> list=o_ProcessPointBO.findAllProcessPointByProcessId(processId);
List<Map<String, String>> l=new ArrayList<Map<String, String>>();
for(DictEntryForm dictEntryForm:list)
{
Map<String,String> map=new HashMap<String,String>();
if(!dictEntryForm.getId().equals(processPointId))
{
map.put("id", dictEntryForm.getId());
map.put("name",dictEntryForm.getName());
l.add(map);
}
}
return l;
}
}
| [
"cashhu@126.com"
] | cashhu@126.com |
1c42485f1eef001c96255db9f3a61aee622e4403 | c24c0fe370a11725974ddd451708d8aed4990649 | /app/src/main/java/com/example/paolobonomi/eattheball/Activity/Engine/Animation.java | bbc77b65c2a576d31107a29ad71fed194a1b1d67 | [] | no_license | bonomip/Orbit | 32635dbd9da644640e865edec70d594aab789c8f | 11d7b8fa0486eedbe8dc04439ab2959c6391534a | refs/heads/master | 2021-01-20T05:58:40.378711 | 2017-10-28T13:44:23 | 2017-10-28T13:44:23 | 101,475,204 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,128 | java | package com.example.paolobonomi.eattheball.Activity.Engine;
/*
* Created by Paolo Bonomi on 02/08/2017.
*/
import android.content.Context;
import android.util.Log;
import com.example.paolobonomi.eattheball.R;
import org.jbox2d.common.Vec2;
import org.joml.Matrix4f;
import javax.microedition.khronos.opengles.GL;
class Animation {
private Sprite[] sprites;
private int start;
private int end;
private boolean haveToRepeat;
private int repeat_number = 0;
private int count = 0;
private int cursor;
Animation(Context context, String file_name, int start, int end){
this.sprites = new Sprite[end-start+1];
loadSprite(context, file_name, start, end);
this.end = end;
this.start = start;
this.cursor = 0;
this.haveToRepeat = false;
}
void setRepeat(int number){
if(number < 0) {
this.haveToRepeat = false;
this.repeat_number = 0;
return;
}
this.haveToRepeat = true;
this.repeat_number = number;
this.count = 0;
}
void draw(Vec2 body_center, float body_angle, float size, Matrix4f view) {
try {
if (this.cursor < start || this.cursor > this.end)
this.cursor = start;
this.sprites[this.cursor-this.start].Draw(body_center, body_angle, size, view);
if (this.haveToRepeat) {
this.count += 1;
if (this.count == this.repeat_number) {
this.count = 0;
this.cursor += 1;
}
} else this.cursor++;
} catch (Exception e) { e.printStackTrace(); }
}
private void loadSprite(Context context, String file_name, int start, int end){
for ( int i = start; i <= end; i++ ) {
final int id = context.getResources().getIdentifier(file_name + i, "drawable", context.getPackageName());
if (id == 0)
this.sprites[i-start] = null;
else
this.sprites[i-start] = new Sprite(new Texture(context, id));
}
}
}
| [
"paolo.bonomi@outlook.com"
] | paolo.bonomi@outlook.com |
80505909fe253a225bf1ea7adbc9fcee08eb2f99 | eef7304bde1aa75c49c1fe10883d5d4b8241e146 | /aws-java-sdk-clouddirectory/src/main/java/com/amazonaws/services/clouddirectory/model/ListObjectChildrenResult.java | 21b7e16cf9e88ad9206b802c550661dea13defaf | [
"Apache-2.0"
] | permissive | C2Devel/aws-sdk-java | 0dc80a890aac7d1ef6b849bb4a2e3f4048ee697e | 56ade4ff7875527d0dac829f5a26e6c089dbde31 | refs/heads/master | 2021-07-17T00:54:51.953629 | 2017-10-05T13:55:54 | 2017-10-05T13:57:31 | 105,878,846 | 0 | 2 | null | 2017-10-05T10:51:57 | 2017-10-05T10:51:57 | null | UTF-8 | Java | false | false | 6,426 | java | /*
* Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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 com.amazonaws.services.clouddirectory.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectChildren" target="_top">AWS
* API Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListObjectChildrenResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {
/**
* <p>
* Children structure, which is a map with key as the <code>LinkName</code> and <code>ObjectIdentifier</code> as the
* value.
* </p>
*/
private java.util.Map<String, String> children;
/**
* <p>
* The pagination token.
* </p>
*/
private String nextToken;
/**
* <p>
* Children structure, which is a map with key as the <code>LinkName</code> and <code>ObjectIdentifier</code> as the
* value.
* </p>
*
* @return Children structure, which is a map with key as the <code>LinkName</code> and
* <code>ObjectIdentifier</code> as the value.
*/
public java.util.Map<String, String> getChildren() {
return children;
}
/**
* <p>
* Children structure, which is a map with key as the <code>LinkName</code> and <code>ObjectIdentifier</code> as the
* value.
* </p>
*
* @param children
* Children structure, which is a map with key as the <code>LinkName</code> and <code>ObjectIdentifier</code>
* as the value.
*/
public void setChildren(java.util.Map<String, String> children) {
this.children = children;
}
/**
* <p>
* Children structure, which is a map with key as the <code>LinkName</code> and <code>ObjectIdentifier</code> as the
* value.
* </p>
*
* @param children
* Children structure, which is a map with key as the <code>LinkName</code> and <code>ObjectIdentifier</code>
* as the value.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListObjectChildrenResult withChildren(java.util.Map<String, String> children) {
setChildren(children);
return this;
}
public ListObjectChildrenResult addChildrenEntry(String key, String value) {
if (null == this.children) {
this.children = new java.util.HashMap<String, String>();
}
if (this.children.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.children.put(key, value);
return this;
}
/**
* Removes all the entries added into Children.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListObjectChildrenResult clearChildrenEntries() {
this.children = null;
return this;
}
/**
* <p>
* The pagination token.
* </p>
*
* @param nextToken
* The pagination token.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
* <p>
* The pagination token.
* </p>
*
* @return The pagination token.
*/
public String getNextToken() {
return this.nextToken;
}
/**
* <p>
* The pagination token.
* </p>
*
* @param nextToken
* The pagination token.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListObjectChildrenResult withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getChildren() != null)
sb.append("Children: ").append(getChildren()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListObjectChildrenResult == false)
return false;
ListObjectChildrenResult other = (ListObjectChildrenResult) obj;
if (other.getChildren() == null ^ this.getChildren() == null)
return false;
if (other.getChildren() != null && other.getChildren().equals(this.getChildren()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getChildren() == null) ? 0 : getChildren().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public ListObjectChildrenResult clone() {
try {
return (ListObjectChildrenResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}
| [
""
] | |
839c4059284f65489f3ffc1b9a33dfe639c4f9f9 | c2841192ebd5cfc81b8b952839bc44dead422f6c | /EasyServices/src/main/java/com/upc/entity/Ciudad.java | 3db8ba0922750161725799de77cd6d02d93764d1 | [] | no_license | miguelb10/EasyServices | a785b5f0001ee496c4cac6cc020121afcc0622a5 | 49628515a274d475a1cb073c4b4f424812705d86 | refs/heads/master | 2020-03-19T08:13:57.735347 | 2018-07-01T07:06:57 | 2018-07-01T07:06:57 | 136,186,592 | 1 | 0 | null | 2018-06-28T00:01:13 | 2018-06-05T14:05:27 | HTML | UTF-8 | Java | false | false | 1,292 | java | package com.upc.entity;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
// default package
// Generated 17-may-2018 13:26:54 by Hibernate Tools 5.3.0.Beta2
/**
* Ciudad generated by hbm2java
*/
@Entity
@Table(name = "ciudad")
public class Ciudad {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int idciudad;
@ManyToOne
@JoinColumn(name="iddepartamento")
private Departamento departamento;
private String nombre;
private String descripcion;
public Ciudad() {
super();
}
public Integer getIdciudad() {
return this.idciudad;
}
public void setIdciudad(Integer idciudad) {
this.idciudad = idciudad;
}
public Departamento getDepartamento() {
return this.departamento;
}
public void setDepartamento(Departamento departamento) {
this.departamento = departamento;
}
public String getNombre() {
return this.nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public String getDescripcion() {
return this.descripcion;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
}
| [
"miguel.blas_03@hotmail.com"
] | miguel.blas_03@hotmail.com |
aecf47a90701496350b02516bac4307e02b0b93f | fa93c9be2923e697fb8a2066f8fb65c7718cdec7 | /sources/com/avito/android/home/default_search_location/DefaultSearchLocationInteractor.java | bcca8664e083adc6621aa0cb4cd84d0ebb1b7944 | [] | no_license | Auch-Auch/avito_source | b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b | 76fdcc5b7e036c57ecc193e790b0582481768cdc | refs/heads/master | 2023-05-06T01:32:43.014668 | 2021-05-25T10:19:22 | 2021-05-25T10:19:22 | 370,650,685 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 855 | java | package com.avito.android.home.default_search_location;
import android.location.Location;
import io.reactivex.rxjava3.core.Single;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\bf\u0018\u00002\u00020\u0001J\u0015\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0002H&¢\u0006\u0004\b\u0004\u0010\u0005¨\u0006\u0006"}, d2 = {"Lcom/avito/android/home/default_search_location/DefaultSearchLocationInteractor;", "", "Lio/reactivex/rxjava3/core/Single;", "Landroid/location/Location;", "defaultLocation", "()Lio/reactivex/rxjava3/core/Single;", "serp_release"}, k = 1, mv = {1, 4, 2})
public interface DefaultSearchLocationInteractor {
@NotNull
Single<Location> defaultLocation();
}
| [
"auchhunter@gmail.com"
] | auchhunter@gmail.com |
b43420f35748b2d8c6db99c1cbece518059c9c9a | 1aece97371898f7628b70cfb4962cd80d0f2a84f | /app/src/main/java/org/sex/hanker/View/SwipeRefreshLayoutOnRefresh.java | 7505f0250b8ec46e2055669044ad511bf8cd3a37 | [] | no_license | rgsngdha/pp365_app | a8b6b3ca2c70d3b1d0cd54037402f1da74f1e1e0 | 0a2a41fba0127ce5d5b15cbe1518ea092d877293 | refs/heads/master | 2023-03-18T05:23:10.510186 | 2019-01-26T02:18:29 | 2019-01-26T02:18:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 701 | java | package org.sex.hanker.View;
import android.support.v4.widget.SwipeRefreshLayout;
/**
* Created by Administrator on 2018/3/2.
*/
public class SwipeRefreshLayoutOnRefresh implements SwipeRefreshLayout.OnRefreshListener{
private PullLoadMoreRecyclerView mPullLoadMoreRecyclerView;
public SwipeRefreshLayoutOnRefresh(PullLoadMoreRecyclerView pullLoadMoreRecyclerView) {
this.mPullLoadMoreRecyclerView = pullLoadMoreRecyclerView;
}
@Override
public void onRefresh() {
if (!mPullLoadMoreRecyclerView.isRefresh()) {
mPullLoadMoreRecyclerView.setIsRefresh(true);
mPullLoadMoreRecyclerView.refresh();
}
}
}
| [
"877149699@qq.com"
] | 877149699@qq.com |
2c1da806132c883aa9518fe2088a98966592a35f | 9994f405df09ee239ea07e55d20ba852077c5c98 | /SD_FP_01/src/SD_FP01_ex3_ServerSocket.java | ed531825df64567bd83ab2819ef00f98f36cc545 | [] | no_license | JessicaCoelho21/SD | 10a1fecf0051d7a6b317ba5abab6a55ba8978b9f | 7d484a501585a4ef89279b8226c58279e291c467 | refs/heads/master | 2023-03-04T03:58:47.125071 | 2021-02-19T14:58:53 | 2021-02-19T14:58:53 | 303,689,109 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 992 | java | import java.net.*;
import java.io.*;
public class SD_FP01_ex3_ServerSocket {
public static void main (String[] args) throws IOException{
ServerSocket serverSocket = null;
Socket clientSocket = null;
PrintWriter out = null;
try {
serverSocket = new ServerSocket(7);
clientSocket = serverSocket.accept();
out = new PrintWriter(clientSocket.getOutputStream(), true);
} catch (IOException e) {
System.out.println("Exception caught when trying to listen to port or listening for a connection");
}
BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
//mensagem enviada do cliente para o servidor
out.println(inputLine);
}
out.close();
in.close();
serverSocket.close();
clientSocket.close();
}
}
| [
"jscoelho21@gmail.com"
] | jscoelho21@gmail.com |
40c1f502eb9e3144a112f484558d8ff3f6aa0625 | ebd2bbc19f85bec0aec634bd9294fa1945e32061 | /dependencies/jclouds/aws-ec2/1.6.0-wso2v1/src/main/java/org/jclouds/aws/ec2/compute/strategy/CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions.java | bbfec00caa1192b1acd05256e6966f940de465f9 | [] | no_license | madusankap/turing-1 | da645af4886d562667dfd2f61b4aa184da093340 | 04edf79deefbe751f0dee518b3891f816cec2dbc | refs/heads/master | 2019-01-02T01:46:09.216852 | 2014-12-18T11:04:09 | 2014-12-18T11:04:09 | 28,171,116 | 0 | 1 | null | 2023-03-20T11:52:10 | 2014-12-18T06:21:53 | Java | UTF-8 | Java | false | false | 8,329 | java | /**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you 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.jclouds.aws.ec2.compute.strategy;
import static com.google.common.base.Predicates.and;
import static com.google.common.base.Predicates.or;
import java.util.concurrent.ConcurrentMap;
import javax.annotation.Resource;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
import org.jclouds.aws.ec2.compute.AWSEC2TemplateOptions;
import org.jclouds.aws.ec2.domain.RegionNameAndPublicKeyMaterial;
import org.jclouds.aws.ec2.functions.CreatePlacementGroupIfNeeded;
import org.jclouds.aws.ec2.options.AWSRunInstancesOptions;
import org.jclouds.compute.domain.Template;
import org.jclouds.compute.functions.GroupNamingConvention;
import org.jclouds.compute.options.TemplateOptions;
import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.ec2.compute.domain.RegionAndName;
import org.jclouds.ec2.compute.options.EC2TemplateOptions;
import org.jclouds.ec2.compute.strategy.CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions;
import org.jclouds.ec2.domain.KeyPair;
import org.jclouds.ec2.options.RunInstancesOptions;
import org.jclouds.logging.Logger;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.cache.LoadingCache;
/**
*
* @author Adrian Cole
*/
@Singleton
public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions extends
CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptions {
@Resource
@Named(ComputeServiceConstants.COMPUTE_LOGGER)
protected Logger logger = Logger.NULL;
@VisibleForTesting
final LoadingCache<RegionAndName, String> placementGroupMap;
@VisibleForTesting
final CreatePlacementGroupIfNeeded createPlacementGroupIfNeeded;
@VisibleForTesting
final Function<RegionNameAndPublicKeyMaterial, KeyPair> importExistingKeyPair;
@Inject
public CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions(
Function<RegionAndName, KeyPair> makeKeyPair, ConcurrentMap<RegionAndName, KeyPair> credentialsMap,
@Named("SECURITY") LoadingCache<RegionAndName, String> securityGroupMap,
Provider<RunInstancesOptions> optionsProvider,
@Named("PLACEMENT") LoadingCache<RegionAndName, String> placementGroupMap,
CreatePlacementGroupIfNeeded createPlacementGroupIfNeeded,
Function<RegionNameAndPublicKeyMaterial, KeyPair> importExistingKeyPair,
GroupNamingConvention.Factory namingConvention) {
super(makeKeyPair, credentialsMap, securityGroupMap, optionsProvider, namingConvention);
this.placementGroupMap = placementGroupMap;
this.createPlacementGroupIfNeeded = createPlacementGroupIfNeeded;
this.importExistingKeyPair = importExistingKeyPair;
}
public AWSRunInstancesOptions execute(String region, String group, Template template) {
AWSRunInstancesOptions instanceOptions = AWSRunInstancesOptions.class
.cast(super.execute(region, group, template));
String placementGroupName = template.getHardware().getId().startsWith("cc") ? createNewPlacementGroupUnlessUserSpecifiedOtherwise(
region, group, template.getOptions()) : null;
if (placementGroupName != null)
instanceOptions.inPlacementGroup(placementGroupName);
if (AWSEC2TemplateOptions.class.cast(template.getOptions()).isMonitoringEnabled())
instanceOptions.enableMonitoring();
return instanceOptions;
}
@VisibleForTesting
String createNewPlacementGroupUnlessUserSpecifiedOtherwise(String region, String group, TemplateOptions options) {
String placementGroupName = null;
boolean shouldAutomaticallyCreatePlacementGroup = true;
if (options instanceof EC2TemplateOptions) {
placementGroupName = AWSEC2TemplateOptions.class.cast(options).getPlacementGroup();
if (placementGroupName == null)
shouldAutomaticallyCreatePlacementGroup = AWSEC2TemplateOptions.class.cast(options)
.shouldAutomaticallyCreatePlacementGroup();
}
if (placementGroupName == null && shouldAutomaticallyCreatePlacementGroup) {
// placementGroupName must be unique within an account per
// http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?using_cluster_computing.html
placementGroupName = String.format("jclouds#%s#%s", group, region);
RegionAndName regionAndName = new RegionAndName(region, placementGroupName);
// make this entry as needed
placementGroupMap.getUnchecked(regionAndName);
}
return placementGroupName;
}
@Override
public String createNewKeyPairUnlessUserSpecifiedOtherwise(String region, String group, TemplateOptions options) {
RegionAndName key = new RegionAndName(region, group);
KeyPair pair;
if (and(hasPublicKeyMaterial, or(doesntNeedSshAfterImportingPublicKey, hasLoginCredential)).apply(options)) {
pair = importExistingKeyPair.apply(new RegionNameAndPublicKeyMaterial(region, group, options.getPublicKey()));
options.dontAuthorizePublicKey();
if (hasLoginCredential.apply(options))
pair = pair.toBuilder().keyMaterial(options.getLoginPrivateKey()).build();
credentialsMap.put(key, pair);
} else {
if (hasPublicKeyMaterial.apply(options)) {
logger.warn("to avoid creating temporary keys in aws-ec2, use templateOption overrideLoginCredentialWith(id_rsa)");
}
return super.createNewKeyPairUnlessUserSpecifiedOtherwise(region, group, options);
}
return pair.getKeyName();
}
public static final Predicate<TemplateOptions> hasPublicKeyMaterial = new Predicate<TemplateOptions>() {
@Override
public boolean apply(TemplateOptions options) {
return options.getPublicKey() != null;
}
};
public static final Predicate<TemplateOptions> doesntNeedSshAfterImportingPublicKey = new Predicate<TemplateOptions>() {
@Override
public boolean apply(TemplateOptions options) {
return (options.getRunScript() == null && options.getPrivateKey() == null);
}
};
public static final Predicate<TemplateOptions> hasLoginCredential = new Predicate<TemplateOptions>() {
@Override
public boolean apply(TemplateOptions options) {
return options.getLoginPrivateKey() != null;
}
};
@Override
protected boolean userSpecifiedTheirOwnGroups(TemplateOptions options) {
return options instanceof AWSEC2TemplateOptions
&& AWSEC2TemplateOptions.class.cast(options).getGroupIds().size() > 0
|| super.userSpecifiedTheirOwnGroups(options);
}
@Override
protected void addSecurityGroups(String region, String group, Template template, RunInstancesOptions instanceOptions) {
AWSEC2TemplateOptions awsTemplateOptions = AWSEC2TemplateOptions.class.cast(template.getOptions());
AWSRunInstancesOptions awsInstanceOptions = AWSRunInstancesOptions.class.cast(instanceOptions);
if (awsTemplateOptions.getGroupIds().size() > 0)
awsInstanceOptions.withSecurityGroupIds(awsTemplateOptions.getGroupIds());
String subnetId = awsTemplateOptions.getSubnetId();
if (subnetId != null) {
AWSRunInstancesOptions.class.cast(instanceOptions).withSubnetId(subnetId);
} else {
super.addSecurityGroups(region, group, template, instanceOptions);
}
}
} | [
"tharindua@wso2.com"
] | tharindua@wso2.com |
bd77494da0bd18b3472a733a45ce92962266130c | 9de6a98cdaed1a6577165999c0696e96baeaecc6 | /legend-pure-runtime-java-engine-interpreted/src/main/java/org/finos/legend/pure/runtime/java/interpreted/natives/core/math/LessThan.java | 942856a9dbb9d86fdb89321597f9f3fbdc8c748a | [
"Apache-2.0",
"CC0-1.0"
] | permissive | stephanof/legend-pure | 7cc4469ad2d926c15df8cb9f2150923907fb6887 | c75435f0a24a0fbc673297b1734a9921a0c7a40e | refs/heads/master | 2023-08-20T00:30:32.120001 | 2021-10-14T20:30:49 | 2021-10-14T20:30:49 | 314,235,221 | 0 | 0 | Apache-2.0 | 2021-06-28T09:47:53 | 2020-11-19T12:02:19 | Java | UTF-8 | Java | false | false | 978 | java | // Copyright 2020 Goldman Sachs
//
// 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.finos.legend.pure.runtime.java.interpreted.natives.core.math;
import org.finos.legend.pure.m4.ModelRepository;
public class LessThan extends NumericComparisonPredicate
{
public LessThan(ModelRepository repository)
{
super(repository);
}
@Override
protected boolean acceptComparison(int comparison)
{
return comparison < 0;
}
}
| [
"pierre.debelen@gs.com"
] | pierre.debelen@gs.com |
fbf25b3e36b75dc3bed9b0136798af6562bb35ea | ea5fc414e022b70c5c424271b3d665353983f7c3 | /app/src/main/java/com/survivingwithandroid/actionbartabnavigation/login/LoginView.java | 4d481bfbfb5e7115ccd96e018b0a73a21736be3f | [] | no_license | lipov91/gardener | ceb563e44fbca0d5044c96eaff797e4cd588d9c0 | e3106f3a6687c1e1b638ca848e0bb190dafefd1a | refs/heads/master | 2016-09-10T20:43:06.649536 | 2015-08-04T17:35:12 | 2015-08-04T17:35:12 | 40,195,465 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,434 | java | package com.survivingwithandroid.actionbartabnavigation.login;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.View;
import com.survivingwithandroid.actionbartabnavigation.MainActivity;
public class LoginView extends View {
private Context context;
private ScaleGestureDetector multiGestures;
private Matrix scale;
private Bitmap droid;
public LoginView(Context context, int iGraphicResourceId) {
super(context);
this.context = context;
scale = new Matrix();
GestureListener listener = new GestureListener(this);
multiGestures = new ScaleGestureDetector(context, listener);
droid = BitmapFactory
.decodeResource(getResources(), iGraphicResourceId);
}
public void onScale(float factor) {
scale.preScale(factor, factor);
invalidate();
}
@Override
protected void onDraw(Canvas canvas) {
Matrix transform = new Matrix(scale);
float width = droid.getWidth() / 2;
float height = droid.getHeight() / 2;
transform.postTranslate(-width, -height);
transform.postConcat(scale);
transform.postTranslate(width, height);
canvas.drawBitmap(droid, transform, null);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
boolean retVal = false;
retVal = multiGestures.onTouchEvent(event);
return retVal;
}
private class GestureListener implements
ScaleGestureDetector.OnScaleGestureListener {
LoginView view;
public GestureListener(LoginView view) {
this.view = view;
}
@Override
public boolean onScale(ScaleGestureDetector detector) {
float scale = detector.getScaleFactor();
view.onScale(scale);
return true;
}
@Override
public boolean onScaleBegin(ScaleGestureDetector detector) {
return true;
}
@Override
public void onScaleEnd(ScaleGestureDetector detector) {
Intent intent = new Intent(context, MainActivity.class);
context.startActivity(intent);
}
}
}
| [
"krzysieklipka4@gmail.com"
] | krzysieklipka4@gmail.com |
31a09bf31aef1f8d53e90d51b7f105cbe4020ae9 | f13f5f654bb050767df7b8355cdbad052d95c08a | /app/src/main/java/com/youzheng/tongxiang/huntingjob/Model/entity/jianli/BaseJianliBean.java | 37fd0cf7214aeb65b17d8f933213a1cbf7b62296 | [] | no_license | yangyuqi/HuntingForJob | a2cf339846e1d5b26ae6dd1222e142033fd168e8 | 85db5e1321ef0dae3eba5ae884efd607984fc624 | refs/heads/master | 2021-05-03T07:08:27.361121 | 2018-04-02T09:33:52 | 2018-04-02T09:33:52 | 120,603,207 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,984 | java | package com.youzheng.tongxiang.huntingjob.Model.entity.jianli;
import java.io.Serializable;
/**
* Created by qiuweiyu on 2018/2/12.
*/
public class BaseJianliBean implements Serializable{
private String username;
private String nickname ;
private int userType ;
private int authentication ;
private String photo ;
private String personal ;
private int gender ;
private String hidetype ;
private String birthdate ;
private String education ;
private String citysName ;
private String salary ;
private String citys ;
private int percent ;
private int uid ;
private int id ;
private String residence ;
private String email ;
private int wage ;
private String hopeCityName ;
private String truename ;
private String hope_city ;
private int satisfied ;
private int work_year ;
private String telephone ;
private String position ;
private String work_time ;
private String trade_id ;
private String tradeName ;
private String stateName ;
private String state ;
private String self_description ;
public String getSelf_description() {
return self_description;
}
public void setSelf_description(String self_description) {
this.self_description = self_description;
}
public String getStateName() {
return stateName;
}
public void setStateName(String stateName) {
this.stateName = stateName;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getTradeName() {
return tradeName;
}
public void setTradeName(String tradeName) {
this.tradeName = tradeName;
}
public String getTrade_id() {
return trade_id;
}
public void setTrade_id(String trade_id) {
this.trade_id = trade_id;
}
public int getGender() {
return gender;
}
public void setGender(int gender) {
this.gender = gender;
}
public String getBirthdate() {
return birthdate;
}
public void setBirthdate(String birthdate) {
this.birthdate = birthdate;
}
public String getEducation() {
return education;
}
public void setEducation(String education) {
this.education = education;
}
public String getCitysName() {
return citysName;
}
public void setCitysName(String citysName) {
this.citysName = citysName;
}
public String getSalary() {
return salary;
}
public void setSalary(String salary) {
this.salary = salary;
}
public String getCitys() {
return citys;
}
public void setCitys(String citys) {
this.citys = citys;
}
public int getPercent() {
return percent;
}
public void setPercent(int percent) {
this.percent = percent;
}
public int getUid() {
return uid;
}
public void setUid(int uid) {
this.uid = uid;
}
public String getResidence() {
return residence;
}
public void setResidence(String residence) {
this.residence = residence;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public int getWage() {
return wage;
}
public void setWage(int wage) {
this.wage = wage;
}
public String getHopeCityName() {
return hopeCityName;
}
public void setHopeCityName(String hopeCityName) {
this.hopeCityName = hopeCityName;
}
public String getTruename() {
return truename;
}
public void setTruename(String truename) {
this.truename = truename;
}
public String getHope_city() {
return hope_city;
}
public void setHope_city(String hope_city) {
this.hope_city = hope_city;
}
public int getSatisfied() {
return satisfied;
}
public void setSatisfied(int satisfied) {
this.satisfied = satisfied;
}
public int getWork_year() {
return work_year;
}
public void setWork_year(int work_year) {
this.work_year = work_year;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getWork_time() {
return work_time;
}
public void setWork_time(String work_time) {
this.work_time = work_time;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public int getUserType() {
return userType;
}
public void setUserType(int userType) {
this.userType = userType;
}
public int getAuthentication() {
return authentication;
}
public void setAuthentication(int authentication) {
this.authentication = authentication;
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public String getPersonal() {
return personal;
}
public void setPersonal(String personal) {
this.personal = personal;
}
public String getHidetype() {
return hidetype;
}
public void setHidetype(String hidetype) {
this.hidetype = hidetype;
}
}
| [
"875337476@qq.com"
] | 875337476@qq.com |
e5e8288ee40d743145cd0fbbbba84dd67cfee67e | 918052a02e0ab3ad46d5df7f87516f30cbc7bebb | /struts2hibernate/src/main/java/com/demo/struts2/common/AuthorizationInterceptor.java | 0e16c6e83927dc32e6fc22ab18d695d7b3b0c6c3 | [] | no_license | eqinson2/java_learning | 660ff8baea6808dcedfafa2e853e0b8fe0938596 | f4dec895395167f24972a6297e82ee6c37d6918c | refs/heads/master | 2020-05-30T21:45:15.733931 | 2015-07-29T09:02:24 | 2015-07-29T09:02:24 | 39,777,511 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 793 | java | package com.demo.struts2.common;
import java.util.Map;
import com.demo.struts2.util.Constants;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
public class AuthorizationInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = 2575538469018873724L;
public String intercept(ActionInvocation invocation) throws Exception {
Map<String, Object> session = invocation.getInvocationContext().getSession();
String username = (String) session.get(Constants.USERNAME_KEY);
if (null != username && !username.equals("")) {
return invocation.invoke();
} else {
System.out.println("AuthorizationInterceptor.intercept");
return Action.LOGIN;
}
}
}
| [
"qingwei.song@ericsson.com"
] | qingwei.song@ericsson.com |
4f3ac3617578762049f439fb9af6acd1cf13d5ce | a09406a16db71909b2ff2f18b75f43a9a865cbc1 | /com/src/main/java/com/DataDriven/Test/DataProviderDemo.java | 00576e08b1df208560f2e89ad069ae4efd3495e0 | [] | no_license | siva23492/TestProject | f088d2ee66d9bd1aeb9b2691dd38e37e8d987539 | 3a322189d655721113942cfce1503a008eb299c0 | refs/heads/master | 2020-03-27T11:06:38.213625 | 2018-10-12T10:40:22 | 2018-10-12T10:40:22 | 146,465,704 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,286 | java | package com.DataDriven.Test;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import com.test.utility.TestUtil;
public class DataProviderDemo {
WebDriver driver;
@BeforeMethod
public void setUP() {
System.setProperty("webdriver.chrome.driver", "C:\\Selenium\\chromedriver.exe");
driver = new ChromeDriver();
driver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.manage().deleteAllCookies();
driver.manage().window().maximize();
driver.get("http://demo.automationtesting.in/Register.html#");
}
@DataProvider
public Iterator<Object> getTestData() {
ArrayList<Object>testData=TestUtil.getExcelData();
return testData.iterator();
}
@Test(dataProvider="getTestData")
public void readDataFoRegistration(String firstName,String lastName,String address,String email,String phone) {
driver.findElement(By.xpath("//input[@type='text' and @placeholder='First Name']")).clear();
driver.findElement(By.xpath("//input[@type='text' and @placeholder='First Name']")).sendKeys(firstName);
driver.findElement(By.xpath("//input[@type='text' and @placeholder='Last Name']")).clear();
driver.findElement(By.xpath("//input[@type='text' and @placeholder='Last Name']")).sendKeys(lastName);
driver.findElement(By.xpath("//textarea[contains(@ng-model,'Adress')]")).clear();
driver.findElement(By.xpath("//textarea[contains(@ng-model,'Adress')]")).sendKeys(address);
driver.findElement(By.xpath("//input[contains(@type,'email')]")).clear();
driver.findElement(By.xpath("//input[contains(@type,'email')]")).sendKeys(email);
driver.findElement(By.xpath("//input[contains(@type,'tel')]")).clear();
driver.findElement(By.xpath("//input[contains(@type,'tel')]")).sendKeys(phone);
}
@AfterMethod
public void tearDown() {
driver.close();
}
}
| [
"LILT-71@192.168.100.8"
] | LILT-71@192.168.100.8 |
5151861498dd5962492351573dac820375d8ed2e | 47a1b286d852e9013dbb0b566f6f838f69aa7a7a | /src/engine/colliders/Collidable.java | e5d4e94686df31066dc7dc9170ff294daa5ed395 | [] | no_license | Aycion/Untitled-Boat-Game | 9b393d4ff5cdc0ec03a451d5b167154bbd04b96a | 02f3e8c90d23b5ee05466a56a3f7f9129eed53df | refs/heads/master | 2020-09-24T13:41:12.830266 | 2020-01-08T00:52:52 | 2020-01-08T00:52:52 | 225,770,875 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 87 | java | package engine.colliders;
public interface Collidable {
Collider getCollider();
}
| [
"emery390@gmail.com"
] | emery390@gmail.com |
b861710a388ce4dabd9ad691d12b5434a8a1654d | d590201b89a9f9fa761fa4be6ff7e38d5580963d | /android.studio.todolist-master/app/src/main/java/dao/UsuarioDAO.java | dc6d57aa586260256f27669d2f1678218c75ddf1 | [] | no_license | joelcn/test | 95037942a6ca44378e9b3fd572c01b46b4c54688 | eafdd89a46b7dd8b94fa973667504e156e2ae229 | refs/heads/master | 2020-06-15T15:33:42.401533 | 2016-12-01T13:22:50 | 2016-12-01T13:22:50 | 75,282,680 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,346 | java | package dao;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import java.util.ArrayList;
import java.util.List;
import model.Usuario;
public class UsuarioDAO {
private DatabaseHelper databaseHelper;
private SQLiteDatabase database;
public UsuarioDAO(Context context){
databaseHelper = new DatabaseHelper(context);
}
private SQLiteDatabase getDatabase(){
if (database == null){
database = databaseHelper.getWritableDatabase();
}
return database;
}
private Usuario criarUsuario(Cursor cursor){
Usuario model = new Usuario(
cursor.getInt(cursor.getColumnIndex(DatabaseHelper.Usuarios._ID)),
cursor.getString(cursor.getColumnIndex(DatabaseHelper.Usuarios.NOME)),
cursor.getString(cursor.getColumnIndex(DatabaseHelper.Usuarios.LOGIN)),
cursor.getString(cursor.getColumnIndex(DatabaseHelper.Usuarios.SENHA)),
cursor.getString(cursor.getColumnIndex(DatabaseHelper.Usuarios.CREATED_AT))
);
return model;
}
public List<Usuario> listarUsuarios(){
Cursor cursor = getDatabase().query(DatabaseHelper.Usuarios.TABELA,
DatabaseHelper.Usuarios.COLUNAS, null, null, null, null, null);
List<Usuario> usuarios = new ArrayList<Usuario>();
while(cursor.moveToNext()){
Usuario model = criarUsuario(cursor);
usuarios.add(model);
}
cursor.close();
return usuarios;
}
public long salvarUsuario(Usuario usuario){
ContentValues valores = new ContentValues();
valores.put(DatabaseHelper.Usuarios.NOME, usuario.getNome());
valores.put(DatabaseHelper.Usuarios.LOGIN, usuario.getLogin());
valores.put(DatabaseHelper.Usuarios.SENHA, usuario.getSenha());
valores.put(DatabaseHelper.Usuarios.CREATED_AT, usuario.getCreated_at());
if(usuario.get_id() != null){
return getDatabase().update(DatabaseHelper.Usuarios.TABELA, valores,
"_id = ?", new String[]{ usuario.get_id().toString() });
}
return getDatabase().insert(DatabaseHelper.Usuarios.TABELA, null, valores);
}
public boolean removerUsuario(int id){
return getDatabase().delete(DatabaseHelper.Usuarios.TABELA,
"_id = ?", new String[]{ Integer.toString(id) }) > 0;
}
public Usuario buscarUsuarioPorId(int id){
Cursor cursor = getDatabase().query(DatabaseHelper.Usuarios.TABELA,
DatabaseHelper.Usuarios.COLUNAS, "_id = ?", new String[]{ Integer.toString(id) }, null, null, null);
if(cursor.moveToNext()){
Usuario model = criarUsuario(cursor);
cursor.close();
return model;
}
return null;
}
public boolean logar(String usuario, String senha){
Cursor cursor = getDatabase().query(DatabaseHelper.Usuarios.TABELA,
null, "LOGIN = ? AND SENHA = ?", new String[]{usuario, senha}, null,null,null);
if(cursor.moveToFirst()){
return true;
}
return false;
}
public void fechar(){
databaseHelper.close();
database = null;
}
}
| [
"joeltw2010@hotmail.com"
] | joeltw2010@hotmail.com |
3158965790294b769970be5d61cb5bd2447dea1e | b54183ac0d3698d5d46a8f59a1d2b5d378135729 | /src/main/java/com/pinkpig/mybatis/generator/xmlmapper/elements/SelectByExamplePageWithBLOBsElementGenerator.java | 4829d58a196db5510f8ffdb3300df267c0e7d404 | [] | no_license | fengsheng990/mybatis-generator-pinkpig | e10786a9937707764ab4423f31c8981583557eba | c688f90fa5a86b572418671b08ebe35bfdba10c6 | refs/heads/master | 2020-04-20T19:47:06.431340 | 2019-02-20T15:21:22 | 2019-02-20T15:21:22 | 169,058,739 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,632 | java | /**
* Copyright 2006-2016 the original author or authors.
*
* 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 com.pinkpig.mybatis.generator.xmlmapper.elements;
import com.pinkpig.mybatis.generator.plugins.ReplaceExamplePlugin;
import com.pinkpig.mybatis.generator.plugins.utils.FormatTools;
import org.mybatis.generator.api.dom.xml.Attribute;
import org.mybatis.generator.api.dom.xml.TextElement;
import org.mybatis.generator.api.dom.xml.XmlElement;
import org.mybatis.generator.codegen.mybatis3.xmlmapper.elements.AbstractXmlElementGenerator;
import static org.mybatis.generator.internal.util.StringUtility.stringHasValue;
public class SelectByExamplePageWithBLOBsElementGenerator extends
AbstractXmlElementGenerator {
public SelectByExamplePageWithBLOBsElementGenerator() {
super();
}
@Override
public void addElements(XmlElement parentElement) {
String fqjt = introspectedTable.getExampleType();
XmlElement answer = new XmlElement("select"); //$NON-NLS-1$
answer.addAttribute(new Attribute("id", //$NON-NLS-1$
introspectedTable.getSelectByExampleWithBLOBsStatementId()+"WithPage"));
answer.addAttribute(new Attribute(
"resultMap", introspectedTable.getBaseResultMapId())); //$NON-NLS-1$
answer.addAttribute(new Attribute("parameterType", fqjt)); //$NON-NLS-1$
context.getCommentGenerator().addComment(answer);
answer.addElement(new TextElement("select")); //$NON-NLS-1$
XmlElement ifElement = new XmlElement("if"); //$NON-NLS-1$
ifElement.addAttribute(new Attribute("test", "distinct")); //$NON-NLS-1$ //$NON-NLS-2$
ifElement.addElement(new TextElement("distinct")); //$NON-NLS-1$
answer.addElement(ifElement);
StringBuilder sb = new StringBuilder();
if (stringHasValue(introspectedTable
.getSelectByExampleQueryId())) {
sb.append('\'');
sb.append(introspectedTable.getSelectByExampleQueryId());
sb.append("' as QUERYID,"); //$NON-NLS-1$
answer.addElement(new TextElement(sb.toString()));
}
answer.addElement(getBaseColumnListElement());
answer.addElement(new TextElement(",")); //$NON-NLS-1$
answer.addElement(getBlobColumnListElement());
sb.setLength(0);
sb.append("from "); //$NON-NLS-1$
sb.append(introspectedTable
.getAliasedFullyQualifiedTableNameAtRuntime());
answer.addElement(new TextElement(sb.toString()));
answer.addElement(getUpdateByExampleIncludeElement());
ifElement = new XmlElement("if"); //$NON-NLS-1$
ifElement.addAttribute(new Attribute("test",
ReplaceExamplePlugin.getParamterName()+"."+"orderByClause != null")); //$NON-NLS-1$ //$NON-NLS-2$
ifElement.addElement(new TextElement("order by ${"+ReplaceExamplePlugin.getParamterName()+"."+"orderByClause}")); //$NON-NLS-1$
answer.addElement(ifElement);
FormatTools.addElementWithBestPosition(parentElement, answer);
}
}
| [
"463884217@qq.com"
] | 463884217@qq.com |
faa0e27dad45ba41bb947cfb09a6fcfc5c5775af | 17be2fe27bd5c56511d38c279bd1325e76e402f4 | /app/src/main/java/com/example/hangman/Art.java | cdf970962e8af7567786d0847eaa31cc71829b09 | [] | no_license | ifyousayso/labb-4 | 29e2e676c15fa65e32bbad11e8159a42aa3eeb9f | 4398964adbc3ff04202b6064db2c8c7c50931dc8 | refs/heads/main | 2023-08-29T04:18:47.154732 | 2021-11-15T12:52:36 | 2021-11-15T12:52:36 | 428,042,155 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,450 | java | package com.example.hangman;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.ImageView;
import androidx.annotation.Nullable;
public class Art extends ImageView {
private int state = 0;
private int width;
private int height;
private Paint paint = new Paint();
private Path path = new Path();
// Purpose: Constructor!
// Arguments: Context context
public Art(Context context) {
super(context);
this.init();
}
// Purpose: Constructor!
// Arguments: Context context, @Nullable AttributeSet attrs
public Art(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
this.init();
}
// Purpose: Constructor!
// Arguments: Context context, @Nullable AttributeSet attrs, int defStyleAttr
public Art(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
this.init();
}
private void init() {
this.paint.setAntiAlias(true);
this.paint.setColor(0xff000000); // Black
this.paint.setStyle(Paint.Style.STROKE);
this.paint.setStrokeCap(Paint.Cap.BUTT);
this.paint.setStrokeJoin(Paint.Join.ROUND);
}
// Purpose: When the size of Art changes (at start), set its height and the stroke width.
// Arguments: int width, int height, int oldWidth, int oldHeight
// Return: -
@Override
protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight) {
super.onSizeChanged(width, height, oldWidth, oldHeight);
this.width = width;
this.height = this.width;
this.getLayoutParams().height = this.height;
this.paint.setStrokeWidth(this.width / 128.0f);
}
private float pW(float amount) {
return amount * 0.01f * this.width;
}
private float pH(float amount) {
return amount * 0.01f * this.height;
}
private void addGallows() {
this.path.moveTo(this.pW(90.0f), this.pH(90.0f));
this.path.lineTo(this.pW(10.0f), this.pH(90.0f));
this.path.moveTo(this.pW(20.0f), this.pH(90.0f));
this.path.lineTo(this.pW(20.0f), this.pH(10.0f));
this.path.lineTo(this.pW(50.0f), this.pH(10.0f));
}
private void addHead() {
this.path.addArc(this.pW(64.0f), this.pH(25.0f), this.pW(76.0f), this.pH(37.0f), 0.0f, 360.0f);
this.path.moveTo(this.pW(66.75f), this.pH(28.5f));
this.path.lineTo(this.pW(69.0f), this.pH(30.5f));
this.path.moveTo(this.pW(66.75f), this.pH(30.5f));
this.path.lineTo(this.pW(69.0f), this.pH(28.5f));
this.path.moveTo(this.pW(71.0f), this.pH(28.5f));
this.path.lineTo(this.pW(73.25f), this.pH(30.5f));
this.path.moveTo(this.pW(71.0f), this.pH(30.5f));
this.path.lineTo(this.pW(73.25f), this.pH(28.5f));
this.path.moveTo(this.pW(67.75f), this.pH(33.5f));
this.path.lineTo(this.pW(72.25f), this.pH(33.5f));
}
private void addTorso() {
this.path.moveTo(this.pW(70.0f), this.pH(37.0f));
this.path.lineTo(this.pW(70.0f), this.pH(58.0f));
}
private void addRightLeg() {
this.path.moveTo(this.pW(60.0f), this.pH(73.0f));
this.path.lineTo(this.pW(70.0f), this.pH(58.0f));
}
private void addLeftLeg() {
this.path.moveTo(this.pW(80.0f), this.pH(73.0f));
this.path.lineTo(this.pW(70.0f), this.pH(58.0f));
}
private void addRightArm() {
this.path.moveTo(this.pW(60.0f), this.pH(55.0f));
this.path.lineTo(this.pW(70.0f), this.pH(40.0f));
}
private void addLeftArm() {
this.path.moveTo(this.pW(80.0f), this.pH(55.0f));
this.path.lineTo(this.pW(70.0f), this.pH(40.0f));
}
private void addNoose() {
this.path.moveTo(this.pW(50.0f), this.pH(10.0f));
this.path.lineTo(this.pW(70.0f), this.pH(10.0f));
this.path.lineTo(this.pW(70.0f), this.pH(25.0f));
}
// Purpose: Progress the state of the drawing by adding another part.
// Arguments: -
// Return: -
public void progress() {
switch (this.state) {
case 0:
this.addGallows(); break;
case 1:
this.addHead(); break;
case 2:
this.addTorso(); break;
case 3:
this.addRightLeg(); break;
case 4:
this.addLeftLeg(); break;
case 5:
this.addRightArm(); break;
case 6:
this.addLeftArm(); break;
case 7:
this.addNoose(); break;
default:
return;
}
this.state++;
this.invalidate();
}
// Purpose: Draw the hanged man progress.
// Arguments: Canvas canvas
// Return: -
@Override
protected void onDraw(Canvas canvas) {
canvas.drawARGB(0xff, 0xff, 0xff, 0xff);
canvas.drawPath(this.path, this.paint);
}
}
| [
"gplay@foshin.com"
] | gplay@foshin.com |
dff766efb5c6b0587ba589147e9a664c3834d660 | 6f26a9a792d5b262b68879e0b1328d5b2f755a8a | /lumhat-repository/src/main/java/com/kshrd/repository/classroomRepository/ClassroomHistoryRepository.java | eee2a722407b16fd7162219fb9d4fbb861b2ac2e | [] | no_license | visatch/KSHRD_Springboot_LUMHAT-Project | ee9b0f122fd354331a04fbf642a6ea75829ca79f | 9badee579d28db6dddfb19cc8a18203858662ae5 | refs/heads/master | 2022-12-22T20:44:09.598442 | 2020-02-20T20:44:34 | 2020-02-20T20:44:34 | 241,982,904 | 0 | 0 | null | 2022-12-16T00:43:15 | 2020-02-20T20:28:04 | JavaScript | UTF-8 | Java | false | false | 1,511 | java | package com.kshrd.repository.classroomRepository;
import com.kshrd.model.classroom.ClassroomHistoryTeacher;
import com.kshrd.model.classroom.History;
import com.kshrd.model.classroom.QuizRecord;
import com.kshrd.repository.classroomRepository.provider.ClassroomQuestionProvider;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List;
@Repository
public interface ClassroomHistoryRepository {
@Select("select * from get_topic_by_class_id(#{classId});")
@Results({
@Result(property = "topic.id", column = "id"),
@Result(property = "topic.topic", column = "topic")
})
List<History> findHistoryByClass(Integer classId);
@SelectProvider(method = "findQuizByTopic", type = ClassroomQuestionProvider.class)
@Results({
@Result(property = "id", column = "qr_id"),
@Result(property = "quiz.id", column = "q_id"),
@Result(property = "quiz.title", column = "title"),
@Result(property = "date", column = "created_date"),
@Result(property = "score", column = "score"),
@Result(property = "duration", column = "duration"),
@Result(property = "fullScore", column = "fullscore"),
@Result(property = "status", column = "status")
})
List<QuizRecord> findQuizByTopic(Integer topicId, Integer userId, Integer classId);
@Select("select * from get_active_quiz()")
Object getActive();
}
| [
"ahvisa1@gmail.com"
] | ahvisa1@gmail.com |
eb21ad2fd736ae7ad3d3e9e9373035e517c14d6f | 34dec29c916f0ee813da53ec56b54b5c1b8f1fbb | /src/main/java/com/xiaobaidu/baseframe/common/utils/Threads.java | c1287e528bd1cb791f1aafe5a612127aa4ef7ed3 | [] | no_license | hefaji/GluttonCatMall | cdcb21249c3432842b6c42d7618495fed2e5d45b | 43c200d7c5c5c733853408475fe111d7aa21e6e5 | refs/heads/master | 2021-05-07T01:46:45.036334 | 2017-11-12T14:01:34 | 2017-11-12T14:01:34 | 110,436,080 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,311 | java | /**
* Copyright (c) 2005-2012 springside.org.cn
*/
package com.xiaobaidu.baseframe.common.utils;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
/**
* 线程相关工具类.
* @author calvin
* @version 2013-01-15
*/
public class Threads {
/**
* sleep等待,单位为毫秒,忽略InterruptedException.
*/
public static void sleep(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
// Ignore.
return;
}
}
/**
* sleep等待,忽略InterruptedException.
*/
public static void sleep(long duration, TimeUnit unit) {
try {
Thread.sleep(unit.toMillis(duration));
} catch (InterruptedException e) {
// Ignore.
return;
}
}
/**
* 按照ExecutorService JavaDoc示例代码编写的Graceful Shutdown方法.
* 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务.
* 如果超时, 则调用shutdownNow, 取消在workQueue中Pending的任务,并中断所有阻塞函数.
* 如果仍人超時,則強制退出.
* 另对在shutdown时线程本身被调用中断做了处理.
*/
public static void gracefulShutdown(ExecutorService pool, int shutdownTimeout, int shutdownNowTimeout,
TimeUnit timeUnit) {
pool.shutdown(); // Disable new tasks from being submitted
try {
// Wait a while for existing tasks to terminate
if (!pool.awaitTermination(shutdownTimeout, timeUnit)) {
pool.shutdownNow(); // Cancel currently executing tasks
// Wait a while for tasks to respond to being cancelled
if (!pool.awaitTermination(shutdownNowTimeout, timeUnit)) {
System.err.println("Pool did not terminated");
}
}
} catch (InterruptedException ie) {
// (Re-)Cancel if current thread also interrupted
pool.shutdownNow();
// Preserve interrupt status
Thread.currentThread().interrupt();
}
}
/**
* 直接调用shutdownNow的方法, 有timeout控制.取消在workQueue中Pending的任务,并中断所有阻塞函数.
*/
public static void normalShutdown(ExecutorService pool, int timeout, TimeUnit timeUnit) {
try {
pool.shutdownNow();
if (!pool.awaitTermination(timeout, timeUnit)) {
System.err.println("Pool did not terminated");
}
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
}
}
}
| [
"hefj@fabao.cn"
] | hefj@fabao.cn |
a4d4e1dc5f1a71c7e8f05c01541506c0c0cf8d5c | 37f3694788c5d4895a4a2c1ed59e8369a93728eb | /src/main/java/io/slc/jsm/slc_instruction_set/Mnemonic.java | 965b6bb9a30deee966d265b0e766eae5a061ef28 | [] | no_license | michelezamuner/jsm | 0fa1054f418ff9dd0b0e0fb497a6b701185f080f | 783d9e0275516c29afb36ab1cf3d089ee351357a | refs/heads/master | 2023-01-18T19:11:20.581829 | 2020-11-30T07:39:40 | 2020-11-30T07:39:40 | 295,228,546 | 0 | 0 | null | 2020-11-30T07:39:41 | 2020-09-13T20:05:37 | Java | UTF-8 | Java | false | false | 272 | java | package io.slc.jsm.slc_instruction_set;
import io.slc.jsm.slc_instruction_set.instructions.syscall.Type;
public class Mnemonic {
public static final int MOVI = 0x01;
public static final int SYSCALL = 0xf0;
public static final int SYSCALL_EXIT = Type.EXIT;
}
| [
"michelezamuner@gmail.com"
] | michelezamuner@gmail.com |
4ca789838982c671c4a250463b31a273f29ee62f | 353f65e4e518374cae8a3ddf56f0b1f616b13dc3 | /src/main/java/com/krishk/arplatform/MyResource.java | 0355619f4df31902c5a1902888d38ab8bd9bed6c | [] | no_license | krishkalai07/ar-platform-webappbeta | 29ea8be2a798b82d916de6bb4652574ca7cde487 | 1635b4a850f0aaa900fac5e67a36ea84a537f3e8 | refs/heads/master | 2021-07-22T12:37:43.773377 | 2017-11-01T05:19:53 | 2017-11-01T05:19:53 | 109,197,461 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,857 | java | package com.krishk.arplatform;
import javax.inject.Singleton;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.*;
/**
* Root resource (exposed at "vq" path)
*/
@SuppressWarnings("ALL")
@Path("v1")
@Singleton
public class MyResource {
private ARTree arTree;
/**
* This constructor will be called only once, since this is a Singleton class.
* The constructor will initialize the structures.
*/
public MyResource() {
arTree = new ARTree();
}
/**
* Method handling HTTP GET requests. The returned object will be sent
* to the client as "MediaType.Application_Json" media type.
*
* @return Response of 200 if there is valid coordinates and ID.
*/
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("locate/{id}")
public Response getLocate(@Context UriInfo uriInfo, @PathParam("id") String id) {
//System.out.println("ID: " + id);
//System.out.println(arTree);
//System.out.println("ID: " + id);
MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
String latitude = queryParams.getFirst("lati");
String longitude = queryParams.getFirst("long");
String elevation = queryParams.getFirst("elev");
System.out.println("lat: " + latitude + " lon: " + longitude + " elev: " + elevation);
GeoPoint point = new GeoPoint(latitude, longitude);
//System.out.println("getLocate point " + point);
arTree.locatePoint(id, point, Double.parseDouble(elevation));
return Response.status(200).entity(arTree.getLocateList().toString()).build();
}
/**
* Method handling HTTP GET request. This function refreshes the user's e-tag and structres list per request if a change is needed.
*
* @param uriInfo Allows to get the query parameter from the URL.
* @return If a change is needed, then a response of 200 with the new etag and structuresData. If not, then 200 with "Not Modified.
*/
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("structures")
public Response getStructures(@Context UriInfo uriInfo) {
MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
String etag = queryParams.getFirst("etag");
// If the etags are equal, then no change is necessary, response = 304
// becuase there is no change to the data
if (etag.equals(arTree.getStructuresETag())) {
return Response.status(200).entity("Not Modified").build();
}
else {
return Response.status(200).header("ETag", arTree.getStructuresETag()).entity(arTree.getStructuresList().toString()).build();
}
}
}
//id=md5(node.name)
//E-tag = md5(concatenate(root.childrenID)) | [
"krishkalai07@gmail.com"
] | krishkalai07@gmail.com |
ccdde970a7ffe20c741ab17e89dea6460a073090 | 2a4da57d124361b0934067f94e028611006e82bb | /dynamo-core/src/main/java/dynamo/providers/magazines/EBookW.java | 1382f35ba48d97df263e69df2df4d365dd2882fb | [
"Apache-2.0"
] | permissive | epew/dynamo | e47f736a22a4992d3f9e9ae25ddfbc12383b5c17 | b7e6b314a03081be1156a66d5191ee124ca63001 | refs/heads/master | 2021-01-11T18:19:52.422976 | 2015-10-20T11:20:59 | 2015-10-20T11:20:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,386 | java | package dynamo.providers.magazines;
import java.io.IOException;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import core.WebDocument;
import dynamo.magazines.KioskIssuesSuggester;
import dynamo.magazines.KioskIssuesSuggesterException;
import dynamo.magazines.MagazineManager;
import dynamo.model.DownloadSuggestion;
import hclient.HTTPClient;
public class EBookW implements KioskIssuesSuggester {
private final static int MAX_PAGES = 10;
@Override
public void suggestIssues() throws KioskIssuesSuggesterException {
for (int i=1; i<=MAX_PAGES; i++) {
String url = String.format("http://ebookw.com/magazines/page/%d", i);
WebDocument document;
try {
document = HTTPClient.getInstance().getDocument( url, HTTPClient.REFRESH_ONE_HOUR );
} catch (IOException e) {
throw new KioskIssuesSuggesterException( e );
}
Elements titles = document.jsoup("#dle-content .title");
for (Element element : titles) {
String title = element.select("a").first().text();
Element shortNews = element.nextElementSibling().nextElementSibling();
String coverImage = shortNews.select("img").first().absUrl("src");
MagazineManager.getInstance().suggest( new DownloadSuggestion(title, coverImage, url, null, null, -1.0f, toString(), null, false));
}
}
}
@Override
public String toString() {
return "EBookW.com";
}
}
| [
"guillaume.serre@gmail.com"
] | guillaume.serre@gmail.com |
2972953d6d99b1f6a5749389ac2fde2a8a2cd28c | 33d6dbd4f6f6db7302ec2d16b172327b04c73f3e | /app/src/main/java/com/laioffer/eventreporter/CommentAdapter.java | 3fc69fba7e7613ec4b223b6d16119a430741d19f | [] | no_license | Fan4530/WeLook | c5f91fb3b1122f3ce163bf346a7ba73cb6dc190f | edd185d0293c5136b7e731ca9403ce03483b9289 | refs/heads/master | 2021-01-19T20:08:01.062358 | 2017-09-21T20:29:42 | 2017-09-21T20:29:42 | 101,221,776 | 6 | 1 | null | null | null | null | UTF-8 | Java | false | false | 8,736 | java | package com.laioffer.eventreporter;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.AsyncTask;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import java.util.ArrayList;
import java.util.List;
/**
* Created by program on 7/14/2017.
*/
public class CommentAdapter extends BaseAdapter {
private Context context;
private final static int TYPE_EVENT = 0;
private final static int TYPE_COMMENT = 1;
private final static int TYPE_MAX_COUNT = 2;
private List<Comment> commentList;
private Event event;
private DatabaseReference databaseReference;
private LayoutInflater inflater;
public CommentAdapter(Context context) {
this.context = context;
commentList = new ArrayList<>();
databaseReference = FirebaseDatabase.getInstance().getReference();
inflater = (LayoutInflater) context.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
}
public CommentAdapter(Context context, final Event event, List<Comment> commentList) {
this.context = context;
this.commentList = commentList;
this.event = event;
databaseReference = FirebaseDatabase.getInstance().getReference();
inflater = (LayoutInflater) context.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
}
public void setEvent(final Event event) {
this.event = event;
}
public void setComments(final List<Comment> comments) {
this.commentList = comments;
}
@Override
public int getItemViewType(int position) {
return position == 0 ? TYPE_EVENT: TYPE_COMMENT;
}
@Override
public int getViewTypeCount() {
return TYPE_MAX_COUNT;
}
@Override
public int getCount() {
return commentList.size() + 1;
}
@Override
public Comment getItem(int position) {
return commentList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
static class ViewHolder {
/* event items */
TextView event_username;
TextView event_location;
TextView event_description;
TextView event_time;
TextView event_title;
ImageView event_img;
ImageView event_img_view_like;
ImageView event_img_view_comment;
ImageView event_img_view_repost;
TextView event_like_number;
TextView event_comment_number;
TextView event_repost_number;
/* comment items */
TextView comment_user;
TextView comment_description;
TextView comment_time;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View rowView = convertView;
int type = getItemViewType(position);
if (rowView == null) {
ViewHolder viewHolder = new ViewHolder();
switch (type) {
case TYPE_EVENT:
rowView = inflater.inflate(R.layout.comment_main, parent, false);
viewHolder.event_username = (TextView)rowView.findViewById(R.id.comment_main_user);
viewHolder.event_location = (TextView)rowView.findViewById(R.id.comment_main_location);
viewHolder.event_description = (TextView)rowView.findViewById(R.id.comment_main_description);
viewHolder.event_time = (TextView)rowView.findViewById(R.id.comment_main_time);
viewHolder.event_img = (ImageView) rowView.findViewById(R.id.comment_main_image);
viewHolder.event_img_view_like = (ImageView) rowView.findViewById(R.id.comment_main_like_img);
viewHolder.event_img_view_comment = (ImageView) rowView.findViewById(R.id.comment_main_comment_img);
viewHolder.event_img_view_repost = (ImageView) rowView.findViewById(R.id.comment_main_repost_img);
viewHolder.event_like_number = (TextView) rowView.findViewById(R.id.comment_main_like_num);
viewHolder.event_comment_number = (TextView) rowView.findViewById(R.id.comment_main_comment_num);
viewHolder.event_repost_number = (TextView) rowView.findViewById(R.id.comment_main_repost_num);
viewHolder.event_title = (TextView) rowView.findViewById(R.id.comment_main_title);
break;
case TYPE_COMMENT:
rowView = inflater.inflate(R.layout.comment_item, parent, false);
viewHolder.comment_user = (TextView) rowView.findViewById(R.id.comment_item_user);
viewHolder.comment_description = (TextView)rowView.findViewById(R.id.comment_item_description);
viewHolder.comment_time = (TextView)rowView.findViewById(R.id.comment_item_time);
break;
}
rowView.setTag(viewHolder);
}
final ViewHolder holder = (ViewHolder) rowView.getTag();
if (type == TYPE_EVENT) {
String[] locations = event.getLocation().split(",");
try {
holder.event_location.setText(locations[1] + "," + locations[2]);
} catch (Exception ex) {
holder.event_location.setText("Wrong Location");
}
holder.event_description.setText(event.getDescription());
holder.event_username.setText(event.getUser());
holder.event_title.setText(event.getTitle());
holder.event_time.setText(Utilities.timeTransformer(event.getTime()));
if (!event.getImgUri().equals("")) {
final String url = event.getImgUri();
new AsyncTask<Void, Void, Bitmap>() {
@Override
protected void onPreExecute() {
holder.event_img.setImageBitmap(null);
holder.event_img.setVisibility(View.VISIBLE);
}
@Override
protected Bitmap doInBackground(Void... params) {
return Utilities.getBitmapFromURL(url);
}
@Override
protected void onPostExecute(Bitmap bitmap) {
holder.event_img.setImageBitmap(bitmap);
}
}.execute();
} else {
holder.event_img.setVisibility(View.GONE);
}
holder.event_like_number.setText(String.valueOf(event.getGood()));
holder.event_repost_number.setText(String.valueOf(event.getRepost()));
holder.event_comment_number.setText(String.valueOf(event.getCommentNumber()));
holder.event_img_view_like.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
databaseReference.child("events").addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
Event recordedevent = snapshot.getValue(Event.class);
if (recordedevent.getId().equals(event.getId())) {
int number = recordedevent.getGood();
holder.event_like_number.setText(String.valueOf(number + 1));
snapshot.getRef().child("good").setValue(number + 1);
break;
}
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
}
});
} else {
final Comment comment = commentList.get(position - 1);
holder.comment_user.setText(comment.getCommenter());
holder.comment_description.setText(comment.getDescription());
holder.comment_time.setText(Utilities.timeTransformer(comment.getTime()));
}
return rowView;
}
}
| [
"zhan978@usc.edu"
] | zhan978@usc.edu |
540a16e31bed8cbcf2b86c255a9ae1a0cdae12c1 | eafae636c22b5d95db19e5271d58796bd7be4a66 | /app-release-unsigned/sources/com/google/android/material/transition/platform/ScaleProvider.java | 99b5dc96d7cfff739d1abf31e2aa5530c687a7cc | [] | no_license | agustrinaldokurniawan/News_Kotlin_Native | 5fb97e9c9199c464e64a6ef901b133c88da3db55 | 411f2ae0c01f2cc490f9b80a6b8f40196bc74176 | refs/heads/main | 2023-05-31T20:59:44.356059 | 2021-06-15T14:43:42 | 2021-06-15T14:43:42 | 377,077,236 | 0 | 0 | null | 2021-06-15T07:44:11 | 2021-06-15T07:38:27 | null | UTF-8 | Java | false | false | 3,589 | java | package com.google.android.material.transition.platform;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.view.View;
import android.view.ViewGroup;
public final class ScaleProvider implements VisibilityAnimatorProvider {
private boolean growing;
private float incomingEndScale;
private float incomingStartScale;
private float outgoingEndScale;
private float outgoingStartScale;
private boolean scaleOnDisappear;
public ScaleProvider() {
this(true);
}
public ScaleProvider(boolean z) {
this.outgoingStartScale = 1.0f;
this.outgoingEndScale = 1.1f;
this.incomingStartScale = 0.8f;
this.incomingEndScale = 1.0f;
this.scaleOnDisappear = true;
this.growing = z;
}
public boolean isGrowing() {
return this.growing;
}
public void setGrowing(boolean z) {
this.growing = z;
}
public boolean isScaleOnDisappear() {
return this.scaleOnDisappear;
}
public void setScaleOnDisappear(boolean z) {
this.scaleOnDisappear = z;
}
public float getOutgoingStartScale() {
return this.outgoingStartScale;
}
public void setOutgoingStartScale(float f) {
this.outgoingStartScale = f;
}
public float getOutgoingEndScale() {
return this.outgoingEndScale;
}
public void setOutgoingEndScale(float f) {
this.outgoingEndScale = f;
}
public float getIncomingStartScale() {
return this.incomingStartScale;
}
public void setIncomingStartScale(float f) {
this.incomingStartScale = f;
}
public float getIncomingEndScale() {
return this.incomingEndScale;
}
public void setIncomingEndScale(float f) {
this.incomingEndScale = f;
}
@Override // com.google.android.material.transition.platform.VisibilityAnimatorProvider
public Animator createAppear(ViewGroup viewGroup, View view) {
if (this.growing) {
return createScaleAnimator(view, this.incomingStartScale, this.incomingEndScale);
}
return createScaleAnimator(view, this.outgoingEndScale, this.outgoingStartScale);
}
@Override // com.google.android.material.transition.platform.VisibilityAnimatorProvider
public Animator createDisappear(ViewGroup viewGroup, View view) {
if (!this.scaleOnDisappear) {
return null;
}
if (this.growing) {
return createScaleAnimator(view, this.outgoingStartScale, this.outgoingEndScale);
}
return createScaleAnimator(view, this.incomingEndScale, this.incomingStartScale);
}
private static Animator createScaleAnimator(final View view, float f, float f2) {
final float scaleX = view.getScaleX();
final float scaleY = view.getScaleY();
ObjectAnimator ofPropertyValuesHolder = ObjectAnimator.ofPropertyValuesHolder(view, PropertyValuesHolder.ofFloat(View.SCALE_X, scaleX * f, scaleX * f2), PropertyValuesHolder.ofFloat(View.SCALE_Y, f * scaleY, f2 * scaleY));
ofPropertyValuesHolder.addListener(new AnimatorListenerAdapter() {
/* class com.google.android.material.transition.platform.ScaleProvider.AnonymousClass1 */
public void onAnimationEnd(Animator animator) {
view.setScaleX(scaleX);
view.setScaleY(scaleY);
}
});
return ofPropertyValuesHolder;
}
}
| [
"agust.kurniawan@Agust-Rinaldo-Kurniawan.local"
] | agust.kurniawan@Agust-Rinaldo-Kurniawan.local |
f14885f6059c5a96cb88e15dec4808d61484da84 | 80810b3f881d757e1ba320c917e65012707723f0 | /src/com/gexin/artplatform/adapter/HomeListAdapter.java | 9aa260ffeb648d8b90ac40eb12cd166d40712418 | [] | no_license | xiaoxinla/ArtPlatform | ac77db3696ee0840cca8e0b34a53d3fb969125b3 | 68e58137bc38025af0750d9956f3abd791d81b65 | refs/heads/master | 2020-12-30T10:12:45.604683 | 2015-06-15T23:53:14 | 2015-06-15T23:53:14 | 34,679,496 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Java | false | false | 5,179 | java | package com.gexin.artplatform.adapter;
import java.util.ArrayList;
import java.util.List;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.MarginLayoutParams;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.TextView;
import com.gexin.artplatform.LargeImageActivity;
import com.gexin.artplatform.R;
import com.gexin.artplatform.RoomDetailActivity;
import com.gexin.artplatform.bean.Article;
import com.gexin.artplatform.utils.TimeUtil;
import com.gexin.artplatform.view.FlowLayout;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
public class HomeListAdapter extends BaseAdapter {
private List<Article> mList;
private Context mContext;
private DisplayImageOptions avatarOptions;
private DisplayImageOptions picOptions;
public HomeListAdapter(List<Article> mList, Context mContext) {
super();
this.mList = mList;
this.mContext = mContext;
avatarOptions = new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.ic_menu_home)
.showImageForEmptyUri(R.drawable.ic_menu_home)
.showImageOnFail(R.drawable.ic_error).cacheInMemory(true)
.cacheOnDisk(true).considerExifParams(true)
.bitmapConfig(Bitmap.Config.RGB_565).build();
picOptions = new DisplayImageOptions.Builder()
.showImageOnLoading(R.drawable.ic_stub)
.showImageOnFail(R.drawable.ic_error).cacheInMemory(true)
.cacheOnDisk(true).considerExifParams(true)
.bitmapConfig(Bitmap.Config.RGB_565).build();
}
@Override
public int getCount() {
return mList.size();
}
@Override
public Object getItem(int arg0) {
return mList.get(arg0);
}
@Override
public long getItemId(int arg0) {
return arg0;
}
@SuppressLint("InflateParams")
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
final Article article = mList.get(position);
if (convertView == null) {
holder = new ViewHolder();
convertView = LayoutInflater.from(mContext).inflate(
R.layout.home_list_item, null);
holder.tvClickNum = (TextView) convertView
.findViewById(R.id.tv_clicknum_home_item);
holder.tvContent = (TextView) convertView
.findViewById(R.id.tv_content_home_item);
holder.tvName = (TextView) convertView
.findViewById(R.id.tv_name_home_item);
holder.tvTime = (TextView) convertView
.findViewById(R.id.tv_time_home_item);
holder.tvTitle = (TextView) convertView
.findViewById(R.id.tv_title_home_item);
holder.flPics = (FlowLayout) convertView
.findViewById(R.id.fl_pics_home_item);
holder.ivHeader = (ImageView) convertView
.findViewById(R.id.iv_header_home_item);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.tvClickNum.setText("µã»÷" + article.getViewNum());
holder.tvContent.setText((article.getContent()));
holder.tvName.setText(article.getStudioName());
holder.tvTime.setText(TimeUtil.getDateString(article.getCreateTime()));
holder.tvTitle.setText(article.getTitle());
holder.ivHeader.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(mContext, RoomDetailActivity.class);
intent.putExtra("studioId", article.getStudioId());
mContext.startActivity(intent);
}
});
holder.tvName.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(mContext, RoomDetailActivity.class);
intent.putExtra("studioId", article.getStudioId());
mContext.startActivity(intent);
}
});
ImageLoader.getInstance().displayImage(article.getStudioAvatarUrl(),
holder.ivHeader, avatarOptions);
holder.flPics.removeAllViews();
int cnt = 0;
for (String url : article.getImages()) {
ImageView imageView = new ImageView(mContext);
// imageView.setMaxHeight(120);
// imageView.setMaxWidth(150);
// imageView.setAdjustViewBounds(true);
imageView.setScaleType(ScaleType.CENTER_CROP);
MarginLayoutParams lp = new MarginLayoutParams(
130, 130);
lp.setMargins(5, 5, 5, 5);
ImageLoader.getInstance().displayImage(url, imageView, picOptions);
holder.flPics.addView(imageView, lp);
final int index = cnt;
imageView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(mContext,
LargeImageActivity.class);
intent.putStringArrayListExtra("images",
(ArrayList<String>) article.getImages());
intent.putExtra("index", index);
mContext.startActivity(intent);
}
});
}
return convertView;
}
private static class ViewHolder {
TextView tvName;
TextView tvContent;
TextView tvClickNum;
TextView tvTime;
TextView tvTitle;
FlowLayout flPics;
ImageView ivHeader;
}
}
| [
"747393661@qq.com"
] | 747393661@qq.com |
19afda313967d20a1808e78afb61ab18aa926b18 | 306d10877e33b7b8bf9f1915c124a3ef8907b685 | /app/src/main/java/com/zayan/eshop/data/BackgroundOrderEngine.java | 4f60e0be8e09c453b02c2c0783f5b34abdfc65b8 | [] | no_license | Saim20/E-com-final | 2f8d2722d3d2783b4b9b379b2c17f1f96b6bb9e1 | f4efd664be3d183446f2eaf510efd10ee514e2bd | refs/heads/master | 2022-12-26T17:48:16.282611 | 2020-09-28T12:03:52 | 2020-09-28T12:03:52 | 298,809,327 | 2 | 0 | null | 2020-09-26T12:27:26 | 2020-09-26T12:27:25 | null | UTF-8 | Java | false | false | 3,931 | java | package com.zayan.eshop.data;
import android.annotation.SuppressLint;
import android.os.AsyncTask;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.zayan.eshop.Checkout;
import com.zayan.eshop.MainActivity;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
public class BackgroundOrderEngine extends AsyncTask<String, Void, String> {
@SuppressLint("StaticFieldLeak")
private ProgressBar orderProgress;
@SuppressLint("StaticFieldLeak")
private TextView placeholder;
public BackgroundOrderEngine(ProgressBar orderProgress, TextView placeholder) {
this.orderProgress = orderProgress;
this.placeholder = placeholder;
}
@Override
protected void onPreExecute() {
super.onPreExecute();
}
@Override
protected void onProgressUpdate(Void... values) {
super.onProgressUpdate(values);
}
@Override
protected String doInBackground(String... strings) {
String retrievedData = "";
String registerUrl = "https://zayansshop.000webhostapp.com/order.php";
URL url;
try {
url = new URL(registerUrl);
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
OutputStream outputStream = httpURLConnection.getOutputStream();
BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(outputStream, StandardCharsets.UTF_8));
String data = URLEncoder.encode("products", "UTF-8") + "=" + URLEncoder.encode(strings[0], "UTF-8") + "&" +
URLEncoder.encode("userid", "UTF-8") + "=" + URLEncoder.encode(strings[1], "UTF-8") + "&" +
URLEncoder.encode("total", "UTF-8") + "=" + URLEncoder.encode(strings[2], "UTF-8");
bufferedWriter.write(data);
bufferedWriter.flush();
bufferedWriter.close();
outputStream.close();
InputStream inputStream = httpURLConnection.getInputStream();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.ISO_8859_1));
String productDataReader;
while ((productDataReader = bufferedReader.readLine()) != null) {
//noinspection StringConcatenationInLoop
retrievedData += productDataReader;
}
bufferedReader.close();
inputStream.close();
httpURLConnection.disconnect();
} catch (IOException e) {
// e.printStackTrace();
return "server crash";
}
return retrievedData;
}
@Override
protected void onPostExecute(String s) {
if (s.equalsIgnoreCase("success")) {
orderProgress.setVisibility(View.INVISIBLE);
placeholder.setVisibility(View.VISIBLE);
placeholder.setText("Order Placed!");
Checkout.checkoutActivity.finish();
MainActivity.cartProducts.clear();
} else if (s.equalsIgnoreCase("server crash")) {
orderProgress.setVisibility(View.INVISIBLE);
placeholder.setVisibility(View.VISIBLE);
placeholder.setText("Please Check Network Connection!");
} else {
orderProgress.setVisibility(View.INVISIBLE);
placeholder.setVisibility(View.VISIBLE);
placeholder.setText("Unknown Error!");
}
super.onPostExecute(s);
}
}
| [
"saimulislam2002@gmail.com"
] | saimulislam2002@gmail.com |
28ed7bc599bd0731f0dfa5b54500e26b199b0ea5 | 4e6f45d5d9f0a997af922fec5c81da4540f9ea06 | /src/SWEA/D4/Solution_1223.java | bf8628e1742197954a1bb7c7b0d7388eac1121d7 | [] | no_license | Seoyoung2/Algorithm-Java | 19394b88027c3d27fa65fd51b5410b0895cca8bb | e3cb33b7175b4fc0acfc4d21751f5c229a3c4dc7 | refs/heads/master | 2023-04-14T07:49:17.272084 | 2021-04-26T00:25:57 | 2021-04-26T00:25:57 | 329,225,036 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,292 | java | package SWEA.D4;
import java.util.Scanner;
import java.util.Stack;
// 1223. [S/W 문제해결 기본] 6일차 - 계산기2
public class Solution_1223 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder sb;
Stack<Character> stk;
for (int t = 1; t <= 10; t++) {
int n = sc.nextInt();
String str = sc.next();
sb = new StringBuilder();
stk = new Stack<>();
char ch;
for (int i = 0; i < n; i++) {
ch = str.charAt(i);
switch (ch) {
case '*':
while(!stk.isEmpty() && stk.peek() == '*') sb.append(stk.pop());
stk.push(ch);
break;
case '+':
while(!stk.isEmpty()) sb.append(stk.pop());
stk.push(ch);
break;
default:
sb.append(ch);
break;
}
}
while(!stk.isEmpty()) sb.append(stk.pop());
Stack<Integer> nstk = new Stack<>();
int tmp;
for (int i = 0; i < n; i++) {
ch = sb.charAt(i);
switch (ch) {
case '*':
tmp = nstk.pop() * nstk.pop();
nstk.push(tmp);
break;
case '+':
tmp = nstk.pop() + nstk.pop();
nstk.push(tmp);
break;
default:
nstk.push(ch-'0');
break;
}
}
System.out.println("#"+t+" "+nstk.pop());
}
}
}
| [
"ww0111@naver.com"
] | ww0111@naver.com |
6a4f6774e892c959dfdd0d9cf41ff80a818bb7b2 | 8400336a23b70b623bd95d857a65fe0642580a2c | /MeshLib/test/mesh/creator/archimedian/RhombicosidodecahedronCreatorTest.java | 4f2f625da2a87e438ea83c8d419ad4223a0514b2 | [] | no_license | SimonAtelier/MeshLib | 9e36ccb3ddfec57ae1b9b147c297e568ba0a8a82 | 39c4ef085429e84383be7e39cb6ba5a0063eb3f3 | refs/heads/master | 2020-04-29T06:33:40.454398 | 2019-04-01T13:46:22 | 2019-04-01T13:46:22 | 175,920,190 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,719 | java | package mesh.creator.archimedian;
import java.util.Collection;
import org.junit.Assert;
import org.junit.Test;
import mesh.Edge3D;
import mesh.Mesh3D;
import mesh.creator.IMeshCreator;
import util.MeshTestUtil;
public class RhombicosidodecahedronCreatorTest {
RhombicosidodecahedronCreator creator = new RhombicosidodecahedronCreator();
Mesh3D mesh = creator.create();
@Test
public void creatorImplementsMeshCreatorInterface() {
Assert.assertTrue(creator instanceof IMeshCreator);
}
@Test
public void createdMeshHasSixtyTwoFaces() {
Assert.assertEquals(62, mesh.getFaceCount());
}
@Test
public void createdMeshHasOneHunderedAndTwentyEdges() {
Collection<Edge3D> edges = mesh.createEdges();
Assert.assertEquals(120, edges.size());
}
@Test
public void createdMeshHasSixtyVertices() {
Assert.assertEquals(60, mesh.getVertexCount());
}
@Test
public void createdMeshHasEdgesWithEqualLength() {
MeshTestUtil.allEdgesHaveEqualLength(mesh);
}
@Test
public void eachEdgeOfTheCreatedMeshIsIncidentToOnlyOneOrTwoFaces() {
MeshTestUtil.eachEdgeIsIncidentToOnlyOneOrTwoFaces(mesh);
}
@Test
public void createdMeshFulfillsEulersCharacteristic() {
MeshTestUtil.meshFulFillsEulersCharacteristic(mesh);
}
@Test
public void createdMeshHasTwentyTriangleFaces() {
Assert.assertEquals(20, mesh.getNumberOfFacesWithVertexCountOfN(3));
}
@Test
public void createdMeshHasThirtyQuadFaces() {
Assert.assertEquals(30, mesh.getNumberOfFacesWithVertexCountOfN(4));
}
@Test
public void createdMeshHasTwelvePentagonalFaces() {
Assert.assertEquals(12, mesh.getNumberOfFacesWithVertexCountOfN(5));
}
}
| [
"Simon@LAPTOP-NAT2JJES.Speedport_W_921V_1_45_000"
] | Simon@LAPTOP-NAT2JJES.Speedport_W_921V_1_45_000 |
9640b9e1869c7f8e9d8846d6a258cc3b681b0203 | 995ded830d59b1229082669c52beb381d4b3320c | /6.Lesson-JDBC/src/DBConnection/example1.java | 7c86e9172882ac61956b97ef51d2491914afbc5a | [] | no_license | EgeKuran/JavaProjects | d52074c14217ffc3f7458d88ee7645113fa82223 | ea4181b29c293fb485f970aff50675c20e33dbc6 | refs/heads/master | 2020-05-19T15:43:19.774134 | 2019-05-05T22:41:28 | 2019-05-05T22:41:28 | 185,090,561 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 783 | java | package DBConnection;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class example1 {
public static void main(String[] args) {
//open connection
//connection string
try (Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/addressbook?useSSL=false", "root", "123456");){
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM PERSON");
while(rs.next())
{
String name =rs.getString("name");
String lname =rs.getString("lastname");
System.out.println(name + " " + lname);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
| [
"46049738+EgeKuran@users.noreply.github.com"
] | 46049738+EgeKuran@users.noreply.github.com |
d9f1280b40f7ce960fff57591e7378746ee378c6 | 7cfd5d2bbd09066973ad7a3116a440f0ce412fab | /AutoMultiMedia/src/main/java/com/semisky/automultimedia/common/utils/ActivityManagerUtils.java | c190aa83a502663cd59d41d5832d108b99aae4d0 | [] | no_license | liuyong87/Jetour2019 | d4266de0b3dd5a4281920d1b84779f8c56c5ea34 | 37ee407af079b8ba009ab11936e3d2ddbfb07176 | refs/heads/master | 2020-05-07T12:39:10.195885 | 2019-04-10T11:15:19 | 2019-04-10T11:15:19 | 180,514,349 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,267 | java | package com.semisky.automultimedia.common.utils;
import java.util.List;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.content.ComponentName;
import android.content.Context;
import android.util.Log;
public class ActivityManagerUtils {
private static final String TAG = "ActivityManagerUtils";
private static ActivityManagerUtils mActivityManagerUtils = null;
public static ActivityManagerUtils getInstance() {
if (null == mActivityManagerUtils) {
mActivityManagerUtils = new ActivityManagerUtils();
}
return mActivityManagerUtils;
}
public String getTastActivity(Context mContext, int taskActivityByIndex,
int maxRunningTask) {
String curActivityName = null;
ActivityManager mActivityManager = (ActivityManager) mContext
.getSystemService(Context.ACTIVITY_SERVICE);
List<RunningTaskInfo> mRunningTaskInfo = mActivityManager
.getRunningTasks(maxRunningTask);
if (mRunningTaskInfo.size() <= 0) {
return "";
}
RunningTaskInfo cinfo = mRunningTaskInfo
.get(taskActivityByIndex);
ComponentName mComponentName = cinfo.topActivity;
curActivityName = mComponentName.getClassName();
return curActivityName;
}
public boolean getTopActivity(Context mContext, String clz,
int taskActivityByIndex, int maxRunningTask) {
String curActivityName = null;
ActivityManager mActivityManager = (ActivityManager) mContext
.getSystemService(Context.ACTIVITY_SERVICE);
List<RunningTaskInfo> mRunningTaskInfo = mActivityManager
.getRunningTasks(maxRunningTask);
RunningTaskInfo cinfo = mRunningTaskInfo
.get(taskActivityByIndex);
ComponentName mComponentName = cinfo.topActivity;
curActivityName = mComponentName.getClassName();
if (null != clz || !("".equals(clz))) {
if (clz.equals(curActivityName)) {
return true;
}
}
return false;
}
}
| [
"liuyong@semisky.com"
] | liuyong@semisky.com |
414e166b03dbda0827a1c3068924924f795c4136 | de060342048d83f76a5ad972859d6798f897c875 | /src/test/java/CucumberTest.java | 374cfeb6e82381c251babbaee17a6631f606ad0d | [] | no_license | vp1836/j_t_1 | 9ae0beedeb59c3abc06cc11faa107a791b8fdf69 | b80948725ad924c78fa398f33d4d73e40cf8d294 | refs/heads/main | 2023-08-13T10:04:08.759446 | 2021-09-28T14:54:41 | 2021-09-28T14:54:41 | 409,498,007 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 125 | java | import io.cucumber.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
public class CucumberTest {
}
| [
"vp1836@gmail.com"
] | vp1836@gmail.com |
926f36b515dfa3ce62017c83ab90dbb5d25940d4 | 079c0c8afde8603905eb8f1c96849236ea862178 | /spring-aop-schema/src/main/java/com/github/liuyiyou/spring/aop/HelloServiceImpl.java | 496ae6a5bfaafc3d9cb8f12a07a40d390d9b565a | [] | no_license | zhaozengbing/mySpring | 848b923ccf4cd853686bf97a931d0add3e969f76 | 84637766f5a4e9098ac9725b5cb81d7700270bda | refs/heads/master | 2020-12-27T04:40:45.823876 | 2014-07-24T09:10:00 | 2014-07-24T09:10:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 383 | java | package com.github.liuyiyou.spring.aop;
/**
* Created with IntelliJ IDEA.
* User: liuyiyou
* Date: 14-7-24
* Time: 下午12:01
* To change this template use File | Settings | File Templates.
*/
//002:定义目标接口实现
public class HelloServiceImpl implements HelloService {
@Override
public void sayHello() {
System.out.println("Hello World");
}
}
| [
"137515110@qq.com"
] | 137515110@qq.com |
2c1ee535d4ac28008f14c0bea088ee0e54640ecd | 8fc8b9819543b9411e96a12d08860f00bb6c3f9d | /SSH2/src/tres/entity/Reader.java | b25a270d4638e8b580875107515f69ba42e20b83 | [] | no_license | laikunpu/I_everything_konw_you | 893d0153e382668223f55079f51c96342f61f3aa | 60516337bf03aec168bef360ab85a4b5cd00576d | refs/heads/master | 2016-09-06T03:28:06.524695 | 2013-10-28T17:46:46 | 2013-10-28T17:46:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,576 | java | package tres.entity;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name = "tb_reader")
public class Reader {
private int id;
private String username;
private String password;
private String nickname;
private int usernumber;
private int level;
private int votes;
private int points;
private String email;
private List<BookMark> bookMarks = new ArrayList<BookMark>();
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "Id")
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Column
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
@Column
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Column
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
@Column
public int getUsernumber() {
return usernumber;
}
public void setUsernumber(int usernumber) {
this.usernumber = usernumber;
}
@Column
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
@Column
public int getVotes() {
return votes;
}
public void setVotes(int votes) {
this.votes = votes;
}
@Column
public int getPoints() {
return points;
}
public void setPoints(int points) {
this.points = points;
}
@Column
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@OneToMany(mappedBy = "reader", cascade = { CascadeType.ALL }, fetch = FetchType.EAGER)
public List<BookMark> getBookMarks() {
return bookMarks;
}
public void setBookMarks(List<BookMark> bookMarks) {
this.bookMarks = bookMarks;
}
public Reader(String username, String password, String nickname,
int usernumber, int level, int votes, int points, String email) {
this.username = username;
this.password = password;
this.nickname = nickname;
this.usernumber = usernumber;
this.level = level;
this.votes = votes;
this.points = points;
this.email = email;
}
public Reader() {
}
}
| [
"laikunpu@sina.cn"
] | laikunpu@sina.cn |
2b9e7ce6d22dd9540d2afa144d5120a01606bdaf | ec6144ebae8195a07bdf7cb72e2328139636bd6b | /exercise01/src/view/FolderFrame.java | d45d38081f67371843116cb202ac6cee386783fe | [] | no_license | foxist/Splat | d2d21c641f3ed0da53aab94129fd1c4004518e30 | 7876cb9a3d2236b703491f9689d5a9d2e5189ff7 | refs/heads/master | 2020-03-25T00:48:05.784921 | 2018-08-03T00:41:05 | 2018-08-03T00:41:05 | 143,206,552 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,998 | java | package view;
import io.FileText;
import model.Data;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.DefaultHighlighter;
import javax.swing.tree.TreePath;
import java.awt.*;
public class FolderFrame extends JFrame {
private Data data;
public FolderFrame(Data data) {
super("TreeFolder");
setPreferredSize(new Dimension(600, 400));
setMinimumSize(new Dimension(600, 400));
setMaximumSize(new Dimension(600, 400));
setLayout(new GridLayout(0, 2));
this.data = data;
add(getLeftPanel());
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
}
public Data getData() {
return data;
}
public JPanel getLeftPanel() {
JPanel leftPanel = new JPanel();
leftPanel.setLayout(new BorderLayout());
JTree tree = new JTree(getData().getTop());
JScrollPane treeView = new JScrollPane(tree);
leftPanel.add(treeView, BorderLayout.CENTER);
tree.addTreeSelectionListener(new SelectionListener());
return leftPanel;
}
public JPanel getRightPanel(String textFile) {
try {
JPanel rightPanel = new JPanel();
rightPanel.setLayout(new BorderLayout());
JTextPane text = new JTextPane();
text.setText(new FileText().isFindFile(textFile));
int index = text.getText().indexOf(getData().getSearchText());
text.getHighlighter().addHighlight(index, index + getData().getSearchText().length(), new DefaultHighlighter.DefaultHighlightPainter(Color.GREEN));
int lastIndex = text.getText().lastIndexOf(getData().getSearchText());
text.getHighlighter().addHighlight(lastIndex, lastIndex + getData().getSearchText().length(), new DefaultHighlighter.DefaultHighlightPainter(Color.GREEN));
JScrollPane scrollPane = new JScrollPane(text);
rightPanel.add(scrollPane, BorderLayout.CENTER);
return rightPanel;
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Искомого текста необнаружено!",
"Ошибка", JOptionPane.ERROR_MESSAGE);
return null;
}
}
class SelectionListener implements TreeSelectionListener {
public void valueChanged(TreeSelectionEvent e) {
JTree tree = (JTree) e.getSource();
TreePath[] selected = tree.getSelectionPaths();
int[] rows = tree.getSelectionRows();
assert selected != null;
for (TreePath aSelected : selected) {
assert rows != null;
if (getRightPanel(aSelected.getPathComponent(1) + "\\" + aSelected.getLastPathComponent()) != null) {
add(getRightPanel(aSelected.getPathComponent(1) + "\\" + aSelected.getLastPathComponent()));
revalidate();
}
}
}
}
}
| [
"41263596+foxist@users.noreply.github.com"
] | 41263596+foxist@users.noreply.github.com |
bcdfbee2d1a3b9dd5dad904727e35590e9d09db8 | a4174fa64560080e3145dad8fd76bef88d1c67bc | /src/main/java/com/create80/rd/common/persistence/proxy/PaginationMapperProxy.java | 8906503125db994f8f721a2425ed99aeb0a2a321 | [] | no_license | javaboomBird/questionnaire | 94ccdb81099328e15ad1d15fb742a54337c04d91 | 5dab9a26cc00fd807958369e5be45bc466f76e48 | refs/heads/master | 2020-04-27T06:51:39.346610 | 2019-03-06T10:08:33 | 2019-03-06T10:08:33 | 174,119,854 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,605 | java | /**
* Copyright © 2012-2016 All rights reserved.
*/
package com.create80.rd.common.persistence.proxy;
import com.create80.rd.common.persistence.Page;
import com.create80.rd.common.utils.Reflections;
import org.apache.ibatis.binding.BindingException;
import org.apache.ibatis.binding.MapperMethod;
import org.apache.ibatis.session.SqlSession;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.HashSet;
import java.util.Set;
/**
* <p>
* .
* </p>
*
* @author poplar.yfyang
* @version 1.0 2012-05-13 上午10:07
* @since JDK 1.5
*/
public class PaginationMapperProxy implements InvocationHandler {
private static final Set<String> OBJECT_METHODS = new HashSet<String>() {
private static final long serialVersionUID = -1782950882770203583L;
{
add("toString");
add("getClass");
add("hashCode");
add("equals");
add("wait");
add("notify");
add("notifyAll");
}
};
private boolean isObjectMethod(Method method) {
return OBJECT_METHODS.contains(method.getName());
}
private final SqlSession sqlSession;
private PaginationMapperProxy(final SqlSession sqlSession) {
this.sqlSession = sqlSession;
}
@Override
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {
if (isObjectMethod(method)) {
return null;
}
final Class<?> declaringInterface = findDeclaringInterface(proxy, method);
if (Page.class.isAssignableFrom(method.getReturnType())) {
// 分页处理
return new PaginationMapperMethod(declaringInterface, method, sqlSession).execute(args);
}
// 原处理方式
final MapperMethod mapperMethod = new MapperMethod(declaringInterface, method, sqlSession.getConfiguration());
final Object result = mapperMethod.execute(sqlSession, args);
if (result == null && method.getReturnType().isPrimitive()) {
throw new BindingException(
"Mapper method '"
+ method.getName()
+ "' ("
+ method.getDeclaringClass()
+ ") attempted to return null from a method with a primitive return type ("
+ method.getReturnType() + ").");
}
return result;
}
private Class<?> findDeclaringInterface(Object proxy, Method method) {
Class<?> declaringInterface = null;
for (Class<?> mapperFaces : proxy.getClass().getInterfaces()) {
Method m = Reflections.getAccessibleMethod(mapperFaces,
method.getName(),
method.getParameterTypes());
if (m != null) {
declaringInterface = mapperFaces;
}
}
if (declaringInterface == null) {
throw new BindingException(
"Could not find interface with the given method " + method);
}
return declaringInterface;
}
@SuppressWarnings("unchecked")
public static <T> T newMapperProxy(Class<T> mapperInterface, SqlSession sqlSession) {
ClassLoader classLoader = mapperInterface.getClassLoader();
Class<?>[] interfaces = new Class[]{mapperInterface};
PaginationMapperProxy proxy = new PaginationMapperProxy(sqlSession);
return (T) Proxy.newProxyInstance(classLoader, interfaces, proxy);
}
}
| [
"yanzx@create80.com"
] | yanzx@create80.com |
7deba74dfd389c95591a3162167298009635224b | b61004baecd332c5f8e9a1dfc063b61c8c13365d | /app/src/main/java/com/wedevgroup/weflyhelper/service/NetworkSchedulerService.java | f129e7b377f6aa381ddd867d58bb316fec171ba9 | [] | no_license | rolandassoh/WeflyHelper | 96e96db961dcc4f58a837fd343b3bbcf5c23e74f | 9b8d9a0b300c0d444f7c08129022d964286bcff3 | refs/heads/master | 2020-03-22T05:20:36.031980 | 2018-07-09T10:14:45 | 2018-07-09T10:14:45 | 139,559,250 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,821 | java | package com.wedevgroup.weflyhelper.service;
import android.app.job.JobParameters;
import android.app.job.JobService;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.util.Log;
import com.wedevgroup.weflyhelper.receiver.ConnectivityReceiver24Up;
import com.wedevgroup.weflyhelper.utils.Constants;
/**
* Created by admin on 07/05/2018.
*/
@RequiresApi(api = Build.VERSION_CODES.N)
public class NetworkSchedulerService extends JobService implements
ConnectivityReceiver24Up.ConnectivityReceiverListener {
private static final String TAG = NetworkSchedulerService.class.getSimpleName();
private ConnectivityReceiver24Up mConnectivityReceiver24Up;
@Override
public void onCreate() {
super.onCreate();
mConnectivityReceiver24Up = new ConnectivityReceiver24Up(this);
}
/**
* When the app's NetworkConnectionActivity is created, it starts this service. This is so that the
* activity and this service can communicate back and forth. See "setUiCallback()"
*/
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
return START_NOT_STICKY;
}
@Override
public boolean onStartJob(JobParameters params) {
registerReceiver(mConnectivityReceiver24Up, new IntentFilter(android.net.ConnectivityManager.CONNECTIVITY_ACTION));
return true;
}
@Override
public boolean onStopJob(JobParameters params) {
unregisterReceiver(mConnectivityReceiver24Up);
return true;
}
@Override
public void onNetworkConnectionChanged(boolean isConnected) {
if (isConnected){
startService(new Intent(this, PostParcelleService.class));
}
}
} | [
"djama.joel@outlook.com"
] | djama.joel@outlook.com |
ffb3962bdcbc6f66463a61e40b92c34827acbe40 | eade157bf48d9f5a2bdc564bdcf14141a98402bc | /app/src/main/java/com/example/tiku_b/bean/Service.java | 1da69eb0ff349a32241c8a01ed4562e73453f94f | [] | no_license | SGP0410/TiKu_B | 69b120e5e460104f0d32b769314cb77d6ea01a3c | bd6bd722ecc3a6d460ce2550fb2c0d12946f5dba | refs/heads/master | 2023-02-07T12:22:56.739010 | 2021-01-02T01:29:45 | 2021-01-02T01:29:45 | 324,992,764 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,682 | java | package com.example.tiku_b.bean;
public class Service {
/**
* serviceid : 1
* serviceName : 便民服务
* icon : http://81.70.194.43:8080/mobileA/images/tubiao1.png
* url : https://new.qq.com/omn/20201003/20201003A06MRV00.html
* serviceType : 智慧服务
* desc : aaa
*/
private int serviceid;
private String serviceName;
private String icon;
private String url;
private String serviceType;
private String desc;
private int weight;
public Service() {
}
public Service(String serviceName, String icon) {
this.serviceName = serviceName;
this.icon = icon;
}
public int getWeight() {
return weight;
}
public void setWeight(int weight) {
this.weight = weight;
}
public int getServiceid() {
return serviceid;
}
public void setServiceid(int serviceid) {
this.serviceid = serviceid;
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getServiceType() {
return serviceType;
}
public void setServiceType(String serviceType) {
this.serviceType = serviceType;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}
| [
"2742837998@qq.com"
] | 2742837998@qq.com |
505c0636c9fe1f1ad23f55da83b0076b6317fd48 | 69f0384e226f76286c5e4a0d9e3e606c07dce863 | /Lee/Braille_learning/app/src/main/java/com/example/yeo/practice/Normal_version_menu/Menu_quiz_abbreviation.java | 228cf006376168a8fca641fd74bdfa3f30f3118e | [] | no_license | ch-Yoon/trio | 85201f39ae5b17509f11b3a822daf38303b4cd68 | 63df3673d118cb426ca99110e676ae7f9ba29f91 | refs/heads/master | 2020-04-27T13:49:07.241882 | 2017-05-16T02:38:53 | 2017-05-16T02:38:53 | 78,740,712 | 0 | 0 | null | 2017-01-12T11:53:27 | 2017-01-12T11:53:27 | null | UTF-8 | Java | false | false | 6,410 | java | package com.example.yeo.practice.Normal_version_menu;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.support.v4.app.FragmentActivity;
import android.view.MotionEvent;
import android.view.View;
import com.example.yeo.practice.Common_menu_sound.Menu_detail_service;
import com.example.yeo.practice.Menu_info;
import com.example.yeo.practice.Common_menu_sound.Menu_quiz_service;
import com.example.yeo.practice.R;
import com.example.yeo.practice.Normal_version_quiz.quiz_reading_manual;
import com.example.yeo.practice.Normal_version_quiz.quiz_score;
import com.example.yeo.practice.Common_quiz_sound.quiz_reading_service;
import com.example.yeo.practice.Common_sound.slied;
import com.example.yeo.practice.*;
// 약자 및 약어 퀴즈 메뉴 화면
public class Menu_quiz_abbreviation extends FragmentActivity {
int newdrag,olddrag;
int y1drag,y2drag;
int posx1,posx2,posy1,posy2;
boolean enter = true;
quiz_reading_manual manual;
quiz_score score;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
View decorView = getWindow().getDecorView();
int uiOption = getWindow().getDecorView().getSystemUiVisibility();
if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH )
uiOption |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN )
uiOption |= View.SYSTEM_UI_FLAG_FULLSCREEN;
if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT )
uiOption |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
quiz_reading_service.finish_n = 6;
decorView.setSystemUiVisibility( uiOption );
setContentView(R.layout.activity_common_menu_quiz_abbreviation);
}
public IBinder onBind(Intent intent) {
return null;
}
@Override
public boolean onTouchEvent(MotionEvent event) {
switch(event.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN: //손가락 1개를 화면에 터치하였을 경우
startService(new Intent(this, Sound_Manager.class));
posx1 = (int)event.getX(); //현재 좌표의 x좌표값 저장
posy1 = (int)event.getY(); //현재 좌표의 y좌표값 저장
break;
case MotionEvent.ACTION_UP: //손가락 1개를 화면에서 떨어트렸을 경우
posx2 = (int)event.getX(); //손가락 1개를 화면에서 떨어트린 x좌표값 저장
posy2 = (int)event.getY(); //손가락 1개를 화면에서 떨어트린 y좌표값 저장
if(enter == true) { //손가락 1개를 떨어트린 x,y좌표 지점에 다시 클릭이 이루어진다면 약자 및 약어 퀴즈로 접속
if (posx2 < posx1 + WHclass.Touch_space && posx2 > posx1 - WHclass.Touch_space && posy1 < posy2 + WHclass.Touch_space && posy2 > posy2 - WHclass.Touch_space) {
Menu_info.MENU_QUIZ_INFO = Menu_info.MENU_QUIZ_ABBREVIATION;
manual.choice=7;
score.sel =7;
Intent intent = new Intent(Menu_quiz_abbreviation.this, Menu_quiz_reading.class);
startActivityForResult(intent, Menu_info.MENU_QUIZ_ABBREVIATION);
MainActivity.Braille_TTS.TTS_Play("읽기 퀴즈");
}
}
else enter = true;
break;
case MotionEvent.ACTION_POINTER_UP: // 두번째 손가락을 떼었을 경우
newdrag = (int)event.getX(); // 두번째 손가락이 떨어진 지점의 x좌표값 저장
y2drag = (int) event.getY(); // 두번째 손가락이 떨어진 지점의 y좌표값 저장
if(olddrag-newdrag>WHclass.Drag_space) { //손가락 2개를 이용하여 오른쪽에서 왼쪽으로 드래그할 경우 다음 메뉴로 이동
Intent intent = new Intent(this,Menu_quiz_letter.class);
startActivityForResult(intent,Menu_info.MENU_QUIZ_LETTER);
Menu_quiz_service.menu_page= Menu_info.MENU_QUIZ_LETTER;
startService(new Intent(this, Menu_quiz_service.class));
slied.slied = Menu_info.next;
startService(new Intent(this, slied.class));
finish();
}
else if(newdrag-olddrag>WHclass.Drag_space) { //손가락 2개를 이용하여 왼쪽에서 오른쪽으로 드래그 할 경우 이전 메뉴로 이동
Intent intent = new Intent(this,Menu_quiz_sentence.class);
startActivityForResult(intent,Menu_info.MENU_QUIZ_SENTENS);
Menu_quiz_service.menu_page=Menu_info.MENU_QUIZ_SENTENS;
startService(new Intent(this, Menu_quiz_service.class));
slied.slied = Menu_info.pre;
startService(new Intent(this, slied.class));
finish();
}
else if(y2drag-y1drag> WHclass.Drag_space) { //손가락 2개를 이용하여 상단에서 하단으로 드래그할 경우 현재 메뉴의 상세정보 음성 출력
Menu_detail_service.menu_page=23;
startService(new Intent(this, Menu_detail_service.class));
}else if (y1drag - y2drag >WHclass.Drag_space) { //손가락 2개를 이용하여 하단에서 상단으로 드래그할 경우 현재 메뉴를 종료
onBackPressed();
}
break;
case MotionEvent.ACTION_POINTER_DOWN: //두번째 손가락이 화면에 터치 될 경우
enter = false; //손가락 1개를 인지하는 화면을 잠금
olddrag = (int)event.getX(); // 두번째 손가락이 터지된 지점의 x좌표값 저장
y1drag = (int) event.getY(); // 두번째 손가락이 터지된 지점의 y좌표값 저장
break;
}
return true;
}
@Override
public void onBackPressed() {
Menu_quiz_service.finish = true;
startService(new Intent(this, Menu_quiz_service.class));
finish();
}
}
| [
"myeongjin0@naver.com"
] | myeongjin0@naver.com |
a9a12b8fef9eb37de95e1a4a9af4394353445e8f | 065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be | /drjava_cluster/8060/src_1.java | c58daaaf83cf1e860d668d3a3c7a27c60723291c | [] | no_license | martinezmatias/GenPat-data-C3 | 63cfe27efee2946831139747e6c20cf952f1d6f6 | b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4 | refs/heads/master | 2022-04-25T17:59:03.905613 | 2020-04-15T14:41:34 | 2020-04-15T14:41:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 721 | java | /* $Id$ */
package edu.rice.cs.drjava;
import java.util.Date;
import java.text.SimpleDateFormat;
/**
* This interface hold the information about this build of DrJava.
* This file is copied to Version.java by the build process, which also
* fills in the right values of the date and time.
*/
public abstract class Version {
/**
* This string will be automatically expanded upon "ant commit".
* Do not edit it by hand!
*/
public static final Date BUILD_TIME = _getBuildDate();
private static Date _getBuildDate() {
try {
return new SimpleDateFormat("yyyyMMdd-HHmm").parse("20010808-1807");
}
catch (Exception e) { // parse format or whatever problem
return null;
}
}
}
| [
"375833274@qq.com"
] | 375833274@qq.com |
50183234e2b962269f8f03c79ff692ddc6db2468 | fe38700b5179734e07a3686c1d79b531453ff0f6 | /src/test/java/com/spandigital/assessment/store/InMemoryTest.java | 1da4ed3156e2f1ab85fe993de9f9c26f9e4a189d | [] | no_license | rmukubvu/games-app | 6d91742082fa84a7fc0c78d1d7e281177567156d | a4ecf7b861127c4dc76618d7979cfe0c13fc8f32 | refs/heads/master | 2022-12-27T14:16:55.146475 | 2020-04-18T23:17:21 | 2020-04-18T23:17:21 | 255,974,493 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,772 | java | package com.spandigital.assessment.store;
import com.spandigital.assessment.contract.Database;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
public class InMemoryTest {
private Database<Integer> inMemory;
@Before
public void init(){
inMemory = new InMemory<>();
}
@Test
public void saveResult_should_save_any_type_count_be_greater_than_zero() {
String key = "Manchester United";
int value = 1;
inMemory.save(key,value);
assertTrue("value has been saved",inMemory.count() > 0);
}
@Test
public void get_must_return_value_if_key_present(){
String key = "Manchester United";
int expected = 1;
inMemory.save(key,expected);
int actual = inMemory.get(key);
String errorMessage = String.format("expected [%d] got [%d]", expected, actual);
assertEquals(errorMessage, actual, expected);
}
@Test
public void must_update_value_if_key_already_present(){
String key = "Manchester United";
int value = 1;
inMemory.save(key,value);
int expected = 5;
inMemory.save(key,expected);
int actual = inMemory.get(key);
String errorMessage = String.format("expected [%d] got [%d]", expected, actual);
assertEquals(errorMessage, actual, expected);
}
@Test
public void must_fail_and_show_null_if_key_is_not_present(){
String key = "ab36egdh5769jdfkj";
assertNull("expected null",inMemory.get(key));
}
@Test
public void getValues_should_get_saved_values() {
assertNotNull(inMemory.getAll());
}
@Test
public void saveResult_should_save_any() {
assertNotNull(inMemory.getAll());
}
}
| [
"rmukubvu@gmail.com"
] | rmukubvu@gmail.com |
9e3aede01198e2e8f09ae32be05fc23b5c7d82e1 | a2f243961fcaba0fbeaf9d4442482ad2d55f3839 | /srctest/org/smgame/core/player/HumanPlayer.java | f0578415e102611aac09adb4043e1b8e3bca47cc | [] | no_license | packydevel/smgame | 7fcb0fa6c91d87f912feb752bfb018448b55a065 | 8be303cea4d9c50cc6ec1bdceb739cbe1e1d4c8f | refs/heads/master | 2021-01-01T17:27:12.322603 | 2014-12-16T15:56:19 | 2014-12-16T15:56:19 | 32,628,202 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 315 | java | package org.smgame.core.player;
import java.io.Serializable;
/**Classe giocatore umano
*
* @author luca
* @author pasquale
*/
public class HumanPlayer extends Player implements Serializable {
public HumanPlayer(String name) {
super(name);
MIN_SCORE = 4.0;
MIN_MARGIN = 0.5;
}
} | [
"packydevel@gmail.com@dcd7f516-2215-11de-9288-5f72e443383c"
] | packydevel@gmail.com@dcd7f516-2215-11de-9288-5f72e443383c |
1ab28706f0d83a69a56a6754cf10b48423c60e0b | 8863163cca90d601735df63f9fe5275b3d835fc8 | /app/src/test/java/sundarchaupal/camera/ExampleUnitTest.java | dcb42c19e15d11bd4c77757b10798660029d52b7 | [] | no_license | sundarkk/Camera | d089ea27a63389759d1845f20b0530cd453b2f7d | 5d59ad4bba5ad4be4151226ba8c776678cfda58f | refs/heads/master | 2020-07-07T14:52:34.819837 | 2019-08-20T13:24:32 | 2019-08-20T13:24:32 | 203,381,216 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 381 | java | package sundarchaupal.camera;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"git@754950"
] | git@754950 |
b05a2cc0e728ef032a5652ca54800c1493e6fe16 | bca21c3e352f8573e203b90c52d6679f7a6f3e54 | /Aula 16 - 03-12-2019/ListaDeTarefas/src/listadetarefas/Tarefa.java | cdbd9128222255fa7b224c2739643a680facc41e | [] | no_license | i-santos/JavaTercaQuintaNoturno | 4a737c0ec5993ff1db15b9b8047fa58a90fdc8b3 | b1c532a2580a4c352fa5048597971989d02d2a82 | refs/heads/master | 2020-08-26T23:26:00.732027 | 2020-01-22T01:34:07 | 2020-01-22T01:34:07 | 217,180,892 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 433 | java | package listadetarefas;
public class Tarefa {
private String titulo;
private boolean finalizada;
public String getTitulo() {
return titulo;
}
public void setTitulo(String titulo) {
this.titulo = titulo;
}
public boolean isFinalizada() {
return finalizada;
}
public void setFinalizada(boolean finalizada) {
this.finalizada = finalizada;
}
}
| [
"iosorio.santos@gmail.com"
] | iosorio.santos@gmail.com |
2fb4bbfbb0e81ad8c2457664f995f3d024d884aa | 18d3962e6d369b60a3b619b65a9945446b9f3d95 | /src/main/java/com/yangli/experiment/service/UserService.java | 8cd33f8e1d1a3602f23ad88a6a2bc6dc7ee5a76f | [] | no_license | mieshihuowa/exp | 769a68450a76a03e00573879d6c69d1ad25e708c | 2f186c870f9a70c5c4304cf0926f42c24585228d | refs/heads/master | 2021-02-06T19:04:42.047812 | 2020-04-09T07:25:29 | 2020-04-09T07:25:29 | 243,941,430 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 283 | java | package com.yangli.experiment.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yangli.experiment.entity.User;
/**
* (User)表服务接口
*
* @author yangli
* @since 2020-04-04 23:48:44
*/
public interface UserService extends IService<User> {
} | [
"yangli@yanglideMacBook-Pro.local"
] | yangli@yanglideMacBook-Pro.local |
8fa51b7a1801e6b0cba0c91b062a98be19d5f158 | 48f8cea54ef8208f853637659e648709bd3deb47 | /src/com/map/fft/Status.java | 953bb43cf2100b7727ecd5f0afc71fc5d3f4f740 | [] | no_license | kielfriedt/android-listener-prototype | e526d02b804cc5004594796f14ae1d1cabc8e3ba | 3fbffd58b2f9cf93b8ff41ba14f9cb672e3eac1d | refs/heads/master | 2021-01-18T06:27:07.531033 | 2011-04-03T00:31:36 | 2011-04-03T00:31:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 65 | java | package com.map.fft;
public enum Status {
STOPPED,
STARTED,
}
| [
"russellhaering@gmail.com"
] | russellhaering@gmail.com |
f8ebab337baa784002af1aa868518515d8c0b7b3 | ede914c97f3fa47d3b918e01a0bcbc017b3212c4 | /src/main/java/ru/mihaly4/vkmd/view/IView.java | eb11ced6a6fdbea9b45adc31c64913fd2a8bd626 | [
"BSD-3-Clause"
] | permissive | bupy7/java-vkmd | d2b7fe0d82fa127fab661af39800ed91faa0af3f | 4af89cc431217f33c5b15ba26843a872c71cc474 | refs/heads/master | 2021-06-27T02:31:59.469292 | 2020-10-04T16:04:13 | 2020-10-04T16:04:13 | 146,013,948 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 92 | java | package ru.mihaly4.vkmd.view;
public interface IView {
void show();
void hide();
}
| [
"bupy765@gmail.com"
] | bupy765@gmail.com |
a622bf9a55fa7bd1cc13cbd1a4c12c47ffa624c2 | 51d3ca1660e8a8509644015be198936548102b71 | /weixinpulltofresh/src/main/java/com/zrp/weixinpulltofresh/util/LogUtil.java | dfac245381b900685461bdfa4a0114fe9150f659 | [
"MIT"
] | permissive | xieyalong/WeChatFriendCirclePullToRefresh | cae2e7db4087398e84e9270d8d32226cbaef3ef6 | c36f52a363d1187daad48f070580d8819922d11b | refs/heads/master | 2020-04-09T17:17:53.281755 | 2018-04-08T11:37:22 | 2018-04-08T11:37:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 384 | java | package com.zrp.weixinpulltofresh.util;
import android.util.Log;
/**
* Created by zeng on 2017/11/3.
*/
public class LogUtil {
private static final String TAG = "zeng";
public static void d(String msg){
Log.d(TAG,msg);
}
public static void i(String msg){
Log.d(TAG,msg);
}
public static void e(String msg){
Log.e(TAG,msg);
}
}
| [
"605516700@qq.com"
] | 605516700@qq.com |
c252832b60487be2b8b45036894d45ab5951c062 | b5d4105cdfdd8e1bdda0e638ceea6a294ad02549 | /src/main/java/se/fnord/jamon/NodeContext.java | 5793937f6c7daca759f988c5babb85e518655af7 | [
"ISC"
] | permissive | gsson/jamon | 3e5a2f93926d6a74bea2eb0289aaa73bdf49bc4e | 8ee1ebd61d34649fa75071605b61cd4ce3ff5636 | refs/heads/master | 2021-01-16T19:23:25.620997 | 2015-01-21T09:32:13 | 2015-01-21T09:42:52 | 6,826,560 | 0 | 0 | null | 2013-09-30T09:25:35 | 2012-11-23T11:34:36 | Java | UTF-8 | Java | false | false | 168 | java | package se.fnord.jamon;
public interface NodeContext {
NodeContext forChild(Node n);
NodeContext forParent();
Path path();
boolean matches(NodeMatcher matcher);
}
| [
"henrik.gustafsson@proceranetworks.com"
] | henrik.gustafsson@proceranetworks.com |
1fe25f47b3672e796a7b9c12d8bd1cc8b06b1a28 | ff4191cedc70df2a3e17bee9933834a8587d0c6f | /jdt-simple-command-6.0/src/main/java/ch/bfh/due1/jdt/simple/impl/shape/DefaultSHandle.java | 5667d2baf2ebab4f75238e8fa4d02bb0b81717e2 | [] | no_license | bak89/soed_patterns | 060298bad23d71d6b7e42135333c01b2c740781c | 5c6719a829ed18d98a449d216286655612c172a2 | refs/heads/master | 2022-04-01T00:12:40.425389 | 2019-12-28T15:02:01 | 2019-12-28T15:02:01 | 227,569,245 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,435 | java | /*
* Eric Dubuis, Berner Fachhochschule,
* Biel, Switzerland.
* Copyright (c) 2007
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package ch.bfh.due1.jdt.simple.impl.shape;
import java.awt.Cursor;
import ch.bfh.due1.jdt.framework.AbstractHandle;
import ch.bfh.due1.jdt.framework.BoundingBox;
import ch.bfh.due1.jdt.framework.Coord;
import ch.bfh.due1.jdt.framework.KeyModifier;
import ch.bfh.due1.jdt.framework.Shape;
/**
* Default handle at the south position of a shape.
*
* @author Eric Dubuis
*/
public class DefaultSHandle extends AbstractHandle {
/**
* Creates a handle at the south position of a shape.
*
* @param owner
* The shape that owns this handle.
* @param location
* There this handle is located (the center).
*/
public DefaultSHandle(Shape owner, Coord location) {
super(owner, location);
}
/**
* @inheritDoc
*/
@Override
public Cursor getCursor() {
Cursor c = new Cursor(Cursor.S_RESIZE_CURSOR);
return c;
}
/**
* @inheritDoc
*/
@Override
public void dragInteraction(Coord c, KeyModifier k) {
BoundingBox r = getOwner().getBoundingBox();
BoundingBox modified = new BoundingBox(r.getX0(), r.getY0(),
r.getWidth(), c.getY0() - r.getY0());
getOwner().setBoundingBox(modified);
}
/**
* @inheritDoc
*/
@Override
public void stopInteraction(Coord c, KeyModifier k) {
dragInteraction(c, k);
}
}
| [
"gbakhiet@gmail.com"
] | gbakhiet@gmail.com |
7db925d481a0cbca9f44491cf0d4d307494fe90b | dda609e57e292d519d73f9a9beefd7c6911b9ae5 | /src/main/java/com/db/awmd/challenge/web/TransactionController.java | d2dc7544d78676110ec49b9d2b83c20d44223669 | [] | no_license | rpandey2011/challenge | b855953c66c9877a19ddb4d3e1deb82eb8ef3c2b | dbda5ba6b8c03168317bc5a3021f19c871719834 | refs/heads/master | 2020-12-21T21:07:31.483102 | 2020-01-27T19:03:52 | 2020-01-27T19:03:52 | 236,561,007 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,963 | java | package com.db.awmd.challenge.web;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.db.awmd.challenge.domain.Transactions;
import com.db.awmd.challenge.exception.AccountDoesNotExistsException;
import com.db.awmd.challenge.exception.BusinessException;
import com.db.awmd.challenge.exception.InsufficientBalanceException;
import com.db.awmd.challenge.exception.TechnicalException;
import com.db.awmd.challenge.service.TransactionService;
import lombok.extern.slf4j.Slf4j;
@RestController
@RequestMapping("/v1/transfers")
@Slf4j
public class TransactionController {
private final TransactionService transactionService;
@Autowired
public TransactionController(TransactionService transactionService) {
this.transactionService = transactionService;
}
@PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Object> transferFunds(@RequestBody @Valid Transactions transaction) {
log.info("Transaction Details: {}", transaction);
try {
this.transactionService.transferFunds(transaction);
} catch (InsufficientBalanceException | AccountDoesNotExistsException | BusinessException ex) {
return new ResponseEntity<>(ex.getMessage(), HttpStatus.BAD_REQUEST);
} catch (TechnicalException ex) {
return new ResponseEntity<>(ex.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
} catch (Exception ex) {
return new ResponseEntity<>("Error while transaction, please try after sometime.",
HttpStatus.INTERNAL_SERVER_ERROR);
}
return new ResponseEntity<>(HttpStatus.OK);
}
}
| [
"rpandey@softcell.com"
] | rpandey@softcell.com |
d5d009be5ccf978e2a93d29fbd575545025a96f7 | 37724ccfb2ea578ad2a43b991f798fedd26ffd60 | /hw06avlTree/src/main/java/com/alextim/Tree.java | d1219637b183bd48dcc23d6784c2e1f3646c8560 | [] | no_license | alextim1508/otusAlgorithms | 4ebe2e553a0b6ae97be93f2aefd209a85922b8f8 | dfb7b8d7e429f762e4fc796411ce9e2e9c72c906 | refs/heads/master | 2021-07-10T17:43:21.793540 | 2020-07-24T09:06:16 | 2020-07-24T09:06:16 | 241,327,836 | 0 | 1 | null | 2021-03-31T21:58:16 | 2020-02-18T10:01:33 | Java | UTF-8 | Java | false | false | 4,547 | java | package com.alextim;
import java.util.LinkedList;
import java.util.Objects;
import java.util.Queue;
import java.util.Stack;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;
public class Tree {
Node root;
public Tree(Node root) {
this.root = root;
}
public void insert(Node newNode) {
root = insert(newNode, root, node-> node);
}
Node insert(Node newNode, Node node, Function<Node, Node> handler) {
if(node == null) {
return newNode;
}
if(node.key == newNode.key) {
node.value = newNode.value;
return node;
}
if(newNode.key < node.key) {
node.left = insert(newNode, node.left, handler);
} else {
node.right = insert(newNode, node.right, handler);
}
return handler.apply(node);
}
public void remove(int key) {
root = remove(key, root, node -> node);
}
public Node findMin(Node node) {
return node.left != null ? findMin(node.left) : node;
}
Node removeMin(Node node, Function<Node, Node> handler) {
if(node.left == null )
return node.right;
node.left = removeMin(node.left, handler);
return handler.apply(node);
}
Node remove(int key, Node node, Function<Node, Node> handler) {
if(node == null)
return null;
if(key < node.key)
node.left = remove(key, node.left, handler);
else if(key > node.key)
node.right = remove(key, node.right, handler);
else {
Node left = node.left;
Node right = node.right;
if(right == null)
return left;
Node min = findMin(right);
min.right = removeMin(right, handler);
min.left = left;
return handler.apply(min);
}
return handler.apply(node);
}
public Node search(int key) {
return search(key, root);
}
Node search(int key, Node node) {
if(node == null)
return null;
if(node.key == key)
return node;
if(key > node.key)
return search(key, node.right);
else
return search(key, node.left);
}
Node join(Node p, Node q, Consumer<Node> joinedNodeHandler, BiFunction<Node, Node, Boolean> lottery) {
if(p==null)
return q;
if(q==null)
return p;
if(lottery.apply(p, q)) {
p.right = join(p.right, q, joinedNodeHandler, lottery);
joinedNodeHandler.accept(p);
return p;
} else {
q.left = join(p, q.left, joinedNodeHandler, lottery);
joinedNodeHandler.accept(q);
return q;
}
}
public void preOrder(Consumer<Node> consumer) {
preOrder(root, consumer);
}
void preOrder(Node node, Consumer<Node> consumer) {
if(node.left != null)
preOrder(node.left, consumer);
if(node.right != null)
preOrder(node.right, consumer);
consumer.accept(node);
}
public void iterativePreOrder(Consumer<Node> consumer) {
iterativePreOrder(root, consumer);
}
void iterativePreOrder(Node node, Consumer<Node> consumer) {
Stack<Node> stack = new Stack<> ();
stack.push(node);
while(!stack.empty()) {
node=stack.pop();
consumer.accept(node);
if (node.right!=null)
stack.push(node.right);
if (node.left!=null)
stack.push(node.left);
}
}
public void levelOrder(Consumer<Node> consumer) {
levelOrder(root, consumer);
}
void levelOrder(Node node, Consumer<Node> consumer) {
Queue<Node> queue = new LinkedList<>();
queue.add(node);
while (!queue.isEmpty()) {
node = queue.poll();
consumer.accept(node);
if(node.left != null)
queue.add(node.left);
if(node.right != null)
queue.add(node.right);
}
}
public static class Node {
int key;
Object value;
Node left, right;
public Node(int key, Object value) {
this.key = key;
this.value = value;
}
@Override
public String toString() {
return "Node{ key=" + key + ", value=" + value + '}';
}
}
}
| [
"alextim1508@yandex.ru"
] | alextim1508@yandex.ru |
1112205f2c3da2a9a30f9155b907c469ba96aa4d | 5d27fd2aba97383ef374da73dd51c5219b722ae3 | /src/test/java/com/jdh/ecommerce/CollectDtoTest.java | b034df5b8ea75425224f7c742a85d5564c75facf | [] | no_license | 2212130980/ecommerce_back | 86c23b73a0e407450b93109876533b8e2a9f8d63 | 14d50e5015e6f235aa1ca1d06d611b610c02cb85 | refs/heads/master | 2022-06-25T07:45:21.641925 | 2020-07-02T09:14:03 | 2020-07-02T09:14:03 | 210,743,190 | 0 | 0 | null | 2022-06-21T01:56:29 | 2019-09-25T02:58:38 | Java | UTF-8 | Java | false | false | 699 | java | package com.jdh.ecommerce;
import com.jdh.ecommerce.service.HammerCollectService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class CollectDtoTest {
@Autowired
HammerCollectService hammerCollectDao;
@Test
public void test() {
/* Page<CollectDto> p = new Page<>(1, 3);
IPage<CollectDto> demoEntityIPage = hammerCollectDao.getMyCollect(p,1);
System.out.println( demoEntityIPage.getRecords());*/
}
}
| [
"2212130980@qq.com"
] | 2212130980@qq.com |
d6476673d29d1f448accf9c0408ca48a23d80452 | fda6c9a95b9f62112ddafdd71a4b5e0c59c238c3 | /UpdateContact.java | fc2bf78bfb8df176ab2610a3d25f8f5f83a41d3c | [] | no_license | shushantkumar/MyContacts | 8ce2259b4c482b5999e25a36b039e98baf13f426 | a7151c3edc4838f0881af319bb88d7515025f568 | refs/heads/master | 2021-04-30T02:52:50.361440 | 2018-02-15T02:21:13 | 2018-02-15T02:21:13 | 121,509,512 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,825 | java | package com.shushantkumar.mycontacts;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import java.io.IOException;
import java.net.URL;
public class UpdateContact extends AppCompatActivity {
int key;
Contact contact;
DatabaseHandler databaseHandler;
EditText txtName, txtMob, txtMail, txtAddress;
ImageView img;
Uri imageUri = Uri.parse("android.resource://com.shushantkumar.mycontacts/drawable/defaultuser.png");
Button update;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_update_contact);
databaseHandler = new DatabaseHandler(getApplicationContext());
key = getIntent().getExtras().getInt("key");
key += 1;
Log.i("key", key + " ");
txtName = (EditText) findViewById(R.id.txtName);
txtMob = (EditText) findViewById(R.id.txtMob);
txtMail = (EditText) findViewById(R.id.txtMail);
txtAddress = (EditText) findViewById(R.id.txtAddress);
img = (ImageView) findViewById(R.id.img);
contact = databaseHandler.getContact(key);
Log.i("key", contact.getName());
txtName.setText(contact.getName());
txtMob.setText(contact.getMob());
txtMail.setText(contact.getMail());
txtAddress.setText(contact.getAddress());
Uri uri = contact.getImageURI();
update = (Button) findViewById(R.id.update);
imageUri=contact.getImageURI();
String filePath = "";
try {
String wholeID = DocumentsContract.getDocumentId(uri);
// Split at colon, use second item in the array
String id = wholeID.split(":")[1];
String[] column = {MediaStore.Images.Media.DATA};
// where id is equal to
String sel = MediaStore.Images.Media._ID + "=?";
Cursor cursor = getContentResolver().
query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
column, sel, new String[]{id}, null);
int columnIndex = cursor.getColumnIndex(column[0]);
if (cursor.moveToFirst()) {
filePath = cursor.getString(columnIndex);
}
cursor.close();
img.setImageBitmap(BitmapFactory.decodeFile(filePath));
} catch (IllegalArgumentException e) {
filePath = contact.getImageURI().toString();
try {
img.setImageBitmap(BitmapFactory.decodeStream((new URL(filePath)).openStream()));
} catch (IOException e1) {
e1.printStackTrace();
}
}
txtName.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
update.setEnabled(!txtName.getText().toString().trim().isEmpty());
}
@Override
public void afterTextChanged(Editable editable) {
}
});
img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Contact Image"), 1);
}
});
}
public void onActivityResult(int reqCode, int resCode, Intent data) {
if (resCode == RESULT_OK) {
if (reqCode == 1) {
imageUri = data.getData();
img.setImageURI(data.getData());
}
}
}
public void update(View view) {
contact = new Contact(key, txtName.getText().toString(), txtMob.getText().toString(), txtMail.getText().toString(), txtAddress.getText().toString(), imageUri);
databaseHandler.updateContact(contact);
Toast.makeText(getApplicationContext(), txtName.getText().toString() + " successfully updated !", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
}
}
| [
"shushantkmr2@gmail.com"
] | shushantkmr2@gmail.com |
5e7738f6c60fd79ad2bf548616636675a4ffff54 | ef88d44ec7708b8a76b939ce186f56491fa7187e | /src/main/java/com/christophe/rhapsode/RhapsodeApplication.java | 6e9d495eee0966ced4823d77e35e0a3a1a277e1a | [] | no_license | chris-tophe/MyWebSite | c3c468b1353b3313bcda04321f867672e61a72b8 | dc427cc3497181e33d592c331c6eca0939687904 | refs/heads/master | 2022-11-20T23:30:26.445050 | 2020-07-27T20:29:52 | 2020-07-27T20:29:52 | 272,176,308 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,850 | java | package com.christophe.rhapsode;
import com.christophe.rhapsode.filters.VisitCounterFilter;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import com.christophe.rhapsode.dao.ArticlesDao;
import com.christophe.rhapsode.dao.LanguageDao;
import com.christophe.rhapsode.dao.PhotosDao;
import com.christophe.rhapsode.model.Article;
import com.christophe.rhapsode.model.Language;
import com.christophe.rhapsode.model.Photo;
@SpringBootApplication
public class RhapsodeApplication {
public static void main(String[] args) {
SpringApplication.run(RhapsodeApplication.class, args);
}
@Bean
CommandLineRunner createLangage(LanguageDao languageDao) {
return arg -> {
Language language = new Language("Java");
language.setImage("logo/javaLogo.png");
languageDao.save(language);
language = new Language("Java Fx");
language.setImage("logo/javaFXLogo.png");
languageDao.save(language);
language = new Language("Spring");
language.setImage("logo/springLogo.png");
languageDao.save(language);
language = new Language("React Native");
language.setImage("logo/reactLogo.png");
languageDao.save(language);
language = new Language("Flutter");
language.setImage("logo/flutterLogo.png");
languageDao.save(language);
language = new Language("PHP");
language.setImage("logo/phpLogo.png");
languageDao.save(language);
language = new Language("JavaScript");
language.setImage("logo/jsLogo.png");
languageDao.save(language);
language = new Language("Api Rest");
language.setImage("logo/restLogo.png");
languageDao.save(language);
};
}
@Bean
CommandLineRunner createArticles(ArticlesDao articleRepo , LanguageDao languageDao, PhotosDao photosDao) {
return args -> {
Article article = new Article();
article.setTitle("Visit My City");
article.setUrl("https://github.com/chris-tophe/CecChrRap");
article.setDescription(
"Projet tuteuré de 5 jours en équipe.Planificateur de visite. Développement de micro-services et d'une interface JavaFx.");
Language language = languageDao.findByName("Java");
article.addLanguages(language);
language = languageDao.findByName("Java Fx");
article.addLanguages(language);
language = languageDao.findByName("Spring");
article.addLanguages(language);
language = languageDao.findByName("Api Rest");
article.addLanguages(language);
Photo p = new Photo();
p.setUrl("images/vmc0.png");;
p.setLegend("MainPage");
photosDao.save(p);
article.addPhotos(p);
p = new Photo();
p.setUrl("images/vmc1.png");;
p.setLegend("addBuilding");
photosDao.save(p);
article.addPhotos(p);
articleRepo.save(article);
article = new Article();
article.setTitle("FrigoStock");
article.setUrl("https://github.com/chris-tophe/frigoStock");
article.setDescription(
"Mini Projet React-Native interrogeant des scripts PHP. Gestion du contenu d'un frigo.");
language = languageDao.findByName("React Native");
article.addLanguages(language);
language = languageDao.findByName("PHP");
article.addLanguages(language);
p = new Photo();
p.setUrl("images/frigostock0.png");;
p.setLegend("Login");
photosDao.save(p);
article.addPhotos(p);
p = new Photo();
p.setUrl("images/frigostock1.png");;
p.setLegend("Frigo");
photosDao.save(p);
article.addPhotos(p);
p = new Photo();
p.setUrl("images/frigostock2.png");;
p.setLegend("List");
photosDao.save(p);
article.addPhotos(p);
p = new Photo();
p.setUrl("images/frigostock3.png");;
p.setLegend("Alert");
photosDao.save(p);
article.addPhotos(p);
articleRepo.save(article);
article = new Article();
article.setTitle("tatatam");
article.setUrl("");
article.setDescription(
"Application de gestion de garanties consommant une API Rest PHP");
language = languageDao.findByName("Flutter");
article.addLanguages(language);
language = languageDao.findByName("PHP");
article.addLanguages(language);
language = languageDao.findByName("Api Rest");
article.addLanguages(language);
p = new Photo();
p.setUrl("images/tatatam0.png");;
p.setLegend("Acceuil");
photosDao.save(p);
article.addPhotos(p);
p = new Photo();
p.setUrl("images/tatatam1.png");;
p.setLegend("Drawer menu");
photosDao.save(p);
article.addPhotos(p);
p = new Photo();
p.setUrl("images/tatatam2.png");;
p.setLegend("Main menu");
photosDao.save(p);
article.addPhotos(p);
p = new Photo();
p.setUrl("images/tatatam3.png");;
p.setLegend("Garantie");
photosDao.save(p);
article.addPhotos(p);
p = new Photo();
p.setUrl("images/tatatam4.png");;
p.setLegend("Menu inventaire");
photosDao.save(p);
article.addPhotos(p);
articleRepo.save(article);
article = new Article();
article.setTitle("EasyQuoteMaker");
article.setDescription("Front-End Flutter (web desktop et mobile) pour la réalisation de devis.");
article.setUrl("https://github.com/chris-tophe/EasyQuoteMakerService");
language = languageDao.findByName("Flutter");
article.addLanguages(language);
language = languageDao.findByName("Api Rest");
article.addLanguages(language);
articleRepo.save(article);
article = new Article();
article.setTitle("EasyQuoteMakerService");
article.setDescription("Back-End Java pour EasyQuoteMaker. Authentification et Authorisation en HTTPS.");
article.setUrl("https://github.com/chris-tophe/EasyQuoteMaker");
language = languageDao.findByName("Java");
article.addLanguages(language);
language = languageDao.findByName("Spring");
article.addLanguages(language);
language = languageDao.findByName("Api Rest");
article.addLanguages(language);
articleRepo.save(article);
article = new Article();
article.setTitle("MyWebSite");
article.setDescription("Ce site internet. Utilisation de Thymeleaf.");
article.setUrl("https://github.com/chris-tophe/MyWebSite");
language = languageDao.findByName("Java");
article.addLanguages(language);
language = languageDao.findByName("Spring");
article.addLanguages(language);
articleRepo.save(article);
};
}
@Bean
public FilterRegistrationBean<VisitCounterFilter> visitCounterFilterFilterRegistrationBean() {
FilterRegistrationBean<VisitCounterFilter> bean = new FilterRegistrationBean<VisitCounterFilter>();
bean.setFilter(new VisitCounterFilter());
bean.addUrlPatterns("/");
return bean;
}
}
| [
"christophe.loyer@gmail.com"
] | christophe.loyer@gmail.com |
2c4b4b88315b781d7d288f4dbdf79810aa5ff568 | d20de54e140ccacba8c5f622322509d867d75f8c | /boot-rabbitmq/src/main/java/com/gao/bootrabbitmq/cosummer/HelloConsumer.java | e5fd46bc97f8d4f0b77e51f45cfc02ea48de6b58 | [] | no_license | gaoyongshun/self_study | 1af671d93051b65937f62346688fa0827c014497 | e53caa7d25e8c2d7427b78df8c8e0a9c1d0d1fc3 | refs/heads/master | 2022-12-27T04:06:42.613710 | 2020-06-16T12:05:13 | 2020-06-16T12:05:13 | 271,801,600 | 0 | 0 | null | 2020-10-13T22:45:05 | 2020-06-12T13:12:00 | Java | UTF-8 | Java | false | false | 498 | java | package com.gao.bootrabbitmq.cosummer;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
@Component
@RabbitListener(queuesToDeclare = @Queue(name="hello"))
public class HelloConsumer {
@RabbitHandler
public void hanler(String msg){
System.out.println("this is helloConsumer: "+ msg);
}
}
| [
"903357035@qq.com"
] | 903357035@qq.com |
63a8898d8d6df1e22931ccd6a6965b48874d26c0 | 046acb1b3f41b3987b265f9cd7e8a0e9548c3feb | /Chapter 8/DeckTester.java | 19262db708ab65953faf14a4eb66ba174b3b4928 | [] | no_license | kylesushichin/ap-computer-programming | f068d12072251ebac36c913aa7be44dcf96fe0d4 | 41bcc9b97e946041625a9ab4f06a13e15b869458 | refs/heads/master | 2020-04-12T02:08:19.188867 | 2017-01-25T12:50:32 | 2017-01-25T12:50:32 | 68,005,409 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,501 | java | public class DeckTester
{
public static void main(String args[])
{
//private Player player1 = new player();
// private Player player2 = new player();
Deck deck = new Deck();
//int[] a = new int[52];
int[] p1;
int[] p2;
int[] variableDeck = deck.deck();
deck.shuffle();
deck.deal();
//deck.p1();
//deck.p2();
p1 = deck.getP1();
p2 = deck.getP2();
int counter = 1;
/* for( int value = 0; value < p1.length; value++)
{
System.out.println("Player1 Test hand" + counter + " " + p1[value]);
counter++;
}*/
// System.out.println();
for( int value = 0; value < p2.length; value++)
{
System.out.println("Player2 Test hand" + counter + " " + p2[value]);
counter++;
}
/*int card = 1;
for(int count = 0; count < a.length; count++)
{
if(count>0&&count%4==0)
card++;
a[count] = card;
}
for (int j = 0; j < a.length; j++)
System.out.print(a[j]);
System.out.print("\n");
a = deck.shuffle(a);
for (int i = 0; i < a.length; i++)
{
if(a[i]%2 != 0)
player1.addCard(a);
else
player2.addCard();
} */
}
} | [
"kyle.chin@homail.com"
] | kyle.chin@homail.com |
8fffd19e70d0f9f20170267ab1c6a681eb6c4642 | e15507aad164ca8480d1d25f076324dd578e31e5 | /my_library/src/main/java/ua/com/library/dao/CountryDao.java | bd737bdcc86ae82ed2c94536b584ba0388d11a9f | [] | no_license | slayerbear/Yuris | 1b801907dccee84d10022543206a8ce3edaaa054 | 058b0d0597ba8afb5345ece848a3d23388a6b3c5 | refs/heads/master | 2020-05-29T15:11:33.921103 | 2017-06-14T09:57:41 | 2017-06-14T09:57:41 | 65,761,121 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 690 | java | package ua.com.library.dao;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import ua.com.library.entity.Author;
import ua.com.library.entity.City;
import ua.com.library.entity.Country;
public interface CountryDao extends JpaRepository<Country, Integer> {
Country findByName(String name);
@Query("select distinct a from Country a left join fetch a.cities")
List<Country> findCountryWithCities();
@Query("select c from Country c left join fetch c.cities ct where c.id =:id")
Country some(@Param("id") int id);
}
| [
"slayerskad@gmail.com"
] | slayerskad@gmail.com |
15f74b7b14955c4a94e53d95018e1512944728e1 | fc5c2be18623109ddb055afa61ae915f620c99ee | /app/src/test/java/com/nsbhasin/heydoc/ExampleUnitTest.java | f2d1855c688217719616ab11933f4e2228621874 | [] | no_license | TheNsBhasin/HeyDoc | 95e3171789eaabdc4d1a3c5de09cf8d8717ca2ff | de4e983a80d5ee2624fe7a8d67a85f20eeb2b5be | refs/heads/master | 2020-04-03T04:55:56.838280 | 2018-10-28T02:38:25 | 2018-10-28T02:38:25 | 155,028,672 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 380 | java | package com.nsbhasin.heydoc;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"nsbhasincool@gmail.com"
] | nsbhasincool@gmail.com |
4fa6d5a7fb1ba228252db49ab9063e7a815e9fef | 00a06b0a56f94f4d92803d6851ca5dde0e12fba5 | /BinarySearch/Rotate List Left by K.java | 66443451f7bd5a0c53b8845ede3f044cb2a9aeba | [] | no_license | Paco17/Interview-Code | efebee2ec2bd2d6cdb3d9acbe3f3f9019d5e7e6f | 7b7623b60d6c6d8b5087ae6674761b4c3097d182 | refs/heads/master | 2023-04-28T02:52:08.408908 | 2021-05-17T03:21:10 | 2021-05-17T03:21:10 | 291,393,352 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,023 | java | class Solution {
public int[] solve(int[] nums, int k) {
// Write your code ere
if(k==0 || nums.length<=1|| k==nums.length)
return nums;
//Algorithm Time(n) Space(n)
/*int[] array = new int[nums.length];
int i=0;
k %= nums.length;
while(i<array.length){
if(k>=nums.length){
k=0;
}
array[i++] = nums[k++];
}
return array;*/
//Algorithm Time(n) Space(1) Doing swaps
k%= nums.length;
int i=k;
int cont = 0;
while(cont<nums.length){
//Swap
int tmp = nums[i];
nums[i] = nums[i-k];
nums[i-k] = tmp;
i++;
cont++;
}
if(nums.length%2>0 && k%2 == 0){
int tmp = nums[nums.length-1];
nums[nums.length-1] = nums[nums.length-2];
nums[nums.length-2] = tmp;
}
return nums;
}
} | [
"326franciscorv@gmail.com"
] | 326franciscorv@gmail.com |
e0f8d7bd1aa08e9729cf1ed1a442c8c1df5b871f | 56456387c8a2ff1062f34780b471712cc2a49b71 | /com/google/android/gms/internal/zzlz$2.java | 8553339b9516256d87afb9be0edc9f8ed4925c4e | [] | no_license | nendraharyo/presensimahasiswa-sourcecode | 55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50 | 890fc86782e9b2b4748bdb9f3db946bfb830b252 | refs/heads/master | 2020-05-21T11:21:55.143420 | 2019-05-10T19:03:56 | 2019-05-10T19:03:56 | 186,022,425 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 574 | java | package com.google.android.gms.internal;
final class zzlz$2
extends zzlz
{
zzlz$2(String paramString, Long paramLong)
{
super(paramString, paramLong);
}
protected Long zzcv(String paramString)
{
zzlz.zza localzza = zzlz.zzpY();
String str = this.zzvs;
Long localLong = (Long)this.zzvt;
return localzza.getLong(str, localLong);
}
}
/* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\com\google\android\gms\internal\zzlz$2.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/ | [
"haryo.nendra@gmail.com"
] | haryo.nendra@gmail.com |
ae285a0797f9f8a5cdeecaf0ab295b5eb73edc75 | 39f37621432320e1d17445db4897caead571d12b | /HospitalManagement/src/main/java/com/hospital/dao/AppointmentInt.java | 532688eddfe628f9dee996683c7510d8e10a7ce6 | [] | no_license | ashutoshharmalkar/hospital | 508ac00dd7fe3c4e73b9c60569be2eb6d5f5e770 | 4c45ac3f313c911c0a5b606edac88aa8aa9eedff | refs/heads/master | 2023-02-27T03:26:43.933708 | 2021-02-01T18:32:46 | 2021-02-01T18:32:46 | 335,046,861 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 64 | java | package com.hospital.dao;
public interface AppointmentInt {
}
| [
"harmalkarashutosh@gmail.com"
] | harmalkarashutosh@gmail.com |
8a210ef1e6161d07e83bbeebf044ae3fbf49ea33 | 4c67b100a481992bd851a89d62e9144b618f36d9 | /src/main/java/edu/lc/string/LongestCommonPrefix.java | 8e51b51dd78b44b9d8e134d1f1efc0b0fe3fd5e8 | [] | no_license | mehralalit/codebot | 0867ef3674e75f2188ce10de545dd4541ccd9d18 | e059d463d01a62143cf9a8590896e9885ed07f1a | refs/heads/master | 2022-05-08T20:24:17.892464 | 2020-11-26T04:54:24 | 2020-11-26T04:54:24 | 245,286,719 | 0 | 0 | null | 2020-11-26T04:54:25 | 2020-03-05T23:13:40 | Java | UTF-8 | Java | false | false | 1,451 | java | package edu.lc.string;
/**
* #14 https://leetcode.com/problems/longest-common-prefix
*
* @author Lalit Mehra
*
*/
public class LongestCommonPrefix {
static class Solution {
public String longestCommonPrefix(String[] strs) {
if (strs.length == 0)
return "";
int smallestStrLength = Integer.MAX_VALUE;
for (int index = 0; index < strs.length; index++) {
if (smallestStrLength > strs[index].length()) {
smallestStrLength = strs[index].length();
}
}
int endIndex = 0;
boolean flag = true;
for (int i = 0; i < smallestStrLength; i++) {
for (int j = 1; j < strs.length; j++) {
if (strs[0].charAt(i) != strs[j].charAt(i)) {
flag = false;
break;
}
}
if (flag)
endIndex++;
else
break;
}
if (endIndex == 0)
return "";
else
return strs[0].substring(0, endIndex);
}
}
static class Solution2 {
public String longestCommonPrefix(String[] strs) {
if (strs.length == 0)
return "";
String prefix = strs[0];
for (int i = 1; i < strs.length; i++)
while (strs[i].indexOf(prefix) != 0) {
prefix = prefix.substring(0, prefix.length() - 1);
if (prefix.isEmpty())
return "";
}
return prefix;
}
}
public static void main(String[] args) {
Solution2 obj = new Solution2();
String[] strs = { "flower", "flow", "flight" };
String result = obj.longestCommonPrefix(strs);
System.out.println(result);
}
} | [
"mehralalit3@gmail.com"
] | mehralalit3@gmail.com |
ef9aa34937bcd9163879ab4a8123600dbdfb8684 | 54efd07898929f822d5c1acb13c5cf250aff48e7 | /app/src/main/java/com/example/colorssv/MainActivity.java | 82ad871574600889f4b040861ced188b19b44714 | [] | no_license | SakhayanaVin/ColorsSV | 4156d07e7ea6887bd8e4a7cd928536f5f8ae867e | f18af8ea4be3260e7cf5882a69a722266624cff3 | refs/heads/master | 2023-01-23T09:17:03.579125 | 2020-11-15T17:47:47 | 2020-11-15T17:47:47 | 313,088,843 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,243 | java | package com.example.colorssv;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
Button btnFon;
ConstraintLayout constraintLayout;
Context context;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btnFon = (Button)findViewById(R.id.idbtn);
constraintLayout = (ConstraintLayout) findViewById (R.id.IdConstL);
context = MainActivity.this;
btnFon.setOnClickListener(this);
}
@Override
public void onClick(View v) {
final CharSequence [] items = {getText(R.string.red),
getText(R.string.yellow), getText(R.string.green)
};
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.message);
builder.setItems(items, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int item) {
switch (item) {
case 0:
constraintLayout.setBackgroundResource(R.color.redColor);
Toast.makeText(context, R.string.red, Toast.LENGTH_LONG).show();
break;
case 1:
constraintLayout.setBackgroundResource(R.color.yellowColor);
Toast.makeText(context, R.string.yellow, Toast.LENGTH_LONG).show();
break;
case 2:
constraintLayout.setBackgroundResource(R.color.greenColor);
Toast.makeText(context, R.string.green, Toast.LENGTH_LONG).show();
break;
}
}
});
AlertDialog alertDialog = builder.create();
alertDialog.show();
}
} | [
"Sakhayana.vinokurova@mail.ru"
] | Sakhayana.vinokurova@mail.ru |
03376625982cb4dde2b7b6737600a7b6ce6c3571 | 5312913a0d885768a91504eeb1c75b1dce3e46b7 | /mapo-opt4j/src/org/opt4j/optimizer/de/package-info.java | 8fb01af6544e40eec1c15a1ce20c4e77ba8fb7e9 | [] | no_license | vicmns/mapo-opt4j | f5318f9fc5ef5888848324dd579746b5384ae780 | 96956681e42a4f9c72a4c3171c570e4837d55bf8 | refs/heads/master | 2021-01-15T23:35:29.326100 | 2015-04-16T17:27:52 | 2015-04-16T17:27:52 | 34,061,850 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 798 | java | /**
* Opt4J is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Opt4J is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Opt4J. If not, see http://www.gnu.org/licenses/.
*/
/**
* Provides the classes for a (Multi-Objective) Differential Evolution Algorithm.
*
*/
package org.opt4j.optimizer.de; | [
"vicmns@Zephie"
] | vicmns@Zephie |
9dff8afc4d45c039f333d15b5d3c0590a506614d | be16632b9c4bf9a4f72239779ba9510511b309db | /Current/Product/Production/Packages/FitNesse/Install/Product/FitNesse/Dev/fitnesse-plugins/src/com/targetprocess/integration/project/SourceControlTypeEnum.java | dd46b0255195c17b0d90f5550cf8cb23dba057b4 | [] | no_license | vardars/ci-factory | 7430c2afb577937fb598b5af3709990e674e7d05 | b83498949f48948d36dc488310cf280dbd98ecb7 | refs/heads/master | 2020-12-25T19:26:17.750522 | 2015-07-10T10:58:10 | 2015-07-10T10:58:10 | 38,868,165 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,419 | java |
package com.targetprocess.integration.project;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
/**
* <p>Java class for SourceControlTypeEnum.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="SourceControlTypeEnum">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="None"/>
* <enumeration value="Subversion"/>
* <enumeration value="SourceSafe"/>
* <enumeration value="Perforce"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlEnum
public enum SourceControlTypeEnum {
@XmlEnumValue("None")
NONE("None"),
@XmlEnumValue("Perforce")
PERFORCE("Perforce"),
@XmlEnumValue("SourceSafe")
SOURCE_SAFE("SourceSafe"),
@XmlEnumValue("Subversion")
SUBVERSION("Subversion");
private final String value;
SourceControlTypeEnum(String v) {
value = v;
}
public String value() {
return value;
}
public static SourceControlTypeEnum fromValue(String v) {
for (SourceControlTypeEnum c: SourceControlTypeEnum.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v.toString());
}
}
| [
"cifactory@571f4c53-cd24-0410-92e9-33dde47f2f63"
] | cifactory@571f4c53-cd24-0410-92e9-33dde47f2f63 |
e0ed4513ec3c405eeec786a77c7322c60e4c9de0 | db129f9f8b9f3a56e7cca83eb74a07915596a2cd | /cloud-stream-rabbitmq-provider8801/src/main/java/com/atguigu/service/IMessageProvider.java | bca158062e7ec5425c9068c2390e1f5119c496bf | [] | no_license | Liu-mingcong/cloud2021 | 9262513cc6c4b34e2c650ed0532693e0c0f711ae | 6c3f74d7de837cab682f436a6a9156dd505942cf | refs/heads/master | 2023-06-01T13:18:51.230941 | 2021-06-22T09:52:29 | 2021-06-22T09:52:29 | 379,206,539 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 165 | java | package com.atguigu.service;
/**
* 2 * @Author: Liu Mingcong
* 3 * @Date: 2021/2/8 22:29
* 4
*/
public interface IMessageProvider {
public String send();
}
| [
"320692934@qq.com"
] | 320692934@qq.com |
ce1c76b07633b5a1189d55cdb1f0ca7e40dbaaa4 | 800163265f573fa1db24bb05fa3b0f142b8ed6e1 | /app/src/main/java/com/hunter/helloandroid/module/custom/path/SvgPathParser.java | ef591105e502e09ad32d20289b269d4d1a13b0a3 | [] | no_license | Hunter0x7c7/HelloAndroid | eb2f1252d23326a64cbdd31491f6f52174d0c02f | 7e40c40f6c04ded9a49a8c3955dbd1fdc4a91219 | refs/heads/master | 2021-05-06T14:42:12.469061 | 2020-07-28T08:02:53 | 2020-07-28T08:02:53 | 113,393,044 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,733 | java | package com.hunter.helloandroid.module.custom.path;
import android.graphics.Path;
import android.graphics.PointF;
import java.text.ParseException;
/**
* Entity to parse Svg paths to {@link Path} items understandable by the Android SDK. Obtained
* from romainnurik Muzei implementation to avoid rewriting .
*
* @author romainnurik
*/
public class SvgPathParser {
private static final int TOKEN_ABSOLUTE_COMMAND = 1;
private static final int TOKEN_RELATIVE_COMMAND = 2;
private static final int TOKEN_VALUE = 3;
private static final int TOKEN_EOF = 4;
private int mCurrentToken;
private PointF mCurrentPoint = new PointF();
private int mLength;
private int mIndex;
private String mPathString;
protected float transformX(float x) {
return x;
}
protected float transformY(float y) {
return y;
}
public Path parsePath(String s) throws ParseException {
mCurrentPoint.set(Float.NaN, Float.NaN);
mPathString = s;
mIndex = 0;
mLength = mPathString.length();
PointF tempPoint1 = new PointF();
PointF tempPoint2 = new PointF();
PointF tempPoint3 = new PointF();
Path p = new Path();
p.setFillType(Path.FillType.WINDING);
boolean firstMove = true;
while (mIndex < mLength) {
char command = consumeCommand();
boolean relative = (mCurrentToken == TOKEN_RELATIVE_COMMAND);
switch (command) {
case 'M':
case 'm': {
// move command
boolean firstPoint = true;
while (advanceToNextToken() == TOKEN_VALUE) {
consumeAndTransformPoint(tempPoint1, relative && mCurrentPoint.x != Float.NaN);
if (firstPoint) {
p.moveTo(tempPoint1.x, tempPoint1.y);
firstPoint = false;
if (firstMove) {
mCurrentPoint.set(tempPoint1);
firstMove = false;
}
} else {
p.lineTo(tempPoint1.x, tempPoint1.y);
}
}
mCurrentPoint.set(tempPoint1);
break;
}
case 'C':
case 'c': {
// curve command
if (mCurrentPoint.x == Float.NaN) {
throw new ParseException("Relative commands require current point", mIndex);
}
while (advanceToNextToken() == TOKEN_VALUE) {
consumeAndTransformPoint(tempPoint1, relative);
consumeAndTransformPoint(tempPoint2, relative);
consumeAndTransformPoint(tempPoint3, relative);
p.cubicTo(tempPoint1.x, tempPoint1.y, tempPoint2.x, tempPoint2.y, tempPoint3.x,
tempPoint3.y);
}
mCurrentPoint.set(tempPoint3);
break;
}
case 'L':
case 'l': {
// line command
if (mCurrentPoint.x == Float.NaN) {
throw new ParseException("Relative commands require current point", mIndex);
}
while (advanceToNextToken() == TOKEN_VALUE) {
consumeAndTransformPoint(tempPoint1, relative);
p.lineTo(tempPoint1.x, tempPoint1.y);
}
mCurrentPoint.set(tempPoint1);
break;
}
case 'H':
case 'h': {
// horizontal line command
if (mCurrentPoint.x == Float.NaN) {
throw new ParseException("Relative commands require current point", mIndex);
}
while (advanceToNextToken() == TOKEN_VALUE) {
float x = transformX(consumeValue());
if (relative) {
x += mCurrentPoint.x;
}
p.lineTo(x, mCurrentPoint.y);
}
mCurrentPoint.set(tempPoint1);
break;
}
case 'V':
case 'v': {
// vertical line command
if (mCurrentPoint.x == Float.NaN) {
throw new ParseException("Relative commands require current point", mIndex);
}
while (advanceToNextToken() == TOKEN_VALUE) {
float y = transformY(consumeValue());
if (relative) {
y += mCurrentPoint.y;
}
p.lineTo(mCurrentPoint.x, y);
}
mCurrentPoint.set(tempPoint1);
break;
}
case 'Z':
case 'z': {
// close command
p.close();
break;
}
}
}
return p;
}
private int advanceToNextToken() {
while (mIndex < mLength) {
char c = mPathString.charAt(mIndex);
if ('a' <= c && c <= 'z') {
return (mCurrentToken = TOKEN_RELATIVE_COMMAND);
} else if ('A' <= c && c <= 'Z') {
return (mCurrentToken = TOKEN_ABSOLUTE_COMMAND);
} else if (('0' <= c && c <= '9') || c == '.' || c == '-') {
return (mCurrentToken = TOKEN_VALUE);
}
// skip unrecognized character
++mIndex;
}
return (mCurrentToken = TOKEN_EOF);
}
private char consumeCommand() throws ParseException {
advanceToNextToken();
if (mCurrentToken != TOKEN_RELATIVE_COMMAND && mCurrentToken != TOKEN_ABSOLUTE_COMMAND) {
throw new ParseException("Expected command", mIndex);
}
return mPathString.charAt(mIndex++);
}
private void consumeAndTransformPoint(PointF out, boolean relative) throws ParseException {
out.x = transformX(consumeValue());
out.y = transformY(consumeValue());
if (relative) {
out.x += mCurrentPoint.x;
out.y += mCurrentPoint.y;
}
}
private float consumeValue() throws ParseException {
advanceToNextToken();
if (mCurrentToken != TOKEN_VALUE) {
throw new ParseException("Expected value", mIndex);
}
boolean start = true;
boolean seenDot = false;
int index = mIndex;
while (index < mLength) {
char c = mPathString.charAt(index);
if (!('0' <= c && c <= '9') && (c != '.' || seenDot) && (c != '-' || !start)) {
// end of value
break;
}
if (c == '.') {
seenDot = true;
}
start = false;
++index;
}
if (index == mIndex) {
throw new ParseException("Expected value", mIndex);
}
String str = mPathString.substring(mIndex, index);
try {
float value = Float.parseFloat(str);
mIndex = index;
return value;
} catch (NumberFormatException e) {
throw new ParseException("Invalid float value '" + str + "'.", mIndex);
}
}
}
| [
"1125607007@qq.com"
] | 1125607007@qq.com |
6d13baeac61ba7fc99b8e0de089ed4fb3e88ee42 | f32ea1b5020cc20adc7827b9362bf1c356eb9ad0 | /src/com/bkhn/ltnc/vnetsim/algorithms/PrimAlgorithm.java | 517b608368c3c9c1527d9f118db9f2095ca8511a | [] | no_license | marine1213/vnetsim | 0402b651bab45b43798b1b9c2f7f78931a0f1ca4 | d1fe2f46a570199f8ce2d31b9895045711798274 | refs/heads/master | 2021-01-10T07:13:27.098044 | 2011-12-11T03:49:51 | 2011-12-11T03:49:51 | 55,885,890 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,134 | java | /**
* @(#)PrimAlgorithm.java - Class xây dựng cây CMST dựa vào thuật toán Prim
*
* @author : Vũ Thành Công
*
* @Purpose: Bài tập lớn môn Tổ chức va quy hoạch mạng viễn thông
*
* @Usage: Sử dụng để xây dựng mạng Access Network
*
* @version 1.0 2011/4/18
*/
package com.bkhn.ltnc.vnetsim.algorithms;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.bkhn.ltnc.vnetsim.myobjects.Edge;
import com.bkhn.ltnc.vnetsim.myobjects.Graph;
import com.bkhn.ltnc.vnetsim.myobjects.Vertex;
public class PrimAlgorithm extends Thread{
private final Graph myGraph;
private final List<Vertex> nodes; // Tập các đỉnh
private final List<Edge> edges; // Tập các cạnh
private Vertex source; // Nút nguồn
private int wMax;
private Set<Vertex> listTree;
private Set<Vertex> listFringe;
private Map<Vertex, Integer> distance;
private Map<Vertex,Set<Vertex>> setMST;
public PrimAlgorithm(Graph graph,int wmax,Vertex source){
this.myGraph = graph;
this.wMax = wmax;
this.nodes = new ArrayList<Vertex>(graph.getVertices());
//System.out.println(nodes);
this.edges = new ArrayList<Edge>(graph.getEdges());
this.source = source;
}
public void execute(){
//Initialize
listTree = new HashSet<Vertex>();
listTree.add(source);
listFringe = new HashSet<Vertex>(myGraph.getVertices());
listFringe.remove(source);
distance = new HashMap<Vertex, Integer>();
setMST = new HashMap<Vertex, Set<Vertex>>();
for(Vertex node : nodes){
Set<Vertex> mset = new HashSet<Vertex>();
mset.add(node);
setMST.put(node, mset);
}
parentInit();
refreshFringe(source);
//System.out.println("Source = "+source);
while(!listFringe.isEmpty()){
Vertex minNode = getMinimum(listFringe);
//System.out.println("Min = "+minNode+",distance = "+distance.get(minNode)+", Parent = "+minNode.getParentId());
if(satisfiedWeight(minNode)){
updateCMST(minNode);
listTree.add(minNode);
listFringe.remove(minNode);
refreshFringe(minNode);
unionSets(minNode, myGraph.getParent(minNode));
//System.out.println(minNode+"-->MST");
}
else {
//System.out.println(minNode+ " Khong thoa man dk trong so");
minNode.setParent(source);
distance.remove(minNode);
distance.put(minNode, Integer.MAX_VALUE);
//System.out.println(listFringe);
}
}
}
private void unionSets(Vertex src, Vertex des) {
Set<Vertex> s1 = setMST.get(src);
Set<Vertex> s2 = setMST.get(des);
// Hợp nhất 2 tập hợp
Set<Vertex> union = new HashSet<Vertex>(s1);
union.addAll(s2);
List<Vertex> tmpList = new ArrayList<Vertex>(union);
Collections.sort(tmpList, Vertex.WeightComparator);
union.clear();
union.addAll(tmpList);
for(Object obj : union){
Vertex node = (Vertex)obj;
setMST.remove(node);
setMST.put(node, union);
}
}
private boolean satisfiedWeight(Vertex node) {
Vertex parent = myGraph.getParent(node);
if(parent.getId()==source.getId()){
return true;
}else if((getSumOfWeights(setMST.get(node))+getSumOfWeights(setMST.get(parent)))<=wMax)return true;
else return false;
}
/*
* Trả về tổng trọng số các nút trong danh sách
*/
private int getSumOfWeights(Set<Vertex> set) {
int value = 0;
for(Vertex node : set){
if(!node.equals(source))
value+=node.getWeight();
}
return value;
}
private void updateCMST(Vertex minNode) {
myGraph.getEdge(minNode.getId(), minNode.getParentId()).setStatus("AN");
}
private Vertex getMinimum(Set<Vertex> fringe) {
//System.out.println("Chay getMinimum!");
Vertex minimum = null;
for(Vertex node : fringe){
if(minimum == null){
minimum = node;
}
else if(distance.get(node)<distance.get(minimum)){
minimum = node;
}
}
return minimum;
}
private void refreshFringe(Vertex node) {
ArrayList<Vertex> neighbours = getNeighbours(node);
for(Vertex nb: neighbours){
if(!listTree.contains(nb)){
int cost = myGraph.getCost(node, nb);
if(cost < distance.get(nb)){
nb.setParent(node);
//System.out.println(nb+" set parent is "+node);
distance.remove(nb);
distance.put(nb,cost);
}
}
}
}
private ArrayList<Vertex> getNeighbours(Vertex node) {
ArrayList<Vertex> neighbours = new ArrayList<Vertex>();
for(Edge edge : edges){
if(edge.getSource().equals(node))neighbours.add(edge.getDestination());
else if (edge.getDestination().equals(node))neighbours.add(edge.getSource());
}
return neighbours;
}
private void parentInit() {
for(Vertex node:listFringe){
node.setParent(source);
int cost = myGraph.getCost(node, source);
//System.out.println("Node = "+node+ ",Cost = "+cost);
distance.put(node,cost);
}
}
public void run(){
this.execute();
}
}
| [
"vuthanhcong.ict@gmail.com"
] | vuthanhcong.ict@gmail.com |
c3ce5e20ec370f8846d7627c57b7ffbf72bcd08e | eeb2246814ee709505c467691ec9b940ffd7a18f | /Jmccms/src/main/java/com/jmccms/util/Base64Util.java | aa5523911bfc0760cc88f3d5bb28ef2bdaf2e919 | [] | no_license | arraycto/EducationPlatform-1 | 8dd3f1df7dae3cafffb8847652a405fff0d695c5 | bea96d2ffb42aed969a4f3554396590ad8b2f7db | refs/heads/master | 2021-01-01T12:56:34.681699 | 2019-07-17T07:36:25 | 2019-07-17T07:36:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,823 | java | package com.jmccms.util;
import org.springframework.util.StringUtils;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
/**
* @Description: Base64Util加密帮助类
* @BelongsProject: Jmccms
* @BelongsPackage: com.jmccms.util
* @Author: ChenYongJia
* @CreateTime: 2019-05-03 22:24
* @Email chen87647213@163.com
*/
public class Base64Util {
/**
* BASE64解密
* @param key
* @return
* @throws Exception
*/
public static String decryptBASE64(String key) throws Exception {
if(StringUtils.isEmpty(key)) {
return null;
}
byte[] bytes = (new BASE64Decoder()).decodeBuffer(key);
return new String(bytes);
}
/**
* BASE64加密
*
* @param key
* @return
* @throws Exception
*/
public static String encryptBASE64(String key) throws Exception {
return (new BASE64Encoder()).encodeBuffer(key.getBytes());
}
public static String encryptBASE64UTF8(String key) throws Exception {
return (new BASE64Encoder()).encode(key.getBytes()).replace("\n", "").replace("\r", "");
}
/* public static void main(String[] args) {
try {
String data = Base64Util.decryptBASE64("e2NvcnBJZDond3g5MjM0MmExNWUxZGJhYjc0JyxhZ2VudElkOicxMDAwMDE0J30=");
String data1 = Base64Util.decryptBASE64("aHR0cDovL2N4amdnbGZ0LmNwaWMuY29tLmNuL2N4amdnbC9waG9uZW1hcA==");
String data4 = Base64Util.decryptBASE64("aHR0cDovL2N4amdnbGZ0LmNwaWMuY29tLmNuL2N4amdnbC9jb21tb24vdG9KZ2dsP2N4amdnbD1taWNDbGFzcy9tb2JpbGU=");
String data2 = Base64Util.encryptBASE64("http://cxjgglft.cpic.com.cn/cxjggl/phonemap");
String data3 = Base64Util.encryptBASE64("http://cxjgglft.cpic.com.cn/cxjggl/common/toJggl?cxjggl=mobile");
// String userId = MD5Util.getMD5("722334");
} catch (Exception e) {
}
}*/
}
| [
"chen867647213@163.com"
] | chen867647213@163.com |
57aff7e50ce08ef54e33d9c149d45ae3cdfea91b | 1dc52b7906afa5cc3a3aebaccad27a4cca369ffb | /src/org/adaptlab/android/logging/LogNode.java | c27a21e77237040a9913ae06223577137c620387 | [
"MIT"
] | permissive | DukeMobileTech/ActivitySensors | 9bbdfd505073a31dd1eda9795958e5e5128db304 | cc78f747d98edb942a567f1a75d4cf688c7dd773 | refs/heads/master | 2021-01-02T09:37:15.892764 | 2014-11-02T17:44:12 | 2014-11-02T17:44:12 | 25,588,195 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,804 | java | /*
* Copyright (C) 2014 The Android Open Source Project
*
* 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.adaptlab.android.logging;
/**
* Basic interface for a logging system that can output to one or more targets.
* Note that in addition to classes that will output these logs in some format,
* one can also implement this interface over a filter and insert that in the chain,
* such that no targets further down see certain data, or see manipulated forms of the data.
* You could, for instance, write a "ToHtmlLoggerNode" that just converted all the log data
* it received to HTML and sent it along to the next node in the chain, without printing it
* anywhere.
*/
public interface LogNode {
/**
* Instructs first LogNode in the list to print the log data provided.
* @param priority Log level of the data being logged. Verbose, Error, etc.
* @param tag Tag for for the log data. Can be used to organize log statements.
* @param msg The actual message to be logged. The actual message to be logged.
* @param tr If an exception was thrown, this can be sent along for the logging facilities
* to extract and print useful information.
*/
public void println(int priority, String tag, String msg, Throwable tr);
}
| [
"dranoel.bravo@gmail.com"
] | dranoel.bravo@gmail.com |
6c61403825cb847aef26071e12e38d7cafbb8d41 | bee7d886548a27a141ee7b4b191f94df0dbd025d | /src/day53_customExceptions/FinalMethod.java | ff6b483468ce656c366d5f406e25dd05aaff3194 | [] | no_license | dilzatgithub/Summer2020_B20 | 30f8cda44119a35840b4874ca62e11864c91c031 | 423cb25be5b61186e074ea7c06a074087efa5ad8 | refs/heads/master | 2023-01-20T05:49:02.945052 | 2020-12-01T04:23:40 | 2020-12-01T04:23:40 | 295,107,624 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 169 | java | package day53_customExceptions;
class A{
public final void method(){
System.out.println("Enter username");
}
}
public class FinalMethod extends A{
}
| [
"dilzat.dilmurat@gmail.com"
] | dilzat.dilmurat@gmail.com |
50ea6349f7db813f3f7164eb2616debfe326e9af | abc7f4a4cd97601cec52bacd3ffd67fa12104bd5 | /app/build/generated/source/buildConfig/debug/com/example/leavingearth/BuildConfig.java | bb7d0ca0dee095ad3e635cb95800bd4c8774a36d | [] | no_license | EGREllis/LeavingEarth | 2fd9cd12cb932786198ccc11da69e589ca2f5ddb | 1d25267f3d22d52b41ac44fa349826f39acc09d4 | refs/heads/master | 2020-06-13T16:39:46.180020 | 2019-07-01T17:25:25 | 2019-07-01T17:25:25 | 194,714,856 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 455 | java | /**
* Automatically generated file. DO NOT MODIFY
*/
package com.example.leavingearth;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.example.leavingearth";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}
| [
"edwardellis.egre@gmail.com"
] | edwardellis.egre@gmail.com |
5324e0c85f40332cb512a91cbb781c309e2afd90 | e3109a079793c5a66891aebef6dd7c2a44f8d360 | /base/java/k/b/a/i2/a.java | 687e78600cfcb742cf7b4e7a83a77773bb0f09d1 | [] | no_license | msorland/no.simula.smittestopp | d5a317b432e8a37c547fc9f2403f25db78ffd871 | f5eeba1cc4b1cad98b8174315bb2b0b388d14be9 | refs/heads/master | 2022-04-17T12:50:10.853188 | 2020-04-17T10:14:01 | 2020-04-17T10:14:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 442 | java | package k.b.a.i2;
import k.b.a.e;
import k.b.a.e1;
import k.b.a.f;
import k.b.a.n;
import k.b.a.o;
import k.b.a.t;
import k.b.a.u;
import k.b.a.x;
public class a extends n {
public o x;
public x y;
public a(u uVar) {
this.x = (o) uVar.a(0);
this.y = (x) uVar.a(1);
}
public t c() {
f fVar = new f(2);
fVar.a((e) this.x);
fVar.a((e) this.y);
return new e1(fVar);
}
}
| [
"djkaty@users.noreply.github.com"
] | djkaty@users.noreply.github.com |
380387fc70168cceb162941c948cf583688a07a9 | 67c264e9fe87bdd5f9fb814336dbee9ba09a861c | /src/main/java/com/tofi/challenge/managepatientdata/model/visit/imp/CreateVisitInput.java | ac8cfa6fda5ffd43b5236d28390170192c10946b | [] | no_license | mohammad1990/tofi | ea70c72e556bf39c9be31ee820f280a507ea308f | 015a4506821b2881d097dc70452496b073c92b15 | refs/heads/main | 2023-06-10T08:14:31.636375 | 2021-06-20T04:53:49 | 2021-06-20T04:53:49 | 378,560,302 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 520 | java | package com.tofi.challenge.managepatientdata.model.visit.imp;
import com.tofi.challenge.managepatientdata.constants.Reason;
import com.tofi.challenge.managepatientdata.constants.VisitType;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.UUID;
@Data
@AllArgsConstructor
public class CreateVisitInput {
private UUID patientId;
private LocalDateTime visitDate;
private VisitType visitType;
private Reason reason;
private String familyHistory;
}
| [
"mohammad.tofi@gmail.com"
] | mohammad.tofi@gmail.com |
822f1c090f71edd04834a8a18939c358d2b34117 | fbbdd6a11a6b735677af3892f4ad8c25837d870b | /src/state/voteplus/RepeatVoteState.java | 66df8708ba758e51639a3cc6fdb63f064dcad416 | [] | no_license | Diana-Fox/DesignPattern | 488a60b41165b817f6472c0a05966246a47eaaf4 | b0a5d2247eb37ff732edf5479973b4262f51d5df | refs/heads/master | 2023-08-14T21:42:20.010725 | 2021-09-24T11:03:14 | 2021-09-24T11:03:14 | 394,197,409 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 432 | java | package state.voteplus;
public class RepeatVoteState implements VoteState {
@Override
public void vote(String user, String voteItem, VoteManger voteManger) {
System.out.println("请不要重复投票");
//判断一下,如果恶意投票就改变一下状态
if (voteManger.getMapVoteCount().get(user) >= 4) {
voteManger.getMapState().put(user, new SpiteVoteState());
}
}
}
| [
"Jxiuye@163.com"
] | Jxiuye@163.com |
1e13791a2731b7e27f3d42b606525c65d72c74ea | cf170f20fb9ab2827a045e13657e8c06aa8c3b7c | /src/Requirements.java | 063eae89b063f8c9d4c4eae5bd2e28e138a65f7a | [] | no_license | Serena-cell/fudanrmtool | 42ddb8bb05116c05a8ea96c4ac06bc63e596fe56 | f986497f53359a3ede9537b0c81d6993f6e3e68d | refs/heads/master | 2023-06-09T19:19:20.599599 | 2021-07-05T13:02:57 | 2021-07-05T13:02:57 | 382,889,974 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 333 | java | /**
* 需求条目类
*/
public class Requirements {
public String requirementID;
public String docID;
public String requirementNote;
public String linkID;
Requirements(String reqID, String docID, String note) {
requirementID = reqID;
this.docID = docID;
requirementNote = note;
}
} | [
"18307130367@fudan.edu.cn"
] | 18307130367@fudan.edu.cn |
ea632f192a295171e736a2d0289a62117533ec1c | aaee5c3780402c18587d73927c7e5d40555be2fd | /src/main/java/com/wzq/rabbitmq/queues/Worker.java | 84f4ff16eb21b59c45a715c409643cb9e0148f52 | [] | no_license | wzqwsrf/RabbitMQ-demo | 2b366bef3ddc7919ab66ea2def1251eca5c0b7ea | 32f3227726346ecc5484406a2c202f06fff81d3a | refs/heads/master | 2021-01-19T11:42:27.257729 | 2016-06-22T10:20:45 | 2016-06-22T10:20:45 | 61,684,859 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,032 | java | package com.wzq.rabbitmq.queues;
import com.rabbitmq.client.*;
import java.io.IOException;
import java.util.concurrent.TimeoutException;
/**
* Author: zhenqing.wang <wangzhenqing1008@163.com>
* Date: 2016-06-22 14:12:30
* Description: Work queues
*/
public class Worker {
private static final String TASK_QUEUE_NAME = "task_queue";
public void receive() throws IOException, TimeoutException {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("127.0.0.1");
Connection connection = factory.newConnection();
final Channel channel = connection.createChannel();
channel.queueDeclare(TASK_QUEUE_NAME, true, false, false, null);
System.out.println(" [*] Waiting for messages. To exit press CTRL+C");
channel.basicQos(1);
Consumer consumer = new DefaultConsumer(channel) {
@Override
public void handleDelivery(String consumerTag, Envelope envelope,
AMQP.BasicProperties properties, byte[] body) throws IOException {
String message = new String(body, "UTF-8");
System.out.println("Worker1 Received '" + message + "'");
try {
doWork();
} finally {
System.out.println("Worker1 [x] Done");
channel.basicAck(envelope.getDeliveryTag(), false);
}
}
};
channel.basicConsume(TASK_QUEUE_NAME, false, consumer);
}
private void doWork() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
}
public static void main(String[] args) {
Worker worker = new Worker();
try {
worker.receive();
} catch (IOException e) {
e.printStackTrace();
} catch (TimeoutException e) {
e.printStackTrace();
}
}
}
| [
"wzqwsrf@126.com"
] | wzqwsrf@126.com |
2baba42f87807cf516ae25d89d97eb37fe788182 | c20131d55f26cf46975803dc53dfdd15a96773f7 | /src/test/java/com/sanshao90/mycollection/queue/MySeqCycleQueueTest.java | f9ef3f3c32f7b6c317073394de927d3297391c65 | [] | no_license | luckylhb90/mycollection | 6af43e12b40a826260509224eb4aab95cfcf6f06 | 26273a61317d6f34ff2f3f0451949c882b21964d | refs/heads/master | 2021-01-24T08:49:31.831991 | 2018-03-02T14:13:17 | 2018-03-02T14:13:17 | 122,997,101 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 604 | java | package com.sanshao90.mycollection.queue;
import org.junit.Test;
/**
* @Project : mycollection
* @Description : TODO
* @Author : sanshao90
* @Date : 2018/3/2
*/
public class MySeqCycleQueueTest {
@Test
public void test() {
MyQueue<String> queue = new MySeqCycleQueue<>();
queue.dequeue();
System.out.println(queue.toString());
queue.enqueue("A");
queue.enqueue("B");
queue.enqueue("C");
queue.enqueue("D");
System.out.println(queue.toString());
queue.dequeue();
System.out.println(queue.toString());
}
}
| [
"luckylhb90@gmail.com"
] | luckylhb90@gmail.com |
aaa51e7151e4023d6ebc420890c817c10617009f | e2c7f9d3ed11f5632a1b96029dfa85d8a2f55963 | /src/edu/ucsb/cs56/w16/drawings/shouzhiwan/advanced/WritePictureToFile.java | 346fc3e562f045d3004a0c5f899baa3760dc2564 | [
"MIT"
] | permissive | vincenicoara/W16-lab04 | 59dde14ddae8d7f25f2e74728298f7f0d75d22be | 7c9dd1bf837b81d955fd75c702e56f300f2188d5 | refs/heads/master | 2021-01-15T11:44:36.328281 | 2016-02-05T01:09:16 | 2016-02-05T01:09:16 | 49,993,856 | 0 | 13 | MIT | 2023-07-03T03:05:31 | 2016-01-20T00:50:19 | Java | UTF-8 | Java | false | false | 2,702 | java | package edu.ucsb.cs56.w16.drawings.shouzhiwan.advanced;
import java.awt.image.BufferedImage;
import java.awt.Graphics2D;
import java.io.File;
import javax.imageio.ImageIO;
import java.io.IOException;
/**
* A class with a main method that can write a drawing to a graphics file.
*
* @author P. Conrad,
* @version for CS56, W16, UCSB
*/
public class WritePictureToFile
{
public static void usage()
{
System.out.println("Usage: java WritePictureToFile whichImage mypic");
// @@@ modify the next line to describe your picture
System.out.println(" whichImage should be 1,2 or 3");
System.out.println(" whichImage chooses from drawPicture1, 2 or 3");
System.out.println(" .png gets added to the filename");
System.out.println(" e.g. if you pass mypic, filename is mypic.png");
System.out.println("Example: java WritePictureToFile 3 foo");
System.out.println(" produces foo.png from drawPicture3");
}
/** Write the chosen picture to a file.
*
* @param args command line arguments
*/
public static void main(String[] args)
{
if (args.length != 2) {
usage();
System.exit(1);
}
String whichPicture = args[0]; // first command line arg is 1, 2, 3
String outputfileName = args[1]; // second command line arg is which pic
final int WIDTH = 640;
final int HEIGHT = 480;
// create a new image
// TYPE_INT_ARGB is "RGB image" with transparency (A = alpha channel)
BufferedImage bi =
new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = bi.createGraphics();
if (whichPicture.equals("1")) {
AllMyDrawings.drawPicture1(g2);
} else if (whichPicture.equals("2")) {
AllMyDrawings.drawPicture2(g2);
} else if (whichPicture.equals("3")) {
AllMyDrawings.drawPicture3(g2);
}
final String imageType = "png"; // choices: "gif", "png", "jpg"
// We must declare this variable outside the try block,
// so we can see it inside the catch block
String fullFileName = "";
try {
fullFileName = outputfileName + "." + imageType;
File outputfile = new File(fullFileName);
ImageIO.write(bi, imageType, outputfile); // actually writes file
System.out.println("I created " + fullFileName); // tell the user
} catch (IOException e) {
System.err.println("Sorry, an error occurred--I could not create "
+ fullFileName
+"\n The error was: "
+ e.toString());
}
}
}
| [
"shouzhiwan@umail.ucsb.edu"
] | shouzhiwan@umail.ucsb.edu |
d109848c017e64d6f66fff4823cfe923106aeb1e | eac6ececf9e0b4384439d1dfcc71fe427d7f35a2 | /LoadingView/app/src/androidTest/java/com/dotengine/linsir/loadingview/ExampleInstrumentedTest.java | a56e5d6e993620d21e5d45e2a3cca46487807ad5 | [] | no_license | zhongyh3818/mCustomView | 9fabf053cbfa44ba1e78594251c968107e227f32 | ba84d9fc1092385c9f710670ad15e046491dc742 | refs/heads/master | 2021-08-20T03:08:36.081341 | 2017-11-28T03:17:05 | 2017-11-28T03:17:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 768 | java | package com.dotengine.linsir.loadingview;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.dotengine.linsir.loadingview", appContext.getPackageName());
}
}
| [
"18304523113@163.com"
] | 18304523113@163.com |
a3a5af2dec35e22424dae264dd35be8685669b17 | 3aec5417aad187b5cb499f859a7a0186dbfa2f35 | /thirdPlugs/src/third/servlet/NewsListServlet.java | d4462d7364d73350de305c02dd7f10e3cb4fa867 | [] | no_license | xiaowei12345/xiaowei | 0695e46263b91868dc0a67f2194e0ba830f06421 | 7c919fce2c003d387d886e83e91fb76828dd8d34 | refs/heads/master | 2021-01-22T05:43:13.949572 | 2017-05-27T07:37:59 | 2017-05-27T07:37:59 | 92,491,743 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,023 | java | package third.servlet;
import intf.FNews;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.jiuqi.dna.core.http.DNAHttpServlet;
import com.jiuqi.dna.core.spi.application.AppUtil;
import com.jiuqi.dna.core.spi.application.ContextSPI;
import com.jiuqi.dna.core.spi.application.Session;
public class NewsListServlet extends DNAHttpServlet {
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
private static final long serialVersionUID = 1L;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
doPost(req, resp);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
final Session session = AppUtil.getDefaultApp().newSession(null, null);
ContextSPI context = session.newContext(false);
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/json");
JSONObject data = new JSONObject();
JSONArray news = new JSONArray();
try {
data.put("pagenum", 100);
data.put("limit", 5);
List<FNews> list = context.getList(FNews.class);
for(FNews f : list){
JSONObject json = new JSONObject();
json.put("title", f.getTitle());
json.put("content", f.getContent());
json.put("time", sdf.format(new Date(f.getTime())));
json.put("read", "1003");
json.put("url", "/m/detail?id="+f.getRecid().toString());
news.put(json);
}
data.put("news", news);
} catch (JSONException e) {
e.printStackTrace();
}
ServletUtil.response(response, data);
}
}
| [
"xiaowei@qq.com"
] | xiaowei@qq.com |
89962d3a422535bdb69e3127e3209f75eb10ea55 | c4fbfc635607f9c9e7de89383833ca73d71832d6 | /SimpleAnnotationTool/src/main/java/com/zy/security/annotation/EnableResourceServer.java | 2bd1aaf8147ec649e4f43340021e91b3f2016868 | [] | no_license | azurite-Y/SimpleSecurityOAuth2 | e195c0543b61bdf7203cdfeb510ee21419164af8 | 04c17918b4917e5e1210b8c68a183003a6dd563e | refs/heads/master | 2022-11-28T11:59:28.696125 | 2020-07-18T05:22:36 | 2020-07-18T05:22:36 | 252,095,584 | 1 | 0 | null | 2022-11-15T23:49:55 | 2020-04-01T06:52:15 | Java | UTF-8 | Java | false | false | 485 | java | package com.zy.security.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
/**
* @author: zy;
* @DateTime: 2020年3月24日 下午4:12:21;
* @Description: 资源服务器注解
*/
public @interface EnableResourceServer {
}
| [
"15969413461@163.com"
] | 15969413461@163.com |
50e4d8c43b4e47acf0082280dc423cfefef8e8e8 | db97ce70bd53e5c258ecda4c34a5ec641e12d488 | /src/main/java/com/alipay/api/domain/AlipayEcoRenthouseRoomDispersionSyncModel.java | 50e65a57cd7a718d4af413c7c57da808e3afb0d0 | [
"Apache-2.0"
] | permissive | smitzhang/alipay-sdk-java-all | dccc7493c03b3c937f93e7e2be750619f9bed068 | a835a9c91e800e7c9350d479e84f9a74b211f0c4 | refs/heads/master | 2022-11-23T20:32:27.041116 | 2020-08-03T13:03:02 | 2020-08-03T13:03:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,901 | java | package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 分散式(整租/合租)房源同步
*
* @author auto create
* @since 1.0, 2020-05-12 14:19:28
*/
public class AlipayEcoRenthouseRoomDispersionSyncModel extends AlipayObject {
private static final long serialVersionUID = 3769987646127241784L;
/**
* 阿里短号
*/
@ApiField("ali_short_num")
private String aliShortNum;
/**
* 户型-房
数值范围:1-26
*/
@ApiField("bedroom_count")
private Long bedroomCount;
/**
* 可入住时间YYYY-MM-DD。大于今日,且小于等于185天
*/
@ApiField("checkin_time")
private String checkinTime;
/**
* 小区同步请求号
*/
@ApiField("comm_req_id")
private String commReqId;
/**
* 佣金
*/
@ApiField("commission")
private String commission;
/**
* 佣金类型(p:百分比,m:金额)
*/
@ApiField("commission_type")
private String commissionType;
/**
* 小区Code和小区请求号必输入其一
小区Code,详见文档
http://ecopublic.oss-cn-hangzhou.aliyuncs.com/eco/tpmogo/CommunityInfos/CommunityInfos.xls
*/
@ApiField("community_code")
private String communityCode;
/**
* 房源详情页跳转地址;
如不填可以走约定页面(约定页面地址在入住时提交);
如无约定地址则走默认页面,默认页面无签约流程
*/
@ApiField("detail_address")
private String detailAddress;
/**
* 房源所支持的平台服务
*/
@ApiListField("feature")
@ApiField("string")
private List<String> feature;
/**
* 费用说明
*/
@ApiField("fee_remark")
private String feeRemark;
/**
* 公寓面积 数值范围:5.00㎡-300.00㎡,支持小数点后面2位
*/
@ApiField("flat_area")
private String flatArea;
/**
* 门牌-栋(楼号)
*/
@ApiField("flat_building")
private String flatBuilding;
/**
* 分散式合租公共区域物品配置,分散式整租不用设置
1:WIFI;3:热水器;4:洗衣机;5:冰箱;6:电视;7:微波炉;8:燃气灶;9:抽油烟机;10:电磁炉;14:沙发;
*/
@ApiListField("flat_configs")
@ApiField("string")
private List<String> flatConfigs;
/**
* 门牌-单元
*/
@ApiField("flat_unit")
private String flatUnit;
/**
* 所在楼层
*/
@ApiField("floor_count")
private Long floorCount;
/**
* 押金 数值范围:0-¥420000.00
*/
@ApiField("foregift_amount")
private String foregiftAmount;
/**
* 免押金开始时间 YYYY-MM-dd
*/
@ApiField("free_begin_date")
private String freeBeginDate;
/**
* 免押金结束时间 YYYY-MM-dd
*/
@ApiField("free_end_date")
private String freeEndDate;
/**
* 通过"文件上传"接口返回的房源图片url路径。房间照片可录入0~10张,目前仅支持jpg、png、jpeg格式
*/
@ApiListField("images")
@ApiField("string")
private List<String> images;
/**
* 房源描述
*/
@ApiField("intro")
private String intro;
/**
* 可签约至YYYY-MM-DD
*/
@ApiField("max_lease_time")
private String maxLeaseTime;
/**
* 多少天起可租
*/
@ApiField("min_rent_days")
private Long minRentDays;
/**
* 其它费用
*/
@ApiListField("other_amount")
@ApiField("eco_renthouse_other_amount")
private List<EcoRenthouseOtherAmount> otherAmount;
/**
* 管家姓名
*/
@ApiField("owners_name")
private String ownersName;
/**
* 管家手机号码,必须为400开头
*/
@ApiField("owners_tel")
private String ownersTel;
/**
* 户型-厅
数值范围:0-10
*/
@ApiField("parlor_count")
private Long parlorCount;
/**
* 付款方式-付
1:付一,2:付二
*/
@ApiField("pay_type")
private Long payType;
/**
* 付款方式列表,包括上述单独传递的付款方式。如果2种都传递,默认覆盖单独传递的付款方式。
*/
@ApiListField("pay_type_list")
@ApiField("eco_dis_renthousepay_type_list")
private List<EcoDisRenthousepayTypeList> payTypeList;
/**
* 出租状态 数值范围:1未租、2已租
*/
@ApiField("rent_status")
private Long rentStatus;
/**
* 出租类型 1:整租,2:合租
*/
@ApiField("rent_type")
private Long rentType;
/**
* 租金 数值范围:¥100.00 - ¥35000.00 ,支持小数点后面2位
*/
@ApiField("room_amount")
private String roomAmount;
/**
* 房间面积 数值范围:5.00㎡-300.00㎡,支持小数点后面2位
*/
@ApiField("room_area")
private String roomArea;
/**
* KA内部存储的房源编号
*/
@ApiField("room_code")
private Long roomCode;
/**
* 分散式房间物品配置:
分散式整租房间配置
2:空调;3:热水器;4:洗衣机;5:冰箱;6:电视;7:微波炉;8:燃气灶;9:抽油烟机;10:电磁炉;11:床;11:WIFI;12:书桌;13:衣柜;14:沙发;15:阳台;
分散式合租房间配置
2:空调;6:电视;11:床;12:书桌;13:衣柜;15:阳台;16:独卫;
*/
@ApiListField("room_configs")
@ApiField("string")
private List<String> roomConfigs;
/**
* 分散式合租房间内对应每个卧室朝向
根据rent_type区分是否必填,合租必填,整租否。
*/
@ApiField("room_face")
private Long roomFace;
/**
* 分散式合租房间内对应每个卧室名称。A_Z字母之一表示。
根据rent_type区分是否必填,合租必填,整租否。
*/
@ApiField("room_name")
private String roomName;
/**
* 门牌-室
*/
@ApiField("room_num")
private String roomNum;
/**
* 房源初始上下架状态
上架状态租房平台会展示该房间信息,下架状态反之
*/
@ApiField("room_status")
private Long roomStatus;
/**
* 房源对应的店铺编号
*/
@ApiField("room_store_no")
private String roomStoreNo;
/**
* 户型-卫
数值范围:0-10
*/
@ApiField("toilet_count")
private Long toiletCount;
/**
* 房屋总楼层
*/
@ApiField("total_floor_count")
private String totalFloorCount;
/**
* 房源视频地址
视频:多少分钟,大小多少
*/
@ApiField("video")
private String video;
public String getAliShortNum() {
return this.aliShortNum;
}
public void setAliShortNum(String aliShortNum) {
this.aliShortNum = aliShortNum;
}
public Long getBedroomCount() {
return this.bedroomCount;
}
public void setBedroomCount(Long bedroomCount) {
this.bedroomCount = bedroomCount;
}
public String getCheckinTime() {
return this.checkinTime;
}
public void setCheckinTime(String checkinTime) {
this.checkinTime = checkinTime;
}
public String getCommReqId() {
return this.commReqId;
}
public void setCommReqId(String commReqId) {
this.commReqId = commReqId;
}
public String getCommission() {
return this.commission;
}
public void setCommission(String commission) {
this.commission = commission;
}
public String getCommissionType() {
return this.commissionType;
}
public void setCommissionType(String commissionType) {
this.commissionType = commissionType;
}
public String getCommunityCode() {
return this.communityCode;
}
public void setCommunityCode(String communityCode) {
this.communityCode = communityCode;
}
public String getDetailAddress() {
return this.detailAddress;
}
public void setDetailAddress(String detailAddress) {
this.detailAddress = detailAddress;
}
public List<String> getFeature() {
return this.feature;
}
public void setFeature(List<String> feature) {
this.feature = feature;
}
public String getFeeRemark() {
return this.feeRemark;
}
public void setFeeRemark(String feeRemark) {
this.feeRemark = feeRemark;
}
public String getFlatArea() {
return this.flatArea;
}
public void setFlatArea(String flatArea) {
this.flatArea = flatArea;
}
public String getFlatBuilding() {
return this.flatBuilding;
}
public void setFlatBuilding(String flatBuilding) {
this.flatBuilding = flatBuilding;
}
public List<String> getFlatConfigs() {
return this.flatConfigs;
}
public void setFlatConfigs(List<String> flatConfigs) {
this.flatConfigs = flatConfigs;
}
public String getFlatUnit() {
return this.flatUnit;
}
public void setFlatUnit(String flatUnit) {
this.flatUnit = flatUnit;
}
public Long getFloorCount() {
return this.floorCount;
}
public void setFloorCount(Long floorCount) {
this.floorCount = floorCount;
}
public String getForegiftAmount() {
return this.foregiftAmount;
}
public void setForegiftAmount(String foregiftAmount) {
this.foregiftAmount = foregiftAmount;
}
public String getFreeBeginDate() {
return this.freeBeginDate;
}
public void setFreeBeginDate(String freeBeginDate) {
this.freeBeginDate = freeBeginDate;
}
public String getFreeEndDate() {
return this.freeEndDate;
}
public void setFreeEndDate(String freeEndDate) {
this.freeEndDate = freeEndDate;
}
public List<String> getImages() {
return this.images;
}
public void setImages(List<String> images) {
this.images = images;
}
public String getIntro() {
return this.intro;
}
public void setIntro(String intro) {
this.intro = intro;
}
public String getMaxLeaseTime() {
return this.maxLeaseTime;
}
public void setMaxLeaseTime(String maxLeaseTime) {
this.maxLeaseTime = maxLeaseTime;
}
public Long getMinRentDays() {
return this.minRentDays;
}
public void setMinRentDays(Long minRentDays) {
this.minRentDays = minRentDays;
}
public List<EcoRenthouseOtherAmount> getOtherAmount() {
return this.otherAmount;
}
public void setOtherAmount(List<EcoRenthouseOtherAmount> otherAmount) {
this.otherAmount = otherAmount;
}
public String getOwnersName() {
return this.ownersName;
}
public void setOwnersName(String ownersName) {
this.ownersName = ownersName;
}
public String getOwnersTel() {
return this.ownersTel;
}
public void setOwnersTel(String ownersTel) {
this.ownersTel = ownersTel;
}
public Long getParlorCount() {
return this.parlorCount;
}
public void setParlorCount(Long parlorCount) {
this.parlorCount = parlorCount;
}
public Long getPayType() {
return this.payType;
}
public void setPayType(Long payType) {
this.payType = payType;
}
public List<EcoDisRenthousepayTypeList> getPayTypeList() {
return this.payTypeList;
}
public void setPayTypeList(List<EcoDisRenthousepayTypeList> payTypeList) {
this.payTypeList = payTypeList;
}
public Long getRentStatus() {
return this.rentStatus;
}
public void setRentStatus(Long rentStatus) {
this.rentStatus = rentStatus;
}
public Long getRentType() {
return this.rentType;
}
public void setRentType(Long rentType) {
this.rentType = rentType;
}
public String getRoomAmount() {
return this.roomAmount;
}
public void setRoomAmount(String roomAmount) {
this.roomAmount = roomAmount;
}
public String getRoomArea() {
return this.roomArea;
}
public void setRoomArea(String roomArea) {
this.roomArea = roomArea;
}
public Long getRoomCode() {
return this.roomCode;
}
public void setRoomCode(Long roomCode) {
this.roomCode = roomCode;
}
public List<String> getRoomConfigs() {
return this.roomConfigs;
}
public void setRoomConfigs(List<String> roomConfigs) {
this.roomConfigs = roomConfigs;
}
public Long getRoomFace() {
return this.roomFace;
}
public void setRoomFace(Long roomFace) {
this.roomFace = roomFace;
}
public String getRoomName() {
return this.roomName;
}
public void setRoomName(String roomName) {
this.roomName = roomName;
}
public String getRoomNum() {
return this.roomNum;
}
public void setRoomNum(String roomNum) {
this.roomNum = roomNum;
}
public Long getRoomStatus() {
return this.roomStatus;
}
public void setRoomStatus(Long roomStatus) {
this.roomStatus = roomStatus;
}
public String getRoomStoreNo() {
return this.roomStoreNo;
}
public void setRoomStoreNo(String roomStoreNo) {
this.roomStoreNo = roomStoreNo;
}
public Long getToiletCount() {
return this.toiletCount;
}
public void setToiletCount(Long toiletCount) {
this.toiletCount = toiletCount;
}
public String getTotalFloorCount() {
return this.totalFloorCount;
}
public void setTotalFloorCount(String totalFloorCount) {
this.totalFloorCount = totalFloorCount;
}
public String getVideo() {
return this.video;
}
public void setVideo(String video) {
this.video = video;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.